forked from qt-creator/qt-creator
Debugger: Use a QPointer for the thread switcher
... and (re)create it on demand. That covers the case of a restart of the debugger engine in which case the original switcher was destroyed together with the toolbar of the original perspective. Change-Id: I6180411a37aea46438809a5ff65e5526f9db2a03 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -77,6 +77,7 @@ class ThreadsHandler : public ThreadsHandlerModel
|
||||
|
||||
public:
|
||||
explicit ThreadsHandler(DebuggerEngine *engine);
|
||||
~ThreadsHandler();
|
||||
|
||||
Thread currentThread() const;
|
||||
Thread threadForId(const QString &id) const;
|
||||
@@ -95,7 +96,7 @@ public:
|
||||
void notifyRunning(const QString &id);
|
||||
void notifyStopped(const QString &id);
|
||||
|
||||
QComboBox *threadSwitcher() { return m_comboBox; }
|
||||
QPointer<QComboBox> threadSwitcher();
|
||||
|
||||
private:
|
||||
void sort(int column, Qt::SortOrder order) override;
|
||||
@@ -105,7 +106,7 @@ private:
|
||||
DebuggerEngine *m_engine;
|
||||
Thread m_currentThread;
|
||||
QHash<QString, QString> m_pidForGroupId;
|
||||
QComboBox *m_comboBox;
|
||||
QPointer<QComboBox> m_comboBox;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user