From e0edd1f3e2bc57f826acd9b9713110dacbd107be Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 5 Aug 2019 23:32:13 +0200 Subject: [PATCH] [libcalamares] Fix misleading comment, add accessor - the sort order is not English-at-the-top - add accessor for the locale ID. --- src/libcalamares/locale/Label.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcalamares/locale/Label.h b/src/libcalamares/locale/Label.h index ab3e80ad0..0fe61d909 100644 --- a/src/libcalamares/locale/Label.h +++ b/src/libcalamares/locale/Label.h @@ -58,7 +58,7 @@ public: /** @brief Define a sorting order. * - * English (@see isEnglish() -- it means en_US) is sorted at the top. + * Locales are sorted by their id, which means the ISO 2-letter code + country. */ bool operator<( const Label& other ) const { return m_localeId < other.m_localeId; } @@ -78,6 +78,7 @@ public: QLocale locale() const { return m_locale; } QString name() const { return m_locale.name(); } + QString id() const { return m_localeId; } /// @brief Convenience accessor to the language part of the locale QLocale::Language language() const { return m_locale.language(); }