author | zautrix <zautrix> | 2005-12-02 09:10:14 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-12-02 09:10:14 (UTC) |
commit | 64be8d64fc26d1025a24150d065197ba5d608f3d (patch) (side-by-side diff) | |
tree | 4f7b0c82641ac591af04f6fdd541b662d4727850 /kabc/addressbook.cpp | |
parent | 2bd8aff44e90b6d58e2037771db8b38846addb3e (diff) | |
download | kdepimpi-64be8d64fc26d1025a24150d065197ba5d608f3d.zip kdepimpi-64be8d64fc26d1025a24150d065197ba5d608f3d.tar.gz kdepimpi-64be8d64fc26d1025a24150d065197ba5d608f3d.tar.bz2 |
more sync
-rw-r--r-- | kabc/addressbook.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index f3744bc..e04f4b1 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -378,5 +378,5 @@ bool AddressBook::save( Ticket *ticket ) } // exports all Addressees, which are syncable -void AddressBook::export2File( QString fileName ) +void AddressBook::export2File( QString fileName, QString resourceName ) { @@ -393,5 +393,10 @@ void AddressBook::export2File( QString fileName ) version = KABC::VCardConverter::v3_0; for ( it = begin(); it != end(); ++it ) { - if ( (*it).resource() && (*it).resource()->includeInSync() ) { + if ( (*it).resource() ) { + bool include = (*it).resource()->includeInSync(); + if ( !resourceName.isEmpty() ) + include = (resourceName == (*it).resource()->name() ); + if ( include ) { + qDebug(QString ("Exporting resource %1 to file %2").arg( (*it).resource()->name() ).arg( fileName ) ); if ( !(*it).IDStr().isEmpty() ) { (*it).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*it).IDStr() ); @@ -404,4 +409,5 @@ void AddressBook::export2File( QString fileName ) } } + } t << "\r\n\r\n"; outFile.close(); |