aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-22 22:55:00 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-02-22 05:51:53 +0000
commitfc08696b7265c3409e2a522a144856d0a08ea4c8 (patch)
tree064332274c123eb430211052cc43814083b8a210
parent2844d9c0575249f56ff11d6b45364ec3fd9c2a06 (diff)
parenteea28db9ee61f2ab56d8f25e907dc4e459f64ee6 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-6.2.8' into tqtc/lts-6.2-opensource
Conflicts solved in a file: dependencies.yaml Change-Id: I4575803124e48fdfd0e970f396114d0b222b5340
-rw-r--r--.cmake.conf2
-rw-r--r--.qmake.conf2
-rw-r--r--dependencies.yaml8
-rw-r--r--examples/quick3d/customshaders/MaterialControl.qml19
-rw-r--r--examples/quick3d/lights/CMakeLists.txt1
-rw-r--r--examples/quick3d/lights/icon_settings.pngbin0 -> 15955 bytes
-rw-r--r--examples/quick3d/lights/main.qml164
-rw-r--r--examples/quick3d/lights/qml.qrc1
-rw-r--r--src/plugins/CMakeLists.txt2
-rw-r--r--src/quick3d/qquick3ditem2d.cpp12
-rw-r--r--src/quick3d/qquick3ditem2d_p.h2
-rw-r--r--src/runtimerender/graphobjects/qssgrendercamera.cpp3
-rw-r--r--src/runtimerender/graphobjects/qssgrenderlayer.cpp2
13 files changed, 140 insertions, 78 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 07d90b8a..e62fae5e 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1,2 +1,2 @@
-set(QT_REPO_MODULE_VERSION "6.2.7")
+set(QT_REPO_MODULE_VERSION "6.2.8")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "")
diff --git a/.qmake.conf b/.qmake.conf
index 3f1a1772..ae8c1a24 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -3,4 +3,4 @@ load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 6.2.7
+MODULE_VERSION = 6.2.8
diff --git a/dependencies.yaml b/dependencies.yaml
index 9e70435b..dcf1787a 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
dependencies:
../tqtc-qtbase:
- ref: 694575a59b5370afc494fbf700eee8db1d1ec091
+ ref: 67934c103800bae50c2ec1977758d40fa8e4e507
required: true
../tqtc-qtdeclarative:
- ref: 02277e3753613d9e19bbb36367c7d2b1d13d7545
+ ref: 302ab20d46280e11042f3896460c55d8b8146e41
required: true
../tqtc-qtquicktimeline:
- ref: 6a0299be9c2e4abbd1c53ee0807144f8718c373a
+ ref: cc15a3da9e227a0a044f876ccc0ea46456a71e72
required: false
../tqtc-qtshadertools:
- ref: 5de9eb91f047e8001ac24f0bdf5ffc72adb37236
+ ref: f9868e2b39e539b1bb6917006b789ab7b5fec5eb
required: true
diff --git a/examples/quick3d/customshaders/MaterialControl.qml b/examples/quick3d/customshaders/MaterialControl.qml
index 23d6f1d0..ca3d632b 100644
--- a/examples/quick3d/customshaders/MaterialControl.qml
+++ b/examples/quick3d/customshaders/MaterialControl.qml
@@ -62,7 +62,7 @@ Rectangle {
color: "#6b7080"
width: parent.width
- height: 35
+ height: 75
Component {
id: propertySlider
@@ -136,8 +136,21 @@ Rectangle {
}
}
+ ScrollBar {
+ id: hbar
+ policy: parent.width < columnLayout.width ? ScrollBar.AlwaysOn : ScrollBar.AsNeeded
+ orientation: Qt.Horizontal
+ size: parent.width / columnLayout.width
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+
ColumnLayout {
- anchors.horizontalCenter: parent.horizontalCenter
+ id: columnLayout
+ readonly property int leftMargin: 25
+ x: leftMargin - hbar.position * width
+
RowLayout {
spacing: 10
Loader {
@@ -180,7 +193,7 @@ Rectangle {
id: texControl2
property string checkBoxText: "Texture with Item"
property bool checkBoxSet: false
- sourceComponent: propertyCheckBox
+ sourceComponent: texControl.checkBoxSet ? propertyCheckBox : undefined
}
}
}
diff --git a/examples/quick3d/lights/CMakeLists.txt b/examples/quick3d/lights/CMakeLists.txt
index 7fd67da9..4340a28a 100644
--- a/examples/quick3d/lights/CMakeLists.txt
+++ b/examples/quick3d/lights/CMakeLists.txt
@@ -46,6 +46,7 @@ qt_add_qml_module(lights
custom.vert
teapot.mesh
white.png
+ icon_settings.png
NO_RESOURCE_TARGET_PATH
)
diff --git a/examples/quick3d/lights/icon_settings.png b/examples/quick3d/lights/icon_settings.png
new file mode 100644
index 00000000..8367b980
--- /dev/null
+++ b/examples/quick3d/lights/icon_settings.png
Binary files differ
diff --git a/examples/quick3d/lights/main.qml b/examples/quick3d/lights/main.qml
index d267524d..b11fd58d 100644
--- a/examples/quick3d/lights/main.qml
+++ b/examples/quick3d/lights/main.qml
@@ -241,71 +241,119 @@ Window {
//! [light models]
}
- Frame {
+ Button {
+ x: settingsDrawer.visible ? (settingsDrawer.x + settingsDrawer.width) : 0
anchors.top: parent.top
- anchors.topMargin: 20
- anchors.left: parent.left
- anchors.leftMargin: 10
+ width: 50
+ height: width
+ icon.width: width * 0.5
+ icon.height: height * 0.5
+ icon.source: "icon_settings.png"
+ icon.color: "transparent"
+ background: Rectangle {
+ color: "transparent"
+ }
+ onClicked: {
+ inTransition.duration = 400
+ settingsDrawer.visible = !settingsDrawer.visible;
+ }
+ }
+
+ Drawer {
+ id: settingsDrawer
+ edge: Qt.LeftEdge
+ interactive: false
+ modal: false
background: Rectangle {
color: "#e0e0e0"
- border.color: "#000000"
- border.width: 1
opacity: 0.8
}
- Column {
- id: settingsArea
- CustomCheckBox {
- id: checkBoxShadows
- text: qsTr("Enable Shadows")
- checked: true
- }
- Item { width: 1; height: 20 }
- CustomCheckBox {
- id: checkBoxAnimate
- text: qsTr("Rotate Teapot")
- checked: true
- }
- Item { width: 1; height: 20 }
- CustomCheckBox {
- id: checkBoxCustomMaterial
- text: qsTr("Custom Material")
- checked: false
- }
- Item { width: 1; height: 40 }
- CustomCheckBox {
- id: checkBox1
- text: qsTr("Directional Light")
- checked: true
- }
- CustomSlider {
- id: slider1
- sliderValue: 0.5
- fromValue: 0
- toValue: 1
- }
- Item { width: 1; height: 40 }
- CustomCheckBox {
- id: checkBox2
- text: qsTr("Point Light")
- checked: false
- }
- CustomSlider {
- id: slider2
- sliderValue: 6
- fromValue: 0
- toValue: 10
+ visible: (Qt.platform.os === ("android" || "ios") ? false : true)
+
+ enter: Transition {
+ NumberAnimation {
+ id: inTransition
+ property: "position"
+ to: 1.0
+ duration: 0
+ easing.type: Easing.InOutQuad
}
- Item { width: 1; height: 40 }
- CustomCheckBox {
- id: checkBox4
- text: qsTr("Spot Light")
- checked: false
+ }
+
+ exit: Transition {
+ NumberAnimation {
+ property: "position"
+ to: 0.0
+ duration: 400
+ easing.type: Easing.InOutQuad
}
- CustomSlider {
- id: slider4
- sliderValue: 10
- fromValue: 0
- toValue: 30
+ }
+
+ ScrollView {
+ anchors.fill: parent
+ padding: 10
+
+ Flickable{
+ clip: true
+ contentWidth: settingsArea.width
+ contentHeight: settingsArea.height
+
+ Column {
+ id: settingsArea
+ CustomCheckBox {
+ id: checkBoxShadows
+ text: qsTr("Enable Shadows")
+ checked: true
+ }
+ Item { width: 1; height: 20 }
+ CustomCheckBox {
+ id: checkBoxAnimate
+ text: qsTr("Rotate Teapot")
+ checked: true
+ }
+ Item { width: 1; height: 20 }
+ CustomCheckBox {
+ id: checkBoxCustomMaterial
+ text: qsTr("Custom Material")
+ checked: false
+ }
+ Item { width: 1; height: 40 }
+ CustomCheckBox {
+ id: checkBox1
+ text: qsTr("Directional Light")
+ checked: true
+ }
+ CustomSlider {
+ id: slider1
+ sliderValue: 0.5
+ fromValue: 0
+ toValue: 1
+ }
+ Item { width: 1; height: 40 }
+ CustomCheckBox {
+ id: checkBox2
+ text: qsTr("Point Light")
+ checked: false
+ }
+ CustomSlider {
+ id: slider2
+ sliderValue: 6
+ fromValue: 0
+ toValue: 10
+ }
+ Item { width: 1; height: 40 }
+ CustomCheckBox {
+ id: checkBox4
+ text: qsTr("Spot Light")
+ checked: false
+ }
+ CustomSlider {
+ id: slider4
+ sliderValue: 10
+ fromValue: 0
+ toValue: 30
+ }
+ }
}
}
}
diff --git a/examples/quick3d/lights/qml.qrc b/examples/quick3d/lights/qml.qrc
index 121bd9c2..9074296f 100644
--- a/examples/quick3d/lights/qml.qrc
+++ b/examples/quick3d/lights/qml.qrc
@@ -7,5 +7,6 @@
<file>CustomCheckBox.qml</file>
<file>white.png</file>
<file>custom.vert</file>
+ <file>icon_settings.png</file>
</qresource>
</RCC>
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index c98d7ca9..b1b8320a 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -1,5 +1,5 @@
# Generated from plugins.pro.
-if((android_app OR NOT ANDROID) AND (android_app OR NOT INTEGRITY) AND (NOT ANDROID OR NOT CMAKE_CROSSCOMPILING) AND (NOT ANDROID OR NOT WASM) AND (NOT CMAKE_CROSSCOMPILING OR NOT INTEGRITY) AND (NOT INTEGRITY OR NOT WASM))
+if (NOT INTEGRITY AND NOT WASM AND NOT QNX AND NOT rtems)
add_subdirectory(assetimporters)
endif()
diff --git a/src/quick3d/qquick3ditem2d.cpp b/src/quick3d/qquick3ditem2d.cpp
index ec636dcf..98799aa2 100644
--- a/src/quick3d/qquick3ditem2d.cpp
+++ b/src/quick3d/qquick3ditem2d.cpp
@@ -83,7 +83,7 @@ void QQuick3DItem2D::addChildItem(QQuickItem *item)
{
item->setParent(m_contentItem);
item->setParentItem(m_contentItem);
- connect(item, SIGNAL(destroyed(QObject*)), this, SLOT(sourceItemDestroyed(QObject*)));
+ QQuickItemPrivate::get(item)->addItemChangeListener(this, QQuickItemPrivate::ChangeType::Destroyed);
connect(item, &QQuickItem::enabledChanged, this, &QQuick3DItem2D::updatePicking);
connect(item, &QQuickItem::visibleChanged, this, &QQuick3DItem2D::updatePicking);
m_sourceItems.append(item);
@@ -92,6 +92,8 @@ void QQuick3DItem2D::addChildItem(QQuickItem *item)
void QQuick3DItem2D::removeChildItem(QQuickItem *item)
{
m_sourceItems.removeOne(item);
+ if (item)
+ QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::ChangeType::Destroyed);
if (m_sourceItems.isEmpty())
emit allChildrenRemoved();
else
@@ -103,11 +105,9 @@ QQuickItem *QQuick3DItem2D::contentItem() const
return m_contentItem;
}
-void QQuick3DItem2D::sourceItemDestroyed(QObject *item)
+void QQuick3DItem2D::itemDestroyed(QQuickItem *item)
{
- disconnect(item, SIGNAL(destroyed(QObject*)), this, SLOT(sourceItemDestroyed(QObject*)));
- auto quickItem = static_cast<QQuickItem*>(item);
- removeChildItem(quickItem);
+ removeChildItem(item);
}
void QQuick3DItem2D::invalidated()
@@ -174,7 +174,7 @@ QSSGRenderGraphObject *QQuick3DItem2D::updateSpatialNode(QSSGRenderGraphObject *
this,
[this]() {
auto itemNode = static_cast<QSSGRenderItem2D *>(QQuick3DObjectPrivate::get(this)->spatialNode);
- if (itemNode) {
+ if (itemNode && itemNode->m_rp) {
itemNode->m_rp->deleteLater();
itemNode->m_rp = nullptr;
}
diff --git a/src/quick3d/qquick3ditem2d_p.h b/src/quick3d/qquick3ditem2d_p.h
index 89ac5a22..45dd334c 100644
--- a/src/quick3d/qquick3ditem2d_p.h
+++ b/src/quick3d/qquick3ditem2d_p.h
@@ -64,9 +64,9 @@ public:
void addChildItem(QQuickItem *item);
void removeChildItem(QQuickItem *item);
QQuickItem *contentItem() const;
+ void itemDestroyed(QQuickItem *item) override;
private Q_SLOTS:
- void sourceItemDestroyed(QObject *item);
void invalidated();
void updatePicking();
void derefWindow(QObject *win);
diff --git a/src/runtimerender/graphobjects/qssgrendercamera.cpp b/src/runtimerender/graphobjects/qssgrendercamera.cpp
index a96275f0..8d3541d7 100644
--- a/src/runtimerender/graphobjects/qssgrendercamera.cpp
+++ b/src/runtimerender/graphobjects/qssgrendercamera.cpp
@@ -180,8 +180,7 @@ QSSGRenderRay QSSGRenderCamera::unproject(const QVector2D &inViewportRelativeCoo
const QRectF &inViewport) const
{
QSSGRenderRay theRay;
- QVector2D globalCoords = toAbsoluteCoords(inViewport, inViewportRelativeCoords);
- QVector2D normalizedCoords = absoluteToNormalizedCoordinates(inViewport, globalCoords);
+ QVector2D normalizedCoords = relativeToNormalizedCoordinates(inViewport, inViewportRelativeCoords);
QVector3D &outOrigin(theRay.origin);
QVector3D &outDir(theRay.direction);
QVector2D inverseFrustumScale(1.0f / frustumScale.x(), 1.0f / frustumScale.y());
diff --git a/src/runtimerender/graphobjects/qssgrenderlayer.cpp b/src/runtimerender/graphobjects/qssgrenderlayer.cpp
index 00d69529..cff1fa38 100644
--- a/src/runtimerender/graphobjects/qssgrenderlayer.cpp
+++ b/src/runtimerender/graphobjects/qssgrenderlayer.cpp
@@ -120,7 +120,7 @@ void QSSGRenderLayer::setImportScene(QSSGRenderNode &rootNode)
auto &importChildren = importSceneNode->children;
Q_ASSERT(importChildren.isEmpty());
// We don't want the list to modify our node, so we set the tail and head manually.
- importChildren.m_head = children.m_tail = &rootNode;
+ importChildren.m_head = importChildren.m_tail = &rootNode;
}
void QSSGRenderLayer::removeImportScene(QSSGRenderNode &rootNode)