QtSql: Use Q_NULLPTR instead of 0 in all public headers

This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: Ie14e5280c430b6a254f8f686534450c1e5995374
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
Marc Mutz 2015-06-30 22:11:15 +02:00
parent e326cd8d4d
commit 5e1b12066a
5 changed files with 8 additions and 8 deletions

View File

@ -83,7 +83,7 @@ public:
DB2
};
explicit QSqlDriver(QObject *parent=0);
explicit QSqlDriver(QObject *parent = Q_NULLPTR);
~QSqlDriver();
virtual bool isOpen() const;
bool isOpenError() const;
@ -133,7 +133,7 @@ Q_SIGNALS:
void notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload);
protected:
QSqlDriver(QSqlDriverPrivate &dd, QObject *parent = 0);
QSqlDriver(QSqlDriverPrivate &dd, QObject *parent = Q_NULLPTR);
virtual void setOpen(bool o);
virtual void setOpenError(bool e);
virtual void setLastError(const QSqlError& e);

View File

@ -49,7 +49,7 @@ class Q_SQL_EXPORT QSqlDriverPlugin : public QObject
{
Q_OBJECT
public:
explicit QSqlDriverPlugin(QObject *parent = 0);
explicit QSqlDriverPlugin(QObject *parent = Q_NULLPTR);
~QSqlDriverPlugin();
virtual QSqlDriver *create(const QString &key) = 0;

View File

@ -51,7 +51,7 @@ class Q_SQL_EXPORT QSqlQueryModel: public QAbstractTableModel
Q_DECLARE_PRIVATE(QSqlQueryModel)
public:
explicit QSqlQueryModel(QObject *parent = 0);
explicit QSqlQueryModel(QObject *parent = Q_NULLPTR);
virtual ~QSqlQueryModel();
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
@ -98,7 +98,7 @@ protected:
virtual QModelIndex indexInQuery(const QModelIndex &item) const;
void setLastError(const QSqlError &error);
QSqlQueryModel(QSqlQueryModelPrivate &dd, QObject *parent = 0);
QSqlQueryModel(QSqlQueryModelPrivate &dd, QObject *parent = Q_NULLPTR);
};
QT_END_NAMESPACE

View File

@ -70,7 +70,7 @@ public:
LeftJoin
};
explicit QSqlRelationalTableModel(QObject *parent = 0,
explicit QSqlRelationalTableModel(QObject *parent = Q_NULLPTR,
QSqlDatabase db = QSqlDatabase());
virtual ~QSqlRelationalTableModel();

View File

@ -53,7 +53,7 @@ class Q_SQL_EXPORT QSqlTableModel: public QSqlQueryModel
public:
enum EditStrategy {OnFieldChange, OnRowChange, OnManualSubmit};
explicit QSqlTableModel(QObject *parent = 0, QSqlDatabase db = QSqlDatabase());
explicit QSqlTableModel(QObject *parent = Q_NULLPTR, QSqlDatabase db = QSqlDatabase());
virtual ~QSqlTableModel();
virtual void setTable(const QString &tableName);
@ -115,7 +115,7 @@ Q_SIGNALS:
void beforeDelete(int row);
protected:
QSqlTableModel(QSqlTableModelPrivate &dd, QObject *parent = 0, QSqlDatabase db = QSqlDatabase());
QSqlTableModel(QSqlTableModelPrivate &dd, QObject *parent = Q_NULLPTR, QSqlDatabase db = QSqlDatabase());
virtual bool updateRowInTable(int row, const QSqlRecord &values);
virtual bool insertRowIntoTable(const QSqlRecord &values);