Diffstat (limited to 'libopie/pim/odatebookaccessbackend_xml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/odatebookaccessbackend_xml.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libopie/pim/odatebookaccessbackend_xml.cpp b/libopie/pim/odatebookaccessbackend_xml.cpp index a0ae7b7..ab2eea4 100644 --- a/libopie/pim/odatebookaccessbackend_xml.cpp +++ b/libopie/pim/odatebookaccessbackend_xml.cpp | |||
@@ -565,24 +565,42 @@ void ODateBookAccessBackend_XML::setField( OEvent& e, int id, const QString& val | |||
565 | case FRecChildren:{ | 565 | case FRecChildren:{ |
566 | QStringList list = QStringList::split(' ', value ); | 566 | QStringList list = QStringList::split(' ', value ); |
567 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { | 567 | for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { |
568 | e.addChild( (*it).toInt() ); | 568 | e.addChild( (*it).toInt() ); |
569 | } | 569 | } |
570 | } | 570 | } |
571 | break; | 571 | break; |
572 | case FExceptions:{ | 572 | case FExceptions:{ |
573 | QStringList list = QStringList::split(' ', value ); | 573 | QStringList list = QStringList::split(' ', value ); |
574 | for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { | 574 | for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { |
575 | QDate date( (*it).left(4).toInt(), (*it).mid(4, 2).toInt(), (*it).right(2).toInt() ); | 575 | QDate date( (*it).left(4).toInt(), (*it).mid(4, 2).toInt(), (*it).right(2).toInt() ); |
576 | qWarning("adding exception %s", date.toString().latin1() ); | 576 | qWarning("adding exception %s", date.toString().latin1() ); |
577 | recur()->exceptions().append( date ); | 577 | recur()->exceptions().append( date ); |
578 | } | 578 | } |
579 | } | 579 | } |
580 | break; | 580 | break; |
581 | case FTimeZone: | 581 | case FTimeZone: |
582 | if ( value != "None" ) | 582 | if ( value != "None" ) |
583 | e.setTimeZone( value ); | 583 | e.setTimeZone( value ); |
584 | break; | 584 | break; |
585 | default: | 585 | default: |
586 | break; | 586 | break; |
587 | } | 587 | } |
588 | } | 588 | } |
589 | QArray<int> ODateBookAccessBackend_XML::matchRegexp( const QRegExp &r ) const | ||
590 | { | ||
591 | QArray<int> m_currentQuery( m_raw.count()+ m_rep.count() ); | ||
592 | uint arraycounter = 0; | ||
593 | QMap<int, OEvent>::ConstIterator it; | ||
594 | |||
595 | for ( it = m_raw.begin(); it != m_raw.end(); ++it ) | ||
596 | if ( it.data().match( r ) ) | ||
597 | m_currentQuery[arraycounter++] = it.data().uid(); | ||
598 | for ( it = m_rep.begin(); it != m_rep.end(); ++it ) | ||
599 | if ( it.data().match( r ) ) | ||
600 | m_currentQuery[arraycounter++] = it.data().uid(); | ||
601 | |||
602 | // Shrink to fit.. | ||
603 | m_currentQuery.resize(arraycounter); | ||
604 | |||
605 | return m_currentQuery; | ||
606 | } | ||