summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
Side-by-side diff
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
@@ -308,3 +308,28 @@ void Addressee::computeCsum(const QString &dev)
}
+bool Addressee::matchAddress( QRegExp* re ) const
+{
+ KABC::Address::List::Iterator addressIter;
+ for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end();
+ ++addressIter ) {
+ if ( (*addressIter).matchAddress( re ) )
+ return true;
+ }
+ return false;
+}
+bool Addressee::matchPhoneNumber( QRegExp* re ) const
+{
+ KABC::PhoneNumber::List::Iterator phoneIter;
+
+ for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); ++phoneIter ) {
+#if QT_VERSION >= 0x030000
+ if (re->search( (*phoneIter).number() ) == 0)
+#else
+ if (re->match( (*phoneIter).number() ) == 0)
+#endif
+ return true;
+ }
+ return false;
+
+}
void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false)