D25047: [Night Color KCM] Reset seconds and milliseconds in provided timings

Vlad Zahorodnii noreply at phabricator.kde.org
Tue Oct 29 16:41:52 GMT 2019


zzag created this revision.
zzag added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
zzag requested review of this revision.

REVISION SUMMARY
  When a user tries to set operation mode to "Times", the Apply button
  remains enabled after it's been clicked. The reason for that is timings
  provided by the kcm include seconds and milliseconds, while timings
  sent by KWin don't.
  
  Because seconds and milliseconds are different, CompositorAdapter::
  checkStaged() will return false even though hours and minutes haven't
  been modified by the user.
  
  In order to address this problem, my patch adjusts the TimeField
  component so it provides Date objects with seconds and milliseconds set
  to 0. There is another way to fix this issue though. We could check
  whether only hours and minutes have been changed in checkStaged() method.

TEST PLAN
  - Set operation mode to "Times"
  - Click the Apply button
  - Check that the Apply button is disabled

REPOSITORY
  R119 Plasma Desktop

BRANCH
  reset-minutes-and-milliseconds

REVISION DETAIL
  https://phabricator.kde.org/D25047

AFFECTED FILES
  kcms/nightcolor/package/contents/ui/TimeField.qml

To: zzag, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191029/ab4cb63f/attachment.html>


More information about the Plasma-devel mailing list