OSDN Git Service

We need to check for namespace nokia too.
authorkh1 <qt-info@nokia.com>
Wed, 28 Apr 2010 13:04:00 +0000 (15:04 +0200)
committerkh1 <qt-info@nokia.com>
Wed, 28 Apr 2010 13:07:05 +0000 (15:07 +0200)
Reviewed-by: ck
src/plugins/help/helpviewer.cpp
src/plugins/help/helpviewer.h
src/plugins/help/helpviewer_qwv.cpp

index 76a8758..3fa9fcc 100644 (file)
@@ -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>");
index 5477b7c..75e55fe 100644 (file)
@@ -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;
 
index 4950866..abf8127 100644 (file)
@@ -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());