[Interest] Question about setting QLocale

Thiago Macieira thiago.macieira at intel.com
Tue Dec 1 17:12:08 CET 2015


On Tuesday 01 December 2015 14:33:58 Bo Thorsen wrote:
> Den 30-11-2015 kl. 18:43 skrev Murphy, Sean:
> > I'm having an issue with multiple locales in my application and I'm
> > trying to understand what the best fix should be. Our application is
> > being used in two places right now: China & the US. One of the
> > functions of the application is to log data samples to a csv file.
> > Another function is to be able to load that log file back in later to
> > look at the data.
> 
> I fix this problem by setting the locale temporarily to a known state
> before loading or saving files. This blog entry is about exactly this
> problem: http://www.vikingsoft.eu/blog/?p=21

That's not thread-safe. If there's anything else using the default locale in 
another thread, you're screwed.

And note how the discussion here was to use QLocale more...

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list