From e87768a8806ee6e79ceff2ce8cea133879ef9195 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 27 Feb 2020 10:01:00 +0100 Subject: Use qsizetype for size related methods in QVarlengthArray MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib94b9a4e6e17da21f592e71a36fd1b97d42dfe62 Reviewed-by: MÃ¥rten Nordheim --- src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/sqldrivers/odbc') diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp index 2f56487f88..d58aea9a9d 100644 --- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp +++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp @@ -68,7 +68,7 @@ static const SQLSMALLINT TABLENAMESIZE = 128; //Map Qt parameter types to ODBC types static const SQLSMALLINT qParamType[4] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }; -inline static QString fromSQLTCHAR(const QVarLengthArray& input, int size=-1) +inline static QString fromSQLTCHAR(const QVarLengthArray& input, qsizetype size=-1) { QString result; @@ -491,7 +491,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni // more data can be fetched, the length indicator does NOT // contain the number of bytes returned - it contains the // total number of bytes that CAN be fetched - int rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator; + qsizetype rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator; // Remove any trailing \0 as some drivers misguidedly append one int realsize = qMin(rSize, buf.size()); if (realsize > 0 && buf[realsize - 1] == 0) -- cgit v1.2.3