Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 591e467..c1682c6 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -322,25 +322,25 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, | |||
322 | case OTodo::CrossReference: | 322 | case OTodo::CrossReference: |
323 | { | 323 | { |
324 | /* | 324 | /* |
325 | * A cross refernce looks like | 325 | * A cross refernce looks like |
326 | * appname,id;appname,id | 326 | * appname,id;appname,id |
327 | * we need to split it up | 327 | * we need to split it up |
328 | */ | 328 | */ |
329 | QStringList refs = QStringList::split(';', val ); | 329 | QStringList refs = QStringList::split(';', val ); |
330 | QStringList::Iterator strIt; | 330 | QStringList::Iterator strIt; |
331 | for (strIt = refs.begin(); strIt != refs.end(); ++strIt ) { | 331 | for (strIt = refs.begin(); strIt != refs.end(); ++strIt ) { |
332 | int pos = (*strIt).find(','); | 332 | int pos = (*strIt).find(','); |
333 | if ( pos > -1 ) | 333 | if ( pos > -1 ) |
334 | ev.addRelation( (*strIt).left(pos), (*strIt).mid(pos+1).toInt() ); | 334 | ; // ev.addRelation( (*strIt).left(pos), (*strIt).mid(pos+1).toInt() ); |
335 | 335 | ||
336 | } | 336 | } |
337 | break; | 337 | break; |
338 | } | 338 | } |
339 | case OTodo::HasAlarmDateTime: | 339 | case OTodo::HasAlarmDateTime: |
340 | ev.setHasAlarmDateTime( val.toInt() ); | 340 | ev.setHasAlarmDateTime( val.toInt() ); |
341 | break; | 341 | break; |
342 | case OTodo::AlarmDateTime: { | 342 | case OTodo::AlarmDateTime: { |
343 | /* this sounds better ;) zecke */ | 343 | /* this sounds better ;) zecke */ |
344 | ev.setAlarmDateTime( TimeConversion::fromISO8601( val.local8Bit() ) ); | 344 | ev.setAlarmDateTime( TimeConversion::fromISO8601( val.local8Bit() ) ); |
345 | break; | 345 | break; |
346 | } | 346 | } |
@@ -373,40 +373,24 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { | |||
373 | * possible you can set custom fields | 373 | * possible you can set custom fields |
374 | * but don' iterate over the list | 374 | * but don' iterate over the list |
375 | * I may do #define private protected | 375 | * I may do #define private protected |
376 | * for this case - cough --zecke | 376 | * for this case - cough --zecke |
377 | */ | 377 | */ |
378 | /* | 378 | /* |
379 | QMap<QString, QString> extras = ev.extras(); | 379 | QMap<QString, QString> extras = ev.extras(); |
380 | QMap<QString, QString>::Iterator extIt; | 380 | QMap<QString, QString>::Iterator extIt; |
381 | for (extIt = extras.begin(); extIt != extras.end(); ++extIt ) | 381 | for (extIt = extras.begin(); extIt != extras.end(); ++extIt ) |
382 | str += extIt.key() + "=\"" + extIt.data() + "\" "; | 382 | str += extIt.key() + "=\"" + extIt.data() + "\" "; |
383 | */ | 383 | */ |
384 | // cross refernce | 384 | // cross refernce |
385 | QStringList list = ev.relatedApps(); | ||
386 | QStringList::Iterator listIt; | ||
387 | QString refs; | ||
388 | str += "CrossReference=\""; | ||
389 | bool added = false; | ||
390 | for ( listIt = list.begin(); listIt != list.end(); ++listIt ) { | ||
391 | added = true; | ||
392 | QArray<int> ints = ev.relations( (*listIt) ); | ||
393 | for ( uint i = 0; i< ints.count(); i++ ) { | ||
394 | str += (*listIt) + "," + QString::number( i ) + ";"; | ||
395 | } | ||
396 | } | ||
397 | if ( added ) | ||
398 | str = str.remove( str.length()-1, 1 ); | ||
399 | |||
400 | str += "\" "; | ||
401 | 385 | ||
402 | str += "AlarmDateTime=\"" + TimeConversion::toISO8601( ev.alarmDateTime() ) + "\" "; | 386 | str += "AlarmDateTime=\"" + TimeConversion::toISO8601( ev.alarmDateTime() ) + "\" "; |
403 | 387 | ||
404 | return str; | 388 | return str; |
405 | } | 389 | } |
406 | QString OTodoAccessXML::toString( const QArray<int>& ints ) const { | 390 | QString OTodoAccessXML::toString( const QArray<int>& ints ) const { |
407 | return Qtopia::Record::idsToString( ints ); | 391 | return Qtopia::Record::idsToString( ints ); |
408 | } | 392 | } |
409 | 393 | ||
410 | /* internal class for sorting | 394 | /* internal class for sorting |
411 | * | 395 | * |
412 | * Inspired by todoxmlio.cpp from TT | 396 | * Inspired by todoxmlio.cpp from TT |