Refactored JsonParser to not use roles (or their names) directly.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user