-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 for ( it = mMap.begin(); it != mMap.end(); ++it ) { if ( (*it).find( r ) > -1 ) { + setLastHitField( it.key() ); match = true; 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: QString emails() const { return find( Qtopia::Emails ); } static int rtti(); - + int lastHitField() const {return m_lastHitField;}; +protected: + mutable int m_lastHitField; + void setLastHitField(int i) const { m_lastHitField = i; }; 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 for ( it = mMap.begin(); it != mMap.end(); ++it ) { if ( (*it).find( r ) > -1 ) { + setLastHitField( it.key() ); match = true; 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: QString emails() const { return find( Qtopia::Emails ); } static int rtti(); - + int lastHitField() const {return m_lastHitField;}; +protected: + mutable int m_lastHitField; + void setLastHitField(int i) const { m_lastHitField = i; }; private: |