author | eilers <eilers> | 2003-03-04 17:23:03 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-03-04 17:23:03 (UTC) |
commit | caad9c7b3e7fc0c9046993f6a152cd37f91fdceb (patch) (side-by-side diff) | |
tree | 189006e4f369cf6a373fd20f277966ff42117b5b | |
parent | 55e5d2c95f70d296c541e4f2564713a593c3851c (diff) | |
download | opie-caad9c7b3e7fc0c9046993f6a152cd37f91fdceb.zip opie-caad9c7b3e7fc0c9046993f6a152cd37f91fdceb.tar.gz opie-caad9c7b3e7fc0c9046993f6a152cd37f91fdceb.tar.bz2 |
Fixing suffix handling
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 15 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 1 |
2 files changed, 11 insertions, 5 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index c4a7b10..75dd2c1 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -646,4 +646,6 @@ void ContactEditor::init() { connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) ); + connect( txtSuffix, SIGNAL(textChanged(const QString &)), this, SLOT(slotSuffixChange(const QString &)) ); + connect( txtChooserField1, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser1Change(const QString &)) ); @@ -1038,4 +1040,9 @@ void ContactEditor::slotFullNameChange( const QString &textChanged ) { } +void ContactEditor::slotSuffixChange( const QString& ) { + // Just want to update the FileAs combo if the suffix was changed.. + slotFullNameChange( txtFullName->text() ); +} + void ContactEditor::accept() { @@ -1071,5 +1078,5 @@ void ContactEditor::slotName() { if ( dlgName->exec() ) { - tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text(); + tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text(); txtFullName->setText( tmpName.simplifyWhiteSpace() ); slotFullNameChange( txtFullName->text() ); @@ -1107,5 +1114,4 @@ QString ContactEditor::parseName( const QString fullName, int type ) { QString strMiddleName; QString strLastName; - QString strSuffix; QString strTitle; int commapos; @@ -1162,5 +1168,4 @@ QString ContactEditor::parseName( const QString fullName, int type ) { qWarning(" strMiddleName: %s", strMiddleName.latin1()); qWarning(" strLastName: %s", strLastName.latin1()); - qWarning(" strSuffix: %s", strSuffix.latin1()); qWarning(" strTitle: %s", strTitle.latin1()); @@ -1176,5 +1181,5 @@ QString ContactEditor::parseName( const QString fullName, int type ) { case NAME_FMLS: - return strFirstName + " " + strMiddleName + " " + strLastName + " " + strSuffix; + return strFirstName + " " + strMiddleName + " " + strLastName + " " + txtSuffix->text(); case NAME_F: @@ -1188,5 +1193,5 @@ QString ContactEditor::parseName( const QString fullName, int type ) { case NAME_S: - return strSuffix; + return txtSuffix->text(); } diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index 703e702..954c77e 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h @@ -101,4 +101,5 @@ class ContactEditor : public QDialog { void slotCountryChange( const QString &textChanged ); void slotFullNameChange( const QString &textChanged ); + void slotSuffixChange( const QString &textChanged ); void slotAnniversaryDateChanged( int year, int month, int day); void slotBirthdayDateChanged( int year, int month, int day); |