When trying to jump to a symbol in a qml file the Qml Model may find
the location in a generated .qml file in the build folder.
QtCreator searches in all generated .qrc files to try and find
the source file so it can jump to it instead.
Previously not all auto-generated ".rcc" folders would be found
as only the folders of targets (executables) were searched.
Plugins or Static Libraries were not searched.
With this fix, all projects nodes are searched for the ".rcc" folder
and therefore also finds them for Dynamic / Static libraries and
plugins.
Fixes: QTCREATORBUG-27173
Change-Id: Ic51ac8fbc82c15785cbefd76787942a512ecf3db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Utils::Environment takes care of the case insesitivity of the key of
environment variables on Windows.
Change-Id: I624340d30c6b170b5d0a86791f26a4841a0b2fb7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This way the CMAKE_PREFIX_PATH set to $env{HOME}/Qt (Linux) or
$env{SystemDrive}/Qt (Windows) would work as expected.
Change-Id: I03a9102d6d1da2a8740cab738577c47c44166c6c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For CMakePresets if a preset is broken we should not create a preset kit
for every build type.
Instead reuse the broken kit created by the first build type.
Task-number: QTCREATORBUG-28295
Change-Id: I038fbb23817834f59ac73ccd2f9953f1a412b656
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This allows presets that do not have a generator specified to proper
work.
On Windows CMake will detect "Visual Studio" as generator. This change
sets the generator and the architecture values accordingly.
Change-Id: I943e082430445c4b16cf9eaf4ae5ae2500b2bd2b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
cacheVariables, environment (and others) collection fields need to be
merged when having inherited presets.
Fixes: QTCREATORBUG-28360
Change-Id: I3d2b84355fad9ffa2dc4629ece7d42f7b482a859
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Is part of CMakePrests v3, and slipped at the implementation time.
Task-number: QTCREATORBUG-24555
Change-Id: Id3ce90c0a979d44287fc03ae1dd49a64e964cdf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Now the code takes into consideration the parent environment for
$env{macro} alongside the "environment" presets values.
Task-number: QTCREATORBUG-24555
Change-Id: I644618b0a6f866fd65a4109ee63b1f5bfcd4164d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Shortens the "Run CMake" button and the cmake variables
tab header to make them easier to read on wide monitors
Change-Id: I2579a8fa1c2899ae94f9c4a72c4188dc61ecd5f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This doesn't mean that CMakePresets will work with a remote project, but
at least it avoids Environment::systemEnvironment() usage.
Change-Id: I17081c747d32e50224ac74507d3aa336ff5c8948
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Previously, if you have a filter set in the CMake Settings
variable list, adding a new one would immediately hide it,
as the text filter hides the "<UNSET>" key. This made it look
like the adding failed.
With this change, new Variables are always shown so
they stay editable to user.
Change-Id: I9c2eb7f9983b23e1cd3aa50f589142551caaf56f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Hopefully less confusion about the direction.
Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
In case of building on a remote system CMake considers this remote system
as host.
Change-Id: Ifb9d0b2a2c4c49ba4ee009795f5b432c7b951e0d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When running on the remote build device. And make it work with CMake.
Change-Id: If25bef8ab836c1d59a586116b3c3447a29c4e7e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
CMakePM was setting the default generator to Ninja if the ninja
executable was set in the build environment.
This had the side effect of having to instantiate the build environment
for Visual C++, which meant running vcvars.bat files. This operation can
be costly if clink is also installed in the system.
This way the users that have ninja installed via choco, or manually set
it path, will not be affected by this delay.
Note that this only fixes the issue for the first start of Qt Creator
with new settings.
Some number from my machine:
- with clink 21s
- without clink 10s
- with this patchset 4s
Task-number: QTCREATORBUG-27906
Change-Id: I74d19b08211d93b3962a8877b49a58089310fbd6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Neither cmake nor qmake know the full iOS compiler command line, so we
have to construct the target triple for the code model ourselves.
Fixes: QTCREATORBUG-28278
Change-Id: I6cac06f340e9388de5c86509a8df4ac00eef87cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Restrict the build types only if CMAKE_BUILD_TYPE or
CMAKE_CONFIGURATION_TYPES cache variables are set.
Change-Id: Ib88dcd5d4a0fca86f86e95815edff1116f896324
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
CMakePresets v3 relax the requirement of having the buildDirectory
specified.
This way Qt Creator should use its own mechanism of specifying the build
directory.
Change-Id: I6ba69e6a03cdc058e7b8fa540a6fc564356aba63
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If we configure a project with presets, build all the configurations,
then delete the CMakeLists.txt.user file to re-configure the presets, we
shouldn't get two entries in the initial configuration dialog.
Change-Id: I9bb234aa54fcce193dbd07dd3aa77e91f639b179
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If a preset has a build directory set, that build directory and build
type should be displayed in the initial configuration dialog.
Change-Id: I884471cb4d482c92ab091a4043d642828318b4d2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
It would be remote on "real remote" builds.
Task-number: QTCREATORBUG-28242
Change-Id: Ic37e5c6ec30064aec825d2322d25843a526b6ac4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When trying to configure a CMake project on a remote linux device,
there's currently PATH=/some/local/dir/for/ninja added on the ssh
command line, which won't work with the remote cmake.
Change-Id: I97adb58e4c8b33f74edcc37a7b2cfb00c764b829
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
If the devices have not loaded yet, trying to restore
a remote cmake will result in errors.
Change-Id: I08a802441d64b203388334e5cbb6b962d1f0d213
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Moved to a handcrafted function instead of using regex.
This way the Visual C++ Ninja only preset can be processed.
Change-Id: I9b303ee1765db05544d81db7d3b8d9e5223f5f42
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This fixes issues with Visual C++ generator, which needs the right
parameters to pinpoint the right compilers.
Also use CMAKE_TOOLCHAIN_FILE for qmake detection.
Change-Id: I6edc84c7ed1a892fbc5545ff61dc06ac20720f0a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The values coming from a CMakeConfig do not contain
the device they are relative to.
This transforms the FilePath to be relative to the device
that the cmake executable was run on.
Change-Id: I7bfdf065ddb4acfc751ac6456f1c32398393e2ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Less impedance when interfacing the rest of the code.
Fixes
warning: comparison of integer expressions of different signedness:
‘std::vector<....>::size_type’ {aka ‘long unsigned int’} and
‘qsizetype’ {aka ‘long long int’} [-Wsign-compare]
Change-Id: If5e1e770e2ed170aa4259963fa7ca0d6642190d9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>