From 05ec5a47abcde1e2134449d21b869fd9d6b8fc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Fri, 11 Dec 2020 17:41:32 +0100 Subject: [PATCH] QLocale: Remove dead code The code using it got removed in qttools commit 01da5d9a Change-Id: I14d36ac939f2647139fcc42591a044a03e707553 Reviewed-by: Edward Welbourne --- src/corelib/text/qlocale.cpp | 10 ---------- src/corelib/text/qlocale_p.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index ab542f638a..aabdb3b213 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -565,16 +565,6 @@ bool qt_splitLocaleName(QStringView name, QStringView *lang, QStringView *script return state != LangState; } -// TODO: kill this ! Still in use by qttools, patch submitted (2020 October). -void QLocalePrivate::getLangAndCountry(const QString &name, QLocale::Language &lang, - QLocale::Script &script, QLocale::Country &land) -{ - const auto id = QLocaleId::fromName(name); - lang = QLocale::Language(id.language_id); - script = QLocale::Script(id.script_id); - land = QLocale::Country(id.country_id); -} - QLocaleId QLocaleId::fromName(const QString &name) { QStringView lang; diff --git a/src/corelib/text/qlocale_p.h b/src/corelib/text/qlocale_p.h index 4bad1c698e..1b5cc0aa55 100644 --- a/src/corelib/text/qlocale_p.h +++ b/src/corelib/text/qlocale_p.h @@ -418,8 +418,6 @@ public: static QLocale::Language codeToLanguage(QStringView code) noexcept; static QLocale::Script codeToScript(QStringView code) noexcept; static QLocale::Country codeToCountry(QStringView code) noexcept; - static void getLangAndCountry(const QString &name, QLocale::Language &lang, - QLocale::Script &script, QLocale::Country &cntry); QLocale::MeasurementSystem measurementSystem() const;