This looks more in sync with other dialogs that we display.
Change-Id: I445da900982b7bdcc12d810e69170b0a7695b30c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When the user changes or adds new CMake Kit parameters, the changes
are reflected in the Initial Configuration.
Change-Id: Icca1c76749c772e946ff250f94b7965cf7cf9ee8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The crash scenario:
1. Switch CMake tool in Kit CMake Configuration in Settings
2. Click on the "options" help link
Change-Id: Ifdb2809789748926a5ee0e127db0c87a22efa9dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This way one could easily jump to the documentation of a CMake
variable e.g. CMAKE_BUILD_TYPE.
Change-Id: I1b348f0a1b6c18f0f7cee29ff6409b43c6263f44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This way a user can quickly find out which options can be used.
Change-Id: I6347759689a4a1431a82ff9414da0c79e357eb45
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This "Kit Configuration" button opens a dialog with the kit's
CMake settings.
This way a user can change all CMake related settings in the
project's Settings page.
Change-Id: I76b6e69ea7a9b96823f6583aef007cf413410407
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
As it turns out changing to selectedRows resulted in having
the keys copied twice to clipboard.
The change would require some code adaptation.
Amends 0020ef7e30
Change-Id: Ie1decd154f7d22825f4d4eecd0bf544ecac7aa26
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The CMake parameters QTreeView has now:
- alternating row colors
- row selection
Both key and value get the same font and foreground stylings.
- bold when the key is new or the value has been changed by user
- italic when the key has been inherited from kit or initial config
- red when there are differences between the inherited value and
the current value
Change-Id: If09bb2c3e25f59938c5f56e6dd0d6817dfe442cc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Now the "Initial Configuration" and "Current Configuration" displays
in red the mismatches between kit / initial value and respectively
initial and current configuration values.
By having a "Apply Kit / Initial Configuration Value" context menu
entry the user can resolve the mismatches if needed.
Change-Id: I2e272821c3ba396cd8a6b7c81e1437cb3fd4bbad
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Previously the changes to "Initial Configuration" would be done only
after pressing "Re-configure with Initial Parameters".
Now the settings are saved when the widget is closed:
- a different kit is selected
- a different build type is selected
- project is closed
- switch between build and run settings
This way the changes are not lost.
Change-Id: Ia2c1c10c59bfa101332066205f98684843266f94
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The flush there was as a "hack" for the case:
1. failed initial configuration (CMAKE_GENERATOR as Ninja2)
2. successful configuration
The current configuration would get current items with unexpanded
values e.g.: QT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
But flush also removed the expanded values of the selected
initial parameters from CMakeBuildSystem::updateInitialCMakeExpandableVars
This is useful when CMAKE_CXX_COMPILER changes or
CMAKE_PROJECT_INCLUDE_BEFORE gets a new path to the new Qt Creator.
Change-Id: I480ce141d043d8ba6001fa47a54b066762b6a128
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
updateFromKit() is now called on parsingFinished and the configuration
values that differ from the ones in the Kit's CMake configuration
will be displayed in red.
The "Initial Configuration" page will display the mismatches between
kit's CMake configuration and initial parameters.
The "Current Configuration" page will display the mismatches between
the initial parameters and the current CMake parameters.
The Tooltip is displayed with a bit of more space between values
for more readability.
Change-Id: I6ebfa71951cf979ab08f097befed2d43b74e4d6e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This has at least theoretically the potential to get quoting in
"cross" configurations right. Since the consuming side is not ported,
there should be no noticeable differences yet.
Change-Id: I933ded4b1c9645055d3114d53f3d1b95b5c5539c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This way one could pass --warn-uninitialized in the kit's configuration,
which will be transferred to the "Initial Configuration" and so on.
Fixes: QTCREATORBUG-26826
Task-number: QTCREATORBUG-26869
Change-Id: I6d9833a065ea790fc298a75b1120dfa360f885e8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>