summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2015-01-21 13:57:16 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-02-02 16:19:03 +0000
commit087c61f7b7ce3087f22e94437c10e7c48d5e570e (patch)
tree97fcd2ff078592829c9d3f09040b73335994f3df /src/plugins
parentf568e511b7f6a2cbac0cec086fb49e2b5b19257c (diff)
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>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/ios/qiosviewcontroller.mm9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm
index 0fb6122960..ee36c3f3a8 100644
--- a/src/plugins/platforms/ios/qiosviewcontroller.mm
+++ b/src/plugins/platforms/ios/qiosviewcontroller.mm
@@ -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];