diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-12-05 19:30:12 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-12-06 16:17:15 +0000 |
commit | 58a409c6dce920feb5c746a9319d0e0f1d02a233 (patch) | |
tree | 3b190b8fd0488e014a63159e18cd74ef1deca676 /src/plugins/platforms/ios | |
parent | 87efdd8c7f997e16ff5a35a44dce9b967d23f09b (diff) | |
download | qtbase-58a409c6dce920feb5c746a9319d0e0f1d02a233.tar.gz |
iOS: Implement QPlatformScreen::name for easier debugging
Change-Id: I077bec93fe2086c38ebe986b322977a50a1ab27d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiosscreen.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qiosscreen.mm | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.h b/src/plugins/platforms/ios/qiosscreen.h index 9fcce42825..7f10b08492 100644 --- a/src/plugins/platforms/ios/qiosscreen.h +++ b/src/plugins/platforms/ios/qiosscreen.h @@ -56,6 +56,8 @@ public: QIOSScreen(UIScreen *screen); ~QIOSScreen(); + QString name() const override; + QRect geometry() const Q_DECL_OVERRIDE; QRect availableGeometry() const Q_DECL_OVERRIDE; int depth() const Q_DECL_OVERRIDE; diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 1a7004c249..67970ba59e 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -280,6 +280,16 @@ QIOSScreen::~QIOSScreen() [m_uiWindow release]; } +QString QIOSScreen::name() const +{ + if (m_uiScreen == [UIScreen mainScreen]) { + return QString::fromNSString([UIDevice currentDevice].model) + + QLatin1String(" built-in display"); + } else { + return QLatin1String("External display"); + } +} + void QIOSScreen::updateProperties() { QRect previousGeometry = m_geometry; |