QTfrontend/ui/page/pagetraining.cpp
branchwebgl
changeset 9127 e350500c4edb
parent 9080 9b42757d7e71
child 9998 736015b847e3
equal deleted inserted replaced
8860:bde641cf53c8 9127:e350500c4edb
     1 /*
     1 /*
     2  * Hedgewars, a free turn based strategy game
     2  * Hedgewars, a free turn based strategy game
     3  * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
     3  * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
     4  *
     4  *
     5  * This program is free software; you can redistribute it and/or modify
     5  * This program is free software; you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation; version 2 of the License
     7  * the Free Software Foundation; version 2 of the License
     8  *
     8  *
   116     initPage();
   116     initPage();
   117 
   117 
   118     DataManager & dataMgr = DataManager::instance();
   118     DataManager & dataMgr = DataManager::instance();
   119 
   119 
   120     // get locale
   120     // get locale
   121     QSettings settings("physfs://hedgewars.ini",
   121     QSettings settings(dataMgr.settingsFileName(),
   122                        QSettings::IniFormat);
   122                        QSettings::IniFormat);
   123 
   123 
   124     QString loc = settings.value("misc/locale", "").toString();
   124     QString loc = settings.value("misc/locale", "").toString();
   125     if (loc.isEmpty())
   125     if (loc.isEmpty())
   126         loc = QLocale::system().name();
   126         loc = QLocale::system().name();