summaryrefslogtreecommitdiff
path: root/src/plugins/help/helpviewer.cpp
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2010-04-20 16:15:21 +0200
committerkh1 <qt-info@nokia.com>2010-04-20 16:17:29 +0200
commite6900ff03d58a2ec2200ee87ee6b3f5a1d72b8e6 (patch)
tree5637c4d22961514bb05ab3b31027b1593efe2cd9 /src/plugins/help/helpviewer.cpp
parentce99372c63eb5738460f11600fdc619ab7b7eadb (diff)
downloadqt-creator-e6900ff03d58a2ec2200ee87ee6b3f5a1d72b8e6.tar.gz
Just use the path as the url can have an anchor attached etc...
Fixes the broken topic chooser and keyword resolving. Reviewed-by: ck
Diffstat (limited to 'src/plugins/help/helpviewer.cpp')
-rw-r--r--src/plugins/help/helpviewer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/help/helpviewer.cpp b/src/plugins/help/helpviewer.cpp
index d8726a99cb..a88393c665 100644
--- a/src/plugins/help/helpviewer.cpp
+++ b/src/plugins/help/helpviewer.cpp
@@ -109,10 +109,11 @@ bool HelpViewer::canOpenPage(const QString &url)
return !mimeFromUrl(url).isEmpty();
}
-QString HelpViewer::mimeFromUrl(const QString &url)
+QString HelpViewer::mimeFromUrl(const QUrl &url)
{
- const int index = url.lastIndexOf(QLatin1Char('.'));
- const QByteArray &ext = url.mid(index).toUtf8().toLower();
+ const QString &path = url.path();
+ const int index = path.lastIndexOf(QLatin1Char('.'));
+ const QByteArray &ext = path.mid(index).toUtf8().toLower();
const ExtensionMap *e = extensionMap;
while (e->extension) {