author | zautrix <zautrix> | 2005-07-07 21:34:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-07 21:34:31 (UTC) |
commit | 3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc (patch) (side-by-side diff) | |
tree | 6fceb199e62afe671ed34acb308749ea09cac578 /libkcal/event.cpp | |
parent | de5621f2fd3924f27c05459ae555b3bd06c5e584 (diff) | |
download | kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.zip kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.tar.gz kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.tar.bz2 |
fixxx
-rw-r--r-- | libkcal/event.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libkcal/event.cpp b/libkcal/event.cpp index 235ae55..46e8174 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -172,5 +172,5 @@ void Event::setDuration(int seconds) Incidence::setDuration(seconds); } -bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFutureOnly ) +bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT ) { if ( testEvent == this ) @@ -192,6 +192,6 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut else *overlapDT = mDtStart; - if ( inFutureOnly ) - return (*overlapDT >= QDateTime::currentDateTime() ); + if ( startDT ) + return (*overlapDT >= *startDT ); return true; } @@ -216,5 +216,5 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut if ( enr < recurEvent->mDtStart ) return false; - if ( inFutureOnly && enr < QDateTime::currentDateTime() ) + if ( startDT && enr < *startDT ) return false; int recDuration = recurEvent->mDtStart.secsTo( recurEvent->mDtEnd ); @@ -234,6 +234,6 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut else *overlapDT = nonRecur->mDtStart; - if ( inFutureOnly ) { - if ( *overlapDT >= QDateTime::currentDateTime() ) + if ( startDT ) { + if ( *overlapDT >= *startDT ) return true; } else @@ -275,6 +275,6 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut else *overlapDT = incidenceStart; - if ( inFutureOnly ) { - if ( *overlapDT >= QDateTime::currentDateTime() ) + if ( startDT ) { + if ( *overlapDT >= *startDT ) return true; } else |