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

Authored by davidedmundson on May 18 2020, 10:52 AM.

Description

[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)
  1. during load ConfigModule::setNeedsSave(true) is called we set

d->_needsSave to true

  1. we emit ConfigModule::changed(true) which we proxy through to

KCModule::changed(true)

  1. we then process the queued KCModule::setChanged(false) from the

earlier KCModule::showEvent

  1. so we disable the button
  1. any subsequent changes in the KCM will call

ConfigModule::setNeedsSave(true)
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 https://phabricator.kde.org/D27384#611241

BUG: 411584

Details

Committed
apolMay 23 2020, 12:26 AM
Parents
R119:669217402815: Add new photos
Branches
Unknown
Tags
Unknown