diff options
Diffstat (limited to 'src/plugins/debugger/qml/qmlcppengine.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlcppengine.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp index 61090b940f..997c5eea60 100644 --- a/src/plugins/debugger/qml/qmlcppengine.cpp +++ b/src/plugins/debugger/qml/qmlcppengine.cpp @@ -111,10 +111,11 @@ bool QmlCppEngine::canDisplayTooltip() const bool QmlCppEngine::setToolTipExpression(const QPoint & mousePos, TextEditor::ITextEditor *editor, const DebuggerToolTipContext &ctx) { + QTC_ASSERT(editor, return false); bool success = false; - if (editor->id() == CppEditor::Constants::CPPEDITOR_ID) + if (editor->document()->id() == CppEditor::Constants::CPPEDITOR_ID) success = d->m_cppEngine->setToolTipExpression(mousePos, editor, ctx); - else if (editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) + else if (editor->document()->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) success = d->m_qmlEngine->setToolTipExpression(mousePos, editor, ctx); return success; } |