From 0cb4111d34d9fe96731f48983e1ff2e67262db02 Mon Sep 17 00:00:00 2001 From: tille Date: Thu, 08 May 2003 13:55:09 +0000 Subject: search stuff and match, toRichText & toShortText in oevent --- (limited to 'libopie/pim/otodoaccessxml.cpp') 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 @@ -774,3 +774,19 @@ QBitArray OTodoAccessXML::sup() { return ar; } +QArray OTodoAccessXML::matchRegexp( const QRegExp &r ) const +{ + QArray m_currentQuery( m_events.count() ); + uint arraycounter = 0; + + QMap::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; +} -- cgit v0.9.0.2