Fix locale-aware reading in KDesktopFile
Review Request #118564 - Created June 5, 2014 and submitted
Fix locale-aware reading in KDesktopFile The underlying KConfig used QLocale::name() for getting the locale aware part. But this returns "de_DE" while the desktop files store "de". In addition it constructs a QLocale object instead of using the system locale. This has the advantage that the usage of QLocale::setDafault() gets honored by KConfig.
added unit test failed before. I'm not 100 % sure whether using bcp47Name is correct.
|I guess this breaks the locales pt_BR, en_GB, zh_CN and zh_TW, which we do have in KDE. Not sure what ...||David Faure|
Excellent, thanks! Just a couple minor things, then it looks good to go in.
Review request changed
Storing and resetting the default using a small helper class. It's currently duplicating the code, any preferences on where to put shared code from the tests or whether duplication is OK in tests?
Revision 4 (+63 -1)