summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/CMakeLists.txt3
-rw-r--r--tests/auto/other/android/tst_android.cpp29
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp30
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp29
-rw-r--r--tests/auto/other/macgui/guitest.cpp29
-rw-r--r--tests/auto/other/macgui/guitest.h29
-rw-r--r--tests/auto/other/macgui/tst_macgui.cpp29
-rw-r--r--tests/auto/other/macnativeevents/expectedeventlist.cpp29
-rw-r--r--tests/auto/other/macnativeevents/expectedeventlist.h29
-rw-r--r--tests/auto/other/macnativeevents/nativeeventlist.cpp29
-rw-r--r--tests/auto/other/macnativeevents/nativeeventlist.h29
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents.cpp29
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents.h29
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents_mac.cpp29
-rw-r--r--tests/auto/other/macnativeevents/tst_macnativeevents.cpp29
-rw-r--r--tests/auto/other/macplist/app/main.cpp29
-rw-r--r--tests/auto/other/macplist/tst_macplist.cpp29
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp29
-rw-r--r--tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp29
-rw-r--r--tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h29
-rw-r--r--tests/auto/other/qaccessibility/CMakeLists.txt6
-rw-r--r--tests/auto/other/qaccessibility/accessiblewidgets.h29
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp366
-rw-r--r--tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp29
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp29
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h29
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm29
-rw-r--r--tests/auto/other/qcomplextext/bidireorderstring.h29
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp29
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp29
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt1
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp38
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp47
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp31
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp29
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp29
-rw-r--r--tests/auto/other/qvariant_common/tst_qvariant_common.h29
-rw-r--r--tests/auto/other/sessionmanagement_macos/tst_sessionmanagement_macos.mm29
-rw-r--r--tests/auto/other/toolsupport/BLACKLIST3
-rw-r--r--tests/auto/other/toolsupport/tst_toolsupport.cpp29
-rw-r--r--tests/auto/other/xkbkeyboard/tst_xkbkeyboard.cpp29
41 files changed, 318 insertions, 1135 deletions
diff --git a/tests/auto/other/CMakeLists.txt b/tests/auto/other/CMakeLists.txt
index 8255406bb5..5f49dacdc0 100644
--- a/tests/auto/other/CMakeLists.txt
+++ b/tests/auto/other/CMakeLists.txt
@@ -21,8 +21,7 @@ endif()
if(TARGET Qt::Network)
add_subdirectory(networkselftest)
endif()
-# QTBUG-87674 # special case
-if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets AND NOT ANDROID)
+if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets)
add_subdirectory(qaccessibility)
endif()
if(TARGET Qt::Gui)
diff --git a/tests/auto/other/android/tst_android.cpp b/tests/auto/other/android/tst_android.cpp
index 3a00d9414b..938ff3c9b2 100644
--- a/tests/auto/other/android/tst_android.cpp
+++ b/tests/auto/other/android/tst_android.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 WITH Qt-GPL-exception-1.0
#include <jni.h>
diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp
index 48cd355554..81b186c0a1 100644
--- a/tests/auto/other/gestures/tst_gestures.cpp
+++ b/tests/auto/other/gestures/tst_gestures.cpp
@@ -1,36 +1,12 @@
-/****************************************************************************
-**
-** 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 WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtTest/qtesttouch.h>
#include <qevent.h>
+#include <QSet>
#include <qpointingdevice.h>
#include <qwidget.h>
#include <qlayout.h>
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 0c435a0cb1..f5ae7c0717 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.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 WITH Qt-GPL-exception-1.0
#include <QTest>
diff --git a/tests/auto/other/macgui/guitest.cpp b/tests/auto/other/macgui/guitest.cpp
index 2effce7393..1f9ca0efcc 100644
--- a/tests/auto/other/macgui/guitest.cpp
+++ b/tests/auto/other/macgui/guitest.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 WITH Qt-GPL-exception-1.0
#include "guitest.h"
diff --git a/tests/auto/other/macgui/guitest.h b/tests/auto/other/macgui/guitest.h
index 74f4292a6b..69f2ba4be5 100644
--- a/tests/auto/other/macgui/guitest.h
+++ b/tests/auto/other/macgui/guitest.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 WITH Qt-GPL-exception-1.0
#ifndef GUITEST_H
#define GUITEST_H
diff --git a/tests/auto/other/macgui/tst_macgui.cpp b/tests/auto/other/macgui/tst_macgui.cpp
index 3b4e0e33cb..4d09db9b7f 100644
--- a/tests/auto/other/macgui/tst_macgui.cpp
+++ b/tests/auto/other/macgui/tst_macgui.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 WITH Qt-GPL-exception-1.0
#include <QApplication>
diff --git a/tests/auto/other/macnativeevents/expectedeventlist.cpp b/tests/auto/other/macnativeevents/expectedeventlist.cpp
index 52552342e4..51437da05d 100644
--- a/tests/auto/other/macnativeevents/expectedeventlist.cpp
+++ b/tests/auto/other/macnativeevents/expectedeventlist.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 WITH Qt-GPL-exception-1.0
#include "expectedeventlist.h"
#include <QDebug>
diff --git a/tests/auto/other/macnativeevents/expectedeventlist.h b/tests/auto/other/macnativeevents/expectedeventlist.h
index a48581df21..b8f9758050 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 WITH Qt-GPL-exception-1.0
#ifndef EVENTFILTER
#define EVENTFILTER
diff --git a/tests/auto/other/macnativeevents/nativeeventlist.cpp b/tests/auto/other/macnativeevents/nativeeventlist.cpp
index b2956fa94e..7266ec2fca 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 WITH Qt-GPL-exception-1.0
#include "nativeeventlist.h"
diff --git a/tests/auto/other/macnativeevents/nativeeventlist.h b/tests/auto/other/macnativeevents/nativeeventlist.h
index 7425414da7..de1b8da13b 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 WITH Qt-GPL-exception-1.0
#ifndef Q_NATIVE_PLAYBACK
#define Q_NATIVE_PLAYBACK
diff --git a/tests/auto/other/macnativeevents/qnativeevents.cpp b/tests/auto/other/macnativeevents/qnativeevents.cpp
index 970c41bf2e..d4784ff6cd 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 WITH Qt-GPL-exception-1.0
#include "qnativeevents.h"
diff --git a/tests/auto/other/macnativeevents/qnativeevents.h b/tests/auto/other/macnativeevents/qnativeevents.h
index ca0cd47675..b96dc5bd8c 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 WITH Qt-GPL-exception-1.0
#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..d9d76c8fd0 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 WITH Qt-GPL-exception-1.0
#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 79e59e2616..bc2145d1a4 100644
--- a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
+++ b/tests/auto/other/macnativeevents/tst_macnativeevents.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 WITH Qt-GPL-exception-1.0
#include <QApplication>
#include <QWidget>
diff --git a/tests/auto/other/macplist/app/main.cpp b/tests/auto/other/macplist/app/main.cpp
index 1d620eb7c6..6647fda781 100644
--- a/tests/auto/other/macplist/app/main.cpp
+++ b/tests/auto/other/macplist/app/main.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 WITH Qt-GPL-exception-1.0
#include <QtWidgets/QApplication>
diff --git a/tests/auto/other/macplist/tst_macplist.cpp b/tests/auto/other/macplist/tst_macplist.cpp
index 10303aed96..8928600f63 100644
--- a/tests/auto/other/macplist/tst_macplist.cpp
+++ b/tests/auto/other/macplist/tst_macplist.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 WITH Qt-GPL-exception-1.0
#include <QTest>
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index f1fd869671..824f26aeaa 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.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 WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtNetwork/QtNetwork>
diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
index ecc95d30b6..378c198949 100644
--- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
+++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Stephen Kelly <steveire@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) 2009 Stephen Kelly <steveire@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "dynamictreemodel.h"
diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h
index ba566cbbac..1f24830602 100644
--- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h
+++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Stephen Kelly <steveire@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) 2009 Stephen Kelly <steveire@gmail.com>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef DYNAMICTREEMODEL_H
#define DYNAMICTREEMODEL_H
diff --git a/tests/auto/other/qaccessibility/CMakeLists.txt b/tests/auto/other/qaccessibility/CMakeLists.txt
index c516188396..1d7b1c3901 100644
--- a/tests/auto/other/qaccessibility/CMakeLists.txt
+++ b/tests/auto/other/qaccessibility/CMakeLists.txt
@@ -4,12 +4,6 @@ if(NOT QT_FEATURE_accessibility)
return()
endif()
-# special case begin
-if (WIN32 AND NOT TARGET Qt::WindowsUIAutomationSupport)
- return()
-endif()
-# special case end
-
#####################################################################
## tst_qaccessibility Test:
#####################################################################
diff --git a/tests/auto/other/qaccessibility/accessiblewidgets.h b/tests/auto/other/qaccessibility/accessiblewidgets.h
index 13ca687dd9..2e93f24fd3 100644
--- a/tests/auto/other/qaccessibility/accessiblewidgets.h
+++ b/tests/auto/other/qaccessibility/accessiblewidgets.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 WITH Qt-GPL-exception-1.0
#ifndef ACCESSIBLEWIDGETS_H
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 615a1a1617..779e5021e1 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.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 WITH Qt-GPL-exception-1.0
#include <QtCore/qglobal.h>
@@ -36,6 +11,7 @@
# include <winuser.h>
#endif
#include <QTest>
+#include <QSignalSpy>
#include <QtGui>
#include <QtWidgets>
#include <math.h>
@@ -269,13 +245,21 @@ void tst_QAccessibility::onClicked()
click_count++;
}
+static bool initAccessibility()
+{
+ QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
+ if (pfIntegration->accessibility()) {
+ pfIntegration->accessibility()->setActive(true);
+ return true;
+ }
+ return false;
+}
+
void tst_QAccessibility::initTestCase()
{
QTestAccessibility::initialize();
- QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
- if (!pfIntegration->accessibility())
+ if (!initAccessibility())
QSKIP("This platform does not support accessibility");
- pfIntegration->accessibility()->setActive(true);
}
void tst_QAccessibility::cleanupTestCase()
@@ -286,6 +270,17 @@ void tst_QAccessibility::cleanupTestCase()
void tst_QAccessibility::init()
{
QTestAccessibility::clearEvents();
+#ifdef Q_OS_ANDROID
+ // On Android a11y state is not explicitly set by calling
+ // QPlatformAccessibility::setActive(), there is another flag that is
+ // controlled from the Java side. The state of this flag is queried
+ // during event processing, so a11y state can be reset to false while
+ // we do QTest::qWait().
+ // To overcome the issue in unit-tests, re-enable a11y before each test.
+ // A more precise fix will require re-enabling it after every qWait() or
+ // processEvents() call, but the current tests pass with such condition.
+ initAccessibility();
+#endif
}
void tst_QAccessibility::cleanup()
@@ -304,7 +299,8 @@ void tst_QAccessibility::cleanup()
void tst_QAccessibility::eventTest()
{
- QPushButton* button = new QPushButton(0);
+ auto buttonHolder = std::make_unique<QPushButton>(nullptr);
+ auto button = buttonHolder.get();
QAccessible::queryAccessibleInterface(button);
button->setObjectName(QString("Olaf"));
setFrameless(button);
@@ -329,23 +325,25 @@ void tst_QAccessibility::eventTest()
// some platforms might send other events first, (such as state change event active=1)
QVERIFY(QTestAccessibility::containsEvent(&hideEvent));
- delete button;
+ buttonHolder.reset();
// Make sure that invalid events don't bring down the system
// these events can be in user code.
- QWidget *widget = new QWidget();
+ auto widgetHolder = std::make_unique<QWidget>();
+ auto widget = widgetHolder.get();
QAccessibleEvent ev1(widget, QAccessible::Focus);
QAccessible::updateAccessibility(&ev1);
QAccessibleEvent ev2(widget, QAccessible::Focus);
ev2.setChild(7);
QAccessible::updateAccessibility(&ev2);
- delete widget;
+ widgetHolder.reset();
- QObject *object = new QObject();
+ auto objectHolder = std::make_unique<QObject>();
+ auto object = objectHolder.get();
QAccessibleEvent ev3(object, QAccessible::Focus);
QAccessible::updateAccessibility(&ev3);
- delete object;
+ objectHolder.reset();
QTestAccessibility::clearEvents();
}
@@ -353,59 +351,56 @@ void tst_QAccessibility::eventTest()
void tst_QAccessibility::customWidget()
{
{
- QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz");
- widget->show();
- QVERIFY(QTest::qWaitForWindowExposed(widget));
+ QtTestAccessibleWidget widget(nullptr, "Heinz");
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
// By default we create QAccessibleWidget
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&widget);
QVERIFY(iface != 0);
QVERIFY(iface->isValid());
- QCOMPARE(iface->object(), (QObject*)widget);
+ QCOMPARE(iface->object(), (QObject*)&widget);
QCOMPARE(iface->object()->objectName(), QString("Heinz"));
- QCOMPARE(iface->rect().height(), widget->height());
+ QCOMPARE(iface->rect().height(), widget.height());
QCOMPARE(iface->text(QAccessible::Help), QString());
- QCOMPARE(iface->rect().height(), widget->height());
- delete widget;
+ QCOMPARE(iface->rect().width(), widget.width());
}
{
QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory);
- QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz");
- widget->show();
- QVERIFY(QTest::qWaitForWindowExposed(widget));
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
+ QtTestAccessibleWidget widget(nullptr, "Heinz");
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&widget);
QVERIFY(iface != 0);
QVERIFY(iface->isValid());
- QCOMPARE(iface->object(), (QObject*)widget);
+ QCOMPARE(iface->object(), (QObject*)&widget);
QCOMPARE(iface->object()->objectName(), QString("Heinz"));
- QCOMPARE(iface->rect().height(), widget->height());
+ QCOMPARE(iface->rect().height(), widget.height());
// The help text is only set if our factory works
QCOMPARE(iface->text(QAccessible::Help), QString("Help yourself"));
- delete widget;
}
{
// A subclass of any class should still get the right QAccessibleInterface
- QtTestAccessibleWidgetSubclass* subclassedWidget = new QtTestAccessibleWidgetSubclass(0, "Hans");
- QAccessibleInterface *subIface = QAccessible::queryAccessibleInterface(subclassedWidget);
+ QtTestAccessibleWidgetSubclass subclassedWidget(nullptr, "Hans");
+ QAccessibleInterface *subIface = QAccessible::queryAccessibleInterface(&subclassedWidget);
QVERIFY(subIface != 0);
QVERIFY(subIface->isValid());
- QCOMPARE(subIface->object(), (QObject*)subclassedWidget);
+ QCOMPARE(subIface->object(), (QObject*)&subclassedWidget);
QCOMPARE(subIface->text(QAccessible::Help), QString("Help yourself"));
- delete subclassedWidget;
}
QTestAccessibility::clearEvents();
}
void tst_QAccessibility::deletedWidget()
{
- QtTestAccessibleWidget *widget = new QtTestAccessibleWidget(0, "Ralf");
+ auto widgetHolder = std::make_unique<QtTestAccessibleWidget>(nullptr, "Ralf");
+ auto widget = widgetHolder.get();
QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory);
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget);
QVERIFY(iface != 0);
QVERIFY(iface->isValid());
QCOMPARE(iface->object(), (QObject*)widget);
- delete widget;
- widget = 0;
+ widgetHolder.reset();
// fixme: QVERIFY(!iface->isValid());
}
@@ -442,7 +437,8 @@ void tst_QAccessibility::statesStructTest()
void tst_QAccessibility::sliderTest()
{
{
- QSlider *slider = new QSlider(0);
+ auto sliderHolder = std::make_unique<QSlider>(nullptr);
+ auto slider = sliderHolder.get();
setFrameless(slider);
slider->setObjectName(QString("Slidy"));
slider->show();
@@ -468,8 +464,6 @@ void tst_QAccessibility::sliderTest()
QCOMPARE(77, slider->value());
slider->setSingleStep(2);
QCOMPARE(valueIface->minimumStepSize().toInt(), 2);
-
- delete slider;
}
QTestAccessibility::clearEvents();
}
@@ -477,7 +471,8 @@ void tst_QAccessibility::sliderTest()
void tst_QAccessibility::navigateHierarchy()
{
{
- QWidget *w = new QWidget(0);
+ auto widgetHolder = std::make_unique<QWidget>(nullptr);
+ auto w = widgetHolder.get();
w->setObjectName(QString("Hans"));
w->show();
QWidget *w1 = new QWidget(w);
@@ -531,8 +526,6 @@ void tst_QAccessibility::navigateHierarchy()
QVERIFY(parent != 0);
QVERIFY(parent->isValid());
QCOMPARE(parent->object(), (QObject*)w3);
-
- delete w;
}
QTestAccessibility::clearEvents();
}
@@ -588,7 +581,8 @@ static QWidget *createWidgets()
void tst_QAccessibility::accessibleName()
{
- QWidget *toplevel = createWidgets();
+ auto holder = std::unique_ptr<QWidget>(createWidgets());
+ auto toplevel = holder.get();
toplevel->show();
QVERIFY(QTest::qWaitForWindowExposed(toplevel));
@@ -607,8 +601,6 @@ void tst_QAccessibility::accessibleName()
child->setAccessibleDescription(desc);
QCOMPARE(acc->text(QAccessible::Description), desc);
}
-
- delete toplevel;
QTestAccessibility::clearEvents();
}
@@ -774,7 +766,8 @@ void tst_QAccessibility::textAttributes()
void tst_QAccessibility::hideShowTest()
{
- QWidget * const window = new QWidget();
+ auto windowHolder = std::make_unique<QWidget>();
+ QWidget * const window = windowHolder.get();
window->resize(200, 200);
QWidget * const child = new QWidget(window);
@@ -804,7 +797,7 @@ void tst_QAccessibility::hideShowTest()
QVERIFY(QTestAccessibility::containsEvent(&hideChild));
QTestAccessibility::clearEvents();
- delete window;
+ windowHolder.reset();
QTestAccessibility::clearEvents();
}
@@ -814,7 +807,8 @@ void tst_QAccessibility::actionTest()
{
QCOMPARE(QAccessibleActionInterface::pressAction(), QString(QStringLiteral("Press")));
- QWidget *widget = new QWidget;
+ auto widgetHolder = std::make_unique<QWidget>();
+ auto widget = widgetHolder.get();
widget->setFocusPolicy(Qt::NoFocus);
widget->show();
@@ -828,13 +822,12 @@ void tst_QAccessibility::actionTest()
QCOMPARE(actions->actionNames(), QStringList());
widget->setFocusPolicy(Qt::StrongFocus);
QCOMPARE(actions->actionNames(), QStringList(QAccessibleActionInterface::setFocusAction()));
-
- delete widget;
}
QTestAccessibility::clearEvents();
{
- QPushButton *button = new QPushButton;
+ auto buttonHolder = std::make_unique<QPushButton>();
+ auto button = buttonHolder.get();
setFrameless(button);
button->show();
QVERIFY(QTest::qWaitForWindowExposed(button));
@@ -856,8 +849,6 @@ void tst_QAccessibility::actionTest()
actions->doAction(QAccessibleActionInterface::pressAction());
QTest::qWait(500);
QCOMPARE(click_count, 1);
-
- delete button;
}
QTestAccessibility::clearEvents();
}
@@ -913,7 +904,8 @@ void tst_QAccessibility::mainWindowTest()
QSKIP("Platform does not support window activation");
{
- QMainWindow *mw = new QMainWindow;
+ auto mwHolder = std::make_unique<QMainWindow>();
+ auto mw = mwHolder.get();
mw->resize(300, 200);
mw->show(); // triggers layout
qApp->setActiveWindow(mw);
@@ -934,9 +926,6 @@ void tst_QAccessibility::mainWindowTest()
QCOMPARE(iface->text(QAccessible::Name), name);
QCOMPARE(iface->role(), QAccessible::Window);
QVERIFY(iface->state().active);
-
-
- delete mw;
}
QTestAccessibility::clearEvents();
@@ -1102,13 +1091,13 @@ void tst_QAccessibility::buttonTest()
{
// test menu push button
- QAction *foo = new QAction("Foo", 0);
+ QAction *foo = new QAction("Foo", nullptr);
foo->setShortcut(QKeySequence("Ctrl+F"));
- QMenu *menu = new QMenu();
+ auto menu = std::make_unique<QMenu>();
menu->addAction(foo);
QPushButton menuButton;
setFrameless(&menuButton);
- menuButton.setMenu(menu);
+ menuButton.setMenu(menu.get());
menuButton.show();
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(&menuButton);
QCOMPARE(interface->role(), QAccessible::ButtonMenu);
@@ -1117,7 +1106,6 @@ void tst_QAccessibility::buttonTest()
// showing the menu enters a new event loop...
// interface->actionInterface()->doAction(QAccessibleActionInterface::showMenuAction());
// QTest::qWait(500);
- delete menu;
}
@@ -1215,8 +1203,10 @@ void tst_QAccessibility::buttonTest()
void tst_QAccessibility::scrollBarTest()
{
- QScrollBar *scrollBar = new QScrollBar(Qt::Horizontal);
- QAccessibleInterface * const scrollBarInterface = QAccessible::queryAccessibleInterface(scrollBar);
+ auto scrollBarHolder = std::make_unique<QScrollBar>(Qt::Horizontal);
+ auto scrollBar = scrollBarHolder.get();
+ QAccessibleInterface * const scrollBarInterface =
+ QAccessible::queryAccessibleInterface(scrollBar);
QVERIFY(scrollBarInterface);
QVERIFY(scrollBarInterface->state().invisible);
scrollBar->resize(200, 50);
@@ -1253,14 +1243,13 @@ void tst_QAccessibility::scrollBarTest()
const QRect scrollBarRect = scrollBarInterface->rect();
QVERIFY(scrollBarRect.isValid());
- delete scrollBar;
-
QTestAccessibility::clearEvents();
}
void tst_QAccessibility::tabTest()
{
- QTabBar *tabBar = new QTabBar();
+ auto tabBarHolder = std::make_unique<QTabBar>();
+ auto tabBar = tabBarHolder.get();
setFrameless(tabBar);
tabBar->show();
@@ -1324,13 +1313,13 @@ void tst_QAccessibility::tabTest()
tabBar->setCurrentIndex(1);
QCOMPARE(interface->text(QAccessible::Name), QLatin1String("AccBar"));
- delete tabBar;
QTestAccessibility::clearEvents();
}
void tst_QAccessibility::tabWidgetTest()
{
- QTabWidget *tabWidget = new QTabWidget();
+ auto tabWidgetHolder = std::make_unique<QTabWidget>();
+ auto tabWidget = tabWidgetHolder.get();
tabWidget->show();
// the interface for the tab is just a container for tabbar and stacked widget
@@ -1389,9 +1378,7 @@ void tst_QAccessibility::tabWidgetTest()
QAccessibleInterface* stackChild1Interface = stackWidgetInterface->child(0);
QVERIFY(stackChild1Interface);
-#ifndef Q_CC_INTEL
QCOMPARE(stackChild1Interface->childCount(), 0);
-#endif
QCOMPARE(stackChild1Interface->role(), QAccessible::StaticText);
QCOMPARE(stackChild1Interface->text(QAccessible::Name), QLatin1String("Page 1"));
QCOMPARE(label1, stackChild1Interface->object());
@@ -1399,9 +1386,7 @@ void tst_QAccessibility::tabWidgetTest()
// Navigation in stack widgets should be consistent
QAccessibleInterface* parent = stackChild1Interface->parent();
QVERIFY(parent);
-#ifndef Q_CC_INTEL
QCOMPARE(parent->childCount(), 2);
-#endif
QCOMPARE(parent->role(), QAccessible::LayeredPane);
QAccessibleInterface* stackChild2Interface = stackWidgetInterface->child(1);
@@ -1413,12 +1398,9 @@ void tst_QAccessibility::tabWidgetTest()
parent = stackChild2Interface->parent();
QVERIFY(parent);
-#ifndef Q_CC_INTEL
QCOMPARE(parent->childCount(), 2);
-#endif
QCOMPARE(parent->role(), QAccessible::LayeredPane);
- delete tabWidget;
QTestAccessibility::clearEvents();
}
@@ -1618,17 +1600,17 @@ void tst_QAccessibility::menuTest()
mw.hide();
// Do not crash if the menu don't have a parent
- QMenu *menu = new QMenu;
+ auto menu = std::make_unique<QMenu>();
menu->addAction(QLatin1String("one"));
menu->addAction(QLatin1String("two"));
menu->addAction(QLatin1String("three"));
- iface = QAccessible::queryAccessibleInterface(menu);
+ iface = QAccessible::queryAccessibleInterface(menu.get());
iface2 = iface->parent();
QVERIFY(iface2);
QCOMPARE(iface2->role(), QAccessible::Application);
// caused a *crash*
iface2->state();
- delete menu;
+ menu.reset();
}
QTestAccessibility::clearEvents();
@@ -1638,7 +1620,8 @@ void tst_QAccessibility::menuTest()
void tst_QAccessibility::spinBoxTest()
{
- QSpinBox * const spinBox = new QSpinBox();
+ auto spinBoxHolder = std::make_unique<QSpinBox>();
+ const auto spinBox = spinBoxHolder.get();
setFrameless(spinBox);
spinBox->setValue(3);
spinBox->show();
@@ -1675,13 +1658,13 @@ void tst_QAccessibility::spinBoxTest()
QAccessibleTextInterface *textIface = interface->textInterface();
QVERIFY(textIface);
- delete spinBox;
QTestAccessibility::clearEvents();
}
void tst_QAccessibility::doubleSpinBoxTest()
{
- QDoubleSpinBox *doubleSpinBox = new QDoubleSpinBox;
+ auto holder = std::make_unique<QDoubleSpinBox>();
+ auto doubleSpinBox = holder.get();
setFrameless(doubleSpinBox);
doubleSpinBox->show();
@@ -1702,7 +1685,6 @@ void tst_QAccessibility::doubleSpinBoxTest()
QVERIFY(childRect.isValid());
}
- delete doubleSpinBox;
QTestAccessibility::clearEvents();
}
@@ -1985,6 +1967,10 @@ void tst_QAccessibility::mdiSubWindowTest()
mdiArea.setActiveSubWindow(testWindow);
+#ifdef Q_OS_ANDROID // on Android QMdiSubWindow is maximized by default
+ testWindow->showNormal();
+#endif
+
// state
QAccessible::State state;
state.focusable = true;
@@ -2049,10 +2035,11 @@ void tst_QAccessibility::mdiSubWindowTest()
void tst_QAccessibility::lineEditTest()
{
- QWidget *toplevel = new QWidget;
+ auto topLevelHolder = std::make_unique<QWidget>();
+ auto toplevel = topLevelHolder.get();
{
- QLineEdit *le = new QLineEdit;
- QAccessibleInterface *iface(QAccessible::queryAccessibleInterface(le));
+ auto le = std::make_unique<QLineEdit>();
+ QAccessibleInterface *iface(QAccessible::queryAccessibleInterface(le.get()));
QVERIFY(iface);
le->show();
@@ -2121,7 +2108,7 @@ void tst_QAccessibility::lineEditTest()
iface->setText(QAccessible::Value, QLatin1String("This text is not a number"));
QCOMPARE(le->text(), QLatin1String("500"));
- delete le;
+ le.reset();
delete le2;
}
@@ -2298,7 +2285,6 @@ void tst_QAccessibility::lineEditTest()
QAccessibleTextInsertEvent insertO(lineEdit, 4, "O");
QVERIFY(QTestAccessibility::containsEvent(&insertO));
}
- delete toplevel;
QTestAccessibility::clearEvents();
}
@@ -2449,11 +2435,11 @@ void tst_QAccessibility::textInterfaceTest()
QFETCH(QString, expectedText);
QAccessible::installFactory(CustomTextWidgetIface::ifaceFactory);
- CustomTextWidget *w = new CustomTextWidget();
+ auto w = std::make_unique<CustomTextWidget>();
w->text = text;
w->cursorPosition = cursorPosition;
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(w);
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(w.get());
QVERIFY(iface);
QCOMPARE(iface->text(QAccessible::Value), text);
QAccessibleTextInterface *textIface = iface->textInterface();
@@ -2478,7 +2464,6 @@ void tst_QAccessibility::textInterfaceTest()
QCOMPARE(start, expectedStart);
QCOMPARE(end, expectedEnd);
- delete w;
QAccessible::removeFactory(CustomTextWidgetIface::ifaceFactory);
QTestAccessibility::clearEvents();
}
@@ -2486,7 +2471,8 @@ void tst_QAccessibility::textInterfaceTest()
void tst_QAccessibility::groupBoxTest()
{
{
- QGroupBox *groupBox = new QGroupBox();
+ auto gbHolder = std::make_unique<QGroupBox>();
+ auto groupBox = gbHolder.get();
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(groupBox);
groupBox->setTitle(QLatin1String("Test QGroupBox"));
@@ -2511,12 +2497,11 @@ void tst_QAccessibility::groupBoxTest()
QPair<QAccessibleInterface*, QAccessible::Relation> relation = relations.first();
QCOMPARE(relation.first->object(), groupBox);
QCOMPARE(relation.second, QAccessible::Label);
-
- delete groupBox;
}
{
- QGroupBox *groupBox = new QGroupBox();
+ auto gbHolder = std::make_unique<QGroupBox>();
+ auto groupBox = gbHolder.get();
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(groupBox);
QVERIFY(!iface->state().checkable);
groupBox->setCheckable(true);
@@ -2540,8 +2525,6 @@ void tst_QAccessibility::groupBoxTest()
QVERIFY(state.checked);
QAccessibleStateChangeEvent ev2(groupBox, st);
QVERIFY_EVENT(&ev2);
-
- delete groupBox;
}
}
@@ -2813,7 +2796,8 @@ void tst_QAccessibility::scrollAreaTest()
void tst_QAccessibility::listTest()
{
{
- QListWidget *listView = new QListWidget;
+ auto lvHolder = std::make_unique<QListWidget>();
+ auto listView = lvHolder.get();
listView->addItem("Oslo");
listView->addItem("Berlin");
listView->addItem("Brisbane");
@@ -2929,19 +2913,17 @@ void tst_QAccessibility::listTest()
// list: Oslo, Helsinki
// verify that it doesn't return an invalid item from the cache
QVERIFY(table2->cellAt(2,0) == 0);
-
- delete listView;
}
QTestAccessibility::clearEvents();
}
void tst_QAccessibility::treeTest()
{
- QTreeWidget *treeView = new QTreeWidget;
+ auto treeView = std::make_unique<QTreeWidget>();
// Empty model (do not crash, etc)
treeView->setColumnCount(0);
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(treeView);
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(treeView.get());
QCOMPARE(iface->child(0), static_cast<QAccessibleInterface*>(0));
treeView->setColumnCount(2);
@@ -3074,7 +3056,6 @@ void tst_QAccessibility::treeTest()
QCOMPARE(table2->columnDescription(0), QString("Artist"));
QCOMPARE(table2->columnDescription(1), QString("Work"));
- delete treeView;
QTestAccessibility::clearEvents();
}
@@ -3085,7 +3066,8 @@ void tst_QAccessibility::treeTest()
// v3 (12) | 0.2 (13) | 1.2 (14) | 2.2 (15)
void tst_QAccessibility::tableTest()
{
- QTableWidget *tableView = new QTableWidget(3, 3);
+ auto tvHolder = std::make_unique<QTableWidget>(3, 3);
+ auto tableView = tvHolder.get();
tableView->setColumnCount(3);
QStringList hHeader;
hHeader << "h1" << "h2" << "h3";
@@ -3365,7 +3347,7 @@ void tst_QAccessibility::tableTest()
tableView->horizontalHeader()->setVisible(false);
}
- delete tableView;
+ tvHolder.reset();
QVERIFY(!QAccessible::accessibleInterface(id00));
QTestAccessibility::clearEvents();
}
@@ -3455,7 +3437,8 @@ void tst_QAccessibility::dockWidgetTest()
{
#if QT_CONFIG(dockwidget)
// Set up a proper main window with two dock widgets
- QMainWindow *mw = new QMainWindow();
+ auto mwHolder = std::make_unique<QMainWindow>();
+ auto mw = mwHolder.get();
QFrame *central = new QFrame(mw);
mw->setCentralWidget(central);
QMenuBar *mb = new QMenuBar(mw);
@@ -3584,7 +3567,6 @@ void tst_QAccessibility::dockWidgetTest()
QAccessibleInterface *dock3Widget = accDock3->child(0);
QCOMPARE(dock3Widget->text(QAccessible::Name), pb3->text());
- delete mw;
QTestAccessibility::clearEvents();
#endif // QT_CONFIG(dockwidget)
}
@@ -3653,7 +3635,8 @@ void tst_QAccessibility::comboBoxTest()
void tst_QAccessibility::labelTest()
{
- QWidget *window = new QWidget;
+ auto windowHolder = std::make_unique<QWidget>();
+ auto window = windowHolder.get();
QString text = "Hello World";
QLabel *label = new QLabel(text, window);
setFrameless(label);
@@ -3687,7 +3670,7 @@ void tst_QAccessibility::labelTest()
QCOMPARE(rel, QAccessible::Labelled);
QCOMPARE(iface->role(), QAccessible::EditableText);
- delete window;
+ windowHolder.reset();
QTestAccessibility::clearEvents();
QPixmap testPixmap(50, 50);
@@ -3713,7 +3696,8 @@ void tst_QAccessibility::labelTest()
void tst_QAccessibility::accelerators()
{
- QWidget *window = new QWidget;
+ auto windowHolder = std::make_unique<QWidget>();
+ auto window = windowHolder.get();
QHBoxLayout *lay = new QHBoxLayout(window);
QLabel *label = new QLabel(tr("&Line edit"), window);
QLineEdit *le = new QLineEdit(window);
@@ -3747,7 +3731,7 @@ void tst_QAccessibility::accelerators()
QCoreApplication::processEvents();
#endif
QTest::qWait(100);
- delete window;
+ windowHolder.reset();
QTestAccessibility::clearEvents();
}
@@ -3853,7 +3837,12 @@ void tst_QAccessibility::bridgeTest()
RECT rect;
hr = buttonElement->get_CurrentBoundingRectangle(&rect);
QVERIFY(SUCCEEDED(hr));
- QCOMPARE(buttonRect, QRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top));
+ const QRect boundingRect(rect.left, rect.top, rect.right - rect.left + 1, rect.bottom - rect.top + 1);
+ const QRectF nativeRect = QHighDpi::toNativePixels(QRectF(buttonRect), window.windowHandle());
+ const QRect truncRect(int(nativeRect.left()), int(nativeRect.top()),
+ int(nativeRect.right()) - int(nativeRect.left()) + 1,
+ int(nativeRect.bottom()) - int(nativeRect.top()) + 1);
+ QCOMPARE(truncRect, boundingRect);
buttonElement->Release();
@@ -4059,9 +4048,6 @@ void tst_QAccessibility::focusChild()
QCOMPARE(iface2->focusChild(), iface2);
QCOMPARE(QAccessible::queryAccessibleInterface(&mainWindow)->focusChild(), iface2);
- delete widget1;
- delete widget2;
- delete centralWidget;
QTestAccessibility::clearEvents();
}
@@ -4078,7 +4064,6 @@ void tst_QAccessibility::focusChild()
widget->setFocus();
QCOMPARE(iface->focusChild(), QAccessible::queryAccessibleInterface(widget)->child(1));
- delete widget;
QAccessible::removeFactory(FocusChildTestAccessibleWidget::ifaceFactory);
QTestAccessibility::clearEvents();
}
@@ -4101,9 +4086,114 @@ void tst_QAccessibility::focusChild()
QCOMPARE(iface->focusChild()->text(QAccessible::Name), QStringLiteral("Second tab"));
QCOMPARE(iface->focusChild()->role(), QAccessible::PageTab);
- delete tabBar;
QTestAccessibility::clearEvents();
}
+
+ {
+ auto tableView = std::make_unique<QTableWidget>(3, 3);
+
+ QSignalSpy spy(tableView.get(), SIGNAL(currentCellChanged(int,int,int,int)));
+
+ tableView->setColumnCount(3);
+ QStringList hHeader;
+ hHeader << "h1" << "h2" << "h3";
+ tableView->setHorizontalHeaderLabels(hHeader);
+
+ QStringList vHeader;
+ vHeader << "v1" << "v2" << "v3";
+ tableView->setVerticalHeaderLabels(vHeader);
+
+ for (int i = 0; i < 9; ++i) {
+ QTableWidgetItem *item = new QTableWidgetItem;
+ item->setText(QString::number(i/3) + QString(".") + QString::number(i%3));
+ tableView->setItem(i/3, i%3, item);
+ }
+
+ tableView->resize(600, 600);
+ tableView->show();
+ QVERIFY(QTest::qWaitForWindowExposed(tableView.get()));
+
+ tableView->setFocus();
+
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(tableView.get());
+ QVERIFY(iface);
+
+ spy.clear();
+ tableView->setCurrentCell(2, 1);
+ QTRY_COMPARE(spy.count(), 1);
+
+ QAccessibleInterface *child = iface->focusChild();
+ QVERIFY(child);
+ QCOMPARE(child->text(QAccessible::Name), QStringLiteral("2.1"));
+
+ spy.clear();
+ tableView->setCurrentCell(1, 2);
+ QTRY_COMPARE(spy.count(), 1);
+
+ child = iface->focusChild();
+ QVERIFY(child);
+ QCOMPARE(child->text(QAccessible::Name), QStringLiteral("1.2"));
+ }
+
+ {
+ auto treeView = std::make_unique<QTreeWidget>();
+
+ QSignalSpy spy(treeView.get(), SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
+
+ treeView->setColumnCount(2);
+ QTreeWidgetItem *header = new QTreeWidgetItem;
+ header->setText(0, "Artist");
+ header->setText(1, "Work");
+ treeView->setHeaderItem(header);
+
+ QTreeWidgetItem *root1 = new QTreeWidgetItem;
+ root1->setText(0, "Spain");
+ treeView->addTopLevelItem(root1);
+
+ QTreeWidgetItem *item1 = new QTreeWidgetItem;
+ item1->setText(0, "Picasso");
+ item1->setText(1, "Guernica");
+ root1->addChild(item1);
+
+ QTreeWidgetItem *item2 = new QTreeWidgetItem;
+ item2->setText(0, "Tapies");
+ item2->setText(1, "Ambrosia");
+ root1->addChild(item2);
+
+ QTreeWidgetItem *root2 = new QTreeWidgetItem;
+ root2->setText(0, "Austria");
+ treeView->addTopLevelItem(root2);
+
+ QTreeWidgetItem *item3 = new QTreeWidgetItem;
+ item3->setText(0, "Klimt");
+ item3->setText(1, "The Kiss");
+ root2->addChild(item3);
+
+ treeView->resize(400, 400);
+ treeView->show();
+ QVERIFY(QTest::qWaitForWindowExposed(treeView.get()));
+
+ treeView->setFocus();
+
+ QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(treeView.get());
+ QVERIFY(iface);
+
+ spy.clear();
+ treeView->setCurrentItem(item2);
+ QTRY_COMPARE(spy.count(), 1);
+
+ QAccessibleInterface *child = iface->focusChild();
+ QVERIFY(child);
+ QCOMPARE(child->text(QAccessible::Name), QStringLiteral("Tapies"));
+
+ spy.clear();
+ treeView->setCurrentItem(item3);
+ QTRY_COMPARE(spy.count(), 1);
+
+ child = iface->focusChild();
+ QVERIFY(child);
+ QCOMPARE(child->text(QAccessible::Name), QStringLiteral("Klimt"));
+ }
}
diff --git a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp
index f776e87692..95998cd570 100644
--- a/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp
+++ b/tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtGui module 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 WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtGui>
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp
index a766e1e374..2141869f16 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.cpp
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac.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 WITH Qt-GPL-exception-1.0
#include <QApplication>
#include <QtWidgets>
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h
index 58ea2d02b0..003aa90dfd 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.h
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.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 WITH Qt-GPL-exception-1.0
#include <QtCore/QString>
#include <QtCore/QPair>
#include <QtWidgets/QWidget>
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
index 7e89b3a166..ceac828eed 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
@@ -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 WITH Qt-GPL-exception-1.0
// some versions of CALayer.h use 'slots' as an identifier
#define QT_NO_KEYWORDS
diff --git a/tests/auto/other/qcomplextext/bidireorderstring.h b/tests/auto/other/qcomplextext/bidireorderstring.h
index b537bf45e4..3b9e4c40ca 100644
--- a/tests/auto/other/qcomplextext/bidireorderstring.h
+++ b/tests/auto/other/qcomplextext/bidireorderstring.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 WITH Qt-GPL-exception-1.0
struct LV {
const char *name;
const char *logical;
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index 453dc23bcd..1b944bf1b6 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.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 WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtGui/QtGui>
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index 92ab429d4a..0d34b8dfea 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.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 WITH Qt-GPL-exception-1.0
#include <QTest>
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
index e4041de233..bf6fabe17a 100644
--- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
@@ -11,4 +11,5 @@ qt_internal_add_test(tst_qnetworkaccessmanager_and_qprogressdialog
Qt::Gui
Qt::Network
Qt::Widgets
+ QT_TEST_SERVER_LIST "apache2"
)
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
index a321900df2..30cc76830a 100644
--- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.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 WITH Qt-GPL-exception-1.0
#include <QTest>
@@ -68,13 +43,13 @@ public:
public slots:
void go()
{
- QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile"));
+ QNetworkRequest request(QUrl("http://" + QtNetworkSettings::httpServerName() + "/qtest/bigfile"));
if (zeroCopy)
request.setAttribute(QNetworkRequest::MaximumDownloadBufferSizeAttribute, 10*1024*1024);
QNetworkReply *reply = netmanager.get(
QNetworkRequest(
- QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile")
+ QUrl("http://" + QtNetworkSettings::httpServerName() + "/qtest/bigfile")
));
connect(reply, SIGNAL(downloadProgress(qint64,qint64)),
this, SLOT(dataReadProgress(qint64,qint64)));
@@ -117,8 +92,13 @@ tst_QNetworkAccessManager_And_QProgressDialog::tst_QNetworkAccessManager_And_QPr
void tst_QNetworkAccessManager_And_QProgressDialog::initTestCase()
{
+#ifdef QT_TEST_SERVER
+ if (!QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80))
+ QSKIP("No network test server available");
+#else
if (!QtNetworkSettings::verifyTestNetworkSettings())
QSKIP("No network test server available");
+#endif
}
void tst_QNetworkAccessManager_And_QProgressDialog::downloadCheck_data()
diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
index 093b4d2476..2c28e691d1 100644
--- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/other/qobjectrace/tst_qobjectrace.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 WITH Qt-GPL-exception-1.0
#include <QtCore>
@@ -32,6 +7,8 @@
#include <QtTest/private/qemulationdetector_p.h>
+#include <optional>
+
enum { OneMinute = 60 * 1000,
TwoMinutes = OneMinute * 2 };
@@ -347,17 +324,13 @@ void tst_QObjectRace::blockingQueuedDestroyRace()
while (iteration++ < MinIterations || !timer.hasExpired()) {
// Manually allocate some storage, and create a receiver in there
- std::aligned_storage<
- sizeof(BlockingQueuedDestroyRaceObject),
- alignof(BlockingQueuedDestroyRaceObject)
- >::type storage;
+ std::optional<BlockingQueuedDestroyRaceObject> receiver;
- auto *receiver = reinterpret_cast<BlockingQueuedDestroyRaceObject *>(&storage);
- new (receiver) BlockingQueuedDestroyRaceObject(BlockingQueuedDestroyRaceObject::Behavior::Normal);
+ receiver.emplace(BlockingQueuedDestroyRaceObject::Behavior::Normal);
// Connect it to the sender via BlockingQueuedConnection
QVERIFY(connect(&sender, &BlockingQueuedDestroyRaceObject::aSignal,
- receiver, &BlockingQueuedDestroyRaceObject::aSlot,
+ &*receiver, &BlockingQueuedDestroyRaceObject::aSlot,
Qt::BlockingQueuedConnection));
const auto emitUntilDestroyed = [&sender] {
@@ -379,15 +352,13 @@ void tst_QObjectRace::blockingQueuedDestroyRace()
// - the metacall event to be posted to a destroyed object;
// - the metacall event to be posted to the wrong object.
// In both cases we hope to catch the race by crashing.
- receiver->~BlockingQueuedDestroyRaceObject();
- new (receiver) BlockingQueuedDestroyRaceObject(BlockingQueuedDestroyRaceObject::Behavior::Crash);
+ receiver.reset();
+ receiver.emplace(BlockingQueuedDestroyRaceObject::Behavior::Crash);
// Flush events
QTest::qWait(0);
thread->wait();
-
- receiver->~BlockingQueuedDestroyRaceObject();
}
#endif
}
diff --git a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
index a21bb9a005..e70d132ea7 100644
--- a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
+++ b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
@@ -1,31 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
-** 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) 2021 The Qt Company Ltd.
+// Copyright (C) 2016 Intel Corporation.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtGui/QGuiApplication>
#include <QTest>
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp
index 5e75f7db3c..b062542bb0 100644
--- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp
+++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Intel Corporation.
-** 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 Intel Corporation.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <stdio.h>
diff --git a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
index 38fc547335..9eaff74557 100644
--- a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
+++ b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.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 WITH Qt-GPL-exception-1.0
#include <QtWidgets/QWidget>
#include <QtWidgets/QPushButton>
diff --git a/tests/auto/other/qvariant_common/tst_qvariant_common.h b/tests/auto/other/qvariant_common/tst_qvariant_common.h
index 70a44ad10f..86da11ee47 100644
--- a/tests/auto/other/qvariant_common/tst_qvariant_common.h
+++ b/tests/auto/other/qvariant_common/tst_qvariant_common.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 WITH Qt-GPL-exception-1.0
#ifndef TST_QVARIANT_COMMON
#define TST_QVARIANT_COMMON
diff --git a/tests/auto/other/sessionmanagement_macos/tst_sessionmanagement_macos.mm b/tests/auto/other/sessionmanagement_macos/tst_sessionmanagement_macos.mm
index eac31444c7..a59ff03a06 100644
--- a/tests/auto/other/sessionmanagement_macos/tst_sessionmanagement_macos.mm
+++ b/tests/auto/other/sessionmanagement_macos/tst_sessionmanagement_macos.mm
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 Samuel Gaist <samuel.gaist@idiap.ch>
-** 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 Samuel Gaist <samuel.gaist@idiap.ch>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QTest>
diff --git a/tests/auto/other/toolsupport/BLACKLIST b/tests/auto/other/toolsupport/BLACKLIST
deleted file mode 100644
index 6a4d5aece5..0000000000
--- a/tests/auto/other/toolsupport/BLACKLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-# QTBUG-87396
-[offsets]
-android
diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp
index 05ed44cc16..6a146bae3a 100644
--- a/tests/auto/other/toolsupport/tst_toolsupport.cpp
+++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://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) 2015 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QTest>
diff --git a/tests/auto/other/xkbkeyboard/tst_xkbkeyboard.cpp b/tests/auto/other/xkbkeyboard/tst_xkbkeyboard.cpp
index 6a3fe73829..05950eee81 100644
--- a/tests/auto/other/xkbkeyboard/tst_xkbkeyboard.cpp
+++ b/tests/auto/other/xkbkeyboard/tst_xkbkeyboard.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 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) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore>
#include <QtGui>