summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/stackhandler.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2012-09-20 10:31:34 +0200
committerhjk <qthjk@ovi.com>2012-09-20 11:11:45 +0200
commit938612c35e82bec69868e1bf6490c1b331085d82 (patch)
tree695b915720cc20a6524e0ea2f28a54a9fb24af7f /src/plugins/debugger/stackhandler.cpp
parent1b3d637c1ba12cb9b8880000d05d1c864f81ce86 (diff)
downloadqt-creator-938612c35e82bec69868e1bf6490c1b331085d82.tar.gz
Do not use QAbstractItemModel::reset().
Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935 Rationale: a) It is conceptually cleaner to do the changes to the model in between calls to beginResetModel() and endResetModel, respectively. b) The function is deprecated in Qt 5, for exactly that reason. Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger/stackhandler.cpp')
-rw-r--r--src/plugins/debugger/stackhandler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp
index c83df76315..2584850434 100644
--- a/src/plugins/debugger/stackhandler.cpp
+++ b/src/plugins/debugger/stackhandler.cpp
@@ -184,13 +184,15 @@ void StackHandler::setCurrentIndex(int level)
void StackHandler::removeAll()
{
+ beginResetModel();
m_stackFrames.clear();
setCurrentIndex(-1);
- reset();
+ endResetModel();
}
void StackHandler::setFrames(const StackFrames &frames, bool canExpand)
{
+ beginResetModel();
m_resetLocationScheduled = false;
m_contentsValid = true;
m_canExpand = canExpand;
@@ -199,7 +201,7 @@ void StackHandler::setFrames(const StackFrames &frames, bool canExpand)
setCurrentIndex(0);
else
m_currentIndex = -1;
- reset();
+ endResetModel();
emit stackChanged();
}
@@ -217,8 +219,9 @@ void StackHandler::scheduleResetLocation()
void StackHandler::resetLocation()
{
if (m_resetLocationScheduled) {
+ beginResetModel();
m_resetLocationScheduled = false;
- reset();
+ endResetModel();
}
}