iOS: Prepare QIOSIntegration for handling plugin options
QGuiApplication sets options passed to the plugin through -platform as properties on the QPlatformNativeInterface. To handle those we need to inherit QPlatformNativeInterface first (which is the QObject subclass), and include the Q_OBJECT macro. Change-Id: Ia496851c64cbb0036c26e7ed0683d0ecfa8319cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
This commit is contained in:
parent
e92b68b1a6
commit
d758c115e4
@ -45,8 +45,10 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIOSServices;
|
||||
|
||||
class QIOSIntegration : public QPlatformIntegration, public QPlatformNativeInterface
|
||||
class QIOSIntegration : public QPlatformNativeInterface, public QPlatformIntegration
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QIOSIntegration();
|
||||
~QIOSIntegration();
|
||||
@ -72,8 +74,6 @@ public:
|
||||
QAbstractEventDispatcher *createEventDispatcher() const;
|
||||
QPlatformNativeInterface *nativeInterface() const;
|
||||
|
||||
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
|
||||
|
||||
QTouchDevice *touchDevice();
|
||||
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
|
||||
|
||||
@ -83,6 +83,10 @@ public:
|
||||
|
||||
static QIOSIntegration *instance();
|
||||
|
||||
// -- QPlatformNativeInterface --
|
||||
|
||||
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window);
|
||||
|
||||
private:
|
||||
QPlatformFontDatabase *m_fontDatabase;
|
||||
QPlatformClipboard *m_clipboard;
|
||||
|
@ -215,11 +215,25 @@ QPlatformTheme *QIOSIntegration::createPlatformTheme(const QString &name) const
|
||||
return QPlatformIntegration::createPlatformTheme(name);
|
||||
}
|
||||
|
||||
QTouchDevice *QIOSIntegration::touchDevice()
|
||||
{
|
||||
return m_touchDevice;
|
||||
}
|
||||
|
||||
QPlatformAccessibility *QIOSIntegration::accessibility() const
|
||||
{
|
||||
if (!m_accessibility)
|
||||
m_accessibility = new QIOSPlatformAccessibility;
|
||||
return m_accessibility;
|
||||
}
|
||||
|
||||
QPlatformNativeInterface *QIOSIntegration::nativeInterface() const
|
||||
{
|
||||
return const_cast<QIOSIntegration *>(this);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
void *QIOSIntegration::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
|
||||
{
|
||||
if (!window || !window->handle())
|
||||
@ -235,16 +249,8 @@ void *QIOSIntegration::nativeResourceForWindow(const QByteArray &resource, QWind
|
||||
return 0;
|
||||
}
|
||||
|
||||
QTouchDevice *QIOSIntegration::touchDevice()
|
||||
{
|
||||
return m_touchDevice;
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
|
||||
QPlatformAccessibility *QIOSIntegration::accessibility() const
|
||||
{
|
||||
if (!m_accessibility)
|
||||
m_accessibility = new QIOSPlatformAccessibility;
|
||||
return m_accessibility;
|
||||
}
|
||||
#include "moc_qiosintegration.cpp"
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user