From b3597f8fcac0af8bf3087fa9fe413a5c4e654ed3 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 1 Jan 2024 13:58:39 -0600 Subject: [PATCH] New upstream release (LP: #2047379). --- debian/changelog | 6 +++ debian/patches/c-fixes.patch | 72 ------------------------------------ debian/patches/series | 1 - 3 files changed, 6 insertions(+), 73 deletions(-) delete mode 100644 debian/patches/c-fixes.patch delete mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 1bd0c2d..9c269e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lubuntu-installer-prompt (1.1.2-0ubuntu1) noble; urgency=medium + + * New upstream release (LP: #2047379). + + -- Simon Quigley Mon, 01 Jan 2024 13:56:49 -0600 + lubuntu-installer-prompt (1.1.1-0ubuntu2) noble; urgency=medium * Ensure C is not the default locale, to the user. diff --git a/debian/patches/c-fixes.patch b/debian/patches/c-fixes.patch deleted file mode 100644 index 8b5067d..0000000 --- a/debian/patches/c-fixes.patch +++ /dev/null @@ -1,72 +0,0 @@ -commit 7ac27098cf9c03fa02d9bac4536f7d6ee3159e42 -Author: Simon Quigley -Date: Sat Dec 23 17:53:11 2023 -0600 - - Don't default to C, and be somewhat reasonable about locales, to start. - -diff --git a/src/installerprompt.cpp b/src/installerprompt.cpp -index 04bc415..87a20c3 100644 ---- a/src/installerprompt.cpp -+++ b/src/installerprompt.cpp -@@ -376,10 +376,15 @@ QString InstallerPrompt::getDisplayNameForLocale(const QLocale &locale) { - return s; - }; - -+ QLocale currentAppLocale = QLocale::system(); - QString nativeName = locale.nativeLanguageName(); - QString nativeCountryName = sanitize(locale.nativeCountryName()); -- QString englishLanguageName = QLocale::languageToString(locale.language()); -- QString englishCountryName = sanitize(QLocale::countryToString(locale.country())); -+ QString englishLanguageName = currentAppLocale.languageToString(locale.language()); -+ QString englishCountryName = sanitize(currentAppLocale.countryToString(locale.country())); -+ -+ if (nativeName.isEmpty() || nativeCountryName.isEmpty()) { -+ return QString(); -+ } - - // Rename "American English" to "English" - if (locale.language() == QLocale::English) { -@@ -419,31 +424,29 @@ void InstallerPrompt::initLanguageComboBox() { - } - - QStringList InstallerPrompt::getAvailableLanguages() { -- QMap languageMap; // Default sorting by QString is case-sensitive -- -- for (int language = QLocale::C; language <= QLocale::LastLanguage; ++language) { -- foreach (int country, QLocale::countriesForLanguage(static_cast(language))) { -- QLocale locale(static_cast(language), static_cast(country)); -+ QMap language_map; // Default sorting by QString is case-sensitive - -- QString displayName = getDisplayNameForLocale(locale); -- if (displayName.isEmpty()) continue; -+ QList all_locales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry); -+ for (const QLocale &locale : all_locales) { -+ QString display_name = getDisplayNameForLocale(locale); -+ if (display_name.isEmpty()) continue; - -- languageMap.insert(displayName, locale.name()); -- } -+ language_map.insert(display_name, locale.name()); - } -+ - // Sort the language display names -- QStringList sortedLanguages = languageMap.keys(); -- std::sort(sortedLanguages.begin(), sortedLanguages.end(), [](const QString &a, const QString &b) { -+ QStringList sorted_languages = language_map.keys(); -+ std::sort(sorted_languages.begin(), sorted_languages.end(), [](const QString &a, const QString &b) { - return a.compare(b, Qt::CaseInsensitive) < 0; - }); - - // Clear the existing languageLocaleMap and repopulate it based on sortedLanguages - languageLocaleMap.clear(); -- for (const QString &languageName : sortedLanguages) { -- languageLocaleMap.insert(languageName, languageMap[languageName]); -+ for (const QString &language_name : sorted_languages) { -+ languageLocaleMap.insert(language_name, language_map[language_name]); - } - -- return sortedLanguages; -+ return sorted_languages; - } - - void InstallerPrompt::onLanguageChanged(int index) { diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 6b94e44..0000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -c-fixes.patch