add QSqlResult constructor suitable for inheritance
The new constructor accepts reference to the private class provided by a subclass. Change-Id: I568e31727bb90de12ee8bb7bf0ed442737056470 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
parent
fd6821aa19
commit
2adeefc85f
@ -225,6 +225,17 @@ QSqlResult::QSqlResult(const QSqlDriver *db)
|
||||
setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy());
|
||||
}
|
||||
|
||||
/*! \internal
|
||||
*/
|
||||
QSqlResult::QSqlResult(QSqlResultPrivate &dd, const QSqlDriver *db)
|
||||
{
|
||||
d = ⅆ
|
||||
d->q_ptr = this;
|
||||
d->sqldriver = const_cast<QSqlDriver *>(db);
|
||||
if (d->sqldriver)
|
||||
setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy());
|
||||
}
|
||||
|
||||
/*!
|
||||
Destroys the object and frees any allocated resources.
|
||||
*/
|
||||
|
@ -74,6 +74,7 @@ protected:
|
||||
};
|
||||
|
||||
explicit QSqlResult(const QSqlDriver * db);
|
||||
QSqlResult(QSqlResultPrivate &dd, const QSqlDriver *db);
|
||||
int at() const;
|
||||
QString lastQuery() const;
|
||||
QSqlError lastError() const;
|
||||
|
Loading…
Reference in New Issue
Block a user