From bbb8db9bdb503f4f2c558e5f081c201c09d33d77 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 19 Dec 2012 10:46:22 +0100 Subject: [PATCH] iOS: make EAGLView private in QIOSWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not the biggest gain, but since all the members of EAGLView are declared private, we might as well move the whole interface into the source file. We can then make the members public without caring about interface readability. We will make use of this in a following patch. Change-Id: I144fb5748573ca6faf257d72597907b5c17b1e05 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.h | 29 ++----------------------- src/plugins/platforms/ios/qioswindow.mm | 24 +++++++++++++++++++- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h index cb2854d60e..d0df791cf0 100644 --- a/src/plugins/platforms/ios/qioswindow.h +++ b/src/plugins/platforms/ios/qioswindow.h @@ -49,31 +49,6 @@ class QIOSContext; class QIOSWindow; -@interface EAGLView : UIView -{ - UITextAutocapitalizationType autocapitalizationType; - UITextAutocorrectionType autocorrectionType; - BOOL enablesReturnKeyAutomatically; - UIKeyboardAppearance keyboardAppearance; - UIKeyboardType keyboardType; - UIReturnKeyType returnKeyType; - BOOL secureTextEntry; - QIOSWindow *m_qioswindow; -} - -- (id)initWithQIOSWindow:(QIOSWindow *)qioswindow; -- (void)sendMouseEventForTouches:(NSSet *)touches withEvent:(UIEvent *)event fakeButtons:(Qt::MouseButtons)buttons; - -@property(nonatomic) UITextAutocapitalizationType autocapitalizationType; -@property(nonatomic) UITextAutocorrectionType autocorrectionType; -@property(nonatomic) BOOL enablesReturnKeyAutomatically; -@property(nonatomic) UIKeyboardAppearance keyboardAppearance; -@property(nonatomic) UIKeyboardType keyboardType; -@property(nonatomic) UIReturnKeyType returnKeyType; -@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry; - -@end - QT_BEGIN_NAMESPACE class QIOSWindow : public QPlatformWindow @@ -92,10 +67,10 @@ public: GLuint colorRenderbuffer(const QIOSContext &context) const; qreal devicePixelRatio() const; - EAGLView *nativeView() const { return m_view; } + UIView *nativeView() const { return m_view; } private: - EAGLView *m_view; + UIView *m_view; QRect m_requestedGeometry; mutable struct GLData { diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 71816f7d94..220f30c485 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -53,6 +53,29 @@ #include +@interface EAGLView : UIView +{ +@public + UITextAutocapitalizationType autocapitalizationType; + UITextAutocorrectionType autocorrectionType; + BOOL enablesReturnKeyAutomatically; + UIKeyboardAppearance keyboardAppearance; + UIKeyboardType keyboardType; + UIReturnKeyType returnKeyType; + BOOL secureTextEntry; + QIOSWindow *m_qioswindow; +} + +@property(nonatomic) UITextAutocapitalizationType autocapitalizationType; +@property(nonatomic) UITextAutocorrectionType autocorrectionType; +@property(nonatomic) BOOL enablesReturnKeyAutomatically; +@property(nonatomic) UIKeyboardAppearance keyboardAppearance; +@property(nonatomic) UIKeyboardType keyboardType; +@property(nonatomic) UIReturnKeyType returnKeyType; +@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry; + +@end + @implementation EAGLView + (Class)layerClass @@ -186,7 +209,6 @@ @end - QT_BEGIN_NAMESPACE QIOSWindow::QIOSWindow(QWindow *window)