Patch for kdatepicker with weekStartDay != Monday

Lukáš Tinkl lukas at kde.org
Thu Oct 16 13:03:41 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne čt 16. října 2003 11:42 Reinhold Kainhofer napsal(a):
> yesterday I took a look at bug 65588 and wrote the attached patch for the
> date picker. So far, if the week start day was not monday, but the month
> started on a monday, a click selected the date a week ahead.
>
> My patch cleans up the position <=> date conversion by introducing two
> (non-virtual, thus binary compatible) functions
>   int posFromDate( const QDate &date );
>   QDate dateFromPos( int pos );
> which do all the offset handling (due to week start day). Also, now the
> date picker behaves exactly the same no matter which weekStart day is
> selected (so far, there were checks for weekStartDay()<4 in the code, which
> didn't make sense to me...). There is always at least one day and at most 8
> days of the previous month visible.
>
> Now, before I commit, can somebody with more knowledge of calendar systems
> and locale settings take a look at it and tell me that it is correct?
>
> If it's not not correct, I'll have to rework some code in korganizer,
> too...
>
> Okay to apply?

It looks correct to me

- -- 
Lukáš Tinkl | lukas at kde.org
KDE i18n maintainer | KOffice developer
http://www.kde.org/international/czechia
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/jokddfhL7nWSO+4RAs7KAKCKupEWug/XVVBAXNMzfkWh6uYX2gCeJpfP
ttatBCmr0bPZVekLMqYgNa0=
=AEI0
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list