From ec80e207cce9ebb55be771603fc47a4e7892fd6c Mon Sep 17 00:00:00 2001 From: zecke Date: Fri, 20 Jun 2003 15:40:07 +0000 Subject: toExtraMap is no more virtual we save custom entries now setExtraMap added as well --- (limited to 'libopie/pim/otodoaccessxml.cpp') diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index 2b62f0d..3d15354 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp @@ -497,9 +497,31 @@ void OTodoAccessXML::todo( QAsciiDict* dict, OTodo& ev, break; } default: + ev.setCustomField( attr, val ); break; } } + +// from PalmtopRecord... GPL ### FIXME +namespace { +QString customToXml(const QMap& customMap ) +{ + //qWarning(QString("writing custom %1").arg(customMap.count())); + QString buf(" "); + for ( QMap::ConstIterator cit = customMap.begin(); + cit != customMap.end(); ++cit) { +// qWarning(".ITEM."); + buf += cit.key(); + buf += "=\""; + buf += Qtopia::escapeString(cit.data()); + buf += "\" "; + } + return buf; +} + + +} + QString OTodoAccessXML::toString( const OTodo& ev )const { QString str; @@ -581,6 +603,7 @@ QString OTodoAccessXML::toString( const OTodo& ev )const { str += "Reminders=\""+ records.join(";") +"\" "; } } + str += customToXml( ev.toExtraMap() ); return str; -- cgit v0.9.0.2