This allows using a Qt 5 puppet with simple Qt 6 files.
Change-Id: Ic3264ffbf8d798ff260305079a0bb281f9628795
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>
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>
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>
For each created items we retrieve a list of the names
of all existing states.
Task-number: QDS-1978
Change-Id: I8e85e439fce3c6204cb8bcf69f6be847cc8dae5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Check component creation errors earlier to avoid crash.
This allows puppet to notify creator about the problem, so invalid
components can be properly highlighted in navigator.
Change-Id: I059a5be04c4e509a38f6d47daa97e0da36c333ae
Fixes: QDS-1887
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
For some reason the Qt meta system does not work reliable
for QVector3D. It does work "rotation", but not for "pivot",
despite the fact that both properties are defined in exactly the
same way.
This patch works around the main issue.
There are still a few issues left, but at least the default is
correct now.
Task-number: QDS-1355
Change-Id: I75e2d3adff6967e89c6ce031d744baa12b5e8061
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
When editing values in the puppet we did not take reflection into account.
This means that any changes we did from the puppet for notified back
from Qt Creator. Since those notifications are asynchronous this leads
to various issues especially when more than one axis (property) was modified
at once.
This patch avoids reflection. The notifications are 'flagged' and then
ignored in the Qt5InformationNodeInstanceServer.
While a node is moved we ignore any changes to that specific node.
Task-number: QDS-1191
Change-Id: Ic74e22ea71832ce12321f9085a7296c2a7d9893d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We use Quick3DNodeInstance as a proxy class to wrap QQuick3DNode.
The access to private API like QQuick3DNodePrivate::setIsHiddenInEditor()
is restriced by such proxy classes.
Change-Id: If5191c3b730359000cf983c3af206dcffa07be74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
If the property is invalid the propertyTypeName is a nullptr.
Calling strcmp on nullptr is undefined and can result in a nullptr access.
Change-Id: I270091fa1d2635019ad2e41c4a5eab9985227dcf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In Qt 5.12.1 gradient is a QJSValue.
See commit 1771d298f33543a3fe47decfe0fff10609b01ab1
This patch adds QJSValue support.
Change-Id: I1c37b82bf033c38646564d5453e297258dd4b056
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
In some cases items render their children directly using an effect.
In this case we do not want to hide the children when calling
refFromEffectItem().
If the hint takesOverRenderingOfChildren is set in the .metainfo hints
for a parent item we forward a flag to the puppet and refFromEffectItem()
is not hiding this item,
Change-Id: I37a8c0ad8a15bc914c220e03b1b744779431d655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In the designer we replace a SwipeView with a StackLayout.
Form the perspektive of the designer they are the same
and StackLayout is easier to handle.
Change-Id: I308ec209024e22db9f56e363e27588a40283603c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is a quickfix for Controls 2 Popup, Drawer, Menu and Dialog.
We pretend everything derived from QtQuick.Controls.Popup
is an item instead of a QQObject.
Change-Id: I603dce8a1a1b08df3e2c1dccc0fa57e7ccef0800
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We fallback to create types from source, if other means failed.
This can be required if the meta info is incomplete/incorrect when
a C++ type is mocked.
Change-Id: I50d45a6f9d7eba3483da10d9e1d7d6644d9aeb96
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The QQuickEngine does the same.
Before in cases like this:
Item {
Slider {
handle: Item {
}
}
}
The item parent of the handle was the root item instead of the slider.
Change-Id: Ia022c82c6d85c2a957763c56639ac77bca9297e6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
MetaInfo cannot depend on ObjectNodeInstance.
I forward the QObject and the QmlEngine all the way through.
The commented code in metainfo.cpp is about defining a context
for the root item. The feature is basically unused, but we can bring
it back using a callback later.
Change-Id: I8f099b06c848e2faeaafc011ac6bd313192a64bd
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
A simplified version of NodeInstanceSignalSpy is required to track
sub objects. I moved all private API usage to QmlPrivateGate.
Change-Id: I86e3e5411eb43777a6b1ab5018a1b8fb9088c666
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
No need to use DesignerSupport directly in ObjectNodeInstance.
Change-Id: I124adc6334feb23c30fb1a242fe95386678eadf5
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
We cannot keep the context.
The context has to be forwarded each time.
Change-Id: I50b944bea1c6ad30832490edad8b35f392c32029
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This class holds the additional data we use to annotate QObject.
At the moment we store the default values and bindings there.
I also moved the code to populate and read the hashes
into that class.
Change-Id: Ib5e4b5291cfd2bf5555a896bf42578d07f2c6253
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>