Fix warning when comparing size_t with qsizetype

Change-Id: Id8e7ae20aea99f2acb03b665484615bf7f932873
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-03-31 23:08:53 +02:00
parent 2bffce5719
commit 07f7ed2bad

View File

@ -2501,7 +2501,7 @@ void tst_Moc::cxx11Enums()
const QMetaType metaType = metaEnum.metaType();
const bool isUnsigned = metaType.flags() & QMetaType::IsUnsignedEnumeration;
if (isTyped) {
QCOMPARE(metaType.sizeOf(), sizeof(char));
QCOMPARE(size_t(metaType.sizeOf()), sizeof(char));
QCOMPARE(isUnsigned, !std::is_signed_v<char>);
} else if (isScoped) {
QCOMPARE(metaType.sizeOf(), sizeof(int));