diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbmime.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 4 | ||||
-rw-r--r-- | src/sql/kernel/qsqlresult.cpp | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp index 8651bcff60..9b41162d45 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.cpp @@ -72,7 +72,7 @@ HRESULT STDMETHODCALLTYPE QWindowsUiaValueProvider::SetValue(LPCWSTR val) return UIA_E_ELEMENTNOTAVAILABLE; // First sets the value as a text. - QString strVal = QString::fromUtf16(reinterpret_cast<const ushort *>(val)); + QString strVal = QString::fromUtf16(reinterpret_cast<const char16_t *>(val)); accessible->setText(QAccessible::Value, strVal); // Then, if the control supports the value interface (range value) diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp index 6c5679135d..ec5ee7f994 100644 --- a/src/plugins/platforms/xcb/qxcbmime.cpp +++ b/src/plugins/platforms/xcb/qxcbmime.cpp @@ -192,7 +192,7 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a, if ((byte0 == 0xff && byte1 == 0xfe) || (byte0 == 0xfe && byte1 == 0xff) || (byte0 != 0 && byte1 == 0) || (byte0 == 0 && byte1 != 0)) { const QString str = QString::fromUtf16( - reinterpret_cast<const ushort *>(data.constData()), data.size() / 2); + reinterpret_cast<const char16_t *>(data.constData()), data.size() / 2); if (!str.isNull()) { if (format == QLatin1String("text/uri-list")) { const auto urls = str.splitRef(QLatin1Char('\n')); 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))); diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 69c9dcbac9..686677a8e7 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -61,9 +61,9 @@ QString QSqlResultPrivate::holderAt(int index) const // return a unique id for bound names QString QSqlResultPrivate::fieldSerial(int i) const { - ushort arr[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - ushort *end = &arr[(sizeof(arr)/sizeof(*arr))]; - ushort *ptr = end; + char16_t arr[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + auto end = std::end(arr); + auto ptr = end; while (i > 0) { *(--ptr) = 'a' + i % 16; |