Commit 7672bae7 authored by David Jarvie's avatar David Jarvie
Browse files

Warn user if no active alarm calendar is enabled.

Fixes regression introduced in version 3.0.0.
parent 23eae65d
Pipeline #38677 failed with stage
in 6 minutes and 19 seconds
KAlarm Change Log
=== Version 3.0.3 (KDE Applications 20.08.3) --- 15 October 2020 ===
=== Version 3.0.3 (KDE Applications 20.08.3) --- 25 October 2020 ===
+ Prevent resources being disabled at logout [KDE Bug 427722]
+ Fix regression introduced in version 3.0.0:
Warn user if no active alarm calendar is enabled.
=== Version 3.0.2 (KDE Applications 20.08.2) --- 3 October 2020 ===
+ Fix repeat-at-login alarms not triggering when KAlarm starts.
......@@ -41,7 +43,8 @@ KAlarm Change Log
+ Fix failure to set no-autostart for non-KDE desktops, if a writable autostart file exists.
* Fix failure to execute command alarms in a terminal window.
+ Fix occasional crash on opening alarm edit dialogue [KDE Bug 412181]
+ Fix wrong Undo/Redo being performed when selected from list (fixes regression introduced in 2.13.0).
+ Fix regression introduced in version 2.13.0:
Fix wrong Undo/Redo being performed when selected from list.
=== Version 2.14.1 (KDE Applications 20.04.1) --- 11 May 2020 ===
+ Correctly interpret resource IDs in command line and DBus calls.
......@@ -74,11 +77,13 @@ KAlarm Change Log
+ Fix error on redo of an active alarm deletion.
+ Archive repeat-at-login alarms if previously triggered, when they are deleted.
+ Fix layout of defer alarm dialogue.
+ Make user settings changes take effect immediately (fixes regression introduced in 2.10.11).
+ Fix regression introduced in version 2.10.11:
Make user settings changes take effect immediately.
=== Version 2.12.7 (KDE Applications 19.08.2) --- 7 October 2019 ===
+ Show correct read-only status of an alarm in its context menu.
+ Fix errors deleting and reactivating alarms (regression introduced in 2.12.5).
+ Fix regression introduced in version 2.12.5:
Fix errors deleting and reactivating alarms.
+ Fix error on undo of an active alarm deletion.
+ Don't trigger repeat-at-login alarms when they are edited or imported.
......
......@@ -185,26 +185,25 @@ void KAlarmApp::initialise()
mWindowFocusBroken = (Desktop::currentIdentity() == Desktop::Unity);
if (mWindowFocusBroken) { qCDebug(KALARM_LOG) << "KAlarmApp: Window keyboard focus broken"; }
if (initialiseTimerResources()) // initialise calendars and alarm timer
{
Resources* resources = Resources::instance();
connect(resources, &Resources::resourceAdded,
this, &KAlarmApp::slotResourceAdded);
connect(resources, &Resources::resourcePopulated,
this, &KAlarmApp::slotResourcePopulated);
connect(resources, &Resources::resourcePopulated,
this, &KAlarmApp::purgeNewArchivedDefault);
connect(resources, &Resources::resourcesCreated,
this, &KAlarmApp::slotResourcesCreated);
connect(resources, &Resources::resourcesPopulated,
this, &KAlarmApp::processQueue);
KConfigGroup config(KSharedConfig::openConfig(), "General");
mNoSystemTray = config.readEntry("NoSystemTray", false);
mOldShowInSystemTray = wantShowInSystemTray();
DateTime::setStartOfDay(Preferences::startOfDay());
mPrefsArchivedColour = Preferences::archivedColour();
}
Resources* resources = Resources::instance();
connect(resources, &Resources::resourceAdded,
this, &KAlarmApp::slotResourceAdded);
connect(resources, &Resources::resourcePopulated,
this, &KAlarmApp::slotResourcePopulated);
connect(resources, &Resources::resourcePopulated,
this, &KAlarmApp::purgeNewArchivedDefault);
connect(resources, &Resources::resourcesCreated,
this, &KAlarmApp::slotResourcesCreated);
connect(resources, &Resources::resourcesPopulated,
this, &KAlarmApp::processQueue);
initialiseTimerResources(); // initialise calendars and alarm timer
KConfigGroup config(KSharedConfig::openConfig(), "General");
mNoSystemTray = config.readEntry("NoSystemTray", false);
mOldShowInSystemTray = wantShowInSystemTray();
DateTime::setStartOfDay(Preferences::startOfDay());
mPrefsArchivedColour = Preferences::archivedColour();
}
/******************************************************************************
......
......@@ -63,8 +63,10 @@ FileResourceDataModel* FileResourceDataModel::instance(QObject* parent)
{
if (!mInstance)
{
mInstance = new FileResourceDataModel(parent);
FileResourceDataModel* inst = new FileResourceDataModel(parent);
mInstance = inst;
mInstanceIsOurs = true;
inst->initialise();
}
return mInstanceIsOurs ? (FileResourceDataModel*)mInstance : nullptr;
}
......@@ -110,6 +112,15 @@ FileResourceDataModel::FileResourceDataModel(QObject* parent)
connect(resources, &Resources::resourceMessage,
this, &FileResourceDataModel::slotResourceMessage, Qt::QueuedConnection);
// Exit now, so that ResourceDataModelBase::mInstance will be set before
// setCalendarsCreated() and setMigrationCompleted() are called in initialise().
}
/******************************************************************************
* Initialise the instance. To be called immediately after construction.
*/
void FileResourceDataModel::initialise()
{
FileResourceConfigManager::createResources(this);
setCalendarsCreated();
......
......@@ -139,6 +139,7 @@ private:
struct Node;
explicit FileResourceDataModel(QObject* parent = nullptr);
void initialise();
void signalDataChanged(bool (*checkFunc)(const KAEvent*), int startColumn, int endColumn, const QModelIndex& parent);
/** Remove a resource's events. */
......
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