aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2022-05-27 14:57:53 +0800
committerMitch Curtis <mitch.curtis@qt.io>2022-06-06 09:18:17 +0800
commita72b4cd733cc1d82e7c0d877b75f93b96aa980bd (patch)
treed086534f24d0801ae8d7f2c98f89f3ea760832fa /src/qmltest/quicktest.cpp
parent21a17fbd891fedfc47be9c0cf260f7c76b884935 (diff)
TestCase: add API for checking for polish at window level
These were introduced to the C++ QQuickTest namespace in 36c6c1ea57ad503a2f42fe81a12d1254fcd38cca. QML-only tests should also have access to them. [ChangeLog][QtQuickTest][TestCase] Added waitForPolish() and made isPolishScheduled() also take a Window, making it possible to verify that updatePolish() was called on one or more items managed by a window. [ChangeLog][QtQuickTest][TestCase] Deprecated waitForItemPolished(). Use the new waitForPolish() function instead. Task-number: QTBUG-93757 Change-Id: Ie53389c2d49e096ebf382b902714c9dd4c8d5685 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
-rw-r--r--src/qmltest/quicktest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp
index e2deaf5533..9d8a17c28e 100644
--- a/src/qmltest/quicktest.cpp
+++ b/src/qmltest/quicktest.cpp
@@ -128,6 +128,9 @@ bool QQuickTest::qIsPolishScheduled(const QQuickItem *item)
QVERIFY(QQuickTest::qWaitForPolish(window));
\endcode
+ The QML equivalent of this function is
+ \l [QML]{TestCase::}{isPolishScheduled()}.
+
\sa QQuickItem::polish(), QQuickItem::updatePolish(),
QQuickTest::qWaitForPolish()
*/
@@ -187,6 +190,9 @@ bool QQuickTest::qWaitForPolish(const QQuickItem *item, int timeout)
Returns \c true if \c qIsPolishScheduled(item) returns false for all items
within \a timeout milliseconds, otherwise returns \c false.
+ The QML equivalent of this function is
+ \l [QML]{TestCase::}{waitForPolish()}.
+
\sa QQuickItem::polish(), QQuickItem::updatePolish(),
QQuickTest::qIsPolishScheduled()
*/