summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index ad0f702..19c26eb 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -611,67 +611,68 @@ bool AddressBook::saveABphone( QString fileName )
}
qDebug("saveABphone:: re-reading from phone... ");
if ( !PhoneAccess::readFromPhone( fileName) ) {
return false;
}
return true;
}
bool AddressBook::saveAB()
{
bool ok = true;
deleteRemovedAddressees();
Iterator ait;
for ( ait = begin(); ait != end(); ++ait ) {
if ( !(*ait).IDStr().isEmpty() ) {
(*ait).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*ait).IDStr() );
}
}
KRES::Manager<Resource>::ActiveIterator it;
KRES::Manager<Resource> *manager = d->mManager;
qDebug("SaveAB::saving..." );
for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
qDebug("SaveAB::checking resource..." );
if ( (*it)->readOnly() )
- qDebug("readonly." );
+ qDebug("resource is readonly." );
if ( (*it)->isOpen() )
- qDebug("open" );
+ qDebug("resource is open" );
if ( !(*it)->readOnly() && (*it)->isOpen() ) {
Ticket *ticket = requestSaveTicket( *it );
qDebug("StdAddressBook::save '%s'", (*it)->resourceName().latin1() );
if ( !ticket ) {
qDebug( i18n( "Unable to save to resource '%1'. It is locked." )
.arg( (*it)->resourceName() ) );
return false;
}
//if ( !save( ticket ) )
if ( ticket->resource() ) {
+ QString name = ticket->resource()->resourceName();
if ( ! ticket->resource()->save( ticket ) )
ok = false;
else
- qDebug("StdAddressBook::saved '%s'", ticket->resource()->resourceName().latin1() );
+ qDebug("StdAddressBook::resource saved '%s'", name.latin1() );
} else
ok = false;
}
}
return ok;
}
AddressBook::Iterator AddressBook::begin()
{
Iterator it = Iterator();
it.d->mIt = d->mAddressees.begin();
return it;
}
AddressBook::ConstIterator AddressBook::begin() const
{
ConstIterator it = ConstIterator();
it.d->mIt = d->mAddressees.begin();
return it;
}
AddressBook::Iterator AddressBook::end()