Fix compiler warning when comparing integers

Cocoa's columnArray::count is an unsiged int, resulting in a compile
warning when QCOMPARE'ed with a signed integer literal.

Change-Id: I420a9e89bba5feeb9d8a040a06e6ba0e209c82f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Volker Hilsheimer 2022-12-12 10:41:36 +01:00
parent ae3224bf92
commit 82b1f4b90d

View File

@ -705,12 +705,14 @@ void tst_QAccessibilityMac::tableViewTest()
// here start actual tableview tests
// Should have 2 columns
const unsigned int columnCount = 2;
NSArray *columnArray = [tv tableColumns];
QCOMPARE([columnArray count], 2);
QCOMPARE([columnArray count], columnCount);
// should have 3 rows
const unsigned int rowCount = 3;
NSArray *rowArray = [tv tableRows];
QCOMPARE([rowArray count], 3);
QCOMPARE([rowArray count], rowCount);
// The individual cells are children of the rows
TestAXObject *row = [[TestAXObject alloc] initWithAXUIElementRef:(AXUIElementRef)rowArray[0]];
@ -722,7 +724,7 @@ void tst_QAccessibilityMac::tableViewTest()
// both rows and columns are direct children of the table
NSArray *childList = [tv childList];
QCOMPARE([childList count], 5); // 3 rows + 2 columns
QCOMPARE([childList count], columnCount + rowCount);
for (id child in childList) {
TestAXObject *childObject = [[TestAXObject alloc] initWithAXUIElementRef:(AXUIElementRef)child];
QVERIFY([childObject.role isEqualToString:NSAccessibilityRowRole] ||