diff --git a/ksplash/ksplashqml/splashapp.cpp b/ksplash/ksplashqml/splashapp.cpp --- a/ksplash/ksplashqml/splashapp.cpp +++ b/ksplash/ksplashqml/splashapp.cpp @@ -65,6 +65,10 @@ m_window = parser.isSet(QStringLiteral("window")); m_theme = parser.positionalArguments().value(0); + QDBusConnection dbus = QDBusConnection::sessionBus(); + dbus.registerObject(QStringLiteral("/KSplash"), this, QDBusConnection::ExportScriptableSlots); + dbus.registerService(QStringLiteral("org.kde.KSplash")); + setupWaylandIntegration(); foreach(QScreen* screen, screens()) @@ -86,10 +90,6 @@ connect(this, &QGuiApplication::screenAdded, this, &SplashApp::adoptScreen); - QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject(QStringLiteral("/KSplash"), this, QDBusConnection::ExportScriptableSlots); - dbus.registerService(QStringLiteral("org.kde.KSplash")); - } SplashApp::~SplashApp()