summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressee.cpp3
-rw-r--r--kabc/phonenumber.cpp31
-rw-r--r--kabc/plugins/ldap/ldapE.pro2
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 \