diff options
Diffstat (limited to 'src/plugins/help/helpplugin.cpp')
-rw-r--r-- | src/plugins/help/helpplugin.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 39fe63a376e..20570594835 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -629,6 +629,16 @@ void HelpPlugin::highlightSearchTermsInContextHelp() void HelpPlugin::handleHelpRequest(const QUrl &url, HelpManager::HelpViewerLocation location) { + static const QString qtcreatorUnversionedID = "org.qt-project.qtcreator"; + if (url.host() == qtcreatorUnversionedID) { + // QtHelp doesn't know about versions, add the version number and use that + QUrl versioned = url; + versioned.setHost(qtcreatorUnversionedID + "." + + QString::fromLatin1(Core::Constants::IDE_VERSION_LONG).remove('.')); + handleHelpRequest(versioned, location); + return; + } + if (HelpViewer::launchWithExternalApp(url)) return; @@ -639,7 +649,7 @@ void HelpPlugin::handleHelpRequest(const QUrl &url, HelpManager::HelpViewerLocat || address.startsWith("qthelp://com.trolltech.")) { // local help not installed, resort to external web help QString urlPrefix = "http://doc.qt.io/"; - if (url.authority() == "org.qt-project.qtcreator") + if (url.authority().startsWith(qtcreatorUnversionedID)) urlPrefix.append(QString::fromLatin1("qtcreator")); else urlPrefix.append("qt-5"); |