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>
This commit is contained in:
Nikolai Kosjar
2019-01-07 09:56:52 +01:00
parent 0a8a4bad7e
commit c5b874dcf3
3 changed files with 13 additions and 1 deletions

View File

@@ -114,7 +114,7 @@ void ClangHoverHandler::identifyMatch(TextEditorWidget *editorWidget,
m_cursorPosition = -1;
// Check for diagnostics (sync)
if (editorDocumentProcessorHasDiagnosticAt(editorWidget, pos)) {
if (!isContextHelpRequest() && editorDocumentProcessorHasDiagnosticAt(editorWidget, pos)) {
qCDebug(hoverLog) << "Checking for diagnostic at" << pos;
setPriority(Priority_Diagnostic);
m_cursorPosition = pos;