Using lower case role names for improved compatibility with the server.

This commit is contained in:
2026-01-29 13:06:46 +01:00
parent 08c2e3a093
commit 2a152daa70
2 changed files with 3 additions and 2 deletions

View File

@ -25,8 +25,8 @@ static UserRoles DEFAULT_ROLE = NameRole;
static QList<UserRoles> USER_FACING_ROLES = {NameRole, DescriptionRole, InfoRole, AmountRole,
FactorRole};
static QHash<int, QByteArray> ROLE_NAMES = {
{NameRole, "Name"}, {DescriptionRole, "Description"}, {InfoRole, "Info"},
{AmountRole, "Amount"}, {FactorRole, "Factor"}, {ToStringRole, "ToString"},
{NameRole, "name"}, {DescriptionRole, "description"}, {InfoRole, "info"},
{AmountRole, "amount"}, {FactorRole, "factor"}, {ToStringRole, "ToString"},
{IdRole, "id"}};
static QList<UserRoles> STRING_ROLES = {NameRole, DescriptionRole, InfoRole, IdRole};
static QList<UserRoles> INT_ROLES = {AmountRole};

View File

@ -16,6 +16,7 @@ QByteArray TableModel::generateExampleItems() {
QJsonObject rootObject;
QJsonArray array;
// TODO use JsonParser for the item generation
for (int row = 0; row < 5; ++row) {
QJsonObject itemObject;
// itemObject.insert("uuid", m_uuid.toString());