Commit Graph

8014 Commits

Author SHA1 Message Date
Jarek Kobus
a53dfaf623 Process: Switch the default implementation into QProcess
Task-number: QTCREATORBUG-28811
Change-Id: I5647b760998a80f59583b478a65de6d615e1ca55
Reviewed-by: hjk <hjk@qt.io>
2023-11-15 10:26:09 +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
Sivert Krøvel
b080a3772c Handle nodes and properties required by MCUs in JSON conversion
Qt for MCUs uses several features in the qmlproject files which
are unknown to QDS. It is important that this information does
not get lost when converting to and from the internal JSON
project format, to avoid breaking MCU projects.

The following changes were made:
- Files nodes keep the type (ImageFiles, QmlFiles...)
- Added support for more Files node types used by MCU projects
  (ModuleFiles, InterfaceFiles, FontFiles...)
- Files nodes can have child properties
- Added a JSON object to store properties unknown to QDS.
  They may be used by Qt for MCUs, and new properties may
  be added between versions
- Added support for the MCU.Config and MCU.Module nodes
- Added a test project for MCU. This project is also tested
  with Qt for MCUs. Both the original and the converted
  project build correctly
- Added instructions for notifying the MCU team before
  modifying the MCU test cases to avoid breaking changes.

Fixes: QDS-10774
Task-number: QDS-10969
Change-Id: I0dfd7f3b150a8661fc0398a8a3d575c7e8777ef3
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-14 12:22:36 +00:00
Karim Abdelrahman
2dae80de93 McuSupport: detect if a project is QtForMcu
Update the way we used to check for mcus
project in McuSupport plugin. The old way
relied on the deployment step which is only
available when the user has already added a
valid QtForMcus package to "Devices->MCU".

The addition of "isQtForMcusProject" in
externaldependenciesinterface.h will be
used in a follow-up patch in
qt-creator/tqtc-plugin-qtquickdesigner
which adds a warning when using .qtbridge
for Mcu project.

Task-number: QDS-10599
Change-Id: Ibf46477a4f0cb4a82a10ac848acec75458bf6c03
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
2023-11-14 10:27:59 +00:00
Jarek Kobus
845337436c Async tests: Add tests taking static function
Change-Id: Id10b40c7d50c36b8e9406f1ae7ab8915c908212c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-13 09:02:17 +00:00
Eike Ziller
e6a39128f5 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ib9f8b81d60162a8b01e7c627ba54901af68afa98
2023-11-10 11:23:21 +01:00
Semih Yavuz
5b1aa26e47 Do not use QDir::separator() in QML reformatter test
That created a mix of / and \\ while building the path. Qt promises to
build paths that conforms to underlying OS if we always use /.

Amends  ffcbbecf27

Change-Id: Iebcb739cc02f0a2d6dd8953943ecfa9cf8fc9aea
Reviewed-by: hjk <hjk@qt.io>
2023-11-10 08:29:03 +00:00
Tim Jenßen
058fd820e5 Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: I1e38a9dc4402a4cf836c32a6b0e5f49a836574b7
2023-11-09 08:46:51 +00:00
Eike Ziller
7bd99104e0 Merge remote-tracking branch 'origin/12.0'
Change-Id: I2594f193260a103e1c4484fcab974213c881353d
2023-11-09 08:22:27 +01:00
Jarek Kobus
79421fd597 TaskTree: Rename StopOnFinished into StopOnSuccessOrError
In order to conform to CallDoneIf::SuccessOrError.

Amends 2c0a59384c

Change-Id: I2704667ca8d005c63c13b62786010ce430f0b550
Reviewed-by: hjk <hjk@qt.io>
2023-11-08 13:04:36 +00:00
Semih Yavuz
ffcbbecf27 reformatter: Do not remove type annotations
Type annotations were being removed by the reformat action. Write out
the relavant annotations in ast to fix it.

Add exclusion mechanism in tst_qml_reformatter test since it performs
line by line comparison which doesn't fit all reformatting cases.
Introduce char-by-char data tests.

Fixes: QTCREATORBUG-29061
Change-Id: Ia52b51e6d7d938bdec325c4f426b11c722f85f8e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-11-08 11:09:02 +00: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
Jarek Kobus
1cc4e32a4b TaskTree tests: Fix testInThread test on mac
Amends a88f807e86

Change-Id: I852a8b75a634d1266c442f775ae7b8f066923ce5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-08 08:55:48 +00: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
30ac04bffd Process tests: Use QSignalSpy and QTRY_xxx instead of timeouts
Avoid arbitrary timeouts causing flakiness of tests.

Change-Id: I2b7634ab08ee29be06002eb22f01a5efdf78d407
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 15:28:38 +00:00
Marcus Tillmanns
437797d1c4 Utils: Fix endless loop when ls iterating subdirs
findUsingLs did try to enter "." and "..", with especially "." leading
to an endless loop.

findUsingLs also did not correctly concatenate the parent folder
for sub directories.

Change-Id: Ieafad4d4ef38d2fb550ddef1d2edf8183ce8032e
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:20:33 +00:00
Jarek Kobus
0938e6cf4d TaskTree: Use DoneWith in TaskTree::runBlocking()
Instead of using ambiguous bool.
Reuse it in place of OnDone enum in tests.

Change-Id: Ie83e82d9debb88ca19f71ecab40f8ad081293f41
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:11:05 +00:00
Jarek Kobus
f771faf82d TaskTree: Use DoneResult in Group done handler
Instead of using ambiguous bool.

Change-Id: Icf63f0b129d4b81cc4324d7a100f5aaf2c8af44b
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:57 +00:00
Jarek Kobus
0f6e6cebf7 TaskTree: Use DoneResult in Task done handler
Instead of using ambiguous bool.

Change-Id: I7eb8e97947f23161c5c2bf5e22575e49bea35d61
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:50 +00:00
Jarek Kobus
7ff13f1eaa TaskTree: Introduce DoneResult, use it for Sync setup
Instead of using ambiguous bool.

Change-Id: Iec45b920a839ac3383abc2d0676e5834f282dddf
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:43 +00:00
Jarek Kobus
88ac19f188 TaskTree tests: Add tests triggering runtime asserts
This addresses the 15th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I9d449a6ce1538071f300b68b2929bcd437d1bb0f
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:27 +00:00
Jarek Kobus
a88f807e86 TaskTree tests: Add stress test for storages
Run the same recipe concurrently. Test whether handling the same
storage concurrently works properly.

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

Task-number: QTCREATORBUG-28741
Change-Id: Ic3358bef335b96b7dc2b88ad8102c440db5dafbf
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:20 +00:00
Jarek Kobus
e78d6bd3c4 TaskTree: Implement storage shadowing
Make it possible to have the same storage instance
placed in different groups.

When the same storage is placed in two nested groups,
implement storage shadowing so that when the inner group
is activated it activates only the innermost storage
and shadows any possible the same storages in parent groups.

Keep placing the same storage twice in one group forbidden.

This functionality is required to implement the task tree loops
(see 3rd point in the master task below).

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

Task-number: QTCREATORBUG-28741
Change-Id: Iba00bc32319430136a794974c14a1ab65272eaa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:04 +00:00
Jarek Kobus
c4070da464 TaskTree tests: Add tests for tweaking setup and done results
Task-number: QTCREATORBUG-29834
Change-Id: Ie1fcef1be874661aa2196566eaf98d7d6da4f678
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:40 +00:00
Jarek Kobus
8fe1899c25 TaskTree: Unify static assertions for all handlers
Introduce GroupItem::isInvocable() helper.
Add more compile tests.

Task-number: QTCREATORBUG-29834
Change-Id: I444efeda77d1fa584567403224595b821f2a2d43
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:30 +00:00
Jarek Kobus
4c38f68d0f TaskTree: Rename StopWithDone -> StopWithSuccess
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 task below.

Task-number: QTCREATORBUG-28741
Change-Id: I53ed6905b1c385c398f49e122e8ca60aa3ad0806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:23 +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
273518c82f TaskTree tests: Introduce GroupCanceled check
Task-number: QTCREATORBUG-29834
Change-Id: I1bf716e662b279c1a85b7f95f81a61be39ee3110
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:06 +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
f84e3074cd TaskTree: Make it possible to invoke done handler only with DoneResult
Remove unused "const Task &" argument from done handlers.

Task-number: QTCREATORBUG-29834
Change-Id: I0e69c1eba88d9fdb78de7ba1705ff3916999dc89
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 12:05:21 +00:00
Jarek Kobus
35e03499f0 TaskTree tests: Detect canceled state
Task-number: QTCREATORBUG-28741
Task-number: QTCREATORBUG-29834
Change-Id: I057d23efe754b2f6c3f7b6b28b357d0e1ec24eb6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 11:52:33 +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
84edd54699 TaskTree tests: Add more valid constructs
Change-Id: I7adea93ea7bddaffe157f1c32b538a2c99cae9d7
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>
2023-11-07 11:52:06 +00:00
Jarek Kobus
b5f77f6d55 TaskTree: Get rid of unneeded done handlers' arguments
Task-number: QTCREATORBUG-29834
Change-Id: I236dec27a292a1b006b7001d01ce620960380de9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 11:51:50 +00:00
Jarek Kobus
34cef824b5 TaskTree: Make it possible to tweak the success bit in done handler
Make the arguments of done handler optional.

Task-number: QTCREATORBUG-29834
Change-Id: I9c2af431feca87351c8c9129e61ce3889d137de5
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 11:51:35 +00:00
Jarek Kobus
6e6aa7102c TaskTree: Introduce CallDoneIf enum
Get rid of CustomTask c'tor taking 3 handlers.
If the done handler needs to be called only on
success or an error, add explicit 3rd arg of CallDoneIf type.

Task-number: QTCREATORBUG-29834
Change-Id: I10e55415587e6cac46620dd5177ad8269584583c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:51:25 +00:00
Jarek Kobus
63bfeba87f TaskTree: Add a test for QProcessTask
Change-Id: If49ec3dded8ce92a2a78b55ce95b56e8683de1f5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 11:51:08 +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
Alessandro Portale
b2e96147cb Utils: Turn "Util.asciify" into a plain macro
This monves the asciify function to stringutils and makes it directly
available as "asciify:" prefix macro, so that the generation of a
default build path does not go through JavaScript.

"Util.asciify" remains available as core JavaScript extension for the
case that it is used by third party code/wizards.

This change also adds a test to tst_stringutils

Change-Id: Iba2f20c0415ee8fe757c2f0058a90629b3fbeff0
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 08:50:50 +00:00
Tim Jenssen
a28400ec7d Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: Ic0d4bc670cca264cc4013d98f692cdbde70cbaab
2023-11-06 19:55:06 +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
Jarek Kobus
6059164299 TaskTree: Make setup handler optional
Change-Id: Idfcaaf5cc5f69895d8cf9bf6e4ee673e524b61fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-06 14:33:14 +00:00
Jarek Kobus
d35d0b5100 TaskTree: Add Task c'tor taking one handler for done and error
The overloaded c'tor takes one done handler with an additional
"bool success" argument.

Task-number: QTCREATORBUG-29834
Change-Id: Id579d055721a2a07a5a9f0900aa4a73655f21610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:33:06 +00:00
Jarek Kobus
aef960a68c TaskTree: Get rid of the fluent interface
It wasn't really used and it interferes when refactoring.

Change-Id: I8b8ba1740fef24502855e896e9b33ba816e1229f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-06 14:29:35 +00:00
Eike Ziller
4bd29f741c Merge remote-tracking branch 'origin/12.0'
Change-Id: I517dc84e975a570edd363253ad444a01799dbc4b
2023-11-06 10:51:11 +01:00
Jarek Kobus
f915a18a9e Process test: Adjust timeouts to minimize a chance for flakiness
The flakiness happened on mac inside recursiveBlockingProcess test.

Change-Id: I4d461fcdae1ecbf29f89bfdb4ad7ba017724f14b
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-03 14:12:52 +00:00