QSqlError: rename ctor parameter to 'nativeErrorCode'

Rename the parameter 'code' to 'nativeErrorCode' to match the getter
nativeErrorCode() with the ctor's parameters.

Pick-to: 6.8
Change-Id: Ic95b45c75a57796536d845249c719b5d0d0e7587
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 06ef995a7d348c9769091b07e4511c3c9511a104)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2025-03-30 10:28:14 +02:00 committed by Qt Cherry-pick Bot
parent 3b175fbecc
commit 1f5545e6f2
2 changed files with 6 additions and 6 deletions

View File

@ -85,16 +85,16 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QSqlErrorPrivate)
/*!
Constructs an error containing the driver error text \a
driverText, the database-specific error text \a databaseText, the
type \a type and the error code \a code.
type \a type and the native error code \a nativeErrorCode.
*/
QSqlError::QSqlError(const QString &driverText, const QString &databaseText,
ErrorType type, const QString &code)
ErrorType type, const QString &nativeErrorCode)
: d(new QSqlErrorPrivate)
{
d->driverError = driverText;
d->databaseError = databaseText;
d->errorType = type;
d->errorCode = code;
d->errorCode = nativeErrorCode;
}
@ -176,8 +176,8 @@ QSqlError::ErrorType QSqlError::type() const
}
/*!
Returns the database-specific error code, or an empty string if
it cannot be determined.
Returns the database-specific (native) error code, or an empty
string if it cannot be determined.
\note Some drivers (like DB2 or ODBC) may return more than one
error code. When this happens, \c ; is used as separator between
the error codes.

View File

@ -26,7 +26,7 @@ public:
QSqlError(const QString &driverText = QString(),
const QString &databaseText = QString(),
ErrorType type = NoError,
const QString &errorCode = QString());
const QString &nativeErrorCode = QString());
QSqlError(const QSqlError &other);
QSqlError(QSqlError &&other) noexcept = default;
QSqlError& operator=(const QSqlError &other);