Commit Graph

1383 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
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
14f6954026 TaskTree: Disconnect from task's done() signal on destruction
If a task or task's adapter sends done() signal directly
from the destructor (which isn't really desired),
ensure we disconnect from this signal beforehand,
otherwise this may start invoking normal handling of task done()
and interfere with the destruction.

Fix NetworkQuery d'tor.

Add a test for it.

Add some TODO items.

Fixes: QTCREATORBUG-30204
Change-Id: I56a34d0f00c961c15bd1bcffef45520a4be5bce0
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 08:29:57 +00:00
Jarek Kobus
ae57346f30 TrafficLight: Undecorate strings in order to compile against Qt 6.2
Change-Id: Iac3a65cca5b07f405fb64fe4cefc7cdf3d509759
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-13 02:41:23 +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
7c0b831391 TaskTree: Implement TrafficLight example
Import from:
https://github.com/qt/qtscxml/tree/dev/examples/scxml/trafficlight-common
and implement it in terms of TaskTree.
The recipe() corresponds to trafficlight.scxml file and implements
the business logic.

Used components: TimeoutTask and BarrierTask.

Change-Id: Ifc08b947388abed8cfc85ba082aaa0b18da0a1d7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-11 11:36:06 +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
bc2faebe02 TaskTree: Reuse Repeat element in DataExchange example
Update the location of the target url so that it points to the
TaskTree wiki image.

Task-number: QTCREATORBUG-30081
Change-Id: Ic1c715c268b9e14711bc98415e747de8b75ed2dc
Reviewed-by: hjk <hjk@qt.io>
2024-01-10 10:45:21 +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
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
Eike Ziller
7443ca977b Merge remote-tracking branch 'origin/12.0'
Change-Id: Iee11f97dbd0114957e856d02f0ad295813a05431
2023-12-20 16:05:55 +01:00
hjk
06545a3625 Debugger: Fix a (harmless) use after free in manual test
Change-Id: Ie7fdd9a5dbf3767faafead4ce85fb1c470e144cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-20 08:31:22 +00:00
hjk
f97fd83fc9 Plugins: Add skeleton for new ExtensionManager plugin
This initial commit is merely a mockup of a ExtensionManager concept.

Change-Id: I19b2285667678a86097c043cc27a554545559eff
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-12-11 12:10:36 +00:00
Alessandro Portale
608bb8cf3d Utils: Add StyleHelper::fontToCssProperties
This function takes a QFont and returns the relevant CSS properties as a
string. Using that CSS string in Qt's HTML supporting widgets ensures
the true to detail HTML rendering of text elements with those CSS
properties.

This change also adds an HTML sample to tst_manual_widgets_uifonts.

Change-Id: I7caf3214854f6ee62ae1211015572c640fc08dc8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-12-08 09:10:50 +00:00
Alessandro Portale
723ba0fc48 Utils: Add a manual test for StyleHelper::uiFont
Visualizes the predefined ui fonts.

Change-Id: Ic0af15ab149b213a59bf8e22cf7e17ab9042c54e
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-07 15:22:54 +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
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
5a2df08ae0 TaskTree: Add a new example showing input / output data exchange
This example shows how to separate the business logic of the recipe
from the GUI and how to write a reusable recipe.

It shows how to feed the recipe with the initial data and how to
retrieve the final result from the recipe using onStorageSetup()
and onStorageDone() handlers.

Change-Id: I04c0c0c9bd6cf25ac4e91317e527ad12832e9143
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 10:54:05 +00:00
Alessandro Portale
f96feadad0 Fix missing overrides and redundant virtual
Change-Id: Id2a247b6032602c2295d928067c2462d3f9b5221
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-14 14:27:45 +00:00
Eike Ziller
7bd99104e0 Merge remote-tracking branch 'origin/12.0'
Change-Id: I2594f193260a103e1c4484fcab974213c881353d
2023-11-09 08:22:27 +01:00
The Qt Project
04eea22c5f Merge "Merge remote-tracking branch 'origin/12.0'" 2023-11-08 09:08:31 +00:00
Eike Ziller
363d2d161c Merge remote-tracking branch 'origin/12.0'
Change-Id: I35cb28b759fb200c45a1496299584132336fcd1c
2023-11-08 10:07:29 +01:00
Marcus Tillmanns
503fd8121d Terminal: Make test actually manual
Change-Id: Ib44111401c4b4e1f16c8c53b6bd1f323f725cdd1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-08 08:42:47 +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
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
Marcus Tillmanns
e108726314 Terminal: Add auto test
Auto test macOS terminal script.

Change-Id: Iaab9c31fa94cf16afc02e4e34978d5d10edf5c2d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-07 11:42:43 +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
Cristian Adam
bcc45d8bb9 CMakePM: Allow navigation to ${PROJECT_NAME}
Task-number: QTCREATORBUG-27211
Change-Id: I23e2c6f39ff3d4c89ef78a66c10e619e3df3245f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-31 15:52:41 +00:00
hjk
2893e892df Debugger: Adjust expectations of manual bigint test
It was wrong.

Fixes: QTCREATORBUG-29705
Change-Id: I4870d0f1b6b80a4b70803be213cfed51fa37982c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-13 11:21:01 +00:00
Marcus Tillmanns
413fda678f Utils: Add "layouting" widgets to layoutbuilder
This allows us to handle widgets that have an "addWidget" function.

Change-Id: Id1b63bae7032403fdd3c5e6ba60283cf56cc1cfe
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:32:56 +00:00
Marcus Tillmanns
644e88ae2e Utils: Emerge widgets from LayoutItem
This allows us to call e.g. PushButton{}.emerge(); without having to
add another unnecessary layout.

Change-Id: Ica26f4776dee1843e1f40c238e1f3c1a54d14ea5
Reviewed-by: hjk <hjk@qt.io>
2023-10-12 10:32:44 +00:00
Cristian Adam
c929b71acd CMakePM: Add cache variables to code completion
Change-Id: I5ac4fcf3ca7755ab52ffecafd83922e4e380363e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-10 18:29:06 +00:00
Cristian Adam
524634f124 CMakePM: Add support for "$ENV{" code completion and help
CMake has a few environment variables that are documented and this
commit adds support for them.

Change-Id: Iaa31bdc97b343581fcf519d19e66bc6ce8ace150
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-10 18:08:13 +00:00
Cristian Adam
380ca70d61 CMakePM: Add manual test for code completion / navigation
Change-Id: Id7ad47babf4c6fff8e7b823805d6ccf858a3d513
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-09 14:42:03 +00:00
Cristian Adam
6010b096c1 CMakePM: Move specific manual tests to cmakeprojectmanager
Previously this folder didn't exist, but now it's better to have
them all in one place.

Change-Id: Ib8a2f24157a34e817e653929d01dfc9675f1c019
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-09 14:41:54 +00:00
Eike Ziller
a0a4d9024e Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/python/pyside.cpp

Change-Id: I1f84ed56d38355cef6076797c72693fff4c1aa78
2023-09-28 11:02:38 +02:00
hjk
895f8e7396 Meson: Merge MesonProcess into project parser file pair
Only used there.

Also remove the translation line in the test project to help
with incomplete Qt 5 installations.

Change-Id: Id7029b499cec69a7e1733e2ac4ade9026c522951
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-28 07:00:21 +00:00
hjk
0eacd0190d All: Remove some unneeded #includes
Change-Id: If9a8fb5e0b32424e3b37ecf3adefc060f86b3630
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:50:38 +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
Christian Kandeler
a217fa0c22 qbs build: Clean up testing infrastructure
- Rename ambiguously named "testsEnabled" property to "withPluginTests"
  and fix the wrong uses.
- Move AutotestRunner out of main project file and into tests.qbs.
- Move "withAutotests" property into qtc module. We cannot remove it
  from the main project file just yet, because some manual tests do not
  make use of QtcManualTest at the moment.
- Do not remove the autotests from the project tree if autotests are
  disabled. Instead, just disable the products.

Change-Id: I74a4cc717d9adbe53d37536b2565111e1617115b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-19 13:16:28 +00:00
Tim Jenssen
1a3a8ecc96 Merge remote-tracking branch 'origin/qds/dev'
Change-Id: Id242ab4ca485527defdcc1555d204e12e50ddb7a
2023-09-14 17:37:24 +02: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
Tim Jenßen
0f05d7adb3 cleanup QMessageBox includes
Change-Id: I358a216c48b8fbf549af38360a93a073f03e3a98
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-08-22 16:56:50 +00:00
hjk
123793fbb1 Utils: Add an 'If' LayoutItem
Change-Id: I700e28d03b6dc39e96fa969152f236760989bdb7
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-15 13:03:11 +00:00