From b0f9b1d491b8c5c0771312d1f83b6836fac97212 Mon Sep 17 00:00:00 2001
From: kh1 <qt-info@nokia.com>
Date: Wed, 28 Apr 2010 15:04:00 +0200
Subject: [PATCH] We need to check for namespace nokia too.

Reviewed-by: ck
---
 src/plugins/help/helpviewer.cpp     | 3 ++-
 src/plugins/help/helpviewer.h       | 3 ++-
 src/plugins/help/helpviewer_qwv.cpp | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/plugins/help/helpviewer.cpp b/src/plugins/help/helpviewer.cpp
index 76a8758d41b..3fa9fcc9481 100644
--- a/src/plugins/help/helpviewer.cpp
+++ b/src/plugins/help/helpviewer.cpp
@@ -44,7 +44,8 @@
 
 using namespace Help::Internal;
 
-const QString HelpViewer::DocPath = QLatin1String("qthelp://com.trolltech.");
+const QString HelpViewer::NsNokia = QLatin1String("qthelp://com.nokia.");
+const QString HelpViewer::NsTrolltech = QLatin1String("qthelp://com.trolltech.");
 
 const QString HelpViewer::AboutBlankPage =
     QCoreApplication::translate("HelpViewer", "<title>about:blank</title>");
diff --git a/src/plugins/help/helpviewer.h b/src/plugins/help/helpviewer.h
index 5477b7cd7b5..75e55fe6f2a 100644
--- a/src/plugins/help/helpviewer.h
+++ b/src/plugins/help/helpviewer.h
@@ -85,7 +85,8 @@ public:
     bool findText(const QString &text, Find::IFindSupport::FindFlags flags,
         bool incremental, bool fromSearch);
 
-    static const QString DocPath;
+    static const QString NsNokia;
+    static const QString NsTrolltech;
     static const QString AboutBlankPage;
     static const QString PageNotFoundMessage;
 
diff --git a/src/plugins/help/helpviewer_qwv.cpp b/src/plugins/help/helpviewer_qwv.cpp
index 49508662f75..abf812797e7 100644
--- a/src/plugins/help/helpviewer_qwv.cpp
+++ b/src/plugins/help/helpviewer_qwv.cpp
@@ -132,7 +132,7 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
     // html, thus a path inside the css like (../images/foo.png) might cd out of
     // the virtual folder
     if (!engine.findFile(url).isValid()) {
-        if (url.startsWith(HelpViewer::DocPath)) {
+        if (url.startsWith(HelpViewer::NsNokia) || url.startsWith(HelpViewer::NsTrolltech)) {
             QUrl newUrl = request.url();
             if (!newUrl.path().startsWith(QLatin1String("/qdoc/"))) {
                 newUrl.setPath(QLatin1String("/qdoc/") + newUrl.path());
-- 
GitLab