summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2012-01-19 15:19:28 +0100
committerhjk <qthjk@ovi.com>2012-01-19 15:20:28 +0100
commitfa26b986ded4d3af29a21e24453a224a92a0ebc8 (patch)
tree3773a7550e23db5a26277dd8621485754f6582d8 /src/plugins/debugger
parentc06727ca17dcc98a5f91dcc88dc9dc7c8a79cfd5 (diff)
downloadqt-creator-fa26b986ded4d3af29a21e24453a224a92a0ebc8.tar.gz
debugger: fix recent regression of non-persistent expanded watch items
Change-Id: Iec8b37812faca5584d268712181ffeca98ef6e8a Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/watchhandler.cpp16
-rw-r--r--src/plugins/debugger/watchhandler.h2
2 files changed, 14 insertions, 4 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index bc2d8462e0..d1680a9d34 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -673,6 +673,14 @@ void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
emitDataChanged(column, index(i, 0, parentIndex));
}
+void WatchModel::invalidateAll(const QModelIndex &parentIndex)
+{
+ QModelIndex idx1 = index(0, 0, parentIndex);
+ QModelIndex idx2 = index(rowCount(parentIndex) - 1, columnCount(parentIndex) - 1, parentIndex);
+ if (idx1.isValid() && idx2.isValid())
+ emit dataChanged(idx1, idx2);
+}
+
// Truncate value for item view, maintaining quotes.
static QString truncateValue(QString v)
{
@@ -1878,10 +1886,10 @@ void WatchHandler::resetLocation()
{
if (m_resetLocationScheduled) {
m_resetLocationScheduled = false;
- m_return->reset();
- m_locals->reset();
- m_watchers->reset();
- m_tooltips->reset();
+ m_return->invalidateAll();
+ m_locals->invalidateAll();
+ m_watchers->invalidateAll();
+ m_tooltips->invalidateAll();
}
}
diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h
index 2069f95474..d5e8653267 100644
--- a/src/plugins/debugger/watchhandler.h
+++ b/src/plugins/debugger/watchhandler.h
@@ -90,6 +90,8 @@ private:
bool canFetchMore(const QModelIndex &parent) const;
void fetchMore(const QModelIndex &parent);
+ void invalidateAll(const QModelIndex &parentIndex = QModelIndex());
+
friend class WatchHandler;
WatchItem *watchItem(const QModelIndex &) const;