From d68435216e1ebc5a7fed391157197994e13992b3 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 09 Oct 2004 17:36:32 +0000 Subject: sync fix --- (limited to 'kabc') diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index ff05f7e..16927e2 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -444,11 +444,19 @@ void AddressBook::setUntagged() void AddressBook::removeUntagged() { Iterator ait; + bool todelete = false; + Iterator todel; for ( ait = begin(); ait != end(); ++ait ) { - if (!(*ait).tagged()) - removeAddressee( ait ); - } - + if ( todelete ) + removeAddressee( todel ); + if (!(*ait).tagged()) { + todelete = true; + todel = ait; + } else + todelete = false; + } + if ( todelete ) + removeAddressee( todel ); deleteRemovedAddressees(); } bool AddressBook::saveAB() -- cgit v0.9.0.2