diff --git a/src/ioslaves/help/kio_help.cpp b/src/ioslaves/help/kio_help.cpp
index 5abd4c8..cef0b5b 100644
--- a/src/ioslaves/help/kio_help.cpp
+++ b/src/ioslaves/help/kio_help.cpp
@@ -46,10 +46,17 @@ using namespace KIO;
QString HelpProtocol::langLookup(const QString &fname)
{
- QStringList search;
+ QString path;
+ path = langLookupInternal(fname, QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML", QStandardPaths::LocateDirectory));
+ if (path.isEmpty()) {
+ path = langLookupInternal(fname, QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/kde/HTML", QStandardPaths::LocateDirectory));
+ }
+ return path;
+}
- // assemble the local search paths
- const QStringList localDoc = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML", QStandardPaths::LocateDirectory);
+QString HelpProtocol::langLookupInternal(const QString &fname, const QStringList localDoc)
+{
+ QStringList search;
QStringList langs = QLocale().uiLanguages();
langs.append("en");
@@ -265,8 +272,9 @@ void HelpProtocol::get(const QUrl &url)
// Accessing user data under a different path is possible
// when using usb sticks - this may affect unix/mac systems also
const QString installPath = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/HTML", QStandardPaths::LocateDirectory).last();
+ const QString installPath2 = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "doc/kde/HTML", QStandardPaths::LocateDirectory).last();
- QString cache = '/' + fi.absolutePath().remove(installPath, Qt::CaseInsensitive).replace('/', '_') + '_' + fi.baseName() + '.';
+ QString cache = '/' + fi.absolutePath().remove(installPath, Qt::CaseInsensitive).remove(installPath2, Qt::CaseInsensitive).replace('/', '_') + '_' + fi.baseName() + '.';
#else
QString cache = file.left(file.length() - 7);
#endif