Diffstat (limited to 'libopie/pim/otodoaccessxml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/otodoaccessxml.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index 285d2b8..69b7ab4 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp @@ -775,2 +775,18 @@ QBitArray OTodoAccessXML::sup() { return ar; } +QArray<int> OTodoAccessXML::matchRegexp( const QRegExp &r ) const +{ + QArray<int> m_currentQuery( m_events.count() ); + uint arraycounter = 0; + + QMap<int, OTodo>::ConstIterator it; + for (it = m_events.begin(); it != m_events.end(); ++it ) { + if ( it.data().match( r ) ) + m_currentQuery[arraycounter++] = it.data().uid(); + + } + // Shrink to fit.. + m_currentQuery.resize(arraycounter); + + return m_currentQuery; +} |