Commit c0be941f authored by Harald Sitter's avatar Harald Sitter 🏡

don't hold initdness in a static var

with the move to systemsettings the module live times seem to have changed
so the statics survive a module switch and would prevent the module from
initializing again when viewed a second time.
instead simply look at m_entries to determine if we need to init. entries
are never empty after load, so it's a reliable indication for initdness.

BUG: 417466
parent e0268dc8
......@@ -85,11 +85,9 @@ Module::~Module()
void Module::load()
{
// load is called lazly, but also from the ctor -> prevent double init.
static bool initd = false;
if (initd) {
if (!m_entries.empty()) {
return;
}
initd = true;
loadOSData();
loadEntries();
......
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