summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2017-02-08 18:17:07 +0100
committerAleix Pol <[email protected]>2017-02-08 18:56:45 +0100
commitcd298256d6bb59b5d2dc804acf39ca131feec2e0 (patch)
tree8e56b2ddd3b1a2d284f94b2b7ecb9ff5638565f8
parent930a04eb7b99866b19b4a4b5d6c350b15420556b (diff)
Use smart pointers to track transaction objects
They weren't being initialized now, and this way it's less risky anyway.
-rw-r--r--libdiscover/backends/FlatpakBackend/FlatpakTransaction.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakTransaction.h b/libdiscover/backends/FlatpakBackend/FlatpakTransaction.h
index a12c144..8474e9a 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakTransaction.h
+++ b/libdiscover/backends/FlatpakBackend/FlatpakTransaction.h
@@ -23,6 +23,7 @@
#define FLATPAKTRANSACTION_H
#include <Transaction/Transaction.h>
+#include <QPointer>
extern "C" {
#include <flatpak.h>
@@ -60,11 +61,11 @@ private:
bool m_runtimeJobFinished;
int m_appJobProgress;
int m_runtimeJobProgress;
- FlatpakResource *m_app;
- FlatpakResource *m_runtime;
+ QPointer<FlatpakResource> m_app;
+ QPointer<FlatpakResource> m_runtime;
FlatpakInstallation *m_installation;
- FlatpakTransactionJob *m_appJob;
- FlatpakTransactionJob *m_runtimeJob;
+ QPointer<FlatpakTransactionJob> m_appJob;
+ QPointer<FlatpakTransactionJob> m_runtimeJob;
};
#endif // FLATPAKTRANSACTION_H