summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2020-07-03 14:13:25 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2020-07-06 10:39:07 +0200
commitc114e173ce2f47f8df2fb0ea35af0ede04354751 (patch)
tree71d2577ca8fdfee76564de406709d41c2e85d024
parenta60f91d1cebe41b7fdd96171fc19fa75662c6f66 (diff)
Remove checks for old Wayland versions
Now that the minimum libwayland version is 1.15, there is no point in checking whether the version is greater than 1.10. Task-number: QTBUG-73636 Change-Id: I75a97bec7e464aa6b04e21d1c23566d17ac7684a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp9
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor_p.h4
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp7
3 files changed, 1 insertions, 19 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index ee38c628d..8878ce121 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -214,9 +214,7 @@ void QWaylandCompositorPrivate::init()
emit q->socketNameChanged(socket_name);
}
-#if WAYLAND_VERSION_MAJOR >= 1 && (WAYLAND_VERSION_MAJOR != 1 || WAYLAND_VERSION_MINOR >= 10)
connectToExternalSockets();
-#endif
loop = wl_display_get_event_loop(display);
@@ -308,7 +306,6 @@ void QWaylandCompositorPrivate::addPolishObject(QObject *object)
}
}
-#if WAYLAND_VERSION_MAJOR >= 1 && (WAYLAND_VERSION_MAJOR != 1 || WAYLAND_VERSION_MINOR >= 10)
void QWaylandCompositorPrivate::connectToExternalSockets()
{
// Clear out any backlog of user-supplied external socket descriptors
@@ -318,7 +315,6 @@ void QWaylandCompositorPrivate::connectToExternalSockets()
}
externally_added_socket_fds.clear();
}
-#endif
void QWaylandCompositorPrivate::compositor_create_surface(wl_compositor::Resource *resource, uint32_t id)
{
@@ -642,15 +638,10 @@ QByteArray QWaylandCompositor::socketName() const
*/
void QWaylandCompositor::addSocketDescriptor(int fd)
{
-#if WAYLAND_VERSION_MAJOR >= 1 && (WAYLAND_VERSION_MAJOR != 1 || WAYLAND_VERSION_MINOR >= 10)
Q_D(QWaylandCompositor);
d->externally_added_socket_fds.append(fd);
if (isCreated())
d->connectToExternalSockets();
-#else
- Q_UNUSED(fd);
- qWarning() << "QWaylandCompositor::addSocketDescriptor() does nothing on libwayland versions prior to 1.10.0";
-#endif
}
/*!
diff --git a/src/compositor/compositor_api/qwaylandcompositor_p.h b/src/compositor/compositor_api/qwaylandcompositor_p.h
index 6dec044f8..4f84c902f 100644
--- a/src/compositor/compositor_api/qwaylandcompositor_p.h
+++ b/src/compositor/compositor_api/qwaylandcompositor_p.h
@@ -113,9 +113,7 @@ public:
inline void addOutput(QWaylandOutput *output);
inline void removeOutput(QWaylandOutput *output);
-#if WAYLAND_VERSION_MAJOR >= 1 && (WAYLAND_VERSION_MAJOR != 1 || WAYLAND_VERSION_MINOR >= 10)
void connectToExternalSockets();
-#endif
protected:
void compositor_create_surface(wl_compositor::Resource *resource, uint32_t id) override;
@@ -133,9 +131,7 @@ protected:
void loadServerBufferIntegration();
QByteArray socket_name;
-#if WAYLAND_VERSION_MAJOR >= 1 && (WAYLAND_VERSION_MAJOR != 1 || WAYLAND_VERSION_MINOR >= 10)
QList<int> externally_added_socket_fds;
-#endif
struct wl_display *display = nullptr;
bool ownsDisplay = false;
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index 130a71554..f550651b2 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -1105,13 +1105,8 @@ bool Scanner::process()
printf("static inline void *wlRegistryBind(struct ::wl_registry *registry, uint32_t name, const struct ::wl_interface *interface, uint32_t version)\n");
printf("{\n");
printf(" const uint32_t bindOpCode = 0;\n");
- printf("#if (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR > 10) || WAYLAND_VERSION_MAJOR > 1\n");
printf(" return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,\n");
- printf(" bindOpCode, interface, version, name, interface->name, version, nullptr);\n");
- printf("#else\n");
- printf(" return (void *) wl_proxy_marshal_constructor((struct wl_proxy *) registry,\n");
- printf(" bindOpCode, interface, name, interface->name, version, nullptr);\n");
- printf("#endif\n");
+ printf(" bindOpCode, interface, version, name, interface->name, version, nullptr);\n");
printf("}\n");
printf("\n");