diff options
author | Aurindam Jana <[email protected]> | 2012-10-09 16:13:29 +0200 |
---|---|---|
committer | Aurindam Jana <[email protected]> | 2012-10-10 16:55:07 +0200 |
commit | 388a21c82646f6684dbd51f7fcfc9f5cd45c01af (patch) | |
tree | 6f0ed86ed49c699ea3ad9366376ab7e9ce400a94 /src/plugins/debugger/watchhandler.cpp | |
parent | 3f2e43748cad534b728b1c6eb3774fc02eb854b1 (diff) |
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 <[email protected]>
Reviewed-by: Christiaan Janssen <[email protected]>
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r-- | src/plugins/debugger/watchhandler.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index afd3a7c6713..ebeb8629b68 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -193,7 +193,7 @@ private: bool ancestorChanged(const QSet<QByteArray> &parentINames, WatchItem *item) const; void insertBulkData(const QList<WatchData> &data); QString displayForAutoTest(const QByteArray &iname) const; - void reinitialize(); + void reinitialize(bool includeInspectData = false); void destroyItem(WatchItem *item); // With model notification. void destroyChildren(WatchItem *item); // With model notification. void destroyHelper(const WatchItems &items); // Without model notification. @@ -315,7 +315,7 @@ WatchItem *WatchModel::createItem(const QByteArray &iname, const QString &name, return item; } -void WatchModel::reinitialize() +void WatchModel::reinitialize(bool includeInspectData) { CHECK(checkTree()); //MODEL_DEBUG("REMOVING " << n << " CHILDREN OF " << m_root->iname); @@ -324,8 +324,10 @@ void WatchModel::reinitialize() destroyChildren(m_watchRoot); destroyChildren(m_returnRoot); destroyChildren(m_tooltipRoot); - destroyChildren(m_inspectorRoot); - QTC_CHECK(m_cache.size() == 6); + if (includeInspectData) { + destroyChildren(m_inspectorRoot); + QTC_CHECK(m_cache.size() == 6); + } CHECK(checkTree()); } @@ -434,7 +436,7 @@ void WatchModel::reinsertAllData() { QList<WatchData> list; reinsertAllDataHelper(m_root, &list); - reinitialize(); + reinitialize(true); insertBulkData(list); } @@ -1516,9 +1518,9 @@ void WatchHandler::insertData(const QList<WatchData> &list) updateWatchersWindow(); } -void WatchHandler::removeAllData() +void WatchHandler::removeAllData(bool includeInspectData) { - m_model->reinitialize(); + m_model->reinitialize(includeInspectData); updateWatchersWindow(); } |