Help: Avoid multiple lookups of help id for context help

Context help would first query the database with potential IDs, and
afterwards the help plugin would look up the links for the resulting ID
again.
Pass the HelpItem (which potentially contains the cached links) directly
to context help.

Change-Id: I73bddcd3cd4eacaea412b98d53c5e5354a31f3d5
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-01-25 15:04:50 +01:00
parent c04c5c1575
commit 418dcfbcbb
17 changed files with 67 additions and 58 deletions

View File

@@ -160,7 +160,7 @@ void TextEditorView::contextHelpId(const Core::IContext::HelpIdCallback &callbac
void TextEditorView::qmlJSEditorHelpId(const Core::IContext::HelpIdCallback &callback) const
{
if (m_widget->textEditor())
m_widget->textEditor()->contextHelpId(callback);
m_widget->textEditor()->contextHelp(callback);
else
callback(QString());
}