summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2015-06-23 22:37:10 +0100
committerMike Krus <mike.krus@kdab.com>2015-06-26 06:54:49 +0000
commit5757b8c516ad0d613739b222687583bca914a981 (patch)
tree756d87e9ecad9253c276d2915fa7dcb3370ce63f
parent3de7a966f12037d5b6e8955297b87fb073196c3f (diff)
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>
-rw-r--r--src/plugins/platforms/ios/qioswindow.h2
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h
index b45f629310..c53eee1afd 100644
--- a/src/plugins/platforms/ios/qioswindow.h
+++ b/src/plugins/platforms/ios/qioswindow.h
@@ -80,6 +80,8 @@ public:
void clearAccessibleCache();
+ QSurfaceFormat format() const Q_DECL_OVERRIDE;
+
private:
void applicationStateChanged(Qt::ApplicationState state);
void applyGeometry(const QRect &rect);
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 80fba00ffb..3045a15380 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -93,6 +93,13 @@ QIOSWindow::~QIOSWindow()
[m_view release];
}
+
+QSurfaceFormat QIOSWindow::format() const
+{
+ return window()->requestedFormat();
+}
+
+
bool QIOSWindow::blockedByModal()
{
QWindow *modalWindow = QGuiApplication::modalWindow();