QtSql: make some constructors explicit

This is a semi-automatic search, so I'm
reasonably sure that all the exported ones
have been caught.

Change-Id: I3a79f66f9705bc991175f396138efe3088727a85
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
This commit is contained in:
Marc Mutz 2012-03-06 22:45:17 +01:00 committed by Qt by Nokia
parent cc5ea94c01
commit 0ee9b6831a
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
class Q_SQL_EXPORT QSqlIndex : public QSqlRecord
{
public:
QSqlIndex(const QString &cursorName = QString(), const QString &name = QString());
explicit QSqlIndex(const QString &cursorName = QString(), const QString &name = QString());
QSqlIndex(const QSqlIndex &other);
~QSqlIndex();
QSqlIndex &operator=(const QSqlIndex &other);

View File

@ -62,8 +62,8 @@ class QSqlQueryPrivate;
class Q_SQL_EXPORT QSqlQuery
{
public:
QSqlQuery(QSqlResult *r);
QSqlQuery(const QString& query = QString(), QSqlDatabase db = QSqlDatabase());
explicit QSqlQuery(QSqlResult *r);
explicit QSqlQuery(const QString& query = QString(), QSqlDatabase db = QSqlDatabase());
explicit QSqlQuery(QSqlDatabase db);
QSqlQuery(const QSqlQuery& other);
QSqlQuery& operator=(const QSqlQuery& other);