Commit Graph

73379 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Jarek Kobus
c056c5c4b4 LinuxDevice: Don't include sshremoteprocessrunner.h
The SshRemoteProcessRunner is going to be removed soon.
Replace this include with what we are using currently.

Change-Id: I0d13586390b60ca9545f124a4db24eb90f4369d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-05 08:59:15 +00:00
Jarek Kobus
aa4695e76f PublicKeyDeploymentDialog: Don't use SshRemoteProcessRunner
Use QtcProcess with a path on device instead.
Get rid of SshKeyDeployer, inline its functionality inside
PublicKeyDeploymentDialog.

Change-Id: I01b9fecb06b459f93e8eefaf889ef0dea9f69f1d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-05 08:58:59 +00:00
hjk
2095dbdd17 Valgrind: Compile fix
Amends 32845e86f3.

Change-Id: I19d2e7c70cd29894953189b93d3881fa5efd007c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-05 08:56:50 +00:00
hjk
32845e86f3 Valgrind: Use QtcProcess in callgrind
Change-Id: I033f856e8b391e741124a136d875bc80255eeac7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-05 08:47:21 +00:00
Christian Kandeler
23fceb9ef3 CppEditor: Allow to retrieve clangd's internal include path
The code model will need to use this one instead of the one hardcoded at
build time.

Change-Id: Ibd89d32f99b9250c909473f9a4a66f9a8a5f4f07
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-05 08:38:33 +00:00
Jarek Kobus
70e8e1b530 LinuxDevice: Fix error reporting from shared connection
If the master ssh connection can't start, e.g. because
no public key was uploaded to the remote device, report the
standard error of master process as error string.

Fix the "if" condition in handleDisconnected().

Change-Id: I9ba821136a1755d3460e47ce6f25d3684445890f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-05 07:46:17 +00:00
David Schulz
4a3c4dec09 ClangCodeModel: fix setting clangd to the fallback client
When manually defining clangd to the fallback clangd in the settings the
setting was not saved and after a restart the previous clangd was setup
again.

Change-Id: I6ce71d20d510c0cf6c605247563349b38c204e56
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-05 04:17:14 +00:00
Cristian Adam
cf8a2e6589 CMake: Fix configuration for the system KSyntaxHighlighting usage
extend_qtc_target() fails when a target doesn't exist,
extend_qtc_library() does check if the target exists.

Amends 88781a003f

Change-Id: I76858f8a395d1b0f3735a8a74a36cf89703aa7f6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-04 16:59:55 +00:00
hjk
40ba92c371 ProjectExplorer: Remove now unused ApplicationLauncher members
Change-Id: I54530571114b8dbc13e50432b8331427e845215b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 15:39:41 +00:00
hjk
adeaa01d85 Debugger: Use QtcProcess instead of ApplicationLauncher
... to start the QmlEngine

Change-Id: Id283a1f5d100cd65fe1f3b900114b86aca288e91
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 15:39:36 +00:00
hjk
79301deea2 Valgrind: Use QtcProcess instead of ApplicationLauncher
Change-Id: I653435dbf44a44cb5baddb58f471693fc73b2e63
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 15:14:00 +00:00
Artem Sokolovskii
f4e943bda3 CorePlugin: Remove foreach / Q_FOREACH usage mostly in dialogs
Task-number: QTCREATORBUG-27464
Change-Id: Iad47e9cb0b2fa7590dba2d26d0a33a83d2909bb7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-04 14:18:24 +00:00
hjk
33a385c4d6 CMake: Shift multiconfig storage from build config to build system
Change-Id: I6f9b6c590975caeea4ad92c61f354d81d4d90431
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-04 13:35:30 +00:00
hjk
fdf008a37e ProjectExplorer: Use QtcProcess as direct member
... in ApplicationLauncherPrivate.

Its lifetime is the same as the owning object's nowadays.

Change-Id: If3a47d625f7903f680780f2d5663df474e5812b2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 13:19:05 +00:00
hjk
268a8efa74 RemoteLinux: Merge remotelinuxcheckforfreediskspaceservice
... into build step files

Change-Id: Ice63c24d9076486ba46a7b9429a01f803a6f6103
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 13:08:39 +00:00
hjk
4a38d6088e RemoteLinux: Merge remotelinuxcustomcommanddeployservice
... into build step files. Not worth a separate translation unit anymore.

Change-Id: Id7b33c1ea1ef4c7dc91512e8478d49fbdead4dde
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 13:08:31 +00:00
Christian Kandeler
780f89b377 ClangCodeModel: Bump minimum clangd version
We need clangd >= 14 to get rid of the cumbersome compile_commands.json
creation.

Change-Id: I30c19a385e2d76e478985f3df64968d1cb3efe87
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-04 12:55:03 +00:00
Eike Ziller
eec77fa67a Remove leftover code for header diagnostic info bar
ClangCodeModel used to show an info bar about errors in headers in the
editor, but that was removed. Remove the remaining infrastructure that
was used to show them.

Amends b52fac7148

Change-Id: Id89f2bcb7778245f468923d29c577bf1ca68ee75
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-04 12:13:45 +00:00
hjk
2b9ec0c3d9 Boot2Qt: Merge qdbmakedefaultappservice into build step files
Not worth a separate compilation unit and pimpling.

Change-Id: Ie7649938bc8c97061ccac0a37c075a6bd7900c97
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-04 11:40:20 +00:00
Jarek Kobus
a1b9619b5e RsyncDeployService: Don't use SshRemoteProcess
Use QtcProcess with a path on device instead.

Change-Id: I0b5f3160926287112b7fe53dea19d54ca5c07232
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-04 11:37:57 +00:00
Jarek Kobus
e9fb604812 LinuxProcessImpl: Buffer standard error until started() is emitted
Change-Id: I1ee469a918ff95eeeb5038a4c2021469c429a269
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-04 11:37:44 +00:00
Marcus Tillmanns
441488dd52 Docker: fix find arguments, support outputForRunInShell called from non-main thread
* Added -mindepth 1 to not return the directory that is being searched in.
* Added parenthesis around -type options to correctly express that files OR directories
  should be searched, without affecting the following parameters.
* Added parenthesis around -readable, -writeable and -executable and added -o between them,
  to correctly indicate that any of the selected type should be searched for.

Change-Id: Ibc77a2a99826663b88015e8f43b5664563384127
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-05-04 11:03:50 +00:00
Jarek Kobus
450a7754c3 RemoteLinuxCustomCommandDeployService: Don't use SshRemoteProcessRunner
Use QtcProcess with a path on device instead.
Make the RemoteLinuxCustomCommandDeployService class internal
and don't export it.

Change-Id: Iac02f3a8ab5a5f2e3647c95c6710dbe3f9b4994f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-04 10:06:20 +00:00
Christian Kandeler
969b1f711f CppEditor: Remove RefactoringEngine
Another useless indirection.

Change-Id: Icfcc0704a1056d8002a674edbe74b946cb56ff27
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-04 10:05:31 +00:00