aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-07-26 14:35:05 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-07-26 17:05:34 +0200
commitd526a72c44cf3ed8d53c8d2b1c08dc5e7f1afe61 (patch)
tree63095d57f307bb9b90ab90e5dde98ae23e539c46 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
parentcbe445dd915760d81a467b5285bacd208e44e365 (diff)
parentaeec2f94c376c9a0e84bbbb3be4652384c7da113 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/quick/handlers/qquickpointerdevicehandler.cpp src/quick/scenegraph/qsgdefaultglyphnode.cpp src/quick/scenegraph/qsgdefaultglyphnode_p.cpp src/quick/scenegraph/qsgdefaultglyphnode_p_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp Done-With: Jan Arve Sæther <jan-arve.saether@qt.io> Done-With: Laszlo Agocs <laszlo.agocs@qt.io> Change-Id: I35749152f8dce44b9af8d52b1283629879010f11
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index f14a6e75f6..bab2ec34f8 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -278,6 +278,7 @@ private slots:
void addOnCompleted();
void setPositionOnLayout();
void touchCancel();
+ void resizeAfterComponentComplete();
private:
template <class T> void items(const QUrl &source);
@@ -9020,6 +9021,21 @@ void tst_QQuickListView::touchCancel() // QTBUG-74679
QTRY_COMPARE(listview->contentY(), 500.0);
}
+void tst_QQuickListView::resizeAfterComponentComplete() // QTBUG-76487
+{
+ QScopedPointer<QQuickView> window(createView());
+ window->setSource(testFileUrl("resizeAfterComponentComplete.qml"));
+ window->resize(640, 480);
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+
+ QObject *listView = window->rootObject();
+ QVERIFY(listView);
+
+ QObject *lastItem = qvariant_cast<QObject *>(listView->property("lastItem"));
+ QTRY_COMPARE(lastItem->property("y").toInt(), 9 * lastItem->property("height").toInt());
+}
+
QTEST_MAIN(tst_QQuickListView)
#include "tst_qquicklistview.moc"