diff --git a/shell/main.cpp b/shell/main.cpp index 9c9dc3c2d..ff56a6e95 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -115,6 +115,8 @@ int main(int argc, char *argv[]) const QString defaultShell = startupConfGroup.readEntry("ShellPackage", qEnvironmentVariable("PLASMA_DEFAULT_SHELL", "org.kde.plasma.desktop")); bool replace = false; + + ShellCorona *corona; { QCommandLineParser cliOptions; @@ -163,7 +165,7 @@ int main(int argc, char *argv[]) QObject::connect(&app, &QGuiApplication::commitDataRequest, disableSessionManagement); QObject::connect(&app, &QGuiApplication::saveStateRequest, disableSessionManagement); - ShellCorona *corona = new ShellCorona(&app); + corona = new ShellCorona(&app); corona->setShell(cliOptions.value(shellPluginOption)); if (!corona->kPackage().isValid()) { qCritical() << "starting invalid corona" << corona->shell(); @@ -246,6 +248,7 @@ int main(int argc, char *argv[]) KDBusService service(KDBusService::Unique | KDBusService::StartupOption(replace ? KDBusService::Replace : 0)); + corona->init(); SoftwareRendererNotifier::notifyIfRelevant(); return app.exec(); diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp index 1f7dd5b1b..4c739b7ca 100644 --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -108,7 +108,10 @@ ShellCorona::ShellCorona(QObject *parent) if (!packageName.isEmpty()) { m_lookAndFeelPackage.setPath(packageName); } +} +void ShellCorona::init() +{ connect(this, &Plasma::Corona::containmentCreated, this, [this](Plasma::Containment *c) { executeSetupPlasmoidScript(c, c); }); diff --git a/shell/shellcorona.h b/shell/shellcorona.h index 0cfc5f9a6..e151157e2 100644 --- a/shell/shellcorona.h +++ b/shell/shellcorona.h @@ -80,6 +80,7 @@ public: ~ShellCorona() override; KPackage::Package lookAndFeelPackage(); + void init(); /** * Where to save global configuration that doesn't have anything to do with the scene (e.g. views)