-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | 7 | ||||
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index 24b69fe..4a6b7b8 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | |||
@@ -83,8 +83,9 @@ namespace { | |||
83 | FRecChildren, | 83 | FRecChildren, |
84 | FExceptions | 84 | FExceptions |
85 | }; | 85 | }; |
86 | inline void save( const OEvent& ev, QString& buf ) { | 86 | inline void save( const OEvent& ev, QString& buf ) { |
87 | qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); | ||
87 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; | 88 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; |
88 | if (!ev.location().isEmpty() ) | 89 | if (!ev.location().isEmpty() ) |
89 | buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\""; | 90 | buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\""; |
90 | 91 | ||
@@ -124,8 +125,9 @@ namespace { | |||
124 | if ( ev.timeZone().isEmpty() ) | 125 | if ( ev.timeZone().isEmpty() ) |
125 | buf += "None"; | 126 | buf += "None"; |
126 | else | 127 | else |
127 | buf += ev.timeZone(); | 128 | buf += ev.timeZone(); |
129 | buf += "\""; | ||
128 | 130 | ||
129 | if (ev.parent() != 0 ) { | 131 | if (ev.parent() != 0 ) { |
130 | buf += " recparent=\""+QString::number(ev.parent() )+"\""; | 132 | buf += " recparent=\""+QString::number(ev.parent() )+"\""; |
131 | } | 133 | } |
@@ -433,9 +435,8 @@ bool ODateBookAccessBackend_XML::loadFile() { | |||
433 | } | 435 | } |
434 | } | 436 | } |
435 | /* time to finalize */ | 437 | /* time to finalize */ |
436 | finalizeRecord( ev ); | 438 | finalizeRecord( ev ); |
437 | add( ev ); | ||
438 | delete rec; | 439 | delete rec; |
439 | } | 440 | } |
440 | ::munmap(map_addr, attribute.st_size ); | 441 | ::munmap(map_addr, attribute.st_size ); |
441 | m_changed = false; // changed during add | 442 | m_changed = false; // changed during add |
@@ -450,10 +451,12 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { | |||
450 | ev.setEndDateTime ( utc.fromUTCDateTime( end ) ); | 451 | ev.setEndDateTime ( utc.fromUTCDateTime( end ) ); |
451 | ev.setTimeZone( "UTC"); // make sure it is really utc | 452 | ev.setTimeZone( "UTC"); // make sure it is really utc |
452 | }else { | 453 | }else { |
453 | /* to current date time */ | 454 | /* to current date time */ |
455 | qWarning(" Start is %d", start ); | ||
454 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); | 456 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); |
455 | QDateTime date = zone.toDateTime( start ); | 457 | QDateTime date = zone.toDateTime( start ); |
458 | qWarning(" Start is %s", date.toString().latin1() ); | ||
456 | ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); | 459 | ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); |
457 | 460 | ||
458 | date = zone.toDateTime( end ); | 461 | date = zone.toDateTime( end ); |
459 | ev.setEndDateTime ( zone.toDateTime( date, OTimeZone::current() ) ); | 462 | ev.setEndDateTime ( zone.toDateTime( date, OTimeZone::current() ) ); |
@@ -472,10 +475,12 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { | |||
472 | OPimAlarm al( snd , dt ); | 475 | OPimAlarm al( snd , dt ); |
473 | ev.notifiers().add( al ); | 476 | ev.notifiers().add( al ); |
474 | } | 477 | } |
475 | if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { | 478 | if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { |
479 | qWarning("already contains assign uid"); | ||
476 | ev.setUid( 1 ); | 480 | ev.setUid( 1 ); |
477 | } | 481 | } |
482 | qWarning("addind %d %s", ev.uid(), ev.description().latin1() ); | ||
478 | if ( ev.hasRecurrence() ) | 483 | if ( ev.hasRecurrence() ) |
479 | m_rep.insert( ev.uid(), ev ); | 484 | m_rep.insert( ev.uid(), ev ); |
480 | else | 485 | else |
481 | m_raw.insert( ev.uid(), ev ); | 486 | m_raw.insert( ev.uid(), ev ); |
diff --git a/libopie2/opiepim/ui/opimmainwindow.h b/libopie2/opiepim/ui/opimmainwindow.h index 34b8a71..dca3c82 100644 --- a/libopie2/opiepim/ui/opimmainwindow.h +++ b/libopie2/opiepim/ui/opimmainwindow.h | |||
@@ -45,9 +45,9 @@ protected slots: | |||
45 | virtual int create() = 0; | 45 | virtual int create() = 0; |
46 | /** remove a record with UID == uid */ | 46 | /** remove a record with UID == uid */ |
47 | virtual bool remove( int uid ) = 0; | 47 | virtual bool remove( int uid ) = 0; |
48 | /** beam the record with UID = uid */ | 48 | /** beam the record with UID = uid */ |
49 | virtual void beam( int uid , int transport = IrDa) = 0; | 49 | virtual void beam( int uid ) = 0; |
50 | 50 | ||
51 | /** show the record with UID == uid */ | 51 | /** show the record with UID == uid */ |
52 | virtual void show( int uid ) = 0; | 52 | virtual void show( int uid ) = 0; |
53 | /** edit the record */ | 53 | /** edit the record */ |