Changeset View
Changeset View
Standalone View
Standalone View
notifier/DiscoverNotifier.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef DISCOVERNOTIFIERMODULE_H | 21 | #ifndef DISCOVERNOTIFIERMODULE_H | ||
22 | #define DISCOVERNOTIFIERMODULE_H | 22 | #define DISCOVERNOTIFIERMODULE_H | ||
23 | 23 | | |||
24 | #include <BackendNotifierModule.h> | 24 | #include <BackendNotifierModule.h> | ||
25 | #include <QStringList> | 25 | #include <QStringList> | ||
26 | #include <QTimer> | 26 | #include <QTimer> | ||
27 | 27 | | |||
28 | #include <KNotification> | ||||
29 | | ||||
28 | class QNetworkConfigurationManager; | 30 | class QNetworkConfigurationManager; | ||
29 | 31 | | |||
30 | class DiscoverNotifier : public QObject | 32 | class DiscoverNotifier : public QObject | ||
31 | { | 33 | { | ||
32 | Q_OBJECT | 34 | Q_OBJECT | ||
33 | Q_PROPERTY(QStringList modules READ loadedModules CONSTANT) | 35 | Q_PROPERTY(QStringList modules READ loadedModules CONSTANT) | ||
34 | Q_PROPERTY(QString iconName READ iconName NOTIFY stateChanged) | 36 | Q_PROPERTY(QString iconName READ iconName NOTIFY stateChanged) | ||
35 | Q_PROPERTY(QString message READ message NOTIFY stateChanged) | 37 | Q_PROPERTY(QString message READ message NOTIFY stateChanged) | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 76 | private: | |||
77 | 79 | | |||
78 | QList<BackendNotifierModule*> m_backends; | 80 | QList<BackendNotifierModule*> m_backends; | ||
79 | bool m_verbose = false; | 81 | bool m_verbose = false; | ||
80 | QTimer m_timer; | 82 | QTimer m_timer; | ||
81 | bool m_hasSecurityUpdates = false; | 83 | bool m_hasSecurityUpdates = false; | ||
82 | bool m_hasUpdates = false; | 84 | bool m_hasUpdates = false; | ||
83 | bool m_needsReboot = false; | 85 | bool m_needsReboot = false; | ||
84 | QNetworkConfigurationManager* m_manager = nullptr; | 86 | QNetworkConfigurationManager* m_manager = nullptr; | ||
87 | KNotification* m_updatesAvailableNotification = nullptr; | ||||
broulik: This has to be a `QPointer<KNotification>`.
`KNotification` self-deletes when closed leading… | |||||
85 | }; | 88 | }; | ||
86 | 89 | | |||
87 | #endif //ABSTRACTKDEDMODULE_H | 90 | #endif //ABSTRACTKDEDMODULE_H |
This has to be a QPointer<KNotification>.
KNotification self-deletes when closed leading to crashes in close() calls below accessing garbage memory.