QSqlError: Remove unused members, kept for binary compatibility
Also optimize the construction of QSqlErrorPrivate. Change-Id: I791ebe0b66fab43e74093186a798ef9656f97dbd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
cba147d359
commit
49efc168e1
@ -128,9 +128,8 @@ public:
|
||||
*/
|
||||
QSqlError::QSqlError(const QString &driverText, const QString &databaseText,
|
||||
ErrorType type, const QString &code)
|
||||
: d(new QSqlErrorPrivate)
|
||||
{
|
||||
d = new QSqlErrorPrivate;
|
||||
|
||||
d->driverError = driverText;
|
||||
d->databaseError = databaseText;
|
||||
d->errorType = type;
|
||||
@ -142,10 +141,8 @@ QSqlError::QSqlError(const QString &driverText, const QString &databaseText,
|
||||
Creates a copy of \a other.
|
||||
*/
|
||||
QSqlError::QSqlError(const QSqlError& other)
|
||||
: d(new QSqlErrorPrivate(*other.d))
|
||||
{
|
||||
d = new QSqlErrorPrivate;
|
||||
|
||||
*d = *other.d;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -80,17 +80,7 @@ public:
|
||||
bool isValid() const;
|
||||
|
||||
private:
|
||||
// ### Qt6: Keep the pointer and remove the rest.
|
||||
QString unused1;
|
||||
QString unused2;
|
||||
struct Unused {
|
||||
ErrorType unused3;
|
||||
int unused4;
|
||||
};
|
||||
union {
|
||||
QSqlErrorPrivate *d;
|
||||
Unused unused5;
|
||||
};
|
||||
QSqlErrorPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
Q_DECLARE_SHARED(QSqlError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user