From 2e1ab639c64e6e94f78c4d89b4d4293d422dbc22 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sun, 25 Jul 2021 16:48:48 +0200 Subject: [PATCH] Fix build failure against changes in libQuotient API This changes the RoomListModel's JoinState role to expose the enum value instead of a string. We don't actually use that role anywhere so it's fine. --- src/roomlistmodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/roomlistmodel.cpp b/src/roomlistmodel.cpp index 60c71efa8..b131ba123 100644 --- a/src/roomlistmodel.cpp +++ b/src/roomlistmodel.cpp @@ -26,6 +26,8 @@ #include "notificationsmanager.h" #include "roommanager.h" +Q_DECLARE_METATYPE(Quotient::JoinState) + #ifndef Q_OS_ANDROID bool useUnityCounter() { @@ -375,7 +377,7 @@ QVariant RoomListModel::data(const QModelIndex &index, int role) const if (!room->successorId().isEmpty()) { return QStringLiteral("upgraded"); } - return toCString(room->joinState()); + return QVariant::fromValue(room->joinState()); } if (role == CurrentRoomRole) { return QVariant::fromValue(room);