TaskTree: Rename setupRoot into setRecipe

The passed Group root element is a recipe with
a full description on how to execute the tasks
and how to handle finished tasks.

We have already virtual methods / setters called like:
deployRecipe, refreshRecipe, reloadRecipe. So, the
common "recipe" is kind of consistent.

Fix typos in warnings.

Addresses the 11th point in the task below.

Task-number: QTCREATORBUG-28741
Change-Id: I1c80f4838b6a3e5ed113eaf8e42b59746d098efe
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Jarek Kobus
2023-06-06 11:37:27 +02:00
parent cab81a5d03
commit 003b43aee7
9 changed files with 18 additions and 18 deletions

View File

@@ -1750,9 +1750,9 @@ TaskTree::TaskTree()
{
}
TaskTree::TaskTree(const Group &root) : TaskTree()
TaskTree::TaskTree(const Group &recipe) : TaskTree()
{
setupRoot(root);
setRecipe(recipe);
}
TaskTree::~TaskTree()
@@ -1763,27 +1763,27 @@ TaskTree::~TaskTree()
delete d;
}
void TaskTree::setupRoot(const Group &root)
void TaskTree::setRecipe(const Group &recipe)
{
QTC_ASSERT(!isRunning(), qWarning("The TaskTree is already running, ignoring..."); return);
QTC_ASSERT(!d->m_guard.isLocked(), qWarning("The setupRoot() is called from one of the"
"TaskTree handlers, ingoring..."); return);
QTC_ASSERT(!d->m_guard.isLocked(), qWarning("The setRecipe() is called from one of the"
"TaskTree handlers, ignoring..."); return);
d->m_storages.clear();
d->m_root.reset(new TaskNode(d, root, nullptr));
d->m_root.reset(new TaskNode(d, recipe, nullptr));
}
void TaskTree::start()
{
QTC_ASSERT(!isRunning(), qWarning("The TaskTree is already running, ignoring..."); return);
QTC_ASSERT(!d->m_guard.isLocked(), qWarning("The start() is called from one of the"
"TaskTree handlers, ingoring..."); return);
"TaskTree handlers, ignoring..."); return);
d->start();
}
void TaskTree::stop()
{
QTC_ASSERT(!d->m_guard.isLocked(), qWarning("The stop() is called from one of the"
"TaskTree handlers, ingoring..."); return);
"TaskTree handlers, ignoring..."); return);
d->stop();
}