Refactored JsonParser to not use roles (or their names) directly.

This commit is contained in:
2025-12-29 13:03:09 +01:00
parent 3610aa3841
commit acb8be5602
4 changed files with 38 additions and 21 deletions

View File

@ -236,9 +236,11 @@ QMap<int, QVariant> TableModel::onlyChangedValues(const QModelIndex& index,
}
bool TableModel::isEmptyValueEqualToZero(const int role) const {
const QString roleName = ROLE_NAMES.value(role);
if (INT_COLUMNS.contains(roleName)) {
if (INT_ROLES.contains(role)) {
return true;
} else if (DOUBLE_ROLES.contains(role)) {
return true;
} else {
return false;
}
return false;
}