[kwin/oxygen] Add context object to lambda connections in Oxygen::Factory

The connect is from the KDecorationOptions which lives longer than the
factory, thus the lambda might be invoked after the Factory got
destroyed. Adding the context object protects against that.
icc-effect-5.14.5
Martin Gräßlin 2014-03-12 07:58:39 +01:00
parent d85f9971e0
commit 098620832a
1 changed files with 2 additions and 2 deletions

View File

@ -48,10 +48,10 @@ namespace Oxygen
{
readConfig();
setInitialized( true );
connect(options(), &KDecorationOptions::colorsChanged, [this]() {
connect(options(), &KDecorationOptions::colorsChanged, this, [this]() {
_shadowCache.invalidateCaches();
});
connect(options(), &KDecorationOptions::configChanged, [this]() {
connect(options(), &KDecorationOptions::configChanged, this, [this]() {
// read in the configuration
setInitialized( false );
readConfig();