mirror of https://github.com/qt/qt5compat.git
Fix compiler warnings from int/size_t mismatches
Cast expliclity to int to silence compiler. Change-Id: I29649c7da1850d7842318b0b2102ceb57659be3e Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
e451d5187e
commit
086687deb2
|
@ -1678,7 +1678,7 @@ void tst_QTextCodec::utf8Codec()
|
|||
QFETCH(int, len);
|
||||
|
||||
QString str = codec->toUnicode(utf8.isNull() ? 0 : utf8.constData(),
|
||||
len < 0 ? qstrlen(utf8.constData()) : len);
|
||||
len < 0 ? int(qstrlen(utf8.constData())) : len);
|
||||
QCOMPARE(str, res);
|
||||
|
||||
str = QString::fromUtf8(utf8.isNull() ? 0 : utf8.constData(), len);
|
||||
|
|
|
@ -529,7 +529,7 @@ void tst_QXmlSimpleReader::inputFromString()
|
|||
{
|
||||
QString str = "<foo><bar>kake</bar><bar>ja</bar></foo>";
|
||||
QBuffer buff;
|
||||
buff.setData((char*)str.utf16(), str.size()*sizeof(ushort));
|
||||
buff.setData((char*)str.utf16(), int(str.size()*sizeof(ushort)));
|
||||
|
||||
QXmlInputSource input(&buff);
|
||||
|
||||
|
|
Loading…
Reference in New Issue