summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/mockcompositor.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-02-19 15:28:01 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-02-26 11:19:37 +0000
commit5b69d5f05fdf187ae8a5f08e9a57375cbbd7f142 (patch)
tree5db8f7de8dc1006b69bc387d6ec2a750f0343d01 /tests/auto/client/shared/mockcompositor.cpp
parentec495c98189f1d849e793108b09b5af0ce2c8984 (diff)
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 <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/shared/mockcompositor.cpp')
-rw-r--r--tests/auto/client/shared/mockcompositor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/client/shared/mockcompositor.cpp b/tests/auto/client/shared/mockcompositor.cpp
index bdeca4e23..2f1d68b01 100644
--- a/tests/auto/client/shared/mockcompositor.cpp
+++ b/tests/auto/client/shared/mockcompositor.cpp
@@ -30,6 +30,8 @@
#include "mockinput.h"
#include "mockoutput.h"
#include "mocksurface.h"
+#include "mockwlshell.h"
+#include "mockxdgshellv6.h"
#include <wayland-xdg-shell-unstable-v6-server-protocol.h>
@@ -331,8 +333,8 @@ Compositor::Compositor()
m_touch = m_seat->touch();
m_outputs.append(new Output(m_display, QSize(1920, 1080), QPoint(0, 0)));
- wl_global_create(m_display, &wl_shell_interface, 1, this, bindShell);
- wl_global_create(m_display, &zxdg_shell_v6_interface, 1, this, bindXdgShellV6);
+ m_wlShell.reset(new WlShell(m_display));
+ m_xdgShellV6.reset(new XdgShellV6(m_display));
m_loop = wl_display_get_event_loop(m_display);
m_fd = wl_event_loop_get_fd(m_loop);