diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-11-06 12:23:58 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-11-25 14:49:25 +0000 |
commit | cc60efdbf60eea690478ab8244e863c70fc7957a (patch) | |
tree | af4bf35416c8534880e3d0b8617cdad7c35ad95c /src/plugins/help/localhelpmanager.cpp | |
parent | 5bac8114320dc06b64ce3843741fc96f1b641c35 (diff) | |
download | qt-creator-cc60efdbf60eea690478ab8244e863c70fc7957a.tar.gz |
Help: Add tool button to change target for context help
Adds a button in the tool bar for the help widget.
If the help widget is currently the target for context help, the button
is "checked", and pressing it opens a menu with all the options.
If the help widget is currently not the target for context help, the
button is "unchecked" and pressing it makes the help widget the target
for context help.
The menu can in all cases be opened with a long button press.
Fixes: QTCREATORBUG-17667
Change-Id: I748e18f36ebde03eaa779557dd09f7a2bc0bcb2d
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/help/localhelpmanager.cpp')
-rw-r--r-- | src/plugins/help/localhelpmanager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/help/localhelpmanager.cpp b/src/plugins/help/localhelpmanager.cpp index 8af763f426..ae9fe6cd51 100644 --- a/src/plugins/help/localhelpmanager.cpp +++ b/src/plugins/help/localhelpmanager.cpp @@ -231,7 +231,10 @@ Core::HelpManager::HelpViewerLocation LocalHelpManager::contextHelpOption() void LocalHelpManager::setContextHelpOption(Core::HelpManager::HelpViewerLocation location) { + if (location == contextHelpOption()) + return; Core::ICore::settings()->setValue(kContextHelpOptionKey, location); + emit m_instance->contextHelpOptionChanged(location); } bool LocalHelpManager::returnOnClose() |