summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@digia.com>2013-03-08 15:54:06 +0100
committerAurindam Jana <aurindam.jana@digia.com>2013-03-14 13:22:03 +0100
commit3c8602f9b35f320b498ee1d3371d31e2a57310f9 (patch)
tree0c0f5740d85db75a8b20d56d2b5cb6b64954ffb4 /src/plugins/debugger/qml/qmlv8debuggerclient.cpp
parent6a0488fd25bbc72e085dc11fb5fb2f95d60cc56b (diff)
downloadqt-creator-3c8602f9b35f320b498ee1d3371d31e2a57310f9.tar.gz
QmlDebugging: Expand watch data that were previously expanded
The watch data model is cleared on every debug step. Hence, tracking of expanded watch data is lost. Now, we keep track of expanded watch data when stepping. However, we still lose track of this data on a scope/stack change. Task-number: QTCREATORBUG-8901 Change-Id: I1dc609cae1c3a36d8320864f71336b655eaa09d1 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlv8debuggerclient.cpp')
-rw-r--r--src/plugins/debugger/qml/qmlv8debuggerclient.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
index 88d5d04c59..1ffbe48c11 100644
--- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
+++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
@@ -1647,6 +1647,15 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const
d->clearCache();
const int frameIndex = stackHandler->currentIndex();
+ QSet<QByteArray> expandedInames = watchHandler->expandedINames();
+ QHash<quint64, QByteArray> handlesToLookup;
+ // Store handles of all expanded watch data
+ foreach (const QByteArray &iname, expandedInames) {
+ const WatchData *wd = watchHandler->findData(iname);
+ if (!wd || !wd->isLocal())
+ continue;
+ handlesToLookup.insert(wd->id, iname);
+ }
watchHandler->removeAllData();
if (frameIndex < 0)
return;
@@ -1685,6 +1694,11 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const
d->scope(scopeIndex);
}
d->engine->gotoLocation(stackHandler->currentFrame());
+
+ // Expand watch data that were previously expanded
+ QHash<quint64, QByteArray>::const_iterator itEnd = handlesToLookup.end();
+ for (QHash<quint64, QByteArray>::const_iterator it = handlesToLookup.begin(); it != itEnd; ++it)
+ expandObject(it.value(), it.key());
emit stackFrameCompleted();
}