Commit Graph

76587 Commits

Author SHA1 Message Date
Orgad Shaneh
d63bfa4a29 VCS: Simplify submit editor accept/close flow
* Replace message box with an error on the output pane.
* Separate logic for accept and close.

Change-Id: Ib9fa201a1a67ee195086f7a22bc6678a9642452a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-10-25 19:19:40 +00:00
Tim Jenssen
aa33927651 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.h

Change-Id: Ib029a830ee99190bc4ea2ad75d9300bfa86b42d9
2022-10-25 19:02:15 +02:00
David Schulz
0944bfb7f0 Editor: Fix find usage position in context menu
Do not add the find usage action to an editor context menu if it is
already there.

Change-Id: I0a98d81ae0e08be69ca2579af5701b5fbc8ccbda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 15:05:38 +00:00
Christian Kandeler
13f40f5471 Utils: Add sorted() function
For simpler calling code.

Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 14:29:45 +00:00
Philip Van Hoof
55b8ab7846 cppeditor: make it possible to ignore patterns
Allows the user to ignore certain patterns so that these files wont
be indexed

Fixes: QTCREATORBUG-28313
Change-Id: I2a860a473ca1a267e9fab31436fc98b8f4004484
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 13:46:02 +00:00
Marcus Tillmanns
d46a079744 Utils: Fix copyFile to include permissions
Also adds line breaks to info output.

Change-Id: I314ab87a47d7bd7541acb6a1553238fcfc27099d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-25 13:31:10 +00:00
Marcus Tillmanns
b9062e9c80 Debugger: Fix crash on start debugging
Change-Id: Iff517a977f85bd4ac6e1fdac502797f2455ae6f6
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 12:18:15 +00:00
Miikka Heikkinen
001d55e1f0 QmlDesigner: Fix empty texture source after drag to map property
FilePath::toUrl() returns an empty url if filepath doesn't have
scheme/host set. This seems to be Qt 6.4 issue.

Worked around the issue by just assigning the relative path directly
without converting to url first, as I don't think there's ever going
to be a case where the filepath will have proper scheme/host here.

Fixes: QDS-8044
Change-Id: I37ae3875bf4386cffc122fd3b030f2b0bf068269
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-10-25 10:09:18 +00:00
Jarek Kobus
866a658b42 Get rid of unneeded includes of RunControl
Removed also some other includes that were marked
with yellow triangles. In some cases includes of
runcontrol.h were substituted with other includes,
like qtcassert.h.

Change-Id: Ica40f68198c7f8f70e6047acb2eddc8ef017e43d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-10-25 09:49:13 +00:00
Miikka Heikkinen
a0a8bf2245 QmlDesigner: Fix puppet creation in 3D asset importing
Fixes: QDS-8038
Change-Id: Id7d2b681253fca5afd2611aacccd6aef2ec23b40
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-10-25 09:19:52 +00:00
Christian Stenger
6cc47de5b1 PE: Do not use setVisible() before having a parent
Fixes shortly popping up floating widget on the Build & Run
settings page.

Change-Id: I8bcc887ae73b9cb27f690548d0e98038fb757674
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-25 06:43:24 +00:00
Robert Löhning
c72a93599d Squish-Tests: Use QTC_DO_NOT_PROPAGATE_LD_PRELOAD
This is a reaction to an change in Creator's handling
of environment variables. Creator now passes on
LD_PRELOAD set by Squish. This results in build errors
and crashes of started applications.

Change-Id: I39cf21c60a474d7453e9c29fd3eaf32d3f0d6806
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 19:20:07 +00:00
Miikka Heikkinen
b662c50e0a QmlDesigner: Fix node creation via 3D view context menu
Relevant code was commented out in a previous 8.0->master merge as
there were some conflicts caused by API changes in some components.
Updated the code to use new APIs.

Fixes: QDS-8045
Change-Id: I20f1dd700a2c1864151372624f4ceb1415b76f04
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>
2022-10-24 12:24:41 +00:00
Leena Miettinen
85cf6f3365 Doc: Describe Configuration field in CMake build settings
Update screenshots.

Task-number: QTCREATORBUG-27876
Change-Id: Ib0424bef44ac29078a86445da5032011ffc7ff94
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-10-24 12:19:52 +00:00
Christian Kandeler
a459ee5d24 ClangCodeModel: Re-enable renaming via clangd
The hard rename limit is gone, see https://reviews.llvm.org/D136454.
Make the feature opt-in for now, as we still need to do some UI fine-
tuning

Change-Id: Ic631a5b39711c6f37fffeeec4d2a5f5bf3bde92b
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-10-24 11:44:51 +00:00
Christian Kandeler
8662470aba CPlusPlus: Allow " = default" also on function implementations
Note that we only make sure not to trip over valid code; we make no
effort to check whether default/delete is actually allowed at this
type of declaration.

Fixes: QTCREATORBUG-28102
Change-Id: Ic693319b9dfaf8652cf4cae9cd907a6e258ad773
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 11:43:21 +00:00
Daniele Bortolotti
16261ad472 McuSupport: Improve version detector logic
McuPackageDirectoryVersionDetector class name was misleading,
McuPackageDirectoryEntriesVersionDetector better describes its
purpose as it can be used to search for a regex match among the
entries in packagePath filtered by filePattern. Also, remove
isFile boolean member variable since is not needed for current
use cases, ie Renesas Graphics library (RGL), and filePattern
can be used instead.

Also, improve version detector creation logic. If no filePattern
is present in the Json kit file, the regex match is based on
packagePath only, which is the correct way to detect the version
for RGL.

Task-number: UL-6642
Change-Id: I3ee2fdb623bdd77aea60f9eae3672b9b5aa40433
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 11:40:11 +00:00
Rainer Keller
9566124cad McuSupport: Evaluate macros in paths when applying settings
A macro entered by a user was not evaluated. Only the initial strings where
expanded when the targets are created on first start.

Task-number: UL-6697
Change-Id: I642bb4bc41e116cd0fe7f002da3d7f3cb301e62d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2022-10-24 11:01:05 +00:00
Rainer Keller
1db2a10b73 McuSupport: Use signals to propagate path changes from McuPackages
Instead of calling the update function manually unconditionally it will be
called through a connection.

Change-Id: Ibfd3efd0fbaa66c4857d8a15c202472e1f00f576
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2022-10-24 11:00:58 +00:00
Rainer Keller
34d0f2e678 McuSupport: Fix invalid version detector being instantiatied
In case the JSON entry was missing completely, a directory version detector
was instantiated.
Instantiate version dectectors only if there is enough and valid
information available.

Change-Id: Iaf9cd40165e4d75124f3e0ddda66db2f4dab5ff7
Reviewed-by: Daniele Bortolotti <daniele.bortolotti@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:59:49 +00:00
Rainer Keller
6fae98477b McuSupport: Fix invalid regular expression is considered valid
If a match was empty it was the same case as if no regular expression was
set. Adding a new case that is triggered when there is a version detector
but it returns an empty version string.

Change-Id: I26c2f803b2c6a95b85d6b781085bfa9cd4b51975
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 10:59:43 +00:00
Rainer Keller
2c6235998d McuSupport: Use PROGRAMFILES environment variable
The path was generated using the environment variable PROGRAMSANDFILES,
while only PROGRAMFILES is defined.

Task-number: UL-6618
Change-Id: I5ebff81d39a437586af905f56099c17c1afc1bd0
Reviewed-by: Daniele Bortolotti <daniele.bortolotti@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:52:44 +00:00
Rainer Keller
a62155d98a McuSupport: Fix crash
The function updateStatusUi is modifying children of the main widget.
In case the package changes when the MCU dialog is not present anymore it
tries to access invalid widget pointers.

Change-Id: I9127114caf03b4ea047b075e875f20bb3e0c02b4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:49:40 +00:00
Rainer Keller
50a5ceeaaf McuSupport: Provide static function for external use
Make the static function public to be used by other classes as well.

Change-Id: Ifc9e423cba04557d83696446c11df7cd16a421ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:49:33 +00:00
Rainer Keller
6c7616de1b McuSupport: Avoid accessing invalid pointer
After the options dialog has been closed, all widgets are deleted but
the m_fileChooser will not be set to nullptr again.
Avoiding to use the widgets for data based accesses.

Change-Id: I5d99fc4a34ecd9d22e26854c6956e9c0116de94b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:49:28 +00:00
Knud Dollereder
5316a8f799 QmlDesigner: Make Formeditor remember the zoomlevel
Fixes: QDS-7832
Change-Id: Ife627a72a03be8a946aabfc8af6730a81eb5d611
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-24 10:23:37 +00:00
Christian Kandeler
72c1c891fa ClangCodeModel: Adapt to new highlighting modifier in clangd
See https://reviews.llvm.org/D134728.

Change-Id: I2bcfb09736b6eabc54cd986b0c096c8fa5869b8e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-24 10:08:49 +00:00
Christian Kandeler
8608386c36 CppEditor: Adapt include locations when renaming ui files
Fixes: QTCREATORBUG-14259
Change-Id: I5e8209338b531f0e65d85b423053bd19a8b47652
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:07:26 +00:00
Robert Löhning
2acc90a0ba SquishTests: Update tst_create_proj_wizard
Change-Id: I652f2504d1e13ae8c93429a99d31d3754bd57298
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 10:04:00 +00:00
Robert Löhning
86f87605f9 SessionDialog: SquishTests: Update tst_session_handling
Change-Id: I6fcdb6173c39715e85f4cf37d12e7707b2e5d066
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 10:03:22 +00:00
Leena Miettinen
4fee43c76f Doc: Use "which" in clauses that add supporting information
Fixes: QTCREATORBUG-28364
Change-Id: I98bbff1886fc63d024dd9ce57720274b598bf6de
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-24 09:26:01 +00:00
David Schulz
af7b0802a8 Python: fix PySide project tool detection
The tool moved to the PySide6-Essentials module.

Change-Id: I204d2025bc51b6c5cffe82cba66878d077f03b72
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 09:17:46 +00:00
Cristian Adam
534c312d27 PE: Use original vcvarsall.bat to do environment cleanup
Amends ae07c31976

Calling a VS2022 vcvarsall.bat /clean_env in a VS2019 environment causes
failures. Using the original vcvarsall.bat does the proper cleanup.

Change-Id: I12426e9eb97baecae5357e6bb419333464ea1ded
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-24 08:51:55 +00:00
Leena Miettinen
51c1accfa5 Qt Quick Designer: Fix references to changed view names in UI text
- Form Editor > 2D
- 3D Editor > 3D
- Text Editor > Code

Task-number: QTCREATORBUG-28334
Change-Id: I65f693b47b1c361dae3c270333ff036e4c473b9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-24 08:17:17 +00:00
Marcus Tillmanns
604f542b20 ProjectExplorer: Allow selection of remote build directories
Change-Id: Ieaf0b01bde6d043782d6d9d4bb745c090c6087c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 07:22:05 +00:00
Robert Löhning
f42282b492 SquishTests: Update "Save before build"- checkbox
Fixes tst_save_before_build

Change-Id: I7af2c215dcb55796498875d1ed62783f37edb664
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 07:14:27 +00:00
Robert Löhning
061948e2e6 SquishTests: Update SaveItemsDialog and ReadOnlyFilesDialog
Fixes tst_modify_readonly

Change-Id: I1ba81af321a8ca3d5498d68e2d85abd1214546b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 07:14:00 +00:00
Sivert Krøvel
b1a3e136b6 McuSupport: Add handling of os-specific validation paths
Before the refactoring, the various third party packages had detection
paths set to facilitate picking the correct subdirectory in QtCreator.
Adding these paths to the JSONs prompts hints in the Devices>MCU UI to
which path to enter, and prevents the user from picking the wrong path

Since the paths might vary based on the host-os, it is necessary to
enable parsing this from JSONs, similar to how the "defaultValue" is
handled. The "detectionPath" entry can either be an object with
separate values in fields named "windows" and "linux", or a string.

Change-Id: I813affe856fe73f6cf34ea75850500b49a1b2b6a
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Kwangsub Kim <kwangsub.kim@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
2022-10-24 07:09:39 +00:00
Orgad Shaneh
bf0d2426b8 DiffEditor: Persist description widget height
Fixes: QTCREATORBUG-24286
Change-Id: Ie1bf1136bce973b7197b7378b48a85ec776e8f6d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-10-24 07:00:50 +00:00
Jarek Kobus
edd16c7047 UnifiedDiffEditor: Fix visible wrap column
Take m_visibleIndentOffset into account when drawing
right margin.

Fixes: QTCREATORBUG-26601
Change-Id: I50839098953181c667a5fe0e5fac7dfa5bc95327
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-24 07:00:40 +00:00
Rainer Keller
925a8a7a19 McuSupport: Give a reason for the toolchain being declared unsupported
Change-Id: I95eb399cbaa199b442ce0d9596477a039dce4f30
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 06:28:03 +00:00
Rainer Keller
6326ccfe30 McuSupport: Store the source location of the JSON file
This allows to mention the file name the configuration was created from in
error messages.

Change-Id: Id8e3d4a754cf5c1f0a12c6b21af1158713c68690
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 06:27:57 +00:00
Cristian Adam
d42214e556 Core: Allow "Remove Folder" in File System View pane
As a CMake user from time to time I have the need to simply remove a
build directory.

This is now possible from the File System pane. Previously one had to
open a Terminal an do there a "rm -rf" or "rmdir /q /s" operation.

The user will be asked before, and there is no possibility of a misclick
and remove something the user didn't consent to.

Fixes: QTCREATORBUG-27331
Change-Id: I61aa42ce6587e46d635d9743b154f2bc9d163b1e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-22 16:30:30 +00:00
Adam Sowa
fb40998549 Android: Fix connecting to debug server using adb over WiFi
Remove port number from ADB's device serial number when setting remote channel for debugging.

Fixes: QTCREATORBUG-28342
Change-Id: I8b979af38aea5167693cb319a0a18490963b115a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-21 18:56:56 +00:00
Thomas Hartmann
7092d8da22 QmlDesigner: Fix ColorEditorPopup on Qt 6.4
With Qt 6.4 the position of the loader is not set to 0 by default.
Using anchors does fix this.

Task-number: QDS-8018
Change-Id: I74623cff1f02968515fe7452cc770534f43c2d77
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-10-21 15:28:26 +00:00
Thomas Hartmann
b56de3d8be QmlDesigner: Reset possible imports explicitly
We do not reset/set the possible imports whenever we change
the document anymore, since this became really slow.
Instead we set those once per project, but we can reset them
explicitly when required.

The bundleimporter and assetimporter creates new imports, therefore we
reset the possible imports.

Change-Id: I112bd3c42f1c92f5314407883e86b4dedff45f75
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-10-21 15:19:57 +00:00
Eike Ziller
698583dc01 Translations: Get some translations for Text Editor settings back
Display, font and tab settings.
No idea when that broke, but it is trivial to get back.

Change-Id: I96b809cb40c899bb62ddeaab03343181826930a8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-21 13:59:24 +00:00
Orgad Shaneh
1593f869ed VCS: Remove "Commit" option when closing commit editor
Fixes: QTCREATORBUG-22233
Change-Id: I1270cc58a823b919475fc51ac5fc71b892b379b6
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-10-21 13:13:59 +00:00
Cristian Adam
bf83f63a13 CMakePM: Add installDir CMakePresets support
Is part of CMakePrests v3, and slipped at the implementation time.

Task-number: QTCREATORBUG-24555
Change-Id: Id3ce90c0a979d44287fc03ae1dd49a64e964cdf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-10-21 13:09:35 +00:00
Cristian Adam
430ff621aa CMakePM: Use parent environment for $env{macro} expansion
Now the code takes into consideration the parent environment for
$env{macro} alongside the "environment" presets values.

Task-number: QTCREATORBUG-24555
Change-Id: I644618b0a6f866fd65a4109ee63b1f5bfcd4164d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-21 13:09:20 +00:00