[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [discover/Plasma/5.12] libdiscover/Transaction: Make sure we don't end up with a stale transaction
From: Aleix Pol <null () kde ! org>
Date: 2018-06-01 0:42:05
Message-ID: E1fOY8r-0001sn-B2 () code ! kde ! org
[Download RAW message or body]
Git commit a421a5c040cffccc50371cf3b652929548d05dc2 by Aleix Pol.
Committed on 01/06/2018 at 00:40.
Pushed by apol into branch 'Plasma/5.12'.
Make sure we don't end up with a stale transaction
It seems to be a crash some people get sometimes, better safe than
sorry.
BUG: 394737
M +4 -0 libdiscover/Transaction/TransactionListener.cpp
https://commits.kde.org/discover/a421a5c040cffccc50371cf3b652929548d05dc2
diff --git a/libdiscover/Transaction/TransactionListener.cpp b/libdiscover/=
Transaction/TransactionListener.cpp
index b344445b..d9952a17 100644
--- a/libdiscover/Transaction/TransactionListener.cpp
+++ b/libdiscover/Transaction/TransactionListener.cpp
@@ -127,6 +127,10 @@ void TransactionListener::setTransaction(Transaction* =
trans)
connect(m_transaction, &Transaction::cancellableChanged, this, &Tr=
ansactionListener::cancellableChanged);
connect(m_transaction, &Transaction::statusChanged, this, &Transac=
tionListener::transactionStatusChanged);
connect(m_transaction, &Transaction::progressChanged, this, &Trans=
actionListener::progressChanged);
+ connect(m_transaction, &QObject::destroyed, this, [this]() {
+ qDebug() << "destroyed transaction before finishing";
+ setTransaction(nullptr);
+ });
setResourceInternal(trans->resource());
}
Q_EMIT transactionChanged(trans);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic