Commit 26694e8c 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.

(This is similar to 24f3853f in master)

BUGS: 455472, 455369, 455886, 455258, 455583
parent 878e3c5e
Pipeline #197405 passed with stage
in 1 minute and 21 seconds
......@@ -45,8 +45,8 @@ void AlarmNotification::send(KalendarAlarmClient *client, const KCalendarCore::I
client->showIncidence(uid(), startTime, m_notification->xdgActivationToken());
});
QObject::connect(m_notification, &KNotification::action1Activated, client, [this, client]() {
client->suspend(this);
QObject::disconnect(m_notification, &KNotification::closed, client, nullptr);
client->suspend(this);
});
QObject::connect(m_notification, &KNotification::action2Activated, client, [this, client]() {
client->dismiss(this);
......
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