summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/ablabel.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 6d8de91..1914f71 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -68,16 +68,19 @@ OContact AbLabel::currentEntry()
}
bool AbLabel::selectContact( int UID )
{
- for ( m_itCurContact = m_viewList.begin(); m_itCurContact != m_viewList.end(); ++m_itCurContact){
- if ( (*m_itCurContact).uid() == UID )
+ for ( int r = 0; r < m_viewList.count(); ++r ) {
+ if ( m_viewList.uidAt( r ) == UID ){
+ m_itCurContact.setCurrent( r );
break;
}
+ }
+
sync();
return true;
}