diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2013-04-18 18:58:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-01 21:05:33 +0200 |
commit | b1de018e9a1efcd0f9e298ae4c865197feb47895 (patch) | |
tree | ba6a28fe97f638ffd2f0e826d665549a6615d9fe /src/corelib/tools/qlocale_unix.cpp | |
parent | 05984c910fb6ab2670bbeefa87131a34537ea467 (diff) |
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 <lars.knoll@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qlocale_unix.cpp')
-rw-r--r-- | src/corelib/tools/qlocale_unix.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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: |