Commit 4028227f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure helper apps we start are in path

parent b0189689
Pipeline #132232 passed with stage
in 47 seconds
......@@ -10,6 +10,7 @@
*/
#include "kontactkcmultidialog.h"
#include "kontact_debug.h"
#include "kontactkcmultidialog_p.h"
#include <KCModuleProxy>
......@@ -368,7 +369,12 @@ void KontactKCMultiDialog::slotHelpClicked()
const QUrl docUrl = QUrl(QStringLiteral("help:/")).resolved(QUrl(docPath)); // same code as in KHelpClient::invokeHelp
const QString docUrlScheme = docUrl.scheme();
if (docUrlScheme == QLatin1String("help") || docUrlScheme == QLatin1String("man") || docUrlScheme == QLatin1String("info")) {
QProcess::startDetached(QStringLiteral("khelpcenter"), QStringList() << docUrl.toString());
const QString exec = QStandardPaths::findExecutable(QStringLiteral("khelpcenter"));
if (exec.isEmpty()) {
qCWarning(KONTACT_LOG) << "Could not find khelpcenter in PATH.";
} else {
QProcess::startDetached(QStringLiteral("khelpcenter"), QStringList() << docUrl.toString());
}
} else {
QDesktopServices::openUrl(docUrl);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment