Commit Graph

8097 Commits

Author SHA1 Message Date
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
Eike Ziller
f9d4697371 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ice9c78147917fc13b6cf81ba781a37bdcd870e17
2023-11-03 14:58:00 +01:00
Christian Stenger
cf88267011 Debugger: Adjust libcpp based optional dumper
There is no added value in providing the value of the
internal 'engaged' - just provide the value if possible.

Change-Id: I8c308902bf82c43e4238568fc9b185c3a3994b47
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-03 06:14:07 +00:00
Marcus Tillmanns
5becefbe72 Debugger: Fix QImage dumper
Change-Id: I423d139a16a8a08d9135a1d489c4d38ebac9c0f6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-02 13:58:01 +00:00
Tim Jenssen
b5c60597dc Merge remote-tracking branch 'origin/12.0' into qds/dev
Change-Id: Iefea658312bba6675eadce23fb8dc92f9207ea0e
2023-11-01 16:40:26 +01:00
David Schulz
7f1eaff398 Debugger: improve std::unique_ptr dumper for cdb
Fixes: QTCREATORBUG-29739
Change-Id: Ia8808c54137c762c54ad28f576c9d3be921d7d9c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-01 14:16:44 +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
Eike Ziller
a724bd40f5 Merge remote-tracking branch 'origin/12.0'
Change-Id: I17c37a6fd474c3441343e91a67817c8179d0c7cc
2023-10-30 13:20:46 +01:00
Marcus Tillmanns
53931b18ad Debugger: Fix QDateTime dumpers with TZ != UTC
Fixes it for Qt 5.4 and onwards hopefully.

Fixes: QTCREATORBUG-29737
Change-Id: Ic555e304a872dfbd458a95097e4e0b6a6632509a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-30 07:44:28 +00:00
Eike Ziller
5ef74df9d0 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I793963d0eb4a2c382988937862c90423abdfface
2023-10-27 09:27:57 +02:00
Robert Löhning
b77b12c97b SquishTests: Restore lines removed from projecttrees
Partially reverts 3970a834bc
and 5bce234986

Change-Id: Iaf05f4c19e16b4e0d817350d4121ad371b8b1661
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-26 19:18:05 +00:00
David Schulz
2e93051aaf TextEditor: improve sort selected lines
Try to get a sensible scope when there is no selection when sorting
lines.

Use the indent level of the current block and select all blocks that are
not empty with the same indent level around that block before sorting
the lines.

Change-Id: I68cbd95f95a0cc4425a0339b992225c3946a6858
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-24 07:38:38 +00:00
Burak Hancerli
ab2c25d52a QmlProject: Absolute files paths are ignored
This patch fixes issues with adding files to the project by
providing the absolute paths in the .qmlproject file.

- If a directory is given without an explicit file list,
then that directory wil be searched recursively.
- If explicit file list given without a directory, then each
file will be added to the project separately.
- If both provided, then each file wil be prefixed with given
directory, and added project separately.

Task-number: QDS-10636
Change-Id: Ia13964ce2b3f6364d1def1aa71e20ec29f6f3542
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-20 10:08:24 +00:00
Marco Bubke
ad12bbb669 QmlDesigner: Add object trace
'N' and 'D' phases are not supported by Perfetto. So I mapped it to
async events. This patch is improving the interface for arguments too.
Now you can select the type for you arguments. So the name can be a
string_view but the arguments can be a string.

The variadic template arguments are used to prevent any conversion code
which could not be optimized out for an empty function.

Change-Id: I1ad1927b5e3b63607a21df1351b1f5cfba50159c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-10-17 11:55:03 +00:00
Marco Bubke
11bf705e26 QmlDesigner: Add move only trace token
It is quite hard to define always an end to a trace. A move only
token can do that. The drawback is that the token gets bigger but only
compile them for an avtivated category.

Change-Id: I88b47c5b47e4129b1cd402e89251b45fa126111c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-10-17 11:43:58 +00:00
Eike Ziller
3363d71888 Build: Fix handling of (s)ccache support
So it also works when building individual projects like cdbext

Change-Id: Ibb9cac77146a9f19cbbe22f2c7257b951f38f3fc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-10-17 07:30:51 +00:00
Marco Bubke
c4deafc555 Nanotrace: Export functions and add dependencies
Under linux it was linking But I think it will not work under windows
without exports.

Change-Id: Idd27583defc1c00a6bb2426efb160e7d90abd3df
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-10-13 15:15:50 +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