Commit cea0b891 authored by David Jarvie's avatar David Jarvie

Prevent showing multiple email success messages after clicking Try

Previously, each time Try was clicked in the same Edit Alarm
dialogue, the number of email success messages displayed incremented,
due to multiple connect() calls.
parent eb1ed48e
......@@ -1380,6 +1380,8 @@ bool EditEmailAlarmDlg::type_validate(bool trial)
*/
void EditEmailAlarmDlg::type_aboutToTry()
{
// Disconnect any previous connections, to prevent multiple messages being output
disconnect(theApp(), SIGNAL(execAlarmSuccess()), this, SLOT(slotTrySuccess()));
connect(theApp(), SIGNAL(execAlarmSuccess()), SLOT(slotTrySuccess()));
}
......@@ -1388,6 +1390,7 @@ void EditEmailAlarmDlg::type_aboutToTry()
*/
void EditEmailAlarmDlg::slotTrySuccess()
{
disconnect(theApp(), SIGNAL(execAlarmSuccess()), this, SLOT(slotTrySuccess()));
QString msg;
QString to = KAEvent::joinEmailAddresses(mEmailAddresses, "<nl/>");
to.replace('<', "&lt;");
......
Markdown is supported
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