summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-01-19 23:32:58 -0800
committerThiago Macieira <thiago.macieira@intel.com>2018-01-25 22:40:40 +0000
commitab1e50757454b5afda2f6dec52d2eb16a32d4798 (patch)
treef3e0f750f258f3fbd25d6c4b7786abec025701c4 /src/corelib/kernel
parent7f310be85b0fb2154c2651b792efe11b41bf6b4b (diff)
QVariant: convert QDateTime and QTime to string with milliseconds
This way, it's lossless. Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qvariant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 29429b5e55..93736ae807 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -440,10 +440,10 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
*str = v_cast<QDate>(d)->toString(Qt::ISODate);
break;
case QVariant::Time:
- *str = v_cast<QTime>(d)->toString(Qt::ISODate);
+ *str = v_cast<QTime>(d)->toString(Qt::ISODateWithMs);
break;
case QVariant::DateTime:
- *str = v_cast<QDateTime>(d)->toString(Qt::ISODate);
+ *str = v_cast<QDateTime>(d)->toString(Qt::ISODateWithMs);
break;
#endif
case QVariant::Bool: