diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h index 7ae5c68bb9c..1f0c747f404 100644 --- a/src/corelib/thread/qfuture.h +++ b/src/corelib/thread/qfuture.h @@ -65,13 +65,7 @@ public: explicit QFuture(QFutureInterface *p) // internal : d(*p) { } - QFuture(const QFuture &other) - : d(other.d) - { } - ~QFuture() - { } - inline QFuture &operator=(const QFuture &other); bool operator==(const QFuture &other) const { return (d == other.d); } bool operator!=(const QFuture &other) const { return (d != other.d); } @@ -156,13 +150,6 @@ public: // Warning: the d pointer is not documented and is considered private. mutable QFutureInterface d; }; -template -inline QFuture &QFuture::operator=(const QFuture &other) -{ - d = other.d; - return *this; -} - template inline T QFuture::result() const { @@ -195,13 +182,7 @@ public: explicit QFuture(QFutureInterfaceBase *p) // internal : d(*p) { } - QFuture(const QFuture &other) - : d(other.d) - { } - ~QFuture() - { } - QFuture &operator=(const QFuture &other); bool operator==(const QFuture &other) const { return (d == other.d); } bool operator!=(const QFuture &other) const { return (d != other.d); } @@ -248,12 +229,6 @@ public: mutable QFutureInterfaceBase d; }; -inline QFuture &QFuture::operator=(const QFuture &other) -{ - d = other.d; - return *this; -} - inline QFuture QFutureInterface::future() { return QFuture(this); diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index 1787ff3b938..559d26e2314 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -285,21 +285,13 @@ template <> class QFutureInterface : public QFutureInterfaceBase { public: - QFutureInterface(State initialState = NoState) + explicit QFutureInterface(State initialState = NoState) : QFutureInterfaceBase(initialState) { } - QFutureInterface(const QFutureInterface &other) - : QFutureInterfaceBase(other) - { } static QFutureInterface canceledResult() { return QFutureInterface(State(Started | Finished | Canceled)); } - QFutureInterface &operator=(const QFutureInterface &other) - { - QFutureInterfaceBase::operator=(other); - return *this; - } inline QFuture future(); // implemented in qfuture.h