summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/concurrent/qfuture
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2011-11-07 13:39:35 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-16 10:32:10 +0100
commit6fcfae99d3615c7a850e4933691763097078c8e4 (patch)
tree52267f0f8a8c42c8bd07a7f624934f0919fa97e4 /tests/auto/corelib/concurrent/qfuture
parent2f90c4e40ec3e15ba4aeaad178e154a3538c46c2 (diff)
Remove warnings from deprecated atomic operators in autotests
Use QAtomic*::load() and ::store() instead of the deprecated cast, assignment, and comparison operators. These will be removed in the near future. The tests for these particular operators have not been changed, though, as the change to remove the operators will also remove the respective tests. Change-Id: I2f24d18992af0c6e0f487d707218e4e84f4bdd12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/corelib/concurrent/qfuture')
-rw-r--r--tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
index 2457504c38..964b834fa7 100644
--- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
@@ -625,26 +625,26 @@ template <typename T>
void testRefCounting()
{
QFutureInterface<T> interface;
- QCOMPARE(int(interface.d->refCount), 1);
+ QCOMPARE(interface.d->refCount.load(), 1);
{
interface.reportStarted();
QFuture<T> f = interface.future();
- QCOMPARE(int(interface.d->refCount), 2);
+ QCOMPARE(interface.d->refCount.load(), 2);
QFuture<T> f2(f);
- QCOMPARE(int(interface.d->refCount), 3);
+ QCOMPARE(interface.d->refCount.load(), 3);
QFuture<T> f3;
f3 = f2;
- QCOMPARE(int(interface.d->refCount), 4);
+ QCOMPARE(interface.d->refCount.load(), 4);
interface.reportFinished(0);
- QCOMPARE(int(interface.d->refCount), 4);
+ QCOMPARE(interface.d->refCount.load(), 4);
}
- QCOMPARE(int(interface.d->refCount), 1);
+ QCOMPARE(interface.d->refCount.load(), 1);
}
void tst_QFuture::refcounting()