summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sql/kernel/qsqlerror.cpp10
-rw-r--r--src/sql/kernel/qsqlerror.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp
index 7f56357c10..1e093c236c 100644
--- a/src/sql/kernel/qsqlerror.cpp
+++ b/src/sql/kernel/qsqlerror.cpp
@@ -103,7 +103,7 @@ QSqlError::QSqlError(const QString &driverText, const QString &databaseText,
/*!
Creates a copy of \a other.
*/
-QSqlError::QSqlError(const QSqlError& other)
+QSqlError::QSqlError(const QSqlError &other)
: d(new QSqlErrorPrivate(*other.d))
{
}
@@ -112,7 +112,7 @@ QSqlError::QSqlError(const QSqlError& other)
Assigns the \a other error's values to this error.
*/
-QSqlError& QSqlError::operator=(const QSqlError& other)
+QSqlError &QSqlError::operator=(const QSqlError &other)
{
if (&other == this)
return *this;
@@ -129,7 +129,7 @@ QSqlError& QSqlError::operator=(const QSqlError& other)
Compare the \a other error's values to this error and returns \c true, if it equal.
*/
-bool QSqlError::operator==(const QSqlError& other) const
+bool QSqlError::operator==(const QSqlError &other) const
{
return (d->errorType == other.d->errorType);
}
@@ -139,7 +139,7 @@ bool QSqlError::operator==(const QSqlError& other) const
Compare the \a other error's values to this error and returns \c true if it is not equal.
*/
-bool QSqlError::operator!=(const QSqlError& other) const
+bool QSqlError::operator!=(const QSqlError &other) const
{
return (d->errorType != other.d->errorType);
}
@@ -209,7 +209,7 @@ QString QSqlError::nativeErrorCode() const
QString QSqlError::text() const
{
QString result = d->databaseError;
- if (!d->databaseError.isEmpty() && !d->driverError.isEmpty() && !d->databaseError.endsWith("\n"_L1))
+ if (!d->databaseError.isEmpty() && !d->driverError.isEmpty() && !d->databaseError.endsWith(u'\n'))
result += u' ';
result += d->driverError;
return result;
diff --git a/src/sql/kernel/qsqlerror.h b/src/sql/kernel/qsqlerror.h
index 6532f1af57..2a139d3316 100644
--- a/src/sql/kernel/qsqlerror.h
+++ b/src/sql/kernel/qsqlerror.h
@@ -25,15 +25,15 @@ public:
const QString &databaseText = QString(),
ErrorType type = NoError,
const QString &errorCode = QString());
- QSqlError(const QSqlError& other);
+ QSqlError(const QSqlError &other);
QSqlError(QSqlError &&other) noexcept : d(other.d) { other.d = nullptr; }
- QSqlError& operator=(const QSqlError& other);
+ QSqlError& operator=(const QSqlError &other);
QSqlError &operator=(QSqlError &&other) noexcept { swap(other); return *this; }
-
- bool operator==(const QSqlError& other) const;
- bool operator!=(const QSqlError& other) const;
~QSqlError();
+ bool operator==(const QSqlError &other) const;
+ bool operator!=(const QSqlError &other) const;
+
void swap(QSqlError &other) noexcept { qt_ptr_swap(d, other.d); }
QString driverText() const;