author | zautrix <zautrix> | 2004-10-10 16:00:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-10 16:00:04 (UTC) |
commit | ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a (patch) (unidiff) | |
tree | 1d908bfc23b8a49d43a58bbeadd82c4e08faeff6 /kabc/phonenumber.cpp | |
parent | 213a9d993e5a4751b64e18320cfbebb000681d13 (diff) | |
download | kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.zip kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.tar.gz kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.tar.bz2 |
many phone AB sync fixes
-rw-r--r-- | kabc/phonenumber.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index e5abc0e..6e94c7e 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp | |||
@@ -59,36 +59,34 @@ bool PhoneNumber::operator==( const PhoneNumber &p ) const | |||
59 | if ( mType != p.mType ) return false; | 59 | if ( mType != p.mType ) return false; |
60 | 60 | ||
61 | return true; | 61 | return true; |
62 | } | 62 | } |
63 | 63 | ||
64 | bool PhoneNumber::operator!=( const PhoneNumber &p ) const | 64 | bool PhoneNumber::operator!=( const PhoneNumber &p ) const |
65 | { | 65 | { |
66 | return !( p == *this ); | 66 | return !( p == *this ); |
67 | } | 67 | } |
68 | 68 | ||
69 | bool PhoneNumber::simplifyNumber() | 69 | bool PhoneNumber::simplifyNumber() |
70 | { | 70 | { |
71 | QString Number; | 71 | QString Number; |
72 | int i; | 72 | int i; |
73 | Number = mNumber.stripWhiteSpace (); | 73 | Number = mNumber.stripWhiteSpace (); |
74 | mNumber = ""; | 74 | mNumber = ""; |
75 | if ( Number.at(0) == '+' ) | ||
76 | mNumber += "+"; | ||
77 | for ( i = 0; i < Number.length(); ++i) { | 75 | for ( i = 0; i < Number.length(); ++i) { |
78 | if ( Number.at(i).isDigit() ) | 76 | if ( Number.at(i).isDigit() || Number.at(i) == '+'|| Number.at(i) == '*'|| Number.at(i) == '#' ) |
79 | mNumber += Number.at(i); | 77 | mNumber += Number.at(i); |
80 | } | 78 | } |
81 | return ( mNumber.length() > 0 ); | 79 | return ( mNumber.length() > 0 ); |
82 | } | 80 | } |
83 | // make cellphone compatible | 81 | // make cellphone compatible |
84 | void PhoneNumber::simplifyType() | 82 | void PhoneNumber::simplifyType() |
85 | { | 83 | { |
86 | if ( mType & Fax ) mType = Fax; | 84 | if ( mType & Fax ) mType = Fax; |
87 | else if ( mType & Cell ) mType = Cell; | 85 | else if ( mType & Cell ) mType = Cell; |
88 | else if ( mType & Work ) mType = Work ; | 86 | else if ( mType & Work ) mType = Work ; |
89 | else if ( mType & Home ) mType = Home; | 87 | else if ( mType & Home ) mType = Home; |
90 | else mType = Pref; | 88 | else mType = Pref; |
91 | } | 89 | } |
92 | void PhoneNumber::setId( const QString &id ) | 90 | void PhoneNumber::setId( const QString &id ) |
93 | { | 91 | { |
94 | mId = id; | 92 | mId = id; |