-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabprefs.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 939296f..9b059d3 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -313,24 +313,25 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const } KABCore::~KABCore() { // save(); //saveSettings(); //KABPrefs::instance()->writeConfig(); delete AddresseeConfig::instance(); mAddressBook = 0; KABC::StdAddressBook::close(); delete syncManager; + } void KABCore::restoreSettings() { mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; bool state; if (mMultipleViewsAtOnce) state = KABPrefs::instance()->mDetailsPageVisible; else state = false; @@ -693,24 +694,25 @@ void KABCore::export2phone() KABC::VCardConverter converter; QString description; QString datastream; for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { KABC::Addressee a = mAddressBook->findByUid( *it ); if ( a.isEmpty() ) continue; a.simplifyEmails(); a.simplifyPhoneNumbers(); a.simplifyPhoneNumberTypes(); + a.simplifyAddresses(); if (description.isEmpty()) description = a.formattedName(); QString vcard; QString vcardnew; converter.addresseeToVCard( a, vcard ); int start = 0; int next; while ( (next = vcard.find("TYPE=", start) )>= 0 ) { int semi = vcard.find(";", next); int dopp = vcard.find(":", next); int sep; diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 552c933..dded2bf 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -73,24 +73,25 @@ KABPrefs::KABPrefs() KPrefs::setCurrentGroup( "Views" ); QString defaultView = i18n( "Default Table View" ); addItemString( "CurrentView", &mCurrentView, defaultView ); addItemStringList( "ViewNames", &mViewNames, defaultView ); KPrefs::setCurrentGroup( "Filters" ); addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); } KABPrefs::~KABPrefs() { + //qDebug("KABPrefs::~KABPrefs() "); } KABPrefs *KABPrefs::instance() { if ( !sInstance ) { #ifdef KAB_EMBEDDED sInstance = staticDeleter.setObject( new KABPrefs() ); #else //KAB_EMBEDDED //US the following line has changed ???. Why staticDeleter.setObject( sInstance, new KABPrefs() ); #endif //KAB_EMBEDDED sInstance->readConfig(); |