diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-11-18 23:54:41 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-20 00:27:56 +0100 |
commit | 8ef339ed2fed66646f458c60b2e0e7ac560dad06 (patch) | |
tree | 38db8c86f4c27e68d8855820da49b0da9cac44b9 /src/corelib/concurrent/qfutureinterface.h | |
parent | 94be95934fb3f0ab339fd169ef529f05f1a6707d (diff) |
Revert "QtConcurrent: Fix for leak in QFuture"
This reverts commit 28b06b3ebae3d411c74f09fa7de52bc290c47dc3
That commit contains new symbols added in a patch release of Qt. That is not permitted.
Change-Id: I1d36b50d4c26aa32072fd3f9c311a0e773527abd
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/concurrent/qfutureinterface.h')
-rw-r--r-- | src/corelib/concurrent/qfutureinterface.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/corelib/concurrent/qfutureinterface.h b/src/corelib/concurrent/qfutureinterface.h index dfe79416de..30bfbdb60e 100644 --- a/src/corelib/concurrent/qfutureinterface.h +++ b/src/corelib/concurrent/qfutureinterface.h @@ -132,8 +132,6 @@ public: protected: bool referenceCountIsOne() const; - bool refT() const; - bool derefT() const; public: #ifndef QFUTURE_TEST @@ -152,17 +150,13 @@ class QFutureInterface : public QFutureInterfaceBase public: QFutureInterface(State initialState = NoState) : QFutureInterfaceBase(initialState) - { - refT(); - } + { } QFutureInterface(const QFutureInterface &other) : QFutureInterfaceBase(other) - { - refT(); - } + { } ~QFutureInterface() { - if (!derefT()) + if (referenceCountIsOne()) resultStore().clear(); } @@ -171,8 +165,7 @@ public: QFutureInterface &operator=(const QFutureInterface &other) { - other.refT(); - if (!derefT()) + if (referenceCountIsOne()) resultStore().clear(); QFutureInterfaceBase::operator=(other); return *this; |