On sending (posting) item to the server the generated UUID is added to the local item.

This commit is contained in:
2026-02-02 16:13:44 +01:00
parent bedf8084d3
commit 63fe96fb2e
16 changed files with 145 additions and 33 deletions

View File

@ -26,6 +26,11 @@ EditItemCommand::EditItemCommand(TableModel* model,
.arg(roleName)
.arg(index.data(DEFAULT_ROLE).toString())
.arg(value.toString());
} else if (role == IdRole) {
commandText = QString("Setting '%1' of item '%2' to '%3'")
.arg(roleName)
.arg(index.data(DEFAULT_ROLE).toString())
.arg(value.toString());
} else {
qWarning() << "Role didn't match! Using a generic command text...";
commandText = QString("Edit item '%1'").arg(index.data(DEFAULT_ROLE).toString());

View File

@ -3,7 +3,7 @@
#include <QUndoCommand>
typedef QHash<int, QVariant> ModelItemValues;
typedef QMap<int, QVariant> ModelItemValues;
class TableModel;

View File

@ -5,7 +5,7 @@
class TableModel;
typedef QHash<int, QVariant> ModelItemValues;
typedef QMap<int, QVariant> ModelItemValues;
class RemoveRowsCommand : public QUndoCommand {
public: