diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2015-01-12 17:32:54 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-01-21 19:11:38 +0100 |
commit | b9eab8984d482b7ffdab640b9d2aa53c5522bfba (patch) | |
tree | 1ac9f27dab1d058190bed453b04e907b2fa2349d /src | |
parent | 10472dce9202e4460b2d908bdbe0cd65291f77e5 (diff) |
iOS: Use QPlatformIntegration::destroyScreen() instead of manual delete
Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qiosscreen.mm | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.h b/src/plugins/platforms/ios/qiosintegration.h index 85338b1c4d..d3474597e1 100644 --- a/src/plugins/platforms/ios/qiosintegration.h +++ b/src/plugins/platforms/ios/qiosintegration.h @@ -76,7 +76,9 @@ public: QTouchDevice *touchDevice(); QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE; + // Called from Objective-C class QIOSScreenTracker, which can't be friended void addScreen(QPlatformScreen *screen) { screenAdded(screen); } + void destroyScreen(QPlatformScreen *screen) { QPlatformIntegration::destroyScreen(screen); } static QIOSIntegration *instance(); diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 712bf0098b..43bfed5cbb 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -92,7 +92,8 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen) QIOSScreen *screen = qtPlatformScreenFor([notification object]); Q_ASSERT_X(screen, Q_FUNC_INFO, "Screen disconnected that we didn't know about"); - delete screen; + QIOSIntegration *integration = QIOSIntegration::instance(); + integration->destroyScreen(screen); } + (void)screenModeChanged:(NSNotification*)notification |