QDateTime: drop quotes in QDebug output
As requested in review of 1d2efe1f27
.
I didn't add a comma in front of the timeSpec() as the other fields
aren't separated by commas, either.
Change-Id: I54d74b7199ca7e46e28d2ceca22b02205e318c90
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
94d79cf3d5
commit
de8a34b9bd
@ -4965,7 +4965,8 @@ QDebug operator<<(QDebug dbg, const QTime &time)
|
||||
QDebug operator<<(QDebug dbg, const QDateTime &date)
|
||||
{
|
||||
QDebugStateSaver saver(dbg);
|
||||
dbg.nospace() << "QDateTime(" << date.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"))
|
||||
dbg.nospace() << "QDateTime(";
|
||||
dbg.noquote() << date.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"))
|
||||
<< ' ' << date.timeSpec();
|
||||
switch (date.d->m_spec) {
|
||||
case Qt::UTC:
|
||||
|
@ -70,7 +70,7 @@ void tst_QNoDebug::streaming() const
|
||||
{
|
||||
QDateTime dt(QDate(1,2,3),QTime(4,5,6));
|
||||
const QString debugString = dt.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"));
|
||||
QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(\"%1\" Qt::TimeSpec(LocalTime))").arg(debugString)));
|
||||
QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(%1 Qt::TimeSpec(LocalTime))").arg(debugString)));
|
||||
qWarning() << dt;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user