Changeset View
Changeset View
Standalone View
Standalone View
ksmserver/startup.cpp
Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Line(s) | |||||
404 | #endif | 404 | #endif | ||
405 | waitAutoStart2 = true; | 405 | waitAutoStart2 = true; | ||
406 | waitKcmInit2 = true; | 406 | waitKcmInit2 = true; | ||
407 | autoStart(2); | 407 | autoStart(2); | ||
408 | 408 | | |||
409 | QDBusInterface kded( QStringLiteral( "org.kde.kded5" ), | 409 | QDBusInterface kded( QStringLiteral( "org.kde.kded5" ), | ||
410 | QStringLiteral( "/kded" ), | 410 | QStringLiteral( "/kded" ), | ||
411 | QStringLiteral( "org.kde.kded5" ) ); | 411 | QStringLiteral( "org.kde.kded5" ) ); | ||
412 | kded.call( QStringLiteral( "loadSecondPhase" ) ); | 412 | auto pending = kded.asyncCall( QStringLiteral( "loadSecondPhase" ) ); | ||
413 | | ||||
414 | #ifdef KSMSERVER_STARTUP_DEBUG1 | | |||
415 | qCDebug(KSMSERVER)<< "kded" << t.elapsed(); | | |||
416 | #endif | | |||
417 | 413 | | |||
414 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pending, this); | ||||
415 | QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, &KSMServer::secondKDEDPhaseLoaded); | ||||
416 | QObject::connect(watcher, &QDBusPendingCallWatcher::finished, watcher, &QObject::deleteLater); | ||||
418 | runUserAutostart(); | 417 | runUserAutostart(); | ||
419 | 418 | | |||
420 | if (kcminitSignals) { | 419 | if (kcminitSignals) { | ||
421 | connect( kcminitSignals, SIGNAL(phase2Done()), SLOT(kcmPhase2Done())); | 420 | connect( kcminitSignals, SIGNAL(phase2Done()), SLOT(kcmPhase2Done())); | ||
422 | QTimer::singleShot( 10000, this, &KSMServer::kcmPhase2Timeout); // protection | 421 | QTimer::singleShot( 10000, this, &KSMServer::kcmPhase2Timeout); // protection | ||
423 | org::kde::KCMInit kcminit(QStringLiteral("org.kde.kcminit"), | 422 | org::kde::KCMInit kcminit(QStringLiteral("org.kde.kcminit"), | ||
424 | QStringLiteral("/kcminit"), | 423 | QStringLiteral("/kcminit"), | ||
425 | QDBusConnection::sessionBus()); | 424 | QDBusConnection::sessionBus()); | ||
426 | kcminit.runPhase2(); | 425 | kcminit.runPhase2(); | ||
427 | } else { | 426 | } else { | ||
428 | QTimer::singleShot(0, this, &KSMServer::kcmPhase2Done); | 427 | QTimer::singleShot(0, this, &KSMServer::kcmPhase2Done); | ||
429 | } | 428 | } | ||
429 | } | ||||
430 | | ||||
431 | void KSMServer::secondKDEDPhaseLoaded() | ||||
davidedmundson: maybe secondKDEDPhaseLoaded | |||||
432 | { | ||||
433 | | ||||
434 | #ifdef KSMSERVER_STARTUP_DEBUG1 | ||||
435 | qCDebug(KSMSERVER)<< "kded" << t.elapsed(); | ||||
436 | #endif | ||||
437 | | ||||
430 | if( !defaultSession()) | 438 | if( !defaultSession()) | ||
431 | restoreLegacySession(KSharedConfig::openConfig().data()); | 439 | restoreLegacySession(KSharedConfig::openConfig().data()); | ||
432 | 440 | | |||
433 | qCDebug(KSMSERVER) << "Starting notification thread"; | 441 | qCDebug(KSMSERVER) << "Starting notification thread"; | ||
434 | NotificationThread *loginSound = new NotificationThread(); | 442 | NotificationThread *loginSound = new NotificationThread(); | ||
435 | // Delete the thread when finished | 443 | // Delete the thread when finished | ||
436 | connect(loginSound, &NotificationThread::finished, loginSound, &NotificationThread::deleteLater); | 444 | connect(loginSound, &NotificationThread::finished, loginSound, &NotificationThread::deleteLater); | ||
437 | loginSound->start(); | 445 | loginSound->start(); | ||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |
maybe secondKDEDPhaseLoaded