diff options
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.h | 4 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.mm | 4 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qiosscreen.mm | 10 |
3 files changed, 7 insertions, 11 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.h b/src/plugins/platforms/ios/qiosintegration.h index 818250fcee..eeb44b54d3 100644 --- a/src/plugins/platforms/ios/qiosintegration.h +++ b/src/plugins/platforms/ios/qiosintegration.h @@ -92,10 +92,6 @@ public: QPlatformAccessibility *accessibility() const override; #endif - // Called from Objective-C class QIOSScreenTracker, which can't be friended - void addScreen(QPlatformScreen *screen) { screenAdded(screen); } - void destroyScreen(QPlatformScreen *screen) { QPlatformIntegration::destroyScreen(screen); } - void beep() const override; static QIOSIntegration *instance(); diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index bec8354fcc..9eca0eaad3 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -107,7 +107,7 @@ void QIOSIntegration::initialize() } for (UIScreen *screen in screens) - addScreen(new QIOSScreen(screen)); + QWindowSystemInterface::handleScreenAdded(new QIOSScreen(screen)); // Depends on a primary screen being present m_inputContext = new QIOSInputContext; @@ -143,7 +143,7 @@ QIOSIntegration::~QIOSIntegration() m_inputContext = 0; foreach (QScreen *screen, QGuiApplication::screens()) - destroyScreen(screen->handle()); + QWindowSystemInterface::handleScreenRemoved(screen->handle()); delete m_platformServices; m_platformServices = 0; diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 4f753be21a..9aba658479 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -50,6 +50,7 @@ #include <QtGui/private/qwindow_p.h> #include <private/qcoregraphics_p.h> +#include <qpa/qwindowsysteminterface.h> #include <sys/sysctl.h> @@ -105,10 +106,10 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen) + (void)screenConnected:(NSNotification*)notification { - QIOSIntegration *integration = QIOSIntegration::instance(); - Q_ASSERT_X(integration, Q_FUNC_INFO, "Screen connected before QIOSIntegration creation"); + Q_ASSERT_X(QIOSIntegration::instance(), Q_FUNC_INFO, + "Screen connected before QIOSIntegration creation"); - integration->addScreen(new QIOSScreen([notification object])); + QWindowSystemInterface::handleScreenAdded(new QIOSScreen([notification object])); } + (void)screenDisconnected:(NSNotification*)notification @@ -116,8 +117,7 @@ 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"); - QIOSIntegration *integration = QIOSIntegration::instance(); - integration->destroyScreen(screen); + QWindowSystemInterface::handleScreenRemoved(screen); } + (void)screenModeChanged:(NSNotification*)notification |