diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-22 16:39:11 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-22 20:55:35 +0200 |
commit | 2692cb0e613e53df78e67a8826295b02d9079f88 (patch) | |
tree | c5aa675b069bcae488e0a15d6c5e81bb0ee88449 /src/sql | |
parent | 55f4a4e6f02febdb7732fdc7b193293555242237 (diff) |
Doc: Fix QSqlField documentation for deprecated constructor
Also, merge constructor overloads, and remove superfluous explicit from
a non-converting constructor.
Change-Id: I60d0e646d1aaeb8ea66b7598076c3e3ba356c12e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/kernel/qsqlfield.cpp | 26 | ||||
-rw-r--r-- | src/sql/kernel/qsqlfield.h | 9 |
2 files changed, 4 insertions, 31 deletions
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index 5a3d0a1a23..a4d4309da2 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -155,16 +155,8 @@ public: */ /*! - \fn QSqlField::QSqlField(const QString &fieldName, QVariant::Type type) - - Constructs an empty field called \a fieldName of variant type \a type. - - \sa setRequiredStatus(), setLength(), setPrecision(), setDefaultValue(), - setGenerated(), setReadOnly() -*/ - -/*! \fn QSqlField::QSqlField(const QString &fieldName, QVariant::Type type, const QString &table) + \obsolete Use the constructor using a QMetaType instead \overload Constructs an empty field called \a fieldName of variant type \a @@ -175,21 +167,7 @@ public: */ /*! - \fn QSqlField::QSqlField(const QString &fieldName, QVariant::Type type) - - Constructs an empty field called \a fieldName of type \a type. - - \sa setRequiredStatus(), setLength(), setPrecision(), setDefaultValue(), - setGenerated(), setReadOnly() -*/ -QSqlField::QSqlField(const QString &fieldName, QMetaType type) -{ - d = new QSqlFieldPrivate(fieldName, type, QString()); - val = QVariant(QMetaType(type), nullptr); -} - -/*! - \fn QSqlField::QSqlField(const QString &fieldName, QVariant::Type type, const QString &table) + \since 6.0 \overload Constructs an empty field called \a fieldName of type \a diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h index c4acc6a22c..3a133c4e6b 100644 --- a/src/sql/kernel/qsqlfield.h +++ b/src/sql/kernel/qsqlfield.h @@ -56,17 +56,12 @@ public: #if QT_DEPRECATED_SINCE(6,0) QT_DEPRECATED_VERSION_X_6_0("Use the constructor using a QMetaType instead") - explicit QSqlField(const QString& fieldName, QVariant::Type type) - : QSqlField(fieldName, QMetaType(type)) - {} - QT_DEPRECATED_VERSION_X_6_0("Use the constructor using a QMetaType instead") - QSqlField(const QString &fieldName, QVariant::Type type, const QString &tableName) + 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()); - QSqlField(const QString &fieldName, QMetaType type, const QString &tableName); + explicit QSqlField(const QString& fieldName = QString(), QMetaType type = QMetaType(), const QString &tableName = QString()); QSqlField(const QSqlField& other); QSqlField& operator=(const QSqlField& other); |