small performance improvement for the removeAllSources case
This commit is contained in:
parent
6ea166f2af
commit
81a320fe70
@ -334,10 +334,10 @@ void DataEngine::removeAllSources()
|
|||||||
QMutableHashIterator<QString, Plasma::DataContainer*> it(d->sources);
|
QMutableHashIterator<QString, Plasma::DataContainer*> it(d->sources);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
const QString source = it.key();
|
|
||||||
Plasma::DataContainer *s = it.value();
|
Plasma::DataContainer *s = it.value();
|
||||||
it.remove();
|
it.remove();
|
||||||
emit sourceRemoved(source);
|
emit sourceRemoved(it.key());
|
||||||
|
s->disconnect(this);
|
||||||
delete s;
|
delete s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user