Minor fixes to various models
This commit is contained in:
committed by
Tobias Fella
parent
45cee495a5
commit
96d24f5c3a
@@ -215,7 +215,7 @@ QVariant RoomListModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant();
|
||||
}
|
||||
NeoChatRoom *room = m_rooms.at(index.row());
|
||||
if (role == DisplayNameRole) {
|
||||
if (role == DisplayNameRole || role == Qt::DisplayRole) {
|
||||
return room->displayName();
|
||||
}
|
||||
if (role == EscapedDisplayNameRole) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
* @brief Defines the model roles.
|
||||
*/
|
||||
enum EventRoles {
|
||||
DisplayNameRole = Qt::DisplayRole, /**< The display name of the room. */
|
||||
DisplayNameRole = Qt::UserRole, /**< The display name of the room. */
|
||||
EscapedDisplayNameRole, /**< HTML-Escaped display name of the room. */
|
||||
AvatarRole, /**< The source URL for the room's avatar. */
|
||||
CanonicalAliasRole, /**< The room canonical alias. */
|
||||
|
||||
Reference in New Issue
Block a user