Commit 130064e0 authored by Daniel Molkentin's avatar Daniel Molkentin

Do not switch to help mode if we launch a browser to show the help.

Also, find the help pages for Creator on the web properly.

Reviewed-By: kh
parent f4fa0fd7
......@@ -769,12 +769,19 @@ void HelpPlugin::openHelpPage(const QUrl& url)
void HelpPlugin::openHelpPage(const QString& url)
{
activateHelpMode();
if (m_helpEngine->findFile(url).isValid())
if (m_helpEngine->findFile(url).isValid()) {
activateHelpMode();
m_centralWidget->setSource(url);
else {
QDesktopServices::openUrl(QLatin1String("http://doc.trolltech.com/latest/")
+ url.mid(url.lastIndexOf('/') + 1));
} else {
// local help not installed, resort to external web help
QString urlPrefix;
if (url.startsWith("qthelp://com.nokia.qtcreator")) {
urlPrefix = QString::fromLatin1("http://doc.trolltech.com/qtcreator-%1.%2/")
.arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR);
} else {
urlPrefix = QLatin1String("http://doc.trolltech.com/latest/");
}
QDesktopServices::openUrl(urlPrefix + url.mid(url.lastIndexOf('/') + 1));
}
}
......
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