From 7f0654e35c694ba4569094b6c135b9a842c35dc6 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 25 Oct 2019 11:33:13 +0200 Subject: [PATCH] TextEditor: Do not show F1 in tool tips that don't provide help ID(s) Like it is the case for the language client. Utils::TextTip::configure uses QVariant::isNull to check. Change-Id: Ie1e47284a9062e79efcf0debf68486b05bce48ef Reviewed-by: David Schulz --- src/plugins/texteditor/basehoverhandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/basehoverhandler.cpp b/src/plugins/texteditor/basehoverhandler.cpp index 136fa30e769..05c9f1a52ae 100644 --- a/src/plugins/texteditor/basehoverhandler.cpp +++ b/src/plugins/texteditor/basehoverhandler.cpp @@ -159,7 +159,9 @@ void BaseHoverHandler::operateTooltip(TextEditorWidget *editorWidget, const QPoi Utils::ToolTip::show(point, m_toolTip, editorWidget, - QVariant::fromValue(m_lastHelpItemIdentified)); + m_lastHelpItemIdentified.isEmpty() + ? QVariant() + : QVariant::fromValue(m_lastHelpItemIdentified)); } } // namespace TextEditor