Commit Graph

3443 Commits

Author SHA1 Message Date
Eike Ziller
6479785c20 Merge remote-tracking branch 'origin/11.0'
Change-Id: Icb3ed8a1aaf31e8201a61d04221bfcb23a78562a
2023-06-22 13:09:00 +02: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
0f9b118776 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ib798dc9922c01b7667388ca03d3a248610f73028
2023-06-20 10:36:06 +02: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
3a57a1a291 Merge remote-tracking branch 'origin/10.0' into 11.0
Change-Id: I909bf27bd6d43eb74ae61b15a61467a4a7e0558e
2023-06-20 10:12:59 +02:00
Eike Ziller
f88db30319 Merge remote-tracking branch 'origin/11.0'
Change-Id: Ibb433d3e1ea2c0632dd2f710c8ec995de7599978
2023-06-19 10:08:56 +02:00
Alessandro Portale
850f1ce66c Android: Don't pass duplicate ANDROID_PLATFORM to CMake
This makes sure that one unique argument "-DANDROID_PLATFORM:STRING=..."
is passed to CMake. An entry in a kit's CMake configuration has the
precedence over the ANDROID_PLATFORM defined by Qt's build system.

Fixes: QTCREATORBUG-29112
Change-Id: I1c4d80be9ddfc7a00a5a7eff476497f08d87b741
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-16 09:30:52 +00:00
Cristian Adam
64cd1df74b CMakePM: Add Qt SDK ninja to configure environment
Fixes: QTCREATORBUG-29032
Change-Id: I1aebd11ba85ad6a363ecf1ab6406cdec20753e9d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-16 09:10:52 +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
6c601b8cd4 Merge remote-tracking branch 'origin/11.0'
Change-Id: I8d1c9720a868da02b3157a48954eb4e262539c84
2023-06-15 09:48:58 +02: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
Eike Ziller
e7870f736d Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/clangformat/clangformatutils.cpp

Change-Id: Ide285cc25fca9101843ab9dca01c5a33644aca7f
2023-06-14 08:43:08 +02:00
hjk
87a9345398 CMakeProjectManager: Remove compatibility code with < 4.13
This hunk was added as part of 01b0d4f8f5 in 2020.

Change-Id: I3b520005dc2462397ddfb1a2f6671603131ddced
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-13 14:54:55 +00:00
Cristian Adam
42fff6e27e CMakePM: Add support for block/endblock functions
The block() / endblock() functionatlity has been added to CMake version
3.25.

See https: //cmake.org/cmake/help/latest/command/block.html

Change-Id: If6458b84c3e30c4d4d8cbd3d3f1c661e8ffa869c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-06-12 13:39:59 +00:00
hjk
904fa0aca3 CMake: Check for CMakeCache.txt also in remote builds
Change-Id: Ide179188a7fbd10b122a6bb34de08f943324133f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-12 13:18:57 +00:00
Cristian Adam
9c8acbf40e CMakePM: Fix MSVC assertion with tests/manual/cmakepresets
Change-Id: I5f06d69b444e453456f2dd9822006b535d3f7843
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-06-12 13:10:30 +00:00
hjk
19a6428f54 More deprecation induced busywork
QString::count() will vanish.

Change-Id: I65672fa648c0969930e9398ec4e541a0771c8a57
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-08 07:00:01 +00:00
David Schulz
be0a129543 CMake: fix find link at
Change-Id: I1afcd3bd2b4db53ff8284f9acbe2b07102e66205
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-07 07:38:16 +00:00
hjk
adcf52e0c4 Fix some more *::count() deprecation warnings
Change-Id: Ib7d1552a6f7b167e15beb7ca1ef26c7d57e090e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-07 07:29:34 +00:00
Marcus Tillmanns
ce7677a7d7 Kits: Sort kit parts by device
Change-Id: I00e1db4897071ac6baf97c5bb6214c2658a7b9fb
Reviewed-by: hjk <hjk@qt.io>
2023-06-07 07:19:19 +00:00
hjk
676d06d768 Use simpler IOptionPage::setLayouter overload in a few more places
Change-Id: Id3745dab4363279219062462492b3a3e789776be
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-31 07:50:03 +00:00
David Schulz
ea108f4857 Editor: Adjust remaining usages of BaseTextEditor:convertPosition
amends 9bb126c0d6

Change-Id: I42b96f1f7364f75da88eccd7a86fc25b9cd1499d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-30 13:35:07 +00:00
Eike Ziller
6e7bb28f09 Tr: Add missing full stops
Change-Id: I2debc56d0740eaa30c7d597eae18910f319c1d98
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-26 13:50:18 +00:00
Eike Ziller
f2c1455025 Tr: Wrap file paths with ""
Change-Id: Iee0e941ff503ff485e8e9c0d9fe3e52eea9042d5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-26 13:50:07 +00:00
hjk
a69489cd1e CMakeProjectManager: Register settings aspects more directly
Change-Id: I7bfbe3ad625b0902561975968221e90ce6af06d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-26 09:14:48 +00:00
Eike Ziller
55dadd4f95 Merge remote-tracking branch 'origin/10.0' into 11.0
Change-Id: I27e2c1c764f955d14bfece6cd580b4c2d2988396
2023-05-25 08:29:27 +02:00
Cristian Adam
0d3d4892c6 CMakePM: Fix Qt detection for Presets with toolchain file
When CMAKE_TOOLCHAIN_FILE and CMAKE_PREFIX_PATH were both set, the later
was ignored.

This resulted in Kits being created without Qt and without Qml
Debugging.

Task-number: QTCREATORBUG-28982
Change-Id: Ib45b4ac8335391f85a0b9c321196597d1c0a7a3f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-24 13:59:14 +00:00
David Schulz
9bb126c0d6 Utils: make column of convertPosition 0-based to merge it into Position
Change-Id: I239b3cb33b8ad59ac4097c919155ab5ca7d57b8e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-05-24 11:53:28 +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
Cristian Adam
bf4934feb9 CMakePM: Expand ${hostSystemName} for build presets
Fixes: QTCREATORBUG-28935
Change-Id: Ie645d80a9743108e3760096b6829e881677e249b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-24 09:14:40 +00:00
Cristian Adam
c1cdea2661 CMakePM: Consider quoted file names for file operations
It is not uncommon for projects to use quoted file names, which would
break the new file operation support for CMakeLists.txt files.

Change-Id: I8dc5d6843f1723c5709cef28cf3bf89a5c87ec2a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-23 16:27:14 +00:00
Cristian Adam
2f04f08611 CMakePM: Remove comment line lexer addition
This brings the lexer back to vanilla CMake version.

The comment arguments were not needed in the implementation of
source file addition / rename / removal operations.

Change-Id: If28b738b9ce93511b109fe09dcd03f42ee07a431
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-23 14:58:27 +00:00
Cristian Adam
b90600e674 CMakePM: Move cmListFileLexer.c as cmListFileLexer.cxx
This way Qt Creator will not have two code model language contexts
for the CMakeProjectManager.

Change-Id: Ie71b845779aff472836b164a5c65fdc7d75debb1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-23 14:55:50 +00:00
hjk
79dd2a8c8b CMake: Use new FilePath::searchAllInDirectories function
Change-Id: Idd696603548d7504ff87152e9125667dca4c42ab
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-23 13:03:08 +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
d740a355bb Utils: Rework CheckableMessageBox
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.

Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:

...removing  aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect.  Arguably, the latter is not needed
and could be done on the user side.

Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.

Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.

Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-22 06:40:13 +00:00
hjk
6f31d87444 Use more FilePathAspect
Change-Id: Ib348df1460f8610607251498b07010df58d51ddf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-19 15:07:17 +00:00
Eike Ziller
8e8ebc8f88 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	coin/instructions/build.yaml

Change-Id: I697b0107e75c6259989247de2180437d7987ff37
2023-05-17 14:55:02 +02:00
Marcus Tillmanns
1fc2459b62 Utils: Unify CheckableMessageBox and make it look more native
Change-Id: I5690c16f38cfd2058e01441283bec28d44cadf75
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 08:01:13 +00:00
hjk
6c5fb656d6 Utils: Make PagedSettings::readSettings() calls shorter
Ideally, this would not be needed on the user code side at all, but
there's no way to ensure the settings are read timing before sibling
constructors might need it. So keep the 'poor man's two-phase
initialization', but make it less intrusive.

Change-Id: Ica7f6510cd05072d7286f4e85cd72c494e8f10f8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-16 16:36:25 +00:00
Cristian Adam
9ff0cf7306 CMakePM: Add action to reload CMake Presets
The CMake presets will be reloaded. The preset kits will get the CMake
configuration cleared (no more CMakeCache.txt)

All the kits will be removed from the project, so that the Kit
configuration wizard will be displayed at the end.

If a normal Qt Kit was configured, the user will get the chance to
import the existing configuration (the initial configuration will be
lost though).

Change-Id: Ieda83098d7716913d7870b67ab522705da4ed93b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-05-15 15:13:23 +00:00
hjk
9dad4ab9d4 CMakeProjectManager: Rework CMakeFormatter
Use PagedSettings, make setup more local, remove Q_OBJECT

Change-Id: I9e91f9e63ed8ad15749323bd039d118562dba1a6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-05-15 11:21:45 +00:00
Cristian Adam
62e9a0bec1 CMakePM: Stretch the CMake parameters column on resize
Makes sure that the CMake parameters columns are properly stretched when
Qt Creator window is being resized or maximized / restored from
maximized state.

Fixes: QTCREATORBUG-27257
Change-Id: Ifb4d439fb758dcc5b2593be917ba35e9c79f2840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-12 12:07:31 +00:00
The Qt Project
70609cdec6 Merge "Merge remote-tracking branch 'origin/10.0'" 2023-05-12 10:42:27 +00:00
Eike Ziller
51df19270b Merge remote-tracking branch 'origin/10.0'
Change-Id: I7cfdfc13097d5037fea597ecba98ae902a0c5afb
2023-05-12 12:24:39 +02:00
Cristian Adam
dc18d4b9ee CMakePM: Display presets as part of the project outline
Fixes: QTCREATORBUG-28966
Change-Id: Iae0f77956bf6f4682ea8a25e08d05de3331c7420
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 10:21:53 +00:00
Cristian Adam
af5e50edf7 CMakePM: Cancel current build before locator "cm <target>"
In case the current project is building and the user starts a "cm
<target>" in Locator, now the build is canceled before starting a a
"cmake --build --target <target>".

Fixes: QTCREATORBUG-26699
Change-Id: I27ed9ba5b8d917dce94835a5462e4e64e7515bd9
Reviewed-by: hjk <hjk@qt.io>
2023-05-12 08:17:17 +00:00
hjk
5614696002 Core: Make PagedSettings autoapply by default in the base
Instead of relying (and forgetting...) it in all derived clases.

Change-Id: I5d1dea0ace420d464c39c192278ae6e5db01de90
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-11 13:43:58 +00:00
Eike Ziller
7f5876b45a Merge remote-tracking branch 'origin/10.0'
Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
2023-05-11 10:33:18 +02:00