From fab6c26770827ce2b8ed8f5d06b3677b75a19cec Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 25 May 2016 19:45:15 +0900 Subject: Introducing EventList class + minor fix Now you can parse a JSON array into a list of events with a one-liner. Also, fromMSecsSinceEpoch accepts a qint64, not quint64 - fixed the respective cast. --- events/event.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'events/event.h') diff --git a/events/event.h b/events/event.h index 6a8d0e89..a009aa99 100644 --- a/events/event.h +++ b/events/event.h @@ -25,6 +25,8 @@ #include #include +class QJsonArray; + namespace QMatrixClient { enum class EventType @@ -56,6 +58,8 @@ namespace QMatrixClient Private* d; }; + QList eventListFromJson(const QJsonArray& contents); + /** * Finds a place in the timeline where a new event/message could be inserted. * @return an iterator to an item with the earliest timestamp after -- cgit v1.2.3