diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2022-12-21 17:35:35 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2022-12-22 19:26:50 +0100 |
commit | 5419faebdef749f72e718a5a21b04efa2f6e3160 (patch) | |
tree | 16b81d15eb7402a309504a0095d65504ad2a285c /src/sql/kernel/qsqlfield.cpp | |
parent | 8b0818235d512c9085ce0fd0ea2490f1653a6c36 (diff) | |
download | qtbase-5419faebdef749f72e718a5a21b04efa2f6e3160.tar.gz |
SQL: misc cleanup in QSqlRecord/QSqlField
Cleanup an unused function in QSqlRecordPrivate and use member
initializers for the ctors in QSqlRecord/QSqlField
Change-Id: I7d585e70c83373b3092e9f1425233af42b8c379d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/sql/kernel/qsqlfield.cpp')
-rw-r--r-- | src/sql/kernel/qsqlfield.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index a86a7ca686..c407137e7e 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -141,20 +141,20 @@ public: setGenerated(), setReadOnly() */ QSqlField::QSqlField(const QString &fieldName, QMetaType type, const QString &table) + : val(QVariant(type, nullptr)), + d(new QSqlFieldPrivate(fieldName, type, table)) { - d = new QSqlFieldPrivate(fieldName, type, table); - val = QVariant(QMetaType(type), nullptr); } /*! Constructs a copy of \a other. */ -QSqlField::QSqlField(const QSqlField& other) +QSqlField::QSqlField(const QSqlField &other) + : val(other.val), + d(other.d) { - d = other.d; d->ref.ref(); - val = other.val; } /*! |