author | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
commit | 6c715b67a8f0e32a4edca5be91332622834c8d91 (patch) (side-by-side diff) | |
tree | ae2d660e1fd9c990c2d725c075ce6c42480b0af8 /libopie2/opiepim/backend | |
parent | cb45aa10043fdd6fddcab42ef0e07ddafc3d506d (diff) | |
download | opie-6c715b67a8f0e32a4edca5be91332622834c8d91.zip opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.gz opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.bz2 |
Merging changes from BRANCH_1_0 to HEAD
-rw-r--r-- | libopie2/opiepim/backend/obackendfactory.h | 12 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.h | 12 | ||||
-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, 89 insertions, 10 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 @@ -16,6 +16,14 @@ * ===================================================================== * History: * $Log$ + * Revision 1.7 2003/08/01 12:30:16 eilers + * Merging changes from BRANCH_1_0 to HEAD + * + * Revision 1.6.4.1 2003/06/30 14:34:19 eilers + * Patches from Zecke: + * Fixing and cleaning up extraMap handling + * Adding d_ptr for binary compatibility in the future + * * Revision 1.6 2003/04/13 18:07:10 zecke * More API doc * QString -> const QString& @@ -68,6 +76,8 @@ #include "otodoaccesssql.h" #endif +class OBackendPrivate; + /** * This class is our factory. It will give us the default implementations * of at least Todolist, Contacts and Datebook. In the future this class will @@ -148,6 +158,8 @@ class OBackendFactory } + private: + OBackendPrivate* d; }; 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 @@ -19,6 +19,14 @@ * ===================================================================== * History: * $Log$ + * Revision 1.6 2003/08/01 12:30:16 eilers + * Merging changes from BRANCH_1_0 to HEAD + * + * Revision 1.5.4.1 2003/06/30 14:34:19 eilers + * Patches from Zecke: + * Fixing and cleaning up extraMap handling + * Adding d_ptr for binary compatibility in the future + * * Revision 1.5 2003/04/13 18:07:10 zecke * More API doc * QString -> const QString& @@ -103,5 +111,9 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> { */ virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; + +private: + class Private; + Private *d; }; #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 @@ -17,6 +17,21 @@ * ===================================================================== * History: * $Log$ + * Revision 1.11 2003/08/01 12:30:16 eilers + * Merging changes from BRANCH_1_0 to HEAD + * + * Revision 1.10.4.3 2003/07/23 08:54:37 eilers + * Default email was added to the list of all emails, which already contains + * the default email.. + * This closes bug #1045 + * + * Revision 1.10.4.2 2003/07/23 08:44:45 eilers + * Importing of Notes in vcard files wasn't implemented. + * Closes bug #1044 + * + * Revision 1.10.4.1 2003/06/02 13:37:49 eilers + * Fixing memory leak + * * Revision 1.10 2003/04/13 18:07:10 zecke * More API doc * QString -> const QString& @@ -151,6 +166,7 @@ bool OContactAccessBackend_VCard::save() cleanVObject( vo ); } cleanStrTbl(); + deleteVObject( obj ); m_dirty = false; return true; @@ -446,7 +462,9 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj ) c.setBirthday( convVCardDateToDate( value ) ); } - + else if ( name == VCCommentProp ) { + c.setNotes( value ); + } #if 0 else { printf("Name: %s, value=%s\n", name.data(), vObjectStringZValue( o ) ); @@ -534,7 +552,7 @@ VObject* OContactAccessBackend_VCard::createVObject( const OContact &c ) QStringList emails = c.emailList(); - emails.prepend( c.defaultEmail() ); + // emails.prepend( c.defaultEmail() ); Fix for bugreport #1045 for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it ); safeAddProp( email, VCInternetProp ); 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 @@ -17,6 +17,9 @@ * ===================================================================== * History: * $Log$ + * Revision 1.7 2003/08/01 12:30:16 eilers + * Merging changes from BRANCH_1_0 to HEAD + * * Revision 1.6 2003/07/07 16:19:47 eilers * Fixing serious bug in hasQuerySettings() * 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 @@ -68,6 +68,10 @@ public: */ virtual OEffectiveEvent::ValueList effecticeEvents( const QDateTime& start ); +private: + class Private; + Private *d; + }; #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 @@ -430,9 +430,9 @@ bool ODateBookAccessBackend_XML::loadFile() { */ find = dict[attr.data()]; if (!find) - ev.setCustomField( attr, value ); + ev.setCustomField( attr, str ); else { - setField( ev, *find, value ); + setField( ev, *find, str ); } } /* time to finalize */ @@ -453,7 +453,7 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { ev.setTimeZone( "UTC"); // make sure it is really utc }else { /* to current date time */ - qWarning(" Start is %d", start ); + // 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() ); 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 @@ -7,6 +7,7 @@ #include <opie/opimrecord.h> +class OPimAccessBackendPrivate; /** * OPimAccessBackend is the base class * for all private backends @@ -107,8 +108,7 @@ protected: uint readAhead()const; private: - class Private; - Private* d; + OPimAccessBackendPrivate *d; Frontend* m_front; uint m_read; int m_acc; 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 @@ -19,6 +19,10 @@ public: virtual void removeAllCompleted() = 0; virtual QBitArray supports()const = 0; +private: + class Private; + Private *d; + }; #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 @@ -15,12 +15,20 @@ namespace { // description if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ name = vObjectStringZValue( ob ); +#if 0 event.setDescription( name ); +#else + event.setSummary( name ); +#endif } // summary if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { name = vObjectStringZValue( ob ); +#if 0 event.setSummary( name ); +#else + event.setDescription( name ); +#endif } // completed if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ @@ -74,11 +82,27 @@ namespace { addPropValue( task, VCCategoriesProp, event.idsToString( event.categories() ).local8Bit() ); +#if 0 + + // There seems a misrepresentation between summary in otodoevent + // and summary in vcard. + // The same with description.. + // Description is summary and vice versa.. Argh.. (eilers) + + addPropValue( task, VCDescriptionProp, event.description().local8Bit() ); addPropValue( task, VCSummaryProp, event.summary().local8Bit() ); + +#else + addPropValue( task, VCDescriptionProp, + event.summary().local8Bit() ); + + addPropValue( task, VCSummaryProp, + event.description().local8Bit() ); +#endif return task; }; } @@ -185,7 +209,7 @@ QArray<int> OTodoAccessVCal::allRecords()const { } return ar; } -QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp &r)const { +QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { QArray<int> ar(0); 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 @@ -87,7 +87,7 @@ bool OTodoAccessXML::load() { /* * UPDATE dict if you change anything!!! */ - QAsciiDict<int> dict(21); + QAsciiDict<int> dict(26); dict.setAutoDelete( TRUE ); dict.insert("Categories" , new int(OTodo::Category) ); dict.insert("Uid" , new int(OTodo::Uid) ); @@ -836,10 +836,12 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, return array; }; void OTodoAccessXML::removeAllCompleted() { + QMap<int, OTodo> events = m_events; for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { if ( (*it).isCompleted() ) - m_events.remove( it ); + events.remove( it.key() ); } + m_events = events; } QBitArray OTodoAccessXML::supports()const { static QBitArray ar = sup(); |