aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview
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/qquickgridview
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/qquickgridview')
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index 46e3457d6e..44a01d7b3c 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -5932,14 +5932,14 @@ void tst_QQuickGridView::cacheBuffer()
QVERIFY(findItem<QQuickItem>(gridview, "wrapper", i) == nullptr);
QQuickItem *item = nullptr;
while (!item) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
item = findItem<QQuickItem>(gridview, "wrapper", i);
}
}
{
- bool b = true;
+ std::atomic<bool> b = true;
controller.incubateWhile(&b);
}
@@ -5971,14 +5971,14 @@ void tst_QQuickGridView::cacheBuffer()
QQuickItem *item = nullptr;
while (!item) {
qGuiApp->processEvents(); // allow refill to happen
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
item = findItem<QQuickItem>(gridview, "wrapper", i);
}
}
{
- bool b = true;
+ std::atomic<bool> b = true;
controller.incubateWhile(&b);
}
@@ -5999,7 +5999,7 @@ void tst_QQuickGridView::asynchronous()
QQuickGridView *gridview = nullptr;
while (!gridview) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
gridview = rootObject->findChild<QQuickGridView*>("view");
}
@@ -6009,14 +6009,14 @@ void tst_QQuickGridView::asynchronous()
QVERIFY(findItem<QQuickItem>(gridview, "wrapper", i) == nullptr);
QQuickItem *item = nullptr;
while (!item) {
- bool b = false;
+ std::atomic<bool> b = false;
controller.incubateWhile(&b);
item = findItem<QQuickItem>(gridview, "wrapper", i);
}
}
{
- bool b = true;
+ std::atomic<bool> b = true;
controller.incubateWhile(&b);
}