This way one could really get a clean build as one would expect when
issuing "Clear CMake Configuration".
Change-Id: I7067bc4f6f858aeb408612eab5e658e637c0c957
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Rename process.h back to qtcprocess.h
MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.
There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have
Simply use a name that doesn't conflict.
Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This way we have fixed small (max 64 bytes) paths for CMake's configure
/ build / install steps.
This allows the user to have longer paths and still compile with MSVC /
GCC MinGW compilers.
Fixes: QTCREATORBUG-26786
Task-number: QTBUG-117413
Change-Id: I0cff6521626dd2ce78d0223d46f0b480e977d5c5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Amends 7a46bbe667 which only used
`cmakeTarget->productType() != ProductType::Other` which excludes OBJECT
libraries.
Now the fix actually includes all targets which are not UtilityType,
which was the intention of 7a46bbe667
Fixes: QTCREATORBUG-29914
Change-Id: If661828e43d5c566c876546f5527c0b670405e47
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Avoid using readAllStandard{Output,Error} mutable methods if possible.
Use non-mutable methods when we are not connected to
readyReadStandard{Output,Error} signals.
Change-Id: I2e830e571b9eab2177fd856bbe06dfc5137d9c01
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Instead of looking after the target name reported by CMake's file api
e.g. mytarget, take the parameter name from the function that created
the target.
This way if the user used ${PROJECT_NAME} to mark the name of the target
for qt_add_executable and qt_add_qml_module, when adding a qml file the
proper function would be picked.
Fixes: QTCREATORBUG-30218
Change-Id: I920f16d9f5a6b8a7a2fddb3ef7e97e0e3bccd464
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
On multi-config systems CMake is reporting "ALL_BUILD" or "ZERO_CHECK"
as targets to add files to.
When issued from menu File > Add New ... the selected target is the
first target namely "ALL_BUILD", which is a utility target and cannot
have source files.
Fixes: QTCREATORBUG-30170
Change-Id: I7617978c01f0a2554a3ec7d52ef9baaa16ed7a84
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
On Windows upon a CMake file change and save during a build, the
reconfiguration would fail due to the inability to save the build.ninja
file.
Fixes: QTCREATORBUG-30048
Change-Id: I68bec70b0a95bc4256b736a1c4caf1b4d706e43b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
In case of having no translations setup with the wizard or
manually later on we just do nothing and fail with adding
the translation file.
This patch minimally changes the CMakeLists.txt so that the
files are not "lost".
Task-number: QTCREATORBUG-29775
Change-Id: I560c8b736ec2a0a8de6e1177317a9172921f4340
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
There are more ways to add translation files to a cmake project,
so support the common ways.
Task-number: QTCREATORBUG-29775
Change-Id: I15f0d7a13303a1845760dbfc830c6f773f634ce0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
..for the major build systems. CMake build system will get further
improvements. For now this only works for adding ts files to the
target after the project had been created with QC's wizard with
some translation already added.
Qbs and qmake just work.
The C++ sources obviously will not change automatically to
integrate translation support for the application.
Task-number: QTCREATORBUG-29775
Change-Id: I80e4c21156f4bb8d5ef0bd6edf805021a55770ee
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When building using CMake it's possible that single CMakeLists.txt may
contain multiple android executables. In this case android-build
directory mixes the build artifacts from multiple targets. This patch
allows using per-target android-build directories in case if Qt support
this. The QT_INTERNAL_ANDROID_TARGET_BUILD_DIR_SUPPORT cache variable
indicates that Qt has builtin support of this feature and the
QT_USE_TARGET_ANDROID_BUILD_DIR cache variable should be set to TRUE
by user to enable the functionality project-wide.
Task-number: QTBUG-117443
Change-Id: Ic8f576e528ee918a3ebf075a25fa2a414ef85736
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
They are reasonably standardized, and generally usable cross-plugin,
so this can help to avoid a few cross-plugin compiletime dependencies.
Change-Id: Icb2b010c3e12dee69df54ab16f6f8e90d9cffba6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In case we have no Qt inside the current kit configured the
code model stumbles upon Qt constructs even if
CMAKE_PREFIX_PATH has been used correctly to allow cmake to
pick up a Qt.
Explicitly look into the found packages to see whether Qt
has been found and use this if possible for the codemodel.
This fixes some inline diagnostics as well as finding all
test information inside Qt Test related projects instead of
just the test cases when using a kit without a Qt.
Change-Id: Id3b5d2e818967cd3121948b818c75c4cf463546f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
... to ProjectExplorer::ProjectUpdaterInterface and generalize it
regarding language, but create a convience function for the C++
case, as that's the only user right now.
Also add the self-registering factory boilerplate and adapt all
buildsystems.
Change-Id: If928512609d41c25fad2aa58633c8bffabc4c48f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Wizard summary page does not provide a list to put in failed
files, so ending up inside the build systems addFiles() may
pass in a nullptr. Guard against its access.
Change-Id: Ia858f8029b1b840cc341d87614576f2634b995dc
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>
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>
Check that the function operating upon is "include" and then match the
word under cursor with a file from the project.
Change-Id: Ia0131f08515c56582a1fb02a59d6b2e41ac04288
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For example find_package(ZLIB QUEIT) will result in the package
variables ZLIB_LIBRARY ZLIB_INCLUDE_DIR.
The variables are available for both code completion and navigation.
Change-Id: I4ea6090f44a980dc91632fcabbda16987b0f0285
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
They were available via Ctrl-K and "cmo <target_name>". But they should
be working also in the text editor.
Change-Id: Iaad72b784485364776b67d6dfdef7ba73dd2df70
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>