Ubuntu Pastebin

Paste from me at Thu, 2 Apr 2015 15:52:08 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/src/ioslaves/help/kio_help.cpp b/src/ioslaves/help/kio_help.cpp
index 5abd4c8..34d178a 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");
Download as text