diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/doc/snippets/code/src_sql_kernel_qsqlquery.cpp | 2 | ||||
-rw-r--r-- | src/sql/kernel/qsqlfield.h | 14 | ||||
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 6 | ||||
-rw-r--r-- | src/sql/kernel/qsqlresult.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/sql/doc/snippets/code/src_sql_kernel_qsqlquery.cpp b/src/sql/doc/snippets/code/src_sql_kernel_qsqlquery.cpp index 496c9716219..71bd6eccf07 100644 --- a/src/sql/doc/snippets/code/src_sql_kernel_qsqlquery.cpp +++ b/src/sql/doc/snippets/code/src_sql_kernel_qsqlquery.cpp @@ -73,7 +73,7 @@ ints << 1 << 2 << 3 << 4; q.addBindValue(ints); QVariantList names; -names << "Harald" << "Boris" << "Trond" << QVariant(QVariant::String); +names << "Harald" << "Boris" << "Trond" << QVariant(QMetaType::QString); q.addBindValue(names); if (!q.execBatch()) diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h index 27ad47ca356..80b412a9739 100644 --- a/src/sql/kernel/qsqlfield.h +++ b/src/sql/kernel/qsqlfield.h @@ -54,13 +54,6 @@ class Q_SQL_EXPORT QSqlField public: enum RequiredStatus { Unknown = -1, Optional = 0, Required = 1 }; -#if QT_DEPRECATED_SINCE(6, 0) - QT_DEPRECATED_VERSION_X_6_0("Use the constructor using a QMetaType instead") - QSqlField(const QString& fieldName, QVariant::Type type, const QString &tableName = QString()) - : QSqlField(fieldName, QMetaType(type), tableName) - {} -#endif - explicit QSqlField(const QString& fieldName = QString(), QMetaType type = QMetaType(), const QString &tableName = QString()); QSqlField(const QSqlField& other); @@ -86,10 +79,17 @@ public: void setMetaType(QMetaType type); #if QT_DEPRECATED_SINCE(6, 0) + QT_WARNING_PUSH + QT_WARNING_DISABLE_DEPRECATED + QT_DEPRECATED_VERSION_X_6_0("Use the constructor using a QMetaType instead") + QSqlField(const QString& fieldName, QVariant::Type type, const QString &tableName = QString()) + : QSqlField(fieldName, QMetaType(type), tableName) + {} QT_DEPRECATED_VERSION_X_6_0("Use metaType() instead") QVariant::Type type() const { return QVariant::Type(metaType().id()); }; QT_DEPRECATED_VERSION_X_6_0("Use setMetaType() instead") void setType(QVariant::Type type) { setMetaType(QMetaType(int(type))); } + QT_WARNING_POP #endif void setRequiredStatus(RequiredStatus status); diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 5909709edca..d51d596d142 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -1047,7 +1047,7 @@ bool QSqlQuery::exec() To bind NULL values, a null QVariant of the relevant type has to be added to the bound QVariantList; for example, \c - {QVariant(QVariant::String)} should be used if you are using + {QVariant(QMetaType::QString)} should be used if you are using strings. \note Every bound QVariantList must contain the same amount of @@ -1085,7 +1085,7 @@ bool QSqlQuery::execBatch(BatchExecutionMode mode) the result into. To bind a NULL value, use a null QVariant; for example, use - \c {QVariant(QVariant::String)} if you are binding a string. + \c {QVariant(QMetaType::QString)} if you are binding a string. \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. To bind a NULL value, use a null QVariant; for example, use \c - {QVariant(QVariant::String)} if you are binding a string. + {QVariant(QMetaType::QString)} if you are binding a string. \sa bindValue(), prepare(), exec(), boundValue(), boundValues() */ diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 5b440d704b0..a948abb13e4 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -935,7 +935,7 @@ void QSqlResult::virtual_hook(int, void *) contain equal amount of values (rows). NULL values are passed in as typed QVariants, for example - \c {QVariant(QVariant::Int)} for an integer NULL value. + \c {QVariant(QMetaType::Int)} for an integer NULL value. Example: |