diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-12-10 16:52:18 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-12-16 14:50:04 (GMT) |
commit | f9d962ac5d738b26d3c939f83fe6d32bd3202535 (patch) | |
tree | 3ce783b3851531c7f7e82ecfd69a079b5d665326 /src/corelib/tools/qlocale.cpp | |
parent | 0568fb9f428a84a344baaa5c53395db4b99f082c (diff) | |
download | Qt-f9d962ac5d738b26d3c939f83fe6d32bd3202535.zip Qt-f9d962ac5d738b26d3c939f83fe6d32bd3202535.tar.gz Qt-f9d962ac5d738b26d3c939f83fe6d32bd3202535.tar.bz2 |
Do not call macToQtFormat twice in QLocale.
We already convert date/time format inside the getMacDateFormat, so no reason
to do it again later.
Reviewed-by: Prasanth
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 4a66b92..8645f17 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1187,14 +1187,14 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const } case DateFormatLong: case DateFormatShort: - return macToQtFormat(getMacDateFormat(type == DateFormatShort + return getMacDateFormat(type == DateFormatShort ? kCFDateFormatterShortStyle - : kCFDateFormatterLongStyle)); + : kCFDateFormatterLongStyle); case TimeFormatLong: case TimeFormatShort: - return macToQtFormat(getMacTimeFormat(type == TimeFormatShort + return getMacTimeFormat(type == TimeFormatShort ? kCFDateFormatterShortStyle - : kCFDateFormatterLongStyle)); + : kCFDateFormatterLongStyle); case DayNameLong: case DayNameShort: return macDayName(in.toInt(), (type == DayNameShort)); |