summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-15 13:38:43 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-06-16 11:43:07 +0000
commitb66bc399aed8b307a27781c97585a09888d8692f (patch)
treeb5c05555fd1c93cc7c54dc486b0b316cba25a57b
parent5935488d46d2e78d72b4ff61a56bc5e7448c2002 (diff)
testlib: print out milliseconds for datetime
Task-number: QTBUG-32555 Change-Id: I9219c8a7199d4db27c3d160de2544f0a7cb320a6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--src/qmltest/quicktestresult.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index c4fb2b0f5f..8c62196128 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -518,6 +518,12 @@ void QuickTestResult::stringify(QQmlV4Function *args)
result = QString::fromLatin1("Qt.url(%1)").arg(url.toString());
break;
}
+ case QVariant::DateTime:
+ {
+ QDateTime dt = v.value<QDateTime>();
+ result = dt.toString(Qt::ISODateWithMs);
+ break;
+ }
default:
result = v.toString();
}