-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 @@ -647,2 +647,4 @@ void ContactEditor::init() { + connect( txtSuffix, SIGNAL(textChanged(const QString &)), this, SLOT(slotSuffixChange(const QString &)) ); + connect( txtChooserField1, SIGNAL(textChanged(const QString &)), @@ -1039,2 +1041,7 @@ 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() { @@ -1072,3 +1079,3 @@ void ContactEditor::slotName() { - tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text(); + tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text(); txtFullName->setText( tmpName.simplifyWhiteSpace() ); @@ -1108,3 +1115,2 @@ QString ContactEditor::parseName( const QString fullName, int type ) { QString strLastName; - QString strSuffix; QString strTitle; @@ -1163,3 +1169,2 @@ QString ContactEditor::parseName( const QString fullName, int type ) { qWarning(" strLastName: %s", strLastName.latin1()); - qWarning(" strSuffix: %s", strSuffix.latin1()); qWarning(" strTitle: %s", strTitle.latin1()); @@ -1177,3 +1182,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { case NAME_FMLS: - return strFirstName + " " + strMiddleName + " " + strLastName + " " + strSuffix; + return strFirstName + " " + strMiddleName + " " + strLastName + " " + txtSuffix->text(); @@ -1189,3 +1194,3 @@ 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 @@ -102,2 +102,3 @@ class ContactEditor : public QDialog { void slotFullNameChange( const QString &textChanged ); + void slotSuffixChange( const QString &textChanged ); void slotAnniversaryDateChanged( int year, int month, int day); |