Basic JSON RESTful client fetching items from a local server at application start and adding them to the model.

This commit is contained in:
2026-01-25 10:47:19 +01:00
parent e1bc779791
commit e29cd0aebf
8 changed files with 178 additions and 3 deletions

View File

@ -193,6 +193,12 @@ void TableModel::insertItems(int startPosition,
const QModelIndex& parentIndex) {
const QList<ModelItemValues> valueList = JsonParser::toItemValuesList(jsonDoc, ITEM_KEY_STRING);
if (valueList.empty()) {
/// don't try inserting if no values to insert
qDebug() << "No items found in JSON document. Not adding anything...";
return;
}
insertItems(startPosition, valueList, parentIndex);
}