From 6c715b67a8f0e32a4edca5be91332622834c8d91 Mon Sep 17 00:00:00 2001 From: eilers Date: Fri, 01 Aug 2003 12:30:16 +0000 Subject: Merging changes from BRANCH_1_0 to HEAD --- (limited to 'libopie/pim/orecordlist.h') diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h index edcd729..5211f57 100644 --- a/libopie/pim/orecordlist.h +++ b/libopie/pim/orecordlist.h @@ -7,6 +7,7 @@ #include "otemplatebase.h" #include "opimrecord.h" +class ORecordListIteratorPrivate; /** * Our List Iterator * it behaves like STL or Qt @@ -71,9 +72,10 @@ private: bool m_direction :1; /* d pointer for future versions */ - class IteratorPrivate; - IteratorPrivate *d; + ORecordListIteratorPrivate *d; }; + +class ORecordListPrivate; /** * The recordlist used as a return type * from OPimAccessTemplate @@ -111,7 +113,7 @@ ORecordList( const QArray& ids, T operator[]( uint i ); int uidAt(uint i ); - /** + /** * Remove the contact with given uid */ bool remove( int uid ); @@ -123,6 +125,7 @@ ORecordList( const QArray& ids, private: QArray m_ids; const Base* m_acc; + ORecordListPrivate *d; }; /* ok now implement it */ @@ -220,6 +223,9 @@ ORecordListIterator::ORecordListIterator( const QArray uids, : m_uids( uids ), m_current( 0 ), m_temp( t ), m_end( false ), m_direction( false ) { + /* if the list is empty we're already at the end of the list */ + if (uids.count() == 0 ) + m_end = true; } template uint ORecordListIterator::current()const { -- cgit v0.9.0.2