summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
authorzautrix <zautrix>2005-08-22 15:42:41 (UTC)
committer zautrix <zautrix>2005-08-22 15:42:41 (UTC)
commit1d82d044bbdedd407f6d08305522187ffd256552 (patch) (unidiff)
tree08f5651d72548b643ed012e5f6ad938b36d1ae3f /kabc/addressee.cpp
parentf516a558e6d18982a54152b28ca3da78fe76e3fc (diff)
downloadkdepimpi-1d82d044bbdedd407f6d08305522187ffd256552.zip
kdepimpi-1d82d044bbdedd407f6d08305522187ffd256552.tar.gz
kdepimpi-1d82d044bbdedd407f6d08305522187ffd256552.tar.bz2
kapi search fix
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 155ce24..7e1e414 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -306,7 +306,32 @@ void Addressee::computeCsum(const QString &dev)
306 306
307 setCsum( dev, QString::number (cs )); 307 setCsum( dev, QString::number (cs ));
308} 308}
309bool Addressee::matchAddress( QRegExp* re ) const
310{
311 KABC::Address::List::Iterator addressIter;
312 for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end();
313 ++addressIter ) {
314 if ( (*addressIter).matchAddress( re ) )
315 return true;
316 }
317 return false;
318}
319bool Addressee::matchPhoneNumber( QRegExp* re ) const
320{
321 KABC::PhoneNumber::List::Iterator phoneIter;
322
323 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); ++phoneIter ) {
324#if QT_VERSION >= 0x030000
325 if (re->search( (*phoneIter).number() ) == 0)
326#else
327 if (re->match( (*phoneIter).number() ) == 0)
328#endif
329 return true;
309 330
331 }
332 return false;
333
334}
310void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) 335void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false)
311{ 336{
312 // merge all standard non-outlook fields. 337 // merge all standard non-outlook fields.