From 6fcfae99d3615c7a850e4933691763097078c8e4 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 7 Nov 2011 13:39:35 +0100 Subject: 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 --- tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp') 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 void testRefCounting() { QFutureInterface interface; - QCOMPARE(int(interface.d->refCount), 1); + QCOMPARE(interface.d->refCount.load(), 1); { interface.reportStarted(); QFuture f = interface.future(); - QCOMPARE(int(interface.d->refCount), 2); + QCOMPARE(interface.d->refCount.load(), 2); QFuture f2(f); - QCOMPARE(int(interface.d->refCount), 3); + QCOMPARE(interface.d->refCount.load(), 3); QFuture 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() -- cgit v1.2.3