-rw-r--r-- | kabc/addressee.cpp | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 6b282e2..4cdd5e5 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -801,35 +801,39 @@ 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 | titles += i18n( "Dr." ); | 805 | static QStringList titles; |
806 | titles += i18n( "Miss" ); | 806 | static QStringList suffixes; |
807 | titles += i18n( "Mr." ); | 807 | static QStringList prefixes; |
808 | titles += i18n( "Mrs." ); | 808 | |
809 | titles += i18n( "Ms." ); | 809 | if ( first ) { |
810 | titles += i18n( "Prof." ); | 810 | first = false; |
811 | 811 | titles += i18n( "Dr." ); | |
812 | QStringList suffixes; | 812 | titles += i18n( "Miss" ); |
813 | suffixes += i18n( "I" ); | 813 | titles += i18n( "Mr." ); |
814 | suffixes += i18n( "II" ); | 814 | titles += i18n( "Mrs." ); |
815 | suffixes += i18n( "III" ); | 815 | titles += i18n( "Ms." ); |
816 | suffixes += i18n( "Jr." ); | 816 | titles += i18n( "Prof." ); |
817 | suffixes += i18n( "Sr." ); | 817 | |
818 | 818 | suffixes += i18n( "I" ); | |
819 | QStringList prefixes; | 819 | suffixes += i18n( "II" ); |
820 | prefixes += "van"; | 820 | suffixes += i18n( "III" ); |
821 | prefixes += "von"; | 821 | suffixes += i18n( "Jr." ); |
822 | prefixes += "de"; | 822 | suffixes += i18n( "Sr." ); |
823 | 823 | ||
824 | //US KConfig config( "kabcrc" ); | 824 | prefixes += "van"; |
825 | KConfig config( locateLocal( "config", "kabcrc") ); | 825 | prefixes += "von"; |
826 | config.setGroup( "General" ); | 826 | prefixes += "de"; |
827 | titles += config.readListEntry( "Prefixes" ); | 827 | |
828 | titles.remove( "" ); | 828 | KConfig config( locateLocal( "config", "kabcrc") ); |
829 | prefixes += config.readListEntry( "Inclusions" ); | 829 | config.setGroup( "General" ); |
830 | prefixes.remove( "" ); | 830 | titles += config.readListEntry( "Prefixes" ); |
831 | suffixes += config.readListEntry( "Suffixes" ); | 831 | titles.remove( "" ); |
832 | suffixes.remove( "" ); | 832 | prefixes += config.readListEntry( "Inclusions" ); |
833 | prefixes.remove( "" ); | ||
834 | suffixes += config.readListEntry( "Suffixes" ); | ||
835 | suffixes.remove( "" ); | ||
836 | } | ||
833 | 837 | ||
834 | // clear all name parts | 838 | // clear all name parts |
835 | setPrefix( "" ); | 839 | setPrefix( "" ); |