Commit 24f3853f authored by David Faure's avatar David Faure
Browse files

Fix crash when clicking on dismiss, sometimes.

client->dismiss(this) ends up setting client to nullptr, so
the disconnect() warns about null receiver and doesn't actually
disconnect.
parent 64e894c9
Pipeline #197018 passed with stage
in 3 minutes and 32 seconds
......@@ -48,16 +48,16 @@ void AlarmNotification::send(KalendarAlarmClient *client, const KCalendarCore::I
client->showIncidence(uid(), startTime, m_notification->xdgActivationToken());
break;
case 1: // suspend 5m
client->suspend(this, 5min);
QObject::disconnect(m_notification, &KNotification::closed, client, nullptr);
client->suspend(this, 5min);
break;
case 2: // suspend 1h
client->suspend(this, 1h);
QObject::disconnect(m_notification, &KNotification::closed, client, nullptr);
client->suspend(this, 1h);
break;
case 3: // dismiss
client->dismiss(this);
QObject::disconnect(m_notification, &KNotification::closed, client, nullptr);
client->dismiss(this);
break;
case 4: // openurl
QDesktopServices::openUrl(m_contextAction);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment