QNX: Retrieve name of the display
Task-number: QTBUG-34545 Change-Id: I51d36c7352351b0770a1a076bdcc738677d7fcb6 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>bb10
parent
f16d690a2f
commit
38fc11b74b
|
|
@ -177,6 +177,11 @@ QQnxScreen::QQnxScreen(screen_context_t screenContext, screen_display_t display,
|
|||
|
||||
m_currentGeometry = m_initialGeometry = QRect(0, 0, val[0], val[1]);
|
||||
|
||||
char name[100];
|
||||
Q_SCREEN_CHECKERROR(screen_get_display_property_cv(m_display, SCREEN_PROPERTY_ID_STRING, 100,
|
||||
name), "Failed to query display name");
|
||||
m_name = QString::fromUtf8(name);
|
||||
|
||||
// Cache size of this display in millimeters. We have to take care of the orientation.
|
||||
// libscreen always reports the physical size dimensions as width and height in the
|
||||
// native orientation. Contrary to this, QPlatformScreen::physicalSize() expects the
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ public:
|
|||
|
||||
int rotation() const { return m_currentRotation; }
|
||||
|
||||
QString name() const { return m_name; }
|
||||
|
||||
int nativeFormat() const { return (depth() == 32) ? SCREEN_FORMAT_RGBA8888 : SCREEN_FORMAT_RGB565; }
|
||||
screen_display_t nativeDisplay() const { return m_display; }
|
||||
screen_context_t nativeContext() const { return m_screenContext; }
|
||||
|
|
@ -132,6 +134,7 @@ private:
|
|||
int m_initialRotation;
|
||||
int m_currentRotation;
|
||||
int m_keyboardHeight;
|
||||
QString m_name;
|
||||
QSize m_initialPhysicalSize;
|
||||
QSize m_currentPhysicalSize;
|
||||
Qt::ScreenOrientation m_nativeOrientation;
|
||||
|
|
|
|||
Loading…
Reference in New Issue