author | zautrix <zautrix> | 2004-10-27 17:50:52 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 17:50:52 (UTC) |
commit | 85a0e0d9b1d60805cb4947be1c296c18e73c82b8 (patch) (side-by-side diff) | |
tree | 64920209dc3cded8b3241d44138b1a82afb300cf | |
parent | 1df6fe03fe931bfbc83e855e47472a80ec4ba08e (diff) | |
download | kdepimpi-85a0e0d9b1d60805cb4947be1c296c18e73c82b8.zip kdepimpi-85a0e0d9b1d60805cb4947be1c296c18e73c82b8.tar.gz kdepimpi-85a0e0d9b1d60805cb4947be1c296c18e73c82b8.tar.bz2 |
sync fixes
-rw-r--r-- | kde2file/abdump/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kde2file/abdump/main.cpp b/kde2file/abdump/main.cpp index d452ee9..1ee64f5 100644 --- a/kde2file/abdump/main.cpp +++ b/kde2file/abdump/main.cpp @@ -123,32 +123,33 @@ int main( int argc, char *argv[] ) //Addressee::List aList;//parseVCards( const QString& vcard ); KABC::Addressee::List list; int added = 0, changedC = 0, deleted = 0; QFile file( fileName ); if ( file.open( IO_ReadOnly ) ) { QTextStream t( &file ); // use a text stream t.setEncoding( QTextStream::UnicodeUTF8 ); QString data; data = t.read(); file.close(); KABC::VCardConverter converter; list = converter.parseVCards( data ); qDebug("kdeABdump::file has %d entries", list.count()); KABC::Addressee::List::Iterator it; for ( it = list.begin();it != list.end();++it) { + (*it).setChanged( true ); bool changed = ((*it).custom( "KADDRESSBOOK", "X-ExternalID" ) == "changed"); (*it).removeCustom( "KADDRESSBOOK", "X-ExternalID" ); //qDebug("ext %s ", (*it).custom( "KADDRESSBOOK", "X-ExternalID" ).latin1()); if ( changed ) { //qDebug("changed Addressee found! "); KABC::Addressee std = standardAddressBook->findByUid( (*it).uid() ); if ( ! std.isEmpty() ) (*it).setResource(std.resource()); standardAddressBook->insertAddressee( (*it) ); ++changedC; } else { //maybe added? KABC::Addressee std = standardAddressBook->findByUid( (*it).uid() ); if ( std.isEmpty() ) { standardAddressBook->insertAddressee( (*it) ); ++added; @@ -173,21 +174,22 @@ int main( int argc, char *argv[] ) ++deleted; } else { ++itA; } } //standardAddressBook->saveAll(); standardAddressBook->setAutomaticSave( true ); qDebug("************************************* "); qDebug("*************kdeABdump*************** "); qDebug("************************************* "); qDebug("Addressbook entries\nchanged %d\ndeleted %d\nadded %d\nfrom file %s", changedC,deleted, added, fileName.latin1()); } else qDebug("error open file "); } - KABC::StdAddressBook::close(); - + delete standardAddressBook; + //KABC::StdAddressBook::close(); + //StdAddressBook::mSelf = 0; qDebug("ente "); return 0; } |