From 30a1683f65fa0d01eceb7e1293abc84108d76e7f Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Thu, 29 Oct 2020 12:41:11 +0100 Subject: Remove the comparison operators of QFuture These operators don't do what the user might expect and may lead to confusing results. [ChangeLog][Source-Incompatible Changes][QFuture] The comparison operators of QFuture have been removed. They were comparing the underlying d-ptrs instead of comparing the results (as the users might expect), which is not very helpful for the users point of view. Change-Id: I80a887610eac38b60329128cca52cdb5fb515207 Reviewed-by: Sona Kurazyan Reviewed-by: Allan Sandfeld Jensen --- tests/auto/corelib/thread/qfuture/tst_qfuture.cpp | 2 -- .../corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp index 2d78af8f94..0faa8e0be7 100644 --- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp @@ -1504,8 +1504,6 @@ void tst_QFuture::voidConversions() QFuture voidFuture(intFuture); voidFuture = intFuture; - - QVERIFY(voidFuture == intFuture); } { diff --git a/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp b/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp index 2a8a340925..a05687f4e5 100644 --- a/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp +++ b/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp @@ -107,7 +107,7 @@ void tst_QFutureSynchronizer::futures() synchronizer.addFuture(future); } - QCOMPARE(futures, synchronizer.futures()); + QCOMPARE(futures.count(), synchronizer.futures().count()); } void tst_QFutureSynchronizer::setFuture() @@ -122,7 +122,6 @@ void tst_QFutureSynchronizer::setFuture() QFuture future; synchronizer.setFuture(future); QCOMPARE(synchronizer.futures().size(), 1); - QCOMPARE(synchronizer.futures().first(), future); } void tst_QFutureSynchronizer::waitForFinished() -- cgit v1.2.3