Fix build with newer QtWaylandScanner

Because of a shortcoming in upstream qtwaylandscanner and the cmake
macro we defered to the ecm macro which renames the output files
acoording to what qtwaylandscanner expects. However since this
was corrected in newer Qt this doesn't build anymore since
the tool now expects correctly named files.
wilder/Plasma/6.2
David Redondo 2 years ago committed by Vlad Zahorodnii
parent d9ee6d98ae
commit 9a74d70ba4
  1. 19
      autotests/integration/CMakeLists.txt
  2. 6
      autotests/integration/kwin_wayland_test.h

@ -25,12 +25,19 @@ qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework
${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml
)
# the qtwaylandscanner macro cannot handle the mismatched file name and <protocol name=""
find_package(QtWaylandScanner REQUIRED)
ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
BASENAME dialog-v1
)
if (Qt6_VERSION VERSION_LESS "6.7.1")
# the qtwaylandscanner macro cannot handle the mismatched file name and <protocol name=""
find_package(QtWaylandScanner REQUIRED)
ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
BASENAME dialog-v1
)
else()
qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework
FILES
${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
)
endif()
target_sources(KWinIntegrationTestFramework PRIVATE
generic_scene_opengl_test.cpp

@ -21,7 +21,6 @@
#include <optional>
#include "qwayland-cursor-shape-v1.h"
#include "qwayland-dialog-v1.h"
#include "qwayland-fake-input.h"
#include "qwayland-fractional-scale-v1.h"
#include "qwayland-idle-inhibit-unstable-v1.h"
@ -35,6 +34,11 @@
#include "qwayland-xdg-decoration-unstable-v1.h"
#include "qwayland-xdg-shell.h"
#include "qwayland-zkde-screencast-unstable-v1.h"
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 1)
#include "qwayland-dialog-v1.h"
#else
#include "qwayland-xdg-dialog-v1.h"
#endif
namespace KWayland
{

Loading…
Cancel
Save