Diffstat (limited to 'libopie/pim/test/oevent_test.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/test/oevent_test.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp index d83ee0b..9f16911 100644 --- a/libopie/pim/test/oevent_test.cpp +++ b/libopie/pim/test/oevent_test.cpp | |||
@@ -1,33 +1,35 @@ | |||
1 | #include <qdatetime.h> | 1 | #include <qdatetime.h> |
2 | 2 | ||
3 | #include "../oevent.h" | 3 | #include "../oevent.h" |
4 | #include "../odatebookaccess.h" | 4 | #include "../odatebookaccess.h" |
5 | 5 | ||
6 | int main(int argc, char* argv ) { | 6 | int main(int argc, char* argv ) { |
7 | ODateBookAccess acc; | 7 | ODateBookAccess acc; |
8 | if(!acc.load() ) qWarning("could not load"); | 8 | if(!acc.load() ) qWarning("could not load"); |
9 | 9 | ||
10 | ODateBookAccess::List::Iterator it; | 10 | ODateBookAccess::List::Iterator it; |
11 | ODateBookAccess::List list = acc.allRecords(); | 11 | ODateBookAccess::List list = acc.allRecords(); |
12 | 12 | ||
13 | for( it = list.begin(); it != list.end(); ++it ){ | 13 | for( it = list.begin(); it != list.end(); ++it ){ |
14 | OEvent ev = (*it); | 14 | OEvent ev = (*it); |
15 | qWarning("Summary: %s",ev.description().latin1() ); | 15 | qWarning("Summary: %s",ev.description().latin1() ); |
16 | qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() ); | 16 | qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() ); |
17 | qWarning("All Day: %d",ev.isAllDay() ); | 17 | qWarning("All Day: %d Recurrence: %d",ev.isAllDay(), ev.hasRecurrence() ); |
18 | qWarning("UID %d", ev.uid() ); | ||
18 | 19 | ||
19 | } | 20 | } |
20 | QDate date1(2003,02,01 ); | 21 | QDate date1(2003,02,01 ); |
21 | QDate date2(2003,03,01 ); | 22 | QDate date2(2003,03,01 ); |
22 | 23 | ||
23 | OEffectiveEvent::ValueList effList = acc.effectiveEvents( date1,date2 ); | 24 | OEffectiveEvent::ValueList effList = acc.effectiveEvents( date1,date2 ); |
24 | OEffectiveEvent::ValueList::Iterator effIt; | 25 | OEffectiveEvent::ValueList::Iterator effIt; |
25 | 26 | ||
26 | for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){ | 27 | for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){ |
27 | OEffectiveEvent ef = (*effIt); | 28 | OEffectiveEvent ef = (*effIt); |
28 | qWarning("Summary: %s", ef.description().latin1() ); | 29 | qWarning("Summary: %s", ef.description().latin1() ); |
29 | qWarning("Date: %s", ef.date().toString().latin1() ); | 30 | qWarning("Date: %s", ef.date().toString().latin1() ); |
30 | } | 31 | } |
32 | acc.save(); | ||
31 | 33 | ||
32 | return 0; | 34 | return 0; |
33 | } | 35 | } |