diff options
Diffstat (limited to 'src/sql/models/qsqlquerymodel.cpp')
-rw-r--r-- | src/sql/models/qsqlquerymodel.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index b45b08eb47..6f91fb9739 100644 --- a/src/sql/models/qsqlquerymodel.cpp +++ b/src/sql/models/qsqlquerymodel.cpp @@ -139,8 +139,6 @@ QSqlQueryModel::~QSqlQueryModel() } /*! - \since 4.1 - Fetches more rows from a database. This only affects databases that don't report back the size of a query (see QSqlDriver::hasFeature()). @@ -162,8 +160,6 @@ void QSqlQueryModel::fetchMore(const QModelIndex &parent) } /*! - \since 4.1 - Returns \c true if it is possible to read more rows from the database. This only affects databases that don't report back the size of a query (see QSqlDriver::hasFeature()). @@ -295,7 +291,6 @@ void QSqlQueryModel::endResetModel() } /*! \fn int QSqlQueryModel::rowCount(const QModelIndex &parent) const - \since 4.1 If the database supports returning the size of a query (see QSqlDriver::hasFeature()), the number of rows of the current @@ -384,18 +379,17 @@ void QSqlQueryModel::queryChange() // do nothing } - +#if QT_DEPRECATED_SINCE(6, 2) /*! \deprecated [6.2] Use the \c{setQuery(QSqlQuery &&query)} overload instead. \overload - \since 4.5 - */ void QSqlQueryModel::setQuery(const QSqlQuery &query) { QT_IGNORE_DEPRECATIONS(QSqlQuery copy = query;) setQuery(std::move(copy)); } +#endif // QT_DEPRECATED_SINCE(6, 2) /*! Resets the model and sets the data provider to be the given \a @@ -521,18 +515,15 @@ bool QSqlQueryModel::setHeaderData(int section, Qt::Orientation orientation, } /*! - Returns the QSqlQuery associated with this model. + Returns a reference to the const QSqlQuery object associated with this model. \sa setQuery() */ -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED -QSqlQuery QSqlQueryModel::query() const +const QSqlQuery &QSqlQueryModel::query(QT6_IMPL_NEW_OVERLOAD) const { Q_D(const QSqlQueryModel); return d->query; } -QT_WARNING_POP /*! Returns information about the last error that occurred on the @@ -627,7 +618,7 @@ bool QSqlQueryModel::insertColumns(int column, int count, const QModelIndex &par d->colOffsets.append(nVal); Q_ASSERT(d->colOffsets.size() >= d->rec.count()); } - for (int i = column + 1; i < d->colOffsets.count(); ++i) + for (int i = column + 1; i < d->colOffsets.size(); ++i) ++d->colOffsets[i]; } endInsertColumns(); @@ -656,7 +647,7 @@ bool QSqlQueryModel::removeColumns(int column, int count, const QModelIndex &par int i; for (i = 0; i < count; ++i) d->rec.remove(column); - for (i = column; i < d->colOffsets.count(); ++i) + for (i = column; i < d->colOffsets.size(); ++i) d->colOffsets[i] -= count; endRemoveColumns(); |