Minor fixes to various models
This commit is contained in:
committed by
Tobias Fella
parent
45cee495a5
commit
96d24f5c3a
@@ -190,7 +190,7 @@ QVariant PermissionsModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
const auto permission = m_permissions.value(index.row());
|
||||
if (role == NameRole) {
|
||||
if (role == NameRole || role == Qt::DisplayRole) {
|
||||
if (permissionNames.keys().contains(permission)) {
|
||||
return permissionNames.value(permission).toString();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
* @brief Defines the model roles.
|
||||
*/
|
||||
enum Roles {
|
||||
NameRole = Qt::DisplayRole, /**< The permission name. */
|
||||
NameRole = Qt::UserRole, /**< The permission name. */
|
||||
SubtitleRole, /**< The description of the permission. */
|
||||
TypeRole, /**< The base type of the permission, normally the event type id except for ban, kick, etc. */
|
||||
LevelRole, /**< The current power level for the permission. */
|
||||
|
||||
Reference in New Issue
Block a user