diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index bc2d8462e0c84d3b3e880e3772120ac8e8cef482..d1680a9d340b498a56dcf91b58deeff25297afbb 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 2069f95474ac0d91029a7e009af5b63fd9b15331..d5e8653267cf7f89ce5a64205e157926fa0923a6 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;