summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-11-11 15:17:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-14 19:26:20 +0100
commitbb1225f5ba6f4bc5d7b8c2878d8f4ac492631c7f (patch)
tree68589736249f8aae5585543e9523b86bbb3faf12 /src/plugins/platforms/ios/qioswindow.h
parent18182a6275bb353dfb67ebc1562649e7624ccb0c (diff)
iOS: Tie QIOSContext FBOs to corresponding QPlatformWindow, not QWindow
A QWindow may be created() and destroyed() multiple times in the lifetime of the window, each time resulting in a new platform window (QIOSWindow) being created. This QIOSWindow is backed by a new UIView each time, hence it needs a new FBO and renderbuffer-mapping, since the previous renderbuffer was mapped to the old UIView. This fixes a bug where a QWindow would not render after a destroy() unless it was resized (which triggered new FBO/renderbuffers). We need to inherit QObject so that we can watch the destroyed() signal. Change-Id: I93172dd6280b86b49755bf7abddf061d7e6b66f1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.h')
-rw-r--r--src/plugins/platforms/ios/qioswindow.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h
index 9ab9a3a45e..5ded589205 100644
--- a/src/plugins/platforms/ios/qioswindow.h
+++ b/src/plugins/platforms/ios/qioswindow.h
@@ -58,8 +58,10 @@ QT_BEGIN_NAMESPACE
@class QUIView;
-class QIOSWindow : public QPlatformWindow
+class QIOSWindow : public QObject, public QPlatformWindow
{
+ Q_OBJECT
+
public:
explicit QIOSWindow(QWindow *window);
~QIOSWindow();