On sending (posting) item to the server the generated UUID is added to the local item.
This commit is contained in:
@ -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());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QUndoCommand>
|
||||
|
||||
typedef QHash<int, QVariant> ModelItemValues;
|
||||
typedef QMap<int, QVariant> ModelItemValues;
|
||||
|
||||
class TableModel;
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
class TableModel;
|
||||
|
||||
typedef QHash<int, QVariant> ModelItemValues;
|
||||
typedef QMap<int, QVariant> ModelItemValues;
|
||||
|
||||
class RemoveRowsCommand : public QUndoCommand {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user