summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2004-10-11 10:09:39 (UTC)
committer zautrix <zautrix>2004-10-11 10:09:39 (UTC)
commitd3759373291c08d2cde93d85a76d190dc8a33830 (patch) (unidiff)
treeccc808fbdcd2ef0f38747fa459b2c605948f49a5 /kabc
parent504f6b2a8732d980a88234cdef0a80c201b9c4da (diff)
downloadkdepimpi-d3759373291c08d2cde93d85a76d190dc8a33830.zip
kdepimpi-d3759373291c08d2cde93d85a76d190dc8a33830.tar.gz
kdepimpi-d3759373291c08d2cde93d85a76d190dc8a33830.tar.bz2
crash fix in saveAB
Diffstat (limited to 'kabc') (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
@@ -632,9 +632,9 @@ bool AddressBook::saveAB()
632 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { 632 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
633 qDebug("SaveAB::checking resource..." ); 633 qDebug("SaveAB::checking resource..." );
634 if ( (*it)->readOnly() ) 634 if ( (*it)->readOnly() )
635 qDebug("readonly." ); 635 qDebug("resource is readonly." );
636 if ( (*it)->isOpen() ) 636 if ( (*it)->isOpen() )
637 qDebug("open" ); 637 qDebug("resource is open" );
638 638
639 if ( !(*it)->readOnly() && (*it)->isOpen() ) { 639 if ( !(*it)->readOnly() && (*it)->isOpen() ) {
640 Ticket *ticket = requestSaveTicket( *it ); 640 Ticket *ticket = requestSaveTicket( *it );
@@ -647,10 +647,11 @@ bool AddressBook::saveAB()
647 647
648 //if ( !save( ticket ) ) 648 //if ( !save( ticket ) )
649 if ( ticket->resource() ) { 649 if ( ticket->resource() ) {
650 QString name = ticket->resource()->resourceName();
650 if ( ! ticket->resource()->save( ticket ) ) 651 if ( ! ticket->resource()->save( ticket ) )
651 ok = false; 652 ok = false;
652 else 653 else
653 qDebug("StdAddressBook::saved '%s'", ticket->resource()->resourceName().latin1() ); 654 qDebug("StdAddressBook::resource saved '%s'", name.latin1() );
654 655
655 } else 656 } else
656 ok = false; 657 ok = false;