summaryrefslogtreecommitdiffabout
path: root/kabc/stdaddressbook.cpp
Unidiff
Diffstat (limited to 'kabc/stdaddressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/stdaddressbook.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index ec47a4e..181a09e 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -160,17 +160,22 @@ void StdAddressBook::init( bool )
160bool StdAddressBook::save() 160bool StdAddressBook::save()
161{ 161{
162 kdDebug(5700) << "StdAddressBook::save()" << endl; 162 kdDebug(5700) << "StdAddressBook::save()" << endl;
163 163
164 bool ok = true; 164 bool ok = true;
165 AddressBook *ab = self(); 165 AddressBook *ab = self();
166 166
167 ab->deleteRemovedAddressees(); 167 ab->deleteRemovedAddressees();
168 168 Iterator ait;
169 for ( ait = ab->begin(); ait != ab->end(); ++ait ) {
170 if ( !(*ait).IDStr().isEmpty() ) {
171 (*ait).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*ait).IDStr() );
172 }
173 }
169 KRES::Manager<Resource>::ActiveIterator it; 174 KRES::Manager<Resource>::ActiveIterator it;
170 KRES::Manager<Resource> *manager = ab->resourceManager(); 175 KRES::Manager<Resource> *manager = ab->resourceManager();
171 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { 176 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
172 if ( !(*it)->readOnly() && (*it)->isOpen() ) { 177 if ( !(*it)->readOnly() && (*it)->isOpen() ) {
173 Ticket *ticket = ab->requestSaveTicket( *it ); 178 Ticket *ticket = ab->requestSaveTicket( *it );
174// qDebug("StdAddressBook::save '%s'", (*it)->resourceName().latin1() ); 179// qDebug("StdAddressBook::save '%s'", (*it)->resourceName().latin1() );
175 if ( !ticket ) { 180 if ( !ticket ) {
176 ab->error( i18n( "Unable to save to resource '%1'. It is locked." ) 181 ab->error( i18n( "Unable to save to resource '%1'. It is locked." )