diff options
author | Martin Jones <martin.jones@jollamobile.com> | 2014-07-23 17:51:37 +1000 |
---|---|---|
committer | Martin Jones <martin.jones@jollamobile.com> | 2014-07-25 02:58:24 +0200 |
commit | 39c144f44be76ccc7bdec540a7b7ec00cf0fdc5d (patch) | |
tree | 65a49bcc2b84b6594f2a2127d632cc48fbdc7edb /tests/auto/quick/qquickgridview | |
parent | 79f262711c053608c7b0d775a8c7031368ddd17f (diff) |
Don't recreate header and footer unnecessarily
The only time that they need to be recreated is if the orientation
changes (even then, a good implementation could handle it, but no
point requiring that now).
Task-number: QTBUG-40375
Change-Id: Id0215fb812724827bb139cda8f8dc6208c703852
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'tests/auto/quick/qquickgridview')
-rw-r--r-- | tests/auto/quick/qquickgridview/tst_qquickgridview.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index 863fb69b84..a350074b42 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -3613,12 +3613,13 @@ void tst_QQuickGridView::resetModel_headerFooter() model.reset(); - header = findItem<QQuickItem>(contentItem, "header"); - QVERIFY(header); + // A reset should not force a new header or footer to be created. + QQuickItem *newHeader = findItem<QQuickItem>(contentItem, "header"); + QVERIFY(newHeader == header); QCOMPARE(header->y(), -header->height()); - footer = findItem<QQuickItem>(contentItem, "footer"); - QVERIFY(footer); + QQuickItem *newFooter = findItem<QQuickItem>(contentItem, "footer"); + QVERIFY(newFooter == footer); QCOMPARE(footer->y(), 60.*2); delete window; |