Return format as specified in original QWindow

Overload QPlatformWindow::format() to return the desired format
defined in the QWindow. This is required for windows that define
specific surface formats (such as those used in Qt3d which require
a depth buffer).

This is similar to what is done in the OS X Cocoa QPA plugin.

Change-Id: I7661a2a9c4e13603d03d3a5be10d000f73c712e6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Mike Krus 2015-06-23 22:37:10 +01:00
parent 3de7a966f1
commit 5757b8c516
2 changed files with 9 additions and 0 deletions

View File

@ -80,6 +80,8 @@ public:
void clearAccessibleCache();
QSurfaceFormat format() const Q_DECL_OVERRIDE;
private:
void applicationStateChanged(Qt::ApplicationState state);
void applyGeometry(const QRect &rect);

View File

@ -93,6 +93,13 @@ QIOSWindow::~QIOSWindow()
[m_view release];
}
QSurfaceFormat QIOSWindow::format() const
{
return window()->requestedFormat();
}
bool QIOSWindow::blockedByModal()
{
QWindow *modalWindow = QGuiApplication::modalWindow();