summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressbook.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 0838157..20310a0 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -216,15 +216,22 @@ bool AddressBook::ConstIterator::operator!=( const ConstIterator &it )
216 216
217AddressBook::AddressBook() 217AddressBook::AddressBook()
218{ 218{
219 init(0); 219 init(0, "contact");
220} 220}
221 221
222AddressBook::AddressBook( const QString &config ) 222AddressBook::AddressBook( const QString &config )
223{ 223{
224 init(config); 224 init(config, "contact");
225} 225}
226 226
227void AddressBook::init(const QString &config) 227AddressBook::AddressBook( const QString &config, const QString &family )
228{
229 init(config, family);
230
231}
232
233// the default family is "contact"
234void AddressBook::init(const QString &config, const QString &family )
228{ 235{
229 d = new AddressBookData; 236 d = new AddressBookData;
230 if (config != 0) { 237 if (config != 0) {
@@ -237,7 +244,7 @@ void AddressBook::init(const QString &config)
237 } 244 }
238 245
239//US d->mErrorHandler = 0; 246//US d->mErrorHandler = 0;
240 d->mManager = new KRES::Manager<Resource>( "contact" ); 247 d->mManager = new KRES::Manager<Resource>( family, false );
241 d->mManager->readConfig( d->mConfig ); 248 d->mManager->readConfig( d->mConfig );
242} 249}
243 250
@@ -541,8 +548,6 @@ QDataStream &KABC::operator>>( QDataStream &s, AddressBook &ab )
541 548
542bool AddressBook::addResource( Resource *resource ) 549bool AddressBook::addResource( Resource *resource )
543{ 550{
544 qDebug("AddressBook::addResource 1");
545
546 if ( !resource->open() ) { 551 if ( !resource->open() ) {
547 kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl; 552 kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl;
548 return false; 553 return false;