Proposal: consistency for dateFormat()

Stephan Kulow coolo at kde.org
Fri Jan 20 14:58:21 GMT 2006


Am Freitag, 20. Januar 2006 10:45 schrieb Jaroslaw Staniek:
> Hello,
> My proposal is to change the default of shortFormat to true for KDElibs4
> here:
>
> QString KLocale::formatDate(const QDate &pDate, bool shortFormat = false)
> const;
>
> Why? Many of KLocale data/time-related functions default to short formats,
> in particular, shortFormat is true by default here:
>
>    QString KLocale::formatDateTime(const QDateTime &pDateTime,
> 			 bool shortFormat = true,
> 			 bool includeSecs = false) const;
>
> I must admit that at least two times I used formatDate(const QDate &)
> expecting short format as in formatDateTime() and was surprised that long
> format was printed.

Objection! That is a suprise regression from KDE3 to KDE4. I wouldn't object 
if you change the interface to use some well defined enum for that, so that 
the developer needs to change his code to follow the new API

Greetings, Stephan




More information about the kde-core-devel mailing list