Move showAuthor role to MessageModel, so it's available for all models
This fixes features like the search model, where no message delegates could be created because it's missing showAuthor.
This commit is contained in:
committed by
James Graham
parent
a67ce75924
commit
1d532a1fc1
@@ -92,7 +92,7 @@ QVariant MessageFilterModel::data(const QModelIndex &index, int role) const
|
||||
return authorList(mapToSource(index).row());
|
||||
} else if (role == ExcessAuthorsRole) {
|
||||
return excessAuthors(mapToSource(index).row());
|
||||
} else if (role == ShowAuthorRole) {
|
||||
} else if (role == MessageModel::ShowAuthorRole) {
|
||||
return showAuthor(index);
|
||||
}
|
||||
return QSortFilterProxyModel::data(index, role);
|
||||
@@ -105,7 +105,6 @@ QHash<int, QByteArray> MessageFilterModel::roleNames() const
|
||||
roles[StateEventsRole] = "stateEvents";
|
||||
roles[AuthorListRole] = "authorList";
|
||||
roles[ExcessAuthorsRole] = "excessAuthors";
|
||||
roles[ShowAuthorRole] = "showAuthor";
|
||||
return roles;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user