iOS: Use QPlatformIntegration::destroyScreen() instead of manual delete
Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>bb10
parent
10472dce92
commit
b9eab8984d
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue