From 75b60471cf543a424f969d2536b04abee91af127 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 May 2018 17:46:08 -0300 Subject: [PATCH 1/3] Disable the -Wmissing-field-initializers warning for Clang too qwldatadevicemanager.cpp:277:1: warning: missing field 'finish' initializer [-Wmissing-field-initializers] Change-Id: I052407b777ec43f78378fffd15311263e7498287 Reviewed-by: Johan Helsing --- src/tools/qtwaylandscanner/qtwaylandscanner.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp index 057002c9dff..1b884a42467 100644 --- a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp +++ b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp @@ -394,6 +394,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr printf("QT_BEGIN_NAMESPACE\n"); printf("QT_WARNING_PUSH\n"); printf("QT_WARNING_DISABLE_GCC(\"-Wmissing-field-initializers\")\n"); + printf("QT_WARNING_DISABLE_CLANG(\"-Wmissing-field-initializers\")\n"); QByteArray serverExport; if (headerPath.size()) { serverExport = QByteArray("Q_WAYLAND_SERVER_") + preProcessorProtocolName + "_EXPORT"; From 72a5628a34359c57aaf99463d8abc31403a8c8d1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 22 May 2018 17:43:54 -0300 Subject: [PATCH 2/3] Suppress warning about MFD_CLOEXEC being redefined glibc 2.27 #defined it as just "1U" instead of the kernel "0x0001U". Same value, but because the tokens are different, this triggers a warning. Change-Id: I052407b777ec43f78378fffd153112449de8cf4f Reviewed-by: Johan Helsing --- src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp index cbfdf51576e..54b0b798c5e 100644 --- a/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp +++ b/src/plugins/platforms/wayland/qwaylandshmbackingstore.cpp @@ -59,7 +59,9 @@ #ifdef Q_OS_LINUX # include // from linux/memfd.h: -# define MFD_CLOEXEC 0x0001U +# ifndef MFD_CLOEXEC +# define MFD_CLOEXEC 0x0001U +# endif #endif QT_BEGIN_NAMESPACE From 52b2e5a34691fad03b97bd88fa9161d79588539e Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 2 May 2018 14:37:02 +0200 Subject: [PATCH 3/3] Client tests: Remove redundant cleanup testing We already have a QTRY_VERIFY(!compositor->surface()); in tst_WaylandClient::cleanup() which is already run after every test. The assertions from tests that are explicitly testing surface creation and destruction have not been removed. Change-Id: I21d574f5fe33d4e4c309dcfb2f50bde447238df2 Reviewed-by: Paul Olav Tvete --- tests/auto/wayland/client/tst_client.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/auto/wayland/client/tst_client.cpp b/tests/auto/wayland/client/tst_client.cpp index 05b8bac1afa..978a9d5e629 100644 --- a/tests/auto/wayland/client/tst_client.cpp +++ b/tests/auto/wayland/client/tst_client.cpp @@ -263,9 +263,6 @@ void tst_WaylandClient::windowScreens() compositor->sendRemoveOutput(secondOutput); QTRY_COMPARE(QGuiApplication::screens().size(), 1); QCOMPARE(window.screen(), primaryScreen); - - window.destroy(); - QTRY_VERIFY(!compositor->surface()); } void tst_WaylandClient::removePrimaryScreen() @@ -297,9 +294,6 @@ void tst_WaylandClient::removePrimaryScreen() QTRY_COMPARE(window.mousePressEventCount, 1); compositor->sendMouseRelease(surface); QTRY_COMPARE(window.mouseReleaseEventCount, 1); - - window.destroy(); - QTRY_VERIFY(!compositor->surface()); } void tst_WaylandClient::createDestroyWindow() @@ -516,8 +510,6 @@ void tst_WaylandClient::dontCrashOnMultipleCommits() } delete window; - - QTRY_VERIFY(!compositor->surface()); } void tst_WaylandClient::hiddenTransientParent()