Commit Graph

76686 Commits

Author SHA1 Message Date
Eike Ziller
bb5137d14a Merge remote-tracking branch 'origin/master' into 8.0
Change-Id: I37b000ea6ea6b5d8c4ac8ed9bf371bc91c14723e
2022-06-02 09:48:39 +02:00
Cristián Maureira-Fredes
ba22a5bdf9 python: add wizard project based on uic
This includes a new template that allow users to create
a UI based project, but without a dynamic loading.

To get the initial empty window, the user needs to use
a 'uic' tool to generate Python code from a UI file first.

This tool is different for PySide2, PySide6, PyQt5 and PySide6.

Change-Id: Ic12fe23696bf3b18eaf240ffac03e9bd92a5455b
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-02 07:05:15 +00:00
Christian Kandeler
958531adbf Revert "QtSupport: Add support to register Qt versions via qtpaths"
The patch breaks several plugin unit tests; at the very least QtSupport,
AutoTest and ClangCodeModel.

This reverts commit 72aa77ced7.

Change-Id: Iaa7f452d0f43d0072b0bbcf8934fa0dcd6f9b240
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-06-01 14:24:20 +00:00
Artem Sokolovskii
92b3a51358 QMLPlugins: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: Ie3e3ec9fdaea856943e5325cabd21e52bf290e70
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-06-01 13:47:19 +00:00
Jarek Kobus
57e705b616 Merge AbstractPackaginsStep with TarPackageCreationStep
Change-Id: I754d46df144fa4cc4d9715a22b85b12e38828ff6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-01 13:06:18 +00:00
Jarek Kobus
6698c4dff0 RemoteLinux: Add more forward declarations
Change-Id: Ie1182248e3b423ce3b85a2baf0c2d7be74de1126
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-06-01 13:05:10 +00:00
Jarek Kobus
4b5fd6740f Rename RemoteLinuxCheckForFreeDiskSpaceStep
... into CheckForFreeDiskSpaceStep

Change-Id: I217c9f6b618f8e88aba64af07736c2966a76c782
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-01 13:05:00 +00:00
Jarek Kobus
29e0f4dd97 Rename RemoteLinuxCustomCommandDeploymentStep
... into CustomCommandDeployStep

Change-Id: I67e4d74f6df76ad301cb45926ecc550d9275d779
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-01 12:53:08 +00:00
Jarek Kobus
0386c101e9 Rename remotelinuxx11forwardingaspect.h into x11forwardingaspect.h
In this way we match the filename with a class name.

Change-Id: Ie0ae686b15aa27e2e00557ee32c6f84b956cf855
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-01 12:47:16 +00:00
Jarek Kobus
9ce6ad6a06 RemoteLinux: Hide RemoteLinuxPackageInstaller
Remove AbstractRemoteLinuxPackageInstaller, as we have
only one subclass.
Don't export RemoteLinuxPackageInstaller, as it's used
only by TarPackageDeployStep.
Rename RemoteLinuxPackageInstaller into TarPackageInstaller
and hide it inside tarpackagedeploystep.cpp.

Change-Id: I1dacdeda58378911cc322b9991f4f584c074db1b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-01 12:46:11 +00:00
Jarek Kobus
cda2e97ce5 Rename UploadAndInstallTarPackageStep into TarPackageDeployStep
Make class name shorter and consistent with others.

Change-Id: I7102c981848b2a2854421d5b8b947dea81a1799a
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-06-01 12:42:34 +00:00
Jarek Kobus
f921578a67 EnvironmentAspectWidget: Add addWidget() method
Replace additionalWidget() getter with addWidget() setter.
Remove additionalWidget from c'tor.

Change-Id: I955e00228ed9b6b49535569be782793c3bafccb8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-01 12:38:28 +00:00
Jarek Kobus
cb2894a51f EnvironmentWidget: Devirtualize aspect() method
The RemoteLinuxEnvironmentAspectWidget subclass was
overloading it, however, it was returning the
subclass of EnvironmentAspect (i.e. returning
RemoteLinuxEnvironmentAspect).

Instead, we use the base aspect() method in
RemoteLinuxEnvironmentAspectWidget subclass and we
cast it into expected RemoteLinuxEnvironmentAspect class.

Move some methods into protected section, as they
are used only in subclass.

Use qobject_cast instead of dynamic_cast inside
UploadAndInstallTarPackageStep.

Change-Id: Ic3119ca15d46187e0aa7b8b4013e7fc4efec4bd9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-01 12:33:54 +00:00
Cristián Maureira-Fredes
c926ca2321 python: update wizard code style
- Updated the current code to use recommended code style
- Modify description of current wizards
- Adapt the documentation to reflect the new names of the applications
- Adapt exec() call for PySide6 (and leave exec_() for PySide2)

Change-Id: Iad662523b8a0e56ac622b21cee60f7928d419354
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-01 12:06:46 +00:00
Samuel Ghinet
e5ce1f98f7 Fix build error: Allow changing the 3D Editor's background color
Task-number: QDS-6585
Change-Id: Id87e5403a3c6d398aa9ebf85cc97cc4c9bf7a2a2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-01 11:59:16 +00:00
Eike Ziller
ffe1ff2368 GitLab: Fix warning "lambda capture not used"
Change-Id: Ife9c83a9cf8302800c9ad14e1e349a7688240717
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-01 11:46:42 +00:00
Jarek Kobus
f301bb3f97 QtcProcess: Fix behavior of kill()
Make it behave more like QProcess::kill().

Before, when QtcProcess::kill() has been called,
the process launcher was putting the process into the
reaper and notified the QtcProcess that it was already killed,
while in fact it could still be alive for a while since it
was in reaper's hands. The current fix makes the behavior
similar to what QProcess does when calling kill(). So now,
in case of a call to kill() the process isn't put into the reaper yet,
so it has a chance to report back the finished signal when the
process was really stopped.

We still use the old behavior of putting the running process
into the reaper in case of a call to QtcProcess::close() and
when d'tor of QtcProcess was called. We don't report back the
confirmation about putting the process into the reaper, since
close() is always called from ProcessLauncherImpl d'tor, so
there is no one to receive this confirmation anyway.

Change-Id: I665e7c8fb1a391dda30c86389259961e715926d6
Reviewed-by: hjk <hjk@qt.io>
2022-06-01 10:32:22 +00:00
Eike Ziller
345c8caa03 Merge remote-tracking branch 'origin/master' into 8.0
Change-Id: I0ab7200a8696e52122b2739cbc740e940336f962
2022-06-01 12:23:29 +02:00
David Schulz
4ab935349f LanguageClient: disable diagnostics after document changes
Calculating new diagnostics after a document change can take a while.
The old ClangCodeModel disabled diagnostics (changed the color to gray)
that were reported before the last document change after some time.
Adapt this behavior to Clangd and other LSP based codemodels.

Change-Id: I0589ba0d0c023f6e7ea3e97fc5b45eb156ddcd37
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-01 10:12:59 +00:00
Samuel Ghinet
c3b90c0ce5 Allow changing the 3D Editor's background color
Task-number: QDS-6585
Change-Id: Ibcac69d3792b521b29dfbdce2d49557d36de99a9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-01 09:57:05 +00:00
hjk
16aaf8c59c Valgrind: Clean up a bit after class merge
Change-Id: I1df02a93ebca318424461c3e48b9bb51133eec8d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-01 07:56:39 +00:00
Alessandro Portale
72aa77ced7 QtSupport: Add support to register Qt versions via qtpaths
qmake is a "build tool", and it is also a "query tool" when called with
parameter "-query". Qt Creator, so far, assumes that building and
querying with a Qt installation are done with one and the same tool:
qmake. This change adds the ability to register a Qt version vie either
qmake or qtpaths and still build with qmake, if that is installed (which
is not anymore mandatory from Qt 6 on).

1) Distinguish between Qt query tool and qmake build tool:
Add QtVersion::queryToolFilePath() to the existing
QtVersion::qmakeFilePath(), and use queryToolFilePath in most "query"
related code, and qmakeFilePath when building with qmake (e.g. in
QmakeProjectManager).
Also, a couple of functions and variables were renamed from *qmake* to
*queryTool* in order to express that the affected code is about
querying/managing Qt versions rather than about building with qmake.

2) Support manual Qt Version adding by qtpaths via file dialog
This change adds qtpaths to the "Add" Qt Version file picker filter.
After selection, "qtpaths -query" is executed for testing purposes. If
that fails, (e.g. because it is an older Qt version), qmake is instead
chosen, silently.

Task-number: QTCREATORBUG-22175
Task-number: QTCREATORBUG-25546
Change-Id: I4d9c1e7eec7d5ae7c5a8d2e1a1ed95addff69966
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-01 06:09:48 +00:00
hjk
79236605fd RemoteLinux: Fix X11ForwardingAspect's data extraction structure
Amends d325f56cc1.

Change-Id: I5d21e04037edd0677ee3cc8265f1d8706849f832
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-31 16:45:42 +00:00
Thomas Hartmann
d99a6d2efe QmlDesigner: Fix wizards
Since we define an import for QtQuick to distinguish between
Qt 6.2 and Qt 6.3, the way we determine "IsQt6Project" was broken.
This patch reuses "IsQt6Project" now to determine the default style name
and if we need a versions for imports.

Task-number: QDS-7053
Change-Id: I7b5fc0b76e71c2874f5e6ac8457ba1deb87bb999
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-31 14:30:57 +00:00
Eike Ziller
351f0301de Un-virtualize Command and remove an inheritance
This was a left-over from times where we had a QShortcut variant of
Command, which was removed in Qt Creator 3.2.

Change-Id: I62a728f3af352c61bc137461232fc1ed8debccf2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-31 14:19:38 +00:00
Adam Treat
383ea8a361 Docker: Fix bug with cmake warnings for compiler path with docker kits
Task-number: QTCREATORBUG-26857
Change-Id: I6400008d489167e43f0c34d95841140697dd62de
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-05-31 14:17:44 +00:00
hjk
abd289190e Valgrind: Inline CallGrindController into CallgrindToolRunner
No functional changes.

Change-Id: I3b73da69e20e4d0324c582544c67a84eac8dbdab
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-31 13:50:13 +00:00
Mahmoud Badri
c9b140eb7e QmlDesigner: Correct asset to material editor dnd behavior
Only check the first asset when dnd multiple assets to be in sync with
the dnd handling in the QML side after drop.

Change-Id: I32ecf6be87284dc8e32f51f674ba082fab7cad7a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-31 13:06:01 +00:00
Miikka Heikkinen
c789186418 QmlDesigner: Handle picking of models under View3D component properly
If a model defined inside the View3D component is picked on 3D editor,
the parent View3D is selected instead as there is no instance for
the model itself. This is similar to how Node based component picking
works.

Fixes: QDS-6934
Change-Id: I4f273972da8cb1c55f03cab323dd9804a5d10def
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-31 12:02:49 +00:00
Christian Kandeler
b1e73ca45d ClangCodeModel: Try harder to catch bogus AST ranges
String literals that are adjacent after preprocessing are reported as a
single AST node, leading to potentially wrong highlighting.
We can catch this condition at least for the case where there are
semantic tokens in between the string components.

Fixes: QTCREATORBUG-27601
Change-Id: If023d06db74bd6cfefa670649f0e733ceaaede2d
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-31 11:38:41 +00:00
Jarek Kobus
fc2f3983bc QtcProcess: Don't merge ready read signals
We store pointers to signal objects inside m_signals list,
so we can't easily merge the old ready read signal with
the new one, since when flushing the m_signals from the main thread
we are taking copy of m_signals, but this copy still holds
the pointers to the original objects, and using them outside
of locked mutex isn't safe.

The possible solution would be to store simple data structures
instead of signal objects allocated on heap. However, there is
not really much gain of merging the ready read signals, so we
get rid of it.

Task-number: QTCREATORBUG-27578
Change-Id: Idd19a6fc1ebb4ccab1e4e367cfeb3f2f02a35512
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-05-31 11:27:14 +00:00
Christian Kandeler
6e358cbdd4 CppEditor: Switch off "remove using namespace" quickfix with clangd
There is an equivalent tweak in clangd.

Change-Id: I895750f1e942f82da94f441b56b8a7d660ba7086
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-31 11:16:50 +00:00
Christian Kandeler
51b6aa7649 ClangCodeModel: Move highlighting code into its own set of files
No functional changes.

Change-Id: If6e5da7e79bf39e564f0f38520ae088f76543642
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-31 11:15:13 +00:00
Christian Stenger
dd27901759 GitLab: Allow fetching events
Projects that are linked to a GitLab instance will now fetch
notifications for this project and print them to the vcs output pane.

Change-Id: Ifb960e64b30a260327efb28a3dfd26f6457503a0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-31 10:47:11 +00:00
hjk
cd1af2864b ProjectExplorer: Slim down PEPlugin::runningRunControlProcesses()
Accessed only from the (semi-dead) GammaRay plugin which does not really
use it.

Change-Id: Id4149a23869a8d9ceb1c31a3a380bbad32e3981b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-31 10:34:19 +00:00
hjk
b17bbcff38 Debugger: Use USVC extra data more directly
Not nicer, but more similar to the rest of extra data, so one
approach less.

Change-Id: I2c9a3a041ab3f017f3350c0399d57feeb422048c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-31 10:16:57 +00:00
Christian Stenger
dcfa15ff17 GitLab: Allow browsing and cloning projects
Change-Id: I1cc877ea6b5a55ae7bdb8e7a529afeb08d09e0c0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-31 10:13:06 +00:00
Miikka Heikkinen
9b5c8448f0 QmlDesigner: Fix 3D application wizard quick3d import version handling
Change-Id: I80eecdcd5ac9938715b084bd8b89c82d62aa7323
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-31 09:12:16 +00:00
Mahmoud Badri
175343e24a QmlDesigner: Highlight material editor properties upon asset drag
When starting an asset drag in the assets view, highlight all
supported properties in the material editor.

Change-Id: I60935756e4c1384edcc284068163d08ebe529a05
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-31 08:57:43 +00:00
Christian Stenger
b336ebafc3 QmlPuppet: Silence warnings
Change-Id: I25ebc3b33d5e636176f87af35ee2316e302f233a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-31 08:32:29 +00:00
Jarek Kobus
add9abd672 GenericDirectUploadService: Fix error handling of stat process
Don't rely on error detection based on error string contents.
The translators may have provided empty strings (by mistake) and
this may influence the behavior.

Change-Id: I035ead2ddd93787b268798607d3f856981f0c862
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-31 08:24:00 +00:00
Jarek Kobus
a7fa8c46ee LinuxProcessInterface: Fix error reporting on failed to start
Change-Id: I2af4a13289458e6270452a254cf90f7bd9cc3684
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-31 08:12:48 +00:00
Jarek Kobus
21d3f0d51e LoadCoreDialog: Use FileTransfer for download
Change-Id: I032eceb85af3416e2488f8ba34ef4092f4aacd8d
Reviewed-by: hjk <hjk@qt.io>
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-31 08:12:41 +00:00
Jarek Kobus
8a1f091bf0 SftpFileTransfer: Fix error reporting
Use "-b" option of sftp command for providing batch file
instead of setting a standard input file for sftp process.

In order to fix showing the authentication dialog
we explicitly pass -o BatchMode=no before the "-b" option,
which should re-enable the interactive mode before
processing batch file.

Change-Id: Iaf3c93929c08fd61373003e394a08439d05fe27e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-31 08:12:33 +00:00
Henning Gruendl
0a84ef4b2c QmlDesigner: Refactor ImageCache
Move the ImageCache from the ItemLibraryView to a
more centralized location.

Change-Id: Ic0721976650dad8af26c29b50fed8aec0fffbf75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-05-31 08:06:10 +00:00
hjk
1976630bbc Valgrind: Inline ValgrindToolRunner::executable
Change-Id: Ia714a5a322ae56b07360871f584ec6f9f1babb5b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-31 07:58:46 +00:00
hjk
6431b02947 ProjectExplorer: Derive RunControl::displayName from exectuable
Unless explicitly provided. Less user code.

Also, de-virtualize RunControl::displayName, it's never overridden.

Change-Id: Ibd315aac3c478d993e984af20f7df9077dffe634
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-31 07:58:39 +00:00
hjk
1ffe32187a ProjectExplorer: Remove RunWorker::runnable()
A convienience function that leads to an interface that's "too stiff".

Change-Id: Ide2e5fd991707d08690e7e384e9048a30e0828f4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-31 07:36:38 +00:00
Aaron Barany
449334e419 LanguageClient: Avoid crashes when language client is invalid
This can occur in situations such as clangd crashing. A similar guard is
used in the perform() function, but can still crash in cancel() or
handleSignatureResponse() if the client is destroyed beforehand.

Fixes: QTCREATORBUG-27096
Change-Id: Ib33d306c5411bc31bc13de399e6c2ad0a89462f4
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-31 07:14:20 +00:00
hjk
bc3c4d7453 Dissolve RunControl::setRunnable
Change-Id: I52aea3bea0c4ea90a448f5a77bfa01414bc56702
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-31 07:13:05 +00:00