Commit Graph

85691 Commits

Author SHA1 Message Date
Jarek Kobus
4aec4e7ff7 ClangTool: Use LoopRepeat for running clang
In this way we don't construct a giant recipe
(~7000 tasks for Creator project) but simply repeat
the task execution many times.

Change-Id: I84addeb6b1ac4ad71a654298e290d99df59bbf82
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-16 16:48:49 +00:00
Jarek Kobus
fe05314fbf ClangTool: Filter out the units list before constructing the recipe
Change-Id: Ic902b79d29bd9b640edc281adc43fb04fe06773b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-16 16:45:05 +00:00
Jarek Kobus
1ed8b56702 ClangTool: Separate unit from AnalyzeInputData
Pass it separately instead. It's going to be replaced by
list of units.

Change-Id: Ie557bc0ae996b816a69b60a6e9792ca157829c78
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-16 16:44:50 +00:00
hjk
cab71e1005 QtSupport: Move plugin tests closer to tested code
Change-Id: Icad424d6def03b6a233b84144d405a2477738141
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-16 16:06:24 +00:00
Jarek Kobus
149f5bb8b5 VcsBase: Rename paramWidget -> editorConfig
VcsBaseEditorConfig isn't widget based.

Change-Id: I49c168f6ab48da54cfa4b0993f777375a19a64df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 15:28:51 +00:00
Jarek Kobus
2632f66672 VcsBase: Get rid of unused extraOptions arg
Change-Id: Ie434a2cd3b4e84465fe3ae419604bda184bcd34a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 15:28:44 +00:00
Jarek Kobus
e4c47b8d1c Subversion: Get rid of unused extraOptions arg
Change-Id: Ic2e8c7c1a1dcebc09f12c65c75cc937743579a61
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 15:28:36 +00:00
Jarek Kobus
8f35ec13e1 Mercurial: Get rid of unused extraOptions arg
Simplify the implementation of showDiffEditor().

Change-Id: I0b5a2c1783d0e1723322208276c2a71554d55ea8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 15:28:28 +00:00
hjk
2f987932c1 QmlProjectManager: Hide plugin class in .cpp
Change-Id: If9ed1c00c53f127ba328f5011772431b5e5b25f9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 13:44:46 +00:00
Marcus Tillmanns
0d14a4e010 Core: Fill SaveAs path
This allows a document to only specify a fallbackSaveAsPath
and still have the FileDialogs filename pre-filled.

Also allows to only set the path and not the File name if only a
fallbackSaveAsPath is specified.

Task-number: QTCREATORBUG-30200
Change-Id: I0703bbf868c6f014a6679cef096a82c76af09da0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-16 12:51:29 +00:00
hjk
320a0da060 QmlJsEditor: Work around moc-produced 'using namepace'
... for QmlJsEditor::QmlJsEditor causing ambiguities.

Change-Id: If15a0cb0410093857848b871d7f99c84b1b35826
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-01-16 11:48:53 +00:00
hjk
b63e2d39e8 QmlProjectManager: Cleanup qmlprojectplugin.cpp
... in preparation of moving the plugin class.

Change-Id: I449439f8db0a1c74dde51bf33a6f0e01fbc2a727
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 11:46:07 +00:00
hjk
9c8e5d4cdb Python: Simplify PyLSConfigureAssistant setup
Change-Id: Icdd8d0017a8fe71f579af6f19fa2b870f0677efc
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 10:43:28 +00:00
hjk
5de41fb40d Python: Use new plugin items setup pattern for PythonEditor
Change-Id: Ie8516960a106ddeff415b6412d9af66f7d2f0f36
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 10:43:06 +00:00
hjk
1992efddfc Python: Move plugin class definition to .cpp
The plugin classes partially changed there purpose, they are no more
meant to provide internal utility functionality.

Change-Id: I9b9200995eaa95dcd924c94dcedb28e6d5db0be9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 10:42:45 +00:00
Christian Kandeler
590a54828c QmlJSTools: Fix qbs build
Change-Id: I3875afb3034cc8eb4dfe79f73a0b84edeb714c70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 10:29:49 +00:00
Jarek Kobus
46b2d58310 AutoTest: Reindent properly runTestsHelper() [part 2]
Otherwise the grandparent diff looks giant.

Change-Id: I05a862e01a712dbbec49b4b21b77a157bd483268
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 10:04:38 +00:00
Jarek Kobus
05434b71e2 AutoTest: Reindent properly runTestsHelper() [part 1]
Otherwise the parent diff looks giant.

Change-Id: I998f08d271bf231ad33154aeab5b349b1c1e83ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 10:04:28 +00:00
hjk
c6dce7e039 QmlJSTools: Hide plugin class in .cpp
Change-Id: Idfd3741141c076e2269fee99c89ef15f6e6f3b7c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 09:53:51 +00:00
hjk
2a02866787 QmakeProjectManager: Hide plugin class definition in .cpp
Change-Id: If813b4eef86084a126c1d4a45e53b056d55f7caf
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 09:53:43 +00:00
Marcus Tillmanns
b1ec196c14 CompilerExplorer: Add fallback document path
Fixes: QTCREATORBUG-30200
Change-Id: Iecbecf9f065a938881e2afa33ff6736bc3f2ee4a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2024-01-16 09:50:54 +00:00
hjk
53ebc15918 QmlJsEditor: Hide plugin class definition in .cpp
Change-Id: I7d6325059aedd92b34072de1fbb05bc72fc95efd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 09:50:00 +00:00
hjk
d9108d1ae2 LanguageClient: Hide plugin class definition in cpp
As part of that, move test object creation closer to tested code.

Change-Id: I60f1e431fbdd4ebc2a01ab6ed0c779c288c81b06
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-16 09:43:52 +00:00
Jarek Kobus
f44112ed22 AutoTest: Use LoopRepeat for test runner
Change-Id: I2b7eb32732aa1f12b23a719d0c4cce14dd0d7114
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 09:36:47 +00:00
Jarek Kobus
54e0433975 VcsBase: De-virtualize diff()
Change-Id: Ib8bd115abd4818ef9b5a298348fce36dd91cffc0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 09:34:55 +00:00
Jarek Kobus
b855b1f907 Mercurial: Get rid of a fake overload
The only callers are coming from the Mercurial plugin.
The overload doesn't call the base implementation.
So, there is no relation to the base impl.

Change-Id: I718e3ab196e9df77f6682b3230a8739db58c0238
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 09:34:48 +00:00
Jarek Kobus
d5d08c2e53 Subversion: Get rid of a fake overload
The only callers are coming from the Subversion plugin.
The overload doesn't call the base implementation.
So, there is no relation to the base impl.

Change-Id: I71c9587f1eb2493a9a58df7d814c4cadfc23adf0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-16 09:34:41 +00:00
Christian Stenger
5a86b883fa QmlPreview: Avoid processing all editors
Only act if there is a preview running. Explicitly connect and
disconnect to the editor manager if the preview gets triggered.
Fixes displaying message boxes when changing qml documents
without a running preview.
Reverts 66d94a82a32cdfdb344d55ef2c610ee9b3f03f7fi which had been
a hotfix and provides a more intrusive solution to the misbehavior
revealed by 5336fd83a0.

Change-Id: I88be4eca077ac1d56d8e4790a70220e7d3efa960
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-16 09:10:02 +00:00
David Schulz
fb2fd513be Python: disable generateKit button after clicking
The button should only be enabled if no kit can be associated with the
currently selected python interpreter.

Change-Id: I0357bf999c8abd2bc11b4ac5b2e79a10a0d94f01
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 08:52:04 +00:00
David Schulz
d67379481c Python: optimize venv and pip checks
Checking for the venv and pip module can take some time. Since this is
done now whenever the kits are validated this has performance
implications for multiple actions. For example showing the target
selector wizard page or opening/switching sessions.

Use a cache to reduce the number of python processes started to check
the existence of the modules, and if the module can be found store that
info in a persistent store to avoid checking it again after a restart.

Change-Id: Ib899da0e6b2da28fbee2b5baff7f923e4595260a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-01-16 08:51:47 +00:00
Eike Ziller
fd6e45c407 Doc: Fix supported Linux platform
Qt 6.6 officially no longer supports Ubuntu 20.04. Even though it mostly
works, some parts like openssl (for https connections) do not work (out
of the box)

Change-Id: I5133e94048d3014475678ab849a61ccc62331df4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2024-01-16 08:24:13 +00:00
Eike Ziller
699b91d371 iOS: Fix small issues when connecting/disconnecting devices
- Make sure that the updating TaskTree is deleted on quitting QtC by
  maintaining a hash of running updates per device
- If an update is triggered for a device while another is running,
  cancel the first one
- If the device is disconnected while an update is running, cancel the
  update. Otherwise this leads to wrong connection information in QtC

Change-Id: Ia76921d01b47229da1b5decd6b890303f4acfbf5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 08:00:00 +00:00
David Schulz
e70b99c7da TextEditor: avoid autoIndent when using default TextIndenter
Most programming languages use indentation to group stuff. So if we have
no special language support for a text file it is useful to start a
newline on the same indent depth as the previous line. But if we trigger
an explicit reindent (default ctrl+i) we usually don't want to change
the indentation if we don't know exactly where it should end up. This
also applies to refactoring changes, for example from the lsp.

Change-Id: I8268dc88cbceddfc7112757fd7d2fef940ab9a39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-01-16 07:29:16 +00:00
hjk
0db551bfe7 QbsProjectManager: Hide plugin class definition in .cpp
Change-Id: I06944d633950ca5f6a81775ee3aede92796d8458
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-16 07:04:42 +00:00
hjk
446d79ad67 CMake: Split big plugin tests into smaller pieces
... which can then live closer to the tested code.

Change-Id: Icd975a76424ea2258c1bb93afdbaabdf1959340a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 17:04:37 +00:00
hjk
e0dae4d0b3 Perforce: Hide plugin class definition in .cpp
Change-Id: I6ae58a937b069ccc6a9b9f411bc42178f57133e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-15 15:10:38 +00:00
hjk
3206876c03 Mercurial: Hide plugin class definion in .cpp
Change-Id: I027e058eb555a3b4ccc06eaa11c8e0ecf38f51e2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-15 15:08:50 +00:00
Marcus Tillmanns
06658d981c Utils: Fix (Q)Process::interrupt
Since switching to a QProcess based implementation a different
code path is used to interrupt processes (QProcessImpl::sendControlSignal, instead of ProcessLauncherImpl::sendControlSignal).

The QProcess path still used outdated ProcessHelper::interruptProcess.

This patch removes the old path and replaces it with the correct
"ProcessHelper::interruptPid" for QProcess based processes.

This also fixes GdbEngine::interruptInferior2 which could not interrupt
processes during "Attach to running server"

Change-Id: I9e1917100acf89c07cab0d9c687e57bb555d9d83
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 15:04:37 +00:00
Cristian Adam
2be9a658ad PE: Make default build directory template relative to src dir
Qt Creator is using the following scheme to generate a build directory:
"../%{JS: Util.asciify("build-%{Project:Name}-%{Kit:FileSystemName}-%
{BuildConfig:Name}")}"

This implies that for docker devices the parent directory for the
project needs to mounted in order to have write access rights.

This is usually not the case and docker fails to configure projects.

Changing the template to "./build/%{JS: Util.asciify(%
{Kit:FileSystemName}-%{BuildConfig:Name}")}" makes sure that the build
directory is created
into a directory that has write access for docker.

Fixes: QTCREATORBUG-29972
Change-Id: I4839d76bf272ed7e59c60446636e4a394a0dea24
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-15 14:46:47 +00:00
hjk
5f44e54623 Core: Remove some unused #includes
Change-Id: I35018a6cc94444d00cc62a0934482d98969c7028
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-15 14:44:57 +00:00
Jarek Kobus
9df6fadf2e GenericLinuxDeviceTester: Reuse TaskTreeRunner
Change-Id: I86b7dcb8ef9a27d338dd0a4ce585c223bf90665f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-15 14:36:57 +00:00
Jarek Kobus
e4f5a0f50b SyntaxHighlighterRunner: Delete private from the right thread
Before we were deleting the SyntaxHighlighterRunnerPrivate
from the caller thread. However, in case of
ThreadedSyntaxHighlighterRunner the private objects
lives in m_thread thread, so delete it from there.

Change-Id: I4e6d57ef1840a9d34ce02f2bb4423e9e47550f4d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-01-15 14:28:00 +00:00
Jarek Kobus
89e446fb4d ClangTool: Pass AnalyzeUnit to clang setup handler
Change-Id: I4cfbe5c241fcf8d42e5ad597db1dd84bff439ec4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-15 14:16:18 +00:00
hjk
27471f6c55 LanguageClient: Decouple plugin and LanguageClientManager a bit
Change-Id: I052156bbc52838e61eb2782af7b48e308eef4a3a
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-15 13:55:41 +00:00
Jarek Kobus
9d59b790ae McuSupport: Fix lambda
Change-Id: Ic29580c7b3108118dbf4f96fdebe13918f0b98ae
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 13:37:57 +00:00
Jarek Kobus
cbfd1f3371 McuSupport: Make some functions static in cpp
Change-Id: I08d7aac24edf98a7beb262c7146d6ff583dc4694
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 13:37:51 +00:00
hjk
eddb962bc9 McuSupport: Hide plugin class definition in .cpp file
The plugin class is not meant to be accessed from other plugin items
nowadays.

Change-Id: Iffb295cd80bd4dd8799c8a1329dd016bf7dd167e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 13:31:11 +00:00
Leena Miettinen
ab81f02b13 Doc: Describe the Generate Kit option for Python interpreters
Task-number: QTCREATORBUG-30209
Change-Id: I5eec3797d226109eccf4dde5f32b21076c18f2b4
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-01-15 13:20:44 +00:00
hjk
1307fe5eef McuSupport: Move askUserAboutMcuSupportKitsUpgrade closer to its user
Change-Id: I41f0eac4ce37db682c0d9be06acf84691eb225c0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 13:13:41 +00:00
Jarek Kobus
38968c4dbe Designer: Compile fix
Amends d5938cf2bc

Change-Id: I2c48c0807362fb6963cb6f11402af6e6dea1d53b
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 13:12:56 +00:00