-rw-r--r-- | kabc/phonenumber.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index abb3b3b..041effc 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp @@ -186,6 +186,10 @@ QString PhoneNumber::typeLabel( int type ) typeString += " "; - if ((type & Cell) == Cell) - typeString += i18n("Mobile"); - else if ((type & Fax) == Fax) + typeString += i18n("Mobile") +" "; + if ((type & Sip) == Sip) + typeString += i18n("SIP")+" "; + if ((type & Car) == Car) + typeString += i18n("Car")+" "; + + if ((type & Fax) == Fax) typeString += i18n("Fax"); @@ -193,6 +197,2 @@ QString PhoneNumber::typeLabel( int type ) typeString += i18n("Messenger"); - else if ((type & Voice) == Voice) { -// add nothing in case of the Voice flag -// typeString += i18n("Voice"); - } else if ((type & Video) == Video) @@ -203,4 +203,2 @@ QString PhoneNumber::typeLabel( int type ) typeString += i18n("Modem"); - else if ((type & Car) == Car) - typeString += i18n("Car"); else if ((type & Isdn) == Isdn) @@ -211,8 +209,3 @@ QString PhoneNumber::typeLabel( int type ) typeString += i18n("Pager"); - else if ((type & Sip) == Sip) - typeString += i18n("SIP"); - // add the prefered flag - if (!typeString.isEmpty()) - typeString += " "; /* @@ -222,7 +215,10 @@ QString PhoneNumber::typeLabel( int type ) //if we still have no match, return "other" - if (typeString.isEmpty()) - return i18n("Other"); - - - return typeString; + if (typeString.isEmpty()) { + if ((type & Voice) == Voice) + return i18n("Voice"); + else + return i18n("Other"); + } + + return typeString.stripWhiteSpace(); } |