summaryrefslogtreecommitdiffabout
path: root/libkcal/event.cpp
authorzautrix <zautrix>2005-07-07 21:34:31 (UTC)
committer zautrix <zautrix>2005-07-07 21:34:31 (UTC)
commit3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc (patch) (unidiff)
tree6fceb199e62afe671ed34acb308749ea09cac578 /libkcal/event.cpp
parentde5621f2fd3924f27c05459ae555b3bd06c5e584 (diff)
downloadkdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.zip
kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.tar.gz
kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.tar.bz2
fixxx
Diffstat (limited to 'libkcal/event.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/event.cpp16
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
@@ -171,7 +171,7 @@ void Event::setDuration(int seconds)
171 setHasEndDate(false); 171 setHasEndDate(false);
172 Incidence::setDuration(seconds); 172 Incidence::setDuration(seconds);
173} 173}
174bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFutureOnly ) 174bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT )
175{ 175{
176 if ( testEvent == this ) 176 if ( testEvent == this )
177 return false; 177 return false;
@@ -191,8 +191,8 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
191 *overlapDT = testEvent->mDtStart; 191 *overlapDT = testEvent->mDtStart;
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 }
198 return false; 198 return false;
@@ -215,7 +215,7 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
215 enr = nonRecur->mDtEnd; 215 enr = nonRecur->mDtEnd;
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 );
221 if ( recurEvent->doesFloat() ) 221 if ( recurEvent->doesFloat() )
@@ -233,8 +233,8 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
233 *overlapDT = recStart; 233 *overlapDT = recStart;
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
240 return true; 240 return true;
@@ -274,8 +274,8 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
274 *overlapDT = testincidenceStart; 274 *overlapDT = testincidenceStart;
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
281 return true; 281 return true;