summaryrefslogtreecommitdiff
authorzecke <zecke>2003-05-07 18:02:46 (UTC)
committer zecke <zecke>2003-05-07 18:02:46 (UTC)
commit94371938792c70a40cdb75e37c69020438d450c9 (patch) (side-by-side diff)
tree10b97f156e1b4eee2ec1706e315a87a16b0af3b9
parentc13ada0f5e418b25b177e132ff2e1dfe7821577f (diff)
downloadopie-94371938792c70a40cdb75e37c69020438d450c9.zip
opie-94371938792c70a40cdb75e37c69020438d450c9.tar.gz
opie-94371938792c70a40cdb75e37c69020438d450c9.tar.bz2
save and restore CompletedDate and StartDate
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodoaccessxml.cpp27
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp27
2 files changed, 40 insertions, 14 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp
index 71b6a7e..a8e1503 100644
--- a/libopie/pim/otodoaccessxml.cpp
+++ b/libopie/pim/otodoaccessxml.cpp
@@ -16,4 +16,5 @@
#include <qpe/timeconversion.h>
+#include "oconversion.h"
#include "otimezone.h"
#include "orecur.h"
@@ -99,4 +100,5 @@ bool OTodoAccessXML::load() {
dict.insert("Progress" , new int(OTodo::Progress) );
dict.insert("CompletedDate", new int(OTodo::CompletedDate) );
+ dict.insert("StartDate", new int(OTodo::StartDate) );
dict.insert("CrossReference", new int(OTodo::CrossReference) );
dict.insert("State", new int(OTodo::State) );
@@ -105,11 +107,11 @@ bool OTodoAccessXML::load() {
dict.insert("Notifiers", new int(OTodo::Notifiers) );
dict.insert("Maintainer", new int(OTodo::Maintainer) );
- dict.insert("rtype", new int(FRType) );
- dict.insert("rweekdays", new int(FRWeekdays) );
- dict.insert("rposition", new int(FRPosition) );
- dict.insert("rfreq", new int(FRFreq) );
- dict.insert("start", new int(FRStart) );
- dict.insert("rhasenddate", new int(FRHasEndDate) );
- dict.insert("enddt", new int(FREndDate) );
+ dict.insert("rtype", new int(FRType) );
+ dict.insert("rweekdays", new int(FRWeekdays) );
+ dict.insert("rposition", new int(FRPosition) );
+ dict.insert("rfreq", new int(FRFreq) );
+ dict.insert("start", new int(FRStart) );
+ dict.insert("rhasenddate", new int(FRHasEndDate) );
+ dict.insert("enddt", new int(FREndDate) );
// here the custom XML parser from TT it's GPL
@@ -415,4 +417,10 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
ev.setProgress( val.toInt() );
break;
+ case OTodo::CompletedDate:
+ ev.setCompletedDate( OConversion::dateFromString( val ) );
+ break;
+ case OTodo::StartDate:
+ ev.setStartDate( OConversion::dateFromString( val ) );
+ break;
case OTodo::CrossReference:
{
@@ -504,4 +512,9 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
str += ev.recurrence().toString();
}
+ if ( ev.hasStartDate() )
+ str += "StartDate=\""+ OConversion::dateToString( ev.startDate() ) +"\" ";
+ if ( ev.hasCompletedDate() )
+ str += "CompletedDate=\""+ OConversion::dateToString( ev.completedDate() ) +"\" ";
+
return str;
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index 71b6a7e..a8e1503 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -16,4 +16,5 @@
#include <qpe/timeconversion.h>
+#include "oconversion.h"
#include "otimezone.h"
#include "orecur.h"
@@ -99,4 +100,5 @@ bool OTodoAccessXML::load() {
dict.insert("Progress" , new int(OTodo::Progress) );
dict.insert("CompletedDate", new int(OTodo::CompletedDate) );
+ dict.insert("StartDate", new int(OTodo::StartDate) );
dict.insert("CrossReference", new int(OTodo::CrossReference) );
dict.insert("State", new int(OTodo::State) );
@@ -105,11 +107,11 @@ bool OTodoAccessXML::load() {
dict.insert("Notifiers", new int(OTodo::Notifiers) );
dict.insert("Maintainer", new int(OTodo::Maintainer) );
- dict.insert("rtype", new int(FRType) );
- dict.insert("rweekdays", new int(FRWeekdays) );
- dict.insert("rposition", new int(FRPosition) );
- dict.insert("rfreq", new int(FRFreq) );
- dict.insert("start", new int(FRStart) );
- dict.insert("rhasenddate", new int(FRHasEndDate) );
- dict.insert("enddt", new int(FREndDate) );
+ dict.insert("rtype", new int(FRType) );
+ dict.insert("rweekdays", new int(FRWeekdays) );
+ dict.insert("rposition", new int(FRPosition) );
+ dict.insert("rfreq", new int(FRFreq) );
+ dict.insert("start", new int(FRStart) );
+ dict.insert("rhasenddate", new int(FRHasEndDate) );
+ dict.insert("enddt", new int(FREndDate) );
// here the custom XML parser from TT it's GPL
@@ -415,4 +417,10 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
ev.setProgress( val.toInt() );
break;
+ case OTodo::CompletedDate:
+ ev.setCompletedDate( OConversion::dateFromString( val ) );
+ break;
+ case OTodo::StartDate:
+ ev.setStartDate( OConversion::dateFromString( val ) );
+ break;
case OTodo::CrossReference:
{
@@ -504,4 +512,9 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
str += ev.recurrence().toString();
}
+ if ( ev.hasStartDate() )
+ str += "StartDate=\""+ OConversion::dateToString( ev.startDate() ) +"\" ";
+ if ( ev.hasCompletedDate() )
+ str += "CompletedDate=\""+ OConversion::dateToString( ev.completedDate() ) +"\" ";
+
return str;