Commit Graph

74059 Commits

Author SHA1 Message Date
Samuel Ghinet
fe4d8e3eda Fix tooltip text in 3D Editor toolbar background color button
Task-number: QDS-6585
Change-Id: I397de9ac51b69697234f5f0dc48b90f330ec49d2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-02 13:32:43 +00:00
Cristián Maureira-Fredes
ba693efdd3 python: update docs related to using ui files
This changes the tutorial described in the Creator docs
for the UI-based Python application.

The main reason is that loading an ui file is not recommended,
and discouraged over using uic tools to generate Python code
from ui files.

Some changes to code styling were included to the file as well,
mainly the exec_() to exec() changes.

Change-Id: Ibe1f4d62d2252edecd5f3475250f1287d8213faa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-06-02 13:31:51 +00:00
David Schulz
b9034e8426 Python: support python 3 mime type in language client
Change-Id: I9319442aecc61e854aaeb0778b959086a70d431b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 13:29:17 +00:00
Thomas Hartmann
a734e1b4e8 QmlDesigner: Move reparenting of materials into transaction
Without a transaction we will reparse the document for each reparent.
This will make the process very slow if there are e.g. 20 materials
in the document.

The new parent has to be created first. This cannot be part of the same
transaction, because of limiations in the rewriter.

Change-Id: Ie2c587d0f072b8163846c660dc2dd66bee7146c1
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-02 13:21:20 +00:00
hjk
6bbddf115c Utils: Retain more high level information on EnvironmentChange::Item
Change-Id: I78df3cf7ae767d6baeed46f03587ee21875c8315
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-06-02 12:49:43 +00:00
Christian Stenger
87b0f2a354 QmlDesigner: Fixup compile fix
Use explicit type for local variable to have a consistent
approach. Amends 6469f99.

Change-Id: I6b7612e1f646e497699e278e4538f9cb4ae37c64
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-02 12:39:06 +00:00
Piotr Mućko
3b02d7b32a McuSupport: Use legacy implementation for QtMCUs 2.2
New implementation of mcu support plugin is not yet finished
so we should use legacy implementation for QtMCUs 2.2 JSON kits.

Change-Id: I8e6a8b7af2c3b4683bb19a5f05edd6ff5df46e5b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-02 12:38:47 +00:00
Christian Kandeler
01ceb3a3cb ClangCodeModel: Switch to LSP-based UI header approach
Generating ui headers in a well-known path and then including that one
in the compilation database does not work in the presence of multiple ui
files with the same name.
As it turns out, we don't have to generate any files at all; instead, we
pass the file contents directly to clangd, which then uses them when
parsing includes of the respective header.
User-visible behavior change apart from the abovementioned bug fix:
Tooltips and "follow symbol" on the include directive now always use the
actual location of the header provided by the build system.

Fixes: QTCREATORBUG-27584
Change-Id: I6b13e12cb3a365199567b0bc824d12b373117697
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-06-02 11:29:14 +00:00
hjk
5de18c67f0 Utils: Make Environment has-a NameValueDictory instead of is-a
We need a somewhat more wholistic approach on how to communicate
environment data and changes in the code, a single fixed map
doesn't cut it.

Change-Id: Ifbed254e7e0f4a76f8627e77030889c326f551d4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 10:55:56 +00:00
hjk
9524a3f025 ProjectExplorer: Make target device for executable aspect explicit
Just run and host is not enough, build device is needed, too.

This fixes the MakeInstall step for remote linux.

Change-Id: I3ec797379b7d0d5842780d505d8b87a91286e460
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 10:55:23 +00:00
Christian Stenger
beb28f8199 QmlDesigner: Fix Qt5 build
Amends c3b90c0ce5.

Change-Id: I16e37678a7981c22c62eaf772c6d8f4f15594bac
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-02 10:01:02 +00:00
Mahmoud Badri
d47ad10728 QmlDesigner: Fix small typo
Change-Id: Ic3fb65b8f8ecf80dcf65c21f5f3e5a35c42d0735
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-02 09:51:51 +00:00
Thomas Hartmann
57cb9d888b QmlDesigner: Fix potential crash
Change-Id: I85e5b7d8f03e270540294a20ccc24658943a2c9b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-02 09:19:19 +00:00
David Schulz
b9627ddba7 Python: add pyside uic extra compiler
To be able to autocomplete code from .ui forms we need to feed the
python language server the compiled form. The uic extra compiler
generates a temporary ui_name.py file for uncompiled or unsaved ui
files. These files are inside a folder that gets appended to the python
path environment variable for the python language server.

Change-Id: I9f48d2012162f33986639315189c41e0a7e0dad2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 09:09:22 +00:00
Jarek Kobus
d8b404a1a3 CppEditor: Get rid of usages.h
Change-Id: I28d8a5f83f87329c2389b0ad99db006d7efa6dc3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-02 09:06:39 +00:00
Jarek Kobus
170527ae23 CppEditorWidget: Get rid of unused methods
Change-Id: Idb3b14089b8eb833530834ffb5583dda0b8917de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-02 09:06:28 +00:00
The Qt Project
62f330219a Merge "Merge remote-tracking branch 'origin/7.0' into 8.0" into 8.0 2022-06-02 09:06:12 +00:00
Miikka Heikkinen
ffe94d177c QmlDesigner: Fix corrupted preview images in material editor/browser
Now a default preview image is shown if real preview is not yet
available.

Fixes: QDS-7055
Change-Id: Ia2f9ee3aa3b29f49224b6ba8ae8f22f1b36f629a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-06-02 08:55:47 +00:00
Eike Ziller
68c5968447 Merge remote-tracking branch 'origin/7.0' into 8.0
Conflicts:
	src/libs/utils/launchersocket.cpp

Change-Id: I7ec649485bb7fc7c299b571d92519d2b7fc9506b
2022-06-02 10:54:10 +02:00
Jarek Kobus
8cd9a2dd12 ModelManagerSupport: Get rid of UsagesCallback from findUsages()
It's not used currently.

Change-Id: Ic3625b0f3c53c09089a361453f29ac639692cffb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-06-02 08:52:55 +00:00
Mahmoud Badri
e1bb5d058d QmlDesigner: Mark unused params in material editor and browser
Change-Id: I5d1e2dcd340e766f829fe78edb63dfa8beacfa78
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-02 08:50:26 +00:00
Jarek Kobus
b9f0663741 ModelManagerSupport: Get rid of UsagesCallback from globalRename()
It's not used currently.

Change-Id: Id859251f69abf33de3431d1e8b561aedefbb4651
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-02 08:41:33 +00:00
Christian Stenger
6469f99995 QmlDesigner: Fix build with tests
Amends c3b90c0ce5.

Change-Id: I52eee2e9bcf78a1fb7315927efc861115b96a16a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-02 08:06:43 +00:00
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