Commit Graph

72811 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Christian Kandeler
d62309bbb2 Fix various mis-uses of Environment::forEachEntry()
Most of them introduced with 08bacd3f19.

Fixes: QTCREATORBUG-29857
Change-Id: Ia897958865f00cb5f8f141659a652aee05aa1355
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 09:01:53 +00:00
Marcus Tillmanns
824fee183c Fix setEnabler / readSettings order
BaseAspect::setEnabler requires the settings to be read already.
This is because readSettings() does not emit "valueChanged", and so
the connections from the enabler to the target are not triggered.

Change-Id: I0c95e2b516cd03c1dbad653288b44510ec7ea800
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-07 08:54:34 +00:00
Marcus Tillmanns
dce08c5b9e Utils: Fix crash if stub fails to start
If the inferior did not start the TerminalInterface did not send an
error up the chain, which meant that the runcontrol does not exit.
This would lead to a crash.

Change-Id: Icf9f8f913d84a9ed6414e15ce3a3587b1580425e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-07 08:53:31 +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
hjk
0dbd951654 CppEditor: FilePath-ify SymbolSearcher
Change-Id: Iff29c4c6287d12a361174264332e8734e914050a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-07 08:50:32 +00:00
David Schulz
05ce5ea14d CppEditor: Fix crash when calling CppModelManager::projectPart
find and end of QMap potentially detach the container, so we have to use
constFind and constEnd

Fixes: QTCREATORBUG-29716
Change-Id: I2fef46580ff5b58a70201841423e5ca0a7b4d107
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 08:39:05 +00:00
Christian Kandeler
24d4cb6576 ProjectExplorer: Make the MAKEFLAGS warning self-explanatory
Fixes: QTCREATORBUG-29816
Change-Id: If35fe74c52ec1c890f390eb0a645299ce9e926b4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 08:34:51 +00:00
Vikas Pachdha
610394cefb Designer: Merge QtQuick.State nodes while style merging
Fixes: QDS-11107
Change-Id: I676e48d584b233e9d86edc5ec805b79b0965f0eb
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-11-07 08:16:34 +00:00
Jarek Kobus
c617d97c29 TaskTree: Preserve the right order of the 0 TimeoutTask
Like it's done for all other TimeoutTasks.
Before it was flaky on mac.

Change-Id: I2999b1264d313dda5d614d9dbd7ae03b2bf00fb0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 06:57:30 +00:00
Marcus Tillmanns
6cd196511d Utils: Fix Terminal.app script for macOS 14
The "where its tab 1 = newTab" fails on macOS 14.0.

I've also added some logging to make investigating future potential
problems quicker.

I've filed feedback to apple here:
https://feedbackassistant.apple.com/feedback/13341074

Fixes: QTCREATORBUG-29246
Change-Id: I79c6f75daa34a3c346934ee2c21a5dfc9daf3cff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 06:03:13 +00:00
The Qt Project
7e4017e538 Merge "Merge remote-tracking branch 'origin/12.0' into qds/dev" into qds/dev 2023-11-06 19:56:14 +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