a little more conservative

svn path=/trunk/KDE/kdelibs/; revision=1122507
This commit is contained in:
Aaron J. Seigo 2010-05-04 03:28:09 +00:00
parent 29503066dd
commit 2213c2e77b

View File

@ -341,9 +341,11 @@ 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();
emit sourceRemoved(it.key()); const QString source = it.key();
delete it.value(); Plasma::DataContainer *s = it.value();
it.remove(); it.remove();
emit sourceRemoved(source);
delete s;
} }
} }