Doc: Fix usages of deleted QVariant constructors

Finish the job started at 879d30394a41b7b7124fc8139e787a9bdbe0dfee

Change-Id: I217a4830ac8e17d5d1f8900e2d3134fbabf8b9a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit a97dbbd1a023fb4a0b7a518fad0ad9edbf1f23f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Sze Howe Koh 2023-01-10 13:58:28 +08:00 committed by Qt Cherry-pick Bot
parent 94f40ba267
commit e3daea6f17
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ ints << 1 << 2 << 3 << 4;
q.addBindValue(ints); q.addBindValue(ints);
QVariantList names; QVariantList names;
names << "Harald" << "Boris" << "Trond" << QVariant(QMetaType::QString); names << "Harald" << "Boris" << "Trond" << QVariant(QMetaType::fromType<QString>());
q.addBindValue(names); q.addBindValue(names);
if (!q.execBatch()) if (!q.execBatch())

View File

@ -1085,7 +1085,7 @@ bool QSqlQuery::execBatch(BatchExecutionMode mode)
the result into. the result into.
To bind a NULL value, use a null QVariant; for example, use To bind a NULL value, use a null QVariant; for example, use
\c {QVariant(QMetaType::QString)} if you are binding a string. \c {QVariant(QMetaType::fromType<QString>())} if you are binding a string.
\sa addBindValue(), prepare(), exec(), boundValue(), boundValues() \sa addBindValue(), prepare(), exec(), boundValue(), boundValues()
*/ */
@ -1115,7 +1115,7 @@ void QSqlQuery::bindValue(int pos, const QVariant& val, QSql::ParamType paramTyp
overwritten with data from the database after the exec() call. overwritten with data from the database after the exec() call.
To bind a NULL value, use a null QVariant; for example, use \c To bind a NULL value, use a null QVariant; for example, use \c
{QVariant(QMetaType::QString)} if you are binding a string. {QVariant(QMetaType::fromType<QString>())} if you are binding a string.
\sa bindValue(), prepare(), exec(), boundValue(), boundValues() \sa bindValue(), prepare(), exec(), boundValue(), boundValues()
*/ */

View File

@ -933,7 +933,7 @@ void QSqlResult::virtual_hook(int, void *)
contain equal amount of values (rows). contain equal amount of values (rows).
NULL values are passed in as typed QVariants, for example NULL values are passed in as typed QVariants, for example
\c {QVariant(QMetaType::Int)} for an integer NULL value. \c {QVariant(QMetaType::fromType<int>())} for an integer NULL value.
Example: Example: