summaryrefslogtreecommitdiff
path: root/libopie/pim/otodoaccessvcal.cpp
Unidiff
Diffstat (limited to 'libopie/pim/otodoaccessvcal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodoaccessvcal.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/libopie/pim/otodoaccessvcal.cpp b/libopie/pim/otodoaccessvcal.cpp
index 3577e14..6415952 100644
--- a/libopie/pim/otodoaccessvcal.cpp
+++ b/libopie/pim/otodoaccessvcal.cpp
@@ -12,18 +12,26 @@ namespace {
12 VObject *ob; 12 VObject *ob;
13 QCString name; 13 QCString name;
14 // no uid, attendees, ... and no fun 14 // no uid, attendees, ... and no fun
15 // description 15 // description
16 if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ 16 if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){
17 name = vObjectStringZValue( ob ); 17 name = vObjectStringZValue( ob );
18#if 0
18 event.setDescription( name ); 19 event.setDescription( name );
20#else
21 event.setSummary( name );
22#endif
19 } 23 }
20 // summary 24 // summary
21 if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { 25 if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) {
22 name = vObjectStringZValue( ob ); 26 name = vObjectStringZValue( ob );
27#if 0
23 event.setSummary( name ); 28 event.setSummary( name );
29#else
30 event.setDescription( name );
31#endif
24 } 32 }
25 // completed 33 // completed
26 if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ 34 if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){
27 name = vObjectStringZValue( ob ); 35 name = vObjectStringZValue( ob );
28 if( name == "COMPLETED" ){ 36 if( name == "COMPLETED" ){
29 event.setCompleted( true ); 37 event.setCompleted( true );
@@ -71,17 +79,33 @@ namespace {
71 QString string = QString::number(event.priority() ); 79 QString string = QString::number(event.priority() );
72 addPropValue( task, VCPriorityProp, string.local8Bit() ); 80 addPropValue( task, VCPriorityProp, string.local8Bit() );
73 81
74 addPropValue( task, VCCategoriesProp, 82 addPropValue( task, VCCategoriesProp,
75 event.idsToString( event.categories() ).local8Bit() ); 83 event.idsToString( event.categories() ).local8Bit() );
76 84
85#if 0
86
87 // There seems a misrepresentation between summary in otodoevent
88 // and summary in vcard.
89 // The same with description..
90 // Description is summary and vice versa.. Argh.. (eilers)
91
92
77 addPropValue( task, VCDescriptionProp, 93 addPropValue( task, VCDescriptionProp,
78 event.description().local8Bit() ); 94 event.description().local8Bit() );
79 95
80 addPropValue( task, VCSummaryProp, 96 addPropValue( task, VCSummaryProp,
81 event.summary().local8Bit() ); 97 event.summary().local8Bit() );
98
99#else
100 addPropValue( task, VCDescriptionProp,
101 event.summary().local8Bit() );
102
103 addPropValue( task, VCSummaryProp,
104 event.description().local8Bit() );
105#endif
82 return task; 106 return task;
83}; 107};
84} 108}
85 109
86OTodoAccessVCal::OTodoAccessVCal( const QString& path ) 110OTodoAccessVCal::OTodoAccessVCal( const QString& path )
87 : m_dirty(false), m_file( path ) 111 : m_dirty(false), m_file( path )
@@ -182,13 +206,13 @@ QArray<int> OTodoAccessVCal::allRecords()const {
182 for ( it = m_map.begin(); it != m_map.end(); ++it ) { 206 for ( it = m_map.begin(); it != m_map.end(); ++it ) {
183 ar[i] = it.key(); 207 ar[i] = it.key();
184 i++; 208 i++;
185 } 209 }
186 return ar; 210 return ar;
187} 211}
188QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp &r)const { 212QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const {
189 QArray<int> ar(0); 213 QArray<int> ar(0);
190 return ar; 214 return ar;
191} 215}
192QArray<int> OTodoAccessVCal::queryByExample( const OTodo&, int, const QDateTime& ) { 216QArray<int> OTodoAccessVCal::queryByExample( const OTodo&, int, const QDateTime& ) {
193 QArray<int> ar(0); 217 QArray<int> ar(0);
194 return ar; 218 return ar;