Okay so I guess this IS a bug. I fixed it by adding Q_FLAGS(TimeFormatOptions) in kde-runtime/plasma/declarativeimports/locale/locale_p.h and rebuilding. The QML code now works as expected.
I file a review request for the same. -- Anant Kamath On 11 April 2013 15:53, Anant Kamath <[email protected]> wrote: > Some functions in the QML Locale bindings (in KDE 4.10.1) seem to be > ignoring some flags: > > For example-> > This QML code: > > ----------------- > Locale { > id: locale > } > > PlasmaComponents.Label { > text: locale.formatLocaleTime( "11:12:13", > Locale.TimeWithoutAmPm ) > } > > --------------------- > > returns the time as 11:12:13 AM > which is incorrect, as the AM should not be visible. i.e. correct output > should be 11:12:13 > > Similarly, > > text: locale.formatLocaleTime( "11:12:13", Locale.TimeWithoutSeconds ) > > still returns 11:12:13 AM, > when the output should be 11:12 AM > > The actual KLocale::formatLocaleTime() function in C++ ofcourse, works > correctly. > > Is there anything wrong in my QML code or is this a bug? > > -- > Anant Kamath >
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
