summaryrefslogtreecommitdiffabout
path: root/kabc/stdaddressbook.cpp
Unidiff
Diffstat (limited to 'kabc/stdaddressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/stdaddressbook.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index 144a9dc..075f12f 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -16,38 +16,25 @@
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 27
28/*US
29#include <stdlib.h>
30
31#include <kapplication.h>
32#include <kcrash.h>
33#include <ksimpleconfig.h>
34*/
35
36#ifndef DESKTOP_VERSION
37#include <qpe/global.h>
38#else
39#include <qdir.h> 28#include <qdir.h>
40#endif
41
42#include "resource.h" 29#include "resource.h"
43#include <kresources/manager.h> 30#include <kresources/manager.h>
44#include <kdebug.h> 31#include <kdebug.h>
45#include <klocale.h> 32#include <klocale.h>
46#include <kstaticdeleter.h> 33#include <kstaticdeleter.h>
47#include <kstandarddirs.h> 34#include <kstandarddirs.h>
48 35
49#include "stdaddressbook.h" 36#include "stdaddressbook.h"
50 37
51using namespace KABC; 38using namespace KABC;
52 39
53StdAddressBook *StdAddressBook::mSelf = 0; 40StdAddressBook *StdAddressBook::mSelf = 0;
@@ -92,25 +79,27 @@ StdAddressBook *StdAddressBook::self()
92 79
93QString StdAddressBook::setTempAppDir() 80QString StdAddressBook::setTempAppDir()
94{ 81{
95 QString appDIR = KStandardDirs::appDir(); 82 QString appDIR = KStandardDirs::appDir();
96#ifdef DESKTOP_VERSION 83#ifdef DESKTOP_VERSION
97 QString appdir = QDir::homeDirPath(); 84 QString appdir = QDir::homeDirPath();
98 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) 85 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" )
99 appdir += "kaddressbook/"; 86 appdir += "kaddressbook/";
100 else 87 else
101 appdir += "/kaddressbook/"; 88 appdir += "/kaddressbook/";
102 KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); 89 KStandardDirs::setAppDir( QDir::convertSeparators( appdir ));
103#else 90#else
104 KStandardDirs::setAppDir( Global::applicationFileName( "kaddressbook", "" ) ); 91 QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook";
92
93 KStandardDirs::setAppDir( appdir );
105#endif 94#endif
106 95
107 return appDIR; 96 return appDIR;
108} 97}
109StdAddressBook *StdAddressBook::self( bool onlyFastResources ) 98StdAddressBook *StdAddressBook::self( bool onlyFastResources )
110{ 99{
111 100
112 if ( !mSelf ) 101 if ( !mSelf )
113 { 102 {
114 QString appdir =StdAddressBook::setTempAppDir(); 103 QString appdir =StdAddressBook::setTempAppDir();
115#ifdef KAB_EMBEDDED 104#ifdef KAB_EMBEDDED
116 mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) ); 105 mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) );