Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessvcal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessvcal.cpp | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp index 7d58a40..aa8a7eb 100644 --- a/libopie2/opiepim/backend/otodoaccessvcal.cpp +++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp | |||
@@ -83,25 +83,24 @@ namespace { | |||
83 | bool ok; | 83 | bool ok; |
84 | event.setPriority(name.toInt(&ok) ); | 84 | event.setPriority(name.toInt(&ok) ); |
85 | } | 85 | } |
86 | //due date | 86 | //due date |
87 | if((ob = isAPropertyOf(obj, VCDueProp)) ){ | 87 | if((ob = isAPropertyOf(obj, VCDueProp)) ){ |
88 | event.setHasDueDate( true ); | 88 | event.setHasDueDate( true ); |
89 | name = vObjectStringZValue( ob ); | 89 | name = vObjectStringZValue( ob ); |
90 | event.setDueDate( TimeConversion::fromISO8601( name).date() ); | 90 | event.setDueDate( TimeConversion::fromISO8601( name).date() ); |
91 | } | 91 | } |
92 | // categories | 92 | // categories |
93 | if((ob = isAPropertyOf( obj, VCCategoriesProp )) != 0 ){ | 93 | if((ob = isAPropertyOf( obj, VCCategoriesProp )) != 0 ){ |
94 | name = vObjectStringZValue( ob ); | 94 | name = vObjectStringZValue( ob ); |
95 | owarn << "Categories:" << name.data() << "" << oendl; | ||
96 | } | 95 | } |
97 | 96 | ||
98 | event.setUid( 1 ); | 97 | event.setUid( 1 ); |
99 | return event; | 98 | return event; |
100 | }; | 99 | }; |
101 | static VObject *vobjByEvent( const OPimTodo &event ) { | 100 | static VObject *vobjByEvent( const OPimTodo &event ) { |
102 | VObject *task = newVObject( VCTodoProp ); | 101 | VObject *task = newVObject( VCTodoProp ); |
103 | if( task == 0 ) | 102 | if( task == 0 ) |
104 | return 0l; | 103 | return 0l; |
105 | 104 | ||
106 | if( event.hasDueDate() ) { | 105 | if( event.hasDueDate() ) { |
107 | QTime time(0, 0, 0); | 106 | QTime time(0, 0, 0); |
@@ -224,66 +223,37 @@ void OPimTodoAccessVCal::removeAllCompleted() { | |||
224 | if ( (*it).isCompleted() ) | 223 | if ( (*it).isCompleted() ) |
225 | m_map.remove( it ); | 224 | m_map.remove( it ); |
226 | } | 225 | } |
227 | } | 226 | } |
228 | bool OPimTodoAccessVCal::replace( const OPimTodo& to ) { | 227 | bool OPimTodoAccessVCal::replace( const OPimTodo& to ) { |
229 | m_map.replace( to.uid(), to ); | 228 | m_map.replace( to.uid(), to ); |
230 | m_dirty = true; | 229 | m_dirty = true; |
231 | return true; | 230 | return true; |
232 | } | 231 | } |
233 | OPimTodo OPimTodoAccessVCal::find(int uid )const { | 232 | OPimTodo OPimTodoAccessVCal::find(int uid )const { |
234 | return m_map[uid]; | 233 | return m_map[uid]; |
235 | } | 234 | } |
236 | QArray<int> OPimTodoAccessVCal::sorted( bool, int, int, int ) { | 235 | |
237 | QArray<int> ar(0); | ||
238 | return ar; | ||
239 | } | ||
240 | QArray<int> OPimTodoAccessVCal::allRecords()const { | 236 | QArray<int> OPimTodoAccessVCal::allRecords()const { |
241 | QArray<int> ar( m_map.count() ); | 237 | QArray<int> ar( m_map.count() ); |
242 | QMap<int, OPimTodo>::ConstIterator it; | 238 | QMap<int, OPimTodo>::ConstIterator it; |
243 | int i = 0; | 239 | int i = 0; |
244 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { | 240 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { |
245 | ar[i] = it.key(); | 241 | ar[i] = it.key(); |
246 | i++; | 242 | i++; |
247 | } | 243 | } |
248 | return ar; | 244 | return ar; |
249 | } | 245 | } |
250 | QArray<int> OPimTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { | 246 | |
251 | QArray<int> ar(0); | ||
252 | return ar; | ||
253 | } | ||
254 | QArray<int> OPimTodoAccessVCal::queryByExample( const OPimTodo&, int, const QDateTime& ) { | ||
255 | QArray<int> ar(0); | ||
256 | return ar; | ||
257 | } | ||
258 | QArray<int> OPimTodoAccessVCal::effectiveToDos( const QDate& , | 247 | QArray<int> OPimTodoAccessVCal::effectiveToDos( const QDate& , |
259 | const QDate& , | 248 | const QDate& , |
260 | bool ) { | 249 | bool )const { |
261 | QArray<int> ar(0); | ||
262 | return ar; | ||
263 | } | ||
264 | QArray<int> OPimTodoAccessVCal::overDue() { | ||
265 | QArray<int> ar(0); | 250 | QArray<int> ar(0); |
266 | return ar; | 251 | return ar; |
267 | } | 252 | } |
268 | QBitArray OPimTodoAccessVCal::supports()const { | ||
269 | static QBitArray ar = sup(); | ||
270 | |||
271 | return ar; | ||
272 | } | ||
273 | QBitArray OPimTodoAccessVCal::sup() { | ||
274 | QBitArray ar ( OPimTodo::CompletedDate +1 ); | ||
275 | ar.fill( true ); | ||
276 | |||
277 | ar[OPimTodo::CrossReference] = false; | ||
278 | ar[OPimTodo::State ] = false; | ||
279 | ar[OPimTodo::Reminders] = false; | ||
280 | ar[OPimTodo::Notifiers] = false; | ||
281 | ar[OPimTodo::Maintainer] = false; | ||
282 | ar[OPimTodo::Progress] = false; | ||
283 | ar[OPimTodo::Alarms ] = false; | ||
284 | ar[OPimTodo::Recurrence] = false; | ||
285 | 253 | ||
254 | QArray<int> OPimTodoAccessVCal::overDue()const { | ||
255 | QArray<int> ar(0); | ||
286 | return ar; | 256 | return ar; |
287 | } | 257 | } |
288 | 258 | ||
289 | } | 259 | } |