diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-29 13:26:04 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-29 21:59:31 +0100 |
commit | 5b76be7e2bbd6f6d1eccc3a52a4595223c0620a1 (patch) | |
tree | 6e209f292838c8220c08cb7f85bfacf9f2954bed | |
parent | 133067085a5f662865d0d7aaebcce7d82569b076 (diff) |
Fix two missing conversions from in to qsizetype
Change-Id: I08ac9a0eb5dfb17f2b6cfaca9e3f3d7375c02bd4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/corelib/text/qstringconverter.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qmessageauthenticationcode.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qmessageauthenticationcode.h | 2 |
3 files changed, 3 insertions, 3 deletions
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); |