summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/stackhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/stackhandler.cpp')
-rw-r--r--src/plugins/debugger/stackhandler.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp
index bcc57619c9..6144d2919b 100644
--- a/src/plugins/debugger/stackhandler.cpp
+++ b/src/plugins/debugger/stackhandler.cpp
@@ -205,6 +205,20 @@ void StackHandler::setFrames(const StackFrames &frames, bool canExpand)
emit stackChanged();
}
+void StackHandler::prependFrames(const StackFrames &frames)
+{
+ if (frames.isEmpty())
+ return;
+ const int count = frames.size();
+ beginInsertRows(QModelIndex(), 0, count - 1);
+ for (int i = count - 1; i >= 0; --i)
+ m_stackFrames.prepend(frames.at(i));
+ endInsertRows();
+ if (m_currentIndex >= 0)
+ setCurrentIndex(m_currentIndex + count);
+ emit stackChanged();
+}
+
const StackFrames &StackHandler::frames() const
{
return m_stackFrames;