aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2022-08-12 10:33:55 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-25 04:59:06 +0000
commit29ceeff6a724288e58f0af3bedda6a3338d131a6 (patch)
tree1e2c592450be559cc6ad799658cb89bbfe5b3966 /tests
parent0dbe1e3e4c273cd955742ae1ddb85f9bf2572ba1 (diff)
tst_qquicklistview: remove some bindings to parent
See ed73efa27acd8e7c42a960ef90c2e4a898c20c30. Change-Id: I32434afcfd5faaf1c05b50cd96dfe6e6468f3ac4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 08398aed81cea328e4948e060d10dc53298c10ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquicklistview/data/appendDuringScrollDown.qml3
-rw-r--r--tests/auto/quick/qquicklistview/data/displayMargin.qml2
-rw-r--r--tests/auto/quick/qquicklistview/data/listview-itematindex.qml3
-rw-r--r--tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml2
-rw-r--r--tests/auto/quick/qquicklistview/data/sectionSnapping.qml3
-rw-r--r--tests/auto/quick/qquicklistview/data/snapOneItemWrongDirection.qml3
-rw-r--r--tests/auto/quick/qquicklistview/data/strictlyenforcerange-resize.qml3
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp2
8 files changed, 13 insertions, 8 deletions
diff --git a/tests/auto/quick/qquicklistview/data/appendDuringScrollDown.qml b/tests/auto/quick/qquicklistview/data/appendDuringScrollDown.qml
index af35c29143..6ba6480297 100644
--- a/tests/auto/quick/qquicklistview/data/appendDuringScrollDown.qml
+++ b/tests/auto/quick/qquicklistview/data/appendDuringScrollDown.qml
@@ -1,10 +1,11 @@
import QtQuick 2.6
ListView {
+ id: listView
width: 320; height: 240
focus: true
delegate: Text {
- height: 40; width: parent.width
+ height: 40; width: listView.width
text: model.text
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
diff --git a/tests/auto/quick/qquicklistview/data/displayMargin.qml b/tests/auto/quick/qquicklistview/data/displayMargin.qml
index aafbb4235f..e6ea695b49 100644
--- a/tests/auto/quick/qquicklistview/data/displayMargin.qml
+++ b/tests/auto/quick/qquicklistview/data/displayMargin.qml
@@ -44,7 +44,7 @@ Item {
model: 100
delegate: Rectangle {
objectName: "delegate"
- width: parent.width
+ width: view.width
height: 25
color: index % 2 ? "steelblue" : "lightsteelblue"
Text {
diff --git a/tests/auto/quick/qquicklistview/data/listview-itematindex.qml b/tests/auto/quick/qquicklistview/data/listview-itematindex.qml
index fba8b11933..2194f1edff 100644
--- a/tests/auto/quick/qquicklistview/data/listview-itematindex.qml
+++ b/tests/auto/quick/qquicklistview/data/listview-itematindex.qml
@@ -1,13 +1,14 @@
import QtQuick 2.0
ListView {
+ id: listView
width: 400
height: 400
focus: true
model: 3
delegate: Text {
- width: parent.width
+ width: listView.width
height: 10
property int idx: index
text: index
diff --git a/tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml b/tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml
index 851d8f9a0c..f5be95b7cc 100644
--- a/tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml
+++ b/tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml
@@ -56,7 +56,7 @@ ListView {
anchors.fill: parent
model: 10
delegate: Rectangle {
- width: parent.width
+ width: listView.width
height: 40
border.color: "lightsteelblue"
Text {
diff --git a/tests/auto/quick/qquicklistview/data/sectionSnapping.qml b/tests/auto/quick/qquicklistview/data/sectionSnapping.qml
index 2583cc0377..48a893f88c 100644
--- a/tests/auto/quick/qquicklistview/data/sectionSnapping.qml
+++ b/tests/auto/quick/qquicklistview/data/sectionSnapping.qml
@@ -1,6 +1,7 @@
import QtQuick 2.0
ListView {
+ id: listView
width: 400
height: 400
preferredHighlightBegin: 100
@@ -17,7 +18,7 @@ ListView {
}
delegate: Rectangle {
- width: parent.width
+ width: listView.width
height: 50
color: index % 2 ? "lightsteelblue" : "steelblue"
Text {
diff --git a/tests/auto/quick/qquicklistview/data/snapOneItemWrongDirection.qml b/tests/auto/quick/qquicklistview/data/snapOneItemWrongDirection.qml
index f5b7b35d0c..1dfbfe0feb 100644
--- a/tests/auto/quick/qquicklistview/data/snapOneItemWrongDirection.qml
+++ b/tests/auto/quick/qquicklistview/data/snapOneItemWrongDirection.qml
@@ -1,13 +1,14 @@
import QtQuick 2.0
ListView {
+ id: listView
width: 400
height: 400
focus: true
model: 10
delegate: Rectangle {
- width: parent.width
+ width: listView.width
height: 50
color: index % 2 ? "blue" : "green"
}
diff --git a/tests/auto/quick/qquicklistview/data/strictlyenforcerange-resize.qml b/tests/auto/quick/qquicklistview/data/strictlyenforcerange-resize.qml
index 338af38475..16b9c72b16 100644
--- a/tests/auto/quick/qquicklistview/data/strictlyenforcerange-resize.qml
+++ b/tests/auto/quick/qquicklistview/data/strictlyenforcerange-resize.qml
@@ -1,6 +1,7 @@
import QtQuick 2.0
ListView {
+ id: listView
width: 400
height: 400
focus: true
@@ -15,7 +16,7 @@ ListView {
model: 10
delegate: Item {
- width: parent.width
+ width: listView.width
height: ListView.isCurrentItem ? 100 : 50
Text {
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 027d305fd8..23738f13c7 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -9486,7 +9486,7 @@ void tst_QQuickListView::QTBUG_66163_setModelViewPortSizeChange()
delegate: Rectangle {
color: index % 2 ? "green" : "orange"
- width: parent.width
+ width: view.width
height: 50
}