diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-10 20:03:42 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-17 12:01:54 +0200 |
commit | 2732231182d9bcfdd613cc86f70e578e82b7c2aa (patch) | |
tree | 9ffc85526b3889c88ae8618c0e4ec9d5634c9c62 /src/sql/kernel | |
parent | 008343a05e16081e2ed2b7f5166c6d5381a427ca (diff) |
Cleanup remaining QVariant::Type uses in Qt Sql
Change-Id: Ibcaa678cd9f9c957392a75b477fa6821f9a69127
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/sql/kernel')
-rw-r--r-- | src/sql/kernel/qsqlfield.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h index 3a133c4e6b..27ad47ca35 100644 --- a/src/sql/kernel/qsqlfield.h +++ b/src/sql/kernel/qsqlfield.h @@ -54,7 +54,7 @@ class Q_SQL_EXPORT QSqlField public: enum RequiredStatus { Unknown = -1, Optional = 0, Required = 1 }; -#if QT_DEPRECATED_SINCE(6,0) +#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) @@ -84,12 +84,14 @@ public: QMetaType metaType() const; void setMetaType(QMetaType type); -#if QT_DEPRECATED_SINCE(6,0) + +#if QT_DEPRECATED_SINCE(6, 0) 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))); } #endif + void setRequiredStatus(RequiredStatus status); inline void setRequired(bool required) { setRequiredStatus(required ? Required : Optional); } |