From b1de018e9a1efcd0f9e298ae4c865197feb47895 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 18 Apr 2013 18:58:18 +0200 Subject: Fix QLocale::standaloneMonthName when d->m_data == systemData() At the moment if d->m_data == systemData() it calls systemLocale()->query but forgets about the standalone part so you get the wrong data This patch introduces the new enums so that backends can implement properly the standaloneMonthName feature properly. At the moment the Windows and Mac ones still return the monthName, the Unix and Blackberry ones return the data we store in months_data Change-Id: Idc5a50b04ab1f914f16c7385be1dca2e027feae3 Reviewed-by: Lars Knoll Reviewed-by: Rafael Roquetto Reviewed-by: Mehdi Fekari Reviewed-by: Thiago Macieira --- src/corelib/tools/qlocale_win.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/tools/qlocale_win.cpp') 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); -- cgit v1.2.3