diff options
Diffstat (limited to 'tests/auto/other/macnativeevents')
-rw-r--r-- | tests/auto/other/macnativeevents/CMakeLists.txt | 18 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/expectedeventlist.cpp | 31 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/expectedeventlist.h | 29 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/macnativeevents.pro | 12 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/nativeeventlist.cpp | 29 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/nativeeventlist.h | 31 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/qnativeevents.cpp | 29 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/qnativeevents.h | 29 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/qnativeevents_mac.cpp | 29 | ||||
-rw-r--r-- | tests/auto/other/macnativeevents/tst_macnativeevents.cpp | 31 |
10 files changed, 29 insertions, 239 deletions
diff --git a/tests/auto/other/macnativeevents/CMakeLists.txt b/tests/auto/other/macnativeevents/CMakeLists.txt index f22996a66e..c44cf61920 100644 --- a/tests/auto/other/macnativeevents/CMakeLists.txt +++ b/tests/auto/other/macnativeevents/CMakeLists.txt @@ -1,4 +1,11 @@ -# Generated from macnativeevents.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_macnativeevents LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() if(NOT APPLE) return() @@ -8,20 +15,15 @@ endif() ## tst_macnativeevents Test: ##################################################################### -qt_add_test(tst_macnativeevents +qt_internal_add_test(tst_macnativeevents SOURCES expectedeventlist.cpp expectedeventlist.h nativeeventlist.cpp nativeeventlist.h qnativeevents.cpp qnativeevents.h qnativeevents_mac.cpp tst_macnativeevents.cpp - DEFINES - QT_DISABLE_DEPRECATED_BEFORE=0 - PUBLIC_LIBRARIES + LIBRARIES ${FWAppKit} Qt::Gui Qt::Widgets ) - -#### Keys ignored in scope 1:.:.:macnativeevents.pro:<TRUE>: -# _REQUIREMENTS = "mac" diff --git a/tests/auto/other/macnativeevents/expectedeventlist.cpp b/tests/auto/other/macnativeevents/expectedeventlist.cpp index 155218e7d2..a8c662ad93 100644 --- a/tests/auto/other/macnativeevents/expectedeventlist.cpp +++ b/tests/auto/other/macnativeevents/expectedeventlist.cpp @@ -1,36 +1,11 @@ -/**************************************************************************** -** -** 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 "expectedeventlist.h" #include <QDebug> #include <QCoreApplication> #include <QAbstractEventDispatcher> -#include <QtTest/QtTest> +#include <QTest> ExpectedEventList::ExpectedEventList(QObject *target) : QObject(target), eventCount(0) diff --git a/tests/auto/other/macnativeevents/expectedeventlist.h b/tests/auto/other/macnativeevents/expectedeventlist.h index a48581df21..f21b56c9b2 100644 --- a/tests/auto/other/macnativeevents/expectedeventlist.h +++ b/tests/auto/other/macnativeevents/expectedeventlist.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 #ifndef EVENTFILTER #define EVENTFILTER diff --git a/tests/auto/other/macnativeevents/macnativeevents.pro b/tests/auto/other/macnativeevents/macnativeevents.pro deleted file mode 100644 index 0fe5949a1d..0000000000 --- a/tests/auto/other/macnativeevents/macnativeevents.pro +++ /dev/null @@ -1,12 +0,0 @@ -CONFIG += testcase -TARGET = tst_macnativeevents -QT += widgets testlib -HEADERS += qnativeevents.h nativeeventlist.h expectedeventlist.h -SOURCES += qnativeevents.cpp qnativeevents_mac.cpp -SOURCES += expectedeventlist.cpp nativeeventlist.cpp -SOURCES += tst_macnativeevents.cpp - -requires(mac) -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 - -LIBS += -framework AppKit diff --git a/tests/auto/other/macnativeevents/nativeeventlist.cpp b/tests/auto/other/macnativeevents/nativeeventlist.cpp index b2956fa94e..6216c9682f 100644 --- a/tests/auto/other/macnativeevents/nativeeventlist.cpp +++ b/tests/auto/other/macnativeevents/nativeeventlist.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 "nativeeventlist.h" diff --git a/tests/auto/other/macnativeevents/nativeeventlist.h b/tests/auto/other/macnativeevents/nativeeventlist.h index 8f823becf3..20e91a689a 100644 --- a/tests/auto/other/macnativeevents/nativeeventlist.h +++ b/tests/auto/other/macnativeevents/nativeeventlist.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 #ifndef Q_NATIVE_PLAYBACK #define Q_NATIVE_PLAYBACK @@ -43,7 +18,7 @@ class NativeEventList : public QObject ~NativeEventList(); void append(QNativeEvent *event); - void append(int waitMs, QNativeEvent *event = 0); + void append(int waitMs, QNativeEvent *event = nullptr); void play(Playback playback = WaitUntilFinished); void stop(); diff --git a/tests/auto/other/macnativeevents/qnativeevents.cpp b/tests/auto/other/macnativeevents/qnativeevents.cpp index 970c41bf2e..a516fc28d6 100644 --- a/tests/auto/other/macnativeevents/qnativeevents.cpp +++ b/tests/auto/other/macnativeevents/qnativeevents.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 "qnativeevents.h" diff --git a/tests/auto/other/macnativeevents/qnativeevents.h b/tests/auto/other/macnativeevents/qnativeevents.h index ca0cd47675..cab2472083 100644 --- a/tests/auto/other/macnativeevents/qnativeevents.h +++ b/tests/auto/other/macnativeevents/qnativeevents.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 #ifndef Q_NATIVE_INPUT #define Q_NATIVE_INPUT diff --git a/tests/auto/other/macnativeevents/qnativeevents_mac.cpp b/tests/auto/other/macnativeevents/qnativeevents_mac.cpp index 6d7fbbecc1..a2e1a66c65 100644 --- a/tests/auto/other/macnativeevents/qnativeevents_mac.cpp +++ b/tests/auto/other/macnativeevents/qnativeevents_mac.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 "qnativeevents.h" #include <CoreGraphics/CoreGraphics.h> diff --git a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp index 18585d1856..3cb934d7d5 100644 --- a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp +++ b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp @@ -1,36 +1,11 @@ -/**************************************************************************** -** -** 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 <QApplication> #include <QWidget> #include <QDialog> #include <QPushButton> -#include <QtTest/QtTest> +#include <QTest> #include "qnativeevents.h" #include "nativeeventlist.h" |