Merge branch 'origin/2.0' (early part)

This commit is contained in:
Erik Verbruggen
2010-06-15 11:30:51 +02:00
21 changed files with 411 additions and 389 deletions

View File

@@ -819,16 +819,8 @@ void HelpPlugin::handleHelpRequest(const QUrl &url)
if (HelpViewer::launchWithExternalApp(url))
return;
if (Core::HelpManager::instance()->findFile(url).isValid()) {
if (url.queryItemValue(QLatin1String("view")) == QLatin1String("split")) {
if (HelpViewer* viewer = viewerForContextMode())
viewer->setSource(url);
} else {
activateHelpMode();
m_centralWidget->setSource(url);
}
} else {
QString address = url.toString();
QString address = url.toString();
if (!Core::HelpManager::instance()->findFile(url).isValid()) {
if (address.startsWith(HelpViewer::NsNokia)
|| address.startsWith(HelpViewer::NsTrolltech)) {
// local help not installed, resort to external web help
@@ -840,7 +832,15 @@ void HelpPlugin::handleHelpRequest(const QUrl &url)
}
address = urlPrefix + address.mid(address.lastIndexOf(QLatin1Char('/')));
}
QDesktopServices::openUrl(address);
}
const QUrl newUrl(address);
if (newUrl.queryItemValue(QLatin1String("view")) == QLatin1String("split")) {
if (HelpViewer* viewer = viewerForContextMode())
viewer->setSource(newUrl);
} else {
activateHelpMode();
m_centralWidget->setSource(newUrl);
}
}