Don't delete DBusNotification on error

Not sure why the deletion was done at this point in the
first place. DBusNotification objects are not even created
using 'new' by Syncthing Tray so this can never make any
sense.
This commit is contained in:
Martchus 2020-03-01 20:44:01 +01:00
parent 031378e1c5
commit 4ce6bb9487
1 changed files with 7 additions and 7 deletions

View File

@ -376,15 +376,15 @@ void DBusNotification::handleNotifyResult(QDBusPendingCallWatcher *watcher)
QDBusPendingReply<uint> returnValue = *watcher;
if (returnValue.isError()) {
deleteLater();
emit error();
} else {
{
QMutexLocker lock(&pendingNotificationsMutex);
pendingNotifications[m_id = returnValue.argumentAt<0>()] = this;
}
emit shown();
return;
}
{
QMutexLocker lock(&pendingNotificationsMutex);
pendingNotifications[m_id = returnValue.argumentAt<0>()] = this;
}
emit shown();
}
/*!