Commit 9a51a371708a118e459c0b4d4153bfa0171c46d2

  • Tree SHA1: ed25fc4
  • Parent SHA1: 20ee66f (Fixed parsing of git status so that one can check out a branch when not on a branch before.)
  • raw diff | raw patch
Make sure locale C gets marked as active in generalsettings

Reviewed-by: Daniel Molkentin
  
8686
8787void GeneralSettings::fillLanguageBox() const
8888{
89 const QString currentLocale = language();
90
8991 m_page->languageBox->addItem(tr("<System Language>"), QString());
9092 // need to add this explicitly, since there is no qm file for English
9193 m_page->languageBox->addItem(QLatin1String("English"), QLatin1String("C"));
94 if (currentLocale == QLatin1String("C"))
95 m_page->languageBox->setCurrentIndex(m_page->languageBox->count() - 1);
9296
9397 const QString creatorTrPath =
9498 Core::ICore::instance()->resourcePath() + QLatin1String("/translations");
9599 const QStringList languageFiles = QDir(creatorTrPath).entryList(QStringList(QLatin1String("*.qm")));
96 const QString currentLocale = language();
97100
98101 Q_FOREACH(const QString &languageFile, languageFiles)
99102 {
108108 m_page->languageBox->addItem(QLocale::languageToString(QLocale(locale).language()), locale);
109109 if (locale == currentLocale)
110110 m_page->languageBox->setCurrentIndex(m_page->languageBox->count() - 1);
111
112111 }
113112 }
114113}