summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-04-23 12:12:08 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-04-23 12:12:08 (GMT)
commit0e3200866d90c579a8951e4ef843c6fe54c2c7bd (patch)
tree648cda06df91bef87e980913f2f8c14bce62f625 /tools
parent3e81eef4d4b857d4938168d3309913d88e4f18bd (diff)
downloadQt-0e3200866d90c579a8951e4ef843c6fe54c2c7bd.zip
Qt-0e3200866d90c579a8951e4ef843c6fe54c2c7bd.tar.gz
Qt-0e3200866d90c579a8951e4ef843c6fe54c2c7bd.tar.bz2
Ensure that all qthelp URLs have paths that start with /qdoc/.
Reviewed-by: kh
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp4
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp7
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();
}
}
}