<div dir="ltr"><div><div><div><div>Okay so I guess this IS a bug.<br></div><br>I fixed it by adding Q_FLAGS(TimeFormatOptions) in kde-runtime/plasma/declarativeimports/locale/locale_p.h <br>and rebuilding. The QML code now works as expected.<br>
<br></div>I file a review request for the same.<br><br></div>--<br></div>Anant Kamath<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 April 2013 15:53, Anant Kamath <span dir="ltr"><<a href="mailto:kamathanant@gmail.com" target="_blank">kamathanant@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Some functions in the QML Locale bindings (in KDE 4.10.1) seem to be ignoring some flags:<br><br>
For example-><br>This QML code:<br><br>-----------------<br>Locale {<br> id: locale<br>
}<br><br>PlasmaComponents.Label {<br> text: locale.formatLocaleTime( "11:12:13", Locale.TimeWithoutAmPm )<br> }<br><br></div>---------------------<br><br></div><div>returns the time as 11:12:13 AM<br>
</div>
<div>which is incorrect, as the AM should not be visible. i.e. correct output should be 11:12:13<br><br></div><div>Similarly,<br><br>text: locale.formatLocaleTime( "11:12:13", Locale.TimeWithoutSeconds )<br><br>
</div><div>still returns 11:12:13 AM,<br></div><div>when the output should be 11:12 AM<br><br></div><div>The actual KLocale::formatLocaleTime() function in C++ ofcourse, works correctly.<br><br></div><div>Is there anything wrong in my QML code or is this a bug?<br>
<br>--<br></div>Anant Kamath </div>
</blockquote></div><br></div>