summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/stdaddressbook.cpp27
-rw-r--r--kabc/stdaddressbook.h2
-rw-r--r--kaddressbook/kabcore.cpp2
3 files changed, 27 insertions, 4 deletions
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index a14ae20..43d9fde 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -58,2 +58,19 @@ void StdAddressBook::handleCrash()
58} 58}
59StdAddressBook *StdAddressBook::selfNoLoad()
60{
61
62 if ( !mSelf )
63 {
64 QString appdir = StdAddressBook::setTempAppDir();
65// US im am not sure why I have to use the other format here??
66#ifdef KAB_EMBEDDED
67 mSelf = addressBookDeleter.setObject( new StdAddressBook ( QString() ) );
68#else //KAB_EMBEDDED
69 addressBookDeleter.setObject( mSelf, new StdAddressBook( QString() ) );
70#endif //KAB_EMBEDDED
71 KStandardDirs::setAppDir( appdir );
72 }
73
74 return mSelf;
75}
59 76
@@ -110,2 +127,7 @@ StdAddressBook *StdAddressBook::self( bool onlyFastResources )
110} 127}
128StdAddressBook::StdAddressBook( QString )
129 : AddressBook( "kabcrc" )
130{
131
132}
111 133
@@ -115,3 +137,3 @@ StdAddressBook::StdAddressBook()
115 137
116 //init( false ); 138 init( false );
117} 139}
@@ -122,4 +144,3 @@ StdAddressBook::StdAddressBook( bool onlyFastResources )
122 144
123 if ( onlyFastResources ) 145 init( onlyFastResources );
124 init( onlyFastResources );
125} 146}
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h
index cf130b3..3cd6363 100644
--- a/kabc/stdaddressbook.h
+++ b/kabc/stdaddressbook.h
@@ -72,2 +72,3 @@ class StdAddressBook : public AddressBook
72 static StdAddressBook *self(); 72 static StdAddressBook *self();
73 static StdAddressBook *selfNoLoad();
73 74
@@ -140,2 +141,3 @@ class StdAddressBook : public AddressBook
140 StdAddressBook(); 141 StdAddressBook();
142 StdAddressBook( QString );
141 StdAddressBook( bool onlyFastResources ); 143 StdAddressBook( bool onlyFastResources );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index c670b1f..77321aa 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -305,3 +305,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
305 mIsPart = !parent->inherits( "KAddressBookMain" ); 305 mIsPart = !parent->inherits( "KAddressBookMain" );
306 mAddressBook = KABC::StdAddressBook::self(); 306 mAddressBook = KABC::StdAddressBook::selfNoLoad();
307 KABC::StdAddressBook::setAutomaticSave( false ); 307 KABC::StdAddressBook::setAutomaticSave( false );