summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 4c4ae09..8487ff3 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -1160,6 +1160,17 @@ bool AddressBook::addResource( Resource *resource )
d->mManager->add( resource );
return true;
}
+void AddressBook::removeResources()
+{
+ //remove all possible resources. This should cleanup the configfile.
+ QPtrList<KABC::Resource> mResources = resources();
+
+ QPtrListIterator<KABC::Resource> it(mResources);
+ for ( ; it.current(); ++it ) {
+ KABC::Resource *res = it.current();
+ removeResource(res);
+ }
+}
bool AddressBook::removeResource( Resource *resource )
{