author | zecke <zecke> | 2003-05-07 15:26:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-05-07 15:26:59 (UTC) |
commit | e150dfd5151aa59eb373aa58df5d9644c6c65b52 (patch) (unidiff) | |
tree | 4cbc036ef9bfc51d9938d6ff6a433081c0b400b8 /libopie2/opiepim/backend/otodoaccessxml.cpp | |
parent | 1a550df3248342a8c863951ba733b862ca222216 (diff) | |
download | opie-e150dfd5151aa59eb373aa58df5d9644c6c65b52.zip opie-e150dfd5151aa59eb373aa58df5d9644c6c65b52.tar.gz opie-e150dfd5151aa59eb373aa58df5d9644c6c65b52.tar.bz2 |
Make it possible to see what a backend supports
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccessxml.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 71e8787..55f268b 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -643,33 +643,47 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, | |||
643 | qWarning("item is not overdue but bOnly checked"); | 643 | qWarning("item is not overdue but bOnly checked"); |
644 | continue; | 644 | continue; |
645 | } | 645 | } |
646 | 646 | ||
647 | if ((*it).isCompleted() && comp ) { | 647 | if ((*it).isCompleted() && comp ) { |
648 | qWarning("completed continue!"); | 648 | qWarning("completed continue!"); |
649 | continue; | 649 | continue; |
650 | } | 650 | } |
651 | 651 | ||
652 | 652 | ||
653 | OTodoXMLContainer* con = new OTodoXMLContainer(); | 653 | OTodoXMLContainer* con = new OTodoXMLContainer(); |
654 | con->todo = (*it); | 654 | con->todo = (*it); |
655 | vector.insert(item, con ); | 655 | vector.insert(item, con ); |
656 | item++; | 656 | item++; |
657 | } | 657 | } |
658 | qWarning("XXX %d Items added", item); | 658 | qWarning("XXX %d Items added", item); |
659 | vector.resize( item ); | 659 | vector.resize( item ); |
660 | /* sort it now */ | 660 | /* sort it now */ |
661 | vector.sort(); | 661 | vector.sort(); |
662 | /* now get the uids */ | 662 | /* now get the uids */ |
663 | QArray<int> array( vector.count() ); | 663 | QArray<int> array( vector.count() ); |
664 | for (uint i= 0; i < vector.count(); i++ ) { | 664 | for (uint i= 0; i < vector.count(); i++ ) { |
665 | array[i] = ( vector.at(i) )->todo.uid(); | 665 | array[i] = ( vector.at(i) )->todo.uid(); |
666 | } | 666 | } |
667 | qWarning("array count = %d %d", array.count(), vector.count() ); | ||
668 | return array; | 667 | return array; |
669 | }; | 668 | }; |
670 | void OTodoAccessXML::removeAllCompleted() { | 669 | void OTodoAccessXML::removeAllCompleted() { |
671 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { | 670 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { |
672 | if ( (*it).isCompleted() ) | 671 | if ( (*it).isCompleted() ) |
673 | m_events.remove( it ); | 672 | m_events.remove( it ); |
674 | } | 673 | } |
675 | } | 674 | } |
675 | QBitArray OTodoAccessXML::supports()const { | ||
676 | static QBitArray ar = sup(); | ||
677 | return ar; | ||
678 | } | ||
679 | QBitArray OTodoAccessXML::sup() { | ||
680 | QBitArray ar( OTodo::CompletedDate +1 ); | ||
681 | ar.fill( true ); | ||
682 | ar[OTodo::CrossReference] = false; | ||
683 | ar[OTodo::State ] = false; | ||
684 | ar[OTodo::Reminders] = false; | ||
685 | ar[OTodo::Notifiers] = false; | ||
686 | ar[OTodo::Maintainer] = false; | ||
687 | |||
688 | return ar; | ||
689 | } | ||