Commit 04e3baee authored by David Jarvie's avatar David Jarvie
Browse files

Merge branch 'release/20.08'

parents 30e94ea4 dce6b631
......@@ -3,7 +3,8 @@ KAlarm Change Log
=== Version 3.1.0 (KDE Applications 20.12) --- 11 September 2020 ===
+ Add option to show alarm message as a notification instead of in a window [KDE Bug 345922]
=== Version 3.0.2 (KDE Applications 20.08.2) --- 10 September 2020 ===
=== Version 3.0.2 (KDE Applications 20.08.2) --- 16 September 2020 ===
+ Fix repeat-at-login alarms not triggering when KAlarm starts.
+ If command generating text for display alarm fails, only display error message,
not the display alarm, and don't redisplay the alarm on every restart.
+ Fix next trigger time shown as "Never" after using Try button for command display alarm, if command fails.
......
......@@ -216,11 +216,14 @@ bool KAlarmApp::initialiseTimerResources()
{
qCDebug(KALARM_LOG) << "KAlarmApp::initialise: initialising calendars";
Desktop::setMainWindowFunc(&mainWidget);
DataModel::initialise();
// First, initialise calendar resources, which need to be ready to
// receive signals when resources initialise.
ResourcesCalendar::initialise(KALARM_NAME, KALARM_VERSION);
DisplayCalendar::initialise();
connect(ResourcesCalendar::instance(), &ResourcesCalendar::earliestAlarmChanged, this, &KAlarmApp::checkNextDueAlarm);
connect(ResourcesCalendar::instance(), &ResourcesCalendar::atLoginEventAdded, this, &KAlarmApp::atLoginEventAdded);
DisplayCalendar::initialise();
// Finally, initialise the resources which generate signals as they initialise.
DataModel::initialise();
return true;
}
return false;
......@@ -2190,7 +2193,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, ExecAlarmFlags
// The caption needs to be changed from "Reminder" to "Message"
disp->cancelReminder(event, alarm);
}
else if (!disp->hasDefer() && !alarm.repeatAtLogin())
else if (!disp->hasDefer() && event.repeatAtLogin() && !alarm.repeatAtLogin())
{
// It's a repeat-at-login message with no Defer button,
// which has now reached its final trigger time and needs
......
......@@ -602,6 +602,7 @@ void Resources::checkResourcesPopulated()
return;
}
mPopulated = true;
qCDebug(KALARM_LOG) << "Resources::checkResourcesPopulated: emit signal";
Q_EMIT instance()->resourcesPopulated();
}
}
......
......@@ -24,7 +24,10 @@ class Resources : public QObject
{
Q_OBJECT
public:
/** Creates the unique Resources instance. */
/** Creates the unique Resources instance.
* Note that this merely creates a container for individual resources,
* and doesn't create or initialise any ResourceType instances.
*/
static Resources* instance();
~Resources();
......
......@@ -32,9 +32,12 @@ bool ResourcesCalendar::mHaveDisabledAlarms {false};
*/
void ResourcesCalendar::initialise(const QByteArray& appName, const QByteArray& appVersion)
{
KACalendar::setProductId(appName, appVersion);
KCalendarCore::CalFormat::setApplication(QString::fromLatin1(appName), QString::fromLatin1(KACalendar::icalProductId()));
mInstance = new ResourcesCalendar();
if (!mInstance)
{
KACalendar::setProductId(appName, appVersion);
KCalendarCore::CalFormat::setApplication(QString::fromLatin1(appName), QString::fromLatin1(KACalendar::icalProductId()));
mInstance = new ResourcesCalendar();
}
}
/******************************************************************************
......
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