-rw-r--r-- | kabc/stdaddressbook.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp index a14ae20..43d9fde 100644 --- a/kabc/stdaddressbook.cpp +++ b/kabc/stdaddressbook.cpp @@ -56,6 +56,23 @@ void StdAddressBook::handleCrash() { StdAddressBook::self()->cleanUp(); } +StdAddressBook *StdAddressBook::selfNoLoad() +{ + + if ( !mSelf ) + { + QString appdir = StdAddressBook::setTempAppDir(); +// US im am not sure why I have to use the other format here?? +#ifdef KAB_EMBEDDED + mSelf = addressBookDeleter.setObject( new StdAddressBook ( QString() ) ); +#else //KAB_EMBEDDED + addressBookDeleter.setObject( mSelf, new StdAddressBook( QString() ) ); +#endif //KAB_EMBEDDED + KStandardDirs::setAppDir( appdir ); + } + + return mSelf; +} StdAddressBook *StdAddressBook::self() { @@ -108,19 +125,23 @@ StdAddressBook *StdAddressBook::self( bool onlyFastResources ) } return mSelf; } +StdAddressBook::StdAddressBook( QString ) + : AddressBook( "kabcrc" ) +{ + +} StdAddressBook::StdAddressBook() : AddressBook( "kabcrc" ) { - //init( false ); + init( false ); } StdAddressBook::StdAddressBook( bool onlyFastResources ) : AddressBook( "kabcrc" ) { - if ( onlyFastResources ) init( onlyFastResources ); } |