summaryrefslogtreecommitdiff
path: root/columnlistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'columnlistmodel.cpp')
-rw-r--r--columnlistmodel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/columnlistmodel.cpp b/columnlistmodel.cpp
index b0ff343..4630a77 100644
--- a/columnlistmodel.cpp
+++ b/columnlistmodel.cpp
@@ -101,17 +101,17 @@ ColumnListModel::setData(const QModelIndex &index, const QVariant &value, int ro
QString text = value.toString();
if (index.column() == 0) {
m_columnList->table()->model()->undoStack()->push(
- new ChangeColumnPropertyCommand(column, Column::NameProperty, text));
+ new SetObjectPropertyCommand(column, "name", text));
goto OK;
}
if (index.column() == 1) {
m_columnList->table()->model()->undoStack()->push(
- new ChangeColumnPropertyCommand(column, Column::DataTypeProperty, text));
+ new SetObjectPropertyCommand(column, "dataType", text));
goto OK;
}
if (index.column() == 4) {
m_columnList->table()->model()->undoStack()->push(
- new ChangeColumnPropertyCommand(column, Column::NotesProperty, text));
+ new SetObjectPropertyCommand(column, "notes", text));
goto OK;
}
}
@@ -119,16 +119,16 @@ ColumnListModel::setData(const QModelIndex &index, const QVariant &value, int ro
bool checked = value.toInt() == Qt::Checked ? true : false;
if (index.column() == 2) {
m_columnList->table()->model()->undoStack()->push(
- new ChangeColumnPropertyCommand(column, Column::RequiredProperty, checked));
+ new SetObjectPropertyCommand(column, "required", checked));
goto OK;
}
if (index.column() == 3) {
m_columnList->table()->model()->undoStack()->push(
- new ChangeColumnPropertyCommand(column, Column::PrimaryKeyProperty, checked));
+ new SetObjectPropertyCommand(column, "primaryKey", checked));
if (!column->isRequired()) {
// TODO is there a simple way to group this with the previous command?
m_columnList->table()->model()->undoStack()->push(
- new ChangeColumnPropertyCommand(column, Column::RequiredProperty, true));
+ new SetObjectPropertyCommand(column, "required", true));
}
goto OK;
}