Commit Graph

743 Commits

Author SHA1 Message Date
Eike Ziller
1368111824 Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: Ie2b23daa457c2aed635a784963bc1e95740bd076
2022-02-02 10:17:03 +01:00
Christian Strømme
4a0c6f1e78 Fix invalid usage of temporary data
Make sure the return value stays valid in the scope we're using it in.

Change-Id: Ifa8a7ef88c9189ba90f5adb699b284f381a59488
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-31 16:04:12 +00:00
Miikka Heikkinen
d48a4bd60f QmlDesigner: Add 3D editor visibility toggle actions
Added toggle for showing selection boxes, camera frustums, and icon
gizmos.

Fixes: QDS-5954
Change-Id: I97e12a3a04b9a1a1af5851e382f36c58ee869f45
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-31 09:15:32 +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
Thomas Hartmann
6073f3396c QmlDesigner: Disable crashpad in the qml2puppet
If the host proecess crashes then qml2puppet will also be shutdown.
I suspect this can lead to crash reports of the host application
not properly reported.

Change-Id: Ic503874ce660db3311958ecd0718255a1cf3daea
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 12:39:10 +00:00
Miikka Heikkinen
557489c3fc QmlDesigner: Fix camera frustum initialization for Qt5 builds
In Qt5 builds, we need additional async update at camera geometry
initialization to ensure source camera is up to date and frustum mesh
can be constructed.

Fixes: QDS-6071
Change-Id: I41371ae66fde432b0fdf4b5fee6a0604d005bf63
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 09:00:57 +00:00
Miikka Heikkinen
94a17f1e7e QmlDesigner: Fix 3D picking of RuntimeLoader loaded models
RuntimeLoader creates the loaded nodes dynamically, similar to
Repeater3D and Loader3D, so handle it similarly as well.

Fixes: QDS-6053
Change-Id: Iece15254e720cfc0a6796b182ef00c3a773cf35d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-28 08:58:49 +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
Jere Tuliniemi
a03a50a262 QmlDesigner: Add camera alignment buttons
Add a button to 3D edit view that aligns the selected cameras to the
view camera. Add another button that aligns the view camera to a
selected camera.

Task-number: QDS-4482
Change-Id: Ibe6ceaf498db10f45c8c351e3a108419d8d7a59b
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-25 14:15:54 +00:00
Miikka Heikkinen
97a6d37ef3 QmlDesigner: Support moving 3D edit camera with arrow keys
3D edit camera can now be moved up/down/left/right with arrow keys.

Task-number: QDS-5790
Change-Id: I3b4a095b96bdaa9d00bf6b29b750af1f783b485e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-01-14 09:40:16 +00:00
Eike Ziller
85b60d9608 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/plugins/coreplugin/editormanager/editormanager.cpp

Change-Id: I80fe565749ad5c06dfe99436f2dc6ab4b66a2537
2021-12-16 10:50:33 +01:00
Miikka Heikkinen
d73be23c69 QmlDesigner: Make model used for instancing unpickable in 3D editor
The base model used for instancing is hidden at render time, so it
should not be pickable in 3D editor.

Fixes: QDS-5100
Change-Id: I7c58bd8e7e5c9bfbe75dbaff67c0fd99793ad610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2021-12-14 15:27:01 +00:00
Miikka Heikkinen
4751e9a771 QmlDesigner: Change 3D editor selection box appearance
The selection box in 3D editor no longer includes selection boxes of
immediate children for clarity. The box itself also now only shows the
corners of the box.

Fixes: QDS-3656
Change-Id: Iae3e884276f26385d6a362809b79a74e09c093a3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-12-14 13:03:32 +00:00
Miikka Heikkinen
553de19151 QmlDesigner: Fix picking of Repeater3D/Loader3D generated nodes
There is no top level Repeater3D node with an actual instance
when the Repeater3D is inside a component. The pick target was not
correctly set in this case.

Now we set pick target on every encountered Repeater3D object so
we can propagate it to every object they create.

The same was done for Loader3D, which also creates nodes dynamically.

Fixes: QDS-5745
Change-Id: I537de28ff7426adaa29c2febc6c4b3416baeccb5
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-12-13 11:26:15 +00:00
Eike Ziller
d422b408e0 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
2021-12-09 12:04:32 +01:00
Miikka Heikkinen
a4c2f2fb8c QmlDesigner: Fix Qt5 compilation
QQuick3DViewport::pickAll was introduced in Qt 6.2.
Checking against version 6.2.1 because that's when the global picking
API was taken into use in QmlDesigner.

Change-Id: Id69ff9d958da89ba9e043dfb082a99f640884a4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-07 12:57:42 +00:00
Miikka Heikkinen
9c15b5b16d QmlDesigner: Update _pickTarget of Repeater3D created objects
The objects Repeater3D creates are created after handleInstanceHidden
is called for the repeater instance, so the _pickTarget of the created
children doesn't get properly updated. Added signal handler to
make sure handleInstanceHidden is called again after all objects have
been created.

Fixes: QDS-5643
Change-Id: I8b63614fca0be3956b6896028e3f3a0f49bfe397
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-07 09:00:25 +00:00
Miikka Heikkinen
eba2a0520b QmlDesigner: Fix picking issues
We now check also the parent chain for pickability, because
a node is not pickable if one of the ancestors is not pickable,
as all properties picking depends on (visibility, locked state)
are implicitly inherited by descendants.

Rotate gizmo rings default to regular View3D picking when the angle
is so steep that the plane intersection is not reliable. With new
global picking enabled handling we need to check all hits instead
of just the first one.

Change-Id: Ib1aa604b06f7db1041f5d4c3019cc2badf29a20f
Fixes: QDS-5679
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-07 08:18:35 +00:00
Kaj Grönholm
4a5603b15c Adjust to model bounds calculation API change
Model bounds API changed with 25b757b7b0a286a392b3 so switch to new
API with version checks.

Task-number: QDS-5657
Change-Id: I6d880f179fc277f94ea9ac610ae682e9afbefe39
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-12-03 05:19:42 +00:00
Eike Ziller
421d8038dc Merge remote-tracking branch 'origin/6.0'
Change-Id: I2ae142f02ee184d756932bf594c25addd3c2676c
2021-12-02 09:31:03 +01:00
Antti Määttä
eadc9cb0e3 Improve particle system animation driver
- Do not automatically restart particle system animation when pressing the
  restart button if the animation is paused.
- Use own QElapsedTimer in AnimationDriver and properly handle animation
  driver pausing.

Change-Id: Ic2924fb66fddffb8878625be8fa766f06219ca61
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-12-02 05:32:45 +00:00
Eike Ziller
d62d0f305b Merge remote-tracking branch 'origin/6.0'
Change-Id: I71b19dd8ecd96a7a2a58622f68283b8635264e48
2021-12-01 09:24:05 +01:00
Miikka Heikkinen
09b2ceb96a QmlDesigner: Destroy old view before each navigator preview generation
If you triggered another preview generation while previous
is still going through the async loop, it was possible for puppet to
crash or create a preview image with e.g. both material and model
previews overlapping.

Fixes: QDS-5600
Change-Id: Ia11e01cff0503483dc4152aa412c3f9aea7fea6d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-26 11:24:16 +00:00
Thomas Hartmann
3ee0b55b7a QmlDesigner: Support transparent border for effects
If an effect uses transparent border int paints outside of the item.
Without this patch the item is only rendered inside the bounds of the item.
This patch always adds 40px to the bounding rectangle if an effect is
detected. This is done by effectAdjustedBoundingRect().
The 40px should be sufficient for every realistic case.

Task-number: QDS-3576
Change-Id: I82af0ea66c79039dcae92a88a5954b49de6d944f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-26 10:26:31 +00:00
Miikka Heikkinen
2be4efd475 QmlDesigner: Fix navigator preview of imported 3D components
Rendering of preview tooltip 3D content requires rendering multiple
frames to find the correct zoom level for a nice preview image.
This used to be done in a synchronous loop, which doesn't work in Qt6.
It doesn't work anymore because preview tooltip rendering uses a
selection box encompassing the component scene for finding the proper
zoom level. Selection boxes use custom geometry, which in Qt6
requires asynchronous rendering to allow the geometry to update between
frames.

Fixes: QDS-5600
Change-Id: Ib5e54a04ad5df2a8706fd22e554232feb45dd51e
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-11-26 08:27:03 +00:00
hjk
56009b8b15 Merge remote-tracking branch 'origin/6.0'
Change-Id: I0eae76ecff1a315877e4fdd471f0de3a3a55f180
2021-11-24 11:37:12 +01:00
Antti Määttä
bf6f41322c Handle particle system animation when selecting child object
Do not stop particle system animation when user selects particle system
child object. Instead continue particle system animation and if the child
parent particle system is another particle system, enable that animation.

Task-number: QDS-5562
Change-Id: I334f522536b53e7fb5cbebf8f7e9914f6394d165
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-24 05:44:45 +00:00
Miikka Heikkinen
5841a159c0 QmlDesigner: Fix capitalization of rotBlocked@Internal aux property
The "@Internal" part of aux property must have the "I" capitalized
for it to avoid affecting document modified state.

Fixes: QDS-4802
Change-Id: Ibbf0006ba6c24bad3ad017a72196dac1d366fe94
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>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-11-23 14:29:51 +00:00
Christian Kandeler
8f611286f7 Fix some compiler warnings
Change-Id: I9128afcf56bd47cb6627012bb6b0d13395b432ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-22 13:39:08 +00:00
hjk
4de74a67ee Merge remote-tracking branch 'origin/6.0'
Change-Id: I773141d47e3f2b773da51f2e26ef53b93bb28f90
2021-11-22 13:18:08 +01:00
Miikka Heikkinen
cb00a8d30f QmlDesigner: Fix orthographic camera hdpi issues in edit 3D view
There is no need to double the viewport anymore when calculating
orthographic camera frustum visualization, Qt6 correctly accounts
for device pixel ratio in ortho projection. Even in Qt5, the old
hack only made frustum visualization correct for hdpi screens while
breaking it for regular screens.

Also fixed zoom factor handling for orthographic edit camera mode.

Task-number: QDS-5469
Change-Id: Ie53b5dfa2fbcc00f098ea64e5a6673e4b7af0963
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-22 10:14:42 +00:00
Eike Ziller
eba4115b82 Merge remote-tracking branch 'origin/6.0'
Change-Id: I3bab4e31bc5993c59c7025ebde0846bf6c75810e
2021-11-19 10:44:15 +01:00
Miikka Heikkinen
afe77aa646 QmlDesigner: Fix 3D edit view rendering logic
If we have more than one render in queue for 3D edit view, we know the
current render is not good, so do not send it to creator side but
instead wait until we have just one render in the queue.

Also changed the timeout for queued renders to closely correspond to
60fps frame time as there is no point rendering any faster than that.
This also means we never need to queue more than two frames to ensure
correct results.

Fixes: QDS-5467
Change-Id: I49a3a7aeaff24484f48784d0391414165ce50748
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-19 08:19:02 +00:00
Antti Määttä
96db947c81 Fix particles play button state when scene changes
Add play button state to the scene state.

Task-number: QDS-5499
Change-Id: Id3035de439aa80fd782348cf89a1d8456a7dd006
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 07:13:25 +00:00
Eike Ziller
ff5bfe6f0f Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I366a1a0e378811dfc9b4e6f42ec96426dbb15356
2021-11-15 13:14:24 +01:00
Miikka Heikkinen
9e04c6133c QmlDesigner: Compilation fix for Qt5 builds
Change-Id: I37ddd5024588c14ea415ad43ffe5b7a89c3f6857
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-11-12 08:46:29 +00:00
Thomas Hartmann
9d90715752 QmlDesigner: Refresh items if state is changed
We have to paint each item after a state change. This seems
to be a regression caused by the swtich to Qt 6.

Task-number: QDS-5462
Change-Id: I10a1e0e03c7e887c0998864f397fcbe429364ec7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-11-11 13:05:59 +00:00
Eike Ziller
164aae53d2 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	src/libs/utils/theme/theme_mac.mm
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/debugger/lldb/lldbengine.cpp

Change-Id: I5f2c62e0bce6c91a53a554b3278dbe23ff7dde36
2021-11-11 13:04:42 +01:00
Antti Määttä
4a510f7f6f Allow selecting particle system as root
Not allowing this causes selection problems.

Fixes: QDS-5371
Change-Id: I99d2591a3beb07e39413ba046f3f25e81f0cef50
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-11 10:27:08 +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
Eike Ziller
3b9b9bdc0b Merge remote-tracking branch 'origin/6.0'
Change-Id: Ia7fc255ee8680e6beac5d4d878f446fe40873183
2021-11-08 09:46:57 +01: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
Eike Ziller
e6130c9446 Merge remote-tracking branch 'origin/6.0'
Change-Id: Ie46e0028f0dca9f3ddc45ed8794ba6cddd97df26
2021-10-28 10:31:51 +02: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
Eike Ziller
b5fd63b431 Merge remote-tracking branch 'origin/6.0'
Change-Id: I9b824b8bb7b0b5d76e9e8f28f909b542adf773f0
2021-10-27 12:05:08 +02:00
Miikka Heikkinen
f0d0ce4c01 QmlDesigner: Do not create pixmap at component completion
Creating an item pixmap will render the entire scene and clear all
dirty flags, so we don't ever want to render just one item without
checking if other items need rendering, too. So pixmap creation is
removed from completeComponent(). Since completeComponent()
already inserts the completed instances to the dirty instance set,
this should not cause any problems; it just defers the rendering to
the next collectItemChangesAndSendChangeCommands() call.

Fixes: QDS-5271
Change-Id: Ic15dbb29f13875b966f4e3c3556a4ecd7194cdd6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-26 12:50:08 +00:00
Eike Ziller
bb9774de92 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: If8baed5564470e550a0ba5c7720915217eec2412
2021-10-21 09:13:03 +02:00
Orgad Shaneh
3871e40f43 Fix qHash-related size compatibility warnings by MSVC
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 15:03:51 +00:00
Eike Ziller
89d37fb65b Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: Ibcf3ada2824dbbaae8aed0903af61bc95c1c7ce7
2021-10-20 12:19:31 +02:00