Do not warn out invalid property name if the property starts with an id
in the same component scope.
Small refactoring: Move early-return-likely elements up before any
calculations done.
Fixes: QTCREATORBUG-28468
Change-Id: I2cbdbc24af42f126db0bbd6027ebe4f96d9c199f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
It's only used as a return value from group's or task's
setup handler. It instructs the running task tree on
how to proceed further.
It addresses the 21th point in the bugreport below.
Task-number: QTCREATORBUG-28741
Change-Id: I25802c76b9e7bc044c6a38197935798d2da9ad02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Make non-Continue TaskAction returned by group's start
handler take precedence over group's workflow policy.
Call the group's done handler when group's setup returns
StopWithDone and the workflow policy is FinishAddAndError.
Call the group's error handler when group's setup returns
StopWithError and the workflow policy is FinishAddAndDone.
Add tests for these cases.
Change-Id: I98210a5d522daabc0986200e65b25986a8c0c440
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Moves macro expansion before assembling the command line
to correctly quote the resulting arguments on windows.
Change-Id: I62eded9376977ec6095e8648296cd2af53eb8e82
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>
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>
Not all classes derived from TaskItem are tasks,
but the common denominator is that all may be placed
inside a group: thus GroupItem sounds more appropriate.
Addresses the 10th point in the bugreport below.
Task-number: QTCREATORBUG-28741
Change-Id: I94d728a8e39ec732810f2e5bbe6b9a76f3bc387c
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
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>
The NetworkQuery class is prepared to work with TaskTree.
Provide the task tree adapter for the NetworkQuery class.
Register the task inside the Tasking namespace under
the NetworkQueryTask name.
This class introduces the dependency to Qt::Network,
otherwise Tasking namespace is independent on Qt::Network.
Possibly, may be added into Qt::Network lib,
as a wrapper around the QNetworkReply.
Change-Id: I29f160c0bf128c567ce20f044540b2dd6f1e17c4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Get back to the originally intended behavior
for StopOnDone and ContinueOnDone workflow policies.
By default, these policies report an error until
at least one child task finished with success.
Since the group is empty, no child finished with success,
so the group should report an error.
Change also the return result for the StopOnFinished policy
when placed in an empty group. The policy is meant to
report the finished child's result. Since no task finished,
report an error in this case.
Fix tests accordingly.
Amends c9638ff642
Change-Id: Idc449e8c68a658755bf566df56844126167f1751
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Make it available for Group or CustomTask items.
Note, that when withTimeout() is used, the total
number of tasks grows by one.
Change-Id: Idc71737ba66b92bdc4bf17599c793b1127d22f5e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Ensure the timeout tasks preserve the right order of
their done signals.
Change-Id: I62508d0710eb2324d7c347a9907a899c97d3975d
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
By default, when finished, it returns success.
In order to convert it into failing task,
enclose it inside a Group with finishAllAndError.
Reuse it in tasking tests.
Task-number: QTCREATORBUG-28741
Change-Id: Ic81203203e0b139d4f9bfd553279ecb01cd303f4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
... for the case where the first line with semantic tokens has multiple
tokens.
This was not considered in the algorithm and uncovered by
d6f5d07639.
Also improve variable names and comments.
Fixes: QTCREATORBUG-29218
Change-Id: I0a1927c21edd70a3a91efc902e7e6ad2c734c91f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Rationale:
1. More descriptive.
2. More consistent with a planned new finishAllAndError policy.
3. Limits the possibilities of making a conflict with std::optional.
Change-Id: I5155630188e4b699e6c18b13a101e0e2d4fe98f2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Make the TaskTree tests dependent only on Tasking lib.
Introduce simple Timeout and Delay tasks for tests.
Using Timeout and Delay has a big advantage for these tests,
since e.g. when scheduling two parallel tasks with the same
timeout, we can expect the proper order in which they
finish. With AsyncTask it wasn't possible. Now, the tests
should be much more reliable and shouldn't exibit flakiness
anymore.
Use TickAndDone for Barrier tests.
Limit the tests' execution time from ~100ms into ~30ms.
Change-Id: Ifa08fd62c1a2759a877231c2220e353c1a26364f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
The future synchronizer may abuse the subsequent test invocation
as it may still have spinning threads from the previous test run.
As all the started tasks should finish quickly on cancel,
we drop putting the canceled futures into the synchronizer.
Instead, we blocking wait for them to finish.
In this way, when the subsequent test is invoked, we should expect
the all available threads are ready to be used.
Change-Id: I9bb022b8c0950d27cb323ff83bf18148829160b3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
When items are added into multiple categories, we got into a double
delete when cleaning up, e.g. when changing the shown examples to a
different Qt version.
Sort copies into categories and delete the originals as a quickfix.
Cleaner would be if we didn't allocate them on the heap in the first
place.
Fixes: QTCREATORBUG-29197
Change-Id: I6490111aba87335b0f7189c4957ed1da8681806f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Was broken in an impressive number of ways by latest Design Studio
merge.
Change-Id: I25f56827074a8c16a1a9c18884e1f63e8eaf6ef1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Add tests for empty Group with different workflow policies.
Add tests for successful / failing task in a Group with
different workflow policies.
Change-Id: I50129713f836d2146b119ceb73b5ae43abf01639
Reviewed-by: hjk <hjk@qt.io>
Introduce the GroupData structure. In this way it's easily
possible to add extra properties of already used types, e.g. int.
It's also possible to easily create elements with multiple
properties.
Simplify internal TaskItem::Type enum.
Get rid of special ParallelLimit and Workflow elements.
Provide global parallelLimit() and workflowPolicy() functions.
Make global items (e.g. parallel, stopOnDone, etc...) const.
Change-Id: Ic5628255b542fd6c5a5565b055ff11804c8d7b68
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
The policy is useful mainly in parallel mode.
It stops executing the Group when any task finishes.
It reports the task's result.
Change-Id: I7aa98365cdc4c1eb869ab419d42d0cc5438d43bf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Short live Tasking in Solutions!
Add src/libs/solutions/README.md with the motivation and hints.
Move TaskTree and Barrier from Utils into Tasking object lib,
the first solution in Solutions project.
Tasking: Some more work is still required for adapting auto and
manual tests. Currently they use Async task, which stayed in Utils.
For Qt purposed we most probably need to have a clone of
Async task inside the Tasking namespace that is more Qt-like
(no Utils::FutureSynchronizer, no priority field,
global QThreadPool instead of a custom one for Creator).
Change-Id: I5d10a2d68170ffa467d8c299be5995b9aa4f8f77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>