Changeset View
Changeset View
Standalone View
Standalone View
shell/shellcorona.cpp
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Line(s) | 292 | /* KConfigGroup cg(KSharedConfig::openConfig(package.filePath("defaults")), "General"); | |||
---|---|---|---|---|---|
311 | * | 311 | * | ||
312 | * if that happens we want to continue monitoring for state changes, and only finally load when it is up. | 312 | * if that happens we want to continue monitoring for state changes, and only finally load when it is up. | ||
313 | * | 313 | * | ||
314 | * See https://bugs.kde.org/show_bug.cgi?id=342431 be careful about changing | 314 | * See https://bugs.kde.org/show_bug.cgi?id=342431 be careful about changing | ||
315 | * | 315 | * | ||
316 | * The unique connection makes sure we don't reload plasma if KAMD ever crashes and reloads, the signal is disconnected in the body of load | 316 | * The unique connection makes sure we don't reload plasma if KAMD ever crashes and reloads, the signal is disconnected in the body of load | ||
317 | */ | 317 | */ | ||
318 | 318 | | |||
319 | connect(m_activityController, &KActivities::Controller::serviceStatusChanged, this, &ShellCorona::load, Qt::UniqueConnection); | 319 | connect(m_activityController, &KActivities::Controller::serviceStatusChanged, this, &ShellCorona::load, Qt::UniqueConnection); | ||
bshah: On 2nd thought
qFatal is probably wrong, it is entirely possible that service is starting up… | |||||
Came to the same conclusion and switched to qWarning() already as per above. hein: Came to the same conclusion and switched to `qWarning()` already as per above. | |||||
320 | 320 | | |||
321 | load(); | 321 | load(); | ||
322 | } | 322 | } | ||
323 | 323 | | |||
324 | 324 | | |||
325 | QJsonObject dumpconfigGroupJS(const KConfigGroup &rootGroup) | 325 | QJsonObject dumpconfigGroupJS(const KConfigGroup &rootGroup) | ||
326 | { | 326 | { | ||
327 | QJsonObject result; | 327 | QJsonObject result; | ||
▲ Show 20 Lines • Show All 306 Lines • ▼ Show 20 Line(s) | |||||
634 | 634 | | |||
635 | QString ShellCorona::shell() const | 635 | QString ShellCorona::shell() const | ||
636 | { | 636 | { | ||
637 | return m_shell; | 637 | return m_shell; | ||
638 | } | 638 | } | ||
639 | 639 | | |||
640 | void ShellCorona::load() | 640 | void ShellCorona::load() | ||
641 | { | 641 | { | ||
642 | if (m_shell.isEmpty() || | 642 | if (m_shell.isEmpty()) { | ||
643 | (m_activityController->serviceStatus() != KActivities::Controller::Running && | 643 | return; | ||
644 | !qApp->property("org.kde.KActivities.core.disableAutostart").toBool())) { | 644 | } | ||
645 | | ||||
646 | if (m_activityController->serviceStatus() != KActivities::Controller::Running && | ||||
647 | !qApp->property("org.kde.KActivities.core.disableAutostart").toBool()) { | ||||
648 | qWarning("Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running."); | ||||
649 | qWarning("If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable."); | ||||
qFatal calls abort so the second one can not be reached, can it? Perhaps just \n broulik: `qFatal` calls `abort` so the second one can not be reached, can it? Perhaps just `\n` | |||||
The more I think about it, I think qFatal() might be wrong anyway. It changes behavior of the program, since in theory load() could be re-entered at a later time when kactivitymanagerd has since come up. I'll go with qWarning. Will update this diff. hein: The more I think about it, I think `qFatal()` might be wrong anyway. It changes behavior of the… | |||||
645 | return; | 650 | return; | ||
646 | } | 651 | } | ||
647 | 652 | | |||
648 | disconnect(m_activityController, &KActivities::Controller::serviceStatusChanged, this, &ShellCorona::load); | 653 | disconnect(m_activityController, &KActivities::Controller::serviceStatusChanged, this, &ShellCorona::load); | ||
649 | 654 | | |||
650 | m_screenPool->load(); | 655 | m_screenPool->load(); | ||
651 | 656 | | |||
652 | //TODO: a kconf_update script is needed | 657 | //TODO: a kconf_update script is needed | ||
▲ Show 20 Lines • Show All 1462 Lines • Show Last 20 Lines |
On 2nd thought
qFatal is probably wrong, it is entirely possible that service is starting up and ::status is different then running, we might end up hitting needless abort?