summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <[email protected]>2025-04-18 21:16:41 +0200
committerChristian Ehrlicher <[email protected]>2025-04-23 06:18:21 +0200
commit87bbcddb1d68142b3b8a21d20ec19e38c55a5e93 (patch)
tree8fa624b880f21471397004df41ddd9bc5fee7fec
parent78ae4177fac2007fa8faed67e70ea225298f3503 (diff)
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 <[email protected]>
-rw-r--r--src/plugins/sqldrivers/oci/qsql_oci.cpp3
-rw-r--r--src/plugins/sqldrivers/oci/qsql_oci_p.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp
index a9e725af220..9ebead8bc3f 100644
--- a/src/plugins/sqldrivers/oci/qsql_oci.cpp
+++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp
@@ -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);
diff --git a/src/plugins/sqldrivers/oci/qsql_oci_p.h b/src/plugins/sqldrivers/oci/qsql_oci_p.h
index d5756c64fc6..8aa25c55285 100644
--- a/src/plugins/sqldrivers/oci/qsql_oci_p.h
+++ b/src/plugins/sqldrivers/oci/qsql_oci_p.h
@@ -95,7 +95,6 @@ protected:
bool internal_prepare();
private:
- QOCIResultPrivate *d_ptr;
Q_DECLARE_PRIVATE(QOCIResult)
};