diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-07-16 20:12:10 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-07-16 20:12:10 +0900 |
commit | c898caed6a7c8d7a5466d556b2d186ddc861884b (patch) | |
tree | 13af9053af916ba5ec8fa48661a30bcc20a28469 /events | |
parent | 3dfb74af71fe0cceaeb14d1ef0ade846f3a659f9 (diff) | |
download | libquotient-c898caed6a7c8d7a5466d556b2d186ddc861884b.tar.gz libquotient-c898caed6a7c8d7a5466d556b2d186ddc861884b.zip |
Fixed too strict validations in (Room)Event
Diffstat (limited to 'events')
-rw-r--r-- | events/event.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/events/event.cpp b/events/event.cpp index 653396bd..0132fdc6 100644 --- a/events/event.cpp +++ b/events/event.cpp @@ -50,14 +50,14 @@ QByteArray Event::originalJson() const QDateTime Event::toTimestamp(const QJsonValue& v) { - Q_ASSERT(v.isDouble()); + Q_ASSERT(v.isDouble() || v.isNull()); return QDateTime::fromMSecsSinceEpoch( static_cast<long long int>(v.toDouble()), Qt::UTC); } QStringList Event::toStringList(const QJsonValue& v) { - Q_ASSERT(v.isArray()); + Q_ASSERT(v.isArray() || v.isNull()); QStringList l; for( const QJsonValue& e : v.toArray() ) |