summaryrefslogtreecommitdiffabout
path: root/kabc
authorulf69 <ulf69>2004-06-29 05:03:25 (UTC)
committer ulf69 <ulf69>2004-06-29 05:03:25 (UTC)
commit0538ac1cc17ad4249d27d686b4bc7e80663f475f (patch) (unidiff)
treeabf571d0e2640bbb7ce14818a376ad980492ea05 /kabc
parent61ef87224517601f8754dd9da1b521a7b0094558 (diff)
downloadkdepimpi-0538ac1cc17ad4249d27d686b4bc7e80663f475f.zip
kdepimpi-0538ac1cc17ad4249d27d686b4bc7e80663f475f.tar.gz
kdepimpi-0538ac1cc17ad4249d27d686b4bc7e80663f475f.tar.bz2
*** empty log message ***
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/stdaddressbook.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index f9fc70b..8faaaef 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -15,69 +15,56 @@
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27#ifndef DESKTOP_VERSION
28#include <qpe/global.h>
29#else
30
31#include <qdir.h>
32#endif
33#ifdef KAB_EMBEDDED
34 27
28/*US
35#include <stdlib.h> 29#include <stdlib.h>
36#else //KAB_EMBEDDED
37 30
38#include <stdlib.h>
39
40//US#include <kresources/manager.h>
41#include <kapplication.h> 31#include <kapplication.h>
42#include <kcrash.h> 32#include <kcrash.h>
43#include <ksimpleconfig.h> 33#include <ksimpleconfig.h>
44 34*/
45
46#endif //KAB_EMBEDDED
47 35
48#include "resource.h" 36#include "resource.h"
49#include <kresources/manager.h> 37#include <kresources/manager.h>
50#include <kdebug.h> 38#include <kdebug.h>
51#include <klocale.h> 39#include <klocale.h>
52#include <kstaticdeleter.h> 40#include <kstaticdeleter.h>
53#include <kstandarddirs.h> 41#include <kstandarddirs.h>
54 42
55#include "stdaddressbook.h" 43#include "stdaddressbook.h"
56 44
57using namespace KABC; 45using namespace KABC;
58 46
59StdAddressBook *StdAddressBook::mSelf = 0; 47StdAddressBook *StdAddressBook::mSelf = 0;
60bool StdAddressBook::mAutomaticSave = true; 48bool StdAddressBook::mAutomaticSave = true;
61 49
62static KStaticDeleter<StdAddressBook> addressBookDeleter; 50static KStaticDeleter<StdAddressBook> addressBookDeleter;
63 51
64QString StdAddressBook::fileName() 52QString StdAddressBook::fileName()
65{ 53{
66 return locateLocal( "data", "kabc/std.vcf" ); 54 return locateLocal( "data", "kabc/std.vcf" );
67} 55}
68 56
69QString StdAddressBook::directoryName() 57QString StdAddressBook::directoryName()
70{ 58{
71 qDebug("StdAddressBook::directoryName() WILL FAIL OR NOT" );
72 return locateLocal( "data", "kabc/stdvcf" ); 59 return locateLocal( "data", "kabc/stdvcf" );
73} 60}
74 61
75void StdAddressBook::handleCrash() 62void StdAddressBook::handleCrash()
76{ 63{
77 StdAddressBook::self()->cleanUp(); 64 StdAddressBook::self()->cleanUp();
78} 65}
79 66
80StdAddressBook *StdAddressBook::self() 67StdAddressBook *StdAddressBook::self()
81{ 68{
82 69
83 if ( !mSelf ) 70 if ( !mSelf )
@@ -202,29 +189,26 @@ bool StdAddressBook::save()
202 189
203 if ( !ab->save( ticket ) ) 190 if ( !ab->save( ticket ) )
204 ok = false; 191 ok = false;
205 } 192 }
206 } 193 }
207 194
208 return ok; 195 return ok;
209} 196}
210 197
211void StdAddressBook::close() 198void StdAddressBook::close()
212{ 199{
213//US destructObject is not defined on my system???. Is setObject(0) the same ??? 200//US destructObject is not defined on my system???. Is setObject(0) the same ???
214#ifndef KAB_EMBEDDED 201//US addressBookDeleter.destructObject();
215 addressBookDeleter.destructObject();
216#else //KAB_EMBEDDED
217 addressBookDeleter.setObject(0); 202 addressBookDeleter.setObject(0);
218#endif //KAB_EMBEDDED
219 203
220} 204}
221 205
222void StdAddressBook::setAutomaticSave( bool enable ) 206void StdAddressBook::setAutomaticSave( bool enable )
223{ 207{
224 mAutomaticSave = enable; 208 mAutomaticSave = enable;
225} 209}
226 210
227bool StdAddressBook::automaticSave() 211bool StdAddressBook::automaticSave()
228{ 212{
229 return mAutomaticSave; 213 return mAutomaticSave;
230} 214}