Improved workaround for new qt documentation, base on dboddie's work.

Make the check more generic, to also work for all other Qt namespaces
than qt.ver.s.ion. Still there's something broken in Qt webkit or so.

Reviewed-by: ck
This commit is contained in:
kh1
2010-04-23 12:11:23 +02:00
parent f996b24612
commit d086f76038
3 changed files with 10 additions and 11 deletions

View File

@@ -133,9 +133,10 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
// the virtual folder
if (!engine.findFile(url).isValid()) {
if (url.startsWith(HelpViewer::DocPath)) {
if (!url.startsWith(HelpViewer::DocPath + "qdoc/")) {
url = url.replace(HelpViewer::DocPath,
HelpViewer::DocPath + QLatin1String("qdoc/"));
QUrl newUrl = request.url();
if (!newUrl.path().startsWith(QLatin1String("/qdoc/"))) {
newUrl.setPath(QLatin1String("/qdoc/") + newUrl.path());
url = newUrl.toString();
}
}
}