Fix locale-aware reading in KDesktopFile

Review Request #118564 - Created June 5, 2014 and submitted

Information
Martin Flöser
kconfig
master
Reviewers
kdeframeworks
jlayt
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.

Issues

  • 1
  • 6
  • 0
  • 7
Description From Last Updated
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 David Faure
John Layt
Martin Flöser
Martin Flöser
Martin Flöser
Matthew Dawson
Martin Flöser
Martin Flöser
Matthew Dawson
Commit Hook
Commit Hook
Martin Flöser
Review request changed

Status: Closed (submitted)

David Faure

   
src/core/kconfig.cpp (Diff revision 5)
 
 

I guess this breaks the locales pt_BR, en_GB, zh_CN and zh_TW, which we do have in KDE.

Not sure what the solution is, though.

Loading...