aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathview
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-05-13 11:11:23 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-05-15 08:48:03 +0200
commita24a49dfbba623ce7dd70c74b18de4ff92b647c9 (patch)
treeca580c34ddab7f1d8d991f8e216edc410968de09 /tests/auto/quick/qquickpathview
parentd4042c8cd82b35b3ec67c4309d80c9c92f55d889 (diff)
Autotests: use std::atomic in incubateWhile()
Followup to a9bf6e652aa99784343c94b0181c9443205e2a82 Change-Id: Ic010f2610177f93f8fc4e2312d6736c96390e585 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickpathview')
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index 8ba09fa509..efd533c017 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -1841,7 +1841,7 @@ void tst_QQuickPathView::asynchronous()
QQuickPathView *pathview = nullptr;
while (!pathview) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
pathview = rootObject->findChild<QQuickPathView*>("view");
}
@@ -1851,14 +1851,14 @@ void tst_QQuickPathView::asynchronous()
QVERIFY(findItem<QQuickItem>(pathview, "wrapper", i) == nullptr);
QQuickItem *item = nullptr;
while (!item) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
item = findItem<QQuickItem>(pathview, "wrapper", i);
}
}
{
- bool b = true;
+ std::atomic<bool> b = true;
controller.incubateWhile(&b);
}
@@ -2227,7 +2227,7 @@ void tst_QQuickPathView::cacheItemCount()
QVERIFY(findItem<QQuickItem>(pathview, "wrapper", cached[i]) == nullptr);
QQuickItem *item = nullptr;
while (!item) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
item = findItem<QQuickItem>(pathview, "wrapper", cached[i]);
}
@@ -2235,7 +2235,7 @@ void tst_QQuickPathView::cacheItemCount()
}
{
- bool b = true;
+ std::atomic<bool> b = true;
controller.incubateWhile(&b);
}
@@ -2255,13 +2255,13 @@ void tst_QQuickPathView::cacheItemCount()
QVERIFY(findItem<QQuickItem>(pathview, "wrapper", 5) == nullptr);
QQuickItem *item = nullptr;
while (!item) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
item = findItem<QQuickItem>(pathview, "wrapper", 5);
}
{
- bool b = true;
+ std::atomic<bool> b = true;
controller.incubateWhile(&b);
}
}