author | eilers <eilers> | 2003-08-30 15:32:34 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-30 15:32:34 (UTC) |
commit | cfb97af8f45087e58d4b82689df22191bd657c34 (patch) (side-by-side diff) | |
tree | 9e01e85787092abb0d8c6733bbe3091eaf6a892a /core/pim/addressbook/ablabel.cpp | |
parent | 9f07321949f8baf1a64db0e4caec58041d3f775f (diff) | |
download | opie-cfb97af8f45087e58d4b82689df22191bd657c34.zip opie-cfb97af8f45087e58d4b82689df22191bd657c34.tar.gz opie-cfb97af8f45087e58d4b82689df22191bd657c34.tar.bz2 |
Speed optimization fix:
Startup and usability improved if a lot of contacts are stored. Left speed bootleneck is the xml
file..
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/ablabel.cpp | 7 |
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 @@ -71,10 +71,13 @@ 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; |