|
|
@ -282,6 +282,7 @@ TimelineModel::roleNames() const |
|
|
|
{RoomId, "roomId"}, |
|
|
|
{RoomId, "roomId"}, |
|
|
|
{RoomName, "roomName"}, |
|
|
|
{RoomName, "roomName"}, |
|
|
|
{RoomTopic, "roomTopic"}, |
|
|
|
{RoomTopic, "roomTopic"}, |
|
|
|
|
|
|
|
{CallType, "callType"}, |
|
|
|
{Dump, "dump"}, |
|
|
|
{Dump, "dump"}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
@ -435,6 +436,8 @@ TimelineModel::data(const QString &id, int role) const |
|
|
|
return QVariant(QString::fromStdString(room_name(event))); |
|
|
|
return QVariant(QString::fromStdString(room_name(event))); |
|
|
|
case RoomTopic: |
|
|
|
case RoomTopic: |
|
|
|
return QVariant(QString::fromStdString(room_topic(event))); |
|
|
|
return QVariant(QString::fromStdString(room_topic(event))); |
|
|
|
|
|
|
|
case CallType: |
|
|
|
|
|
|
|
return QVariant(QString::fromStdString(call_type(event))); |
|
|
|
case Dump: { |
|
|
|
case Dump: { |
|
|
|
QVariantMap m; |
|
|
|
QVariantMap m; |
|
|
|
auto names = roleNames(); |
|
|
|
auto names = roleNames(); |
|
|
@ -464,6 +467,7 @@ TimelineModel::data(const QString &id, int role) const |
|
|
|
m.insert(names[ReplyTo], data(id, static_cast<int>(ReplyTo))); |
|
|
|
m.insert(names[ReplyTo], data(id, static_cast<int>(ReplyTo))); |
|
|
|
m.insert(names[RoomName], data(id, static_cast<int>(RoomName))); |
|
|
|
m.insert(names[RoomName], data(id, static_cast<int>(RoomName))); |
|
|
|
m.insert(names[RoomTopic], data(id, static_cast<int>(RoomTopic))); |
|
|
|
m.insert(names[RoomTopic], data(id, static_cast<int>(RoomTopic))); |
|
|
|
|
|
|
|
m.insert(names[CallType], data(id, static_cast<int>(CallType))); |
|
|
|
|
|
|
|
|
|
|
|
return QVariant(m); |
|
|
|
return QVariant(m); |
|
|
|
} |
|
|
|
} |
|
|
|