aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-06-03 18:24:48 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-06-03 18:24:48 +0900
commit5be3dcc9d45d2c52a514b5ebfa691dca9c73b047 (patch)
treecfc416560e8dbe9f6c015a065bdfea555926a475
parent38440a724acf8836e74e5bca29105e493f36eb7c (diff)
downloadlibquotient-5be3dcc9d45d2c52a514b5ebfa691dca9c73b047.tar.gz
libquotient-5be3dcc9d45d2c52a514b5ebfa691dca9c73b047.zip
csapi/notifications.*: Use QVariant instead of QJsonObject
Thanks to the latest GTAD. QJsonObject wasn't quite correct there.
-rw-r--r--lib/csapi/notifications.cpp2
-rw-r--r--lib/csapi/notifications.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/csapi/notifications.cpp b/lib/csapi/notifications.cpp
index 9bff072b..9329857d 100644
--- a/lib/csapi/notifications.cpp
+++ b/lib/csapi/notifications.cpp
@@ -23,7 +23,7 @@ namespace QMatrixClient
const auto& _json = jv.toObject();
GetNotificationsJob::Notification result;
result.actions =
- fromJson<QVector<QJsonObject>>(_json.value("actions"));
+ fromJson<QVector<QVariant>>(_json.value("actions"));
result.event =
fromJson<EventPtr>(_json.value("event"));
result.profileTag =
diff --git a/lib/csapi/notifications.h b/lib/csapi/notifications.h
index 3a603364..094fa3af 100644
--- a/lib/csapi/notifications.h
+++ b/lib/csapi/notifications.h
@@ -6,10 +6,11 @@
#include "jobs/basejob.h"
+#include "events/event.h"
#include "converters.h"
#include <QtCore/QVector>
+#include <QtCore/QVariant>
#include <QtCore/QJsonObject>
-#include "events/event.h"
namespace QMatrixClient
{
@@ -22,7 +23,7 @@ namespace QMatrixClient
struct Notification
{
- QVector<QJsonObject> actions;
+ QVector<QVariant> actions;
EventPtr event;
QString profileTag;
bool read;