Using lower case role names for improved compatibility with the server.
This commit is contained in:
@ -25,8 +25,8 @@ static UserRoles DEFAULT_ROLE = NameRole;
|
|||||||
static QList<UserRoles> USER_FACING_ROLES = {NameRole, DescriptionRole, InfoRole, AmountRole,
|
static QList<UserRoles> USER_FACING_ROLES = {NameRole, DescriptionRole, InfoRole, AmountRole,
|
||||||
FactorRole};
|
FactorRole};
|
||||||
static QHash<int, QByteArray> ROLE_NAMES = {
|
static QHash<int, QByteArray> ROLE_NAMES = {
|
||||||
{NameRole, "Name"}, {DescriptionRole, "Description"}, {InfoRole, "Info"},
|
{NameRole, "name"}, {DescriptionRole, "description"}, {InfoRole, "info"},
|
||||||
{AmountRole, "Amount"}, {FactorRole, "Factor"}, {ToStringRole, "ToString"},
|
{AmountRole, "amount"}, {FactorRole, "factor"}, {ToStringRole, "ToString"},
|
||||||
{IdRole, "id"}};
|
{IdRole, "id"}};
|
||||||
static QList<UserRoles> STRING_ROLES = {NameRole, DescriptionRole, InfoRole, IdRole};
|
static QList<UserRoles> STRING_ROLES = {NameRole, DescriptionRole, InfoRole, IdRole};
|
||||||
static QList<UserRoles> INT_ROLES = {AmountRole};
|
static QList<UserRoles> INT_ROLES = {AmountRole};
|
||||||
|
|||||||
@ -16,6 +16,7 @@ QByteArray TableModel::generateExampleItems() {
|
|||||||
QJsonObject rootObject;
|
QJsonObject rootObject;
|
||||||
QJsonArray array;
|
QJsonArray array;
|
||||||
|
|
||||||
|
// TODO use JsonParser for the item generation
|
||||||
for (int row = 0; row < 5; ++row) {
|
for (int row = 0; row < 5; ++row) {
|
||||||
QJsonObject itemObject;
|
QJsonObject itemObject;
|
||||||
// itemObject.insert("uuid", m_uuid.toString());
|
// itemObject.insert("uuid", m_uuid.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user