summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontact.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/ocontact.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/ocontact.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index aeb69ee..a7ca975 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -944,24 +944,25 @@ void OContact::setEmails( const QString &str )
944void OContact::setChildren( const QString &str ) 944void OContact::setChildren( const QString &str )
945{ 945{
946 replace( Qtopia::Children, str ); 946 replace( Qtopia::Children, str );
947} 947}
948 948
949/*! 949/*!
950 \overload 950 \overload
951 Returns TRUE if the contact matches the regular expression \a regexp. 951 Returns TRUE if the contact matches the regular expression \a regexp.
952 Otherwise returns FALSE. 952 Otherwise returns FALSE.
953*/ 953*/
954bool OContact::match( const QRegExp &r ) const 954bool OContact::match( const QRegExp &r ) const
955{ 955{
956 setLastHitField( -1 );
956 bool match; 957 bool match;
957 match = false; 958 match = false;
958 QMap<int, QString>::ConstIterator it; 959 QMap<int, QString>::ConstIterator it;
959 for ( it = mMap.begin(); it != mMap.end(); ++it ) { 960 for ( it = mMap.begin(); it != mMap.end(); ++it ) {
960 if ( (*it).find( r ) > -1 ) { 961 if ( (*it).find( r ) > -1 ) {
961 setLastHitField( it.key() ); 962 setLastHitField( it.key() );
962 match = true; 963 match = true;
963 break; 964 break;
964 } 965 }
965 } 966 }
966 return match; 967 return match;
967} 968}