Commit Graph

85691 Commits

Author SHA1 Message Date
Marcus Tillmanns
772546453a Utils: Warn if enabler is set before readSettings
Change-Id: If3dd3fc5adbcd73a87f8e57482c7497c3cd11da2
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:35:26 +00:00
Artem Sokolovskii
72fb52f767 DAP: Move acceptsBreakpoint to mime type
Change-Id: I3234e7981202c7d668b8c3c86c818ca47f7be589
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:35:05 +00:00
Artem Sokolovskii
3bf61cc36c DAP: Move to a unified way to handle breakpoints
Rely on SetBreakpoints response instead of breakpoint event.

Change-Id: Iff052a13c442fb1fcd945cf1a80f1354c43c15c5
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:34:56 +00:00
Artem Sokolovskii
55227ba829 DAP: Make dap engine less noisy
Change-Id: I97d804511b07640e87045f2007575fb6543bb5be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:32:43 +00:00
Marcus Tillmanns
d3f5e44ba4 Autotest: Remove unnecessary readSettings() call
Change-Id: Ifa80b240d722c9852a57a08cb5ddc18568db5b47
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-07 14:29:20 +00:00
Artem Sokolovskii
49b773bd25 DAP: Fix launch of an application without run parameters
Now dap gdb debugger takes into account "Command line arguments:".

Change-Id: I5e7630a56a0851e7a0b8356129eb250bb29d5893
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:24:23 +00:00
Christian Stenger
c6d1c962ee CMakePM: Make internal codemodel aware of Qt
In case we have no Qt inside the current kit configured the
code model stumbles upon Qt constructs even if
CMAKE_PREFIX_PATH has been used correctly to allow cmake to
pick up a Qt.
Explicitly look into the found packages to see whether Qt
has been found and use this if possible for the codemodel.

This fixes some inline diagnostics as well as finding all
test information inside Qt Test related projects instead of
just the test cases when using a kit without a Qt.

Change-Id: Id3b5d2e818967cd3121948b818c75c4cf463546f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-07 14:24:07 +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
Marcus Tillmanns
845676f814 Utils: Fix incorrect checks
There is no reason to force m_buffer = m_internal afaik.

Change-Id: I6cab375c9d416d4fbe167c4cfb884e7cc6025381
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:19:51 +00:00
Jarek Kobus
b98be3d5a0 FreezeDetector: Don't report nested calls to notify
Report only top level, otherwise reports may overlap.

Change-Id: I30c2b2ca6368bd43c68ce8275af2e58e0c6c12c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:14:25 +00:00
Jarek Kobus
c50f9aa45e TaskTree: Reuse QT_STRINGIFY macro
Replace QTC_ prefix with QT_ for internal macros.

Change-Id: I650e15cd328747e88696a63c9929a6bf46fe9ab4
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:11:29 +00:00
Jarek Kobus
89ab44c32d TaskTree: Hide Storage internals in cpp
Change-Id: Iaa37aabd7e982302569291612b21a879da11c1a1
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:11:21 +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
01877b57d6 TaskTree: Make storages thread-safe
Make it possible to safely run concurrently 2 task trees
in 2 separate threads containing the common recipe with
common storages.

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

Task-number: QTCREATORBUG-28741
Change-Id: I3a413277e1f0640c38d6b85236e9aca09552e38f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:10:13 +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
de24f309a4 TaskTree: Get rid of public getters from GroupItem
Make friends to concerned classes instead.

Change-Id: I6b59b9e50129ab340c33fb3b6910bcbdc4b769f0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-07 14:09:55 +00:00
Jarek Kobus
a0db7c7991 TaskTree: Simplify calling storage done handlers on destruction
Get rid of callStorageDoneHandlers() function which is very
similar to the d'tor's body.
Introduce m_callStorageDoneHandlersOnDestruction flag instead.

Change-Id: Ib9ca3e5fb3e2c5bc7fb8de8f305244bbd5558f4e
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-11-07 14:09:49 +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
fbe359308d TaskTree: Unify done / errorOccurred signals
Get rid of TaskTree::errorOccurred signal. Provide additional
DoneResult arg for done signal.

Task-number: QTCREATORBUG-29834
Change-Id: I31a3a0701a14246b01f65303a1295f014c855ecf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:07:52 +00:00
Eike Ziller
d2500dc77b FancyMainWindow: Remove auto-hide title bars functionality
This added complexity with the hovering to get the title bars shown, and
discoverability issues with the action in the views menu to show all
title bars, and the issue that some docks then had double titles,
because we wanted some title to be shown even if the title bar is
hidden.

Instead only show the dock control buttons only on hover, which already
removes a lot visual clutter that was the main reason for the
whole exercise.

One issue is that the title is now uselessly repeated for tabbed docks.
Another is that the title bar style is ugly and not very compatible to
what we otherwise have.

Change-Id: Ib093e0a3f2f07ece74b9055015c5523994032c5a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 13:50:05 +00:00
Miikka Heikkinen
97db39c468 QmlDesigner: Remove temporary extraction folder
FileExtractor::extract() creates a temporary folder for extraction
if target path is not specified. This temporary folder was never
cleaned up after it was no longer needed.

Fixes: QDS-11057
Change-Id: I7c39429eb4beeb84fcaee6e8dc4f42d70e4d3fc0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-07 13:21:27 +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
Jarek Kobus
65341d7e5f TaskTree: Introduce QProcessTask with internal reaper
In order to make it possible to use QProcess in TaskTree
outside of QtCreator.

Change-Id: Icff4113a7799297c5941ee68ee1cc874806c3816
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:50:58 +00:00
Ali Kianian
b357e26758 QmlDesigner: Assign the collection to the selected node
Task-number: QDS-11012
Change-Id: I68b23b276c804b7f95db2972de87583cd115e11f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-07 11:43:29 +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
Miikka Heikkinen
f880115faa QmlDesigner: Only add a dragged material once to model
Fixes: QDS-11095
Change-Id: Ia55c3cc906f42b3166b026c2c7447e649090069b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-07 11:15:02 +00:00
Ali Kianian
ca84a2afeb QmlDesigner: Apply deleting the collection from source files
Task-number: QDS-11150
Change-Id: Ibe1294b64493594f22a03521e9f9dc2462c526c4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-07 11:11:27 +00:00
Marcus Tillmanns
1998ef19b3 Terminal: Add fallback code to close terminal.app
Fixes: QTCREATORBUG-29246
Change-Id: I67b43a25bcb4ea75d0cfa9a5c88860564af1467a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-07 10:53:40 +00:00
Marcus Tillmanns
a04cb938cb CMakePM: Fix crash if no run device is set
Change-Id: I8b13afcc466f92b93a8ad09ffa1ccc1ced2fcae7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-07 10:53:23 +00:00
Marcus Tillmanns
43f99cb53b DAP: Fix auto copy
Coverity-Id: 1568078
Change-Id: I915f947dee43b78248dcb29fe375954b43344920
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2023-11-07 09:58:34 +00:00
Alessandro Portale
6d50724937 Core: Rename "asciify" macro to "Asciify"
By convention, macro names start with a capital letter.

Amends: b2e96147cb

Change-Id: I2aa93deee7aec798128371d7f81a9c6fc9dd85c2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-07 09:54:02 +00:00