summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-06-03 23:10:45 (UTC)
committer zautrix <zautrix>2005-06-03 23:10:45 (UTC)
commit858b047efb5627824438cb3877e7bec0cebb3751 (patch) (unidiff)
tree7b36963344d4f5019f3a1ecb5eb9290f27c3b3c7 /libkcal
parent0207d193bdb6c66201562a17e68872e018ec223c (diff)
downloadkdepimpi-858b047efb5627824438cb3877e7bec0cebb3751.zip
kdepimpi-858b047efb5627824438cb3877e7bec0cebb3751.tar.gz
kdepimpi-858b047efb5627824438cb3877e7bec0cebb3751.tar.bz2
fixxx
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp6
-rw-r--r--libkcal/event.cpp6
-rw-r--r--libkcal/event.h2
-rw-r--r--libkcal/incidence.h2
-rw-r--r--libkcal/journal.cpp2
-rw-r--r--libkcal/journal.h2
-rw-r--r--libkcal/todo.cpp4
-rw-r--r--libkcal/todo.h2
8 files changed, 13 insertions, 13 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index e75df70..bc76c0b 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -306,7 +306,7 @@ void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted
306 computeNextAlarm = true; 306 computeNextAlarm = true;
307 } else { 307 } else {
308 if ( ! deleted ) { 308 if ( ! deleted ) {
309 nextA = incidence->getNextAlarmDateTime(& ok, &offset ) ; 309 nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
310 if ( ok ) { 310 if ( ok ) {
311 if ( nextA < mNextAlarmDateTime ) { 311 if ( nextA < mNextAlarmDateTime ) {
312 deRegisterAlarm(); 312 deRegisterAlarm();
@@ -421,7 +421,7 @@ QDateTime CalendarLocal::nextAlarm( int daysTo )
421 int offset; 421 int offset;
422 mNextAlarmIncidence = 0; 422 mNextAlarmIncidence = 0;
423 for( e = mEventList.first(); e; e = mEventList.next() ) { 423 for( e = mEventList.first(); e; e = mEventList.next() ) {
424 next = e->getNextAlarmDateTime(& ok, &offset ) ; 424 next = e->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
425 if ( ok ) { 425 if ( ok ) {
426 if ( next < nextA ) { 426 if ( next < nextA ) {
427 nextA = next; 427 nextA = next;
@@ -434,7 +434,7 @@ QDateTime CalendarLocal::nextAlarm( int daysTo )
434 } 434 }
435 Todo *t; 435 Todo *t;
436 for( t = mTodoList.first(); t; t = mTodoList.next() ) { 436 for( t = mTodoList.first(); t; t = mTodoList.next() ) {
437 next = t->getNextAlarmDateTime(& ok, &offset ) ; 437 next = t->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
438 if ( ok ) { 438 if ( ok ) {
439 if ( next < nextA ) { 439 if ( next < nextA ) {
440 nextA = next; 440 nextA = next;
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index de8dceb..9b99855 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -171,11 +171,11 @@ void Event::setDuration(int seconds)
171 setHasEndDate(false); 171 setHasEndDate(false);
172 Incidence::setDuration(seconds); 172 Incidence::setDuration(seconds);
173} 173}
174QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const 174QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const
175{ 175{
176 176
177 bool yes; 177 bool yes;
178 QDateTime incidenceStart = getNextOccurence( QDateTime::currentDateTime(), &yes ); 178 QDateTime incidenceStart = getNextOccurence( start_dt, &yes );
179 if ( ! yes || cancelled() ) { 179 if ( ! yes || cancelled() ) {
180 *ok = false; 180 *ok = false;
181 return QDateTime (); 181 return QDateTime ();
@@ -209,7 +209,7 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const
209 } 209 }
210 } 210 }
211 if ( enabled ) { 211 if ( enabled ) {
212 if ( alarmStart > QDateTime::currentDateTime() ) { 212 if ( alarmStart > start_dt ) {
213 *ok = true; 213 *ok = true;
214 * offset = off; 214 * offset = off;
215 return alarmStart; 215 return alarmStart;
diff --git a/libkcal/event.h b/libkcal/event.h
index 3bc8adc..8729956 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -42,7 +42,7 @@ class Event : public Incidence
42 QCString type() const { return "Event"; } 42 QCString type() const { return "Event"; }
43 43
44 Incidence *clone(); 44 Incidence *clone();
45 QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; 45 QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const;
46 46
47 /** for setting an event's ending date/time with a QDateTime. */ 47 /** for setting an event's ending date/time with a QDateTime. */
48 void setDtEnd(const QDateTime &dtEnd); 48 void setDtEnd(const QDateTime &dtEnd);
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index ebd50d0..aa51e84 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -114,7 +114,7 @@ class Incidence : public IncidenceBase
114 virtual Incidence *clone() = 0; 114 virtual Incidence *clone() = 0;
115 virtual void cloneRelations( Incidence * ); 115 virtual void cloneRelations( Incidence * );
116 116
117 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; 117 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0;
118 void setReadOnly( bool ); 118 void setReadOnly( bool );
119 119
120 /** 120 /**
diff --git a/libkcal/journal.cpp b/libkcal/journal.cpp
index 351fb32..859161f 100644
--- a/libkcal/journal.cpp
+++ b/libkcal/journal.cpp
@@ -42,7 +42,7 @@ bool KCal::operator==( const Journal& j1, const Journal& j2 )
42} 42}
43 43
44 44
45QDateTime Journal::getNextAlarmDateTime( bool * ok, int * offset ) const 45QDateTime Journal::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const
46{ 46{
47 *ok = false; 47 *ok = false;
48 return QDateTime (); 48 return QDateTime ();
diff --git a/libkcal/journal.h b/libkcal/journal.h
index cb90c7a..2c1d7ea 100644
--- a/libkcal/journal.h
+++ b/libkcal/journal.h
@@ -39,7 +39,7 @@ class Journal : public Incidence
39 QCString type() const { return "Journal"; } 39 QCString type() const { return "Journal"; }
40 40
41 Incidence *clone(); 41 Incidence *clone();
42 QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; 42 QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const;
43private: 43private:
44 bool accept(Visitor &v) { return v.visit(this); } 44 bool accept(Visitor &v) { return v.visit(this); }
45}; 45};
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index d7431c7..473247a 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -515,7 +515,7 @@ void Todo::setPercentComplete(int v)
515 mHasCompletedDate = false; 515 mHasCompletedDate = false;
516 updated(); 516 updated();
517} 517}
518QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const 518QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const
519{ 519{
520 if ( isCompleted() || ! hasDueDate() || cancelled() ) { 520 if ( isCompleted() || ! hasDueDate() || cancelled() ) {
521 *ok = false; 521 *ok = false;
@@ -551,7 +551,7 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const
551 } 551 }
552 } 552 }
553 if ( enabled ) { 553 if ( enabled ) {
554 if ( alarmStart > QDateTime::currentDateTime() ) { 554 if ( alarmStart > start_dt ) {
555 *ok = true; 555 *ok = true;
556 * offset = off; 556 * offset = off;
557 return alarmStart; 557 return alarmStart;
diff --git a/libkcal/todo.h b/libkcal/todo.h
index a5354ce..ab8fdf1 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -44,7 +44,7 @@ namespace KCal {
44 44
45 /** Return an exact copy of this todo. */ 45 /** Return an exact copy of this todo. */
46 Incidence *clone(); 46 Incidence *clone();
47 QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; 47 QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const;
48 48
49 /** for setting the todo's due date/time with a QDateTime. */ 49 /** for setting the todo's due date/time with a QDateTime. */
50 void setDtDue(const QDateTime &dtDue); 50 void setDtDue(const QDateTime &dtDue);