Help: Avoid double lookup for help tooltips

Save the HelpItem directly in the tooltip instead of the help ID which
would need to be looked up again.

Change-Id: I107e82e89d9ea26cad9d6532ad4c687d1ac8f1ec
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-01-29 11:43:43 +01:00
parent 4e8c2c4b13
commit 32429e11c9
9 changed files with 67 additions and 57 deletions

View File

@@ -159,9 +159,10 @@ void BaseHoverHandler::operateTooltip(TextEditorWidget *editorWidget, const QPoi
if (m_toolTip.isEmpty())
Utils::ToolTip::hide();
else
Utils::ToolTip::show(point, m_toolTip, editorWidget, m_lastHelpItemIdentified.isValid()
? m_lastHelpItemIdentified.helpId()
: QString());
Utils::ToolTip::show(point,
m_toolTip,
editorWidget,
qVariantFromValue(m_lastHelpItemIdentified));
}
} // namespace TextEditor