summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/CMakeLists.txt11
-rw-r--r--tests/auto/cmake/CMakeLists.txt69
-rw-r--r--tests/auto/cmake/mockplugins/.cmake.conf2
-rw-r--r--tests/auto/cmake/mockplugins/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mock1plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mock2plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mock3plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mock4plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mock5plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mock6plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt4
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt4
-rw-r--r--tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_QFINDTESTDATA/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_QFINDTESTDATA/tests/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_add_big_resource/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_add_binary_resources_delayed_file/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_add_resource_options/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/CMakeLists.txt45
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.cpp20
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.h9
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/leaf_lib.cpp13
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/leaf_lib.h8
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/main.cpp35
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/resource1.txt1
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/resource2.txt1
-rw-r--r--tests/auto/cmake/test_add_resources_big_resources/resource3.txt1
-rw-r--r--tests/auto/cmake/test_add_resources_binary_generated/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_add_resources_delayed_file/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro5
-rw-r--r--tests/auto/cmake/test_concurrent_module/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_dbus_module/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_dependent_modules/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_global_promotion/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_global_promotion/subdir_with_global_qt/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_global_promotion/subdir_with_local_qt/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_import_plugins/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_interface/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_interface/widget_test/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_json_plugin_includes/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_moc_macro_target/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_multiple_find_package/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_opengl_lib/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_platform_defs_include/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_plugin_shared_static_flavor.cmake3
-rw-r--r--tests/auto/cmake/test_plugin_shared_static_flavor/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_plugins/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_private_includes/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_private_targets/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_qt_extract_metatypes/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_qt_extract_metatypes/test_qt_extract_metatypes_project/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_static_resources/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_static_resources/mock_static_resources1/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_testlib_definitions/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_testlib_definitions/core_only/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_testlib_definitions/gui/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_testlib_definitions/widgets/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_umbrella_config/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_umbrella_config/components_found/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_umbrella_config/components_not_found/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_versionless_targets/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt16
-rw-r--r--tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt3
-rw-r--r--tests/auto/concurrent/CMakeLists.txt3
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp2
-rw-r--r--tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp4
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp2
-rw-r--r--tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp6
-rw-r--r--tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp6
-rw-r--r--tests/auto/corelib/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/animation/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/global/q_func_info/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qcompare/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qflags/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qfloat16/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qgetputenv/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp8
-rw-r--r--tests/auto/corelib/global/qglobal/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qglobal/qglobal.c1
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp15
-rw-r--r--tests/auto/corelib/global/qglobalstatic/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qhooks/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qkeycombination/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp16
-rw-r--r--tests/auto/corelib/global/qnativeinterface/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qnumeric/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp13
-rw-r--r--tests/auto/corelib/global/qtendian/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qwinregistry/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/global/qwinregistry/tst_qwinregistry.cpp43
-rw-r--r--tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/largefile/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qbuffer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qdataurl/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qdebug/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp280
-rw-r--r--tests/auto/corelib/io/qdir/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/qdir.pro3
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp11
-rw-r--r--tests/auto/corelib/io/qdiriterator/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp12
-rw-r--r--tests/auto/corelib/io/qfile/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp62
-rw-r--r--tests/auto/corelib/io/qfileinfo/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp11
-rw-r--r--tests/auto/corelib/io/qfileselector/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qfilesystementry/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp8
-rw-r--r--tests/auto/corelib/io/qiodevice/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp6
-rw-r--r--tests/auto/corelib/io/qipaddress/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qlockfile/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qloggingcategory/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp4
-rw-r--r--tests/auto/corelib/io/qloggingregistry/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qnodebug/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/test/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp9
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qresourceengine/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qresourceengine/staticplugin/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp12
-rw-r--r--tests/auto/corelib/io/qsavefile/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qsettings/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp2
-rw-r--r--tests/auto/corelib/io/qstandardpaths/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp8
-rw-r--r--tests/auto/corelib/io/qstorageinfo/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qtemporarydir/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp6
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp8
-rw-r--r--tests/auto/corelib/io/qurl/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp2
-rw-r--r--tests/auto/corelib/io/qurlinternal/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp2
-rw-r--r--tests/auto/corelib/io/qurlquery/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp8
-rw-r--r--tests/auto/corelib/io/qurluts46/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/io/qurluts46/tst_qurluts46.cpp33
-rw-r--r--tests/auto/corelib/itemmodels/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp16
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp2
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp10
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp10
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp2
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp8
-rw-r--r--tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp2
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp8
-rw-r--r--tests/auto/corelib/kernel/qeventloop/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java24
-rw-r--r--tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp92
-rw-r--r--tests/auto/corelib/kernel/qjniobject/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp7
-rw-r--r--tests/auto/corelib/kernel/qjnitypes/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qmath/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp39
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt24
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/forwarddeclared.cpp17
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/forwarddeclared.h12
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp844
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp2
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qmetatype/CMakeLists.txt42
-rw-r--r--tests/auto/corelib/kernel/qmetatype/lib1.cpp5
-rw-r--r--tests/auto/corelib/kernel/qmetatype/lib2.cpp5
-rw-r--r--tests/auto/corelib/kernel/qmetatype/lib_common.cpp13
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp637
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h21
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype2.cpp251
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype_libs.h24
-rw-r--r--tests/auto/corelib/kernel/qmimedata/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp4
-rw-r--r--tests/auto/corelib/kernel/qobject/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp153
-rw-r--r--tests/auto/corelib/kernel/qpointer/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/kernel/qproperty/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp42
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/tst_qsharedmemory.cpp4
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/tst_qsystemsemaphore.cpp2
-rw-r--r--tests/auto/corelib/kernel/qtimer/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp10
-rw-r--r--tests/auto/corelib/kernel/qtranslator/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/kernel/qvariant/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp460
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qwinregistrykey/.gitignore1
-rw-r--r--tests/auto/corelib/kernel/qwinregistrykey/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/kernel/qwinregistrykey/tst_qwinregistrykey.cpp232
-rw-r--r--tests/auto/corelib/mimetypes/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp10
-rw-r--r--tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/platform/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/platform/android/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qlibrary/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt41
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt29
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp8
-rw-r--r--tests/auto/corelib/plugin/qplugin/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp4
-rw-r--r--tests/auto/corelib/plugin/quuid/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/quuid/test/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid.cpp8
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid_darwin.mm2
-rw-r--r--tests/auto/corelib/serialization/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/json/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp12
-rw-r--r--tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qdatastream/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp16
-rw-r--r--tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qtextstream/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp57
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp26
-rw-r--r--tests/auto/corelib/text/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qanystringview/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qanystringview/tst_qanystringview.cpp10
-rw-r--r--tests/auto/corelib/text/qbytearray/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp77
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray_mac.mm2
-rw-r--r--tests/auto/corelib/text/qbytearrayapisymmetry/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qbytearraylist/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp6
-rw-r--r--tests/auto/corelib/text/qbytearrayview/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qchar/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qchar/tst_qchar.cpp7
-rw-r--r--tests/auto/corelib/text/qcollator/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/text/qlatin1stringview/tst_qlatin1stringview.cpp104
-rw-r--r--tests/auto/corelib/text/qlocale/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qlocale/test/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp132
-rw-r--r--tests/auto/corelib/text/qregularexpression/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp33
-rw-r--r--tests/auto/corelib/text/qstring/CMakeLists.txt9
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp195
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring_mac.mm2
-rw-r--r--tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qstringbuilder/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder2/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder3/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder4/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringconverter/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp8
-rw-r--r--tests/auto/corelib/text/qstringiterator/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qstringlist/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringmatcher/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringmatcher/tst_qstringmatcher.cpp25
-rw-r--r--tests/auto/corelib/text/qstringtokenizer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qstringview/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp6
-rw-r--r--tests/auto/corelib/text/qunicodetools/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicint/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp14
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/char16_t/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/char32_t/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qlonglong/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qptrdiff/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/quintptr/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qulonglong/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/schar/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/short/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp32
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/uchar/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/ulong/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/ushort/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/wchar_t/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qfuture/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp71
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp2
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qmutex/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qmutex/tst_qmutex.cpp41
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qpromise/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qreadlocker/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qresultstore/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qsemaphore/BLACKLIST6
-rw-r--r--tests/auto/corelib/thread/qsemaphore/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qthread/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp31
-rw-r--r--tests/auto/corelib/thread/qthreadonce/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qthreadpool/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qwritelocker/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/time/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/time/qcalendar/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/time/qdate/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/time/qdate/tst_qdate.cpp2
-rw-r--r--tests/auto/corelib/time/qdatetime/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp60
-rw-r--r--tests/auto/corelib/time/qdatetime/tst_qdatetime_mac.mm2
-rw-r--r--tests/auto/corelib/time/qdatetimeparser/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/time/qtime/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/time/qtimezone/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp12
-rw-r--r--tests/auto/corelib/tools/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/collections/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp66
-rw-r--r--tests/auto/corelib/tools/containerapisymmetry/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qalgorithms/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qarraydata/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qatomicscopedvaluerollback/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qbitarray/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp4
-rw-r--r--tests/auto/corelib/tools/qcache/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/testhelper/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp41
-rw-r--r--tests/auto/corelib/tools/qduplicatetracker/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp4
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qflatmap/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qfreelist/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qhash/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp67
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp6
-rw-r--r--tests/auto/corelib/tools/qhashseed/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qline/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qlist/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp24
-rw-r--r--tests/auto/corelib/tools/qmacautoreleasepool/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm2
-rw-r--r--tests/auto/corelib/tools/qmakearray/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qmap/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp245
-rw-r--r--tests/auto/corelib/tools/qmargins/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp2
-rw-r--r--tests/auto/corelib/tools/qoffsetstringarray/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qpair/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qpoint/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qpointf/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qqueue/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qrect/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qrect/tst_qrect.cpp30
-rw-r--r--tests/auto/corelib/tools/qringbuffer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp68
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qscopeguard/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qset/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp26
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp4
-rw-r--r--tests/auto/corelib/tools/qsize/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qsizef/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qstl/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qtaggedpointer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qtaggedpointer/tst_qtaggedpointer.cpp42
-rw-r--r--tests/auto/corelib/tools/qtimeline/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp44
-rw-r--r--tests/auto/corelib/tools/qversionnumber/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/myobject.h2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp18
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/org.qtproject.QtDBus.Pinger.xml2
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp4
-rw-r--r--tests/auto/dbus/qdbusconnection/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp14
-rw-r--r--tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbuscontext/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusinterface/CMakeLists.txt7
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp12
-rw-r--r--tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusmarshall/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusmarshall/common.h56
-rw-r--r--tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt7
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp14
-rw-r--r--tests/auto/dbus/qdbusmetaobject/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusmetatype/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbuspendingcall/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbuspendingreply/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusreply/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt3
-rw-r--r--tests/auto/dbus/qdbusthreading/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbustype/CMakeLists.txt7
-rw-r--r--tests/auto/dbus/qdbustype/tst_qdbustype.cpp4
-rw-r--r--tests/auto/dbus/qdbusxmlparser/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp4
-rw-r--r--tests/auto/gui/CMakeLists.txt3
-rw-r--r--tests/auto/gui/image/CMakeLists.txt3
-rw-r--r--tests/auto/gui/image/qicoimageformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qicon/CMakeLists.txt7
-rw-r--r--tests/auto/gui/image/qiconhighdpi/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimage/CMakeLists.txt9
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp22
-rw-r--r--tests/auto/gui/image/qimageiohandler/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimagereader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp7
-rw-r--r--tests/auto/gui/image/qimagewriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qmovie/CMakeLists.txt7
-rw-r--r--tests/auto/gui/image/qpicture/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qpixmap/CMakeLists.txt9
-rw-r--r--tests/auto/gui/image/qpixmapcache/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/CMakeLists.txt3
-rw-r--r--tests/auto/gui/itemmodels/qfilesystemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/qfilesystemmodel/tst_qfilesystemmodel.cpp2
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp12
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp14
-rw-r--r--tests/auto/gui/kernel/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/noqteventloop/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/noqteventloop/tst_noqteventloop.cpp3
-rw-r--r--tests/auto/gui/kernel/qaction/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qactiongroup/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qaddpostroutine/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qbackingstore/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp5
-rw-r--r--tests/auto/gui/kernel/qclipboard/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp6
-rw-r--r--tests/auto/gui/kernel/qcursor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qdrag/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qevent/tst_qevent.cpp13
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguiapplication/BLACKLIST4
-rw-r--r--tests/auto/gui/kernel/qguiapplication/CMakeLists.txt6
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp17
-rw-r--r--tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguieventloop/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qguimetatype/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp74
-rw-r--r--tests/auto/gui/kernel/qguitimer/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qguivariant/CMakeLists.txt3
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qhighdpi/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qhighdpi/tst_qhighdpi.cpp64
-rw-r--r--tests/auto/gui/kernel/qinputdevice/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qinputdevice/tst_qinputdevice.cpp2
-rw-r--r--tests/auto/gui/kernel/qinputmethod/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qkeyevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qkeysequence/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qmouseevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp4
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qpalette/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp69
-rw-r--r--tests/auto/gui/kernel/qpixelformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qscreen/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qshortcut/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qtouchevent/BLACKLIST4
-rw-r--r--tests/auto/gui/kernel/qtouchevent/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp223
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST5
-rw-r--r--tests/auto/gui/kernel/qwindow/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp132
-rw-r--r--tests/auto/gui/math3d/CMakeLists.txt3
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt7
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp175
-rw-r--r--tests/auto/gui/math3d/qquaternion/CMakeLists.txt5
-rw-r--r--tests/auto/gui/math3d/qvectornd/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/CMakeLists.txt3
-rw-r--r--tests/auto/gui/painting/qbrush/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qcolor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qcolorspace/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qcolortransform/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpagelayout/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpageranges/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpagesize/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpaintengine/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpainter/CMakeLists.txt7
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp3
-rw-r--r--tests/auto/gui/painting/qpainterpath/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpathclipper/CMakeLists.txt7
-rw-r--r--tests/auto/gui/painting/qpdfwriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpen/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qpolygon/CMakeLists.txt7
-rw-r--r--tests/auto/gui/painting/qregion/CMakeLists.txt5
-rw-r--r--tests/auto/gui/painting/qtransform/CMakeLists.txt7
-rw-r--r--tests/auto/gui/platform/CMakeLists.txt3
-rw-r--r--tests/auto/gui/platform/qx11info/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qopengl/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp11
-rw-r--r--tests/auto/gui/qopenglconfig/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qvulkan/CMakeLists.txt5
-rw-r--r--tests/auto/gui/qvulkan/tst_qvulkan.cpp8
-rw-r--r--tests/auto/gui/rhi/CMakeLists.txt3
-rw-r--r--tests/auto/gui/rhi/qrhi/CMakeLists.txt5
-rw-r--r--tests/auto/gui/rhi/qrhi/data/buildshaders.bat4
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.frag10
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsbbin0 -> 591 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tesc22
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsbbin0 -> 1402 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tese17
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsbbin0 -> 1401 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.vert12
-rw-r--r--tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsbbin0 -> 936 bytes
-rw-r--r--tests/auto/gui/rhi/qrhi/tst_qrhi.cpp268
-rw-r--r--tests/auto/gui/rhi/qshader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/rhi/qshader/data/metal_enabled_tessellation_v7.frag.qsbbin0 -> 729 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data/metal_enabled_tessellation_v7.tesc.qsbbin0 -> 1749 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data/metal_enabled_tessellation_v7.tese.qsbbin0 -> 2390 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data/metal_enabled_tessellation_v7.vert.qsbbin0 -> 1106 bytes
-rw-r--r--tests/auto/gui/rhi/qshader/data_src/color.vert (renamed from tests/auto/gui/rhi/qshader/data/color.vert)0
-rw-r--r--tests/auto/gui/rhi/qshader/data_src/texture.frag (renamed from tests/auto/gui/rhi/qshader/data/texture.frag)0
-rw-r--r--tests/auto/gui/rhi/qshader/data_src/texture_sep.frag (renamed from tests/auto/gui/rhi/qshader/data/texture_sep.frag)0
-rw-r--r--tests/auto/gui/rhi/qshader/tst_qshader.cpp187
-rw-r--r--tests/auto/gui/text/CMakeLists.txt3
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp6
-rw-r--r--tests/auto/gui/text/qcssparser/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp98
-rw-r--r--tests/auto/gui/text/qfont/BLACKLIST4
-rw-r--r--tests/auto/gui/text/qfont/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp5
-rw-r--r--tests/auto/gui/text/qfontcache/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qfontdatabase/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qfontmetrics/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qglyphrun/CMakeLists.txt6
-rw-r--r--tests/auto/gui/text/qglyphrun/Ligatures.otfbin0 -> 24624 bytes
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp310
-rw-r--r--tests/auto/gui/text/qinputcontrol/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qrawfont/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qstatictext/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp27
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp6
-rw-r--r--tests/auto/gui/text/qtextblock/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextcursor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp24
-rw-r--r--tests/auto/gui/text/qtextdocument/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp24
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp12
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp37
-rw-r--r--tests/auto/gui/text/qtextformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp24
-rw-r--r--tests/auto/gui/text/qtextlayout/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp50
-rw-r--r--tests/auto/gui/text/qtextlist/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextobject/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtextodfwriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp4
-rw-r--r--tests/auto/gui/text/qtextpiecetable/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp22
-rw-r--r--tests/auto/gui/text/qtextscriptengine/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt6
-rw-r--r--tests/auto/gui/text/qtexttable/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtexttable/tst_qtexttable.cpp28
-rw-r--r--tests/auto/gui/text/qzip/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qzip/tst_qzip.cpp8
-rw-r--r--tests/auto/gui/util/CMakeLists.txt3
-rw-r--r--tests/auto/gui/util/qdesktopservices/CMakeLists.txt7
-rw-r--r--tests/auto/gui/util/qdoublevalidator/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qdoublevalidator/tst_qdoublevalidator.cpp1
-rw-r--r--tests/auto/gui/util/qintvalidator/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/tst_qregularexpressionvalidator.cpp2
-rw-r--r--tests/auto/gui/util/qtexturefilereader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundogroup/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundogroup/tst_qundogroup.cpp12
-rw-r--r--tests/auto/gui/util/qundostack/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundostack/tst_qundostack.cpp12
-rw-r--r--tests/auto/network/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/hpack/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/hsts/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/http2/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp17
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qdecompresshelper/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qhttpheaderparser/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp4
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkaccessmanager/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkcachemetadata/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkcookie/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp4
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp4
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp2
-rw-r--r--tests/auto/network/access/qnetworkreply/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/qnetworkreply/certs/server.key38
-rw-r--r--tests/auto/network/access/qnetworkreply/certs/server.pem42
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/qnetworkreply/test/CMakeLists.txt6
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp182
-rw-r--r--tests/auto/network/access/qnetworkrequest/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/CMakeLists.txt3
-rw-r--r--tests/auto/network/kernel/qauthenticator/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qdnslookup/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qhostaddress/CMakeLists.txt7
-rw-r--r--tests/auto/network/kernel/qhostinfo/CMakeLists.txt7
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp16
-rw-r--r--tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qnetworkinformation/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qnetworkinformation_appless/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp2
-rw-r--r--tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt5
-rw-r--r--tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/CMakeLists.txt3
-rw-r--r--tests/auto/network/socket/platformsocketengine/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qabstractsocket/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp4
-rw-r--r--tests/auto/network/socket/qlocalsocket/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qlocalsocket/socketprocess/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp16
-rw-r--r--tests/auto/network/socket/qsctpsocket/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/BLACKLIST3
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp8
-rw-r--r--tests/auto/network/socket/qtcpserver/CMakeLists.txt3
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qtcpserver/test/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp6
-rw-r--r--tests/auto/network/socket/qtcpsocket/CMakeLists.txt3
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp6
-rw-r--r--tests/auto/network/socket/qudpsocket/CMakeLists.txt3
-rw-r--r--tests/auto/network/socket/qudpsocket/clientserver/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qudpsocket/test/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp94
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/CMakeLists.txt3
-rw-r--r--tests/auto/network/ssl/qasn1element/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qdtls/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qdtls/certs/fluke.cert105
-rw-r--r--tests/auto/network/ssl/qdtls/certs/fluke.key67
-rw-r--r--tests/auto/network/ssl/qdtls/tst_qdtls.cpp10
-rw-r--r--tests/auto/network/ssl/qdtlscookie/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qocsp/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qpassworddigestor/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslcertificate/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslcertificate/more-certificates/cert-large-expiration-date.txt.0.9.842
-rw-r--r--tests/auto/network/ssl/qsslcertificate/more-certificates/cert-large-expiration-date.txt.1.0.142
-rw-r--r--tests/auto/network/ssl/qsslcertificate/more-certificates/cert-large-expiration-date.txt.1.0.1c41
-rw-r--r--tests/auto/network/ssl/qsslcertificate/more-certificates/cert-large-expiration-date.txt.3.0.5 (renamed from tests/auto/network/ssl/qsslcertificate/more-certificates/cert-large-expiration-date.txt.1.0.0)4
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp74
-rw-r--r--tests/auto/network/ssl/qsslcipher/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qssldiffiehellmanparameters/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslellipticcurve/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslerror/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslkey/CMakeLists.txt7
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp61
-rw-r--r--tests/auto/network/ssl/qsslserver/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslserver/tst_qsslserver.cpp90
-rw-r--r--tests/auto/network/ssl/qsslsocket/CMakeLists.txt6
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/ca-generate.sh21
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/ca.conf10
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/ca.crt70
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/ca.key99
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/inter.conf14
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/inter.crt71
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/inter.key99
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/leaf.conf14
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/leaf.crt73
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/leaf.key127
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp106
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/shared/qopenssl_symbols.h2
-rw-r--r--tests/auto/other/CMakeLists.txt3
-rw-r--r--tests/auto/other/android/CMakeLists.txt3
-rw-r--r--tests/auto/other/gestures/BLACKLIST52
-rw-r--r--tests/auto/other/gestures/CMakeLists.txt5
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp48
-rw-r--r--tests/auto/other/languagechange/CMakeLists.txt5
-rw-r--r--tests/auto/other/macgui/CMakeLists.txt7
-rw-r--r--tests/auto/other/macnativeevents/CMakeLists.txt7
-rw-r--r--tests/auto/other/macplist/CMakeLists.txt3
-rw-r--r--tests/auto/other/macplist/app/CMakeLists.txt5
-rw-r--r--tests/auto/other/macplist/test/CMakeLists.txt5
-rw-r--r--tests/auto/other/networkselftest/CMakeLists.txt5
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp16
-rw-r--r--tests/auto/other/qaccessibility/CMakeLists.txt9
-rw-r--r--tests/auto/other/qaccessibility/accessiblewidgets.h2
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp89
-rw-r--r--tests/auto/other/qaccessibilitylinux/CMakeLists.txt5
-rw-r--r--tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp2
-rw-r--r--tests/auto/other/qaccessibilitymac/CMakeLists.txt7
-rw-r--r--tests/auto/other/qcomplextext/CMakeLists.txt5
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp8
-rw-r--r--tests/auto/other/qfocusevent/CMakeLists.txt6
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp6
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt5
-rw-r--r--tests/auto/other/qobjectrace/CMakeLists.txt7
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp29
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt5
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt3
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt5
-rw-r--r--tests/auto/other/toolsupport/CMakeLists.txt5
-rw-r--r--tests/auto/other/xkbkeyboard/CMakeLists.txt5
-rw-r--r--tests/auto/printsupport/CMakeLists.txt3
-rw-r--r--tests/auto/printsupport/dialogs/CMakeLists.txt3
-rw-r--r--tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt5
-rw-r--r--tests/auto/printsupport/kernel/CMakeLists.txt3
-rw-r--r--tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt5
-rw-r--r--tests/auto/printsupport/kernel/qprinter/CMakeLists.txt5
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt5
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp4
-rw-r--r--tests/auto/sql/CMakeLists.txt3
-rw-r--r--tests/auto/sql/kernel/CMakeLists.txt3
-rw-r--r--tests/auto/sql/kernel/qsql/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp8
-rw-r--r--tests/auto/sql/kernel/qsqldriver/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlerror/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlfield/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlquery/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp23
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlresult/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp34
-rw-r--r--tests/auto/sql/kernel/qsqlthread/CMakeLists.txt5
-rw-r--r--tests/auto/sql/models/CMakeLists.txt3
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt5
-rw-r--r--tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt5
-rw-r--r--tests/auto/sql/models/qsqlrelationaldelegate/tst_qsqlrelationaldelegate.cpp2
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt5
-rw-r--r--tests/auto/sql/models/qsqltablemodel/CMakeLists.txt5
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp4
-rw-r--r--tests/auto/testlib/CMakeLists.txt3
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/qsignalspy/CMakeLists.txt3
-rw-r--r--tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp30
-rw-r--r--tests/auto/testlib/selftests/CMakeLists.txt8
-rw-r--r--tests/auto/testlib/selftests/assert/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/badxml/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/badxml/tst_badxml.cpp6
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/blacklisted/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/cmptest/CMakeLists.txt7
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp127
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/counting/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/crashes/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/datatable/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/datetime/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/deleteLater/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/differentexec/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/eventloop/CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/eventloop/tst_eventloop.cpp104
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.junitxml32
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml36
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.tap165
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity17
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt22
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml36
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_3.txt5
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_4.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_5.txt5
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.junitxml17
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.lightxml30
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.tap17
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.teamcity14
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.txt11
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.xml33
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.teamcity770
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.junitxml6
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.lightxml8
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.tap8
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.xml8
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanuptestcase.junitxml13
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanuptestcase.lightxml20
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanuptestcase.tap20
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanuptestcase.teamcity9
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanuptestcase.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanuptestcase.xml23
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.teamcity90
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.junitxml6
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.lightxml8
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.tap4
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.xml8
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanuptestcase.junitxml13
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanuptestcase.lightxml20
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanuptestcase.tap9
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanuptestcase.teamcity9
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanuptestcase.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanuptestcase.xml23
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.junitxml2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.lightxml2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.tap4
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xml2
-rw-r--r--tests/auto/testlib/selftests/expectfail/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/extendedcompare/CMakeLists.txt3
-rw-r--r--tests/auto/testlib/selftests/failcleanup/CMakeLists.txt11
-rw-r--r--tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp6
-rw-r--r--tests/auto/testlib/selftests/failcleanuptestcase/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/failcleanuptestcase/tst_failcleanuptestcase.cpp25
-rw-r--r--tests/auto/testlib/selftests/faildatatype/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/failinit/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/failinitdata/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/findtestdata/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/float/CMakeLists.txt5
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py15
-rw-r--r--tests/auto/testlib/selftests/globaldata/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/junit/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/keyboard/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/longstring/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/mouse/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/multiexec/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/pass/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/printdatatags/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/signaldumper/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/silent/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/singleskip/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/skip/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt11
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp6
-rw-r--r--tests/auto/testlib/selftests/skipcleanuptestcase/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/skipcleanuptestcase/tst_skipcleanuptestcase.cpp25
-rw-r--r--tests/auto/testlib/selftests/skipinit/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/sleep/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/strcmp/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/subtest/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/testlib/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/verbose1/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/verbose2/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/warnings/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/watchdog/CMakeLists.txt5
-rw-r--r--tests/auto/tools/CMakeLists.txt3
-rw-r--r--tests/auto/tools/macdeployqt/CMakeLists.txt3
-rw-r--r--tests/auto/tools/moc/CMakeLists.txt13
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json72
-rw-r--r--tests/auto/tools/moc/cxx-attributes.h2
-rw-r--r--tests/auto/tools/moc/pointery_to_incomplete.h6
-rw-r--r--tests/auto/tools/moc/qmlmacro.h19
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp90
-rw-r--r--tests/auto/tools/qdbuscpp2xml/CMakeLists.txt5
-rw-r--r--tests/auto/tools/qdbusxml2cpp/CMakeLists.txt3
-rw-r--r--tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp244
-rw-r--r--tests/auto/tools/qmake/CMakeLists.txt3
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp2
-rw-r--r--tests/auto/tools/qmakelib/CMakeLists.txt7
-rw-r--r--tests/auto/tools/rcc/CMakeLists.txt3
-rw-r--r--tests/auto/tools/rcc/data/images/images.expected9
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-0.expected9
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-1.expected9
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected9
-rw-r--r--tests/auto/tools/uic/CMakeLists.txt3
-rw-r--r--tests/auto/tools/windeployqt/CMakeLists.txt3
-rw-r--r--tests/auto/tools/windeployqt/test/CMakeLists.txt3
-rw-r--r--tests/auto/tools/windeployqt/testapp/CMakeLists.txt5
-rw-r--r--tests/auto/wasm/CMakeLists.txt20
-rw-r--r--tests/auto/wasm/tst_localfileapi.cpp221
-rw-r--r--tests/auto/wasm/tst_qstdweb.cpp629
-rw-r--r--tests/auto/wasm/tst_qwasmwindowstack.cpp272
-rw-r--r--tests/auto/widgets/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/dialogs/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qdialog/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp31
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp75
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm2
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/BLACKLIST4
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp26
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qwizard/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp12
-rw-r--r--tests/auto/widgets/effects/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/BLACKLIST2
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/BLACKLIST1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp62
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp12
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp57
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/BLACKLIST5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp66
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp57
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST16
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp42
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/BLACKLIST3
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp99
-rw-r--r--tests/auto/widgets/itemviews/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp55
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp24
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/BLACKLIST2
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp7
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST4
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp101
-rw-r--r--tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qitemview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qlistview/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp44
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp22
-rw-r--r--tests/auto/widgets/itemviews/qtableview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp22
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp20
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp28
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/kernel/qaction/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp14
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qapplication/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp33
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qformlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp6
-rw-r--r--tests/auto/widgets/kernel/qlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qshortcut/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp80
-rw-r--r--tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qsizepolicy/tst_qsizepolicy.cpp3
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qtooltip/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp6
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST5
-rw-r--r--tests/auto/widgets/kernel/qwidget/CMakeLists.txt9
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp119
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp4
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp4
-rw-r--r--tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qwidgetrepaintmanager/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/styles/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/styles/qmacstyle/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/styles/qstyle/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/styles/qstyleoption/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp32
-rw-r--r--tests/auto/widgets/util/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/util/qcompleter/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp55
-rw-r--r--tests/auto/widgets/util/qscroller/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/util/qscroller/tst_qscroller.cpp8
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp8
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp2
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp8
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qcombobox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp22
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp163
-rw-r--r--tests/auto/widgets/widgets/qdial/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp66
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp266
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp2
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qframe/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp6
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp40
-rw-r--r--tests/auto/widgets/widgets/qlabel/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qlineedit/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp38
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt12
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp156
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp20
-rw-r--r--tests/auto/widgets/widgets/qmenu/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp20
-rw-r--r--tests/auto/widgets/widgets/qmenubar/CMakeLists.txt8
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp48
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp8
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp14
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp4
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp8
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qslider/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qspinbox/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp10
-rw-r--r--tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qsplitter/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp4
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtabbar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtextedit/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp20
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp44
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt6
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp6
-rw-r--r--tests/auto/xml/dom/CMakeLists.txt3
-rw-r--r--tests/auto/xml/dom/qdom/CMakeLists.txt5
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp276
1250 files changed, 14302 insertions, 5565 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 16ea50bf63..0eb6cd49f4 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# special case begin
# Order by dependency [*], then alphabetic. [*] If bugs in part A of
# our source would break tests of part B, then test A before B.
@@ -22,6 +25,14 @@ if(UIKIT)
return()
endif()
+# Limit set of tests to run for Android multi-ABI Qt builds.
+if(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS)
+ add_subdirectory(corelib/kernel/qmath)
+ add_subdirectory(widgets/effects/qpixmapfilter)
+ add_subdirectory(corelib/platform)
+ return()
+endif()
+
# Only configure a single auto test for wasm for now
# Since the linking step at this point is prohibitively long (static linking)
if(WASM)
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 54ce69f0be..30cd340f16 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# special case skip regeneration
# This is an automatic test for the CMake configuration files.
@@ -111,6 +114,24 @@ include("${_Qt6CTestMacros}")
if(NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_build_simple_widget_app)
+ set(extra_widget_app_options "")
+ if(IOS)
+ list(APPEND extra_widget_app_options
+ QMAKE_OPTIONS CONFIG+=iossimulator
+ )
+ endif()
+ if(CMAKE_HOST_WIN32)
+ # Unset MAKEFLAGS environment variable when invoking build tool, it might
+ # have options incompatible with nmake.
+ list(APPEND extra_widget_app_options
+ BUILD_ENVIRONMENT MAKEFLAGS ""
+ )
+ endif()
+
+ _qt_internal_add_qmake_test(test_build_simple_widget_app
+ TESTNAME test_build_simple_widget_app_qmake
+ ${extra_widget_app_options}
+ )
endif()
# We only support a limited subset of cmake tests when targeting iOS:
@@ -124,6 +145,12 @@ if(IOS)
return()
endif()
+set(is_qt_build_platform TRUE)
+# macOS versions less than 10.15 are not supported for building Qt.
+if(CMAKE_HOST_APPLE AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS "19.0.0")
+ set(is_qt_build_platform FALSE)
+endif()
+
_qt_internal_test_expect_pass(test_umbrella_config)
_qt_internal_test_expect_pass(test_wrap_cpp_and_resources)
if (NOT NO_WIDGETS)
@@ -253,16 +280,23 @@ elseif(QT6_INSTALL_BINS)
endif()
# Test building and installing a few dummy Qt modules and plugins.
-_qt_internal_test_expect_pass(mockplugins
- BINARY "${CMAKE_COMMAND}"
- BINARY_ARGS
- "-DQT_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mockplugins"
- -P "${qt_install_prefix}/${qt_install_bin_dir}/qt-cmake-private-install.cmake")
-set_tests_properties(mockplugins PROPERTIES FIXTURES_SETUP build_mockplugins)
+if(is_qt_build_platform)
+ set(mockplugins_test_args "")
+ if(NOT QT_FEATURE_no_prefix)
+ list(APPEND mockplugins_test_args
+ BINARY "${CMAKE_COMMAND}"
+ BINARY_ARGS
+ "-DQT_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mockplugins"
+ -P "${qt_install_prefix}/${qt_install_bin_dir}/qt-cmake-private-install.cmake"
+ )
+ endif()
+ _qt_internal_test_expect_pass(mockplugins ${mockplugins_test_args})
+ set_tests_properties(mockplugins PROPERTIES FIXTURES_SETUP build_mockplugins)
-# Test importing the plugins built in the project above.
-_qt_internal_test_expect_pass(test_import_plugins BINARY ${CMAKE_CTEST_COMMAND} BINARY_ARGS -V)
-set_tests_properties(test_import_plugins PROPERTIES FIXTURES_REQUIRED build_mockplugins)
+ # Test importing the plugins built in the project above.
+ _qt_internal_test_expect_pass(test_import_plugins BINARY ${CMAKE_CTEST_COMMAND} BINARY_ARGS -V)
+ set_tests_properties(test_import_plugins PROPERTIES FIXTURES_REQUIRED build_mockplugins)
+endif()
_qt_internal_test_expect_pass(test_versionless_targets)
@@ -272,16 +306,22 @@ endif()
_qt_internal_test_expect_pass(test_add_resources_binary_generated
BINARY test_add_resources_binary_generated)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17")
+ _qt_internal_test_expect_pass(test_add_resources_big_resources
+ BINARY test_add_resources_big_resources)
+endif()
include(test_plugin_shared_static_flavor.cmake)
_qt_internal_test_expect_pass(tst_qaddpreroutine
BINARY tst_qaddpreroutine)
-_qt_internal_test_expect_pass(test_static_resources
- BINARY "${CMAKE_CTEST_COMMAND}"
- BINARY_ARGS "-V")
+if(is_qt_build_platform)
+ _qt_internal_test_expect_pass(test_static_resources
+ BINARY "${CMAKE_CTEST_COMMAND}"
+ BINARY_ARGS "-V")
-_qt_internal_test_expect_pass(test_generating_cpp_exports)
+ _qt_internal_test_expect_pass(test_generating_cpp_exports)
+endif()
_qt_internal_test_expect_pass(test_qt_extract_metatypes)
@@ -298,7 +338,8 @@ set(deploy_args
# other platforms, because there is no support for runtime dependency deployment
# on those platforms.
# With static builds the runtime dependencies are just skipped, but the test should still pass.
-if((WIN32 OR (APPLE AND NOT IOS)))
+if(WIN32 OR (APPLE AND NOT IOS)
+ OR (UNIX AND NOT APPLE AND NOT ANDROID AND NOT CMAKE_CROSSCOMPILING))
_qt_internal_test_expect_pass(${deploy_args})
else()
_qt_internal_test_expect_fail(${deploy_args})
diff --git a/tests/auto/cmake/mockplugins/.cmake.conf b/tests/auto/cmake/mockplugins/.cmake.conf
index 377be0059e..edb49ceeb2 100644
--- a/tests/auto/cmake/mockplugins/.cmake.conf
+++ b/tests/auto/cmake/mockplugins/.cmake.conf
@@ -1 +1,3 @@
set(QT_REPO_MODULE_VERSION "6.5.0")
+
+set(QT_USE_SYNCQT_CPP TRUE)
diff --git a/tests/auto/cmake/mockplugins/CMakeLists.txt b/tests/auto/cmake/mockplugins/CMakeLists.txt
index 7f61b562bc..526abedec7 100644
--- a/tests/auto/cmake/mockplugins/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtsvg.pro.
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/mockplugins/mock1plugin/CMakeLists.txt b/tests/auto/cmake/mockplugins/mock1plugin/CMakeLists.txt
index 2af59e34eb..ba636e6fe6 100644
--- a/tests/auto/cmake/mockplugins/mock1plugin/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mock1plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(QMock1Plugin
CLASS_NAME QMock1Plugin
PLUGIN_TYPE mockplugin
diff --git a/tests/auto/cmake/mockplugins/mock2plugin/CMakeLists.txt b/tests/auto/cmake/mockplugins/mock2plugin/CMakeLists.txt
index 275a57a1ac..acdcd7d7e2 100644
--- a/tests/auto/cmake/mockplugins/mock2plugin/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mock2plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(QMock2Plugin
CLASS_NAME QMock2Plugin
PLUGIN_TYPE mockplugin
diff --git a/tests/auto/cmake/mockplugins/mock3plugin/CMakeLists.txt b/tests/auto/cmake/mockplugins/mock3plugin/CMakeLists.txt
index b87acd1d0e..8b8333d2cb 100644
--- a/tests/auto/cmake/mockplugins/mock3plugin/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mock3plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(QMock3Plugin
CLASS_NAME QMock3Plugin
PLUGIN_TYPE mockplugin
diff --git a/tests/auto/cmake/mockplugins/mock4plugin/CMakeLists.txt b/tests/auto/cmake/mockplugins/mock4plugin/CMakeLists.txt
index f13ec00332..b988e9b77f 100644
--- a/tests/auto/cmake/mockplugins/mock4plugin/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mock4plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(QMock4Plugin
CLASS_NAME QMock4Plugin
PLUGIN_TYPE mockplugin
diff --git a/tests/auto/cmake/mockplugins/mock5plugin/CMakeLists.txt b/tests/auto/cmake/mockplugins/mock5plugin/CMakeLists.txt
index d3fa0e428a..1bd671e97c 100644
--- a/tests/auto/cmake/mockplugins/mock5plugin/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mock5plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(QMock5Plugin
CLASS_NAME QMock5Plugin
PLUGIN_TYPE mockplugin
diff --git a/tests/auto/cmake/mockplugins/mock6plugin/CMakeLists.txt b/tests/auto/cmake/mockplugins/mock6plugin/CMakeLists.txt
index 0311214dde..1a1272d878 100644
--- a/tests/auto/cmake/mockplugins/mock6plugin/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mock6plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(QMock6Plugin
CLASS_NAME QMock6Plugin
PLUGIN_TYPE mockauxplugin
diff --git a/tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt b/tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt
index 705885c7fa..933f6dde5d 100644
--- a/tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt
@@ -1,6 +1,10 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_module(MockPlugins1
PLUGIN_TYPES mockplugin
SOURCES
+ qmockplugin.h
fake.cpp
LIBRARIES
Qt::CorePrivate
diff --git a/tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt b/tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt
index 9d406ef483..62fd34e90b 100644
--- a/tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_module(MockPlugins2
SOURCES
fake.cpp
diff --git a/tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt b/tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt
index fc7c7aa944..5df9c1b685 100644
--- a/tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt
@@ -1,6 +1,10 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_module(MockPlugins3
PLUGIN_TYPES mockauxplugin
SOURCES
+ qmockauxplugin.h
fake.cpp
LIBRARIES
Qt::CorePrivate
diff --git a/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
index c2a575af65..1916c048d3 100644
--- a/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
+++ b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_QFINDTESTDATA/CMakeLists.txt b/tests/auto/cmake/test_QFINDTESTDATA/CMakeLists.txt
index b67ff560e4..12ac9c9d6a 100644
--- a/tests/auto/cmake/test_QFINDTESTDATA/CMakeLists.txt
+++ b/tests/auto/cmake/test_QFINDTESTDATA/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_QFINDTESTDATA/tests/CMakeLists.txt b/tests/auto/cmake/test_QFINDTESTDATA/tests/CMakeLists.txt
index df91a7d84b..6d49ab8c3b 100644
--- a/tests/auto/cmake/test_QFINDTESTDATA/tests/CMakeLists.txt
+++ b/tests/auto/cmake/test_QFINDTESTDATA/tests/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
add_executable(test_QFINDTESTDATA WIN32 main.cpp)
diff --git a/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt b/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
index a256cfc067..535af3d4b5 100644
--- a/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
+++ b/tests/auto/cmake/test_QTBUG-63422/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
if(POLICY CMP0099)
cmake_policy(SET CMP0099 NEW) # Avoid CMP0099 related warnings.
diff --git a/tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt b/tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt
index 92ce28a5b9..6e2a7d57bf 100644
--- a/tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt
+++ b/tests/auto/cmake/test_QT_TESTCASE_BUILDDIR/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# The test is simply testing that manual specification of QT_TESTCASE_BUILDDIR works,
# despite the weird paths.
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt
index b712f5a23d..bee8472475 100644
--- a/tests/auto/cmake/test_add_big_resource/CMakeLists.txt
+++ b/tests/auto/cmake/test_add_big_resource/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(test_add_big_resource)
diff --git a/tests/auto/cmake/test_add_binary_resources_delayed_file/CMakeLists.txt b/tests/auto/cmake/test_add_binary_resources_delayed_file/CMakeLists.txt
index 1ca2c0940a..9a247bc684 100644
--- a/tests/auto/cmake/test_add_binary_resources_delayed_file/CMakeLists.txt
+++ b/tests/auto/cmake/test_add_binary_resources_delayed_file/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_add_resource_options/CMakeLists.txt b/tests/auto/cmake/test_add_resource_options/CMakeLists.txt
index 4692cdbdc6..d7bb053714 100644
--- a/tests/auto/cmake/test_add_resource_options/CMakeLists.txt
+++ b/tests/auto/cmake/test_add_resource_options/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_add_resources_big_resources/CMakeLists.txt b/tests/auto/cmake/test_add_resources_big_resources/CMakeLists.txt
new file mode 100644
index 0000000000..9f9ae6a43c
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/CMakeLists.txt
@@ -0,0 +1,45 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+
+project(test_add_resources_big_resources)
+
+if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/FindPackageHints.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHints.cmake")
+endif()
+
+find_package(Qt6 REQUIRED
+ COMPONENTS Core Test
+ HINTS ${Qt6Tests_PREFIX_PATH}
+)
+
+qt6_add_library(leaf_lib STATIC leaf_lib.cpp)
+qt6_add_resources(leaf_lib resources2
+ FILES resource2.txt PREFIX "/" BIG_RESOURCES)
+target_link_libraries(leaf_lib PRIVATE Qt6::Core)
+
+if(NOT TARGET leaf_lib_resources2_obj)
+ message(FATAL_ERROR "Object library for resources2 was not created.")
+endif()
+
+qt6_add_library(intermediate_lib STATIC intermediate_lib.cpp)
+qt6_add_resources(intermediate_lib resources3
+ FILES resource3.txt PREFIX "/" BIG_RESOURCES
+)
+target_link_libraries(intermediate_lib PRIVATE Qt6::Core leaf_lib)
+
+if(NOT TARGET intermediate_lib_resources3_obj)
+ message(FATAL_ERROR "Object library for resources3 was not created.")
+endif()
+
+set(CMAKE_AUTOMOC ON)
+
+qt6_add_executable(test_add_resources_big_resources main.cpp)
+qt6_add_resources(test_add_resources_big_resources resources1
+ FILES resource1.txt PREFIX "/" BIG_RESOURCES)
+target_link_libraries(test_add_resources_big_resources PRIVATE Qt6::Test intermediate_lib)
+
+if(NOT TARGET test_add_resources_big_resources_resources1_obj)
+ message(FATAL_ERROR "Object library for resources1 was not created.")
+endif()
diff --git a/tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.cpp b/tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.cpp
new file mode 100644
index 0000000000..00817d496d
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.cpp
@@ -0,0 +1,20 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include "leaf_lib.h"
+
+#include <QtCore/qfile.h>
+
+namespace intermediate_lib {
+
+bool isLeafLibResourceAvailable()
+{
+ return leaf_lib::isResourceAvailable();
+}
+
+bool isResourceAvailable()
+{
+ return QFile::exists(u":/resource3.txt"_qs);
+}
+
+} // namespace
diff --git a/tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.h b/tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.h
new file mode 100644
index 0000000000..614ebd1abc
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/intermediate_lib.h
@@ -0,0 +1,9 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#pragma once
+
+namespace intermediate_lib {
+bool isLeafLibResourceAvailable();
+bool isResourceAvailable();
+} //namespace
diff --git a/tests/auto/cmake/test_add_resources_big_resources/leaf_lib.cpp b/tests/auto/cmake/test_add_resources_big_resources/leaf_lib.cpp
new file mode 100644
index 0000000000..0dc07784e9
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/leaf_lib.cpp
@@ -0,0 +1,13 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include <QtCore/qfile.h>
+
+namespace leaf_lib {
+
+bool isResourceAvailable()
+{
+ return QFile::exists(u":/resource2.txt"_qs);
+}
+
+} // namespace
diff --git a/tests/auto/cmake/test_add_resources_big_resources/leaf_lib.h b/tests/auto/cmake/test_add_resources_big_resources/leaf_lib.h
new file mode 100644
index 0000000000..9a6c631c1d
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/leaf_lib.h
@@ -0,0 +1,8 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#pragma once
+
+namespace leaf_lib {
+bool isResourceAvailable();
+} // namespace
diff --git a/tests/auto/cmake/test_add_resources_big_resources/main.cpp b/tests/auto/cmake/test_add_resources_big_resources/main.cpp
new file mode 100644
index 0000000000..5df2b0e5a7
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/main.cpp
@@ -0,0 +1,35 @@
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include "intermediate_lib.h"
+
+#include <QtCore/qfile.h>
+#include <QtTest/QtTest>
+
+class TestAddResourcesBigResources : public QObject
+{
+ Q_OBJECT
+private slots:
+ void resourceInApplicationExists();
+ void resourceInIntermediateLibExists();
+ void resourceInLeafLibExists();
+};
+
+void TestAddResourcesBigResources::resourceInApplicationExists()
+{
+ QVERIFY(QFile::exists(":/resource1.txt"));
+}
+
+void TestAddResourcesBigResources::resourceInIntermediateLibExists()
+{
+ QVERIFY(intermediate_lib::isResourceAvailable());
+}
+
+void TestAddResourcesBigResources::resourceInLeafLibExists()
+{
+ QVERIFY(intermediate_lib::isLeafLibResourceAvailable());
+}
+
+QTEST_MAIN(TestAddResourcesBigResources)
+#include "main.moc"
+
diff --git a/tests/auto/cmake/test_add_resources_big_resources/resource1.txt b/tests/auto/cmake/test_add_resources_big_resources/resource1.txt
new file mode 100644
index 0000000000..bc06a6d721
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/resource1.txt
@@ -0,0 +1 @@
+Test resource1
diff --git a/tests/auto/cmake/test_add_resources_big_resources/resource2.txt b/tests/auto/cmake/test_add_resources_big_resources/resource2.txt
new file mode 100644
index 0000000000..b8f9e67458
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/resource2.txt
@@ -0,0 +1 @@
+Test resource2
diff --git a/tests/auto/cmake/test_add_resources_big_resources/resource3.txt b/tests/auto/cmake/test_add_resources_big_resources/resource3.txt
new file mode 100644
index 0000000000..0ed6318a85
--- /dev/null
+++ b/tests/auto/cmake/test_add_resources_big_resources/resource3.txt
@@ -0,0 +1 @@
+Test resource3
diff --git a/tests/auto/cmake/test_add_resources_binary_generated/CMakeLists.txt b/tests/auto/cmake/test_add_resources_binary_generated/CMakeLists.txt
index 2d5a399a0c..df9ef0c3bb 100644
--- a/tests/auto/cmake/test_add_resources_binary_generated/CMakeLists.txt
+++ b/tests/auto/cmake/test_add_resources_binary_generated/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(test_add_resources_binary_generated)
diff --git a/tests/auto/cmake/test_add_resources_delayed_file/CMakeLists.txt b/tests/auto/cmake/test_add_resources_delayed_file/CMakeLists.txt
index 49bc5cbb2b..1a320dadf0 100644
--- a/tests/auto/cmake/test_add_resources_delayed_file/CMakeLists.txt
+++ b/tests/auto/cmake/test_add_resources_delayed_file/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt b/tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt
index daccf5bb80..1fcd026cce 100644
--- a/tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt
+++ b/tests/auto/cmake/test_build_simple_widget_app/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(ios_projects LANGUAGES CXX)
diff --git a/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro b/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro
new file mode 100644
index 0000000000..30834e2ee2
--- /dev/null
+++ b/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+SOURCES += main.cpp
+QT += widgets
+CONFIG += app_bundle
+TARGET = simple_widget_app
diff --git a/tests/auto/cmake/test_concurrent_module/CMakeLists.txt b/tests/auto/cmake/test_concurrent_module/CMakeLists.txt
index 3294535319..f2d108274c 100644
--- a/tests/auto/cmake/test_concurrent_module/CMakeLists.txt
+++ b/tests/auto/cmake/test_concurrent_module/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_dbus_module/CMakeLists.txt b/tests/auto/cmake/test_dbus_module/CMakeLists.txt
index 6159456197..014aae974c 100644
--- a/tests/auto/cmake/test_dbus_module/CMakeLists.txt
+++ b/tests/auto/cmake/test_dbus_module/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_dependent_modules/CMakeLists.txt b/tests/auto/cmake/test_dependent_modules/CMakeLists.txt
index 679f7fed27..47ced6ccda 100644
--- a/tests/auto/cmake/test_dependent_modules/CMakeLists.txt
+++ b/tests/auto/cmake/test_dependent_modules/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
index 7b5666c3f7..3de368ba1a 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
+++ b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
diff --git a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/CMakeLists.txt
index 805bce2a93..53cf02acaf 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/CMakeLists.txt
+++ b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_module(TestAutogeneratingCppExports
GENERATE_CPP_EXPORTS
SOURCES
diff --git a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt
index e1735a3f9f..d203fd6b87 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt
+++ b/tests/auto/cmake/test_generating_cpp_exports/test_autogenerating_cpp_exports_custom_name/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_module(TestAutogeneratingCppExportsCustomName
GENERATE_CPP_EXPORTS
CPP_EXPORT_HEADER_BASE_NAME
diff --git a/tests/auto/cmake/test_global_promotion/CMakeLists.txt b/tests/auto/cmake/test_global_promotion/CMakeLists.txt
index 1ad6c5e7ad..24b2eacaf1 100644
--- a/tests/auto/cmake/test_global_promotion/CMakeLists.txt
+++ b/tests/auto/cmake/test_global_promotion/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(global_promotion)
diff --git a/tests/auto/cmake/test_global_promotion/subdir_with_global_qt/CMakeLists.txt b/tests/auto/cmake/test_global_promotion/subdir_with_global_qt/CMakeLists.txt
index a8808a8c83..26e3d6e025 100644
--- a/tests/auto/cmake/test_global_promotion/subdir_with_global_qt/CMakeLists.txt
+++ b/tests/auto/cmake/test_global_promotion/subdir_with_global_qt/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
message(STATUS "Entered subdir_with_global_qt subdirectory")
set(file_path "${CMAKE_CURRENT_BINARY_DIR}/lib.cpp")
diff --git a/tests/auto/cmake/test_global_promotion/subdir_with_local_qt/CMakeLists.txt b/tests/auto/cmake/test_global_promotion/subdir_with_local_qt/CMakeLists.txt
index 1bed5a2f99..820282b7c1 100644
--- a/tests/auto/cmake/test_global_promotion/subdir_with_local_qt/CMakeLists.txt
+++ b/tests/auto/cmake/test_global_promotion/subdir_with_local_qt/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
message(STATUS "Entered subdir_with_local_qt subdirectory")
set(file_path "${CMAKE_CURRENT_BINARY_DIR}/lib.cpp")
diff --git a/tests/auto/cmake/test_import_plugins/CMakeLists.txt b/tests/auto/cmake/test_import_plugins/CMakeLists.txt
index be85af2091..5f6d629c20 100644
--- a/tests/auto/cmake/test_import_plugins/CMakeLists.txt
+++ b/tests/auto/cmake/test_import_plugins/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(import_plugins_advanced)
diff --git a/tests/auto/cmake/test_interface/CMakeLists.txt b/tests/auto/cmake/test_interface/CMakeLists.txt
index 22e9a0b3ac..7028b41f7b 100644
--- a/tests/auto/cmake/test_interface/CMakeLists.txt
+++ b/tests/auto/cmake/test_interface/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_interface/widget_test/CMakeLists.txt b/tests/auto/cmake/test_interface/widget_test/CMakeLists.txt
index 229b1bf962..dd4c8fff28 100644
--- a/tests/auto/cmake/test_interface/widget_test/CMakeLists.txt
+++ b/tests/auto/cmake/test_interface/widget_test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(test_interface_try_compile)
diff --git a/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt b/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
index 28f8b9aefe..6a38d263cd 100644
--- a/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
+++ b/tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_json_plugin_includes/CMakeLists.txt b/tests/auto/cmake/test_json_plugin_includes/CMakeLists.txt
index 0f5dc99206..15ea1ccadf 100644
--- a/tests/auto/cmake/test_json_plugin_includes/CMakeLists.txt
+++ b/tests/auto/cmake/test_json_plugin_includes/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt b/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
index eaf8bda1bb..1af937bc10 100644
--- a/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
+++ b/tests/auto/cmake/test_moc_macro_target/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt b/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt
index 48864f2b22..1b50c204ca 100644
--- a/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt
+++ b/tests/auto/cmake/test_multiple_find_package/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt b/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt
index 61a273424e..abf9abf8a7 100644
--- a/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt
+++ b/tests/auto/cmake/test_multiple_find_package/subdir1/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
find_package(Qt6Core REQUIRED)
diff --git a/tests/auto/cmake/test_opengl_lib/CMakeLists.txt b/tests/auto/cmake/test_opengl_lib/CMakeLists.txt
index 020d7fbf2a..b5672b4393 100644
--- a/tests/auto/cmake/test_opengl_lib/CMakeLists.txt
+++ b/tests/auto/cmake/test_opengl_lib/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt b/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt
index 34a22b056a..ab3a935894 100644
--- a/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt
+++ b/tests/auto/cmake/test_platform_defs_include/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_plugin_shared_static_flavor.cmake b/tests/auto/cmake/test_plugin_shared_static_flavor.cmake
index a906bfebbc..f692abdb45 100644
--- a/tests/auto/cmake/test_plugin_shared_static_flavor.cmake
+++ b/tests/auto/cmake/test_plugin_shared_static_flavor.cmake
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
_qt_internal_test_expect_pass(test_plugin_shared_static_flavor
TESTNAME test_plugin_flavor_static
BUILD_OPTIONS
diff --git a/tests/auto/cmake/test_plugin_shared_static_flavor/CMakeLists.txt b/tests/auto/cmake/test_plugin_shared_static_flavor/CMakeLists.txt
index 0a79038e8a..fda0c69d07 100644
--- a/tests/auto/cmake/test_plugin_shared_static_flavor/CMakeLists.txt
+++ b/tests/auto/cmake/test_plugin_shared_static_flavor/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(test_plugin_flavor)
diff --git a/tests/auto/cmake/test_plugins/CMakeLists.txt b/tests/auto/cmake/test_plugins/CMakeLists.txt
index 9870db9ce4..5b6c4eea4e 100644
--- a/tests/auto/cmake/test_plugins/CMakeLists.txt
+++ b/tests/auto/cmake/test_plugins/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_private_includes/CMakeLists.txt b/tests/auto/cmake/test_private_includes/CMakeLists.txt
index 402ae73def..d4ba8ab888 100644
--- a/tests/auto/cmake/test_private_includes/CMakeLists.txt
+++ b/tests/auto/cmake/test_private_includes/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_private_targets/CMakeLists.txt b/tests/auto/cmake/test_private_targets/CMakeLists.txt
index f703b7af20..72e06b044c 100644
--- a/tests/auto/cmake/test_private_targets/CMakeLists.txt
+++ b/tests/auto/cmake/test_private_targets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_qt_extract_metatypes/CMakeLists.txt b/tests/auto/cmake/test_qt_extract_metatypes/CMakeLists.txt
index 51d78dd833..26944b1192 100644
--- a/tests/auto/cmake/test_qt_extract_metatypes/CMakeLists.txt
+++ b/tests/auto/cmake/test_qt_extract_metatypes/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(test_qt_extract_metatypes VERSION 0.1 LANGUAGES CXX)
diff --git a/tests/auto/cmake/test_qt_extract_metatypes/test_qt_extract_metatypes_project/CMakeLists.txt b/tests/auto/cmake/test_qt_extract_metatypes/test_qt_extract_metatypes_project/CMakeLists.txt
index 88e51a0ed1..328f20aaab 100644
--- a/tests/auto/cmake/test_qt_extract_metatypes/test_qt_extract_metatypes_project/CMakeLists.txt
+++ b/tests/auto/cmake/test_qt_extract_metatypes/test_qt_extract_metatypes_project/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(qt_extract_metatypes_test_project VERSION 0.1 LANGUAGES CXX)
diff --git a/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt b/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt
index 387fbd81f7..4719d9c332 100644
--- a/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt
+++ b/tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_static_resources/CMakeLists.txt b/tests/auto/cmake/test_static_resources/CMakeLists.txt
index b159f43b78..bddc1df932 100644
--- a/tests/auto/cmake/test_static_resources/CMakeLists.txt
+++ b/tests/auto/cmake/test_static_resources/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
diff --git a/tests/auto/cmake/test_static_resources/mock_static_resources1/CMakeLists.txt b/tests/auto/cmake/test_static_resources/mock_static_resources1/CMakeLists.txt
index 973f8b3279..c45af80781 100644
--- a/tests/auto/cmake/test_static_resources/mock_static_resources1/CMakeLists.txt
+++ b/tests/auto/cmake/test_static_resources/mock_static_resources1/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_module(MockStaticResources1
STATIC
PLUGIN_TYPES mockstaticresources
diff --git a/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/CMakeLists.txt b/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/CMakeLists.txt
index 99cb4a286e..d017ba8ab0 100644
--- a/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/CMakeLists.txt
+++ b/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_plugin(TestInitResourcesStaticPlugin STATIC
OUTPUT_NAME
testinitresourcesstaticplugin
diff --git a/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt b/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt
index 44d4839084..2606cd88d9 100644
--- a/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt
+++ b/tests/auto/cmake/test_static_resources/test_static_resources_propagation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# TODO: Revisit which of these tests makes sense to keep now that we depend on CMake 3.21 to
# properly place object libraries object files on the link line.
# See QTBUG-95601
diff --git a/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt b/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
index b6ac6434e8..3c83af7e0a 100644
--- a/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_testlib_definitions/core_only/CMakeLists.txt b/tests/auto/cmake/test_testlib_definitions/core_only/CMakeLists.txt
index cc68be18b8..872f291eeb 100644
--- a/tests/auto/cmake/test_testlib_definitions/core_only/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_definitions/core_only/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(core_only)
diff --git a/tests/auto/cmake/test_testlib_definitions/gui/CMakeLists.txt b/tests/auto/cmake/test_testlib_definitions/gui/CMakeLists.txt
index 528ec7dc4e..737de2c95f 100644
--- a/tests/auto/cmake/test_testlib_definitions/gui/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_definitions/gui/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(gui)
diff --git a/tests/auto/cmake/test_testlib_definitions/widgets/CMakeLists.txt b/tests/auto/cmake/test_testlib_definitions/widgets/CMakeLists.txt
index 0dbf9139e6..5aae260fa8 100644
--- a/tests/auto/cmake/test_testlib_definitions/widgets/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_definitions/widgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(widgets)
diff --git a/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt b/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
index cc126ab87f..2515f61d05 100644
--- a/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_no_link_gui/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt b/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt
index b88ad60d44..89965032b2 100644
--- a/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_no_link_widgets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_umbrella_config/CMakeLists.txt b/tests/auto/cmake/test_umbrella_config/CMakeLists.txt
index a7c31971fb..624374b8b2 100644
--- a/tests/auto/cmake/test_umbrella_config/CMakeLists.txt
+++ b/tests/auto/cmake/test_umbrella_config/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_umbrella_config/components_found/CMakeLists.txt b/tests/auto/cmake/test_umbrella_config/components_found/CMakeLists.txt
index 999aaccdd2..7341c9ab19 100644
--- a/tests/auto/cmake/test_umbrella_config/components_found/CMakeLists.txt
+++ b/tests/auto/cmake/test_umbrella_config/components_found/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# The module finds its dependencies
find_package(Qt6 6.0.0
diff --git a/tests/auto/cmake/test_umbrella_config/components_not_found/CMakeLists.txt b/tests/auto/cmake/test_umbrella_config/components_not_found/CMakeLists.txt
index aa56559c8f..dee3edb3fd 100644
--- a/tests/auto/cmake/test_umbrella_config/components_not_found/CMakeLists.txt
+++ b/tests/auto/cmake/test_umbrella_config/components_not_found/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# The module finds its dependencies
find_package(Qt6
diff --git a/tests/auto/cmake/test_versionless_targets/CMakeLists.txt b/tests/auto/cmake/test_versionless_targets/CMakeLists.txt
index 278586fb1d..3514f4e0f9 100644
--- a/tests/auto/cmake/test_versionless_targets/CMakeLists.txt
+++ b/tests/auto/cmake/test_versionless_targets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(versionless_targets)
diff --git a/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt b/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt
index aa30954f45..60e3f0af75 100644
--- a/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt
+++ b/tests/auto/cmake/test_widgets_app_deployment/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
project(deployment_api)
enable_testing()
@@ -9,7 +12,12 @@ qt6_standard_project_setup()
function(create_test_executable target)
cmake_parse_arguments(arg "" "" "" ${ARGN})
- qt_add_executable(${target} main.cpp)
+ if(CMAKE_VERSION VERSION_LESS "3.19")
+ qt_add_executable(${target} MANUAL_FINALIZATION main.cpp)
+ else()
+ qt_add_executable(${target} main.cpp)
+ endif()
+
set_target_properties(${target} PROPERTIES
# We explicitly don't set WIN32_EXECUTABLE to ensure we see errors from stderr when
# something fails and not having to use DebugView.
@@ -31,10 +39,16 @@ function(create_test_executable target)
)
install(SCRIPT ${deploy_script})
+ if(CMAKE_VERSION VERSION_LESS "3.19")
+ qt_finalize_target(${target})
+ endif()
+
if(APPLE AND NOT IOS)
set(installed_app_location "${CMAKE_INSTALL_PREFIX}/${target}.app/Contents/MacOS/${target}")
elseif(WIN32)
set(installed_app_location "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/${target}.exe")
+ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT CMAKE_CROSSCOMPILING)
+ set(installed_app_location "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/${target}")
endif()
# There's no nice way to get the location of an installed binary, so we need to construct
diff --git a/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt b/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt
index 8452bf8c91..da413168ff 100644
--- a/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt
+++ b/tests/auto/cmake/test_wrap_cpp_and_resources/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt b/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt
index 17f8fd7a48..80f4992da7 100644
--- a/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt
+++ b/tests/auto/cmake/test_wrap_cpp_options/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt b/tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt
index 96cd293c6f..a9892a94ec 100644
--- a/tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt
+++ b/tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qaddpreroutine Test:
#####################################################################
diff --git a/tests/auto/concurrent/CMakeLists.txt b/tests/auto/concurrent/CMakeLists.txt
index 1d7b8cefb4..f651da693a 100644
--- a/tests/auto/concurrent/CMakeLists.txt
+++ b/tests/auto/concurrent/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from concurrent.pro.
add_subdirectory(qtconcurrentfilter)
diff --git a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
index f81bed27d6..7c2bb7a3b2 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentfilter.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtconcurrentfilter
SOURCES
tst_qtconcurrentfilter.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 50819a3742..854059e7e7 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -1434,7 +1434,7 @@ void tst_QtConcurrentFilter::incrementalResults()
QCOMPARE(future.isFinished(), true);
QCOMPARE(future.resultCount(), count / 2);
- QCOMPARE(future.results().count(), count / 2);
+ QCOMPARE(future.results().size(), count / 2);
}
void tst_QtConcurrentFilter::noDetach()
diff --git a/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
index 1933365e86..8533246ee3 100644
--- a/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentfiltermapgenerated.pro.
#####################################################################
@@ -8,6 +11,6 @@ qt_internal_add_test(tst_qtconcurrentfiltermapgenerated
SOURCES
tst_qtconcurrent_selected_tests.cpp
tst_qtconcurrentfiltermapgenerated.cpp tst_qtconcurrentfiltermapgenerated.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
index 2c74f6542e..8205bd7136 100644
--- a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentiteratekernel.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtconcurrentiteratekernel
SOURCES
tst_qtconcurrentiteratekernel.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index c842fa4341..52406e4a62 100644
--- a/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -221,7 +221,7 @@ void tst_QtConcurrentIterateKernel::throttling()
QCOMPARE(iterations.loadRelaxed(), totalIterations);
- QCOMPARE(threads.count(), 1);
+ QCOMPARE(threads.size(), 1);
}
class MultipleResultsFor : public IterateKernel<TestIterator, int>
@@ -239,7 +239,7 @@ public:
void tst_QtConcurrentIterateKernel::multipleResults()
{
QFuture<int> f = startThreadEngine(new MultipleResultsFor(0, 10)).startAsynchronously();
- QCOMPARE(f.results().count() , 10);
+ QCOMPARE(f.results().size() , 10);
QCOMPARE(f.resultAt(0), 0);
QCOMPARE(f.resultAt(5), 5);
QCOMPARE(f.resultAt(9), 9);
diff --git a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
index 20ccbdf374..3400143249 100644
--- a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentmap.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtconcurrentmap
SOURCES
tst_qtconcurrentmap.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index a6c73777a1..d872702567 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -1956,7 +1956,7 @@ void tst_QtConcurrentMap::incrementalResults()
QCOMPARE(future.isFinished(), true);
QCOMPARE(future.resultCount(), count);
- QCOMPARE(future.results().count(), count);
+ QCOMPARE(future.results().size(), count);
}
/*
diff --git a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
index cbae4d1fb1..ee63d56059 100644
--- a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentmedian.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtconcurrentmedian
SOURCES
tst_qtconcurrentmedian.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
index 9f3b60481d..63c863dfd5 100644
--- a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentrun.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtconcurrentrun
SOURCES
tst_qtconcurrentrun.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index 6351854a21..97e13a2aa8 100644
--- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -1383,7 +1383,7 @@ void tst_QtConcurrentRun::withPromiseAndThen()
setFlag(syncEnd);
future.waitForFinished();
- QCOMPARE(future.results().count(), 0);
+ QCOMPARE(future.results().size(), 0);
QVERIFY(runExecuted);
QVERIFY(!cancelReceivedBeforeSync);
QVERIFY(cancelReceivedAfterSync);
@@ -1403,7 +1403,7 @@ void tst_QtConcurrentRun::withPromiseAndThen()
setFlag(syncEnd);
resultFuture.waitForFinished();
- QCOMPARE(future.results().count(), 1);
+ QCOMPARE(future.results().size(), 1);
QCOMPARE(future.result(), 1);
QVERIFY(runExecuted);
QVERIFY(thenExecuted);
@@ -1426,7 +1426,7 @@ void tst_QtConcurrentRun::withPromiseAndThen()
setFlag(syncEnd);
resultFuture.waitForFinished();
- QCOMPARE(future.results().count(), 0);
+ QCOMPARE(future.results().size(), 0);
QVERIFY(runExecuted);
QVERIFY(!thenExecuted);
QVERIFY(cancelExecuted);
diff --git a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
index 60f5cb47e3..d3175dafc9 100644
--- a/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrenttask.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtconcurrenttask
SOURCES
tst_qtconcurrenttask.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
index 8a7f006674..842f67afee 100644
--- a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtconcurrentthreadengine.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtconcurrentthreadengine
SOURCES
tst_qtconcurrentthreadengine.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index 701b086ab8..51a2273f9d 100644
--- a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -234,7 +234,7 @@ void tst_QtConcurrentThreadEngine::threadCount()
const int repeats = 10;
for (int i = 0; i < repeats; ++i) {
(new ThreadCountUser())->startAsynchronously().waitForFinished();
- const auto count = threads.count();
+ const auto count = threads.size();
const auto maxThreadCount = QThreadPool::globalInstance()->maxThreadCount();
QVERIFY(count <= maxThreadCount);
QVERIFY(!threads.contains(QThread::currentThread()));
@@ -243,7 +243,7 @@ void tst_QtConcurrentThreadEngine::threadCount()
// Set the finish flag immediately, this should give us one thread only.
for (int i = 0; i < repeats; ++i) {
(new ThreadCountUser(true /*finishImmediately*/))->startAsynchronously().waitForFinished();
- const auto count = threads.count();
+ const auto count = threads.size();
QCOMPARE(count, 1);
QVERIFY(!threads.contains(QThread::currentThread()));
}
@@ -271,7 +271,7 @@ void tst_QtConcurrentThreadEngine::multipleResults()
{
MultipleResultsUser *engine = new MultipleResultsUser();
QFuture<int> f = engine->startAsynchronously();
- QCOMPARE(f.results().count() , 10);
+ QCOMPARE(f.results().size() , 10);
QCOMPARE(f.resultAt(0), 0);
QCOMPARE(f.resultAt(5), 5);
QCOMPARE(f.resultAt(9), 9);
diff --git a/tests/auto/corelib/CMakeLists.txt b/tests/auto/corelib/CMakeLists.txt
index b9bf269745..fe0c13dbbb 100644
--- a/tests/auto/corelib/CMakeLists.txt
+++ b/tests/auto/corelib/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from corelib.pro.
add_subdirectory(kernel)
diff --git a/tests/auto/corelib/animation/CMakeLists.txt b/tests/auto/corelib/animation/CMakeLists.txt
index 79c2d6c4e9..15c9ea2795 100644
--- a/tests/auto/corelib/animation/CMakeLists.txt
+++ b/tests/auto/corelib/animation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from animation.pro.
add_subdirectory(qabstractanimation)
diff --git a/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt b/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
index 1ab378546d..95c805851f 100644
--- a/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qabstractanimation.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
index 5dcdf49836..e6e7d34ae7 100644
--- a/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qanimationgroup.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
index 9a6c9f45db..a189c12ba6 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qparallelanimationgroup.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
index bc846d33e7..0444402eb0 100644
--- a/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qpauseanimation.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qpauseanimation
SOURCES
tst_qpauseanimation.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt b/tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt
index 89a4d0a8e1..a5cdfae470 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qpropertyanimation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qpropertyanimation.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qpropertyanimation
SOURCES
tst_qpropertyanimation.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
Qt::Widgets
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
index e56f9f6ff8..fead20b2f6 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qsequentialanimationgroup.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
index 08fd743e33..da211ae53c 100644
--- a/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
+++ b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qvariantanimation.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/CMakeLists.txt b/tests/auto/corelib/global/CMakeLists.txt
index e19eab18eb..6ccf3c2ed0 100644
--- a/tests/auto/corelib/global/CMakeLists.txt
+++ b/tests/auto/corelib/global/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from global.pro.
if(NOT INTEGRITY)
add_subdirectory(qcompare)
@@ -18,7 +21,4 @@ add_subdirectory(qtendian)
add_subdirectory(qglobalstatic)
add_subdirectory(qhooks)
add_subdirectory(qoperatingsystemversion)
-if(WIN32)
- add_subdirectory(qwinregistry)
-endif()
add_subdirectory(qxp)
diff --git a/tests/auto/corelib/global/q_func_info/CMakeLists.txt b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
index 93257c31de..8d3682a4c4 100644
--- a/tests/auto/corelib/global/q_func_info/CMakeLists.txt
+++ b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from q_func_info.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qcompare/CMakeLists.txt b/tests/auto/corelib/global/qcompare/CMakeLists.txt
index 0fbf696d0e..bde33a1ae5 100644
--- a/tests/auto/corelib/global/qcompare/CMakeLists.txt
+++ b/tests/auto/corelib/global/qcompare/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qcompare.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qflags/CMakeLists.txt b/tests/auto/corelib/global/qflags/CMakeLists.txt
index 8ba02d93b4..54853bf792 100644
--- a/tests/auto/corelib/global/qflags/CMakeLists.txt
+++ b/tests/auto/corelib/global/qflags/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qflags Test:
#####################################################################
diff --git a/tests/auto/corelib/global/qfloat16/CMakeLists.txt b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
index 1dbc95ec95..f880112f31 100644
--- a/tests/auto/corelib/global/qfloat16/CMakeLists.txt
+++ b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qfloat16.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qfloat16
SOURCES
tst_qfloat16.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::TestPrivate
)
diff --git a/tests/auto/corelib/global/qgetputenv/CMakeLists.txt b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
index 79d45c58b0..3ad6c04d51 100644
--- a/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
+++ b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qgetputenv.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
index 77a7fa4194..832319a652 100644
--- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
+++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
@@ -60,7 +60,11 @@ void tst_QGetPutEnv::getSetCheck()
QCOMPARE(sresult, QString());
#endif
- QVERIFY(qputenv(varName, QByteArray("supervalue")));
+ constexpr char varValueFullString[] = "supervalue123";
+ const auto varValueQBA = QByteArray::fromRawData(varValueFullString, sizeof varValueFullString - 4);
+ QCOMPARE_EQ(varValueQBA, "supervalue");
+
+ QVERIFY(qputenv(varName, varValueQBA));
QVERIFY(qEnvironmentVariableIsSet(varName));
QVERIFY(!qEnvironmentVariableIsEmpty(varName));
@@ -187,7 +191,7 @@ void tst_QGetPutEnv::intValue()
bool actualOk = !ok;
// Self-test: confirm that it was like the docs said it should be
- if (value.length() < maxlen) {
+ if (value.size() < maxlen) {
QCOMPARE(value.toInt(&actualOk, 0), expected);
QCOMPARE(actualOk, ok);
}
diff --git a/tests/auto/corelib/global/qglobal/CMakeLists.txt b/tests/auto/corelib/global/qglobal/CMakeLists.txt
index de9a94629a..028cf0cf3e 100644
--- a/tests/auto/corelib/global/qglobal/CMakeLists.txt
+++ b/tests/auto/corelib/global/qglobal/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qglobal.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qglobal/qglobal.c b/tests/auto/corelib/global/qglobal/qglobal.c
index 3b898de39f..64569f4de7 100644
--- a/tests/auto/corelib/global/qglobal/qglobal.c
+++ b/tests/auto/corelib/global/qglobal/qglobal.c
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/qglobal.h>
+#include <QtCore/qlibraryinfo.h>
#ifdef Q_COMPILER_THREAD_LOCAL
# include <threads.h>
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 752fb948a5..4b0b97de0b 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -8,6 +8,7 @@
#include <QSysInfo>
#include <QLatin1String>
#include <QString>
+#include <QLibraryInfo>
#include <cmath>
@@ -84,7 +85,7 @@ void tst_QGlobal::for_each()
foreach(int i, list) {
QCOMPARE(i, counter++);
}
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
// do it again, to make sure we don't have any for-scoping
// problems with older compilers
@@ -92,21 +93,21 @@ void tst_QGlobal::for_each()
foreach(int i, list) {
QCOMPARE(i, counter++);
}
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
// check whether we can pass a constructor as container argument
counter = 0;
foreach (int i, QList<int>(list)) {
QCOMPARE(i, counter++);
}
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
// check whether we can use a lambda
counter = 0;
foreach (int i, [&](){ return list; }()) {
QCOMPARE(i, counter++);
}
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
// Should also work with an existing variable
int local = 0;
@@ -114,7 +115,7 @@ void tst_QGlobal::for_each()
foreach (local, list) {
QCOMPARE(local, counter++);
}
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
QCOMPARE(local, counter - 1);
// Test the macro does not mess if/else conditions
@@ -124,7 +125,7 @@ void tst_QGlobal::for_each()
QCOMPARE(i, counter++);
else
QFAIL("If/Else mismatch");
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
counter = 0;
if (false)
@@ -135,7 +136,7 @@ void tst_QGlobal::for_each()
foreach (int i, list)
if (false) { }
else QCOMPARE(i, counter++);
- QCOMPARE(counter, list.count());
+ QCOMPARE(counter, list.size());
// break and continue
counter = 0;
diff --git a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
index ea978bdadb..58f1c10397 100644
--- a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
+++ b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qglobalstatic.pro.
#####################################################################
@@ -8,7 +11,7 @@ qt_internal_add_test(tst_qglobalstatic
EXCEPTIONS
SOURCES
tst_qglobalstatic.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::TestPrivate
)
diff --git a/tests/auto/corelib/global/qhooks/CMakeLists.txt b/tests/auto/corelib/global/qhooks/CMakeLists.txt
index c8d6f1a769..f72e414572 100644
--- a/tests/auto/corelib/global/qhooks/CMakeLists.txt
+++ b/tests/auto/corelib/global/qhooks/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qhooks.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qhooks
SOURCES
tst_qhooks.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/global/qkeycombination/CMakeLists.txt b/tests/auto/corelib/global/qkeycombination/CMakeLists.txt
index 9553a35dea..46c3e8a412 100644
--- a/tests/auto/corelib/global/qkeycombination/CMakeLists.txt
+++ b/tests/auto/corelib/global/qkeycombination/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qkeycombination.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index a9950d3414..00825c5526 100644
--- a/tests/auto/corelib/global/qlogging/CMakeLists.txt
+++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qlogging.pro.
# This file is almost completely custom written
# special case skip regeneration
@@ -18,12 +21,10 @@ set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default)
qt_internal_add_test(tst_qlogging SOURCES tst_qlogging.cpp
DEFINES
QT_MESSAGELOGCONTEXT
- QT_DISABLE_DEPRECATED_BEFORE=0
HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper"
)
qt_internal_add_test(tst_qmessagelogger SOURCES tst_qmessagelogger.cpp
DEFINES
QT_MESSAGELOGCONTEXT
- QT_DISABLE_DEPRECATED_BEFORE=0
)
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 5de7830113..be27ab65b9 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -727,9 +727,19 @@ void tst_qmessagehandler::qMessagePattern_data()
QSKIP("These test cases don't work with static Qt builds");
#else
#ifndef QT_NO_DEBUG
- QTest::newRow("backtrace") << "[%{backtrace}] %{message}" << true << (QList<QByteArray>()
- // MyClass::qt_static_metacall is explicitly marked as hidden in the Q_OBJECT macro
- << "[MyClass::myFunction|MyClass::mySlot1|?" BACKTRACE_HELPER_NAME "?|" QT_NAMESPACE_STR "QMetaMethod::invoke|" QT_NAMESPACE_STR "QMetaObject::invokeMethod] from_a_function 34");
+ QList<QByteArray> expectedBacktrace = {
+ // MyClass::qt_static_metacall is explicitly marked as hidden in the
+ // Q_OBJECT macro hence the ?helper? frame
+ "[MyClass::myFunction|MyClass::mySlot1|?" BACKTRACE_HELPER_NAME "?|",
+
+ // QMetaObject::invokeMethodImpl calls internal function
+ // (QMetaMethodPrivate::invokeImpl, at the tims of this writing), which
+ // will usually show only as ?libQt6Core.so? or equivalent, so we skip
+
+ // end of backtrace, actual message
+ "|" QT_NAMESPACE_STR "QMetaObject::invokeMethodImpl] from_a_function 34"
+ };
+ QTest::newRow("backtrace") << "[%{backtrace}] %{message}" << true << expectedBacktrace;
#endif
QTest::newRow("backtrace depth,separator") << "[%{backtrace depth=2 separator=\"\n\"}] %{message}" << true << (QList<QByteArray>()
diff --git a/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt b/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt
index 52242b4292..bf41effc42 100644
--- a/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt
+++ b/tests/auto/corelib/global/qnativeinterface/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_test(tst_qnativeinterface
SOURCES
tst_qnativeinterface.cpp
diff --git a/tests/auto/corelib/global/qnumeric/CMakeLists.txt b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
index f86ddffc1d..92e01fd99f 100644
--- a/tests/auto/corelib/global/qnumeric/CMakeLists.txt
+++ b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qnumeric.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qnumeric
SOURCES
tst_qnumeric.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt b/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt
index 619297fdab..e8906a66d9 100644
--- a/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt
+++ b/tests/auto/corelib/global/qoperatingsystemversion/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qoperatingsystemversion.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
index 54fa36b5df..a0b15db047 100644
--- a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
+++ b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qrandomgenerator.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qrandomgenerator
SOURCES
tst_qrandomgenerator.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
index a3b31eda3f..9ada7352b4 100644
--- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
+++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
@@ -14,7 +14,6 @@
# define HAVE_FALLBACK_ENGINE
#endif
-#define COMMA ,
#define QVERIFY_3TIMES(statement) \
do {\
if (!static_cast<bool>(statement))\
@@ -165,8 +164,8 @@ QT_WARNING_POP
QRandomGenerator64 systemRng64 = *system64;
systemRng64 = *system64;
- static_assert(std::is_same<decltype(rng64.generate()) COMMA quint64>::value);
- static_assert(std::is_same<decltype(system64->generate()) COMMA quint64>::value);
+ static_assert(std::is_same_v<decltype(rng64.generate()), quint64>);
+ static_assert(std::is_same_v<decltype(system64->generate()), quint64>);
}
void tst_QRandomGenerator::knownSequence()
@@ -895,18 +894,20 @@ void tst_QRandomGenerator::stdGenerateCanonical()
{
QFETCH(uint, control);
RandomGenerator rng(control);
+ auto generate_canonical = [&rng]() {
+ return std::generate_canonical<qreal, 32>(rng);
+ };
for (int i = 0; i < 4; ++i) {
QVERIFY_3TIMES([&] {
- qreal value = std::generate_canonical<qreal COMMA 32>(rng);
+ qreal value = generate_canonical();
return value > 0 && value < 1 && value != RandomValueFP;
}());
}
// and should hopefully be different from repeated calls
for (int i = 0; i < 4; ++i)
- QVERIFY_3TIMES(std::generate_canonical<qreal COMMA 32>(rng) !=
- std::generate_canonical<qreal COMMA 32>(rng));
+ QVERIFY_3TIMES(generate_canonical() != generate_canonical());
}
void tst_QRandomGenerator::stdUniformRealDistribution_data()
diff --git a/tests/auto/corelib/global/qtendian/CMakeLists.txt b/tests/auto/corelib/global/qtendian/CMakeLists.txt
index acd0981991..b5d7acffdc 100644
--- a/tests/auto/corelib/global/qtendian/CMakeLists.txt
+++ b/tests/auto/corelib/global/qtendian/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtendian.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtendian
SOURCES
tst_qtendian.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/global/qwinregistry/CMakeLists.txt b/tests/auto/corelib/global/qwinregistry/CMakeLists.txt
deleted file mode 100644
index 95d591a125..0000000000
--- a/tests/auto/corelib/global/qwinregistry/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Generated from qwinregistry.pro.
-
-#####################################################################
-## tst_qwinregistry Test:
-#####################################################################
-
-qt_internal_add_test(tst_qwinregistry
- SOURCES
- tst_qwinregistry.cpp
- PUBLIC_LIBRARIES
- Qt::CorePrivate
-)
diff --git a/tests/auto/corelib/global/qwinregistry/tst_qwinregistry.cpp b/tests/auto/corelib/global/qwinregistry/tst_qwinregistry.cpp
deleted file mode 100644
index 423c4ebc82..0000000000
--- a/tests/auto/corelib/global/qwinregistry/tst_qwinregistry.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-#include <QTest>
-
-#include <QtCore/qoperatingsystemversion.h>
-
-#include <QtCore/private/qwinregistry_p.h>
-
-class tst_QWinRegistry : public QObject
-{
- Q_OBJECT
-
-public Q_SLOTS:
- void initTestCase();
-
-private Q_SLOTS:
- void values();
-};
-
-void tst_QWinRegistry::initTestCase()
-{
- if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows10)
- QSKIP("This test requires registry values present in Windows 10");
-}
-
-void tst_QWinRegistry::values()
-{
- QWinRegistryKey key(HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows NT\CurrentVersion)");
- QVERIFY(key.isValid());
- QVERIFY(!key.stringValue(L"ProductName").isEmpty());
- QVERIFY(key.stringValue(L"NonExistingKey").isEmpty());
- auto majorVersion = key.dwordValue(L"CurrentMajorVersionNumber");
- QVERIFY(majorVersion.second);
- QVERIFY(majorVersion.first > 0);
- auto nonExistingValue = key.dwordValue(L"NonExistingKey");
- QVERIFY(!nonExistingValue.second);
- QCOMPARE(nonExistingValue.first, 0u);
-}
-
-QTEST_APPLESS_MAIN(tst_QWinRegistry);
-
-#include "tst_qwinregistry.moc"
diff --git a/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt b/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
index 91c797c32f..d52618d527 100644
--- a/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
+++ b/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
@@ -1,7 +1,10 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_test(tst_qxp_function_ref
EXCEPTIONS
SOURCES
tst_qxp_function_ref.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/io/CMakeLists.txt b/tests/auto/corelib/io/CMakeLists.txt
index f4cfc16f06..9a11b40922 100644
--- a/tests/auto/corelib/io/CMakeLists.txt
+++ b/tests/auto/corelib/io/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from io.pro.
# There is no mounted filesystem for IO testing on INTEGRITY yet.
if(INTEGRITY)
diff --git a/tests/auto/corelib/io/largefile/CMakeLists.txt b/tests/auto/corelib/io/largefile/CMakeLists.txt
index a82aa0c985..05b5d95169 100644
--- a/tests/auto/corelib/io/largefile/CMakeLists.txt
+++ b/tests/auto/corelib/io/largefile/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from largefile.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_largefile
SOURCES
tst_largefile.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::TestPrivate
)
diff --git a/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt b/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt
index 7e3b79403d..7ae1d38dc1 100644
--- a/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt
+++ b/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qabstractfileengine.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qabstractfileengine
SOURCES
tst_qabstractfileengine.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qbuffer/CMakeLists.txt b/tests/auto/corelib/io/qbuffer/CMakeLists.txt
index 7d57d78b3f..90e543bd45 100644
--- a/tests/auto/corelib/io/qbuffer/CMakeLists.txt
+++ b/tests/auto/corelib/io/qbuffer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qbuffer.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qdataurl/CMakeLists.txt b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
index b13a235d3b..a856861b55 100644
--- a/tests/auto/corelib/io/qdataurl/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdataurl.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qdataurl
SOURCES
tst_qdataurl.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qdebug/CMakeLists.txt b/tests/auto/corelib/io/qdebug/CMakeLists.txt
index 067e3be04b..446e2a669f 100644
--- a/tests/auto/corelib/io/qdebug/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdebug/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdebug.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qdebug
SOURCES
tst_qdebug.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index 400625ba7d..989f5fcde8 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -14,8 +14,12 @@
#include <QLine>
#include <QMimeType>
#include <QMimeDatabase>
+#include <QMetaType>
+
+using namespace Qt::StringLiterals;
static_assert(QTypeTraits::has_ostream_operator_v<QDebug, int>);
+static_assert(QTypeTraits::has_ostream_operator_v<QDebug, QMetaType>);
static_assert(QTypeTraits::has_ostream_operator_v<QDebug, QList<int>>);
static_assert(QTypeTraits::has_ostream_operator_v<QDebug, QMap<int, QString>>);
struct NonStreamable {};
@@ -54,10 +58,19 @@ private slots:
void stateSaver() const;
void veryLongWarningMessage() const;
void qDebugQChar() const;
+ void qDebugQMetaType() const;
void qDebugQString() const;
void qDebugQStringView() const;
void qDebugQUtf8StringView() const;
void qDebugQLatin1String() const;
+ void qDebugStdString() const;
+ void qDebugStdStringView() const;
+ void qDebugStdWString() const;
+ void qDebugStdWStringView() const;
+ void qDebugStdU16String() const;
+ void qDebugStdU16StringView() const;
+ void qDebugStdU32String() const;
+ void qDebugStdU32StringView() const;
void qDebugQByteArray() const;
void qDebugQByteArrayView() const;
void qDebugQFlags() const;
@@ -428,6 +441,25 @@ void tst_QDebug::qDebugQChar() const
}
+void tst_QDebug::qDebugQMetaType() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << QMetaType::fromType<int>() << QMetaType::fromType<QString>();
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 4; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, R"(QMetaType(int) QMetaType(QString))"_L1);
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+}
+
void tst_QDebug::qDebugQString() const
{
/* Use a basic string. */
@@ -624,6 +656,254 @@ void tst_QDebug::qDebugQLatin1String() const
QCOMPARE(s_msg, QString("\"\\nSm\\u00F8rg\\u00E5sbord\\\\\""));
}
+void tst_QDebug::qDebugStdString() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::string("foo") << std::string("") << std::string("barbaz", 3);
+ d.nospace().noquote() << std::string("baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::string string("\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdString(string));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdString(string));
+}
+
+void tst_QDebug::qDebugStdStringView() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::string_view("foo") << std::string_view("") << std::string_view("barbaz", 3);
+ d.nospace().noquote() << std::string_view("baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::string_view string("\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdString(std::string(string)));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdString(std::string(string)));
+}
+
+void tst_QDebug::qDebugStdWString() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::wstring(L"foo") << std::wstring(L"") << std::wstring(L"barbaz", 3);
+ d.nospace().noquote() << std::wstring(L"baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::wstring string(L"\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdWString(string));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdWString(string));
+}
+
+void tst_QDebug::qDebugStdWStringView() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::wstring_view(L"foo") << std::wstring_view(L"") << std::wstring_view(L"barbaz", 3);
+ d.nospace().noquote() << std::wstring_view(L"baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::wstring_view string(L"\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdWString(std::wstring(string)));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdWString(std::wstring(string)));
+}
+
+void tst_QDebug::qDebugStdU16String() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::u16string(u"foo") << std::u16string(u"") << std::u16string(u"barbaz", 3);
+ d.nospace().noquote() << std::u16string(u"baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::u16string string(u"\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdU16String(string));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdU16String(string));
+}
+
+void tst_QDebug::qDebugStdU16StringView() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::u16string_view(u"foo") << std::u16string_view(u"") << std::u16string_view(u"barbaz", 3);
+ d.nospace().noquote() << std::u16string_view(u"baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::u16string_view string(u"\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdU16String(std::u16string(string)));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdU16String(std::u16string(string)));
+}
+
+void tst_QDebug::qDebugStdU32String() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::u32string(U"foo") << std::u32string(U"") << std::u32string(U"barbaz", 3);
+ d.nospace().noquote() << std::u32string(U"baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::u32string string(U"\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdU32String(string));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdU32String(string));
+}
+
+void tst_QDebug::qDebugStdU32StringView() const
+{
+ QString file, function;
+ int line = 0;
+ MessageHandlerSetter mhs(myMessageHandler);
+ {
+ QDebug d = qDebug();
+ d << std::u32string_view(U"foo") << std::u32string_view(U"") << std::u32string_view(U"barbaz", 3);
+ d.nospace().noquote() << std::u32string_view(U"baz");
+ }
+#ifndef QT_NO_MESSAGELOGCONTEXT
+ file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO;
+#endif
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" baz"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+
+ /* simpler tests from now on */
+ std::u32string_view string(U"\"Hello\"");
+ qDebug() << string;
+ QCOMPARE(s_msg, QString("\"\\\"Hello\\\"\""));
+
+ qDebug().noquote().nospace() << string;
+ QCOMPARE(s_msg, QString::fromStdU32String(std::u32string(string)));
+
+ qDebug().noquote().nospace() << qSetFieldWidth(8) << string;
+ QCOMPARE(s_msg, " " + QString::fromStdU32String(std::u32string(string)));
+}
+
void tst_QDebug::qDebugQByteArray() const
{
QString file, function;
diff --git a/tests/auto/corelib/io/qdir/CMakeLists.txt b/tests/auto/corelib/io/qdir/CMakeLists.txt
index ee24703bd3..2e9ea5283f 100644
--- a/tests/auto/corelib/io/qdir/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdir/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdir.pro.
#####################################################################
@@ -16,7 +19,7 @@ list(APPEND test_data "tst_qdir.cpp")
qt_internal_add_test(tst_qdir
SOURCES
tst_qdir.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt b/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
index 92ce7b4e89..a04a0e8a89 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdir.pro.
#####################################################################
@@ -6,8 +9,6 @@
qt_internal_add_executable(qdir
GUI
- DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro b/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro
index 856d5ea2fb..e69de29bb2 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/testdir/dir/qdir.pro
@@ -1,3 +0,0 @@
-
-
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index cfc786b292..0c6014cc82 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -17,7 +17,6 @@
#if defined(Q_OS_WIN)
#include <QtCore/private/qfsfileengine_p.h>
-#include "../../../network-settings.h"
#endif
#if defined(Q_OS_WIN) && !defined(_WIN32_WINNT)
@@ -627,7 +626,7 @@ void tst_QDir::exists_data()
QTest::newRow("simple dir") << (m_dataPath + "/resources") << true;
QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << true;
#if defined(Q_OS_WIN)
- const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
+ const QString uncRoot = QStringLiteral("//") + QTest::uncServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
QTest::newRow("unc 3") << uncRoot + "/testshare" << true;
@@ -1020,7 +1019,7 @@ void tst_QDir::entryListSimple_data()
QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << 2;
#if defined(Q_OS_WIN)
- const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
+ const QString uncRoot = QStringLiteral("//") + QTest::uncServerName();
QTest::newRow("unc 1") << uncRoot << 2;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << 2;
QTest::newRow("unc 3") << uncRoot + "/testshare" << 2;
@@ -1735,7 +1734,7 @@ void tst_QDir::homePath()
QVERIFY(QDir::isAbsolutePath(strHome));
#ifdef Q_OS_UNIX
- if (strHome.length() > 1) // root dir = "/"
+ if (strHome.size() > 1) // root dir = "/"
QVERIFY(!strHome.endsWith('/'));
QByteArray envHome = qgetenv("HOME");
@@ -1765,7 +1764,7 @@ void tst_QDir::tempPath()
QVERIFY(QDir::isAbsolutePath(path));
#ifdef Q_OS_UNIX
- if (path.length() > 1) // root dir = "/"
+ if (path.size() > 1) // root dir = "/"
QVERIFY(!path.endsWith('/'));
#elif defined(Q_OS_WIN)
if (path.length() > 3) // root dir = "c:/"; "//" is not really valid...
@@ -2393,7 +2392,7 @@ void tst_QDir::cdBelowRoot_data()
const QString systemRoot = QString::fromLocal8Bit(qgetenv("SystemRoot"));
QTest::newRow("windows-drive")
<< systemDrive << systemRoot.mid(3) << QDir::cleanPath(systemRoot);
- const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
+ const QString uncRoot = QStringLiteral("//") + QTest::uncServerName();
const QString testDirectory = QStringLiteral("testshare");
QTest::newRow("windows-share")
<< uncRoot << testDirectory << QDir::cleanPath(uncRoot + QLatin1Char('/') + testDirectory);
diff --git a/tests/auto/corelib/io/qdiriterator/CMakeLists.txt b/tests/auto/corelib/io/qdiriterator/CMakeLists.txt
index feb742396d..91674d56f5 100644
--- a/tests/auto/corelib/io/qdiriterator/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdiriterator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdiriterator.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "entrylist")
qt_internal_add_test(tst_qdiriterator
SOURCES
tst_qdiriterator.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 628f1acad6..303c2c9dcf 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -18,9 +18,7 @@
#define Q_NO_SYMLINKS
#endif
-#if defined(Q_OS_WIN)
-# include "../../../network-settings.h"
-#endif
+#include "../../../../shared/filesystem.h"
#ifdef Q_OS_ANDROID
#include <QStandardPaths>
@@ -533,7 +531,7 @@ void tst_QDirIterator::longPath()
QCOMPARE(n, m);
dirName.chop(1);
- while (dirName.length() > 0 && dir.exists(dirName) && dir.rmdir(dirName)) {
+ while (dirName.size() > 0 && dir.exists(dirName) && dir.rmdir(dirName)) {
dirName.chop(1);
}
dir.cdUp();
@@ -563,11 +561,11 @@ void tst_QDirIterator::uncPaths_data()
{
QTest::addColumn<QString>("dirName");
QTest::newRow("uncserver")
- <<QString("//" + QtNetworkSettings::winServerName());
+ <<QString("//" + QTest::uncServerName());
QTest::newRow("uncserver/testshare")
- <<QString("//" + QtNetworkSettings::winServerName() + "/testshare");
+ <<QString("//" + QTest::uncServerName() + "/testshare");
QTest::newRow("uncserver/testshare/tmp")
- <<QString("//" + QtNetworkSettings::winServerName() + "/testshare/tmp");
+ <<QString("//" + QTest::uncServerName() + "/testshare/tmp");
}
void tst_QDirIterator::uncPaths()
{
diff --git a/tests/auto/corelib/io/qfile/CMakeLists.txt b/tests/auto/corelib/io/qfile/CMakeLists.txt
index d9c148e9db..f084471fd9 100644
--- a/tests/auto/corelib/io/qfile/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfile/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qfile Test:
#####################################################################
@@ -16,7 +19,7 @@ list(APPEND test_data "resources/file1.ext1")
qt_internal_add_test(tst_qfile
SOURCES
tst_qfile.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::TestPrivate
TESTDATA ${test_data}
@@ -59,7 +62,7 @@ qt_internal_add_resource(tst_qfile "copy-fallback"
#####################################################################
qt_internal_extend_target(tst_qfile CONDITION TARGET Qt::Network
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Network
)
@@ -74,7 +77,7 @@ qt_internal_extend_target(tst_qfile CONDITION CONFIG___contains___builtin_testda
)
qt_internal_extend_target(tst_qfile CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
ole32
uuid
)
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt b/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
index e034e0502c..a07be32778 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from stdinprocess.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index fe412641f5..ee96797445 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -23,6 +23,10 @@
#include <private/qfsfileengine_p.h>
#include <private/qfilesystemengine_p.h>
+#ifdef Q_OS_WIN
+#include <QtCore/private/qfunctions_win_p.h>
+#endif
+
#include <QtTest/private/qemulationdetector_p.h>
#ifdef Q_OS_WIN
@@ -74,9 +78,7 @@ QT_END_NAMESPACE
# undef fileno
#endif
-#if defined(Q_OS_WIN)
-#include "../../../network-settings.h"
-#endif
+#include "../../../../shared/filesystem.h"
#ifndef STDIN_FILENO
#define STDIN_FILENO 0
@@ -170,6 +172,7 @@ private slots:
void permissionsNtfs_data();
void permissionsNtfs();
#endif
+ void setPermissions_data();
void setPermissions();
void copy();
void copyAfterFail();
@@ -542,7 +545,7 @@ void tst_QFile::exists()
QVERIFY(!file.exists());
#if defined(Q_OS_WIN)
- const QString uncPath = "//" + QtNetworkSettings::winServerName() + "/testshare/readme.txt";
+ const QString uncPath = "//" + QTest::uncServerName() + "/testshare/readme.txt";
QFile unc(uncPath);
QVERIFY2(unc.exists(), msgFileDoesNotExist(uncPath).constData());
#endif
@@ -608,7 +611,7 @@ void tst_QFile::open_data()
QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly)
<< false << QFile::OpenError;
}
- QTest::newRow("uncFile") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" << int(QIODevice::ReadOnly)
+ QTest::newRow("uncFile") << "//" + QTest::uncServerName() + "/testshare/test.pri" << int(QIODevice::ReadOnly)
<< true << QFile::NoError;
#endif
}
@@ -682,7 +685,7 @@ void tst_QFile::size_data()
QTest::newRow( "exist01" ) << m_testFile << (qint64)245;
#if defined(Q_OS_WIN)
// Only test UNC on Windows./
- QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testshare/test.pri") << (qint64)34;
+ QTest::newRow("unc") << "//" + QString(QTest::uncServerName() + "/testshare/test.pri") << (qint64)34;
#endif
}
@@ -1419,21 +1422,38 @@ void tst_QFile::permissionsNtfs()
}
#endif
+void tst_QFile::setPermissions_data()
+{
+ QTest::addColumn<bool>("opened");
+ QTest::newRow("closed") << false; // chmod()
+ QTest::newRow("opened") << true; // fchmod()
+}
+
void tst_QFile::setPermissions()
{
- if ( QFile::exists( "createme.txt" ) )
- QFile::remove( "createme.txt" );
+#ifdef Q_OS_QNX
+ QSKIP("This test doesn't pass on QNX and no one has cared to investigate.");
+#endif
+ QFETCH(bool, opened);
+
+ auto remove = []() { QFile::remove("createme.txt"); };
+ auto guard = qScopeGuard(remove);
+ remove();
QVERIFY( !QFile::exists( "createme.txt" ) );
QFile f("createme.txt");
QVERIFY2(f.open(QIODevice::WriteOnly | QIODevice::Truncate), msgOpenFailed(f).constData());
f.putChar('a');
- f.close();
+ if (!opened)
+ f.close();
QFile::Permissions perms(QFile::WriteUser | QFile::ReadUser);
+ QVERIFY(f.setPermissions(QFile::ReadUser));
+ QVERIFY((f.permissions() & perms) == QFile::ReadUser);
QVERIFY(f.setPermissions(perms));
QVERIFY((f.permissions() & perms) == perms);
+ // we should end the test with the file in writeable state
}
void tst_QFile::copy()
@@ -1542,13 +1562,9 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName)
bool neededCoInit = false;
QString ret;
+ QComHelper comHelper;
IShellLink *psl;
HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
- if (hres == CO_E_NOTINITIALIZED) { // COM was not initialized
- neededCoInit = true;
- CoInitialize(NULL);
- hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
- }
if (SUCCEEDED(hres)) { // Get pointer to the IPersistFile interface.
IPersistFile *ppf;
@@ -1567,10 +1583,6 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName)
psl->Release();
}
- if (neededCoInit) {
- CoUninitialize();
- }
-
return ret;
}
#endif
@@ -1769,7 +1781,7 @@ void tst_QFile::largeUncFileSupport()
qint64 size = Q_INT64_C(8589934592);
qint64 dataOffset = Q_INT64_C(8589914592);
QByteArray knownData("LargeFile content at offset 8589914592");
- QString largeFile("//" + QtNetworkSettings::winServerName() + "/testsharelargefile/file.bin");
+ QString largeFile("//" + QTest::uncServerName() + "/testsharelargefile/file.bin");
const QByteArray largeFileEncoded = QFile::encodeName(largeFile);
{
@@ -2450,7 +2462,7 @@ void tst_QFile::writeLargeDataBlock_data()
#if defined(Q_OS_WIN) && !defined(QT_NO_NETWORK)
// Some semi-randomness to avoid collisions.
QTest::newRow("unc file")
- << QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt")
+ << QString("//" + QTest::uncServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt")
.arg(QHostInfo::localHostName())
.arg(QTime::currentTime().msec()) << (int)OpenQFile;
#endif
@@ -2642,6 +2654,10 @@ void tst_QFile::unixPipe_data()
void tst_QFile::unixPipe()
{
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Crashes on Android 12 (QTBUG-105736)");
+#endif
int pipes[2] = { -1, -1 };
QVERIFY2(pipe(pipes) == 0, qPrintable(qt_error_string()));
unixPipe_helper(pipes);
@@ -2651,6 +2667,10 @@ void tst_QFile::unixPipe()
void tst_QFile::socketPair()
{
+#ifdef Q_OS_ANDROID
+ if (QNativeInterface::QAndroidApplication::sdkVersion() >= 31)
+ QSKIP("Crashes on Android 12 (QTBUG-105736)");
+#endif
int pipes[2] = { -1, -1 };
QVERIFY2(socketpair(AF_UNIX, SOCK_STREAM, 0, pipes) == 0, qPrintable(qt_error_string()));
unixPipe_helper(pipes);
@@ -2875,7 +2895,7 @@ void tst_QFile::miscWithUncPathAsCurrentDir()
{
#if defined(Q_OS_WIN)
QString current = QDir::currentPath();
- const QString path = QLatin1String("//") + QtNetworkSettings::winServerName()
+ const QString path = QLatin1String("//") + QTest::uncServerName()
+ QLatin1String("/testshare");
QVERIFY2(QDir::setCurrent(path), qPrintable(QDir::toNativeSeparators(path)));
QFile file("test.pri");
diff --git a/tests/auto/corelib/io/qfileinfo/CMakeLists.txt b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt
index 8b015d518c..ab69a78772 100644
--- a/tests/auto/corelib/io/qfileinfo/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qfileinfo.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qfileinfo
SOURCES
tst_qfileinfo.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
@@ -41,7 +44,7 @@ qt_internal_add_resource(tst_qfileinfo "testdata"
#####################################################################
qt_internal_extend_target(tst_qfileinfo CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
advapi32
netapi32
)
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 80f204156e..40f4c57202 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -31,9 +31,6 @@
#endif
#include <qplatformdefs.h>
#include <qdebug.h>
-#if defined(Q_OS_WIN)
-#include "../../../network-settings.h"
-#endif
#include <private/qfileinfo_p.h>
#include "../../../../shared/filesystem.h"
@@ -383,7 +380,7 @@ void tst_QFileInfo::isDir_data()
//QTest::newRow("drive 2") << "t:s" << false;
#endif
#if defined(Q_OS_WIN)
- const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
+ const QString uncRoot = QStringLiteral("//") + QTest::uncServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
QTest::newRow("unc 3") << uncRoot + "/testshare" << true;
@@ -426,7 +423,7 @@ void tst_QFileInfo::isRoot_data()
#endif
#if defined(Q_OS_WIN)
- const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
+ const QString uncRoot = QStringLiteral("//") + QTest::uncServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
QTest::newRow("unc 3") << uncRoot + "/testshare" << false;
@@ -470,7 +467,7 @@ void tst_QFileInfo::exists_data()
QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << true;
#if defined(Q_OS_WIN)
- const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
+ const QString uncRoot = QStringLiteral("//") + QTest::uncServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
QTest::newRow("unc 3") << uncRoot + "/testshare" << true;
@@ -1732,7 +1729,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
{
// Symlink to UNC share
pwd.mkdir("unc");
- QString uncTarget = QStringLiteral("//") + QtNetworkSettings::winServerName() + "/testshare";
+ QString uncTarget = QStringLiteral("//") + QTest::uncServerName() + "/testshare";
QString uncSymlink = QDir::toNativeSeparators(pwd.absolutePath().append("\\unc\\link_to_unc"));
QTest::newRow("UNC symlink")
<< NtfsTestResource(NtfsTestResource::SymLink, uncSymlink, uncTarget)
diff --git a/tests/auto/corelib/io/qfileselector/CMakeLists.txt b/tests/auto/corelib/io/qfileselector/CMakeLists.txt
index 1ceb91212a..a514d283e9 100644
--- a/tests/auto/corelib/io/qfileselector/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfileselector/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qfileselector.pro.
#####################################################################
@@ -58,7 +61,7 @@ set(qfileselector_resource_files
qt_internal_add_test(tst_qfileselectors
SOURCES
tst_qfileselector.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${qfileselector_resource_files}
BUILTIN_TESTDATA
diff --git a/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt b/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
index 84758836f2..c01787ddc6 100644
--- a/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qfilesystementry.pro.
#####################################################################
@@ -9,6 +12,6 @@ qt_internal_add_test(tst_qfilesystementry
../../../../../src/corelib/io/qfilesystementry.cpp
../../../../../src/corelib/io/qfilesystementry_p.h
tst_qfilesystementry.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt b/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt
index 9b1705f072..3ea6dbb4e1 100644
--- a/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qfilesystemmetadata.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qfilesystemmetadata
SOURCES
tst_qfilesystemmetadata.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt b/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
index 7523122907..c2a19db18e 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
+++ b/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qfilesystemwatcher.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index acf26039d1..361daf8dc7 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -148,7 +148,7 @@ void tst_QFileSystemWatcher::basicTest()
// waiting max 5 seconds for notification for file modification to trigger
QTRY_COMPARE(changedSpy.count(), 1);
- QCOMPARE(changedSpy.at(0).count(), 1);
+ QCOMPARE(changedSpy.at(0).size(), 1);
QString fileName = changedSpy.at(0).at(0).toString();
QCOMPARE(fileName, testFile.fileName());
@@ -192,7 +192,7 @@ void tst_QFileSystemWatcher::basicTest()
// waiting max 5 seconds for notification for file permission modification to trigger
QTRY_COMPARE(changedSpy.count(), 1);
- QCOMPARE(changedSpy.at(0).count(), 1);
+ QCOMPARE(changedSpy.at(0).size(), 1);
fileName = changedSpy.at(0).at(0).toString();
QCOMPARE(fileName, testFile.fileName());
@@ -221,7 +221,7 @@ void tst_QFileSystemWatcher::basicTest()
// > 0 && < 3 because some platforms may emit two changes
// XXX: which platforms? (QTBUG-23370)
QTRY_VERIFY(changedSpy.count() > 0 && changedSpy.count() < 3);
- QCOMPARE(changedSpy.at(0).count(), 1);
+ QCOMPARE(changedSpy.at(0).size(), 1);
fileName = changedSpy.at(0).at(0).toString();
QCOMPARE(fileName, testFile.fileName());
@@ -324,7 +324,7 @@ void tst_QFileSystemWatcher::watchDirectory()
QTRY_COMPARE(changedSpy.count(), testDirs.size() * 2);
for (int i = 0; i < changedSpy.count(); i++) {
const auto &signal = changedSpy.at(i);
- QCOMPARE(signal.count(), 1);
+ QCOMPARE(signal.size(), 1);
auto it = signalCounter.find(signal.at(0).toString());
QVERIFY(it != signalCounter.end());
diff --git a/tests/auto/corelib/io/qiodevice/CMakeLists.txt b/tests/auto/corelib/io/qiodevice/CMakeLists.txt
index ce15e80be5..9b118932c8 100644
--- a/tests/auto/corelib/io/qiodevice/CMakeLists.txt
+++ b/tests/auto/corelib/io/qiodevice/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qiodevice.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "tst_qiodevice.cpp")
qt_internal_add_test(tst_qiodevice
SOURCES
tst_qiodevice.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Network
TESTDATA ${test_data}
QT_TEST_SERVER_LIST "apache2" "cyrus"
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index 07c2aa27b7..2eb927c429 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -174,13 +174,13 @@ void tst_QIODevice::read_QByteArray()
f.open(QIODevice::ReadOnly);
QByteArray b = f.read(10);
- QCOMPARE(b.length(), 10);
+ QCOMPARE(b.size(), 10);
b = f.read(256);
- QCOMPARE(b.length(), 256);
+ QCOMPARE(b.size(), 256);
b = f.read(0);
- QCOMPARE(b.length(), 0);
+ QCOMPARE(b.size(), 0);
}
//--------------------------------------------------------------------
diff --git a/tests/auto/corelib/io/qipaddress/CMakeLists.txt b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
index b4801c2ab2..ab424e20a6 100644
--- a/tests/auto/corelib/io/qipaddress/CMakeLists.txt
+++ b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qipaddress.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qipaddress
SOURCES
tst_qipaddress.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qlockfile/CMakeLists.txt b/tests/auto/corelib/io/qlockfile/CMakeLists.txt
index 456ee88bb0..c9d8fdfb22 100644
--- a/tests/auto/corelib/io/qlockfile/CMakeLists.txt
+++ b/tests/auto/corelib/io/qlockfile/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qlockfile Test:
#####################################################################
@@ -5,7 +8,7 @@
qt_internal_add_test(tst_qlockfile
SOURCES
tst_qlockfile.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
Qt::CorePrivate
)
@@ -14,7 +17,7 @@ qt_internal_add_test(tst_qlockfile
#####################################################################
qt_internal_extend_target(tst_qlockfile CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
advapi32
)
add_subdirectory(qlockfiletesthelper)
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt
index 8917f2aa34..fd2e795492 100644
--- a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qlockfile_test_helper.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt b/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
index 13ee586696..579473d3cf 100644
--- a/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
+++ b/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qloggingcategory.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qloggingcategory
SOURCES
tst_qloggingcategory.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
index a0a9bb940e..a2363eedfc 100644
--- a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
+++ b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
@@ -153,7 +153,7 @@ inline QString cleanLogLine(const QString &qstring)
buf.remove("../");
buf.remove("qlog/");
QString ret;
- for (int i = 0; i < buf.length(); i++) {
+ for (int i = 0; i < buf.size(); i++) {
if (buf[i] >= '!' && buf[i] <= 'z')
ret += buf[i];
}
@@ -181,7 +181,7 @@ private slots:
void initTestCase()
{
qputenv("XDG_CONFIG_DIRS", "/does/not/exist");
- qputenv("QT_MESSAGE_PATTERN", QByteArray("%{category}: %{type},%{message}"));
+ qputenv("QT_MESSAGE_PATTERN", "%{category}: %{type},%{message}");
oldMessageHandler = qInstallMessageHandler(myCustomMessageHandler);
// Create configuration
_config = new Configuration();
diff --git a/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt b/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt
index 80da400032..fc79cca407 100644
--- a/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt
+++ b/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qloggingregistry.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "qtlogging.ini")
qt_internal_add_test(tst_qloggingregistry
SOURCES
tst_qloggingregistry.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/corelib/io/qnodebug/CMakeLists.txt b/tests/auto/corelib/io/qnodebug/CMakeLists.txt
index 5fd4a3738c..0bedc79187 100644
--- a/tests/auto/corelib/io/qnodebug/CMakeLists.txt
+++ b/tests/auto/corelib/io/qnodebug/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qnodebug.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt b/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt
index 0118d46ae8..a7087e59cc 100644
--- a/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qprocess-noapplication.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/CMakeLists.txt b/tests/auto/corelib/io/qprocess/CMakeLists.txt
index 2cd25cd07c..016fcf6666 100644
--- a/tests/auto/corelib/io/qprocess/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
add_subdirectory(test)
add_subdirectory(testProcessCrash)
add_subdirectory(testProcessEcho)
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/CMakeLists.txt b/tests/auto/corelib/io/qprocess/fileWriterProcess/CMakeLists.txt
index ce4519ce99..75c30672fa 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from fileWriterProcess.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/test/CMakeLists.txt b/tests/auto/corelib/io/qprocess/test/CMakeLists.txt
index 9cd8fee6e8..f3cf9637fc 100644
--- a/tests/auto/corelib/io/qprocess/test/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qprocess Test:
#####################################################################
@@ -6,9 +9,10 @@ qt_internal_add_test(tst_qprocess
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
SOURCES
../tst_qprocess.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Network
+ Qt::TestPrivate
)
## Build assorted sub-programs called from the test:
diff --git a/tests/auto/corelib/io/qprocess/testDetached/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testDetached/CMakeLists.txt
index 368ca92f09..c72e2738a3 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testDetached/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from testDetached.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt
index c9baab6cfc..80fae82a39 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testExitCodes Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt
index adadbeca7a..77739d2c68 100644
--- a/tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testForwarding Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
index 80b0001a39..b5d9096a21 100644
--- a/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testForwardingHelper Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt
index e36a33bfa4..c0dac373bd 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from testGuiProcess.pro.
#####################################################################
@@ -8,7 +11,7 @@ qt_internal_add_executable(testGuiProcess
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Widgets
)
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt
index 230148ba22..0aeaa68e0d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessCrash Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
index 24e4e8f58c..9d1d1372b4 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessDeadWhileReading Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
index 6de59f67fe..c7c7558c04 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessEOF Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
index 55b9537fe1..30c42b8797 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessEcho Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
index b805dc2d85..d349b6af57 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessEcho2 Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
index dc1d262462..67cdd8d315 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessEcho3 Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
index 3cc5e3641d..6254d4f61b 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessEchoGui Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
index ec725b67ca..6f0cdd5ffb 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessEnvironment Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
index 2c63be7ce9..ba8a92ab30 100644
--- a/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessHang Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
index 10bbf3840d..f71dfde8e0 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessNormal Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
index cc621d62f6..b74a870f4e 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testProcessOutput Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
index 0d2fff73c8..a0ce882db1 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
add_executable(nospace main.cpp)
add_executable(onespace main.cpp)
diff --git a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt
index a68d434f52..9e4f0f2e56 100644
--- a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testSetNamedPipeHandleState Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt
index 97410c1b49..e4a4fa39ab 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from testSetWorkingDirectory.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt
index f6088e1032..c9fa43d073 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testSoftExit Binary:
#####################################################################
@@ -7,7 +10,7 @@ add_executable(testSoftExit)
qt_internal_extend_target(testSoftExit CONDITION WIN32
SOURCES
main_win.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
user32
)
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt
index 28107c9009..4223030f46 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## testSpaceInName Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 674e232eca..331567b178 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -23,6 +23,8 @@
# include <private/qcore_unix_p.h>
#endif
+#include <QtTest/private/qemulationdetector_p.h>
+
#include <stdlib.h>
typedef void (QProcess::*QProcessErrorSignal)(QProcess::ProcessError);
@@ -353,9 +355,7 @@ void tst_QProcess::readFromProcess()
{
QProcess *process = qobject_cast<QProcess *>(sender());
QVERIFY(process);
- int lines = 0;
while (process->canReadLine()) {
- ++lines;
process->readLine();
}
}
@@ -629,7 +629,7 @@ void tst_QProcess::exitStatus()
QFETCH(QStringList, processList);
QFETCH(QList<QProcess::ExitStatus>, exitStatus);
- QCOMPARE(exitStatus.count(), processList.count());
+ QCOMPARE(exitStatus.size(), processList.count());
for (int i = 0; i < processList.count(); ++i) {
process.start(processList.at(i));
QVERIFY(process.waitForStarted(5000));
@@ -1223,6 +1223,9 @@ void tst_QProcess::processInAThread()
void tst_QProcess::processesInMultipleThreads()
{
+ if (QTestPrivate::isRunningArmOnX86())
+ QSKIP("Test is too slow to run on emulator");
+
#if defined(Q_OS_QNX)
QSKIP("QNX: Large amount of threads is unstable and do not finish in given time");
#endif
diff --git a/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt b/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
index d612a32374..92fac13d61 100644
--- a/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
+++ b/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qprocessenvironment.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qresourceengine/CMakeLists.txt b/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
index b6b3c588d5..7a4f9ec4b7 100644
--- a/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
+++ b/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qresourceengine Test:
#####################################################################
diff --git a/tests/auto/corelib/io/qresourceengine/staticplugin/CMakeLists.txt b/tests/auto/corelib/io/qresourceengine/staticplugin/CMakeLists.txt
index 5e2e374310..1012fcaa62 100644
--- a/tests/auto/corelib/io/qresourceengine/staticplugin/CMakeLists.txt
+++ b/tests/auto/corelib/io/qresourceengine/staticplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## moctestplugin Generic Library:
#####################################################################
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 42018219a9..3170d2f452 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -37,6 +37,7 @@ private slots:
void searchPath_data();
void searchPath();
void doubleSlashInRoot();
+ void setLocale_data();
void setLocale();
void lastModified();
void resourcesInStaticPlugins();
@@ -565,13 +566,22 @@ void tst_QResourceEngine::doubleSlashInRoot()
QVERIFY(QFile::exists("://secondary_root/runtime_resource/search_file.txt"));
}
+void tst_QResourceEngine::setLocale_data()
+{
+ QTest::addColumn<QString>("prefix");
+ QTest::newRow("built-in") << QString();
+ QTest::newRow("runtime") << "/runtime_resource/";
+}
+
void tst_QResourceEngine::setLocale()
{
+ QFETCH(QString, prefix);
QLocale::setDefault(QLocale::c());
// default constructed QResource gets the default locale
QResource resource;
- resource.setFileName("aliasdir/aliasdir.txt");
+ resource.setFileName(prefix + "aliasdir/aliasdir.txt");
+ QVERIFY(resource.isValid());
QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression);
// change the default locale and make sure it doesn't affect the resource
diff --git a/tests/auto/corelib/io/qsavefile/CMakeLists.txt b/tests/auto/corelib/io/qsavefile/CMakeLists.txt
index 0b41340279..b85a133574 100644
--- a/tests/auto/corelib/io/qsavefile/CMakeLists.txt
+++ b/tests/auto/corelib/io/qsavefile/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qsavefile.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qsettings/CMakeLists.txt b/tests/auto/corelib/io/qsettings/CMakeLists.txt
index 2b60d1efff..943aa0035f 100644
--- a/tests/auto/corelib/io/qsettings/CMakeLists.txt
+++ b/tests/auto/corelib/io/qsettings/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qsettings.pro.
#####################################################################
@@ -22,7 +25,7 @@ qt_internal_add_test(tst_qsettings
tst_qsettings.cpp
INCLUDE_DIRECTORIES
../../kernel/qmetatype
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
TESTDATA ${qsettings_resource_files}
@@ -34,11 +37,11 @@ qt_internal_add_test(tst_qsettings
#####################################################################
qt_internal_extend_target(tst_qsettings CONDITION MSVC
- PUBLIC_LIBRARIES
+ LIBRARIES
advapi32
)
qt_internal_extend_target(tst_qsettings CONDITION APPLE
- PUBLIC_LIBRARIES
+ LIBRARIES
${FWCoreFoundation}
)
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 19ed36589e..b168dd96c3 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -2683,7 +2683,7 @@ QString escapeWeirdChars(const QString &s)
QString result;
bool escapeNextDigit = false;
- for (int i = 0; i < s.length(); ++i) {
+ for (int i = 0; i < s.size(); ++i) {
QChar c = s.at(i);
if (c.unicode() < ' ' || c.unicode() > '~'
|| (escapeNextDigit && c.unicode() >= '0' && c.unicode() <= 'f')) {
diff --git a/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt b/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt
index f275b97efe..ff4aa850ab 100644
--- a/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt
+++ b/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qstandardpaths.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 2c0500eec9..b2bb14180e 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -64,10 +64,10 @@ private:
qputenv("XDG_DATA_DIRS", QFile::encodeName(m_globalAppDir));
}
void setDefaultLocations() {
- qputenv("XDG_CONFIG_HOME", QByteArray());
- qputenv("XDG_CONFIG_DIRS", QByteArray());
- qputenv("XDG_DATA_HOME", QByteArray());
- qputenv("XDG_DATA_DIRS", QByteArray());
+ qputenv("XDG_CONFIG_HOME", nullptr);
+ qputenv("XDG_CONFIG_DIRS", nullptr);
+ qputenv("XDG_DATA_HOME", nullptr);
+ qputenv("XDG_DATA_DIRS", nullptr);
}
#endif
diff --git a/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt b/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
index be3a8c3afe..48e92587c3 100644
--- a/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
+++ b/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qstorageinfo.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qstorageinfo
SOURCES
tst_qstorageinfo.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt b/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt
index fcfd409d5b..8002f2158f 100644
--- a/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt
+++ b/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtemporarydir.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtemporarydir
SOURCES
tst_qtemporarydir.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::TestPrivate
)
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 7761ac5a6a..227c6260d3 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -229,9 +229,9 @@ void tst_QTemporaryDir::fileTemplate()
QVERIFY(tempDir.isValid());
QString dirName = QDir(tempDir.path()).dirName();
- if (prefix.length()) {
- QCOMPARE(dirName.left(prefix.length()), prefix);
- QCOMPARE(dirName.right(suffix.length()), suffix);
+ if (prefix.size()) {
+ QCOMPARE(dirName.left(prefix.size()), prefix);
+ QCOMPARE(dirName.right(suffix.size()), suffix);
}
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
index e7a1a65296..47d6b78b6c 100644
--- a/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
+++ b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtemporaryfile.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "tst_qtemporaryfile.cpp")
qt_internal_add_test(tst_qtemporaryfile
SOURCES
tst_qtemporaryfile.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::TestPrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index ba37285d5f..556571b346 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -230,11 +230,11 @@ void tst_QTemporaryFile::fileTemplate()
QVERIFY2(file.open(), qPrintable(file.errorString()));
QString fileName = QFileInfo(file).fileName();
- if (prefix.length())
- QCOMPARE(fileName.left(prefix.length()), prefix);
+ if (prefix.size())
+ QCOMPARE(fileName.left(prefix.size()), prefix);
- if (suffix.length())
- QCOMPARE(fileName.right(suffix.length()), suffix);
+ if (suffix.size())
+ QCOMPARE(fileName.right(suffix.size()), suffix);
}
diff --git a/tests/auto/corelib/io/qurl/CMakeLists.txt b/tests/auto/corelib/io/qurl/CMakeLists.txt
index b5a2ec0331..b5a0296be9 100644
--- a/tests/auto/corelib/io/qurl/CMakeLists.txt
+++ b/tests/auto/corelib/io/qurl/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qurl.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qurl
SOURCES
tst_qurl.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
Qt::TestPrivate
)
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 48ffa09906..e90752c3c0 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -1090,7 +1090,7 @@ void tst_QUrl::toAndFromStringList()
QFETCH(QStringList, strings);
const QList<QUrl> urls = QUrl::fromStringList(strings);
- QCOMPARE(urls.count(), strings.count());
+ QCOMPARE(urls.size(), strings.count());
const QStringList converted = QUrl::toStringList(urls);
QCOMPARE(converted, strings);
}
diff --git a/tests/auto/corelib/io/qurlinternal/CMakeLists.txt b/tests/auto/corelib/io/qurlinternal/CMakeLists.txt
index 492ac0a4d6..9c171e11b7 100644
--- a/tests/auto/corelib/io/qurlinternal/CMakeLists.txt
+++ b/tests/auto/corelib/io/qurlinternal/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qurlinternal.pro.
if(NOT QT_FEATURE_private_tests)
@@ -12,7 +15,7 @@ qt_internal_add_test(tst_qurlinternal
SOURCES
tst_qurlinternal.cpp
utf8data.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index aa7564f300..d2767f5082 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -721,7 +721,7 @@ void tst_QUrlInternal::encodingRecodeInvalidUtf8()
output = QTest::currentDataTag();
if (!qt_urlRecode(output, input, QUrl::FullyEncoded))
output += input;
- for (int i = int(strlen(QTest::currentDataTag())); i < output.length(); ++i) {
+ for (int i = int(strlen(QTest::currentDataTag())); i < output.size(); ++i) {
QVERIFY2(output.at(i).unicode() < 0x80 || output.at(i) == QChar::ReplacementCharacter,
qPrintable(QString("Character at i == %1 was U+%2").arg(i).arg(output.at(i).unicode(), 4, 16, QLatin1Char('0'))));
}
diff --git a/tests/auto/corelib/io/qurlquery/CMakeLists.txt b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
index b0484314d9..80a8ba1a3c 100644
--- a/tests/auto/corelib/io/qurlquery/CMakeLists.txt
+++ b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qurlquery.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qurlquery
SOURCES
tst_qurlquery.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
index 43a407da9d..15c0474eb0 100644
--- a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
+++ b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
@@ -220,7 +220,7 @@ void tst_QUrlQuery::addRemove()
QCOMPARE(query.allQueryItemValues("a"), QStringList() << "b");
QList<QPair<QString, QString> > allItems = query.queryItems();
- QCOMPARE(allItems.count(), 1);
+ QCOMPARE(allItems.size(), 1);
QCOMPARE(allItems.at(0).first, QString("a"));
QCOMPARE(allItems.at(0).second, QString("b"));
}
@@ -238,7 +238,7 @@ void tst_QUrlQuery::addRemove()
QCOMPARE(query.allQueryItemValues("c"), QStringList() << "d");
QList<QPair<QString, QString> > allItems = query.queryItems();
- QCOMPARE(allItems.count(), 2);
+ QCOMPARE(allItems.size(), 2);
QVERIFY(allItems.contains(qItem("a", "b")));
QVERIFY(allItems.contains(qItem("c", "d")));
@@ -261,7 +261,7 @@ void tst_QUrlQuery::addRemove()
QCOMPARE(query.allQueryItemValues("a"), QStringList() << "b");
QList<QPair<QString, QString> > allItems = query.queryItems();
- QCOMPARE(allItems.count(), 1);
+ QCOMPARE(allItems.size(), 1);
QCOMPARE(allItems.at(0).first, QString("a"));
QCOMPARE(allItems.at(0).second, QString("b"));
@@ -285,7 +285,7 @@ void tst_QUrlQuery::addRemove()
QCOMPARE(query.allQueryItemValues("e"), QStringList() << emptyButNotNull);
QList<QPair<QString, QString> > allItems = query.queryItems();
- QCOMPARE(allItems.count(), 2);
+ QCOMPARE(allItems.size(), 2);
QVERIFY(allItems.contains(qItem("a", "b")));
QVERIFY(allItems.contains(qItem("e", emptyButNotNull)));
diff --git a/tests/auto/corelib/io/qurluts46/CMakeLists.txt b/tests/auto/corelib/io/qurluts46/CMakeLists.txt
index 1e91fd17c8..7f0cd23843 100644
--- a/tests/auto/corelib/io/qurluts46/CMakeLists.txt
+++ b/tests/auto/corelib/io/qurluts46/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qurluts46 Test:
#####################################################################
diff --git a/tests/auto/corelib/io/qurluts46/tst_qurluts46.cpp b/tests/auto/corelib/io/qurluts46/tst_qurluts46.cpp
index e36642974a..7d2d1a741e 100644
--- a/tests/auto/corelib/io/qurluts46/tst_qurluts46.cpp
+++ b/tests/auto/corelib/io/qurluts46/tst_qurluts46.cpp
@@ -30,6 +30,35 @@ private:
const QSet<QByteArray> tst_QUrlUts46::fatalErrors = { "A3", "A4_2", "P1", "X4_2" };
+/**
+ * Replace \uXXXX escapes in test case fields.
+ */
+static QString unescapeField(const QString &field)
+{
+ static const QRegularExpression re(R"(\\u([[:xdigit:]]{4}))");
+
+ QString result;
+ qsizetype lastIdx = 0;
+
+ for (const auto &match : re.globalMatch(field)) {
+ // Add stuff before the match
+ result.append(field.mid(lastIdx, match.capturedStart() - lastIdx));
+ bool ok = false;
+ auto c = match.captured(1).toUInt(&ok, 16);
+ if (!ok) {
+ qFatal("Failed to parse a Unicode escape: %s", qPrintable(match.captured(1)));
+ }
+
+ result.append(QChar(c));
+ lastIdx = match.capturedEnd();
+ }
+
+ // Append the unescaped end
+ result.append(field.mid(lastIdx));
+
+ return result;
+}
+
void tst_QUrlUts46::idnaTestV2_data()
{
QTest::addColumn<QString>("source");
@@ -50,7 +79,7 @@ void tst_QUrlUts46::idnaTestV2_data()
Q_ASSERT(s.startsWith('[') && s.endsWith(']'));
- const auto errors = s.sliced(1, s.length() - 2).split(',');
+ const auto errors = s.sliced(1, s.size() - 2).split(',');
// NOTE: empty string is not in fatalErrors and it's ok
return std::all_of(errors.begin(), errors.end(),
[](auto &e) { return !fatalErrors.contains(e.trimmed()); });
@@ -69,7 +98,7 @@ void tst_QUrlUts46::idnaTestV2_data()
Q_ASSERT(fields.size() == 7);
for (auto &field : fields)
- field = field.trimmed();
+ field = unescapeField(field.trimmed()).toUtf8();
const QString &source = fields[0];
QString toUnicode = fields[1].isEmpty() ? source : fields[1];
diff --git a/tests/auto/corelib/itemmodels/CMakeLists.txt b/tests/auto/corelib/itemmodels/CMakeLists.txt
index fcea1c843d..3b3ebe2d99 100644
--- a/tests/auto/corelib/itemmodels/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from itemmodels.pro.
add_subdirectory(qstringlistmodel)
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
index 2f91f7d41a..5d4e7ab6e4 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qabstractitemmodel.pro.
#####################################################################
@@ -8,10 +11,8 @@ qt_internal_add_test(tst_qabstractitemmodel
SOURCES
../../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../../other/qabstractitemmodelutils/dynamictreemodel.h
tst_qabstractitemmodel.cpp
- DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
INCLUDE_DIRECTORIES
../../../other/qabstractitemmodelutils
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
index 423cc1bdc8..f6933b7fdb 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -156,8 +156,8 @@ QtTestModel::QtTestModel(const QList<QList<QString> > tbl, QObject *parent)
: QAbstractItemModel(parent), wrongIndex(false)
{
table = tbl;
- rCount = tbl.count();
- cCount = tbl.at(0).count();
+ rCount = tbl.size();
+ cCount = tbl.at(0).size();
}
QModelIndex QtTestModel::index(int row, int column, const QModelIndex &parent) const
@@ -191,7 +191,7 @@ bool QtTestModel::insertRows(int row, int count, const QModelIndex &parent)
QAbstractItemModel::beginInsertRows(parent, row, row + count - 1);
int cc = columnCount(parent);
table.insert(row, count, QList<QString>(cc));
- rCount = table.count();
+ rCount = table.size();
QAbstractItemModel::endInsertRows();
return true;
}
@@ -202,7 +202,7 @@ bool QtTestModel::insertColumns(int column, int count, const QModelIndex &parent
int rc = rowCount(parent);
for (int i = 0; i < rc; ++i)
table[i].insert(column, 1, "");
- cCount = table.at(0).count();
+ cCount = table.at(0).size();
QAbstractItemModel::endInsertColumns();
return true;
}
@@ -218,7 +218,7 @@ bool QtTestModel::removeRows( int row, int count, const QModelIndex & parent)
for (int r = row+count-1; r >= row; --r)
table.remove(r);
- rCount = table.count();
+ rCount = table.size();
QAbstractItemModel::endRemoveRows();
return true;
@@ -232,7 +232,7 @@ bool QtTestModel::removeColumns(int column, int count, const QModelIndex & paren
for (int r = 0; r < rCount; ++r)
table[r].remove(c);
- cCount = table.at(0).count();
+ cCount = table.at(0).size();
QAbstractItemModel::endRemoveColumns();
return true;
@@ -260,7 +260,7 @@ bool QtTestModel::moveRows(const QModelIndex &sourceParent, int src, int cnt,
}
}
- rCount = table.count();
+ rCount = table.size();
QAbstractItemModel::endMoveRows();
return true;
@@ -290,7 +290,7 @@ bool QtTestModel::moveColumns(const QModelIndex &sourceParent, int src, int cnt,
}
}
- cCount = table.at(0).count();
+ cCount = table.at(0).size();
QAbstractItemModel::endMoveColumns();
return true;
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
index 6c782326cb..61fda88887 100644
--- a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qabstractproxymodel.pro.
#####################################################################
@@ -7,8 +10,6 @@
qt_internal_add_test(tst_qabstractproxymodel
SOURCES
tst_qabstractproxymodel.cpp
- DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
LIBRARIES
Qt::Gui
Qt::TestPrivate
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
index b8283709e2..1ca4d60f10 100644
--- a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
@@ -291,7 +291,7 @@ void tst_QAbstractProxyModel::itemData()
QFETCH(QModelIndex, index);
QFETCH(int, count);
SubQAbstractProxyModel model;
- QCOMPARE(model.itemData(index).count(), count);
+ QCOMPARE(model.itemData(index).size(), count);
}
void tst_QAbstractProxyModel::mapFromSource_data()
diff --git a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt
index 40dd512489..fb025811dd 100644
--- a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qconcatenatetablesproxymodel.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qconcatenatetablesproxymodel
SOURCES
tst_qconcatenatetablesproxymodel.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt
index fb2ae55215..f0428b32f5 100644
--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qidentityproxymodel.pro.
#####################################################################
@@ -10,6 +13,6 @@ qt_internal_add_test(tst_qidentityproxymodel
tst_qidentityproxymodel.cpp
INCLUDE_DIRECTORIES
../../../other/qabstractitemmodelutils
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt
index 7dda1a3964..3f9701d23b 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qitemmodel.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qitemmodel
SOURCES
tst_qitemmodel.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::Sql
Qt::Widgets
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt
index 8eadf67b66..a8ec49816e 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qitemselectionmodel.pro.
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
index 1a9875a1eb..8438ac24fa 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
@@ -1525,7 +1525,7 @@ void tst_QItemSelectionModel::resetModel()
selectionModel->select(QItemSelection(model.index(0, 0), model.index(5, 5)), QItemSelectionModel::Select);
QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.at(1).count(), 2);
+ QCOMPARE(spy.at(1).size(), 2);
// make sure we don't get an "old selection"
QCOMPARE(spy.at(1).at(1).userType(), qMetaTypeId<QItemSelection>());
QVERIFY(qvariant_cast<QItemSelection>(spy.at(1).at(1)).isEmpty());
@@ -1721,7 +1721,7 @@ void tst_QItemSelectionModel::modelLayoutChanged()
QFETCH(int, sortColumn);
QFETCH(IntPairPairList, expectedSelectedRanges);
- MyStandardItemModel model(items.at(0).count(), items.count());
+ MyStandardItemModel model(items.at(0).size(), items.count());
// initialize model data
for (int i = 0; i < model.rowCount(); ++i) {
for (int j = 0; j < model.columnCount(); ++j) {
@@ -2266,7 +2266,7 @@ void tst_QItemSelectionModel::layoutChangedWithAllSelected1()
selection.select(QItemSelection(indexList.first(), indexList.last()), QItemSelectionModel::Select);
//let's check the selection hasn't changed
- QCOMPARE(selection.selectedIndexes().count(), indexList.count());
+ QCOMPARE(selection.selectedIndexes().count(), indexList.size());
for (const auto &index : indexList)
QVERIFY(selection.isSelected(index));
@@ -2274,7 +2274,7 @@ void tst_QItemSelectionModel::layoutChangedWithAllSelected1()
QCOMPARE(proxy.rowCount(), 3);
//let's check the selection hasn't changed
- QCOMPARE(selection.selectedIndexes().count(), indexList.count());
+ QCOMPARE(selection.selectedIndexes().count(), indexList.size());
for (const auto &index : indexList)
QVERIFY(selection.isSelected(index));
}
@@ -2323,7 +2323,7 @@ void tst_QItemSelectionModel::layoutChangedWithAllSelected2()
QCOMPARE(proxy.rowCount(), int(cNumRows));
//let's check the selection hasn't changed
- QCOMPARE(selection.selectedIndexes().count(), indexList.count());
+ QCOMPARE(selection.selectedIndexes().count(), indexList.size());
for (const auto &index : indexList)
QVERIFY(selection.isSelected(index));
}
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt
index 25c8553088..c73e09a94a 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qsortfilterproxymodel Test:
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 99151a2065..6e62c3de0b 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -2386,8 +2386,8 @@ void tst_QSortFilterProxyModel::sortFilterRole()
const QList<int> orderedItems({2, 1});
- model.insertRows(0, sourceItems.count());
- for (int i = 0; i < sourceItems.count(); ++i) {
+ model.insertRows(0, sourceItems.size());
+ for (int i = 0; i < sourceItems.size(); ++i) {
QModelIndex index = model.index(i, 0, QModelIndex());
model.setData(index, sourceItems.at(i).first, Qt::DisplayRole);
model.setData(index, sourceItems.at(i).second, Qt::UserRole);
@@ -2417,7 +2417,7 @@ void tst_QSortFilterProxyModel::sortFilterRole()
proxy.setFilterRole(Qt::DisplayRole);
setupFilter(&proxy, QLatin1String("a|c"));
- QCOMPARE(proxy.rowCount(), orderedItems.count());
+ QCOMPARE(proxy.rowCount(), orderedItems.size());
for (int i = 0; i < proxy.rowCount(); ++i) {
QModelIndex index = proxy.index(i, 0, QModelIndex());
QCOMPARE(proxy.data(index, Qt::DisplayRole), sourceItems.at(orderedItems.at(i)).first);
@@ -2805,7 +2805,7 @@ void tst_QSortFilterProxyModel::sortColumnTracking2()
model.insertColumn(0,items);
QCOMPARE(proxyModel.sortColumn(), 0);
QCOMPARE(proxyModel.data(proxyModel.index(0,0)).toString(),QString::fromLatin1("aa"));
- const int zzIndex = items.count() - 3; // 2 invalid at end.
+ const int zzIndex = items.size() - 3; // 2 invalid at end.
QCOMPARE(proxyModel.data(proxyModel.index(zzIndex,0)).toString(),QString::fromLatin1("zz"));
}
@@ -3227,7 +3227,7 @@ void tst_QSortFilterProxyModel::removeRowsRecursive()
QList<QStandardItem*> itemRow = pItem1->takeRow(0);
- QCOMPARE(itemRow.count(), 1);
+ QCOMPARE(itemRow.size(), 1);
QCOMPARE(itemRow.first(), pItem11);
for (const auto &pidx : qAsConst(sourceIndexes))
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
index 678a814224..9edc2d6ab5 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qsortfilterproxymodel_recursive.pro.
#####################################################################
@@ -7,8 +10,6 @@
qt_internal_add_test(tst_qsfpm_recursive
SOURCES
tst_qsortfilterproxymodel_recursive.cpp
- DEFINES
- QT_DISABLE_DEPRECATED_BEFORE=0
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp
index a880f8d204..eb137d4821 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/tst_qsortfilterproxymodel_recursive.cpp
@@ -119,7 +119,7 @@ static void fillModel(QStandardItemModel &model, const QString &str)
QCOMPARE(str.count('['), str.count(']'));
QStandardItem *item = nullptr;
QString data;
- for ( int i = 0 ; i < str.length() ; ++i ) {
+ for ( int i = 0 ; i < str.size() ; ++i ) {
const QChar ch = str.at(i);
if ((ch == '[' || ch == ']' || ch == ' ') && !data.isEmpty()) {
if (data.endsWith('*')) {
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt
index 1f41f26a11..cabc8f224a 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qsortfilterproxymodel_regularexpression Test:
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
index c6123bb1e3..1c22bdaf2c 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qstringlistmodel.pro.
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt
index 7cc675d7fd..dffd1d5eec 100644
--- a/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt
+++ b/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qtransposeproxymodel.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qtransposeproxymodel
SOURCES
tst_qtransposeproxymodel.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/kernel/CMakeLists.txt b/tests/auto/corelib/kernel/CMakeLists.txt
index 3083652945..a556b09953 100644
--- a/tests/auto/corelib/kernel/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from kernel.pro.
add_subdirectory(qapplicationstatic)
@@ -42,6 +45,7 @@ if(QT_FEATURE_systemsemaphore AND NOT ANDROID AND NOT UIKIT)
endif()
if(WIN32)
add_subdirectory(qwineventnotifier)
+ add_subdirectory(qwinregistrykey)
endif()
if(QT_FEATURE_private_tests)
add_subdirectory(qproperty)
diff --git a/tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt b/tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt
index 0890113c55..ad8d5d169a 100644
--- a/tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qapplicationstatic Test:
#####################################################################
diff --git a/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt
index 92d4b03d26..d51f857a4a 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qcoreapplication.pro.
if(NOT QT_FEATURE_private_tests)
@@ -20,7 +23,7 @@ qt_internal_add_test(tst_qcoreapplication
VERSION ${target_version} # special case
SOURCES
tst_qcoreapplication.cpp tst_qcoreapplication.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt b/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
index 8c8721abf5..30c9d3f9a4 100644
--- a/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdeadlinetimer.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp b/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp
index b8ed0031cd..ddb765cf82 100644
--- a/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp
+++ b/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp
@@ -8,9 +8,7 @@
#include <QTest>
#include <QTimer>
-#if __has_include(<chrono>)
-# include <chrono>
-#endif
+#include <chrono>
static const int minResolution = 400; // the minimum resolution for the tests
@@ -495,9 +493,6 @@ void tst_QDeadlineTimer::expire()
void tst_QDeadlineTimer::stdchrono()
{
-#if !__has_include(<chrono>)
- QSKIP("std::chrono not found on this system");
-#else
using namespace std::chrono;
QFETCH_GLOBAL(Qt::TimerType, timerType);
@@ -697,7 +692,6 @@ void tst_QDeadlineTimer::stdchrono()
QVERIFY(deadline.deadline<steady_clock>() <= (steady_clock::now() + seconds(1) + milliseconds(minResolution)));
QVERIFY(deadline.deadline<system_clock>() > (system_clock::now() + seconds(1) - milliseconds(minResolution)));
QVERIFY(deadline.deadline<system_clock>() <= (system_clock::now() + seconds(1) + milliseconds(minResolution)));
-#endif
}
QTEST_MAIN(tst_QDeadlineTimer)
diff --git a/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
index 1592303ae3..1e86634290 100644
--- a/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qelapsedtimer.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp
index 652a62f640..f2f42bef4b 100644
--- a/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp
+++ b/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp
@@ -9,11 +9,13 @@
static const int minResolution = 100; // the minimum resolution for the tests
+QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug s, const QElapsedTimer &t)
{
s.nospace() << "(" << t.msecsSinceReference() << ")";
return s.space();
}
+QT_END_NAMESPACE
class tst_QElapsedTimer : public QObject
{
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt b/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
index 409764a2c7..5ef51b4906 100644
--- a/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qeventdispatcher.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
index df5f5fef1d..99563f187a 100644
--- a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
+++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
@@ -159,7 +159,7 @@ private:
bool foundCoarse = false;
bool foundVeryCoarse = false;
const QList<QAbstractEventDispatcher::TimerInfo> timers = registeredTimers();
- for (int i = 0; i < timers.count(); ++i) {
+ for (int i = 0; i < timers.size(); ++i) {
const QAbstractEventDispatcher::TimerInfo &timerInfo = timers.at(i);
if (timerInfo.timerId == m_preciseTimerId) {
QCOMPARE(timerInfo.interval, int(PreciseTimerInterval));
@@ -201,7 +201,7 @@ void tst_QEventDispatcher::registerTimer()
return;
// check that all 3 are present in the eventDispatcher's registeredTimer() list
- QCOMPARE(timers.registeredTimers().count(), 3);
+ QCOMPARE(timers.registeredTimers().size(), 3);
QVERIFY(timers.foundPrecise());
QVERIFY(timers.foundCoarse());
QVERIFY(timers.foundVeryCoarse());
@@ -236,7 +236,7 @@ void tst_QEventDispatcher::registerTimer()
timers.unregister(timers.preciseTimerId());
if (QTest::currentTestFailed())
return;
- QCOMPARE(timers.registeredTimers().count(), 2);
+ QCOMPARE(timers.registeredTimers().size(), 2);
QVERIFY(!timers.foundPrecise());
QVERIFY(timers.foundCoarse());
QVERIFY(timers.foundVeryCoarse());
@@ -260,7 +260,7 @@ void tst_QEventDispatcher::registerTimer()
timers.unregister(timers.coarseTimerId());
if (QTest::currentTestFailed())
return;
- QCOMPARE(timers.registeredTimers().count(), 1);
+ QCOMPARE(timers.registeredTimers().size(), 1);
QVERIFY(!timers.foundPrecise());
QVERIFY(!timers.foundCoarse());
QVERIFY(timers.foundVeryCoarse());
diff --git a/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt
index d3b817598e..177b349a45 100644
--- a/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qeventloop.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qeventloop
SOURCES
tst_qeventloop.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Network
)
@@ -16,7 +19,7 @@ qt_internal_add_test(tst_qeventloop
#####################################################################
qt_internal_extend_target(tst_qeventloop CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
user32
)
diff --git a/tests/auto/corelib/kernel/qjnienvironment/CMakeLists.txt b/tests/auto/corelib/kernel/qjnienvironment/CMakeLists.txt
index 25e7e51ba6..4d40b0b55d 100644
--- a/tests/auto/corelib/kernel/qjnienvironment/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qjnienvironment/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qjnienvironment Test:
#####################################################################
diff --git a/tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java b/tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java
index 0fc70f2567..984307d57d 100644
--- a/tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java
+++ b/tests/auto/corelib/kernel/qjnienvironment/testdata/src/org/qtproject/qt/android/testdata/QtJniEnvironmentTestClass.java
@@ -6,6 +6,10 @@ package org.qtproject.qt.android.testdatapackage;
public class QtJniEnvironmentTestClass
{
private static native void callbackFromJava(String message);
+ private static native void namedCallbackFromJava(String message);
+ private static native void memberCallbackFromJava(String message);
+ private static native void namedMemberCallbackFromJava(String message);
+ private static native void namespaceCallbackFromJava(String message);
private static native void intCallbackFromJava(int value);
public final int INT_FIELD = 123;
@@ -18,6 +22,26 @@ public class QtJniEnvironmentTestClass
callbackFromJava("From Java: " + message);
}
+ public static void namedAppendJavaToString(String message)
+ {
+ namedCallbackFromJava("From Java (named): " + message);
+ }
+
+ public static void memberAppendJavaToString(String message)
+ {
+ memberCallbackFromJava("From Java (member): " + message);
+ }
+
+ public static void namedMemberAppendJavaToString(String message)
+ {
+ namedMemberCallbackFromJava("From Java (named member): " + message);
+ }
+
+ public static void namespaceAppendJavaToString(String message)
+ {
+ namespaceCallbackFromJava("From Java (namespace): " + message);
+ }
+
public static void convertToInt(String message)
{
intCallbackFromJava(Integer.parseInt(message));
diff --git a/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp b/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp
index 76cad4ddc0..da72b6d32b 100644
--- a/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp
+++ b/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp
@@ -101,6 +101,13 @@ static void callbackFromJava(JNIEnv *env, jobject /*thiz*/, jstring value)
}
Q_DECLARE_JNI_NATIVE_METHOD(callbackFromJava);
+static void tediouslyLongNamed_callbackFromJava(JNIEnv *env, jobject /*thiz*/, jstring value)
+{
+ Q_UNUSED(env)
+ registerNativesString = QJniObject(value).toString();
+}
+Q_DECLARE_JNI_NATIVE_METHOD(tediouslyLongNamed_callbackFromJava, namedCallbackFromJava)
+
static void callbackFromJavaNoCtor(JNIEnv *env, jobject /*thiz*/, jstring value)
{
Q_UNUSED(env)
@@ -108,6 +115,34 @@ static void callbackFromJavaNoCtor(JNIEnv *env, jobject /*thiz*/, jstring value)
}
Q_DECLARE_JNI_NATIVE_METHOD(callbackFromJavaNoCtor);
+class CallbackClass {
+public:
+ static void memberCallbackFromJava(JNIEnv *env, jobject /*thiz*/, jstring value)
+ {
+ Q_UNUSED(env)
+ registerNativesString = QJniObject(value).toString();
+ }
+ Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(memberCallbackFromJava)
+
+ static void tediouslyLongNamed_memberCallbackFromJava(JNIEnv *env, jobject /*thiz*/,
+ jstring value)
+ {
+ Q_UNUSED(env)
+ registerNativesString = QJniObject(value).toString();
+ }
+ Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(tediouslyLongNamed_memberCallbackFromJava,
+ namedMemberCallbackFromJava)
+};
+
+namespace CallbackNamespace {
+ static void namespaceCallbackFromJava(JNIEnv *env, jobject /*thiz*/, jstring value)
+ {
+ Q_UNUSED(env)
+ registerNativesString = QJniObject(value).toString();
+ }
+ Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(namespaceCallbackFromJava)
+}
+
void tst_QJniEnvironment::registerNativeMethods()
{
QJniObject QtString = QJniObject::fromString(registerNativesString);
@@ -126,6 +161,63 @@ void tst_QJniEnvironment::registerNativeMethods()
QVERIFY(registerNativesString == QStringLiteral("From Java: Qt"));
}
+ // Named native function
+ {
+ QVERIFY(env.registerNativeMethods(javaTestClass, {
+ Q_JNI_NATIVE_METHOD(tediouslyLongNamed_callbackFromJava)
+ }));
+
+ QJniObject::callStaticMethod<void>(javaTestClass,
+ "namedAppendJavaToString",
+ "(Ljava/lang/String;)V",
+ QtString.object<jstring>());
+ QTest::qWait(200);
+ QVERIFY(registerNativesString == QStringLiteral("From Java (named): Qt"));
+ }
+
+ // Static class member as callback
+ {
+ QVERIFY(env.registerNativeMethods(javaTestClass, {
+ Q_JNI_NATIVE_SCOPED_METHOD(memberCallbackFromJava, CallbackClass)
+ }));
+
+ QJniObject::callStaticMethod<void>(javaTestClass,
+ "memberAppendJavaToString",
+ "(Ljava/lang/String;)V",
+ QtString.object<jstring>());
+ QTest::qWait(200);
+ QVERIFY(registerNativesString == QStringLiteral("From Java (member): Qt"));
+ }
+
+ // Static named class member as callback
+ {
+ QVERIFY(env.registerNativeMethods(javaTestClass, {
+ Q_JNI_NATIVE_SCOPED_METHOD(tediouslyLongNamed_memberCallbackFromJava,
+ CallbackClass)
+ }));
+
+ QJniObject::callStaticMethod<void>(javaTestClass,
+ "namedMemberAppendJavaToString",
+ "(Ljava/lang/String;)V",
+ QtString.object<jstring>());
+ QTest::qWait(200);
+ QVERIFY(registerNativesString == QStringLiteral("From Java (named member): Qt"));
+ }
+
+ // Function generally just in namespace as callback
+ {
+ QVERIFY(env.registerNativeMethods(javaTestClass, {
+ Q_JNI_NATIVE_SCOPED_METHOD(namespaceCallbackFromJava, CallbackNamespace)
+ }));
+
+ QJniObject::callStaticMethod<void>(javaTestClass,
+ "namespaceAppendJavaToString",
+ "(Ljava/lang/String;)V",
+ QtString.object<jstring>());
+ QTest::qWait(200);
+ QVERIFY(registerNativesString == QStringLiteral("From Java (namespace): Qt"));
+ }
+
// No default constructor in class
{
QVERIFY(env.registerNativeMethods(javaTestClassNoCtor, {
diff --git a/tests/auto/corelib/kernel/qjniobject/CMakeLists.txt b/tests/auto/corelib/kernel/qjniobject/CMakeLists.txt
index b0f5d0b640..2b07f2e50c 100644
--- a/tests/auto/corelib/kernel/qjniobject/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qjniobject/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## tst_qjniobject Test:
#####################################################################
diff --git a/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp b/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp
index e57785c5c5..7ea6b1e121 100644
--- a/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp
+++ b/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp
@@ -9,6 +9,7 @@
#include <QtTest>
static const char testClassName[] = "org/qtproject/qt/android/testdatapackage/QtJniObjectTestClass";
+Q_DECLARE_JNI_CLASS(QtJniObjectTestClass, testClassName)
static const jbyte A_BYTE_VALUE = 127;
static const jshort A_SHORT_VALUE = 32767;
@@ -1035,6 +1036,12 @@ void setStaticField(const char *fieldName, T testValue)
T res = QJniObject::getStaticField<T>(testClassName, fieldName);
QCOMPARE(res, testValue);
+
+ // use template overload to reset to default
+ T defaultValue = {};
+ QJniObject::setStaticField<QtJniTypes::QtJniObjectTestClass, T>(fieldName, defaultValue);
+ res = QJniObject::getStaticField<QtJniTypes::QtJniObjectTestClass, T>(fieldName);
+ QCOMPARE(res, defaultValue);
}
void tst_QJniObject::setStaticIntField()
diff --git a/tests/auto/corelib/kernel/qjnitypes/CMakeLists.txt b/tests/auto/corelib/kernel/qjnitypes/CMakeLists.txt
index 8184e91a11..d3aef183a0 100644
--- a/tests/auto/corelib/kernel/qjnitypes/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qjnitypes/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
qt_internal_add_test(tst_qjnitypes
SOURCES
tst_qjnitypes.cpp
diff --git a/tests/auto/corelib/kernel/qmath/CMakeLists.txt b/tests/auto/corelib/kernel/qmath/CMakeLists.txt
index 7a6d4bd688..e0c9ef6b78 100644
--- a/tests/auto/corelib/kernel/qmath/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmath/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qmath.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt b/tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt
index 79bb6a9324..0e55db4ce6 100644
--- a/tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qmetacontainer.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qmetacontainer
SOURCES
tst_qmetacontainer.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
index daee210588..3f5bf4967f 100644
--- a/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qmetaenum.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
index 6ab3f143ac..979b578ce7 100644
--- a/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qmetamethod.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
index 2b8ef8358d..4cc15159e7 100644
--- a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
+++ b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
@@ -32,6 +32,9 @@ private slots:
void parameterTypeName();
void isConst();
+
+ void methodIndexes_data();
+ void methodIndexes();
};
struct CustomType { };
@@ -862,6 +865,42 @@ void tst_QMetaMethod::isConst()
}
}
+void tst_QMetaMethod::methodIndexes_data()
+{
+ QTest::addColumn<QByteArray>("signature");
+ QTest::addColumn<QMetaMethod::MethodType>("methodType");
+
+ QTest::newRow("constructor1") << QByteArray("MethodTestObject()") << QMetaMethod::Constructor;
+ QTest::newRow("constructor5") << QByteArray("MethodTestObject(CustomUnregisteredType)")
+ << QMetaMethod::Constructor;
+ QTest::newRow("method0") << QByteArray("voidInvokable()") << QMetaMethod::Method;
+ QTest::newRow("method6") << QByteArray("boolInvokable()") << QMetaMethod::Method;
+}
+
+void tst_QMetaMethod::methodIndexes()
+{
+ QFETCH(QByteArray, signature);
+ QFETCH(QMetaMethod::MethodType, methodType);
+
+ const bool isConstructor = methodType == QMetaMethod::Constructor;
+
+ // roundtrip: index = QMetaObject::indexOfConstructor/Method()
+ // <-> method = QMetaObject::constructor/method()
+ // <-> indexThatShouldBeEqualToAboveIndex = QMetaMethod::methodIndex()
+
+ const QMetaObject *mo = &MethodTestObject::staticMetaObject;
+ const int index =
+ isConstructor ? mo->indexOfConstructor(signature) : mo->indexOfMethod(signature);
+ QVERIFY(index != -1);
+
+ QMetaMethod methodFromMetaObject =
+ mo->method(index); // should work on all methods (constructors, signals, ...)
+ const int absoluteMethodIndex =
+ methodFromMetaObject
+ .methodIndex(); // should work on all methods (constructors, signals, ...)
+
+ QCOMPARE(absoluteMethodIndex, index);
+}
QTEST_MAIN(tst_QMetaMethod)
#include "tst_qmetamethod.moc"
diff --git a/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
index d0736f418d..53338d35b5 100644
--- a/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
@@ -1,3 +1,12 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+set(tst_qmetaobject_SOURCES
+ tst_qmetaobject.cpp
+ forwarddeclared.h
+ forwarddeclared.cpp
+)
+
# Generated from qmetaobject.pro.
#####################################################################
@@ -6,10 +15,17 @@
qt_internal_add_test(tst_qmetaobject
SOURCES
- tst_qmetaobject.cpp
- PUBLIC_LIBRARIES
+ ${tst_qmetaobject_SOURCES}
+ LIBRARIES
Qt::CorePrivate
)
-## Scopes:
-#####################################################################
+qt_internal_add_test(tst_qmetaobject_compat
+ SOURCES
+ ${tst_qmetaobject_SOURCES}
+ DEFINES
+ USE_COMPAT_Q_ARG=1
+ LIBRARIES
+ Qt::CorePrivate
+ NO_BATCH
+)
diff --git a/tests/auto/corelib/kernel/qmetaobject/forwarddeclared.cpp b/tests/auto/corelib/kernel/qmetaobject/forwarddeclared.cpp
new file mode 100644
index 0000000000..8772bc4e61
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaobject/forwarddeclared.cpp
@@ -0,0 +1,17 @@
+// Copyright (C) 2022 Intel Corporation.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "forwarddeclared.h"
+
+struct MyForwardDeclaredType { };
+static MyForwardDeclaredType t;
+
+const MyForwardDeclaredType &getForwardDeclaredType() noexcept
+{
+ return t;
+}
+
+MyForwardDeclaredType *getForwardDeclaredPointer() noexcept
+{
+ return &t;
+}
diff --git a/tests/auto/corelib/kernel/qmetaobject/forwarddeclared.h b/tests/auto/corelib/kernel/qmetaobject/forwarddeclared.h
new file mode 100644
index 0000000000..89fb0839c1
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaobject/forwarddeclared.h
@@ -0,0 +1,12 @@
+// Copyright (C) 2022 Intel Corporation.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef FORWARDDECLARED_H
+#define FORWARDDECLARED_H
+
+struct MyForwardDeclaredType; // and ONLY forward-declared
+
+const MyForwardDeclaredType &getForwardDeclaredType() noexcept;
+MyForwardDeclaredType *getForwardDeclaredPointer() noexcept;
+
+#endif // FORWARDDECLARED_H
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 3b2066ba5d..bdcab06078 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -12,6 +12,25 @@
Q_DECLARE_METATYPE(const QMetaObject *)
+#include "forwarddeclared.h"
+
+#ifdef USE_COMPAT_Q_ARG
+# define tst_QMetaObject tst_QMetaObject_CompatQArg
+# if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
+# error "This is a Qt 6 compatibility check test"
+# endif
+
+# undef Q_ARG
+# undef Q_RETURN_ARG
+# define Q_ARG(type, data) QArgument<type >(#type, data)
+# define Q_RETURN_ARG(type, data) QReturnArgument<type >(#type, data)
+# define Q_NO_ARG , QGenericArgument()
+#else
+// This macro is used to force the overload selection to the compat
+// (non-variadic) code above
+# define Q_NO_ARG
+#endif
+
struct MyStruct
{
int i;
@@ -215,8 +234,7 @@ namespace MyNamespace {
int m_value2 = 0;
int m_value3 = 0;
};
-}
-
+} // namespace MyNamespace
class tst_QMetaObject : public QObject
{
@@ -265,16 +283,22 @@ public:
QList<QVariant> value4;
QVariantList value5;
+ tst_QMetaObject();
+
private slots:
void connectSlotsByName();
void invokeMetaMember();
+ void invokeMetaMemberNoMacros();
void invokePointer();
void invokeQueuedMetaMember();
+ void invokeQueuedMetaMemberNoMacro();
void invokeQueuedPointer();
void invokeBlockingQueuedMetaMember();
+ void invokeBlockingQueuedMetaMemberNoMacros();
void invokeBlockingQueuedPointer();
void invokeCustomTypes();
void invokeMetaConstructor();
+ void invokeMetaConstructorNoMacro();
void invokeTypedefTypes();
void invokeException();
void invokeQueuedAutoRegister();
@@ -296,6 +320,7 @@ private slots:
void classInfo();
void metaMethod();
+ void metaMethodNoMacro();
void indexOfMethod_data();
void indexOfMethod();
@@ -401,6 +426,11 @@ private slots:
#define FUNCTION(x) "QMetaObject::" x ": "
+tst_QMetaObject::tst_QMetaObject()
+{
+ qRegisterMetaType<qlonglong *>();
+}
+
void tst_QMetaObject::connectSlotsByName()
{
CTestObject obj;
@@ -435,8 +465,6 @@ void tst_QMetaObject::connectSlotsByName()
QCOMPARE(obj2.invokeCount2, 1);
}
-struct MyUnregisteredType { };
-
static int countedStructObjectsCount = 0;
struct CountedStruct
{
@@ -459,6 +487,8 @@ public:
QtTestObject();
QtTestObject(const QString &s) : slotResult(s) {}
Q_INVOKABLE QtTestObject(QObject *parent);
+ Q_INVOKABLE QtTestObject(QObject *parent, int, int);
+ Q_INVOKABLE QtTestObject(QObject *parent, int);
public slots:
void sl0();
@@ -479,17 +509,22 @@ public slots:
const char *sl12();
QList<QString> sl13(QList<QString> l1);
qint64 sl14();
- void testSender();
+ qlonglong *sl15(qlonglong *);
+ MyForwardDeclaredType *sl16(MyForwardDeclaredType *);
- void testReference(QString &str);
+ void overloadedSlot();
+ void overloadedSlot(int, int);
+ void overloadedSlot(int);
+ void testSender();
+ void testReference(QString &str);
void testLongLong(qint64 ll1, quint64 ll2);
void moveToThread(QThread *t)
{ QObject::moveToThread(t); }
- void slotWithUnregisteredParameterType(MyUnregisteredType);
- void slotWithOneUnregisteredParameterType(QString a1, MyUnregisteredType a2);
+ void slotWithUnregisteredParameterType(const MyForwardDeclaredType &);
+ void slotWithOneUnregisteredParameterType(QString a1, const MyForwardDeclaredType &a2);
CountedStruct throwingSlot(const CountedStruct &, CountedStruct s2) {
#ifndef QT_NO_EXCEPTIONS
@@ -540,6 +575,14 @@ QtTestObject::QtTestObject(QObject *parent)
{
}
+QtTestObject::QtTestObject(QObject *parent, int, int)
+ : QObject(parent)
+{ slotResult = "ii"; }
+
+QtTestObject::QtTestObject(QObject *parent, int)
+ : QObject(parent)
+{ slotResult = "i"; }
+
void QtTestObject::sl0() { slotResult = "sl0"; };
QString QtTestObject::sl1(QString s1) { slotResult = "sl1:" + s1; return "yessir"; }
void QtTestObject::sl2(QString s1, QString s2) { slotResult = "sl2:" + s1 + s2; }
@@ -572,6 +615,27 @@ QList<QString> QtTestObject::sl13(QList<QString> l1)
{ slotResult = "sl13"; return l1; }
qint64 QtTestObject::sl14()
{ slotResult = "sl14"; return Q_INT64_C(123456789)*123456789; }
+qlonglong *QtTestObject::sl15(qlonglong *ptr)
+{ slotResult = "sl15"; return ptr; }
+MyForwardDeclaredType *QtTestObject::sl16(MyForwardDeclaredType *ptr)
+{
+ slotResult = "sl16:";
+ if (ptr) {
+ slotResult += "notnull";
+ return nullptr;
+ }
+ slotResult += "null";
+ return getForwardDeclaredPointer();
+}
+
+void QtTestObject::overloadedSlot()
+{ slotResult = "overloadedSlot"; }
+
+void QtTestObject::overloadedSlot(int x, int y)
+{ slotResult = "overloadedSlot:" + QString::number(x) + ',' + QString::number(y); }
+
+void QtTestObject::overloadedSlot(int x)
+{ slotResult = "overloadedSlot:" + QString::number(x); }
void QtTestObject::testReference(QString &str)
{ slotResult = "testReference:" + str; str = "gotcha"; }
@@ -584,10 +648,10 @@ void QtTestObject::testSender()
slotResult = QString::asprintf("%p", sender());
}
-void QtTestObject::slotWithUnregisteredParameterType(MyUnregisteredType)
+void QtTestObject::slotWithUnregisteredParameterType(const MyForwardDeclaredType &)
{ slotResult = "slotWithUnregisteredReturnType"; }
-void QtTestObject::slotWithOneUnregisteredParameterType(QString a1, MyUnregisteredType)
+void QtTestObject::slotWithOneUnregisteredParameterType(QString a1, const MyForwardDeclaredType &)
{ slotResult = "slotWithUnregisteredReturnType-" + a1; }
void QtTestObject::staticFunction0()
@@ -598,6 +662,7 @@ void QtTestObject::staticFunction0()
qint64 QtTestObject::staticFunction1()
{ staticResult = "staticFunction1"; return Q_INT64_C(123456789)*123456789; }
+// this test is duplicated below
void tst_QMetaObject::invokeMetaMember()
{
QtTestObject obj;
@@ -608,17 +673,17 @@ void tst_QMetaObject::invokeMetaMember()
// Test nullptr
char *nullCharArray = nullptr;
const char *nullConstCharArray = nullptr;
- QVERIFY(!QMetaObject::invokeMethod(nullptr, nullCharArray));
- QVERIFY(!QMetaObject::invokeMethod(nullptr, nullConstCharArray));
- QVERIFY(!QMetaObject::invokeMethod(nullptr, "sl0"));
- QVERIFY(!QMetaObject::invokeMethod(&obj, nullCharArray));
- QVERIFY(!QMetaObject::invokeMethod(&obj, nullConstCharArray));
- QVERIFY(!QMetaObject::invokeMethod(&obj, nullCharArray, Qt::AutoConnection));
- QVERIFY(!QMetaObject::invokeMethod(&obj, nullConstCharArray, Qt::AutoConnection));
+ QVERIFY(!QMetaObject::invokeMethod(nullptr, nullCharArray Q_NO_ARG));
+ QVERIFY(!QMetaObject::invokeMethod(nullptr, nullConstCharArray Q_NO_ARG));
+ QVERIFY(!QMetaObject::invokeMethod(nullptr, "sl0" Q_NO_ARG));
+ QVERIFY(!QMetaObject::invokeMethod(&obj, nullCharArray Q_NO_ARG));
+ QVERIFY(!QMetaObject::invokeMethod(&obj, nullConstCharArray Q_NO_ARG));
+ QVERIFY(!QMetaObject::invokeMethod(&obj, nullCharArray, Qt::AutoConnection Q_NO_ARG));
+ QVERIFY(!QMetaObject::invokeMethod(&obj, nullConstCharArray, Qt::AutoConnection Q_NO_ARG));
QVERIFY(!QMetaObject::invokeMethod(&obj, nullCharArray, Qt::AutoConnection, QGenericReturnArgument()));
QVERIFY(!QMetaObject::invokeMethod(&obj, nullConstCharArray, Qt::AutoConnection, QGenericReturnArgument()));
- QVERIFY(QMetaObject::invokeMethod(&obj, "sl0"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl0" Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("sl0"));
QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", Q_ARG(QString, t1)));
@@ -657,16 +722,23 @@ void tst_QMetaObject::invokeMetaMember()
Q_ARG(QString, t7), Q_ARG(QString, t8), Q_ARG(QString, t9)));
QCOMPARE(obj.slotResult, QString("sl9:123456789"));
- QVERIFY(QMetaObject::invokeMethod(&obj, "sl11"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11" Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("sl11"));
- QVERIFY(QMetaObject::invokeMethod(&obj, "testSender"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "testSender" Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("0x0"));
QString refStr("whatever");
+#ifdef USE_COMPAT_Q_ARG
QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", QGenericArgument("QString&", &refStr)));
QCOMPARE(obj.slotResult, QString("testReference:whatever"));
QCOMPARE(refStr, QString("gotcha"));
+ obj.slotResult.clear();
+#endif
+ refStr = "whatever";
+ QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", Q_ARG(QString&, refStr)));
+ QCOMPARE(obj.slotResult, QString("testReference:whatever"));
+ QCOMPARE(refStr, QString("gotcha"));
qint64 ll1 = -1;
quint64 ll2 = 0;
@@ -717,8 +789,37 @@ void tst_QMetaObject::invokeMetaMember()
QCOMPARE(return64, Q_INT64_C(123456789)*123456789);
QCOMPARE(obj.slotResult, QString("sl14"));
+ // pointers
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Q_ARG(qlonglong*, &return64)));
+ QCOMPARE(obj.slotResult, QString("sl15"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Q_ARG(MyForwardDeclaredType*, getForwardDeclaredPointer())));
+ QCOMPARE(obj.slotResult, QString("sl16:notnull"));
+
+ obj.slotResult.clear();
+ qint64 *return64Ptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Q_RETURN_ARG(qlonglong*, return64Ptr), Q_ARG(qlonglong*, &return64)));
+ QCOMPARE(return64Ptr, &return64);
+ QCOMPARE(obj.slotResult, QString("sl15"));
+
+ obj.slotResult.clear();
+ MyForwardDeclaredType *forwardPtr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Q_RETURN_ARG(MyForwardDeclaredType*, forwardPtr),
+ Q_ARG(MyForwardDeclaredType*, nullptr)));
+ QCOMPARE(forwardPtr, getForwardDeclaredPointer());
+ QCOMPARE(obj.slotResult, QString("sl16:null"));
+
+#ifndef QT_NO_DATA_RELOCATION // this doesn't work with the new API on Windows
+#endif
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot" Q_NO_ARG));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Q_ARG(int, 1)));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Q_ARG(int, 1), Q_ARG(int, 42)));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1,42"));
+
//test signals
- QVERIFY(QMetaObject::invokeMethod(&obj, "sig0"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig0" Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("sl0"));
QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Q_ARG(QString, "baba")));
@@ -739,6 +840,175 @@ void tst_QMetaObject::invokeMetaMember()
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)\n"
"Candidates are:\n sl1(QString)");
QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", Q_ARG(QString, "arg"), Q_ARG(QString, "arg"), Q_ARG(QString, "arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::testReference(QString)\n"
+ "Candidates are:\n testReference(QString&)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", Q_ARG(QString, exp)));
+
+ //should not have changed since last test.
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:hehe"));
+}
+
+// this is a copy-paste-adapt of the above
+void tst_QMetaObject::invokeMetaMemberNoMacros()
+{
+ QtTestObject obj;
+
+ QString t1("1"); QString t2("2"); QString t3("3"); QString t4("4"); QString t5("5");
+ QString t6("6"); QString t7("7"); QString t8("8"); QString t9("9"); QString t10("X");
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl0"));
+ QCOMPARE(obj.slotResult, QString("sl0"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", t1));
+ QCOMPARE(obj.slotResult, QString("sl1:1"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl2", qAsConst(t1), t2));
+ QCOMPARE(obj.slotResult, QString("sl2:12"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl3", t1, t2, t3));
+ QCOMPARE(obj.slotResult, QString("sl3:123"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl4", t1, t2, t3,
+ t4));
+ QCOMPARE(obj.slotResult, QString("sl4:1234"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl5", t1, t2, t3,
+ t4, QStringLiteral("5")));
+ QCOMPARE(obj.slotResult, QString("sl5:12345"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl6", t1, t2, t3,
+ t4, t5, t6));
+ QCOMPARE(obj.slotResult, QString("sl6:123456"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl7", t1, t2, t3,
+ t4, t5, t6,
+ t7));
+ QCOMPARE(obj.slotResult, QString("sl7:1234567"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl8", t1, t2, t3,
+ t4, t5, t6,
+ t7, t8));
+ QCOMPARE(obj.slotResult, QString("sl8:12345678"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl9", t1, t2, t3,
+ t4, t5, t6,
+ t7, t8, t9));
+ QCOMPARE(obj.slotResult, QString("sl9:123456789"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11"));
+ QCOMPARE(obj.slotResult, QString("sl11"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "testSender"));
+ QCOMPARE(obj.slotResult, QString("0x0"));
+
+ // this is not working for now
+// QString refStr("whatever");
+// QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", refStr));
+// QCOMPARE(obj.slotResult, QString("testReference:whatever"));
+// QCOMPARE(refStr, QString("gotcha"));
+
+ qint64 ll1 = -1;
+ quint64 ll2 = 0;
+ QVERIFY(QMetaObject::invokeMethod(&obj,
+ "testLongLong",
+ ll1,
+ ll2));
+ QCOMPARE(obj.slotResult, QString("testLongLong:-1,0"));
+
+ QString exp;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", qReturnArg(exp), QStringLiteral("bubu")));
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:bubu"));
+
+ QObject *ptr = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", qReturnArg(ptr)));
+ QCOMPARE(ptr, (QObject *)&obj);
+ QCOMPARE(obj.slotResult, QString("sl11"));
+ // try again with a space:
+ ptr = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", qReturnArg(ptr)));
+ QCOMPARE(ptr, (QObject *)&obj);
+ QCOMPARE(obj.slotResult, QString("sl11"));
+
+ const char *ptr2 = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl12", qReturnArg(ptr2)));
+ QVERIFY(ptr2 != nullptr);
+ QCOMPARE(obj.slotResult, QString("sl12"));
+ // try again with a space:
+ ptr2 = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl12", qReturnArg(ptr2)));
+ QVERIFY(ptr2 != nullptr);
+ QCOMPARE(obj.slotResult, QString("sl12"));
+
+ // test w/ template args
+ QList<QString> returnValue, argument;
+ argument << QString("one") << QString("two") << QString("three");
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl13",
+ qReturnArg(returnValue),
+ argument));
+ QCOMPARE(returnValue, argument);
+ QCOMPARE(obj.slotResult, QString("sl13"));
+
+ // return qint64
+ qint64 return64;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl14",
+ qReturnArg(return64)));
+ QCOMPARE(return64, Q_INT64_C(123456789)*123456789);
+ QCOMPARE(obj.slotResult, QString("sl14"));
+
+ // pointers
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", &return64));
+ QCOMPARE(obj.slotResult, QString("sl15"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", getForwardDeclaredPointer()));
+ QCOMPARE(obj.slotResult, QString("sl16:notnull"));
+
+ obj.slotResult.clear();
+ qint64 *return64Ptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", qReturnArg(return64Ptr), &return64));
+ QCOMPARE(return64Ptr, &return64);
+ QCOMPARE(obj.slotResult, QString("sl15"));
+
+ obj.slotResult.clear();
+ MyForwardDeclaredType *forwardPtr = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", qReturnArg(forwardPtr),
+ forwardPtr));
+ QCOMPARE(forwardPtr, getForwardDeclaredPointer());
+ QCOMPARE(obj.slotResult, QString("sl16:null"));
+
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot"));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", 1));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", 1, 42));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1,42"));
+
+ //test signals
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig0"));
+ QCOMPARE(obj.slotResult, QString("sl0"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", QStringLiteral("baba")));
+ QCOMPARE(obj.slotResult, QString("sl1:baba"));
+
+ exp.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", qReturnArg(exp), QStringLiteral("hehe")));
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:hehe"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::doesNotExist()");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist"));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString)(QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1(QString)", QStringLiteral("arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl3(QString)\n"
+ "Candidates are:\n sl3(QString,QString,QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl3", QStringLiteral("arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)\n"
+ "Candidates are:\n sl1(QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", QStringLiteral("arg"), QStringLiteral("arg"), QStringLiteral("arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::testReference(QString)\n"
+ "Candidates are:\n testReference(QString&)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", exp));
//should not have changed since last test.
QCOMPARE(exp, QString("yessir"));
@@ -815,7 +1085,7 @@ void tst_QMetaObject::invokeQueuedMetaMember()
{
QtTestObject obj;
- QVERIFY(QMetaObject::invokeMethod(&obj, "sl0", Qt::QueuedConnection));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl0", Qt::QueuedConnection Q_NO_ARG));
QVERIFY(obj.slotResult.isEmpty());
qApp->processEvents(QEventLoop::AllEvents);
QCOMPARE(obj.slotResult, QString("sl0"));
@@ -835,10 +1105,36 @@ void tst_QMetaObject::invokeQueuedMetaMember()
qApp->processEvents(QEventLoop::AllEvents);
QCOMPARE(obj.slotResult, QString("sl9:123456789"));
+ // pointers
+ qint64 return64;
+ obj.slotResult.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Qt::QueuedConnection, Q_ARG(qlonglong*, &return64)));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl15"));
+
+ // since Qt 6.5, this works even for pointers to forward-declared types
+ obj.slotResult.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Qt::QueuedConnection, Q_ARG(MyForwardDeclaredType*, getForwardDeclaredPointer())));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl16:notnull"));
+
+#ifndef QT_NO_DATA_RELOCATION // this doesn't work with the new API on Windows
+#endif
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::QueuedConnection Q_NO_ARG));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("overloadedSlot"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::QueuedConnection, Q_ARG(int, 1)));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::QueuedConnection, Q_ARG(int, 1), Q_ARG(int, 42)));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1,42"));
+
// signals
obj.slotResult.clear();
- QVERIFY(QMetaObject::invokeMethod(&obj, "sig0", Qt::QueuedConnection));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig0", Qt::QueuedConnection Q_NO_ARG));
QVERIFY(obj.slotResult.isEmpty());
qApp->processEvents(QEventLoop::AllEvents);
QCOMPARE(obj.slotResult, QString("sl0"));
@@ -862,23 +1158,142 @@ void tst_QMetaObject::invokeQueuedMetaMember()
qApp->processEvents(QEventLoop::AllEvents);
QCOMPARE(obj.slotResult, QString("testLongLong:-1,0"));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::testReference(QString)\n"
+ "Candidates are:\n testReference(QString&)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", Qt::QueuedConnection, Q_ARG(QString, exp)));
+
+ QString refStr = "whatever";
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'QString&'");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", Qt::QueuedConnection, Q_ARG(QString&, refStr)));
+ QCOMPARE(refStr, "whatever");
+
+#ifdef USE_COMPAT_Q_ARG // this doesn't compile with the new API
+ obj.slotResult.clear();
+ {
+ const MyForwardDeclaredType &t = getForwardDeclaredType();
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyForwardDeclaredType'");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "slotWithUnregisteredParameterType", Qt::QueuedConnection, Q_ARG(MyForwardDeclaredType, t)));
+ QVERIFY(obj.slotResult.isEmpty());
+ }
+
+ obj.slotResult.clear();
+ {
+ QString a1("Cannot happen");
+ const MyForwardDeclaredType &t = getForwardDeclaredType();
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyForwardDeclaredType'");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "slotWithOneUnregisteredParameterType", Qt::QueuedConnection,
+ Q_ARG(QString, a1), Q_ARG(MyForwardDeclaredType, t)));
+ QVERIFY(obj.slotResult.isEmpty());
+ }
+#endif
+}
+
+// this is a copy-paste-adapt of the above
+void tst_QMetaObject::invokeQueuedMetaMemberNoMacro()
+{
+ QtTestObject obj;
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl0", Qt::QueuedConnection));
+ QVERIFY(obj.slotResult.isEmpty());
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl0"));
+ obj.slotResult = QString();
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", Qt::QueuedConnection, QString("hallo")));
+ QVERIFY(obj.slotResult.isEmpty());
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl1:hallo"));
+ obj.slotResult = QString();
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl9", Qt::QueuedConnection, QStringLiteral("1"), QStringLiteral("2"),
+ QStringLiteral("3"), QStringLiteral("4"), QStringLiteral("5"),
+ QStringLiteral("6"), QStringLiteral("7"), QStringLiteral("8"),
+ QStringLiteral("9")));
+ QVERIFY(obj.slotResult.isEmpty());
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl9:123456789"));
+
+ // pointers
+ qint64 return64;
+ obj.slotResult.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Qt::QueuedConnection, &return64));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl15"));
+
+ obj.slotResult.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Qt::QueuedConnection, getForwardDeclaredPointer()));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl16:notnull"));
+
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::QueuedConnection));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("overloadedSlot"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::QueuedConnection, 1));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::QueuedConnection, 1, 42));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1,42"));
+
+ // signals
+
+ obj.slotResult.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig0", Qt::QueuedConnection));
+ QVERIFY(obj.slotResult.isEmpty());
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl0"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Qt::QueuedConnection, QStringLiteral("gogo")));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("sl1:gogo"));
+
+ QString exp;
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to invoke methods with return values in queued connections");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sig1", Qt::QueuedConnection, qReturnArg(exp),
+ QStringLiteral("nono")));
+
+ qint64 ll1 = -1;
+ quint64 ll2 = 0;
+ QVERIFY(QMetaObject::invokeMethod(&obj,
+ "testLongLong",
+ Qt::QueuedConnection,
+ ll1,
+ ll2));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult, QString("testLongLong:-1,0"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::testReference(QString)\n"
+ "Candidates are:\n testReference(QString&)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", exp));
+ QCOMPARE(obj.slotResult, QString("testLongLong:-1,0"));
+ QVERIFY(exp.isEmpty());
+
+ // this doesn't work yet
+// QString refStr = "whatever";
+// QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'QString&'");
+// QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", Qt::QueuedConnection, Q_ARG(QString&, refStr)));
+// QCOMPARE(refStr, "whatever");
+
+#if 0 // this won't even compile any more
obj.slotResult.clear();
{
- MyUnregisteredType t;
- QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyUnregisteredType'");
- QVERIFY(!QMetaObject::invokeMethod(&obj, "slotWithUnregisteredParameterType", Qt::QueuedConnection, Q_ARG(MyUnregisteredType, t)));
+ const MyForwardDeclaredType &t = getForwardDeclaredType();
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyForwardDeclaredType'");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "slotWithUnregisteredParameterType", Qt::QueuedConnection, t));
QVERIFY(obj.slotResult.isEmpty());
}
obj.slotResult.clear();
{
QString a1("Cannot happen");
- MyUnregisteredType t;
- QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyUnregisteredType'");
+ const MyForwardDeclaredType &t = getForwardDeclaredType();
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyForwardDeclaredType'");
QVERIFY(!QMetaObject::invokeMethod(&obj, "slotWithOneUnregisteredParameterType", Qt::QueuedConnection,
- Q_ARG(QString, a1), Q_ARG(MyUnregisteredType, t)));
+ a1, t));
QVERIFY(obj.slotResult.isEmpty());
}
+#endif
}
void tst_QMetaObject::invokeQueuedPointer()
@@ -930,7 +1345,7 @@ void tst_QMetaObject::invokeQueuedPointer()
QCOMPARE(countedStructObjectsCount, 0);
}
-
+// this test is duplicated below
void tst_QMetaObject::invokeBlockingQueuedMetaMember()
{
QThread t;
@@ -977,16 +1392,23 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
Q_ARG(QString, t7), Q_ARG(QString, t8), Q_ARG(QString, t9)));
QCOMPARE(obj.slotResult, QString("sl9:123456789"));
- QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", Qt::BlockingQueuedConnection));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", Qt::BlockingQueuedConnection Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("sl11"));
- QVERIFY(QMetaObject::invokeMethod(&obj, "testSender", Qt::BlockingQueuedConnection));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "testSender", Qt::BlockingQueuedConnection Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("0x0"));
QString refStr("whatever");
+#ifdef USE_COMPAT_Q_ARG
QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", Qt::BlockingQueuedConnection, QGenericArgument("QString&", &refStr)));
QCOMPARE(obj.slotResult, QString("testReference:whatever"));
QCOMPARE(refStr, QString("gotcha"));
+ obj.slotResult.clear();
+#endif
+ refStr = "whatever";
+ QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", Qt::BlockingQueuedConnection, Q_ARG(QString&, refStr)));
+ QCOMPARE(obj.slotResult, QString("testReference:whatever"));
+ QCOMPARE(refStr, QString("gotcha"));
qint64 ll1 = -1;
quint64 ll2 = 0;
@@ -1031,8 +1453,44 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
QCOMPARE(returnValue, argument);
QCOMPARE(obj.slotResult, QString("sl13"));
+ // return qint64
+ qint64 return64;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl14", Qt::BlockingQueuedConnection,
+ Q_RETURN_ARG(qint64, return64)));
+ QCOMPARE(return64, Q_INT64_C(123456789)*123456789);
+ QCOMPARE(obj.slotResult, QString("sl14"));
+
+ // pointers
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Qt::BlockingQueuedConnection, Q_ARG(qlonglong*, &return64)));
+ QCOMPARE(obj.slotResult, QString("sl15"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Qt::BlockingQueuedConnection, Q_ARG(MyForwardDeclaredType*, getForwardDeclaredPointer())));
+ QCOMPARE(obj.slotResult, QString("sl16:notnull"));
+
+ obj.slotResult.clear();
+ qint64 *return64Ptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Qt::BlockingQueuedConnection, Q_RETURN_ARG(qlonglong*, return64Ptr), Q_ARG(qlonglong*, &return64)));
+ QCOMPARE(return64Ptr, &return64);
+ QCOMPARE(obj.slotResult, QString("sl15"));
+
+ obj.slotResult.clear();
+ MyForwardDeclaredType *forwardPtr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Qt::BlockingQueuedConnection, Q_RETURN_ARG(MyForwardDeclaredType*, forwardPtr),
+ Q_ARG(MyForwardDeclaredType*, nullptr)));
+ QCOMPARE(forwardPtr, getForwardDeclaredPointer());
+ QCOMPARE(obj.slotResult, QString("sl16:null"));
+
+#ifndef QT_NO_DATA_RELOCATION // this doesn't work with the new API on Windows
+#endif
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection Q_NO_ARG));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection, Q_ARG(int, 1)));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection, Q_ARG(int, 1), Q_ARG(int, 42)));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1,42"));
+
//test signals
- QVERIFY(QMetaObject::invokeMethod(&obj, "sig0", Qt::BlockingQueuedConnection));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig0", Qt::BlockingQueuedConnection Q_NO_ARG));
QCOMPARE(obj.slotResult, QString("sl0"));
QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Qt::BlockingQueuedConnection, Q_ARG(QString, "baba")));
@@ -1044,7 +1502,7 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
QCOMPARE(obj.slotResult, QString("sl1:hehe"));
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::doesNotExist()");
- QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist", Qt::BlockingQueuedConnection));
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist", Qt::BlockingQueuedConnection Q_NO_ARG));
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString)(QString)");
QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1(QString)", Qt::BlockingQueuedConnection, Q_ARG(QString, "arg")));
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl3(QString)\n"
@@ -1053,6 +1511,9 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)\n"
"Candidates are:\n sl1(QString)");
QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", Qt::BlockingQueuedConnection, Q_ARG(QString, "arg"), Q_ARG(QString, "arg"), Q_ARG(QString, "arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::testReference(QString)\n"
+ "Candidates are:\n testReference(QString&)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", Qt::BlockingQueuedConnection, Q_ARG(QString, exp)));
//should not have changed since last test.
QCOMPARE(exp, QString("yessir"));
@@ -1061,7 +1522,177 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
QVERIFY(QMetaObject::invokeMethod(&obj, "moveToThread", Qt::BlockingQueuedConnection, Q_ARG(QThread*, QThread::currentThread())));
t.quit();
QVERIFY(t.wait());
+}
+
+// this is a copy-paste-adapt of the above
+void tst_QMetaObject::invokeBlockingQueuedMetaMemberNoMacros()
+{
+ QThread t;
+ t.start();
+ QtTestObject obj;
+ obj.moveToThread(&t);
+
+ QString t1("1"); QString t2("2"); QString t3("3"); QString t4("4"); QString t5("5");
+ QString t6("6"); QString t7("7"); QString t8("8"); QString t9("9"); QString t10("X");
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", Qt::BlockingQueuedConnection, t1));
+ QCOMPARE(obj.slotResult, QString("sl1:1"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl2", Qt::BlockingQueuedConnection, t1, t2));
+ QCOMPARE(obj.slotResult, QString("sl2:12"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl3", Qt::BlockingQueuedConnection, t1, t2, t3));
+ QCOMPARE(obj.slotResult, QString("sl3:123"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl4", Qt::BlockingQueuedConnection, t1, t2,
+ t3, t4));
+ QCOMPARE(obj.slotResult, QString("sl4:1234"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl5", Qt::BlockingQueuedConnection, t1, t2,
+ t3, t4, QStringLiteral("5")));
+ QCOMPARE(obj.slotResult, QString("sl5:12345"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl6", Qt::BlockingQueuedConnection, t1, t2,
+ t3, t4, t5, t6));
+ QCOMPARE(obj.slotResult, QString("sl6:123456"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl7", Qt::BlockingQueuedConnection, t1, t2,
+ t3, t4, t5, t6,
+ t7));
+ QCOMPARE(obj.slotResult, QString("sl7:1234567"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl8", Qt::BlockingQueuedConnection, t1, t2,
+ t3, t4, t5, t6,
+ t7, t8));
+ QCOMPARE(obj.slotResult, QString("sl8:12345678"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl9", Qt::BlockingQueuedConnection, t1, t2,
+ t3, t4, t5, t6,
+ t7, t8, t9));
+ QCOMPARE(obj.slotResult, QString("sl9:123456789"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", Qt::BlockingQueuedConnection));
+ QCOMPARE(obj.slotResult, QString("sl11"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "testSender", Qt::BlockingQueuedConnection));
+ QCOMPARE(obj.slotResult, QString("0x0"));
+
+ // this is not working
+// QString refStr("whatever");
+// QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", Qt::BlockingQueuedConnection, refStr));
+// QCOMPARE(obj.slotResult, QString("testReference:whatever"));
+// QCOMPARE(refStr, QString("gotcha"));
+
+ qint64 ll1 = -1;
+ quint64 ll2 = 0;
+ QVERIFY(QMetaObject::invokeMethod(&obj,
+ "testLongLong",
+ Qt::BlockingQueuedConnection,
+ ll1,
+ ll2));
+ QCOMPARE(obj.slotResult, QString("testLongLong:-1,0"));
+
+ QString exp;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", Qt::BlockingQueuedConnection, qReturnArg(exp), QStringLiteral("bubu")));
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:bubu"));
+
+ QObject *ptr = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", Qt::BlockingQueuedConnection, qReturnArg(ptr)));
+ QCOMPARE(ptr, (QObject *)&obj);
+ QCOMPARE(obj.slotResult, QString("sl11"));
+ // try again with a space:
+ ptr = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl11", Qt::BlockingQueuedConnection, qReturnArg(ptr)));
+ QCOMPARE(ptr, (QObject *)&obj);
+ QCOMPARE(obj.slotResult, QString("sl11"));
+
+ const char *ptr2 = 0;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl12", Qt::BlockingQueuedConnection, qReturnArg(ptr2)));
+ QVERIFY(ptr2 != 0);
+ QCOMPARE(obj.slotResult, QString("sl12"));
+ // try again with a space:
+ ptr2 = 0;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl12", Qt::BlockingQueuedConnection, qReturnArg(ptr2)));
+ QVERIFY(ptr2 != 0);
+ QCOMPARE(obj.slotResult, QString("sl12"));
+
+ // test w/ template args
+ QList<QString> returnValue, argument;
+ argument << QString("one") << QString("two") << QString("three");
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl13", Qt::BlockingQueuedConnection,
+ qReturnArg(returnValue),
+ argument));
+ QCOMPARE(returnValue, argument);
+ QCOMPARE(obj.slotResult, QString("sl13"));
+
+ // return qint64
+ qint64 return64;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl14", Qt::BlockingQueuedConnection,
+ qReturnArg(return64)));
+ QCOMPARE(return64, Q_INT64_C(123456789)*123456789);
+ QCOMPARE(obj.slotResult, QString("sl14"));
+
+ // pointers
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Qt::BlockingQueuedConnection, &return64));
+ QCOMPARE(obj.slotResult, QString("sl15"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Qt::BlockingQueuedConnection, getForwardDeclaredPointer()));
+ QCOMPARE(obj.slotResult, QString("sl16:notnull"));
+
+ obj.slotResult.clear();
+ qint64 *return64Ptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl15", Qt::BlockingQueuedConnection, qReturnArg(return64Ptr), &return64));
+ QCOMPARE(return64Ptr, &return64);
+ QCOMPARE(obj.slotResult, QString("sl15"));
+
+ obj.slotResult.clear();
+ MyForwardDeclaredType *forwardPtr = nullptr;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl16", Qt::BlockingQueuedConnection, qReturnArg(forwardPtr),
+ forwardPtr));
+ QCOMPARE(forwardPtr, getForwardDeclaredPointer());
+ QCOMPARE(obj.slotResult, QString("sl16:null"));
+
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection, 1));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection, 1, 42));
+ QCOMPARE(obj.slotResult, QString("overloadedSlot:1,42"));
+
+ //test signals
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig0", Qt::BlockingQueuedConnection));
+ QCOMPARE(obj.slotResult, QString("sl0"));
+
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Qt::BlockingQueuedConnection, QStringLiteral("baba")));
+ QCOMPARE(obj.slotResult, QString("sl1:baba"));
+
+ exp.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig1", Qt::BlockingQueuedConnection, qReturnArg(exp), QStringLiteral("hehe")));
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:hehe"));
+
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::doesNotExist()");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "doesNotExist", Qt::BlockingQueuedConnection));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString)(QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1(QString)", Qt::BlockingQueuedConnection, QStringLiteral("arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl3(QString)\n"
+ "Candidates are:\n sl3(QString,QString,QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl3", Qt::BlockingQueuedConnection, QStringLiteral("arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::sl1(QString,QString,QString)\n"
+ "Candidates are:\n sl1(QString)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl1", Qt::BlockingQueuedConnection, QStringLiteral("arg"), QStringLiteral("arg"), QStringLiteral("arg")));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::invokeMethod: No such method QtTestObject::testReference(QString)\n"
+ "Candidates are:\n testReference(QString&)");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "testReference", Qt::BlockingQueuedConnection, exp));
+
+ //should not have changed since last test.
+ QCOMPARE(exp, QString("yessir"));
+ QCOMPARE(obj.slotResult, QString("sl1:hehe"));
+ QVERIFY(QMetaObject::invokeMethod(&obj, "moveToThread", Qt::BlockingQueuedConnection, QThread::currentThread()));
+ t.quit();
+ QVERIFY(t.wait());
}
void tst_QMetaObject::invokeBlockingQueuedPointer()
@@ -1187,6 +1818,10 @@ void tst_QMetaObject::invokeCustomTypes()
QCOMPARE(obj.sum, 0);
QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", Q_ARG(MyType, tp)));
QCOMPARE(obj.sum, 3);
+
+ obj.sum = 0;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sl1", tp));
+ QCOMPARE(obj.sum, 3);
}
namespace NamespaceWithConstructibleClass
@@ -1202,13 +1837,16 @@ public:
}
+// this test is duplicated below
void tst_QMetaObject::invokeMetaConstructor()
{
const QMetaObject *mo = &QtTestObject::staticMetaObject;
+#ifdef USE_COMPAT_Q_ARG
{
- QObject *obj = mo->newInstance();
+ QObject *obj = mo->newInstance(QGenericArgument());
QVERIFY(!obj);
}
+#endif
{
QtTestObject obj;
QObject *obj2 = mo->newInstance(Q_ARG(QObject*, &obj));
@@ -1231,6 +1869,56 @@ void tst_QMetaObject::invokeMetaConstructor()
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::newInstance: type MyGadget does not inherit QObject");
QVERIFY(!MyGadget::staticMetaObject.newInstance());
}
+
+ // overloaded constructors
+ QObject parent;
+ {
+ QObject *obj = mo->newInstance(Q_ARG(QObject*, &parent));
+ QVERIFY(obj);
+ QCOMPARE(static_cast<QtTestObject*>(obj)->slotResult, "");
+ }
+ {
+ QObject *obj = mo->newInstance(Q_ARG(QObject*, &parent), Q_ARG(int, 1));
+ QVERIFY(obj);
+ QCOMPARE(static_cast<QtTestObject*>(obj)->slotResult, "i");
+ }
+ {
+ QObject *obj = mo->newInstance(Q_ARG(QObject*, &parent), Q_ARG(int, 1), Q_ARG(int, 42));
+ QVERIFY(obj);
+ QCOMPARE(static_cast<QtTestObject*>(obj)->slotResult, "ii");
+ }
+}
+
+// this is a copy-paste-adapt of the above
+void tst_QMetaObject::invokeMetaConstructorNoMacro()
+{
+ const QMetaObject *mo = &QtTestObject::staticMetaObject;
+ {
+ QObject *obj = mo->newInstance();
+ QVERIFY(!obj);
+ }
+ {
+ QtTestObject obj;
+ QObject *obj2 = mo->newInstance(static_cast<QObject *>(&obj));
+ QVERIFY(obj2 != 0);
+ QCOMPARE(obj2->parent(), (QObject*)&obj);
+ QVERIFY(qobject_cast<QtTestObject*>(obj2) != 0);
+ }
+ // class in namespace
+ const QMetaObject *nsmo = &NamespaceWithConstructibleClass::ConstructibleClass::staticMetaObject;
+ {
+ QtTestObject obj;
+ QObject *obj2 = nsmo->newInstance(static_cast<QObject *>(&obj));
+ QVERIFY(obj2 != 0);
+ QCOMPARE(obj2->parent(), (QObject*)&obj);
+ QVERIFY(qobject_cast<NamespaceWithConstructibleClass::ConstructibleClass*>(obj2) != 0);
+ }
+ // gadget shouldn't return a valid pointer
+ {
+ QCOMPARE(MyGadget::staticMetaObject.constructorCount(), 1);
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::newInstance: type MyGadget does not inherit QObject");
+ QVERIFY(!MyGadget::staticMetaObject.newInstance());
+ }
}
void tst_QMetaObject::invokeTypedefTypes()
@@ -1244,7 +1932,13 @@ void tst_QMetaObject::invokeTypedefTypes()
CustomString arg("hello");
QVERIFY(QMetaObject::invokeMethod(&obj, "sig_custom", Q_ARG(CustomString, arg)));
QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.at(0).count(), 1);
+ QCOMPARE(spy.at(0).size(), 1);
+ QCOMPARE(spy.at(0).at(0), QVariant(arg));
+
+ spy.clear();
+ QVERIFY(QMetaObject::invokeMethod(&obj, "sig_custom", arg));
+ QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.at(0).size(), 1);
QCOMPARE(spy.at(0).at(0), QVariant(arg));
}
@@ -1260,6 +1954,14 @@ void tst_QMetaObject::invokeException()
QFAIL("Did not throw");
} catch(ObjectException &) {}
QCOMPARE(countedStructObjectsCount, 0);
+
+ try {
+ CountedStruct s;
+ QVERIFY(QMetaObject::invokeMethod(&obj, "throwingSlot", qReturnArg(s),
+ s, s));
+ QFAIL("Did not throw");
+ } catch(ObjectException &) {}
+ QCOMPARE(countedStructObjectsCount, 0);
#else
QSKIP("Needs exceptions");
#endif
@@ -1281,6 +1983,18 @@ void tst_QMetaObject::invokeQueuedAutoRegister()
qApp->processEvents(QEventLoop::AllEvents);
QCOMPARE(obj.slotResult,
QString("slotWithRegistrableArgument:myShared-myShared-myShared-myShared-00"));
+
+ obj.slotResult.clear();
+ QVERIFY(QMetaObject::invokeMethod(
+ &obj, "slotWithRegistrableArgument", Qt::QueuedConnection,
+ shared.data(), QPointer<QtTestObject>(shared.data()),
+ QSharedPointer<QtTestObject>(shared), QWeakPointer<QtTestObject>(shared),
+ QList<QtTestObject *>(),
+ QList<QtTestObject *>()));
+ QVERIFY(obj.slotResult.isEmpty());
+ qApp->processEvents(QEventLoop::AllEvents);
+ QCOMPARE(obj.slotResult,
+ QString("slotWithRegistrableArgument:myShared-myShared-myShared-myShared-00"));
}
void tst_QMetaObject::normalizedSignature_data()
@@ -1614,6 +2328,7 @@ void tst_QMetaObject::classInfo()
QCOMPARE(QLatin1String(b.metaObject()->classInfo(index).value()), QLatin1String("Christopher Pike"));
}
+// this test is duplicated below
void tst_QMetaObject::metaMethod()
{
QString str("foo");
@@ -1633,9 +2348,13 @@ void tst_QMetaObject::metaMetho