iOS: Implement QPlatformScreen::name for easier debugging

Change-Id: I077bec93fe2086c38ebe986b322977a50a1ab27d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-12-05 19:30:12 +01:00
parent 87efdd8c7f
commit 58a409c6dc
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -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;