From 25a767c7606f3fa1e6a381c2a9c78d63cfe24ae7 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <daniel.molkentin@nokia.com>
Date: Mon, 30 Jan 2012 15:31:28 +0100
Subject: [PATCH] Extend the CSS workaround in the helpviewer

The documentation now uses /doc instead of /qdoc.

Change-Id: If01ee02d236cb343f78e0c185a3e05620dac24ae
Reviewed-by: Michael Bruning <michael.bruning@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
---
 src/plugins/help/helpviewer_qwv.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/plugins/help/helpviewer_qwv.cpp b/src/plugins/help/helpviewer_qwv.cpp
index e736267763a..d121281a41f 100644
--- a/src/plugins/help/helpviewer_qwv.cpp
+++ b/src/plugins/help/helpviewer_qwv.cpp
@@ -138,8 +138,12 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
     if (!engine.findFile(url).isValid()) {
         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());
+            if (!newUrl.path().startsWith(QLatin1String("/qdoc/")) ||
+                    !newUrl.path().startsWith(QLatin1String("/doc/"))) {
+                QString path = newUrl.path();
+                newUrl.setPath(QLatin1String("/qdoc/") + path);
+                if (!engine.findFile(newUrl).isValid())
+                    newUrl.setPath(QLatin1String("/doc/") + path);
                 url = newUrl.toString();
             }
         }
-- 
GitLab