The following example seems to show a bug in Qt. Or am i mistaken ?
std::cout << atof("0.456") << std::endl; // OK prints 0.456
QApplication app (argc, argv);
//QLocale::setDefault(QLocale::C); // No effect at all.
std::cout << atof("0.456") << std::endl; // do not work on on fr_FR.UTF-8, print 0.
When using a non standard locale, in my example fr_FR.UTF-8, creating the QApplication seems to change the system locale, as it is used by atof to do the conversion.
To me it looks like the creation of the QApplication will pull the system locale and call a setenv with it.