-rw-r--r-- | libopie/pim/orecordlist.h | 10 |
1 files changed, 8 insertions, 2 deletions
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 @@ -6,8 +6,9 @@ #include "otemplatebase.h" #include "opimrecord.h" +class ORecordListIteratorPrivate; /** * Our List Iterator * it behaves like STL or Qt * @@ -70,11 +71,12 @@ private: T m_record; 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 */ @@ -122,8 +124,9 @@ ORecordList( const QArray<int>& ids, */ private: QArray<int> m_ids; const Base* m_acc; + ORecordListPrivate *d; }; /* ok now implement it */ template <class T> @@ -219,8 +222,11 @@ ORecordListIterator<T>::ORecordListIterator( const QArray<int> uids, const Base* t ) : 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 <class T> uint ORecordListIterator<T>::current()const { return m_current; |