diff options
38 files changed, 279 insertions, 710 deletions
diff --git a/.qmake.conf b/.qmake.conf index 2c01c5d2a..1a16230c8 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -4,4 +4,4 @@ DEFINES += QT_NO_FOREACH DEFINES += QT_NO_JAVA_STYLE_ITERATORS DEFINES += QT_NO_LINKED_LIST -MODULE_VERSION = 5.14.0 +MODULE_VERSION = 5.15.0 diff --git a/config.tests/dmabuf_client_buffer/dmabuf_client_buffer.pro b/config.tests/dmabuf_client_buffer/dmabuf_client_buffer.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/dmabuf_client_buffer/dmabuf_client_buffer.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/dmabuf_client_buffer/main.cpp b/config.tests/dmabuf_client_buffer/main.cpp deleted file mode 100644 index 71447dc8e..000000000 --- a/config.tests/dmabuf_client_buffer/main.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <EGL/egl.h> -#include <EGL/eglext.h> - -//If libdrm is available, the following files should exist -#include "drm_mode.h" -#include "drm_fourcc.h" - -int main() -{ -// test if DMA BUF is supported -#ifndef EGL_LINUX_DMA_BUF_EXT -#error DMA BUF Extension not available -#endif - -// test if DMA BUF import modifier extension is supported -#ifndef EGL_EXT_image_dma_buf_import_modifiers -#error DMA BUF Import modifier extension not available -#endif - - return 0; -} diff --git a/config.tests/dmabuf_server_buffer/dmabuf_server_buffer.pro b/config.tests/dmabuf_server_buffer/dmabuf_server_buffer.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/dmabuf_server_buffer/dmabuf_server_buffer.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/dmabuf_server_buffer/main.cpp b/config.tests/dmabuf_server_buffer/main.cpp deleted file mode 100644 index aa04d18fd..000000000 --- a/config.tests/dmabuf_server_buffer/main.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <drm_fourcc.h> - -int main() -{ -#ifdef EGL_LINUX_DMA_BUF_EXT - return 0; -#else -#error Requires EGL_LINUX_DMA_BUF_EXT - return 1; -#endif -} diff --git a/config.tests/drm_egl_server/drm_egl_server.pro b/config.tests/drm_egl_server/drm_egl_server.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/drm_egl_server/drm_egl_server.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/drm_egl_server/main.cpp b/config.tests/drm_egl_server/main.cpp deleted file mode 100644 index 0dbd42f90..000000000 --- a/config.tests/drm_egl_server/main.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <EGL/egl.h> -#include <EGL/eglext.h> - -int main() -{ -#ifdef EGL_MESA_drm_image - return 0; -#else -#error Requires EGL_MESA_drm_image to be defined - return 1; -#endif -} diff --git a/config.tests/glx/glx.pro b/config.tests/glx/glx.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/glx/glx.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/glx/main.cpp b/config.tests/glx/main.cpp deleted file mode 100644 index c902c55d7..000000000 --- a/config.tests/glx/main.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <GL/glx.h> - -int main(int argc, char **argv) -{ - Display *dpy = XOpenDisplay(0); - - int items = 0; - GLXFBConfig *fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), 0 , &items); - return 0; -} diff --git a/config.tests/libhybris_egl_server/libhybris_egl_server.pro b/config.tests/libhybris_egl_server/libhybris_egl_server.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/libhybris_egl_server/libhybris_egl_server.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/libhybris_egl_server/main.cpp b/config.tests/libhybris_egl_server/main.cpp deleted file mode 100644 index 368b57a12..000000000 --- a/config.tests/libhybris_egl_server/main.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Jolla Ltd, author: <giulio.camuffo@jollamobile.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <hybris/eglplatformcommon/hybris_nativebufferext.h> - -int main() -{ -#ifdef EGL_HYBRIS_native_buffer - return 0; -#else -#error Requires EGL_HYBRIS_native_buffer to be defined - return 1; -#endif -} diff --git a/config.tests/vulkan_server_buffer/main.cpp b/config.tests/vulkan_server_buffer/main.cpp deleted file mode 100644 index 5bd88d338..000000000 --- a/config.tests/vulkan_server_buffer/main.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <vulkan/vulkan.h> - -int main() -{ - VkExportMemoryAllocateInfoKHR exportAllocInfo = {}; - exportAllocInfo.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR; - exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR; - - return 0; -} diff --git a/config.tests/vulkan_server_buffer/vulkan_server_buffer.pro b/config.tests/vulkan_server_buffer/vulkan_server_buffer.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/vulkan_server_buffer/vulkan_server_buffer.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/wayland/main.cpp b/config.tests/wayland/main.cpp deleted file mode 100644 index 8cab379bf..000000000 --- a/config.tests/wayland/main.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <wayland-version.h> - -int main() -{ -#if WAYLAND_VERSION_MAJOR < 1 -# error Wayland 1.8.0 or higher required -#endif -#if WAYLAND_VERSION_MAJOR == 1 -# if WAYLAND_VERSION_MINOR < 8 -# error Wayland 1.8.0 or higher required -# endif -# if WAYLAND_VERSION_MINOR == 8 -# if WAYLAND_VERSION_MICRO < 0 -# error Wayland 1.8.0 or higher required -# endif -# endif -#endif - return 0; -} diff --git a/config.tests/wayland/wayland.pro b/config.tests/wayland/wayland.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/wayland/wayland.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/wayland_cursor/main.cpp b/config.tests/wayland_cursor/main.cpp deleted file mode 100644 index c9cf66196..000000000 --- a/config.tests/wayland_cursor/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <wayland-cursor.h> - -int main() -{ - struct wl_cursor_image *image = 0; - - return 0; -} diff --git a/config.tests/wayland_cursor/wayland_cursor.pro b/config.tests/wayland_cursor/wayland_cursor.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/wayland_cursor/wayland_cursor.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/wayland_egl/main.cpp b/config.tests/wayland_egl/main.cpp deleted file mode 100644 index c50056469..000000000 --- a/config.tests/wayland_egl/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <wayland-egl.h> - -int main() -{ - struct wl_egl_window *window = wl_egl_window_create(0,100,100); - - return 0; -} diff --git a/config.tests/wayland_egl/wayland_egl.pro b/config.tests/wayland_egl/wayland_egl.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/wayland_egl/wayland_egl.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/config.tests/xcomposite/main.cpp b/config.tests/xcomposite/main.cpp deleted file mode 100644 index 1867b204e..000000000 --- a/config.tests/xcomposite/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Compositor. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <X11/extensions/Xcomposite.h> - -int main (int argc, char **argv) -{ - XCompositeRedirectWindow((Display *)0,(Window) 0,CompositeRedirectManual); - - return 0; -} diff --git a/config.tests/xcomposite/xcomposite.pro b/config.tests/xcomposite/xcomposite.pro deleted file mode 100644 index 28dcadcbf..000000000 --- a/config.tests/xcomposite/xcomposite.pro +++ /dev/null @@ -1 +0,0 @@ -SOURCES += main.cpp diff --git a/src/client/configure.json b/src/client/configure.json index e9e16324b..f49beaf70 100644 --- a/src/client/configure.json +++ b/src/client/configure.json @@ -9,7 +9,24 @@ "libraries": { "wayland-client": { "label": "Wayland client library", - "test": "wayland", + "headers": "wayland-version.h", + "test": { + "main": [ + "#if WAYLAND_VERSION_MAJOR < 1", + "# error Wayland 1.8.0 or higher required", + "#endif", + "#if WAYLAND_VERSION_MAJOR == 1", + "# if WAYLAND_VERSION_MINOR < 8", + "# error Wayland 1.8.0 or higher required", + "# endif", + "# if WAYLAND_VERSION_MINOR == 8", + "# if WAYLAND_VERSION_MICRO < 0", + "# error Wayland 1.8.0 or higher required", + "# endif", + "# endif", + "#endif" + ] + }, "sources": [ { "type": "pkgConfig", "args": "wayland-client" }, "-lwayland-client" @@ -17,7 +34,10 @@ }, "wayland-cursor": { "label": "Wayland cursor library", - "test": "wayland_cursor", + "headers": "wayland-cursor.h", + "test": { + "main": "struct wl_cursor_image *image = 0;" + }, "use": "wayland-client", "sources": [ { "type": "pkgConfig", "args": "wayland-cursor" }, @@ -26,7 +46,10 @@ }, "wayland-egl": { "label": "Wayland EGL library", - "test": "wayland_egl", + "headers": "wayland-egl.h", + "test": { + "main": "struct wl_egl_window *window = wl_egl_window_create(0, 100, 100);" + }, "sources": [ { "type": "pkgConfig", "args": "wayland-egl" }, "-lwayland-egl", @@ -35,7 +58,11 @@ }, "xcomposite": { "label": "XComposite", - "test": "xcomposite", + "headers": "X11/extensions/Xcomposite.h", + "test": { + "main": "XCompositeRedirectWindow((Display *)0,(Window) 0, CompositeRedirectManual);" + + }, "sources": [ { "type": "pkgConfig", "args": "xcomposite" }, "-lxcomposite" @@ -43,7 +70,14 @@ }, "glx": { "label": "GLX", - "test": "glx", + "headers": "GL/glx.h", + "test": { + "main": [ + "Display *dpy = XOpenDisplay(0);", + "int items = 0;", + "GLXFBConfig *fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), 0 , &items);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "x11 gl" }, "-lX11 -lGl" @@ -61,25 +95,76 @@ "drm-egl-server": { "label": "DRM EGL Server", "type": "compile", - "test": "drm_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h" + ], + "main": [ + "#ifdef EGL_MESA_drm_image", + "return 0;", + "#else", + "#error Requires EGL_MESA_drm_image to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "libhybris-egl-server": { "label": "libhybris EGL Server", "type": "compile", - "test": "libhybris_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "hybris/eglplatformcommon/hybris_nativebufferext.h" + ], + "main": [ + "#ifdef EGL_HYBRIS_native_buffer", + "return 0;", + "#else", + "#error Requires EGL_HYBRIS_native_buffer to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "dmabuf-server-buffer": { "label": "Linux dma-buf Buffer Sharing", "type": "compile", - "test": "dmabuf_server_buffer", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "drm_fourcc.h" + ], + "main": [ + "#ifdef EGL_LINUX_DMA_BUF_EXT", + "return 0;", + "#else", + "#error Requires EGL_LINUX_DMA_BUF_EXT", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "vulkan-server-buffer": { "label": "Vulkan Buffer Sharing", "type": "compile", - "test": "vulkan_server_buffer" + "test": { + "include": [ + "vulkan/vulkan.h" + ], + "main": [ + "VkExportMemoryAllocateInfoKHR exportAllocInfo = {};", + "exportAllocInfo.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR;", + "exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;", + "return 0;" + ] + } } }, diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index f6a80e18f..ce72c3340 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -86,7 +86,7 @@ #include "qwaylandinputdeviceintegration_p.h" #include "qwaylandinputdeviceintegrationfactory_p.h" -#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE +#if QT_CONFIG(accessibility_atspi_bridge) #include <QtLinuxAccessibilitySupport/private/bridge_p.h> #endif @@ -98,38 +98,6 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { -class GenericWaylandTheme: public QGenericUnixTheme -{ -public: - static QStringList themeNames() - { - QStringList result; - - if (QGuiApplication::desktopSettingsAware()) { - const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment(); - - if (desktopEnvironment == QByteArrayLiteral("KDE")) { -#if QT_CONFIG(settings) - result.push_back(QStringLiteral("kde")); -#endif - } else if (!desktopEnvironment.isEmpty() && - desktopEnvironment != QByteArrayLiteral("UNKNOWN") && - desktopEnvironment != QByteArrayLiteral("GNOME") && - desktopEnvironment != QByteArrayLiteral("UNITY") && - desktopEnvironment != QByteArrayLiteral("MATE") && - desktopEnvironment != QByteArrayLiteral("XFCE") && - desktopEnvironment != QByteArrayLiteral("LXDE")) - // Ignore X11 desktop environments - result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower())); - } - - if (result.isEmpty()) - result.push_back(QLatin1String(QGenericUnixTheme::name)); - - return result; - } -}; - QWaylandIntegration::QWaylandIntegration() #if defined(Q_OS_MACOS) : mFontDb(new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>) @@ -271,7 +239,7 @@ QVariant QWaylandIntegration::styleHint(StyleHint hint) const QPlatformAccessibility *QWaylandIntegration::accessibility() const { if (!mAccessibility) { -#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE +#if QT_CONFIG(accessibility_atspi_bridge) Q_ASSERT_X(QCoreApplication::eventDispatcher(), "QWaylandIntegration", "Initializing accessibility without event-dispatcher!"); mAccessibility.reset(new QSpiAccessibleBridge()); @@ -302,12 +270,12 @@ QList<int> QWaylandIntegration::possibleKeys(const QKeyEvent *event) const QStringList QWaylandIntegration::themeNames() const { - return GenericWaylandTheme::themeNames(); + return QGenericUnixTheme::themeNames(); } QPlatformTheme *QWaylandIntegration::createPlatformTheme(const QString &name) const { - return GenericWaylandTheme::createUnixTheme(name); + return QGenericUnixTheme::createUnixTheme(name); } // May be called from non-GUI threads diff --git a/src/compositor/configure.json b/src/compositor/configure.json index 46caceff5..2af92ea67 100644 --- a/src/compositor/configure.json +++ b/src/compositor/configure.json @@ -9,14 +9,34 @@ "libraries": { "wayland-server": { "label": "wayland-server", - "test": "wayland", + "headers": "wayland-version.h", + "test": { + "main": [ + "#if WAYLAND_VERSION_MAJOR < 1", + "# error Wayland 1.8.0 or higher required", + "#endif", + "#if WAYLAND_VERSION_MAJOR == 1", + "# if WAYLAND_VERSION_MINOR < 8", + "# error Wayland 1.8.0 or higher required", + "# endif", + "# if WAYLAND_VERSION_MINOR == 8", + "# if WAYLAND_VERSION_MICRO < 0", + "# error Wayland 1.8.0 or higher required", + "# endif", + "# endif", + "#endif" + ] + }, "sources": [ { "type": "pkgConfig", "args": "wayland-server" }, "-lwayland-server" ] }, "wayland-egl": { - "test": "wayland_egl", + "headers": "wayland-egl.h", + "test": { + "main": "struct wl_egl_window *window = wl_egl_window_create(0, 100, 100);" + }, "sources": [ { "type": "pkgConfig", "args": "wayland-egl" }, "-lwayland-egl", @@ -45,14 +65,24 @@ ] }, "xcomposite": { - "test": "xcomposite", + "headers": "X11/extensions/Xcomposite.h", + "test": { + "main": "XCompositeRedirectWindow((Display *)0,(Window) 0, CompositeRedirectManual);" + }, "sources": [ { "type": "pkgConfig", "args": "xcomposite" }, "-lxcomposite" ] }, "glx": { - "test": "glx", + "headers": "GL/glx.h", + "test": { + "main": [ + "Display *dpy = XOpenDisplay(0);", + "int items = 0;", + "GLXFBConfig *fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), 0 , &items);" + ] + }, "sources": [ { "type": "pkgConfig", "args": "x11 gl" }, "-lX11 -lGl" @@ -68,30 +98,99 @@ }, "drm-egl-server": { "type": "compile", - "test": "drm_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h" + ], + "main": [ + "#ifdef EGL_MESA_drm_image", + "return 0;", + "#else", + "#error Requires EGL_MESA_drm_image to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "libhybris-egl-server": { "type": "compile", - "test": "libhybris_egl_server", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "hybris/eglplatformcommon/hybris_nativebufferext.h" + ], + "main": [ + "#ifdef EGL_HYBRIS_native_buffer", + "return 0;", + "#else", + "#error Requires EGL_HYBRIS_native_buffer to be defined", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "dmabuf-server-buffer": { "label": "Linux dma-buf Buffer Sharing", "type": "compile", - "test": "dmabuf_server_buffer", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "drm_fourcc.h" + ], + "main": [ + "#ifdef EGL_LINUX_DMA_BUF_EXT", + "return 0;", + "#else", + "#error Requires EGL_LINUX_DMA_BUF_EXT", + "return 1;", + "#endif" + ] + }, "use": "egl" }, "dmabuf-client-buffer": { "label": "Linux Client dma-buf Buffer Sharing", "type": "compile", - "test": "dmabuf_client_buffer", + "test": { + "include": [ + "EGL/egl.h", + "EGL/eglext.h", + "drm_mode.h", + "drm_fourcc.h" + ], + "main": [ + "// test if DMA BUF is supported", + "#ifndef EGL_LINUX_DMA_BUF_EXT", + "#error DMA BUF Extension not available", + "#endif", + "// test if DMA BUF import modifier extension is supported", + "#ifndef EGL_EXT_image_dma_buf_import_modifiers", + "#error DMA BUF Import modifier extension not available", + "#endif", + "return 0;" + ] + }, "use": "egl" }, "vulkan-server-buffer": { "label": "Vulkan Buffer Sharing", "type": "compile", - "test": "vulkan_server_buffer" + "test": { + "include": [ + "vulkan/vulkan.h" + ], + "main": [ + "VkExportMemoryAllocateInfoKHR exportAllocInfo = {};", + "exportAllocInfo.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR;", + "exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;", + "return 0;" + ] + } } }, diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro b/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro index 53f7af8aa..c89ecec00 100644 --- a/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro +++ b/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro @@ -5,6 +5,8 @@ OTHER_FILES += brcm-egl.json SOURCES += \ main.cpp +TARGET = qt-wayland-compositor-brcm-egl + include(../../../../hardwareintegration/compositor/brcm-egl/brcm-egl.pri) PLUGIN_TYPE = wayland-graphics-integration-server diff --git a/src/plugins/hardwareintegration/compositor/dmabuf-server/dmabuf-server.pro b/src/plugins/hardwareintegration/compositor/dmabuf-server/dmabuf-server.pro index 1601a384c..d96e58135 100644 --- a/src/plugins/hardwareintegration/compositor/dmabuf-server/dmabuf-server.pro +++ b/src/plugins/hardwareintegration/compositor/dmabuf-server/dmabuf-server.pro @@ -5,7 +5,9 @@ OTHER_FILES += dmabuf-server.json SOURCES += \ main.cpp -include($PWD/../../../../../hardwareintegration/compositor/dmabuf-server/dmabuf-server.pri) +TARGET = qt-wayland-compositor-dmabuf-server-buffer + +include(../../../../hardwareintegration/compositor/dmabuf-server/dmabuf-server.pri) PLUGIN_TYPE = wayland-graphics-integration-server PLUGIN_CLASS_NAME = DmaBufServerBufferIntegrationPlugin diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro b/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro index 040031122..2ba17c388 100644 --- a/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro +++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro @@ -5,7 +5,9 @@ OTHER_FILES += drm-egl-server.json SOURCES += \ main.cpp -include($PWD/../../../../../hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri) +TARGET = qt-wayland-compositor-drm-egl-server-buffer + +include(../../../../hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri) PLUGIN_TYPE = wayland-graphics-integration-server PLUGIN_CLASS_NAME = DrmEglServerBufferIntegrationPlugin diff --git a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro index ff16b20bf..c18884a96 100644 --- a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro +++ b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro @@ -7,7 +7,9 @@ OTHER_FILES += vsp2.json SOURCES += \ main.cpp -include($PWD/../../../../../../hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri) +TARGET = qt-wayland-compositor-vsp2 + +include(../../../../../hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri) PLUGIN_TYPE = wayland-hardware-layer-integration PLUGIN_CLASS_NAME = Vsp2HardwareLayerIntegrationPlugin diff --git a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro index 9e28c7e8c..c9c3a0daf 100644 --- a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro +++ b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro @@ -5,7 +5,9 @@ OTHER_FILES += libhybris-egl-server.json SOURCES += \ main.cpp -include($PWD/../../../../../hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri) +TARGET = qt-wayland-compositor-libybris-egl-server.json + +include(../../../../hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri) PLUGIN_TYPE = wayland-graphics-integration-server PLUGIN_CLASS_NAME = LibHybrisEglServerBufferIntegrationPlugin diff --git a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro index bc4311423..1f76f9f00 100644 --- a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro +++ b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pro @@ -5,6 +5,8 @@ OTHER_FILES += linux-dmabuf.json SOURCES += \ main.cpp \ +TARGET = qt-wayland-compositor-linux-dmabuf-unstable-v1 + include(../../../../hardwareintegration/compositor/linux-dmabuf-unstable-v1/linux-dmabuf-unstable-v1.pri) PLUGIN_TYPE = wayland-graphics-integration-server diff --git a/src/plugins/hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.pro b/src/plugins/hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.pro index 56a1bac21..865af1a7d 100644 --- a/src/plugins/hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.pro +++ b/src/plugins/hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.pro @@ -5,7 +5,9 @@ OTHER_FILES += shm-emulation-server.json SOURCES += \ main.cpp -include($PWD/../../../../../hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.pri) +TARGET = qt-wayland-compositor-shm-emulation-server + +include(../../../../hardwareintegration/compositor/shm-emulation-server/shm-emulation-server.pri) PLUGIN_TYPE = wayland-graphics-integration-server PLUGIN_CLASS_NAME = ShmServerBufferIntegrationPlugin diff --git a/src/plugins/hardwareintegration/compositor/vulkan-server/vulkan-server.pro b/src/plugins/hardwareintegration/compositor/vulkan-server/vulkan-server.pro index 053654218..dc82c3f26 100644 --- a/src/plugins/hardwareintegration/compositor/vulkan-server/vulkan-server.pro +++ b/src/plugins/hardwareintegration/compositor/vulkan-server/vulkan-server.pro @@ -5,7 +5,9 @@ OTHER_FILES += vulkan-server.json SOURCES += \ main.cpp -include($PWD/../../../../../hardwareintegration/compositor/vulkan-server/vulkan-server.pri) +TARGET = qt-wayland-compositor-vulkan-server + +include(../../../../hardwareintegration/compositor/vulkan-server/vulkan-server.pri) PLUGIN_TYPE = wayland-graphics-integration-server PLUGIN_CLASS_NAME = VulkanServerBufferIntegrationPlugin diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro b/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro index 6aecefffd..d452220c5 100644 --- a/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro +++ b/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro @@ -5,7 +5,7 @@ OTHER_FILES += wayland-egl.json SOURCES += \ main.cpp -TARGET = qt-plugin-wayland-egl +TARGET = qt-wayland-compositor-wayland-egl include(../../../../hardwareintegration/compositor/wayland-egl/wayland-egl.pri) diff --git a/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/wayland-eglstream-controller.pro b/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/wayland-eglstream-controller.pro index f1ca7183a..6d259a687 100644 --- a/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/wayland-eglstream-controller.pro +++ b/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/wayland-eglstream-controller.pro @@ -5,6 +5,8 @@ OTHER_FILES += wayland-eglstream-controller.json SOURCES += \ main.cpp \ +TARGET = qt-wayland-compositor-wayland-eglstream-controller + include(../../../../hardwareintegration/compositor/wayland-eglstream-controller/wayland-eglstream-controller.pri) PLUGIN_TYPE = wayland-graphics-integration-server diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro b/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro index 7c391bd1c..298ed2fc6 100644 --- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro +++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro @@ -5,6 +5,8 @@ OTHER_FILES += xcomposite-egl.json SOURCES += \ main.cpp +TARGET = qt-wayland-compositor-xcomposite-egl + include(../../../../hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri) PLUGIN_TYPE = wayland-graphics-integration-server diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro b/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro index 0f49471da..41e5c2ec5 100644 --- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro +++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro @@ -5,6 +5,8 @@ OTHER_FILES += xcomposite-glx.json SOURCES += \ main.cpp +TARGET = qt-wayland-compositor-xcomposite-glx + include(../../../../hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri) PLUGIN_TYPE = wayland-graphics-integration-server diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp index 9691b857f..24977a2f2 100644 --- a/src/qtwaylandscanner/qtwaylandscanner.cpp +++ b/src/qtwaylandscanner/qtwaylandscanner.cpp @@ -92,7 +92,7 @@ private: }; bool isServerSide(); - bool parseOption(const char *str); + bool parseOption(const QByteArray &str); QByteArray byteArrayValue(const QXmlStreamReader &xml, const char *name); int intValue(const QXmlStreamReader &xml, const char *name, int defaultValue = 0); @@ -123,29 +123,55 @@ private: QByteArray m_scannerName; QByteArray m_headerPath; QByteArray m_prefix; + QVector <QByteArray> m_includes; QXmlStreamReader *m_xml = nullptr; }; bool Scanner::parseArguments(int argc, char **argv) { - m_scannerName = argv[0]; + QVector<QByteArray> args; + args.reserve(argc); + for (int i = 0; i < argc; ++i) + args << QByteArray(argv[i]); - if (argc <= 2 || !parseOption(argv[1])) + m_scannerName = args[0]; + + if (argc <= 2 || !parseOption(args[1])) return false; - m_protocolFilePath = QByteArray(argv[2]); + m_protocolFilePath = args[2]; - if (argc >= 4) - m_headerPath = QByteArray(argv[3]); - if (argc == 5) - m_prefix = QByteArray(argv[4]); + if (argc > 3 && !args[3].startsWith('-')) { + // legacy positional arguments + m_headerPath = args[3]; + if (argc == 5) + m_prefix = args[4]; + } else { + // --header-path=<path> (14 characters) + // --prefix=<prefix> (9 characters) + // --add-include=<include> (14 characters) + for (int pos = 3; pos < argc; pos++) { + const QByteArray &option = args[pos]; + if (option.startsWith("--header-path=")) { + m_headerPath = option.mid(14); + } else if (option.startsWith("--prefix=")) { + m_prefix = option.mid(10); + } else if (option.startsWith("--add-include=")) { + auto include = option.mid(14); + if (!include.isEmpty()) + m_includes << include; + } else { + return false; + } + } + } return true; } void Scanner::printUsage() { - fprintf(stderr, "Usage: %s [client-header|server-header|client-code|server-code] specfile [header-path] [prefix]\n", m_scannerName.constData()); + fprintf(stderr, "Usage: %s [client-header|server-header|client-code|server-code] specfile [--header-path=<path>] [--prefix=<prefix>] [--add-include=<include>]\n", m_scannerName.constData()); } bool Scanner::isServerSide() @@ -153,15 +179,15 @@ bool Scanner::isServerSide() return m_option == ServerHeader || m_option == ServerCode; } -bool Scanner::parseOption(const char *str) +bool Scanner::parseOption(const QByteArray &str) { - if (str == QLatin1String("client-header")) + if (str == "client-header") m_option = ClientHeader; - else if (str == QLatin1String("server-header")) + else if (str == "server-header") m_option = ServerHeader; - else if (str == QLatin1String("client-code")) + else if (str == "client-code") m_option = ClientCode; - else if (str == QLatin1String("server-code")) + else if (str == "server-code") m_option = ServerCode; else return false; @@ -441,6 +467,9 @@ bool Scanner::process() if (m_xml->hasError()) return false; + for (auto b : qAsConst(m_includes)) + printf("#include %s\n", b.constData()); + if (m_option == ServerHeader) { QByteArray inclusionGuard = QByteArray("QT_WAYLAND_SERVER_") + preProcessorProtocolName.constData(); printf("#ifndef %s\n", inclusionGuard.constData()); diff --git a/tests/auto/client/inputcontext/tst_inputcontext.cpp b/tests/auto/client/inputcontext/tst_inputcontext.cpp index b1a5a7f17..7c0132e35 100644 --- a/tests/auto/client/inputcontext/tst_inputcontext.cpp +++ b/tests/auto/client/inputcontext/tst_inputcontext.cpp @@ -58,8 +58,6 @@ private: QByteArray mComposeModule = QByteArray("QComposeInputContext"); // default input context QByteArray mIbusModule = QByteArray("QIBusPlatformInputContext"); QByteArray mWaylandModule = QByteArray("QtWaylandClient::QWaylandInputContext"); - - TextInputManager *mTextInputManager = nullptr; }; void tst_inputcontext::initTestCase() |