[dataengine] Emit sourceRemoved earlier
Emit `sourceRemoved` before source is actually removed, so that visualization has a chance to disconnect itself. BUG: 436350 BUG: 436180 CCBUG: 435991
This commit is contained in:
parent
950a78f225
commit
5984d4960f
@ -287,10 +287,10 @@ void DataEngine::removeSource(const QString &source)
|
||||
if (it != d->sources.end()) {
|
||||
DataContainer *s = it.value();
|
||||
s->d->store();
|
||||
Q_EMIT sourceRemoved(source);
|
||||
d->sources.erase(it);
|
||||
s->disconnect(this);
|
||||
s->deleteLater();
|
||||
Q_EMIT sourceRemoved(source);
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,10 +301,10 @@ void DataEngine::removeAllSources()
|
||||
it.next();
|
||||
Plasma::DataContainer *s = it.value();
|
||||
const QString source = it.key();
|
||||
Q_EMIT sourceRemoved(source);
|
||||
it.remove();
|
||||
s->disconnect(this);
|
||||
s->deleteLater();
|
||||
Q_EMIT sourceRemoved(source);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user