summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qdatetime.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index aaa639272c..eeefea8137 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -4965,10 +4965,11 @@ QDebug operator<<(QDebug dbg, const QTime &time)
QDebug operator<<(QDebug dbg, const QDateTime &date)
{
QDebugStateSaver saver(dbg);
+ const Qt::TimeSpec ts = date.timeSpec();
dbg.nospace() << "QDateTime(";
dbg.noquote() << date.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"))
- << ' ' << date.timeSpec();
- switch (date.d->m_spec) {
+ << ' ' << ts;
+ switch (ts) {
case Qt::UTC:
break;
case Qt::OffsetFromUTC: