iOS: Fix accessibility leak
Change-Id: I359ce521decbbb06376fc48689762f462c8706b0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
123741b64c
commit
0ad79dd0f0
@ -62,10 +62,11 @@
|
||||
|
||||
- (id)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window
|
||||
{
|
||||
if (self = [self initWithFrame:window->geometry().toCGRect()])
|
||||
if (self = [self initWithFrame:window->geometry().toCGRect()]) {
|
||||
m_qioswindow = window;
|
||||
|
||||
m_accessibleElements = [[NSMutableArray alloc] init];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@ -104,6 +105,13 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[m_accessibleElements release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)willMoveToWindow:(UIWindow *)newWindow
|
||||
{
|
||||
// UIKIt will normally set the scale factor of a view to match the corresponding
|
||||
|
@ -50,7 +50,7 @@
|
||||
return;
|
||||
QAccessible::Id accessibleId = QAccessible::uniqueId(iface);
|
||||
UIAccessibilityElement *elem = [[QMacAccessibilityElement alloc] initWithId: accessibleId withAccessibilityContainer: self];
|
||||
[m_accessibleElements addObject: elem];
|
||||
[m_accessibleElements addObject:[elem autorelease]];
|
||||
}
|
||||
|
||||
- (void)createAccessibleContainer:(QAccessibleInterface *)iface
|
||||
|
Loading…
Reference in New Issue
Block a user