Commit Graph

225 Commits

Author SHA1 Message Date
Eike Ziller
57d4ea4dcc Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/designer/formeditor.cpp
	src/plugins/git/gitplugin.cpp

Change-Id: I554a844fab4c55249a00f394f9ba174c7548dbbe
2023-12-11 09:28:21 +01:00
Eike Ziller
a20e2d29fc CMake: Fix file path kind for the staging directory
Fixes: QTCREATORBUG-29997
Change-Id: I7a86b90a366bc59b206a44b5e93b54582c2aed14
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-12-07 12:26:33 +00:00
hjk
3bbda8f9da ProjectExplorer: Rename Tool{C,c}hainKitAspect
Change-Id: I74460b6402ab00f972c208023f03fac617982a11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 13:35:28 +00:00
hjk
c28fb1fdbe ProjectExplorer: Rename ToolChain to Toolchain
Change-Id: Ibb520f14ff3e2a6147ca5d419b9351c50c141063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 15:18:24 +00:00
Jarek Kobus
659f0f000c TaskTree: Unify TaskInterface::done(DoneResult) signal
Change the argument of TaskInterface::done() signal
from bool into DoneResult. Make it consistent with
other TaskTree API.

Introduce toDoneResult(bool success) helper.

Change-Id: I7b3041d7c1ed0317c76adbc1fd37448231e85f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-17 09:44:20 +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
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
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
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
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
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
cca7bc98a9 CMake: Fix deployment path
Previously the path would be created based on the build device
instead of the target device. Therefore when building on windows with a
linux target the path might become "c:\usr\bin\..." instead of
"/usr/bin/...".

Fixes: QTCREATORBUG-29797
Change-Id: I13a9941b87b863f3e1b8420bcab230db1f70a28b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-10-27 07:46:51 +00:00
Cristian Adam
55cccfa59e CMakePM: clang-tidy fix for 'no-automatic-move'
See https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-
tidy/checks/performance/no-automatic-move.html

Change-Id: If265c9b0e2aea49e5923f079cd621e10bb958286
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-20 13:57:34 +00:00
Cristian Adam
d7f44cdd24 CMakePM: Enable ANSI codes colored output
Qt Creator is able to display colored output for the _Compile Output_
and _General Messages_ panes.

This commit enables CMake and tools to use this functionality.

See https://cmake.org/cmake/help/latest/variable/
CMAKE_COLOR_DIAGNOSTICS.html and http://bixense.com/clicolors/ for more
details.

Change-Id: Ied4058bbd2522750d559b05d585092830ce3a911
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-16 07:29:56 +00:00
Eike Ziller
2792166574 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ifab8b72af33de4decf20d2a879bea4dfba1e9fbe
2023-09-07 11:15:32 +02:00
Eike Ziller
da7c25e8da CMake: Do not print warning if no run device is set
With an iOS kit, there is no run device set if no device is connected,
which triggered an assert.

Change-Id: I9c435c618daab2601973372efb84f9ddbe9c5998
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-29 10:38:12 +00:00
hjk
8d0aa34bfc Plugins: A bit more Keys and Store
Change-Id: Iee55eeaa881dd9f2047fdbe95ad8d827f4ba34e0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 08:00:02 +00:00
hjk
6e307be365 Utils: Rename the new Storage to Store
Apparently that's what the young people on the web use for such a thing.

Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-24 05:56:57 +00:00
hjk
dc6b40a5c0 Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-23 14:30:50 +00:00
David Schulz
5122d8addc Merge remote-tracking branch 'origin/11.0'
Change-Id: Idbf5f641aa9db7574cf2a4bd09adb8bcd03da894
2023-08-22 08:10:48 +02:00
hjk
4e0c4b0f23 CMake: Rename cmakekitinformation.{h,cpp} to cmakekitaspect.{h,cpp}
Follow up after renaming the contained classes.

Change-Id: I9393c367abdd4eac487e17676c98a357ff33c98c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-22 05:56:39 +00:00
hjk
ec7abcf98c Utils: Make FilePathAspect::setDefaultValue take a QString
This sets the unexpanded value, so going to a "cooked" FilePath can
at least theoretically break. On the user side it saves a
roundtrip in a few cases, but is more ugly when the input is already
a proper FilePath.

Change-Id: I8a7e8f6d46fcc34c96b55e41d656dca933fbef4e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-17 11:58:41 +00:00
Jarek Kobus
98026b29c6 TaskTree: Get rid of registration macros
Alias task types manually.
Don't require the alias to be inside the Tasking namespace.
Addresses the 22th point of the jira ticket below.

Task-number: QTCREATORBUG-28741
Change-Id: I1bdda7fe5a01e4bcb5052ec328f4e0eace878651
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 10:23:52 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
Alessandro Portale
4605bf57dd CMakeProjectManager: Deselect "Stage for installation" for BareMetal
There is no CMake install target for BareMetal. Therefore, the "Stage
for installation" option needs to be deseleceted, like it is being done
for other devices.

Amends: 2387e9e37a

Fixes: QTCREATORBUG-29293
Change-Id: Ic0e61ab19318f6383f55e6330b7559a734706a0e
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 14:41:35 +00:00
Alessandro Portale
6f9a97fd13 CMakeProjectManager: Deselect "Stage for installation" for iOS Simulator
There is no CMake install target for iOS Simulator. Therefore, the
"Stage for installation" option needs to be deseleceted, like it is
being done for iOS device.

Amends: 2387e9e37a

Fixes: QTCREATORBUG-29293
Fixes: QTCREATORBUG-29475
Change-Id: I6406446534c1ddedbf01cdab4d074bddc44dc495
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 14:41:28 +00:00
hjk
1c4f973365 ProjectExplorer: Replace the fromMap error return value
... by some out-of-band mechanism, keeping previous functionality.

The driving reason is to get the same fromMap signature as in the
AspectContainer base, however, the whole mechanism seems rather useless:
There are only a few places that actually ever could report errors,
in those places "moving on" looks ok, too, and these few places
are not conceptually different than a lot others.

Removal of this (new) mechanism is left for later.

Change-Id: Ibe7a0456bc3b84a84e942231f14446e783372d76
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-24 06:31:51 +00:00
hjk
53d06feecd ProjectExplorer: Change ProjectConfiguration::toMap signature
To match better with the rest, especially the base AspectContainer.

Change-Id: Ide0966cab3219800aa6b7b9e6012731a3fbe7a6f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-21 16:12:15 +00:00
Cristian Adam
dc01c79203 CMakePM: Use staging dir only when selected
Fixes: QTCREATORBUG-29223
Change-Id: Ibc31b73ddda4f3906929ec1a4ff13eca84a704c8
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 13:22:45 +00:00
Eike Ziller
ac0796926d Merge remote-tracking branch 'origin/11.0'
Change-Id: Iaa647a44accc98ae84aa095d0bd5049588a92387
2023-07-14 14:51:22 +02:00
hjk
f7afa52106 CMake: Use aspects more directly in CMakeBuildStep
Change-Id: Id12381556439ef6b3e56307a169830bb18da9003
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-14 07:25:06 +00:00
Jarek Kobus
47ac604aea AbstractProcessStep: Use task tree for all subclasses
Introduce AbstractProcessStep::runRecipe() virtual method
with the default implementation.

Task-number: QTCREATORBUG-29168
Change-Id: Iac75f4c38f8ee91ad8ac9324bb27881a3722911f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 06:48:58 +00:00
Alessandro Portale
733279e017 CMakeProjectManager: Deselect "Stage for installation" for WebAssembly
There is no CMake install target for WebAssembly. Therefore, the "Stage
for installation" option needs to be deseleceted, like it is being done
for Android and iOS.

Amends: 2387e9e37a

Fixes: QTCREATORBUG-29293
Change-Id: I954dc492259b7211d3dc68047dbb6d7a8e6579b9
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 05:22:58 +00:00
Jarek Kobus
2cc3c3b681 CMakeBuildStep: Employ task tree for running
Remove emitting 100% progress on finish, as that's
done automatically by the task tree.

Task-number: QTCREATORBUG-29168
Change-Id: I468fd2c12ffda4c051a46e586fc18214598269f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-13 09:53:54 +00:00
Jarek Kobus
b37b94f0e5 AbstractProcessStep: De-virtualize finish() method
Provide a setDoneHook() setter instead. The hook is
introduced temporarily, as when all the subclasses
are transformed to use the task tree, the done hook
is going to be a part of the subclass' recipe.

Task-number: QTCREATORBUG-29168
Change-Id: Idbc0f8b8a32c8df2fa5ecb73ed1cbaedad99620d
Reviewed-by: hjk <hjk@qt.io>
2023-07-13 06:50:07 +00:00
Marcus Tillmanns
d18768b53a CMakeProjectManager: Use more FilePath
Change-Id: Ifa3e754c224cd6ec315d49cd825aa78ac59b5ad9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-07 07:08:36 +00:00
hjk
98bba063b6 Utils: Use FilePathAspect::setDefaultValue
... instead of StringAspect::setDefaultFilePath.

Closer to the intended uniform access.

Task-number: QTCREATORBUG-29167
Change-Id: I87df385ef98873a0955010149a9a9b09a5f29daf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-30 09:34:26 +00:00
Alessandro Portale
2387e9e37a CMakeProjectManager: Deselect "Stage for installation" for Android/iOS
The "Stage for installation" option in the CMake build step, which is
introduced with Qt Creator 11, relies on the presence of an "install"
CMake target.

The build systems of Qt for Android and Qt for iOS do not create an
"install" CMake target. Therefore, a pre-selected "Stage for
installation" option in the CMake build step would cause a build
failure.

This change deselects the option if the kit's run device is of type
Android or iOS.

Fixes: QTCREATORBUG-29293
Change-Id: I9755dea1564fbc2696f8bdd416f637c5b28e3761
Reviewed-by: hjk <hjk@qt.io>
2023-06-20 12:26:04 +00:00
Eike Ziller
f97d9e51c0 CMake: Use QtC temporary dir for staging directory for local builds
For builds on the local host, use the Qt Creator temporary directory as
the default "staging" directory. This is a "nicer" directory on Windows
and is also cleared automatically (at Qt Creator shutdown), which is not
true for "/tmp".

Amends 4753b658bb

Change-Id: Ia6dc0d76fb2d97eb7ec931981df057ec83553e69
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-20 08:23:09 +00:00
Eike Ziller
3825b9f2cc CMake: Some UI/tr fixes
Avoid the order "Label [ ]" for checkboxes, we changed all cases to the
standard "[ ] Label" because it looks very ugly and confusing the other
way around. Also move the corresponding directory setting to the next
row, which is not ideal but still looks better.

Improve message about reloading presets.

Change-Id: Ibcd26e24a2a4cd3ea5ca819f74e78edb40f46072
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-15 10:02:36 +00:00
Eike Ziller
ea8182016b CMake: Fix command line for "staging" an installation
Fix that the "install" target was added too late in the command line
arguments, leading a cmake error for multi-config setups like for iOS.

Change-Id: If35a96725f55b5d250ccdd7386ba02d7a21ede85
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-14 13:53:45 +00:00
hjk
75710fa369 Utils: Remove LabelPlacement::AtCheckBoxWithoutDummyLabel
This is identical in remaining functionality to AtCheckBox after
the recent layout builder changes (or rather, can be adjusted on
the layouting side by having appropriate empty cells)

Task-number: QTCREATORBUG-29167
Change-Id: Ic357de6fb756acb5926afe1fd361ee4b18b17afd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-24 09:53:05 +00:00
hjk
3ecaabf5e9 CMake: Use a FilePathAsepect for the staging directory
Change-Id: Id4ac0cdaa3a773f740f474e78a7af104996a5504
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-23 12:54:37 +00:00
hjk
5e059db065 CMakeProjectManager: Robustify buildAndRunOnSameDevice helper
Change-Id: Ib3559f81f2ff71ad5fc04d982ad6286df0d4390e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-22 12:48:27 +00:00
hjk
50084f6b0e Layouting: Handle attach types via setter
Change-Id: I862f5cd109db3582b4f029787ec0cded2da39ce6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:19 +00:00
Eike Ziller
66c0c36bc1 Fix compiler warnings
Change-Id: I9b0b4a60d1152142f62bf3f76885cf8019714623
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sivert Krøvel <sivert.krovel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-02 09:05:16 +00:00
hjk
b7ca84c5ee Utils: Remove one LayoutBuilder::addRow() overload
The flexibility here is getting in the way later when trying to
remove the dependency on aspects.

Change-Id: I7221e80f2067292c7c80aead8f6d739fb7878f7e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-25 10:07:26 +00:00
hjk
4753b658bb CMake: Allow to run staging installation in CMakeInstallStep
User configurable, on by default (only) for cases where build and run
device are different.

The staging dir is by default a randomly named directory on the build
device, but can be changed by the user if needed.

Overall, this does not change anything for a pure local setup (but
would let the user opt-in into staging, too)

Change-Id: Ic1c5fd1f1261e067692710c9e3aa9d821897478d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-06 10:07:37 +00:00
Marcus Tillmanns
ca0bee902f ProjectExplorer: Create BuildDirectory on device
The BuildDirectory is now assumed to be on the build device.

The default build directory template path is resolved against the
project path mapped to the build directory.

Change-Id: Ie1d147d135e9e551f2ac46cbec583374d524d2d7
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 12:17:49 +00:00