Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 285d2b8..69b7ab4 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp @@ -761,16 +761,32 @@ void OTodoAccessXML::removeAllCompleted() { } QBitArray OTodoAccessXML::supports()const { static QBitArray ar = sup(); return ar; } QBitArray OTodoAccessXML::sup() { QBitArray ar( OTodo::CompletedDate +1 ); ar.fill( true ); ar[OTodo::CrossReference] = false; ar[OTodo::State ] = false; ar[OTodo::Reminders] = false; ar[OTodo::Notifiers] = false; ar[OTodo::Maintainer] = false; 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; +} |