summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting/qpainter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/painting/qpainter')
-rw-r--r--tests/auto/gui/painting/qpainter/CMakeLists.txt208
-rw-r--r--tests/auto/gui/painting/qpainter/testdata.qrc186
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp298
-rw-r--r--tests/auto/gui/painting/qpainter/utils/createImages/main.cpp29
4 files changed, 238 insertions, 483 deletions
diff --git a/tests/auto/gui/painting/qpainter/CMakeLists.txt b/tests/auto/gui/painting/qpainter/CMakeLists.txt
index 9466dddadd..261e1eb2cf 100644
--- a/tests/auto/gui/painting/qpainter/CMakeLists.txt
+++ b/tests/auto/gui/painting/qpainter/CMakeLists.txt
@@ -1,9 +1,16 @@
-# Generated from qpainter.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qpainter Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qpainter LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
# Collect test data
file(GLOB_RECURSE test_data_glob
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
@@ -26,7 +33,7 @@ list(APPEND test_data "task217400.png")
qt_internal_add_test(tst_qpainter
SOURCES
tst_qpainter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
@@ -37,202 +44,7 @@ qt_internal_add_test(tst_qpainter
#####################################################################
qt_internal_extend_target(tst_qpainter CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
Qt::WidgetsPrivate
)
-
-if(ANDROID)
- # Resources:
- set(testdata_resource_files
- "drawEllipse/10x10SizeAt0x0.png"
- "drawEllipse/10x10SizeAt100x100.png"
- "drawEllipse/10x10SizeAt200x200.png"
- "drawEllipse/13x100SizeAt0x0.png"
- "drawEllipse/13x100SizeAt100x100.png"
- "drawEllipse/13x100SizeAt200x200.png"
- "drawEllipse/200x200SizeAt0x0.png"
- "drawEllipse/200x200SizeAt100x100.png"
- "drawEllipse/200x200SizeAt200x200.png"
- "drawLine_rop_bitmap/dst.xbm"
- "drawLine_rop_bitmap/res/res_AndNotROP.xbm"
- "drawLine_rop_bitmap/res/res_AndROP.xbm"
- "drawLine_rop_bitmap/res/res_ClearROP.xbm"
- "drawLine_rop_bitmap/res/res_CopyROP.xbm"
- "drawLine_rop_bitmap/res/res_NandROP.xbm"
- "drawLine_rop_bitmap/res/res_NopROP.xbm"
- "drawLine_rop_bitmap/res/res_NorROP.xbm"
- "drawLine_rop_bitmap/res/res_NotAndROP.xbm"
- "drawLine_rop_bitmap/res/res_NotCopyROP.xbm"
- "drawLine_rop_bitmap/res/res_NotOrROP.xbm"
- "drawLine_rop_bitmap/res/res_NotROP.xbm"
- "drawLine_rop_bitmap/res/res_NotXorROP.xbm"
- "drawLine_rop_bitmap/res/res_OrNotROP.xbm"
- "drawLine_rop_bitmap/res/res_OrROP.xbm"
- "drawLine_rop_bitmap/res/res_SetROP.xbm"
- "drawLine_rop_bitmap/res/res_XorROP.xbm"
- "drawPixmap_rop/dst1.png"
- "drawPixmap_rop/dst2.png"
- "drawPixmap_rop/dst3.png"
- "drawPixmap_rop/res/res_AndNotROP0.png"
- "drawPixmap_rop/res/res_AndNotROP1.png"
- "drawPixmap_rop/res/res_AndNotROP2.png"
- "drawPixmap_rop/res/res_AndNotROP3.png"
- "drawPixmap_rop/res/res_AndNotROP4.png"
- "drawPixmap_rop/res/res_AndNotROP5.png"
- "drawPixmap_rop/res/res_AndNotROP6.png"
- "drawPixmap_rop/res/res_AndNotROP7.png"
- "drawPixmap_rop/res/res_AndROP0.png"
- "drawPixmap_rop/res/res_AndROP1.png"
- "drawPixmap_rop/res/res_AndROP2.png"
- "drawPixmap_rop/res/res_AndROP3.png"
- "drawPixmap_rop/res/res_AndROP4.png"
- "drawPixmap_rop/res/res_AndROP5.png"
- "drawPixmap_rop/res/res_AndROP6.png"
- "drawPixmap_rop/res/res_AndROP7.png"
- "drawPixmap_rop/res/res_ClearROP0.png"
- "drawPixmap_rop/res/res_ClearROP1.png"
- "drawPixmap_rop/res/res_ClearROP2.png"
- "drawPixmap_rop/res/res_ClearROP3.png"
- "drawPixmap_rop/res/res_ClearROP4.png"
- "drawPixmap_rop/res/res_ClearROP5.png"
- "drawPixmap_rop/res/res_ClearROP6.png"
- "drawPixmap_rop/res/res_ClearROP7.png"
- "drawPixmap_rop/res/res_CopyROP0.png"
- "drawPixmap_rop/res/res_CopyROP1.png"
- "drawPixmap_rop/res/res_CopyROP2.png"
- "drawPixmap_rop/res/res_CopyROP3.png"
- "drawPixmap_rop/res/res_CopyROP4.png"
- "drawPixmap_rop/res/res_CopyROP5.png"
- "drawPixmap_rop/res/res_CopyROP6.png"
- "drawPixmap_rop/res/res_CopyROP7.png"
- "drawPixmap_rop/res/res_NandROP0.png"
- "drawPixmap_rop/res/res_NandROP1.png"
- "drawPixmap_rop/res/res_NandROP2.png"
- "drawPixmap_rop/res/res_NandROP3.png"
- "drawPixmap_rop/res/res_NandROP4.png"
- "drawPixmap_rop/res/res_NandROP5.png"
- "drawPixmap_rop/res/res_NandROP6.png"
- "drawPixmap_rop/res/res_NandROP7.png"
- "drawPixmap_rop/res/res_NopROP0.png"
- "drawPixmap_rop/res/res_NopROP1.png"
- "drawPixmap_rop/res/res_NopROP2.png"
- "drawPixmap_rop/res/res_NopROP3.png"
- "drawPixmap_rop/res/res_NopROP4.png"
- "drawPixmap_rop/res/res_NopROP5.png"
- "drawPixmap_rop/res/res_NopROP6.png"
- "drawPixmap_rop/res/res_NopROP7.png"
- "drawPixmap_rop/res/res_NorROP0.png"
- "drawPixmap_rop/res/res_NorROP1.png"
- "drawPixmap_rop/res/res_NorROP2.png"
- "drawPixmap_rop/res/res_NorROP3.png"
- "drawPixmap_rop/res/res_NorROP4.png"
- "drawPixmap_rop/res/res_NorROP5.png"
- "drawPixmap_rop/res/res_NorROP6.png"
- "drawPixmap_rop/res/res_NorROP7.png"
- "drawPixmap_rop/res/res_NotAndROP0.png"
- "drawPixmap_rop/res/res_NotAndROP1.png"
- "drawPixmap_rop/res/res_NotAndROP2.png"
- "drawPixmap_rop/res/res_NotAndROP3.png"
- "drawPixmap_rop/res/res_NotAndROP4.png"
- "drawPixmap_rop/res/res_NotAndROP5.png"
- "drawPixmap_rop/res/res_NotAndROP6.png"
- "drawPixmap_rop/res/res_NotAndROP7.png"
- "drawPixmap_rop/res/res_NotCopyROP0.png"
- "drawPixmap_rop/res/res_NotCopyROP1.png"
- "drawPixmap_rop/res/res_NotCopyROP2.png"
- "drawPixmap_rop/res/res_NotCopyROP3.png"
- "drawPixmap_rop/res/res_NotCopyROP4.png"
- "drawPixmap_rop/res/res_NotCopyROP5.png"
- "drawPixmap_rop/res/res_NotCopyROP6.png"
- "drawPixmap_rop/res/res_NotCopyROP7.png"
- "drawPixmap_rop/res/res_NotOrROP0.png"
- "drawPixmap_rop/res/res_NotOrROP1.png"
- "drawPixmap_rop/res/res_NotOrROP2.png"
- "drawPixmap_rop/res/res_NotOrROP3.png"
- "drawPixmap_rop/res/res_NotOrROP4.png"
- "drawPixmap_rop/res/res_NotOrROP5.png"
- "drawPixmap_rop/res/res_NotOrROP6.png"
- "drawPixmap_rop/res/res_NotOrROP7.png"
- "drawPixmap_rop/res/res_NotROP0.png"
- "drawPixmap_rop/res/res_NotROP1.png"
- "drawPixmap_rop/res/res_NotROP2.png"
- "drawPixmap_rop/res/res_NotROP3.png"
- "drawPixmap_rop/res/res_NotROP4.png"
- "drawPixmap_rop/res/res_NotROP5.png"
- "drawPixmap_rop/res/res_NotROP6.png"
- "drawPixmap_rop/res/res_NotROP7.png"
- "drawPixmap_rop/res/res_NotXorROP0.png"
- "drawPixmap_rop/res/res_NotXorROP1.png"
- "drawPixmap_rop/res/res_NotXorROP2.png"
- "drawPixmap_rop/res/res_NotXorROP3.png"
- "drawPixmap_rop/res/res_NotXorROP4.png"
- "drawPixmap_rop/res/res_NotXorROP5.png"
- "drawPixmap_rop/res/res_NotXorROP6.png"
- "drawPixmap_rop/res/res_NotXorROP7.png"
- "drawPixmap_rop/res/res_OrNotROP0.png"
- "drawPixmap_rop/res/res_OrNotROP1.png"
- "drawPixmap_rop/res/res_OrNotROP2.png"
- "drawPixmap_rop/res/res_OrNotROP3.png"
- "drawPixmap_rop/res/res_OrNotROP4.png"
- "drawPixmap_rop/res/res_OrNotROP5.png"
- "drawPixmap_rop/res/res_OrNotROP6.png"
- "drawPixmap_rop/res/res_OrNotROP7.png"
- "drawPixmap_rop/res/res_OrROP0.png"
- "drawPixmap_rop/res/res_OrROP1.png"
- "drawPixmap_rop/res/res_OrROP2.png"
- "drawPixmap_rop/res/res_OrROP3.png"
- "drawPixmap_rop/res/res_OrROP4.png"
- "drawPixmap_rop/res/res_OrROP5.png"
- "drawPixmap_rop/res/res_OrROP6.png"
- "drawPixmap_rop/res/res_OrROP7.png"
- "drawPixmap_rop/res/res_SetROP0.png"
- "drawPixmap_rop/res/res_SetROP1.png"
- "drawPixmap_rop/res/res_SetROP2.png"
- "drawPixmap_rop/res/res_SetROP3.png"
- "drawPixmap_rop/res/res_SetROP4.png"
- "drawPixmap_rop/res/res_SetROP5.png"
- "drawPixmap_rop/res/res_SetROP6.png"
- "drawPixmap_rop/res/res_SetROP7.png"
- "drawPixmap_rop/res/res_XorROP0.png"
- "drawPixmap_rop/res/res_XorROP1.png"
- "drawPixmap_rop/res/res_XorROP2.png"
- "drawPixmap_rop/res/res_XorROP3.png"
- "drawPixmap_rop/res/res_XorROP4.png"
- "drawPixmap_rop/res/res_XorROP5.png"
- "drawPixmap_rop/res/res_XorROP6.png"
- "drawPixmap_rop/res/res_XorROP7.png"
- "drawPixmap_rop/src1.xbm"
- "drawPixmap_rop/src2-mask.xbm"
- "drawPixmap_rop/src2.xbm"
- "drawPixmap_rop/src3.xbm"
- "drawPixmap_rop_bitmap/dst.xbm"
- "drawPixmap_rop_bitmap/res/res_AndNotROP.xbm"
- "drawPixmap_rop_bitmap/res/res_AndROP.xbm"
- "drawPixmap_rop_bitmap/res/res_ClearROP.xbm"
- "drawPixmap_rop_bitmap/res/res_CopyROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NandROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NopROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NorROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NotAndROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NotCopyROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NotOrROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NotROP.xbm"
- "drawPixmap_rop_bitmap/res/res_NotXorROP.xbm"
- "drawPixmap_rop_bitmap/res/res_OrNotROP.xbm"
- "drawPixmap_rop_bitmap/res/res_OrROP.xbm"
- "drawPixmap_rop_bitmap/res/res_SetROP.xbm"
- "drawPixmap_rop_bitmap/res/res_XorROP.xbm"
- "drawPixmap_rop_bitmap/src1-mask.xbm"
- "drawPixmap_rop_bitmap/src1.xbm"
- "drawPixmap_rop_bitmap/src2.xbm"
- "task217400.png"
- )
-
- qt_internal_add_resource(tst_qpainter "testdata"
- PREFIX
- "/"
- FILES
- ${testdata_resource_files}
- )
-endif()
diff --git a/tests/auto/gui/painting/qpainter/testdata.qrc b/tests/auto/gui/painting/qpainter/testdata.qrc
deleted file mode 100644
index a7b8c222e5..0000000000
--- a/tests/auto/gui/painting/qpainter/testdata.qrc
+++ /dev/null
@@ -1,186 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>task217400.png</file>
- <file>drawEllipse/10x10SizeAt0x0.png</file>
- <file>drawEllipse/10x10SizeAt100x100.png</file>
- <file>drawEllipse/10x10SizeAt200x200.png</file>
- <file>drawEllipse/13x100SizeAt0x0.png</file>
- <file>drawEllipse/13x100SizeAt100x100.png</file>
- <file>drawEllipse/13x100SizeAt200x200.png</file>
- <file>drawEllipse/200x200SizeAt0x0.png</file>
- <file>drawEllipse/200x200SizeAt100x100.png</file>
- <file>drawEllipse/200x200SizeAt200x200.png</file>
- <file>drawLine_rop_bitmap/dst.xbm</file>
- <file>drawLine_rop_bitmap/res/res_AndNotROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_AndROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_ClearROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_CopyROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NandROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NopROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NorROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NotAndROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NotCopyROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NotOrROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NotROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_NotXorROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_OrNotROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_OrROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_SetROP.xbm</file>
- <file>drawLine_rop_bitmap/res/res_XorROP.xbm</file>
- <file>drawPixmap_rop/dst1.png</file>
- <file>drawPixmap_rop/dst2.png</file>
- <file>drawPixmap_rop/dst3.png</file>
- <file>drawPixmap_rop/src1.xbm</file>
- <file>drawPixmap_rop/src2-mask.xbm</file>
- <file>drawPixmap_rop/src2.xbm</file>
- <file>drawPixmap_rop/src3.xbm</file>
- <file>drawPixmap_rop/res/res_AndNotROP0.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP1.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP2.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP3.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP4.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP5.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP6.png</file>
- <file>drawPixmap_rop/res/res_AndNotROP7.png</file>
- <file>drawPixmap_rop/res/res_AndROP0.png</file>
- <file>drawPixmap_rop/res/res_AndROP1.png</file>
- <file>drawPixmap_rop/res/res_AndROP2.png</file>
- <file>drawPixmap_rop/res/res_AndROP3.png</file>
- <file>drawPixmap_rop/res/res_AndROP4.png</file>
- <file>drawPixmap_rop/res/res_AndROP5.png</file>
- <file>drawPixmap_rop/res/res_AndROP6.png</file>
- <file>drawPixmap_rop/res/res_AndROP7.png</file>
- <file>drawPixmap_rop/res/res_ClearROP0.png</file>
- <file>drawPixmap_rop/res/res_ClearROP1.png</file>
- <file>drawPixmap_rop/res/res_ClearROP2.png</file>
- <file>drawPixmap_rop/res/res_ClearROP3.png</file>
- <file>drawPixmap_rop/res/res_ClearROP4.png</file>
- <file>drawPixmap_rop/res/res_ClearROP5.png</file>
- <file>drawPixmap_rop/res/res_ClearROP6.png</file>
- <file>drawPixmap_rop/res/res_ClearROP7.png</file>
- <file>drawPixmap_rop/res/res_CopyROP0.png</file>
- <file>drawPixmap_rop/res/res_CopyROP1.png</file>
- <file>drawPixmap_rop/res/res_CopyROP2.png</file>
- <file>drawPixmap_rop/res/res_CopyROP3.png</file>
- <file>drawPixmap_rop/res/res_CopyROP4.png</file>
- <file>drawPixmap_rop/res/res_CopyROP5.png</file>
- <file>drawPixmap_rop/res/res_CopyROP6.png</file>
- <file>drawPixmap_rop/res/res_CopyROP7.png</file>
- <file>drawPixmap_rop/res/res_NandROP0.png</file>
- <file>drawPixmap_rop/res/res_NandROP1.png</file>
- <file>drawPixmap_rop/res/res_NandROP2.png</file>
- <file>drawPixmap_rop/res/res_NandROP3.png</file>
- <file>drawPixmap_rop/res/res_NandROP4.png</file>
- <file>drawPixmap_rop/res/res_NandROP5.png</file>
- <file>drawPixmap_rop/res/res_NandROP6.png</file>
- <file>drawPixmap_rop/res/res_NandROP7.png</file>
- <file>drawPixmap_rop/res/res_NopROP0.png</file>
- <file>drawPixmap_rop/res/res_NopROP1.png</file>
- <file>drawPixmap_rop/res/res_NopROP2.png</file>
- <file>drawPixmap_rop/res/res_NopROP3.png</file>
- <file>drawPixmap_rop/res/res_NopROP4.png</file>
- <file>drawPixmap_rop/res/res_NopROP5.png</file>
- <file>drawPixmap_rop/res/res_NopROP6.png</file>
- <file>drawPixmap_rop/res/res_NopROP7.png</file>
- <file>drawPixmap_rop/res/res_NorROP0.png</file>
- <file>drawPixmap_rop/res/res_NorROP1.png</file>
- <file>drawPixmap_rop/res/res_NorROP2.png</file>
- <file>drawPixmap_rop/res/res_NorROP3.png</file>
- <file>drawPixmap_rop/res/res_NorROP4.png</file>
- <file>drawPixmap_rop/res/res_NorROP5.png</file>
- <file>drawPixmap_rop/res/res_NorROP6.png</file>
- <file>drawPixmap_rop/res/res_NorROP7.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP0.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP1.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP2.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP3.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP4.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP5.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP6.png</file>
- <file>drawPixmap_rop/res/res_NotAndROP7.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP0.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP1.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP2.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP3.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP4.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP5.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP6.png</file>
- <file>drawPixmap_rop/res/res_NotCopyROP7.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP0.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP1.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP2.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP3.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP4.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP5.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP6.png</file>
- <file>drawPixmap_rop/res/res_NotOrROP7.png</file>
- <file>drawPixmap_rop/res/res_NotROP0.png</file>
- <file>drawPixmap_rop/res/res_NotROP1.png</file>
- <file>drawPixmap_rop/res/res_NotROP2.png</file>
- <file>drawPixmap_rop/res/res_NotROP3.png</file>
- <file>drawPixmap_rop/res/res_NotROP4.png</file>
- <file>drawPixmap_rop/res/res_NotROP5.png</file>
- <file>drawPixmap_rop/res/res_NotROP6.png</file>
- <file>drawPixmap_rop/res/res_NotROP7.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP0.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP1.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP2.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP3.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP4.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP5.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP6.png</file>
- <file>drawPixmap_rop/res/res_NotXorROP7.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP0.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP1.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP2.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP3.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP4.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP5.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP6.png</file>
- <file>drawPixmap_rop/res/res_OrNotROP7.png</file>
- <file>drawPixmap_rop/res/res_OrROP0.png</file>
- <file>drawPixmap_rop/res/res_OrROP1.png</file>
- <file>drawPixmap_rop/res/res_OrROP2.png</file>
- <file>drawPixmap_rop/res/res_OrROP3.png</file>
- <file>drawPixmap_rop/res/res_OrROP4.png</file>
- <file>drawPixmap_rop/res/res_OrROP5.png</file>
- <file>drawPixmap_rop/res/res_OrROP6.png</file>
- <file>drawPixmap_rop/res/res_OrROP7.png</file>
- <file>drawPixmap_rop/res/res_SetROP0.png</file>
- <file>drawPixmap_rop/res/res_SetROP1.png</file>
- <file>drawPixmap_rop/res/res_SetROP2.png</file>
- <file>drawPixmap_rop/res/res_SetROP3.png</file>
- <file>drawPixmap_rop/res/res_SetROP4.png</file>
- <file>drawPixmap_rop/res/res_SetROP5.png</file>
- <file>drawPixmap_rop/res/res_SetROP6.png</file>
- <file>drawPixmap_rop/res/res_SetROP7.png</file>
- <file>drawPixmap_rop/res/res_XorROP0.png</file>
- <file>drawPixmap_rop/res/res_XorROP1.png</file>
- <file>drawPixmap_rop/res/res_XorROP2.png</file>
- <file>drawPixmap_rop/res/res_XorROP3.png</file>
- <file>drawPixmap_rop/res/res_XorROP4.png</file>
- <file>drawPixmap_rop/res/res_XorROP5.png</file>
- <file>drawPixmap_rop/res/res_XorROP6.png</file>
- <file>drawPixmap_rop/res/res_XorROP7.png</file>
- <file>drawPixmap_rop_bitmap/dst.xbm</file>
- <file>drawPixmap_rop_bitmap/src1-mask.xbm</file>
- <file>drawPixmap_rop_bitmap/src1.xbm</file>
- <file>drawPixmap_rop_bitmap/src2.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_AndNotROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_AndROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_ClearROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_CopyROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NandROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NopROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NorROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NotAndROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NotCopyROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NotOrROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NotROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_NotXorROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_OrNotROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_OrROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_SetROP.xbm</file>
- <file>drawPixmap_rop_bitmap/res/res_XorROP.xbm</file>
- </qresource>
-</RCC>
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 45490ef815..92b28f65bd 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,31 +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 <QTest>
#include <qpainter.h>
@@ -69,6 +43,9 @@ Q_OBJECT
public:
tst_QPainter();
+ enum ClipType { ClipRect, ClipRectF, ClipRegionSingle, ClipRegionMulti, ClipPathR, ClipPath };
+ Q_ENUM(ClipType);
+
private slots:
void cleanupTestCase();
void getSetCheck();
@@ -84,6 +61,7 @@ private slots:
#endif
void drawPixmapFragments();
void drawPixmapNegativeScale();
+ void drawPixmapRounding();
void drawLine_data();
void drawLine();
@@ -155,6 +133,8 @@ private slots:
void clipBoundingRect();
void transformedClip();
+ void scaledClipConsistency_data();
+ void scaledClipConsistency();
void setOpacity_data();
void setOpacity();
@@ -190,6 +170,7 @@ private slots:
void radialGradientRgb30();
#endif
+ void radialGradient_QTBUG120332_ubsan();
void fpe_pixmapTransform();
void fpe_zeroLengthLines();
void fpe_divByZero();
@@ -301,6 +282,9 @@ private slots:
void drawImageAtPointF();
void scaledDashes();
+#if QT_CONFIG(raster_fp)
+ void hdrColors();
+#endif
private:
void fillData();
@@ -764,6 +748,16 @@ void tst_QPainter::drawPixmapNegativeScale()
QVERIFY(resultImage.pixel(12, 8) == qRgba(0, 0, 0, 255)); // and right strip is now black
}
+void tst_QPainter::drawPixmapRounding()
+{
+ // Just test that we don't assert
+ QBitmap bm(8, 8);
+ QImage out(64, 64, QImage::Format_RGB32);
+ QPainter p(&out);
+ qreal y = 26.499999999999996;
+ p.drawPixmap(QPointF(0, y), bm);
+}
+
void tst_QPainter::drawLine_data()
{
QTest::addColumn<QLine>("line");
@@ -1749,10 +1743,11 @@ void tst_QPainter::setClipRect()
/*
Verify that the clipping works correctly.
- The red outline should be covered by the blue rect on top and left,
- while it should be clipped on the right and bottom and thus the red outline be visible
+ Just like fillRect, cliprect should snap rightwards and downwards in case of .5 coordinates.
+ The red outline should be covered by the blue rect on top,
+ while it should be clipped on the other edges and thus the red outline be visible
- See: QTBUG-83229
+ See: QTBUG-83229, modified by QTBUG-100329
*/
void tst_QPainter::clipRect()
{
@@ -1778,7 +1773,7 @@ void tst_QPainter::clipRect()
p.end();
QCOMPARE(image.pixelColor(clipRect.left() + 1, clipRect.top()), QColor(Qt::blue));
- QCOMPARE(image.pixelColor(clipRect.left(), clipRect.top() + 1), QColor(Qt::blue));
+ QCOMPARE(image.pixelColor(clipRect.left(), clipRect.top() + 1), QColor(Qt::red));
QCOMPARE(image.pixelColor(clipRect.left() + 1, clipRect.bottom()), QColor(Qt::red));
QCOMPARE(image.pixelColor(clipRect.right(), clipRect.top() + 1), QColor(Qt::red));
}
@@ -2098,21 +2093,22 @@ void tst_QPainter::clippedLines_data()
QPen pen2(QColor(223, 223, 0, 223));
pen2.setWidth(2);
- QList<QLineF> lines;
- lines << QLineF(15, 15, 65, 65)
- << QLineF(14, 14, 66, 66)
- << QLineF(16, 16, 64, 64)
- << QLineF(65, 65, 15, 15)
- << QLineF(66, 66, 14, 14)
- << QLineF(64, 64, 14, 14)
- << QLineF(15, 50, 15, 64)
- << QLineF(15, 50, 15, 65)
- << QLineF(15, 50, 15, 66)
- << QLineF(15, 50, 64, 50)
- << QLineF(15, 50, 65, 50)
- << QLineF(15, 50, 66, 50);
-
- foreach (QLineF line, lines) {
+ const auto lines = {
+ QLineF(15, 15, 65, 65),
+ QLineF(14, 14, 66, 66),
+ QLineF(16, 16, 64, 64),
+ QLineF(65, 65, 15, 15),
+ QLineF(66, 66, 14, 14),
+ QLineF(64, 64, 14, 14),
+ QLineF(15, 50, 15, 64),
+ QLineF(15, 50, 15, 65),
+ QLineF(15, 50, 15, 66),
+ QLineF(15, 50, 64, 50),
+ QLineF(15, 50, 65, 50),
+ QLineF(15, 50, 66, 50),
+ };
+
+ for (QLineF line : lines) {
const QByteArray desc = "line (" + QByteArray::number(line.x1())
+ ", " + QByteArray::number(line.y1()) + ", "
+ QByteArray::number(line.x2()) + ", " + QByteArray::number(line.y2())
@@ -2513,6 +2509,12 @@ void tst_QPainter::drawhelper_blend_untransformed_data()
setOpacity_data();
}
+static const auto &defaultOpacities()
+{
+ static const std::array opacities = {qreal(0.0), 0.1 , 0.01, 0.4, 0.5, 0.6, 0.9, 1.0};
+ return opacities;
+}
+
void tst_QPainter::drawhelper_blend_untransformed()
{
QFETCH(QImage::Format, destFormat);
@@ -2533,9 +2535,7 @@ void tst_QPainter::drawhelper_blend_untransformed()
p.fillRect(paintRect, srcColor);
p.end();
- QList<qreal> opacities = (QList<qreal>() << 0.0 << 0.1 << 0.01 << 0.4
- << 0.5 << 0.6 << 0.9 << 1.0);
- foreach (qreal opacity, opacities) {
+ for (qreal opacity : defaultOpacities()) {
p.begin(&dest);
p.fillRect(paintRect, destColor);
@@ -2590,9 +2590,7 @@ void tst_QPainter::drawhelper_blend_tiled_untransformed()
const QBrush brush(src);
- QList<qreal> opacities = (QList<qreal>() << 0.0 << 0.1 << 0.01 << 0.4
- << 0.5 << 0.6 << 0.9 << 1.0);
- foreach (qreal opacity, opacities) {
+ for (qreal opacity : defaultOpacities()) {
p.begin(&dest);
p.fillRect(paintRect, destColor);
@@ -2786,7 +2784,7 @@ void tst_QPainter::monoImages()
for (int i = 1; i < QImage::NImageFormats; ++i) {
for (int j = 0; j < numColorPairs; ++j) {
const QImage::Format format = QImage::Format(i);
- if (format == QImage::Format_Indexed8)
+ if (format == QImage::Format_Indexed8 || format == QImage::Format_CMYK8888)
continue;
QImage img(2, 2, format);
@@ -2846,7 +2844,14 @@ void tst_QPainter::monoImages()
}
}
-#if !defined(Q_OS_AIX) && !defined(Q_CC_MSVC) && !defined(Q_OS_SOLARIS) && !defined(__UCLIBC__) && !defined(Q_OS_INTEGRITY)
+#if defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD) || defined(Q_OS_ANDROID)
+# define TEST_FPE_EXCEPTIONS
+#elif defined(Q_OS_LINUX) && defined(__GLIBC__)
+# define TEST_FPE_EXCEPTIONS
+#elif defined(Q_OS_WIN) && defined(Q_CC_GNU)
+# define TEST_FPE_EXCEPTIONS
+#endif
+#ifdef TEST_FPE_EXCEPTIONS
#include <fenv.h>
static const QString fpeExceptionString(int exception)
@@ -3549,9 +3554,13 @@ void tst_QPainter::drawImage_data()
for (int srcFormat = QImage::Format_Mono; srcFormat < QImage::NImageFormats; ++srcFormat) {
for (int dstFormat = QImage::Format_Mono; dstFormat < QImage::NImageFormats; ++dstFormat) {
- // Indexed8 can't be painted to, and Alpha8 can't hold a color.
- if (dstFormat == QImage::Format_Indexed8 || dstFormat == QImage::Format_Alpha8)
+ // Indexed8 and CMYK8888 can't be painted to, and Alpha8 can't hold a color.
+ if (dstFormat == QImage::Format_Indexed8 ||
+ dstFormat == QImage::Format_CMYK8888 ||
+ dstFormat == QImage::Format_Alpha8) {
continue;
+ }
+
for (int odd_x = 0; odd_x <= 1; ++odd_x) {
for (int odd_width = 0; odd_width <= 1; ++odd_width) {
QTest::addRow("srcFormat %d, dstFormat %d, odd x: %d, odd width: %d",
@@ -3794,10 +3803,10 @@ static QLinearGradient inverseGradient(QLinearGradient g)
{
QLinearGradient g2 = g;
- QGradientStops stops = g.stops();
+ const QGradientStops stops = g.stops();
QGradientStops inverse;
- foreach (QGradientStop stop, stops)
+ for (const QGradientStop &stop : stops)
inverse << QGradientStop(1 - stop.first, stop.second);
g2.setStops(inverse);
@@ -3903,6 +3912,21 @@ void tst_QPainter::gradientPixelFormat()
QCOMPARE(a, b.convertToFormat(QImage::Format_ARGB32_Premultiplied));
}
+void tst_QPainter::radialGradient_QTBUG120332_ubsan()
+{
+ // Check if Radial Gradient will cause division by zero or not when
+ // the center point coincide with the focal point.
+ QImage image(8, 8, QImage::Format_ARGB32_Premultiplied);
+ QPainter painter(&image);
+
+ QPointF center(0.5, 0.5);
+ QPointF focal(0.5, 0.5);
+ QRadialGradient gradient(center, 0.5, focal, 0.5);
+ gradient.setColorAt(0, Qt::blue);
+ gradient.setColorAt(1, Qt::red);
+ painter.fillRect(image.rect(), QBrush(gradient));
+}
+
void tst_QPainter::gradientInterpolation()
{
QImage image(256, 8, QImage::Format_ARGB32_Premultiplied);
@@ -4580,6 +4604,96 @@ void tst_QPainter::transformedClip()
}
}
+void tst_QPainter::scaledClipConsistency_data()
+{
+ QTest::addColumn<ClipType>("clipType");
+
+ QTest::newRow("clipRect") << ClipRect;
+ QTest::newRow("clipRectF") << ClipRectF;
+ QTest::newRow("clipRegionSingle") << ClipRegionSingle;
+ QTest::newRow("clipRegionMulti") << ClipRegionMulti;
+ QTest::newRow("clipPathR") << ClipPathR;
+ QTest::newRow("clipPath") << ClipPath;
+}
+
+void tst_QPainter::scaledClipConsistency()
+{
+ QFETCH(ClipType, clipType);
+
+ const QList<QRect> clipRects = {
+ // Varying odd and even coordinates and width/height
+ QRect(1, 1, 7, 8),
+ QRect(8, 0, 8, 9),
+ QRect(0, 9, 8, 7),
+ QRect(8, 9, 8, 7),
+ };
+ // Assert that these are edge to edge:
+ QPointF center = QRectF(clipRects[0]).bottomRight();
+ Q_ASSERT(QRectF(clipRects[1]).bottomLeft() == center);
+ Q_ASSERT(QRectF(clipRects[2]).topRight() == center);
+ Q_ASSERT(QRectF(clipRects[3]).topLeft() == center);
+
+ QRegion multiRegion;
+ for (const QRect &clipRect : clipRects)
+ multiRegion += clipRect;
+
+ QColor fillColor(Qt::black);
+ fillColor.setAlphaF(0.5);
+
+ for (int i = 100; i <= 300; i++) {
+ qreal dpr = qreal(i) / 100.0;
+ QImage img(QSize(16, 16) * dpr, QImage::Format_RGB32);
+ img.fill(Qt::white);
+ img.setDevicePixelRatio(dpr);
+
+ for (const QRect &clipRect : clipRects) {
+ QPainter p(&img);
+ switch (clipType) {
+ case ClipRect:
+ p.setClipRect(clipRect);
+ break;
+ case ClipRectF:
+ p.setClipRect(QRectF(clipRect));
+ break;
+ case ClipRegionSingle:
+ p.setClipRegion(QRegion(clipRect));
+ break;
+ case ClipRegionMulti:
+ p.setClipRegion(multiRegion);
+ break;
+ case ClipPath:
+ p.rotate(0.001); // Avoid the path being optimized to a rectf
+ Q_FALLTHROUGH();
+ case ClipPathR: {
+ QPainterPath path;
+ path.addRect(clipRect); // Will be recognized and converted back to a rectf
+ p.setClipPath(path);
+ break;
+ }
+ default:
+ Q_ASSERT(false);
+ break;
+ }
+ p.fillRect(p.window(), fillColor);
+ if (clipType == ClipRegionMulti)
+ break; // once is enough, we're not using the clipRect anyway
+ }
+
+ int qtWidth = img.width() / 4;
+ int qtHeight = img.height() / 4;
+ QPoint imgCenter = img.rect().center();
+ const QRgb targetColor = img.pixel(qtWidth, qtHeight);
+
+ // Test that there are no gaps or overlaps where the cliprects meet
+ for (int offset = -2; offset <= 2; offset++) {
+ QCOMPARE(img.pixel(imgCenter.x() + offset, qtHeight), targetColor);
+ QCOMPARE(img.pixel(imgCenter.x() + offset, img.height() - qtHeight), targetColor);
+ QCOMPARE(img.pixel(qtWidth, imgCenter.y() + offset), targetColor);
+ QCOMPARE(img.pixel(img.width() - qtWidth, imgCenter.y() + offset), targetColor);
+ }
+ }
+}
+
#if defined(Q_OS_MAC)
// Only Mac supports sub pixel positions in raster engine currently
void tst_QPainter::drawText_subPixelPositionsInRaster_qtbug5053()
@@ -4816,10 +4930,7 @@ void tst_QPainter::QTBUG25153_drawLine()
{
QImage image(2, 2, QImage::Format_RGB32);
- QList<Qt::PenCapStyle> styles;
- styles << Qt::FlatCap << Qt::SquareCap << Qt::RoundCap;
-
- foreach (Qt::PenCapStyle style, styles) {
+ for (Qt::PenCapStyle style : {Qt::FlatCap, Qt::SquareCap, Qt::RoundCap}) {
image.fill(0xffffffff);
QPainter p(&image);
p.setPen(QPen(Qt::black, 0, Qt::SolidLine, style));
@@ -4930,16 +5041,16 @@ void tst_QPainter::blendARGBonRGB_data()
QTest::newRow("ARGB_PM over RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32_Premultiplied
<< QPainter::CompositionMode_SourceOver << qRgba(85, 0, 0, 85) << 85;
#if QT_CONFIG(raster_64bit)
- QTest::newRow("ARGB source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32
- << QPainter::CompositionMode_Source << qRgba(255, 0, 0, 85) << 85;
- QTest::newRow("ARGB source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32
- << QPainter::CompositionMode_Source << qRgba(255, 0, 0, 120) << 85;
+ QTest::newRow("ARGB@85 source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32
+ << QPainter::CompositionMode_Source << qRgba(255, 0, 0, 85) << 85;
+ QTest::newRow("ARGB@120 source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32
+ << QPainter::CompositionMode_Source << qRgba(255, 0, 0, 120) << 85;
#endif
- QTest::newRow("ARGB_PM source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32_Premultiplied
- << QPainter::CompositionMode_Source << qRgba(85, 0, 0, 85) << 85;
+ QTest::newRow("ARGB_PM@85 source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32_Premultiplied
+ << QPainter::CompositionMode_Source << qRgba(85, 0, 0, 85) << 85;
#if QT_CONFIG(raster_64bit)
- QTest::newRow("ARGB_PM source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32_Premultiplied
- << QPainter::CompositionMode_Source << qRgba(180, 0, 0, 180) << 170;
+ QTest::newRow("ARGB_PM@180 source RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32_Premultiplied
+ << QPainter::CompositionMode_Source << qRgba(180, 0, 0, 180) << 170;
#endif
QTest::newRow("ARGB source-in RGB30") << QImage::Format_RGB30 << QImage::Format_ARGB32
<< QPainter::CompositionMode_SourceIn << qRgba(255, 0, 0, 85) << 85;
@@ -5100,7 +5211,7 @@ void tst_QPainter::drawPolyline()
p.setPen(pen);
QVERIFY(p.pen().isCosmetic());
if (r) {
- for (int i = 0; i < points.count()-1; i++) {
+ for (int i = 0; i < points.size()-1; i++) {
p.drawLine(points.at(i), points.at(i+1));
}
} else {
@@ -5393,6 +5504,49 @@ void tst_QPainter::scaledDashes()
QVERIFY(backFound);
}
+#if QT_CONFIG(raster_fp)
+void tst_QPainter::hdrColors()
+{
+ QImage img(10, 10, QImage::Format_RGBA32FPx4_Premultiplied);
+ img.fill(Qt::transparent);
+
+ QColor color = QColor::fromRgbF(2.0f, -0.25f, 1.5f);
+ img.setPixelColor(2, 2, color);
+ QCOMPARE(img.pixelColor(2, 2), color);
+
+ {
+ QPainterPath path;
+ path.addEllipse(4, 4, 2, 2);
+ QPainter p(&img);
+ p.fillPath(path, color);
+ p.end();
+ }
+ QCOMPARE(img.pixelColor(4, 4), color);
+
+ img.fill(color);
+ QCOMPARE(img.pixelColor(8, 8), color);
+
+ QColor color2 = QColor::fromRgbF(0.0f, 1.25f, 2.5f);
+ {
+ QPainter p(&img);
+ p.fillRect(0, 0, 3, 3, color2);
+ p.end();
+ }
+ QCOMPARE(img.pixelColor(1, 1), color2);
+ QCOMPARE(img.pixelColor(4, 4), color);
+
+ QImage img2(10, 10, QImage::Format_RGBX32FPx4);
+ img2.fill(Qt::black); // fill to avoid random FP values like Inf which can break SourceOver composition
+ {
+ QPainter p(&img2);
+ p.drawImage(0, 0, img);
+ p.end();
+ }
+ QCOMPARE(img2.pixelColor(2, 2), color2);
+ QCOMPARE(img2.pixelColor(5, 5), color);
+}
+#endif
+
QTEST_MAIN(tst_QPainter)
#include "tst_qpainter.moc"
diff --git a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
index 53ea3ce9fb..7cb9e74216 100644
--- a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
+++ b/tests/auto/gui/painting/qpainter/utils/createImages/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.h>