Diffstat (limited to 'libopie/pim/test/oevent_test.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/test/oevent_test.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp index 247b83b..d83ee0b 100644 --- a/libopie/pim/test/oevent_test.cpp +++ b/libopie/pim/test/oevent_test.cpp | |||
@@ -1,30 +1,12 @@ | |||
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 | OEvent ev; | ||
8 | // ev.setUid( 20 ); | ||
9 | |||
10 | ev.setDescription( "Foo Descsfewrf" ); | ||
11 | |||
12 | OEvent ev2 = ev; | ||
13 | ev2.setDescription("Foo3"); | ||
14 | qWarning("%s", ev2.description().latin1() ); | ||
15 | qWarning("%s", ev.description().latin1() ); | ||
16 | |||
17 | QDateTime time = QDateTime::currentDateTime(); | ||
18 | ev2.setStartDateTime( time ); | ||
19 | ev2.setTimeZone( "Europe/London" ); | ||
20 | |||
21 | qWarning("%s", ev2.startDateTime().toString().latin1() ); | ||
22 | qWarning("%s", ev2.startDateTimeInZone().toString().latin1() ); | ||
23 | qWarning("%d %d", ev.isAllDay(), ev2.isAllDay() ); | ||
24 | |||
25 | ODateBookAccess acc; | 7 | ODateBookAccess acc; |
26 | if(!acc.load() ) qWarning("could not load"); | 8 | if(!acc.load() ) qWarning("could not load"); |
27 | 9 | ||
28 | ODateBookAccess::List::Iterator it; | 10 | ODateBookAccess::List::Iterator it; |
29 | ODateBookAccess::List list = acc.allRecords(); | 11 | ODateBookAccess::List list = acc.allRecords(); |
30 | 12 | ||
@@ -43,12 +25,9 @@ int main(int argc, char* argv ) { | |||
43 | 25 | ||
44 | for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){ | 26 | for( effIt = effList.begin(); effIt != effList.end(); ++effIt ){ |
45 | OEffectiveEvent ef = (*effIt); | 27 | OEffectiveEvent ef = (*effIt); |
46 | qWarning("Summary: %s", ef.description().latin1() ); | 28 | qWarning("Summary: %s", ef.description().latin1() ); |
47 | qWarning("Date: %s", ef.date().toString().latin1() ); | 29 | qWarning("Date: %s", ef.date().toString().latin1() ); |
48 | } | 30 | } |
49 | ev.setUid( 1 ); | ||
50 | acc.add( ev ); | ||
51 | acc.save(); | ||
52 | 31 | ||
53 | return 0; | 32 | return 0; |
54 | } | 33 | } |