From 5b69d5f05fdf187ae8a5f08e9a57375cbbd7f142 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Mon, 19 Feb 2018 15:28:01 +0100 Subject: Client tests: Use generated classes for mocking shells Removes a lot of boiler-plate code and makes the two shells more similar. This also makes it easier to extend the shells with additional mocking functionality. Change-Id: I4a846b06eeda695527d7c5679df339beae983af6 Reviewed-by: Paul Olav Tvete --- tests/auto/client/shared/mockcompositor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/auto/client/shared/mockcompositor.h') diff --git a/tests/auto/client/shared/mockcompositor.h b/tests/auto/client/shared/mockcompositor.h index d4cf5f367..747da38fa 100644 --- a/tests/auto/client/shared/mockcompositor.h +++ b/tests/auto/client/shared/mockcompositor.h @@ -52,6 +52,8 @@ class Seat; class DataDeviceManager; class Surface; class Output; +class WlShell; +class XdgShellV6; class Compositor { @@ -98,8 +100,6 @@ public: private: static void bindCompositor(wl_client *client, void *data, uint32_t version, uint32_t id); - static void bindShell(wl_client *client, void *data, uint32_t version, uint32_t id); - static void bindXdgShellV6(wl_client *client, void *compositorData, uint32_t version, uint32_t id); static Surface *resolveSurface(const QVariant &v); static Output *resolveOutput(const QVariant &v); @@ -121,6 +121,8 @@ private: QScopedPointer m_data_device_manager; QVector m_surfaces; QVector m_outputs; + QScopedPointer m_wlShell; + QScopedPointer m_xdgShellV6; }; void registerResource(wl_list *list, wl_resource *resource); -- cgit v1.2.3