Warning: That file was not part of the compilation database. It may have many parsing errors.
1 | /* |
---|---|
2 | This is a test case for KDE's iCalendar functionality. |
3 | (c) 2008 by Thorsten Staerk |
4 | */ |
5 | |
6 | #include <QString> |
7 | #include <kapplication.h> |
8 | #include <kaboutdata.h> |
9 | #include <kcmdlineargs.h> |
10 | #include <KMainWindow> |
11 | #include <kcal/resourcecalendar.h> |
12 | #include <kcal/resourcecached.h> |
13 | #include <kcal/resourcelocal.h> |
14 | |
15 | int main (int argc, char *argv[]) |
16 | { |
17 | const QByteArray& ba=QByteArray("test"); |
18 | const KLocalizedString name=ki18n("myName"); |
19 | KAboutData aboutData( ba, ba, name, ba, name); |
20 | KCmdLineArgs::init( argc, argv, &aboutData ); |
21 | KApplication khello; |
22 | KCal::ResourceCalendar* cal; |
23 | KCal::ResourceCached* resource; |
24 | resource=new KCal::ResourceLocal("/tmp/test.ics"); |
25 | cal=resource; |
26 | cal->load(); |
27 | KCal::Todo* todo1 = new KCal::Todo(); |
28 | todo1->setSummary("test todo"); |
29 | cal->addTodo(todo1); |
30 | KABC::Lock *lock = cal->lock(); |
31 | cal->save(); |
32 | lock->unlock(); |
33 | } |
34 |
Warning: That file was not part of the compilation database. It may have many parsing errors.