Was getting a double-delete, now it won't crash

This commit is contained in:
Aleix Pol 2018-01-16 20:31:05 +01:00
parent 1c3a45fd95
commit 895a9206ff
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,6 @@ Notification::Notification(const NetworkPackage& np, QObject* parent)
Notification::~Notification() Notification::~Notification()
{ {
} }
void Notification::dismiss() void Notification::dismiss()

View file

@ -26,6 +26,7 @@
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QDir> #include <QDir>
#include <QPointer>
#include "notification.h" #include "notification.h"
@ -65,7 +66,7 @@ private /*methods*/:
private /*attributes*/: private /*attributes*/:
const Device* m_device; const Device* m_device;
KdeConnectPlugin* m_plugin; KdeConnectPlugin* m_plugin;
QHash<QString, Notification*> m_notifications; QHash<QString, QPointer<Notification>> m_notifications;
QHash<QString, QString> m_internalIdToPublicId; QHash<QString, QString> m_internalIdToPublicId;
int m_lastId; int m_lastId;
}; };