Commit Graph

74059 Commits

Author SHA1 Message Date
Piotr Mućko
d4c582d227 McuSupport: Test package fallback/default path
Change-Id: I26107fc28fd4d82a550953a38649a19e43563b47
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 08:16:05 +00:00
Piotr Mućko
4fde5f11ce McuSupport: Tests overhaul, mocks verification
Change-Id: I710a58b987c501dfff1102a6e3361981df4fdaee
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 08:15:28 +00:00
The Qt Project
0114f3acd6 Merge "Merge remote-tracking branch 'origin/7.0'" 2022-05-09 07:49:34 +00:00
Eike Ziller
70b9f13792 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp
	src/plugins/cppeditor/cppcodemodelsettingspage.cpp

Change-Id: I602f4ff13f9370ec20704efaea34b42445a75fd4
2022-05-09 09:48:28 +02:00
Jarek Kobus
92d7e4601d QtcProcess: Forward declare Environment in QtcProcess header
Change-Id: If85a8a07b144c94cb6e45f66dcb06573ef07c777
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:40 +00:00
Jarek Kobus
6455d7fcf3 QtcProcess: Make the class final
Currently, as a result of many refactorings, the QtcProcess
is designed so that if you want to customize the behavior
you should implement custom ProcessInterface subclass.
Adding virtual methods directly to QtcProcess caused tons of
unpredicted side effects and nasty bugs, which were hard to
track and hard to fix, as provided fixes were usually fixing
particular case while introducing regressions in not related
code paths.

Consider also aggregating QtcProcess object instead of
deriving from it when some additional methods are required.

This patch removes the last virtual methods from QtcProcess API
and makes the class final in order to prevent from adding
any new virtual methods to this class in the future.

This commit message should make it clear that having subclasses
of QtcProcess is not a desired design. It's a post-mortem
conclusion. So: don't derive from QtcProcess - we mean it!

Change-Id: I1e43ed45be326b366422fd7db6e05ba48ea5fb98
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:29 +00:00
Jarek Kobus
2856091c75 Get rid of SshRemoteProcess
It's being replaced by QtcProcess with path on device.

Change-Id: I29eb038d1b17151683f86855eb547e47f7f7dea5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:13 +00:00
Jarek Kobus
d8ee25ec3d Move setupSshEnvironment() into SshConnectionParameters
As we are going to remove SshRemoteProcess.

Change-Id: I07cf246791f1adb6cfc454935d7e330c2f1d4dc7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 07:42:02 +00:00
Miikka Heikkinen
48d1bd0551 QmlDesigner: Fix initial "Show All Options" button label
Fixes: QDS-6811
Change-Id: I76f55f1eb4f61c63604d1b2048a351a68ffb2ae5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-09 07:40:51 +00:00
Jarek Kobus
afe32bca30 Get rid of SshRemoteProcessRunner
It's being replaced by QtcProcess with path on device.

Change-Id: I89abacd686e00e3f42f6ab90e9439f015d73ce80
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 06:53:46 +00:00
Eike Ziller
bd9ecfc41a MinimizableInfoBars: Move constants from global to local
Change-Id: I7728ba8a81724d60797758e7b50e71ed1a22750c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-09 06:44:14 +00:00
Jarek Kobus
4aa1690a9b QnxDeviceTester: Don't use SshRemoteProcessRunner
Use QtcProcess with a path on device instead.

Change-Id: I1761f68fb54073aa992be89ed4a63284be46d799
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-05-09 06:40:36 +00:00
Jarek Kobus
0662530b16 QnxDeployQtLibrariesDialog: Don't use SshRemoteProcessRunner
Use QtcProcess with a path on device instead.

Change-Id: If7ac397e3f36f02cb6a97ee3103c2143790896e2
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-09 06:39:56 +00:00
hjk
6008d05b71 Python: Split complex call
Change-Id: I6f301342a1841d2734f0598edfcd7b3327a943c9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-09 05:56:06 +00:00
Jarek Kobus
07ecff38e2 AbstractRemoteLinuxPackageInstaller: Don't use SshRemoteProcessRunner
Use QtcProcess with a path on device instead.

Change-Id: Ia142645b25cd9e0512495642f454cb87ec54fd51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-06 19:35:07 +00:00
Cristian Adam
c0bca00bd9 CMake: Fix static build when using a static build of Qt
This fixes two issues:
1. the QT_FEATURE_static_runtime feature of a static build of Qt
2. the static sqlite sql driver bundled with a static build of Qt

Change-Id: Ia245ee3d8f7205c536c9fa77a4ba53ef066f968c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-06 16:40:22 +00:00
Jarek Kobus
03f0997b1e QtcProcess: Don't read error channel when MergedChannels
Fixes: QTCREATORBUG-27383
Change-Id: I5034c50fc876c5580148bb7806479da3163b08fc
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-05-06 14:27:18 +00:00
Artem Sokolovskii
7e69b64b74 CppEditor: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I9915cf2c07bdcc570efc20601752d60f2ec82f34
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-06 13:35:43 +00:00
Robert Löhning
f52c9e7061 Squish: Fix typo in Readme
Change-Id: Idbbd93318959fdddf967d7d6271cddfac2197645
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-06 13:34:07 +00:00
Fawzi Mohamed
556ec7c20e qmljsreformatter: support nullish coalescing
qmljsscanner did interpret ?? and ?. as a single ? and thus as the
start of a ternary operator, breaking reformatting.

Fixes: QTCREATORBUG-27344
Change-Id: I0429d20aed0196743f1c20e6ceac11351d5a7a3b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-06 13:23:34 +00:00
Eike Ziller
8bb63ebc9a MinimizableInfoBars: Move toolbar visibility handling
Remove some coupling between CppEditorWidget and MinimizableInfoBars by
handing the visibility of the toolbar buttons solely within
MinimizableInfoBars.

Change-Id: I5abf59187ea9b37fd13c91d63b2c82a1caa67275
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-06 13:21:14 +00:00
Eike Ziller
61282a893f Make "X occurrences replaced" indicator less annoying
- make smaller
- make transparent for mouse events
- reduce opacity

Affects a few other indicators too (zoom, -presentationMode).

Fixes: QTCREATORBUG-27513
Change-Id: Iec516202e047c5d9aa0a0b8cab42891c9bac5be3
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-06 13:20:46 +00:00
David Schulz
b50eb35a17 Coco: long live the cocoplugin
Change-Id: I1d21c67233d302a0689c4689bf9c2f349387ba1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-05-06 12:57:33 +00:00
Christian Kandeler
56b5e1f4de ClangCodeModel: Remove ClangFixItOperationsExtractor
Not used anymore.

Change-Id: Ice3dd4c58df73f4075d0c79c011554286b5d9dd7
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-06 12:35:06 +00:00
David Schulz
ccf3e1d5c4 LanguageClient: set the client info in initialize params
Change-Id: If7be38a9bd8f7bae0d2a4263a5a6bf7d2c7e34a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-06 11:50:19 +00:00
Christian Kandeler
3d1ba205d0 ClangCodeModel: Minimize QStringList -> QJsonArray conversions
... when setting up the compilation database.
As it turns out, these conversions were the most expensive part of
creating the JSON file. We now build the JSON arrays incrementally
instead of setting them up from scratch for every source file.

Change-Id: I1e664a6320d5b3c49b31366c58aa14f63818e008
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-06 11:03:13 +00:00
Christian Kandeler
3ce7ca7242 ClangCodeModel: Move another call out of a tight loop
... when creating a compilation db.

Change-Id: I4d392587f13214042b449a450ef1d4ae1c283ecb
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-06 11:02:45 +00:00
Christian Kandeler
0a9d1df61d ClangCodeModel: Do not re-classify source files for compilation db
This information is already present in the project part.

Change-Id: I797b6f573e7fb434b323efa4219dab54103aecaa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-06 11:02:25 +00:00
Cristian Adam
6d2a7e67f1 CMake: Link qml2puppet / qtcreator to the static qml plugins
This way "qml2puppet --test" will succeed.

Change-Id: I4c523e70e171e75c4f72fc85c740b87db833f4a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-06 10:47:14 +00:00
Eike Ziller
2e0633907f VCS: Fix possible crash on shutdown
Similar to how it is done for the WindowTitleAdditionHandler and
SessionTitleHandler.

Fixes: QTCREATORBUG-27048
Change-Id: Ic8c140b99c7c6edbc43bed5f1b9275b4af5ce831
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-06 10:44:39 +00:00
Cristian Adam
09c64e640d Static Build: make sure the .qrc files have unique names
resources.qrc was present in multiple plugins and Q_INIT_RESOURCE
requires an unique name to proper initialize the resource.

Change-Id: I2d514ab4b8cc41655009996f28aadca9c454d818
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-06 09:52:50 +00:00
Miikka Heikkinen
aed87f257a QmlDesigner: Skip watcher setup for shaders when not inside a project
Fixes: QDS-6871
Change-Id: I25c677ecac30fc4496467f888060b0b4d8fb5df7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-06 09:40:05 +00:00
hjk
ef346779eb Utils: Use some helper function in QtcProcess for common code
Change-Id: Iffa720f5c6b3c86ad80c92566fbe00465d3ed7a4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-06 09:21:54 +00:00
Jarek Kobus
f62a4d6315 SshDeviceProcessList: Don't use SshRemoteProcessRunner
Use QtcProcess with a path on device instead.
Remove some unneeded includes.

Fix killing a process on remote linux. It amends the old commit
that added "kill -0 -pid pid" command in the middle.
There is no defined "0" signal for kill command, so removing it here.
Currently the issue was that after calling kill -15 the process
may have got terminated and the subsequent call to kill -9
(after one second of sleep) failed with an error.
Instead, we call in a row: kill -15 and kill -9, without the
sleep command inside. It looks like this works fine, and the
old app gets terminated, so the subsequent kill -9 doesn't
cause an error.

This commit makes "Show Running Processes..." work again for remotes.

Amends be4bd1dc06

Change-Id: Id70884bdd0302e6d59f2f58d61f3f3d89a067391
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-06 09:16:31 +00:00
Christian Kandeler
7ef5001076 ClangCodeModel: Speed up compilation db generation
We needlessly re-evaluated the same compiler options again and again for
all files in a project part.
Now we only do the actual file-related work per file. Along the way, we
dissolved some unneeded classes and made CompilerOptionsBuilder non-
polymorphic.

Change-Id: I9710d641a57032936cc0812515974dbc91676c8c
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-06 09:05:59 +00:00
hjk
ae93978af1 Utils: De-virtualize some QtcProcess functions
Was meant to be transitional and is not needed anymore.

Change-Id: I1fa1d76c97778de7c8a45c16feb6664fe2a748d9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-06 08:54:14 +00:00
Piotr Mućko
3c3ea74ca2 McuSupport: Separate toolchain file and compiler packages
Toolchain package represents information about compiler and toolchain
file (.cmake). This information is parsed from JSON and used for Kit
creation. This includes cmake variables, path to compiler. This patch
extracts information about toolchain file into separate McuPackage.

Change-Id: Id165bdc5afa5d7cf5b5c96620e11cb878254c181
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-06 08:52:16 +00:00
hjk
9770b1d025 Qdb: Replace ApplicationLauncher in QdbStopApplicationStep
Change-Id: I0120a96e4289a4b12e31d805d09fca9413624c12
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-06 08:27:28 +00:00
Christian Kandeler
818dc8b0cc Remove clangsupport dependency from plugins
Change-Id: Ifd4215a590d32cd04fab720d0d8d5e746e81c6e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-06 08:11:42 +00:00
David Schulz
20c6ad2dfe LanguageClient: track running function hint processor
A tracked assist processor gets indirectly deleted in the client
destructor and the reset function. This makes sure no processor accesses
a deleted or restarted client.

Fixes: QTCREATORBUG-27404
Change-Id: Ib264eb4b166f1705bd734299642b93bca0a402c3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-06 04:35:57 +00:00
hjk
80eac74106 Boot2Qt: Replace last occurrence of ApplicationLauncher
Change-Id: I6fc7fd9ac1b44110a8a2247412f6a432e043a69e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-05 16:47:25 +00:00
hjk
ba97c741c8 CMake: Replace parseCMakeCacheDotTxt() function
... by direct use of  CMakeConfig::fromFile(). It was only duplicating
checks that are done on the user side already.

Change-Id: Iaf5e89c924c2b0a9080db9fe160970bbf6e33154
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-05 16:12:41 +00:00
hjk
0c7ab75ba8 CMake: Remove unused friend declaration
Change-Id: Idc6eca602a2c900c7c5b53ee48937439e2c350b0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-05 16:12:32 +00:00
Henning Gruendl
ed398280b7 Fix extra tokens at end of #include directive
Change-Id: I82623ac124334dfba046883233e779cb7066461b
Reviewed-by: hjk <hjk@qt.io>
2022-05-05 15:45:36 +00:00
hjk
4d48c4cb5e Boot2Qt: Replace two more uses of ApplicationLauncher
Change-Id: I2fda5afccfd2e6f9daf81b299dd9b18aa6535338
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-05 14:30:00 +00:00
hjk
88fac2b9c7 CMake: Introduce a helper function
... for the repeated stanza

    setParametersAndRequestParse(BuildDirParameters(this), ...)

Change-Id: Ibb6e8346a786bb9d6905de7facb374f750e561d3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-05 13:58:06 +00:00
David Schulz
7000ab04fb Utils: add default file path to string aspect
Change-Id: Ia3df289b0b2dc59f6e7098332c21a335dce207f1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-05 13:35:43 +00:00
hjk
ebf3144f22 CMake: Shift remaining data to buildsystem
Change-Id: I04518a21ce571399c89608d2e59e746f8e6e0d4a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-05-05 12:10:28 +00:00
hjk
e304a25c31 Boot2Qt: Merge qdbstopapplicationservice into build step files
Change-Id: I1e7756305cdce77ffabf093fbdb49c2d12037f91
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-05 12:10:02 +00:00
Artem Sokolovskii
bef1bd18f7 Android: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I2530688c44735bc4c69d57f9e8f392867be316f0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-05 11:00:36 +00:00