Review Request: Reset time format upon user request

Lamarque Vieira Souza lamarque at
Fri Dec 16 21:13:34 GMT 2011

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 16, 2011, 9:13 p.m.)

Review request for kdelibs and Plasma.


Use KGlobal::locale()->setLanguage() to force reading the configuration file instead of duplicating kdelibs code.

Use KGlobalSettings::SETTINGS_COMPLETION category to decide when take action. I have not found a better category, the available are: SETTINGS_MOUSE, SETTINGS_COMPLETION, SETTINGS_PATHS, SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS. There is no documentation about how use those categories in kglobalsettings.h.

There are several other set*() methods in klocale_kde.h. Adding a signal only for TimeFormat change will not solve the problem for them, specialy for set*Date*(), which are other calls that the clock plasmoid is interested in.

Maybe KLocale could have a localeChanged(changedSetting) signal, indicating what has changed. On the other hand... sending a signal for every KLocale's setting change sounds a little overkill.


The patch resets time format in digital clock plasmoid when the user changes the 24h configuration in active-settings.

The reset part is from kdelibs/kdecore/localization/klocale_kde.cpp. I am wondering if I should add this change to kdelibs instead of kde-workspace to avoid duplicating code. Anyway, I wanted someone to review the code to see if there can be any side effect.

This addresses bug 289094.

Diffs (updated)

  plasma/generic/applets/digital-clock/clock.h 4aec3fd 
  plasma/generic/applets/digital-clock/clock.cpp dd03692 



Works in Plasma Active. In Plasma Desktop kcmlocale does not call KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged) so it does not take effect. Other kcm modules (e.g. keyboard), call emitChange.


Lamarque Vieira Souza

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list