Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.cpp b/libopie2/opiepim/backend/odatebookaccessbackend.cpp index 9bf4bf0..f3b7b5f 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend.cpp | |||
@@ -27,21 +27,21 @@ | |||
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #include <qtl.h> | 29 | #include <qtl.h> |
30 | 30 | ||
31 | #include <opie2/orecur.h> | 31 | #include <opie2/opimrecurrence.h> |
32 | 32 | ||
33 | #include <opie2/odatebookaccessbackend.h> | 33 | #include <opie2/odatebookaccessbackend.h> |
34 | 34 | ||
35 | using namespace Opie; | 35 | using namespace Opie; |
36 | 36 | ||
37 | namespace { | 37 | namespace { |
38 | /* a small helper to get all NonRepeating events for a range of time */ | 38 | /* a small helper to get all NonRepeating events for a range of time */ |
39 | void events( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& events, | 39 | void events( OEffectiveEvent::ValueList& tmpList, const OPimEvent::ValueList& events, |
40 | const QDate& from, const QDate& to ) { | 40 | const QDate& from, const QDate& to ) { |
41 | QDateTime dtStart, dtEnd; | 41 | QDateTime dtStart, dtEnd; |
42 | 42 | ||
43 | for ( OEvent::ValueList::ConstIterator it = events.begin(); it != events.end(); ++it ) { | 43 | for ( OPimEvent::ValueList::ConstIterator it = events.begin(); it != events.end(); ++it ) { |
44 | dtStart = (*it).startDateTime(); | 44 | dtStart = (*it).startDateTime(); |
45 | dtEnd = (*it).endDateTime(); | 45 | dtEnd = (*it).endDateTime(); |
46 | 46 | ||
47 | /* | 47 | /* |
@@ -90,15 +90,15 @@ namespace { | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | void repeat( OEffectiveEvent::ValueList& tmpList, const OEvent::ValueList& list, | 94 | void repeat( OEffectiveEvent::ValueList& tmpList, const OPimEvent::ValueList& list, |
95 | const QDate& from, const QDate& to ) { | 95 | const QDate& from, const QDate& to ) { |
96 | QDate repeat; | 96 | QDate repeat; |
97 | for ( OEvent::ValueList::ConstIterator it = list.begin(); it != list.end(); ++it ) { | 97 | for ( OPimEvent::ValueList::ConstIterator it = list.begin(); it != list.end(); ++it ) { |
98 | int dur = (*it).startDateTime().date().daysTo( (*it).endDateTime().date() ); | 98 | int dur = (*it).startDateTime().date().daysTo( (*it).endDateTime().date() ); |
99 | QDate itDate = from.addDays(-dur ); | 99 | QDate itDate = from.addDays(-dur ); |
100 | ORecur rec = (*it).recurrence(); | 100 | OPimRecurrence rec = (*it).recurrence(); |
101 | if ( !rec.hasEndDate() || rec.endDate() > to ) { | 101 | if ( !rec.hasEndDate() || rec.endDate() > to ) { |
102 | rec.setEndDate( to ); | 102 | rec.setEndDate( to ); |
103 | rec.setHasEndDate( true ); | 103 | rec.setHasEndDate( true ); |
104 | } | 104 | } |
@@ -151,9 +151,9 @@ namespace { | |||
151 | 151 | ||
152 | namespace Opie { | 152 | namespace Opie { |
153 | 153 | ||
154 | ODateBookAccessBackend::ODateBookAccessBackend() | 154 | ODateBookAccessBackend::ODateBookAccessBackend() |
155 | : OPimAccessBackend<OEvent>() | 155 | : OPimAccessBackend<OPimEvent>() |
156 | { | 156 | { |
157 | 157 | ||
158 | } | 158 | } |
159 | ODateBookAccessBackend::~ODateBookAccessBackend() { | 159 | ODateBookAccessBackend::~ODateBookAccessBackend() { |
@@ -161,9 +161,9 @@ ODateBookAccessBackend::~ODateBookAccessBackend() { | |||
161 | } | 161 | } |
162 | OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveEvents( const QDate& from, | 162 | OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveEvents( const QDate& from, |
163 | const QDate& to ) { | 163 | const QDate& to ) { |
164 | OEffectiveEvent::ValueList tmpList; | 164 | OEffectiveEvent::ValueList tmpList; |
165 | OEvent::ValueList list = directNonRepeats(); | 165 | OPimEvent::ValueList list = directNonRepeats(); |
166 | 166 | ||
167 | events( tmpList, list, from, to ); | 167 | events( tmpList, list, from, to ); |
168 | repeat( tmpList, directRawRepeats(),from,to ); | 168 | repeat( tmpList, directRawRepeats(),from,to ); |
169 | 169 | ||
@@ -189,9 +189,9 @@ OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveEvents( const QDateT | |||
189 | 189 | ||
190 | OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveNonRepeatingEvents( const QDate& from, | 190 | OEffectiveEvent::ValueList ODateBookAccessBackend::effectiveNonRepeatingEvents( const QDate& from, |
191 | const QDate& to ) { | 191 | const QDate& to ) { |
192 | OEffectiveEvent::ValueList tmpList; | 192 | OEffectiveEvent::ValueList tmpList; |
193 | OEvent::ValueList list = directNonRepeats(); | 193 | OPimEvent::ValueList list = directNonRepeats(); |
194 | 194 | ||
195 | events( tmpList, list, from, to ); | 195 | events( tmpList, list, from, to ); |
196 | 196 | ||
197 | qHeapSort( tmpList ); | 197 | qHeapSort( tmpList ); |