summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2017-05-07 13:03:58 +0200
committerAleix Pol <[email protected]>2017-05-07 13:03:58 +0200
commitf1087b1676c8877e1f632ba5539edcd7d43f735f (patch)
tree4ed69c825a09e661f81db3412c339e2139e633d3
parentd29c0e55c51c12d7eff0afd5c59c6026df8fbf01 (diff)
Make sure transactions are started
-rw-r--r--libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp1
-rw-r--r--libdiscover/backends/FlatpakBackend/FlatpakTransaction.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
index 0989425..36fbf5f 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
+++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
@@ -997,6 +997,7 @@ void FlatpakBackend::installApplication(AbstractResource *app, const AddonList &
} else {
transaction = new FlatpakTransaction(installation, resource, Transaction::InstallRole);
}
+ transaction->start();
}
connect(transaction, &FlatpakTransaction::statusChanged, [this, installation, resource] (Transaction::Status status) {
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakTransaction.cpp b/libdiscover/backends/FlatpakBackend/FlatpakTransaction.cpp
index 3a0e1a1..fd171f0 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakTransaction.cpp
+++ b/libdiscover/backends/FlatpakBackend/FlatpakTransaction.cpp
@@ -59,6 +59,7 @@ FlatpakTransaction::~FlatpakTransaction()
void FlatpakTransaction::cancel()
{
+ Q_ASSERT(m_appJob);
m_appJob->cancel();
if (m_runtime) {
m_runtimeJob->cancel();