Diffstat (limited to 'libopie/pim/otodoaccessxml.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie/pim/otodoaccessxml.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index 3d15354..f688735 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp | |||
@@ -89,3 +89,3 @@ bool OTodoAccessXML::load() { | |||
89 | */ | 89 | */ |
90 | QAsciiDict<int> dict(21); | 90 | QAsciiDict<int> dict(26); |
91 | dict.setAutoDelete( TRUE ); | 91 | dict.setAutoDelete( TRUE ); |
@@ -838,6 +838,8 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, | |||
838 | void OTodoAccessXML::removeAllCompleted() { | 838 | void OTodoAccessXML::removeAllCompleted() { |
839 | QMap<int, OTodo> events = m_events; | ||
839 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { | 840 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { |
840 | if ( (*it).isCompleted() ) | 841 | if ( (*it).isCompleted() ) |
841 | m_events.remove( it ); | 842 | events.remove( it.key() ); |
842 | } | 843 | } |
844 | m_events = events; | ||
843 | } | 845 | } |