Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index 77c0253..2ff36e3 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | |||
@@ -28,2 +28,19 @@ | |||
28 | */ | 28 | */ |
29 | |||
30 | /* OPIE */ | ||
31 | #include <opie2/opimnotifymanager.h> | ||
32 | #include <opie2/opimrecurrence.h> | ||
33 | #include <opie2/opimtimezone.h> | ||
34 | #include <opie2/odatebookaccessbackend_xml.h> | ||
35 | #include <opie2/odebug.h> | ||
36 | |||
37 | #include <qtopia/global.h> | ||
38 | #include <qtopia/stringutil.h> | ||
39 | #include <qtopia/timeconversion.h> | ||
40 | |||
41 | /* QT */ | ||
42 | #include <qasciidict.h> | ||
43 | #include <qfile.h> | ||
44 | |||
45 | /* STD */ | ||
29 | #include <errno.h> | 46 | #include <errno.h> |
@@ -40,13 +57,2 @@ | |||
40 | 57 | ||
41 | #include <qasciidict.h> | ||
42 | #include <qfile.h> | ||
43 | |||
44 | #include <qtopia/global.h> | ||
45 | #include <qtopia/stringutil.h> | ||
46 | #include <qtopia/timeconversion.h> | ||
47 | |||
48 | #include <opie2/opimnotifymanager.h> | ||
49 | #include <opie2/opimrecurrence.h> | ||
50 | #include <opie2/opimtimezone.h> | ||
51 | #include <opie2/odatebookaccessbackend_xml.h> | ||
52 | 58 | ||
@@ -118,3 +124,3 @@ namespace { | |||
118 | inline void save( const OPimEvent& ev, QString& buf ) { | 124 | inline void save( const OPimEvent& ev, QString& buf ) { |
119 | qWarning("Saving %d %s", ev.uid(), ev.description().latin1() ); | 125 | owarn << "Saving " << ev.uid() << " " << ev.description() << "" << oendl; |
120 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; | 126 | buf += " description=\"" + Qtopia::escapeString(ev.description() ) + "\""; |
@@ -492,6 +498,6 @@ void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) { | |||
492 | /* to current date time */ | 498 | /* to current date time */ |
493 | // qWarning(" Start is %d", start ); | 499 | // owarn << " Start is " << start << "" << oendl; |
494 | OPimTimeZone zone( ev.timeZone().isEmpty() ? OPimTimeZone::current() : ev.timeZone() ); | 500 | OPimTimeZone zone( ev.timeZone().isEmpty() ? OPimTimeZone::current() : ev.timeZone() ); |
495 | QDateTime date = zone.toDateTime( start ); | 501 | QDateTime date = zone.toDateTime( start ); |
496 | qWarning(" Start is %s", date.toString().latin1() ); | 502 | owarn << " Start is " << date.toString() << "" << oendl; |
497 | ev.setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) ); | 503 | ev.setStartDateTime( zone.toDateTime( date, OPimTimeZone::current() ) ); |
@@ -516,6 +522,6 @@ void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) { | |||
516 | if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { | 522 | if ( m_raw.contains( ev.uid() ) || m_rep.contains( ev.uid() ) ) { |
517 | qWarning("already contains assign uid"); | 523 | owarn << "already contains assign uid" << oendl; |
518 | ev.setUid( 1 ); | 524 | ev.setUid( 1 ); |
519 | } | 525 | } |
520 | qWarning("addind %d %s", ev.uid(), ev.description().latin1() ); | 526 | owarn << "addind " << ev.uid() << " " << ev.description() << "" << oendl; |
521 | if ( ev.hasRecurrence() ) | 527 | if ( ev.hasRecurrence() ) |
@@ -527,3 +533,3 @@ void ODateBookAccessBackend_XML::finalizeRecord( OPimEvent& ev ) { | |||
527 | void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& value) { | 533 | void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& value) { |
528 | // qWarning(" setting %s", value.latin1() ); | 534 | // owarn << " setting " << value << "" << oendl; |
529 | switch( id ) { | 535 | switch( id ) { |
@@ -612,3 +618,3 @@ void ODateBookAccessBackend_XML::setField( OPimEvent& e, int id, const QString& | |||
612 | QDate date( (*it).left(4).toInt(), (*it).mid(4, 2).toInt(), (*it).right(2).toInt() ); | 618 | QDate date( (*it).left(4).toInt(), (*it).mid(4, 2).toInt(), (*it).right(2).toInt() ); |
613 | qWarning("adding exception %s", date.toString().latin1() ); | 619 | owarn << "adding exception " << date.toString() << "" << oendl; |
614 | recur()->exceptions().append( date ); | 620 | recur()->exceptions().append( date ); |