-rw-r--r-- | libkcal/event.cpp | 16 | ||||
-rw-r--r-- | libkcal/event.h | 2 |
2 files changed, 9 insertions, 9 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) | |||
172 | Incidence::setDuration(seconds); | 172 | Incidence::setDuration(seconds); |
173 | } | 173 | } |
174 | bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFutureOnly ) | 174 | bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT ) |
175 | { | 175 | { |
176 | if ( testEvent == this ) | 176 | if ( testEvent == this ) |
@@ -192,6 +192,6 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut | |||
192 | else | 192 | else |
193 | *overlapDT = mDtStart; | 193 | *overlapDT = mDtStart; |
194 | if ( inFutureOnly ) | 194 | if ( startDT ) |
195 | return (*overlapDT >= QDateTime::currentDateTime() ); | 195 | return (*overlapDT >= *startDT ); |
196 | return true; | 196 | return true; |
197 | } | 197 | } |
@@ -216,5 +216,5 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut | |||
216 | if ( enr < recurEvent->mDtStart ) | 216 | if ( enr < recurEvent->mDtStart ) |
217 | return false; | 217 | return false; |
218 | if ( inFutureOnly && enr < QDateTime::currentDateTime() ) | 218 | if ( startDT && enr < *startDT ) |
219 | return false; | 219 | return false; |
220 | int recDuration = recurEvent->mDtStart.secsTo( recurEvent->mDtEnd ); | 220 | int recDuration = recurEvent->mDtStart.secsTo( recurEvent->mDtEnd ); |
@@ -234,6 +234,6 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut | |||
234 | else | 234 | else |
235 | *overlapDT = nonRecur->mDtStart; | 235 | *overlapDT = nonRecur->mDtStart; |
236 | if ( inFutureOnly ) { | 236 | if ( startDT ) { |
237 | if ( *overlapDT >= QDateTime::currentDateTime() ) | 237 | if ( *overlapDT >= *startDT ) |
238 | return true; | 238 | return true; |
239 | } else | 239 | } else |
@@ -275,6 +275,6 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut | |||
275 | else | 275 | else |
276 | *overlapDT = incidenceStart; | 276 | *overlapDT = incidenceStart; |
277 | if ( inFutureOnly ) { | 277 | if ( startDT ) { |
278 | if ( *overlapDT >= QDateTime::currentDateTime() ) | 278 | if ( *overlapDT >= *startDT ) |
279 | return true; | 279 | return true; |
280 | } else | 280 | } else |
diff --git a/libkcal/event.h b/libkcal/event.h index 80c11c4..e6055a5 100644 --- a/libkcal/event.h +++ b/libkcal/event.h | |||
@@ -75,5 +75,5 @@ class Event : public Incidence | |||
75 | bool contains ( Event*); | 75 | bool contains ( Event*); |
76 | 76 | ||
77 | bool isOverlapping ( Event*, QDateTime*, bool inFutureOnly ); | 77 | bool isOverlapping ( Event*, QDateTime*, QDateTime* ); |
78 | 78 | ||
79 | private: | 79 | private: |