author | zautrix <zautrix> | 2004-10-29 21:05:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 21:05:07 (UTC) |
commit | 3c0edb4b4c4a77b334331749dfde776911c3a3a0 (patch) (side-by-side diff) | |
tree | 89de7078a1a062c19b2f13ededd49f471c362abf /kabc | |
parent | a7e2fe5bb10af47a239b8b014a210568cc79287a (diff) | |
download | kdepimpi-3c0edb4b4c4a77b334331749dfde776911c3a3a0.zip kdepimpi-3c0edb4b4c4a77b334331749dfde776911c3a3a0.tar.gz kdepimpi-3c0edb4b4c4a77b334331749dfde776911c3a3a0.tar.bz2 |
KO WN view fix
-rw-r--r-- | kabc/addressee.cpp | 3 | ||||
-rw-r--r-- | kabc/phonenumber.cpp | 31 | ||||
-rw-r--r-- | kabc/plugins/ldap/ldapE.pro | 2 |
3 files changed, 16 insertions, 20 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 028d3bb..eec0f1f 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -321,13 +321,14 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) found = true; (*it).setType( ( *phoneItAD ).type() ); (*it).setNumber( ( *phoneItAD ).number() ); break; } } - if ( isSubSet && ! found ) + // if ( isSubSet && ! found ) + if ( ! found ) // LR try this one... mData->phoneNumbers.append( *phoneItAD ); } if ( isSubSet ) { // ************* emails; t = mData->emails; tAD = ad.mData->emails; diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index 3d82553..abb3b3b 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp @@ -86,30 +86,25 @@ void PhoneNumber::simplifyType() else if ( mType & Work ) mType = Work ; else if ( mType & Home ) mType = Home; else mType = Pref; } bool PhoneNumber::contains( const PhoneNumber &p ) { - QString Number; - QString Num; - uint i; - Number = mNumber.stripWhiteSpace (); - Num = ""; - for ( i = 0; i < Number.length(); ++i) { - if ( Number.at(i).isDigit() || Number.at(i) == '+'|| Number.at(i) == '*'|| Number.at(i) == '#' ) - Num += Number.at(i); - } - QString NumberR; - QString NumR; - NumberR = p.mNumber.stripWhiteSpace (); - NumR = ""; - for ( i = 0; i < NumberR.length(); ++i) { - if ( NumberR.at(i).isDigit() || NumberR.at(i) == '+'|| NumberR.at(i) == '*'|| NumberR.at(i) == '#' ) - NumR += NumberR.at(i); - } - return (Num == NumR); + PhoneNumber myself; + PhoneNumber other; + myself = *this; + other = p; + myself.simplifyNumber(); + other.simplifyNumber(); + if ( myself.number() != other.number ()) + return false; + myself.simplifyType(); + other.simplifyType(); + if ( myself.type() == other.type()) + return true; + return false; } void PhoneNumber::setId( const QString &id ) { mId = id; } diff --git a/kabc/plugins/ldap/ldapE.pro b/kabc/plugins/ldap/ldapE.pro index df3c94c..57b6f84 100644 --- a/kabc/plugins/ldap/ldapE.pro +++ b/kabc/plugins/ldap/ldapE.pro @@ -4,13 +4,13 @@ CONFIG += qt warn_on release TARGET = microkabc_ldap INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lkamicrokabc +LIBS += -lmicrokde -lmicrokabc LIBS += -L$(QPEDIR)/lib INTERFACES = \ HEADERS = \ resourceldap.h \ |