Rename LongOperationRole to ProgressInfoRole

This commit is contained in:
Tobias Fella
2023-05-17 23:23:38 +02:00
parent b823f2c6b9
commit ee65ad22e6
2 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ QHash<int, QByteArray> MessageEventModel::roleNames() const
roles[ContentRole] = "content";
roles[HighlightRole] = "isHighlighted";
roles[SpecialMarksRole] = "marks";
roles[LongOperationRole] = "progressInfo";
roles[ProgressInfoRole] = "progressInfo";
roles[ShowLinkPreviewRole] = "showLinkPreview";
roles[LinkPreviewRole] = "linkPreview";
roles[MediaInfoRole] = "mediaInfo";
@@ -696,7 +696,7 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
return !evt.id().isEmpty() ? evt.id() : evt.transactionId();
}
if (role == LongOperationRole) {
if (role == ProgressInfoRole) {
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
if (e->hasFileContent()) {
return QVariant::fromValue(m_currentRoom->fileTransferInfo(e->id()));

View File

@@ -69,7 +69,7 @@ public:
ContentRole, /**< The full message content. */
HighlightRole, /**< Whether the event should be highlighted. */
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. */
GenericDisplayRole, /**< A generic string based upon the message type. */