From ca913d1f2035b6ddb77be497516e4dfc2371e5b3 Mon Sep 17 00:00:00 2001 From: eilers Date: Tue, 04 Mar 2003 16:55:58 +0000 Subject: Some finetuning to behave like the previous release if just one first and lastname is used.. --- (limited to 'core/pim') diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 7bc5bde..c4a7b10 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -1026,10 +1026,10 @@ void ContactEditor::slotFullNameChange( const QString &textChanged ) { cmbFileAs->clear(); - cmbFileAs->insertItem( parseName( textChanged, NAME_FL ) ); - cmbFileAs->insertItem( parseName( textChanged, NAME_FMLS ) ); cmbFileAs->insertItem( parseName( textChanged, NAME_LF ) ); cmbFileAs->insertItem( parseName( textChanged, NAME_LFM ) ); + cmbFileAs->insertItem( parseName( textChanged, NAME_FL ) ); + cmbFileAs->insertItem( parseName( textChanged, NAME_FMLS ) ); cmbFileAs->setCurrentItem( index ); @@ -1152,9 +1152,12 @@ QString ContactEditor::parseName( const QString fullName, int type ) { strMiddleName = allSecondNames.join(" "); strLastName = *(--allNames.end()); - + } + if ( strFirstName == strLastName ) + strFirstName = ""; + qWarning(" strFirstName: %s", strFirstName.latin1()); qWarning(" strMiddleName: %s", strMiddleName.latin1()); qWarning(" strLastName: %s", strLastName.latin1()); -- cgit v0.9.0.2