diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2022-08-12 10:33:55 +0800 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-08-25 05:44:34 +0000 |
commit | 84044aec72dcd3be5b93e4575898b41eb995aed4 (patch) | |
tree | 1a29c5717edddf541b8127207504bfa07d3e260e /tests | |
parent | f2905d635f28c9fa5d0609ce375d97ba4c3d26e9 (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')
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 4fa034922d..20ba124a97 100644 --- a/tests/auto/quick/qquicklistview/data/displayMargin.qml +++ b/tests/auto/quick/qquicklistview/data/displayMargin.qml @@ -19,7 +19,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 875199901a..c169d92826 100644 --- a/tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml +++ b/tests/auto/quick/qquicklistview/data/resizeAfterComponentComplete.qml @@ -9,7 +9,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 9cbae9ad6f..828eaeacb4 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -9473,7 +9473,7 @@ void tst_QQuickListView::QTBUG_66163_setModelViewPortSizeChange() delegate: Rectangle { color: index % 2 ? "green" : "orange" - width: parent.width + width: view.width height: 50 } |