diff options
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/kernel/qsqlcachedresult_p.h | 20 | ||||
-rw-r--r-- | src/sql/kernel/qsqldatabase.h | 2 | ||||
-rw-r--r-- | src/sql/kernel/qsqldriver.h | 4 | ||||
-rw-r--r-- | src/sql/kernel/qsqldriverplugin.h | 2 | ||||
-rw-r--r-- | src/sql/kernel/qsqlnulldriver_p.h | 52 | ||||
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.cpp | 8 | ||||
-rw-r--r-- | src/sql/models/qsqlrelationaltablemodel.h | 24 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel.h | 30 |
8 files changed, 71 insertions, 71 deletions
diff --git a/src/sql/kernel/qsqlcachedresult_p.h b/src/sql/kernel/qsqlcachedresult_p.h index 9bcfd49f1a..543a902554 100644 --- a/src/sql/kernel/qsqlcachedresult_p.h +++ b/src/sql/kernel/qsqlcachedresult_p.h @@ -78,20 +78,20 @@ protected: virtual bool gotoNext(ValueCache &values, int index) = 0; - QVariant data(int i) Q_DECL_OVERRIDE; - bool isNull(int i) Q_DECL_OVERRIDE; - bool fetch(int i) Q_DECL_OVERRIDE; - bool fetchNext() Q_DECL_OVERRIDE; - bool fetchPrevious() Q_DECL_OVERRIDE; - bool fetchFirst() Q_DECL_OVERRIDE; - bool fetchLast() Q_DECL_OVERRIDE; + QVariant data(int i) override; + bool isNull(int i) override; + bool fetch(int i) override; + bool fetchNext() override; + bool fetchPrevious() override; + bool fetchFirst() override; + bool fetchLast() override; int colCount() const; ValueCache &cache(); - void virtual_hook(int id, void *data) Q_DECL_OVERRIDE; - void detachFromResultSet() Q_DECL_OVERRIDE; - void setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy) Q_DECL_OVERRIDE; + void virtual_hook(int id, void *data) override; + void detachFromResultSet() override; + void setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy) override; private: bool cacheNext(); }; diff --git a/src/sql/kernel/qsqldatabase.h b/src/sql/kernel/qsqldatabase.h index 0b4aca8cdd..684b9c04a1 100644 --- a/src/sql/kernel/qsqldatabase.h +++ b/src/sql/kernel/qsqldatabase.h @@ -64,7 +64,7 @@ template <class T> class QSqlDriverCreator : public QSqlDriverCreatorBase { public: - QSqlDriver *createObject() const Q_DECL_OVERRIDE { return new T; } + QSqlDriver *createObject() const override { return new T; } }; class Q_SQL_EXPORT QSqlDatabase diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h index 1296bd5d51..1e03be48d3 100644 --- a/src/sql/kernel/qsqldriver.h +++ b/src/sql/kernel/qsqldriver.h @@ -89,7 +89,7 @@ public: DB2 }; - explicit QSqlDriver(QObject *parent = Q_NULLPTR); + explicit QSqlDriver(QObject *parent = nullptr); ~QSqlDriver(); virtual bool isOpen() const; bool isOpenError() const; @@ -139,7 +139,7 @@ Q_SIGNALS: void notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload); protected: - QSqlDriver(QSqlDriverPrivate &dd, QObject *parent = Q_NULLPTR); + QSqlDriver(QSqlDriverPrivate &dd, QObject *parent = nullptr); virtual void setOpen(bool o); virtual void setOpenError(bool e); virtual void setLastError(const QSqlError& e); diff --git a/src/sql/kernel/qsqldriverplugin.h b/src/sql/kernel/qsqldriverplugin.h index c0f4c00943..001368a291 100644 --- a/src/sql/kernel/qsqldriverplugin.h +++ b/src/sql/kernel/qsqldriverplugin.h @@ -55,7 +55,7 @@ class Q_SQL_EXPORT QSqlDriverPlugin : public QObject { Q_OBJECT public: - explicit QSqlDriverPlugin(QObject *parent = Q_NULLPTR); + explicit QSqlDriverPlugin(QObject *parent = nullptr); ~QSqlDriverPlugin(); virtual QSqlDriver *create(const QString &key) = 0; diff --git a/src/sql/kernel/qsqlnulldriver_p.h b/src/sql/kernel/qsqlnulldriver_p.h index 92d8d30485..7a40199d71 100644 --- a/src/sql/kernel/qsqlnulldriver_p.h +++ b/src/sql/kernel/qsqlnulldriver_p.h @@ -66,27 +66,27 @@ public: { QSqlResult::setLastError( QSqlError(QLatin1String("Driver not loaded"), QLatin1String("Driver not loaded"), QSqlError::ConnectionError)); } protected: - inline QVariant data(int) Q_DECL_OVERRIDE { return QVariant(); } - inline bool reset (const QString&) Q_DECL_OVERRIDE { return false; } - inline bool fetch(int) Q_DECL_OVERRIDE { return false; } - inline bool fetchFirst() Q_DECL_OVERRIDE { return false; } - inline bool fetchLast() Q_DECL_OVERRIDE { return false; } - inline bool isNull(int) Q_DECL_OVERRIDE { return false; } - inline int size() Q_DECL_OVERRIDE { return -1; } - inline int numRowsAffected() Q_DECL_OVERRIDE { return 0; } + inline QVariant data(int) override { return QVariant(); } + inline bool reset (const QString&) override { return false; } + inline bool fetch(int) override { return false; } + inline bool fetchFirst() override { return false; } + inline bool fetchLast() override { return false; } + inline bool isNull(int) override { return false; } + inline int size() override { return -1; } + inline int numRowsAffected() override { return 0; } - inline void setAt(int) Q_DECL_OVERRIDE {} - inline void setActive(bool) Q_DECL_OVERRIDE {} - inline void setLastError(const QSqlError&) Q_DECL_OVERRIDE {} - inline void setQuery(const QString&) Q_DECL_OVERRIDE {} - inline void setSelect(bool) Q_DECL_OVERRIDE {} - inline void setForwardOnly(bool) Q_DECL_OVERRIDE {} + inline void setAt(int) override {} + inline void setActive(bool) override {} + inline void setLastError(const QSqlError&) override {} + inline void setQuery(const QString&) override {} + inline void setSelect(bool) override {} + inline void setForwardOnly(bool) override {} - inline bool exec() Q_DECL_OVERRIDE { return false; } - inline bool prepare(const QString&) Q_DECL_OVERRIDE { return false; } - inline bool savePrepare(const QString&) Q_DECL_OVERRIDE { return false; } - inline void bindValue(int, const QVariant&, QSql::ParamType) Q_DECL_OVERRIDE {} - inline void bindValue(const QString&, const QVariant&, QSql::ParamType) Q_DECL_OVERRIDE {} + inline bool exec() override { return false; } + inline bool prepare(const QString&) override { return false; } + inline bool savePrepare(const QString&) override { return false; } + inline void bindValue(int, const QVariant&, QSql::ParamType) override {} + inline void bindValue(const QString&, const QVariant&, QSql::ParamType) override {} }; class QSqlNullDriver : public QSqlDriver @@ -95,16 +95,16 @@ public: inline QSqlNullDriver(): QSqlDriver() { QSqlDriver::setLastError( QSqlError(QLatin1String("Driver not loaded"), QLatin1String("Driver not loaded"), QSqlError::ConnectionError)); } - inline bool hasFeature(DriverFeature) const Q_DECL_OVERRIDE { return false; } - inline bool open(const QString &, const QString &, const QString &, const QString &, int, const QString&) Q_DECL_OVERRIDE + inline bool hasFeature(DriverFeature) const override { return false; } + inline bool open(const QString &, const QString &, const QString &, const QString &, int, const QString&) override { return false; } - inline void close() Q_DECL_OVERRIDE {} - inline QSqlResult *createResult() const Q_DECL_OVERRIDE { return new QSqlNullResult(this); } + inline void close() override {} + inline QSqlResult *createResult() const override { return new QSqlNullResult(this); } protected: - inline void setOpen(bool) Q_DECL_OVERRIDE {} - inline void setOpenError(bool) Q_DECL_OVERRIDE {} - inline void setLastError(const QSqlError&) Q_DECL_OVERRIDE {} + inline void setOpen(bool) override {} + inline void setOpenError(bool) override {} + inline void setLastError(const QSqlError&) override {} }; QT_END_NAMESPACE diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp index 9d6daa2634..8220fea39a 100644 --- a/src/sql/models/qsqlrelationaltablemodel.cpp +++ b/src/sql/models/qsqlrelationaltablemodel.cpp @@ -156,7 +156,7 @@ class QRelatedTableModel : public QSqlTableModel { public: QRelatedTableModel(QRelation *rel, QObject *parent = 0, QSqlDatabase db = QSqlDatabase()); - bool select() Q_DECL_OVERRIDE; + bool select() override; private: bool firstSelect; QRelation *relation; @@ -268,12 +268,12 @@ public: {} QString fullyQualifiedFieldName(const QString &tableName, const QString &fieldName) const; - int nameToIndex(const QString &name) const Q_DECL_OVERRIDE; + int nameToIndex(const QString &name) const override; mutable QVector<QRelation> relations; QSqlRecord baseRec; // the record without relations void clearChanges(); - void clearCache() Q_DECL_OVERRIDE; - void revertCachedRow(int row) Q_DECL_OVERRIDE; + void clearCache() override; + void revertCachedRow(int row) override; void translateFieldNames(QSqlRecord &values) const; QSqlRelationalTableModel::JoinMode joinMode; diff --git a/src/sql/models/qsqlrelationaltablemodel.h b/src/sql/models/qsqlrelationaltablemodel.h index f8b08b089f..90b7a6481f 100644 --- a/src/sql/models/qsqlrelationaltablemodel.h +++ b/src/sql/models/qsqlrelationaltablemodel.h @@ -88,31 +88,31 @@ public: LeftJoin }; - explicit QSqlRelationalTableModel(QObject *parent = Q_NULLPTR, + explicit QSqlRelationalTableModel(QObject *parent = nullptr, QSqlDatabase db = QSqlDatabase()); virtual ~QSqlRelationalTableModel(); - QVariant data(const QModelIndex &item, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; - bool setData(const QModelIndex &item, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE; - bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &item, int role = Qt::DisplayRole) const override; + bool setData(const QModelIndex &item, const QVariant &value, int role = Qt::EditRole) override; + bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override; - void clear() Q_DECL_OVERRIDE; - bool select() Q_DECL_OVERRIDE; + void clear() override; + bool select() override; - void setTable(const QString &tableName) Q_DECL_OVERRIDE; + void setTable(const QString &tableName) override; virtual void setRelation(int column, const QSqlRelation &relation); QSqlRelation relation(int column) const; virtual QSqlTableModel *relationModel(int column) const; void setJoinMode( QSqlRelationalTableModel::JoinMode joinMode ); public Q_SLOTS: - void revertRow(int row) Q_DECL_OVERRIDE; + void revertRow(int row) override; protected: - QString selectStatement() const Q_DECL_OVERRIDE; - bool updateRowInTable(int row, const QSqlRecord &values) Q_DECL_OVERRIDE; - bool insertRowIntoTable(const QSqlRecord &values) Q_DECL_OVERRIDE; - QString orderByClause() const Q_DECL_OVERRIDE; + QString selectStatement() const override; + bool updateRowInTable(int row, const QSqlRecord &values) override; + bool insertRowIntoTable(const QSqlRecord &values) override; + QString orderByClause() const override; private: Q_DECLARE_PRIVATE(QSqlRelationalTableModel) diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h index 6a62c6993d..77b0517c74 100644 --- a/src/sql/models/qsqltablemodel.h +++ b/src/sql/models/qsqltablemodel.h @@ -60,25 +60,25 @@ class Q_SQL_EXPORT QSqlTableModel: public QSqlQueryModel public: enum EditStrategy {OnFieldChange, OnRowChange, OnManualSubmit}; - explicit QSqlTableModel(QObject *parent = Q_NULLPTR, QSqlDatabase db = QSqlDatabase()); + explicit QSqlTableModel(QObject *parent = nullptr, QSqlDatabase db = QSqlDatabase()); virtual ~QSqlTableModel(); virtual void setTable(const QString &tableName); QString tableName() const; - Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; + Qt::ItemFlags flags(const QModelIndex &index) const override; QSqlRecord record() const; QSqlRecord record(int row) const; - QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; bool isDirty() const; bool isDirty(const QModelIndex &index) const; - void clear() Q_DECL_OVERRIDE; + void clear() override; virtual void setEditStrategy(EditStrategy strategy); EditStrategy editStrategy() const; @@ -87,17 +87,17 @@ public: QSqlDatabase database() const; int fieldIndex(const QString &fieldName) const; - void sort(int column, Qt::SortOrder order) Q_DECL_OVERRIDE; + void sort(int column, Qt::SortOrder order) override; virtual void setSort(int column, Qt::SortOrder order); QString filter() const; virtual void setFilter(const QString &filter); - int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; - bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE; - bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE; - bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE; + bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; + bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; bool insertRecord(int row, const QSqlRecord &record); bool setRecord(int row, const QSqlRecord &record); @@ -108,8 +108,8 @@ public Q_SLOTS: virtual bool select(); virtual bool selectRow(int row); - bool submit() Q_DECL_OVERRIDE; - void revert() Q_DECL_OVERRIDE; + bool submit() override; + void revert() override; bool submitAll(); void revertAll(); @@ -122,7 +122,7 @@ Q_SIGNALS: void beforeDelete(int row); protected: - QSqlTableModel(QSqlTableModelPrivate &dd, QObject *parent = Q_NULLPTR, QSqlDatabase db = QSqlDatabase()); + QSqlTableModel(QSqlTableModelPrivate &dd, QObject *parent = nullptr, QSqlDatabase db = QSqlDatabase()); virtual bool updateRowInTable(int row, const QSqlRecord &values); virtual bool insertRowIntoTable(const QSqlRecord &values); @@ -132,7 +132,7 @@ protected: void setPrimaryKey(const QSqlIndex &key); void setQuery(const QSqlQuery &query); - QModelIndex indexInQuery(const QModelIndex &item) const Q_DECL_OVERRIDE; + QModelIndex indexInQuery(const QModelIndex &item) const override; QSqlRecord primaryValues(int row) const; }; |