From f9d962ac5d738b26d3c939f83fe6d32bd3202535 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 10 Dec 2009 17:52:18 +0100 Subject: 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 --- src/corelib/tools/qlocale.cpp | 8 ++++---- 1 file 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)); -- cgit v0.12