From 464ff857641211e7e4794a1b711a2ecc77594887 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 6 Sep 2012 13:30:13 +0200 Subject: Attempt to fix tst_QQuickListView::sectionsDelegate_headerVisibility() Task-number: QTBUG-24395 Change-Id: I07b0fc17566e86dcebf913721f293378cf15466b Reviewed-by: Sergio Ahumada Reviewed-by: Caroline Chao --- tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index fabba8f170..c2bcd54c48 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -2168,8 +2168,6 @@ void tst_QQuickListView::sectionsDragOutsideBounds() void tst_QQuickListView::sectionsDelegate_headerVisibility() { - QSKIP("QTBUG-24395"); - QQuickView *window = createView(); QaimModel model; @@ -2179,7 +2177,8 @@ void tst_QQuickListView::sectionsDelegate_headerVisibility() window->rootContext()->setContextProperty("testModel", &model); window->setSource(testFileUrl("listview-sections_delegate.qml")); window->show(); - qApp->processEvents(); + window->requestActivateWindow(); + QTest::qWaitForWindowActive(window); QQuickListView *listview = findItem(window->rootObject(), "list"); QTRY_VERIFY(listview != 0); @@ -2191,10 +2190,10 @@ void tst_QQuickListView::sectionsDelegate_headerVisibility() // ensure section header is maintained in view listview->setCurrentIndex(20); QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false); - QTRY_COMPARE(listview->contentY(), 200.0); + QTRY_VERIFY(qFuzzyCompare(listview->contentY(), 200.0)); QTRY_VERIFY(listview->isMoving() == false); listview->setCurrentIndex(0); - QTRY_COMPARE(listview->contentY(), 0.0); + QTRY_VERIFY(qFuzzyIsNull(listview->contentY())); delete window; } -- cgit v1.2.3