Commit 40b1a94a authored by Konrad Materka's avatar Konrad Materka
Browse files

[applets/systemtray] Fix configuraiton read on Plasma start

System tray models are created lazily, so it is possible that the configuration will load earlier and not notify the model of the stored values. Add explicit configuration load, so that it always loads correctly during the initialization.

This is a fix for regression introduced in the !14
parent 04bd86e1
......@@ -444,12 +444,14 @@ SystemTrayModel *SystemTray::systemTrayModel()
connect(this, &SystemTray::appletAdded, currentPlasmoidsModel, &PlasmoidModel::addApplet);
connect(this, &SystemTray::appletRemoved, currentPlasmoidsModel, &PlasmoidModel::removeApplet);
connect(this, &SystemTray::configurationChanged, currentPlasmoidsModel, &PlasmoidModel::onConfigurationChanged);
currentPlasmoidsModel->onConfigurationChanged(this->config());
for (auto applet : applets()) {
currentPlasmoidsModel->addApplet(applet);
}
m_statusNotifierModel = new StatusNotifierModel(m_systemTrayModel);
connect(this, &SystemTray::configurationChanged, m_statusNotifierModel, &StatusNotifierModel::onConfigurationChanged);
m_statusNotifierModel->onConfigurationChanged(this->config());
m_systemTrayModel->addSourceModel(currentPlasmoidsModel);
m_systemTrayModel->addSourceModel(m_statusNotifierModel);
......
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