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:
parent
ae3224bf92
commit
82b1f4b90d
@ -705,12 +705,14 @@ void tst_QAccessibilityMac::tableViewTest()
|
|||||||
|
|
||||||
// here start actual tableview tests
|
// here start actual tableview tests
|
||||||
// Should have 2 columns
|
// Should have 2 columns
|
||||||
|
const unsigned int columnCount = 2;
|
||||||
NSArray *columnArray = [tv tableColumns];
|
NSArray *columnArray = [tv tableColumns];
|
||||||
QCOMPARE([columnArray count], 2);
|
QCOMPARE([columnArray count], columnCount);
|
||||||
|
|
||||||
// should have 3 rows
|
// should have 3 rows
|
||||||
|
const unsigned int rowCount = 3;
|
||||||
NSArray *rowArray = [tv tableRows];
|
NSArray *rowArray = [tv tableRows];
|
||||||
QCOMPARE([rowArray count], 3);
|
QCOMPARE([rowArray count], rowCount);
|
||||||
|
|
||||||
// The individual cells are children of the rows
|
// The individual cells are children of the rows
|
||||||
TestAXObject *row = [[TestAXObject alloc] initWithAXUIElementRef:(AXUIElementRef)rowArray[0]];
|
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
|
// both rows and columns are direct children of the table
|
||||||
NSArray *childList = [tv childList];
|
NSArray *childList = [tv childList];
|
||||||
QCOMPARE([childList count], 5); // 3 rows + 2 columns
|
QCOMPARE([childList count], columnCount + rowCount);
|
||||||
for (id child in childList) {
|
for (id child in childList) {
|
||||||
TestAXObject *childObject = [[TestAXObject alloc] initWithAXUIElementRef:(AXUIElementRef)child];
|
TestAXObject *childObject = [[TestAXObject alloc] initWithAXUIElementRef:(AXUIElementRef)child];
|
||||||
QVERIFY([childObject.role isEqualToString:NSAccessibilityRowRole] ||
|
QVERIFY([childObject.role isEqualToString:NSAccessibilityRowRole] ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user