diff --git a/src/decorations/decorationbridge.cpp b/src/decorations/decorationbridge.cpp index 71d0a806a6..5ad3c191f5 100644 --- a/src/decorations/decorationbridge.cpp +++ b/src/decorations/decorationbridge.cpp @@ -119,8 +119,7 @@ bool DecorationBridge::initPlugin() return false; } qCDebug(KWIN_DECORATIONS) << "Trying to load decoration plugin: " << metaData.fileName(); - auto factoryResult = KPluginFactory::loadFactory(metaData); - if (factoryResult) { + if (auto factoryResult = KPluginFactory::loadFactory(metaData)) { m_factory.reset(factoryResult.plugin); loadMetaData(metaData.rawData()); return true; @@ -241,7 +240,7 @@ KDecoration2::Decoration *DecorationBridge::createDecoration(Window *window) if (!m_theme.isEmpty()) { args.insert(QStringLiteral("theme"), m_theme); } - auto deco = m_factory->create(window, QVariantList({args})); + auto deco = m_factory->create(window, QVariantList{args}); deco->setSettings(m_settings); deco->init(); return deco;