-rw-r--r-- | kabc/addressbook.cpp | 2 | ||||
-rw-r--r-- | kabc/stdaddressbook.cpp | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index c61b387..47d298a 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -414,33 +414,33 @@ Addressee AddressBook::findByUid( const QString &uid ) } } return Addressee(); } Addressee::List AddressBook::allAddressees() { return d->mAddressees; } Addressee::List AddressBook::findByName( const QString &name ) { Addressee::List results; Iterator it; for ( it = begin(); it != end(); ++it ) { - if ( name == (*it).name() ) { + if ( name == (*it).realName() ) { results.append( *it ); } } return results; } Addressee::List AddressBook::findByEmail( const QString &email ) { Addressee::List results; QStringList mailList; Iterator it; for ( it = begin(); it != end(); ++it ) { mailList = (*it).emails(); for ( QStringList::Iterator ite = mailList.begin(); ite != mailList.end(); ++ite ) { diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp index 760820e..9f38f08 100644 --- a/kabc/stdaddressbook.cpp +++ b/kabc/stdaddressbook.cpp @@ -50,34 +50,37 @@ QString StdAddressBook::fileName() QString StdAddressBook::directoryName() { return locateLocal( "data", "kabc/stdvcf" ); } void StdAddressBook::handleCrash() { StdAddressBook::self()->cleanUp(); } StdAddressBook *StdAddressBook::self() { if ( !mSelf ) { QString appdir = StdAddressBook::setTempAppDir(); - - kdDebug(5700) << "StdAddressBook::self()" << endl; + qDebug("****************************************************** "); + qDebug("****************************************************** "); + qDebug("****************************************************** "); + qDebug("****************************************************** "); + qDebug("****************************************************** "); // US im am not sure why I have to use the other format here?? #ifdef KAB_EMBEDDED mSelf = addressBookDeleter.setObject( new StdAddressBook ); #else //KAB_EMBEDDED addressBookDeleter.setObject( mSelf, new StdAddressBook ); #endif //KAB_EMBEDDED KStandardDirs::setAppDir( appdir ); } return mSelf; } QString StdAddressBook::setTempAppDir() { QString appDIR = KStandardDirs::appDir(); #ifdef DESKTOP_VERSION @@ -87,32 +90,39 @@ QString StdAddressBook::setTempAppDir() else appdir += "/kaddressbook/"; KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); #else QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook"; KStandardDirs::setAppDir( appdir ); #endif return appDIR; } StdAddressBook *StdAddressBook::self( bool onlyFastResources ) { if ( !mSelf ) { + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); + qDebug("++++++++++++++++++++++++++++++++++++++++++++++++ "); 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 ); } return mSelf; } StdAddressBook::StdAddressBook() : AddressBook( "kabcrc" ) { init( false ); |