phonebookui/cnthistorymodel/src/cnthistorymodel.cpp
changeset 37 fd64c38c277d
parent 31 2a11b5b00470
child 40 b46a585f6909
--- a/phonebookui/cnthistorymodel/src/cnthistorymodel.cpp	Fri May 14 15:42:23 2010 +0300
+++ b/phonebookui/cnthistorymodel/src/cnthistorymodel.cpp	Thu May 27 12:45:19 2010 +0300
@@ -416,12 +416,15 @@
         HItemPointer item = d->m_logsMap.value( i );
         int index = d->m_List.indexOf( item );
         if ( index > -1 ) {
-            d->m_List.removeAt( index );
             d->m_logsMap.remove( i );        
             indices.append( index );
         }
     }
     
+    foreach(int i, indices) {
+        d->m_List.removeAt( i );
+    }
+    
     // Remove list items in batches
     if ( !indices.isEmpty() ) {
         QList< QList<int> > batches = findIndices(indices);