diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 605c38b0d167b5793ca7e3f908a83391e40d2f13..a28fa04399c3dff61186c68368ff4d0117bdf18a 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -89,6 +89,8 @@ StackHandler::StackHandler(QObject *parent) { m_currentIndex = 0; m_canExpand = false; + connect(theDebuggerAction(OperateByInstruction), SIGNAL(triggered()), + this, SLOT(resetModel())); } int StackHandler::rowCount(const QModelIndex &parent) const diff --git a/src/plugins/debugger/stackhandler.h b/src/plugins/debugger/stackhandler.h index 7db40a263b389171ccc8fbfd9730f6b7039b2d77..dd2c0a4997fac25ccdb23b0fd5e5eeafffa9fd2f 100644 --- a/src/plugins/debugger/stackhandler.h +++ b/src/plugins/debugger/stackhandler.h @@ -69,11 +69,12 @@ public: private: // QAbstractTableModel - int rowCount(const QModelIndex &parent = QModelIndex()) const; - int columnCount(const QModelIndex &parent = QModelIndex()) const; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + int rowCount(const QModelIndex &parent) const; + int columnCount(const QModelIndex &parent) const; + QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const; Qt::ItemFlags flags(const QModelIndex &index) const; + Q_SLOT void resetModel() { reset(); } QList<StackFrame> m_stackFrames; int m_currentIndex;