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.
This commit is contained in:
Tobias Fella
2021-07-25 16:48:48 +02:00
parent 40f0893048
commit 2e1ab639c6

View File

@@ -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);