summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <[email protected]>2025-03-30 10:28:14 +0200
committerChristian Ehrlicher <[email protected]>2025-03-31 18:40:12 +0000
commit06ef995a7d348c9769091b07e4511c3c9511a104 (patch)
tree99489ba814dcf6ca39ab83ab928f86b72a3b6ba7
parent75c896f9b104831e40dfa6ca9aedebaa272704b5 (diff)
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.9 6.8 Change-Id: Ic95b45c75a57796536d845249c719b5d0d0e7587 Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r--src/sql/kernel/qsqlerror.cpp10
-rw-r--r--src/sql/kernel/qsqlerror.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp
index 595cc89427e..7bf623b3461 100644
--- a/src/sql/kernel/qsqlerror.cpp
+++ b/src/sql/kernel/qsqlerror.cpp
@@ -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.
diff --git a/src/sql/kernel/qsqlerror.h b/src/sql/kernel/qsqlerror.h
index 24f2921f5a1..c042d0d8255 100644
--- a/src/sql/kernel/qsqlerror.h
+++ b/src/sql/kernel/qsqlerror.h
@@ -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);