diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-07-03 19:14:06 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-07-21 15:27:50 +0200 |
commit | 3c5d405f34141b6200d1a3d7a614f856e8ba9142 (patch) | |
tree | effdac13320b7b8e95dd411dc51c2f5079ed360f /src/plugins/platforms/ios/qiosintegration.mm | |
parent | f1724e4d8ac363f903e189d466d7138e07db78d9 (diff) |
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 <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosintegration.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.mm | 8 |
1 files changed, 4 insertions, 4 deletions
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; |