Fix warnings from int type mismatches

Cast explicitly to silence MSVC.

Change-Id: Ib5ba5cfad3f110d0203c46d817cb958445354204
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Volker Hilsheimer 2021-04-27 16:58:01 +02:00
parent 7275328b96
commit 832e3ab949
2 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ public:
QCOMPARE(cEnd.startLine, uint(startLine)); QCOMPARE(cEnd.startLine, uint(startLine));
int lastNewline = found.lastIndexOf(QLatin1Char('\n')); int lastNewline = found.lastIndexOf(QLatin1Char('\n'));
if (lastNewline < 0) if (lastNewline < 0)
lastNewline = - combined.startColumn; lastNewline = -int(combined.startColumn);
QCOMPARE(cEnd.startColumn, found.length() - lastNewline); QCOMPARE(cEnd.startColumn, found.length() - lastNewline);
} }
private: private:

View File

@ -1712,7 +1712,7 @@ void tst_qqmlvaluetypes::sequences()
QJSValue value = engine.toScriptValue(container); QJSValue value = engine.toScriptValue(container);
QCOMPARE(value.property("length").toInt(), int(container.size())); QCOMPARE(value.property("length").toInt(), int(container.size()));
for (size_t i = 0; i < container.size(); ++i) for (size_t i = 0; i < container.size(); ++i)
QCOMPARE(value.property(i).property("baseProperty").toInt(), container.at(i).baseProperty()); QCOMPARE(value.property(quint32(i)).property("baseProperty").toInt(), container.at(i).baseProperty());
} }
{ {
QVector<QChar> qcharVector{QChar(1), QChar(4), QChar(42), QChar(8), QChar(15)}; QVector<QChar> qcharVector{QChar(1), QChar(4), QChar(42), QChar(8), QChar(15)};