Rename LongOperationRole to ProgressInfoRole
This commit is contained in:
@@ -45,7 +45,7 @@ QHash<int, QByteArray> MessageEventModel::roleNames() const
|
|||||||
roles[ContentRole] = "content";
|
roles[ContentRole] = "content";
|
||||||
roles[HighlightRole] = "isHighlighted";
|
roles[HighlightRole] = "isHighlighted";
|
||||||
roles[SpecialMarksRole] = "marks";
|
roles[SpecialMarksRole] = "marks";
|
||||||
roles[LongOperationRole] = "progressInfo";
|
roles[ProgressInfoRole] = "progressInfo";
|
||||||
roles[ShowLinkPreviewRole] = "showLinkPreview";
|
roles[ShowLinkPreviewRole] = "showLinkPreview";
|
||||||
roles[LinkPreviewRole] = "linkPreview";
|
roles[LinkPreviewRole] = "linkPreview";
|
||||||
roles[MediaInfoRole] = "mediaInfo";
|
roles[MediaInfoRole] = "mediaInfo";
|
||||||
@@ -696,7 +696,7 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
return !evt.id().isEmpty() ? evt.id() : evt.transactionId();
|
return !evt.id().isEmpty() ? evt.id() : evt.transactionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role == LongOperationRole) {
|
if (role == ProgressInfoRole) {
|
||||||
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
|
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
|
||||||
if (e->hasFileContent()) {
|
if (e->hasFileContent()) {
|
||||||
return QVariant::fromValue(m_currentRoom->fileTransferInfo(e->id()));
|
return QVariant::fromValue(m_currentRoom->fileTransferInfo(e->id()));
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
ContentRole, /**< The full message content. */
|
ContentRole, /**< The full message content. */
|
||||||
HighlightRole, /**< Whether the event should be highlighted. */
|
HighlightRole, /**< Whether the event should be highlighted. */
|
||||||
SpecialMarksRole, /**< Whether the event is hidden or not. */
|
SpecialMarksRole, /**< Whether the event is hidden or not. */
|
||||||
LongOperationRole, /**< Progress info when downloading files. */
|
ProgressInfoRole, /**< Progress info when downloading files. */
|
||||||
FormattedBodyRole, /**< The formatted body of a rich message. */
|
FormattedBodyRole, /**< The formatted body of a rich message. */
|
||||||
GenericDisplayRole, /**< A generic string based upon the message type. */
|
GenericDisplayRole, /**< A generic string based upon the message type. */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user