diff options
Diffstat (limited to 'tests/auto/gui/kernel/qinputdevice')
-rw-r--r-- | tests/auto/gui/kernel/qinputdevice/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt b/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt index aea72357dd..afbfd9bb37 100644 --- a/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt +++ b/tests/auto/gui/kernel/qinputdevice/CMakeLists.txt @@ -1,13 +1,20 @@ -# Generated from qinputdevice.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qinputdevice Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qinputdevice LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qinputdevice SOURCES tst_qinputdevice.cpp - PUBLIC_LIBRARIES + LIBRARIES Qt::Gui Qt::GuiPrivate ) diff --git a/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp b/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp index 67c65f1160..8587aebf2a 100644 --- a/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp +++ b/tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2020 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <qpa/qwindowsysteminterface.h> @@ -78,7 +78,7 @@ void tst_QInputDevice::multiSeatDevices() QWindowSystemInterface::registerInputDevice(new QPointingDevice("seat 2 mouse", 2010, QInputDevice::DeviceType::Mouse, QPointingDevice::PointerType::Generic, QInputDevice::Capability::Position | QInputDevice::Capability::Hover, 1, 2, "seat 2", QPointingDeviceUniqueId(), this)); - QVERIFY(QInputDevice::devices().count() >= 4); + QVERIFY(QInputDevice::devices().size() >= 4); QVERIFY(QInputDevicePrivate::fromId(1010)); QVERIFY(QInputDevicePrivate::fromId(1010)->hasCapability(QInputDevice::Capability::Scroll)); QVERIFY(QInputDevicePrivate::fromId(2010)); |