Generally, aspects should use fromMap/toMap, but some older pages
use {from,to}Settings with always the same ICore::settings().
To make that less intrusive on the user code side, make that globally
implicit.
Task-number: QTCREATORBUG-29167
Change-Id: I29a8e23a31eb8061bb143e93931a07c6741eb7f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
`BoolAspect::checkableDecider` was used only in CMakeProjectManager for
askBeforePresetsReload and askBeforeReConfigureInitialParams.
Now the checkbox with "Ask before presets reload" would also match with
the display of the message box.
Change-Id: I45fc7a977dbeb13df051375bd3dac36e7be7bdc4
Reviewed-by: hjk <hjk@qt.io>
This avoids some repetition and could be a step towards
having type storage in (or rather accessible from) the base,
so we can have aspects for more complex data (treemodels...)
that are not easily converted to QVariant.
Change-Id: I9797b3d5646195705212db1830d2b415291ac651
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This makes sure that one unique argument "-DANDROID_PLATFORM:STRING=..."
is passed to CMake. An entry in a kit's CMake configuration has the
precedence over the ANDROID_PLATFORM defined by Qt's build system.
Fixes: QTCREATORBUG-29112
Change-Id: I1c4d80be9ddfc7a00a5a7eff476497f08d87b741
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This hunk was added as part of 01b0d4f8f5 in 2020.
Change-Id: I3b520005dc2462397ddfb1a2f6671603131ddced
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.
Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:
...removing aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect. Arguably, the latter is not needed
and could be done on the user side.
Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.
Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.
Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Makes sure that the CMake parameters columns are properly stretched when
Qt Creator window is being resized or maximized / restored from
maximized state.
Fixes: QTCREATORBUG-27257
Change-Id: Ifb4d439fb758dcc5b2593be917ba35e9c79f2840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
QTC_KIT_DEFAULT_CONFIG_HASH was introduced in order to match the
previous CMake presets kits.
This would hash the Qt and the C/C++ compiler paths.
Unfortunately on Linux CMake would pick "cc" and "c++" by default,
whilst Qt Creator uses "gcc" and "g++". The compilers would match from
the Qt Creator point of view, but the hash values would be different.
On mac there is a similar issue with compiler launchers.
This patchset fixes this by removing the hash and fixes also the issue
of allowing broken CMake presets kits (without any compilers), which
were the reason for introducing the hash key in the first place.
Fixes: QTCREATORBUG-29075
Change-Id: Id8dc081febba7bc7023c98055afc6ebfcdc55542
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
LayoutBuilder is meant to be an implementation detail nowadays.
Change-Id: I777ab934d3d405873e819eeddd27428d8c652f9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Lifetime extension via const-ref only applies to functions that return
by value. For those that already return by reference (such as
QList::constLast()), no extension happens and we end up with a dangling
reference.
cmakebuildconfiguration.cpp:1473:25: warning: possibly dangling reference to a temporary [-Wdangling-reference]
cmakebuildconfiguration.cpp:1473:61: note: the temporary was destroyed at the end of the full expression ‘ProjectExplorer::BuildStepList::steps() const().QList<ProjectExplorer::BuildStep*>::constLast()’
Change-Id: I3b169860d8bd41e9be6bfffd1757167b7348be9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
The task-number below has a sample where CMAKE_C|XX_COMPILER was set to
"cl.exe" and the CMAKE_PREFIX_PATH was set to "C:/Qt//6.5.0/
msvc2019_64".
These values would cause "red" values in the CMake configuration, which
is not that nice.
This patchset will make sure that everything is nicely configured.
Task-number: QTCREATORBUG-28982
Change-Id: I21289d1936ef075ce02364fc675709c52c76c3ed
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
The BuildDirectory is now assumed to be on the build device.
The default build directory template path is resolved against the
project path mapped to the build directory.
Change-Id: Ie1d147d135e9e551f2ac46cbec583374d524d2d7
Reviewed-by: David Schulz <david.schulz@qt.io>
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).
Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.
Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
QTC_KIT_DEFAULT_CONFIG_HASH is used to match CMake presets kits and
should not pass to the CMake configuration.
Change-Id: I27caedf03f94c1e864f16d1f735e2edbabbfe871
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The crash could be reproduced by opening a project, clicking the "Kit
Configuration" button in the build configuration, closing that dialog,
opening it again, opening the settings from the "Manage" button for the
CMake tools, and closing the settings dialog.
The "KitAspectWidget"s are not really widgets, and by default do not get
a parent, or are otherwise lifetime managed. When "they" are added to a
layout, actually only their widget members are added to the GUI. When
opening and closing the "Kit Configuration" dialog, the widgets were
deleted, but the KitAspectWidget instances were leaked and lived on, the
CMakeKitAspectWidget referencing a now deleted QComboBox, and still
being connected to the CMakeToolManager's signals, which subsequented
crashed when these were sent.
Fixes: QTCREATORBUG-28740
Change-Id: I36db3b6596ef21cc01dc877bca92b9961c0606b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
... out of SessionManager.
The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.
Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.
Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This changes several tr() calls which were either missed during Tr::tr-
ization or were added later.
Found with regular expression: (?<!(Tr::)|([\w]))tr\(
Change-Id: I1c0c03589e941614a7a8449ecfebc7d2cad396c3
Reviewed-by: hjk <hjk@qt.io>
By copying the ${IDE:ResourcePath}/package-manager to
${buildDir}/.qtc/ the problem with hardcoding paths
to old an Qt Creator version can no longer occur.
This also fixes the issue with remote projects by reffering
to the code residing on the host.
With the above issues fixed, enable "Package manager auto setup"
by default.
Change-Id: Ia49654a3b9059f83886e64d065019b2d55e9299c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
EnvironmentAspect is used in the Run configuration page.
For a configuration not using presets the "Build Environment" will be
used by default. This is the pre Qt Creator 9 behavior.
With presets "System Environment" is used, which allows the environment
sepparation of configure and build steps.
Fixes: QTCREATORBUG-28513
Change-Id: Ie65c0a5ac67355642460fca9fc618a1d29f4b1bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In the configure environment for MSVC toolchains.
The MSVC toolchain actually overwrites the PATH environment (triggered
via kit()->addToBuildEnvironment(result)), which it shouldn't.
But this is a minimal fix for Qt Creator 9.0 that also is in line with
what BuildConfiguration::baseEnvironment() does.
Fixes: QTCREATORBUG-28685
Change-Id: I0cb8e3c84419403672175bd581c16d90902e23ba
Reviewed-by: David Schulz <david.schulz@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
ANDROID_NATIVE_API_LEVEL is not handled by the android toolchain files
starting the NDK version r23b. We should set ANDROID_PLATFORM instead,
to specify the NDK platform version, that exists in all NDK versions
supported by Qt. Also the ANDROID_PLATFORM variable expects the
'android-xx' format as a value, so avoid cutting the 'android-' prefix
when adding the value to the CMake configure string.
Fixes: QTCREATORBUG-28624
Change-Id: Idd4ba472e46982162e5ad74e9fc6868e50e3b434
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This allows a project to be properly configured with Qt Creator 9 when
the build environment had user defined changes.
Qt Creator version prior to 9 had one setting for both configure and
build steps.
Fixes: QTCREATORBUG-28372
Change-Id: I0da8065085bd6628ba75923c17b46648eb031801
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>