-rw-r--r-- | kabc/tmpaddressbook.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kabc/tmpaddressbook.cpp b/kabc/tmpaddressbook.cpp index e6699df..ca47ca4 100644 --- a/kabc/tmpaddressbook.cpp +++ b/kabc/tmpaddressbook.cpp | |||
@@ -24,21 +24,33 @@ Copyright (c) 2004 Ulf Schenk | |||
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | #include <qptrlist.h> | ||
27 | 28 | ||
28 | #include "tmpaddressbook.h" | 29 | #include "tmpaddressbook.h" |
29 | 30 | ||
30 | using namespace KABC; | 31 | using namespace KABC; |
31 | 32 | ||
33 | #include "resource.h" | ||
34 | |||
32 | TmpAddressBook::TmpAddressBook() | 35 | TmpAddressBook::TmpAddressBook() |
33 | : AddressBook(0, "tmpcontact") | 36 | : AddressBook(0, "tmpcontact") |
34 | { | 37 | { |
35 | } | 38 | } |
36 | 39 | ||
37 | TmpAddressBook::TmpAddressBook( const QString &config ) | 40 | TmpAddressBook::TmpAddressBook( const QString &config ) |
38 | : AddressBook( config, "tmpcontact" ) | 41 | : AddressBook( config, "tmpcontract" ) |
39 | { | 42 | { |
40 | } | 43 | } |
41 | 44 | ||
42 | TmpAddressBook::~TmpAddressBook() | 45 | TmpAddressBook::~TmpAddressBook() |
43 | { | 46 | { |
47 | //remove all possible resources. This should cleanup the configfile. | ||
48 | QPtrList<KABC::Resource> mResources = resources(); | ||
49 | |||
50 | QPtrListIterator<KABC::Resource> it(mResources); | ||
51 | for ( ; it.current(); ++it ) { | ||
52 | KABC::Resource *res = it.current(); | ||
53 | removeResource(res); | ||
44 | } | 54 | } |
55 | } | ||
56 | |||