summaryrefslogtreecommitdiffstats
path: root/async/src/future.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-03 00:38:22 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-04-03 00:38:22 +0200
commite90c03d43ea9f9385ad4d350cb0de3130025b7ea (patch)
tree5840459ead7eba2d60dc8393355f0a67b2b5e877 /async/src/future.cpp
parentd79939ffbe4396a8be9e5dbffb77f8b8efe1d3e8 (diff)
parentb01fadba903056218f2a00c5e62e1dc8df062124 (diff)
downloadsink-e90c03d43ea9f9385ad4d350cb0de3130025b7ea.tar.gz
sink-e90c03d43ea9f9385ad4d350cb0de3130025b7ea.zip
Merge remote-tracking branch 'origin/develop' into develop
Diffstat (limited to 'async/src/future.cpp')
-rw-r--r--async/src/future.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/async/src/future.cpp b/async/src/future.cpp
index ab02baf..50a326a 100644
--- a/async/src/future.cpp
+++ b/async/src/future.cpp
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18#include "future.h" 18#include "future.h"
19#include "async.h"
19 20
20using namespace Async; 21using namespace Async;
21 22
@@ -31,6 +32,27 @@ FutureBase::~FutureBase()
31{ 32{
32} 33}
33 34
35FutureBase::PrivateBase::PrivateBase(const Private::ExecutionPtr &execution)
36 : mExecution(execution)
37{
38}
39
40FutureBase::PrivateBase::~PrivateBase()
41{
42 Private::ExecutionPtr executionPtr = mExecution.toStrongRef();
43 if (executionPtr) {
44 executionPtr->releaseFuture();
45 releaseExecution();
46 }
47}
48
49void FutureBase::PrivateBase::releaseExecution()
50{
51 mExecution.clear();
52}
53
54
55
34FutureWatcherBase::FutureWatcherBase(QObject *parent) 56FutureWatcherBase::FutureWatcherBase(QObject *parent)
35 : QObject(parent) 57 : QObject(parent)
36{ 58{