summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-09-14 15:20:03 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-09-17 08:20:31 +0000
commited38c063a84cca244c1528ecddb956abdc8018a8 (patch)
tree806f074b250a5402e7d0a2955c1253171b9432b5
parente3cb1c4e82b1172c7775ea0c8780f4b4e8fb94da (diff)
Remove ifdefs for unsupported libwayland versions
The ifdefs were for version 1.2.0. Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp9
-rw-r--r--src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp9
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp3
-rw-r--r--tests/auto/client/shared/mocksurface.cpp7
4 files changed, 0 insertions, 28 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index 632b1757f..2521b7fa1 100644
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
@@ -76,12 +76,7 @@ public:
: surface(surf)
, resource(res)
{
-#if WAYLAND_VERSION_MAJOR < 1 || (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR <= 2)
- res->data = this;
- res->destroy = destroyCallback;
-#else
wl_resource_set_implementation(res, nullptr, this, destroyCallback);
-#endif
}
~FrameCallback()
{
@@ -100,11 +95,7 @@ public:
}
static void destroyCallback(wl_resource *res)
{
-#if WAYLAND_VERSION_MAJOR < 1 || (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR <= 2)
- FrameCallback *_this = static_cast<FrameCallback *>(res->data);
-#else
FrameCallback *_this = static_cast<FrameCallback *>(wl_resource_get_user_data(res));
-#endif
if (_this->surface)
QWaylandSurfacePrivate::get(_this->surface)->removeFrameCallback(_this);
delete _this;
diff --git a/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp b/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp
index 77044d8e1..78877171b 100644
--- a/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp
+++ b/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5.cpp
@@ -144,9 +144,6 @@ namespace QtWaylandServer {
that->m_resource_map.remove(resource->client(), resource);
that->xdg_shell_destroy_resource(resource);
delete resource;
-#if !WAYLAND_VERSION_CHECK(1, 2, 0)
- free(client_resource);
-#endif
}
xdg_shell_v5::Resource *xdg_shell_v5::bind(struct ::wl_client *client, uint32_t id, int version)
@@ -402,9 +399,6 @@ namespace QtWaylandServer {
that->m_resource_map.remove(resource->client(), resource);
that->xdg_surface_destroy_resource(resource);
delete resource;
-#if !WAYLAND_VERSION_CHECK(1, 2, 0)
- free(client_resource);
-#endif
}
xdg_surface_v5::Resource *xdg_surface_v5::bind(struct ::wl_client *client, uint32_t id, int version)
@@ -833,9 +827,6 @@ namespace QtWaylandServer {
that->m_resource_map.remove(resource->client(), resource);
that->xdg_popup_destroy_resource(resource);
delete resource;
-#if !WAYLAND_VERSION_CHECK(1, 2, 0)
- free(client_resource);
-#endif
}
xdg_popup_v5::Resource *xdg_popup_v5::bind(struct ::wl_client *client, uint32_t id, int version)
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index c08c00f4f..ec1341e8a 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -772,9 +772,6 @@ bool Scanner::process()
printf(" that->m_resource_map.remove(resource->client(), resource);\n");
printf(" that->%s_destroy_resource(resource);\n", interfaceNameStripped);
printf(" delete resource;\n");
- printf("#if !WAYLAND_VERSION_CHECK(1, 2, 0)\n");
- printf(" free(client_resource);\n");
- printf("#endif\n");
printf(" }\n");
printf("\n");
diff --git a/tests/auto/client/shared/mocksurface.cpp b/tests/auto/client/shared/mocksurface.cpp
index 4de4265d7..c0d51618c 100644
--- a/tests/auto/client/shared/mocksurface.cpp
+++ b/tests/auto/client/shared/mocksurface.cpp
@@ -161,14 +161,7 @@ void Surface::surface_commit(Resource *resource)
Q_UNUSED(resource);
if (m_buffer) {
-#if WAYLAND_VERSION_CHECK(1, 2, 0)
struct ::wl_shm_buffer *shm_buffer = wl_shm_buffer_get(m_buffer);
-#else
- struct ::wl_buffer *shm_buffer = 0;
- if (wl_buffer_is_shm(static_cast<struct ::wl_buffer*>(m_buffer->data)))
- shm_buffer = static_cast<struct ::wl_buffer*>(m_buffer->data);
-#endif
-
if (shm_buffer) {
int stride = wl_shm_buffer_get_stride(shm_buffer);
uint format = wl_shm_buffer_get_format(shm_buffer);