[PATCH] KLocale (configurable first day of the week)

Cornelius Schumacher schumacher at kde.org
Fri Jul 19 14:34:25 BST 2002


On Friday 19 July 2002 14:49, Lukáš Tinkl wrote:
> here's a patch that makes the first day of the week freely configurable,
> not just Monday or Sunday as previously. It adds two new methods and one
> new config option:
>
> klocale.h:
> QString weekStartDay() const;
> void setWeekStartDay(const QString & day);
>
> The config option and the methods take a three-letter English name of the
> week day, e.g. 'Sun' if Sunday is the first day of the week (Monday being
> the default as before).

Wouldn't it be better, if these functions would use an int compatible with 
QDate::dayOfWeek() instead of a QString?

> Question: is it safe to remove the private bool member m_weekStartsMonday?

Neither the removal of m_weekStartsMonday nor the addition of m_weekStartDay 
is binary compatible. You should put the new variable into KLocalePrivate and 
leave the old one where it is.

And finally some nitpicking: I don't think it makes sense to add a comment 
"language and country" for two variables called m_language and m_country. 
That's redundant.

-- 
Cornelius Schumacher <schumacher at kde.org>





More information about the kde-core-devel mailing list