QmlDesigner: Fixing contextHelpId for TextEditorView

* Using the same pattern we use for FormEditorView

Change-Id: I94f9219b1bd3f269a8288763fdea473f960efeaf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-01-04 12:51:55 +01:00
parent b12a1915a1
commit 5913e15011

View File

@@ -28,6 +28,7 @@
#include "designmodewidget.h"
#include "formeditorwidget.h"
#include "navigatorwidget.h"
#include "texteditorwidget.h"
namespace QmlDesigner {
namespace Internal {
@@ -77,10 +78,7 @@ TextEditorContext::TextEditorContext(QWidget *widget)
QString TextEditorContext::contextHelpId() const
{
// as TextEditorView::contextHelpId() uses the texteditor directly,
// this should not happen
Q_ASSERT(false);
return QLatin1String("not_implemented");
return qobject_cast<TextEditorWidget *>(m_widget)->contextHelpId();
}
}