Move tidy-up of private to its own destructor
QOCIResult::~QOCIResult() was doing part of the tidy-up for QOCIResultPrivate, whose own destructor took care of the rest. So move that part to the private, where it makes more sense. Also correct an error message in part of the private's existing tidy-up and eliminate a needless local variable. Change-Id: I09a51c72afd7a30bcee7f6127c59d703650f1c41 Reviewed-by: Andy Shaw <andy.shaw@qt.io>bb10
parent
0e1da78ad3
commit
afe416c4e1
|
|
@ -1862,9 +1862,11 @@ QOCIResultPrivate::~QOCIResultPrivate()
|
|||
{
|
||||
delete cols;
|
||||
|
||||
int r = OCIHandleFree(err, OCI_HTYPE_ERROR);
|
||||
if (r != 0)
|
||||
if (sql && OCIHandleFree(sql, OCI_HTYPE_STMT) != OCI_SUCCESS)
|
||||
qWarning("~QOCIResult: unable to free statement handle");
|
||||
|
||||
if (OCIHandleFree(err, OCI_HTYPE_ERROR) != OCI_SUCCESS)
|
||||
qWarning("~QOCIResult: unable to free error report handle");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1877,12 +1879,6 @@ QOCIResult::QOCIResult(const QOCIDriver *db)
|
|||
|
||||
QOCIResult::~QOCIResult()
|
||||
{
|
||||
Q_D(QOCIResult);
|
||||
if (d->sql) {
|
||||
int r = OCIHandleFree(d->sql, OCI_HTYPE_STMT);
|
||||
if (r != 0)
|
||||
qWarning("~QOCIResult: unable to free statement handle");
|
||||
}
|
||||
}
|
||||
|
||||
QVariant QOCIResult::handle() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue