Commit Graph

14 Commits

Author SHA1 Message Date
Jarek Kobus
f63d31daa2 Demo example: Reuse TaskTreeRunner
Change-Id: Ia083a2317647c26886b9f483e5ae411e1e51c983
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 10:17:07 +00:00
Jarek Kobus
7d3f50f784 TaskTree: Remove explicit List element
Replace it with additional GroupItem's c'tors.

This addresses the 27th point in the report below.

Task-number: QTCREATORBUG-28741
Change-Id: I7f0620993e7c9bf61868e7bc7b112eea4dae6471
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-12-22 09:32:26 +00:00
Jarek Kobus
9c5831dc80 TaskTree demo: Tweak the done result instead of nesting a Group
Tweak the return value of the TimeoutTask instead of nesting
a Group with conditional workflow policy.

Rename TaskWidget::isSuccess() into desiredResult().

Change-Id: I3d6f703427f13e8feb6d6db97c07b8b9f8b261a6
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 08:27:17 +00:00
Jarek Kobus
c25a7a0381 TaskTree: Address some code style issues
Amends af63dcaf96

Change-Id: I9c727751afe306be5da36e772201eff1f36ac18a
Reviewed-by: hjk <hjk@qt.io>
2023-11-08 08:30:31 +00:00
Jarek Kobus
2c0a59384c TaskTree: Rename workflow policies
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

This addresses the 26th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: Icc882710dc4896626dc9332440aa13a692af54c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:09:15 +00:00
Jarek Kobus
1da7f18fb7 TaskTree: Introduce List element
The List element of GroupItem type is a helper for
constructing Group content with an initializer lists.
Since there is no easy way of mixing items and lists of items
inside the initializer list, the List element encloses
the list of children in a single GroupItem element making it
possible to mix the lists of GroupItems with individual
GroupItem elements on a single initializer list.

This addresses the 25th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I5fa4b76677f5aa7dcf875b9e9a16d86a26d380a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:08:36 +00:00
Jarek Kobus
af63dcaf96 TaskTree demo: Visualize Canceled state
The running task tree may cancel automatically some tasks / groups.
Visualize the canceled task / group with cyan color.
Add footer with state legend.

Task-number: QTCREATORBUG-29834
Change-Id: Ie799fa7b803ca3cc5ac21c580c2f86cd41b3242b
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:08:28 +00:00
Jarek Kobus
37b6cb7f90 TaskTree: Get rid of onGroupError element
Make it possible to setup onGroupDone element with additional
OnDone argument.
The onGroupDone handler may accept extra DoneResult argument.
The onGroupDone handler may also tweak the success bit of a group.

All above features conform to the behavior of the task done handler.

Task-number: QTCREATORBUG-29834
Change-Id: I125bdfe155e585678fb33410632246401cbc9390
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:08:04 +00:00
Christian Kandeler
fca94a8366 qbs build: Fix manual tests
- Remove dependency on project.withAutotests by adding local
{Qt,Cpp}Application overrides that alias QtcManualTest. This way, the
respective products are a QtcManualTest when inside Qt Creator, while
also working outside the source tree.
- Rename QtcManualtest to QtcManualTest. (The reason QtcAutotest is not
camel-cased is because "autotest" is a single word.)
- Plus some minor clean-ups.

Change-Id: Idd77191f0b433d6d7443c639eebda383ab110082
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-09-20 10:22:21 +00:00
Jarek Kobus
7730a329a3 TaskTree demo: Simplify task creation
Fix workflow policy.
Fix const correctness.
Rename treeRoot into recipe.

Change-Id: Ib0457691001dbb88135027f8c7a34ba671b0b082
Reviewed-by: hjk <hjk@qt.io>
2023-09-01 07:33:44 +00:00
Jarek Kobus
541719d443 TaskTree demo: Simplify task creation
Change-Id: Ia47c6599e872a7400b521ca77b109ff369bdd836
Reviewed-by: hjk <hjk@qt.io>
2023-08-28 11:38:46 +00:00
Jarek Kobus
d97d3f58ac TaskTree: Rename TaskItem into GroupItem
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>
2023-06-06 09:06:01 +00:00
Jarek Kobus
9694d9c6f6 Tasking: Introduce NetworkQuery
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>
2023-06-06 08:05:14 +00:00
Jarek Kobus
6f8e5c409f TaskTree: De-utils-ize manual test, rename it to demo
Change-Id: I80a2522f7ba12ee9b63c19d66e514d7047951733
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-01 10:53:35 +00:00