Revision 1207824

Go back to digest for 26th December 2010

Bug Fixes in KDE Base

John Layt committed changes in /trunk/KDE/kdelibs/kdecore/localization:

Fix KLocale behaviour around persistance of configs and calling their setLocale

Revert parts of my previous 2 changes and add some new stuff to ensure the
behaviour is 100% consistent with the previous behaviour while still keeping
the config available when needed.

Also move all the constructor init into an single explicit function call rather
than relying on side effects spread around the different classes, it's just
easier to follow now.

So now it works as follows:
* If we're explicity given the global or not given a config at all, then apply
the setLocale to the global and use it directly as the config
* If we're given a shared config we can keep it and use it later as this is
the stated behaviour in the apidox.
* If we're given an un-shared config, we can't rely on it being around later as
that's not stipulated in the apidox, so we call setLocale on it then take a
copy to use later.

Also fix KCurrencyCode constructor which was referring to the global locale which
led to an infinite loop when the global locale was being created.

File Changes

Modified 8 files
  • /trunk/KDE/kdelibs/kdecore/localization
  •   /kcurrencycode.cpp
  •   /kcurrencycode.h
  •   /klocale.h
  •   /klocale_kde.cpp
  •   /klocale_mac.cpp
  •   /klocale_p.h
  •   /klocale_unix.cpp
  •   /klocale_win.cpp
8 files changed in total