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 | |
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-- | libopie/pim/ocontact.cpp | 1 | ||||
-rw-r--r-- | libopie/pim/ocontact.h | 5 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 1 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.h | 5 |
4 files changed, 10 insertions, 2 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index a38b62b..aeb69ee 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -959,4 +959,5 @@ bool OContact::match( const QRegExp &r ) const | |||
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; |
diff --git a/libopie/pim/ocontact.h b/libopie/pim/ocontact.h index 0e6cbd2..f79f0f3 100644 --- a/libopie/pim/ocontact.h +++ b/libopie/pim/ocontact.h | |||
@@ -215,5 +215,8 @@ public: | |||
215 | QString emails() const { return find( Qtopia::Emails ); } | 215 | QString emails() const { return find( Qtopia::Emails ); } |
216 | static int rtti(); | 216 | static int rtti(); |
217 | 217 | int lastHitField() const {return m_lastHitField;}; | |
218 | protected: | ||
219 | mutable int m_lastHitField; | ||
220 | void setLastHitField(int i) const { m_lastHitField = i; }; | ||
218 | 221 | ||
219 | private: | 222 | private: |
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 | |||
@@ -959,4 +959,5 @@ bool OContact::match( const QRegExp &r ) const | |||
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; |
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h index 0e6cbd2..f79f0f3 100644 --- a/libopie2/opiepim/ocontact.h +++ b/libopie2/opiepim/ocontact.h | |||
@@ -215,5 +215,8 @@ public: | |||
215 | QString emails() const { return find( Qtopia::Emails ); } | 215 | QString emails() const { return find( Qtopia::Emails ); } |
216 | static int rtti(); | 216 | static int rtti(); |
217 | 217 | int lastHitField() const {return m_lastHitField;}; | |
218 | protected: | ||
219 | mutable int m_lastHitField; | ||
220 | void setLastHitField(int i) const { m_lastHitField = i; }; | ||
218 | 221 | ||
219 | private: | 222 | private: |