-rw-r--r-- | libopie2/opiepim/backend/obackendfactory.h | 12 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.h | 14 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | 22 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiepim/backend/opimaccessbackend.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessbackend.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessvcal.cpp | 26 | ||||
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 6 |
10 files changed, 90 insertions, 11 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h index ad6cf5a..f3c339d 100644 --- a/libopie2/opiepim/backend/obackendfactory.h +++ b/libopie2/opiepim/backend/obackendfactory.h | |||
@@ -13,12 +13,20 @@ | |||
13 | * ToDo: Use plugins | 13 | * ToDo: Use plugins |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * Version: $Id$ | 15 | * Version: $Id$ |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.7 2003/08/01 12:30:16 eilers | ||
20 | * Merging changes from BRANCH_1_0 to HEAD | ||
21 | * | ||
22 | * Revision 1.6.4.1 2003/06/30 14:34:19 eilers | ||
23 | * Patches from Zecke: | ||
24 | * Fixing and cleaning up extraMap handling | ||
25 | * Adding d_ptr for binary compatibility in the future | ||
26 | * | ||
19 | * Revision 1.6 2003/04/13 18:07:10 zecke | 27 | * Revision 1.6 2003/04/13 18:07:10 zecke |
20 | * More API doc | 28 | * More API doc |
21 | * QString -> const QString& | 29 | * QString -> const QString& |
22 | * QString = 0l -> QString::null | 30 | * QString = 0l -> QString::null |
23 | * | 31 | * |
24 | * Revision 1.5 2003/02/21 23:31:52 zecke | 32 | * Revision 1.5 2003/02/21 23:31:52 zecke |
@@ -65,12 +73,14 @@ | |||
65 | #include "odatebookaccessbackend_xml.h" | 73 | #include "odatebookaccessbackend_xml.h" |
66 | 74 | ||
67 | #ifdef __USE_SQL | 75 | #ifdef __USE_SQL |
68 | #include "otodoaccesssql.h" | 76 | #include "otodoaccesssql.h" |
69 | #endif | 77 | #endif |
70 | 78 | ||
79 | class OBackendPrivate; | ||
80 | |||
71 | /** | 81 | /** |
72 | * This class is our factory. It will give us the default implementations | 82 | * This class is our factory. It will give us the default implementations |
73 | * of at least Todolist, Contacts and Datebook. In the future this class will | 83 | * of at least Todolist, Contacts and Datebook. In the future this class will |
74 | * allow users to switch the backend with ( XML->SQLite ) without the need | 84 | * allow users to switch the backend with ( XML->SQLite ) without the need |
75 | * to recompile.# | 85 | * to recompile.# |
76 | * This class as the whole PIM Api is making use of templates | 86 | * This class as the whole PIM Api is making use of templates |
@@ -145,10 +155,12 @@ class OBackendFactory | |||
145 | default: | 155 | default: |
146 | return NULL; | 156 | return NULL; |
147 | } | 157 | } |
148 | 158 | ||
149 | 159 | ||
150 | } | 160 | } |
161 | private: | ||
162 | OBackendPrivate* d; | ||
151 | }; | 163 | }; |
152 | 164 | ||
153 | 165 | ||
154 | #endif | 166 | #endif |
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h index ebeb42d..280e05c 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend.h | |||
@@ -16,12 +16,20 @@ | |||
16 | * ToDo: Define enum for query settings | 16 | * ToDo: Define enum for query settings |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * Version: $Id$ | 18 | * Version: $Id$ |
19 | * ===================================================================== | 19 | * ===================================================================== |
20 | * History: | 20 | * History: |
21 | * $Log$ | 21 | * $Log$ |
22 | * Revision 1.6 2003/08/01 12:30:16 eilers | ||
23 | * Merging changes from BRANCH_1_0 to HEAD | ||
24 | * | ||
25 | * Revision 1.5.4.1 2003/06/30 14:34:19 eilers | ||
26 | * Patches from Zecke: | ||
27 | * Fixing and cleaning up extraMap handling | ||
28 | * Adding d_ptr for binary compatibility in the future | ||
29 | * | ||
22 | * Revision 1.5 2003/04/13 18:07:10 zecke | 30 | * Revision 1.5 2003/04/13 18:07:10 zecke |
23 | * More API doc | 31 | * More API doc |
24 | * QString -> const QString& | 32 | * QString -> const QString& |
25 | * QString = 0l -> QString::null | 33 | * QString = 0l -> QString::null |
26 | * | 34 | * |
27 | * Revision 1.4 2002/11/13 14:14:51 eilers | 35 | * Revision 1.4 2002/11/13 14:14:51 eilers |
@@ -99,9 +107,13 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> { | |||
99 | 107 | ||
100 | /** | 108 | /** |
101 | * FIXME!!! | 109 | * FIXME!!! |
102 | * Returns a sorted list of records either ascendinf or descending for a giving criteria and category | 110 | * Returns a sorted list of records either ascendinf or descending for a giving criteria and category |
103 | */ | 111 | */ |
104 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; | 112 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; |
105 | 113 | ||
114 | |||
115 | private: | ||
116 | class Private; | ||
117 | Private *d; | ||
106 | }; | 118 | }; |
107 | #endif | 119 | #endif |
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index 270bef3..b60c5be 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | |||
@@ -14,12 +14,27 @@ | |||
14 | * | 14 | * |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * Version: $Id$ | 16 | * Version: $Id$ |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.11 2003/08/01 12:30:16 eilers | ||
21 | * Merging changes from BRANCH_1_0 to HEAD | ||
22 | * | ||
23 | * Revision 1.10.4.3 2003/07/23 08:54:37 eilers | ||
24 | * Default email was added to the list of all emails, which already contains | ||
25 | * the default email.. | ||
26 | * This closes bug #1045 | ||
27 | * | ||
28 | * Revision 1.10.4.2 2003/07/23 08:44:45 eilers | ||
29 | * Importing of Notes in vcard files wasn't implemented. | ||
30 | * Closes bug #1044 | ||
31 | * | ||
32 | * Revision 1.10.4.1 2003/06/02 13:37:49 eilers | ||
33 | * Fixing memory leak | ||
34 | * | ||
20 | * Revision 1.10 2003/04/13 18:07:10 zecke | 35 | * Revision 1.10 2003/04/13 18:07:10 zecke |
21 | * More API doc | 36 | * More API doc |
22 | * QString -> const QString& | 37 | * QString -> const QString& |
23 | * QString = 0l -> QString::null | 38 | * QString = 0l -> QString::null |
24 | * | 39 | * |
25 | * Revision 1.9 2003/03/21 10:33:09 eilers | 40 | * Revision 1.9 2003/03/21 10:33:09 eilers |
@@ -148,12 +163,13 @@ bool OContactAccessBackend_VCard::save() | |||
148 | for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ | 163 | for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ |
149 | vo = createVObject( *it ); | 164 | vo = createVObject( *it ); |
150 | writeVObject( file.directHandle() , vo ); | 165 | writeVObject( file.directHandle() , vo ); |
151 | cleanVObject( vo ); | 166 | cleanVObject( vo ); |
152 | } | 167 | } |
153 | cleanStrTbl(); | 168 | cleanStrTbl(); |
169 | deleteVObject( obj ); | ||
154 | 170 | ||
155 | m_dirty = false; | 171 | m_dirty = false; |
156 | return true; | 172 | return true; |
157 | 173 | ||
158 | 174 | ||
159 | } | 175 | } |
@@ -443,13 +459,15 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj ) | |||
443 | } | 459 | } |
444 | else if ( name == VCBirthDateProp ) { | 460 | else if ( name == VCBirthDateProp ) { |
445 | // Reading Birthdate regarding RFC 2425 (5.8.4) | 461 | // Reading Birthdate regarding RFC 2425 (5.8.4) |
446 | c.setBirthday( convVCardDateToDate( value ) ); | 462 | c.setBirthday( convVCardDateToDate( value ) ); |
447 | 463 | ||
448 | } | 464 | } |
449 | 465 | else if ( name == VCCommentProp ) { | |
466 | c.setNotes( value ); | ||
467 | } | ||
450 | #if 0 | 468 | #if 0 |
451 | else { | 469 | else { |
452 | printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) ); | 470 | printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) ); |
453 | VObjectIterator nit; | 471 | VObjectIterator nit; |
454 | initPropIterator( &nit, o ); | 472 | initPropIterator( &nit, o ); |
455 | while( moreIteration( &nit ) ) { | 473 | while( moreIteration( &nit ) ) { |
@@ -531,13 +549,13 @@ VObject* OContactAccessBackend_VCard::createVObject( const OContact &c ) | |||
531 | 549 | ||
532 | VObject *title = safeAddPropValue( vcard, VCTitleProp, c.jobTitle() ); | 550 | VObject *title = safeAddPropValue( vcard, VCTitleProp, c.jobTitle() ); |
533 | safeAddProp( title, VCWorkProp ); | 551 | safeAddProp( title, VCWorkProp ); |
534 | 552 | ||
535 | 553 | ||
536 | QStringList emails = c.emailList(); | 554 | QStringList emails = c.emailList(); |
537 | emails.prepend( c.defaultEmail() ); | 555 | // emails.prepend( c.defaultEmail() ); Fix for bugreport #1045 |
538 | for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { | 556 | for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { |
539 | VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it ); | 557 | VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it ); |
540 | safeAddProp( email, VCInternetProp ); | 558 | safeAddProp( email, VCInternetProp ); |
541 | } | 559 | } |
542 | 560 | ||
543 | safeAddPropValue( vcard, VCNoteProp, c.notes() ); | 561 | safeAddPropValue( vcard, VCNoteProp, c.notes() ); |
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 097142b..1c21619 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | |||
@@ -14,12 +14,15 @@ | |||
14 | * | 14 | * |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * Version: $Id$ | 16 | * Version: $Id$ |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.7 2003/08/01 12:30:16 eilers | ||
21 | * Merging changes from BRANCH_1_0 to HEAD | ||
22 | * | ||
20 | * Revision 1.6 2003/07/07 16:19:47 eilers | 23 | * Revision 1.6 2003/07/07 16:19:47 eilers |
21 | * Fixing serious bug in hasQuerySettings() | 24 | * Fixing serious bug in hasQuerySettings() |
22 | * | 25 | * |
23 | * Revision 1.5 2003/04/13 18:07:10 zecke | 26 | * Revision 1.5 2003/04/13 18:07:10 zecke |
24 | * More API doc | 27 | * More API doc |
25 | * QString -> const QString& | 28 | * QString -> const QString& |
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.h b/libopie2/opiepim/backend/odatebookaccessbackend.h index 86ff298..3c02c42 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend.h +++ b/libopie2/opiepim/backend/odatebookaccessbackend.h | |||
@@ -65,9 +65,13 @@ public: | |||
65 | /** | 65 | /** |
66 | * this is an overloaded member function | 66 | * this is an overloaded member function |
67 | * @see effecticeEvents | 67 | * @see effecticeEvents |
68 | */ | 68 | */ |
69 | virtual OEffectiveEvent::ValueList effecticeEvents( const QDateTime& start ); | 69 | virtual OEffectiveEvent::ValueList effecticeEvents( const QDateTime& start ); |
70 | 70 | ||
71 | private: | ||
72 | class Private; | ||
73 | Private *d; | ||
74 | |||
71 | }; | 75 | }; |
72 | 76 | ||
73 | #endif | 77 | #endif |
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index ab2eea4..5ea945c 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | |||
@@ -427,15 +427,15 @@ bool ODateBookAccessBackend_XML::loadFile() { | |||
427 | 427 | ||
428 | /* | 428 | /* |
429 | * add key + value | 429 | * add key + value |
430 | */ | 430 | */ |
431 | find = dict[attr.data()]; | 431 | find = dict[attr.data()]; |
432 | if (!find) | 432 | if (!find) |
433 | ev.setCustomField( attr, value ); | 433 | ev.setCustomField( attr, str ); |
434 | else { | 434 | else { |
435 | setField( ev, *find, value ); | 435 | setField( ev, *find, str ); |
436 | } | 436 | } |
437 | } | 437 | } |
438 | /* time to finalize */ | 438 | /* time to finalize */ |
439 | finalizeRecord( ev ); | 439 | finalizeRecord( ev ); |
440 | delete rec; | 440 | delete rec; |
441 | } | 441 | } |
@@ -450,13 +450,13 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { | |||
450 | OTimeZone utc = OTimeZone::utc(); | 450 | OTimeZone utc = OTimeZone::utc(); |
451 | ev.setStartDateTime( utc.fromUTCDateTime( start ) ); | 451 | ev.setStartDateTime( utc.fromUTCDateTime( start ) ); |
452 | ev.setEndDateTime ( utc.fromUTCDateTime( end ) ); | 452 | ev.setEndDateTime ( utc.fromUTCDateTime( end ) ); |
453 | ev.setTimeZone( "UTC"); // make sure it is really utc | 453 | ev.setTimeZone( "UTC"); // make sure it is really utc |
454 | }else { | 454 | }else { |
455 | /* to current date time */ | 455 | /* to current date time */ |
456 | qWarning(" Start is %d", start ); | 456 | // qWarning(" Start is %d", start ); |
457 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); | 457 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); |
458 | QDateTime date = zone.toDateTime( start ); | 458 | QDateTime date = zone.toDateTime( start ); |
459 | qWarning(" Start is %s", date.toString().latin1() ); | 459 | qWarning(" Start is %s", date.toString().latin1() ); |
460 | ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); | 460 | ev.setStartDateTime( zone.toDateTime( date, OTimeZone::current() ) ); |
461 | 461 | ||
462 | date = zone.toDateTime( end ); | 462 | date = zone.toDateTime( end ); |
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index f4bbe35..c3d91f7 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h | |||
@@ -4,12 +4,13 @@ | |||
4 | #include <qarray.h> | 4 | #include <qarray.h> |
5 | 5 | ||
6 | #include <opie/otemplatebase.h> | 6 | #include <opie/otemplatebase.h> |
7 | #include <opie/opimrecord.h> | 7 | #include <opie/opimrecord.h> |
8 | 8 | ||
9 | 9 | ||
10 | class OPimAccessBackendPrivate; | ||
10 | /** | 11 | /** |
11 | * OPimAccessBackend is the base class | 12 | * OPimAccessBackend is the base class |
12 | * for all private backends | 13 | * for all private backends |
13 | * it operates on OPimRecord as the base class | 14 | * it operates on OPimRecord as the base class |
14 | * and it's responsible for fast manipulating | 15 | * and it's responsible for fast manipulating |
15 | * the resource the implementation takes care | 16 | * the resource the implementation takes care |
@@ -104,14 +105,13 @@ protected: | |||
104 | */ | 105 | */ |
105 | void setSaneCacheSize( int ); | 106 | void setSaneCacheSize( int ); |
106 | 107 | ||
107 | uint readAhead()const; | 108 | uint readAhead()const; |
108 | 109 | ||
109 | private: | 110 | private: |
110 | class Private; | 111 | OPimAccessBackendPrivate *d; |
111 | Private* d; | ||
112 | Frontend* m_front; | 112 | Frontend* m_front; |
113 | uint m_read; | 113 | uint m_read; |
114 | int m_acc; | 114 | int m_acc; |
115 | 115 | ||
116 | }; | 116 | }; |
117 | 117 | ||
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.h b/libopie2/opiepim/backend/otodoaccessbackend.h index 05e8ca9..6be95bc 100644 --- a/libopie2/opiepim/backend/otodoaccessbackend.h +++ b/libopie2/opiepim/backend/otodoaccessbackend.h | |||
@@ -15,10 +15,14 @@ public: | |||
15 | bool includeNoDates ) = 0; | 15 | bool includeNoDates ) = 0; |
16 | virtual QArray<int> overDue() = 0; | 16 | virtual QArray<int> overDue() = 0; |
17 | virtual QArray<int> sorted( bool asc, int sortOrder, int sortFilter, | 17 | virtual QArray<int> sorted( bool asc, int sortOrder, int sortFilter, |
18 | int cat ) = 0; | 18 | int cat ) = 0; |
19 | virtual void removeAllCompleted() = 0; | 19 | virtual void removeAllCompleted() = 0; |
20 | virtual QBitArray supports()const = 0; | 20 | virtual QBitArray supports()const = 0; |
21 | |||
22 | private: | ||
23 | class Private; | ||
24 | Private *d; | ||
21 | 25 | ||
22 | }; | 26 | }; |
23 | 27 | ||
24 | #endif | 28 | #endif |
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp index 3577e14..6415952 100644 --- a/libopie2/opiepim/backend/otodoaccessvcal.cpp +++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp | |||
@@ -12,18 +12,26 @@ namespace { | |||
12 | VObject *ob; | 12 | VObject *ob; |
13 | QCString name; | 13 | QCString name; |
14 | // no uid, attendees, ... and no fun | 14 | // no uid, attendees, ... and no fun |
15 | // description | 15 | // description |
16 | if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ | 16 | if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ |
17 | name = vObjectStringZValue( ob ); | 17 | name = vObjectStringZValue( ob ); |
18 | #if 0 | ||
18 | event.setDescription( name ); | 19 | event.setDescription( name ); |
20 | #else | ||
21 | event.setSummary( name ); | ||
22 | #endif | ||
19 | } | 23 | } |
20 | // summary | 24 | // summary |
21 | if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { | 25 | if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { |
22 | name = vObjectStringZValue( ob ); | 26 | name = vObjectStringZValue( ob ); |
27 | #if 0 | ||
23 | event.setSummary( name ); | 28 | event.setSummary( name ); |
29 | #else | ||
30 | event.setDescription( name ); | ||
31 | #endif | ||
24 | } | 32 | } |
25 | // completed | 33 | // completed |
26 | if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ | 34 | if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ |
27 | name = vObjectStringZValue( ob ); | 35 | name = vObjectStringZValue( ob ); |
28 | if( name == "COMPLETED" ){ | 36 | if( name == "COMPLETED" ){ |
29 | event.setCompleted( true ); | 37 | event.setCompleted( true ); |
@@ -71,17 +79,33 @@ namespace { | |||
71 | QString string = QString::number(event.priority() ); | 79 | QString string = QString::number(event.priority() ); |
72 | addPropValue( task, VCPriorityProp, string.local8Bit() ); | 80 | addPropValue( task, VCPriorityProp, string.local8Bit() ); |
73 | 81 | ||
74 | addPropValue( task, VCCategoriesProp, | 82 | addPropValue( task, VCCategoriesProp, |
75 | event.idsToString( event.categories() ).local8Bit() ); | 83 | event.idsToString( event.categories() ).local8Bit() ); |
76 | 84 | ||
85 | #if 0 | ||
86 | |||
87 | // There seems a misrepresentation between summary in otodoevent | ||
88 | // and summary in vcard. | ||
89 | // The same with description.. | ||
90 | // Description is summary and vice versa.. Argh.. (eilers) | ||
91 | |||
92 | |||
77 | addPropValue( task, VCDescriptionProp, | 93 | addPropValue( task, VCDescriptionProp, |
78 | event.description().local8Bit() ); | 94 | event.description().local8Bit() ); |
79 | 95 | ||
80 | addPropValue( task, VCSummaryProp, | 96 | addPropValue( task, VCSummaryProp, |
81 | event.summary().local8Bit() ); | 97 | event.summary().local8Bit() ); |
98 | |||
99 | #else | ||
100 | addPropValue( task, VCDescriptionProp, | ||
101 | event.summary().local8Bit() ); | ||
102 | |||
103 | addPropValue( task, VCSummaryProp, | ||
104 | event.description().local8Bit() ); | ||
105 | #endif | ||
82 | return task; | 106 | return task; |
83 | }; | 107 | }; |
84 | } | 108 | } |
85 | 109 | ||
86 | OTodoAccessVCal::OTodoAccessVCal( const QString& path ) | 110 | OTodoAccessVCal::OTodoAccessVCal( const QString& path ) |
87 | : m_dirty(false), m_file( path ) | 111 | : m_dirty(false), m_file( path ) |
@@ -182,13 +206,13 @@ QArray<int> OTodoAccessVCal::allRecords()const { | |||
182 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { | 206 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { |
183 | ar[i] = it.key(); | 207 | ar[i] = it.key(); |
184 | i++; | 208 | i++; |
185 | } | 209 | } |
186 | return ar; | 210 | return ar; |
187 | } | 211 | } |
188 | QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp &r)const { | 212 | QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { |
189 | QArray<int> ar(0); | 213 | QArray<int> ar(0); |
190 | return ar; | 214 | return ar; |
191 | } | 215 | } |
192 | QArray<int> OTodoAccessVCal::queryByExample( const OTodo&, int, const QDateTime& ) { | 216 | QArray<int> OTodoAccessVCal::queryByExample( const OTodo&, int, const QDateTime& ) { |
193 | QArray<int> ar(0); | 217 | QArray<int> ar(0); |
194 | return ar; | 218 | return ar; |
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 3d15354..f688735 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -84,13 +84,13 @@ bool OTodoAccessXML::load() { | |||
84 | m_opened = true; | 84 | m_opened = true; |
85 | m_changed = false; | 85 | m_changed = false; |
86 | /* initialize dict */ | 86 | /* initialize dict */ |
87 | /* | 87 | /* |
88 | * UPDATE dict if you change anything!!! | 88 | * UPDATE dict if you change anything!!! |
89 | */ | 89 | */ |
90 | QAsciiDict<int> dict(21); | 90 | QAsciiDict<int> dict(26); |
91 | dict.setAutoDelete( TRUE ); | 91 | dict.setAutoDelete( TRUE ); |
92 | dict.insert("Categories" , new int(OTodo::Category) ); | 92 | dict.insert("Categories" , new int(OTodo::Category) ); |
93 | dict.insert("Uid" , new int(OTodo::Uid) ); | 93 | dict.insert("Uid" , new int(OTodo::Uid) ); |
94 | dict.insert("HasDate" , new int(OTodo::HasDate) ); | 94 | dict.insert("HasDate" , new int(OTodo::HasDate) ); |
95 | dict.insert("Completed" , new int(OTodo::Completed) ); | 95 | dict.insert("Completed" , new int(OTodo::Completed) ); |
96 | dict.insert("Description" , new int(OTodo::Description) ); | 96 | dict.insert("Description" , new int(OTodo::Description) ); |
@@ -833,16 +833,18 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, | |||
833 | for (uint i= 0; i < vector.count(); i++ ) { | 833 | for (uint i= 0; i < vector.count(); i++ ) { |
834 | array[i] = ( vector.at(i) )->todo.uid(); | 834 | array[i] = ( vector.at(i) )->todo.uid(); |
835 | } | 835 | } |
836 | return array; | 836 | return array; |
837 | }; | 837 | }; |
838 | void OTodoAccessXML::removeAllCompleted() { | 838 | void OTodoAccessXML::removeAllCompleted() { |
839 | QMap<int, OTodo> events = m_events; | ||
839 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { | 840 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { |
840 | if ( (*it).isCompleted() ) | 841 | if ( (*it).isCompleted() ) |
841 | m_events.remove( it ); | 842 | events.remove( it.key() ); |
842 | } | 843 | } |
844 | m_events = events; | ||
843 | } | 845 | } |
844 | QBitArray OTodoAccessXML::supports()const { | 846 | QBitArray OTodoAccessXML::supports()const { |
845 | static QBitArray ar = sup(); | 847 | static QBitArray ar = sup(); |
846 | return ar; | 848 | return ar; |
847 | } | 849 | } |
848 | QBitArray OTodoAccessXML::sup() { | 850 | QBitArray OTodoAccessXML::sup() { |