22int QgsChunkList::trueCount()
 const 
   25  QgsChunkListEntry *entry = mHead;
 
   34void QgsChunkList::insertEntry( QgsChunkListEntry *entry, QgsChunkListEntry *next )
 
   38    Q_ASSERT( next == 
nullptr );
 
   39    mTail = mHead = entry;
 
   44    if ( next == 
nullptr )
 
   52      entry->prev = next->prev;
 
   61void QgsChunkList::takeEntry( QgsChunkListEntry *entry )
 
   65  if ( !entry->prev && !entry->next )
 
   68    Q_ASSERT( mHead == entry && mTail == entry );
 
   69    mHead = mTail = 
nullptr;
 
   71  else if ( !entry->prev )
 
   74    Q_ASSERT( mHead == entry );
 
   75    entry->next->prev = 
nullptr;
 
   77    entry->next = 
nullptr;
 
   79  else if ( !entry->next )
 
   82    Q_ASSERT( mTail == entry );
 
   83    entry->prev->next = 
nullptr;
 
   85    entry->prev = 
nullptr;
 
   90    entry->prev->next = entry->next;
 
   91    entry->next->prev = entry->prev;
 
   92    entry->next = 
nullptr;
 
   93    entry->prev = 
nullptr;
 
   96  Q_ASSERT( !entry->prev );
 
   97  Q_ASSERT( !entry->next );
 
  100QgsChunkListEntry *QgsChunkList::takeFirst()
 
  102  QgsChunkListEntry *entry = mHead;
 
  107QgsChunkListEntry *QgsChunkList::takeLast()
 
  109  QgsChunkListEntry *entry = mTail;
 
  114void QgsChunkList::insertFirst( QgsChunkListEntry *entry )
 
  116  insertEntry( entry, mHead );
 
  119void QgsChunkList::insertLast( QgsChunkListEntry *entry )
 
  121  insertEntry( entry, 
nullptr );
 
  124bool QgsChunkList::isEmpty()
 const 
  126  return mHead == 
nullptr;