-rw-r--r-- | kabc/stdaddressbook.cpp | 17 |
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 @@ -12,46 +12,33 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ -/*US -#include <stdlib.h> - -#include <kapplication.h> -#include <kcrash.h> -#include <ksimpleconfig.h> -*/ - -#ifndef DESKTOP_VERSION -#include <qpe/global.h> -#else #include <qdir.h> -#endif - #include "resource.h" #include <kresources/manager.h> #include <kdebug.h> #include <klocale.h> #include <kstaticdeleter.h> #include <kstandarddirs.h> #include "stdaddressbook.h" using namespace KABC; StdAddressBook *StdAddressBook::mSelf = 0; bool StdAddressBook::mAutomaticSave = true; static KStaticDeleter<StdAddressBook> addressBookDeleter; @@ -88,33 +75,35 @@ StdAddressBook *StdAddressBook::self() } return mSelf; } QString StdAddressBook::setTempAppDir() { QString appDIR = KStandardDirs::appDir(); #ifdef DESKTOP_VERSION QString appdir = QDir::homeDirPath(); if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) appdir += "kaddressbook/"; else appdir += "/kaddressbook/"; KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); #else - KStandardDirs::setAppDir( Global::applicationFileName( "kaddressbook", "" ) ); + QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook"; + + KStandardDirs::setAppDir( appdir ); #endif return appDIR; } StdAddressBook *StdAddressBook::self( bool onlyFastResources ) { if ( !mSelf ) { QString appdir =StdAddressBook::setTempAppDir(); #ifdef KAB_EMBEDDED mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) ); #else //KAB_EMBEDDED addressBookDeleter.setObject( mSelf, new StdAddressBook( onlyFastResources ) ); #endif //KAB_EMBEDDED KStandardDirs::setAppDir( appdir ); |