decorationbridge: Slight code cleanup
This commit is contained in:
parent
24168aebdb
commit
d8012cf00c
1 changed files with 2 additions and 3 deletions
|
@ -119,8 +119,7 @@ bool DecorationBridge::initPlugin()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
qCDebug(KWIN_DECORATIONS) << "Trying to load decoration plugin: " << metaData.fileName();
|
qCDebug(KWIN_DECORATIONS) << "Trying to load decoration plugin: " << metaData.fileName();
|
||||||
auto factoryResult = KPluginFactory::loadFactory(metaData);
|
if (auto factoryResult = KPluginFactory::loadFactory(metaData)) {
|
||||||
if (factoryResult) {
|
|
||||||
m_factory.reset(factoryResult.plugin);
|
m_factory.reset(factoryResult.plugin);
|
||||||
loadMetaData(metaData.rawData());
|
loadMetaData(metaData.rawData());
|
||||||
return true;
|
return true;
|
||||||
|
@ -241,7 +240,7 @@ KDecoration2::Decoration *DecorationBridge::createDecoration(Window *window)
|
||||||
if (!m_theme.isEmpty()) {
|
if (!m_theme.isEmpty()) {
|
||||||
args.insert(QStringLiteral("theme"), m_theme);
|
args.insert(QStringLiteral("theme"), m_theme);
|
||||||
}
|
}
|
||||||
auto deco = m_factory->create<KDecoration2::Decoration>(window, QVariantList({args}));
|
auto deco = m_factory->create<KDecoration2::Decoration>(window, QVariantList{args});
|
||||||
deco->setSettings(m_settings);
|
deco->setSettings(m_settings);
|
||||||
deco->init();
|
deco->init();
|
||||||
return deco;
|
return deco;
|
||||||
|
|
Loading…
Reference in a new issue