From 26450fe6a6340b09b1e3fa49c35028aa15ef223f Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 15 Mar 2012 11:23:27 +0100 Subject: QSqlTableModel::removeRows() enforce edit strategy For OnFieldChange and OnRowChange, we don't want more than one row in the cache with uncommitted changes. This could happen if deletion in the database fails while other changes are pending. Chosen solution is to return false if other rows have pending changes. Also, we only allow 1 row removed at a time. Updated test, changes and documentation. Change-Id: I68baf6d221789b4754e891535070011c759a2155 Reviewed-by: Honglei Zhang --- dist/changes-5.0.0 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dist/changes-5.0.0') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index ebe8ad5331..03dc414e7f 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -413,6 +413,9 @@ model methods setData() or setRecord(). before doing anything. Previously, it would remove what it could and ignore the rest of the range. +* removeRows(), for OnFieldChange and OnRowChange, allows only 1 row to be +removed and only if there are no other changed rows. + * setRecord() and insertRecord() -Only use fields where generated flag is set to true. This is is consistent with the meaning of the flag. -- cgit v1.2.3