diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-05-10 17:58:59 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-05-12 05:43:37 +0000 |
commit | 23849826b490c07d9ba656bcb4ac46edd3040c0a (patch) | |
tree | 5a96b82fda56c54b12eb6778839172b4853c2eef /src/plugins/sqldrivers/odbc | |
parent | b62bff2ef3a6c846462e5381664651f49944261a (diff) |
Sweep of int-ish → char-ish types near calls to QString::fromU*()
The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going
to be deprecated. Use the newer fromUtf16(char16_t*) and
fromUcs4(char32_t*) overloads.
As a drive-by, use std::end()/std::size() where applicable.
Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/odbc')
-rw-r--r-- | src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp index 8df61ddaa5..4081cd1122 100644 --- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp +++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp @@ -81,10 +81,10 @@ inline static QString fromSQLTCHAR(const QVarLengthArray<SQLTCHAR>& input, qsize result=QString::fromUtf8((const char *)input.constData(), realsize); break; case 2: - result=QString::fromUtf16((const ushort *)input.constData(), realsize); + result = QString::fromUtf16(reinterpret_cast<const char16_t *>(input.constData()), realsize); break; case 4: - result=QString::fromUcs4((const uint *)input.constData(), realsize); + result = QString::fromUcs4(reinterpret_cast<const char32_t *>(input.constData()), realsize); break; default: qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", int(sizeof(SQLTCHAR))); |