-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 23 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.h | 8 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiepim/oevent.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiepim/oevent.h | 1 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 3 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.h | 1 |
8 files changed, 37 insertions, 16 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 2b62f0d..3d15354 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -497,9 +497,31 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev, | |||
497 | break; | 497 | break; |
498 | } | 498 | } |
499 | default: | 499 | default: |
500 | ev.setCustomField( attr, val ); | ||
500 | break; | 501 | break; |
501 | } | 502 | } |
502 | } | 503 | } |
504 | |||
505 | // from PalmtopRecord... GPL ### FIXME | ||
506 | namespace { | ||
507 | QString customToXml(const QMap<QString, QString>& customMap ) | ||
508 | { | ||
509 | //qWarning(QString("writing custom %1").arg(customMap.count())); | ||
510 | QString buf(" "); | ||
511 | for ( QMap<QString, QString>::ConstIterator cit = customMap.begin(); | ||
512 | cit != customMap.end(); ++cit) { | ||
513 | // qWarning(".ITEM."); | ||
514 | buf += cit.key(); | ||
515 | buf += "=\""; | ||
516 | buf += Qtopia::escapeString(cit.data()); | ||
517 | buf += "\" "; | ||
518 | } | ||
519 | return buf; | ||
520 | } | ||
521 | |||
522 | |||
523 | } | ||
524 | |||
503 | QString OTodoAccessXML::toString( const OTodo& ev )const { | 525 | QString OTodoAccessXML::toString( const OTodo& ev )const { |
504 | QString str; | 526 | QString str; |
505 | 527 | ||
@@ -581,6 +603,7 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { | |||
581 | str += "Reminders=\""+ records.join(";") +"\" "; | 603 | str += "Reminders=\""+ records.join(";") +"\" "; |
582 | } | 604 | } |
583 | } | 605 | } |
606 | str += customToXml( ev.toExtraMap() ); | ||
584 | 607 | ||
585 | 608 | ||
586 | return str; | 609 | return str; |
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index 0c9734d..2365748 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp | |||
@@ -174,3 +174,9 @@ void OPimRecord::setLastHitField( int lastHit )const { | |||
174 | int OPimRecord::lastHitField()const{ | 174 | int OPimRecord::lastHitField()const{ |
175 | return m_lastHit; | 175 | return m_lastHit; |
176 | } | 176 | } |
177 | QMap<QString, QString> OPimRecord::toExtraMap()const { | ||
178 | return customMap; | ||
179 | } | ||
180 | void OPimRecord::setExtraMap( const QMap<QString, QString>& map) { | ||
181 | customMap = map; | ||
182 | } | ||
diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h index 494c78e..563b19c 100644 --- a/libopie2/opiepim/core/opimrecord.h +++ b/libopie2/opiepim/core/opimrecord.h | |||
@@ -6,7 +6,12 @@ | |||
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | #include <qstringlist.h> | 7 | #include <qstringlist.h> |
8 | 8 | ||
9 | /* | ||
10 | * we need to get customMap which is private... | ||
11 | */ | ||
12 | #define private protected | ||
9 | #include <qpe/palmtoprecord.h> | 13 | #include <qpe/palmtoprecord.h> |
14 | #undef private | ||
10 | 15 | ||
11 | #include <opie/opimxrefmanager.h> | 16 | #include <opie/opimxrefmanager.h> |
12 | 17 | ||
@@ -94,7 +99,8 @@ public: | |||
94 | /** | 99 | /** |
95 | * key value representation of extra items | 100 | * key value representation of extra items |
96 | */ | 101 | */ |
97 | virtual QMap<QString, QString> toExtraMap()const = 0; | 102 | QMap<QString, QString> toExtraMap()const; |
103 | void setExtraMap( const QMap<QString, QString>& ); | ||
98 | 104 | ||
99 | /** | 105 | /** |
100 | * the name for a recordField | 106 | * the name for a recordField |
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index a2fb68c..be4ce0a 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -982,13 +982,7 @@ QString OContact::type() const | |||
982 | return QString::fromLatin1( "OContact" ); | 982 | return QString::fromLatin1( "OContact" ); |
983 | } | 983 | } |
984 | 984 | ||
985 | // Definition is missing ! (se) | 985 | |
986 | QMap<QString,QString> OContact::toExtraMap() const | ||
987 | { | ||
988 | qWarning ("Function not implemented: OContact::toExtraMap()"); | ||
989 | QMap <QString,QString> useless; | ||
990 | return useless; | ||
991 | } | ||
992 | 986 | ||
993 | class QString OContact::recordField( int pos ) const | 987 | class QString OContact::recordField( int pos ) const |
994 | { | 988 | { |
diff --git a/libopie2/opiepim/oevent.cpp b/libopie2/opiepim/oevent.cpp index e4f5d92..7bcf944 100644 --- a/libopie2/opiepim/oevent.cpp +++ b/libopie2/opiepim/oevent.cpp | |||
@@ -360,9 +360,6 @@ void OEvent::deref() { | |||
360 | QMap<int, QString> OEvent::toMap()const { | 360 | QMap<int, QString> OEvent::toMap()const { |
361 | return QMap<int, QString>(); | 361 | return QMap<int, QString>(); |
362 | } | 362 | } |
363 | QMap<QString, QString> OEvent::toExtraMap()const { | ||
364 | return QMap<QString, QString>(); | ||
365 | } | ||
366 | int OEvent::parent()const { | 363 | int OEvent::parent()const { |
367 | return data->parent; | 364 | return data->parent; |
368 | } | 365 | } |
diff --git a/libopie2/opiepim/oevent.h b/libopie2/opiepim/oevent.h index b696d81..30f442e 100644 --- a/libopie2/opiepim/oevent.h +++ b/libopie2/opiepim/oevent.h | |||
@@ -132,7 +132,6 @@ public: | |||
132 | QString type()const; | 132 | QString type()const; |
133 | 133 | ||
134 | QMap<int, QString> toMap()const; | 134 | QMap<int, QString> toMap()const; |
135 | QMap<QString, QString> toExtraMap()const; | ||
136 | QString recordField(int )const; | 135 | QString recordField(int )const; |
137 | 136 | ||
138 | static int rtti(); | 137 | static int rtti(); |
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index c84eeeb..38b93f7 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -460,9 +460,6 @@ QMap<int, QString> OTodo::toMap() const { | |||
460 | return map; | 460 | return map; |
461 | } | 461 | } |
462 | 462 | ||
463 | QMap<QString, QString> OTodo::toExtraMap()const { | ||
464 | return data->extra; | ||
465 | } | ||
466 | /** | 463 | /** |
467 | * change or modify looks at the ref count and either | 464 | * change or modify looks at the ref count and either |
468 | * creates a new QShared Object or it can modify it | 465 | * creates a new QShared Object or it can modify it |
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 4d5ee36..f9a345a 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h | |||
@@ -193,7 +193,6 @@ public: | |||
193 | */ | 193 | */ |
194 | QString type()const; | 194 | QString type()const; |
195 | QString toShortText()const; | 195 | QString toShortText()const; |
196 | QMap<QString, QString> toExtraMap()const; | ||
197 | QString recordField(int id )const; | 196 | QString recordField(int id )const; |
198 | 197 | ||
199 | /** | 198 | /** |