diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-12-22 15:09:23 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-01-13 06:31:38 +0000 |
commit | d2e8310680f622eed6f46542d69bd4e6ce330429 (patch) | |
tree | f80919c740b4db0f1077367fa90ba2920a099ef2 /tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | |
parent | b4a0ecafc6f0af57861548ee73737157f679d709 (diff) |
Adapt SQL drivers to Qt 6 change of QVariant::isNull
In Qt 5, QVariant::isNull returned true if either the variant didn't
contain a value, or if the value was of a nullable type where the type's
isNull member function returned true.
In Qt 6, QVariant::isNull only returns true for variants that don't
contain a value; if the value contained is e.g. a null-QString or
QDateTime, then QVariant::isNull returns false.
This change requires a follow up in the SQL drivers, which must
still treat null-values the same as null-variants, lest they write data
into the data base.
Add a static helper to QSqlResultPrivate that implements isNull-checking
of variants that contain a nullable type relevant for Sql, and add a
test case to the QSqlQuery test that exercises that code.
Fixes: QTBUG-99408
Fixes: QTBUG-98471
Change-Id: I08b74a33aa3235c37d974f182da1f2bdcfd8217e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 999d856bc8569455c21850dc524a595e6b6f52b6)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp')
0 files changed, 0 insertions, 0 deletions