Commit Graph

905 Commits

Author SHA1 Message Date
Thomas Hartmann
c7d9ca1154 QmlDesigner: Fix Qt 6 imports
This allows using a Qt 5 puppet with simple Qt 6 files.

Change-Id: Ic3264ffbf8d798ff260305079a0bb281f9628795
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-06 16:45:32 +00:00
Thomas Hartmann
5b942b9e88 QmlDesigner: Fix compilation for Qt 6
For Qt versions below 5.15 and Qt 6 we can continue to use
the internal version.

Change-Id: Ia314fe9db323b0d5ea6acbb70bf1cb1098b4ae93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-16 14:35:48 +00:00
Thomas Hartmann
ac24d4357c QmlDesigner: Fix puppet crash
Limit the depth of recursion. There can be cycles.

Task-number: QDS-3877
Change-Id: I10a1c7033b956244308e87aae6897f0040e0bc22
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-03-12 15:51:29 +00:00
Marco Bubke
f9b64d99ae QmlDesigner: Fix qmake .pri file
Change-Id: I85b8e4e5569879131b0697aa3f4f6e8d1e477fe4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-03-03 10:49:20 +00:00
Eike Ziller
c98e320082 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea91e66d30f797c079fe09e12a6744c36c58be1a
2021-02-09 11:42:57 +01:00
Thomas Hartmann
1641f2eb87 QmlDesigner.CapturedDataCommand: Store visible property
Change-Id: Idc2b4c9a859f9a9e03dea915ca98e91b4efdd488
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-08 16:58:12 +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
baf3528af5 QmlPuppet: Fix custom 3D geometries for Qt 6.1
Private API puppet uses for custom 3D geometries has changed.

Change-Id: Ie9f2052b04399db6f9643aba6319f6e95df1c15b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 15:03:47 +00:00
Miikka Heikkinen
2a94113352 QmlDesigner: Fix compile error
Change-Id: Ic52d29b6cba10ba00be2497b43490e5e1443ade2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 11:54:41 +00:00
Miikka Heikkinen
99a3ddbd23 QmlDesigner: Move 3D asset import to puppet
Moved 3D asset import to puppet to ensure import always uses the
correct version of the QtQuick3D.

Fixes: QDS-3154
Change-Id: I630a833e7231383b87bf8b7214d3545d12de15ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-05 09:34:04 +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
Eike Ziller
df6967a897 Merge remote-tracking branch 'origin/4.14'
Change-Id: I6e67f23464fc14dda5a659004f0aa360d6f5d25f
2021-01-27 12:28:47 +01:00
Thomas Hartmann
d6e50e77cc QmlDesigner: Use boundingRect() instead of contentItemBoundingRect
The contentItemBoundingRect is typically null, unless there is a content
item.

Change-Id: Ic32deac3c2506ff05feb28399b1ccaedacb5f68f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-01-26 10:48:47 +00:00
Mahmoud Badri
cc7be5724a Add Crashpad to Qt Creator and Qt Design Studio
Fixes: QDS-2748
Change-Id: I87e25682f066d167eebfd7b78c46c166e5062e11
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-18 22:08:14 +00:00
Miikka Heikkinen
4e5676e8c2 QmlDesigner: Add font asset preview tooltip
Refactored item library component preview tooltip to be also suitable
for asset previews.

Also now using the same image cache for font asset icons.

Fixes: QDS-3254
Fixes: QDS-3470
Change-Id: I34c1278be2e5697e01eaedabe2798104507a6ad8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-14 10:50:38 +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
Eike Ziller
5572bc7220 Merge remote-tracking branch 'origin/4.14'
Change-Id: Ie52e046f8e280e8c39f0cc5e9e710b4f885010a6
2020-12-17 13:10:44 +01:00
Björn Schäpers
ec0135f517 qml2puppet: Fix build with MinGW
Which was broken in 5daee38e.

Change-Id: Ic43ed4528cb5e2c831e07b17a2ee118583b54526
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-14 19:42:10 +00:00
Eike Ziller
4bc2b4741d Merge remote-tracking branch 'origin/4.14'
Change-Id: I842a7c7358fd0ff6d85c151806e440043914e09a
2020-12-14 14:19:15 +01:00
Miikka Heikkinen
217d0e5832 QmlPuppet: Fix crash in Qt6 when root item is zero size
Change-Id: I45dc10a412a7e4cfb799afb47e70e506162b286a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-12-11 10:50:11 +00:00
Eike Ziller
1283b15117 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	doc/qtdesignstudio/examples/loginui1/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui2/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui3/qtquickcontrols2.conf
	doc/qtdesignstudio/examples/loginui4/qtquickcontrols2.conf
	share/qtcreator/debugger/dumper.py
	share/qtcreator/debugger/qttypes.py

Change-Id: Id44a67cdeeb0889ff96eddcdf409d20ca7cbdd0b
2020-12-10 13:02:02 +01:00
Thomas Hartmann
5daee38ee3 QmlDesigner: Add compiler flag required to build Qt 6
Change-Id: I47defc9b8d4509f1a1aa367349c9b8268d876518
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-12-09 13:51:57 +00:00
Eike Ziller
1e78fdb71f Merge remote-tracking branch 'origin/4.14'
Change-Id: Id4c4c06b086dfe38960f4d68694ae23f3e00109f
2020-12-03 11:57:42 +01:00
Christian Kandeler
4f45319e80 QmlDesigner: Fix warnings
Change-Id: I818bd2d6a7512609ee7f7c1345ba314ab304850d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-30 16:37:13 +00:00
Miikka Heikkinen
a1e9e6b70b QmlPuppet: Fix preview tooltip image creation for material components
There is an unknown issue causing the first premade material from
QtQuick3D.Materials library encountered in the scene to fail to load
properly as a component. In scene creation this is worked around by
falling back on primitive creation, but the same issue prevents
loading the component for preview image generation purposes. Luckily,
materials can be shared freely between views, so we don't need to
actually load the component in this case. We can use the existing
material instance just like with non-component materials.

As a side effect, this change also fixes the issue where premade
custom material previews didn't reflect the changes in material
properties, like other materials do.

Change-Id: I7f1d6863fe96734a610d725f2f71e252f03a4428
Fixes: QDS-3114
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-30 15:57:29 +00:00
Eike Ziller
d02afbe6b4 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
2020-11-30 16:14:32 +01:00
Miikka Heikkinen
d3412cfcdc Add optional fps counter to 3D edit view
Currently it is enabled via #define FPS_COUNTER in
qt5informationnodeinstanceserver.cpp

Change-Id: If9af313232fc91fca674a43c7ca70b04db7e59f7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-27 14:24:40 +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
Miikka Heikkinen
ae15780f84 QmlPuppet: Hide 3D edit view render window
Rendering is now done using QRhi private API and QQuickRenderControl.

In addition, input event handling was changed to use sendEvent instead
of postEvent for our fake mouse events, as mouse event position
gets corrupted somehow if event is handled asynchronously when the
window is hidden.

Change-Id: Ia2466622cd4b60e3f73e0ad3e7e4da7c7c335451
Fixes: QDS-3125
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-27 12:11:28 +00:00
Eike Ziller
8245523653 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/designer/cpp/formclasswizard.h
	src/plugins/designer/cpp/formclasswizarddialog.h

Change-Id: I9f9d166e1a9249022305503f9cbe571136c2a2b1
2020-11-25 11:25:34 +01:00
Thomas Hartmann
4c4a25d08e QmlDesigner: To not render huge items
Rendering large items takes too much memory.

Change-Id: I19084d707989e846fc446e24da228bc73c024013
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-24 19:48:07 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Marco Bubke
9b6944086b MultiLanguage: Add image generation for excel export
Change-Id: Ied15381d94c391c86438c66fe88f755421bb3492
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-19 13:22:44 +00:00
Christian Kandeler
7aec256087 QmlDesigner & friends: Fix various new warnings
Change-Id: Ia5e3d47e70e1881e70652f090ccc61543535df4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-18 17:05:51 +00:00
Alessandro Portale
30aec82285 Add missing "final" to unexported/unshared classes
Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 15:40:29 +00:00
Miikka Heikkinen
12f7df6a85 QmlPuppet: Remove effect preview support
The issue in QtQuick3D blocking effect previews (QTBUG-86616) is not
going to be fixed in Qt 5 anymore, and Effect was moved to QtQuick3D
from QtQuick3D.Effects in Qt 6, so this can't be written in Qt 5 and
Qt 6 compatible manner anyway. Removed the support for now as it needs
to be implemented differently if we want to enable effect previews in
the future.

Change-Id: Ic786608572c3350e22dab75366cb93586c29459a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 15:49:13 +00:00
Jarek Kobus
ad2d635a09 Get rid of deprecation warning when compiling against Qt 5.15
In Qt 5.15 the comparison operator for QVariant got deprecated.
Fix the warning by substituting comparison operator by custom
method.

Change-Id: I1a5c4ab6742a6d8d85f6cff5a73d5f49c2d5aa73
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-17 11:39:56 +00:00
Jarek Kobus
df9d1414b8 Don't cast QHoverEvent into QMouseEvent
Such a cast rely on the fact that some internal data
of both classes must match. Qt doesn't guarantee it.

Change-Id: I5c29af98e320b72b599c059a2827eb2e7d3843da
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-17 08:42:57 +00:00
Thomas Hartmann
0de8aab7ae QmlDesigner: Add missing stream read
Change-Id: I5a93a6ef37b9f0608e82b2b9d4453f792b813da1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-16 16:03:41 +00:00
Jarek Kobus
37ccef9a0f Silence warnings about unused arguments
Silence warnings when QUICK3D_MODULE is not defined.

Change-Id: I4974ce04e2d6185764d91767461e038eac59d90a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-13 09:14:01 +00:00
Thomas Hartmann
98c735be6e QmlDesigner: Fix for high dpi and Qt 6
When grabbing the window  we have to clip the window using
the root item size.
Depending on the window manager the window is resized.

Another issue is that when grabbing the window offscreen
the pixel ratio is always 1.

Before we assumed that the pixel ratio of all images
is the same for the host process as for the puppet.
This is not necessarily anymore and we have to set
and forward the correct pixel ratio.

Change-Id: I36b467291ab120f825119adea4ed7db10d34266d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-12 15:15:48 +00:00
Thomas Hartmann
3d767fcfe1 QmlDesigner: Hide windows again
Change-Id: I0b22a8bbaabaf2290aa134aebd0044fd81bb5e56
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-12 15:09:31 +00:00
Miikka Heikkinen
767db9a92b QmlPuppet: Disable navigator preview image creation in Qt6
This frequently crashes the puppet. Will be re-enabled once the
underlying issue QTBUG-88320 is fixed.

Task-number: QTBUG-88320
Change-Id: Ie4c1ad914e5bd62dcf3b132cea588ba6fc003bc5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-12 13:53:07 +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
Miikka Heikkinen
50405d7153 QmlDesigner: Fix 3D material preview when QtQuick3D is not imported
3D material preview is not dependent on QtQuick3D import in the open
QML document, so we can enable it even when QtQuick3D is missing.

Change-Id: I5cb35ef403599704684ebe87c81cd949f828ad00
Fixes: QDS-2912
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-06 09:21:33 +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
Jarek Kobus
c0408ed52e Compile fixes with Qt 6
Change-Id: Ia5335bef6aeaff3ce12339db52d96793ff588824
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-05 08:14:55 +00:00