Commit Graph

62421 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Thomas Hartmann
255f7f836f StudioWelcomePage: Disable data download by default
QML/Designer/EnableWelcomePageDownload is not set,
no download or probing will start.

Change-Id: Icadd29b2a8c0439ebd8435b987647f5d6f7167a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-05-31 06:54:42 +00:00
David Schulz
3ad82a66f9 Python: move pyside detection to runconfig
Change-Id: I781c4d005ced0c884081616696eae7f738f38c6f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-31 05:59:45 +00:00
hjk
0f470982de PerfProfiler: Remove now-useless check for process success
The check nowadays always succeeds, the potential failure is handled
in the normal done() handling.

Change-Id: I858633871a6b66817c795e7057964afebf79eb85
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-30 16:19:14 +00:00
hjk
a33594fa76 QmlDesigner: Sprinkle code with Q_UNUSED
Less noise when compiling.

Change-Id: I7cac44912d5d5165f25ce411db6c6de486688c45
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-30 14:50:42 +00:00
hjk
2837f4d777 ProjectExplorer: Pass macroexpander (again) to WorkingDirectoryAspect
Broke with 8dacb123e0.

Probably calls for a more centralized approach again. Later.

Change-Id: Ibf52487d68d7938d4b5dfb38f1f0a5b0e1a97bc3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-30 14:45:47 +00:00
Miikka Heikkinen
f6fdcfef53 QmlDesigner: Remove a couple of work around puppet resets
The issues that were worked around by these resets have been fixed.

Fixes: QDS-7009
Change-Id: I7940b55c3f3edcfdcde9ad5f41cfa1d188d2bc96
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-30 14:23:10 +00:00
Miikka Heikkinen
80ea026fd8 QmlDesigner: Refactor library icon generation for imported 3D assets
Previously, icon generation was done at import time, but that was
wasteful, as we now have image cache backed icon generation
available for component library icons. Added the few remaining missing
bits to support icon generation for image cache and disabled the old
icon generation implementation for Qt6.

A few issues in fit algorithm for preview image generation were also
uncovered and fixed to make icons render scene in comparable size to
the old version.

Qt5 imports still generate using old way since component library
3D previews generation doesn't work on Qt5.

Fixes: QDS-6205
Change-Id: I5418fa19d86e81adcd184be023f1dfbc813d0bf5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-30 14:16:53 +00:00
hjk
17ee387756 ProjectExplorer: Dissolve a few uses of Runnable
Change-Id: I71b8f1b00e488360e7f9c136912bc64b5a76609a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-30 14:10:59 +00:00
hjk
d325f56cc1 RemoteLinux: Prepare new aspect data extraction for X11Forwarding
Following the ArgumentsAspect precedence for MacroExpander.

Change-Id: Id3f58a994eb03911f7c864d66e06cf9571a1e3db
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-05-30 13:41:32 +00:00