author | tille <tille> | 2003-05-14 14:19:22 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-14 14:19:22 (UTC) |
commit | 3c4a67b8b8d3fb554c5259f9f5ca35c5c826b13c (patch) (unidiff) | |
tree | 2d2ab90c571dfa51bb65116d4df0134b65750084 /libopie2/opiepim/ocontact.cpp | |
parent | 79fdef27944117811eb1ef51c45a0a630b85a9ad (diff) | |
download | opie-3c4a67b8b8d3fb554c5259f9f5ca35c5c826b13c.zip opie-3c4a67b8b8d3fb554c5259f9f5ca35c5c826b13c.tar.gz opie-3c4a67b8b8d3fb554c5259f9f5ca35c5c826b13c.tar.bz2 |
get the field where the hit was
-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 a38b62b..aeb69ee 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -937,48 +937,49 @@ void OContact::setEmails( const QString &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 | bool match; | 956 | bool match; |
957 | match = false; | 957 | match = false; |
958 | QMap<int, QString>::ConstIterator it; | 958 | QMap<int, QString>::ConstIterator it; |
959 | for ( it = mMap.begin(); it != mMap.end(); ++it ) { | 959 | for ( it = mMap.begin(); it != mMap.end(); ++it ) { |
960 | if ( (*it).find( r ) > -1 ) { | 960 | if ( (*it).find( r ) > -1 ) { |
961 | setLastHitField( it.key() ); | ||
961 | match = true; | 962 | match = true; |
962 | break; | 963 | break; |
963 | } | 964 | } |
964 | } | 965 | } |
965 | return match; | 966 | return match; |
966 | } | 967 | } |
967 | 968 | ||
968 | 969 | ||
969 | QString OContact::toShortText() const | 970 | QString OContact::toShortText() const |
970 | { | 971 | { |
971 | return ( fullName() ); | 972 | return ( fullName() ); |
972 | } | 973 | } |
973 | QString OContact::type() const | 974 | QString OContact::type() const |
974 | { | 975 | { |
975 | return QString::fromLatin1( "OContact" ); | 976 | return QString::fromLatin1( "OContact" ); |
976 | } | 977 | } |
977 | 978 | ||
978 | // Definition is missing ! (se) | 979 | // Definition is missing ! (se) |
979 | QMap<QString,QString> OContact::toExtraMap() const | 980 | QMap<QString,QString> OContact::toExtraMap() const |
980 | { | 981 | { |
981 | qWarning ("Function not implemented: OContact::toExtraMap()"); | 982 | qWarning ("Function not implemented: OContact::toExtraMap()"); |
982 | QMap <QString,QString> useless; | 983 | QMap <QString,QString> useless; |
983 | return useless; | 984 | return useless; |
984 | } | 985 | } |