forked from qt-creator/qt-creator
TextEditor: Let BaseHoverHandler handle help id callbacks
...to support asynchronous hover handlers like ClangHoverHandler. Change-Id: I8dc7189db37ec3a923cf493b8957c59ec9be447c Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -7925,8 +7925,9 @@ void BaseTextEditor::setContextHelpId(const QString &id)
|
||||
void TextEditorWidget::contextHelpId(const IContext::HelpIdCallback &callback)
|
||||
{
|
||||
if (d->m_contextHelpId.isEmpty() && !d->m_hoverHandlers.isEmpty())
|
||||
d->m_contextHelpId = d->m_hoverHandlers.first()->contextHelpId(this, textCursor().position());
|
||||
callback(d->m_contextHelpId);
|
||||
d->m_hoverHandlers.first()->contextHelpId(this, textCursor().position(), callback);
|
||||
else
|
||||
callback(d->m_contextHelpId);
|
||||
}
|
||||
|
||||
void TextEditorWidget::setContextHelpId(const QString &id)
|
||||
|
||||
Reference in New Issue
Block a user