-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 @@ -379,3 +379,3 @@ bool AddressBook::save( Ticket *ticket ) // exports all Addressees, which are syncable -void AddressBook::export2File( QString fileName ) +void AddressBook::export2File( QString fileName, QString resourceName ) { @@ -394,3 +394,8 @@ void AddressBook::export2File( QString fileName ) 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() ) { @@ -405,2 +410,3 @@ void AddressBook::export2File( QString fileName ) } + } t << "\r\n\r\n"; |