diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-06-05 13:50:03 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-06 13:23:51 +0200 |
commit | fc15a1d5e2cb064df7b6e7b9e821e9db20a91b85 (patch) | |
tree | 45355e4d5426f63c158353b0dea18457c76dbf6c /src/sql/drivers/oci/qsql_oci.cpp | |
parent | 637ecd571f10bbab36b3321edb0479d79a542ddb (diff) |
QSqlResult: replace virtual hooks with virtual functions
Instead of virtual functions which would have broken binary
compatibility, virtual_hook() was used to implement the virtual
functionality. Now, since the step to Qt 5.0 allows breaking
binary compatibility, we take the opporunity to simplify the code
using real virtual functions.
SetNumericalPrecision --> setNumericalPrecisionPolicy()
NextResult --> nextResult()
DetachFromResultSet --> detachFromResultSet()
BatchOperation --> execBatch()
Task-number: QTBUG-25252
Change-Id: Idd3a870f876d8b8a7457559d5f31ec2073786a75
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/sql/drivers/oci/qsql_oci.cpp')
-rw-r--r-- | src/sql/drivers/oci/qsql_oci.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 1e001f77b2..02eda36c9a 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -2042,14 +2042,18 @@ QVariant QOCIResult::lastInsertId() const return QVariant(); } +bool QOCIResult::execBatch(bool arrayBind) +{ + QOCICols::execBatch(d, boundValues(), arrayBind); + d->resetBindCount(); + return d->error.type() == QSqlError::NoError; +} + void QOCIResult::virtual_hook(int id, void *data) { Q_ASSERT(data); switch (id) { - case QSqlResult::BatchOperation: - QOCICols::execBatch(d, boundValues(), *reinterpret_cast<bool *>(data)); - break; default: QSqlCachedResult::virtual_hook(id, data); } |