From 78dee15da43597126d0a8579cf5db3ec4f019ca8 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Thu, 2 Sep 2021 14:52:25 +0200 Subject: Fix QLocale::system() standalone day and month handling Some backends were missing support for standalone days and months, also the standaloneDayName() implementation was always using the same codepath as dayName(). This patch fixes the issues. Support for narrow format will be added in the following patch. Task-number: QTBUG-84877 Pick-to: 6.2 Change-Id: I38ee06342cafab544e3c69097bd0e6ae68e85645 Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- src/corelib/text/qlocale_win.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib/text/qlocale_win.cpp') diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp index 320988203f..f3e02c0440 100644 --- a/src/corelib/text/qlocale_win.cpp +++ b/src/corelib/text/qlocale_win.cpp @@ -757,6 +757,10 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const return d->dayName(in.toInt(), QLocale::LongFormat); case DayNameShort: return d->dayName(in.toInt(), QLocale::ShortFormat); + case StandaloneDayNameLong: + case StandaloneDayNameShort: + // Windows does not provide standalone day names, so fall back to CLDR + return QVariant(); case MonthNameLong: return d->monthName(in.toInt(), QLocale::LongFormat); case StandaloneMonthNameLong: -- cgit v1.2.3