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>
One could have a toolchainfile that sets the CMAKE_SYSROOT. We need to
be able to read the value later, and not just from the CMake Presets
cmakeCache array.
Task-number: QTCREATORBUG-29643
Change-Id: I63697219195b043813516c8214329ce583dc0676
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Qt Creator will display the header / source files based on the
sourceDirectory of the target as base directory.
The source_group(TREE <dir>) will result CMake in making a source group
named "TREE" which should not be displayed in the project view.
Amends 9280f7f757
Fixes: QTCREATORBUG-23942
Fixes: QTCREATORBUG-29105
Change-Id: Ib71ffcc559376ea1596a5b21cb7e7fa779bd8d79
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is not handling the respective role correctly, just
silencing the warning. No change in current functionality.
Change-Id: Icd904941d5fc496d66b8e1eb7eec0031840f519d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This is allowed by `find_package`, and can be tested with the `fmt`
package provided by conan.
Change-Id: Ib9bf2a6cbd80b8eb322cb6d8a1a9c25af0ca4031
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This triggered soft asserts in FileUtils::copyIfDifferent() when
opening top-level qt.
Amends 246f33c20d which introduced a unwanted extra .parentDir() call
which removed part of the path.
Change-Id: Id0475a74a589372d37b7ec65d33d3faf6194013c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The fact that Qt Creator uses the preset name to create a directory and
then import the directory is an implementation detail.
This changeset will allow characters like ":" to be part of the preset
name.
Task-number: QTCREATORBUG-29643
Change-Id: I84a224b78eb3d2233f80d9bdb8bf4478471349b0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The specification allows this, so we need to support it.
Task-number: QTCREATORBUG-29643
Change-Id: I8bd0a91ba05d2ed27b7a7af2d268539de020826f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
CMake has a few environment variables that are documented and this
commit adds support for them.
Change-Id: Iaa31bdc97b343581fcf519d19e66bc6ce8ace150
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
I needed to add more members to the structure, and will get static
analyser to complain that the number of bytes is to high.
Amends 3984108c0c
Change-Id: I162b9ef615dc7f6f76b08c5599eed24488bf7e88
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
If Boot2Qt devices are registered, their CMake tool would often end up
as the default. Instead now we only auto select a cmake tool on the
local machine.
Change-Id: I677ab06ae88ff36209e691ea0fadb356436e973c
Reviewed-by: hjk <hjk@qt.io>
The pointer contains the parent class passed with "this" and will never
be null.
Coverity-Id: 1568097 Dereference after null check (FORWARD_NULL)
Coverity-Id: 1568100 Uninitialized pointer field (UNINIT_CTOR)
Coverity-Id: 1568111 Dereference before null check (REVERSE_INULL)
Change-Id: I40e32d162689c749d498c4a63c073c0e336a3626
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If projects are using a local "cmake" directory containing
Find<Package>.cmake modules the common practice is to use something like
this:
## Add paths to check for cmake modules:
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
This commit makes sure that these packages are taken into consideration
for code completion.
Change-Id: I152ccce0c97ab2385eda93ff6bc5fc4e7cefb6c4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This way code completion will have Qt6 package suggestions for
find_packages.
Change-Id: I9ab64425f850a0d990e77a559ce9f121bc9cf2d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... and not for every function. Just the CMake files.
Change-Id: I6e361f4913f8334942a3135adaa0480fdc0cee31
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Check more often for canceled future.
Make more functions static.
Fixes: QTCREATORBUG-27729
Change-Id: I8dd787acea6343008c7515fb6a4fdfde50b37aee
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
On the session switch we are busy waiting for the running async task,
started before by the FileApiReader::endState(). This blocks the main
thread for considerable amount of time. E.g. when switching
between sessions both containing Qt project, it may block
the main thread up to 10 seconds.
Instead, we employ the future synchronizer and move the awaiting
to the shutdown phase.
The next patch is going to limit the awaiting in shutdown phase.
Task-number: QTCREATORBUG-27729
Change-Id: I956ed26edcd699d8a4e2b9309d109963f1d4bb20
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This way we'll get:
[cmake]
[cmake] Elapsed time: 00:05.
And not the other way around.
Change-Id: Ica7352cd112b9017c8a39b98618be69494527be9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This was the first one reported by CMake, and we need to make sure it's
also included.
Change-Id: I5becfffc1afb35a4f69fd26d8563aa1ea6eaea60
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
With this one could easily filter the "[cmake] " messages from all the
messages in the "Generate Messages" pane.
Change-Id: I690650f0ccb0372c9361b95cfec41809737720d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is usually the case when using a custom CMake API e.g.
qt_add_executable.
The topmost function is highlighting the error now, presenting the
callstack in the tooltip.
Change-Id: Ic8b8f60e8fe94d88dfa0b384639172370382a421
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This way the popup message is not spanning the whole screen.
Testable with find_package(Qt7 REQUIRED).
Change-Id: I3f1943b603baa02c55f2f8f63c75908468e69d9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>