Commit a7bb95ab authored by David Jarvie's avatar David Jarvie
Browse files

Bug 446749: Don't disable alarms after command line action

Alarms were disabled if a KAlarm command line action (e.g. --list,
--edit, --triggerEvent) was executed while KAlarm was already running.

BUG: 446749
parent bd118743
Pipeline #110652 passed with stage
in 2 minutes and 33 seconds
KAlarm Change Log
=== Version 3.3.4 (KDE Applications 21.12.1) --- 14 December 2021 ===
=== Version 3.3.4 (KDE Applications 21.12.1) --- 15 December 2021 ===
* Treat empty read-only, or non-existent, calendar files as loaded.
* Ensure KAlarm command line actions are performed if KAlarm is already running [KDE Bug 446749]
* Don't disable alarms after KAlarm command line action while KAlarm is already running [KDE Bug 446749]
=== Version 3.3.3 (KDE Applications 21.12) --- 7 November 2021 ===
* Show numbers in localised form.
......
......@@ -473,7 +473,8 @@ int KAlarmApp::activateInstance(const QStringList& args, const QString& workingD
// Open the calendar, don't start processing execution queue yet,
// and wait for all calendar resources to be populated.
mReadOnly = true; // don't need write access to calendars
mAlarmsEnabled = false; // prevent alarms being processed
if (firstInstance)
mAlarmsEnabled = false; // prevent alarms being processed if no other instance is running
if (!initCheck(true))
exitCode = 1;
else
......@@ -1130,6 +1131,8 @@ void KAlarmApp::processQueue()
}
}
mActionQueue.dequeue();
if (inhibit)
{
// It's a display event which can't be executed because notifications
......@@ -1138,12 +1141,11 @@ void KAlarmApp::processQueue()
}
else if (exitAfter)
{
mProcessingQueue = false; // in case there is another instance
mActionQueue.clear(); // ensure that quitIf() actually exits the program
quitIf((ok ? 0 : 1), exitAfterError);
return; // quitIf() can sometimes return, despite calling exit()
}
mActionQueue.dequeue();
}
// Purge the default archived alarms resource if it's time to do so
......
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