forked from qt-creator/qt-creator
TreeModel: Rework tree iteration
Use function objects to apply directly during a depth-first walk of the tree instead of faking a flat container of tree nodes. Less code, and allows even some non-const operations. Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5 Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -39,6 +39,7 @@ namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class GdbMi;
|
||||
class ThreadItem;
|
||||
|
||||
class ThreadsHandler : public Utils::TreeModel
|
||||
{
|
||||
@@ -77,6 +78,8 @@ public:
|
||||
void resetLocation();
|
||||
void scheduleResetLocation();
|
||||
|
||||
void foreachThread(const std::function<void(ThreadItem *item)> &func);
|
||||
|
||||
private:
|
||||
void updateThreadBox();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user