Debugger: Extend threads model to display frame.

Acked-by: hjk <qtc-commiter@nokia.com>
This commit is contained in:
Friedemann Kleint
2009-10-05 17:19:28 +02:00
parent bdd0169c3c
commit 67155e3d7f
3 changed files with 85 additions and 18 deletions

View File

@@ -100,8 +100,15 @@ private:
struct ThreadData
{
ThreadData(int threadId = 0) : id(threadId) {}
ThreadData(int threadId = 0);
void notifyRunning(); // Clear state information
int id;
// State information when stopped
quint64 address;
QString function;
QString file;
int line;
};
/*! A model to represent the running threads in a QTreeView or ComboBox */
@@ -119,6 +126,9 @@ public:
QList<ThreadData> threads() const;
QAbstractItemModel *threadsModel() { return this; }
// Clear out all frame information
void notifyRunning();
private:
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
@@ -126,11 +136,10 @@ private:
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
private:
friend class StackHandler;
QList<ThreadData> m_threads;
int m_currentIndex;
QIcon m_positionIcon;
QIcon m_emptyIcon;
const QIcon m_positionIcon;
const QIcon m_emptyIcon;
};