-rw-r--r-- | libopie/pim/otodoaccessxml.cpp | 27 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 27 |
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 @@ | |||
16 | #include <qpe/timeconversion.h> | 16 | #include <qpe/timeconversion.h> |
17 | 17 | ||
18 | #include "oconversion.h" | ||
18 | #include "otimezone.h" | 19 | #include "otimezone.h" |
19 | #include "orecur.h" | 20 | #include "orecur.h" |
@@ -99,4 +100,5 @@ bool OTodoAccessXML::load() { | |||
99 | dict.insert("Progress" , new int(OTodo::Progress) ); | 100 | dict.insert("Progress" , new int(OTodo::Progress) ); |
100 | dict.insert("CompletedDate", new int(OTodo::CompletedDate) ); | 101 | dict.insert("CompletedDate", new int(OTodo::CompletedDate) ); |
102 | dict.insert("StartDate", new int(OTodo::StartDate) ); | ||
101 | dict.insert("CrossReference", new int(OTodo::CrossReference) ); | 103 | dict.insert("CrossReference", new int(OTodo::CrossReference) ); |
102 | dict.insert("State", new int(OTodo::State) ); | 104 | dict.insert("State", new int(OTodo::State) ); |
@@ -105,11 +107,11 @@ bool OTodoAccessXML::load() { | |||
105 | dict.insert("Notifiers", new int(OTodo::Notifiers) ); | 107 | dict.insert("Notifiers", new int(OTodo::Notifiers) ); |
106 | dict.insert("Maintainer", new int(OTodo::Maintainer) ); | 108 | dict.insert("Maintainer", new int(OTodo::Maintainer) ); |
107 | dict.insert("rtype", new int(FRType) ); | 109 | dict.insert("rtype", new int(FRType) ); |
108 | dict.insert("rweekdays", new int(FRWeekdays) ); | 110 | dict.insert("rweekdays", new int(FRWeekdays) ); |
109 | dict.insert("rposition", new int(FRPosition) ); | 111 | dict.insert("rposition", new int(FRPosition) ); |
110 | dict.insert("rfreq", new int(FRFreq) ); | 112 | dict.insert("rfreq", new int(FRFreq) ); |
111 | dict.insert("start", new int(FRStart) ); | 113 | dict.insert("start", new int(FRStart) ); |
112 | dict.insert("rhasenddate", new int(FRHasEndDate) ); | 114 | dict.insert("rhasenddate", new int(FRHasEndDate) ); |
113 | dict.insert("enddt", new int(FREndDate) ); | 115 | dict.insert("enddt", new int(FREndDate) ); |
114 | 116 | ||
115 | // here the custom XML parser from TT it's GPL | 117 | // here the custom XML parser from TT it's GPL |
@@ -415,4 +417,10 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, | |||
415 | ev.setProgress( val.toInt() ); | 417 | ev.setProgress( val.toInt() ); |
416 | break; | 418 | break; |
419 | case OTodo::CompletedDate: | ||
420 | ev.setCompletedDate( OConversion::dateFromString( val ) ); | ||
421 | break; | ||
422 | case OTodo::StartDate: | ||
423 | ev.setStartDate( OConversion::dateFromString( val ) ); | ||
424 | break; | ||
417 | case OTodo::CrossReference: | 425 | case OTodo::CrossReference: |
418 | { | 426 | { |
@@ -504,4 +512,9 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { | |||
504 | str += ev.recurrence().toString(); | 512 | str += ev.recurrence().toString(); |
505 | } | 513 | } |
514 | if ( ev.hasStartDate() ) | ||
515 | str += "StartDate=\""+ OConversion::dateToString( ev.startDate() ) +"\" "; | ||
516 | if ( ev.hasCompletedDate() ) | ||
517 | str += "CompletedDate=\""+ OConversion::dateToString( ev.completedDate() ) +"\" "; | ||
518 | |||
506 | 519 | ||
507 | return str; | 520 | 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 @@ | |||
16 | #include <qpe/timeconversion.h> | 16 | #include <qpe/timeconversion.h> |
17 | 17 | ||
18 | #include "oconversion.h" | ||
18 | #include "otimezone.h" | 19 | #include "otimezone.h" |
19 | #include "orecur.h" | 20 | #include "orecur.h" |
@@ -99,4 +100,5 @@ bool OTodoAccessXML::load() { | |||
99 | dict.insert("Progress" , new int(OTodo::Progress) ); | 100 | dict.insert("Progress" , new int(OTodo::Progress) ); |
100 | dict.insert("CompletedDate", new int(OTodo::CompletedDate) ); | 101 | dict.insert("CompletedDate", new int(OTodo::CompletedDate) ); |
102 | dict.insert("StartDate", new int(OTodo::StartDate) ); | ||
101 | dict.insert("CrossReference", new int(OTodo::CrossReference) ); | 103 | dict.insert("CrossReference", new int(OTodo::CrossReference) ); |
102 | dict.insert("State", new int(OTodo::State) ); | 104 | dict.insert("State", new int(OTodo::State) ); |
@@ -105,11 +107,11 @@ bool OTodoAccessXML::load() { | |||
105 | dict.insert("Notifiers", new int(OTodo::Notifiers) ); | 107 | dict.insert("Notifiers", new int(OTodo::Notifiers) ); |
106 | dict.insert("Maintainer", new int(OTodo::Maintainer) ); | 108 | dict.insert("Maintainer", new int(OTodo::Maintainer) ); |
107 | dict.insert("rtype", new int(FRType) ); | 109 | dict.insert("rtype", new int(FRType) ); |
108 | dict.insert("rweekdays", new int(FRWeekdays) ); | 110 | dict.insert("rweekdays", new int(FRWeekdays) ); |
109 | dict.insert("rposition", new int(FRPosition) ); | 111 | dict.insert("rposition", new int(FRPosition) ); |
110 | dict.insert("rfreq", new int(FRFreq) ); | 112 | dict.insert("rfreq", new int(FRFreq) ); |
111 | dict.insert("start", new int(FRStart) ); | 113 | dict.insert("start", new int(FRStart) ); |
112 | dict.insert("rhasenddate", new int(FRHasEndDate) ); | 114 | dict.insert("rhasenddate", new int(FRHasEndDate) ); |
113 | dict.insert("enddt", new int(FREndDate) ); | 115 | dict.insert("enddt", new int(FREndDate) ); |
114 | 116 | ||
115 | // here the custom XML parser from TT it's GPL | 117 | // here the custom XML parser from TT it's GPL |
@@ -415,4 +417,10 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, | |||
415 | ev.setProgress( val.toInt() ); | 417 | ev.setProgress( val.toInt() ); |
416 | break; | 418 | break; |
419 | case OTodo::CompletedDate: | ||
420 | ev.setCompletedDate( OConversion::dateFromString( val ) ); | ||
421 | break; | ||
422 | case OTodo::StartDate: | ||
423 | ev.setStartDate( OConversion::dateFromString( val ) ); | ||
424 | break; | ||
417 | case OTodo::CrossReference: | 425 | case OTodo::CrossReference: |
418 | { | 426 | { |
@@ -504,4 +512,9 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { | |||
504 | str += ev.recurrence().toString(); | 512 | str += ev.recurrence().toString(); |
505 | } | 513 | } |
514 | if ( ev.hasStartDate() ) | ||
515 | str += "StartDate=\""+ OConversion::dateToString( ev.startDate() ) +"\" "; | ||
516 | if ( ev.hasCompletedDate() ) | ||
517 | str += "CompletedDate=\""+ OConversion::dateToString( ev.completedDate() ) +"\" "; | ||
518 | |||
506 | 519 | ||
507 | return str; | 520 | return str; |