Diffstat (limited to 'libopie2/opiepim/ocontact.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 1 |
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 | |||
@@ -932,48 +932,49 @@ QStringList OContact::fields() | |||
932 | Email address should be separated by ';'s. | 932 | Email address should be separated by ';'s. |
933 | */ | 933 | */ |
934 | void OContact::setEmails( const QString &str ) | 934 | void 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 | */ |
944 | void OContact::setChildren( const QString &str ) | 944 | void 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 | */ |
954 | bool OContact::match( const QRegExp &r ) const | 954 | bool 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 | } |
968 | 969 | ||
969 | 970 | ||
970 | QString OContact::toShortText() const | 971 | QString OContact::toShortText() const |
971 | { | 972 | { |
972 | return ( fullName() ); | 973 | return ( fullName() ); |
973 | } | 974 | } |
974 | QString OContact::type() const | 975 | QString OContact::type() const |
975 | { | 976 | { |
976 | return QString::fromLatin1( "OContact" ); | 977 | return QString::fromLatin1( "OContact" ); |
977 | } | 978 | } |
978 | 979 | ||
979 | // Definition is missing ! (se) | 980 | // Definition is missing ! (se) |