Now we have "Initial Configuration" and "Current Configuration"
as tab bar buttons.
This way the UI can be shared between the two configuration states.
Task-number: QTCREATORBUG-26869
Change-Id: I8206032a2a5ac076629865057816edb99706f2ff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Previously the only way to stop the CMake run was to click on "x"
button of the "Configure" progress bar.
Now you can click in Settings on "Stop CMake".
Change-Id: I167b86ba62679f197c194148b122ff0c87e87162
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The "Clear selection" button doesn't add much value in the list
of buttons.
If you have a selection it doesn't really matter, and you can
simply click on an item an the new item will be the new
selection.
Change-Id: Ie64bc379773219392c12da4c256afd462d4081a9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Having groups made from the first underscore is not necessarily
helpful.
In some cases it creates empty groups, which can confuse users.
We have filter and search functionality in the list, which can
help with finding the right items.
Fixes: QTCREATORBUG-26218
Change-Id: I751a59b49184ea57f55d3832ef4edc8a3c33e0da
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
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>
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>
Fix detection if a kit is an iOS kit.
iOS device kits do not have a device set, if no device is currently
connected. So we would end up with the normal desktop macOS CMake
configuration instead of the special iOS one.
Just check for the device type like before, and guard the else branch
with its own check for macOS target device.
Amends a71d725e46
Change-Id: I829e549e5743ec2b358713f2df6d9cd5e32f6b70
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
From Qt 6.1, Qt 6.1 builds the apk directly with ALL step if it's
not a Qt build.
Change-Id: Ib8573399a1ed509852a973e84405353191e80f86
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
There's only one kind of use, in the context of BuildConfiguration.
Change-Id: I09628ff443ef08e28738125a614c17d5d979189b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Less conversions cycles at the price of a few more temporary bytes.
Change-Id: Ibda82e02d7b83944f5db38ac7cf75c4bae4f55ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When Qt Creator is built as an Intel binary, and runs on
an Apple Silicon (ARM) Mac, it will be run via the Rosetta
translation layer. This means any process spawned by QtC,
including qmake, CMake, and lldb, will launch as x86_64
binaries as well.
For qmake and CMake, this affects their default choice of
build architecture, resulting in x86_64 builds of user
applications. We want to produce native arm64 apps, even
if Qt Creator itself isn't one, so we explicitly detect
the situation, and if Qt has an arm64 slice, we default
to arm64 builds.
The logic of adding CONFIG+=x86_64 to the qmake step has
been disabled, as the assumption that a single qmake run
and build will produce only a single architecture does no
longer hold. The corresponding logic in Qt was removed
in 2015 (qtbase f58e95f098c8d78a5f2db7729606126fe093cbdf).
In the case of lldb, running it as an x86_64 binary fails
to attach to the running application. We work around this
by using the 'arch' tool to explicitly launch it as an
arm64 binary. This works for debugging both arm64 and
x86_64 applications.
Change-Id: I65cc0f600223990f25c76cef18d927895e551260
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Group together Initial CMake Parameters and Re-Configure button.
Change-Id: Ieb7d5d65b9465f3e77f1e350bc003777817f1af2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The following variables:
"CMAKE_C_COMPILER",
"CMAKE_CXX_COMPILER",
"QT_QMAKE_EXECUTABLE",
"QT_HOST_PATH",
"CMAKE_PREFIX_PATH",
"CMAKE_FIND_ROOT_PATH",
"CMAKE_PROJECT_INCLUDE_BEFORE",
"CMAKE_TOOLCHAIN_FILE"
will be checked to see if the existing values have the same values
from the initial cmake parameters list.
Only the CMakeCache.txt values that do not exist on the file system
will be updated.
If not, the updated value will be presented in the dialog for upgrade,
or marked as bold in the settings dialog.
CMAKE_PROJECT_INCLUDE_BEFORE is dependent on Qt Creator version / path
and needs to be updated.
Fixes: QTCREATORBUG-24443
Change-Id: I1eeb44df3a7914051084ef405af5f5621cc5a4e2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With the default build directory template the CMake build directories
will be displayed as project-source/../build-project-name-kit-build-type
which can be irritating.
With this commit the build directory will contain the resolved path.
Change-Id: I968260caba5b9a47e1bda4eeaea386a04fe817b1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When changing the build directory to a new or empty directory, we ask if
the build directory should be changed and the project be configured
there. Mention the new directory in the dialog.
Change-Id: Ie4d7e9b132e6e90004e4d498b2182562375e7441
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Otherwise every time a character is typed, a dialog pops up, and that
dialog is closed without triggering a cmake run, the value is reset.
Add that behavior optionally to StringAspect.
Change-Id: I6831d1622f08acae6df43d4ceb2bf7367c96a747
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This is directly passed to cmake and used in the context of the build device.
Change-Id: If22764b0d962f96b51897b754b413c2310818c33
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
There's a 1:1 relationship between CMakeBuildConfigurations and
CMakeBuildSystem objects. No need to react in one
CMakeBuildConfiguration to the signals of someone elses buddy.
Change-Id: I53f7d02d8852a85b9530bd55d8e059916a22579c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This reverts 69b0a2cafc
The build directory is preset and by having the ability to edit, you can
easily do a new build by appending a number.
When you have a new build directory a dialog will warn you that you'll
start from scratch. This is enough of a hinderniss to the user to start
typing and get lots of build directories. No need to have it read only.
Fixes: QTCREATORBUG-24451
Change-Id: Id1bc77d0fbcb071608f5ac83ddd6b8af943fdac5
Reviewed-by: hjk <hjk@qt.io>
By setting CMAKE_TOOLCHAIN_FILE to the qt6 toolchain file all the
needed bits to compile agains Qt6 get resolved automagically.
Change-Id: I43084842f98a4385acedd4865aaf7e26f25a351e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
- use newer approach to settings page layout building
- no SHOUTING enums
- namespaces
- proper dialog parent for message
Change-Id: I7adfb7487d502b8fd706c4a0c5645f4d2153e39c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
The multi configuration generators (Visual Studio, Xcode) had an
empty "Build type" which caused failures to parse the CMake file-api
information.
Change-Id: I70ee4978cee4d43e980edf4cd512d1ca95275638
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Avoids some boilerplate on the user code side.
This seems to be the only existing case. If there'd ever be a case where
this is not appropriate, an extra Row { ... } would solve it.
Change-Id: I1ae1102e895640c0acc03b4949e3baabecfcdc49
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Like for Android and iOS, CMake also needs a CMAKE_TOOLCHAIN_FILE when
configuring a WebAssembly project. We pass it "qt.toolchain.cmake",
which is part of Qt6, just like we do for iOS.
Fixes: QTCREATORBUG-25519
Change-Id: Ia02cafc163da6cd94c483e860922b08a35284c71
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
For a project that failed to generate a valid CMake file-api reply
the manual added variables could be lost when the new state doesn't
result in a valid CMake file-api reply.
The user will have to edit the initial CMake parameters to generate
a valid CMake file-api reply.
Task-number: QTCREATORBUG-24637
Change-Id: I091a301ceee3cd41ec59b6282bb9515a49c1a366
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If CMake project parsing is failing for some reason, it's better
to keep the error message with the actual error than just replacing
it with "The project was not parsed successfully."
This error message was also issued when the project was loading,
which is a bit misleading.
In order to test this:
1. Set the build type to "" (nothing)
2. Clear CMake Configuration from menu
3. Run CMake
This will re-configure the project with initial cmake parameters,
but "-DCMAKE_BUILD_TYPE:STRING=" will set the build type to empty,
and CMakePM would try to parse 'Release' and issue:
"No 'Release' CMake configuration found".
The commit resets the error message when the project is loaded.
Change-Id: I1a586ec19f324d75a25e8f282cab02a6934fce2b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Some wrong tr calls / missing tr functions.
Some places where we need to bring lupdate to the right track with
regard to namespace resolution.
Change-Id: Idf552054a34e24d9671db68c816bf37f4d403dbc
Reviewed-by: hjk <hjk@qt.io>
This makes it easier to configure a CMake project with initial cmake parameters
when parameters are added or if the configuration fails.
Task-number: QTCREATORBUG-24637
Change-Id: I880ac6ad82f7cc5e1df2e34e9bcc28e67c3d716e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For single configuration projects if you change the build type
aspect you will change the CMAKE_BUILD_TYPE variable.
When switching the build directory the existing CMAKE_BUILD_TYPE
will be set as build type aspect.
Fixes: QTCREATORBUG-25451
Change-Id: I13519e95c316c556cc1348fba6121637d2fd4275
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Drop intermediate widget layers, also fix the QML debugging and profiling
aspect misalignment.
Change-Id: I5ee5041ab7db2c05efdd66598c39b589e3d4f56a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In most cases, the layout constructed in the builder was set
on a widget which in turn was put into a vbox in the actual
widget. This is not necessary, but needs some re-ordering.
Also make sure that using not-yet-parented widgets during
layout construction does not cause visible artifacts.
Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The Batch Edit dialog is offering the ability to use expanded
variables, but these variables were not expanded upon acceptance.
For the CMake command line they were expanded, but there was a
conflict between what the settings dialog as value had and what
CMake returned via file-api.
Change-Id: Ia4a64e99676c43f7b182e059f9051393aa184c19
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
CMake is setting the UNINITIALIZED type if you forget to set the
type of a variable when you do it from command line.
Qt Creator was setting INTERNAL, which had the effect of not
being displayed in the UI at all, giving the impression that the
value has been dropped.
Change-Id: I9a6b487bf5062d288365938fd7ef99b49de42884
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since CMake's file-api cache is the only source of truth for
CMake configuration, there is no need to keep track of such
a state.
Qt Creator will issue -D<var>=<value> -U<var> command line
parameters for CMake, which will update the file api json files.
Change-Id: I08e7041a95422549502eb7961f96570225e942fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In the context menu of the CMake variables there is now a "Copy"
entry that will copy to clipboard the -D<var>:<typ>=<val> or -U<var>
values.
Task-number: QTCREATORBUG-22482
Fixes: QTCREATORBUG-24781
Change-Id: Iaa70e64fd0593398732ccb8d9036571b308b5f12
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For the initial CMake parameters one can have an edit dialog. Now it's
possible to batch edit variables also after the project has been
configured.
Change-Id: I406b8e7db16147032a75c82fddf9b7acec85c4bf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>