Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
e3580d48
Commit
e3580d48
authored
Nov 14, 2020
by
David Jarvie
Browse files
On completion, calendar migration restores previous Akonadi run state
parent
69a9ccec
Pipeline
#40943
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Changelog
View file @
e3580d48
KAlarm Change Log
=== Version 3.1.0 (KDE Applications 20.12) ---
28 Octo
ber 2020 ===
=== Version 3.1.0 (KDE Applications 20.12) ---
14 Novem
ber 2020 ===
+ Add option to show alarm message as a notification instead of in a window [KDE Bug 345922]
+ Add option to give alarms a name.
+ Don't execute display alarms while desktop notifications are inhibited.
+ Cancel any screen saver when an alarm is displayed.
+ On completion, calendar migration restores previous Akonadi run state.
=== Version 3.0.3 (KDE Applications 20.08.3) --- 25 October 2020 ===
+ Prevent resources being disabled at logout [KDE Bug 427722]
...
...
src/resources/fileresourcemigrator.cpp
View file @
e3580d48
...
...
@@ -143,7 +143,9 @@ void FileResourceMigrator::start()
mAkonadiMigration
->
required
=
true
;
connect
(
mAkonadiMigration
,
&
FileResourceMigrator
::
AkonadiMigration
::
completed
,
this
,
&
FileResourceMigrator
::
akonadiMigrationComplete
);
connect
(
Akonadi
::
ServerManager
::
self
(),
&
Akonadi
::
ServerManager
::
stateChanged
,
this
,
&
FileResourceMigrator
::
checkAkonadiResources
);
checkAkonadiResources
(
Akonadi
::
ServerManager
::
state
());
auto
akstate
=
Akonadi
::
ServerManager
::
state
();
mAkonadiStart
=
(
akstate
==
Akonadi
::
ServerManager
::
NotRunning
);
checkAkonadiResources
(
akstate
);
// Migration of Akonadi collections has now been initiated. On
// completion, either KResource calendars will be migrated, or
// any missing default resources will be created.
...
...
@@ -366,6 +368,17 @@ void FileResourceMigrator::collectionFetchResult(KJob* j)
*/
void
FileResourceMigrator
::
akonadiMigrationComplete
()
{
// Ignore any further Akonadi server state changes, to prevent possible
// repeated migrations.
disconnect
(
Akonadi
::
ServerManager
::
self
(),
nullptr
,
this
,
nullptr
);
if
(
mAkonadiStart
)
{
// The Akonadi server wasn't running before we started it, so stop it
// now that it's no longer needed.
Akonadi
::
ServerManager
::
stop
();
}
if
(
!
mAkonadiMigration
->
required
)
{
// There are no Akonadi resources, so migrate any KResources alarm
...
...
src/resources/fileresourcemigrator.h
View file @
e3580d48
...
...
@@ -64,6 +64,7 @@ private:
QList
<
Akonadi
::
CollectionFetchJob
*>
mFetchesPending
;
// pending collection fetch jobs for existing resources
KAlarmCal
::
CalEvent
::
Types
mExistingAlarmTypes
{
KAlarmCal
::
CalEvent
::
EMPTY
};
// alarm types provided by existing non-Akonadi resources
bool
mMigrateKResources
{
true
};
// need to migrate KResource resources
bool
mAkonadiStart
{
false
};
// Akonadi was started by the migrator
static
bool
mCompleted
;
// execute() has completed
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment