author | zautrix <zautrix> | 2004-09-21 07:05:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-21 07:05:01 (UTC) |
commit | 434ddaa08e0a650422ef271332a1d11879028095 (patch) (unidiff) | |
tree | e4f229120d8bfa9febb7ab123b1311329f0e6aa4 /kabc/addressee.cpp | |
parent | ed49c55dac215ac2ed9286ebfc36e5a19417f0bb (diff) | |
download | kdepimpi-434ddaa08e0a650422ef271332a1d11879028095.zip kdepimpi-434ddaa08e0a650422ef271332a1d11879028095.tar.gz kdepimpi-434ddaa08e0a650422ef271332a1d11879028095.tar.bz2 |
DTM sync fixes
-rw-r--r-- | kabc/addressee.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index e241281..31ce1d6 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -45,2 +45,4 @@ using namespace KABC; | |||
45 | static bool matchBinaryPattern( int value, int pattern ); | 45 | static bool matchBinaryPattern( int value, int pattern ); |
46 | static bool matchBinaryPatternA( int value, int pattern ); | ||
47 | static bool matchBinaryPatternP( int value, int pattern ); | ||
46 | 48 | ||
@@ -383,3 +385,3 @@ void Addressee::setOriginalExternalUID( const QString &id ) | |||
383 | mData->empty = false; | 385 | mData->empty = false; |
384 | qDebug("*******Set orig uid %s ", id.latin1()); | 386 | //qDebug("*******Set orig uid %s ", id.latin1()); |
385 | mData->originalExternalUID = id; | 387 | mData->originalExternalUID = id; |
@@ -396,3 +398,3 @@ void Addressee::setUid( const QString &id ) | |||
396 | detach(); | 398 | detach(); |
397 | qDebug("****setuid %s ", id.latin1()); | 399 | //qDebug("****setuid %s ", id.latin1()); |
398 | mData->empty = false; | 400 | mData->empty = false; |
@@ -1292,3 +1294,3 @@ PhoneNumber Addressee::phoneNumber( int type ) const | |||
1292 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { | 1294 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { |
1293 | if ( matchBinaryPattern( (*it).type(), type ) ) { | 1295 | if ( matchBinaryPatternP( (*it).type(), type ) ) { |
1294 | if ( (*it).type() & PhoneNumber::Pref ) | 1296 | if ( (*it).type() & PhoneNumber::Pref ) |
@@ -1529,3 +1531,3 @@ Address Addressee::address( int type ) const | |||
1529 | for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { | 1531 | for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { |
1530 | if ( matchBinaryPattern( (*it).type(), type ) ) { | 1532 | if ( matchBinaryPatternA( (*it).type(), type ) ) { |
1531 | if ( (*it).type() & Address::Pref ) | 1533 | if ( (*it).type() & Address::Pref ) |
@@ -1837,3 +1839,2 @@ QDataStream &KABC::operator>>( QDataStream &s, Addressee &a ) | |||
1837 | } | 1839 | } |
1838 | |||
1839 | bool matchBinaryPattern( int value, int pattern ) | 1840 | bool matchBinaryPattern( int value, int pattern ) |
@@ -1851 +1852,18 @@ bool matchBinaryPattern( int value, int pattern ) | |||
1851 | } | 1852 | } |
1853 | |||
1854 | bool matchBinaryPatternP( int value, int pattern ) | ||
1855 | { | ||
1856 | |||
1857 | if ( pattern == 0 ) | ||
1858 | return ( value == 0 ); | ||
1859 | else | ||
1860 | return ( (pattern |PhoneNumber::Pref ) == ( value |PhoneNumber::Pref ) ); | ||
1861 | } | ||
1862 | bool matchBinaryPatternA( int value, int pattern ) | ||
1863 | { | ||
1864 | |||
1865 | if ( pattern == 0 ) | ||
1866 | return ( value == 0 ); | ||
1867 | else | ||
1868 | return ( (pattern | Address::Pref) == ( value | Address::Pref ) ); | ||
1869 | } | ||