Core: Return context help id by callback

...to support asynchronous providers.

Change-Id: I483489c74e7886d5bc2bf00b65540c3d2c7afee0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Nikolai Kosjar
2018-01-17 16:06:13 +01:00
parent 9990fff2c8
commit dd06a4188d
27 changed files with 96 additions and 75 deletions

View File

@@ -150,19 +150,17 @@ WidgetInfo TextEditorView::widgetInfo()
return createWidgetInfo(m_widget.get(), 0, "TextEditor", WidgetInfo::CentralPane, 0, tr("Text Editor"), DesignerWidgetFlags::IgnoreErrors);
}
QString TextEditorView::contextHelpId() const
void TextEditorView::contextHelpId(const Core::IContext::HelpIdCallback &callback) const
{
return AbstractView::contextHelpId();
AbstractView::contextHelpId(callback);
}
QString TextEditorView::qmlJSEditorHelpId() const
void TextEditorView::qmlJSEditorHelpId(const Core::IContext::HelpIdCallback &callback) const
{
if (m_widget->textEditor()) {
QString contextHelpId = m_widget->textEditor()->contextHelpId();
if (!contextHelpId.isEmpty())
return m_widget->textEditor()->contextHelpId();
}
return QString();
if (m_widget->textEditor())
m_widget->textEditor()->contextHelpId(callback);
else
callback(QString());
}
void TextEditorView::nodeIdChanged(const ModelNode& /*node*/, const QString &/*newId*/, const QString &/*oldId*/)