[effects/blur] Lookup window once when disconnecting from blurChanged
Summary: When disconnecting from `blurChanged` signal, `(w, connection)` pair is being looked up three times. We can do better by using `QMap` in a more STL-like way. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D13118
This commit is contained in:
parent
54b69bec44
commit
95ee052442
1 changed files with 5 additions and 3 deletions
|
@ -303,10 +303,12 @@ void BlurEffect::slotWindowAdded(EffectWindow *w)
|
|||
|
||||
void BlurEffect::slotWindowDeleted(EffectWindow *w)
|
||||
{
|
||||
if (windowBlurChangedConnections.contains(w)) {
|
||||
disconnect(windowBlurChangedConnections[w]);
|
||||
windowBlurChangedConnections.remove(w);
|
||||
auto it = windowBlurChangedConnections.find(w);
|
||||
if (it == windowBlurChangedConnections.end()) {
|
||||
return;
|
||||
}
|
||||
disconnect(*it);
|
||||
windowBlurChangedConnections.erase(it);
|
||||
}
|
||||
|
||||
void BlurEffect::slotPropertyNotify(EffectWindow *w, long atom)
|
||||
|
|
Loading…
Reference in a new issue