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
KMail
Commits
49d3296d
Commit
49d3296d
authored
Jun 17, 2021
by
Laurent Montel
😁
Browse files
Use std::chrono_literals here
parent
61c99899
Pipeline
#66341
passed with stage
in 24 minutes and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/followupreminderagent/followupreminderagent.cpp
View file @
49d3296d
...
...
@@ -26,6 +26,9 @@
#endif
#include "followupreminderagent_debug.h"
#include <QTimer>
#include <chrono>
using
namespace
std
::
chrono_literals
;
FollowUpReminderAgent
::
FollowUpReminderAgent
(
const
QString
&
id
)
:
Akonadi
::
AgentBase
(
id
)
...
...
@@ -59,7 +62,7 @@ FollowUpReminderAgent::FollowUpReminderAgent(const QString &id)
mTimer
=
new
QTimer
(
this
);
connect
(
mTimer
,
&
QTimer
::
timeout
,
this
,
&
FollowUpReminderAgent
::
reload
);
// Reload all each 24hours
mTimer
->
start
(
24
*
60
*
60
*
1000
);
mTimer
->
start
(
24
h
);
}
FollowUpReminderAgent
::~
FollowUpReminderAgent
()
=
default
;
...
...
agents/mailmergeagent/mailmergeagent.cpp
View file @
49d3296d
...
...
@@ -25,6 +25,9 @@
#include <QPointer>
#include <QTimer>
#include <chrono>
using
namespace
std
::
chrono_literals
;
//#define DEBUG_MAILMERGEAGENT 1
...
...
@@ -53,14 +56,14 @@ MailMergeAgent::MailMergeAgent(const QString &id)
#ifdef DEBUG_MailMergeAgent
QTimer
::
singleShot
(
1000
,
this
,
&
MailMergeAgent
::
slotStartAgent
);
#else
QTimer
::
singleShot
(
1000
*
60
*
4
,
this
,
&
MailMergeAgent
::
slotStartAgent
);
QTimer
::
singleShot
(
4min
,
this
,
&
MailMergeAgent
::
slotStartAgent
);
#endif
}
// For extra safety, check list every hour, in case we didn't properly get
// notified about the network going up or down.
auto
reloadListTimer
=
new
QTimer
(
this
);
connect
(
reloadListTimer
,
&
QTimer
::
timeout
,
this
,
&
MailMergeAgent
::
reload
);
reloadListTimer
->
start
(
1
000
*
60
*
60
);
// 1 hour
reloadListTimer
->
start
(
1
h
);
// 1 hour
}
MailMergeAgent
::~
MailMergeAgent
()
=
default
;
...
...
agents/sendlateragent/sendlateragent.cpp
View file @
49d3296d
...
...
@@ -31,6 +31,9 @@
#include <Kdelibs4ConfigMigrator>
#endif
#include <QPointer>
#include <chrono>
using
namespace
std
::
chrono_literals
;
//#define DEBUG_SENDLATERAGENT 1
...
...
@@ -63,14 +66,14 @@ SendLaterAgent::SendLaterAgent(const QString &id)
#ifdef DEBUG_SENDLATERAGENT
QTimer
::
singleShot
(
1000
,
this
,
&
SendLaterAgent
::
slotStartAgent
);
#else
QTimer
::
singleShot
(
1000
*
60
*
4
,
this
,
&
SendLaterAgent
::
slotStartAgent
);
QTimer
::
singleShot
(
4min
,
this
,
&
SendLaterAgent
::
slotStartAgent
);
#endif
}
// For extra safety, check list every hour, in case we didn't properly get
// notified about the network going up or down.
auto
reloadListTimer
=
new
QTimer
(
this
);
connect
(
reloadListTimer
,
&
QTimer
::
timeout
,
this
,
&
SendLaterAgent
::
reload
);
reloadListTimer
->
start
(
1
000
*
60
*
60
);
// 1 hour
reloadListTimer
->
start
(
1
h
);
// 1 hour
}
SendLaterAgent
::~
SendLaterAgent
()
=
default
;
...
...
Write
Preview
Markdown
is supported
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