-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 2b62f0d..3d15354 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -494,15 +494,37 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, | |||
494 | break; | 494 | break; |
495 | case FREndDate: { | 495 | case FREndDate: { |
496 | rp_end = (time_t) val.toLong(); | 496 | rp_end = (time_t) val.toLong(); |
497 | break; | 497 | break; |
498 | } | 498 | } |
499 | default: | 499 | default: |
500 | ev.setCustomField( attr, val ); | ||
500 | break; | 501 | break; |
501 | } | 502 | } |
502 | } | 503 | } |
504 | |||
505 | // from PalmtopRecord... GPL ### FIXME | ||
506 | namespace { | ||
507 | QString customToXml(const QMap<QString, QString>& customMap ) | ||
508 | { | ||
509 | //qWarning(QString("writing custom %1").arg(customMap.count())); | ||
510 | QString buf(" "); | ||
511 | for ( QMap<QString, QString>::ConstIterator cit = customMap.begin(); | ||
512 | cit != customMap.end(); ++cit) { | ||
513 | // qWarning(".ITEM."); | ||
514 | buf += cit.key(); | ||
515 | buf += "=\""; | ||
516 | buf += Qtopia::escapeString(cit.data()); | ||
517 | buf += "\" "; | ||
518 | } | ||
519 | return buf; | ||
520 | } | ||
521 | |||
522 | |||
523 | } | ||
524 | |||
503 | QString OTodoAccessXML::toString( const OTodo& ev )const { | 525 | QString OTodoAccessXML::toString( const OTodo& ev )const { |
504 | QString str; | 526 | QString str; |
505 | 527 | ||
506 | str += "Completed=\"" + QString::number( ev.isCompleted() ) + "\" "; | 528 | str += "Completed=\"" + QString::number( ev.isCompleted() ) + "\" "; |
507 | str += "HasDate=\"" + QString::number( ev.hasDueDate() ) + "\" "; | 529 | str += "HasDate=\"" + QString::number( ev.hasDueDate() ) + "\" "; |
508 | str += "Priority=\"" + QString::number( ev.priority() ) + "\" "; | 530 | str += "Priority=\"" + QString::number( ev.priority() ) + "\" "; |
@@ -578,12 +600,13 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { | |||
578 | for ( ; it != reminders.end(); ++it ) { | 600 | for ( ; it != reminders.end(); ++it ) { |
579 | records << QString::number( (*it).recordUid() ); | 601 | records << QString::number( (*it).recordUid() ); |
580 | } | 602 | } |
581 | str += "Reminders=\""+ records.join(";") +"\" "; | 603 | str += "Reminders=\""+ records.join(";") +"\" "; |
582 | } | 604 | } |
583 | } | 605 | } |
606 | str += customToXml( ev.toExtraMap() ); | ||
584 | 607 | ||
585 | 608 | ||
586 | return str; | 609 | return str; |
587 | } | 610 | } |
588 | QString OTodoAccessXML::toString( const QArray<int>& ints ) const { | 611 | QString OTodoAccessXML::toString( const QArray<int>& ints ) const { |
589 | return Qtopia::Record::idsToString( ints ); | 612 | return Qtopia::Record::idsToString( ints ); |