Commit Graph

62421 Commits

Author SHA1 Message Date
Eike Ziller
c84380cdc8 Merge remote-tracking branch 'origin/7.0'
Change-Id: Ib2267ddbb702564a6e1c8f6b1db802bc9c45759d
2022-03-31 15:32:42 +02:00
Jarek Kobus
afd70a2c67 StartProcessPacket: Get rid of m_processChannelMode
We handle process merging in CallerHandle.

Amends de1bef18e2

Change-Id: I682d600c3ddb0306167389b77cfae8181c1dc9d1
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 13:22:51 +00:00
Christian Stenger
17ef9bc35c AutoTest: Ensure test runner does not get stuck
If we fail to start the executable or the executable is missing
we need to ensure the runner continues by cleaning up and
scheduling the next test if there are more.

Fixes: QTCREATORBUG-27285
Change-Id: Ia89374d7105f2fd6a42fa3fa018f14677e30ad1b
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-31 13:03:45 +00:00
Jarek Kobus
b76b8b1542 ProcessReaper: Implement custom terminate for CtrlCStub case
Move CtrlCStub-specific interrupt into ProcessHelper.

Amends 7d7e4af3afb5ba9d0ed5210018dd6be67abda469

Change-Id: I5cd9a750c4a89587a874515f752b0144df4b8309
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 12:48:42 +00:00
hjk
de1bef18e2 Utils: Work around readAllStandardError() with QProcess::MergedChannels
Instead of relying QProcess to operate with MergedChannels, keep
the separate channels and merge inside QtcProcess.

Fixes: QTCREATORBUG-27196
Change-Id: I3039267fcd6d90f95f8212642e17049b87af1156
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-31 11:13:16 +00:00
Eike Ziller
ec5e060a07 Fix default build device
If the kit doesn't specify anything specific, default to the local host.

Fixes: QTCREATORBUG-27242
Change-Id: Ie19a332638467bd121314a2a0303803253ced4af
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 10:50:08 +00:00
David Schulz
98a2600150 Python: add clean up button to python settings
Change-Id: I633a8b20f4b02a989f2fd71448b611bbb0d0a3a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-31 10:43:48 +00:00
David Schulz
d0c8cc20f5 Python: automatically purge outdated autodetected interpreters
Save whether an interpreter was automatically detected. Use this
information on startup and check whether the path still exists to remove
the interpreters that are gone.

Fixes: QTCREATORBUG-27253
Change-Id: I094e573122f2800f643a2708b924a7a9d7e25ae1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-31 10:43:42 +00:00
David Schulz
d8589e0222 Python: show error icon on non existent interpreter in settings
Change-Id: I8539d1aaaf2b332e0f97e0288b6b4e93f4851dfe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-31 10:43:36 +00:00
Jarek Kobus
176ec31817 CoreUnpacker: Get rid of no-op call to QtcProcess::terminate()
Calling QtcProcess::terminate() after disconecting from
process signals is a task for implicit ProcessReaper.
Delete the process instead.

Change-Id: I59b0aa1d9df602077d006084635a5321beae0010
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 10:30:10 +00:00
Jarek Kobus
a3c531c2a3 SshRemoteProcessRunner: Get rid of no-op call to QtcProcess::terminate()
Calling QtcProcess::terminate() after disconecting from
process signals is a task for implicit ProcessReaper.
Delete the process instead.

Change-Id: I02d9b892125b1a1053aefe8edbc7bc96bac41381
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 10:30:00 +00:00
Jarek Kobus
8da44324e7 QtcProcess: Resolve old TODO, add new asserts
Add new TODO, too.

Change-Id: Ia1844638054099fdc2aae1878fa21c133f6023ef
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-31 10:28:44 +00:00
Jarek Kobus
13013acf3a Finish the shell process on shutdown, before deleting it
Change-Id: I62f3754325da9141e5ab870ff4750109a836b092
Reviewed-by: hjk <hjk@qt.io>
2022-03-31 10:26:14 +00:00
Thomas Hartmann
ee8c4b27e4 QmlDesigner: Add the .qmlproject file to the .qmlrc files
Instead not adding .qtds, .db-shm, .db-wal.

Task-number: QDS-6394
Change-Id: Ie3089a707bd7d29bdbf5795c676ff38e09f59e41
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-31 10:24:53 +00:00
hjk
27c8f00d73 Utils: Un-seat QtcProcess from ProcessInterface
I find it too confusing to have that inheritance only to enforce
similar interfaces.

Change-Id: I9da68ea59c04f709228e0874460e987115b30f56
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-31 10:14:36 +00:00
Samuli Piippo
0c933fb7c0 CMakePM: remove left over arg marker
Task-number: QTCREATORBUG-27237
Change-Id: Ife1e27177d3afefc613c88e6e1848481a70bfe01
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-03-31 09:33:35 +00:00
Jarek Kobus
5b1035c20f Forward declare QtcProcess instead of #include
The QtcProcess is already forward declared in idevice.h.

In case of std::unique_ptr<MyClass> being a member
of a public class in a header file it's enough to
deinline constructor and destructor of a class
containing the member, and forward declare MyClass.

Amends f91a9cb891

Change-Id: Iacf272b62fed8827c0451c5d4c5c3429bb7106ef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-31 08:36:56 +00:00
Eike Ziller
0701dc3652 Help/litehtml: Fix that ctrl+click didn't open link in new page
Fixes: QTCREATORBUG-23026
Change-Id: I24f9b236f26238ce1909300bb49bdc596eff33b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-31 08:10:11 +00:00
Christian Kandeler
a1b910724d ClangCodeModel: Fix local renamings with clangd
This functionality somehow stayed in the proof-of-concept
stage, working only for free functions.

Fixes: QTCREATORBUG-27249
Change-Id: I840beae66314330ce643e159c596e702a0ec3273
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-03-31 07:59:46 +00:00
Miikka Heikkinen
bd8537fc77 QmlDesigner: Run QSB tool for modified shaders automatically
Raw shaders can no longer be used for ShaderEffect, but instead
a precompiled QSB must be used. To facilitate this, we now
automatically run QSB tool whenever a shader file changes.

Task-number: QDS-6472
Change-Id: Ic2886b815c7f428ac393d1d7623105a4e82053ae
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-31 07:02:21 +00:00
Tasuku Suzuki
c49645483e Help: support qt-6 online documentation
Last segment of host part represents version string.
e.g. qthelp://org.qt-project.qtwidgets.630/...

If it starts with "6", let's open qt-6 documentation.
Otherwise, let's open qt-5 as it is.

Change-Id: I88b5f6bd2ebfd8494e48f043678dbc190310b90f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-31 02:15:31 +00:00
Artem Sokolovskii
059d20ed22 ClangFormat: Fix unsaving properties for global settings
- Fixed behavior "Formatting mode" combobox settings isn't
saved after pressing "Ok" button when no one project is
open. Now it works as expected, settings save after press
"Ok" button.
- Added additional applying interface for ICodeStylePreferenceFactory
which allows pass-through apply call from dialog to the editor.

Note: it doesn't work with read-only code style profiles

Change-Id: If4f0c85e3105550db4ffd9860e94b678f0d9b386
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-30 16:32:08 +00:00
Christian Stenger
42d6704c4f ClangFormat: Fix build on Windows and macOS
Amends 355c5a7c73.

Change-Id: I4c350d92766e35fca2230c756fb07772e0524c08
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-30 14:58:49 +00:00
Tapani Mattila
ce4395320f CMake generator: Improve dialog size adjustability
Task-number: QDS-6466
Change-Id: I97cc262405a9a2be0a36217777f2804fb341518c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-30 09:56:48 +00:00
Knud Dollereder
65f747c8f8 Prevent DS from hanging when adding a signal handler
Fixes: QDS-6547
Change-Id: I28d73f88482f4b8eab8222420f0fd513b960c0b5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-30 09:34:41 +00:00
Cristian Adam
a2a8f56b6e CMakePM: Filter out empty key configuration items
There were cases when an empty "-D" CMake command line parameter would
be genered, resulting in a failed CMake project configuration.

Task-number: QTCREATORBUG-27256
Fixes: QTCREATORBUG-27237
Change-Id: Ic26c9dfe72db154cd76fdcc913eb7fe623b3123c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-30 09:27:40 +00:00
hjk
974d37d58a TextEditor: Suppress warning about unused parameters
Change-Id: I159989501b9c5c14b5b452bf7b5d1e27d442775e
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-30 08:41:57 +00:00
Christian Kandeler
1f0ea9ef7f ClangCodeModel: Allow users to set a file size threshold for clangd
With huge source files it might not be so useful to continuously
recompile them while editing, which is basically what clangd does.
Let users opt out.

Change-Id: If3e95c1e286090606a84961d071179f8b40f9180
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-03-30 07:53:07 +00:00
Eike Ziller
b4f2ac0dd4 Avoid status bar flickering while indexing
If you hide the progress details with the toggle button, we show a
progress bar in the status bar, and in case of indexing prefix that with
a details label (n/N). Since these numbers change all the time, the
label changes slightly in size, and if the window is small enough that
leads to the output pane buttons resizing all the time.

Avoid that flickering by restricting the details label to a grid.

Fixes: QTCREATORBUG-27255
Change-Id: I3d031779f9fe1ce960e44e8a65e613c2bac3b107
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-30 07:24:46 +00:00
GPery
f99094a0b8 CppEditor: Fix indentation for structured binding
Structured bindings were parsed as lambdas instead

Fixes: QTCREATORBUG-27183
Change-Id: I3c88dc1012e55edfe417504c17f6138e3356651c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-29 14:21:11 +00:00
Christian Stenger
355c5a7c73 ClangFormat: Avoid interfering llvm libs for qbs as well
Task-number: QTCREATORBUG-24998
Change-Id: I7dbf0f08358ea0dca096074320ac6446c65cfe68
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-29 12:09:57 +00:00
Christian Stenger
f91a9cb891 Android: Fix missing include
Amends 70221cf13f.

Change-Id: I9c7ebc4a494c6b8f4413ed805484e4d40b76297e
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-29 07:04:30 +00:00
Christian Stenger
308ee17e30 Utils: Fix missing include on Linux
Amends c8cee1a234.

Change-Id: Id66587577cb0b1213af743a9ddf9a769f78d0c23
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-28 20:03:08 +00:00
Jarek Kobus
70221cf13f AndroidSignalOperation: Don't kill and reuse the process
Don't kill the process, delete it instead.
Minimize code repetition when starting both versions
of adb process, enclose it in startAdbProcess().
Call deleteLater() and clear the pointer to adb process
from inside adb process handlers. Don't disconnect from adb
process unnecessarily now.

Change-Id: Id77eda562fa7fa4108c52cc839bd73a8032f5f25
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-28 17:02:06 +00:00
Christian Kandeler
e2391574c8 CppEditor: Prevent indenting inside all variants of raw string literals
Fixes: QTCREATORBUG-27244
Change-Id: Icda903bf572081278af34078e4f6243747a7b7ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-28 14:04:15 +00:00
Christian Kandeler
83f6c82752 CppEditor: Show project-specific clangd settings conditionally
That is, only if the ClangCodeModel is enabled, as it was already done
for the global clangd settings. The current mix is an excellent way to
confuse users.

Change-Id: I1d3e7a366172ed972ac1ed04c4b332686a2ffb10
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-03-28 14:03:53 +00:00
Eike Ziller
780f5da7c4 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/studiowelcome/recentpresets.h
	src/plugins/studiowelcome/userpresets.h

Change-Id: Ie573b945eb28347a36ee1b3582fbd6ab0c0f866c
2022-03-28 15:10:11 +02:00
Christian Stenger
93de345587 Utils: Fix compile with Qt5
Amends c8cee1a234.

Change-Id: I8c70a1051704fb82c419b1b24ea7f361622b0f85
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-03-28 12:26:47 +00:00
Christian Stenger
e6de3eeb77 Python: Fix error message
Change-Id: I89531b1af594e11a52be18c4ca3c0112e076d660
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-28 12:18:27 +00:00
David Schulz
bf5114dcee Python: work with Interpreter in PythonRunConfiguration
This saves some unneeded file path conversion and lookups in the
python settings.

Change-Id: I8647858320183dc1da027363b4ab265f6c75e1ae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 12:15:37 +00:00
David Schulz
7cb3a726d4 Python: add PySide installation check on document open
Checks if the document imports PySide and whether the selected python
interpreter can find a PySide installation. If not show a global info
bar that can install PySide via pip like the python lsp server.

Task-number: PYSIDE-1742
Change-Id: I02c0d5f6eb268f3d8826d4fb9d9ec3c7c48b8638
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 12:15:15 +00:00
Jarek Kobus
9f3941cda3 AndroidDeviceManager: Remove the instance from plugin destructor
Delete the AndroidDeviceManager instance on shutdown from inside
android plugin destructor.

Implement AndroidDeviceManager destructor and wait for
futures currently running to finish. Don't do any special
handling for possibly still running m_adbDeviceWatcherProcess,
as it will be deleted automatically by the std::unique_ptr
and this will automatically initiate a proper termination of the
process running.

Change-Id: I5aad6f4fcfca23a0a37c3709efcdffad43a88203
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-28 11:54:51 +00:00
Jarek Kobus
c8cee1a234 ProcessReaper: Move reaping into a separate thread
When reaping a process: do one call to terminate() and after
500 ms timeout (default) do one call to kill() if the process is
still running. When the process finishes, end reaping by
deleting the reaper and its process. Ensure that the state of
the process is NotRunning before deleting it.

Eliminate the need to process events in ProcessReaper's destructor.

This change removes the emergency counter, which could caused
issues when the process was still running and the emergency
conter was above 5. Before, we were forcefully deleting the
running process. Now we wait as long as it's needed for process
to finish.

Since the reaper was operating in the main thread before,
it could happen that ProcessReaper inside the process launcher
could have blocked the launcher's main thread considerably, when
emergency counter exceeded the value of 5 and the destructor
of QProcess was run in turn. In this case the process launcher couldn't
operate and couldn't handle other running processes. This could cause
that corresponding running QtcProcesses on Creator side
timed out. Moving the reaper to the separate thread eliminates
this issue.

Change-Id: Id78953a2aec5cb08dc869621386b6a61a182e81c
Reviewed-by: hjk <hjk@qt.io>
2022-03-28 10:56:05 +00:00
Tapani Mattila
f58add023a Navigator: Add search/filter to navigator
Task-number: QDS-6063
Change-Id: I922a04a46f673befe8811a62342cf2cdd9c61583
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-28 10:47:53 +00:00
Miikka Heikkinen
f0fc3926cb QmlDesigner: Remove obsolete label from asset import dialog
This label is obscured by other controls in the current layout, so
it can be removed. On some platforms it also incorrectly draws on
top of the controls that should be obscuring it.

Fixes: QDS-6554
Change-Id: I3deed0779ea79ded2753b1437b168ef0f45654ab
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-28 10:23:56 +00:00
Eike Ziller
f613df1075 ExtensionSystem: Clarify text in "Problematic Plugin" dialog
If Qt Creator crashed at startup, we show a dialog pointing fingers to a
plugin, the next time Qt Creator is started.

Make clearer that the problem was the _last_ time Qt Creator was
started, not during the current startup.

Make clearer that the "following plugins are disabled too" refers to the
case when the user decides to temporarily disable the plugin.

Change-Id: Ie6cfed2e445b9e5c1598783474ce8a169d82bc3a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-03-28 10:13:11 +00:00
David Schulz
64170a788a Python: extract pythonProjectForFile function to utils
Change-Id: I4055527302cab09f55cd4b06bfd3896accb4832a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 09:29:15 +00:00
David Schulz
ff686f5679 Python: move python name cache to utils
Change-Id: I7f6d13a465be6de90aea64e7f19c92bca3ee6c19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 09:29:08 +00:00
David Schulz
b8c8e0ccae Python: Use specialized document to check for pylsp
Change-Id: I9ea13df7fc04a4fe35d901da179b9c0ebaf57bb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 09:29:01 +00:00
Jarek Kobus
4a6d6d1323 RemoteLinuxEnvironmentReader: Get rid of no-op call to QtcProcess::terminate()
Calling QtcProcess::terminate() is a task for implicit ProcessReaper.
Delete the process later instead.

Change-Id: I0f4f531e7eefff2ca6ecec350fb3c95b97ba4c2c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-28 09:09:25 +00:00