forked from qt-creator/qt-creator
Debugger: Streamline ThreadHandler
- Use the TreeItem/data pattern recently introduced with Breakpoints to remove the need of keeping track of id/object mapping. Opens possibility to have thread groups as intermediate level. - Use the ThreadHandler directly as model for the thread combobox to remove the need of manual combo box updates. - Move setting current thread from individual engines to central code. Change-Id: I030e21a4aa5ab30b0efbc84528d9cecf29cbbe30 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -31,28 +31,6 @@
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ThreadId
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*! A typesafe identifier. */
|
||||
class ThreadId
|
||||
{
|
||||
public:
|
||||
ThreadId() = default;
|
||||
explicit ThreadId(qint64 id) : m_id(id) {}
|
||||
|
||||
bool isValid() const { return m_id != -1; }
|
||||
qint64 raw() const { return m_id; }
|
||||
bool operator==(const ThreadId other) const { return m_id == other.m_id; }
|
||||
bool operator!=(const ThreadId other) const { return m_id != other.m_id; }
|
||||
|
||||
private:
|
||||
qint64 m_id = -1;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ThreadData
|
||||
@@ -77,12 +55,10 @@ struct ThreadData
|
||||
CoreColumn,
|
||||
ComboNameColumn,
|
||||
ColumnCount = CoreColumn,
|
||||
|
||||
IdRole = Qt::UserRole
|
||||
};
|
||||
|
||||
// Permanent data.
|
||||
ThreadId id;
|
||||
QString id;
|
||||
QString groupId;
|
||||
QString targetId;
|
||||
QString core;
|
||||
|
||||
Reference in New Issue
Block a user