QTfrontend/ui/page/pageoptions.cpp
changeset 9048 c58a9829e1cc
parent 8924 13ac59499066
child 9080 9b42757d7e71
--- a/QTfrontend/ui/page/pageoptions.cpp	Thu May 23 09:33:36 2013 -0400
+++ b/QTfrontend/ui/page/pageoptions.cpp	Fri May 24 01:12:41 2013 +0400
@@ -587,11 +587,12 @@
             CBLanguage = new QComboBox(groupMisc);
             groupMisc->layout()->addWidget(CBLanguage, 0, 1);
             QStringList locs = DataManager::instance().entryList("Locale", QDir::Files, QStringList("hedgewars_*.qm"));
-            CBLanguage->addItem(QComboBox::tr("(System default)"), QString(""));
+            CBLanguage->addItem(QComboBox::tr("(System default)"), QString());
             for(int i = 0; i < locs.count(); i++)
             {
-                QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"));
-                CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name());
+                QString lname = locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1");
+                QLocale loc(lname);
+                CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", lname);
             }
 
             QLabel *restartNoticeLabel = new QLabel(groupMisc);