Revision c3597c0...

Go back to digest for 1st December 2013

Features in KDE Base

Martin Klapetek committed changes in [kde-workspace] plasma/generic/applets/digital-clock/contents/ui/DigitalClock.qml:

Improve locale time formatting in Digital Clock applet

Qt's QLocale does not offer any modular time creating like Klocale did,
eg. no "gimme time with seconds" or "gimme time without seconds and with

QLocale supports only two formats - Long and Short. Long is unusable in
many situations and Short does not provide seconds. So if seconds are
enabled, we need to add it manually to the Short format that QLocale
provides us.

That's done by JS regexp replace that looks for the delimiter between
"h" and "m", takes it and appends it after "mm" and then appends "ss"
for the seconds. Also it checks if the format string already does not
contain the seconds part.

Reviewed-by: Sebastian Kügler

File Changes

Modified 1 files
  • plasma/generic/applets/digital-clock/contents/ui/DigitalClock.qml
1 files changed in total