summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/qml/qmlcppengine.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-06-08 18:07:11 +0200
committerhjk <hjk@theqtcompany.com>2015-06-10 07:40:27 +0000
commit5309e217e460d4f20ab932334b9e808216f9b2a7 (patch)
tree26b5f6010ea7efb2bb0acf1c2a2f407790d36bb3 /src/plugins/debugger/qml/qmlcppengine.cpp
parent7d257acb4b82b644c3c0d91ff38d6661d38896e1 (diff)
downloadqt-creator-5309e217e460d4f20ab932334b9e808216f9b2a7.tar.gz
Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into a bool canHandleToolTip(), and the actual processing of the request, which is mostly identical to the handling of a watcher. Handling a watcher is now mostly the same as a full Locals update, except for the 'partial' flag. Pushing the handling of that down to the bridges gives identical code paths in the gdb and lldbengine. Move that to the DebuggerEngine base class. Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlcppengine.cpp')
-rw-r--r--src/plugins/debugger/qml/qmlcppengine.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/plugins/debugger/qml/qmlcppengine.cpp b/src/plugins/debugger/qml/qmlcppengine.cpp
index e95ebef02a..baef8df87c 100644
--- a/src/plugins/debugger/qml/qmlcppengine.cpp
+++ b/src/plugins/debugger/qml/qmlcppengine.cpp
@@ -102,29 +102,28 @@ bool QmlCppEngine::canDisplayTooltip() const
return m_cppEngine->canDisplayTooltip() || m_qmlEngine->canDisplayTooltip();
}
-bool QmlCppEngine::setToolTipExpression(const DebuggerToolTipContext &ctx)
+bool QmlCppEngine::canHandleToolTip(const DebuggerToolTipContext &ctx) const
{
bool success = false;
if (ctx.isCppEditor)
- success = m_cppEngine->setToolTipExpression(ctx);
+ success = m_cppEngine->canHandleToolTip(ctx);
else
- success = m_qmlEngine->setToolTipExpression(ctx);
+ success = m_qmlEngine->canHandleToolTip(ctx);
return success;
}
-void QmlCppEngine::updateWatchItem(WatchItem *item)
+void QmlCppEngine::updateWatchData(const QByteArray &iname)
{
- if (item->isInspect())
- m_qmlEngine->updateWatchItem(item);
+ if (iname.startsWith("inspect."))
+ m_qmlEngine->updateWatchData(iname);
else
- m_activeEngine->updateWatchItem(item);
+ m_activeEngine->updateWatchData(iname);
}
-void QmlCppEngine::watchDataSelected(const QByteArray &iname)
+void QmlCppEngine::selectWatchData(const QByteArray &iname)
{
- const WatchItem *item = watchHandler()->findItem(iname);
- if (item && item->isInspect())
- m_qmlEngine->watchDataSelected(iname);
+ if (iname.startsWith("inspect."))
+ m_qmlEngine->selectWatchData(iname);
}
void QmlCppEngine::watchPoint(const QPoint &point)