summaryrefslogtreecommitdiff
path: root/libopie/pim/test/oevent_test.cpp
authorzecke <zecke>2003-02-22 16:11:16 (UTC)
committer zecke <zecke>2003-02-22 16:11:16 (UTC)
commit397a7b1635488deda02b36df70692e27f59bb3e0 (patch) (unidiff)
tree1232b1b7e8ac84c5d48df79b635ba61acbdf0f62 /libopie/pim/test/oevent_test.cpp
parente7981098a5c373748d98158e8a6c59750bb0d7dc (diff)
downloadopie-397a7b1635488deda02b36df70692e27f59bb3e0.zip
opie-397a7b1635488deda02b36df70692e27f59bb3e0.tar.gz
opie-397a7b1635488deda02b36df70692e27f59bb3e0.tar.bz2
Implement saving of events
Implement the ExceptionList Add Children and parent to OEvent Make ORecur honor exceptions Extend the test app to add and save
Diffstat (limited to 'libopie/pim/test/oevent_test.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/test/oevent_test.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp
index 6f04995..247b83b 100644
--- a/libopie/pim/test/oevent_test.cpp
+++ b/libopie/pim/test/oevent_test.cpp
@@ -5,12 +5,12 @@
5 5
6int main(int argc, char* argv ) { 6int main(int argc, char* argv ) {
7 OEvent ev; 7 OEvent ev;
8 ev.setUid( 20 ); 8// ev.setUid( 20 );
9 9
10 ev.setDescription( "Foo" ); 10 ev.setDescription( "Foo Descsfewrf" );
11 11
12 OEvent ev2 = ev; 12 OEvent ev2 = ev;
13 ev2.setDescription("Foo2"); 13 ev2.setDescription("Foo3");
14 qWarning("%s", ev2.description().latin1() ); 14 qWarning("%s", ev2.description().latin1() );
15 qWarning("%s", ev.description().latin1() ); 15 qWarning("%s", ev.description().latin1() );
16 16
@@ -20,6 +20,7 @@ int main(int argc, char* argv ) {
20 20
21 qWarning("%s", ev2.startDateTime().toString().latin1() ); 21 qWarning("%s", ev2.startDateTime().toString().latin1() );
22 qWarning("%s", ev2.startDateTimeInZone().toString().latin1() ); 22 qWarning("%s", ev2.startDateTimeInZone().toString().latin1() );
23 qWarning("%d %d", ev.isAllDay(), ev2.isAllDay() );
23 24
24 ODateBookAccess acc; 25 ODateBookAccess acc;
25 if(!acc.load() ) qWarning("could not load"); 26 if(!acc.load() ) qWarning("could not load");
@@ -45,6 +46,9 @@ int main(int argc, char* argv ) {
45 qWarning("Summary: %s", ef.description().latin1() ); 46 qWarning("Summary: %s", ef.description().latin1() );
46 qWarning("Date: %s", ef.date().toString().latin1() ); 47 qWarning("Date: %s", ef.date().toString().latin1() );
47 } 48 }
49 ev.setUid( 1 );
50 acc.add( ev );
51 acc.save();
48 52
49 return 0; 53 return 0;
50} 54}