diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-05-08 14:55:14 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:09:42 +0200 |
commit | d1359f8b0c2b8fcffc2112d2e29d530ac1ab7c9a (patch) | |
tree | 0f7fdee380c657914065230d522f91a89563088e /src/compositor/extensions/qwlqtkey_p.h | |
parent | 85b1d4e6524504321fa769457eea5fb3b7e62e7e (diff) |
Improve QWaylandExtension
By using curiously recurring template pattern we can generate a getter
which is very convenient, and all QWaylandExtensions should have this
casting operation
Change-Id: Idb5a786655f2e106cf5388b11ed71e8b6ddddec0
Diffstat (limited to 'src/compositor/extensions/qwlqtkey_p.h')
-rw-r--r-- | src/compositor/extensions/qwlqtkey_p.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compositor/extensions/qwlqtkey_p.h b/src/compositor/extensions/qwlqtkey_p.h index 542f6eae2..fa78037d3 100644 --- a/src/compositor/extensions/qwlqtkey_p.h +++ b/src/compositor/extensions/qwlqtkey_p.h @@ -51,7 +51,7 @@ class QKeyEvent; namespace QtWayland { -class QtKeyExtensionGlobal : public QWaylandExtension, public QtWaylandServer::qt_key_extension +class QtKeyExtensionGlobal : public QWaylandExtensionTemplate<QtKeyExtensionGlobal>, public QtWaylandServer::qt_key_extension { Q_OBJECT public: @@ -59,9 +59,6 @@ public: bool postQtKeyEvent(QKeyEvent *event, Surface *surface); - const struct wl_interface *interface() const Q_DECL_OVERRIDE { return qt_key_extension::interface(); } - - static QtKeyExtensionGlobal *get(QWaylandExtensionContainer *container); private: Compositor *m_compositor; }; |