Commit Graph

16 Commits

Author SHA1 Message Date
Jarek Kobus
779390829c TaskTree: Introduce For element
Improve code readability by requiring iteratable Group
to be named For.

The For's c'tor requires an iterator element as a first arg.

The For's c'tor allows for passing exactly one iterator element.

It's not possible to place iterators inside Group element anymore.

Change-Id: I9dfe2c0da058abac161f66c4e336da2417c383f1
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 13:39:40 +00:00
Jarek Kobus
5ae37f2f84 ImageScaling: Reuse LoopList
Instead of LoopRepeat + container capture.

Change-Id: Ic37c4ff53c4ce2a217a258aa4af1272ac3d8ab29
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-01-26 07:51:27 +00:00
Jarek Kobus
7c3e8b420e ImageScaling example: Reuse TaskTreeRunner
Change-Id: I727a961bcfca20ebc0584b1ddeeaa412aff63335
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 10:16:29 +00:00
Jarek Kobus
1f41e408e0 TaskTree: Simplify recipe in ImageScaling example
Change-Id: Ieda5a7b06098cc2b90c69db79b7a002345a68f44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-01-11 11:51:30 +00:00
Jarek Kobus
e8904041c2 TaskTree: Introduce Forever group
Rename Forever -> LoopForever, Repeat -> LoopRepeat.

Change-Id: Ic999c876762d2b092f23ae88ea6de341b68a1fc2
Reviewed-by: hjk <hjk@qt.io>
2024-01-11 11:34:43 +00:00
Jarek Kobus
ff46a9a8ef TaskTree: Reuse Repeat element in ImageScaling example
Task-number: QTCREATORBUG-30081
Change-Id: I281b6fe45c62045686ee215a5e03a5d8917a0282
Reviewed-by: hjk <hjk@qt.io>
2024-01-10 10:42:47 +00:00
Jarek Kobus
ce80a6dad5 TaskTree: Rename TreeStorage<> -> Storage<>
This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I696beda87430fbe637abba8054012fb77516e220
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 08:25:50 +00:00
Jarek Kobus
ced3052e7f TaskTree: Get rid of Storage subclass of GroupItem
Make the c'tor of the GroupItem taking the TreeStorageBase
public instead.

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

Task-number: QTCREATORBUG-28741
Change-Id: I78320ec24b4e4b915ab549135fb93b45c658b9f2
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 07:47:54 +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
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
Jarek Kobus
dda75153fe TaskTree: Introduce DoneWith enum
This makes it possible to recognize the cancel state
when the task was automatically stopped because of task's
parent group workflow policy or when the user called TaskTree::stop().

This addresses the 2nd point in the master task below.

Task-number: QTCREATORBUG-28741
Task-number: QTCREATORBUG-29834
Change-Id: I2798b9ec1d2f1d667aff51ee0271a5a15a525dc1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:52:18 +00:00
Jarek Kobus
0fa16f8489 TaskTree: Use common done handler
Instead of specifying two separate done and error handlers,
specify just one that takes additional "bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Ie4f92236a38b03dac3dd33b2c80a317b62772a12
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:27 +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
04b86eb3db ImageScaling: Implement the example using TaskTree
Change-Id: Iac54157955d5dffe12a7fdeed904fbcf62a2b667
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-07 09:27:40 +00:00
Jarek Kobus
3f9704846b ImageScaling: Get rid of doc example markers
In order to more easily compare both implementations.

Change-Id: I4ff48cb4d4e61be4e2c8834f63091f4d825db0be
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-06 08:05:58 +00:00
Jarek Kobus
c3344c740a Tasking: Import imagescaling example
It's an initial copy of the
qtbase/examples/qtconcurrent/imagescaling.

The goal is to implement it using TaskTree and
compare both implementations.

Change-Id: I92953a70a3330ac679823060e75e5f39971ae444
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-06-06 08:05:39 +00:00