diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h index 70cc206f13..c5966f7893 100644 --- a/src/corelib/thread/qfuture.h +++ b/src/corelib/thread/qfuture.h @@ -101,9 +101,6 @@ public: operator T() const; #endif - bool operator==(const QFuture &other) const { return (d == other.d); } - bool operator!=(const QFuture &other) const { return (d != other.d); } - void cancel() { d.cancel(); } bool isCanceled() const { return d.isCanceled(); } diff --git a/src/corelib/thread/qfuture.qdoc b/src/corelib/thread/qfuture.qdoc index c1ead6b893..59f80da4af 100644 --- a/src/corelib/thread/qfuture.qdoc +++ b/src/corelib/thread/qfuture.qdoc @@ -167,17 +167,6 @@ Assigns \a other to this future and returns a reference to this future. */ -/*! \fn template bool QFuture::operator==(const QFuture &other) const - - Returns \c true if \a other is a copy of this future; otherwise returns \c false. -*/ - -/*! \fn template bool QFuture::operator!=(const QFuture &other) const - - Returns \c true if \a other is \e not a copy of this future; otherwise returns - false. -*/ - /*! \fn template void QFuture::cancel() Cancels the asynchronous computation represented by this future. Note that diff --git a/src/corelib/thread/qfuturewatcher.h b/src/corelib/thread/qfuturewatcher.h index 4a630dfbe8..0e7490d9a5 100644 --- a/src/corelib/thread/qfuturewatcher.h +++ b/src/corelib/thread/qfuturewatcher.h @@ -210,7 +210,7 @@ private: template Q_INLINE_TEMPLATE void QFutureWatcher::setFuture(const QFuture &_future) { - if (_future == m_future) + if (_future.d == m_future.d) return; disconnectOutputInterface(true); 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()