diff options
author | David Boddie <dboddie@trolltech.com> | 2010-04-23 12:12:08 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-04-23 12:12:08 (GMT) |
commit | 0e3200866d90c579a8951e4ef843c6fe54c2c7bd (patch) | |
tree | 648cda06df91bef87e980913f2f8c14bce62f625 | |
parent | 3e81eef4d4b857d4938168d3309913d88e4f18bd (diff) | |
download | Qt-0e3200866d90c579a8951e4ef843c6fe54c2c7bd.zip Qt-0e3200866d90c579a8951e4ef843c6fe54c2c7bd.tar.gz Qt-0e3200866d90c579a8951e4ef843c6fe54c2c7bd.tar.bz2 |
Ensure that all qthelp URLs have paths that start with /qdoc/.
Reviewed-by: kh
-rw-r--r-- | tools/assistant/tools/assistant/helpviewer.cpp | 4 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/helpviewer_qwv.cpp | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp index 22b3f30..25214e2 100644 --- a/tools/assistant/tools/assistant/helpviewer.cpp +++ b/tools/assistant/tools/assistant/helpviewer.cpp @@ -52,9 +52,7 @@ QT_BEGIN_NAMESPACE -QString AbstractHelpViewer::DocPath = QString::fromLatin1("qthelp://com." - "trolltech.qt.%1/").arg(QString(QLatin1String(QT_VERSION_STR)) - .replace(QLatin1String("."), QLatin1String(""))); +QString AbstractHelpViewer::DocPath = QString::fromLatin1("qthelp://com.trolltech."); QString AbstractHelpViewer::AboutBlank = QCoreApplication::translate("HelpViewer", "<title>about:blank</title>"); diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index a19b29a..585c69d 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -139,9 +139,10 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/, // the virtual folder if (!helpEngine.findFile(url).isValid()) { if (url.startsWith(AbstractHelpViewer::DocPath)) { - if (!url.startsWith(AbstractHelpViewer::DocPath + QLatin1String("qdoc/"))) { - url = url.replace(AbstractHelpViewer::DocPath, - AbstractHelpViewer::DocPath + QLatin1String("qdoc/")); + QUrl newUrl = request.url(); + if (!newUrl.path().startsWith(QLatin1String("/qdoc/"))) { + newUrl.setPath(QLatin1String("/qdoc/")+newUrl.path()); + url = newUrl.toString(); } } } |