From 3c5d405f34141b6200d1a3d7a614f856e8ba9142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 3 Jul 2014 19:14:06 +0200 Subject: iOS: Detect external screen connections and expose as additional QScreen The additional QScreen can not be used for anything yet, since we don't set up a window and root view controller for it. Change-Id: I335b796bdd89fc58a27ec4e20c5ed355be0cab66 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qiosintegration.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/ios/qiosintegration.mm') diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index c788756640..5ed37c3525 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -73,7 +73,6 @@ QIOSIntegration::QIOSIntegration() : m_fontDatabase(new QCoreTextFontDatabase) , m_clipboard(new QIOSClipboard) , m_inputContext(new QIOSInputContext) - , m_screen(new QIOSScreen(QIOSScreen::MainScreen)) , m_platformServices(new QIOSServices) , m_accessibility(0) { @@ -89,7 +88,8 @@ QIOSIntegration::QIOSIntegration() // Set current directory to app bundle folder QDir::setCurrent(QString::fromUtf8([[[NSBundle mainBundle] bundlePath] UTF8String])); - screenAdded(m_screen); + for (UIScreen *screen in [UIScreen screens]) + addScreen(new QIOSScreen(screen)); m_touchDevice = new QTouchDevice; m_touchDevice->setType(QTouchDevice::TouchScreen); @@ -110,8 +110,8 @@ QIOSIntegration::~QIOSIntegration() delete m_inputContext; m_inputContext = 0; - delete m_screen; - m_screen = 0; + foreach (QScreen *screen, QGuiApplication::screens()) + delete screen->handle(); delete m_platformServices; m_platformServices = 0; -- cgit v1.2.3