-rw-r--r-- | kabc/addressbook.cpp | 10 | ||||
-rw-r--r-- | kabc/addressbook.h | 2 |
2 files changed, 9 insertions, 3 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 ) | |||
379 | // exports all Addressees, which are syncable | 379 | // exports all Addressees, which are syncable |
380 | void AddressBook::export2File( QString fileName ) | 380 | void AddressBook::export2File( QString fileName, QString resourceName ) |
381 | { | 381 | { |
@@ -394,3 +394,8 @@ void AddressBook::export2File( QString fileName ) | |||
394 | for ( it = begin(); it != end(); ++it ) { | 394 | for ( it = begin(); it != end(); ++it ) { |
395 | if ( (*it).resource() && (*it).resource()->includeInSync() ) { | 395 | if ( (*it).resource() ) { |
396 | bool include = (*it).resource()->includeInSync(); | ||
397 | if ( !resourceName.isEmpty() ) | ||
398 | include = (resourceName == (*it).resource()->name() ); | ||
399 | if ( include ) { | ||
400 | qDebug(QString ("Exporting resource %1 to file %2").arg( (*it).resource()->name() ).arg( fileName ) ); | ||
396 | if ( !(*it).IDStr().isEmpty() ) { | 401 | if ( !(*it).IDStr().isEmpty() ) { |
@@ -405,2 +410,3 @@ void AddressBook::export2File( QString fileName ) | |||
405 | } | 410 | } |
411 | } | ||
406 | t << "\r\n\r\n"; | 412 | t << "\r\n\r\n"; |
diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 18c03b5..4a0d0a3 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h | |||
@@ -148,3 +148,3 @@ class AddressBook : public QObject | |||
148 | void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); | 148 | void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); |
149 | void export2File( QString fileName ); | 149 | void export2File( QString fileName, QString resourceName = "" ); |
150 | bool export2PhoneFormat( QStringList uids ,QString fileName ); | 150 | bool export2PhoneFormat( QStringList uids ,QString fileName ); |