Commit Graph

112 Commits

Author SHA1 Message Date
Marcus Tillmanns
77cc79b7b0 CMake: Cache CMakeTool capabilities
Change-Id: Ie81347a7864abeeb64aa2af6dee3f9def241fed8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-09-12 09:29:50 +00:00
hjk
8d0aa34bfc Plugins: A bit more Keys and Store
Change-Id: Iee55eeaa881dd9f2047fdbe95ad8d827f4ba34e0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 08:00:02 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
hjk
66c08a824d Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settings
Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.

Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 09:00:30 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
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>
2023-01-06 11:15:13 +00:00
Cristian Adam
2f39b51bdc CMakePM: Make "Autorun CMake" a global setting
The "Autorun CMake" is only visible in the Tools settings page when
the user clicks on CMake tool.

This is not very visible and it doesn't have to be per CMake version.

Change-Id: I57ded0b2e6a3ecb731bb8bc1495b6b61bc04c8b6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-05 14:37:50 +00:00
Cristian Adam
a0afd51f3f CMakePM: Add "CMake Install" deployment step
This commit adds a "CMake Install" deployment step, which is using
"cmake --install" command.

"cmake --install" command has been added in CMake 3.15, this is why the
minimum CMake version has been updated to 3.15.

Note that CMakeBuildSystem::makeInstallCommand is still using cmake --
build --target install due to a CMake bug regarding "Ninja Multi-Config"
generator, which doesn't intall all binaries via "cmake --install".

Fixes: QTCREATORBUG-25880
Change-Id: I504674c380055d8ef136d344a78b80c17ecf9765
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-19 13:57:43 +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
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
hjk
09fb8d403b CMake: Use correct device environment for remote cmake binaries
Change-Id: Id2fccab7f2d051406b0f2b0bbf3c118198f6ed32
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-04 10:47:00 +00:00
Jarek Kobus
5ab100a2b9 CMakeProjectManager: Limit the usage of std::make_pair
Make the code less verbose.

Change-Id: I8dc194f0cb4ed38c4c117482a7011019444edc40
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-09-30 15:12:34 +00:00
hjk
ab4c9b9679 CMake: Move to Tr::tr
Change-Id: I169da93b5184351cb915d4c198fd33318fcfe06f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-30 06:56:21 +00:00
Eike Ziller
04e50438eb Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.

Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-09-01 06:58:04 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Cristian Adam
5edbf915a4 CMakePM: Fix registering CMake as version 0.0.0
When importing a CMake build, the CMake version that's used in the build
could be registered as "CMake 0.0.0". This is obviously wrong.

Fixes: QTCREATORBUG-26999
Change-Id: I1401106806c4356516e8235a3767d9615e4d428d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-29 12:41:34 +00:00
David Schulz
153ff77a6b Utils: use cleaned stdout all over the place again
Amends 5ee880ce5e

Change-Id: Ie0202db7d8455372c3697087d9571db6706b45a1
Reviewed-by: hjk <hjk@qt.io>
2022-06-17 13:04:42 +00:00
Artem Sokolovskii
c23aa1c656 CmakeProjectManager: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Iabe3a621efa56282bf1511f540c98fdf5d8da270
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-20 12:55:20 +00:00
Marcus Tillmanns
2c4553366c docker: Correctly initialize Kit during autodetection
* 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>
2022-04-12 14:15:45 +00:00
Eike Ziller
cd8c4ced81 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic02df53b880d0861d9d9ea0df3e0d381ae99f350
2022-03-11 09:50:48 +01:00
hjk
95510a842e CMake: Drop two use of HostOsInfo::isXXXHost
More friendly to docker.

Change-Id: I3eeb859cc880fa24c2b1c74caf5a06ec4f27cb2f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-10 12:18:43 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
Cristian Adam
d408e4c22c CMakePM: Add "variable" link to CMake offline/online documentation
This way an user can find quickly a CMake variable if needed.

Change-Id: Ie885a34321cf2ce31ee662659e669de88b28801c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 15:34:07 +00:00
Cristian Adam
68cb80f276 CMakePM: Add options link to the CMake offline/online documentation
This way a user can quickly find out which options can be used.

Change-Id: I6347759689a4a1431a82ff9414da0c79e357eb45
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 13:12:15 +00:00
Christian Stenger
4bea534c62 CMakePM: Do not register qch files from device
Change-Id: Ie6f8ce74d500d18b69fd5017ddd820356515c21a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-07 13:26:56 +00:00
hjk
f8c7d2e848 Docker: Rework auto-detection and removal of kit items
- 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>
2021-07-14 12:55:53 +00:00
hjk
430e81facd All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 07:55:31 +00:00
hjk
953ea730b8 Utils: Merge QtcProcess and SynchronousProcess
Keep SynchronousProcess as type alias for a transition period.

Change-Id: I2540b6cecc17eb46f40ed57d27589011693728f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 06:31:57 +00:00
hjk
6d688f3199 CMake: Display cmake version on the cmake settings page
Mostly for informational purposes. Helpful e.g. to check whether
an auto-detected cmake binary from a docker device matches
expectations.

Change-Id: I546b0ab6edc240cc779bbf0560e00165cb524fcb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-21 16:21:47 +00:00
Cristian Adam
0e613918b6 CMakePM: Always create build directories
Having two configurations for a project, one in /tmp and one in the
right build directory is confusing and for big projects can take some
time.

Fixes: QTCREATORBUG-25532
Change-Id: Ib0dad267117b3c025d668646ef076b0f77bff166
Reviewed-by: hjk <hjk@qt.io>
2021-06-10 13:42:14 +00:00
hjk
0ba4338467 Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccess
To make clear that this is not just any finish.

Also change FinishedError to FinishedWithError, to create
symmetry.

Also adapt enum member description to reality.

Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-02 14:16:36 +00:00
hjk
77d7b24326 Utils: Make Environment::setEnglishOutput a proper member function
The previous indirection was useful as long as they were overloads
for QProcessEnvironment and QStringList, but these are gone now.

Change-Id: I5066bd2e72fd06948a5cc7bbac6dda9006db96ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-21 15:07:34 +00:00
hjk
5afbcf0e86 CMake: Remove CMakeTool::supportedFileApiObjects()
This was introduced in a51b8a061e but never used.

Change-Id: Ib842a4a3a39432a767a2f854959fcb005e063a40
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-20 13:10:13 +00:00
hjk
90ad902486 Utils: Remove CommandLine argument from QtcProcess::run{,Blocking}
Makes run() more similar to what start() looks like.

Also add some asserts to make sure run() and related functions are
only called on SyncronousProcesses, as these are currently the only
ones where this works.

Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-19 13:01:51 +00:00
hjk
9e832e3fb9 CMake: Minor code cosmetic
Drop top-level static of consts, namespaces.

Change-Id: Ibc902e41278b78843a8f5aeced8321e76296ca1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:49:17 +00:00
hjk
55f768e1b0 Utils: Make process results accessible through QtcProcess object
The result is fully stored in the object anyway. Using the extra
SynchronousProcessResponse structure only causes copies of
the data and complicates access on the user side in
a lot of cases.

The result bits are now also accessible individually.

There's obvious room for follow-up changes on the topic, e.g.
ShellCommand::runCommand's parameter list could shrink to
just a SynchronousProcess parameter.

Change-Id: I45aa7eb23832340be06905929280c012e1217263
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-14 13:19:01 +00:00
hjk
c262f40b67 Utils: Re-do Replace SynchronousCommand::flags by a named bool
The potential extensibility was never used, and a similar use case
in QtcProcess (setLowPriority()) used a named setter.

Change-Id: I87d84ea2206995d5069265f8df78f40cf2ba8a36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-07 14:09:56 +00:00
hjk
635993fbdc Revert "Utils: Replace SynchronousCommand::flags by a named bool"
This reverts commit c617632e4d9291f1b50ec0c7e1a914a6a689284e.

To early, dependencies missing.

Change-Id: I91433aebbaf2c04cbb212585deb3cde5f3208974
Reviewed-by: hjk <hjk@qt.io>
2021-05-07 08:35:58 +00:00
hjk
9a7a0098a3 Utils: Replace SynchronousCommand::flags by a named bool
The potential extensibility was never used, and a similar use case
in QtcProcess (setLowPriority()) used a named setter.

Change-Id: I77d84ea2206995d5069265f8df78f40cf2ba8a36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-07 08:24:18 +00:00
hjk
c69eb63767 Utils: Remove SynchronousProcess::{setP,p}rocessEnvironment
Change-Id: I761c04a08bc7e52b2d57d90cb8aa93ec9f3db724
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-05 12:25:57 +00:00
Eike Ziller
f99e46c148 cmake: Fix version information about unsupported cmake tool
When registering a CMake version without fileapi support and setting
that in a kit, the kit shows a warning about unsupported version. It
didn't show the version of the registered CMake though. Make CMake tools
without fileapi return their version number.

Change-Id: I388d3e0a17ff4145238c5c90109522665a6f6fac
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-19 07:06:38 +00:00
Eike Ziller
953db51a15 cmake: Remove unused variable
Change-Id: I17d373088c3f2085c52ebf9230b3ce2f0f64074a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-19 07:06:31 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Orgad Shaneh
21e9947c21 CMake: Fix GCC warnings
warning: control reaches end of non-void function [-Wreturn-type]

https://stackoverflow.com/q/33607284/764870

Change-Id: Ia8d0a8d42d5db786c6800ab91a1ef790fe2387f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-04 08:41:15 +00:00
Tobias Hunger
494b9f5287 CMake: Remove servermode support
Task-number: QTCREATORBUG-23915
Change-Id: I2a58e1d6d95c28e25787722fa37448d86c4aebc9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-04-29 14:30:16 +00:00
Tobias Hunger
f51f3c897e CMake: Do not crash without a supported CMake
Do not crash when a CMake < 3.7 (no server-mode and no file-api) is
used.

Change-Id: I72a4ce6bb81d4fcf3d59508c72e46f422a8a00c0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-04-22 10:38:27 +00:00
Tobias Hunger
9b78b9f766 CMake: Fix WS in cmaketool.cpp
Change-Id: Iffd3a7b8f53989c6756acb084e00543eba6d564c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2020-04-21 10:13:23 +00:00
Tobias Hunger
5350288e45 CMake: Fix includes all over the CMake plugin
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>
2020-04-20 10:05:24 +00:00
Eike Ziller
62aed34077 CMake: Fix build with older GCC
Change-Id: Ib606c91039a4389e7f3fbb3d9c733240106da441
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-21 08:58:59 +00:00