From b888745211c9a1113bb77a33026500a335fd4986 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 19 Oct 2018 16:30:54 +0200 Subject: [PATCH] tst_qquicktableview: use QQuickTest::qWaitForItemPolished() Change-Id: Iac53158bdd5138f41e5cc8d8fe1e1a5f7959be23 Reviewed-by: Richard Moe Gustavsen --- tests/auto/quick/qquicktableview/qquicktableview.pro | 1 + tests/auto/quick/qquicktableview/tst_qquicktableview.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/quick/qquicktableview/qquicktableview.pro b/tests/auto/quick/qquicktableview/qquicktableview.pro index f4d0265dd3..cf831ed5b5 100644 --- a/tests/auto/quick/qquicktableview/qquicktableview.pro +++ b/tests/auto/quick/qquicktableview/qquicktableview.pro @@ -1,4 +1,5 @@ CONFIG += testcase +QT += qmltest TARGET = tst_qquicktableview macos:CONFIG -= app_bundle diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp index d475ef9c4d..a3b9aa4c03 100644 --- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp +++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp @@ -27,6 +27,7 @@ ****************************************************************************/ #include +#include #include #include @@ -79,8 +80,8 @@ Q_DECLARE_METATYPE(QMarginsF); DECLARE_TABLEVIEW_VARIABLES #define WAIT_UNTIL_POLISHED \ - QVERIFY(tableViewPrivate->polishScheduled); \ - QTRY_VERIFY(!tableViewPrivate->polishScheduled) + QVERIFY(QQuickTest::qIsPolishScheduled(tableView)); \ + QVERIFY(QQuickTest::qWaitForItemPolished(tableView)) class tst_QQuickTableView : public QQmlDataTest {