Fix namespaced build on iOS
Change-Id: I682fabe8891e0325e6545b4499a59af4ad584c41 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>bb10
parent
8b2f91e328
commit
04cb6e2754
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
#include <QtDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSPaintDevice : public QOpenGLPaintDevice
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
#import <OpenGLES/ES2/glext.h>
|
||||
#import <QuartzCore/CAEAGLLayer.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_LOGGING_CATEGORY(lcQpaGLContext, "qt.qpa.glcontext");
|
||||
|
||||
QIOSContext::QIOSContext(QOpenGLContext *context)
|
||||
|
|
@ -314,3 +316,4 @@ bool QIOSContext::isSharing() const
|
|||
|
||||
#include "moc_qioscontext.cpp"
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@
|
|||
#include <QtCore/qeventloop.h>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(UIViewController);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSFileDialog : public QPlatformFileDialogHelper
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ QT_END_NAMESPACE
|
|||
+ (id)currentFirstResponder;
|
||||
@end
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class FirstResponderCandidate : public QScopedValueRollback<UIResponder *>
|
||||
{
|
||||
public:
|
||||
|
|
@ -84,4 +86,6 @@ private:
|
|||
static UIResponder *s_firstResponderCandidate;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QIOSGLOBAL_H
|
||||
|
|
|
|||
|
|
@ -114,6 +114,8 @@ int infoPlistValue(NSString* key, int defaultValue)
|
|||
return value ? [value intValue] : defaultValue;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@interface QtFirstResponderEvent : UIEvent
|
||||
|
|
@ -164,6 +166,8 @@ int infoPlistValue(NSString* key, int defaultValue)
|
|||
}
|
||||
@end
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
FirstResponderCandidate::FirstResponderCandidate(UIResponder *responder)
|
||||
: QScopedValueRollback<UIResponder *>(s_firstResponderCandidate, responder)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,13 +51,13 @@ const char kImePlatformDataInputView[] = "inputView";
|
|||
const char kImePlatformDataInputAccessoryView[] = "inputAccessoryView";
|
||||
const char kImePlatformDataReturnKeyType[] = "returnKeyType";
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@class QIOSLocaleListener;
|
||||
@class QIOSKeyboardListener;
|
||||
@class QIOSTextInputResponder;
|
||||
@protocol KeyboardState;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct KeyboardState
|
||||
{
|
||||
KeyboardState() :
|
||||
|
|
|
|||
|
|
@ -97,14 +97,14 @@ static QUIView *focusView()
|
|||
|
||||
@interface QIOSKeyboardListener : UIGestureRecognizer <UIGestureRecognizerDelegate> {
|
||||
@private
|
||||
QIOSInputContext *m_context;
|
||||
QT_PREPEND_NAMESPACE(QIOSInputContext) *m_context;
|
||||
}
|
||||
@property BOOL hasDeferredScrollToCursor;
|
||||
@end
|
||||
|
||||
@implementation QIOSKeyboardListener
|
||||
|
||||
- (id)initWithQIOSInputContext:(QIOSInputContext *)context
|
||||
- (id)initWithQIOSInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context
|
||||
{
|
||||
if (self = [super initWithTarget:self action:@selector(gestureStateChanged:)]) {
|
||||
|
||||
|
|
@ -291,6 +291,8 @@ static QUIView *focusView()
|
|||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Qt::InputMethodQueries ImeState::update(Qt::InputMethodQueries properties)
|
||||
{
|
||||
if (!properties)
|
||||
|
|
@ -713,3 +715,5 @@ QLocale QIOSInputContext::locale() const
|
|||
{
|
||||
return QLocale(QString::fromNSString([[NSLocale currentLocale] objectForKey:NSLocaleIdentifier]));
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@
|
|||
#include <QtCore/qeventloop.h>
|
||||
#include <qpa/qplatformdialoghelper.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(UIAlertController);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(UIAlertAction);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSMessageDialog : public QPlatformMessageDialogHelper
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void invalidateCache(QAccessibleInterface *iface)
|
|||
// when items get added or removed from the screen
|
||||
foreach (QWindow *win, QGuiApplication::topLevelWindows()) {
|
||||
if (win && win->handle()) {
|
||||
QIOSWindow *window = static_cast<QIOSWindow*>(win->handle());
|
||||
QT_PREPEND_NAMESPACE(QIOSWindow) *window = static_cast<QT_PREPEND_NAMESPACE(QIOSWindow) *>(win->handle());
|
||||
window->clearAccessibleCache();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
|
|||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
Returns the model identifier of the device.
|
||||
|
||||
|
|
|
|||
|
|
@ -42,19 +42,23 @@
|
|||
#include <QtCore/qstring.h>
|
||||
#include <QtGui/qevent.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSInputContext;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@interface QIOSTextInputResponder : UIResponder <UITextInputTraits, UIKeyInput, UITextInput>
|
||||
{
|
||||
@private
|
||||
QIOSInputContext *m_inputContext;
|
||||
QInputMethodQueryEvent *m_configuredImeState;
|
||||
QT_PREPEND_NAMESPACE(QIOSInputContext) *m_inputContext;
|
||||
QT_PREPEND_NAMESPACE(QInputMethodQueryEvent) *m_configuredImeState;
|
||||
QString m_markedText;
|
||||
BOOL m_inSendEventToFocusObject;
|
||||
BOOL m_inSelectionChange;
|
||||
}
|
||||
|
||||
- (id)initWithInputContext:(QIOSInputContext *)context;
|
||||
- (id)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)context;
|
||||
- (BOOL)needsKeyboardReconfigure:(Qt::InputMethodQueries)updatedProperties;
|
||||
|
||||
- (void)notifyInputDelegate:(Qt::InputMethodQueries)updatedProperties;
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
|
||||
@implementation QIOSTextInputResponder
|
||||
|
||||
- (id)initWithInputContext:(QIOSInputContext *)inputContext
|
||||
- (id)initWithInputContext:(QT_PREPEND_NAMESPACE(QIOSInputContext) *)inputContext
|
||||
{
|
||||
if (!(self = [self init]))
|
||||
return self;
|
||||
|
|
|
|||
|
|
@ -38,12 +38,17 @@
|
|||
****************************************************************************/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSScreen;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@interface QIOSViewController : UIViewController
|
||||
|
||||
- (id)initWithQIOSScreen:(QIOSScreen *)screen;
|
||||
- (id)initWithQIOSScreen:(QT_PREPEND_NAMESPACE(QIOSScreen) *)screen;
|
||||
- (void)updateProperties;
|
||||
|
||||
#ifndef Q_OS_TVOS
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
@interface QIOSViewController () {
|
||||
@public
|
||||
QPointer<QIOSScreen> m_screen;
|
||||
QPointer<QT_PREPEND_NAMESPACE(QIOSScreen)> m_screen;
|
||||
BOOL m_updatingProperties;
|
||||
QMetaObject::Connection m_focusWindowChangeConnection;
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
{
|
||||
Q_UNUSED(subview);
|
||||
|
||||
QIOSScreen *screen = self.qtViewController->m_screen;
|
||||
QT_PREPEND_NAMESPACE(QIOSScreen) *screen = self.qtViewController->m_screen;
|
||||
|
||||
// The 'window' property of our view is not valid until the window
|
||||
// has been shown, so we have to access it through the QIOSScreen.
|
||||
|
|
@ -229,7 +229,7 @@
|
|||
|
||||
@implementation QIOSViewController
|
||||
|
||||
- (id)initWithQIOSScreen:(QIOSScreen *)screen
|
||||
- (id)initWithQIOSScreen:(QT_PREPEND_NAMESPACE(QIOSScreen) *)screen
|
||||
{
|
||||
if (self = [self init]) {
|
||||
m_screen = screen;
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@
|
|||
class QIOSContext;
|
||||
class QIOSWindow;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@class QUIView;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSWindow : public QObject, public QPlatformWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@
|
|||
|
||||
#include <QtDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QIOSWindow::QIOSWindow(QWindow *window)
|
||||
: QPlatformWindow(window)
|
||||
, m_view([[QUIView alloc] initWithQIOSWindow:this])
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
QAccessibleCache *cache = QAccessibleCache::instance();
|
||||
|
||||
QMacAccessibilityElement *element = cache->elementForId(anId);
|
||||
QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *element = cache->elementForId(anId);
|
||||
if (!element) {
|
||||
Q_ASSERT(QAccessible::accessibleInterface(anId));
|
||||
element = [[self alloc] initWithId:anId withAccessibilityContainer: view];
|
||||
|
|
|
|||
|
|
@ -44,14 +44,18 @@
|
|||
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSWindow;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@class QIOSViewController;
|
||||
|
||||
@interface QUIView : UIView
|
||||
{
|
||||
@public
|
||||
QIOSWindow *m_qioswindow;
|
||||
QT_PREPEND_NAMESPACE(QIOSWindow) *m_qioswindow;
|
||||
@private
|
||||
QHash<UITouch *, QWindowSystemInterface::TouchPoint> m_activeTouches;
|
||||
int m_nextTouchId;
|
||||
|
|
@ -60,7 +64,7 @@ class QIOSWindow;
|
|||
NSMutableArray *m_accessibleElements;
|
||||
};
|
||||
|
||||
- (id)initWithQIOSWindow:(QIOSWindow *)window;
|
||||
- (id)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window;
|
||||
- (void)sendUpdatedExposeEvent;
|
||||
- (BOOL)isActiveWindow;
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
return [CAEAGLLayer class];
|
||||
}
|
||||
|
||||
- (id)initWithQIOSWindow:(QIOSWindow *)window
|
||||
- (id)initWithQIOSWindow:(QT_PREPEND_NAMESPACE(QIOSWindow) *)window
|
||||
{
|
||||
if (self = [self initWithFrame:window->geometry().toCGRect()])
|
||||
m_qioswindow = window;
|
||||
|
|
@ -524,7 +524,7 @@
|
|||
- (QWindow *)qwindow
|
||||
{
|
||||
if ([self isKindOfClass:[QUIView class]]) {
|
||||
if (QIOSWindow *w = static_cast<QUIView *>(self)->m_qioswindow)
|
||||
if (QT_PREPEND_NAMESPACE(QIOSWindow) *w = static_cast<QUIView *>(self)->m_qioswindow)
|
||||
return w->window();
|
||||
}
|
||||
return nil;
|
||||
|
|
|
|||
Loading…
Reference in New Issue