summaryrefslogtreecommitdiff
path: root/libopie/pim/orecordlist.h
Side-by-side diff
Diffstat (limited to 'libopie/pim/orecordlist.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/orecordlist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h
index 2f4a5d3..8ed41e2 100644
--- a/libopie/pim/orecordlist.h
+++ b/libopie/pim/orecordlist.h
@@ -189,97 +189,97 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator++() {
template <class T>
ORecordListIterator<T> &ORecordListIterator<T>::operator--() {
m_direction = false;
if ( m_current > 0 ) {
--m_current;
m_end = false;
} else
m_end = true;
return *this;
}
template <class T>
bool ORecordListIterator<T>::operator==( const ORecordListIterator<T>& it ) {
/* if both are at we're the same.... */
if ( m_end == it.m_end ) return true;
if ( m_uids != it.m_uids ) return false;
if ( m_current != it.m_current ) return false;
if ( m_temp != it.m_temp ) return false;
return true;
}
template <class T>
bool ORecordListIterator<T>::operator!=( const ORecordListIterator<T>& it ) {
return !(*this == it );
}
template <class T>
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 )
{
}
template <class T>
uint ORecordListIterator<T>::current()const {
return m_current;
}
template <class T>
void ORecordListIterator<T>::setCurrent( uint cur ) {
if( cur < m_uids.count() ) {
m_end = false;
m_current= cur;
}
}
template <class T>
uint ORecordListIterator<T>::count()const {
- return m_uids.count();
+ return m_uids.count();
}
template <class T>
ORecordList<T>::ORecordList( const QArray<int>& ids,
const Base* acc )
: m_ids( ids ), m_acc( acc )
{
}
template <class T>
ORecordList<T>::~ORecordList() {
/* nothing to do here */
}
template <class T>
ORecordList<T>::Iterator ORecordList<T>::begin() {
Iterator it( m_ids, m_acc );
return it;
}
template <class T>
ORecordList<T>::Iterator ORecordList<T>::end() {
Iterator it( m_ids, m_acc );
it.m_end = true;
it.m_current = m_ids.count();
return it;
}
template <class T>
uint ORecordList<T>::count()const {
return m_ids.count();
}
template <class T>
T ORecordList<T>::operator[]( uint i ) {
if ( i < 0 || (i+1) > m_ids.count() )
return T();
/* forward */
return m_acc->find( m_ids[i], m_ids, i );
}
template <class T>
int ORecordList<T>::uidAt( uint i ) {
return m_ids[i];
}
template <class T>
bool ORecordList<T>::remove( int uid ) {
QArray<int> copy( m_ids.count() );
int counter = 0;
bool ret_val = false;
for (uint i = 0; i < m_ids.count(); i++){
if ( m_ids[i] != uid ){