qt5base-lts/tests/auto/sql/models
Giuseppe D'Angelo 14f9f00fdb QSqlQuery: make it a move only type
QSqlQuery is a broken value class. Copying one object would mean
copying database state (the result set, the cursor position, etc.)
which isn't generally available for all database drivers.
For that reason, the current implementation does not honor value
semantics -- modifying a QSqlQuery object has visible side effects
on its existing copies (!).

The correct solution is to accept that QSqlQuery is a move only
type, not a value type. Add move semantics to it, and deprecate
its copies.

(We can't just *remove* copies in Qt 6 due to SC/BC constraints).

[ChangeLog][QtSql][QSqlQuery] QSqlQuery copy operations have
been deprecated. QSqlQuery copy semantics cannot be implemented
correctly, as it's not generally possible to copy a result set
of a query when copying the corresponding QSqlQuery object. This
resulted in modifications on a QSqlQuery having visible (and
unintended) side effects on its copies. Instead, treat QSqlQuery
as a move-only type.

Fixes: QTBUG-91766
Change-Id: Iabd3aa605332a5c15c524303418bf17a21ed520b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-21 10:16:56 +01:00
..
qsqlquerymodel QSqlQuery: make it a move only type 2021-03-21 10:16:56 +01:00
qsqlrelationaldelegate Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsqlrelationaltablemodel Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsqltablemodel Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Sql: Fix heap-user-after-free for globally initialized db objects 2020-07-01 10:03:57 +02:00