[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/D13118icc-effect-5.14.5
parent
54b69bec44
commit
95ee052442
|
@ -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 New Issue