Commit c8eeee48 authored by David Edmundson's avatar David Edmundson Committed by Aleix Pol Gonzalez
Browse files

[kcms/nightcolour] Reset needsSave after loading initial QML properties

Sequence of events is:

1) KCModule::showEvent()
2) this queues up a load and queues up a KCModule::changed(false)

3)  during load ConfigModule::setNeedsSave(true) is called we set
d->_needsSave to true
4) we emit ConfigModule::changed(true) which we proxy through to

5) we then process the queued KCModule::setChanged(false) from the
earlier KCModule::showEvent
6) so we disable the button

7) any subsequent changes in the KCM will call
but this now matches d->_needsSave so it no-ops. Even though KCModule is
out of sync.

Systemsettings only knows what KCModule signals, not ConfigModule.

This patch resets ConfigModule::d->_needsSave after step 3

See also

BUG: 411584
parent 66921740
......@@ -38,6 +38,7 @@ KCMNightColor::KCMNightColor(QObject *parent, const QVariantList& args)
void KCMNightColor::load()
emit loadRelay();
void KCMNightColor::defaults()
Supports Markdown
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