summary refs log tree commit diff
path: root/src/notifications
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-01-20 16:13:21 -0500
committerLoren Burkholder <computersemiexpert@outlook.com>2021-01-20 16:13:21 -0500
commitcf4f50dac854fd951066f56945f5d1adbbe679d4 (patch)
tree7954f3908ecc326eb94894ac45f09f6df802bdce /src/notifications
parentUse async call in closeNotification (diff)
downloadnheko-cf4f50dac854fd951066f56945f5d1adbbe679d4.tar.xz
Use deleteLater() instead of delete
Diffstat (limited to 'src/notifications')
-rw-r--r--src/notifications/ManagerLinux.cpp3
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();
         });
 }