Commit 19771d84 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[kstyle] Properly unregister widgets in ShadowHelper

After a widget has been unregistered, a WinIdChange event may be sent.
If that happens, ShadowHelper is going to try to install a shadow for
the corresponding widget. Obviously, this is wrong.

Test Plan:
Added a qDebug in ~ShadowHelper to ensure that _shadows is

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 1c3884a7
......@@ -104,7 +104,16 @@ namespace Oxygen
void ShadowHelper::unregisterWidget( QWidget* widget )
if( _widgets.remove( widget ) )
{ uninstallShadows( widget ); }
// uninstall the event filter
widget->removeEventFilter( this );
// disconnect all signals
disconnect( widget, nullptr, this, nullptr );
// uninstall the shadow
uninstallShadows( widget );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment