diff --git a/model/metadata.h b/model/metadata.h index b5c4bda..20a5e06 100644 --- a/model/metadata.h +++ b/model/metadata.h @@ -25,8 +25,8 @@ static UserRoles DEFAULT_ROLE = NameRole; static QList USER_FACING_ROLES = {NameRole, DescriptionRole, InfoRole, AmountRole, FactorRole}; static QHash 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 STRING_ROLES = {NameRole, DescriptionRole, InfoRole, IdRole}; static QList INT_ROLES = {AmountRole}; diff --git a/model/tablemodel.cpp b/model/tablemodel.cpp index 504ceec..f11e3b3 100644 --- a/model/tablemodel.cpp +++ b/model/tablemodel.cpp @@ -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());