[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.
This commit is contained in:
Martin Gräßlin 2014-03-12 07:58:39 +01:00
parent d85f9971e0
commit 098620832a

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();