summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontact.cpp1
-rw-r--r--libopie2/opiepim/ocontact.h5
2 files changed, 5 insertions, 1 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
@@ -958,6 +958,7 @@ bool OContact::match( const QRegExp &r ) const
QMap<int, QString>::ConstIterator it;
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
@@ -214,7 +214,10 @@ public:
void setEmails( const QString &v );
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:
// The XML-Backend needs some access to the private functions