From 010471faf918cfab75032a569aab8e510e47a72a Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Tue, 1 Mar 2011 16:08:39 +0100 Subject: Use the localized represantion of AM/PM string when converting time. Reviewed-by: Liang Qi --- src/corelib/tools/qlocale.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 2e58361..0a67daf 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -2103,7 +2103,7 @@ QString QLocalePrivate::dateTimeToString(const QString &format, const QDate *dat } else { repeat = 1; } - result.append(am_pm == AM ? QLatin1String("am") : QLatin1String("pm")); + result.append(am_pm == AM ? q->amText().toLower() : q->pmText().toLower()); break; case 'A': @@ -2113,7 +2113,7 @@ QString QLocalePrivate::dateTimeToString(const QString &format, const QDate *dat } else { repeat = 1; } - result.append(am_pm == AM ? QLatin1String("AM") : QLatin1String("PM")); + result.append(am_pm == AM ? q->amText().toUpper() : q->pmText().toUpper()); break; case 'z': -- cgit v0.12