author | ulf69 <ulf69> | 2004-07-09 08:02:25 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-09 08:02:25 (UTC) |
commit | d91c533ffc42d7bf48fa1326754894b2c30b6831 (patch) (side-by-side diff) | |
tree | ba1eada897522030f17ccdf1afd4d4d96a65464e /kaddressbook | |
parent | 82dabc14cc446fb8c0486cd4c32064e3866d2be9 (diff) | |
download | kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.zip kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.tar.gz kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.tar.bz2 |
changed the IntDateFormat from type int to enum, for easier categorization
-rw-r--r-- | kaddressbook/addresseeeditordialog.cpp | 1 | ||||
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index d8c1aca..5e42640 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp @@ -45,33 +45,32 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, QVBoxLayout *layout = new QVBoxLayout( page ); mEditorWidget = new AddresseeEditorWidget( core, false, page ); connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), SLOT( widgetModified() ) ); layout->addWidget( mEditorWidget ); enableButton( KDialogBase::Apply, false ); if ( QApplication::desktop()->width() < 480 ) { hideButtons(); } } AddresseeEditorDialog::~AddresseeEditorDialog() { - qDebug("AddresseeEditorDialog::~AddresseeEditorDialog()"); //emit editorDestroyed( mEditorWidget->addressee().uid() ); } void AddresseeEditorDialog::setAddressee( const KABC::Addressee &addr ) { enableButton( KDialogBase::Apply, false ); mEditorWidget->setAddressee( addr ); } KABC::Addressee AddresseeEditorDialog::addressee() { return mEditorWidget->addressee(); } bool AddresseeEditorDialog::dirty() diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 4365ee5..3cfc1f2 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -1052,37 +1052,33 @@ void AddresseeEditorWidget::save() //US qDebug("AddresseeEditorWidget::save sound not supported"); #endif //KAB_EMBEDDED mAddressee.setSecrecy( mSecrecyWidget->secrecy() ); // save custom fields mAddressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", mIMAddressEdit->text() ); mAddressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", mSpouseEdit->text() ); mAddressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", mManagerEdit->text() ); mAddressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", mAssistantEdit->text() ); mAddressee.insertCustom( "KADDRESSBOOK", "X-Department", mDepartmentEdit->text() ); mAddressee.insertCustom( "KADDRESSBOOK", "X-Office", mOfficeEdit->text() ); mAddressee.insertCustom( "KADDRESSBOOK", "X-Profession", mProfessionEdit->text() ); if ( mAnniversaryPicker->inputIsValid() ) { //US mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", //US mAnniversaryPicker->date().toString( Qt::ISODate ) ); - int orgformat = KGlobal::locale()->getIntDateFormat(); - QDate da = mAnniversaryPicker->date(); - KGlobal::locale()->setIntDateFormat( 2 ); // = Qt::ISODate - QString dt = KGlobal::locale()->formatDate(da, true); - KGlobal::locale()->setIntDateFormat(orgformat ); + QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate); mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); } else mAddressee.removeCustom( "KADDRESSBOOK", "X-Anniversary" ); // Save the email addresses QStringList emails = mAddressee.emails(); QStringList::Iterator iter; for ( iter = emails.begin(); iter != emails.end(); ++iter ) mAddressee.removeEmail( *iter ); emails = mEmailWidget->emails(); bool first = true; for ( iter = emails.begin(); iter != emails.end(); ++iter ) { mAddressee.insertEmail( *iter, first ); first = false; |