[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kalarmd
From: David Jarvie <software () astrojar ! org ! uk>
Date: 2004-08-29 16:51:12
Message-ID: 20040829165112.D4A139003 () office ! kde ! org
[Download RAW message or body]
CVS commit by djarvie:
Implement alarm repeat count
M +9 -3 alarmdaemon.cpp 1.67
M +2 -2 main.cpp 1.14
--- kdepim/kalarmd/alarmdaemon.cpp #1.66:1.67
@@ -440,14 +440,20 @@ bool AlarmDaemon::checkAlarms( ADCalenda
* Check which of the alarms for the given event are due.
* The times in 'alarmtimes' corresponding to due alarms are set.
+ * The times for non-due alarms are set invalid in 'alarmtimes'.
*/
void AlarmDaemon::checkEventAlarms(const Event& event, QValueList<QDateTime>& alarmtimes)
{
alarmtimes.clear();
- QDateTime now = QDateTime::currentDateTime();
+ QDateTime now1 = QDateTime::currentDateTime().addSecs(1);
Alarm::List alarms = event.alarms();
Alarm::List::ConstIterator it;
for ( it = alarms.begin(); it != alarms.end(); ++it ) {
Alarm *alarm = *it;
- alarmtimes.append((alarm->enabled() && alarm->time() <= now) ? alarm->time() : QDateTime());
+ QDateTime dt;
+ if ( alarm->enabled() ) {
+ // Find the alarm's latest due repetition (if any)
+ dt = alarm->previousRepetition( now1 );
+ }
+ alarmtimes.append( dt );
}
}
--- kdepim/kalarmd/main.cpp #1.13:1.14
@@ -39,5 +39,5 @@
#include "alarmapp.h"
-static const char kalarmdVersion[] = "3.3";
+static const char kalarmdVersion[] = "3.4";
static const KCmdLineOptions options[] =
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic