Fix the search page

The search model needed to adapted to the changes in messageeventmodel
This commit is contained in:
Tobias Fella
2023-06-10 13:57:03 +00:00
parent 921abac3c1
commit 1de160cb19
7 changed files with 199 additions and 64 deletions

View File

@@ -50,17 +50,40 @@ public:
/**
* @brief Defines the model roles.
*
* For documentation of the roles, see MessageEventModel.
*
* Some of the roles exist only for compatibility with the MessageEventModel,
* since the same delegates are used.
*/
enum Roles {
DisplayRole = Qt::DisplayRole, /**< The message string. */
DelegateTypeRole, /**< The type of the event. */
ShowAuthorRole, /**< Whether the author should be shown (always true). */
AuthorRole, /**< The author of the event. */
ShowSectionRole, /**< Whether the section header should be shown. */
SectionRole, /**< The date of the event as a string. */
TimeRole, /**< The timestamp for when the event was sent. */
DisplayRole = Qt::DisplayRole,
DelegateTypeRole,
ShowAuthorRole,
AuthorRole,
ShowSectionRole,
SectionRole,
TimeRole,
EventIdRole,
ExcessReadMarkersRole,
HighlightRole,
ReadMarkersString,
PlainTextRole,
VerifiedRole,
ReplyAuthorRole,
ProgressInfoRole,
IsReplyRole,
ShowReactionsRole,
ReplyRole,
ReactionRole,
ReplyMediaInfoRole,
ReadMarkersRole,
IsPendingRole,
ShowReadMarkersRole,
ReplyIdRole,
MimeTypeRole,
ShowLinkPreviewRole,
LinkPreviewRole,
SourceRole,
};
Q_ENUM(Roles);
SearchModel(QObject *parent = nullptr);