Go to file
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
.github/workflows Github Actions: many minor updates 2021-01-22 18:48:54 +01:00
bin Move syncqt.pl to libexec 2021-03-04 09:56:07 +01:00
cmake Properly set ICC and QCC 2021-03-19 21:02:23 +01:00
coin Allow disabling module build and building of tests per module 2021-02-19 16:28:06 +02:00
config.tests Remove the qmake project files 2021-01-07 15:32:28 +01:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Offline documentation CSS: Remove external link icon from video links 2021-02-19 08:49:12 +00:00
examples Remove unnecessary int() casting in QRandomGenerator::bounded 2021-03-17 06:21:52 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Move syncqt.pl to libexec 2021-03-04 09:56:07 +01:00
mkspecs qmake: Improve error message when detecting macOS platform SDK upgrade 2021-03-19 15:08:46 +00:00
qmake Unify QLibraryInfo settings 2021-03-17 11:57:11 +01:00
src QSqlQuery: make it a move only type 2021-03-21 10:16:56 +01:00
tests QSqlQuery: make it a move only type 2021-03-21 10:16:56 +01:00
util Enable X11 on other platforms than just Linux 2021-03-16 13:05:17 +00:00
.cmake.conf Bump version 2021-02-18 07:20:21 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore .gitignore: Qt Creator files cleanup 2020-09-25 07:50:15 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_configure.cmake Use newlines more consistently in generate compile-test code 2021-02-15 13:45:14 +01:00
.prev_qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
.qmake.conf Bump version 2021-02-18 07:20:21 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Fix double inclusion of QtAutoDetect.cmake in top-level build 2021-03-04 11:31:14 +01:00
config_help.txt Update name of c++2a to c++20 2021-02-10 07:54:06 +01:00
configure Remove the -qmake and -cmake configure arguments 2021-03-11 16:39:50 +01:00
configure.bat Remove superfluous variable assignments from configure.bat 2021-03-11 16:39:54 +01:00
configure.cmake Error out on attempt to configure framework build with lib infix 2021-03-17 09:04:57 +01:00
configure.json Update name of c++2a to c++20 2021-02-10 07:54:06 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake Add the 'FEATURE_qmake' feature 2021-03-04 09:49:44 +01:00
sync.profile Generate QUtf8StringView header file from qutf8stringview.h 2020-11-07 08:35:11 +00:00