summaryrefslogtreecommitdiffstats
path: root/tests/manual/qcursor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qcursor')
-rw-r--r--tests/manual/qcursor/CMakeLists.txt3
-rw-r--r--tests/manual/qcursor/allcursors/CMakeLists.txt8
-rw-r--r--tests/manual/qcursor/allcursors/main.cpp29
-rw-r--r--tests/manual/qcursor/allcursors/mainwindow.cpp29
-rw-r--r--tests/manual/qcursor/allcursors/mainwindow.h29
-rw-r--r--tests/manual/qcursor/childwidget/CMakeLists.txt8
-rw-r--r--tests/manual/qcursor/childwidget/main.cpp29
-rw-r--r--tests/manual/qcursor/childwindow/CMakeLists.txt8
-rw-r--r--tests/manual/qcursor/childwindow/main.cpp29
-rw-r--r--tests/manual/qcursor/childwindowcontainer/CMakeLists.txt8
-rw-r--r--tests/manual/qcursor/childwindowcontainer/main.cpp29
-rw-r--r--tests/manual/qcursor/grab_override/CMakeLists.txt9
-rw-r--r--tests/manual/qcursor/grab_override/main.cpp29
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.cpp29
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.h29
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt12
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/main.cpp62
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro2
18 files changed, 47 insertions, 334 deletions
diff --git a/tests/manual/qcursor/CMakeLists.txt b/tests/manual/qcursor/CMakeLists.txt
index 1824c0c1a4..3f6e73818e 100644
--- a/tests/manual/qcursor/CMakeLists.txt
+++ b/tests/manual/qcursor/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from qcursor.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
add_subdirectory(allcursors)
add_subdirectory(childwidget)
diff --git a/tests/manual/qcursor/allcursors/CMakeLists.txt b/tests/manual/qcursor/allcursors/CMakeLists.txt
index 65e7251c6d..91b365ed6c 100644
--- a/tests/manual/qcursor/allcursors/CMakeLists.txt
+++ b/tests/manual/qcursor/allcursors/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from allcursors.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_allcursors Binary:
@@ -9,12 +10,9 @@ qt_internal_add_manual_test(tst_allcursors
SOURCES
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Widgets
ENABLE_AUTOGEN_TOOLS
uic
)
-
-#### Keys ignored in scope 1:.:.:allcursors.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/allcursors/main.cpp b/tests/manual/qcursor/allcursors/main.cpp
index 5cf1c29d65..b688308b13 100644
--- a/tests/manual/qcursor/allcursors/main.cpp
+++ b/tests/manual/qcursor/allcursors/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
#include <QApplication>
#include "mainwindow.h"
diff --git a/tests/manual/qcursor/allcursors/mainwindow.cpp b/tests/manual/qcursor/allcursors/mainwindow.cpp
index ecd2c4d908..917f17520f 100644
--- a/tests/manual/qcursor/allcursors/mainwindow.cpp
+++ b/tests/manual/qcursor/allcursors/mainwindow.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "mainwindow.h"
#include "ui_mainwindow.h"
diff --git a/tests/manual/qcursor/allcursors/mainwindow.h b/tests/manual/qcursor/allcursors/mainwindow.h
index 73a023afbb..ebe81855f8 100644
--- a/tests/manual/qcursor/allcursors/mainwindow.h
+++ b/tests/manual/qcursor/allcursors/mainwindow.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
diff --git a/tests/manual/qcursor/childwidget/CMakeLists.txt b/tests/manual/qcursor/childwidget/CMakeLists.txt
index ca377cb90f..3475948d8b 100644
--- a/tests/manual/qcursor/childwidget/CMakeLists.txt
+++ b/tests/manual/qcursor/childwidget/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from childwidget.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_manual_childwidget Binary:
@@ -10,10 +11,7 @@ qt_internal_add_manual_test(tst_manual_childwidget
main.cpp
INCLUDE_DIRECTORIES
.
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Widgets
)
-
-#### Keys ignored in scope 1:.:.:childwidget.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/childwidget/main.cpp b/tests/manual/qcursor/childwidget/main.cpp
index 39d52a97e8..fd2a010a01 100644
--- a/tests/manual/qcursor/childwidget/main.cpp
+++ b/tests/manual/qcursor/childwidget/main.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtWidgets>
diff --git a/tests/manual/qcursor/childwindow/CMakeLists.txt b/tests/manual/qcursor/childwindow/CMakeLists.txt
index 147bd065d1..52ad23374a 100644
--- a/tests/manual/qcursor/childwindow/CMakeLists.txt
+++ b/tests/manual/qcursor/childwindow/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from childwindow.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## childwindow Binary:
@@ -10,9 +11,6 @@ qt_internal_add_manual_test(childwindow
main.cpp
INCLUDE_DIRECTORIES
.
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
-
-#### Keys ignored in scope 1:.:.:childwindow.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/childwindow/main.cpp b/tests/manual/qcursor/childwindow/main.cpp
index c6b8faca4d..af84816463 100644
--- a/tests/manual/qcursor/childwindow/main.cpp
+++ b/tests/manual/qcursor/childwindow/main.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtGui>
diff --git a/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt b/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt
index 0efe0cb61a..6fe9611f02 100644
--- a/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt
+++ b/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from childwindowcontainer.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## childwindowcontainer Binary:
@@ -10,10 +11,7 @@ qt_internal_add_manual_test(childwindowcontainer
main.cpp
INCLUDE_DIRECTORIES
.
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Widgets
)
-
-#### Keys ignored in scope 1:.:.:childwindowcontainer.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/childwindowcontainer/main.cpp b/tests/manual/qcursor/childwindowcontainer/main.cpp
index e9bf927929..ae1e415545 100644
--- a/tests/manual/qcursor/childwindowcontainer/main.cpp
+++ b/tests/manual/qcursor/childwindowcontainer/main.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtWidgets>
diff --git a/tests/manual/qcursor/grab_override/CMakeLists.txt b/tests/manual/qcursor/grab_override/CMakeLists.txt
index c52ed6a1dd..17f4b80ee2 100644
--- a/tests/manual/qcursor/grab_override/CMakeLists.txt
+++ b/tests/manual/qcursor/grab_override/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from grab_override.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## t_cursors Binary:
@@ -9,7 +10,7 @@ qt_internal_add_manual_test(t_cursors
SOURCES
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Widgets
ENABLE_AUTOGEN_TOOLS
@@ -27,7 +28,3 @@ qt_internal_add_resource(t_cursors "images"
FILES
${images_resource_files}
)
-
-
-#### Keys ignored in scope 1:.:.:grab_override.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/grab_override/main.cpp b/tests/manual/qcursor/grab_override/main.cpp
index 5cf1c29d65..b688308b13 100644
--- a/tests/manual/qcursor/grab_override/main.cpp
+++ b/tests/manual/qcursor/grab_override/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
#include <QApplication>
#include "mainwindow.h"
diff --git a/tests/manual/qcursor/grab_override/mainwindow.cpp b/tests/manual/qcursor/grab_override/mainwindow.cpp
index 087ee8d1d8..4ed3dfe979 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.cpp
+++ b/tests/manual/qcursor/grab_override/mainwindow.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "mainwindow.h"
#include "ui_mainwindow.h"
diff --git a/tests/manual/qcursor/grab_override/mainwindow.h b/tests/manual/qcursor/grab_override/mainwindow.h
index 5275d80184..ded9059991 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.h
+++ b/tests/manual/qcursor/grab_override/mainwindow.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
diff --git a/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt b/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt
index 99114a0514..171377e42f 100644
--- a/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt
+++ b/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt
@@ -1,4 +1,5 @@
-# Generated from qcursorhighdpi.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## qcursorhighdpi Binary:
@@ -7,20 +8,17 @@
qt_internal_add_manual_test(qcursorhighdpi
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
Qt::Widgets
)
-#### Keys ignored in scope 1:.:.:qcursorhighdpi.pro:<TRUE>:
-# TEMPLATE = "app"
-
## Scopes:
#####################################################################
qt_internal_extend_target(qcursorhighdpi CONDITION WIN32
- PUBLIC_LIBRARIES
- User32
+ LIBRARIES
+ user32
)
diff --git a/tests/manual/qcursor/qcursorhighdpi/main.cpp b/tests/manual/qcursor/qcursorhighdpi/main.cpp
index dd7df2bd10..9997e93967 100644
--- a/tests/manual/qcursor/qcursorhighdpi/main.cpp
+++ b/tests/manual/qcursor/qcursorhighdpi/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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QAction>
#include <QApplication>
@@ -47,15 +22,10 @@
#include <QStringList>
#include <QTextStream>
-#if QT_VERSION > 0x050000
-# include <QScreen>
-# include <QWindow>
-# include <private/qhighdpiscaling_p.h>
-# include <qpa/qplatformwindow.h>
-#else
-# define Q_NULLPTR 0
-# define Q_DECL_OVERRIDE
-#endif
+#include <QScreen>
+#include <QWindow>
+#include <private/qhighdpiscaling_p.h>
+#include <qpa/qplatformwindow.h>
#ifdef Q_OS_WIN
# include <qt_windows.h>
@@ -64,14 +34,6 @@
#include <algorithm>
#include <iterator>
-#if QT_VERSION < 0x050000
-QDebug operator<<(QDebug d, const QPixmap &p)
-{
- d.nospace() << "QPixmap(" << p.size() << ')';
- return d;
-}
-#endif // Qt 4
-
// High DPI cursor test for testing cursor sizes in multi-screen setups.
// It creates one widget per screen with a grid of standard cursors,
// pixmap / bitmap cursors and pixmap / bitmap cursors with device pixel ratio 2.
@@ -139,7 +101,6 @@ static QCursor bitmapCursor(int size)
return QCursor(bitmaps.first, bitmaps.second, size / 2, size / 2);
}
-#if QT_VERSION > 0x050000
static QCursor pixmapCursorDevicePixelRatio(int size, int dpr)
{
QPixmap pixmap = paintPixmap(dpr * size, Qt::yellow);
@@ -154,7 +115,6 @@ static QCursor bitmapCursorDevicePixelRatio(int size, int dpr)
bitmaps.second.setDevicePixelRatio(dpr);
return QCursor(bitmaps.first, bitmaps.second, size / 2, size / 2);
}
-#endif // Qt 5
// A label from which a pixmap can be dragged for testing drag with pixmaps/DPR.
class DraggableLabel : public QLabel {
@@ -191,9 +151,7 @@ void DraggableLabel::mousePressEvent(QMouseEvent *)
drag->setMimeData(mimeData);
drag->setPixmap(pixmap);
QPoint sizeP = QPoint(m_pixmap.width(), m_pixmap.height());
-#if QT_VERSION > 0x050000
sizeP /= int(m_pixmap.devicePixelRatio());
-#endif // Qt 5
drag->setHotSpot(sizeP / 2);
qDebug() << "Dragging:" << m_pixmap;
drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction);
@@ -244,10 +202,8 @@ static QLabel *createCursorLabel(const QCursor &cursor, const QString &additiona
{
QString labelText;
QDebug(&labelText).nospace() << cursor.shape();
-#if QT_VERSION > 0x050000
labelText.remove(0, labelText.indexOf('(') + 1);
labelText.chop(1);
-#endif // Qt 5
if (!additionalText.isEmpty())
labelText += ' ' + additionalText;
const QPixmap cursorPixmap = cursor.pixmap();
@@ -279,9 +235,7 @@ MainWindow::MainWindow(QWidget *parent)
, m_screenInfoLabel(new QLabel)
{
QString title = "Cursors ";
-#if QT_VERSION > 0x050000
title += '(' + QGuiApplication::platformName() + ") ";
-#endif
title += QT_VERSION_STR;
setWindowTitle(title);
@@ -315,7 +269,6 @@ MainWindow::MainWindow(QWidget *parent)
QLatin1String("Plain BM ") + QString::number(size)),
gridLayout, columnCount, row, col);
-#if QT_VERSION > 0x050000
addToGrid(createCursorLabel(QCursor(pixmapCursorDevicePixelRatio(size, 2)),
"PX with DPR 2 " + QString::number(size)),
gridLayout, columnCount, row, col);
@@ -323,7 +276,6 @@ MainWindow::MainWindow(QWidget *parent)
addToGrid(createCursorLabel(QCursor(bitmapCursorDevicePixelRatio(size, 2)),
"BM with DPR 2 " + QString::number(size)),
gridLayout, columnCount, row, col);
-#endif // Qt 5
gridLayout->addWidget(m_screenInfoLabel, row + 1, 0, 1, columnCount);
@@ -351,10 +303,8 @@ int main(int argc, char *argv[])
windows.append(window);
window->show();
window->updateScreenInfo();
-#if QT_VERSION > 0x050000
QObject::connect(window->windowHandle(), &QWindow::screenChanged,
window.data(), &MainWindow::updateScreenInfo);
-#endif
}
return app.exec();
}
diff --git a/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro b/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro
index b0a5a75a67..309a756532 100644
--- a/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro
+++ b/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro
@@ -2,4 +2,4 @@ TEMPLATE = app
QT = core gui gui-private core-private widgets
CONFIG -= app_bundle
SOURCES += main.cpp
-win32: LIBS += -lUser32
+win32: LIBS += -luser32