Commit Graph

3443 Commits

Author SHA1 Message Date
Jarek Kobus
d0e24654f6 CMakeProjectManager: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Remove some unneeded lambda return type specifiers.

Change-Id: I9695367d66a151f2611554b9fe5897c1bac7ef5c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-08 15:28:50 +00:00
Eike Ziller
b4fed03c27 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/cppeditor/cppeditorplugin.cpp
	src/plugins/docker/dockerdevice.cpp

Change-Id: I41747ff9490e4ab20340d4d4acb4655100aaa3d2
2022-12-07 10:47:47 +01:00
Jarek Kobus
7cf6d9c97b CMakeBuildStep: Get rid of m_waiting field
Change-Id: Iea737960f57e93fa1e688ed43eedf1bf44204709
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-12-06 14:24:46 +00:00
Jarek Kobus
55284ba124 CMakeBuildStep: Don't use stdError
Emit addOutput() signal directly. This will add a newline after
the message. Use OutputFormat::ErrorMessage instead of
OutputFormat::Stderr.

Change-Id: Id5e95dd00dca5e57b67c583a1b11071bf4101880
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-12-02 16:38:25 +00:00
Cristian Adam
9deef74d9e CMakePM: Allow presets inherits for deeper hierarchies
Fixes: QTCREATORBUG-28498
Change-Id: Idea5cdec6ad6acfba289dd77632770b7dfbf64f2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-02 16:23:46 +00:00
Jarek Kobus
dfd079f050 AbstractProcessStep: Merge virtual functions
Merge processSucceeded with processFinished into one virtual
function. Leave default implementation empty, so that
reimplementations don't need to call base impl. Move
processFinished into private section. Pass just one bool success
parameter into processFinished.

Change-Id: Ide3e262de0c0c5583c9fec2426fa460b6b74a49d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-02 15:37:16 +00:00
Cristian Adam
e0a563b236 CMakePM: Migrate build environment settings also to configure step
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>
2022-12-01 23:52:10 +00:00
hjk
7e9d50a2c9 Remove a few now-unnecessary cleanPath in conjunction with resolvePath
Change-Id: I05ee0116183a30e907fbd8e0b4faae9e6e58723d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-30 13:32:05 +00:00
Alexander Pershin
5e50b9d604 CMake: Checkbox for showing advanced options by default
Change-Id: I32f6ca068de60adf90eb0d9bc5eb7cfadc613e2d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-11-30 11:28:04 +00:00
hjk
a146403596 Utils: Make FilePath::refersToExe(...) return the found item
... and use in on the CMake side.

Change-Id: Ib215ebc4f87beb67b6a302d0c42e7b955a2fa5b7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-11-28 11:30:38 +00:00
hjk
7fd3a5e66e CMake: Use FilePath::suffix() instead of manual construction
Change-Id: Id2bc542047ce5f4ff1937be90b976d330b69c51a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-25 06:53:20 +00:00
hjk
9635b1545b CMakeManager: Avoid one use of Environment::appendExeExtensions()
Use FilePath::refersToExecutableFile() instead.

This makes it better re-usable for remote setup.

Change-Id: Ic69739b332f036ed791adbbc8092a139b4c83c2d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-22 06:29:07 +00:00
Eike Ziller
ea79027e20 Merge remote-tracking branch 'origin/9.0'
Change-Id: Idd9c2b1bf787040b7b415b7cda29035227ca1011
2022-11-21 08:57:14 +01:00
Cristian Adam
61fcdcb4a1 CMakePM: Do not crash with invalid build presets
If a build preset doensn't reference a configurePreset, the preset is
invalid but Qt Creator crashes.

Task-number: QTCREATORBUG-24555
Change-Id: Ibf5dd7f1bb165d8b7f392e6a1aaa043548bb0f7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-11-19 12:55:40 +00:00
Jarek Kobus
02f384115e Remove unused includes of QBoxLayout
Change-Id: I74204eaf70dbcb31a8bd13609bef35459c8c6b5f
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>
2022-11-18 15:29:29 +00:00
The Qt Project
cd68ffeac9 Merge "Merge remote-tracking branch 'origin/9.0'" 2022-11-17 15:57:52 +00:00
Eike Ziller
81629e9228 Merge remote-tracking branch 'origin/9.0'
Change-Id: Id7665d5a269ef58cbbb2dbfc1e5b0d1820c4e13e
2022-11-17 16:11:52 +01:00
Jarek Kobus
9e8d208cad CMakeProcess: Do some cleanup
1. Get rid of unused started() signal.
2. Remove lastExitCode() getter.
3. Add int exitCode arg to finished() signal.
4. Make some string variables const.

Change-Id: I3e9774f64a8f34fd2be4436d766285cad1c539a3
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 15:07:10 +00:00
Jarek Kobus
165d364a6d CMakeProcess: Simplify implementation by using ProcessProgress
Change-Id: I9e9665f7e57ebb7d3028396e792161aa2c3a648e
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 15:06:44 +00:00
David Schulz
0e4b0a26d3 Editor: move ownership of assist interface to processor
This way the base class can manage the lifetime of the interface object
and it doesn't need to be done in each implementation of perform.

Change-Id: Ie1ce742e31b688a337533ee6c57d376146e25ace
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-17 13:23:55 +00:00
Alessandro Portale
43ba40530c CMakeProjectManager: Set ANDROID_USE_LEGACY_TOOLCHAIN_FILE to OFF
Task-number: QTCREATORBUG-28442
Change-Id: I190ba68df5a71ae352c49c96a64e9a3777880368
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-17 12:56:52 +00:00
David Schulz
09ee528c40 Editor: unify assist processor handling
Define the run type of the processor by its implementation instead of a
enum value of the provider. The execution of a processor inside the
assist now follows a unified procedure.

Change-Id: Ibe9fab324c6072e77702c2663946d7a9f562a085
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-14 13:02:51 +00:00
Eike Ziller
10dca6b37f Merge remote-tracking branch 'origin/9.0'
Change-Id: Ie069f3b2a1200b3e665341b1d56ce836024b0d29
2022-11-10 13:22:43 +01:00
Alessandro Portale
657cc181fe CMakeProjectManager: Deduplicate string "-DQT_QML_DEBUG"
Change-Id: Ice9bc9b1ee17d477a484b9f4d630737f6633c06c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-08 10:52:03 +00:00
Marcus Tillmanns
129448d61d QmlJS: Fix Follow under cursor
When trying to jump to a symbol in a qml file the Qml Model may find
the location in a generated .qml file in the build folder.
QtCreator searches in all generated .qrc files to try and find
the source file so it can jump to it instead.

Previously not all auto-generated ".rcc" folders would be found
as only the folders of targets (executables) were searched.
Plugins or Static Libraries were not searched.

With this fix, all projects nodes are searched for the ".rcc" folder
and therefore also finds them for Dynamic / Static libraries and
plugins.

Fixes: QTCREATORBUG-27173
Change-Id: Ic51ac8fbc82c15785cbefd76787942a512ecf3db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-11-08 09:54:10 +00:00
Eike Ziller
68388a38dd Merge remote-tracking branch 'origin/9.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp

Change-Id: I154a9ababa9e166cb06e98652d481fe6234f6399
2022-11-03 13:44:37 +01:00
Marcus Tillmanns
6936f23328 CMake: Fix settings display not updated
Fixes: QTCREATORBUG-28267
Change-Id: Icf2fb7e5d7a8cd44d7a61ade36be41106aba2138
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-27 13:11:29 +00:00
Cristian Adam
4fdbfe1641 CMakePM: Proper handling of relative toolchain files in CMakePresets
Previously it was only tested with absolute paths.

Change-Id: I3871da60f3f1b17ae4d2d4cfb69d1be60da1435b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:56:24 +00:00
Cristian Adam
fb94873765 CMakePM: Use Utils::Environment for Presets environment
Utils::Environment takes care of the case insesitivity of the key of
environment variables on Windows.

Change-Id: I624340d30c6b170b5d0a86791f26a4841a0b2fb7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:56:15 +00:00
Cristian Adam
83e77d71a8 CMakePM: Expand cache variables for the preset probe
This way the CMAKE_PREFIX_PATH set to $env{HOME}/Qt (Linux) or
$env{SystemDrive}/Qt (Windows) would work as expected.

Change-Id: I03a9102d6d1da2a8740cab738577c47c44166c6c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 20:56:06 +00:00
Cristian Adam
ec4d96a14b CMakePM: Accept broken kits for CMakePresets
For CMakePresets if a preset is broken we should not create a preset kit
for every build type.

Instead reuse the broken kit created by the first build type.

Task-number: QTCREATORBUG-28295
Change-Id: I038fbb23817834f59ac73ccd2f9953f1a412b656
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 20:55:08 +00:00
Cristian Adam
7dfc7c627b CMakePM: Allow presets without generator specified
This allows presets that do not have a generator specified to proper
work.

On Windows CMake will detect "Visual Studio" as generator. This change
sets the generator and the architecture values accordingly.

Change-Id: I943e082430445c4b16cf9eaf4ae5ae2500b2bd2b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 20:54:59 +00:00
Cristian Adam
869597884d CMakePM: Merge cacheVariables, environment for inherited presets
cacheVariables, environment (and others) collection fields need to be
merged when having inherited presets.

Fixes: QTCREATORBUG-28360
Change-Id: I3d2b84355fad9ffa2dc4629ece7d42f7b482a859
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-25 20:54:49 +00:00
Tim Jenssen
aa33927651 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.h

Change-Id: Ib029a830ee99190bc4ea2ad75d9300bfa86b42d9
2022-10-25 19:02:15 +02:00
Christian Kandeler
13f40f5471 Utils: Add sorted() function
For simpler calling code.

Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 14:29:45 +00:00
Cristian Adam
bf83f63a13 CMakePM: Add installDir CMakePresets support
Is part of CMakePrests v3, and slipped at the implementation time.

Task-number: QTCREATORBUG-24555
Change-Id: Id3ce90c0a979d44287fc03ae1dd49a64e964cdf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-21 13:09:35 +00:00
Cristian Adam
430ff621aa CMakePM: Use parent environment for $env{macro} expansion
Now the code takes into consideration the parent environment for
$env{macro} alongside the "environment" presets values.

Task-number: QTCREATORBUG-24555
Change-Id: I644618b0a6f866fd65a4109ee63b1f5bfcd4164d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-21 13:09:20 +00:00
Marcus Tillmanns
36d7dcb6b2 CMake: Improve styling of cmake buildconfiguration
Shortens the "Run CMake" button and the cmake variables
tab header to make them easier to read on wide monitors

Change-Id: I2579a8fa1c2899ae94f9c4a72c4188dc61ecd5f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-20 07:56:02 +00:00
Leena Miettinen
7c9d1ef516 UI text: Fix UI text to follow the guidelines
- Fix typos
- Replace "options" with "preferences"
- Fix capitalization
- Remove "please"
- Do not use contractions

Task-number: QTCREATORBUG-28334
Change-Id: Ie029eae435634aa2fb354e173fa107af72f7b025
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-20 07:38:32 +00:00
Cristian Adam
1c51dc1adf CMakePM: Do not use systemEnvironment() for CMakePresets
This doesn't mean that CMakePresets will work with a remote project, but
at least it avoids Environment::systemEnvironment() usage.

Change-Id: I17081c747d32e50224ac74507d3aa336ff5c8948
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-10-19 10:08:06 +00:00
Cristian Adam
23092b57b8 CMakePM: Use filePath().deviceEnvironment() to find ninja
Amends 45ec26783f

Change-Id: I05b52295841d60ff693d6e7b12c9e4ceaf0f09eb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-19 09:32:23 +00:00
Marcus Tillmanns
f7a2132598 CMake: Don't filter out new keys
Previously, if you have a filter set in the CMake Settings
variable list, adding a new one would immediately hide it,
as the text filter hides the "<UNSET>" key. This made it look
like the adding failed.

With this change, new Variables are always shown so
they stay editable to user.

Change-Id: I9c2eb7f9983b23e1cd3aa50f589142551caaf56f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-18 14:29:54 +00:00
hjk
4266f612e6 Utils: Rename FilePath::relativePath() to relativePathFrom()
Hopefully less confusion about the direction.

Change-Id: I61727d6c4d19e0dfe46f24ff24f5d90f9835d05c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 13:41:24 +00:00
hjk
d47a72e26c CMake: Use the OS of the source directory as ${hostSystemName}
In case of building on a remote system  CMake considers this remote system
as host.

Change-Id: Ifb9d0b2a2c4c49ba4ee009795f5b432c7b951e0d
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-18 13:26:01 +00:00
hjk
e9ed3d6d05 RemoteLinux: Allow adding Qt to LD_LIBRARY_PATH
When running on the remote build device. And make it work with CMake.

Change-Id: If25bef8ab836c1d59a586116b3c3447a29c4e7e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-18 11:24:15 +00:00
hjk
ec430787e5 CMake: More FilePath in Deployment data
Change-Id: I898a621a34558a28d4688a33aeb9bb9148df6901
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-14 13:01:15 +00:00
Cristian Adam
45ec26783f CMakePM: Search after ninja also in system environment
CMakePM was setting the default generator to Ninja if the ninja
executable was set in the build environment.

This had the side effect of having to instantiate the build environment
for Visual C++, which meant running vcvars.bat files. This operation can
be costly if clink is also installed in the system.

This way the users that have ninja installed via choco, or manually set
it path, will not be affected by this delay.

Note that this only fixes the issue for the first start of Qt Creator
with new settings.

Some number from my machine:
- with clink 21s
- without clink 10s
- with this patchset 4s

Task-number: QTCREATORBUG-27906
Change-Id: I74d19b08211d93b3962a8877b49a58089310fbd6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-14 08:11:51 +00:00
Christian Kandeler
a34125ae11 CMake/qmake: Fix target triple for iOS targets
Neither cmake nor qmake know the full iOS compiler command line, so we
have to construct the target triple for the code model ourselves.

Fixes: QTCREATORBUG-28278
Change-Id: I6cac06f340e9388de5c86509a8df4ac00eef87cd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-13 13:28:52 +00:00
Alessandro Portale
e0832ce7fc CMakeProjectManager: Default spacing in CMakeBuildConfiguration UI
Change-Id: Ida08086c4632d28f5c79e6c0351bf36125afee36
Reviewed-by: hjk <hjk@qt.io>
2022-10-13 09:09:51 +00:00
hjk
35d0e9dea8 CMake: Make configure environment optically part of configure step
Change-Id: I1b246acb2a057e624f7808d385a2d33c716d535d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-13 09:05:10 +00:00