summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontact.cpp
Unidiff
Diffstat (limited to 'libopie/pim/ocontact.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index 96a5f65..a38b62b 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -926,57 +926,48 @@ QStringList OContact::fields()
926 return list; 926 return list;
927} 927}
928 928
929 929
930/*! 930/*!
931 Sets the list of email address for contact to those contained in \a str. 931 Sets the list of email address for contact to those contained in \a str.
932 Email address should be separated by ';'s. 932 Email address should be separated by ';'s.
933*/ 933*/
934void OContact::setEmails( const QString &str ) 934void OContact::setEmails( const QString &str )
935{ 935{
936 replace( Qtopia::Emails, str ); 936 replace( Qtopia::Emails, str );
937 if ( str.isEmpty() ) 937 if ( str.isEmpty() )
938 setDefaultEmail( QString::null ); 938 setDefaultEmail( QString::null );
939} 939}
940 940
941/*! 941/*!
942 Sets the list of children for the contact to those contained in \a str. 942 Sets the list of children for the contact to those contained in \a str.
943*/ 943*/
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 Returns TRUE if the contact matches the regular expression \a regexp.
951 Otherwise returns FALSE.
952*/
953bool OContact::match( const QString &regexp ) const
954{
955 return match(QRegExp(regexp));
956}
957
958/*!
959 \overload 950 \overload
960 Returns TRUE if the contact matches the regular expression \a regexp. 951 Returns TRUE if the contact matches the regular expression \a regexp.
961 Otherwise returns FALSE. 952 Otherwise returns FALSE.
962*/ 953*/
963bool OContact::match( const QRegExp &r ) const 954bool OContact::match( const QRegExp &r ) const
964{ 955{
965 bool match; 956 bool match;
966 match = false; 957 match = false;
967 QMap<int, QString>::ConstIterator it; 958 QMap<int, QString>::ConstIterator it;
968 for ( it = mMap.begin(); it != mMap.end(); ++it ) { 959 for ( it = mMap.begin(); it != mMap.end(); ++it ) {
969 if ( (*it).find( r ) > -1 ) { 960 if ( (*it).find( r ) > -1 ) {
970 match = true; 961 match = true;
971 break; 962 break;
972 } 963 }
973 } 964 }
974 return match; 965 return match;
975} 966}
976 967
977 968
978QString OContact::toShortText() const 969QString OContact::toShortText() const
979{ 970{
980 return ( fullName() ); 971 return ( fullName() );
981} 972}
982QString OContact::type() const 973QString OContact::type() const