diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-01-07 09:56:52 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2019-01-10 08:09:20 +0000 |
commit | c5b874dcf362785e9cab5f212417c48eb6f6c81e (patch) | |
tree | dd6d5a61a6e6415e4f7d8f1f1a15996eb3f66967 /src/plugins/texteditor/basehoverhandler.cpp | |
parent | 0a8a4bad7ef2eaece6e15ae5a11ee1ff27885652 (diff) |
Clang: Show help with F1 even if there is a diagnostic
...at that particular location.
For example, the code
new QSignalMapper;
produced a deprecated warning with Qt 5.12 and F1 led to "No
documentation available" as the diagnostic was always prioritized.
Task-number: QTCREATORBUG-21686
Change-Id: Icf03000fb6b9de04e467e758da6167018d154a21
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/basehoverhandler.cpp')
-rw-r--r-- | src/plugins/texteditor/basehoverhandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/texteditor/basehoverhandler.cpp b/src/plugins/texteditor/basehoverhandler.cpp index b8ac2802802..157397ef2f8 100644 --- a/src/plugins/texteditor/basehoverhandler.cpp +++ b/src/plugins/texteditor/basehoverhandler.cpp @@ -73,6 +73,8 @@ void BaseHoverHandler::contextHelpId(TextEditorWidget *widget, int pos, const Core::IContext::HelpIdCallback &callback) { + m_isContextHelpRequest = true; + // If the tooltip is visible and there is a help match, this match is used to update // the help id. Otherwise, let the identification process happen. if (!Utils::ToolTip::isVisible() || !lastHelpItemIdentified().isValid()) { @@ -83,6 +85,8 @@ void BaseHoverHandler::contextHelpId(TextEditorWidget *widget, } else { propagateHelpId(widget, callback); } + + m_isContextHelpRequest = false; } void BaseHoverHandler::setToolTip(const QString &tooltip) @@ -105,6 +109,11 @@ const HelpItem &BaseHoverHandler::lastHelpItemIdentified() const return m_lastHelpItemIdentified; } +bool BaseHoverHandler::isContextHelpRequest() const +{ + return m_isContextHelpRequest; +} + void BaseHoverHandler::propagateHelpId(TextEditorWidget *widget, const Core::IContext::HelpIdCallback &callback) { |