diff options
author | Jarek Kobus <[email protected]> | 2023-06-06 11:37:27 +0200 |
---|---|---|
committer | Jarek Kobus <[email protected]> | 2023-06-08 11:31:57 +0000 |
commit | 003b43aee73018cecb2baae74e3e76576f9fa691 (patch) | |
tree | adbf62edfc3afa47b81dfdb60bf7b337bef31916 | |
parent | cab81a5d0338d10f541a72288b4b506539e0da33 (diff) |
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: <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: hjk <[email protected]>
Reviewed-by: Marcus Tillmanns <[email protected]>
-rw-r--r-- | src/libs/solutions/tasking/tasktree.cpp | 16 | ||||
-rw-r--r-- | src/libs/solutions/tasking/tasktree.h | 4 | ||||
-rw-r--r-- | src/plugins/coreplugin/locator/ilocatorfilter.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/loadcoredialog.cpp | 2 | ||||
-rw-r--r-- | src/plugins/diffeditor/diffeditorplugin.cpp | 2 | ||||
-rw-r--r-- | src/plugins/git/gitclient.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp | 2 | ||||
-rw-r--r-- | src/plugins/remotelinux/genericdirectuploadstep.cpp | 4 | ||||
-rw-r--r-- | tests/auto/solutions/tasking/tst_tasking.cpp | 2 |
9 files changed, 18 insertions, 18 deletions
diff --git a/src/libs/solutions/tasking/tasktree.cpp b/src/libs/solutions/tasking/tasktree.cpp index 2a4c7cefd98..43a47121b2a 100644 --- a/src/libs/solutions/tasking/tasktree.cpp +++ b/src/libs/solutions/tasking/tasktree.cpp @@ -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(); } diff --git a/src/libs/solutions/tasking/tasktree.h b/src/libs/solutions/tasking/tasktree.h index dcd7b86ac18..11cc2708dd4 100644 --- a/src/libs/solutions/tasking/tasktree.h +++ b/src/libs/solutions/tasking/tasktree.h @@ -378,10 +378,10 @@ class TASKING_EXPORT TaskTree final : public QObject public: TaskTree(); - TaskTree(const Group &root); + TaskTree(const Group &recipe); ~TaskTree(); - void setupRoot(const Group &root); + void setRecipe(const Group &recipe); void start(); void stop(); diff --git a/src/plugins/coreplugin/locator/ilocatorfilter.cpp b/src/plugins/coreplugin/locator/ilocatorfilter.cpp index 0a4665361d2..74ad227e977 100644 --- a/src/plugins/coreplugin/locator/ilocatorfilter.cpp +++ b/src/plugins/coreplugin/locator/ilocatorfilter.cpp @@ -490,7 +490,7 @@ void LocatorMatcher::start() } }; - d->m_taskTree->setupRoot(root); + d->m_taskTree->setRecipe(root); const auto onFinish = [this](bool success) { return [this, success] { diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp index 4a0fea3f165..e192a7d90ac 100644 --- a/src/plugins/debugger/loadcoredialog.cpp +++ b/src/plugins/debugger/loadcoredialog.cpp @@ -257,7 +257,7 @@ void AttachCoreDialog::accepted() [=](const auto &task) { d->symbolFileResult = task.result(); }}, }; - d->taskTree.setupRoot(root); + d->taskTree.setRecipe(root); d->taskTree.start(); d->progressLabel->setText(Tr::tr("Copying files to device...")); diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index 867217d86d8..10ae3b76a26 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -133,7 +133,7 @@ DiffFilesController::DiffFilesController(IDocument *document) tasks.append(AsyncTask<FileData>(std::bind(setupDiff, _1, inputList.at(i)), std::bind(onDiffDone, _1, i))); } - taskTree.setupRoot(tasks); + taskTree.setRecipe(tasks); }; const auto onTreeDone = [this, storage] { const QList<std::optional<FileData>> &results = *storage; diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index a30e6b33685..845531ed825 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -446,7 +446,7 @@ ShowController::ShowController(IDocument *document, const QString &id) tasks.append(ProcessTask(std::bind(setupFollow, _1, parents.at(i)), std::bind(onFollowDone, _1, i))); } - taskTree.setupRoot(tasks); + taskTree.setRecipe(tasks); }; const auto setupDiff = [this, id](Process &process) { diff --git a/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp b/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp index d9eb88273e6..856f8740a62 100644 --- a/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp +++ b/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp @@ -228,7 +228,7 @@ GroupItem QnxDeployQtLibrariesDialogPrivate::chmodTree() QTC_ASSERT(file.isValid(), continue); chmodList.append(chmodTask(file)); } - tree.setupRoot(chmodList); + tree.setRecipe(chmodList); }; return TaskTreeTask{setupChmodHandler}; } diff --git a/src/plugins/remotelinux/genericdirectuploadstep.cpp b/src/plugins/remotelinux/genericdirectuploadstep.cpp index 714404ec5b7..4449284ea64 100644 --- a/src/plugins/remotelinux/genericdirectuploadstep.cpp +++ b/src/plugins/remotelinux/genericdirectuploadstep.cpp @@ -184,7 +184,7 @@ GroupItem GenericDirectUploadStep::statTree(const TreeStorage<UploadStorage> &st QTC_ASSERT(file.isValid(), continue); statList.append(statTask(storagePtr, file, statEndHandler)); } - tree.setupRoot({statList}); + tree.setRecipe({statList}); }; return TaskTreeTask(setupHandler); } @@ -261,7 +261,7 @@ GroupItem GenericDirectUploadStep::chmodTree(const TreeStorage<UploadStorage> &s QTC_ASSERT(file.isValid(), continue); chmodList.append(chmodTask(file)); } - tree.setupRoot({chmodList}); + tree.setRecipe({chmodList}); }; return TaskTreeTask(setupChmodHandler); } diff --git a/tests/auto/solutions/tasking/tst_tasking.cpp b/tests/auto/solutions/tasking/tst_tasking.cpp index 69d87e8188e..64442529b49 100644 --- a/tests/auto/solutions/tasking/tst_tasking.cpp +++ b/tests/auto/solutions/tasking/tst_tasking.cpp @@ -509,7 +509,7 @@ void tst_Tasking::testTree_data() createSuccessTask(3), createSuccessTask(4) }; - taskTree.setupRoot(nestedRoot); + taskTree.setRecipe(nestedRoot); CustomStorage *activeStorage = storage.activeStorage(); auto collectSubLog = [activeStorage](CustomStorage *subTreeStorage){ activeStorage->m_log += subTreeStorage->m_log; |