summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp7
-rw-r--r--libopie2/opiepim/ui/opimmainwindow.h2
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
@@ -81,12 +81,13 @@ namespace {
FTimeZone,
FRecParent,
FRecChildren,
FExceptions
};
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() )
buf += " location=\"" + Qtopia::escapeString(ev.location() ) + "\"";
buf += " categories=\""+ Qtopia::escapeString( Qtopia::Record::idsToString( ev.categories() ) ) + "\"";
buf += " uid=\"" + QString::number( ev.uid() ) + "\"";
@@ -122,12 +123,13 @@ namespace {
buf += " timezone=\"";
if ( ev.timeZone().isEmpty() )
buf += "None";
else
buf += ev.timeZone();
+ buf += "\"";
if (ev.parent() != 0 ) {
buf += " recparent=\""+QString::number(ev.parent() )+"\"";
}
if (ev.children().count() != 0 ) {
@@ -431,13 +433,12 @@ bool ODateBookAccessBackend_XML::loadFile() {
else {
setField( ev, *find, value );
}
}
/* time to finalize */
finalizeRecord( ev );
- add( ev );
delete rec;
}
::munmap(map_addr, attribute.st_size );
m_changed = false; // changed during add
return true;
@@ -448,14 +449,16 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
OTimeZone utc = OTimeZone::utc();
ev.setStartDateTime( utc.fromUTCDateTime( start ) );
ev.setEndDateTime ( utc.fromUTCDateTime( end ) );
ev.setTimeZone( "UTC"); // make sure it is really utc
}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() ) );
date = zone.toDateTime( end );
ev.setEndDateTime ( zone.toDateTime( date, OTimeZone::current() ) );
}
if ( rec && rec->doesRecur() ) {
@@ -470,14 +473,16 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) {
if (alarmTime != -1 ) {
QDateTime dt = ev.startDateTime().addSecs( -1*alarmTime*60 );
OPimAlarm al( snd , dt );
ev.notifiers().add( al );
}
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 );
else
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
@@ -43,13 +43,13 @@ protected slots:
/** create a new Records and return the uid */
virtual int create() = 0;
/** remove a record with UID == uid */
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 */
virtual void show( int uid ) = 0;
/** edit the record */
virtual void edit( int uid ) = 0;