forked from qt-creator/qt-creator
TaskTreeRunner: Introduce aboutToStart(TaskTree *) signal
It enables the access to the internal TaskTree. Emitted by TaskTreeRunner::start(), after the task tree is instantiated and before it is started. The lifetime of the passed task tree is controlled by the TaskTreeRunner and is limited to the one particular execution. Don't store pointer to the passed task tree. If unvoidable, store the QPointer instead. It may be used e.g. for connecting to the TaskProgress. Change-Id: If0af11eb136c9cbff2e4c6e91f8b18a114880f74 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -16,6 +16,7 @@ void TaskTreeRunner::start(const Group &recipe)
|
|||||||
m_taskTree.release()->deleteLater();
|
m_taskTree.release()->deleteLater();
|
||||||
emit done(result);
|
emit done(result);
|
||||||
});
|
});
|
||||||
|
emit aboutToStart(m_taskTree.get());
|
||||||
m_taskTree->start();
|
m_taskTree->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public:
|
|||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void aboutToStart(TaskTree *taskTree);
|
||||||
void done(DoneWith result);
|
void done(DoneWith result);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user