diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index e8323745d2..e66f512ed8 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -1217,7 +1217,7 @@ static QString convertToUnicodeCharByChar(QByteArrayView in, QStringConverter::S copyLocation = state->remainingChars; extra += copyLocation; } - int newLength = length + extra; + qsizetype newLength = length + extra; char *mbcs = new char[newLength]; //ensure that we have a NULL terminated string mbcs[newLength-1] = 0; diff --git a/src/corelib/tools/qmessageauthenticationcode.cpp b/src/corelib/tools/qmessageauthenticationcode.cpp index addd19d72e..5f86afc537 100644 --- a/src/corelib/tools/qmessageauthenticationcode.cpp +++ b/src/corelib/tools/qmessageauthenticationcode.cpp @@ -213,7 +213,7 @@ void QMessageAuthenticationCode::setKey(const QByteArray &key) /*! Adds the first \a length chars of \a data to the message. */ -void QMessageAuthenticationCode::addData(const char *data, int length) +void QMessageAuthenticationCode::addData(const char *data, qsizetype length) { d->initMessageHash(); d->messageHash.addData(data, length); diff --git a/src/corelib/tools/qmessageauthenticationcode.h b/src/corelib/tools/qmessageauthenticationcode.h index a13a3d2acf..343bf9d617 100644 --- a/src/corelib/tools/qmessageauthenticationcode.h +++ b/src/corelib/tools/qmessageauthenticationcode.h @@ -59,7 +59,7 @@ public: void setKey(const QByteArray &key); - void addData(const char *data, int length); + void addData(const char *data, qsizetype length); void addData(const QByteArray &data); bool addData(QIODevice *device);