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 <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-10-25 11:33:13 +02:00
parent 80a3c7248e
commit 7f0654e35c

View File

@@ -159,7 +159,9 @@ void BaseHoverHandler::operateTooltip(TextEditorWidget *editorWidget, const QPoi
Utils::ToolTip::show(point, Utils::ToolTip::show(point,
m_toolTip, m_toolTip,
editorWidget, editorWidget,
QVariant::fromValue(m_lastHelpItemIdentified)); m_lastHelpItemIdentified.isEmpty()
? QVariant()
: QVariant::fromValue(m_lastHelpItemIdentified));
} }
} // namespace TextEditor } // namespace TextEditor