From 4f249a3c89b1551d35e4e63bef19b90af7929816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 26 Mar 2025 12:49:35 +0100 Subject: [PATCH] macOS: Remove unused variables in a11y implementation Pick-to: 6.8 Change-Id: Ib011f09119e324ce08837448eb82249f0b79a33e Reviewed-by: Volker Hilsheimer (cherry picked from commit 002badc3abdea577651b58c5d61c35ea7c38240a) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 010c34042b5..35651c5624d 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -253,7 +253,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of - (NSMutableArray *)populateTableArray:(NSAccessibilityRole)role count:(int)count { - if (QAccessibleInterface *iface = self.qtInterface) { + if (self.qtInterface) { auto *array = [NSMutableArray arrayWithCapacity:count]; Q_ASSERT(array); for (int n = 0; n < count; ++n) { @@ -408,7 +408,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of } - (NSString *) accessibilityRoleDescription { - if (QAccessibleInterface *iface = self.qtInterface) + if (self.qtInterface) return NSAccessibilityRoleDescription(self.accessibilityRole, self.accessibilitySubRole); return NSAccessibilityUnknownRole; } @@ -998,7 +998,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of if (self.isManagedByParent) { // axid matches the parent table axid so that we can easily find the parent table // children of row are cell/any items - if (QAccessibleTableInterface *table = iface->tableInterface()) { + if (iface->tableInterface()) { if (m_rowIndex >= 0) index = NSInteger(m_rowIndex); else if (m_columnIndex >= 0)