diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-07-29 13:51:25 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:09:41 +0200 |
commit | 42c1bf3208e75b131aac2923da397de054cbbe13 (patch) | |
tree | 3900195214c0eafffc0ae411d2ed39de8747f5bf /src/compositor/compositor_api/qwaylandquickcompositor.cpp | |
parent | 7c65f7e9618a104b1304ec1a7a1cf7ee31527c87 (diff) |
Make QWaylandCompositor inherit QObject
And remove the constructor arguments, and just having parent as a
constructor argument. This requires QWaylandCompositor to have a create
semantic familiar from QWindow and QOpenGLContext. On create the native
wayland socket is created and initialized.
Also the virtual functions surfaceCreated and surfaceAboutToBeDestroyed
have been converted to signals, removing the need to subclass
QWaylandCompositor
Examples have been changed to avoid having two super classes inheriting
QObject. This is done by either making the QWindow subclass a member or
making the QWaylandCompositor a member.
Change-Id: I317d37e2adca15bfe4e1904e20ab0d83943b2d45
Diffstat (limited to 'src/compositor/compositor_api/qwaylandquickcompositor.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickcompositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp index 6dd7ddd07..3a8cc4c6b 100644 --- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandquickcompositor.cpp @@ -46,8 +46,8 @@ QT_BEGIN_NAMESPACE -QWaylandQuickCompositor::QWaylandQuickCompositor(const char *socketName, ExtensionFlags extensions) - : QWaylandCompositor(socketName, extensions) +QWaylandQuickCompositor::QWaylandQuickCompositor(QObject *parent) + : QWaylandCompositor(parent) { qmlRegisterUncreatableType<QWaylandSurfaceItem>("QtCompositor", 1, 0, "WaylandSurfaceItem", QObject::tr("Cannot create instance of WaylandSurfaceItem")); qmlRegisterUncreatableType<QWaylandQuickSurface>("QtCompositor", 1, 0, "WaylandQuickSurface", QObject::tr("Cannot create instance of WaylandQuickSurface")); |