summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-07-07 21:34:31 (UTC)
committer zautrix <zautrix>2005-07-07 21:34:31 (UTC)
commit3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc (patch) (side-by-side diff)
tree6fceb199e62afe671ed34acb308749ea09cac578 /libkcal
parentde5621f2fd3924f27c05459ae555b3bd06c5e584 (diff)
downloadkdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.zip
kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.tar.gz
kdepimpi-3fe323e4e63f3b7c1cf8c96093fa14fd63fb4efc.tar.bz2
fixxx
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/event.cpp16
-rw-r--r--libkcal/event.h2
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
@@ -171,7 +171,7 @@ void Event::setDuration(int seconds)
setHasEndDate(false);
Incidence::setDuration(seconds);
}
-bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFutureOnly )
+bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, QDateTime* startDT )
{
if ( testEvent == this )
return false;
@@ -191,8 +191,8 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
*overlapDT = testEvent->mDtStart;
else
*overlapDT = mDtStart;
- if ( inFutureOnly )
- return (*overlapDT >= QDateTime::currentDateTime() );
+ if ( startDT )
+ return (*overlapDT >= *startDT );
return true;
}
return false;
@@ -215,7 +215,7 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
enr = nonRecur->mDtEnd;
if ( enr < recurEvent->mDtStart )
return false;
- if ( inFutureOnly && enr < QDateTime::currentDateTime() )
+ if ( startDT && enr < *startDT )
return false;
int recDuration = recurEvent->mDtStart.secsTo( recurEvent->mDtEnd );
if ( recurEvent->doesFloat() )
@@ -233,8 +233,8 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
*overlapDT = recStart;
else
*overlapDT = nonRecur->mDtStart;
- if ( inFutureOnly ) {
- if ( *overlapDT >= QDateTime::currentDateTime() )
+ if ( startDT ) {
+ if ( *overlapDT >= *startDT )
return true;
} else
return true;
@@ -274,8 +274,8 @@ bool Event::isOverlapping ( Event* testEvent, QDateTime* overlapDT, bool inFut
*overlapDT = testincidenceStart;
else
*overlapDT = incidenceStart;
- if ( inFutureOnly ) {
- if ( *overlapDT >= QDateTime::currentDateTime() )
+ if ( startDT ) {
+ if ( *overlapDT >= *startDT )
return true;
} else
return true;
diff --git a/libkcal/event.h b/libkcal/event.h
index 80c11c4..e6055a5 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -74,7 +74,7 @@ class Event : public Incidence
bool contains ( Event*);
- bool isOverlapping ( Event*, QDateTime*, bool inFutureOnly );
+ bool isOverlapping ( Event*, QDateTime*, QDateTime* );
private:
bool accept(Visitor &v) { return v.visit(this); }