-rw-r--r-- | kabc/addressee.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 6b282e2..4cdd5e5 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -801,7 +801,13 @@ void Addressee::setNameFromString( const QString &str ) setFormattedName( str ); setName( str ); - QStringList titles; + static bool first = true; + static QStringList titles; + static QStringList suffixes; + static QStringList prefixes; + + if ( first ) { + first = false; titles += i18n( "Dr." ); titles += i18n( "Miss" ); titles += i18n( "Mr." ); @@ -809,19 +815,16 @@ void Addressee::setNameFromString( const QString &str ) titles += i18n( "Ms." ); titles += i18n( "Prof." ); - QStringList suffixes; suffixes += i18n( "I" ); suffixes += i18n( "II" ); suffixes += i18n( "III" ); suffixes += i18n( "Jr." ); suffixes += i18n( "Sr." ); - QStringList prefixes; prefixes += "van"; prefixes += "von"; prefixes += "de"; -//US KConfig config( "kabcrc" ); KConfig config( locateLocal( "config", "kabcrc") ); config.setGroup( "General" ); titles += config.readListEntry( "Prefixes" ); @@ -830,6 +833,7 @@ void Addressee::setNameFromString( const QString &str ) prefixes.remove( "" ); suffixes += config.readListEntry( "Suffixes" ); suffixes.remove( "" ); + } // clear all name parts setPrefix( "" ); |