diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/kernel/qsqlfield.cpp | 11 | ||||
-rw-r--r-- | src/sql/kernel/qsqlfield.h | 6 | ||||
-rw-r--r-- | src/sql/kernel/qsqlresult.cpp | 4 |
3 files changed, 5 insertions, 16 deletions
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp index 4bb56a3..b528850 100644 --- a/src/sql/kernel/qsqlfield.cpp +++ b/src/sql/kernel/qsqlfield.cpp @@ -159,20 +159,11 @@ public: \sa setRequiredStatus() setLength() setPrecision() setDefaultValue() setGenerated() setReadOnly() */ -QSqlField::QSqlField() -{ - d = new QSqlFieldPrivate(QString(), QVariant::Invalid); -} - -QSqlField::QSqlField(const QString& fieldName) -{ - d = new QSqlFieldPrivate(fieldName, QVariant::Invalid); -} - QSqlField::QSqlField(const QString& fieldName, QVariant::Type type) { d = new QSqlFieldPrivate(fieldName, type); } + /*! Constructs a copy of \a other. */ diff --git a/src/sql/kernel/qsqlfield.h b/src/sql/kernel/qsqlfield.h index d70af15..2c3b52a 100644 --- a/src/sql/kernel/qsqlfield.h +++ b/src/sql/kernel/qsqlfield.h @@ -58,9 +58,9 @@ class Q_SQL_EXPORT QSqlField public: enum RequiredStatus { Unknown = -1, Optional = 0, Required = 1 }; - QSqlField(); - QSqlField(const QString& fieldName); - QSqlField(const QString& fieldName, QVariant::Type type); + QSqlField(const QString& fieldName = QString(), + QVariant::Type type = QVariant::Invalid); + QSqlField(const QSqlField& other); QSqlField& operator=(const QSqlField& other); bool operator==(const QSqlField& other) const; diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 2a1ba64..93c9d9f 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -53,9 +53,7 @@ QT_BEGIN_NAMESPACE struct QHolder { - QHolder(): holderName(QString()), holderPos(-1) {} - QHolder(const QString& hldr): holderName(hldr), holderPos(-1) {} - QHolder(const QString& hldr, int index): holderName(hldr), holderPos(index) {} + QHolder(const QString& hldr = QString(), int index = -1): holderName(hldr), holderPos(index) {} bool operator==(const QHolder& h) const { return h.holderPos == holderPos && h.holderName == holderName; } bool operator!=(const QHolder& h) const { return h.holderPos != holderPos || h.holderName != holderName; } QString holderName; |