Reparse rules config prior to update

Summary:
We used to recreate the KConfig when rules needed to update. Now that it
is a KSharedConfig, which is kept, it needs to be reparsed as it changes
outside of KWin.

BUG: 393788
FIXED-IN: 5.13.0

Test Plan: Restarted session, changing rules work again

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12706
This commit is contained in:
Martin Flöser 2018-05-05 09:11:34 +02:00
parent 9a9c34f352
commit bed31e0557

View file

@ -1064,6 +1064,8 @@ void RuleBook::load()
deleteAll();
if (!m_config) {
m_config = KSharedConfig::openConfig(QStringLiteral(KWIN_NAME "rulesrc"), KConfig::NoGlobals);
} else {
m_config->reparseConfiguration();
}
int count = m_config->group("General").readEntry("count", 0);
for (int i = 1;