Commit Graph

53247 Commits

Author SHA1 Message Date
Tim Jenssen
f6cfe31c7f qmldesigner: increase restart timer
It was looping in debug on Windows so heaviliy
that it brought the system to hold then.

Change-Id: I10eccb6c48a22ba7a9de912a912f957066bf9c09
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-11-16 17:35:17 +00:00
Thomas Hartmann
6296b9a1a4 QmlDesigner: Add option for Always auto-format ui.qml files in Design mode
Task-number: QDS-8170
Change-Id: I6e345c69e60a19fd8eb7a505d7f64cb5fd664c88
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-11-16 17:31:59 +00:00
Thomas Hartmann
cbd96ef312 QmlDesigner: Fix crash
The timer can timeout after a detach.

Change-Id: I7eafe0a3d666942841cc0ee64d850acfab418c7c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-11-16 17:31:14 +00:00
Thomas Hartmann
626e1175a6 QmlDesigner: Do not specify version if it is -1 -1
Otherwise isBasedOn works differently than isSubclassOf for file components.
File components do not have a version.

Change-Id: If7009538ef97d119a348da99ed07919136c8b6e1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-11-16 17:30:42 +00:00
Vikas Pachdha
7a65a16718 Designer: Assert url scheme of the component
Type is not parsed if the url scheme is incorrect

Change-Id: Ia5cdf2887c73769a3c1bb6d8965426b0ff7e688c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-16 16:35:04 +00:00
Vikas Pachdha
913d0e079a Designer: Fix missing semicolon in case of dynamic properties
Fixes: QDS-5457
Change-Id: Ib6be3ec864ffb972010e25c2fa956695201dba2c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-16 16:34:59 +00:00
Eike Ziller
478ce3f4a4 QmlDesigner: Fix condition for adding QMLDESIGNER_STATIC_LIBRARY define
"$<BOOL:" interprets the following string, and does not expand variables
itself.

Amends 78cf5051f5

Change-Id: I50e09e699764a00091167e8c72045a0f9055160e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-11-16 15:37:26 +00:00
Henning Gruendl
57d3af6d89 QmlDesigner: Fix state group selection
The issue was caused by a mistake during branch merging.

Task-number: QDS-8244
Task-number: QDS-8245
Change-Id: Ib88f0c5201229295c0cec45d806917156bd86d9f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-15 16:12:17 +00:00
Tim Jenssen
a7cf52cc89 qmldesigner: cleanup connect
Change-Id: Id19c49d7ca7d9f19acf971ae005c868e50aec44d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-15 15:22:22 +00:00
Tim Jenssen
974c28ee77 qmldesigner: fix possible crash
Task-number: QDS-8246
Change-Id: I91cdf2887c73769adc1bb6d8965426b0ff7e6884
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-15 15:22:16 +00:00
Miikka Heikkinen
eae9be4218 QmlDesigner: Unify state handling on puppet reset
Form editor and 3D edit view changed state to base before issuing reset,
and form editor also changed it back to current state after issuing
reset, while all other resetPuppet calls do not change state.
Since puppet reset is asynchronous with small delay, the state changes
done by form editor did essentially nothing, and just changing to base
state in 3D edit view is wrong as we don't want reset to change the
state.

Removed state changes from puppet resets to unify the reset
functionality.

Fixes: QDS-8253
Change-Id: I33be3ec864ffb972010e25c2fb956695201db9ec
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-15 10:12:02 +00:00
Miikka Heikkinen
889e999f32 QmlDesigner: Clear material preview cache on detach
The previews are cached based on modelnode internal id, which can
overlap between documents, resulting in briefly showing incorrect
preview when new document is opened. Also, never clearing the cache
leads to leaking memory.

Fixed the issue by clearing the preview cache whenever all materials
are removed from browser (model detach and material library deletion).

Change-Id: Idad39fef62871c4e94f35604e643c7195ae9ec81
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-14 13:22:11 +00:00
Tim Jenssen
b10c135a10 qmldesigner: remove delayedResetView();
Change-Id: Ie577b6b686a10e4e3525ba858a70bea0b4077566
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-14 10:57:06 +00:00
Amr Essam
8c7ed5a03e QmlDesigner: Add effect placeholder icon
Placeholder icon until final icons are provided

Task-number: QDS-7713
Change-Id: Ic66f0603ed7088584ea0df6af9f977e732065d3c
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-14 10:56:27 +00:00
Ali Kianian
63d30351a6 QmlDesigner: Add "Select Parent" to 3d Context Menu
"Select Parent" action is added to the context menu of the
Edit3DWidget.

Task-number: QDS-8199
Change-Id: Iff6ce50eba966bea60f1b09f497632c3ff290c27
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-14 10:54:19 +00:00
Jarek Kobus
a43f5db582 QmlDesigner: Drop static_cast from connections
These signals are not overloaded anymore in Qt 6.
Simplify widget creation in CurveEditorStyleDialog.

Change-Id: I4937db8c3dad10e7c0b2aa007739d71ae5992486
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2022-11-11 15:53:27 +00:00
Henning Gruendl
ff5e6a154b QmlDesigner: Add hasSignalHandlerProperty function
Change-Id: If1616f87c4dfebc121aad842c0b35ae63ddc8dbd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-11 14:43:25 +00:00
Henning Gruendl
f7e7bcd877 QmlDesigner: Add link error switch in RewriterView
Add a switch in RewriterView to disable link error checks.

Change-Id: I6bac2c6c92872463c2246e67e803a6724973fae7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-11 14:42:45 +00:00
Henning Gruendl
cf86bc789f QmlDesigner: Add insight constants
Change-Id: I58f398a329b79a346061b192e2fbff40a9b9ec6d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-11 14:42:06 +00:00
Samuel Ghinet
61c133f48a QmlDesigner Fix: Select Background Color doesn't clear Environment Color checkbox
Task-number: QDS-7439
Change-Id: I5546e02f7cc2d0bcf3197f94a6ccc557cfb84e7b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-11 13:35:39 +00:00
Amr Essam
e3e5524f88 QmlDesigner: crash when dragging an effect twice to component in 2D
When an effect is dragged twice, same effect or other effect it caused
QDS to crash, in layer mode the effect is replaced,
otherwise effect is added upon previous effect

Task-number: QDS-8172
Change-Id: I2a3682b21492de0d0cc62bce9bd2965cedfbc826
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-11 13:11:15 +00:00
Miikka Heikkinen
8bb3c8f923 QmlDesigner: Don't cache possible imports until code model has settled
Code model can take a couple of seconds to fully resolve when a new
project is launched for the first time, so we avoid caching possible
imports until we detect no changes in the count of possible imports.

Fixes: QDS-8128
Change-Id: I0d35b1eb2d5872f646c141067652645d2e2f106f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-11 12:05:02 +00:00
Ali Kianian
455c84ccbf QmlDesigner: Add Duplicate to 3d Context Menu
Duplicate action is added to the context menu of the Edit3DWidget.

Task-number: QDS-8063
Change-Id: Id1347d28cd819a81e145bb0319e85d19a734090f
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-11 11:31:21 +00:00
Ali Kianian
a2b85953cf QmlDesigner: Paste to the clicked position
Copied items would be placed in the clicked position by the paste
action.

Task-number: QDS-8063
Change-Id: Iac4b6faacb0f429b826b144dadad3ec32f53580e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-11 09:28:11 +00:00
Thomas Hartmann
019e44ce27 QmlDesigner: Rename Projects to Project
Task-number: QDS-8127
Change-Id: I675db923474d1c02105bf9d308637368e00565cb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-11 08:46:51 +00:00
Thomas Hartmann
1f6511dba0 QmlDesigner: Fix findCommonAncestor()
Task-number: QDS-8247
Change-Id: Ia9d8c0728ebfae6e47acf7ff3a2823c8711549fc
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-11-10 17:08:23 +00:00
Samuel Ghinet
16dde463ed QmlDesigner: Remove "App" from the Components view
Task-number: QDS-8116
Change-Id: I9f578bf3081c9399eaf12c2f3d0aa3c27151a016
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-10 14:12:51 +00:00
Mahmoud Badri
bb64505cab QmlDesigner: Implement adding a bundle texture as light probe
Fixes: QDS-8205
Change-Id: Icb57287fa36df5d44d59ffc64e26fa3d778d24d6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-10 12:13:58 +00:00
Ali Kianian
08f8732108 QmlDesigner: Move nodes to a specific position
A list of nodes could be moved to a new position.
This is useful for positioning the visual items within the transactions
of the DesignDocument.
Paste to position is also available.
Paste method is modified by this commit.

Task-number: QDS-8063
Change-Id: Id5a295ee6a096952379e2b46d8e740d28562d5e9
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: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-10 10:33:57 +00:00
Miikka Heikkinen
7fe256ca32 QmlDesigner: Insert CubeMapTexture to correct prop in SceneEnvironment
Fixes: QDS-8169
Change-Id: Ic19430a25ad7e04e0e7c72c2dcc2991d30beac07
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-10 09:45:41 +00:00
Marco Bubke
cc690a407f QmlDesigner: Remove macos specific puppet path
We already removed it everywhere else.

Change-Id: Id71880474550ca4c5dfc26ef77db74455a44ca16
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-09 16:58:18 +00:00
The Qt Project
f56420ee07 Merge "Merge remote-tracking branch 'origin/9.0' into qds/dev" into qds/dev 2022-11-09 15:42:39 +00:00
Tim Jenssen
f8c99ebd9a Merge remote-tracking branch 'origin/9.0' into qds/dev
Change-Id: I02fd6f492c27d85b88af7ec8bc18ff62f2c6ed14
2022-11-09 16:41:12 +01:00
Knud Dollereder
583e53cb08 QmlDesigner: Make DS find the qmlpuppet on macOS
The puppet is now build into a different directory.
This patch updates the qml2puppet search path for DS.

Change-Id: Ib522df599f429914275700813fa8d1e526b1ce4a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-09 15:32:43 +00:00
Marco Bubke
63022d08ea QmlDesigner: QmlPuppet as standalone tool
The qmlpuppet is now a standalone tool. There is new a library too with
the communication code. That is shared between the designer and the
puppet. It's in a .cmake file so it can be included by the standalone
tool if it is not part of a designer build.

Task-number: QDS-5879
Change-Id: I2bc2a0b463fbb3e0c8c23d182abfd368cf87e968
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-09 12:29:38 +00:00
The Qt Project
5434de83b9 Merge "Merge remote-tracking branch 'origin/8.0' into 9.0" into 9.0 2022-11-09 11:28:25 +00:00
hjk
19ef8e5c7a Debugger: Avoid some temporary containers when parsing escaped chars
Change-Id: Ia9af6801de6f745388e464fc806297d396c66160
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-09 10:54:30 +00:00
Tim Jenssen
63d3a6bd3d Merge remote-tracking branch 'origin/8.0' into 9.0
Conflicts:
  src/plugins/qmldesigner/components/assetslibrary/assetslibrarywidget.cpp
  src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
  src/plugins/qmldesigner/qmldesignerplugin.cpp

Change-Id: I24216ae3f83cdde3493b4a6274e24a72f75820fc
2022-11-09 11:45:25 +01:00
Marcus Tillmanns
06838e3e5e ProjectExplorer: Fix potential race condition
When using BuildStep::runImpl() it was possible for the async part
to still be running while the BuildStep is already deleted.

This change returns the Future so that users can wait for it to finish.

Change-Id: I27c0fc8741c59851c5ab8f5cb858fbcda923c14d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-09 08:33:37 +00:00
Ali Kianian
c1f3dc4f54 QmlDesigner: Add positioning methods to QmlVisualNode
QmlVisualNode would be able to:
    1. Set a position for the visual node
    2. Translate the position of the visual node
    3. The visual node could be scattered
    4. Get the related position of visual node
All these methods will work for either 2D or 3D nodes.
Also, a potential bug has been fixed for the Position. It was assumed
that if a position equals to 0, it's not a valid position, but
now it's handled by this change.

Change-Id: I9dd59dbe0d14084087ff39bd14d2a783d24a5efd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-08 14:35:06 +00:00
Christian Kandeler
f93c316b73 ClangCodeModel: Adapt to new upstream feature
See https://reviews.llvm.org/D130015.

Change-Id: I2c2590265f2d7a2c2b5e966b0dc65ceff6b1b3e6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-08 14:21:25 +00:00
hjk
9364304f81 Debugger: Remove some debugging code
Avoids a possibly large temporary string.

Change-Id: Ic20cccedc35df0172c3586054f098e2c0f4b69c2
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-08 13:25:42 +00:00
Miikka Heikkinen
d9d4d1829a QmlDesigner: Fix material name editing issues
Material name field in material browser now ensures that the start
of the string is visible when editing is not focused.

Any click outside the name field will take the focus away from the
field, and name field state is properly updated when focus goes
away for any reason.

Trying to set same name as before is ignored instead of changing the
name to <oldName>1.

Fixes: QDS-8185
Change-Id: I723e3ae312e3e2c4ce8a95a3b05effcee2bae328
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-08 12:21:06 +00:00
David Schulz
08002c6278 Editor: delete assist interface in lsp/clangd support
The complete memory management in the code assistant needs an overhaul.
For now just delete or at least track the assist interface with scoped
pointers.

Fixes: QTCREATORBUG-28408
Change-Id: I0bd4cfaa36a660b6fd5bb467af3b13414ed76e63
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-08 12:07:56 +00:00
Eike Ziller
3c6435387b QmlJS: Fix cursor position and breakpoints when reformatting
Use the intelligent partial text replacement logic that is also used for
e.g. the Beautifier formatters.

Fixes: QTCREATORBUG-28349
Fixes: QTCREATORBUG-25218
Change-Id: I9ae4052df27c8aa2012106a8ef8f624ba5f3c30b
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-11-08 11:38:54 +00:00
Marcus Tillmanns
bb3e9c44be Android: Fix reference to out of scope variable
Change-Id: I49ea5c059ed68230e368d8de2aaddca979019bfa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-08 11:37:26 +00:00
Alessandro Portale
657cc181fe CMakeProjectManager: Deduplicate string "-DQT_QML_DEBUG"
Change-Id: Ice9bc9b1ee17d477a484b9f4d630737f6633c06c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-08 10:52:03 +00:00
Kwangsub Kim
d881932695 McuSupport: Update library path for Windows platform
The Qt shared library for Windows desktop platform has been
moved from Qul 2.3.0 to support MinGW toolchain. The updated
library path needs to be configured correctly.

Task-number: QTCREATORBUG-28303
Change-Id: I7cf8150bfb4a66731904ea49089849496305f22e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-08 10:24:18 +00:00
Mahmoud Badri
15dd073e0c QmlDesigner: Add basic drag-n-drop support to textures
Dropping textures to different views to be handled separately.

Change-Id: I1e0ac5681e5e1b3dca8bdaf6819a6b699f629e79
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-11-08 10:22:53 +00:00
Christian Stenger
c392cb8acf MesonPM: Only set tools if possible
Avoids triggering a soft assert.

Change-Id: I86dd6fd3876504abc3ecf5b543e7c86d886bb4c2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: hjk <hjk@qt.io>
2022-11-08 10:09:57 +00:00