diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 16:57:12 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 16:57:27 +0100 |
commit | a1dbdcbd6e818118f5fc28cdd39e47a02380adbd (patch) | |
tree | 0d813d9d72baeb1b5f7be048e775896c73f134f5 /src/sql/kernel/qsqlfield.cpp | |
parent | 67ea445f09db9feea4e863faa12c45fb007f53a4 (diff) | |
parent | 4cbadf699838406d14366ce61deec03cf45113f7 (diff) | |
download | qtbase-a1dbdcbd6e818118f5fc28cdd39e47a02380adbd.tar.gz |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
src/corelib/Qt5CoreConfigExtras.cmake.in
src/corelib/Qt5CoreMacros.cmake
src/dbus/Qt5DBusConfigExtras.cmake.in
src/widgets/Qt5WidgetsConfigExtras.cmake.in
Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
Diffstat (limited to 'src/sql/kernel/qsqlfield.cpp')
-rw-r--r-- | src/sql/kernel/qsqlfield.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index 5a6d173b3b..86a22bae10 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -48,7 +48,7 @@ class QSqlFieldPrivate public: QSqlFieldPrivate(const QString &name, QVariant::Type type, const QString &tableName) : - ref(1), nm(name), table(tableName), def(QVariant()), type(type), + ref(1), nm(name), table(tableName), def(QVariant()), type(QMetaType::Type(type)), req(QSqlField::Unknown), len(-1), prec(-1), tp(-1), ro(false), gen(true), autoval(false) {} @@ -86,7 +86,7 @@ public: QString nm; QString table; QVariant def; - QVariant::Type type; + QMetaType::Type type; QSqlField::RequiredStatus req; int len; int prec; @@ -399,7 +399,7 @@ QString QSqlField::name() const */ QVariant::Type QSqlField::type() const { - return d->type; + return QVariant::Type(d->type); } /*! @@ -411,12 +411,11 @@ QVariant::Type QSqlField::type() const void QSqlField::setType(QVariant::Type type) { detach(); - d->type = type; + d->type = QMetaType::Type(type); if (!val.isValid()) val = QVariant(type); } - /*! Returns \c true if the field's value is read-only; otherwise returns false. @@ -526,7 +525,7 @@ bool QSqlField::isGenerated() const */ bool QSqlField::isValid() const { - return d->type != QVariant::Invalid; + return d->type != QMetaType::UnknownType; } #ifndef QT_NO_DEBUG_STREAM |