Help: Add method for showing URL in specific viewer

That centralizes all the focus setting, raising of windows, etc. This
was for example already done wrong when opening links in help mode and
external window.

Change-Id: I5036b5caa751d1f36dc442078624a31fb8f573ee
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Eike Ziller
2017-07-11 17:05:40 +02:00
parent be3dbd4c53
commit 6afc0c3eb6
3 changed files with 26 additions and 21 deletions

View File

@@ -70,9 +70,7 @@ namespace Internal {
static void openUrlInWindow(const QUrl &url)
{
HelpViewer *viewer = HelpPlugin::viewerForHelpViewerLocation(Core::HelpManager::ExternalHelpAlways);
if (QTC_GUARD(viewer))
viewer->setSource(url);
Core::ICore::raiseWindow(viewer);
HelpPlugin::showInHelpViewer(url, viewer);
}
static bool isBookmarkable(const QUrl &url)