Previously the "Force to ..." context menu entries were enabled
only for the items on the second column (values).
There is no reason not to have the same behavior for the items
on the first column (keys).
This way the user doesn't have the impression that something is
wrong if they trigger the context menu on the key and not on
the value in the list.
Change-Id: I02fcaf25340f2dbcbb808be8f27047acaaee5471
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A combobox in the device dialog to select between the (docker image's)
system path and a semicolon-separated set of user defined paths.
Use it for cmake and gdb detection; qmake and toolchains currently missing.
Change-Id: I3c478ca914a1bf02dcb69ebcb9ea6e358d24aaf9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
When auto-detecting cmake on device ensure any found
cmake will not end up as default cmake as this would
update even desktop related kits to use this if they
had no cmake configured before.
Change-Id: I27960fc1f76d95bd7ddef6bff40f163aa46a610d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Configuring a project during build is a recipe for disaster.
Fixes: QTCREATORBUG-26606
Change-Id: I041d9bd76315647439100cadba809d6664d268fa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Recommendation of Designer is the artifact from an earlier solution
for adding code of .ui files to the code model. The refactoring of
extra compilers made that superfluous, this change removes the
left-over traces.
The CMake build of Qt Creator breaks because of the recommendation
if the qttols module is not installed.
Amends: 78d3191363
Change-Id: I64827492d79a9238dc8512047abd581f9da3189e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Similar to the qmake make build step, so build issues are parsed for iOS
builds.
Task-number: QTCREATORBUG-26541
Change-Id: Ie71a3087feab2720f6d8b4974d221a70c3fe76fa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Fix the wizard from inserting the filename for the file path leading to
an invalid directory.
Example invalid path: /projectpath/projectname/projectname.pro/android
With fixed path: /projectpath/projectname/android
Fixes: QTCREATORBUG-26580
Change-Id: If82a6f795ca400beddc26b959e65ea066ad79433
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In favor of the FilePath/Link ones.
Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
That's implicit in .onDevice() since c82e3cf6a8, doing it twice
is not good.
Change-Id: I8c1d5d31d155d3a7c4af8bd874fbba5ab3e8cf72
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Detect that constructor of ResourceTopLevelNode is being
run from non-main thread and omit creation of ResourceFileWatcher
in this case. The construction of ResourceFileWatcher
will be postponed until the node tree returns back
to the main thread. This happens later inside
Project::setRootProjectNode() when ProjectTree::applyTreeManager()
is called for the second time - this time it's done from the main
thread. In order to setup the lacking resource file watchers
we install an additional folder node visitor only in case when
the handler is called from main thread. The visitor
sets up the lacking resource watchers if that's still needed.
Amends: 0bcab32657
Fixes: QTCREATORBUG-26417
Change-Id: Ia1bfb7f284afb833b6b4291accc4d0a91bd0d6c5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we employ QtcProcess, the reaping of possibly
running process is done internally by QtcProcess already.
Change-Id: Ie65314a4aecf5bb1808b0f2c46a50503d82fd6fb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The change that treats header files as projects added all sources for a
certain language for every compiler group.
This meant that for the target that has precompiled headers, the source
files would be added multiple times.
This change reverts to adding only the source files from a compiler
group and the header files for a language type, but only for non PCH
compiler group.
Fixes: QTCREATORBUG-26383
Change-Id: Ib328e0a0331e0f373d5a5981489bc17c58b8eed6
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Don't lookup for matching targetDetails on every iteration.
Before we start a loop we prepare the appropriate hash and
use it on every iteration instead.
This shortens the total time spent on findOrDefault
from about 2 seconds to about 10 miliseconds now.
Change-Id: I89bb3f472bc9071a54f9900fa057f87b57d4742d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Don't search for each target separately in the node tree,
but do a one search for all targets at once.
This makes searching for nodes much faster, as in case
of loading a Qt6 project (5 main modules only) with debug build
of Creator, the searching time went down from 36 seconds into
30 miliseconds (just 1000 times faster). The number of targets
in this case was more than 5000.
Change-Id: I015f6fd2a2d5e613307cc7b65746c01a5b14c6dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
clean, rename and delete unused constants, we well as unify the
usage between qmake, cmake, and qbs.
Change-Id: I8827ac2f2f7660e337694fef17f744e727bd776a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Also mark the CMake configured generated precompile header files as
generated, so that the "Hide Generated Files" filter menu entry would
take them into account.
Fixes: QTCREATORBUG-25125
Change-Id: I0ec1cc923e361ae9b599eef1a039695e749a033a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Otherwise we may easily lose registered tools if the device
is currently not available.
This happens e.g. if the docker daemon is not running.
Change-Id: I10156d749bf33d7d789c3fad78bf3acdf1f6fd74
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The file tree scanner will only be started on CMake configuration
failure to generate the <File System> fall back project node.
Change-Id: I873ef1189fd43dc9bffa03aeafabb00bb3b8b6af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake projects need to add the headers as source files in order to get
exported from the CMake file-api json export.
Having header files that are not part of the project displayed in the
<Headers> node is error prone and confusing.
This also means that you won't get bogus files when doing git commit
for example.
Fixes: QTCREATORBUG-18206
Fixes: QTCREATORBUG-24609
Fixes: QTCREATORBUG-25407
Change-Id: I89ac4f8a80f452119f8a991b9e4ef14efb7a86b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake doesn't associate header files in a compiler group in the
file-api export. But it does list them as source files if added
to the source files of a target.
By using the CppEditor::ProjectFileCategorizer we can sort the
header files to the right compiler group.
This way one could have the clang-tidy and clazy run on a header
file. Or the TODO plugin find TODOs in header files. Or the Autotest
plugin finding Google Tests in header files.
Fixes: QTCREATORBUG-23783
Fixes: QTCREATORBUG-23843
Fixes: QTCREATORBUG-26201
Fixes: QTCREATORBUG-26238
Change-Id: I8acace48e89fd9b3da8bce1c479dec7891e1bbd4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If a project fails to load it will be displayed with a warning icon.
If the CMake configuration fails and the backup configuration is
restored, the project is also marked with a warning icon.
Change-Id: I95ccc5d171f5b789fe317fbb1da9e13dcd81a5dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
It is a value written by the installer, and to be read from the install
settings. Writing it to the local user settings breaks it if the user
uninstalls Qt and installs it at a different location.
Also add a temporary fixup, removing the setting from the local user
settings, if it was already written there.
Amends beda749326
Fixes: QTCREATORBUG-26289
Change-Id: I27652031b13aaf17a5daff3bfba1312bf1158ec7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Docker images with UNIX on a Windows host should get a proper
default generator.
This allows to build projects with a default set up kit for docker
out of the box without modifying the kit values or the project
setup.
Change-Id: Ic32e72c28d98a367e71f19d4e1c211ec7a4e613e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Currently the errors / warnings were visible only in Project mode.
Now they will appear in the build system issues pane, so that the
user knows that something is wrong with the project.
Change-Id: I4e0e6aebed86fdb9ea757692255cdbde37cf58a3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
With CMake, it seems that the abi was being empty string because
looking for ANDROID_ABIS is not defined and instead there's ANDROID_ABI.
Also make sure to handle the case of ANDROID_ABIS, which might be
declared in future versions like Qt 6.3 which can support multi-abi
builds.
Change-Id: I805c5c25409a4e20a237b8747082d256bd72e275
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
AbstractProcessStep is relying on signals which breaks with
the disconnect call.
Amends ebae255e49
Fixes: QTCREATORBUG-26271
Change-Id: I16ebaad68352be5c41492e5c4d4fbc3f032e2e39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The target list was recreated when the parsing of CMake project
finished.
But for already configured projects, the list was not used when
a new build step was added. This new step will only get the
targets list when the CMake project would be reparsed.
Fixes: QTCREATORBUG-25759
Change-Id: I54d12a71dacf9fcec2ad0f3e341fe8057880251d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
(cherry picked from commit a88f1426c3)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The target list was recreated when the parsing of CMake project
finished.
But for already configured projects, the list was not used when
a new build step was added. This new step will only get the
targets list when the CMake project would be reparsed.
Fixes: QTCREATORBUG-25759
Change-Id: I54d12a71dacf9fcec2ad0f3e341fe8057880251d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The interface can be used for checking the context of a codeassist
request to determine
the correct processor that has to be created.
Change-Id: I47ddb05c46399566e27bae21711f11a3a4132c3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>