diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 915a83e156..3c918864f9 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -2243,7 +2243,7 @@ QString QLocale::standaloneMonthName(int month, FormatType type) const #ifndef QT_NO_SYSTEMLOCALE if (d->m_data == systemData()) { QVariant res = systemLocale()->query(type == LongFormat - ? QSystemLocale::MonthNameLong : QSystemLocale::MonthNameShort, + ? QSystemLocale::StandaloneMonthNameLong : QSystemLocale::StandaloneMonthNameShort, month); if (!res.isNull()) return res.toString(); diff --git a/src/corelib/tools/qlocale_blackberry.cpp b/src/corelib/tools/qlocale_blackberry.cpp index 1db7b7d546..6d60a97062 100644 --- a/src/corelib/tools/qlocale_blackberry.cpp +++ b/src/corelib/tools/qlocale_blackberry.cpp @@ -280,6 +280,10 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const return lc_language.monthName(in.toInt(), QLocale::LongFormat); case MonthNameShort: return lc_language.monthName(in.toInt(), QLocale::ShortFormat); + case StandaloneMonthNameLong: + return lc_language.standaloneMonthName(in.toInt(), QLocale::LongFormat); + case StandaloneMonthNameShort: + return lc_language.standaloneMonthName(in.toInt(), QLocale::ShortFormat); case DateToStringLong: return lc_region.toString(in.toDate(), QLocale::LongFormat); case DateToStringShort: diff --git a/src/corelib/tools/qlocale_mac.mm b/src/corelib/tools/qlocale_mac.mm index 9292dccf19..f399b7689d 100644 --- a/src/corelib/tools/qlocale_mac.mm +++ b/src/corelib/tools/qlocale_mac.mm @@ -401,7 +401,9 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const return macDayName(in.toInt(), (type == DayNameShort)); case MonthNameLong: case MonthNameShort: - return macMonthName(in.toInt(), (type == MonthNameShort)); + case StandaloneMonthNameLong: + case StandaloneMonthNameShort: + return macMonthName(in.toInt(), (type == MonthNameShort || type == StandaloneMonthNameShort)); case DateToStringShort: case DateToStringLong: return macDateToString(in.toDate(), (type == DateToStringShort)); diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index a6136ea774..d3b0765f6c 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -115,7 +115,9 @@ public: ListToSeparatedString, // QString LocaleChanged, // system locale changed NativeLanguageName, // QString - NativeCountryName // QString + NativeCountryName, // QString + StandaloneMonthNameLong, // QString, in: int + StandaloneMonthNameShort // QString, in: int }; virtual QVariant query(QueryType type, QVariant in) const; virtual QLocale fallbackUiLocale() const; diff --git a/src/corelib/tools/qlocale_unix.cpp b/src/corelib/tools/qlocale_unix.cpp index 4e443cd79b..9ea28895bd 100644 --- a/src/corelib/tools/qlocale_unix.cpp +++ b/src/corelib/tools/qlocale_unix.cpp @@ -173,6 +173,10 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const return lc_time.monthName(in.toInt(), QLocale::LongFormat); case MonthNameShort: return lc_time.monthName(in.toInt(), QLocale::ShortFormat); + case StandaloneMonthNameLong: + return lc_time.standaloneMonthName(in.toInt(), QLocale::LongFormat); + case StandaloneMonthNameShort: + return lc_time.standaloneMonthName(in.toInt(), QLocale::ShortFormat); case DateToStringLong: return lc_time.toString(in.toDate(), QLocale::LongFormat); case DateToStringShort: diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp index d576f1c281..0730002ca3 100644 --- a/src/corelib/tools/qlocale_win.cpp +++ b/src/corelib/tools/qlocale_win.cpp @@ -684,8 +684,10 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const case DayNameShort: return d->dayName(in.toInt(), QLocale::ShortFormat); case MonthNameLong: + case StandaloneMonthNameLong: return d->monthName(in.toInt(), QLocale::LongFormat); case MonthNameShort: + case StandaloneMonthNameShort: return d->monthName(in.toInt(), QLocale::ShortFormat); case DateToStringShort: return d->toString(in.toDate(), QLocale::ShortFormat);