Commit 3781a177 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QmlCppDebugger: Fix tool tip expression



Change-Id: I1dd81d87c744b4a7f8bd86ac08d95bc5e63bd17f
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent 6c494800
......@@ -40,6 +40,9 @@
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
#include <texteditor/itexteditor.h>
#include <qmljseditor/qmljseditorconstants.h>
#include <cppeditor/cppeditorconstants.h>
#include <QTimer>
#include <QMainWindow>
......@@ -127,11 +130,20 @@ QmlCppEngine::~QmlCppEngine()
delete d;
}
bool QmlCppEngine::canDisplayTooltip() const
{
return d->m_cppEngine->canDisplayTooltip() || d->m_qmlEngine->canDisplayTooltip();
}
bool QmlCppEngine::setToolTipExpression(const QPoint & mousePos,
TextEditor::ITextEditor *editor, const DebuggerToolTipContext &ctx)
{
//FIXIT:: This is broken!!
return d->m_activeEngine->setToolTipExpression(mousePos, editor, ctx);
bool success = false;
if (editor->id() == CppEditor::Constants::CPPEDITOR_ID)
success = d->m_cppEngine->setToolTipExpression(mousePos, editor, ctx);
else if (editor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID)
success = d->m_qmlEngine->setToolTipExpression(mousePos, editor, ctx);
return success;
}
void QmlCppEngine::updateWatchData(const WatchData &data,
......
......@@ -50,6 +50,7 @@ public:
QString *errorMessage);
~QmlCppEngine();
bool canDisplayTooltip() const;
bool setToolTipExpression(const QPoint &mousePos,
TextEditor::ITextEditor * editor, const DebuggerToolTipContext &);
void updateWatchData(const WatchData &data,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment