diff options
author | David Boddie <dboddie@trolltech.com> | 2009-05-20 12:29:10 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-05-20 12:29:10 (GMT) |
commit | 095fe67c4a669f038ea7c14613efe5cb9453fa74 (patch) | |
tree | d5bb5d35f59d26b5992c13e36146e805c37eb27e /src/sql/drivers/ibase | |
parent | 675c41f92fa72753fea364b73639fd9e0c7cc0d5 (diff) | |
parent | 3f705ded78ed54ec63ca09cc81dfb68bc2235190 (diff) | |
download | Qt-095fe67c4a669f038ea7c14613efe5cb9453fa74.zip Qt-095fe67c4a669f038ea7c14613efe5cb9453fa74.tar.gz Qt-095fe67c4a669f038ea7c14613efe5cb9453fa74.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/sql/drivers/ibase')
-rw-r--r-- | src/sql/drivers/ibase/qsql_ibase.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp index 4f3d79d..1645555 100644 --- a/src/sql/drivers/ibase/qsql_ibase.cpp +++ b/src/sql/drivers/ibase/qsql_ibase.cpp @@ -55,6 +55,7 @@ #include <limits.h> #include <math.h> #include <qdebug.h> +#include <QVarLengthArray> QT_BEGIN_NAMESPACE @@ -583,7 +584,7 @@ QVariant QIBaseResultPrivate::fetchArray(int pos, ISC_QUAD *arr) int arraySize = 1, subArraySize; short dimensions = desc.array_desc_dimensions; - short *numElements = new short[dimensions]; + QVarLengthArray<short> numElements(dimensions); for(int i = 0; i < dimensions; ++i) { subArraySize = (desc.array_desc_bounds[i].array_bound_upper - @@ -612,9 +613,7 @@ QVariant QIBaseResultPrivate::fetchArray(int pos, ISC_QUAD *arr) QSqlError::StatementError)) return list; - readArrayBuffer(list, ba.data(), 0, numElements, &desc, tc); - - delete[] numElements; + readArrayBuffer(list, ba.data(), 0, numElements.data(), &desc, tc); return QVariant(list); } |