path: root/src/plugins/sqldrivers/sqlite
diff options
authorOlivier Goffart <>2019-12-02 17:54:48 +0100
committerOlivier Goffart <>2020-01-23 16:46:51 +0100
commit73d1476fb1397948a4d806bd921fce372bd8d63b (patch)
treea476349c26627027d78c1279da00ef633323311f /src/plugins/sqldrivers/sqlite
parenta78d66743171557d79b16c08be775e3ac15bb4ef (diff)
Replace most use of QVariant::type and occurrences of QVariant::Type
I made a clazy automated check that replaced the use of QVariant::Type by the equivalent in QMetaType. This has been deprecated since Qt 5.0, but many uses were not yet removed. In addition, there was some manual changes to fix the compilation errors. Adapted the Private API of QDateTimeParser and QMimeDataPrivate and adjust QDateTimeEdit and QSpinBox. QVariant(QVariant::Invalid) in qstylesheet made no sense. But note that in QVariant::save, we actually wanted to use the non-user type. In the SQL module, many changes were actually reverted because the API still expects QVarient::Type. Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e Reviewed-by: Lars Knoll <>
Diffstat (limited to 'src/plugins/sqldrivers/sqlite')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
index 65d3f0a580..551d762434 100644
--- a/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
+++ b/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
@@ -505,7 +505,7 @@ bool QSQLiteResult::exec()
if (value.isNull()) {
res = sqlite3_bind_null(d->stmt, i + 1);
} else {
- switch (value.type()) {
+ switch (value.userType()) {
case QVariant::ByteArray: {
const QByteArray *ba = static_cast<const QByteArray*>(value.constData());
res = sqlite3_bind_blob(d->stmt, i + 1, ba->constData(),