diff --git a/apps/global_preferences.h b/apps/global_preferences.h index fb82cbe0c..0001787f8 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -14,6 +14,8 @@ public: static GlobalPreferences * sharedGlobalPreferences(); I18n::Language language() const { return m_language; } void setLanguage(I18n::Language language) { m_language = language; } + I18n::Country country() const { return m_country; } + void setCountry(I18n::Country country) { m_country = country; } bool isInExamMode() const { return (int8_t)examMode() > 0; } ExamMode examMode() const; void setExamMode(ExamMode examMode); @@ -25,14 +27,17 @@ public: void setFont(const KDFont * font) { m_font = font; } constexpr static int NumberOfBrightnessStates = 12; private: - static_assert(I18n::NumberOfLanguages > 0, "I18n::NumberOfLanguages is not superior to 0"); // There should already have be an error when processing an empty EPSILON_I18N flag + static_assert(I18n::NumberOfLanguages > 0, "I18n::NumberOfLanguages is not superior to 0"); // There should already have been an error when processing an empty EPSILON_I18N flag + static_assert(I18n::NumberOfCountries > 0, "I18n::NumberOfCountries is not superior to 0"); // There should already have been an error when processing an empty EPSILON_COUNTRIES flag GlobalPreferences() : m_language((I18n::Language)0), + m_country((I18n::Country)0), m_examMode(ExamMode::Unknown), m_showPopUp(true), m_brightnessLevel(Ion::Backlight::MaxBrightness), m_font(KDFont::LargeFont) {} I18n::Language m_language; + I18n::Country m_country; static_assert((int8_t)GlobalPreferences::ExamMode::Off == 0, "GlobalPreferences::isInExamMode() is not right"); static_assert((int8_t)GlobalPreferences::ExamMode::Unknown < 0, "GlobalPreferences::isInExamMode() is not right"); mutable ExamMode m_examMode;