summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/.prev_CMakeLists.txt19
-rw-r--r--tests/auto/gui/CMakeLists.txt19
-rw-r--r--tests/auto/gui/image/CMakeLists.txt17
-rw-r--r--tests/auto/gui/image/qicoimageformat/CMakeLists.txt49
-rw-r--r--tests/auto/gui/image/qicon/CMakeLists.txt94
-rw-r--r--tests/auto/gui/image/qiconhighdpi/CMakeLists.txt37
-rw-r--r--tests/auto/gui/image/qimage/CMakeLists.txt66
-rw-r--r--tests/auto/gui/image/qimageiohandler/CMakeLists.txt12
-rw-r--r--tests/auto/gui/image/qimagereader/CMakeLists.txt65
-rw-r--r--tests/auto/gui/image/qimagewriter/CMakeLists.txt50
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp4
-rw-r--r--tests/auto/gui/image/qmovie/CMakeLists.txt56
-rw-r--r--tests/auto/gui/image/qpicture/CMakeLists.txt12
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp31
-rw-r--r--tests/auto/gui/image/qpixmap/CMakeLists.txt107
-rw-r--r--tests/auto/gui/image/qpixmapcache/CMakeLists.txt13
-rw-r--r--tests/auto/gui/itemmodels/CMakeLists.txt4
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/CMakeLists.txt38
-rw-r--r--tests/auto/gui/kernel/kernel.pro13
-rw-r--r--tests/auto/gui/kernel/noqteventloop/CMakeLists.txt23
-rw-r--r--tests/auto/gui/kernel/qbackingstore/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qclipboard/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt26
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt26
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt24
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt24
-rw-r--r--tests/auto/gui/kernel/qcursor/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qdrag/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qevent/CMakeLists.txt10
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt16
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguiaction/.gitignore1
-rw-r--r--tests/auto/gui/kernel/qguiaction/qguiaction.pro4
-rw-r--r--tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp277
-rw-r--r--tests/auto/gui/kernel/qguiactiongroup/.gitignore1
-rw-r--r--tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro4
-rw-r--r--tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp235
-rw-r--r--tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt45
-rw-r--r--tests/auto/gui/kernel/qguiapplication/BLACKLIST3
-rw-r--r--tests/auto/gui/kernel/qguiapplication/CMakeLists.txt55
-rw-r--r--tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt28
-rw-r--r--tests/auto/gui/kernel/qguieventloop/CMakeLists.txt27
-rw-r--r--tests/auto/gui/kernel/qguimetatype/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp35
-rw-r--r--tests/auto/gui/kernel/qguishortcut/qguishortcut.pro4
-rw-r--r--tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp82
-rw-r--r--tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt13
-rw-r--r--tests/auto/gui/kernel/qguitimer/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qguivariant/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt38
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp22
-rw-r--r--tests/auto/gui/kernel/qinputmethod/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qkeyevent/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp6
-rw-r--r--tests/auto/gui/kernel/qkeysequence/CMakeLists.txt28
-rw-r--r--tests/auto/gui/kernel/qmouseevent/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt13
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt15
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro2
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp2
-rw-r--r--tests/auto/gui/kernel/qpalette/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp89
-rw-r--r--tests/auto/gui/kernel/qpixelformat/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qscreen/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qtouchevent/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qwindow/CMakeLists.txt22
-rw-r--r--tests/auto/gui/math3d/CMakeLists.txt3
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt14
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp60
-rw-r--r--tests/auto/gui/math3d/qquaternion/CMakeLists.txt12
-rw-r--r--tests/auto/gui/math3d/qvectornd/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/CMakeLists.txt19
-rw-r--r--tests/auto/gui/painting/painting.pro1
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp37
-rw-r--r--tests/auto/gui/painting/qpagesize/CMakeLists.txt14
-rw-r--r--tests/auto/gui/painting/qpaintengine/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp44
-rw-r--r--tests/auto/gui/painting/qpainterpath/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qpen/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qtransform/tst_qtransform.cpp63
-rw-r--r--tests/auto/gui/painting/qwmatrix/qwmatrix.pro6
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp334
-rw-r--r--tests/auto/gui/qopengl/CMakeLists.txt23
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp13
-rw-r--r--tests/auto/gui/qopenglconfig/CMakeLists.txt18
-rw-r--r--tests/auto/gui/qvulkan/CMakeLists.txt14
-rw-r--r--tests/auto/gui/rhi/CMakeLists.txt4
-rw-r--r--tests/auto/gui/rhi/qrhi/CMakeLists.txt26
-rw-r--r--tests/auto/gui/rhi/qshader/CMakeLists.txt26
-rw-r--r--tests/auto/gui/text/CMakeLists.txt41
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt12
-rw-r--r--tests/auto/gui/text/qcssparser/CMakeLists.txt57
-rw-r--r--tests/auto/gui/text/qfont/CMakeLists.txt35
-rw-r--r--tests/auto/gui/text/qfontcache/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qfontdatabase/CMakeLists.txt47
-rw-r--r--tests/auto/gui/text/qfontmetrics/CMakeLists.txt31
-rw-r--r--tests/auto/gui/text/qglyphrun/CMakeLists.txt28
-rw-r--r--tests/auto/gui/text/qinputcontrol/CMakeLists.txt13
-rw-r--r--tests/auto/gui/text/qrawfont/CMakeLists.txt32
-rw-r--r--tests/auto/gui/text/qstatictext/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt20
-rw-r--r--tests/auto/gui/text/qtextblock/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextcursor/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextdocument/CMakeLists.txt16
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt20
-rw-r--r--tests/auto/gui/text/qtextformat/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextlayout/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextlist/CMakeLists.txt15
-rw-r--r--tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qtextobject/CMakeLists.txt20
-rw-r--r--tests/auto/gui/text/qtextodfwriter/CMakeLists.txt16
-rw-r--r--tests/auto/gui/text/qtextpiecetable/CMakeLists.txt25
-rw-r--r--tests/auto/gui/text/qtextscriptengine/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt17
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp3
-rw-r--r--tests/auto/gui/text/qtexttable/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qzip/CMakeLists.txt35
-rw-r--r--tests/auto/gui/util/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/gui/util/qdesktopservices/CMakeLists.txt14
-rw-r--r--tests/auto/gui/util/qdoublevalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qintvalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qregexpvalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qshadergenerator/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadergraph/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadergraphloader/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadernodes/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadernodesloader/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp4
-rw-r--r--tests/auto/gui/util/qtexturefilereader/CMakeLists.txt30
141 files changed, 3199 insertions, 598 deletions
diff --git a/tests/auto/gui/.prev_CMakeLists.txt b/tests/auto/gui/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8cbfa78aad
--- /dev/null
+++ b/tests/auto/gui/.prev_CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from gui.pro.
+
+add_subdirectory(kernel)
+if(NOT APPLE_UIKIT)
+ add_subdirectory(image)
+ add_subdirectory(math3d)
+ add_subdirectory(painting)
+ add_subdirectory(text)
+ add_subdirectory(util)
+ add_subdirectory(itemmodels)
+ add_subdirectory(rhi)
+endif()
+if(QT_FEATURE_opengl AND NOT APPLE_UIKIT AND NOT WINRT)
+ add_subdirectory(qopenglconfig)
+ add_subdirectory(qopengl)
+endif()
+if(QT_FEATURE_vulkan AND NOT APPLE_UIKIT)
+ add_subdirectory(qvulkan)
+endif()
diff --git a/tests/auto/gui/CMakeLists.txt b/tests/auto/gui/CMakeLists.txt
new file mode 100644
index 0000000000..9a1312bd48
--- /dev/null
+++ b/tests/auto/gui/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from gui.pro.
+
+add_subdirectory(kernel)
+if(NOT APPLE_UIKIT)
+ add_subdirectory(image)
+ add_subdirectory(math3d)
+ add_subdirectory(painting)
+ add_subdirectory(text)
+ add_subdirectory(util)
+ add_subdirectory(itemmodels)
+ add_subdirectory(rhi)
+endif()
+if(QT_FEATURE_opengl AND NOT APPLE_UIKIT AND NOT WINRT)
+ add_subdirectory(qopenglconfig)
+ add_subdirectory(qopengl)
+endif()
+if(QT_FEATURE_vulkan AND NOT APPLE_UIKIT)
+ add_subdirectory(qvulkan)
+endif()
diff --git a/tests/auto/gui/image/CMakeLists.txt b/tests/auto/gui/image/CMakeLists.txt
new file mode 100644
index 0000000000..8ae016a8f8
--- /dev/null
+++ b/tests/auto/gui/image/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from image.pro.
+
+if(TARGET Qt::Network)
+ add_subdirectory(qimagereader)
+endif()
+add_subdirectory(qicoimageformat)
+add_subdirectory(qpixmap)
+add_subdirectory(qimage)
+add_subdirectory(qimageiohandler)
+add_subdirectory(qimagewriter)
+add_subdirectory(qmovie)
+add_subdirectory(qpicture)
+add_subdirectory(qicon)
+add_subdirectory(qiconhighdpi)
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qpixmapcache)
+endif()
diff --git a/tests/auto/gui/image/qicoimageformat/CMakeLists.txt b/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
new file mode 100644
index 0000000000..0c8393631a
--- /dev/null
+++ b/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from qicoimageformat.pro.
+
+#####################################################################
+## tst_qicoimageformat Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ icons/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qicoimageformat
+ SOURCES
+ tst_qicoimageformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(qicoimageformat_resource_files
+ "icons/invalid/35floppy.ico"
+ "icons/valid/35FLOPPY.ICO"
+ "icons/valid/AddPerfMon.ico"
+ "icons/valid/App.ico"
+ "icons/valid/Obj_N2_Internal_Mem.ico"
+ "icons/valid/Qt.ico"
+ "icons/valid/Status_Play.ico"
+ "icons/valid/TIMER01.ICO"
+ "icons/valid/WORLD.ico"
+ "icons/valid/WORLDH.ico"
+ "icons/valid/abcardWindow.ico"
+ "icons/valid/semitransparent.ico"
+ "icons/valid/trolltechlogo_tiny.ico"
+ "icons/valid/yellow.cur"
+ )
+
+ add_qt_resource(tst_qicoimageformat "qicoimageformat"
+ PREFIX
+ "/"
+ FILES
+ ${qicoimageformat_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/image/qicon/CMakeLists.txt b/tests/auto/gui/image/qicon/CMakeLists.txt
new file mode 100644
index 0000000000..81f5390d79
--- /dev/null
+++ b/tests/auto/gui/image/qicon/CMakeLists.txt
@@ -0,0 +1,94 @@
+# Generated from qicon.pro.
+
+#####################################################################
+## tst_qicon Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ icons/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ second_icons/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ fallback_icons/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.png)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.svg)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.svgz)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qicon
+ SOURCES
+ tst_qicon.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(tst_qicon_resource_files
+ "./fallback_icons/red.png"
+ "./icons/testtheme/16x16/actions/appointment-new.png"
+ "./icons/testtheme/22x22/actions/appointment-new.png"
+ "./icons/testtheme/index.theme"
+ "./icons/testtheme/scalable/actions/svg-only.svg"
+ "./icons/themeparent/16x16/actions/address-book-new.png"
+ "./icons/themeparent/16x16/actions/appointment-new.png"
+ "./icons/themeparent/22x22/actions/address-book-new.png"
+ "./icons/themeparent/22x22/actions/appointment-new.png"
+ "./icons/themeparent/32x32/actions/address-book-new.png"
+ "./icons/themeparent/32x32/actions/appointment-new.png"
+ "./icons/themeparent/icon-theme.cache"
+ "./icons/themeparent/index.theme"
+ "./icons/themeparent/scalable/actions/address-book-new.svg"
+ "./icons/themeparent/scalable/actions/appointment-new.svg"
+ "./second_icons/testtheme/32x32/actions/appointment-new.png"
+ "./styles/commonstyle/images/standardbutton-open-128.png"
+ "./styles/commonstyle/images/standardbutton-open-16.png"
+ "./styles/commonstyle/images/standardbutton-open-32.png"
+ "./styles/commonstyle/images/standardbutton-save-128.png"
+ "./styles/commonstyle/images/standardbutton-save-16.png"
+ "./styles/commonstyle/images/standardbutton-save-32.png"
+ "image.png"
+ "rect.png"
+ "tst_qicon.cpp"
+)
+
+add_qt_resource(tst_qicon "tst_qicon"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qicon_resource_files}
+)
+set(qmake_immediate_resource_files
+ "tst_qicon.cpp"
+)
+
+add_qt_resource(tst_qicon "qmake_immediate"
+ PREFIX
+ "/"
+ FILES
+ ${qmake_immediate_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qicon CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt b/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
new file mode 100644
index 0000000000..6f6aaedca5
--- /dev/null
+++ b/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from qiconhighdpi.pro.
+
+#####################################################################
+## tst_qiconhighdpi Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ icons/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qiconhighdpi
+ SOURCES
+ tst_qiconhighdpi.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(tst_qiconhighdpi_resource_files
+ "icons/misc/button.9.png"
+ "icons/misc/button@2x.9.png"
+ "icons/testtheme/16x16/actions/appointment-new.png"
+ "icons/testtheme/22x22/actions/appointment-new.png"
+ "icons/testtheme/22x22@2/actions/appointment-new.png"
+ "icons/testtheme/index.theme"
+)
+
+add_qt_resource(tst_qiconhighdpi "tst_qiconhighdpi"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qiconhighdpi_resource_files}
+)
+
diff --git a/tests/auto/gui/image/qimage/CMakeLists.txt b/tests/auto/gui/image/qimage/CMakeLists.txt
new file mode 100644
index 0000000000..865f1124b9
--- /dev/null
+++ b/tests/auto/gui/image/qimage/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Generated from qimage.pro.
+
+#####################################################################
+## tst_qimage Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qimage
+ SOURCES
+ tst_qimage.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(qimage_resource_files
+ "images/image.bmp"
+ "images/image.gif"
+ "images/image.ico"
+ "images/image.jpg"
+ "images/image.pbm"
+ "images/image.pgm"
+ "images/image.png"
+ "images/image.ppm"
+ "images/image.xbm"
+ "images/image.xpm"
+ "images/jpeg_exif_orientation_value_1.jpg"
+ "images/jpeg_exif_orientation_value_2.jpg"
+ "images/jpeg_exif_orientation_value_3.jpg"
+ "images/jpeg_exif_orientation_value_4.jpg"
+ "images/jpeg_exif_orientation_value_5.jpg"
+ "images/jpeg_exif_orientation_value_6.jpg"
+ "images/jpeg_exif_orientation_value_7.jpg"
+ "images/jpeg_exif_orientation_value_8.jpg"
+ )
+
+ add_qt_resource(tst_qimage "qimage"
+ PREFIX
+ "/"
+ FILES
+ ${qimage_resource_files}
+ )
+endif()
+
+extend_target(tst_qimage CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ gdi32
+ user32
+)
+
+extend_target(tst_qimage CONDITION APPLE
+ PUBLIC_LIBRARIES
+ ${FWCoreGraphics}
+)
diff --git a/tests/auto/gui/image/qimageiohandler/CMakeLists.txt b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
new file mode 100644
index 0000000000..23e5e98b16
--- /dev/null
+++ b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qimageiohandler.pro.
+
+#####################################################################
+## tst_qimageiohandler Test:
+#####################################################################
+
+add_qt_test(tst_qimageiohandler
+ SOURCES
+ tst_qimageiohandler.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/image/qimagereader/CMakeLists.txt b/tests/auto/gui/image/qimagereader/CMakeLists.txt
new file mode 100644
index 0000000000..8a96fa18cf
--- /dev/null
+++ b/tests/auto/gui/image/qimagereader/CMakeLists.txt
@@ -0,0 +1,65 @@
+# Generated from qimagereader.pro.
+
+#####################################################################
+## tst_qimagereader Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ baseline/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qimagereader
+ SOURCES
+ tst_qimagereader.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+file(GLOB resource_glob_0 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "images/*")
+foreach(file IN LISTS resource_glob_0)
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}")
+endforeach()
+
+# Resources:
+set(qmake_immediate_resource_files
+ ${resource_glob_0}
+)
+
+add_qt_resource(tst_qimagereader "qmake_immediate"
+ PREFIX
+ "/"
+ FILES
+ ${qmake_immediate_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qimagereader.pro:<TRUE>:
+# MOC_DIR = "tmp"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "images/kollada-noext"
+ "images/trans.gif"
+ )
+
+ add_qt_resource(tst_qimagereader "android_testdata"
+ PREFIX
+ "/"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/image/qimagewriter/CMakeLists.txt b/tests/auto/gui/image/qimagewriter/CMakeLists.txt
new file mode 100644
index 0000000000..1a04dfbce0
--- /dev/null
+++ b/tests/auto/gui/image/qimagewriter/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Generated from qimagewriter.pro.
+
+#####################################################################
+## tst_qimagewriter Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qimagewriter
+ SOURCES
+ tst_qimagewriter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qimagewriter.pro:<TRUE>:
+# MOC_DIR = "tmp"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(qimagewriter_resource_files
+ "images/YCbCr_cmyk.jpg"
+ "images/YCbCr_rgb.jpg"
+ "images/beavis.jpg"
+ "images/colorful.bmp"
+ "images/earth.gif"
+ "images/font.bmp"
+ "images/gnus.xbm"
+ "images/kollada.png"
+ "images/marble.xpm"
+ "images/ship63.pbm"
+ "images/teapot.ppm"
+ "images/trolltech.gif"
+ )
+
+ add_qt_resource(tst_qimagewriter "qimagewriter"
+ PREFIX
+ "/"
+ FILES
+ ${qimagewriter_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index aaa8475c74..247f6443c1 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -94,8 +94,8 @@ private:
static void initializePadding(QImage *image)
{
- int effectiveBytesPerLine = (image->width() * image->depth() + 7) / 8;
- int paddingBytes = image->bytesPerLine() - effectiveBytesPerLine;
+ qsizetype effectiveBytesPerLine = (qsizetype(image->width()) * image->depth() + 7) / 8;
+ qsizetype paddingBytes = image->bytesPerLine() - effectiveBytesPerLine;
if (paddingBytes == 0)
return;
for (int y = 0; y < image->height(); ++y) {
diff --git a/tests/auto/gui/image/qmovie/CMakeLists.txt b/tests/auto/gui/image/qmovie/CMakeLists.txt
new file mode 100644
index 0000000000..bc841b5d29
--- /dev/null
+++ b/tests/auto/gui/image/qmovie/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from qmovie.pro.
+
+#####################################################################
+## tst_qmovie Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ animations/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qmovie
+ SOURCES
+ tst_qmovie.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(resources_resource_files
+ "animations/comicsecard.gif"
+ "animations/corrupt.gif"
+ "animations/trolltech.gif"
+)
+
+add_qt_resource(tst_qmovie "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qmovie.pro:<TRUE>:
+# MOC_DIR = "tmp"
+# QT_FOR_CONFIG = "gui-private"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmovie CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
+
+extend_target(tst_qmovie CONDITION QT_FEATURE_gif
+ DEFINES
+ QTEST_HAVE_GIF
+)
+
+extend_target(tst_qmovie CONDITION QT_FEATURE_jpeg
+ DEFINES
+ QTEST_HAVE_JPEG
+)
diff --git a/tests/auto/gui/image/qpicture/CMakeLists.txt b/tests/auto/gui/image/qpicture/CMakeLists.txt
new file mode 100644
index 0000000000..625d19b3a5
--- /dev/null
+++ b/tests/auto/gui/image/qpicture/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpicture.pro.
+
+#####################################################################
+## tst_qpicture Test:
+#####################################################################
+
+add_qt_test(tst_qpicture
+ SOURCES
+ tst_qpicture.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index ec6bb8dcee..6287960457 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -37,6 +37,8 @@
#include <qscreen.h>
#include <limits.h>
+#ifndef QT_NO_PICTURE
+
class tst_QPicture : public QObject
{
Q_OBJECT
@@ -45,7 +47,6 @@ public:
tst_QPicture();
private slots:
- void getSetCheck();
void devType();
void paintingActive();
void boundingRect();
@@ -56,31 +57,6 @@ private slots:
void boundaryValues();
};
-// Testing get/set functions
-void tst_QPicture::getSetCheck()
-{
- QPictureIO obj1;
- // const QPicture & QPictureIO::picture()
- // void QPictureIO::setPicture(const QPicture &)
- // const char * QPictureIO::format()
- // void QPictureIO::setFormat(const char *)
- const char var2[] = "PNG";
- obj1.setFormat(var2);
- QCOMPARE(var2, obj1.format());
- obj1.setFormat((char *)0);
- // The format is stored internally in a QString, so return is always a valid char *
- QVERIFY(QString(obj1.format()).isEmpty());
-
- // const char * QPictureIO::parameters()
- // void QPictureIO::setParameters(const char *)
- const char var3[] = "Bogus data";
- obj1.setParameters(var3);
- QCOMPARE(var3, obj1.parameters());
- obj1.setParameters((char *)0);
- // The format is stored internally in a QString, so return is always a valid char *
- QVERIFY(QString(obj1.parameters()).isEmpty());
-}
-
tst_QPicture::tst_QPicture()
{
}
@@ -316,6 +292,7 @@ void tst_QPicture::boundaryValues()
painter.end();
}
-
QTEST_MAIN(tst_QPicture)
#include "tst_qpicture.moc"
+
+#endif // QT_NO_PICTURE
diff --git a/tests/auto/gui/image/qpixmap/CMakeLists.txt b/tests/auto/gui/image/qpixmap/CMakeLists.txt
new file mode 100644
index 0000000000..f6a83aa0da
--- /dev/null
+++ b/tests/auto/gui/image/qpixmap/CMakeLists.txt
@@ -0,0 +1,107 @@
+# Generated from qpixmap.pro.
+
+#####################################################################
+## tst_qpixmap Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ convertFromImage/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ convertFromToHICON/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ loadFromData/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qpixmap
+ SOURCES
+ tst_qpixmap.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qpixmap_resource_files
+ "convertFromImage/task31722_0/img1.png"
+ "convertFromImage/task31722_0/img2.png"
+ "convertFromImage/task31722_1/img1.png"
+ "convertFromImage/task31722_1/img2.png"
+ "convertFromToHICON/icon_32bpp.ico"
+ "convertFromToHICON/icon_32bpp_16x16.png"
+ "convertFromToHICON/icon_32bpp_256x256.png"
+ "convertFromToHICON/icon_32bpp_32x32.png"
+ "convertFromToHICON/icon_32bpp_48x48.png"
+ "convertFromToHICON/icon_8bpp.ico"
+ "convertFromToHICON/icon_8bpp_16x16.png"
+ "convertFromToHICON/icon_8bpp_32x32.png"
+ "convertFromToHICON/icon_8bpp_48x48.png"
+ "images/designer.png"
+ "images/dx_-10_dy_-10_50_50_100_100.png"
+ "images/dx_-10_dy_-10_x_y_w_h.png"
+ "images/dx_-10_dy_0_50_50_100_100.png"
+ "images/dx_-10_dy_0_x_y_w_h.png"
+ "images/dx_-128_dy_-128_x_y_w_h.png"
+ "images/dx_-128_dy_0_x_y_w_h.png"
+ "images/dx_0_dy_-10_50_50_100_100.png"
+ "images/dx_0_dy_-10_x_y_w_h.png"
+ "images/dx_0_dy_-128_x_y_w_h.png"
+ "images/dx_0_dy_0_50_50_100_100.png"
+ "images/dx_0_dy_0_null.png"
+ "images/dx_0_dy_0_x_y_w_h.png"
+ "images/dx_0_dy_10_50_50_100_100.png"
+ "images/dx_0_dy_10_x_y_w_h.png"
+ "images/dx_0_dy_128_x_y_w_h.png"
+ "images/dx_0_dy_1_null.png"
+ "images/dx_10_dy_0_50_50_100_100.png"
+ "images/dx_10_dy_0_x_y_w_h.png"
+ "images/dx_10_dy_10_50_50_100_100.png"
+ "images/dx_10_dy_10_x_y_w_h.png"
+ "images/dx_128_dy_0_x_y_w_h.png"
+ "images/dx_128_dy_128_64_64_128_128.png"
+ "images/dx_128_dy_128_x_y_w_h.png"
+ "images/dx_1_dy_0_null.png"
+ "loadFromData/designer_argb32.png"
+ "loadFromData/designer_indexed8_no_alpha.gif"
+ "loadFromData/designer_indexed8_no_alpha.png"
+ "loadFromData/designer_indexed8_no_alpha_animated.gif"
+ "loadFromData/designer_indexed8_with_alpha.gif"
+ "loadFromData/designer_indexed8_with_alpha.png"
+ "loadFromData/designer_indexed8_with_alpha_animated.gif"
+ "loadFromData/designer_rgb32.jpg"
+ "loadFromData/designer_rgb32.png"
+)
+
+add_qt_resource(tst_qpixmap "qpixmap"
+ PREFIX
+ "/"
+ FILES
+ ${qpixmap_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qpixmap CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+extend_target(tst_qpixmap CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ gdi32
+ user32
+)
diff --git a/tests/auto/gui/image/qpixmapcache/CMakeLists.txt b/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
new file mode 100644
index 0000000000..ef73f60ca6
--- /dev/null
+++ b/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qpixmapcache.pro.
+
+#####################################################################
+## tst_qpixmapcache Test:
+#####################################################################
+
+add_qt_test(tst_qpixmapcache
+ SOURCES
+ tst_qpixmapcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/itemmodels/CMakeLists.txt b/tests/auto/gui/itemmodels/CMakeLists.txt
new file mode 100644
index 0000000000..196168b1b2
--- /dev/null
+++ b/tests/auto/gui/itemmodels/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_subdirectory("qstandarditem")
+if (QT_FEATURE_widgets)
+# add_subdirectory("qstandarditemmodel")
+endif()
diff --git a/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
new file mode 100644
index 0000000000..8a19f6afaf
--- /dev/null
+++ b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstandarditem.pro.
+
+#####################################################################
+## tst_qstandarditem Test:
+#####################################################################
+
+add_qt_test(tst_qstandarditem
+ SOURCES
+ tst_qstandarditem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/CMakeLists.txt b/tests/auto/gui/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..b2397bed19
--- /dev/null
+++ b/tests/auto/gui/kernel/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qbackingstore)
+add_subdirectory(qcursor)
+add_subdirectory(qdrag)
+add_subdirectory(qevent)
+add_subdirectory(qfileopenevent)
+add_subdirectory(qguieventdispatcher)
+add_subdirectory(qguimetatype)
+add_subdirectory(qguitimer)
+add_subdirectory(qguivariant)
+add_subdirectory(qinputmethod)
+add_subdirectory(qkeyevent)
+add_subdirectory(qkeysequence)
+add_subdirectory(qmouseevent)
+add_subdirectory(qpalette)
+add_subdirectory(qscreen)
+add_subdirectory(qsurfaceformat)
+add_subdirectory(qwindow)
+add_subdirectory(qguiapplication)
+add_subdirectory(qpixelformat)
+add_subdirectory(qrasterwindow)
+if(NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qclipboard)
+endif()
+if(TARGET Qt::Network)
+ add_subdirectory(qguieventloop)
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(qmouseevent_modal)
+ add_subdirectory(qtouchevent)
+endif()
+if(QT_FEATURE_opengl)
+ add_subdirectory(qopenglwindow)
+endif()
+if(TARGET Qt::Network AND WIN32 AND NOT WINRT)
+ add_subdirectory(noqteventloop)
+endif()
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index 42135dae24..106e9050b8 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -4,11 +4,14 @@ SUBDIRS=\
qclipboard \
qcursor \
qdrag \
+ qguiaction \
+ qguiactiongroup \
qevent \
qfileopenevent \
qguieventdispatcher \
qguieventloop \
qguimetatype \
+ qguishortcut \
qguitimer \
qguivariant \
qhighdpiscaling \
@@ -29,6 +32,12 @@ SUBDIRS=\
win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
+!qtConfig(shortcut): SUBDIRS -= \
+ qkeysequence \
+ qguishortcut \
+ qguimetatype \
+ qguivariant
+
!qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \
qtouchevent
@@ -36,6 +45,10 @@ win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
!qtHaveModule(network): SUBDIRS -= \
qguieventloop
+!qtConfig(action): SUBDIRS -= \
+ qguiaction \
+ qguiactiongroup
+
!qtConfig(highdpiscaling): SUBDIRS -= qhighdpiscaling
!qtConfig(opengl): SUBDIRS -= qopenglwindow
diff --git a/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
new file mode 100644
index 0000000000..82de116f8d
--- /dev/null
+++ b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from noqteventloop.pro.
+
+#####################################################################
+## tst_noqteventloop Test:
+#####################################################################
+
+add_qt_test(tst_noqteventloop
+ SOURCES
+ tst_noqteventloop.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_noqteventloop CONDITION QT_FEATURE_dynamicgl AND WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt b/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
new file mode 100644
index 0000000000..639e88fb4c
--- /dev/null
+++ b/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qbackingstore.pro.
+
+#####################################################################
+## tst_qbackingstore Test:
+#####################################################################
+
+add_qt_test(tst_qbackingstore
+ SOURCES
+ tst_qbackingstore.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qclipboard/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
new file mode 100644
index 0000000000..b795d32520
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from qclipboard.pro.
+
+add_subdirectory(test)
+if(NOT WINRT)
+ add_subdirectory(copier)
+ add_subdirectory(paster)
+endif()
diff --git a/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
new file mode 100644
index 0000000000..4595093b3b
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from copier.pro.
+
+#####################################################################
+## copier Binary:
+#####################################################################
+
+# special case begin
+set(win32_args)
+if (WIN32)
+ set(win32_args OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+endif()
+# special case end
+
+add_qt_executable(copier
+ ${win32_args} # special case
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:copier.pro:WIN32:
+# DESTDIR = "../copier"
diff --git a/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
new file mode 100644
index 0000000000..b9f118929c
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from paster.pro.
+
+#####################################################################
+## paster Binary:
+#####################################################################
+
+# special case begin
+set(win32_args)
+if (WIN32)
+ set(win32_args OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+endif()
+# special case end
+
+add_qt_executable(paster
+ ${win32_args} # special case
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:paster.pro:WIN32:
+# DESTDIR = "../paster"
diff --git a/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..620ef96a5b
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qclipboard Test:
+#####################################################################
+
+add_qt_test(tst_qclipboard
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qclipboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qclipboard CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../copier/copier" "../paster/paster"
diff --git a/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
new file mode 100644
index 0000000000..620ef96a5b
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qclipboard Test:
+#####################################################################
+
+add_qt_test(tst_qclipboard
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qclipboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qclipboard CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../copier/copier" "../paster/paster"
diff --git a/tests/auto/gui/kernel/qcursor/CMakeLists.txt b/tests/auto/gui/kernel/qcursor/CMakeLists.txt
new file mode 100644
index 0000000000..8f4062a42a
--- /dev/null
+++ b/tests/auto/gui/kernel/qcursor/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qcursor.pro.
+
+#####################################################################
+## tst_qcursor Test:
+#####################################################################
+
+add_qt_test(tst_qcursor
+ SOURCES
+ tst_qcursor.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qdrag/CMakeLists.txt b/tests/auto/gui/kernel/qdrag/CMakeLists.txt
new file mode 100644
index 0000000000..84bceaf0de
--- /dev/null
+++ b/tests/auto/gui/kernel/qdrag/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdrag.pro.
+
+#####################################################################
+## tst_qdrag Test:
+#####################################################################
+
+add_qt_test(tst_qdrag
+ SOURCES
+ tst_qdrag.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qevent/CMakeLists.txt b/tests/auto/gui/kernel/qevent/CMakeLists.txt
new file mode 100644
index 0000000000..01d6db7225
--- /dev/null
+++ b/tests/auto/gui/kernel/qevent/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qevent.pro.
+
+#####################################################################
+## tst_qevent Test:
+#####################################################################
+
+add_qt_test(tst_qevent
+ SOURCES
+ tst_qevent.cpp
+)
diff --git a/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
new file mode 100644
index 0000000000..2404833737
--- /dev/null
+++ b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qfileopenevent.pro.
+
+add_subdirectory(test)
+add_subdirectory(qfileopeneventexternal)
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
new file mode 100644
index 0000000000..0c50f7ff56
--- /dev/null
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qfileopeneventexternal.pro.
+
+#####################################################################
+## qfileopeneventexternal Binary:
+#####################################################################
+
+add_qt_executable(qfileopeneventexternal
+ GUI
+ SOURCES
+ qfileopeneventexternal.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:qfileopeneventexternal.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
new file mode 100644
index 0000000000..6695ef42b3
--- /dev/null
+++ b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qfileopenevent Test:
+#####################################################################
+
+add_qt_test(tst_qfileopenevent
+ SOURCES
+ tst_qfileopenevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguiaction/.gitignore b/tests/auto/gui/kernel/qguiaction/.gitignore
new file mode 100644
index 0000000000..bf81f5bf2c
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiaction/.gitignore
@@ -0,0 +1 @@
+tst_qaction
diff --git a/tests/auto/gui/kernel/qguiaction/qguiaction.pro b/tests/auto/gui/kernel/qguiaction/qguiaction.pro
new file mode 100644
index 0000000000..2a39636119
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiaction/qguiaction.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qguiaction
+QT += gui-private core-private testlib
+SOURCES += tst_qguiaction.cpp
diff --git a/tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp b/tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp
new file mode 100644
index 0000000000..cc607c644f
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp
@@ -0,0 +1,277 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <qguiapplication.h>
+#include <qevent.h>
+#include <qguiaction.h>
+#include <qguiactiongroup.h>
+#include <qpa/qplatformtheme.h>
+
+#include <private/qguiapplication_p.h>
+
+class tst_QGuiAction : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QGuiAction();
+
+private slots:
+ void cleanup();
+ void getSetCheck();
+ void setText_data();
+ void setText();
+ void setIconText_data() { setText_data(); }
+ void setIconText();
+#if QT_CONFIG(shortcut)
+ void setStandardKeys();
+ void task200823_tooltip();
+#endif
+ void task229128TriggeredSignalWithoutActiongroup();
+ void setData();
+ void setEnabledSetVisible();
+ void setCheckabledSetChecked();
+
+private:
+ const int m_keyboardScheme;
+};
+
+tst_QGuiAction::tst_QGuiAction()
+ : m_keyboardScheme(QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt())
+{
+}
+
+void tst_QGuiAction::cleanup()
+{
+ QVERIFY(QGuiApplication::topLevelWindows().isEmpty());
+}
+
+// Testing get/set functions
+void tst_QGuiAction::getSetCheck()
+{
+ QGuiAction obj1(nullptr);
+ // QActionGroup * QAction::actionGroup()
+ // void QAction::setActionGroup(QActionGroup *)
+ auto var1 = new QGuiActionGroup(nullptr);
+ obj1.setActionGroup(var1);
+ QCOMPARE(var1, obj1.guiActionGroup());
+ obj1.setActionGroup(nullptr);
+ QCOMPARE(obj1.guiActionGroup(), nullptr);
+ delete var1;
+
+ QCOMPARE(obj1.priority(), QGuiAction::NormalPriority);
+ obj1.setPriority(QGuiAction::LowPriority);
+ QCOMPARE(obj1.priority(), QGuiAction::LowPriority);
+}
+
+void tst_QGuiAction::setText_data()
+{
+ QTest::addColumn<QString>("text");
+ QTest::addColumn<QString>("iconText");
+ QTest::addColumn<QString>("textFromIconText");
+
+ //next we fill it with data
+ QTest::newRow("Normal") << "Action" << "Action" << "Action";
+ QTest::newRow("Ampersand") << "Search && Destroy" << "Search & Destroy" << "Search && Destroy";
+ QTest::newRow("Mnemonic and ellipsis") << "O&pen File ..." << "Open File" << "Open File";
+}
+
+void tst_QGuiAction::setText()
+{
+ QFETCH(QString, text);
+
+ QGuiAction action(nullptr);
+ action.setText(text);
+
+ QCOMPARE(action.text(), text);
+
+ QFETCH(QString, iconText);
+ QCOMPARE(action.iconText(), iconText);
+}
+
+void tst_QGuiAction::setIconText()
+{
+ QFETCH(QString, iconText);
+
+ QGuiAction action(nullptr);
+ action.setIconText(iconText);
+ QCOMPARE(action.iconText(), iconText);
+
+ QFETCH(QString, textFromIconText);
+ QCOMPARE(action.text(), textFromIconText);
+}
+
+#if QT_CONFIG(shortcut)
+
+//basic testing of standard keys
+void tst_QGuiAction::setStandardKeys()
+{
+ QGuiAction act(nullptr);
+ act.setShortcut(QKeySequence("CTRL+L"));
+ QList<QKeySequence> list;
+ act.setShortcuts(list);
+ act.setShortcuts(QKeySequence::Copy);
+ QCOMPARE(act.shortcut(), act.shortcuts().constFirst());
+
+ QList<QKeySequence> expected;
+ const QKeySequence ctrlC = QKeySequence(QStringLiteral("CTRL+C"));
+ const QKeySequence ctrlInsert = QKeySequence(QStringLiteral("CTRL+INSERT"));
+ switch (m_keyboardScheme) {
+ case QPlatformTheme::MacKeyboardScheme:
+ expected << ctrlC;
+ break;
+ case QPlatformTheme::WindowsKeyboardScheme:
+ expected << ctrlC << ctrlInsert;
+ break;
+ default: // X11
+ expected << ctrlC << ctrlInsert << QKeySequence(QStringLiteral("F16"));
+ break;
+ }
+
+ QCOMPARE(act.shortcuts(), expected);
+}
+
+void tst_QGuiAction::task200823_tooltip()
+{
+ const QScopedPointer<QGuiAction> action(new QGuiAction("foo", nullptr));
+ QString shortcut("ctrl+o");
+ action->setShortcut(shortcut);
+
+ // we want a non-standard tooltip that shows the shortcut
+ action->setToolTip(action->text() + QLatin1String(" (") + action->shortcut().toString() + QLatin1Char(')'));
+
+ QString ref = QLatin1String("foo (") + QKeySequence(shortcut).toString() + QLatin1Char(')');
+ QCOMPARE(action->toolTip(), ref);
+}
+
+#endif // QT_CONFIG(shortcut)
+
+void tst_QGuiAction::task229128TriggeredSignalWithoutActiongroup()
+{
+ // test without a group
+ const QScopedPointer<QGuiAction> actionWithoutGroup(new QGuiAction("Test", nullptr));
+ QSignalSpy spyWithoutGroup(actionWithoutGroup.data(), QOverload<bool>::of(&QGuiAction::triggered));
+ QCOMPARE(spyWithoutGroup.count(), 0);
+ actionWithoutGroup->trigger();
+ // signal should be emitted
+ QCOMPARE(spyWithoutGroup.count(), 1);
+
+ // it is now a checkable checked action
+ actionWithoutGroup->setCheckable(true);
+ actionWithoutGroup->setChecked(true);
+ spyWithoutGroup.clear();
+ QCOMPARE(spyWithoutGroup.count(), 0);
+ actionWithoutGroup->trigger();
+ // signal should be emitted
+ QCOMPARE(spyWithoutGroup.count(), 1);
+}
+
+void tst_QGuiAction::setData() // QTBUG-62006
+{
+ QGuiAction act(nullptr);
+ QSignalSpy spy(&act, &QGuiAction::changed);
+ QCOMPARE(act.data(), QVariant());
+ QCOMPARE(spy.count(), 0);
+ act.setData(QVariant());
+ QCOMPARE(spy.count(), 0);
+
+ act.setData(-1);
+ QCOMPARE(spy.count(), 1);
+ act.setData(-1);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QGuiAction::setEnabledSetVisible()
+{
+ QGuiAction action(nullptr);
+ QSignalSpy spy(&action, &QGuiAction::enabledChanged);
+ QVERIFY(action.isEnabled());
+ QVERIFY(action.isVisible());
+ QCOMPARE(spy.count(), 0);
+ action.setVisible(false);
+ QVERIFY(!action.isEnabled());
+ QVERIFY(!action.isVisible());
+ QCOMPARE(spy.count(), 1);
+ action.setEnabled(false);
+ QVERIFY(!action.isEnabled());
+ QVERIFY(!action.isVisible());
+ QCOMPARE(spy.count(), 1);
+ action.setVisible(true);
+ QVERIFY(!action.isEnabled());
+ QVERIFY(action.isVisible());
+ QCOMPARE(spy.count(), 1);
+ action.resetEnabled();
+ QVERIFY(action.isEnabled());
+ QCOMPARE(spy.count(), 2);
+}
+
+void tst_QGuiAction::setCheckabledSetChecked()
+{
+ QGuiAction action(nullptr);
+ QSignalSpy changedSpy(&action, &QGuiAction::changed);
+ QSignalSpy checkedSpy(&action, &QGuiAction::toggled);
+ QSignalSpy checkableSpy(&action, &QGuiAction::checkableChanged);
+ QVERIFY(!action.isCheckable());
+ QVERIFY(!action.isChecked());
+ QCOMPARE(changedSpy.count(), 0);
+ QCOMPARE(checkedSpy.count(), 0);
+ QCOMPARE(checkableSpy.count(), 0);
+
+ action.setCheckable(true);
+ QVERIFY(action.isCheckable());
+ QVERIFY(!action.isChecked());
+ QCOMPARE(changedSpy.count(), 1);
+ QCOMPARE(checkedSpy.count(), 0);
+ QCOMPARE(checkableSpy.count(), 1);
+
+ action.setChecked(true);
+ QVERIFY(action.isCheckable());
+ QVERIFY(action.isChecked());
+ QCOMPARE(changedSpy.count(), 2);
+ QCOMPARE(checkedSpy.count(), 1);
+ QCOMPARE(checkableSpy.count(), 1);
+
+ action.setCheckable(false);
+ QVERIFY(!action.isCheckable());
+ QVERIFY(!action.isChecked());
+ QCOMPARE(changedSpy.count(), 3);
+ QCOMPARE(checkedSpy.count(), 2);
+ QCOMPARE(checkableSpy.count(), 2);
+
+ action.setCheckable(true);
+ QVERIFY(action.isCheckable());
+ QVERIFY(action.isChecked());
+ QCOMPARE(changedSpy.count(), 4);
+ QCOMPARE(checkedSpy.count(), 3);
+ QCOMPARE(checkableSpy.count(), 3);
+}
+
+QTEST_MAIN(tst_QGuiAction)
+#include "tst_qguiaction.moc"
diff --git a/tests/auto/gui/kernel/qguiactiongroup/.gitignore b/tests/auto/gui/kernel/qguiactiongroup/.gitignore
new file mode 100644
index 0000000000..daba003e96
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiactiongroup/.gitignore
@@ -0,0 +1 @@
+tst_qactiongroup
diff --git a/tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro b/tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro
new file mode 100644
index 0000000000..7fd64e70f1
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qactiongroup
+QT += testlib
+SOURCES += tst_qguiactiongroup.cpp
diff --git a/tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp b/tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp
new file mode 100644
index 0000000000..1ac14280fb
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <qguiaction.h>
+#include <qguiactiongroup.h>
+
+class tst_QGuiActionGroup : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void cleanup() { QVERIFY(QGuiApplication::topLevelWindows().isEmpty()); }
+ void enabledPropagation();
+ void visiblePropagation();
+ void exclusive();
+ void exclusiveOptional();
+ void testActionInTwoQActionGroup();
+ void unCheckCurrentAction();
+};
+
+void tst_QGuiActionGroup::enabledPropagation()
+{
+ QGuiActionGroup testActionGroup(nullptr);
+
+ auto childAction = new QGuiAction( &testActionGroup );
+ auto anotherChildAction = new QGuiAction( &testActionGroup );
+ auto freeAction = new QGuiAction(nullptr);
+
+ QVERIFY( testActionGroup.isEnabled() );
+ QVERIFY( childAction->isEnabled() );
+
+ testActionGroup.setEnabled( false );
+ QVERIFY( !testActionGroup.isEnabled() );
+ QVERIFY( !childAction->isEnabled() );
+ QVERIFY( !anotherChildAction->isEnabled() );
+
+ childAction->setEnabled(true);
+ QVERIFY( !childAction->isEnabled());
+
+ anotherChildAction->setEnabled( false );
+
+ testActionGroup.setEnabled( true );
+ QVERIFY( testActionGroup.isEnabled() );
+ QVERIFY( childAction->isEnabled() );
+ QVERIFY( !anotherChildAction->isEnabled() );
+
+ testActionGroup.setEnabled( false );
+ auto lastChildAction = new QGuiAction(&testActionGroup);
+
+ QVERIFY(!lastChildAction->isEnabled());
+ testActionGroup.setEnabled( true );
+ QVERIFY(lastChildAction->isEnabled());
+
+ freeAction->setEnabled(false);
+ testActionGroup.addAction(freeAction);
+ QVERIFY(!freeAction->isEnabled());
+ delete freeAction;
+}
+
+void tst_QGuiActionGroup::visiblePropagation()
+{
+ QGuiActionGroup testActionGroup(nullptr);
+
+ auto childAction = new QGuiAction( &testActionGroup );
+ auto anotherChildAction = new QGuiAction( &testActionGroup );
+ auto freeAction = new QGuiAction(nullptr);
+
+ QVERIFY( testActionGroup.isVisible() );
+ QVERIFY( childAction->isVisible() );
+
+ testActionGroup.setVisible( false );
+ QVERIFY( !testActionGroup.isVisible() );
+ QVERIFY( !childAction->isVisible() );
+ QVERIFY( !anotherChildAction->isVisible() );
+
+ anotherChildAction->setVisible(false);
+
+ testActionGroup.setVisible( true );
+ QVERIFY( testActionGroup.isVisible() );
+ QVERIFY( childAction->isVisible() );
+
+ QVERIFY( !anotherChildAction->isVisible() );
+
+ testActionGroup.setVisible( false );
+ auto lastChildAction = new QGuiAction(&testActionGroup);
+
+ QVERIFY(!lastChildAction->isVisible());
+ testActionGroup.setVisible( true );
+ QVERIFY(lastChildAction->isVisible());
+
+ freeAction->setVisible(false);
+ testActionGroup.addAction(freeAction);
+ QVERIFY(!freeAction->isVisible());
+ delete freeAction;
+}
+
+void tst_QGuiActionGroup::exclusive()
+{
+ QGuiActionGroup group(nullptr);
+ group.setExclusive(false);
+ QVERIFY( !group.isExclusive() );
+
+ auto actOne = new QGuiAction(&group);
+ actOne->setCheckable( true );
+ auto actTwo = new QGuiAction(&group);
+ actTwo->setCheckable( true );
+ auto actThree = new QGuiAction(&group);
+ actThree->setCheckable( true );
+
+ group.setExclusive( true );
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actOne->setChecked( true );
+ QVERIFY( actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actTwo->setChecked( true );
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+}
+
+void tst_QGuiActionGroup::exclusiveOptional()
+{
+ QGuiActionGroup group(0);
+ group.setExclusive(true);
+ QVERIFY( group.isExclusive() );
+
+ auto actOne = new QGuiAction(&group);
+ actOne->setCheckable( true );
+ auto actTwo = new QGuiAction(&group);
+ actTwo->setCheckable( true );
+ auto actThree = new QGuiAction(&group);
+ actThree->setCheckable( true );
+
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actOne->trigger();
+ QVERIFY( actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actOne->trigger();
+ QVERIFY( actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ group.setExclusionPolicy(QGuiActionGroup::ExclusionPolicy::ExclusiveOptional);
+ QVERIFY( group.isExclusive() );
+
+ actOne->trigger();
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actTwo->trigger();
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actTwo->trigger();
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+}
+
+void tst_QGuiActionGroup::testActionInTwoQActionGroup()
+{
+ QGuiAction action1("Action 1", this);
+
+ QGuiActionGroup group1(this);
+ QGuiActionGroup group2(this);
+
+ group1.addAction(&action1);
+ group2.addAction(&action1);
+
+ QCOMPARE(action1.guiActionGroup(), &group2);
+ QCOMPARE(group2.guiActions().constFirst(), &action1);
+ QCOMPARE(group1.guiActions().isEmpty(), true);
+}
+
+void tst_QGuiActionGroup::unCheckCurrentAction()
+{
+ QGuiActionGroup group(nullptr);
+ QGuiAction action1(&group) ,action2(&group);
+ action1.setCheckable(true);
+ action2.setCheckable(true);
+ QVERIFY(!action1.isChecked());
+ QVERIFY(!action2.isChecked());
+ action1.setChecked(true);
+ QVERIFY(action1.isChecked());
+ QVERIFY(!action2.isChecked());
+ auto current = group.checkedGuiAction();
+ QCOMPARE(current, &action1);
+ current->setChecked(false);
+ QVERIFY(!action1.isChecked());
+ QVERIFY(!action2.isChecked());
+ QVERIFY(!group.checkedGuiAction());
+}
+
+
+QTEST_MAIN(tst_QGuiActionGroup)
+#include "tst_qguiactiongroup.moc"
diff --git a/tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..30a6436ece
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from qguiapplication.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qguiapplication Test:
+#####################################################################
+
+add_qt_test(tst_qguiapplication
+ SOURCES
+ tst_qcoreapplication.cpp tst_qcoreapplication.h
+ tst_qguiapplication.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0x050E00
+ INCLUDE_DIRECTORIES
+ ../../../corelib/kernel/qcoreapplication
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(tst_qguiapplication_resource_files
+ "icons/appicon.png"
+ "icons/usericon.png"
+)
+
+add_qt_resource(tst_qguiapplication "tst_qguiapplication"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qguiapplication_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:WIN32:
+# VERSION = "1.2.3.4"
+
+#### Keys ignored in scope 4:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:else:
+# VERSION = "1.2.3"
diff --git a/tests/auto/gui/kernel/qguiapplication/BLACKLIST b/tests/auto/gui/kernel/qguiapplication/BLACKLIST
index e6ffe78ae3..58ca7bf782 100644
--- a/tests/auto/gui/kernel/qguiapplication/BLACKLIST
+++ b/tests/auto/gui/kernel/qguiapplication/BLACKLIST
@@ -1,3 +1,6 @@
[focusObject]
ubuntu-16.04
opensuse-42.3
+
+[quitOnLastWindowClosedMulti]
+macos ci
diff --git a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
new file mode 100644
index 0000000000..24fa6572c1
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from qguiapplication.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qguiapplication Test:
+#####################################################################
+
+# special case begin
+if (WIN32)
+ set(target_version "1.2.3.4")
+else()
+ set(target_version "1.2.3")
+endif()
+# special case end
+
+add_qt_test(tst_qguiapplication
+ VERSION ${target_version}
+ SOURCES
+ ../../../corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp ../../../corelib/kernel/qcoreapplication/tst_qcoreapplication.h # special case
+ tst_qguiapplication.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0x050E00
+ INCLUDE_DIRECTORIES
+ ../../../corelib/kernel/qcoreapplication
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Threads::Threads # special case
+)
+
+# Resources:
+set(tst_qguiapplication_resource_files
+ "icons/appicon.png"
+ "icons/usericon.png"
+)
+
+add_qt_resource(tst_qguiapplication "tst_qguiapplication"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qguiapplication_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:WIN32:
+# VERSION = "1.2.3.4"
+
+#### Keys ignored in scope 4:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:else:
+# VERSION = "1.2.3"
diff --git a/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt b/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
new file mode 100644
index 0000000000..eb36e0ece7
--- /dev/null
+++ b/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qguieventdispatcher.pro.
+
+#####################################################################
+## tst_qguieventdispatcher Test:
+#####################################################################
+
+add_qt_test(tst_qguieventdispatcher
+ SOURCES
+ ../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c4daa5a310
--- /dev/null
+++ b/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qguieventloop.pro.
+
+#####################################################################
+## tst_qguieventloop Test:
+#####################################################################
+
+add_qt_test(tst_qguieventloop
+ SOURCES
+ ../../../corelib/kernel/qeventloop/tst_qeventloop.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qguieventloop CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(tst_qguieventloop CONDITION QT_FEATURE_glib
+ DEFINES
+ HAVE_GLIB
+)
diff --git a/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
new file mode 100644
index 0000000000..de9a876e9d
--- /dev/null
+++ b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qguieventloop.pro.
+
+#####################################################################
+## tst_qguieventloop Test:
+#####################################################################
+
+add_qt_test(tst_qguieventloop
+ SOURCES
+ ../../../corelib/kernel/qeventloop/tst_qeventloop.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qguieventloop CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(tst_qguieventloop CONDITION QT_FEATURE_glib
+ DEFINES
+ HAVE_GLIB
+)
diff --git a/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt b/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
new file mode 100644
index 0000000000..3701b3983a
--- /dev/null
+++ b/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qguimetatype.pro.
+
+#####################################################################
+## tst_qguimetatype Test:
+#####################################################################
+
+add_qt_test(tst_qguimetatype
+ SOURCES
+ tst_qguimetatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 81f0183728..f0c5bf79a7 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -67,7 +67,6 @@ private slots:
F(QPen, QPen) \
F(QTextLength, QTextLength) \
F(QTextFormat, QTextFormat) \
- F(QMatrix, QMatrix) \
F(QTransform, QTransform) \
F(QMatrix4x4, QMatrix4x4) \
F(QVector2D, QVector2D) \
@@ -181,9 +180,13 @@ template<> struct TestValueFactory<QMetaType::QCursor> {
static QCursor *create() { return new QCursor(Qt::WaitCursor); }
};
#endif
+
+#if QT_CONFIG(shortcut)
template<> struct TestValueFactory<QMetaType::QKeySequence> {
static QKeySequence *create() { return new QKeySequence(QKeySequence::Close); }
};
+#endif
+
template<> struct TestValueFactory<QMetaType::QPen> {
static QPen *create() { return new QPen(Qt::DashDotDotLine); }
};
@@ -193,14 +196,6 @@ template<> struct TestValueFactory<QMetaType::QTextLength> {
template<> struct TestValueFactory<QMetaType::QTextFormat> {
static QTextFormat *create() { return new QTextFormat(QTextFormat::FrameFormat); }
};
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-template<> struct TestValueFactory<QMetaType::QMatrix> {
- static QMatrix *create() { return new QMatrix(10, 20, 30, 40, 50, 60); }
-};
-QT_WARNING_POP
-#endif
template<> struct TestValueFactory<QMetaType::QTransform> {
static QTransform *create() { return new QTransform(10, 20, 30, 40, 50, 60); }
};
@@ -317,30 +312,10 @@ void tst_QGuiMetaType::sizeOf()
QCOMPARE(QMetaType::sizeOf(type), size);
}
-#ifndef Q_ALIGNOF
-template<uint N>
-struct RoundToNextHighestPowerOfTwo
-{
-private:
- enum { V1 = N-1 };
- enum { V2 = V1 | (V1 >> 1) };
- enum { V3 = V2 | (V2 >> 2) };
- enum { V4 = V3 | (V3 >> 4) };
- enum { V5 = V4 | (V4 >> 8) };
- enum { V6 = V5 | (V5 >> 16) };
-public:
- enum { Value = V6 + 1 };
-};
-#endif
-
template<class T>
struct TypeAlignment
{
-#ifdef Q_ALIGNOF
- enum { Value = Q_ALIGNOF(T) };
-#else
- enum { Value = RoundToNextHighestPowerOfTwo<sizeof(T)>::Value };
-#endif
+ enum { Value = alignof(T) };
};
void tst_QGuiMetaType::flags_data()
diff --git a/tests/auto/gui/kernel/qguishortcut/qguishortcut.pro b/tests/auto/gui/kernel/qguishortcut/qguishortcut.pro
new file mode 100644
index 0000000000..1417dee213
--- /dev/null
+++ b/tests/auto/gui/kernel/qguishortcut/qguishortcut.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qguishortcut
+QT += testlib
+SOURCES += tst_qguishortcut.cpp
diff --git a/tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp b/tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp
new file mode 100644
index 0000000000..bc3fb9862d
--- /dev/null
+++ b/tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qguishortcut.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qrasterwindow.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qwindow.h>
+
+class tst_QGuiShortcut : public QObject
+{
+ Q_OBJECT
+public:
+
+private slots:
+ void trigger();
+};
+
+class ColoredWindow : public QRasterWindow {
+public:
+ ColoredWindow(QColor c) : m_color(c) {}
+
+protected:
+ void paintEvent(QPaintEvent *event) override;
+
+private:
+ const QColor m_color;
+};
+
+void ColoredWindow::paintEvent(QPaintEvent *)
+{
+ QPainter p(this);
+ p.fillRect(QRect(QPoint(), size()), m_color);
+}
+
+static void sendKey(QWindow *target, Qt::Key k, char c, Qt::KeyboardModifiers modifiers)
+{
+ QTest::sendKeyEvent(QTest::Press, target, k, c, modifiers);
+ QTest::sendKeyEvent(QTest::Release, target, k, c, modifiers);
+}
+
+void tst_QGuiShortcut::trigger()
+{
+ ColoredWindow w(Qt::yellow);
+ w.setTitle(QTest::currentTestFunction());
+ w.resize(QGuiApplication::primaryScreen()->size() / 4);
+ new QGuiShortcut(Qt::CTRL + Qt::Key_Q, &w, SLOT(close()));
+ w.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
+ sendKey(&w, Qt::Key_Q, 'q', Qt::ControlModifier);
+ QTRY_VERIFY(!w.isVisible());
+}
+
+QTEST_MAIN(tst_QGuiShortcut)
+#include "tst_qguishortcut.moc"
diff --git a/tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c4e5117e8c
--- /dev/null
+++ b/tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qguitimer.pro.
+
+#####################################################################
+## tst_qguitimer Test:
+#####################################################################
+
+add_qt_test(tst_qguitimer
+ SOURCES
+ ../../../corelib/kernel/qtimer/tst_qtimer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguitimer/CMakeLists.txt b/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
new file mode 100644
index 0000000000..2be3339fe3
--- /dev/null
+++ b/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qguitimer.pro.
+
+#####################################################################
+## tst_qguitimer Test:
+#####################################################################
+
+add_qt_test(tst_qguitimer
+ SOURCES
+ ../../../corelib/kernel/qtimer/tst_qtimer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Threads::Threads # special case
+)
diff --git a/tests/auto/gui/kernel/qguivariant/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
new file mode 100644
index 0000000000..3a0adab6e3
--- /dev/null
+++ b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qguivariant.pro.
+
+add_subdirectory(test)
+add_subdirectory(no_application)
diff --git a/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
new file mode 100644
index 0000000000..8261212801
--- /dev/null
+++ b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from no_application.pro.
+
+#####################################################################
+## no_application Test:
+#####################################################################
+
+add_qt_test(no_application
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
new file mode 100644
index 0000000000..af2cea60e6
--- /dev/null
+++ b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qguivariant Test:
+#####################################################################
+
+add_qt_test(tst_qguivariant
+ SOURCES
+ tst_qguivariant.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+# Resources:
+set(tst_qguivariant_resource_files
+ "black.png"
+ "black2.png"
+)
+
+add_qt_resource(tst_qguivariant "tst_qguivariant"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qguivariant_resource_files}
+)
+set(qguivariant_resource_files
+ "data"
+)
+
+add_qt_resource(tst_qguivariant "qguivariant"
+ PREFIX
+ "/"
+ FILES
+ ${qguivariant_resource_files}
+)
+
diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
index 8b301c145a..12998add71 100644
--- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
@@ -36,7 +36,6 @@
#include <qcursor.h>
#include <qimage.h>
#include <qicon.h>
-#include <qmatrix.h>
#include <qmatrix4x4.h>
#include <qpen.h>
#include <qpolygon.h>
@@ -87,8 +86,6 @@ private slots:
void toBrush_data();
void toBrush();
- void matrix();
-
void transform();
void matrix4x4();
@@ -402,24 +399,6 @@ void tst_QGuiVariant::toString()
QCOMPARE( str, result );
}
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-void tst_QGuiVariant::matrix()
-{
- QVariant variant;
- QMatrix matrix = qvariant_cast<QMatrix>(variant);
- QVERIFY(matrix.isIdentity());
- variant.setValue(QMatrix().rotate(90));
- QCOMPARE(QMatrix().rotate(90), qvariant_cast<QMatrix>(variant));
-
- void *mmatrix = QMetaType::create(QVariant::Matrix, 0);
- QVERIFY(mmatrix);
- QMetaType::destroy(QVariant::Matrix, mmatrix);
-}
-QT_WARNING_POP
-#endif
-
void tst_QGuiVariant::matrix4x4()
{
QVariant variant;
@@ -711,7 +690,6 @@ void tst_QGuiVariant::implicitConstruction()
F(Pen) \
F(TextLength) \
F(TextFormat) \
- F(Matrix) \
F(Transform) \
F(Matrix4x4) \
F(Vector2D) \
diff --git a/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt b/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
new file mode 100644
index 0000000000..2eee15b816
--- /dev/null
+++ b/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qinputmethod.pro.
+
+#####################################################################
+## tst_qinputmethod Test:
+#####################################################################
+
+add_qt_test(tst_qinputmethod
+ SOURCES
+ tst_qinputmethod.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt b/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
new file mode 100644
index 0000000000..2e36795375
--- /dev/null
+++ b/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qkeyevent.pro.
+
+#####################################################################
+## tst_qkeyevent Test:
+#####################################################################
+
+add_qt_test(tst_qkeyevent
+ SOURCES
+ tst_qkeyevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp
index 87a47bd93b..6a928cac7a 100644
--- a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp
+++ b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp
@@ -64,8 +64,10 @@ public:
private slots:
void basicEventDelivery();
+#if QT_CONFIG(shortcut)
void modifiers_data();
void modifiers();
+#endif
};
tst_QKeyEvent::tst_QKeyEvent()
@@ -128,6 +130,8 @@ static QByteArray modifiersTestRowName(const QString &keySequence)
return result;
}
+#if QT_CONFIG(shortcut)
+
void tst_QKeyEvent::modifiers_data()
{
struct Modifier
@@ -198,5 +202,7 @@ void tst_QKeyEvent::modifiers()
}
}
+#endif // QT_CONFIG(shortcut)
+
QTEST_MAIN(tst_QKeyEvent)
#include "tst_qkeyevent.moc"
diff --git a/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt b/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
new file mode 100644
index 0000000000..07e480c9dd
--- /dev/null
+++ b/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qkeysequence.pro.
+
+#####################################################################
+## tst_qkeysequence Test:
+#####################################################################
+
+add_qt_test(tst_qkeysequence
+ SOURCES
+ tst_qkeysequence.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qkeysequence_resource_files
+ "keys_de.qm"
+ "qt_de.qm"
+)
+
+add_qt_resource(tst_qkeysequence "qkeysequence"
+ PREFIX
+ "/"
+ FILES
+ ${qkeysequence_resource_files}
+)
+
diff --git a/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
new file mode 100644
index 0000000000..4e1081c6ad
--- /dev/null
+++ b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmouseevent.pro.
+
+#####################################################################
+## tst_qmouseevent Test:
+#####################################################################
+
+add_qt_test(tst_qmouseevent
+ SOURCES
+ tst_qmouseevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
new file mode 100644
index 0000000000..c7f447ffeb
--- /dev/null
+++ b/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qmouseevent_modal.pro.
+
+#####################################################################
+## tst_qmouseevent_modal Test:
+#####################################################################
+
+add_qt_test(tst_qmouseevent_modal
+ SOURCES
+ tst_qmouseevent_modal.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt b/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
new file mode 100644
index 0000000000..4176be9840
--- /dev/null
+++ b/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qopenglwindow.pro.
+
+#####################################################################
+## tst_qopenglwindow Test:
+#####################################################################
+
+add_qt_test(tst_qopenglwindow
+ SOURCES
+ tst_qopenglwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL
+)
diff --git a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
index 759b608c93..28b12f0677 100644
--- a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
+++ b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qopenglwindow
-QT += core-private gui-private testlib
+QT += opengl core-private gui-private testlib
SOURCES += tst_qopenglwindow.cpp
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 9c36b6898a..2785d57a42 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtGui/QOpenGLWindow>
+#include <QtOpenGL/QOpenGLWindow>
#include <QtTest/QtTest>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLContext>
diff --git a/tests/auto/gui/kernel/qpalette/CMakeLists.txt b/tests/auto/gui/kernel/qpalette/CMakeLists.txt
new file mode 100644
index 0000000000..4bd2ce7cc5
--- /dev/null
+++ b/tests/auto/gui/kernel/qpalette/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpalette.pro.
+
+#####################################################################
+## tst_qpalette Test:
+#####################################################################
+
+add_qt_test(tst_qpalette
+ SOURCES
+ tst_qpalette.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index 6ce6422f48..04343727bb 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -41,6 +41,12 @@ private Q_SLOTS:
void copySemantics();
void moveSemantics();
void setBrush();
+
+ void isBrushSet();
+ void setAllPossibleBrushes();
+ void noBrushesSetForDefaultPalette();
+ void cannotCheckIfInvalidBrushSet();
+ void checkIfBrushForCurrentGroupSet();
};
void tst_QPalette::roleValues_data()
@@ -118,23 +124,35 @@ void tst_QPalette::resolve()
QVERIFY(p2ResolvedTo1 != p2);
}
+
+static void compareAllPaletteData(const QPalette &firstPalette, const QPalette &secondPalette)
+{
+ QCOMPARE(firstPalette, secondPalette);
+
+ // For historical reasons, operator== compares only brushes, but it's not enough for proper
+ // comparison after move/copy, because some additional data can also be moved/copied.
+ // Let's compare this data here.
+ QCOMPARE(firstPalette.resolve(), secondPalette.resolve());
+ QCOMPARE(firstPalette.currentColorGroup(), secondPalette.currentColorGroup());
+}
+
void tst_QPalette::copySemantics()
{
QPalette src(Qt::red), dst;
const QPalette control = src; // copy construction
QVERIFY(src != dst);
QVERIFY(!src.isCopyOf(dst));
- QCOMPARE(src, control);
+ compareAllPaletteData(src, control);
QVERIFY(src.isCopyOf(control));
dst = src; // copy assignment
- QCOMPARE(dst, src);
- QCOMPARE(dst, control);
+ compareAllPaletteData(dst, src);
+ compareAllPaletteData(dst, control);
QVERIFY(dst.isCopyOf(src));
dst = QPalette(Qt::green);
QVERIFY(dst != src);
QVERIFY(dst != control);
- QCOMPARE(src, control);
+ compareAllPaletteData(src, control);
QVERIFY(!dst.isCopyOf(src));
QVERIFY(src.isCopyOf(control));
}
@@ -144,13 +162,13 @@ void tst_QPalette::moveSemantics()
QPalette src(Qt::red), dst;
const QPalette control = src;
QVERIFY(src != dst);
- QCOMPARE(src, control);
+ compareAllPaletteData(src, control);
QVERIFY(!dst.isCopyOf(src));
QVERIFY(!dst.isCopyOf(control));
dst = std::move(src); // move assignment
QVERIFY(!dst.isCopyOf(src)); // isCopyOf() works on moved-from palettes, too
QVERIFY(dst.isCopyOf(control));
- QCOMPARE(dst, control);
+ compareAllPaletteData(dst, control);
src = control; // check moved-from 'src' can still be assigned to (doesn't crash)
QVERIFY(src.isCopyOf(dst));
QVERIFY(src.isCopyOf(control));
@@ -158,7 +176,7 @@ void tst_QPalette::moveSemantics()
QVERIFY(!src.isCopyOf(dst));
QVERIFY(!src.isCopyOf(dst2));
QVERIFY(!src.isCopyOf(control));
- QCOMPARE(dst2, control);
+ compareAllPaletteData(dst2, control);
QVERIFY(dst2.isCopyOf(dst));
QVERIFY(dst2.isCopyOf(control));
// check moved-from 'src' can still be destroyed (doesn't crash)
@@ -194,5 +212,62 @@ void tst_QPalette::setBrush()
QVERIFY(pp.isCopyOf(p));
}
+void tst_QPalette::isBrushSet()
+{
+ QPalette p;
+
+ // Set only one color group
+ p.setBrush(QPalette::Active, QPalette::Mid, QBrush(Qt::red));
+ QVERIFY(p.isBrushSet(QPalette::Active, QPalette::Mid));
+ QVERIFY(!p.isBrushSet(QPalette::Inactive, QPalette::Mid));
+ QVERIFY(!p.isBrushSet(QPalette::Disabled, QPalette::Mid));
+
+ // Set all color groups
+ p.setBrush(QPalette::LinkVisited, QBrush(Qt::green));
+ QVERIFY(p.isBrushSet(QPalette::Active, QPalette::LinkVisited));
+ QVERIFY(p.isBrushSet(QPalette::Inactive, QPalette::LinkVisited));
+ QVERIFY(p.isBrushSet(QPalette::Disabled, QPalette::LinkVisited));
+}
+
+void tst_QPalette::setAllPossibleBrushes()
+{
+ QPalette p;
+
+ QCOMPARE(p.resolve(), QPalette::ResolveMask(0));
+
+ for (int r = 0; r < QPalette::NColorRoles; ++r) {
+ p.setBrush(QPalette::All, QPalette::ColorRole(r), Qt::red);
+ }
+
+ for (int r = 0; r < QPalette::NColorRoles; ++r) {
+ for (int g = 0; g < QPalette::NColorGroups; ++g) {
+ QVERIFY(p.isBrushSet(QPalette::ColorGroup(g), QPalette::ColorRole(r)));
+ }
+ }
+}
+
+void tst_QPalette::noBrushesSetForDefaultPalette()
+{
+ QCOMPARE(QPalette().resolve(), QPalette::ResolveMask(0));
+}
+
+void tst_QPalette::cannotCheckIfInvalidBrushSet()
+{
+ QPalette p(Qt::red);
+
+ QVERIFY(!p.isBrushSet(QPalette::All, QPalette::LinkVisited));
+ QVERIFY(!p.isBrushSet(QPalette::Active, QPalette::NColorRoles));
+}
+
+void tst_QPalette::checkIfBrushForCurrentGroupSet()
+{
+ QPalette p;
+
+ p.setCurrentColorGroup(QPalette::Disabled);
+ p.setBrush(QPalette::Current, QPalette::Link, QBrush(Qt::yellow));
+
+ QVERIFY(p.isBrushSet(QPalette::Current, QPalette::Link));
+}
+
QTEST_MAIN(tst_QPalette)
#include "tst_qpalette.moc"
diff --git a/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt b/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
new file mode 100644
index 0000000000..43deb02af1
--- /dev/null
+++ b/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpixelformat.pro.
+
+#####################################################################
+## tst_qpixelformat Test:
+#####################################################################
+
+add_qt_test(tst_qpixelformat
+ SOURCES
+ tst_qpixelformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt b/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
new file mode 100644
index 0000000000..9b586ce4c8
--- /dev/null
+++ b/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qrasterwindow.pro.
+
+#####################################################################
+## tst_qrasterwindow Test:
+#####################################################################
+
+add_qt_test(tst_qrasterwindow
+ SOURCES
+ tst_qrasterwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qscreen/CMakeLists.txt b/tests/auto/gui/kernel/qscreen/CMakeLists.txt
new file mode 100644
index 0000000000..dd54db4753
--- /dev/null
+++ b/tests/auto/gui/kernel/qscreen/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qscreen.pro.
+
+#####################################################################
+## tst_qscreen Test:
+#####################################################################
+
+add_qt_test(tst_qscreen
+ SOURCES
+ tst_qscreen.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt b/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
new file mode 100644
index 0000000000..d12e1da106
--- /dev/null
+++ b/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsurfaceformat.pro.
+
+#####################################################################
+## tst_qsurfaceformat Test:
+#####################################################################
+
+add_qt_test(tst_qsurfaceformat
+ SOURCES
+ tst_qsurfaceformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt b/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
new file mode 100644
index 0000000000..7d489e3066
--- /dev/null
+++ b/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtouchevent.pro.
+
+#####################################################################
+## tst_qtouchevent Test:
+#####################################################################
+
+add_qt_test(tst_qtouchevent
+ SOURCES
+ tst_qtouchevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/kernel/qwindow/CMakeLists.txt b/tests/auto/gui/kernel/qwindow/CMakeLists.txt
new file mode 100644
index 0000000000..cfd17219bd
--- /dev/null
+++ b/tests/auto/gui/kernel/qwindow/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qwindow.pro.
+
+#####################################################################
+## tst_qwindow Test:
+#####################################################################
+
+add_qt_test(tst_qwindow
+ SOURCES
+ tst_qwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qwindow CONDITION QT_FEATURE_dynamicgl AND WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/gui/math3d/CMakeLists.txt b/tests/auto/gui/math3d/CMakeLists.txt
new file mode 100644
index 0000000000..91e59874b7
--- /dev/null
+++ b/tests/auto/gui/math3d/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory("qquaternion")
+add_subdirectory("qvectornd")
+add_subdirectory("qmatrixnxn")
diff --git a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
new file mode 100644
index 0000000000..71daeba361
--- /dev/null
+++ b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qmatrixnxn.pro.
+
+#####################################################################
+## tst_qmatrixnxn Test:
+#####################################################################
+
+add_qt_test(tst_qmatrixnxn
+ SOURCES
+ tst_qmatrixnxn.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
index 3c4f2f2e75..c39fd7f7bc 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
+++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
@@ -139,12 +139,11 @@ private slots:
void convertGeneric();
- void optimize_data();
- void optimize();
+// void optimize_data();
+// void optimize();
void columnsAndRows();
- void convertQMatrix();
void convertQTransform();
void fill();
@@ -2882,6 +2881,7 @@ void tst_QMatrixNxN::convertGeneric()
#endif
}
+/*
// Copy of "flagBits" in qmatrix4x4.h.
enum {
Identity = 0x0000, // Identity matrix
@@ -3015,7 +3015,7 @@ void tst_QMatrixNxN::optimize()
QCOMPARE(reinterpret_cast<Matrix4x4 *>(&m)->flagBits, flagBits);
}
-
+*/
void tst_QMatrixNxN::columnsAndRows()
{
QMatrix4x4 m1(uniqueValues4);
@@ -3061,58 +3061,6 @@ void tst_QMatrixNxN::columnsAndRows()
QVERIFY(m1.row(3) == QVector4D(4, 8, 12, 16));
}
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-// Test converting QMatrix objects into QMatrix4x4 and then
-// checking that transformations in the original perform the
-// equivalent transformations in the new matrix.
-void tst_QMatrixNxN::convertQMatrix()
-{
- QMatrix m1;
- m1.translate(-3.5, 2.0);
- QPointF p1 = m1.map(QPointF(100.0, 150.0));
- QCOMPARE(p1.x(), 100.0 - 3.5);
- QCOMPARE(p1.y(), 150.0 + 2.0);
-
- QMatrix4x4 m2(m1);
- QPointF p2 = m2 * QPointF(100.0, 150.0);
- QCOMPARE((double)p2.x(), 100.0 - 3.5);
- QCOMPARE((double)p2.y(), 150.0 + 2.0);
- QCOMPARE(m1, m2.toAffine());
-
- QMatrix m3;
- m3.scale(1.5, -2.0);
- QPointF p3 = m3.map(QPointF(100.0, 150.0));
- QCOMPARE(p3.x(), 1.5 * 100.0);
- QCOMPARE(p3.y(), -2.0 * 150.0);
-
- QMatrix4x4 m4(m3);
- QPointF p4 = m4 * QPointF(100.0, 150.0);
- QCOMPARE((double)p4.x(), 1.5 * 100.0);
- QCOMPARE((double)p4.y(), -2.0 * 150.0);
- QCOMPARE(m3, m4.toAffine());
-
- QMatrix m5;
- m5.rotate(45.0);
- QPointF p5 = m5.map(QPointF(100.0, 150.0));
-
- QMatrix4x4 m6(m5);
- QPointF p6 = m6 * QPointF(100.0, 150.0);
- QVERIFY(qFuzzyCompare(float(p5.x()), float(p6.x())));
- QVERIFY(qFuzzyCompare(float(p5.y()), float(p6.y())));
-
- QMatrix m7 = m6.toAffine();
- QVERIFY(qFuzzyCompare(float(m5.m11()), float(m7.m11())));
- QVERIFY(qFuzzyCompare(float(m5.m12()), float(m7.m12())));
- QVERIFY(qFuzzyCompare(float(m5.m21()), float(m7.m21())));
- QVERIFY(qFuzzyCompare(float(m5.m22()), float(m7.m22())));
- QVERIFY(qFuzzyCompare(float(m5.dx()), float(m7.dx())));
- QVERIFY(qFuzzyCompare(float(m5.dy()), float(m7.dy())));
-}
-QT_WARNING_POP
-#endif
-
// Test converting QTransform objects into QMatrix4x4 and then
// checking that transformations in the original perform the
// equivalent transformations in the new matrix.
diff --git a/tests/auto/gui/math3d/qquaternion/CMakeLists.txt b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
new file mode 100644
index 0000000000..77d035cbf9
--- /dev/null
+++ b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qquaternion.pro.
+
+#####################################################################
+## tst_qquaternion Test:
+#####################################################################
+
+add_qt_test(tst_qquaternion
+ SOURCES
+ tst_qquaternion.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/math3d/qvectornd/CMakeLists.txt b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
new file mode 100644
index 0000000000..5d8a373234
--- /dev/null
+++ b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qvectornd.pro.
+
+#####################################################################
+## tst_qvectornd Test:
+#####################################################################
+
+add_qt_test(tst_qvectornd
+ SOURCES
+ tst_qvectornd.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/CMakeLists.txt b/tests/auto/gui/painting/CMakeLists.txt
new file mode 100644
index 0000000000..7cb4c55cee
--- /dev/null
+++ b/tests/auto/gui/painting/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from painting.pro.
+
+add_subdirectory("qpainterpath")
+add_subdirectory("qpainterpathstroker")
+# add_subdirectory("qcolor")
+# add_subdirectory("qbrush")
+# add_subdirectory("qregion")
+# add_subdirectory("qpagelayout")
+add_subdirectory("qpagesize")
+# add_subdirectory("qpainter")
+if (QT_FEATURE_private_tests)
+ # not converted yet
+ #add_subdirectory("qpathclipper")
+endif()
+# add_subdirectory("qpdfwriter")
+add_subdirectory("qpen")
+add_subdirectory("qpaintengine")
+# add_subdirectory("qtransform")
+# add_subdirectory("qpolygon")
diff --git a/tests/auto/gui/painting/painting.pro b/tests/auto/gui/painting/painting.pro
index 26e84c1b15..3fdb0db760 100644
--- a/tests/auto/gui/painting/painting.pro
+++ b/tests/auto/gui/painting/painting.pro
@@ -14,7 +14,6 @@ SUBDIRS=\
qpen \
qpaintengine \
qtransform \
- qwmatrix \
qpolygon \
!qtConfig(private_tests): SUBDIRS -= \
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
index 07c820dc86..f8502c1e2f 100644
--- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
@@ -1032,6 +1032,15 @@ void tst_QColor::setRgbF()
QCOMPARE(qfloat16(b2), qfloat16(b));
}
}
+ QVERIFY(color.isValid());
+ QColor invalidRgb = color;
+ QColor invalidRgbF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setRgb: RGB parameters out of range");
+ invalidRgb.setRgb(-1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setRgb: RGB parameters out of range");
+ invalidRgbF.setRgb(-1, -1, -1, -1);
+ QVERIFY(!invalidRgb.isValid());
+ QVERIFY(!invalidRgbF.isValid());
}
void tst_QColor::setRgba()
@@ -1146,6 +1155,16 @@ void tst_QColor::setHsv()
QCOMPARE(v2, v);
}
}
+ QVERIFY(color.isValid());
+ QVERIFY(color.isValid());
+ QColor invalidHsv = color;
+ QColor invalidHsvF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHsv: HSV parameters out of range");
+ invalidHsv.setHsv(-1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHsvF: HSV parameters out of range");
+ invalidHsvF.setHsvF(-1, -1, -1);
+ QVERIFY(!invalidHsv.isValid());
+ QVERIFY(!invalidHsvF.isValid());
}
void tst_QColor::setCmyk()
@@ -1271,6 +1290,15 @@ void tst_QColor::setCmyk()
QCOMPARE(k2, k);
}
}
+ QVERIFY(color.isValid());
+ QColor invalidCmyk = color;
+ QColor invalidCmykF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setCmyk: CMYK parameters out of range");
+ invalidCmyk.setCmyk(-1, -1, -1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setCmykF: CMYK parameters out of range");
+ invalidCmykF.setCmykF(-1, -1, -1, -1, -1);
+ QVERIFY(!invalidCmyk.isValid());
+ QVERIFY(!invalidCmykF.isValid());
}
void tst_QColor::setHsl()
@@ -1372,6 +1400,15 @@ void tst_QColor::setHsl()
QCOMPARE(l2, l);
}
}
+ QVERIFY(color.isValid());
+ QColor invalidHsl = color;
+ QColor invalidHslF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHsl: HSL parameters out of range");
+ invalidHsl.setHsl(-1, -1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHslF: HSL parameters out of range");
+ invalidHslF.setHslF(-1, -1, -1, -1);
+ QVERIFY(!invalidHsl.isValid());
+ QVERIFY(!invalidHslF.isValid());
}
void tst_QColor::toRgb_data()
diff --git a/tests/auto/gui/painting/qpagesize/CMakeLists.txt b/tests/auto/gui/painting/qpagesize/CMakeLists.txt
new file mode 100644
index 0000000000..260abfbc0f
--- /dev/null
+++ b/tests/auto/gui/painting/qpagesize/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qpagesize.pro.
+
+#####################################################################
+## tst_qpagesize Test:
+#####################################################################
+
+add_qt_test(tst_qpagesize
+ SOURCES
+ tst_qpagesize.cpp
+ DEFINES
+ QT_USE_USING_NAMESPACE
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpaintengine/CMakeLists.txt b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
new file mode 100644
index 0000000000..8125a98d3e
--- /dev/null
+++ b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpaintengine.pro.
+
+#####################################################################
+## tst_qpaintengine Test:
+#####################################################################
+
+add_qt_test(tst_qpaintengine
+ SOURCES
+ tst_qpaintengine.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 9eb62ceab2..7418f447e6 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -140,7 +140,7 @@ private slots:
void setWindow();
- void combinedMatrix();
+ void combinedTransform();
void renderHints();
void disableEnableClipping();
@@ -1692,7 +1692,7 @@ void tst_QPainter::setWindow()
QVERIFY(195 < painted.height() && painted.height() < 205); // correct value is around 200
}
-void tst_QPainter::combinedMatrix()
+void tst_QPainter::combinedTransform()
{
QPixmap pm(64, 64);
@@ -1703,15 +1703,7 @@ void tst_QPainter::combinedMatrix()
p.translate(0.5, 0.5);
QTransform ct = p.combinedTransform();
-#if QT_DEPRECATED_SINCE(5, 13)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- QMatrix cm = p.combinedMatrix();
- QCOMPARE(cm, ct.toAffine());
-QT_WARNING_POP
-#endif
-
- QPointF pt = QPointF(0, 0) * ct.toAffine();
+ QPointF pt = QPointF(0, 0) * ct;
QCOMPARE(pt.x(), 48.0);
QCOMPARE(pt.y(), 16.0);
@@ -4067,7 +4059,7 @@ void tst_QPainter::drawPolygon()
path.moveTo(2, 34);
path.lineTo(34, 2);
- QPolygonF poly = stroker.createStroke(path).toFillPolygon(QTransform());
+ QPolygonF poly = stroker.createStroke(path).toFillPolygon();
img.fill(0xffffffff);
QPainter p(&img);
@@ -4135,24 +4127,12 @@ void tst_QPainter::inactivePainter()
p.setClipRegion(region);
p.setClipping(true);
-#if QT_DEPRECATED_SINCE(5, 13)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- p.combinedMatrix();
-QT_WARNING_POP
-#endif
p.combinedTransform();
p.compositionMode();
p.setCompositionMode(QPainter::CompositionMode_Plus);
p.device();
-#if QT_DEPRECATED_SINCE(5, 13)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- p.deviceMatrix();
-QT_WARNING_POP
-#endif
p.deviceTransform();
p.font();
@@ -4176,12 +4156,6 @@ QT_WARNING_POP
p.setRenderHint(QPainter::Antialiasing, true);
p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, false);
-#if QT_DEPRECATED_SINCE(5, 13)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- p.resetMatrix();
-QT_WARNING_POP
-#endif
p.resetTransform();
p.rotate(1);
p.scale(2, 2);
@@ -4197,13 +4171,9 @@ QT_WARNING_POP
p.window();
p.setWindow(QRect(10, 10, 620, 460));
-#if QT_DEPRECATED_SINCE(5, 13)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- p.worldMatrix();
- p.setWorldMatrix(QMatrix().translate(43, 21), true);
-QT_WARNING_POP
-#endif
+ p.worldTransform();
+ p.setWorldTransform(QTransform().translate(43, 21), true);
+
p.setWorldMatrixEnabled(true);
p.transform();
diff --git a/tests/auto/gui/painting/qpainterpath/CMakeLists.txt b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
new file mode 100644
index 0000000000..c2c88cc258
--- /dev/null
+++ b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpainterpath.pro.
+
+#####################################################################
+## tst_qpainterpath Test:
+#####################################################################
+
+add_qt_test(tst_qpainterpath
+ SOURCES
+ tst_qpainterpath.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
new file mode 100644
index 0000000000..a1c5f6547f
--- /dev/null
+++ b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpainterpathstroker.pro.
+
+#####################################################################
+## tst_qpainterpathstroker Test:
+#####################################################################
+
+add_qt_test(tst_qpainterpathstroker
+ SOURCES
+ tst_qpainterpathstroker.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpen/CMakeLists.txt b/tests/auto/gui/painting/qpen/CMakeLists.txt
new file mode 100644
index 0000000000..d096f7a6ce
--- /dev/null
+++ b/tests/auto/gui/painting/qpen/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpen.pro.
+
+#####################################################################
+## tst_qpen Test:
+#####################################################################
+
+add_qt_test(tst_qpen
+ SOURCES
+ tst_qpen.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
index 78638a7518..97c6ad60b8 100644
--- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
@@ -46,8 +46,6 @@ private slots:
void qhash();
void translate();
void scale();
- void matrix();
- void testOffset();
void types();
void types2_data();
void types2();
@@ -372,67 +370,6 @@ void tst_QTransform::scale()
QVERIFY( QTransform::fromScale( 1, 1 ) == QTransform());
}
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-void tst_QTransform::matrix()
-{
- QMatrix mat1;
- mat1.scale(0.3, 0.7);
- mat1.translate(53.3, 94.4);
- mat1.rotate(45);
-
- QMatrix mat2;
- mat2.rotate(33);
- mat2.scale(0.6, 0.6);
- mat2.translate(13.333, 7.777);
-
- QTransform tran1(mat1);
- QTransform tran2(mat2);
- QTransform dummy;
- dummy.setMatrix(mat1.m11(), mat1.m12(), 0,
- mat1.m21(), mat1.m22(), 0,
- mat1.dx(), mat1.dy(), 1);
-
- QCOMPARE(tran1, dummy);
- QCOMPARE(tran1.inverted(), dummy.inverted());
- QCOMPARE(tran1.inverted(), QTransform(mat1.inverted()));
- QCOMPARE(tran2.inverted(), QTransform(mat2.inverted()));
-
- QMatrix mat3 = mat1 * mat2;
- QTransform tran3 = tran1 * tran2;
- QCOMPARE(QTransform(mat3), tran3);
-
- /* QMatrix::operator==() doesn't use qFuzzyCompare(), which
- * on win32-g++ results in a failure. So we work around it by
- * calling QTranform::operator==(), which performs a fuzzy compare. */
- QCOMPARE(QTransform(mat3), QTransform(tran3.toAffine()));
-
- QTransform tranInv = tran1.inverted();
- QMatrix matInv = mat1.inverted();
-
- QRect rect(43, 70, 200, 200);
- QPoint pt(43, 66);
- QCOMPARE(tranInv.mapRect(rect), matInv.mapRect(rect));
- QCOMPARE(tranInv.map(pt), matInv.map(pt));
-
- QPainterPath path;
- path.moveTo(55, 60);
- path.lineTo(110, 110);
- path.quadTo(220, 50, 10, 20);
- path.closeSubpath();
- QCOMPARE(tranInv.map(path), matInv.map(path));
-}
-
-void tst_QTransform::testOffset()
-{
- QTransform trans;
- const QMatrix &aff = trans.toAffine();
- QCOMPARE((void*)(&aff), (void*)(&trans));
-}
-QT_WARNING_POP
-#endif
-
void tst_QTransform::types()
{
QTransform m1;
diff --git a/tests/auto/gui/painting/qwmatrix/qwmatrix.pro b/tests/auto/gui/painting/qwmatrix/qwmatrix.pro
deleted file mode 100644
index de6454025c..0000000000
--- a/tests/auto/gui/painting/qwmatrix/qwmatrix.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qwmatrix
-SOURCES += tst_qwmatrix.cpp
-QT += testlib
-
-unix:!darwin:!haiku:!integrity: LIBS += -lm
diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
deleted file mode 100644
index 281639c27a..0000000000
--- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
+++ /dev/null
@@ -1,334 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-#include <qmatrix.h>
-#include <qmath.h>
-#include <qpolygon.h>
-
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-
-class tst_QWMatrix : public QObject
-{
- Q_OBJECT
-
-private slots:
- void mapRect_data();
- void mapToPolygon_data();
- void mapRect();
- void operator_star_qwmatrix();
- void assignments();
- void mapToPolygon();
- void translate();
- void scale();
- void mapPolygon();
-
-private:
- void mapping_data();
-};
-
-void tst_QWMatrix::mapRect_data()
-{
- mapping_data();
-}
-
-void tst_QWMatrix::mapToPolygon_data()
-{
- mapping_data();
-}
-
-void tst_QWMatrix::mapping_data()
-{
- //create the testtable instance and define the elements
- QTest::addColumn<QMatrix>("matrix");
- QTest::addColumn<QRect>("src");
- QTest::addColumn<QPolygon>("res");
-
- //next we fill it with data
-
- // identity
- QTest::newRow( "identity" ) << QMatrix( 1, 0, 0, 1, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 10, 20, 30, 40 ) );
- // scaling
- QTest::newRow( "scale 0" ) << QMatrix( 2, 0, 0, 2, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 20, 40, 60, 80 ) );
- QTest::newRow( "scale 1" ) << QMatrix( 10, 0, 0, 10, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 100, 200, 300, 400 ) );
- // mirroring
- QTest::newRow( "mirror 0" ) << QMatrix( -1, 0, 0, 1, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -40, 20, 30, 40 ) );
- QTest::newRow( "mirror 1" ) << QMatrix( 1, 0, 0, -1, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 10, -60, 30, 40 ) );
- QTest::newRow( "mirror 2" ) << QMatrix( -1, 0, 0, -1, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -40, -60, 30, 40 ) );
- QTest::newRow( "mirror 3" ) << QMatrix( -2, 0, 0, -2, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -80, -120, 60, 80 ) );
- QTest::newRow( "mirror 4" ) << QMatrix( -10, 0, 0, -10, 0, 0 )
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -400, -600, 300, 400 ) );
- QTest::newRow( "mirror 5" ) << QMatrix( -1, 0, 0, 1, 0, 0 )
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -30, 0, 30, 40 ) );
- QTest::newRow( "mirror 6" ) << QMatrix( 1, 0, 0, -1, 0, 0 )
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( 0, -40, 30, 40 ) );
- QTest::newRow( "mirror 7" ) << QMatrix( -1, 0, 0, -1, 0, 0 )
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -30, -40, 30, 40 ) );
- QTest::newRow( "mirror 8" ) << QMatrix( -2, 0, 0, -2, 0, 0 )
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -60, -80, 60, 80 ) );
- QTest::newRow( "mirror 9" ) << QMatrix( -10, 0, 0, -10, 0, 0 )
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -300, -400, 300, 400 ) );
-
- const auto rotate = [](qreal degrees) {
- const qreal rad = qDegreesToRadians(degrees);
- return QMatrix(std::cos(rad), -std::sin(rad),
- std::sin(rad), std::cos(rad), 0, 0);
- };
-
- // rotations
- QTest::newRow( "rot 0 a" ) << rotate(0.)
- << QRect( 0, 0, 30, 40 )
- << QPolygon ( QRect( 0, 0, 30, 40 ) );
- QTest::newRow( "rot 0 b" ) << rotate(0.00001f)
- << QRect( 0, 0, 30, 40 )
- << QPolygon ( QRect( 0, 0, 30, 40 ) );
- QTest::newRow( "rot 0 c" ) << rotate(0.)
- << QRect( 10, 20, 30, 40 )
- << QPolygon ( QRect( 10, 20, 30, 40 ) );
- QTest::newRow( "rot 0 d" ) << rotate(0.00001f)
- << QRect( 10, 20, 30, 40 )
- << QPolygon ( QRect( 10, 20, 30, 40 ) );
-
-#if 0
- const auto rotScale = [](qreal degrees, qreal scale) {
- const qreal rad = qDegreesToRadians(degrees);
- return QMatrix(scale * std::cos(rad), -scale * std::sin(rad),
- scale * std::sin(rad), scale * std::cos(rad), 0, 0);
- };
- // rotations with scaling
- QTest::newRow( "rotscale 90 a" ) << rotScale(90., 10)
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( 0, -299, 400, 300 ) );
- QTest::newRow( "rotscale 90 b" ) << rotScale(90.00001, 10)
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( 0, -299, 400, 300 ) );
- QTest::newRow( "rotscale 90 c" ) << rotScale(90., 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 200, -399, 400, 300 ) );
- QTest::newRow( "rotscale 90 d" ) << rotScale(90.00001, 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 200, -399, 400, 300 ) );
-
- QTest::newRow( "rotscale 180 a" ) << rotScale(180., 10)
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -299, -399, 300, 400 ) );
- QTest::newRow( "rotscale 180 b" ) << rotScale(180.000001, 10)
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -299, -399, 300, 400 ) );
- QTest::newRow( "rotscale 180 c" ) << rotScale(180., 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -399, -599, 300, 400 ) );
- QTest::newRow( "rotscale 180 d" ) << rotScale(180.000001, 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -399, -599, 300, 400 ) );
-
- QTest::newRow( "rotscale 270 a" ) << rotScale(270., 10)
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -399, 00, 400, 300 ) );
- QTest::newRow( "rotscale 270 b" ) << rotScale(270.0000001, 10)
- << QRect( 0, 0, 30, 40 )
- << QPolygon( QRect( -399, 00, 400, 300 ) );
- QTest::newRow( "rotscale 270 c" ) << rotScale(270., 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -599, 100, 400, 300 ) );
- QTest::newRow( "rotscale 270 d" ) << rotScale(270.000001, 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -599, 100, 400, 300 ) );
-
- // rotations that are not multiples of 90 degrees. mapRect returns the bounding rect here.
- QTest::newRow( "rot 45 a" ) << rotate(45)
- << QRect( 0, 0, 10, 10 )
- << QPolygon( QRect( 0, -7, 14, 14 ) );
- QTest::newRow( "rot 45 b" ) << rotate(45)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 21, -14, 49, 49 ) );
- QTest::newRow( "rot 45 c" ) << rotScale(45, 10)
- << QRect( 0, 0, 10, 10 )
- << QPolygon( QRect( 0, -70, 141, 141 ) );
- QTest::newRow( "rot 45 d" ) << rotScale(45, 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( 212, -141, 495, 495 ) );
-
- QTest::newRow( "rot -45 a" ) << rotate(-45)
- << QRect( 0, 0, 10, 10 )
- << QPolygon( QRect( -7, 0, 14, 14 ) );
- QTest::newRow( "rot -45 b" ) << rotate(-45)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -35, 21, 49, 49 ) );
- QTest::newRow( "rot -45 c" ) << rotScale(-45, 10)
- << QRect( 0, 0, 10, 10 )
- << QPolygon( QRect( -70, 0, 141, 141 ) );
- QTest::newRow( "rot -45 d" ) << rotScale(-45, 10)
- << QRect( 10, 20, 30, 40 )
- << QPolygon( QRect( -353, 212, 495, 495 ) );
-#endif
-}
-
-void tst_QWMatrix::mapRect()
-{
- QFETCH( QMatrix, matrix );
- QFETCH( QRect, src );
-// qDebug( "got src: %d/%d (%d/%d), matrix=[ %f %f %f %f %f %f ]",
-// src.x(), src.y(), src.width(), src.height(),
-// matrix.m11(), matrix.m12(), matrix.m21(), matrix.m22(), matrix.dx(), matrix.dy() );
- QTEST( QPolygon( matrix.mapRect(src) ), "res" );
-}
-
-void tst_QWMatrix::operator_star_qwmatrix()
-{
- QMatrix m1( 2, 3, 4, 5, 6, 7 );
- QMatrix m2( 3, 4, 5, 6, 7, 8 );
-
- QMatrix result1x2( 21, 26, 37, 46, 60, 74 );
- QMatrix result2x1( 22, 29, 34, 45, 52, 68);
-
- QMatrix product12 = m1*m2;
- QMatrix product21 = m2*m1;
-
- QVERIFY( product12==result1x2 );
- QVERIFY( product21==result2x1 );
-}
-
-
-void tst_QWMatrix::assignments()
-{
- QMatrix m;
- m.scale(2, 3);
- m.rotate(45);
- m.shear(4, 5);
-
- QMatrix c1(m);
-
- QCOMPARE(m.m11(), c1.m11());
- QCOMPARE(m.m12(), c1.m12());
- QCOMPARE(m.m21(), c1.m21());
- QCOMPARE(m.m22(), c1.m22());
- QCOMPARE(m.dx(), c1.dx());
- QCOMPARE(m.dy(), c1.dy());
-
- QMatrix c2 = m;
- QCOMPARE(m.m11(), c2.m11());
- QCOMPARE(m.m12(), c2.m12());
- QCOMPARE(m.m21(), c2.m21());
- QCOMPARE(m.m22(), c2.m22());
- QCOMPARE(m.dx(), c2.dx());
- QCOMPARE(m.dy(), c2.dy());
-}
-
-
-void tst_QWMatrix::mapToPolygon()
-{
- QFETCH( QMatrix, matrix );
- QFETCH( QRect, src );
- QFETCH( QPolygon, res );
-
- QCOMPARE( matrix.mapToPolygon( src ), res );
-}
-
-
-void tst_QWMatrix::translate()
-{
- QMatrix m( 1, 2, 3, 4, 5, 6 );
- QMatrix res2( m );
- QMatrix res( 1, 2, 3, 4, 75, 106 );
- m.translate( 10, 20 );
- QVERIFY( m == res );
- m.translate( -10, -20 );
- QVERIFY( m == res2 );
-}
-
-void tst_QWMatrix::scale()
-{
- QMatrix m( 1, 2, 3, 4, 5, 6 );
- QMatrix res2( m );
- QMatrix res( 10, 20, 60, 80, 5, 6 );
- m.scale( 10, 20 );
- QVERIFY( m == res );
- m.scale( 1./10., 1./20. );
- QVERIFY( m == res2 );
-}
-
-void tst_QWMatrix::mapPolygon()
-{
- QPolygon poly;
- poly << QPoint(0, 0) << QPoint(1, 1) << QPoint(100, 1) << QPoint(1, 100) << QPoint(-1, -1) << QPoint(-1000, 1000);
-
- {
- QMatrix m;
- m.rotate(90);
-
- // rotating 90 degrees four times should result in original poly
- QPolygon mapped = m.map(m.map(m.map(m.map(poly))));
- QCOMPARE(mapped, poly);
-
- QMatrix m2;
- m2.scale(10, 10);
- QMatrix m3;
- m3.scale(0.1, 0.1);
-
- mapped = m3.map(m2.map(poly));
- QCOMPARE(mapped, poly);
- }
-
- {
- QMatrix m(1, 2, 3, 4, 5, 6);
-
- QPolygon mapped = m.map(poly);
- for (int i = 0; i < mapped.size(); ++i)
- QCOMPARE(mapped.at(i), m.map(poly.at(i)));
- }
-}
-
-QT_WARNING_POP
-#endif
-
-QTEST_APPLESS_MAIN(tst_QWMatrix)
-#include "tst_qwmatrix.moc"
diff --git a/tests/auto/gui/qopengl/CMakeLists.txt b/tests/auto/gui/qopengl/CMakeLists.txt
new file mode 100644
index 0000000000..1c7c9b6ec0
--- /dev/null
+++ b/tests/auto/gui/qopengl/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from qopengl.pro.
+
+#####################################################################
+## tst_qopengl Test:
+#####################################################################
+
+add_qt_test(tst_qopengl
+ SOURCES
+ tst_qopengl.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qopengl CONDITION LINUX AND QT_FEATURE_xcb AND QT_FEATURE_xcb_glx_plugin
+ DEFINES
+ USE_GLX
+)
diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro
index 722c99ee0b..604aa59d8a 100644
--- a/tests/auto/gui/qopengl/qopengl.pro
+++ b/tests/auto/gui/qopengl/qopengl.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qopengl
-QT += gui-private core-private testlib
+QT += opengl gui-private core-private testlib
SOURCES += tst_qopengl.cpp
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index ede1e58a53..8dd8b95daf 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -26,22 +26,21 @@
**
****************************************************************************/
-
+#include <QtOpenGL/QOpenGLFramebufferObject>
+#include <QtOpenGL/QOpenGLPaintDevice>
+#include <QtOpenGL/QOpenGLTexture>
+#include <QtOpenGL/qopengltextureblitter.h>
+#include <QtOpenGL/QOpenGLVertexArrayObject>
+#include <QtOpenGL/QOpenGLBuffer>
#include <QtGui/private/qopenglcontext_p.h>
-#include <QtGui/QOpenGLFramebufferObject>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLFunctions_4_2_Core>
-#include <QtGui/QOpenGLVertexArrayObject>
-#include <QtGui/QOpenGLBuffer>
-#include <QtGui/QOpenGLPaintDevice>
-#include <QtGui/QOpenGLTexture>
#include <QtGui/QPainter>
#include <QtGui/QScreen>
#include <QtGui/QWindow>
#include <QtGui/QOffscreenSurface>
#include <QtGui/QGenericMatrix>
#include <QtGui/QMatrix4x4>
-#include <QtGui/qopengltextureblitter.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qopenglextensions_p.h>
#include <qpa/qplatformintegration.h>
diff --git a/tests/auto/gui/qopenglconfig/CMakeLists.txt b/tests/auto/gui/qopenglconfig/CMakeLists.txt
new file mode 100644
index 0000000000..26ce58d98c
--- /dev/null
+++ b/tests/auto/gui/qopenglconfig/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qopenglconfig.pro.
+
+#####################################################################
+## tst_qopenglconfig Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "buglist.json")
+
+add_qt_test(tst_qopenglconfig
+ SOURCES
+ tst_qopenglconfig.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/gui/qvulkan/CMakeLists.txt b/tests/auto/gui/qvulkan/CMakeLists.txt
new file mode 100644
index 0000000000..6316aa8f68
--- /dev/null
+++ b/tests/auto/gui/qvulkan/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qvulkan.pro.
+
+#####################################################################
+## tst_qvulkan Test:
+#####################################################################
+
+add_qt_test(tst_qvulkan
+ SOURCES
+ tst_qvulkan.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/rhi/CMakeLists.txt b/tests/auto/gui/rhi/CMakeLists.txt
new file mode 100644
index 0000000000..786e121f00
--- /dev/null
+++ b/tests/auto/gui/rhi/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from rhi.pro.
+
+add_subdirectory(qshader)
+add_subdirectory(qrhi)
diff --git a/tests/auto/gui/rhi/qrhi/CMakeLists.txt b/tests/auto/gui/rhi/qrhi/CMakeLists.txt
new file mode 100644
index 0000000000..8c3026c176
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qrhi.pro.
+
+#####################################################################
+## tst_qrhi Test:
+#####################################################################
+
+add_qt_test(tst_qrhi
+ SOURCES
+ tst_qrhi.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qrhi_resource_files
+ "data"
+)
+
+add_qt_resource(tst_qrhi "qrhi"
+ PREFIX
+ "/"
+ FILES
+ ${qrhi_resource_files}
+)
+
diff --git a/tests/auto/gui/rhi/qshader/CMakeLists.txt b/tests/auto/gui/rhi/qshader/CMakeLists.txt
new file mode 100644
index 0000000000..472fc3b7e4
--- /dev/null
+++ b/tests/auto/gui/rhi/qshader/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qshader.pro.
+
+#####################################################################
+## tst_qshader Test:
+#####################################################################
+
+add_qt_test(tst_qshader
+ SOURCES
+ tst_qshader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qshader_resource_files
+ "data"
+)
+
+add_qt_resource(tst_qshader "qshader"
+ PREFIX
+ "/"
+ FILES
+ ${qshader_resource_files}
+)
+
diff --git a/tests/auto/gui/text/CMakeLists.txt b/tests/auto/gui/text/CMakeLists.txt
new file mode 100644
index 0000000000..8326190831
--- /dev/null
+++ b/tests/auto/gui/text/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from text.pro.
+
+add_subdirectory(qabstracttextdocumentlayout)
+add_subdirectory(qfont)
+add_subdirectory(qfontdatabase)
+add_subdirectory(qfontmetrics)
+add_subdirectory(qglyphrun)
+add_subdirectory(qrawfont)
+add_subdirectory(qstatictext)
+add_subdirectory(qsyntaxhighlighter)
+add_subdirectory(qtextblock)
+add_subdirectory(qtextcursor)
+add_subdirectory(qtextdocumentfragment)
+add_subdirectory(qtextdocumentlayout)
+add_subdirectory(qtextformat)
+add_subdirectory(qtextlist)
+add_subdirectory(qtextobject)
+add_subdirectory(qtextscriptengine)
+add_subdirectory(qtexttable)
+add_subdirectory(qinputcontrol)
+if(QT_FEATURE_private_tests AND TARGET Qt::Xml)
+ add_subdirectory(qcssparser)
+endif()
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qfontcache)
+ add_subdirectory(qtextlayout)
+ add_subdirectory(qzip)
+ add_subdirectory(qtextodfwriter)
+endif()
+if(TARGET Qt::Xml)
+ add_subdirectory(qtextdocument)
+endif()
+if(QT_FEATURE_private_tests AND UNIX)
+ add_subdirectory(qtextpiecetable)
+endif()
+if(QT_FEATURE_textmarkdownreader)
+ add_subdirectory(qtextmarkdownimporter)
+endif()
+if(QT_FEATURE_private_tests AND QT_FEATURE_textmarkdownwriter)
+ add_subdirectory(qtextmarkdownwriter)
+endif()
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt b/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
new file mode 100644
index 0000000000..62d4ce9d32
--- /dev/null
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qabstracttextdocumentlayout.pro.
+
+#####################################################################
+## tst_qabstracttextdocumentlayout Test:
+#####################################################################
+
+add_qt_test(tst_qabstracttextdocumentlayout
+ SOURCES
+ tst_qabstracttextdocumentlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/text/qcssparser/CMakeLists.txt b/tests/auto/gui/text/qcssparser/CMakeLists.txt
new file mode 100644
index 0000000000..09e1672bc4
--- /dev/null
+++ b/tests/auto/gui/text/qcssparser/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from qcssparser.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qcssparser Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "testdata")
+
+add_qt_test(tst_qcssparser
+ SOURCES
+ tst_qcssparser.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Xml
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qcssparser.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(testdata_resource_files
+ "testdata/scanner/comments/input"
+ "testdata/scanner/comments/output"
+ "testdata/scanner/comments2/input"
+ "testdata/scanner/comments2/output"
+ "testdata/scanner/comments3/input"
+ "testdata/scanner/comments3/output"
+ "testdata/scanner/comments4/input"
+ "testdata/scanner/comments4/output"
+ "testdata/scanner/quotedstring/input"
+ "testdata/scanner/quotedstring/output"
+ "testdata/scanner/simple/input"
+ "testdata/scanner/simple/output"
+ "testdata/scanner/unicode/input"
+ "testdata/scanner/unicode/output"
+ )
+
+ add_qt_resource(tst_qcssparser "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/text/qfont/CMakeLists.txt b/tests/auto/gui/text/qfont/CMakeLists.txt
new file mode 100644
index 0000000000..a04f8365b1
--- /dev/null
+++ b/tests/auto/gui/text/qfont/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qfont.pro.
+
+#####################################################################
+## tst_qfont Test:
+#####################################################################
+
+add_qt_test(tst_qfont
+ SOURCES
+ tst_qfont.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(testfont_resource_files
+ "weirdfont.otf"
+)
+
+add_qt_resource(tst_qfont "testfont"
+ PREFIX
+ "/"
+ FILES
+ ${testfont_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfont CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qfontcache/CMakeLists.txt b/tests/auto/gui/text/qfontcache/CMakeLists.txt
new file mode 100644
index 0000000000..84f6373328
--- /dev/null
+++ b/tests/auto/gui/text/qfontcache/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qfontcache.pro.
+
+#####################################################################
+## tst_qfontcache Test:
+#####################################################################
+
+add_qt_test(tst_qfontcache
+ SOURCES
+ tst_qfontcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qfontdatabase/CMakeLists.txt b/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
new file mode 100644
index 0000000000..65c6224a00
--- /dev/null
+++ b/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from qfontdatabase.pro.
+
+#####################################################################
+## tst_qfontdatabase Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "LED_REAL.TTF")
+
+add_qt_test(tst_qfontdatabase
+ SOURCES
+ tst_qfontdatabase.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont_condensed.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont_condensed.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont_italic.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont_italic.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont_open.otf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont_open.otf"
+)
+set(testdata_resource_files
+ "../../../shared/resources/testfont.ttf"
+ "../../../shared/resources/testfont_condensed.ttf"
+ "../../../shared/resources/testfont_italic.ttf"
+ "../../../shared/resources/testfont_open.otf"
+ "LED_REAL.TTF"
+)
+
+add_qt_resource(tst_qfontdatabase "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qfontmetrics/CMakeLists.txt b/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
new file mode 100644
index 0000000000..029f5d5ce3
--- /dev/null
+++ b/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qfontmetrics.pro.
+
+#####################################################################
+## tst_qfontmetrics Test:
+#####################################################################
+
+add_qt_test(tst_qfontmetrics
+ SOURCES
+ tst_qfontmetrics.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set(testfont_resource_files
+ "../../../shared/resources/testfont.ttf"
+ "ucs4font.ttf"
+)
+
+add_qt_resource(tst_qfontmetrics "testfont"
+ PREFIX
+ "/fonts"
+ FILES
+ ${testfont_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qglyphrun/CMakeLists.txt b/tests/auto/gui/text/qglyphrun/CMakeLists.txt
new file mode 100644
index 0000000000..8efcfc0cf9
--- /dev/null
+++ b/tests/auto/gui/text/qglyphrun/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qglyphrun.pro.
+
+#####################################################################
+## tst_qglyphrun Test:
+#####################################################################
+
+add_qt_test(tst_qglyphrun
+ SOURCES
+ tst_qglyphrun.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/test.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "test.ttf"
+)
+set(testdata_resource_files
+ "../../../shared/resources/test.ttf"
+)
+
+add_qt_resource(tst_qglyphrun "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qinputcontrol/CMakeLists.txt b/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
new file mode 100644
index 0000000000..e544fb313c
--- /dev/null
+++ b/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qinputcontrol.pro.
+
+#####################################################################
+## tst_qinputcontrol Test:
+#####################################################################
+
+add_qt_test(tst_qinputcontrol
+ SOURCES
+ tst_qinputcontrol.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qrawfont/CMakeLists.txt b/tests/auto/gui/text/qrawfont/CMakeLists.txt
new file mode 100644
index 0000000000..5044866c49
--- /dev/null
+++ b/tests/auto/gui/text/qrawfont/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from qrawfont.pro.
+
+#####################################################################
+## tst_qrawfont Test:
+#####################################################################
+
+add_qt_test(tst_qrawfont
+ SOURCES
+ tst_qrawfont.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set(testdata_resource_files
+ "../../../shared/resources/testfont.ttf"
+ "testfont_bold_italic.ttf"
+ "testfont_os2_v1.ttf"
+)
+
+add_qt_resource(tst_qrawfont "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qstatictext/CMakeLists.txt b/tests/auto/gui/text/qstatictext/CMakeLists.txt
new file mode 100644
index 0000000000..80eef2f254
--- /dev/null
+++ b/tests/auto/gui/text/qstatictext/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qstatictext.pro.
+
+#####################################################################
+## tst_qstatictext Test:
+#####################################################################
+
+add_qt_test(tst_qstatictext
+ SOURCES
+ tst_qstatictext.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qstatictext CONDITION QT_FEATURE_private_tests
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt b/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
new file mode 100644
index 0000000000..c4ea8b4a1e
--- /dev/null
+++ b/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qsyntaxhighlighter.pro.
+
+#####################################################################
+## tst_qsyntaxhighlighter Test:
+#####################################################################
+
+add_qt_test(tst_qsyntaxhighlighter
+ SOURCES
+ tst_qsyntaxhighlighter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qsyntaxhighlighter CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qtextblock/CMakeLists.txt b/tests/auto/gui/text/qtextblock/CMakeLists.txt
new file mode 100644
index 0000000000..18e0be18c6
--- /dev/null
+++ b/tests/auto/gui/text/qtextblock/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextblock.pro.
+
+#####################################################################
+## tst_qtextblock Test:
+#####################################################################
+
+add_qt_test(tst_qtextblock
+ SOURCES
+ tst_qtextblock.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextcursor/CMakeLists.txt b/tests/auto/gui/text/qtextcursor/CMakeLists.txt
new file mode 100644
index 0000000000..78b6ed191d
--- /dev/null
+++ b/tests/auto/gui/text/qtextcursor/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextcursor.pro.
+
+#####################################################################
+## tst_qtextcursor Test:
+#####################################################################
+
+add_qt_test(tst_qtextcursor
+ SOURCES
+ tst_qtextcursor.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextdocument/CMakeLists.txt b/tests/auto/gui/text/qtextdocument/CMakeLists.txt
new file mode 100644
index 0000000000..7ea22d3fb0
--- /dev/null
+++ b/tests/auto/gui/text/qtextdocument/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtextdocument.pro.
+
+#####################################################################
+## tst_qtextdocument Test:
+#####################################################################
+
+add_qt_test(tst_qtextdocument
+ SOURCES
+ common.h
+ tst_qtextdocument.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Xml
+)
diff --git a/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt b/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
new file mode 100644
index 0000000000..f92a82a262
--- /dev/null
+++ b/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextdocumentfragment.pro.
+
+#####################################################################
+## tst_qtextdocumentfragment Test:
+#####################################################################
+
+add_qt_test(tst_qtextdocumentfragment
+ SOURCES
+ tst_qtextdocumentfragment.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt b/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
new file mode 100644
index 0000000000..c7212209ee
--- /dev/null
+++ b/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtextdocumentlayout.pro.
+
+#####################################################################
+## tst_qtextdocumentlayout Test:
+#####################################################################
+
+add_qt_test(tst_qtextdocumentlayout
+ SOURCES
+ tst_qtextdocumentlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextdocumentlayout CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qtextformat/CMakeLists.txt b/tests/auto/gui/text/qtextformat/CMakeLists.txt
new file mode 100644
index 0000000000..be7653abd4
--- /dev/null
+++ b/tests/auto/gui/text/qtextformat/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextformat.pro.
+
+#####################################################################
+## tst_qtextformat Test:
+#####################################################################
+
+add_qt_test(tst_qtextformat
+ SOURCES
+ tst_qtextformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextlayout/CMakeLists.txt b/tests/auto/gui/text/qtextlayout/CMakeLists.txt
new file mode 100644
index 0000000000..c87d5bdd4d
--- /dev/null
+++ b/tests/auto/gui/text/qtextlayout/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextlayout.pro.
+
+#####################################################################
+## tst_qtextlayout Test:
+#####################################################################
+
+add_qt_test(tst_qtextlayout
+ SOURCES
+ tst_qtextlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextlist/CMakeLists.txt b/tests/auto/gui/text/qtextlist/CMakeLists.txt
new file mode 100644
index 0000000000..f22de38a8c
--- /dev/null
+++ b/tests/auto/gui/text/qtextlist/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtextlist.pro.
+
+#####################################################################
+## tst_qtextlist Test:
+#####################################################################
+
+add_qt_test(tst_qtextlist
+ SOURCES
+ ../qtextdocument/common.h
+ tst_qtextlist.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt b/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
new file mode 100644
index 0000000000..6a1043c89f
--- /dev/null
+++ b/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qtextmarkdownimporter.pro.
+
+#####################################################################
+## tst_qtextmarkdownimporter Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "data/thematicBreaks.md")
+list(APPEND test_data "data/headingBulletsContinuations.md")
+
+add_qt_test(tst_qtextmarkdownimporter
+ SOURCES
+ tst_qtextmarkdownimporter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt b/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
new file mode 100644
index 0000000000..7360b40994
--- /dev/null
+++ b/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qtextmarkdownwriter.pro.
+
+#####################################################################
+## tst_qtextmarkdownwriter Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "data/example.md")
+list(APPEND test_data "data/blockquotes.md")
+
+add_qt_test(tst_qtextmarkdownwriter
+ SOURCES
+ tst_qtextmarkdownwriter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/gui/text/qtextobject/CMakeLists.txt b/tests/auto/gui/text/qtextobject/CMakeLists.txt
new file mode 100644
index 0000000000..b8d7f7b548
--- /dev/null
+++ b/tests/auto/gui/text/qtextobject/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtextobject.pro.
+
+#####################################################################
+## tst_qtextobject Test:
+#####################################################################
+
+add_qt_test(tst_qtextobject
+ SOURCES
+ tst_qtextobject.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextobject CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt b/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
new file mode 100644
index 0000000000..18c84e5a45
--- /dev/null
+++ b/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtextodfwriter.pro.
+
+#####################################################################
+## tst_qtextodfwriter Test:
+#####################################################################
+
+add_qt_test(tst_qtextodfwriter
+ SOURCES
+ tst_qtextodfwriter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt b/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
new file mode 100644
index 0000000000..5fb8db5405
--- /dev/null
+++ b/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qtextpiecetable.pro.
+
+if(WIN32)
+ return()
+endif()
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qtextpiecetable Test:
+#####################################################################
+
+add_qt_test(tst_qtextpiecetable
+ SOURCES
+ ../qtextdocument/common.h
+ tst_qtextpiecetable.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qtextpiecetable.pro:<TRUE>:
+# _REQUIREMENTS = "!win32" "qtConfig(private_tests)"
diff --git a/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt b/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
new file mode 100644
index 0000000000..8d94e33b6c
--- /dev/null
+++ b/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextscriptengine.pro.
+
+#####################################################################
+## tst_qtextscriptengine Test:
+#####################################################################
+
+add_qt_test(tst_qtextscriptengine
+ SOURCES
+ tst_qtextscriptengine.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt b/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
new file mode 100644
index 0000000000..b2434569d4
--- /dev/null
+++ b/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from generate.pro.
+
+#####################################################################
+## generate Binary:
+#####################################################################
+
+add_qt_executable(generate
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ /usr/include/freetype2
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+)
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 0371f51961..348042bacb 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1217,9 +1217,6 @@ void tst_QTextScriptEngine::thaiWithZWJ()
QFont font(QStringLiteral("Waree"));
font.setStyleStrategy(QFont::NoFontMerging);
- if (QFontInfo(font).styleName() != QStringLiteral("Book"))
- QSKIP("couldn't find 'Waree Book' font");
-
QString s(QString::fromUtf8("\xe0\xb8\xa3\xe2\x80\x8d\xe0\xb8\xa3\xe2\x80"
"\x8c\x2e\xe0\xb8\xa3\x2e\xe2\x80\x9c\xe0\xb8"
"\xa3\xe2\x80\xa6\xe0\xb8\xa3\xe2\x80\x9d\xe0"
diff --git a/tests/auto/gui/text/qtexttable/CMakeLists.txt b/tests/auto/gui/text/qtexttable/CMakeLists.txt
new file mode 100644
index 0000000000..de82c94233
--- /dev/null
+++ b/tests/auto/gui/text/qtexttable/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qtexttable.pro.
+
+#####################################################################
+## tst_qtexttable Test:
+#####################################################################
+
+add_qt_test(tst_qtexttable
+ SOURCES
+ tst_qtexttable.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtexttable CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qzip/CMakeLists.txt b/tests/auto/gui/text/qzip/CMakeLists.txt
new file mode 100644
index 0000000000..dfeb968cc1
--- /dev/null
+++ b/tests/auto/gui/text/qzip/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qzip.pro.
+
+#####################################################################
+## tst_qzip Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "testdata")
+
+add_qt_test(tst_qzip
+ SOURCES
+ tst_qzip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(testdata_resource_files
+ "testdata/symlink.zip"
+ "testdata/test.zip"
+ )
+
+ add_qt_resource(tst_qzip "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/util/CMakeLists.txt b/tests/auto/gui/util/CMakeLists.txt
new file mode 100644
index 0000000000..4e0a6b7e25
--- /dev/null
+++ b/tests/auto/gui/util/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from util.pro.
+
+add_subdirectory(qdesktopservices)
+add_subdirectory(qdoublevalidator)
+add_subdirectory(qintvalidator)
+add_subdirectory(qregexpvalidator)
+add_subdirectory(qregularexpressionvalidator)
+add_subdirectory(qshadergenerator)
+add_subdirectory(qshadergraph)
+add_subdirectory(qshadergraphloader)
+add_subdirectory(qshadernodes)
+add_subdirectory(qshadernodesloader)
+add_subdirectory(qtexturefilereader)
diff --git a/tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt b/tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8163ec80b6
--- /dev/null
+++ b/tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdesktopservices.pro.
+
+#####################################################################
+## tst_qdesktopservices Test:
+#####################################################################
+
+add_qt_test(tst_qdesktopservices
+ SOURCES
+ tst_qdesktopservices.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qdesktopservices/CMakeLists.txt b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
new file mode 100644
index 0000000000..c62cecac30
--- /dev/null
+++ b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdesktopservices.pro.
+
+#####################################################################
+## tst_qdesktopservices Test:
+#####################################################################
+
+add_qt_test(tst_qdesktopservices
+ SOURCES
+ tst_qdesktopservices.cpp
+ DEFINES
+ # QT_DISABLE_DEPRECATED_BEFORE=0 # special case
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
new file mode 100644
index 0000000000..6cccd082a9
--- /dev/null
+++ b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdoublevalidator.pro.
+
+#####################################################################
+## tst_qdoublevalidator Test:
+#####################################################################
+
+add_qt_test(tst_qdoublevalidator
+ SOURCES
+ tst_qdoublevalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qintvalidator/CMakeLists.txt b/tests/auto/gui/util/qintvalidator/CMakeLists.txt
new file mode 100644
index 0000000000..69a5503d8e
--- /dev/null
+++ b/tests/auto/gui/util/qintvalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qintvalidator.pro.
+
+#####################################################################
+## tst_qintvalidator Test:
+#####################################################################
+
+add_qt_test(tst_qintvalidator
+ SOURCES
+ tst_qintvalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt b/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt
new file mode 100644
index 0000000000..4f7d7da0c2
--- /dev/null
+++ b/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qregexpvalidator.pro.
+
+#####################################################################
+## tst_qregexpvalidator Test:
+#####################################################################
+
+add_qt_test(tst_qregexpvalidator
+ SOURCES
+ tst_qregexpvalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
new file mode 100644
index 0000000000..8633a171e5
--- /dev/null
+++ b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qregularexpressionvalidator.pro.
+
+#####################################################################
+## tst_qregularexpressionvalidator Test:
+#####################################################################
+
+add_qt_test(tst_qregularexpressionvalidator
+ SOURCES
+ tst_qregularexpressionvalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qshadergenerator/CMakeLists.txt b/tests/auto/gui/util/qshadergenerator/CMakeLists.txt
new file mode 100644
index 0000000000..e9cb62377f
--- /dev/null
+++ b/tests/auto/gui/util/qshadergenerator/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadergenerator.pro.
+
+#####################################################################
+## tst_qshadergenerator Test:
+#####################################################################
+
+add_qt_test(tst_qshadergenerator
+ SOURCES
+ tst_qshadergenerator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadergraph/CMakeLists.txt b/tests/auto/gui/util/qshadergraph/CMakeLists.txt
new file mode 100644
index 0000000000..ede24f2a40
--- /dev/null
+++ b/tests/auto/gui/util/qshadergraph/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadergraph.pro.
+
+#####################################################################
+## tst_qshadergraph Test:
+#####################################################################
+
+add_qt_test(tst_qshadergraph
+ SOURCES
+ tst_qshadergraph.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadergraphloader/CMakeLists.txt b/tests/auto/gui/util/qshadergraphloader/CMakeLists.txt
new file mode 100644
index 0000000000..caf863d42d
--- /dev/null
+++ b/tests/auto/gui/util/qshadergraphloader/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadergraphloader.pro.
+
+#####################################################################
+## tst_qshadergraphloader Test:
+#####################################################################
+
+add_qt_test(tst_qshadergraphloader
+ SOURCES
+ tst_qshadergraphloader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadernodes/CMakeLists.txt b/tests/auto/gui/util/qshadernodes/CMakeLists.txt
new file mode 100644
index 0000000000..d7cc14b09c
--- /dev/null
+++ b/tests/auto/gui/util/qshadernodes/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadernodes.pro.
+
+#####################################################################
+## tst_qshadernodes Test:
+#####################################################################
+
+add_qt_test(tst_qshadernodes
+ SOURCES
+ tst_qshadernodes.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadernodesloader/CMakeLists.txt b/tests/auto/gui/util/qshadernodesloader/CMakeLists.txt
new file mode 100644
index 0000000000..e381af4f7b
--- /dev/null
+++ b/tests/auto/gui/util/qshadernodesloader/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadernodesloader.pro.
+
+#####################################################################
+## tst_qshadernodesloader Test:
+#####################################################################
+
+add_qt_test(tst_qshadernodesloader
+ SOURCES
+ tst_qshadernodesloader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp b/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp
index 4782e40ed8..ec1bd87a32 100644
--- a/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp
+++ b/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp
@@ -272,6 +272,10 @@ void tst_QShaderNodesLoader::shouldLoadFromJsonStream_data()
QTest::newRow("NotOpen") << createBuffer(smallJson, QIODevice::NotOpen) << NodeHash() << QShaderNodesLoader::Error;
QTest::newRow("CorrectJSON") << createBuffer(smallJson) << smallProtos << QShaderNodesLoader::Ready;
+
+ // These types are normaly registered by QShaderGraphLoader
+ qRegisterMetaType<QShaderLanguage::StorageQualifier>();
+ qRegisterMetaType<QShaderLanguage::VariableType>();
}
void tst_QShaderNodesLoader::shouldLoadFromJsonStream()
diff --git a/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
new file mode 100644
index 0000000000..3b6d99c0e8
--- /dev/null
+++ b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from qtexturefilereader.pro.
+
+#####################################################################
+## tst_qtexturefilereader Test:
+#####################################################################
+
+add_qt_test(tst_qtexturefilereader
+ SOURCES
+ tst_qtexturefilereader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qtexturefilereader_resource_files
+ "texturefiles/car.ktx"
+ "texturefiles/car_mips.ktx"
+ "texturefiles/newlogo.astc"
+ "texturefiles/newlogo_srgb.astc"
+ "texturefiles/pattern.pkm"
+)
+
+add_qt_resource(tst_qtexturefilereader "qtexturefilereader"
+ PREFIX
+ "/"
+ FILES
+ ${qtexturefilereader_resource_files}
+)
+