diff --git a/autotests/integration/fakes/org.kde.kdecoration2/fakedecoration_with_shadows.cpp b/autotests/integration/fakes/org.kde.kdecoration2/fakedecoration_with_shadows.cpp index f68d0cb8eb..751fc6d832 100644 --- a/autotests/integration/fakes/org.kde.kdecoration2/fakedecoration_with_shadows.cpp +++ b/autotests/integration/fakes/org.kde.kdecoration2/fakedecoration_with_shadows.cpp @@ -30,7 +30,7 @@ public: } public Q_SLOTS: - void init() override + bool init() override { const int shadowSize = 128; const int offsetTop = 64; @@ -52,6 +52,7 @@ public Q_SLOTS: decoShadow->setShadow(shadowTexture); setShadow(decoShadow); + return true; } }; diff --git a/src/plugins/kdecorations/aurorae/src/aurorae.cpp b/src/plugins/kdecorations/aurorae/src/aurorae.cpp index e38f795b24..2d7011c474 100644 --- a/src/plugins/kdecorations/aurorae/src/aurorae.cpp +++ b/src/plugins/kdecorations/aurorae/src/aurorae.cpp @@ -239,10 +239,9 @@ Decoration::~Decoration() Helper::instance().unref(); } -void Decoration::init() +bool Decoration::init() { Helper::instance().rootContext()->setContextProperty(QStringLiteral("decorationSettings"), settings().get()); - KDecoration2::Decoration::init(); auto s = settings(); connect(s.get(), &KDecoration2::DecorationSettings::reconfigured, this, &Decoration::configChanged); @@ -250,7 +249,7 @@ void Decoration::init() m_qmlContext->setContextProperty(QStringLiteral("decoration"), this); auto component = Helper::instance().component(m_themeName); if (!component) { - return; + return false; } if (component == Helper::instance().svgComponent()) { // load SVG theme @@ -281,7 +280,7 @@ void Decoration::init() qCWarning(AURORAE) << error; } } - return; + return false; } QVariant visualParent = property("visualParent"); @@ -353,6 +352,7 @@ void Decoration::init() setShadow(s); } } + return true; } QVariant Decoration::readConfig(const QString &key, const QVariant &defaultValue) diff --git a/src/plugins/kdecorations/aurorae/src/aurorae.h b/src/plugins/kdecorations/aurorae/src/aurorae.h index e86809239b..2bda54aeba 100644 --- a/src/plugins/kdecorations/aurorae/src/aurorae.h +++ b/src/plugins/kdecorations/aurorae/src/aurorae.h @@ -44,7 +44,7 @@ public: QQuickItem *item() const; public Q_SLOTS: - void init() override; + bool init() override; void installTitleItem(QQuickItem *item); void updateShadow();