summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
authorzautrix <zautrix>2004-09-13 21:35:12 (UTC)
committer zautrix <zautrix>2004-09-13 21:35:12 (UTC)
commitbd6b4acb39498ffea3beea7d9b5f7620b60c14db (patch) (unidiff)
treee2d7425b7bb49fbcb7acb5ced497ac1fed06dfaf /kabc/addressee.cpp
parent06eabf6e82c0390699d11fd12580d91261829431 (diff)
downloadkdepimpi-bd6b4acb39498ffea3beea7d9b5f7620b60c14db.zip
kdepimpi-bd6b4acb39498ffea3beea7d9b5f7620b60c14db.tar.gz
kdepimpi-bd6b4acb39498ffea3beea7d9b5f7620b60c14db.tar.bz2
Many bugfixes
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressee.cpp12
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 )
801 setFormattedName( str ); 801 setFormattedName( str );
802 setName( str ); 802 setName( str );
803 803
804 QStringList titles; 804 static bool first = true;
805 static QStringList titles;
806 static QStringList suffixes;
807 static QStringList prefixes;
808
809 if ( first ) {
810 first = false;
805 titles += i18n( "Dr." ); 811 titles += i18n( "Dr." );
806 titles += i18n( "Miss" ); 812 titles += i18n( "Miss" );
807 titles += i18n( "Mr." ); 813 titles += i18n( "Mr." );
@@ -809,19 +815,16 @@ void Addressee::setNameFromString( const QString &str )
809 titles += i18n( "Ms." ); 815 titles += i18n( "Ms." );
810 titles += i18n( "Prof." ); 816 titles += i18n( "Prof." );
811 817
812 QStringList suffixes;
813 suffixes += i18n( "I" ); 818 suffixes += i18n( "I" );
814 suffixes += i18n( "II" ); 819 suffixes += i18n( "II" );
815 suffixes += i18n( "III" ); 820 suffixes += i18n( "III" );
816 suffixes += i18n( "Jr." ); 821 suffixes += i18n( "Jr." );
817 suffixes += i18n( "Sr." ); 822 suffixes += i18n( "Sr." );
818 823
819 QStringList prefixes;
820 prefixes += "van"; 824 prefixes += "van";
821 prefixes += "von"; 825 prefixes += "von";
822 prefixes += "de"; 826 prefixes += "de";
823 827
824//US KConfig config( "kabcrc" );
825 KConfig config( locateLocal( "config", "kabcrc") ); 828 KConfig config( locateLocal( "config", "kabcrc") );
826 config.setGroup( "General" ); 829 config.setGroup( "General" );
827 titles += config.readListEntry( "Prefixes" ); 830 titles += config.readListEntry( "Prefixes" );
@@ -830,6 +833,7 @@ void Addressee::setNameFromString( const QString &str )
830 prefixes.remove( "" ); 833 prefixes.remove( "" );
831 suffixes += config.readListEntry( "Suffixes" ); 834 suffixes += config.readListEntry( "Suffixes" );
832 suffixes.remove( "" ); 835 suffixes.remove( "" );
836 }
833 837
834 // clear all name parts 838 // clear all name parts
835 setPrefix( "" ); 839 setPrefix( "" );