diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 9d33f38188..51faf7007f 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -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(db); + if (d->sqldriver) + setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy()); +} + /*! Destroys the object and frees any allocated resources. */ diff --git a/src/sql/kernel/qsqlresult.h b/src/sql/kernel/qsqlresult.h index 649e3587ab..7252d69460 100644 --- a/src/sql/kernel/qsqlresult.h +++ b/src/sql/kernel/qsqlresult.h @@ -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;