author | zautrix <zautrix> | 2004-10-13 14:23:28 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-13 14:23:28 (UTC) |
commit | 2cfda2af7cba3c9aff2d7722421b5d33b7f56cb6 (patch) (side-by-side diff) | |
tree | f1e664ddf31aae347b1a119c9111cbd1c931bf89 /kabc/addressbook.cpp | |
parent | d41893fb0a49fbb080326a4c1fd98e1a032a182a (diff) | |
download | kdepimpi-2cfda2af7cba3c9aff2d7722421b5d33b7f56cb6.zip kdepimpi-2cfda2af7cba3c9aff2d7722421b5d33b7f56cb6.tar.gz kdepimpi-2cfda2af7cba3c9aff2d7722421b5d33b7f56cb6.tar.bz2 |
more sync fixes
-rw-r--r-- | kabc/addressbook.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 8882259..592d78d 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -378,2 +378,3 @@ bool AddressBook::save( Ticket *ticket ) } +// exports all Addressees, which are syncable void AddressBook::export2File( QString fileName ) @@ -393,2 +394,3 @@ void AddressBook::export2File( QString fileName ) for ( it = begin(); it != end(); ++it ) { + if ( (*it).resource() && (*it).resource()->includeInSync() ) { if ( !(*it).IDStr().isEmpty() ) { @@ -402,2 +404,3 @@ void AddressBook::export2File( QString fileName ) } + } t << "\r\n\r\n"; @@ -421,2 +424,4 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName ) continue; + if ( all && a.resource() && !a.resource()->includeInSync() ) + continue; a.simplifyEmails(); @@ -478,3 +483,3 @@ void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool rem if ( removeOld ) - setUntagged(); + setUntagged( true ); KABC::Addressee::List list; @@ -508,3 +513,3 @@ void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool rem } -void AddressBook::setUntagged() +void AddressBook::setUntagged(bool setNonSyncTagged) // = false) { @@ -512,2 +517,8 @@ void AddressBook::setUntagged() for ( ait = begin(); ait != end(); ++ait ) { + if ( setNonSyncTagged ) { + if ( (*ait).resource() && ! (*ait).resource()->includeInSync() ) { + (*ait).setTagged( true ); + } else + (*ait).setTagged( false ); + } else (*ait).setTagged( false ); |