SQL/OCI: Fix usage of QOCIResult::d_ptr
The refactoring in 82681fd8a2af1113da5bd13875ba71c1efd45afb added a d_ptr of type QOCIResultPrivate. This shadowed the d_ptr from QSqlCachedResult and an unitialized QOCIResult::d_ptr variable which in the end made the whole plugin unusable. Fix it by removing the unneeded d_ptr member. Pick-to: 6.9 Fixes: QTBUG-136024 Change-Id: I5ecacba8079eadbfae25a32720b43b4465c096d8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
78ae4177fa
commit
87bbcddb1d
@ -414,11 +414,12 @@ int QOCIResultPrivate::bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, in
|
||||
SQLT_RDD, indPtr, 0, 0, 0, 0, OCI_DEFAULT);
|
||||
} else if (val.canConvert<QOCIResult *>() && isOutValue(pos)) {
|
||||
QOCIResult *res = qvariant_cast<QOCIResult *>(val);
|
||||
QOCIResultPrivate *resPrivate = static_cast<QOCIResultPrivate *>(res->d_ptr);
|
||||
|
||||
if (res->internal_prepare()) {
|
||||
r = OCIBindByPos2(sql, hbnd, err,
|
||||
pos + 1,
|
||||
const_cast<OCIStmt **>(&res->d_ptr->sql),
|
||||
&resPrivate->sql,
|
||||
(sb4)0,
|
||||
SQLT_RSET, indPtr, 0, 0, 0, 0, OCI_DEFAULT);
|
||||
|
||||
|
@ -95,7 +95,6 @@ protected:
|
||||
bool internal_prepare();
|
||||
|
||||
private:
|
||||
QOCIResultPrivate *d_ptr;
|
||||
Q_DECLARE_PRIVATE(QOCIResult)
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user