path: root/src/corelib/tools/qlocale_p.h
diff options
authorJohn Layt <>2013-07-18 10:58:21 +0200
committerThe Qt Project <>2013-09-05 23:20:09 +0200
commitdd488bb7a449822d535ade6c840265ea76535f47 (patch)
tree5cd0bb2d928e095e123b62f8db673628256b5746 /src/corelib/tools/qlocale_p.h
parentad83be2cd3a5247484d233cadd85645480be732a (diff)
QLocale - Improve date formatter
Modify the QLocale date formatter to be consistent with the QDateTime date formatter and able to replace the QDateTime formatter in a subsequent change. Fix the treatment of negative years. The internal QLocale::timeZone() has been replaced by the QDateTime::timeZoneAbbreviation() to ensure the correct tz for the date/time is used rather than always the current system default. Change-Id: I2ef26700856e2e69b979069226aa504ecbb50071 Reviewed-by: Thiago Macieira <> Reviewed-by: Mitch Curtis <>
Diffstat (limited to 'src/corelib/tools/qlocale_p.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index 34223d5af9..4b4606ffab 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -330,7 +330,8 @@ public:
enum NumberMode { IntegerMode, DoubleStandardMode, DoubleScientificMode };
bool validateChars(const QString &str, NumberMode numMode, QByteArray *buff, int decDigits = -1) const;
- QString dateTimeToString(const QString &format, const QDate *date, const QTime *time,
+ QString dateTimeToString(const QString &format, const QDateTime &datetime,
+ const QDate &dateOnly, const QTime &timeOnly,
const QLocale *q) const;
const QLocaleData *m_data;