diff options
Diffstat (limited to 'tests/auto/compositor')
21 files changed, 123 insertions, 565 deletions
diff --git a/tests/auto/compositor/CMakeLists.txt b/tests/auto/compositor/CMakeLists.txt index a55266517..3a6dfedb3 100644 --- a/tests/auto/compositor/CMakeLists.txt +++ b/tests/auto/compositor/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from compositor.pro. add_subdirectory(compositor) diff --git a/tests/auto/compositor/compositor.pro b/tests/auto/compositor/compositor.pro deleted file mode 100644 index 6bf2aef6c..000000000 --- a/tests/auto/compositor/compositor.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE=subdirs - -SUBDIRS += compositor diff --git a/tests/auto/compositor/compositor/CMakeLists.txt b/tests/auto/compositor/compositor/CMakeLists.txt index 4dce9b0f9..5cb18b2aa 100644 --- a/tests/auto/compositor/compositor/CMakeLists.txt +++ b/tests/auto/compositor/compositor/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # Generated from compositor.pro. ##################################################################### @@ -15,7 +18,7 @@ qt_internal_add_test(tst_compositor testkeyboardgrabber.cpp testkeyboardgrabber.h testseat.cpp testseat.h tst_compositor.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::CorePrivate Qt::Gui Qt::GuiPrivate @@ -39,6 +42,6 @@ qt6_generate_wayland_protocol_client_sources(tst_compositor ##################################################################### qt_internal_extend_target(tst_compositor CONDITION QT_FEATURE_xkbcommon - PUBLIC_LIBRARIES + LIBRARIES XKB::XKB ) diff --git a/tests/auto/compositor/compositor/compositor.pro b/tests/auto/compositor/compositor/compositor.pro deleted file mode 100644 index 270016597..000000000 --- a/tests/auto/compositor/compositor/compositor.pro +++ /dev/null @@ -1,40 +0,0 @@ -CONFIG += testcase link_pkgconfig -CONFIG += wayland-scanner -TARGET = tst_compositor - -QT += testlib -QT += core-private gui-private waylandcompositor waylandcompositor-private - -QMAKE_USE += wayland-client wayland-server - -qtConfig(xkbcommon): \ - QMAKE_USE += xkbcommon - -WAYLANDCLIENTSOURCES += \ - ../../../../src/3rdparty/protocol/ivi-application.xml \ - ../../../../src/3rdparty/protocol/wayland.xml \ - ../../../../src/3rdparty/protocol/xdg-shell.xml \ - ../../../../src/3rdparty/protocol/viewporter.xml \ - ../../../../src/3rdparty/protocol/idle-inhibit-unstable-v1.xml \ - ../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml - -SOURCES += \ - tst_compositor.cpp \ - testcompositor.cpp \ - testkeyboardgrabber.cpp \ - mockclient.cpp \ - mockseat.cpp \ - testseat.cpp \ - mockkeyboard.cpp \ - mockpointer.cpp \ - mockxdgoutputv1.cpp - -HEADERS += \ - testcompositor.h \ - testkeyboardgrabber.h \ - mockclient.h \ - mockseat.h \ - testseat.h \ - mockkeyboard.h \ - mockpointer.h \ - mockxdgoutputv1.h diff --git a/tests/auto/compositor/compositor/mockclient.cpp b/tests/auto/compositor/compositor/mockclient.cpp index 53e10d687..6465f9931 100644 --- a/tests/auto/compositor/compositor/mockclient.cpp +++ b/tests/auto/compositor/compositor/mockclient.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "mockclient.h" #include "mockseat.h" @@ -76,7 +51,9 @@ const wl_output_listener MockClient::outputListener = { MockClient::outputGeometryEvent, MockClient::outputModeEvent, MockClient::outputDone, - MockClient::outputScale + MockClient::outputScale, + MockClient::outputName, + MockClient::outputDesc }; MockClient::~MockClient() @@ -123,6 +100,16 @@ void MockClient::outputScale(void *, wl_output *, int) } +void MockClient::outputName(void *, wl_output *, const char *) +{ + +} + +void MockClient::outputDesc(void *, wl_output *, const char *) +{ + +} + void MockClient::readEvents() { if (error) diff --git a/tests/auto/compositor/compositor/mockclient.h b/tests/auto/compositor/compositor/mockclient.h index 89d0a0b3f..2f6d9046e 100644 --- a/tests/auto/compositor/compositor/mockclient.h +++ b/tests/auto/compositor/compositor/mockclient.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "wayland-wayland-client-protocol.h" #include <qwayland-xdg-shell.h> @@ -128,6 +103,8 @@ private: int refreshRate); static void outputDone(void *data, wl_output *output); static void outputScale(void *data, wl_output *output, int factor); + static void outputName(void *data, wl_output *output, const char *name); + static void outputDesc(void *data, wl_output *output, const char *desc); void handleGlobal(uint32_t id, const QByteArray &interface); void handleGlobalRemove(uint32_t id); diff --git a/tests/auto/compositor/compositor/mockkeyboard.cpp b/tests/auto/compositor/compositor/mockkeyboard.cpp index e5f5f8d36..b3055ffa9 100644 --- a/tests/auto/compositor/compositor/mockkeyboard.cpp +++ b/tests/auto/compositor/compositor/mockkeyboard.cpp @@ -1,33 +1,11 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "mockkeyboard.h" +QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers") +QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers") + void keyboardKeymap(void *keyboard, struct wl_keyboard *wl_keyboard, uint32_t format, int32_t fd, uint32_t size) { Q_UNUSED(keyboard); diff --git a/tests/auto/compositor/compositor/mockkeyboard.h b/tests/auto/compositor/compositor/mockkeyboard.h index fd7f06aee..093586bb3 100644 --- a/tests/auto/compositor/compositor/mockkeyboard.h +++ b/tests/auto/compositor/compositor/mockkeyboard.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2018 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MOCKKEYBOARD_H #define MOCKKEYBOARD_H diff --git a/tests/auto/compositor/compositor/mockpointer.cpp b/tests/auto/compositor/compositor/mockpointer.cpp index 6c51d8bd1..65a8b9ce7 100644 --- a/tests/auto/compositor/compositor/mockpointer.cpp +++ b/tests/auto/compositor/compositor/mockpointer.cpp @@ -1,33 +1,11 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "mockpointer.h" +QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers") +QT_WARNING_DISABLE_CLANG("-Wmissing-field-initializers") + static void pointerEnter(void *pointer, struct wl_pointer *wlPointer, uint serial, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y) { Q_UNUSED(wlPointer); diff --git a/tests/auto/compositor/compositor/mockpointer.h b/tests/auto/compositor/compositor/mockpointer.h index db6b2b69c..db5c6a0af 100644 --- a/tests/auto/compositor/compositor/mockpointer.h +++ b/tests/auto/compositor/compositor/mockpointer.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MOCKPOINTER_H #define MOCKPOINTER_H diff --git a/tests/auto/compositor/compositor/mockseat.cpp b/tests/auto/compositor/compositor/mockseat.cpp index ce873c129..88b1c94e4 100644 --- a/tests/auto/compositor/compositor/mockseat.cpp +++ b/tests/auto/compositor/compositor/mockseat.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 LG Electronics Ltd., author: <mikko.levonmaa@lge.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 LG Electronics Ltd., author: <mikko.levonmaa@lge.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "mockseat.h" diff --git a/tests/auto/compositor/compositor/mockseat.h b/tests/auto/compositor/compositor/mockseat.h index 0d0f4074c..12a14c727 100644 --- a/tests/auto/compositor/compositor/mockseat.h +++ b/tests/auto/compositor/compositor/mockseat.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 LG Electronics Ltd., author: <mikko.levonmaa@lge.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 LG Electronics Ltd., author: <mikko.levonmaa@lge.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MOCKSEAT #define MOCKSEAT diff --git a/tests/auto/compositor/compositor/mockxdgoutputv1.cpp b/tests/auto/compositor/compositor/mockxdgoutputv1.cpp index eebc55bbb..9349e62d6 100644 --- a/tests/auto/compositor/compositor/mockxdgoutputv1.cpp +++ b/tests/auto/compositor/compositor/mockxdgoutputv1.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "mockxdgoutputv1.h" diff --git a/tests/auto/compositor/compositor/mockxdgoutputv1.h b/tests/auto/compositor/compositor/mockxdgoutputv1.h index db5820698..4e3a05c91 100644 --- a/tests/auto/compositor/compositor/mockxdgoutputv1.h +++ b/tests/auto/compositor/compositor/mockxdgoutputv1.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MOCKXDGOUTPUTV1_H #define MOCKXDGOUTPUTV1_H diff --git a/tests/auto/compositor/compositor/testcompositor.cpp b/tests/auto/compositor/compositor/testcompositor.cpp index d5967a416..d2f454a93 100644 --- a/tests/auto/compositor/compositor/testcompositor.cpp +++ b/tests/auto/compositor/compositor/testcompositor.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "testcompositor.h" #include "testseat.h" diff --git a/tests/auto/compositor/compositor/testcompositor.h b/tests/auto/compositor/compositor/testcompositor.h index 7829f1a65..0e11def13 100644 --- a/tests/auto/compositor/compositor/testcompositor.h +++ b/tests/auto/compositor/compositor/testcompositor.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "qwaylandcompositor.h" #include "qwaylandsurface.h" diff --git a/tests/auto/compositor/compositor/testkeyboardgrabber.cpp b/tests/auto/compositor/compositor/testkeyboardgrabber.cpp index a3aa42ac2..73592dd4f 100644 --- a/tests/auto/compositor/compositor/testkeyboardgrabber.cpp +++ b/tests/auto/compositor/compositor/testkeyboardgrabber.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "testkeyboardgrabber.h" diff --git a/tests/auto/compositor/compositor/testkeyboardgrabber.h b/tests/auto/compositor/compositor/testkeyboardgrabber.h index 7f0f2c86c..2e2f44df4 100644 --- a/tests/auto/compositor/compositor/testkeyboardgrabber.h +++ b/tests/auto/compositor/compositor/testkeyboardgrabber.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "qwaylandkeyboard.h" diff --git a/tests/auto/compositor/compositor/testseat.cpp b/tests/auto/compositor/compositor/testseat.cpp index 38227872b..21e2bffe5 100644 --- a/tests/auto/compositor/compositor/testseat.cpp +++ b/tests/auto/compositor/compositor/testseat.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "testseat.h" #include <QMouseEvent> @@ -49,7 +24,8 @@ bool TestSeat::isOwner(QInputEvent *event) const QList<QMouseEvent *> TestSeat::createMouseEvents(int count) { for (int i = 0; i < count; i++) { - m_events.append(new QMouseEvent(QEvent::MouseMove, QPointF(10 + i, 10 + i), Qt::NoButton, Qt::NoButton, Qt::NoModifier)); + m_events.append(new QMouseEvent(QEvent::MouseMove, QPointF(10 + i, 10 + i), + QPointF(10 + i, 10 + i), Qt::NoButton, Qt::NoButton, Qt::NoModifier)); } return m_events; } diff --git a/tests/auto/compositor/compositor/testseat.h b/tests/auto/compositor/compositor/testseat.h index f4449f144..a71abc122 100644 --- a/tests/auto/compositor/compositor/testseat.h +++ b/tests/auto/compositor/compositor/testseat.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 LG Electronics, Inc., author: <mikko.levonmaa@lge.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QWaylandSeat> #include <QList> diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp index 902f420de..c3c0c35fb 100644 --- a/tests/auto/compositor/compositor/tst_compositor.cpp +++ b/tests/auto/compositor/compositor/tst_compositor.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "mockclient.h" #include "mockseat.h" @@ -337,14 +312,14 @@ void tst_WaylandCompositor::keyboardGrab() //QSignalSpy grabModifierSpy(grab, SIGNAL(modifiersCalled())); seat->setKeyboardFocus(waylandSurface); - QTRY_COMPARE(grabFocusSpy.count(), 1); + QTRY_COMPARE(grabFocusSpy.size(), 1); QKeyEvent ke(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier, 30, 0, 0); QKeyEvent ke1(QEvent::KeyRelease, Qt::Key_A, Qt::NoModifier, 30, 0, 0); seat->sendFullKeyEvent(&ke); seat->sendFullKeyEvent(&ke1); - QTRY_COMPARE(grabKeyPressSpy.count(), 1); - QTRY_COMPARE(grabKeyReleaseSpy.count(), 1); + QTRY_COMPARE(grabKeyPressSpy.size(), 1); + QTRY_COMPARE(grabKeyReleaseSpy.size(), 1); QKeyEvent ke2(QEvent::KeyPress, Qt::Key_Shift, Qt::NoModifier, 50, 0, 0); QKeyEvent ke3(QEvent::KeyRelease, Qt::Key_Shift, Qt::NoModifier, 50, 0, 0); @@ -352,14 +327,14 @@ void tst_WaylandCompositor::keyboardGrab() seat->sendFullKeyEvent(&ke3); //QTRY_COMPARE(grabModifierSpy.count(), 2); // Modifiers are also keys - QTRY_COMPARE(grabKeyPressSpy.count(), 2); - QTRY_COMPARE(grabKeyReleaseSpy.count(), 2); + QTRY_COMPARE(grabKeyPressSpy.size(), 2); + QTRY_COMPARE(grabKeyReleaseSpy.size(), 2); // Stop grabbing seat->setKeyboardFocus(nullptr); seat->sendFullKeyEvent(&ke); seat->sendFullKeyEvent(&ke1); - QTRY_COMPARE(grabKeyPressSpy.count(), 2); + QTRY_COMPARE(grabKeyPressSpy.size(), 2); } void tst_WaylandCompositor::geometry() @@ -491,7 +466,7 @@ void tst_WaylandCompositor::mapSurface() wl_surface_damage(surface, 0, 0, size.width(), size.height()); wl_surface_commit(surface); - QTRY_COMPARE(hasContentSpy.count(), 1); + QTRY_COMPARE(hasContentSpy.size(), 1); QCOMPARE(waylandSurface->hasContent(), true); QCOMPARE(waylandSurface->bufferSize(), size); QCOMPARE(waylandSurface->destinationSize(), size); @@ -530,25 +505,30 @@ void tst_WaylandCompositor::mapSurfaceHiDpi() QCOMPARE(waylandSurface->hasContent(), true); }; - QObject::connect(waylandSurface, &QWaylandSurface::damaged, [=] (const QRegion &damage) { + QObject::connect(waylandSurface, &QWaylandSurface::damaged, this, [=] (const QRegion &damage) { QCOMPARE(damage, QRect(QPoint(), surfaceSize)); verifyComittedState(); }); QSignalSpy damagedSpy(waylandSurface, SIGNAL(damaged(const QRegion &))); - QObject::connect(waylandSurface, &QWaylandSurface::hasContentChanged, verifyComittedState); + QObject::connect(waylandSurface, &QWaylandSurface::hasContentChanged, + this, verifyComittedState); QSignalSpy hasContentSpy(waylandSurface, SIGNAL(hasContentChanged())); - QObject::connect(waylandSurface, &QWaylandSurface::bufferSizeChanged, verifyComittedState); + QObject::connect(waylandSurface, &QWaylandSurface::bufferSizeChanged, + this, verifyComittedState); QSignalSpy bufferSizeSpy(waylandSurface, SIGNAL(bufferSizeChanged())); - QObject::connect(waylandSurface, &QWaylandSurface::destinationSizeChanged, verifyComittedState); + QObject::connect(waylandSurface, &QWaylandSurface::destinationSizeChanged, + this, verifyComittedState); QSignalSpy destinationSizeSpy(waylandSurface, SIGNAL(destinationSizeChanged())); - QObject::connect(waylandSurface, &QWaylandSurface::bufferScaleChanged, verifyComittedState); + QObject::connect(waylandSurface, &QWaylandSurface::bufferScaleChanged, + this, verifyComittedState); QSignalSpy bufferScaleSpy(waylandSurface, SIGNAL(bufferScaleChanged())); - QObject::connect(waylandSurface, &QWaylandSurface::offsetForNextFrame, [=](const QPoint &offset) { + QObject::connect(waylandSurface, &QWaylandSurface::offsetForNextFrame, + this, [=](const QPoint &offset) { QCOMPARE(offset, attachOffset); verifyComittedState(); }); @@ -559,21 +539,21 @@ void tst_WaylandCompositor::mapSurfaceHiDpi() QCOMPARE(waylandSurface->destinationSize(), QSize()); QCOMPARE(waylandSurface->hasContent(), false); QCOMPARE(waylandSurface->bufferScale(), 1); - QCOMPARE(offsetSpy.count(), 0); + QCOMPARE(offsetSpy.size(), 0); wl_surface_commit(surface); - QTRY_COMPARE(hasContentSpy.count(), 1); - QTRY_COMPARE(bufferSizeSpy.count(), 1); - QTRY_COMPARE(destinationSizeSpy.count(), 1); - QTRY_COMPARE(bufferScaleSpy.count(), 1); - QTRY_COMPARE(offsetSpy.count(), 1); - QTRY_COMPARE(damagedSpy.count(), 1); + QTRY_COMPARE(hasContentSpy.size(), 1); + QTRY_COMPARE(bufferSizeSpy.size(), 1); + QTRY_COMPARE(destinationSizeSpy.size(), 1); + QTRY_COMPARE(bufferScaleSpy.size(), 1); + QTRY_COMPARE(offsetSpy.size(), 1); + QTRY_COMPARE(damagedSpy.size(), 1); // Now verify that wl_surface_damage_buffer gets mapped properly wl_surface_damage_buffer(surface, 0, 0, bufferSize.width(), bufferSize.height()); wl_surface_commit(surface); - QTRY_COMPARE(damagedSpy.count(), 2); + QTRY_COMPARE(damagedSpy.size(), 2); wl_surface_destroy(surface); } @@ -642,7 +622,7 @@ void tst_WaylandCompositor::frameCallback() wl_surface_commit(surface); QTRY_COMPARE(waylandSurface->hasContent(), true); - QTRY_COMPARE(damagedSpy.count(), i + 1); + QTRY_COMPARE(damagedSpy.size(), i + 1); QCOMPARE(static_cast<BufferView*>(waylandSurface->views().first())->image(), buffer.image); compositor.defaultOutput()->frameStarted(); @@ -698,18 +678,18 @@ void tst_WaylandCompositor::outputs() window.resize(800, 600); auto output = new QWaylandOutput(&compositor, &window); - QTRY_COMPARE(outputAddedSpy.count(), 1); + QTRY_COMPARE(outputAddedSpy.size(), 1); compositor.setDefaultOutput(output); - QTRY_COMPARE(defaultOutputSpy.count(), 2); + QTRY_COMPARE(defaultOutputSpy.size(), 2); MockClient client; QTRY_COMPARE(client.m_outputs.size(), 2); delete output; - QTRY_COMPARE(outputRemovedSpy.count(), 1); + QTRY_COMPARE(outputRemovedSpy.size(), 1); QEXPECT_FAIL("", "FIXME: defaultOutputChanged() is not emitted when the default output is removed", Continue); - QTRY_COMPARE(defaultOutputSpy.count(), 3); + QTRY_COMPARE(defaultOutputSpy.size(), 3); compositor.flushClients(); QTRY_COMPARE(client.m_outputs.size(), 1); } @@ -985,13 +965,12 @@ void tst_WaylandCompositor::createsXdgSurfaces() QSignalSpy xdgSurfaceCreatedSpy(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated); QWaylandXdgSurface *xdgSurface = nullptr; - QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, [&](QWaylandXdgSurface *s) { - xdgSurface = s; - }); + QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, + this, [&](QWaylandXdgSurface *s) { xdgSurface = s; }); wl_surface *surface = client.createSurface(); xdg_surface *clientXdgSurface = client.createXdgSurface(surface); - QTRY_COMPARE(xdgSurfaceCreatedSpy.count(), 1); + QTRY_COMPARE(xdgSurfaceCreatedSpy.size(), 1); QTRY_VERIFY(xdgSurface); QTRY_VERIFY(xdgSurface->surface()); @@ -1005,9 +984,8 @@ void tst_WaylandCompositor::reportsXdgSurfaceWindowGeometry() compositor.create(); QWaylandXdgSurface *xdgSurface = nullptr; - QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, [&](QWaylandXdgSurface *s) { - xdgSurface = s; - }); + QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, + this, [&](QWaylandXdgSurface *s) { xdgSurface = s; }); MockClient client; wl_surface *surface = client.createSurface(); @@ -1042,9 +1020,8 @@ void tst_WaylandCompositor::setsXdgAppId() compositor.create(); QWaylandXdgToplevel *toplevel = nullptr; - QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::toplevelCreated, [&](QWaylandXdgToplevel *t) { - toplevel = t; - }); + QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::toplevelCreated, + this, [&](QWaylandXdgToplevel *t) { toplevel = t; }); MockClient client; wl_surface *surface = client.createSurface(); @@ -1088,9 +1065,8 @@ void tst_WaylandCompositor::sendsXdgConfigure() compositor.create(); QWaylandXdgToplevel *toplevel = nullptr; - QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::toplevelCreated, [&](QWaylandXdgToplevel *t) { - toplevel = t; - }); + QObject::connect(&compositor.xdgShell, &QWaylandXdgShell::toplevelCreated, + this, [&](QWaylandXdgToplevel *t) { toplevel = t; }); MockClient client; wl_surface *surface = client.createSurface(); @@ -1202,13 +1178,12 @@ void tst_WaylandCompositor::createsIviSurfaces() QSignalSpy iviSurfaceCreatedSpy(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceRequested); QWaylandIviSurface *iviSurface = nullptr; - QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, [&](QWaylandIviSurface *s) { - iviSurface = s; - }); + QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, + this, [&](QWaylandIviSurface *s) { iviSurface = s; }); wl_surface *surface = client.createSurface(); client.createIviSurface(surface, 123); - QTRY_COMPARE(iviSurfaceCreatedSpy.count(), 1); + QTRY_COMPARE(iviSurfaceCreatedSpy.size(), 1); QTRY_VERIFY(iviSurface); QTRY_VERIFY(iviSurface->surface()); QTRY_COMPARE(iviSurface->iviId(), 123u); @@ -1224,9 +1199,10 @@ void tst_WaylandCompositor::emitsErrorOnSameIviId() QTRY_VERIFY(&firstClient.iviApplication); QWaylandIviSurface *firstIviSurface = nullptr; - QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, [&](QWaylandIviSurface *s) { - firstIviSurface = s; - }); + auto connection = QObject::connect(&compositor.iviApplication, + &QWaylandIviApplication::iviSurfaceCreated, + this, + [&](QWaylandIviSurface *s) { firstIviSurface = s; }); firstClient.createIviSurface(firstClient.createSurface(), 123); QTRY_VERIFY(firstIviSurface); @@ -1235,7 +1211,7 @@ void tst_WaylandCompositor::emitsErrorOnSameIviId() { MockClient secondClient; QTRY_VERIFY(&secondClient.iviApplication); - QTRY_COMPARE(compositor.clients().count(), 2); + QTRY_COMPARE(compositor.clients().size(), 2); secondClient.createIviSurface(secondClient.createSurface(), 123); compositor.flushClients(); @@ -1243,8 +1219,9 @@ void tst_WaylandCompositor::emitsErrorOnSameIviId() QTRY_COMPARE(secondClient.error, EPROTO); QTRY_COMPARE(secondClient.protocolError.interface, &ivi_application_interface); QTRY_COMPARE(static_cast<ivi_application_error>(secondClient.protocolError.code), IVI_APPLICATION_ERROR_IVI_ID); - QTRY_COMPARE(compositor.clients().count(), 1); + QTRY_COMPARE(compositor.clients().size(), 1); } + QObject::disconnect(connection); } // The other clients have passed out of scope and have been destroyed, @@ -1253,9 +1230,8 @@ void tst_WaylandCompositor::emitsErrorOnSameIviId() QTRY_VERIFY(&thirdClient.iviApplication); QWaylandIviSurface *thirdIviSurface = nullptr; - QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, [&](QWaylandIviSurface *s) { - thirdIviSurface = s; - }); + QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, + this, [&](QWaylandIviSurface *s) { thirdIviSurface = s; }); thirdClient.createIviSurface(thirdClient.createSurface(), 123); compositor.flushClients(); @@ -1284,9 +1260,8 @@ void tst_WaylandCompositor::sendsIviConfigure() QTRY_VERIFY(client.iviApplication); QWaylandIviSurface *iviSurface = nullptr; - QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, [&](QWaylandIviSurface *s) { - iviSurface = s; - }); + QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, + this, [&](QWaylandIviSurface *s) { iviSurface = s; }); wl_surface *surface = client.createSurface(); ivi_surface *clientIviSurface = client.createIviSurface(surface, 123); @@ -1308,16 +1283,15 @@ void tst_WaylandCompositor::destroysIviSurfaces() QTRY_VERIFY(client.iviApplication); QWaylandIviSurface *iviSurface = nullptr; - QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, [&](QWaylandIviSurface *s) { - iviSurface = s; - }); + QObject::connect(&compositor.iviApplication, &QWaylandIviApplication::iviSurfaceCreated, + this, [&](QWaylandIviSurface *s) { iviSurface = s; }); QtWayland::ivi_surface mockIviSurface(client.createIviSurface(client.createSurface(), 123)); QTRY_VERIFY(iviSurface); QSignalSpy destroySpy(iviSurface, SIGNAL(destroyed())); mockIviSurface.destroy(); - QTRY_VERIFY(destroySpy.count() == 1); + QTRY_VERIFY(destroySpy.size() == 1); } class ViewporterTestCompositor: public TestCompositor { @@ -1753,7 +1727,7 @@ void tst_WaylandCompositor::idleInhibit() QVERIFY(idleInhibitor); QTRY_COMPARE(waylandSurfacePrivate->idleInhibitors.size(), 1); QCOMPARE(waylandSurface->inhibitsIdle(), true); - QTRY_COMPARE(changedSpy.count(), 1); + QTRY_COMPARE(changedSpy.size(), 1); } class XdgOutputCompositor : public TestCompositor |