aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/help/helpviewer.cpp
diff options
context:
space:
mode:
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) {