summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/odatebookaccessbackend_xml.cpp7
-rw-r--r--libopie/pim/opimmainwindow.h2
-rw-r--r--libopie/pim/test/oevent_test.cpp4
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp7
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.h2
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 {
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() )
@@ -126,4 +127,5 @@ namespace {
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 ) {
@@ -435,5 +437,4 @@ bool ODateBookAccessBackend_XML::loadFile() {
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 }
@@ -452,6 +453,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
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
@@ -474,6 +477,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
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 );
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:
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 */
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 ) {
15 qWarning("Summary: %s",ev.description().latin1() ); 15 qWarning("Summary: %s",ev.description().latin1() );
16 qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() ); 16 qWarning("Start: %s End: %s",ev.startDateTime().toString().latin1(), ev.endDateTime().toString().latin1() );
17 qWarning("All Day: %d",ev.isAllDay() ); 17 qWarning("All Day: %d Recurrence: %d",ev.isAllDay(), ev.hasRecurrence() );
18 qWarning("UID %d", ev.uid() );
18 19
19 } 20 }
@@ -29,4 +30,5 @@ int main(int argc, char* argv ) {
29 qWarning("Date: %s", ef.date().toString().latin1() ); 30 qWarning("Date: %s", ef.date().toString().latin1() );
30 } 31 }
32 acc.save();
31 33
32 return 0; 34 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 {
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() )
@@ -126,4 +127,5 @@ namespace {
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 ) {
@@ -435,5 +437,4 @@ bool ODateBookAccessBackend_XML::loadFile() {
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 }
@@ -452,6 +453,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
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
@@ -474,6 +477,8 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
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 );
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:
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 */