PDA

View Full Version : Problems after porting to Qt 4.4.0



maverick_pol
22nd June 2008, 13:22
Hi guys,

I have a strange problem. When I compile my application using Qt 4.3.4
and read double values from a file it works fine(let's say 10 doubles);
When I compile using Qt 4.4.0 the doubles are read wrong, but when I replace '.' with a ',' in doubles it read 10 doubles(ok).
What is strange is that, I do not use a QString or any Qt classes to read doubles from a file. I use simple C code, like:


...
while (fscanf(fp, "%lf %lf %lf %d %d %d\n",
&latitude, &longitude, &sog,
&mode, &seconds, &connect ) != EOF)
{ .... }


Any idea what can be wrong? I understand that setting different locale for QString can have different effect, but can Qt lib (locale settings) effect C code reading?

Thanks for any help,

Kacper

jacek
23rd June 2008, 01:49
can Qt lib (locale settings) effect C code reading?
Yes, Qt does call setlocale() in a few places.