Commit 8e3efd92 authored by Eike Ziller's avatar Eike Ziller

Fix Get Started Now (and other links)

If we do not specify the correct documentation URL including the version
number, QtHelp will look for any documentation that has the given path.
Since we now register Qbs documentation, and that also has a file
"doc/index.html", the Get Started Now button could open the Qbs manual
instead of the Qt Creator one.
Specify the full documentation URL including version number to ensure
that QtHelp opens the right page.

Change-Id: Ia77103fe2763dd208d3b9a279a8301f7f5799c8b
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent f2e5e220
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment