diff options
Diffstat (limited to 'src/compositor/global')
-rw-r--r-- | src/compositor/global/qwaylandextension.h | 2 | ||||
-rw-r--r-- | src/compositor/global/qwaylandquickextension.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/compositor/global/qwaylandextension.h b/src/compositor/global/qwaylandextension.h index 0088601be..7692aac8f 100644 --- a/src/compositor/global/qwaylandextension.h +++ b/src/compositor/global/qwaylandextension.h @@ -80,7 +80,7 @@ public: QWaylandObject *extensionContainer() const; void setExtensionContainer(QWaylandObject *container); - Q_INVOKABLE virtual void initialize(); + virtual void initialize(); bool isInitialized() const; virtual const struct wl_interface *extensionInterface() const = 0; diff --git a/src/compositor/global/qwaylandquickextension.h b/src/compositor/global/qwaylandquickextension.h index 6322d28fe..64359ffa1 100644 --- a/src/compositor/global/qwaylandquickextension.h +++ b/src/compositor/global/qwaylandquickextension.h @@ -38,11 +38,13 @@ #define QWAYLANDQUICKEXTENSION_H #include <QtWaylandCompositor/QWaylandExtension> +#include <QtQml/QQmlParserStatus> +#include <QtQml/QQmlListProperty> QT_BEGIN_NAMESPACE #define Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className) \ - class Q_WAYLAND_COMPOSITOR_EXPORT className##QuickExtension : public className \ + class Q_WAYLAND_COMPOSITOR_EXPORT className##QuickExtension : public className, public QQmlParserStatus \ { \ /* qmake ignore Q_OBJECT */ \ Q_OBJECT \ @@ -53,6 +55,8 @@ QT_BEGIN_NAMESPACE { \ return QQmlListProperty<QObject>(this, m_objects); \ } \ + void classBegin() Q_DECL_OVERRIDE {} \ + void componentComplete() Q_DECL_OVERRIDE { initialize(); } \ private: \ QList<QObject *> m_objects; \ }; |