iOS: Implement QPlatformScreen::name for easier debugging
Change-Id: I077bec93fe2086c38ebe986b322977a50a1ab27d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
87efdd8c7f
commit
58a409c6dc
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user