Commit Graph

74059 Commits

Author SHA1 Message Date
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
Samuel Ghinet
90ad0c9500 New Project dialog fix: wrong preset is deleted
The preset to be removed was not selected upon clicking on the "x"
(i.e. delete) button.

Task-number: QDS-6555
Change-Id: I3e7dac0ae78e67fc6236d6b4a9814fae59e40bad
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-03-28 10:18:49 +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
Christian Stenger
de88d00ca4 ClangFormat: Fix build with Qt5
Amends 4022ed547d.

Change-Id: I66fc822443c8353209446cf7973a3db9dc52debe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-28 09:00:23 +00:00
Jarek Kobus
b7153131ff QbsSession: Get rid of no-op calls to QtcProcess::terminate()
Calling QtcProcess::terminate() is a task for implicit ProcessReaper.
Delete the process instead.

Change-Id: Iaa0e735a136ec0f5a21724f620eb2c542dedf48f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-28 08:58:34 +00:00
Andre Hartmann
e3bb18f8e1 Gerrit: Skip non-Gerrit remotes in Push to Gerrit dialog
In my case, I have a second remote gitlab which was
always selected instead the expected remote gerrit.

Change-Id: I7860ea4743dbfa5d1fd4375821474950549e0600
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-03-28 08:08:11 +00:00
Jarek Kobus
65f5fde2e6 AndroidAvdManager: Get rid of no-op call to QtcProcess::terminate()
Calling QtcProcess::terminate() is a task for implicit ProcessReaper.
Delete the process instead.

Change-Id: I92fe34a18e15ca95f6bab2b7932faeee8b92621d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-28 07:46:00 +00:00
Thomas Hartmann
dc6dbbf082 QmlDesigner: Add support for object properties
property QtObject: myObject: QtObject {}

Change-Id: I1f1428bdb383c31fd2976bd7ac69087da54d1044
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>
qds/v3.2.0
2022-03-25 21:44:16 +00:00
Thomas Hartmann
6271b7ad85 QmlDesigner: Fix TransitionEditor for cpp types
Task-number: QDS-6537
Change-Id: I800dbba7e5ac67908ae9ff7b1717910472cf4c81
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-25 17:07:55 +00:00
Jarek Kobus
dcc61b854a IDevice: Add rootPath() method
May be useful for constructing other remote paths.

Change-Id: I83b647f657565bf99e507a1821cf1c3c49a100bb
Reviewed-by: hjk <hjk@qt.io>
2022-03-25 15:02:31 +00:00
Eike Ziller
d8d9a381ac Add missing changelog item
Change-Id: I790e2482a8b1637ebcc2f13a1cdeca9e5925814e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-25 14:59:55 +00:00
Artem Sokolovskii
4022ed547d [ClangFormat] Remove redundant checkboxes
- Removed redundant checkboxes
- Removed apply button
- Combined checkboxes to combobox

ToDo:
- Specify behavior for global and project settings

Change-Id: I39a00ac8439ae7be3041890f7fc882849685d102
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-25 14:17:48 +00:00
Christian Kandeler
b97c9494af ClangFormat: Adapt to LLVM 15 API change
Task-number: QTCREATORBUG-27170
Change-Id: I3676792da351f52199b1bf303c596e581469d7a5
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-25 13:36:50 +00:00
Christian Kandeler
a3e0b139de TextEditor: Make sure cursor is visible after refactoring
Fixes: QTCREATORBUG-27210
Change-Id: I612f6e91188730d6abdfef3f2fe8a286fcec4831
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-25 13:31:36 +00:00
Jarek Kobus
ed94e0c066 Archive: Avoid calling blocking stopProcess
Make Archive constructor public.
Make the caller responsible for deleting the Archive object.

Don't automatially run the unarchive process when constructing
Archive object. Provide a start() method, to be called after
the caller has connected to Archive signals.

Add Archive::isValid() method.

Remove Archive::unarchive() gui overload, as it's unused.

Make sure we don't leak the Archive object in
AndroidSdkDownloader.

Change-Id: Idf67262554cdfef50aef4a2234b6a5089110f9a2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-25 12:49:19 +00:00
Jarek Kobus
41f9962ea6 AndroidDeployQtStep: Don't handle unfinished lines separately
Automatic handling of unfinished lines should be fixed
in cfe8b7ad88

Change-Id: I9f4bcf876ce5d7d51b651b6e997b7891d4483c56
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-25 11:15:54 +00:00
Aleksei German
ff8d672fa2 QmlDesigner: Update MCUs metadata for MCUs 2.1
Task-number: QDS-6535
Change-Id: Ibe9914ddfc48823c8fc4c2b3bc48a06cf6e936bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-25 10:33:30 +00:00
Artem Sokolovskii
9f63aeb781 Wizard: Remove warning
Fix misspelling

Fixes: QTCREATORBUG-27220
Change-Id: I279ec8982a23aecae099e0062c77e7f1128beb71
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-25 09:54:04 +00:00
Assam Boudjelthia
5f16074cb3 Android: rephrase sdk download popup question
Remove the double column, put the path in new line to avoid potential
word wrap at the start, and surround it with quotes.

Change-Id: Ifb33e4efaaa13342bfc3a75fc58d67e359e4e804
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-25 09:23:52 +00:00
Assam Boudjelthia
b6c83df7d9 Android: move SDK Manager to separate dialog
Hide the SDK Manager into own dialog which reduces the visible
elements on the Android Settings page by default. The dialog
will be brought up when installing essential packages for example.

Also, the dialog can be opened manually via a new button, which
makes it available on demand instead be there in the front all
the time, because that SDK Manager UI is needed only when installing
packages which doesn't happen often.

Change-Id: I09b92ae7b10673ba520da9ffd98d8120e1aaf104
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-03-25 09:23:37 +00:00
Assam Boudjelthia
20c0d93f7d Android: add option to connect physical device over wifi
Android's ADB allows connections over wifi, firstly, a port needs
to be opened from the device, then adb commands can be used to
connect the host to the device over an ip and port. Afer that,
a device can be disconnected from USB and the wifi connection
could be used to do all jobs that were done over USB.

The setup operation require the device to be connected via USB.
This can replace the manual process of dealing with ADB commands
to prepare the connection.

The "Setup Wifi" action is only added to Hardware USB devices,
and not AVDs nor physical devices that are already connected over
WiFi.

Change-Id: I37897a528b45cdeee2764071ec45ec1b3316cdbb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-25 09:23:12 +00:00
David Schulz
b165e5f0ad Utils: add tooltip parameter for info bar controls
Change-Id: I395dea4240d09b3721a24e04016c6db4076449b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-25 08:26:48 +00:00
Jarek Kobus
5924716e21 AndroidSettingsWidget: Fix some issues
1. Don't create gitCloner if we are not going to start it,
   i.e. when we early return with QMessageBox::information().
2. Pass a context object of *this into gitCloner connection.
3. Don't kill the gitCloner, deleteLater() instead.

Change-Id: Ibb68627ed8d16e2dc43c9d63761609c8b8c82db0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-25 07:05:05 +00:00
Thomas Hartmann
aabff7bd35 QmlDesigner: Fix puppet crash with DelegateModel
Change-Id: Ibe42b87b6364c78157c54504f00354bff8bb4b23
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-24 17:10:55 +00:00
Christian Stenger
d7bcd19db6 StudioWelcome: Fix missing include
Amends 618eda3572.

Change-Id: I1f6bc42152154ccfd256cd2e2f475c0e6ba534dc
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-24 12:20:41 +00:00
Christian Stenger
2c08f14ee0 SdkTool: Fix qbs build
Amends e3aad67ce5.

Change-Id: Ic62dd47fbaa70092f39bdfd5d2dd6870a4aaec00
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-24 12:19:24 +00:00