small performance improvement for the removeAllSources case

This commit is contained in:
Aaron Seigo 2011-10-03 14:06:34 +02:00 committed by David Faure
parent 6ea166f2af
commit 81a320fe70

View File

@ -334,10 +334,10 @@ void DataEngine::removeAllSources()
QMutableHashIterator<QString, Plasma::DataContainer*> it(d->sources);
while (it.hasNext()) {
it.next();
const QString source = it.key();
Plasma::DataContainer *s = it.value();
it.remove();
emit sourceRemoved(source);
emit sourceRemoved(it.key());
s->disconnect(this);
delete s;
}
}