diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index c35fca7217..051ecfca06 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -221,7 +221,7 @@ QSqlResult::QSqlResult(const QSqlDriver *db) d_ptr = new QSqlResultPrivate; Q_D(QSqlResult); d->q_ptr = this; - d->sqldriver = const_cast(db); + d->sqldriver = db; if (d->sqldriver) setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy()); } @@ -233,7 +233,7 @@ QSqlResult::QSqlResult(QSqlResultPrivate &dd, const QSqlDriver *db) d_ptr = ⅆ Q_D(QSqlResult); d->q_ptr = this; - d->sqldriver = const_cast(db); + d->sqldriver = db; if (d->sqldriver) setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy()); } diff --git a/src/sql/kernel/qsqlresult_p.h b/src/sql/kernel/qsqlresult_p.h index 34b260d89b..1cd8b9bbcc 100644 --- a/src/sql/kernel/qsqlresult_p.h +++ b/src/sql/kernel/qsqlresult_p.h @@ -106,7 +106,7 @@ public: QString holderAt(int index) const; QSqlResult *q_ptr; - QPointer sqldriver; + QPointer sqldriver; int idx; QString sql; bool active;