diff options
author | Aurindam Jana <aurindam.jana@digia.com> | 2012-10-09 16:13:29 +0200 |
---|---|---|
committer | Aurindam Jana <aurindam.jana@digia.com> | 2012-10-10 16:55:07 +0200 |
commit | 388a21c82646f6684dbd51f7fcfc9f5cd45c01af (patch) | |
tree | 6f0ed86ed49c699ea3ad9366376ab7e9ce400a94 /src/plugins/debugger/qml/qmlv8debuggerclient.cpp | |
parent | 3f2e43748cad534b728b1c6eb3774fc02eb854b1 (diff) | |
download | qt-creator-388a21c82646f6684dbd51f7fcfc9f5cd45c01af.tar.gz |
QmlDebugger: Insert locals correctly
The watchhandler needs to be reset for locals before
inserting the values of a new frame. Also the DebuggerTooltipManager
needs to be notified. The values of the locals in the
LocalsAndExpressions window should be editable.
Task-number: QTCREATORBUG-7992
Change-Id: I556e23b408db09b510f1f2bc350ff55187ec87c2
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlv8debuggerclient.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclient.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp index ea47c72c35..79360a6b16 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp @@ -1186,6 +1186,7 @@ void QmlV8DebuggerClient::expandObject(const QByteArray &iname, quint64 objectId void QmlV8DebuggerClient::setEngine(QmlEngine *engine) { d->engine = engine; + connect(this, SIGNAL(stackFrameCompleted()), engine, SIGNAL(stackFrameCompleted())); } void QmlV8DebuggerClient::getSourceFiles() @@ -1682,8 +1683,17 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const QVariantMap currentFrame = bodyVal.toMap(); StackHandler *stackHandler = d->engine->stackHandler(); - + WatchHandler * watchHandler = d->engine->watchHandler(); d->clearCache(); + + const int frameIndex = stackHandler->currentIndex(); + watchHandler->removeAllData(); + if (frameIndex < 0) + return; + const StackFrame frame = stackHandler->currentFrame(); + if (!frame.isUsable()) + return; + //Set "this" variable { WatchData data; @@ -1702,7 +1712,7 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const data.setHasChildren(true); data.id = 0; } - d->engine->watchHandler()->insertData(data); + watchHandler->insertData(data); } const QVariantList currentFrameScopes = currentFrame.value(_("scopes")).toList(); @@ -1716,6 +1726,7 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const d->scope(scopeIndex); } d->engine->gotoLocation(stackHandler->currentFrame()); + emit stackFrameCompleted(); } void QmlV8DebuggerClient::updateScope(const QVariant &bodyVal, const QVariant &refsVal) |