From 299358dcc5e73f03a4de553eca0fed63d3b57a96 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 24 Nov 2015 01:42:28 +0100 Subject: [PATCH] QSqlResult: const for driver Change-Id: Ia30e165152b5ed3056235faec9d7168bbc95fca4 Reviewed-by: Friedemann Kleint --- src/sql/kernel/qsqlresult.cpp | 4 ++-- src/sql/kernel/qsqlresult_p.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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;