author | zecke <zecke> | 2003-02-22 18:51:44 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-22 18:51:44 (UTC) |
commit | 7b04887e382227c80c8985495f01dad2b1890719 (patch) (side-by-side diff) | |
tree | 31db88fd0519c7f03ff05560f21ba69256765d5e | |
parent | 2424bcd292444b3a03c9b92dbc7f5b392c355755 (diff) | |
download | opie-7b04887e382227c80c8985495f01dad2b1890719.zip opie-7b04887e382227c80c8985495f01dad2b1890719.tar.gz opie-7b04887e382227c80c8985495f01dad2b1890719.tar.bz2 |
Fix saving
remove the transport medium from the opimmainwindow
-rw-r--r-- | libopie/pim/odatebookaccessbackend_xml.cpp | 7 | ||||
-rw-r--r-- | libopie/pim/opimmainwindow.h | 2 | ||||
-rw-r--r-- | libopie/pim/test/oevent_test.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | 7 | ||||
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.h | 2 |
5 files changed, 17 insertions, 5 deletions
diff --git a/libopie/pim/odatebookaccessbackend_xml.cpp b/libopie/pim/odatebookaccessbackend_xml.cpp index 24b69fe..4a6b7b8 100644 --- a/libopie/pim/odatebookaccessbackend_xml.cpp +++ b/libopie/pim/odatebookaccessbackend_xml.cpp @@ -85,4 +85,5 @@ namespace { }; inline void save( const OEvent& ev, QString& buf ) { + qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; if (!ev.location().isEmpty() ) @@ -126,4 +127,5 @@ namespace { else buf += ev.timeZone(); + buf += "\""; if (ev.parent() != 0 ) { @@ -435,5 +437,4 @@ bool ODateBookAccessBackend_XML::loadFile() { /* time to finalize */ finalizeRecord( ev ); - add( ev ); delete rec; } @@ -452,6 +453,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { }else { /* to current date time */ + qWarning(" Start is %d", start ); OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); QDateTime date = zone.toDateTime( start ); + qWarning(" Start is %s", date.toString().latin1() ); ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); @@ -474,6 +477,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { } if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { + qWarning("already contains assign uid"); ev.setUid( 1 ); } + qWarning("addind %d %s", ev.uid(), ev.description().latin1() ); if ( ev.hasRecurrence() ) m_rep.insert( ev.uid(), ev ); diff --git a/libopie/pim/opimmainwindow.h b/libopie/pim/opimmainwindow.h index 34b8a71..dca3c82 100644 --- a/libopie/pim/opimmainwindow.h +++ b/libopie/pim/opimmainwindow.h @@ -47,5 +47,5 @@ protected slots: virtual bool remove( int uid ) = 0; /** beam the record with UID = uid */ - virtual void beam( int uid , int transport = IrDa) = 0; + virtual void beam( int uid ) = 0; /** show the record with UID == uid */ diff --git a/libopie/pim/test/oevent_test.cpp b/libopie/pim/test/oevent_test.cpp index d83ee0b..9f16911 100644 --- a/libopie/pim/test/oevent_test.cpp +++ b/libopie/pim/test/oevent_test.cpp @@ -15,5 +15,6 @@ int main(int argc, char* argv ) { qWarning("Summary: %s",ev.description().latin1() ); qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() ); - qWarning("All Day: %d",ev.isAllDay() ); + qWarning("All Day: %d Recurrence: %d",ev.isAllDay(), ev.hasRecurrence() ); + qWarning("UID %d", ev.uid() ); } @@ -29,4 +30,5 @@ int main(int argc, char* argv ) { qWarning("Date: %s", ef.date().toString().latin1() ); } + acc.save(); return 0; 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 @@ -85,4 +85,5 @@ namespace { }; inline void save( const OEvent& ev, QString& buf ) { + qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; if (!ev.location().isEmpty() ) @@ -126,4 +127,5 @@ namespace { else buf += ev.timeZone(); + buf += "\""; if (ev.parent() != 0 ) { @@ -435,5 +437,4 @@ bool ODateBookAccessBackend_XML::loadFile() { /* time to finalize */ finalizeRecord( ev ); - add( ev ); delete rec; } @@ -452,6 +453,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { }else { /* to current date time */ + qWarning(" Start is %d", start ); OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); QDateTime date = zone.toDateTime( start ); + qWarning(" Start is %s", date.toString().latin1() ); ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); @@ -474,6 +477,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { } if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { + qWarning("already contains assign uid"); ev.setUid( 1 ); } + qWarning("addind %d %s", ev.uid(), ev.description().latin1() ); if ( ev.hasRecurrence() ) m_rep.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 @@ -47,5 +47,5 @@ protected slots: virtual bool remove( int uid ) = 0; /** beam the record with UID = uid */ - virtual void beam( int uid , int transport = IrDa) = 0; + virtual void beam( int uid ) = 0; /** show the record with UID == uid */ |