actually need to update queueCount otherwise we just go until we run out of sources and an assert due to dequeuing an empty stack. whoops.

svn path=/trunk/KDE/kdelibs/; revision=914768
This commit is contained in:
Aaron J. Seigo 2009-01-21 18:23:10 +00:00
parent e817ea81f5
commit 240a1632a9

View File

@ -636,9 +636,10 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
void DataEnginePrivate::trimQueue()
{
uint queueCount = sourceQueue.count();
while (queueCount >= limit) {
while (queueCount >= limit && !sourceQueue.isEmpty()) {
DataContainer *punted = sourceQueue.dequeue();
q->removeSource(punted->objectName());
queueCount = sourceQueue.count();
}
}