diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2021-01-20 16:13:21 -0500 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2021-01-20 16:13:21 -0500 |
commit | cf4f50dac854fd951066f56945f5d1adbbe679d4 (patch) | |
tree | 7954f3908ecc326eb94894ac45f09f6df802bdce /src/notifications | |
parent | Use async call in closeNotification (diff) | |
download | nheko-cf4f50dac854fd951066f56945f5d1adbbe679d4.tar.xz |
Use deleteLater() instead of delete
Diffstat (limited to 'src/notifications')
-rw-r--r-- | src/notifications/ManagerLinux.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp index d9d157fc..36692d03 100644 --- a/src/notifications/ManagerLinux.cpp +++ b/src/notifications/ManagerLinux.cpp @@ -84,7 +84,7 @@ NotificationsManager::postNotification(const QString &roomid, else notificationIds[watcher->reply().arguments().first().toUInt()] = roomEventId{roomid, eventid}; - delete watcher; + watcher->deleteLater(); }); } @@ -103,6 +103,7 @@ NotificationsManager::closeNotification(uint id) if (watcher->reply().type() == QDBusMessage::ErrorMessage) { qDebug() << "D-Bus Error:" << watcher->reply().errorMessage(); }; + watcher->deleteLater(); }); } |