author | ulf69 <ulf69> | 2004-08-03 20:49:15 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-03 20:49:15 (UTC) |
commit | be52d7d03e57620919b23cb0cbb33ac22d0920e0 (patch) (unidiff) | |
tree | 34e8e29a221c828424126694f865d702c7635f97 /kabc/tmpaddressbook.cpp | |
parent | d5358380edce9a2c39f3eea4df741a148338880c (diff) | |
download | kdepimpi-be52d7d03e57620919b23cb0cbb33ac22d0920e0.zip kdepimpi-be52d7d03e57620919b23cb0cbb33ac22d0920e0.tar.gz kdepimpi-be52d7d03e57620919b23cb0cbb33ac22d0920e0.tar.bz2 |
hopefully last modifications of resource based export/import functionality
for opie, qtopia and sharpdtm
-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); | ||
54 | } | ||
44 | } | 55 | } |
56 | |||