iOS: Disconnect focusWindowChanged connection on QIOSViewController dealloc
Change-Id: I6acac4c926fcf5459364133b6cc58baff0519074 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>bb10
parent
f568e511b7
commit
087c61f7b7
|
|
@ -60,6 +60,7 @@
|
|||
@public
|
||||
QIOSScreen *m_screen;
|
||||
BOOL m_updatingProperties;
|
||||
QMetaObject::Connection m_focusWindowChangeConnection;
|
||||
}
|
||||
@property (nonatomic, assign) BOOL changingOrientation;
|
||||
@end
|
||||
|
|
@ -202,7 +203,7 @@
|
|||
self.prefersStatusBarHidden = infoPlistValue(@"UIStatusBarHidden", false);
|
||||
self.preferredStatusBarUpdateAnimation = UIStatusBarAnimationNone;
|
||||
|
||||
QObject::connect(qApp, &QGuiApplication::focusWindowChanged, [self]() {
|
||||
m_focusWindowChangeConnection = QObject::connect(qApp, &QGuiApplication::focusWindowChanged, [self]() {
|
||||
[self updateProperties];
|
||||
});
|
||||
}
|
||||
|
|
@ -210,6 +211,12 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
QObject::disconnect(m_focusWindowChangeConnection);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)loadView
|
||||
{
|
||||
self.view = [[[QIOSDesktopManagerView alloc] init] autorelease];
|
||||
|
|
|
|||
Loading…
Reference in New Issue