QmlDesigner: Fix help

The designer used a over simplified lookup,
that did not distinguish between e.g. Controls 1 and Controls 2.
Instead of fixing the lookup we simply use the working lookup from
the QmlJSEditor.

Change-Id: I2d31e633eaadc67e211d44bad307b26993f21fc9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-03-22 12:17:28 +01:00
parent 316ed6943c
commit 970496b24c
5 changed files with 23 additions and 16 deletions

View File

@@ -146,13 +146,18 @@ WidgetInfo TextEditorView::widgetInfo()
}
QString TextEditorView::contextHelpId() const
{
return AbstractView::contextHelpId();
}
QString TextEditorView::qmlJSEditorHelpId() const
{
if (m_widget->textEditor()) {
QString contextHelpId = m_widget->textEditor()->contextHelpId();
if (!contextHelpId.isEmpty())
return m_widget->textEditor()->contextHelpId();
}
return AbstractView::contextHelpId();
return QString();
}
void TextEditorView::nodeIdChanged(const ModelNode& /*node*/, const QString &/*newId*/, const QString &/*oldId*/)