remove useless workaround

The workaround attempts to let the application reserve memory in
QString for receiving the stored procedure output parameter.
This does not work because the reserved capacity is not preserved
through QVariant.

Unfortunately, the application must actually populate QString with
at least the number of characters that will be received.

Change-Id: Icb3be60d6bd570ad2349f20fb7d93b340e395627
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
Mark Brand 2012-04-13 01:01:23 +02:00 committed by Qt by Nokia
parent f869a12c10
commit 00bf077b98

View File

@ -1502,8 +1502,7 @@ bool QODBCResult::exec()
int strSize = str.length() * sizeof(SQLTCHAR);
if (bindValueType(i) & QSql::Out) {
QVarLengthArray<SQLTCHAR> a(toSQLTCHAR(str));
a.reserve(str.capacity());
const QVarLengthArray<SQLTCHAR> a(toSQLTCHAR(str));
QByteArray ba((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
r = SQLBindParameter(d->hStmt,
i + 1,