Commit Graph

135 Commits

Author SHA1 Message Date
Thomas Hartmann
8e65e2815c QmlDesigner: Add NodeInstanceServer::allGroupStateInstances()
Change-Id: I26b20976746c3790d679a63db209fb535eb58382
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-24 17:58:08 +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
Miikka Heikkinen
0334d4886b QmlDesigner: Fix puppet crash when property animation has no target
Fixes: QDS-6935
Change-Id: Ib6dae3a6c39a12e9e62bd494d5a27917d7f97048
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-13 07:32:50 +00:00
Miikka Heikkinen
10f2fb7be2 QmlDesigner: Don't scan for fonts if resource path is not valid
For some reason captureiconmode puppet is launched at QDS shutdown,
with empty resource path. This caused the entire drive to be searched
for fonts to register, making the puppet linger for up to a minute
after the shutdown.

Fixes: QDS-6482
Change-Id: I0f1fa4b6f5646c76d93f5820dae029033e1543a3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-18 11:27:35 +00:00
Miikka Heikkinen
f146b846cd QmlDesigner: Implement proper preview for pure 3D scenes
Refactored the existing 3D node preview generation to be done
synchronously, which enables their use also for creating state
and item library previews for 3D nodes with ease.

Fixes: QDS-5785
Change-Id: Ib493eccbc239f33bcad3301673a865494616a901
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-10 14:47:26 +00:00
Miikka Heikkinen
3ac3b61727 QmlDesigner: Ifdef nanotrace.h out if nanotrace lib is not included
Nanotrace headers are not exported to build dir at all if the feature
is disabled, so runtime puppet build can't find them. We have to
ifdef out the header include and define the required macros as empty
in puppet.

Fixes: QDS-6107
Change-Id: I702c3ed5521d30ee0b253d035dea4ea00d00848f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-28 14:03:26 +00:00
Knud Dollereder
ebac821e9e Replace minitrace with nanotrace
Minitrace is a library to produce json traces suitable for chromes
built-in trace viewer. Unfortunately it lacks the ability to add
custom arguments to the json files which is needed in our case
in order to examine Design Studios state from within the evaluating
python script. Nanotrace is a rewrite of minitrace that adds this
ability. Additional benefits are higher precision and the fact that
it is written in c++.

Change-Id: Id2610b93188483d88547369c3fa8dacbe4dee9f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-25 14:25:04 +00:00
Tuomo Pelkonen
5e5ff9fa0d Avoid QmlPuppet crash when translation database is locked
Task-number: QDS-5365
Change-Id: I0be2aaa4d64334273ce03f5bb692b8ed8597c266
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-09 14:39:25 +00:00
Thomas Hartmann
a1c476d864 QmlDesigner: Avoid exception when database is missing
Task-numner: QDS-5365
Change-Id: I0231d7b0fbe29be39ff5f0de4c01efd6073531fa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-08 17:43:56 +00:00
Tomi Korpipaa
69c8be67ae Add particle editor support
Add a way to edit and view particles visually, as editing
only the properties in property editor does not help visualize
how the particle effect is going to look. Support toggling the
effects on/off, pausing, resuming, and scrubbing the time back
and forth. Only the selected particle system is animated to allow
concentrating on that particular system without being confused
by other possible particle systems.

Fixes: QDS-4623
Change-Id: I2677c56a73279d451d77df1d131bd7294e6b23bb
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-05 11:31:31 +00:00
Miikka Heikkinen
982f23be38 QmlDesigner: Allow invalid property value for QVariant type properties
Invalid QVariant is a valid value for properties of type QVariant, so
propagate the value change from puppet to creator in that case.

Also change the property editor to notify controls of value change in
case of invalid value set, and clear LineEdit when invalid value is
set.

Fixes: QDS-5304
Change-Id: I02c7daaf3cde06317690a32e7ac8a82da754bd58
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-28 07:50:20 +00:00
Miikka Heikkinen
2ab6f800b3 QmlDesigner: Fix issues with Components and Repeaters
- Fixed state preview rendering by deparenting nodes under
  component wraps.
- Ensure state preview image is always clipped to root item.
  The state preview bounding box broke when Repeater was direct
  child of root and had delegate with rotation.
- Allow dragging items under Repeater to create implicit component.
- Allow dragging Components under Repeater.
- Do not ask for target property when Component is dragged under
  any node.
- Update nodeSource properly when reparenting implicit component
  or removing last child of a Component item.
- Fixed scene update when last child of a repeater is deleted/moved.

Fixes: QDS-5197
Change-Id: Iaaf1745e25db3522ffc1dba7fd1b051da29f5aec
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-05 09:12:12 +00:00
Miikka Heikkinen
4036c20f63 QmlDesigner: Add Loader and Repeater to component library
Also fixes some issues with Repeater usage.

Fixes: QDS-5149
Change-Id: I259dcb73be634150dd0c5e602165b63112ec958c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-10-05 09:11:59 +00:00
Orgad Shaneh
74713e5ef1 Merge remote-tracking branch 'origin/5.0'
Change-Id: I7ca9791b95032a1f276c520f8eefde3801510eb9
2021-09-27 13:22:58 +03:00
Knud Dollereder
b75d91e57b Remove superfluous qDebug printouts
Change-Id: I804873f8066f2785905e1ea25efc035cad275a3e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-24 10:08:56 +00:00
Eike Ziller
987ad3fe9c Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/android/androidconfigurations.cpp

Change-Id: Icd2b0fda2b2653656285bbbe457c30c9cd414d3f
2021-08-30 12:15:37 +02:00
Thomas Hartmann
30827fe401 QmlDesigner: Implement visibility for unified render path
If the item is set to invisible we set visible to false in
the render and preview puppets. This will have no effect on the
value in the property editor.

Changing the actual value of visible can have side-effects on
the rendering in some rare cases.

Task-number: QDS-4932
Change-Id: I5ce0925ebff8f5e4e64bc71fd5d33d6154b85f91
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-08-26 14:18:37 +00:00
The Qt Project
2028d1c620 Merge "Merge remote-tracking branch 'origin/5.0'" 2021-08-26 11:07:04 +00:00
Mahmoud Badri
b4714aee00 QmlDesigner: Correct code style on NodeInstanceServer class
Change-Id: I3bef1ac0994b0dd3cf3a4adbd75147bf79d8f961
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-26 09:05:59 +00:00
Mahmoud Badri
da82253095 QmlDesigner: Fix root item size on first launch
Fixes: QDS-4936
Change-Id: I9b25788dcc11c14b5a7ef80dc7aad5f3ec3e636e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-24 12:16:54 +00:00
Christian Kandeler
6530a4fdc7 Fix some compiler warnings
Change-Id: I4eaf47bda086b83618f461ab19d1715c67e27ae1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-09 11:52:07 +00:00
Janne Koskinen
12fb534f90 Fix puppet from asserting on unversioned qml imports on Qt 6
Set mockup version to 1.0 if there is no version set.

Change-Id: Icfee0e84012a93978283d8309ec01d48dd8d4730
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-28 06:49:45 +00:00
Orgad Shaneh
dad2b3d84b Merge remote-tracking branch 'origin/4.14'
Change-Id: I7d55c01489dfcdd26fcf3ced9f26539a09073e8c
2021-02-08 12:56:36 +02:00
Tim Jenssen
bd25785997 qmlpuppet: fix crash
initializeView(); creates the necessary engine
where we need to set the languageUi.

Change-Id: Ib9f9f35e00167ce0bfe4d96ed4e66a965daea084
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 17:30:56 +00:00
Miikka Heikkinen
a57820f055 QmlPuppet: Register fonts at scene creation
Automatically register all fonts from 'fonts' folder at scene creation.

Fixes: QDS-3624
Change-Id: I38728e458952ea52c941244daaca715102a93c55
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-05 09:26:34 +00:00
Christian Stenger
3468d30286 QmlDesigner: Fix build for Qt5.14
Amends 59488d9606.

Change-Id: I70fd3f962de5abb6254a406263df2ea61c7e9bcc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-02-04 07:26:01 +00:00
Tim Jenssen
59488d9606 qmlpuppet: call engine()->setUiLanguage
so qml components can react on it

Change-Id: I31dc46fabeef0936accd23ed22cbebfe2cd8663c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-03 10:32:27 +00:00
Miikka Heikkinen
bab69fff77 QmlPuppet: Fix crash at puppet reset
Puppet cleanup was not handled properly, so derefFromEffectItem() was
not called for all objects that needed it, causing puppet to crash
at shutdown.

Fixes: QDS-3461
Change-Id: I22c0552fe1223789fa42b276ab377d4a9e929955
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-05 09:28:45 +00:00
Miikka Heikkinen
dd279759dd QmlPuppet: Use QQuickRenderControl to render 2D views
Port QQuickRenderControl rendering used for 3D edit view also for
2D views.

This also fixes the issue of only partially rendered form editor
view for root items with non-origin position by adjusting the
position to 0,0 on the puppet side via an extra injected item.
As a result of the root item always being rendered at origin,
the visualization of the root item offset is no longer visible in
the form editor (the checkerboard background item).

Change-Id: Ide29510ef52513340d205ed35ac35c8cce66715c
Fixes: QDS-3159
Fixes: QDS-3175
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-27 12:28:57 +00:00
Marco Bubke
2a2dfbec73 QmlDesigner: Add states to ImageCache
Task-number: QDS-2998
Change-Id: I8e65881181ae1010ef1f8bab92fa71d92c961bcd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:35:12 +00:00
Henning Gruendl
f2883c19b1 QmlDesigner: Add lock feature support to 3D editor
Added lock feature support for 3D editor. Also refactored the hide
support, since the two use largely similar logic.

Task-number: QDS-2915
Change-Id: I627848f3a3a73881427a03aeec6793fd26a1885a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-06 09:19:05 +00:00
Miikka Heikkinen
6b8d8e414a QmlDesigner: Port 3D edit view to Qt6
Task-number: QDS-2899
Change-Id: Iedbe5e8561e5ab71ef32922e69da43cd3cc57e90
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-20 14:55:43 +00:00
Thomas Hartmann
29c833d54f QmlDesigner: Implement different render path for Qt 6
When building with Qt 6 or if qmlpuppet_unifiedRenderPath is set
in the environment we switch to a different render path.
In this case we use QQuickWindow::grabWindow() and render the root item.
No composition is done in the Qt Creator process anymore.
This is a similar approach we already take for the 3D view.
Performance is acceptable and we fix rendering issues related to
effects and layers.

Change-Id: Ic963eca047e0bf16ca3a099ec94658ae2af0fb63
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-10-09 15:13:39 +00:00
Miikka Heikkinen
90d9cb36f3 QmlDesigner: Add navigator preview tooltip for materials
Request 3D preview image for material instances from puppet
to show on tooltip.

Support for effect previews is also done, but handler for it is not
registered, as effects cannot be shared between windows due to
issue QTBUG-86616.

Also refactored the preview image support out of navigator
to make it more accessible by other components.

Change-Id: Ie08ba218f929660c2e43d39578997a5a1a883efd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-16 07:00:06 +00:00
Eike Ziller
20f51bc642 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/languageclient/languageclientcompletionassist.cpp

Change-Id: If12e1c532e5623ef063681309a918e7b51117b1c
2020-09-14 10:12:14 +02:00
Marco Bubke
0f9010d381 QmlDesigner: Introduce multiple node instance server
For capturing data we need a atomic mechanism. So in one
process multiple node instance server can be started and
then a command is send back that a scene is created. It
can be used to ensure that captured data of views is
up to date.

Task-number: QDS-2630
Change-Id: Iea8d0b036b6384c9c1b0f91af401f2b1f1978c12
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-11 08:57:42 +00:00
Eike Ziller
2a05186194 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	CMakeLists.txt

Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
2020-08-21 10:08:55 +02:00
Michael Winkelmann
44a3c092a0 QmlPuppet: Refactor ChangeIdsCommand
Change-Id: I75de863121b66a5050226dd5c8914229cb1af608
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:33:30 +00:00
Michael Winkelmann
d39a6f656f QmlPuppet: Refactor ChangeFileUrlCommand
Change-Id: I900f530109b6cdbb22d8138094443b48834d16cb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:33:13 +00:00
Michael Winkelmann
95aa7f42de QmlPuppet: Refactor ChangeBindingsCommand
Change-Id: Id3020a73f59a1adfd25066a37d083d923e77956b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:33:04 +00:00
Michael Winkelmann
888cbe7f8a QmlPuppet: Refactor ChangeAuxiliaryCommand
Change-Id: I32eb04db96322883aa908e22724756f5e25ded09
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-18 13:25:59 +00:00
Eike Ziller
0c4135e380 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp

Change-Id: Id624bad384050d567efba0700046331086cb12dd
2020-08-13 13:28:33 +02:00
Tim Jenssen
4fe5b923cd Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Change-Id: Ic720f3adab305c5ef8cd10e713ccabf510eff0c0
2020-08-13 06:39:40 +00:00
Marco Bubke
e43c7fdb1d QmlDesigner: Split messaging and process for puppets
This will make it easier to implement custom puppets. The new connection
manager will restucture the code and it add a mechanism to capture data
too.

Task-number: QDS-2529
Change-Id: I5d15c3303ef1c9a3e25ba197d350e0d561ce813a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-10 12:53:30 +00:00
hjk
c2dec324aa Some Qt6 compilation
Change-Id: Icbc9ed41e75799d2d0e16ef16379fec05f80b62e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-13 10:52:47 +00:00
Tim Jenssen
b8cd87dea0 Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Conflicts:
	src/plugins/clangformat/clangformatplugin.cpp
	src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
	src/plugins/qmldesigner/qmldesigner.qbs

Change-Id: Ie4a0beeb9fd32ac9683f4e8769988a9c3f3e369a
2020-06-26 16:51:22 +02:00
Miikka Heikkinen
60ff6b6577 QmlDesigner: Improve usage of QML items as quick3d textures
Quick3D Texture elements require some window signals to show QML item
as texture, so we fake them to make textures appear in form editor
and state preview. To prevent texture mirroring, flipV value
is force set at proxy creation. To keep state preview up to date,
we trigger multiple render passes if there are any QML items used
as texture sources in quick3D textures.

Task-number: QDS-2290
Change-Id: I16c34aad943213c0b737fdb073333be3bbd40f2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-06-25 08:07:41 +00:00
Tim Jenssen
f652167768 qmldesigner: add language to create scene command
and also save the last used language to settings

Task-number: QDS-2218
Change-Id: Ib82f7bc755755661183452b32829be3d048d9947
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-11 15:26:39 +00:00
Tim Jenssen
cbd0649e3b qmlpuppet: enable the use of multilanguage database
Change-Id: I2277348ac1e6b5025e75c640da83da30294c9d10
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:12:38 +02:00
Marco Bubke
0e7a1e6650 QmlDesigner: Preview size is now changeable
You can now change the preview size with
rootModelNode.setAuxiliaryData("previewSize@Internal", size);
If size is null it will use the bounding box size.

Change-Id: Icbe747ccc5a2e26e79783825d2ed94ecc640012b
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-12 07:11:15 +00:00