diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-06 11:53:27 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-09 17:28:35 +0100 |
commit | 837a29b0b92c72b7b9d66a427c24a9fa8037f4f4 (patch) | |
tree | d72fe997366781db8263d2a63c3b8673b6325ab6 /src/corelib/text/qlocale.cpp | |
parent | 07aa91221fb436d5c3fb8cbc72428b85714c576a (diff) |
Fix accidental shadowing in QLocale::uiLanguages()
While simplifying uses of QSystemLocale::query() I declared a
shadowing local variable instead of setting a function-scope variable
that the code had previously set. Restore prior correct behavior.
Fixup for commit b5bc3ee036575dd5a3eec1d6bd578738df7bd6ad.
Fixes: QTBUG-87858
Change-Id: I6bd64aef1eb7df9ec4a703c59aa7369245ab2472
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
-rw-r--r-- | src/corelib/text/qlocale.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index 55de69998b..b751ed4579 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -4195,7 +4195,7 @@ QStringList QLocale::uiLanguages() const QList<QLocale> locales; #ifndef QT_NO_SYSTEMLOCALE if (d->m_data == &globalLocaleData) { - const auto uiLanguages = systemLocale()->query(QSystemLocale::UILanguages).toStringList(); + uiLanguages = systemLocale()->query(QSystemLocale::UILanguages).toStringList(); // ... but we need to include likely-adjusted forms of each of those, too: for (const auto &entry : uiLanguages) locales.append(QLocale(entry)); |