aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/basehoverhandler.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-10-25 11:33:13 +0200
committerEike Ziller <eike.ziller@qt.io>2019-10-25 11:10:05 +0000
commit7f0654e35c694ba4569094b6c135b9a842c35dc6 (patch)
tree5ac3337361f27fed51d4798a0353636fa02839cc /src/plugins/texteditor/basehoverhandler.cpp
parent80a3c7248e975ae9e4c24b8dc0edd6ab9c3c17b8 (diff)
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>
Diffstat (limited to 'src/plugins/texteditor/basehoverhandler.cpp')
-rw-r--r--src/plugins/texteditor/basehoverhandler.cpp4
1 files changed, 3 insertions, 1 deletions
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