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:
parent
e817ea81f5
commit
240a1632a9
@ -636,9 +636,10 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool
|
|||||||
void DataEnginePrivate::trimQueue()
|
void DataEnginePrivate::trimQueue()
|
||||||
{
|
{
|
||||||
uint queueCount = sourceQueue.count();
|
uint queueCount = sourceQueue.count();
|
||||||
while (queueCount >= limit) {
|
while (queueCount >= limit && !sourceQueue.isEmpty()) {
|
||||||
DataContainer *punted = sourceQueue.dequeue();
|
DataContainer *punted = sourceQueue.dequeue();
|
||||||
q->removeSource(punted->objectName());
|
q->removeSource(punted->objectName());
|
||||||
|
queueCount = sourceQueue.count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user