Set qt locale to 'C'

Former-commit-id: d2c0b2ea61c8444169a8d8635adf7af5d3b5c67b
This commit is contained in:
johan 2014-01-28 22:27:02 +01:00
parent 6864ef6e43
commit ba73fbd470
4 changed files with 12 additions and 4 deletions

View File

@ -1 +1 @@
cc218832df7b1806355dc00559924630e3bc54be
fb67681c8c942ffe2236a4ea3a41d4102c3fbb2e

View File

@ -4,6 +4,7 @@
// Qt includes
#include <QCoreApplication>
#include <QLocale>
// getoptPlusPLus includes
#include <getoptPlusPlus/getoptpp.h>
@ -27,10 +28,12 @@ int count(std::initializer_list<bool> values)
int main(int argc, char * argv[])
{
setlocale(LC_ALL, "C");
QCoreApplication app(argc, argv);
// force the locale
setlocale(LC_ALL, "C");
QLocale::setDefault(QLocale::c());
try
{
// some default settings

View File

@ -30,6 +30,7 @@ void saveScreenshot(void *, const Image<ColorRgb> & image)
int main(int argc, char** argv)
{
// force the locale
setlocale(LC_ALL, "C");
try

View File

@ -6,6 +6,7 @@
// QT includes
#include <QCoreApplication>
#include <QResource>
#include <QLocale>
// config includes
#include "HyperionConfig.h"
@ -71,7 +72,6 @@ Json::Value loadConfig(const std::string & configFile)
int main(int argc, char** argv)
{
std::cout << "Application build time: " << __DATE__ << " " << __TIME__ << std::endl;
std::cout << "Locale = " << setlocale(LC_ALL, "C") << std::endl;
// Initialising QCoreApplication
QCoreApplication app(argc, argv);
@ -80,6 +80,10 @@ int main(int argc, char** argv)
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);
// force the locale
setlocale(LC_ALL, "C");
QLocale::setDefault(QLocale::c());
if (argc < 2)
{
std::cout << "Missing required configuration file. Usage:" << std::endl;