summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index c6d5297..feceb77 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -79,6 +79,10 @@ Pipeline::Pipeline(const QString &resourceName, QObject *parent) : QObject(paren
79 79
80Pipeline::~Pipeline() 80Pipeline::~Pipeline()
81{ 81{
82 d->transaction = Storage::Transaction();
83 for (const auto &t : d->processors.keys()) {
84 qDeleteAll(d->processors.value(t));
85 }
82 delete d; 86 delete d;
83} 87}
84 88
@@ -108,9 +112,9 @@ void Pipeline::startTransaction()
108 Trace() << "Starting transaction."; 112 Trace() << "Starting transaction.";
109 d->transactionTime.start(); 113 d->transactionTime.start();
110 d->transactionItemCount = 0; 114 d->transactionItemCount = 0;
111 d->transaction = std::move(storage().createTransaction(Storage::ReadWrite, [](const Sink::Storage::Error &error) { 115 d->transaction = storage().createTransaction(Storage::ReadWrite, [](const Sink::Storage::Error &error) {
112 Warning() << error.message; 116 Warning() << error.message;
113 })); 117 });
114 118
115 //FIXME this is a temporary measure to recover from a failure to open the named databases correctly. 119 //FIXME this is a temporary measure to recover from a failure to open the named databases correctly.
116 //Once the actual problem is fixed it will be enough to simply crash if we open the wrong database (which we check in openDatabase already). 120 //Once the actual problem is fixed it will be enough to simply crash if we open the wrong database (which we check in openDatabase already).