Commit f1ab8b7c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Don't block all the ksmserver process when calling kded.loadSecondPhase

It's an overly slow call and it gets in the way on a process that needs
to be responsive

Test Plan: Still boots

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision:
parent 0cc0c32c
......@@ -152,6 +152,7 @@ private Q_SLOTS:
void logoutWithoutConfirmation();
void haltWithoutConfirmation();
void rebootWithoutConfirmation();
void secondKDEDPhaseLoaded();
void handlePendingInteractions();
......@@ -409,12 +409,11 @@ void KSMServer::autoStart2()
QDBusInterface kded( QStringLiteral( "org.kde.kded5" ),
QStringLiteral( "/kded" ),
QStringLiteral( "org.kde.kded5" ) ); QStringLiteral( "loadSecondPhase" ) );
qCDebug(KSMSERVER)<< "kded" << t.elapsed();
auto pending = kded.asyncCall( QStringLiteral( "loadSecondPhase" ) );
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pending, this);
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, &KSMServer::secondKDEDPhaseLoaded);
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, watcher, &QObject::deleteLater);
if (kcminitSignals) {
......@@ -427,6 +426,15 @@ void KSMServer::autoStart2()
} else {
QTimer::singleShot(0, this, &KSMServer::kcmPhase2Done);
void KSMServer::secondKDEDPhaseLoaded()
qCDebug(KSMSERVER)<< "kded" << t.elapsed();
if( !defaultSession())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment