iOS: Use QPlatformIntegration::destroyScreen() instead of manual delete

Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
bb10
Tor Arne Vestbø 2015-01-12 17:32:54 +01:00 committed by Tor Arne Vestbø
parent 10472dce92
commit b9eab8984d
2 changed files with 4 additions and 1 deletions

View File

@ -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();

View File

@ -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