Bug 405647 - help buttons broken; depend on khelpcenter
Summary: help buttons broken; depend on khelpcenter
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 380081 400602 405646 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-19 14:26 UTC by Harald Sitter
Modified: 2020-04-07 10:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2019-03-19 14:26:43 UTC
In 2016 we moved khelpcenter from plasma to applications with the expectation that we'll simply let help requests fall back to the docs.kde.org website when khelpcenter is not installed (which ought to be the default expectation I guess since the unreliable state of khelpcenter is why it was dropped from plasma to begin with).

systemsettings modules help however still 100% depends on khelpcenter

void ModuleView::moduleHelp()
{
    KCModuleInfo * activeModule = d->mModules.value( d->mPageWidget->currentPage() );
    if( !activeModule ) {
        return;
    }

    QString docPath = activeModule->docPath();
    if( docPath.isEmpty() ) {
        return;
    }
    QUrl url( QStringLiteral("help:/")+docPath );
    QProcess::startDetached(QStringLiteral("khelpcenter"), QStringList() << url.url());
}
Comment 1 Ahmad Samir 2020-02-24 08:27:03 UTC
*** Bug 400602 has been marked as a duplicate of this bug. ***
Comment 2 Ahmad Samir 2020-02-25 19:15:51 UTC
*** Bug 380081 has been marked as a duplicate of this bug. ***
Comment 3 Ahmad Samir 2020-02-27 15:47:40 UTC
Git commit 0be65944f311145246e5c0cc2d5326d77dc4abdb by Ahmad Samir.
Committed on 27/02/2020 at 15:47.
Pushed by ahmadsamir into branch 'master'.

If KHelpCenter isn't available fallback to opening doc at docs.kde.org

Summary:
UrlHandler from KGUIAddons sets a handler for help:/ urls, which opens
khelpcenter if it's available or falls back to opening the relevant page
at docs.kde.org.

Explicitly add KGuiAddons to find_package() and target_link_libraries().

Depends on D27615

FIXED-IN: 5.18.1

Test Plan:
- make sure khelpcenter is not installed and open systemsettings
- navigate to any module (one that has Help visible, e.g. Fonts),
  "Help" button is disabled
- install khelpcenter and restart systemsettings, the "Help" button
  should be enabled

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27518

M  +1    -0    CMakeLists.txt
M  +1    -0    app/CMakeLists.txt
M  +5    -2    core/ModuleView.cpp

https://commits.kde.org/systemsettings/0be65944f311145246e5c0cc2d5326d77dc4abdb
Comment 4 Harald Sitter 2020-04-07 10:53:54 UTC
*** Bug 405646 has been marked as a duplicate of this bug. ***