Commit 5c054dd2 authored by hjk's avatar hjk

Debugger: Use TreeModel for threads

In preparation of the introduction of thread groups.

Change-Id: Iadac9203eb4d60d0bc930113c2776e65352ed304
Reviewed-by: default avatarChristian Stenger <>
Reviewed-by: default avatarDavid Schulz <>
parent 437c4735
......@@ -89,7 +89,7 @@ void showModuleSymbols(const QString &moduleName, const QVector<Internal::Symbol
void showModuleSections(const QString &moduleName, const QVector<Internal::Section> &sections);
void openMemoryEditor();
void setThreads(const QStringList &list, int index);
void setThreadBoxContents(const QStringList &list, int index);
QSharedPointer<Internal::GlobalDebuggerOptions> globalDebuggerOptions();
......@@ -609,7 +609,7 @@ public:
void disconnectEngine() { connectEngine(0); }
DebuggerEngine *dummyEngine();
void setThreads(const QStringList &list, int index)
void setThreadBoxContents(const QStringList &list, int index)
const bool state = m_threadBox->blockSignals(true);
......@@ -3214,9 +3214,9 @@ void openMemoryEditor()
void setThreads(const QStringList &list, int index)
void setThreadBoxContents(const QStringList &list, int index)
dd->setThreads(list, index);
dd->setThreadBoxContents(list, index);
QSharedPointer<Internal::GlobalDebuggerOptions> globalDebuggerOptions()
......@@ -93,17 +93,6 @@ struct ThreadData
IdRole = Qt::UserRole
void notifyRunning() // Clear state information.
address = 0;
frameLevel = -1;
lineNumber = -1;
stopped = false;
// Permanent data.
ThreadId id;
QByteArray groupId;
This diff is collapsed.
......@@ -33,8 +33,7 @@
#include "threaddata.h"
#include <QAbstractTableModel>
#include <QIcon>
#include <utils/treemodel.h>
......@@ -47,7 +46,7 @@ namespace Internal {
class GdbMi;
class ThreadsHandler : public QAbstractTableModel
class ThreadsHandler : public Utils::TreeModel
......@@ -59,45 +58,33 @@ public:
ThreadId threadAt(int index) const;
void setCurrentThread(ThreadId id);
void updateThread(const ThreadData &thread);
void updateThread(const ThreadData &threadData);
void updateThreads(const GdbMi &data);
void removeThread(ThreadId threadId);
void setThreads(const Threads &threads);
void removeAll();
Threads threads() const;
ThreadData thread(ThreadId id) const;
QAbstractItemModel *model();
// Clear out all frame information
void notifyRunning(const QByteArray &data);
void notifyRunning(ThreadId id);
void notifyRunning(ThreadId threadId);
void notifyAllRunning();
void notifyStopped(const QByteArray &data);
void notifyStopped(ThreadId id);
void notifyStopped(ThreadId threadId);
void notifyAllStopped();
void resetLocation();
void scheduleResetLocation();
int indexOf(ThreadId threadId) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
void sort(int, Qt::SortOrder);
void updateThreadBox();
void threadDataChanged(ThreadId id);
Threads m_threads;
ThreadId m_currentId;
const QIcon m_positionIcon;
const QIcon m_emptyIcon;
void sort(int column, Qt::SortOrder order);
ThreadId m_currentId;
bool m_resetLocationScheduled;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment