SHA256
1
0
forked from pool/discover
discover/fix_for_gcc4.diff

35 lines
2.2 KiB
Diff

diff --git a/libdiscover/backends/PackageKitBackend/PKTransaction.cpp b/libdiscover/backends/PackageKitBackend/PKTransaction.cpp
index 9afa28a..ca35c66 100644
--- a/libdiscover/backends/PackageKitBackend/PKTransaction.cpp
+++ b/libdiscover/backends/PackageKitBackend/PKTransaction.cpp
@@ -64,13 +64,13 @@ void PKTransaction::start()
};
Q_ASSERT(m_trans);
- connect(m_trans, &PackageKit::Transaction::finished, this, &PKTransaction::cleanup);
- connect(m_trans, &PackageKit::Transaction::errorCode, this, &PKTransaction::errorFound);
- connect(m_trans, &PackageKit::Transaction::mediaChangeRequired, this, &PKTransaction::mediaChange);
- connect(m_trans, &PackageKit::Transaction::requireRestart, this, &PKTransaction::requireRestart);
- connect(m_trans, &PackageKit::Transaction::itemProgress, this, &PKTransaction::progressChanged);
- connect(m_trans, &PackageKit::Transaction::eulaRequired, this, &PKTransaction::eulaRequired);
- connect(m_trans, &PackageKit::Transaction::allowCancelChanged, this, &PKTransaction::cancellableChanged);
+ connect(m_trans.data(), &PackageKit::Transaction::finished, this, &PKTransaction::cleanup);
+ connect(m_trans.data(), &PackageKit::Transaction::errorCode, this, &PKTransaction::errorFound);
+ connect(m_trans.data(), &PackageKit::Transaction::mediaChangeRequired, this, &PKTransaction::mediaChange);
+ connect(m_trans.data(), &PackageKit::Transaction::requireRestart, this, &PKTransaction::requireRestart);
+ connect(m_trans.data(), &PackageKit::Transaction::itemProgress, this, &PKTransaction::progressChanged);
+ connect(m_trans.data(), &PackageKit::Transaction::eulaRequired, this, &PKTransaction::eulaRequired);
+ connect(m_trans.data(), &PackageKit::Transaction::allowCancelChanged, this, &PKTransaction::cancellableChanged);
setCancellable(m_trans->allowCancel());
}
@@ -106,7 +106,7 @@ void PKTransaction::cleanup(PackageKit::Transaction::Exit exit, uint runtime)
cancel = true;
}
- disconnect(m_trans, nullptr, this, nullptr);
+ disconnect(m_trans.data(), nullptr, this, nullptr);
m_trans = nullptr;
PackageKit::Transaction* t = PackageKit::Daemon::resolve(resource()->packageName(), PackageKit::Transaction::FilterArch);