diff options
author | Christian Ehrlicher <[email protected]> | 2024-06-11 20:30:52 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2024-06-13 06:26:15 +0000 |
commit | c8d8cfa333b3d6a0db916db93841c073b19bbc18 (patch) | |
tree | 0e735535fd955e534c322b32da085c7c5a2d6e4b | |
parent | 33b3054da175ab9a92e0774bdc0d3b00ce41e155 (diff) |
SQL/Doc: add note about QAnyStringView
Add a note to all functions now taking a QAnyStringView that their
signature changed from QString to QAnyStringView
Change-Id: Ib9743b5b2c437724c6308e74ef3c5820136a34f5
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit a736a3c670929e3b73e11b33cc1705957c42961b)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r-- | src/sql/kernel/qsqlquery.cpp | 6 | ||||
-rw-r--r-- | src/sql/kernel/qsqlrecord.cpp | 27 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 1ada7f9e27a..b1ec8bde935 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -335,6 +335,9 @@ bool QSqlQuery::isNull(int field) const returns isNull(int index) for the corresponding field index. This overload is less efficient than \l{QSqlQuery::}{isNull()} + + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. */ bool QSqlQuery::isNull(QAnyStringView name) const { @@ -446,6 +449,9 @@ QVariant QSqlQuery::value(int index) const If field \a name does not exist an invalid variant is returned. This overload is less efficient than \l{QSqlQuery::}{value()} + + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. */ QVariant QSqlQuery::value(QAnyStringView name) const { diff --git a/src/sql/kernel/qsqlrecord.cpp b/src/sql/kernel/qsqlrecord.cpp index 89af1a52fe8..3c3b2b33909 100644 --- a/src/sql/kernel/qsqlrecord.cpp +++ b/src/sql/kernel/qsqlrecord.cpp @@ -193,6 +193,9 @@ QVariant QSqlRecord::value(int index) const Returns the value of the field called \a name in the record. If field \a name does not exist an invalid variant is returned. + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. + \sa indexOf(), isNull() */ QVariant QSqlRecord::value(QAnyStringView name) const @@ -218,6 +221,9 @@ QString QSqlRecord::fieldName(int index) const case-sensitive. If more than one field matches, the first one is returned. + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. + \sa fieldName() */ int QSqlRecord::indexOf(QAnyStringView name) const @@ -244,6 +250,9 @@ QSqlField QSqlRecord::field(int index) const Returns the field called \a name. If the field called \a name is not found, function returns a \l{default-constructed value}. + + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. */ QSqlField QSqlRecord::field(QAnyStringView name) const { @@ -333,6 +342,9 @@ bool QSqlRecord::isEmpty() const /*! Returns \c true if there is a field in the record called \a name; otherwise returns \c false. + + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. */ bool QSqlRecord::contains(QAnyStringView name) const { @@ -359,6 +371,9 @@ void QSqlRecord::clearValues() fields that have \a generated set to true are included in the SQL that is generated by QSqlQueryModel for example. + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. + \sa isGenerated() */ void QSqlRecord::setGenerated(QAnyStringView name, bool generated) @@ -397,6 +412,9 @@ bool QSqlRecord::isNull(int index) const Returns \c true if the field called \a name is null or if there is no field called \a name; otherwise returns \c false. + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. + \sa setNull() */ bool QSqlRecord::isNull(QAnyStringView name) const @@ -423,6 +441,9 @@ void QSqlRecord::setNull(int index) Sets the value of the field called \a name to null. If the field does not exist, nothing happens. + + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. */ void QSqlRecord::setNull(QAnyStringView name) { @@ -435,6 +456,9 @@ void QSqlRecord::setNull(QAnyStringView name) Returns \c true if the record has a field called \a name and this field is to be generated (the default); otherwise returns \c false. + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. + \sa setGenerated() */ bool QSqlRecord::isGenerated(QAnyStringView name) const @@ -485,6 +509,9 @@ void QSqlRecord::setValue(int index, const QVariant &val) Sets the value of the field called \a name to \a val. If the field does not exist, nothing happens. + \note In Qt versions prior to 6.8, this function took QString, not + QAnyStringView. + \sa setNull() */ void QSqlRecord::setValue(QAnyStringView name, const QVariant &val) |