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>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Added returning the Id after detecting CMake so it can be set in the autodetected kit
* Trying to keep autodetect from adding the same Qt installation twice if qmake is linked in /bin and /usr/bin
* Added FIXME for RunControlPrivate::runConfiguration as it is used after free in rare cases
* Fixed IosCompilerDetector to not just run if a device is set
* Fixed QnxCompilerDetector to not just run if a device is set
* Fixed auto-detected debuggers not being set as auto-detected, as they now can be removed from the device screen
Change-Id: Ia7772c454d70e147e4326efacc4a6a888fa26782
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
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>
Diverts to searchInDirectory(). Use it in some places.
Change-Id: I9e5642f0ae0ed4dd9fb9f34bcaa11a25bd26c690
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes it a bit clearer that there's no magic path use or similar
beyond this point.
Change-Id: I86c06850d16bf777db05ad23b540d8096926c059
Reviewed-by: David Schulz <david.schulz@qt.io>
It's effectively the mirrored version of onDevice() with an
equally odd name which is a bit more straightforward to use
in some cases.
Change-Id: I0cfedeb58871a857c93144e2a0d734bad1bcd887
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
- Use more uniform messages for the different kinds of items
- Remove all auto-detected items
Change-Id: I0b0df0bca484337039432b163bd8e19593b1cd22
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This make the code better re-usable from other places that
wish to put a cmake version into a new kit.
Change-Id: I1ef7770a7f8efa36e88b2f3862b011fecd38de98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Keep internals internal, remove some unnecessary includes, add
some that should have been there.
This reduces the number of files that get rebuild when working
on CMake internals from over 1000 to about 200.
This patch also moves some code around that ended up being
in the wrong file.
Change-Id: Icd7366ac760dc85031040720418fbb16336dce9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Have UI to select a .qch file location in CMake Tool setup
* Auto-detect CMake's .qch file in its default location (relative
to the cmake executable)
* Register the .qch files with the HelpManager
Task-number: QTCREATORBUG-21338
Change-Id: I4057eec42c39535012d9f0daf788fc62ef20d544
Reviewed-by: hjk <hjk@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
CMakeToolManager instance must be created first to avoid connects
to a nullptr.
Change-Id: If8738a26d58c80ffc9a63193240895f1bc9a87ae
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Just reorder some lines, make it clearer where the headers are actually
used.
Change-Id: Iec5cf98e7cfad7ee1bdd98df85df38b03c54dff4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Remove the code that reads CMake tool location from the Qt Creator settings
and then removes them from there.
This code was added in QtC 4.1 to ease transition to the (back then) new
cmaketools.xml settings file.
Change-Id: Ice96628159f4171716882cfdefc8991ec2341556
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
No user in-tree and the Ubuntu SDK for which this code was added
is no more.
Change-Id: I5b0c5f6faccf1adb451c4043378a204bfc350e50
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Emit signal in addCMakeTool method directly instead of later.
Change-Id: I4640ffdf76d22f80a8c1ee14f8d79cc7885ddd70
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
These paths are controlled by ICore.
Add ICore::installerResourcePath() to replace constructions with
settings(SystemScope)
Replace constructions with settings()->fileName() by usage of
ICore::userResourcePath().
Change-Id: I5a9fa9d09f2563c39dc5d11a4586da825c62f9ac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This is no longer needed now that the generator is a property of the
Kit.
Change-Id: Ife35fd9207c805a4ead1e067603df1bfc77e6855
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Do not run cmake 5 times during startup. Delay that as far as possible.
Also add a supportedGenerators() method while visiting the code anyway.
Fix up and simplify the other cmake help output parsers.
Change-Id: I6622d552ffe559bf099b4b278618676a045e350e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Shorten header guards
* Use override and auto where possible
* Remove useless destructors, etc.
* Remove private slots sections, unify private: sections
* Use member initialization where it makes sense
Change-Id: I00eaf6d706adc16859176d1b68c631d3336bb39f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Consistently use Utils::FileNameList in favor of QList<Utils::FileName>
Change-Id: Iafbb466c882bfd91c25c9e78f107d401bfdb6d55
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
By using some of the infrastructure in Utils::Environment. Due to
wanting to find all cmake executables in PATH and not just the
first one, we need some custom code.
Change-Id: If3161d712b9f6e659450a3d0647f83344e68ba5d
Task-number: QTCREATORBUG-14740
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Benjamin Zeller <benjamin.zeller@canonical.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Provide a way for plugins to map include paths into a build chroot.
Plugins can register a path mapper if required, otherwise the paths
are not touched.
Change-Id: I621982831fa354d6d0f558a6c1dce4e014421f12
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Just do not return early, which then missed a settings->endGroup() call.
Fixes a regression introduced by
99e9643dea
Change-Id: I102eb76e3381012cddb73c1132b6443dd2cd592f
Task-number: QTCREATORBUG-14139
Task-number: QTCREATORBUG-14140
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This patch adds support for plugins to register a callback/lambda
to autodetect CMakeTools that would not be found by the default auto-
detection function. Without this feature the CMakeToolManager would
drop autodetected CMakeTools otherwise on every start.
Change-Id: I23b146e5b9acc60018ac87ea4b6cc7573fa0dd30
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This patch adds support for binding a specific CMakeTool to a Kit.
When creating a new Kit or loading a existing one without a valid
CMakeTool, the default CMakeTool will be set.
Change-Id: I28d0843a01c583c4b31fc680a0ec556b40cd9c0d
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This patch add the CMakeToolManager, a central repository for cmake instances.
One instance is always the currently used "default". By that its possible to
switch between different cmake installations. The next step will be adding
it to the Kits.
Change-Id: I310fdd805e0ed239077a5632303e891dbd1d9ea1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>