diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-12-12 10:41:36 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-12-12 20:10:11 +0100 |
commit | 82b1f4b90d05d74fc0ed38421d1d832355452d08 (patch) | |
tree | 9a44e367965792125cdcc3554c041c9340a8fb6e | |
parent | ae3224bf92476c3863ff375acb6521da29d34171 (diff) | |
download | qtbase-82b1f4b90d05d74fc0ed38421d1d832355452d08.tar.gz |
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>
-rw-r--r-- | tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.mm b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.mm index 3b1979c030..22ae50eb19 100644 --- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.mm +++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.mm @@ -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] || |