From: Stewart H. <she...@us...> - 2005-03-21 10:10:49
|
Update of /cvsroot/multisync/multisync/plugins/kdepim_plugin/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16291 Modified Files: Tag: branch_08X kaddrbook.cpp Log Message: Tweaked the previous patch so that incoming custom X-KDEADDRESSBOOK fields are also honoured. Index: kaddrbook.cpp =================================================================== RCS file: /cvsroot/multisync/multisync/plugins/kdepim_plugin/src/Attic/kaddrbook.cpp,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -u -d -r1.1.2.9 -r1.1.2.10 --- kaddrbook.cpp 17 Mar 2005 00:01:35 -0000 1.1.2.9 +++ kaddrbook.cpp 21 Mar 2005 10:10:36 -0000 1.1.2.10 @@ -366,16 +366,19 @@ //Other plugins are unlikely to support the KDE addressbook non-standard vcard //fields (X-KADDRESSBOOK-*) and so we must merge those fields from our current //copy back into back into the incoming vcard. + //We do this in a way that gives precedence to any custom data that may arrive + //in the incoming vcard. This could happen if we are synchronising two KDE + //Addressbooks for example. KABC::Addressee addressee_old = addressbookptr->findByUid(QString(obj->uid)); if (!addressee_old.isEmpty()) { - QStringList customs = addressee_old.customs(); + QStringList customs = addressee_old.customs() + addressee.customs(); addressee.setCustoms(customs); if (multisync_debug) for (QStringList::Iterator it=customs.begin(); it!=customs.end(); ++it) - cout << "kdepim_plugin: retaining" << *it << "\n"; - } + cout << "kdepim_plugin: custom " << *it << "\n"; + } // replace the current entry in the KDE addressbook with this one addressbookptr->insertAddressee(addressee); |