QSqlResult: const for driver

Change-Id: Ia30e165152b5ed3056235faec9d7168bbc95fca4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Mark Brand 2015-11-24 01:42:28 +01:00
parent 195edca79b
commit 299358dcc5
2 changed files with 3 additions and 3 deletions

View File

@ -221,7 +221,7 @@ QSqlResult::QSqlResult(const QSqlDriver *db)
d_ptr = new QSqlResultPrivate;
Q_D(QSqlResult);
d->q_ptr = this;
d->sqldriver = const_cast<QSqlDriver *>(db);
d->sqldriver = db;
if (d->sqldriver)
setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy());
}
@ -233,7 +233,7 @@ QSqlResult::QSqlResult(QSqlResultPrivate &dd, const QSqlDriver *db)
d_ptr = &dd;
Q_D(QSqlResult);
d->q_ptr = this;
d->sqldriver = const_cast<QSqlDriver *>(db);
d->sqldriver = db;
if (d->sqldriver)
setNumericalPrecisionPolicy(d->sqldriver->numericalPrecisionPolicy());
}

View File

@ -106,7 +106,7 @@ public:
QString holderAt(int index) const;
QSqlResult *q_ptr;
QPointer<QSqlDriver> sqldriver;
QPointer<const QSqlDriver> sqldriver;
int idx;
QString sql;
bool active;