Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index 0f99d50..55e47e2 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | |||
@@ -122,7 +122,6 @@ namespace { | |||
122 | 122 | ||
123 | // FIXME: Use OPimEvent::toMap() here !! (eilers) | 123 | // FIXME: Use OPimEvent::toMap() here !! (eilers) |
124 | static void save( const OPimEvent& ev, QString& buf ) { | 124 | static void save( const OPimEvent& ev, QString& buf ) { |
125 | owarn << "Saving " << ev.uid() << " " << ev.description() << "" << oendl; | ||
126 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; | 125 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; |
127 | if (!ev.location().isEmpty() ) | 126 | if (!ev.location().isEmpty() ) |
128 | buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\""; | 127 | buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\""; |
@@ -326,9 +325,7 @@ bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) { | |||
326 | replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers) | 325 | replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers) |
327 | return add( ev ); | 326 | return add( ev ); |
328 | } | 327 | } |
329 | QArray<int> ODateBookAccessBackend_XML::rawEvents()const { | 328 | |
330 | return allRecords(); | ||
331 | } | ||
332 | QArray<int> ODateBookAccessBackend_XML::rawRepeats()const { | 329 | QArray<int> ODateBookAccessBackend_XML::rawRepeats()const { |
333 | QArray<int> ints( m_rep.count() ); | 330 | QArray<int> ints( m_rep.count() ); |
334 | uint i = 0; | 331 | uint i = 0; |
@@ -353,7 +350,7 @@ QArray<int> ODateBookAccessBackend_XML::nonRepeats()const { | |||
353 | 350 | ||
354 | return ints; | 351 | return ints; |
355 | } | 352 | } |
356 | OPimEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() { | 353 | OPimEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats()const { |
357 | OPimEvent::ValueList list; | 354 | OPimEvent::ValueList list; |
358 | QMap<int, OPimEvent>::ConstIterator it; | 355 | QMap<int, OPimEvent>::ConstIterator it; |
359 | for (it = m_raw.begin(); it != m_raw.end(); ++it ) | 356 | for (it = m_raw.begin(); it != m_raw.end(); ++it ) |
@@ -361,7 +358,7 @@ OPimEvent::ValueList ODateBookAccessBackend_XML::directNonRepeats() { | |||
361 | 358 | ||
362 | return list; | 359 | return list; |
363 | } | 360 | } |
364 | OPimEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats() { | 361 | OPimEvent::ValueList ODateBookAccessBackend_XML::directRawRepeats()const { |
365 | OPimEvent::ValueList list; | 362 | OPimEvent::ValueList list; |
366 | QMap<int, OPimEvent>::ConstIterator it; | 363 | QMap<int, OPimEvent>::ConstIterator it; |
367 | for (it = m_rep.begin(); it != m_rep.end(); ++it ) | 364 | for (it = m_rep.begin(); it != m_rep.end(); ++it ) |
@@ -539,7 +536,6 @@ void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) { | |||
539 | ev.notifiers().add( al ); | 536 | ev.notifiers().add( al ); |
540 | } | 537 | } |
541 | if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { | 538 | if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { |
542 | owarn << "already contains assign uid" << oendl; | ||
543 | ev.setUid( 1 ); | 539 | ev.setUid( 1 ); |
544 | } | 540 | } |
545 | 541 | ||
@@ -550,7 +546,6 @@ void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) { | |||
550 | 546 | ||
551 | } | 547 | } |
552 | void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& value) { | 548 | void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& value) { |
553 | // owarn << " setting " << value << "" << oendl; | ||
554 | switch( id ) { | 549 | switch( id ) { |
555 | case FDescription: | 550 | case FDescription: |
556 | e.setDescription( value ); | 551 | e.setDescription( value ); |
@@ -634,7 +629,6 @@ void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& | |||
634 | QStringList list = QStringList::split(' ', value ); | 629 | QStringList list = QStringList::split(' ', value ); |
635 | for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { | 630 | for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { |
636 | QDate date( (*it).left(4).toInt(), (*it).mid(4, 2).toInt(), (*it).right(2).toInt() ); | 631 | QDate date( (*it).left(4).toInt(), (*it).mid(4, 2).toInt(), (*it).right(2).toInt() ); |
637 | owarn << "adding exception " << date.toString() << "" << oendl; | ||
638 | recur()->exceptions().append( date ); | 632 | recur()->exceptions().append( date ); |
639 | } | 633 | } |
640 | } | 634 | } |