Commit c16f777b authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Fix FIFO usage

`m_propriorityQueue` and `m_queue` are used as FIFO queues, so we need
to use `takeFirst()` instead of `takeLast()` when removing elements
from the queue.

While at it, add a comment so that we will remember these are FIFO
parent 664f97ff
......@@ -104,7 +104,7 @@ void KDirectoryContentsCounter::slotResult(const QString& path, int count, long
if (!m_priorityQueue.isEmpty()) {
} else if (!m_queue.isEmpty()) {
......@@ -72,6 +72,7 @@ private:
KFileItemModel* m_model;
// Used as FIFO queues.
QLinkedList<QString> m_priorityQueue;
QLinkedList<QString> m_queue;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment