Fix BC breakage by adding an overload for the QSqlField constructor

Change-Id: I253bb8cd97b982fa5ed5dd546c38deb1f7995986
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Andy Shaw 2017-11-10 17:14:23 +01:00
parent 48afcf97b4
commit 131c9a2462
2 changed files with 16 additions and 2 deletions

View File

@ -155,6 +155,19 @@ public:
*/
/*!
Constructs an empty field called \a fieldName of variant type \a type.
\sa setRequiredStatus(), setLength(), setPrecision(), setDefaultValue(),
setGenerated(), setReadOnly()
*/
QSqlField::QSqlField(const QString &fieldName, QVariant::Type type)
{
d = new QSqlFieldPrivate(fieldName, type, QString());
val = QVariant(type);
}
/*!
\overload
Constructs an empty field called \a fieldName of variant type \a
type in \a table.

View File

@ -55,8 +55,9 @@ public:
enum RequiredStatus { Unknown = -1, Optional = 0, Required = 1 };
explicit QSqlField(const QString& fieldName = QString(),
QVariant::Type type = QVariant::Invalid,
const QString &tableName = QString());
QVariant::Type type = QVariant::Invalid);
QSqlField(const QString &fieldName, QVariant::Type type,
const QString &tableName);
QSqlField(const QSqlField& other);
QSqlField& operator=(const QSqlField& other);