summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale_win.cpp
diff options
context:
space:
mode:
authorEl Mehdi Fekari <mfekari@rim.com>2013-05-02 10:30:49 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-21 13:23:31 (GMT)
commit9a62d6f2f89ea4c5e6d392d758bb9d7954c644d1 (patch)
treef7f5e5048984f18b36daf2657f5a99bbab9ab3a1 /src/corelib/tools/qlocale_win.cpp
parent36501694357ade4e35a48ac5bfadcd7dbd881336 (diff)
downloadQt-9a62d6f2f89ea4c5e6d392d758bb9d7954c644d1.zip
Qt-9a62d6f2f89ea4c5e6d392d758bb9d7954c644d1.tar.gz
Qt-9a62d6f2f89ea4c5e6d392d758bb9d7954c644d1.tar.bz2
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. cherry picked from qtbase/b1de018e9a1efcd0f9e298ae4c865197feb47895 Change-Id: I1054420dc696ed2be0d52bdc6567ebaf202faf12 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/tools/qlocale_win.cpp')
-rw-r--r--src/corelib/tools/qlocale_win.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp
index 193e5f2..2b3ba65 100644
--- a/src/corelib/tools/qlocale_win.cpp
+++ b/src/corelib/tools/qlocale_win.cpp
@@ -687,8 +687,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);