diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-07-18 12:08:54 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 12:08:54 +0900 |
commit | ffa2228462afe5f2d330bc2aecad1029742222c4 (patch) | |
tree | 8ce9bde01ea897e3daf385b3706e72974282ba9b | |
parent | c898caed6a7c8d7a5466d556b2d186ddc861884b (diff) | |
parent | 86acf9fb5a5ea4328e6130ba8263ec8cd82ba0d2 (diff) | |
download | libquotient-ffa2228462afe5f2d330bc2aecad1029742222c4.tar.gz libquotient-ffa2228462afe5f2d330bc2aecad1029742222c4.zip |
Merge pull request #77 from Quiark/master
Room event timestamp can also be undefined
-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 0132fdc6..8a6de822 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() || v.isNull()); + Q_ASSERT(v.isDouble() || v.isNull() || v.isUndefined()); return QDateTime::fromMSecsSinceEpoch( static_cast<long long int>(v.toDouble()), Qt::UTC); } QStringList Event::toStringList(const QJsonValue& v) { - Q_ASSERT(v.isArray() || v.isNull()); + Q_ASSERT(v.isArray() || v.isNull() || v.isUndefined()); QStringList l; for( const QJsonValue& e : v.toArray() ) |