Skip to content

[shell] Always call load after init

David Edmundson requested to merge work/d_ed/init_startup into master

Currently we get two different startup paths:

Cold case:

  • we call ShellCorona::load from startup
  • we have no kactivities loaded yet, we do an early return and connect
  • we call ShellCorona::init
  • activities load, we start the real load via the connect

Restart case:

  • we call ShellCorona::load
  • we have no kactivities loaded yet, we do an early return and connect
  • We start an event loop, waiting for our bus name to appear
  • activities load, we start the real load
  • we call ShellCorona::init

Calling load before init results in broken behaviour as things aren't initialized.

setShell is only called once in main.cpp really early on. It's not used elsewhere or exposed on DBus. There's no need for it to call load, when it will fail and wait for an event loop in almost all cases. Calling it from init makes ordering easier to follow and consistent through all paths.

BUG: 439159

Merge request reports