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.txt22
-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.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt3
-rw-r--r--tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt3
-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_binary_resources_delayed_file/main.cpp1
-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_binary_generated/main.cpp4
-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_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/.cmake.conf2
-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/.cmake.conf2
-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.txt3
-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/qtconcurrentfiltermapgenerated/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt5
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt5
-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.txt4
-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.cpp6
-rw-r--r--tests/auto/corelib/global/qglobal/CMakeLists.txt3
-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.txt3
-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/qtendian/tst_qtendian.cpp41
-rw-r--r--tests/auto/corelib/global/qwinregistry/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/global/qxp/CMakeLists.txt1
-rw-r--r--tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp279
-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.cpp24
-rw-r--r--tests/auto/corelib/io/qdir/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qdiriterator/CMakeLists.txt5
-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.cpp6
-rw-r--r--tests/auto/corelib/io/qfileinfo/CMakeLists.txt7
-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/qiodevice/CMakeLists.txt5
-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.cpp2
-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.cpp5
-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.cpp9
-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/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/qtemporaryfile/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurl/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurlinternal/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurlquery/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp51
-rw-r--r--tests/auto/corelib/io/qurluts46/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt3
-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/qsortfilterproxymodel/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt5
-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.txt3
-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/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/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.txt15
-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.cpp206
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qmetatype/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp247
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h5
-rw-r--r--tests/auto/corelib/kernel/qmimedata/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp11
-rw-r--r--tests/auto/corelib/kernel/qobject/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qpointer/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/kernel/qproperty/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp62
-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/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/qtimer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qtranslator/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/kernel/qvariant/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp81
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt5
-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/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.txt5
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt3
-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/quuid/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/quuid/test/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt3
-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.cpp18
-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.cpp12
-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.txt9
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp22
-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.cpp31
-rw-r--r--tests/auto/corelib/text/qbytearray/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp42
-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/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.cpp5
-rw-r--r--tests/auto/corelib/text/qcollator/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt3
-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.cpp2
-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.txt7
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp40
-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/qstringapisymmetry/tst_qstringapisymmetry.cpp336
-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.txt13
-rw-r--r--tests/auto/corelib/text/qstringconverter/euc_kr.txt1
-rw-r--r--tests/auto/corelib/text/qstringconverter/tst_qstringconverter.cpp373
-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/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/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.cpp2
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt3
-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.cpp12
-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/qpromise/tst_qpromise.cpp20
-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.cpp125
-rw-r--r--tests/auto/corelib/thread/qthreadonce/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/thread/qthreadpool/BLACKLIST4
-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/qdatetime/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp13
-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/tools/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/tools/collections/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp12
-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.txt9
-rw-r--r--tests/auto/corelib/tools/qatomicscopedvaluerollback/tst_qatomicscopedvaluerollback.cpp157
-rw-r--r--tests/auto/corelib/tools/qbitarray/CMakeLists.txt3
-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.txt7
-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/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/qhashfunctions/CMakeLists.txt3
-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.cpp6
-rw-r--r--tests/auto/corelib/tools/qmacautoreleasepool/CMakeLists.txt5
-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/qmargins/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt3
-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/qringbuffer/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt3
-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/qsharedpointer/CMakeLists.txt5
-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/qtimeline/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt3
-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/BLACKLIST2
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt5
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt3
-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/qdbusconnection/CMakeLists.txt5
-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.cpp7
-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/qdbusmarshall/CMakeLists.txt7
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt5
-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/qdbusxmlparser/CMakeLists.txt5
-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.cpp23
-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/qimagewriter/CMakeLists.txt5
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp2
-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/qstandarditem/CMakeLists.txt5
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/CMakeLists.txt5
-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/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/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.cpp8
-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.txt5
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp9
-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.cpp58
-rw-r--r--tests/auto/gui/kernel/qinputdevice/CMakeLists.txt5
-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_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.cpp12
-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/CMakeLists.txt5
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp17
-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.cpp120
-rw-r--r--tests/auto/gui/math3d/CMakeLists.txt3
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt5
-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.txt6
-rw-r--r--tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp199
-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/qpainterpath/BLACKLIST2
-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.cpp16
-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/tst_qrhi.cpp49
-rw-r--r--tests/auto/gui/rhi/qshader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/rhi/qshader/tst_qshader.cpp11
-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/qcssparser/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qfont/BLACKLIST2
-rw-r--r--tests/auto/gui/text/qfont/CMakeLists.txt7
-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/BLACKLIST1
-rw-r--r--tests/auto/gui/text/qglyphrun/CMakeLists.txt5
-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/qtextblock/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextcursor/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocument/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp41
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt7
-rw-r--r--tests/auto/gui/text/qtextformat/CMakeLists.txt5
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp10
-rw-r--r--tests/auto/gui/text/qtextlayout/CMakeLists.txt5
-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/qtextmarkdownwriter/data/blockquotes.md3
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/example.md2
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/data/links.md3
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp3
-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/qtextpiecetable/CMakeLists.txt5
-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/qzip/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/CMakeLists.txt3
-rw-r--r--tests/auto/gui/util/qdesktopservices/CMakeLists.txt5
-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/qtexturefilereader/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundogroup/CMakeLists.txt5
-rw-r--r--tests/auto/gui/util/qundostack/CMakeLists.txt5
-rw-r--r--tests/auto/network/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/CMakeLists.txt4
-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.cpp10
-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.txt14
-rw-r--r--tests/auto/network/access/qhttpheaderparser/tst_qhttpheaderparser.cpp94
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp53
-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/qnetworkcookiejar/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/CMakeLists.txt5
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST28
-rw-r--r--tests/auto/network/access/qnetworkreply/CMakeLists.txt3
-rw-r--r--tests/auto/network/access/qnetworkreply/certs/qt-test-server-cacert.pem30
-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.txt5
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp1
-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/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/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/qlocalsocket/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qlocalsocket/socketprocess/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qsctpsocket/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qtcpserver/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/CMakeLists.txt5
-rw-r--r--tests/auto/network/socket/qtcpserver/test/CMakeLists.txt11
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp77
-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/qudpsocket/BLACKLIST2
-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/udpServer/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/CMakeLists.txt4
-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/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/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.cpp54
-rw-r--r--tests/auto/network/ssl/qsslserver/CMakeLists.txt22
-rw-r--r--tests/auto/network/ssl/qsslserver/certs/selfsigned-client.crt18
-rw-r--r--tests/auto/network/ssl/qsslserver/certs/selfsigned-client.key27
-rw-r--r--tests/auto/network/ssl/qsslserver/certs/selfsigned-server.crt18
-rw-r--r--tests/auto/network/ssl/qsslserver/certs/selfsigned-server.key27
-rw-r--r--tests/auto/network/ssl/qsslserver/tst_qsslserver.cpp441
-rw-r--r--tests/auto/network/ssl/qsslsocket/CMakeLists.txt5
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/qt-test-server-cacert.pem30
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp10
-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/other/CMakeLists.txt3
-rw-r--r--tests/auto/other/android/CMakeLists.txt3
-rw-r--r--tests/auto/other/gestures/BLACKLIST36
-rw-r--r--tests/auto/other/gestures/CMakeLists.txt5
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp2
-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.txt5
-rw-r--r--tests/auto/other/macplist/BLACKLIST2
-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/qaccessibility/CMakeLists.txt9
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp116
-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/qfocusevent/CMakeLists.txt5
-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.cpp2
-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/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/qsqlrecord/CMakeLists.txt5
-rw-r--r--tests/auto/sql/kernel/qsqlresult/CMakeLists.txt5
-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/qsqlrelationaltablemodel/CMakeLists.txt5
-rw-r--r--tests/auto/sql/models/qsqltablemodel/CMakeLists.txt5
-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/selftests/CMakeLists.txt9
-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/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/catch_p_p.h14
-rw-r--r--tests/auto/testlib/selftests/cmptest/CMakeLists.txt7
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp36
-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.cpp96
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.junitxml14
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml16
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.tap125
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity6
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt10
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml16
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_3.txt7
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_4.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_crashes_5.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.junitxml19
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.lightxml41
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.tap75
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.teamcity21
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.txt18
-rw-r--r--tests/auto/testlib/selftests/expected_eventloop.xml44
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.junitxml526
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.lightxml746
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.tap1022
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.teamcity386
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.txt396
-rw-r--r--tests/auto/testlib/selftests/expected_extendedcompare.xml749
-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_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.junitxml5
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.tap7
-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.xml4
-rw-r--r--tests/auto/testlib/selftests/expectfail/CMakeLists.txt5
-rw-r--r--tests/auto/testlib/selftests/extendedcompare/CMakeLists.txt13
-rw-r--r--tests/auto/testlib/selftests/extendedcompare/tst_extendedcompare.cpp332
-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/testlib/tst_testlib.cpp14
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp52
-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/tst_moc.cpp127
-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.cpp49
-rw-r--r--tests/auto/tools/qmake/CMakeLists.txt3
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/digitseparated.h8
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/findMocs.pro3
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/main.cpp8
-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.txt19
-rw-r--r--tests/auto/wasm/tst_localfileapi.cpp221
-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.txt5
-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/qfiledialog2/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt5
-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/qprogressdialog/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/dialogs/qwizard/CMakeLists.txt5
-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/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.cpp44
-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/qgraphicslayoutitem/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt5
-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/BLACKLIST2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp48
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp3
-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/qcolumnview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt5
-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.txt5
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt7
-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.cpp21
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtableview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt5
-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.txt5
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qapplication/BLACKLIST1
-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.cpp9
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qformlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp2
-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/qlayout/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qshortcut/CMakeLists.txt5
-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.txt5
-rw-r--r--tests/auto/widgets/kernel/qtooltip/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qwidget/CMakeLists.txt9
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp142
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp73
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt5
-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/util/CMakeLists.txt3
-rw-r--r--tests/auto/widgets/util/qcompleter/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp9
-rw-r--r--tests/auto/widgets/util/qscroller/CMakeLists.txt5
-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.txt5
-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/qabstractspinbox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt5
-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.cpp33
-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.cpp141
-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/qdockwidget/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp6
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt5
-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.txt5
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/tst_qkeysequenceedit.cpp77
-rw-r--r--tests/auto/widgets/widgets/qlabel/CMakeLists.txt5
-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.cpp4
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp5
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt11
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qmenu/BLACKLIST2
-rw-r--r--tests/auto/widgets/widgets/qmenu/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qmenubar/BLACKLIST1
-rw-r--r--tests/auto/widgets/widgets/qmenubar/CMakeLists.txt7
-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/qprogressbar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt5
-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.txt5
-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.txt5
-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/qtabbar/tst_qtabbar.cpp34
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtextedit/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp95
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt5
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt5
-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.cpp278
1078 files changed, 13719 insertions, 1709 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 16ea50bf63..f69b91d648 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..48cd4a4719 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# special case skip regeneration
# This is an automatic test for the CMake configuration files.
@@ -253,11 +256,16 @@ 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(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.
@@ -272,6 +280,10 @@ 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
diff --git a/tests/auto/cmake/mockplugins/.cmake.conf b/tests/auto/cmake/mockplugins/.cmake.conf
index f7a41402e0..377be0059e 100644
--- a/tests/auto/cmake/mockplugins/.cmake.conf
+++ b/tests/auto/cmake/mockplugins/.cmake.conf
@@ -1 +1 @@
-set(QT_REPO_MODULE_VERSION "6.4.0")
+set(QT_REPO_MODULE_VERSION "6.5.0")
diff --git a/tests/auto/cmake/mockplugins/CMakeLists.txt b/tests/auto/cmake/mockplugins/CMakeLists.txt
index 7f61b562bc..79ccfcd3a6 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..a6570015c0 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..706f5f3e0e 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..7936a91f9f 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..048c07e207 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..4cc3ff9bc4 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..d6126990ec 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..b2daaea289 100644
--- a/tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mockplugins1/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
qt_internal_add_module(MockPlugins1
PLUGIN_TYPES mockplugin
SOURCES
diff --git a/tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt b/tests/auto/cmake/mockplugins/mockplugins2/CMakeLists.txt
index 9d406ef483..aa82cf6a40 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..948f54dbd8 100644
--- a/tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt
+++ b/tests/auto/cmake/mockplugins/mockplugins3/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
qt_internal_add_module(MockPlugins3
PLUGIN_TYPES mockauxplugin
SOURCES
diff --git a/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt
index c2a575af65..0efc0252e7 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..bfd694a9ab 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..4c35fb23ca 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..31ee1ded50 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..62dbed6198 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..c8065f1c7e 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..d50ac18e1a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp b/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
index 46f4f1028d..b8b6ec7717 100644
--- a/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
+++ b/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
@@ -9,6 +9,7 @@ int main(int argc, char **argv)
if (QResource::registerResource("rcc_file.rcc") &&
QFile::exists("://resource_file.txt") && QFile::exists("://resource_file_two.txt"))
{
+ QResource::unregisterResource("rcc_file.rcc"); // avoid leaks
return 0;
}
diff --git a/tests/auto/cmake/test_add_resource_options/CMakeLists.txt b/tests/auto/cmake/test_add_resource_options/CMakeLists.txt
index 4692cdbdc6..ec6f95963b 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..159bc71c8c
--- /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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+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..f20be4ffdf 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
cmake_minimum_required(VERSION 3.16)
project(test_add_resources_binary_generated)
diff --git a/tests/auto/cmake/test_add_resources_binary_generated/main.cpp b/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
index 65d5ff306b..906232ca19 100644
--- a/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
+++ b/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
@@ -12,5 +12,9 @@ int main(int, char **)
|| !QFile::exists(":/resource2.txt")) {
return -1;
}
+
+ // Avoid leaks
+ QResource::unregisterResource(RESOURCE1_FULL_PATH);
+ QResource::unregisterResource(RESOURCE2_FULL_PATH);
return 0;
}
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..97c97779c4 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..0c652caf21 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
cmake_minimum_required(VERSION 3.16)
project(ios_projects LANGUAGES CXX)
diff --git a/tests/auto/cmake/test_concurrent_module/CMakeLists.txt b/tests/auto/cmake/test_concurrent_module/CMakeLists.txt
index 3294535319..901a48ff5c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..a2f11ce59c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..47b209f10b 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_generating_cpp_exports/.cmake.conf b/tests/auto/cmake/test_generating_cpp_exports/.cmake.conf
index f7a41402e0..377be0059e 100644
--- a/tests/auto/cmake/test_generating_cpp_exports/.cmake.conf
+++ b/tests/auto/cmake/test_generating_cpp_exports/.cmake.conf
@@ -1 +1 @@
-set(QT_REPO_MODULE_VERSION "6.4.0")
+set(QT_REPO_MODULE_VERSION "6.5.0")
diff --git a/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt b/tests/auto/cmake/test_generating_cpp_exports/CMakeLists.txt
index 7b5666c3f7..d2bb004714 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..0e699f5ba8 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..059cb79610 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..7ec4c2e171 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..7d7bbb2dc5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..0167e6fa49 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..81541b193d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..ab5b91e9cd 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..e977700304 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..6927e58ce2 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..d7a49992bc 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..62ebc0f3ee 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..bfea83d9ec 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..878c0ac067 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..76bc62d37c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..f813901207 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..a96e6a7acb 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
_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..99cab0e33d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..5947c28364 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..63a632c5b3 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..897a15523b 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..1e2b439bb7 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..d0bdb1360c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..1503850863 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
cmake_minimum_required(VERSION 3.16)
diff --git a/tests/auto/cmake/test_static_resources/.cmake.conf b/tests/auto/cmake/test_static_resources/.cmake.conf
index f7a41402e0..377be0059e 100644
--- a/tests/auto/cmake/test_static_resources/.cmake.conf
+++ b/tests/auto/cmake/test_static_resources/.cmake.conf
@@ -1 +1 @@
-set(QT_REPO_MODULE_VERSION "6.4.0")
+set(QT_REPO_MODULE_VERSION "6.5.0")
diff --git a/tests/auto/cmake/test_static_resources/CMakeLists.txt b/tests/auto/cmake/test_static_resources/CMakeLists.txt
index b159f43b78..21e59c56ba 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..dd5b7993df 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..13a70a22be 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..375d58ea5c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..a8faf47790 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..a3c7c7e99a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..566e63d26f 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..34ff32d807 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..01b9b2f3f1 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..f42578d562 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..8210dc5b54 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..2f9d81d9d8 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..7a3f4bf7cf 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..3c5f03297f 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..bfc09958ad 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
cmake_minimum_required(VERSION 3.16)
project(deployment_api)
enable_testing()
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..6bfabc8d1d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..1bb6ab41ad 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..d75b727f92 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qaddpreroutine Test:
#####################################################################
diff --git a/tests/auto/concurrent/CMakeLists.txt b/tests/auto/concurrent/CMakeLists.txt
index 1d7b8cefb4..3e439bdacf 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..cd268d6e04 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qtconcurrentfiltermapgenerated/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfiltermapgenerated/CMakeLists.txt
index 1933365e86..4fcaa36648 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..83e4bf4cb5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qtconcurrentmap/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
index 20ccbdf374..6b6185ad82 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qtconcurrentmedian/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
index cbae4d1fb1..2ac6d1cbb3 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..d1a814cd50 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qtconcurrenttask/CMakeLists.txt b/tests/auto/concurrent/qtconcurrenttask/CMakeLists.txt
index 60f5cb47e3..3f3ac3f7a4 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..0b6aceb32e 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/corelib/CMakeLists.txt b/tests/auto/corelib/CMakeLists.txt
index b9bf269745..46bcd59372 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..990a0d8474 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..1570490e9a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qabstractanimation.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
index 5dcdf49836..097d2cf613 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qanimationgroup.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
index 9a6c9f45db..4b61ab0c4c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qparallelanimationgroup.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
index bc846d33e7..48be888ebd 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..89ae7a0ed2 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..5a9b95c296 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsequentialanimationgroup.pro.
#####################################################################
diff --git a/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
index 08fd743e33..a138d7d090 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qvariantanimation.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/CMakeLists.txt b/tests/auto/corelib/global/CMakeLists.txt
index fe63402288..bec44139de 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from global.pro.
if(NOT INTEGRITY)
add_subdirectory(qcompare)
@@ -21,3 +24,4 @@ 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..d673ec99f9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..8cf2c32cba 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcompare.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qflags/CMakeLists.txt b/tests/auto/corelib/global/qflags/CMakeLists.txt
index 8ba02d93b4..5279658430 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qflags Test:
#####################################################################
diff --git a/tests/auto/corelib/global/qfloat16/CMakeLists.txt b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
index 1dbc95ec95..0f6dfd544b 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..92a26ae90a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..f914ee5f23 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));
diff --git a/tests/auto/corelib/global/qglobal/CMakeLists.txt b/tests/auto/corelib/global/qglobal/CMakeLists.txt
index de9a94629a..4b390c8909 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qglobal.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
index ea978bdadb..132eb861e3 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..8f203f1792 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..c4969fd15d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qkeycombination.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index a9950d3414..d3cdad9552 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qlogging.pro.
# This file is almost completely custom written
# special case skip regeneration
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 5de7830113..df0cb5ae77 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::invokeMethod 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::invokeMethod] 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..7536eb3d3c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..e079419110 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..37f83435b1 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qoperatingsystemversion.pro.
#####################################################################
diff --git a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
index 54fa36b5df..bc7af5c778 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..cc72e6f449 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qtendian/tst_qtendian.cpp b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp
index 7f13559067..401367ecaa 100644
--- a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp
+++ b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp
@@ -35,8 +35,6 @@ private slots:
void endianIntegers_data();
void endianIntegers();
- void endianBitfields();
-
void endianBitfieldUnions_data();
void endianBitfieldUnions();
};
@@ -344,41 +342,15 @@ void tst_QtEndian::endianIntegers()
#endif
}
-void tst_QtEndian::endianBitfields()
-{
- union {
- quint32_be_bitfield<21, 11> upper;
- quint32_be_bitfield<10, 11> lower;
- qint32_be_bitfield<0, 10> bottom;
- } u;
-
- u.upper = 200;
- QCOMPARE(u.upper, 200U);
- u.lower = 1000;
- u.bottom = -8;
- QCOMPARE(u.lower, 1000U);
- QCOMPARE(u.upper, 200U);
-
- u.lower += u.upper;
- QCOMPARE(u.upper, 200U);
- QCOMPARE(u.lower, 1200U);
-
- u.upper = 65536 + 7;
- u.lower = 65535;
- QCOMPARE(u.lower, 65535U & ((1<<11) - 1));
- QCOMPARE(u.upper, 7U);
-
- QCOMPARE(u.bottom, -8);
-}
-
template<template<typename... Accessors> typename Union, template<int, int, typename> typename Member>
void testBitfieldUnion()
{
using upper = Member<21, 11, uint>;
using lower = Member<10, 11, uint>;
using bottom = Member<0, 10, int>;
+ using all = Member<0, 32, uint>;
- using UnionType = Union<upper, lower, bottom>;
+ using UnionType = Union<upper, lower, bottom, all>;
UnionType u;
u.template set<upper>(200);
@@ -402,6 +374,15 @@ void testBitfieldUnion()
UnionType u2(QSpecialIntegerBitfieldZero);
QCOMPARE(u2.data(), 0U);
+ u2.template set<all>(std::numeric_limits<uint>::max());
+ QCOMPARE(u2.template get<all>(), std::numeric_limits<uint>::max());
+
+ u2.template set<all>(453);
+ QCOMPARE(u2.template get<all>(), 453U);
+
+ u2.template set<all>(0);
+ QCOMPARE(u2.template get<all>(), 0U);
+
UnionType u3(42U);
QCOMPARE(u3.data(), 42U);
diff --git a/tests/auto/corelib/global/qwinregistry/CMakeLists.txt b/tests/auto/corelib/global/qwinregistry/CMakeLists.txt
index 95d591a125..6fdeeeb80f 100644
--- a/tests/auto/corelib/global/qwinregistry/CMakeLists.txt
+++ b/tests/auto/corelib/global/qwinregistry/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qwinregistry.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qwinregistry
SOURCES
tst_qwinregistry.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/global/qxp/CMakeLists.txt b/tests/auto/corelib/global/qxp/CMakeLists.txt
new file mode 100644
index 0000000000..f289a04701
--- /dev/null
+++ b/tests/auto/corelib/global/qxp/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(function_ref)
diff --git a/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt b/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
new file mode 100644
index 0000000000..8d489f0ffc
--- /dev/null
+++ b/tests/auto/corelib/global/qxp/function_ref/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+qt_internal_add_test(tst_qxp_function_ref
+ EXCEPTIONS
+ SOURCES
+ tst_qxp_function_ref.cpp
+ LIBRARIES
+ Qt::Core
+)
diff --git a/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp b/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp
new file mode 100644
index 0000000000..6264e6a5ae
--- /dev/null
+++ b/tests/auto/corelib/global/qxp/function_ref/tst_qxp_function_ref.cpp
@@ -0,0 +1,279 @@
+// 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/qxpfunctional.h>
+
+#include <QTest>
+
+#include <type_traits>
+
+// checking dependency q20::remove_cvref_t:
+#define CHECK(in, out) \
+ static_assert(std::is_same_v<q20::remove_cvref_t< in >, out >)
+CHECK(int, int);
+CHECK(const int, int);
+CHECK(int &, int);
+CHECK(const int &, int);
+CHECK(int &&, int);
+CHECK(const int &&, int);
+CHECK(int *, int *);
+CHECK(const int *, const int *);
+CHECK(int[4], int[4]);
+CHECK(const int (&)[4], int[4]);
+#undef CHECK
+
+template <typename T> constexpr inline bool
+is_noexcept_function_ref_helper_v = false;
+template <typename R, typename...Args> constexpr inline bool
+is_noexcept_function_ref_helper_v<qxp::function_ref<R(Args...) noexcept(true)>> = true;
+template <typename R, typename...Args> constexpr inline bool
+is_noexcept_function_ref_helper_v<qxp::function_ref<R(Args...) const noexcept(true)>> = true;
+
+template <typename T> constexpr inline bool
+is_noexcept_function_ref_v = is_noexcept_function_ref_helper_v<q20::remove_cvref_t<T>>;
+
+class tst_qxp_function_ref : public QObject
+{
+ Q_OBJECT
+public:
+ using QObject::QObject;
+
+private Q_SLOTS:
+ void basics();
+ void constOverloads();
+ void constExpr();
+ void voidReturning();
+ void ctad();
+};
+
+void tst_qxp_function_ref::basics()
+{
+ static_assert(std::is_trivially_copyable_v<qxp::function_ref<int(int)>>);
+ static_assert(std::is_trivially_copyable_v<qxp::function_ref<int()>>);
+ static_assert(std::is_trivially_copyable_v<qxp::function_ref<void()>>);
+
+ {
+ Q_CONSTINIT static int invoked = 0;
+ auto lambda = [](int i) noexcept { ++invoked; return i; };
+ const qxp::function_ref<int(int)> f = lambda;
+ QCOMPARE(invoked, 0);
+ QCOMPARE(f(42), 42);
+ QCOMPARE(invoked, 1);
+
+ const int fourtyTwo = 42;
+
+ const qxp::function_ref<int(int) noexcept> f2 = std::move(lambda);
+ QCOMPARE(invoked, 1);
+ QCOMPARE(f2(fourtyTwo), 42);
+ QCOMPARE(invoked, 2);
+
+ int (*fpr)(int) = lambda;
+
+ const qxp::function_ref f3 = fpr;
+ static_assert(!is_noexcept_function_ref_v<decltype(f3)>);
+ QCOMPARE(invoked, 2);
+ QCOMPARE(f3(42), 42);
+ QCOMPARE(invoked, 3);
+
+ int (*fpr2)(int) noexcept = lambda;
+
+ const qxp::function_ref f4 = fpr2;
+ static_assert(is_noexcept_function_ref_v<decltype(f4)>);
+ QCOMPARE(invoked, 3);
+ QCOMPARE(f4(42), 42);
+ QCOMPARE(invoked, 4);
+ }
+ {
+ Q_CONSTINIT static int invoked = 0;
+ auto lambda = [] { ++invoked; return 42; };
+ const qxp::function_ref<int()> f = lambda;
+ QCOMPARE(invoked, 0);
+ QCOMPARE(f(), 42);
+ QCOMPARE(invoked, 1);
+
+ const qxp::function_ref<int()> f2 = std::move(lambda);
+ QCOMPARE(invoked, 1);
+ QCOMPARE(f2(), 42);
+ QCOMPARE(invoked, 2);
+
+ int (*fpr)() = lambda;
+
+ const qxp::function_ref f3 = fpr;
+ static_assert(!is_noexcept_function_ref_v<decltype(f3)>);
+ QCOMPARE(invoked, 2);
+ QCOMPARE(f3(), 42);
+ QCOMPARE(invoked, 3);
+ }
+ {
+ Q_CONSTINIT static int invoked = 0;
+ auto lambda = [] { ++invoked; };
+ const qxp::function_ref<void()> f = lambda;
+ QCOMPARE(invoked, 0);
+ f();
+ QCOMPARE(invoked, 1);
+
+ const qxp::function_ref<void()> f2 = std::move(lambda);
+ QCOMPARE(invoked, 1);
+ f2();
+ QCOMPARE(invoked, 2);
+
+ void (*fpr)() = lambda;
+
+ const qxp::function_ref f3 = fpr;
+ QCOMPARE(invoked, 2);
+ f3();
+ QCOMPARE(invoked, 3);
+ }
+}
+
+void tst_qxp_function_ref::constOverloads()
+{
+ auto func_c = [](qxp::function_ref<int() const> callable)
+ {
+ return callable();
+ };
+ auto func_m = [](qxp::function_ref<int() /*mutable*/> callable)
+ {
+ return callable();
+ };
+
+ struct S
+ {
+ int operator()() { return 1; }
+ int operator()() const { return 2; }
+ };
+ S s;
+ QCOMPARE(func_c(s), 2);
+ QCOMPARE(func_m(s), 1);
+ const S cs;
+ QCOMPARE(func_c(cs), 2);
+#if 0
+ // this should not compile (and doesn't, but currently fails with an error in the impl,
+ // not by failing a constructor constaint → spec issue?).
+ QCOMPARE(func_m(cs), 2);
+#endif
+}
+
+void tst_qxp_function_ref::constExpr()
+{
+ Q_CONSTINIT static int invoked = 0;
+ {
+ Q_CONSTINIT static auto lambda = [] (int i) { ++invoked; return i; };
+ // the function object constructor is constexpr, so this should be constinit:
+ Q_CONSTINIT static qxp::function_ref<int(int)> f = lambda;
+
+ QCOMPARE(invoked, 0);
+ QCOMPARE(f(15), 15);
+ QCOMPARE(invoked, 1);
+ }
+ {
+ constexpr static auto lambda = [] (int i) { ++invoked; return i; };
+ // the function object constructor is constexpr, so this should be constinit:
+ Q_CONSTINIT static qxp::function_ref<int(int) const> f = lambda;
+
+ QCOMPARE(invoked, 1);
+ QCOMPARE(f(51), 51);
+ QCOMPARE(invoked, 2);
+
+#if 0 // ### should this work?:
+ Q_CONSTINIT static qxp::function_ref<int(int)> f2 = lambda;
+
+ QCOMPARE(invoked, 2);
+ QCOMPARE(f(150), 150);
+ QCOMPARE(invoked, 3);
+#endif
+
+ }
+}
+
+int i_f_i_nx(int i) noexcept { return i; }
+void v_f_i_nx(int) noexcept {}
+int i_f_v_nx() noexcept { return 42; }
+void v_f_v_nx() noexcept {}
+
+int i_f_i_ex(int i) { return i; }
+void v_f_i_ex(int) {}
+int i_f_v_ex() { return 42; }
+void v_f_v_ex() {}
+
+void tst_qxp_function_ref::voidReturning()
+{
+ // check that "casting" int to void returns works:
+
+ using Fi = qxp::function_ref<void(int)>;
+ using Fv = qxp::function_ref<void()>;
+
+ {
+ Fi fi = i_f_i_nx;
+ fi(42);
+ Fv fv = i_f_v_nx;
+ fv();
+ }
+
+ {
+ Fi fi = i_f_i_ex;
+ fi(42);
+ Fv fv = i_f_v_ex;
+ fv();
+ }
+
+ // now with lambdas
+
+ bool ok = false; // prevent lambdas from decaying to function pointers
+ {
+ auto lambda1 = [&](int i) noexcept { return i + int(ok); };
+ Fi fi = lambda1;
+ fi(42);
+ auto lambda2 = [&]() noexcept { return int(ok); };
+ Fv fv = lambda2;
+ fv();
+ }
+
+ {
+ auto lambda1 = [&](int i) { return i + int(ok); };
+ Fi fi = lambda1;
+ fi(42);
+ auto lambda2 = [&]() { return int(ok); };
+ Fv fv = lambda2;
+ fv();
+ }
+}
+
+void tst_qxp_function_ref::ctad()
+{
+#define CHECK(fun, sig) \
+ do { \
+ qxp::function_ref f = fun; \
+ static_assert(std::is_same_v<decltype(f), \
+ qxp::function_ref<sig>>); \
+ qxp::function_ref f2 = &fun; \
+ static_assert(std::is_same_v<decltype(f2), \
+ qxp::function_ref<sig>>); \
+ } while (false)
+
+ CHECK(i_f_i_nx, int (int) noexcept);
+ CHECK(v_f_i_nx, void(int) noexcept);
+ CHECK(i_f_v_nx, int ( ) noexcept);
+ CHECK(v_f_v_nx, void( ) noexcept);
+
+ CHECK(i_f_i_ex, int (int));
+ CHECK(v_f_i_ex, void(int));
+ CHECK(i_f_v_ex, int ( ));
+ CHECK(v_f_v_ex, void( ));
+
+#undef CHECK
+
+#if 0 // no deduction guides for the non-function-pointer case, so no CTAD for lambdas
+ {
+ auto lambda = [](int i) -> int { return i; };
+ qxp::function_ref f = lambda;
+ static_assert(std::is_same_v<decltype(f),
+ qxp::function_ref<int(int)>>);
+ }
+#endif
+}
+
+
+QTEST_APPLESS_MAIN(tst_qxp_function_ref);
+
+#include "tst_qxp_function_ref.moc"
diff --git a/tests/auto/corelib/io/CMakeLists.txt b/tests/auto/corelib/io/CMakeLists.txt
index f4cfc16f06..a6af242fab 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..7968e09efc 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..3b0402b2e3 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..661bad7866 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbuffer.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qdataurl/CMakeLists.txt b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
index b13a235d3b..80c26d9e4b 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..3a88b461c0 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..7be4c92002 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,6 +58,7 @@ private slots:
void stateSaver() const;
void veryLongWarningMessage() const;
void qDebugQChar() const;
+ void qDebugQMetaType() const;
void qDebugQString() const;
void qDebugQStringView() const;
void qDebugQUtf8StringView() const;
@@ -428,6 +433,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. */
diff --git a/tests/auto/corelib/io/qdir/CMakeLists.txt b/tests/auto/corelib/io/qdir/CMakeLists.txt
index ee24703bd3..f93879c39a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..1bdf3809b2 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdir.pro.
#####################################################################
@@ -8,6 +11,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/qdiriterator/CMakeLists.txt b/tests/auto/corelib/io/qdiriterator/CMakeLists.txt
index feb742396d..eb77b780f2 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qfile/CMakeLists.txt b/tests/auto/corelib/io/qfile/CMakeLists.txt
index d9c148e9db..d328a57617 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..bda81da00c 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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 0d7b2a4079..828a90e86e 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1546,7 +1546,7 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName)
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);
+ CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (void **)&psl);
}
@@ -3797,8 +3797,8 @@ void tst_QFile::moveToTrash_data()
void tst_QFile::moveToTrash()
{
-#ifdef Q_OS_ANDROID
- QSKIP("Android doesn't implement a trash bin");
+#if defined(Q_OS_ANDROID) or defined(Q_OS_WEBOS)
+ QSKIP("This platform doesn't implement a trash bin");
#endif
QFETCH(QString, source);
QFETCH(bool, create);
diff --git a/tests/auto/corelib/io/qfileinfo/CMakeLists.txt b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt
index 8b015d518c..6dfec3e946 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qfileselector/CMakeLists.txt b/tests/auto/corelib/io/qfileselector/CMakeLists.txt
index 1ceb91212a..7894b3317a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..984d695608 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..13db48f4e9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..dc5dbf7be9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfilesystemwatcher.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qiodevice/CMakeLists.txt b/tests/auto/corelib/io/qiodevice/CMakeLists.txt
index ce15e80be5..4f4fdf5dc0 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qipaddress/CMakeLists.txt b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
index b4801c2ab2..7ed5c21641 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..b10b32b88a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..f70aae94b3 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..57ba3f2f9a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..3ba6de20a9 100644
--- a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
+++ b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
@@ -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..1e24e6d3eb 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..5e6707e3f9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..ec5c98db50 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..ff44c0b790 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..e6c7f1c320 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..d6b2220b01 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..1fe52e5da4 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..e2dd7319a5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testExitCodes Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testForwarding/CMakeLists.txt
index adadbeca7a..9300622eea 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testForwarding Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testForwardingHelper/CMakeLists.txt
index 80b0001a39..d4b8983dd5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testForwardingHelper Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testGuiProcess/CMakeLists.txt
index e36a33bfa4..1e464dedb1 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..b473e699cc 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessCrash Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/CMakeLists.txt
index 24e4e8f58c..907faa4092 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessDeadWhileReading Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEOF/CMakeLists.txt
index 6de59f67fe..a2ad584f9a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessEOF Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho/CMakeLists.txt
index 55b9537fe1..d742377241 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessEcho Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho2/CMakeLists.txt
index b805dc2d85..0b18e8f0d5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessEcho2 Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEcho3/CMakeLists.txt
index dc1d262462..7a44bbdf63 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessEcho3 Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEchoGui/CMakeLists.txt
index 3cc5e3641d..898eda78b8 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessEchoGui Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessEnvironment/CMakeLists.txt
index ec725b67ca..5969a87ad9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessEnvironment Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessHang/CMakeLists.txt
index 2c63be7ce9..6c66a6c938 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessHang Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessNormal/CMakeLists.txt
index 10bbf3840d..2537bd20c9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessNormal Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessOutput/CMakeLists.txt
index cc621d62f6..1bedf070d4 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testProcessOutput Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/CMakeLists.txt
index 0d2fff73c8..30dc9348bf 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..5775cd9820 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testSetNamedPipeHandleState Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/CMakeLists.txt
index 97410c1b49..dc471b9374 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..a120c83963 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..78f0a11cd1 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## testSpaceInName Binary:
#####################################################################
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 674e232eca..a2b3dfc154 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);
@@ -1223,6 +1225,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..d483c66f1d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qprocessenvironment.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qresourceengine/CMakeLists.txt b/tests/auto/corelib/io/qresourceengine/CMakeLists.txt
index b6b3c588d5..5f950ace2d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..e461087562 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## moctestplugin Generic Library:
#####################################################################
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 13508d953a..42018219a9 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -540,6 +540,15 @@ void tst_QResourceEngine::checkUnregisterResource()
QVERIFY(QFile::exists(file_check));
QVERIFY(QResource::unregisterResource(rcc_file, root));
QVERIFY(!QFile::exists(file_check));
+ {
+ // QTBUG-86088
+ QVERIFY(QResource::registerResource(rcc_file, root));
+ QFile file(file_check);
+ QVERIFY(file.open(QFile::ReadOnly));
+ QVERIFY(!QResource::unregisterResource(rcc_file, root));
+ file.close();
+ QVERIFY(!QFile::exists(file_check));
+ }
QVERIFY(QResource::registerResource(rcc_file, root));
QVERIFY(QFile::exists(file_check));
QFileInfo fileInfo(file_check);
diff --git a/tests/auto/corelib/io/qsavefile/CMakeLists.txt b/tests/auto/corelib/io/qsavefile/CMakeLists.txt
index 0b41340279..bba2e89c36 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsavefile.pro.
#####################################################################
diff --git a/tests/auto/corelib/io/qsettings/CMakeLists.txt b/tests/auto/corelib/io/qsettings/CMakeLists.txt
index 2b60d1efff..8ccc77e315 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qstandardpaths/CMakeLists.txt b/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt
index f275b97efe..cb8e997c4d 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..b118f5ef89 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..47dd1df5bf 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qtemporaryfile/CMakeLists.txt b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
index e7a1a65296..1ee39a3550 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qurl/CMakeLists.txt b/tests/auto/corelib/io/qurl/CMakeLists.txt
index b5a2ec0331..8d63523c2e 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qurlinternal/CMakeLists.txt b/tests/auto/corelib/io/qurlinternal/CMakeLists.txt
index 492ac0a4d6..1723c189cc 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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/qurlquery/CMakeLists.txt b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
index b0484314d9..74899cdbbd 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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 c6985557d1..43a407da9d 100644
--- a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
+++ b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
@@ -1,4 +1,5 @@
-// Copyright (C) 2016 Intel Corporation.
+// Copyright (C) 2022 The Qt Company Ltd.
+// Copyright (C) 2012 Intel Corporation.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QUrlQuery>
@@ -8,6 +9,8 @@ typedef QList<QPair<QString, QString> > QueryItems;
Q_DECLARE_METATYPE(QueryItems)
Q_DECLARE_METATYPE(QUrl::ComponentFormattingOptions)
+using namespace Qt::StringLiterals;
+
class tst_QUrlQuery : public QObject
{
Q_OBJECT
@@ -42,46 +45,32 @@ private Q_SLOTS:
void old_hasQueryItem();
};
-static QString prettyElement(const QString &key, const QString &value)
-{
- QString result;
- if (key.isNull())
- result += "null -> ";
- else
- result += '"' + key + "\" -> ";
- if (value.isNull())
- result += "null";
- else
- result += '"' + value + '"';
- return result;
-}
-
-static QString prettyPair(QList<QPair<QString, QString> >::const_iterator it)
+static QString prettyPair(const QPair<QString, QString> &pair)
{
- return prettyElement(it->first, it->second);
+ const auto represent = [](const QString &s) {
+ return s.isNull() ? u"null"_s : u'"' + s + u'"';
+ };
+ return represent(pair.first) + " -> "_L1 + represent(pair.second);
}
-template <typename T>
-static QByteArray prettyList(const T &items)
+static QByteArray prettyList(const QueryItems &items)
{
- QString result = "(";
- bool first = true;
- typename T::const_iterator it = items.constBegin();
- for ( ; it != items.constEnd(); ++it) {
- if (!first)
- result += ", ";
- first = false;
- result += prettyPair(it);
- }
- result += QLatin1Char(')');
+ if (items.isEmpty())
+ return "()";
+ auto it = items.constBegin();
+ QString result = u'(' + prettyPair(*it);
+ for (++it; it != items.constEnd(); ++it)
+ result += ", "_L1 + prettyPair(*it);
+ result += u')';
return result.toLocal8Bit();
}
-static bool compare(const QList<QPair<QString, QString> > &actual, const QueryItems &expected,
+static bool compare(const QueryItems &actual, const QueryItems &expected,
const char *actualStr, const char *expectedStr, const char *file, int line)
{
return QTest::compare_helper(actual == expected, "Compared values are not the same",
- qstrdup(prettyList(actual)), qstrdup(prettyList(expected).data()),
+ [&actual] { return qstrdup(prettyList(actual).constData()); },
+ [&expected] { return qstrdup(prettyList(expected).constData()); },
actualStr, expectedStr, file, line);
}
diff --git a/tests/auto/corelib/io/qurluts46/CMakeLists.txt b/tests/auto/corelib/io/qurluts46/CMakeLists.txt
index 1e91fd17c8..f96060b9d6 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qurluts46 Test:
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/CMakeLists.txt b/tests/auto/corelib/itemmodels/CMakeLists.txt
index fcea1c843d..a59e260c47 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..43776d0166 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qabstractitemmodel.pro.
#####################################################################
@@ -12,6 +15,6 @@ qt_internal_add_test(tst_qabstractitemmodel
QT_DISABLE_DEPRECATED_BEFORE=0
INCLUDE_DIRECTORIES
../../../other/qabstractitemmodelutils
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
index 6c782326cb..fdb3c80aa9 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qabstractproxymodel.pro.
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt
index 40dd512489..cb2832e683 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..f0e2b83ba1 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..039aff8147 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..ca29c92f96 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qitemselectionmodel.pro.
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/CMakeLists.txt
index 25c8553088..d38477af9b 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qsortfilterproxymodel Test:
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
index 678a814224..6e93ffb0c5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsortfilterproxymodel_recursive.pro.
#####################################################################
@@ -9,6 +12,6 @@ qt_internal_add_test(tst_qsfpm_recursive
tst_qsortfilterproxymodel_recursive.cpp
DEFINES
QT_DISABLE_DEPRECATED_BEFORE=0
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt
index 1f41f26a11..bd91b15b39 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qsortfilterproxymodel_regularexpression Test:
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
index c6123bb1e3..43bdce0dc5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstringlistmodel.pro.
#####################################################################
diff --git a/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt
index 7cc675d7fd..d1653b21ef 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..67b41a3f91 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from kernel.pro.
add_subdirectory(qapplicationstatic)
diff --git a/tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt b/tests/auto/corelib/kernel/qapplicationstatic/CMakeLists.txt
index 0890113c55..b9630cc57a 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qapplicationstatic Test:
#####################################################################
diff --git a/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/auto/corelib/kernel/qcoreapplication/CMakeLists.txt
index 92d4b03d26..baca197190 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..315730b5e0 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdeadlinetimer.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
index 1592303ae3..c12a09fc44 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..d67080686f 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qeventdispatcher.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt
index d3b817598e..a931b4fae6 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..40b76b2f29 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..b54cf4b4cc 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## 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..6aa5534b31 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
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..8a917bfd27 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmath.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt b/tests/auto/corelib/kernel/qmetacontainer/CMakeLists.txt
index 79bb6a9324..33a7c4efb7 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..4a0e5e864f 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmetaenum.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
index 6ab3f143ac..48910164e5 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# 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..e4dcf56e78 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: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+set(tst_qmetaobject_SOURCES
+ tst_qmetaobject.cpp
+ forwarddeclared.h
+ forwarddeclared.cpp
+)
+
# Generated from qmetaobject.pro.
#####################################################################
@@ -6,10 +15,8 @@
qt_internal_add_test(tst_qmetaobject
SOURCES
- tst_qmetaobject.cpp
- PUBLIC_LIBRARIES
+ ${tst_qmetaobject_SOURCES}
+ LIBRARIES
Qt::CorePrivate
)
-## Scopes:
-#####################################################################
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..01f9617be1 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -12,6 +12,8 @@
Q_DECLARE_METATYPE(const QMetaObject *)
+#include "forwarddeclared.h"
+
struct MyStruct
{
int i;
@@ -215,8 +217,7 @@ namespace MyNamespace {
int m_value2 = 0;
int m_value3 = 0;
};
-}
-
+} // namespace MyNamespace
class tst_QMetaObject : public QObject
{
@@ -265,6 +266,8 @@ public:
QList<QVariant> value4;
QVariantList value5;
+ tst_QMetaObject();
+
private slots:
void connectSlotsByName();
void invokeMetaMember();
@@ -401,6 +404,11 @@ private slots:
#define FUNCTION(x) "QMetaObject::" x ": "
+tst_QMetaObject::tst_QMetaObject()
+{
+ qRegisterMetaType<qlonglong *>();
+}
+
void tst_QMetaObject::connectSlotsByName()
{
CTestObject obj;
@@ -435,8 +443,6 @@ void tst_QMetaObject::connectSlotsByName()
QCOMPARE(obj2.invokeCount2, 1);
}
-struct MyUnregisteredType { };
-
static int countedStructObjectsCount = 0;
struct CountedStruct
{
@@ -459,6 +465,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 +487,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 +553,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 +593,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 +626,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()
@@ -667,6 +709,11 @@ void tst_QMetaObject::invokeMetaMember()
QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", QGenericArgument("QString&", &refStr)));
QCOMPARE(obj.slotResult, QString("testReference:whatever"));
QCOMPARE(refStr, QString("gotcha"));
+ obj.slotResult.clear();
+ 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,6 +764,33 @@ 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"));
+
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot"));
+ 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"));
QCOMPARE(obj.slotResult, QString("sl0"));
@@ -739,6 +813,9 @@ 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"));
@@ -835,6 +912,24 @@ 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"));
+
+ // 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, 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();
@@ -862,23 +957,38 @@ 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");
+
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, Q_ARG(MyForwardDeclaredType, 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)));
+ Q_ARG(QString, a1), Q_ARG(MyForwardDeclaredType, t)));
QVERIFY(obj.slotResult.isEmpty());
}
+
+ obj.slotResult.clear();
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: Unable to handle unregistered datatype 'MyForwardDeclaredType*'");
+ QVERIFY(!QMetaObject::invokeMethod(&obj, "sl16", Qt::QueuedConnection, Q_ARG(MyForwardDeclaredType*, getForwardDeclaredPointer())));
+ qApp->processEvents(QEventLoop::AllEvents);
+ QVERIFY(obj.slotResult.isEmpty());
}
void tst_QMetaObject::invokeQueuedPointer()
@@ -987,6 +1097,11 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
QVERIFY(QMetaObject::invokeMethod(&obj, "testReference", Qt::BlockingQueuedConnection, QGenericArgument("QString&", &refStr)));
QCOMPARE(obj.slotResult, QString("testReference:whatever"));
QCOMPARE(refStr, QString("gotcha"));
+ obj.slotResult.clear();
+ 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,6 +1146,40 @@ 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"));
+
+ // test overloads
+ QVERIFY(QMetaObject::invokeMethod(&obj, "overloadedSlot", Qt::BlockingQueuedConnection));
+ 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));
QCOMPARE(obj.slotResult, QString("sl0"));
@@ -1053,6 +1202,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"));
@@ -1231,6 +1383,24 @@ 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");
+ }
}
void tst_QMetaObject::invokeTypedefTypes()
@@ -1633,9 +1803,13 @@ void tst_QMetaObject::metaMethod()
QVERIFY(index > 0);
method = QtTestObject::staticMetaObject.method(index);
//wrong args
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invoke: too few arguments (5) in call to QtTestObject::sl5(QString,QString,QString,QString,QString)");
QVERIFY(!method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4")));
//QVERIFY(!method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5"), Q_ARG(QString, "6")));
//QVERIFY(!method.invoke(&obj, Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(int, 5)));
+ QTest::ignoreMessage(QtWarningMsg, "QMetaMethod::invokeMethod: return type mismatch for method "
+ "QtTestObject::sl5(QString,QString,QString,QString,QString): "
+ "cannot convert from void to QString during invocation");
QVERIFY(!method.invoke(&obj, Q_RETURN_ARG(QString, ret), Q_ARG(QString, "1"), Q_ARG(QString, "2"), Q_ARG(QString, "3"), Q_ARG(QString, "4"), Q_ARG(QString, "5")));
//wrong object
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
index 2171b18b2f..ebe724f292 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmetaobjectbuilder.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qmetaobjectbuilder
SOURCES
tst_qmetaobjectbuilder.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
index b69be31b1e..29f0326129 100644
--- a/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmetaproperty.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
index 264c459a89..623b002bec 100644
--- a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmetatype.pro.
#####################################################################
@@ -15,7 +18,7 @@ qt_internal_add_test(tst_qmetatype
QT_DISABLE_DEPRECATED_BEFORE=0
INCLUDE_DIRECTORIES
../../../other/qvariant_common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
TESTDATA ${test_data}
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index ed413107c0..4565e78985 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -397,13 +397,15 @@ protected:
++failureCount;
qWarning() << "Wrong typeInfo returned for" << tp;
}
- if (!info.isRegistered()) {
+ if (info.flags() != (QMetaType::NeedsConstruction | QMetaType::NeedsDestruction |
+ QMetaType::NeedsCopyConstruction | QMetaType::NeedsMoveConstruction)) {
++failureCount;
- qWarning() << name << "is not a registered metatype";
+ qWarning() << "Wrong typeInfo returned for" << tp << "got"
+ << Qt::showbase << Qt::hex << info.flags();
}
- if (QMetaType::typeFlags(tp) != (QMetaType::NeedsConstruction | QMetaType::NeedsDestruction)) {
+ if (!info.isRegistered()) {
++failureCount;
- qWarning() << "Wrong typeInfo returned for" << tp;
+ qWarning() << name << "is not a registered metatype";
}
if (!QMetaType::isRegistered(tp)) {
++failureCount;
@@ -564,6 +566,17 @@ namespace enumerations {
enum Test { a = 0 };
}
+static void ignoreInvalidMetaTypeWarning(int typeId)
+{
+ if (typeId < 0 || typeId > QMetaType::User + 500 ||
+ (typeId > QMetaType::LastCoreType && typeId < QMetaType::FirstGuiType) ||
+ (typeId > QMetaType::LastGuiType && typeId < QMetaType::FirstWidgetsType) ||
+ (typeId > QMetaType::LastWidgetsType && typeId < QMetaType::User)) {
+ QTest::ignoreMessage(QtWarningMsg, "Trying to construct an instance of an invalid type, type id: "
+ + QByteArray::number(typeId));
+ }
+}
+
void tst_QMetaType::typeName_data()
{
QTest::addColumn<int>("aType");
@@ -612,6 +625,7 @@ void tst_QMetaType::typeName()
if (aType >= QMetaType::FirstWidgetsType)
QSKIP("The test doesn't link against QtWidgets.");
+ ignoreInvalidMetaTypeWarning(aType);
const char *rawname = QMetaType::typeName(aType);
QString name = QString::fromLatin1(rawname);
@@ -619,6 +633,7 @@ void tst_QMetaType::typeName()
QCOMPARE(name.toLatin1(), QMetaObject::normalizedType(name.toLatin1().constData()));
QCOMPARE(rawname == nullptr, aTypeName.isNull());
+ ignoreInvalidMetaTypeWarning(aType);
QMetaType mt(aType);
if (mt.isValid()) { // Gui type are not valid
QCOMPARE(QString::fromLatin1(QMetaType(aType).name()), aTypeName);
@@ -802,7 +817,7 @@ void tst_QMetaType::createCopy()
switch (type) {
case QMetaType::UnknownType:
return []() {
- char buf[1];
+ char buf[1] = {};
QCOMPARE(QMetaType().create(&buf), nullptr);
};
#define RETURN_CREATE_COPY_FUNCTION(MetaTypeName, MetaTypeId, RealType) \
@@ -848,6 +863,7 @@ void tst_QMetaType::sizeOf()
{
QFETCH(int, type);
QFETCH(size_t, size);
+ ignoreInvalidMetaTypeWarning(type);
QCOMPARE(size_t(QMetaType::sizeOf(type)), size);
}
@@ -860,6 +876,7 @@ void tst_QMetaType::sizeOfStaticLess()
{
QFETCH(int, type);
QFETCH(size_t, size);
+ ignoreInvalidMetaTypeWarning(type);
QCOMPARE(size_t(QMetaType(type).sizeOf()), size);
}
@@ -896,6 +913,7 @@ void tst_QMetaType::alignOf()
{
QFETCH(int, type);
QFETCH(size_t, size);
+ ignoreInvalidMetaTypeWarning(type);
QCOMPARE(size_t(QMetaType(type).alignOf()), size);
}
@@ -960,80 +978,157 @@ Q_DECLARE_METATYPE(QPairPP)
enum FlagsDataEnum {};
Q_DECLARE_METATYPE(FlagsDataEnum);
+template <typename T> void addFlagsRow(const char *name, int id = qMetaTypeId<T>())
+{
+ QTest::newRow(name)
+ << id
+ << bool(QTypeInfo<T>::isRelocatable)
+ << bool(!std::is_trivially_default_constructible_v<T>)
+ << bool(!std::is_trivially_copy_constructible_v<T>)
+ << bool(!std::is_trivially_destructible_v<T>)
+ << bool(QtPrivate::IsPointerToTypeDerivedFromQObject<T>::Value)
+ << bool(std::is_enum<T>::value)
+ << false;
+}
+
void tst_QMetaType::flags_data()
{
QTest::addColumn<int>("type");
- QTest::addColumn<bool>("isMovable");
- QTest::addColumn<bool>("isComplex");
+ QTest::addColumn<bool>("isRelocatable");
+ QTest::addColumn<bool>("needsConstruction");
+ QTest::addColumn<bool>("needsCopyConstruction");
+ QTest::addColumn<bool>("needsDestruction");
QTest::addColumn<bool>("isPointerToQObject");
QTest::addColumn<bool>("isEnum");
QTest::addColumn<bool>("isQmlList");
+ // invalid ids.
+ QTest::newRow("-1") << -1 << false << false << false << false << false << false << false;
+ QTest::newRow("-124125534") << -124125534 << false << false << false << false << false << false << false;
+ QTest::newRow("124125534") << 124125534 << false << false << false << false << false << false << false;
+
#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
- QTest::newRow(#RealType) << MetaTypeId \
- << bool(QTypeInfo<RealType>::isRelocatable) \
- << bool(QTypeInfo<RealType>::isComplex) \
- << bool(QtPrivate::IsPointerToTypeDerivedFromQObject<RealType>::Value) \
- << bool(std::is_enum<RealType>::value) \
- << false;
+ addFlagsRow<RealType>(#RealType, MetaTypeId);
+QT_FOR_EACH_STATIC_PRIMITIVE_NON_VOID_TYPE(ADD_METATYPE_TEST_ROW)
QT_FOR_EACH_STATIC_CORE_CLASS(ADD_METATYPE_TEST_ROW)
QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(ADD_METATYPE_TEST_ROW)
QT_FOR_EACH_STATIC_CORE_POINTER(ADD_METATYPE_TEST_ROW)
#undef ADD_METATYPE_TEST_ROW
- QTest::newRow("TestSpace::Foo") << ::qMetaTypeId<TestSpace::Foo>() << false << true << false << false << false;
- QTest::newRow("Whity<double>") << ::qMetaTypeId<Whity<double> >() << true << true << false << false << false;
- QTest::newRow("CustomMovable") << ::qMetaTypeId<CustomMovable>() << true << true << false << false << false;
- QTest::newRow("CustomObject*") << ::qMetaTypeId<CustomObject*>() << true << false << true << false << false;
- QTest::newRow("CustomMultiInheritanceObject*") << ::qMetaTypeId<CustomMultiInheritanceObject*>() << true << false << true << false << false;
- QTest::newRow("QPair<C,C>") << ::qMetaTypeId<QPair<C,C> >() << false << true << false << false << false;
- QTest::newRow("QPair<C,M>") << ::qMetaTypeId<QPair<C,M> >() << false << true << false << false << false;
- QTest::newRow("QPair<C,P>") << ::qMetaTypeId<QPair<C,P> >() << false << true << false << false << false;
- QTest::newRow("QPair<M,C>") << ::qMetaTypeId<QPair<M,C> >() << false << true << false << false << false;
- QTest::newRow("QPair<M,M>") << ::qMetaTypeId<QPair<M,M> >() << true << true << false << false << false;
- QTest::newRow("QPair<M,P>") << ::qMetaTypeId<QPair<M,P> >() << true << true << false << false << false;
- QTest::newRow("QPair<P,C>") << ::qMetaTypeId<QPair<P,C> >() << false << true << false << false << false;
- QTest::newRow("QPair<P,M>") << ::qMetaTypeId<QPair<P,M> >() << true << true << false << false << false;
- QTest::newRow("QPair<P,P>") << ::qMetaTypeId<QPair<P,P> >() << true << false << false << false << false;
- QTest::newRow("FlagsDataEnum") << ::qMetaTypeId<FlagsDataEnum>() << true << false << false << true << false;
-
- // invalid ids.
- QTest::newRow("-1") << -1 << false << false << false << false << false;
- QTest::newRow("-124125534") << -124125534 << false << false << false << false << false;
- QTest::newRow("124125534") << 124125534 << false << false << false << false << false;
+ addFlagsRow<TestSpace::Foo>("TestSpace::Foo");
+ addFlagsRow<Whity<double> >("Whity<double> ");
+ addFlagsRow<CustomMovable>("CustomMovable");
+ addFlagsRow<CustomObject*>("CustomObject*");
+ addFlagsRow<CustomMultiInheritanceObject*>("CustomMultiInheritanceObject*");
+ addFlagsRow<QPair<C,C> >("QPair<C,C>");
+ addFlagsRow<QPair<C,M> >("QPair<C,M>");
+ addFlagsRow<QPair<C,P> >("QPair<C,P>");
+ addFlagsRow<QPair<M,C> >("QPair<M,C>");
+ addFlagsRow<QPair<M,M> >("QPair<M,M>");
+ addFlagsRow<QPair<M,P> >("QPair<M,P>");
+ addFlagsRow<QPair<P,C> >("QPair<P,C>");
+ addFlagsRow<QPair<P,M> >("QPair<P,M>");
+ addFlagsRow<QPair<P,P> >("QPair<P,P>");
+ addFlagsRow<FlagsDataEnum>("FlagsDataEnum");
}
void tst_QMetaType::flags()
{
QFETCH(int, type);
- QFETCH(bool, isMovable);
- QFETCH(bool, isComplex);
+ QFETCH(bool, isRelocatable);
+ QFETCH(bool, needsConstruction);
+ QFETCH(bool, needsCopyConstruction);
+ QFETCH(bool, needsDestruction);
QFETCH(bool, isPointerToQObject);
QFETCH(bool, isEnum);
QFETCH(bool, isQmlList);
- QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsConstruction), isComplex);
- QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsDestruction), isComplex);
- QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::RelocatableType), isMovable);
- QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::PointerToQObject), isPointerToQObject);
- QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::IsEnumeration), isEnum);
- QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::IsQmlList), isQmlList);
+ ignoreInvalidMetaTypeWarning(type);
+ QMetaType meta(type);
+
+ QCOMPARE(bool(meta.flags() & QMetaType::NeedsConstruction), needsConstruction);
+ QCOMPARE(bool(meta.flags() & QMetaType::NeedsCopyConstruction), needsCopyConstruction);
+ QCOMPARE(bool(meta.flags() & QMetaType::NeedsDestruction), needsDestruction);
+ QCOMPARE(bool(meta.flags() & QMetaType::RelocatableType), isRelocatable);
+ QCOMPARE(bool(meta.flags() & QMetaType::PointerToQObject), isPointerToQObject);
+ QCOMPARE(bool(meta.flags() & QMetaType::IsEnumeration), isEnum);
+ QCOMPARE(bool(meta.flags() & QMetaType::IsQmlList), isQmlList);
}
-void tst_QMetaType::flagsStaticLess_data()
+class NonDefaultConstructible
+{
+ NonDefaultConstructible(int) {}
+};
+
+struct MoveOnly
+{
+ MoveOnly() = default;
+ MoveOnly(const MoveOnly &) = delete;
+ MoveOnly(MoveOnly &&) = default;
+ MoveOnly &operator=(const MoveOnly &) = delete;
+ MoveOnly &operator=(MoveOnly &&) = default;
+};
+
+class Indestructible
+{
+protected:
+ ~Indestructible() {}
+};
+
+template <typename T> static void addFlags2Row(QMetaType metaType = QMetaType::fromType<T>())
{
- flags_data();
+ QTest::newRow(metaType.name() ? metaType.name() : "UnknownType")
+ << metaType
+ << std::is_default_constructible_v<T>
+ << std::is_copy_constructible_v<T>
+ << std::is_move_constructible_v<T>
+ << std::is_destructible_v<T>
+ << (QTypeTraits::has_operator_equal<T>::value || QTypeTraits::has_operator_less_than<T>::value)
+ << QTypeTraits::has_operator_less_than<T>::value;
+};
+
+void tst_QMetaType::flags2_data()
+{
+ QTest::addColumn<QMetaType>("type");
+ QTest::addColumn<bool>("isDefaultConstructible");
+ QTest::addColumn<bool>("isCopyConstructible");
+ QTest::addColumn<bool>("isMoveConstructible");
+ QTest::addColumn<bool>("isDestructible");
+ QTest::addColumn<bool>("isEqualityComparable");
+ QTest::addColumn<bool>("isOrdered");
+
+ addFlags2Row<void>(QMetaType());
+ addFlags2Row<void>();
+
+#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
+ addFlags2Row<RealType>();
+ QT_FOR_EACH_STATIC_PRIMITIVE_NON_VOID_TYPE(ADD_METATYPE_TEST_ROW)
+ QT_FOR_EACH_STATIC_CORE_CLASS(ADD_METATYPE_TEST_ROW)
+ QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(ADD_METATYPE_TEST_ROW)
+ QT_FOR_EACH_STATIC_CORE_POINTER(ADD_METATYPE_TEST_ROW)
+#undef ADD_METATYPE_TEST_ROW
+
+ addFlags2Row<NonDefaultConstructible>();
+ addFlags2Row<MoveOnly>();
+ addFlags2Row<QObject>();
+ addFlags2Row<Indestructible>();
}
-void tst_QMetaType::flagsStaticLess()
+void tst_QMetaType::flags2()
{
- QFETCH(int, type);
- QFETCH(bool, isMovable);
- QFETCH(bool, isComplex);
+ QFETCH(QMetaType, type);
+ QFETCH(bool, isDefaultConstructible);
+ QFETCH(bool, isCopyConstructible);
+ QFETCH(bool, isMoveConstructible);
+ QFETCH(bool, isDestructible);
+ QFETCH(bool, isEqualityComparable);
+ QFETCH(bool, isOrdered);
- int flags = QMetaType(type).flags();
- QCOMPARE(bool(flags & QMetaType::NeedsConstruction), isComplex);
- QCOMPARE(bool(flags & QMetaType::NeedsDestruction), isComplex);
- QCOMPARE(bool(flags & QMetaType::RelocatableType), isMovable);
+ QCOMPARE(type.isDefaultConstructible(), isDefaultConstructible);
+ QCOMPARE(type.isCopyConstructible(), isCopyConstructible);
+ QCOMPARE(type.isMoveConstructible(), isMoveConstructible);
+ QCOMPARE(type.isDestructible(), isDestructible);
+ QCOMPARE(type.isEqualityComparable(), isEqualityComparable);
+ QCOMPARE(type.isOrdered(), isOrdered);
}
void tst_QMetaType::flagsBinaryCompatibility6_0_data()
@@ -1083,14 +1178,12 @@ void tst_QMetaType::flagsBinaryCompatibility6_0()
const auto currentFlags = QMetaType::typeFlags(id);
auto expectedFlags = QMetaType::TypeFlags(flags);
- if (!(currentFlags.testFlag(QMetaType::NeedsConstruction) && currentFlags.testFlag(QMetaType::NeedsDestruction))) {
- if (expectedFlags.testFlag(QMetaType::NeedsConstruction) && expectedFlags.testFlag(QMetaType::NeedsDestruction)) {
- // If type changed from RELOCATABLE to trivial, that's fine
- expectedFlags.setFlag(QMetaType::NeedsConstruction, false);
- expectedFlags.setFlag(QMetaType::NeedsDestruction, false);
- }
- }
- quint32 mask_5_0 = 0x1fb; // Only compare the values that were already defined in 5.0
+
+ // Only compare the values that were already defined in 5.0.
+ // In 6.5, some types lost NeedsConstruction and NeedsDestruction, but
+ // that's acceptable if that's because they were trivial
+ quint32 mask_5_0 = 0x1ff & ~quint32(QMetaType::NeedsConstruction | QMetaType::NeedsDestruction
+ | QMetaType::RelocatableType);
QCOMPARE(quint32(currentFlags) & mask_5_0, quint32(expectedFlags) & mask_5_0);
}
@@ -1319,7 +1412,7 @@ void tst_QMetaType::constructCopy()
switch (type) {
case QMetaType::UnknownType:
return []() {
- char buf[1], buf2[1];
+ char buf[1], buf2[1] = {};
QCOMPARE(QMetaType().construct(&buf, &buf2), nullptr);
};
#define RETURN_CONSTRUCT_COPY_FUNCTION(MetaTypeName, MetaTypeId, RealType) \
@@ -1415,20 +1508,27 @@ void tst_QMetaType::typedefs()
QCOMPARE(QMetaType::type("WhityDouble"), ::qMetaTypeId<WhityDouble>());
}
+struct RegisterTypeType {};
+
void tst_QMetaType::registerType()
{
// Built-in
QCOMPARE(qRegisterMetaType<QString>("QString"), int(QMetaType::QString));
QCOMPARE(qRegisterMetaType<QString>("QString"), int(QMetaType::QString));
+ qRegisterMetaType(QMetaType::fromType<QString>());
// Custom
int fooId = qRegisterMetaType<TestSpace::Foo>("TestSpace::Foo");
QVERIFY(fooId >= int(QMetaType::User));
QCOMPARE(qRegisterMetaType<TestSpace::Foo>("TestSpace::Foo"), fooId);
+ qRegisterMetaType(QMetaType::fromType<TestSpace::Foo>());
int movableId = qRegisterMetaType<CustomMovable>("CustomMovable");
QVERIFY(movableId >= int(QMetaType::User));
QCOMPARE(qRegisterMetaType<CustomMovable>("CustomMovable"), movableId);
+ qRegisterMetaType(QMetaType::fromType<CustomMovable>());
+
+ // Aliases are deprecated
// Alias to built-in
typedef QString MyString;
@@ -1451,6 +1551,23 @@ void tst_QMetaType::registerType()
QCOMPARE(qRegisterMetaType<MyFoo>("MyFoo"), fooId);
QCOMPARE(QMetaType::type("MyFoo"), fooId);
+
+ // this portion of the test can only be run once
+ static bool typeWasRegistered = false;
+ if (!typeWasRegistered) {
+ QMetaType mt = QMetaType::fromType<RegisterTypeType>();
+ QVERIFY(mt.isValid());
+ QCOMPARE_NE(mt.name(), nullptr);
+
+ QVERIFY(!mt.isRegistered());
+ QVERIFY(!QMetaType::fromName(mt.name()).isValid());
+
+ QCOMPARE_GT(qRegisterMetaType(mt), 0);
+ typeWasRegistered = true;
+
+ QVERIFY(mt.isRegistered());
+ QVERIFY(QMetaType::fromName(mt.name()).isValid());
+ }
}
class IsRegisteredDummyType { };
@@ -1471,7 +1588,7 @@ void tst_QMetaType::isRegistered_data()
// unknown types
QTest::newRow("-1") << -1 << false;
QTest::newRow("-42") << -42 << false;
- QTest::newRow("IsRegisteredDummyType + 1") << (dummyTypeId + 1) << false;
+ QTest::newRow("IsRegisteredDummyType + 1000") << (dummyTypeId + 1000) << false;
QTest::newRow("QMetaType::UnknownType") << int(QMetaType::UnknownType) << false;
}
@@ -1524,9 +1641,16 @@ void tst_QMetaType::isRegisteredStaticLess()
{
QFETCH(int, typeId);
QFETCH(bool, registered);
+ ignoreInvalidMetaTypeWarning(typeId);
QCOMPARE(QMetaType(typeId).isRegistered(), registered);
}
+struct NotARegisteredType {};
+void tst_QMetaType::isNotRegistered()
+{
+ QVERIFY(!QMetaType::fromType<NotARegisteredType>().isRegistered());
+}
+
typedef QHash<int, uint> IntUIntHash;
Q_DECLARE_METATYPE(IntUIntHash)
typedef QMap<int, uint> IntUIntMap;
@@ -1999,6 +2123,7 @@ void tst_QMetaType::metaObject_data()
QTest::newRow("unknown-type") << int(QMetaType::UnknownType) << static_cast<const QMetaObject *>(0) << false << false << false;
QTest::newRow("QObject") << int(QMetaType::QObjectStar) << &QObject::staticMetaObject << false << false << true;
QTest::newRow("QFile*") << ::qMetaTypeId<QFile*>() << &QFile::staticMetaObject << false << false << true;
+ QTest::newRow("MyObject") << ::qMetaTypeId<MyObject>() << &MyObject::staticMetaObject << false << false << false;
QTest::newRow("MyObject*") << ::qMetaTypeId<MyObject*>() << &MyObject::staticMetaObject << false << false << true;
QTest::newRow("int") << int(QMetaType::Int) << static_cast<const QMetaObject *>(0) << false << false << false;
QTest::newRow("QEasingCurve") << ::qMetaTypeId<QEasingCurve>() << &QEasingCurve::staticMetaObject << true << false << false;
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
index 588e52c4f6..796d64c5a3 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
@@ -69,8 +69,8 @@ private slots:
void alignOf();
void flags_data();
void flags();
- void flagsStaticLess_data();
- void flagsStaticLess();
+ void flags2_data();
+ void flags2();
void flagsBinaryCompatibility6_0_data();
void flagsBinaryCompatibility6_0();
void construct_data();
@@ -86,6 +86,7 @@ private slots:
void isRegistered();
void isRegisteredStaticLess_data();
void isRegisteredStaticLess();
+ void isNotRegistered();
void isEnum();
void automaticTemplateRegistration_1();
void automaticTemplateRegistration_2(); // defined in tst_qmetatype3.cpp
diff --git a/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
index ec5505d3e0..69d4e3fb67 100644
--- a/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmimedata.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qmimedata
SOURCES
tst_qmimedata.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
index 16d5c5308e..03b07c41ec 100644
--- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
+++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
@@ -72,12 +72,19 @@ void tst_QMimeData::data() const
mimeData.setData("text/plain", "pirates");
QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates"));
QCOMPARE(mimeData.data("text/html").length(), 0);
+ QCOMPARE(mimeData.data("text/markdown").length(), 0);
// html time
mimeData.setData("text/html", "ninjas");
QCOMPARE(mimeData.data("text/html"), QByteArray("ninjas"));
QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates")); // make sure text not damaged
QCOMPARE(mimeData.data("text/html"), mimeData.html().toLatin1());
+
+ // markdown time
+ mimeData.setData("text/markdown", "vikings");
+ QCOMPARE(mimeData.data("text/markdown"), QByteArray("vikings"));
+ QCOMPARE(mimeData.data("text/html"), QByteArray("ninjas"));
+ QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates"));
}
void tst_QMimeData::formats() const
@@ -92,6 +99,10 @@ void tst_QMimeData::formats() const
mimeData.setData("text/html", "ninjas");
QCOMPARE(mimeData.formats(), QStringList() << "text/plain" << "text/html");
+ // set markdown, verify
+ mimeData.setData("text/markdown", "vikings");
+ QCOMPARE(mimeData.formats(), QStringList() << "text/plain" << "text/html" << "text/markdown");
+
// clear, verify
mimeData.clear();
QCOMPARE(mimeData.formats(), QStringList());
diff --git a/tests/auto/corelib/kernel/qobject/CMakeLists.txt b/tests/auto/corelib/kernel/qobject/CMakeLists.txt
index a231ef985f..c49b2139c7 100644
--- a/tests/auto/corelib/kernel/qobject/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qobject/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qobject.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt b/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt
index b479ada78e..2784cd6201 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from signalbug.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qpointer/CMakeLists.txt b/tests/auto/corelib/kernel/qpointer/CMakeLists.txt
index 55a5e50ee7..ae43cb90bf 100644
--- a/tests/auto/corelib/kernel/qpointer/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qpointer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpointer.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qpointer
SOURCES
tst_qpointer.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
@@ -15,6 +18,6 @@ qt_internal_add_test(tst_qpointer
#####################################################################
qt_internal_extend_target(tst_qpointer CONDITION TARGET Qt::Widgets
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Widgets
)
diff --git a/tests/auto/corelib/kernel/qproperty/CMakeLists.txt b/tests/auto/corelib/kernel/qproperty/CMakeLists.txt
index 55a5d71752..d9cfcc2675 100644
--- a/tests/auto/corelib/kernel/qproperty/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qproperty/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qproperty.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qproperty
SOURCES
tst_qproperty.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
index 92de7725e4..93d2ac9783 100644
--- a/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
+++ b/tests/auto/corelib/kernel/qproperty/tst_qproperty.cpp
@@ -79,6 +79,7 @@ private slots:
void noFakeDependencies();
void threadSafety();
+ void threadSafety2();
void bindablePropertyWithInitialization();
void noDoubleNotification();
@@ -94,6 +95,8 @@ private slots:
void qpropertyAlias();
void scheduleNotify();
+
+ void notifyAfterAllDepsGone();
};
void tst_QProperty::functorBinding()
@@ -1694,7 +1697,7 @@ void tst_QProperty::threadSafety()
auto child1 = new ThreadSafetyTester(obj1);
obj1->moveToThread(&workerThread);
const auto mainThreadBindingStatus = QtPrivate::getBindingStatus({});
- QCOMPARE(qGetBindingStorage(child1)->status({}), mainThreadBindingStatus);
+ QCOMPARE(qGetBindingStorage(child1)->status({}), nullptr);
workerThread.start();
bool correctStatus = false;
@@ -1743,6 +1746,41 @@ void tst_QProperty::threadSafety()
QCOMPARE(obj3->objectName(), "moved again");
}
+class QPropertyUsingThread : public QThread
+{
+public:
+ QPropertyUsingThread(QObject **dest, QThread *destThread) : dest(dest), destThread(destThread) {}
+ void run() override
+ {
+ scopedObj1.reset(new ThreadSafetyTester());
+ scopedObj1->setObjectName("test");
+ QObject *child = new ThreadSafetyTester(scopedObj1.get());
+ child->setObjectName("child");
+ exec();
+ scopedObj1->moveToThread(destThread);
+ *dest = scopedObj1.release();
+ }
+ std::unique_ptr<ThreadSafetyTester> scopedObj1;
+ QObject **dest;
+ QThread *destThread;
+};
+
+void tst_QProperty::threadSafety2()
+{
+ std::unique_ptr<QObject> movedObj;
+ {
+ QObject *tmp = nullptr;
+ QPropertyUsingThread workerThread(&tmp, QThread::currentThread());
+ workerThread.start();
+ workerThread.quit();
+ workerThread.wait();
+ movedObj.reset(tmp);
+ }
+
+ QCOMPARE(movedObj->objectName(), "test");
+ QCOMPARE(movedObj->children().first()->objectName(), "child");
+}
+
struct CustomType
{
CustomType() = default;
@@ -2006,6 +2044,28 @@ void tst_QProperty::scheduleNotify()
QCOMPARE(p.value(), 0);
}
+void tst_QProperty::notifyAfterAllDepsGone()
+{
+ bool b = true;
+ QProperty<int> iprop;
+ QProperty<int> jprop(42);
+ iprop.setBinding([&](){
+ if (b)
+ return jprop.value();
+ return 13;
+ });
+ int changeCounter = 0;
+ auto keepAlive = iprop.onValueChanged([&](){ changeCounter++; });
+ QCOMPARE(iprop.value(), 42);
+ jprop = 44;
+ QCOMPARE(iprop.value(), 44);
+ QCOMPARE(changeCounter, 1);
+ b = false;
+ jprop = 43;
+ QCOMPARE(iprop.value(), 13);
+ QCOMPARE(changeCounter, 2);
+}
+
QTEST_MAIN(tst_QProperty);
#undef QT_SOURCE_LOCATION_NAMESPACE
diff --git a/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt b/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt
index 5553dfd56b..46f9daa8f6 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
if(QT_FEATURE_sharedmemory)
#####################################################################
## tst_qsharedmemory Test:
@@ -6,7 +9,7 @@ if(QT_FEATURE_sharedmemory)
qt_internal_add_test(tst_qsharedmemory
SOURCES
tst_qsharedmemory.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
@@ -14,7 +17,7 @@ if(QT_FEATURE_sharedmemory)
#####################################################################
qt_internal_extend_target(tst_qsharedmemory CONDITION LINUX
- PUBLIC_LIBRARIES
+ LIBRARIES
rt
)
add_subdirectory(producerconsumer)
diff --git a/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt b/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt
index 610e2d507f..658e147ac6 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from producerconsumer.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test_helper(producerconsumer_helper
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Test
)
diff --git a/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt b/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt
index ff5a20bcad..eac4d48c87 100644
--- a/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsignalblocker.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt b/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
index 064b6722f8..7ec7c4bd55 100644
--- a/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsignalmapper.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt b/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt
index 3790e46eaa..5e950a972a 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qsocketnotifier.pro.
if(NOT QT_FEATURE_private_tests)
@@ -11,7 +14,7 @@ endif()
qt_internal_add_test(tst_qsocketnotifier
SOURCES
tst_qsocketnotifier.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Network
Qt::NetworkPrivate
@@ -24,6 +27,6 @@ qt_internal_add_test(tst_qsocketnotifier
#####################################################################
qt_internal_extend_target(tst_qsocketnotifier CONDITION WIN32
- PUBLIC_LIBRARIES
+ LIBRARIES
ws2_32
)
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt b/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt
index d4f1d69593..03adbb7525 100644
--- a/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qsystemsemaphore Test:
#####################################################################
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt b/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt
index f34076350e..c31d77167e 100644
--- a/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from acquirerelease.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test_helper(acquirerelease_helper
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Test
)
diff --git a/tests/auto/corelib/kernel/qtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qtimer/CMakeLists.txt
index 39a40b6983..478fc879c2 100644
--- a/tests/auto/corelib/kernel/qtimer/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qtimer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtimer.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qtimer
SOURCES
tst_qtimer.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt b/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt
index e3e69537bf..6d4430a486 100644
--- a/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtranslator.pro.
#####################################################################
diff --git a/tests/auto/corelib/kernel/qvariant/CMakeLists.txt b/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
index 85a90b440f..63348aa1ae 100644
--- a/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qvariant.pro.
#####################################################################
@@ -17,7 +20,7 @@ qt_internal_add_test(tst_qvariant
QT_DISABLE_DEPRECATED_BEFORE=0
INCLUDE_DIRECTORIES
../../../other/qvariant_common
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
Qt::Gui
TESTDATA ${qvariant_resource_files}
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 520515df61..e5ddc16df9 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -9,7 +9,6 @@
#include <QSet>
#include <qvariant.h>
-#include <QtCore/private/qvariant_p.h>
#include <qbitarray.h>
#include <qbytearraylist.h>
#include <qdatetime.h>
@@ -287,6 +286,10 @@ private slots:
void moveOperations();
void equalsWithoutMetaObject();
+ void constructFromIncompatibleMetaType_data();
+ void constructFromIncompatibleMetaType();
+ void copyNonDefaultConstructible();
+
private:
void dataStream_data(QDataStream::Version version);
void loadQVariantFromDataStream(QDataStream::Version version);
@@ -5107,5 +5110,81 @@ void tst_QVariant::equalsWithoutMetaObject()
QVERIFY(qobjectVariant != noMetaObjectVariant);
}
+struct NonDefaultConstructible
+{
+ NonDefaultConstructible(int i) :i(i) {}
+ int i;
+ friend bool operator==(NonDefaultConstructible l, NonDefaultConstructible r)
+ { return l.i == r.i; }
+};
+
+template <> char *QTest::toString<NonDefaultConstructible>(const NonDefaultConstructible &ndc)
+{
+ return qstrdup('{' + QByteArray::number(ndc.i) + '}');
+}
+
+struct Indestructible
+{
+ Indestructible() {}
+ Indestructible(const Indestructible &) {}
+ Indestructible &operator=(const Indestructible &) { return *this; }
+private:
+ ~Indestructible() {}
+};
+
+void tst_QVariant::constructFromIncompatibleMetaType_data()
+{
+ QTest::addColumn<QMetaType>("type");
+ auto addRow = [](QMetaType meta) {
+ QTest::newRow(meta.name()) << meta;
+ };
+ addRow(QMetaType::fromType<void>());
+ addRow(QMetaType::fromType<NonDefaultConstructible>());
+ addRow(QMetaType::fromType<QObject>());
+ addRow(QMetaType::fromType<Indestructible>());
+}
+
+void tst_QVariant::constructFromIncompatibleMetaType()
+{
+ QFETCH(QMetaType, type);
+ // in that case, we run into a different condition (size == 0), and do not warn
+ if (type == QMetaType::fromType<NonDefaultConstructible>()) {
+ QTest::ignoreMessage(QtWarningMsg,
+ "QVariant: Cannot create type 'NonDefaultConstructible' without a "
+ "default constructor");
+ } else if (type != QMetaType::fromType<void>()) {
+ QTest::ignoreMessage(
+ QtWarningMsg,
+ "QVariant: Provided metatype for '" + QByteArray(type.name()) +
+ "' does not support destruction and copy construction");
+ }
+ QVariant var(type, nullptr);
+ QVERIFY(!var.isValid());
+ QVERIFY(!var.metaType().isValid());
+
+ QVariant regular(1.0);
+ QVERIFY(!var.canView(type));
+ QVERIFY(!var.canConvert(type));
+ QVERIFY(!QVariant(regular).convert(type));
+}
+
+void tst_QVariant::copyNonDefaultConstructible()
+{
+ NonDefaultConstructible ndc(42);
+ QVariant var(QMetaType::fromType<NonDefaultConstructible>(), &ndc);
+ QVERIFY(var.isDetached());
+ QCOMPARE(var.metaType(), QMetaType::fromType<NonDefaultConstructible>());
+ QVERIFY(var.constData() != &ndc);
+
+ // qvariant_cast<T> and QVariant::value<T> don't compile
+ QCOMPARE(*static_cast<const NonDefaultConstructible *>(var.constData()), ndc);
+
+ QVariant var2 = var;
+ var2.detach(); // force another copy
+ QVERIFY(var2.isDetached());
+ QVERIFY(var2.constData() != var.constData());
+ QCOMPARE(var2, var);
+}
+
QTEST_MAIN(tst_QVariant)
#include "tst_qvariant.moc"
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt b/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
index b9bcb36771..22d0f76afe 100644
--- a/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
+++ b/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qwineventnotifier.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qwineventnotifier
SOURCES
tst_qwineventnotifier.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/mimetypes/CMakeLists.txt b/tests/auto/corelib/mimetypes/CMakeLists.txt
index 00c7dd7df2..8a982c4f5d 100644
--- a/tests/auto/corelib/mimetypes/CMakeLists.txt
+++ b/tests/auto/corelib/mimetypes/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from mimetypes.pro.
if(QT_FEATURE_private_tests)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt
index 14086efd59..e98e82689a 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmimedatabase.pro.
if(TARGET Qt::Concurrent)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
index 2d7844493f..f9a283143d 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmimedatabase-cache.pro.
if(NOT QT_FEATURE_private_tests)
@@ -12,7 +15,7 @@ qt_internal_add_test(tst_qmimedatabase-cache
SOURCES
../tst_qmimedatabase.h
tst_qmimedatabase-cache.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
index 47e9a2f1d7..3411e0e7f1 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmimedatabase-xml.pro.
if(NOT QT_FEATURE_private_tests)
@@ -12,7 +15,7 @@ qt_internal_add_test(tst_qmimedatabase-xml
SOURCES
../tst_qmimedatabase.h
tst_qmimedatabase-xml.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Concurrent
)
diff --git a/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
index bb84fce94f..550c6546b6 100644
--- a/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
+++ b/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qmimetype.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qmimetype
SOURCES
tst_qmimetype.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/platform/CMakeLists.txt b/tests/auto/corelib/platform/CMakeLists.txt
index 92462e98d8..cc6bdbd269 100644
--- a/tests/auto/corelib/platform/CMakeLists.txt
+++ b/tests/auto/corelib/platform/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
if(ANDROID)
add_subdirectory(android)
endif()
diff --git a/tests/auto/corelib/platform/android/CMakeLists.txt b/tests/auto/corelib/platform/android/CMakeLists.txt
index c2749825ac..19c5dd69d0 100644
--- a/tests/auto/corelib/platform/android/CMakeLists.txt
+++ b/tests/auto/corelib/platform/android/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from android.pro.
#####################################################################
diff --git a/tests/auto/corelib/plugin/CMakeLists.txt b/tests/auto/corelib/plugin/CMakeLists.txt
index 710d471e8a..b4515952b7 100644
--- a/tests/auto/corelib/plugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from plugin.pro.
if(QT_BUILD_SHARED_LIBS)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
index 6263be15a2..748f0babdf 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qfactoryloader.pro.
add_subdirectory(plugin1)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
index eec1abec3f..586957a7e5 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from plugin1.pro.
#####################################################################
@@ -10,7 +13,7 @@ qt_internal_add_cmake_library(tst_qfactoryloader_plugin1
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
SOURCES
plugin1.cpp plugin1.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
index 765ad0b262..6dcece5342 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from plugin2.pro.
#####################################################################
@@ -10,7 +13,7 @@ qt_internal_add_cmake_library(tst_qfactoryloader_plugin2
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
SOURCES
plugin2.cpp plugin2.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
index 2869fca045..56ea71a104 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from test.pro.
#####################################################################
diff --git a/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt
index c0faebc91d..49272a83b8 100644
--- a/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qlibrary.pro.
add_subdirectory(lib)
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt
index 25292c0cc5..8d3bffa561 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from lib.pro.
#####################################################################
@@ -10,7 +13,7 @@ qt_internal_add_cmake_library(mylib
#OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
SOURCES
mylib.c
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt
index 902c53ea84..3ce363abda 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from lib2.pro.
#####################################################################
@@ -10,7 +13,7 @@ qt_internal_add_cmake_library(mylib2 # special case
#OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
SOURCES
mylib.c
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt
index ee50a7f581..3c7a01623f 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from tst.pro.
#####################################################################
diff --git a/tests/auto/corelib/plugin/qplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
index 1713f8c2af..8db1c85d78 100644
--- a/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qplugin.pro.
add_subdirectory(invalidplugin)
diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt
index ee4c0cf33c..661c0dfb2a 100644
--- a/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from debugplugin.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_cmake_library(debugplugin
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins"
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt
index b9cdf2af05..bb778210eb 100644
--- a/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from invalidplugin.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_cmake_library(invalidplugin
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins"
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt
index abf3ae2a4d..dd496d1762 100644
--- a/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from releaseplugin.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_cmake_library(releaseplugin
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins"
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt
index a051bb3ea6..788ca0ac95 100644
--- a/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qpluginloader.pro.
add_subdirectory(lib)
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt
index fe5d6295aa..a9849f4b94 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from almostplugin.pro.
#####################################################################
@@ -10,7 +13,7 @@ qt_internal_add_cmake_library(almostplugin
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
SOURCES
almostplugin.cpp almostplugin.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt
index 7914f07c0d..6c8accf0b9 100644
--- a/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from lib.pro.
#####################################################################
@@ -10,7 +13,7 @@ qt_internal_add_cmake_library(tst_qpluginloaderlib
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
SOURCES
mylib.c
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt
index 68d9a5da0a..2874e63923 100644
--- a/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from staticplugin.pro.
#####################################################################
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt
index 1e7754a167..e548c405fc 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt
@@ -1,10 +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
+
qt_internal_add_cmake_library(theplugin
MODULE
INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
SOURCES
theplugin.cpp theplugin.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
qt_autogen_tools_initial_setup(theplugin)
@@ -16,7 +19,7 @@ if (UNIX AND NOT APPLE)
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
SOURCES
theoldplugin.cpp theoldplugin.h
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
)
qt_autogen_tools_initial_setup(theoldplugin)
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt
index ca27cef44b..447181590a 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from tst.pro.
#####################################################################
@@ -55,16 +58,16 @@ qt_internal_extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests
)
qt_internal_extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release
- PUBLIC_LIBRARIES
+ LIBRARIES
# Remove: L../staticplugin/debug
)
qt_internal_extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug
- PUBLIC_LIBRARIES
+ LIBRARIES
# Remove: L../staticplugin/release
)
qt_internal_extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release
- PUBLIC_LIBRARIES
+ LIBRARIES
# Remove: L../staticplugin
)
diff --git a/tests/auto/corelib/plugin/quuid/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/CMakeLists.txt
index 91e75fe0ae..3db3935258 100644
--- a/tests/auto/corelib/plugin/quuid/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/quuid/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from quuid.pro.
add_subdirectory(testProcessUniqueness)
diff --git a/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt
index 233a410db6..8b07dda9cf 100644
--- a/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_quuid Test:
#####################################################################
@@ -13,7 +16,7 @@ qt_internal_add_test(tst_quuid
qt_internal_extend_target(tst_quuid CONDITION APPLE
SOURCES
../tst_quuid_darwin.mm
- PUBLIC_LIBRARIES
+ LIBRARIES
${FWFoundation}
)
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt
index 0bdf32a207..759cf101f5 100644
--- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from testProcessUniqueness.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/CMakeLists.txt b/tests/auto/corelib/serialization/CMakeLists.txt
index b779ae8106..400cf20bf7 100644
--- a/tests/auto/corelib/serialization/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from serialization.pro.
add_subdirectory(json)
diff --git a/tests/auto/corelib/serialization/json/CMakeLists.txt b/tests/auto/corelib/serialization/json/CMakeLists.txt
index 01432873f5..fc9f8d1913 100644
--- a/tests/auto/corelib/serialization/json/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/json/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from json.pro.
#####################################################################
@@ -17,7 +20,7 @@ set(json_resource_files
qt_internal_add_test(tst_json
SOURCES
tst_qtjson.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${json_resource_files}
)
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
index fe97e03690..7e01ca3f98 100644
--- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
@@ -768,15 +768,20 @@ void tst_QtJson::testValueObject()
void tst_QtJson::testValueArray()
{
QJsonArray array;
+ QJsonArray otherArray = {"wrong value"};
+ QJsonValue value(array);
+ QCOMPARE(value.toArray(), array);
+ QCOMPARE(value.toArray(otherArray), array);
+
array.append(999.);
array.append(QLatin1String("test"));
array.append(true);
-
- QJsonValue value(array);
+ value = array;
// if we don't modify the original JsonArray, toArray()
// on the JsonValue should return the same object (non-detached).
QCOMPARE(value.toArray(), array);
+ QCOMPARE(value.toArray(otherArray), array);
// if we modify the original array, it should detach
array.append(QLatin1String("test"));
@@ -786,14 +791,23 @@ void tst_QtJson::testValueArray()
void tst_QtJson::testObjectNested()
{
QJsonObject inner, outer;
+ QJsonObject otherObject = {{"wrong key", "wrong value"}};
+ QJsonValue v = inner;
+ QCOMPARE(v.toObject(), inner);
+ QCOMPARE(v.toObject(otherObject), inner);
+
inner.insert("number", 999.);
outer.insert("nested", inner);
// if we don't modify the original JsonObject, value()
// should return the same object (non-detached).
QJsonObject value = outer.value("nested").toObject();
+ v = value;
QCOMPARE(value, inner);
QCOMPARE(value.value("number").toDouble(), 999.);
+ QCOMPARE(v.toObject(), inner);
+ QCOMPARE(v.toObject(otherObject), inner);
+ QCOMPARE(v["number"].toDouble(), 999.);
// if we modify the original object, it should detach and not
// affect the nested object
diff --git a/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt b/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
index 276474ba37..352c49b450 100644
--- a/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcborstreamreader.pro.
#####################################################################
@@ -10,6 +13,6 @@ qt_internal_add_test(tst_qcborstreamreader
INCLUDE_DIRECTORIES
../../../../../src/3rdparty/tinycbor/src
../../../../../src/3rdparty/tinycbor/tests/parser
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt b/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
index 2796dc214c..d3a153cb4b 100644
--- a/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcborstreamwriter.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt b/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
index 9233888671..b329d68a2e 100644
--- a/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcborvalue.pro.
#####################################################################
@@ -10,6 +13,6 @@ qt_internal_add_test(tst_qcborvalue
INCLUDE_DIRECTORIES
../../../../../src/3rdparty/tinycbor/src
../../../../../src/3rdparty/tinycbor/tests/parser
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt b/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
index 213732e04d..10702e54e1 100644
--- a/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcborvalue_json.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt b/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt
index 361ababd4c..6b923a3fca 100644
--- a/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdatastream.pro.
#####################################################################
@@ -11,7 +14,7 @@ list(APPEND test_data "typedef.q5")
qt_internal_add_test(tst_qdatastream
SOURCES
tst_qdatastream.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
TESTDATA ${test_data}
)
diff --git a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
index e63bc01cda..296f491724 100644
--- a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
@@ -1205,15 +1205,15 @@ void tst_QDataStream::readQCursor(QDataStream *s)
QCOMPARE(d5.hotSpot(), test.hotSpot());
// Comparing non-null QBitmaps will fail. Upcast them first to pass.
- QCOMPARE(d5.bitmap(Qt::ReturnByValue).isNull(), test.bitmap(Qt::ReturnByValue).isNull());
+ QCOMPARE(d5.bitmap().isNull(), test.bitmap().isNull());
QCOMPARE(
- static_cast<QPixmap>(d5.bitmap(Qt::ReturnByValue)),
- static_cast<QPixmap>(test.bitmap(Qt::ReturnByValue))
+ static_cast<QPixmap>(d5.bitmap()),
+ static_cast<QPixmap>(test.bitmap())
);
- QCOMPARE(d5.mask(Qt::ReturnByValue).isNull(), test.mask(Qt::ReturnByValue).isNull());
+ QCOMPARE(d5.mask().isNull(), test.mask().isNull());
QCOMPARE(
- static_cast<QPixmap>(d5.mask(Qt::ReturnByValue)),
- static_cast<QPixmap>(test.mask(Qt::ReturnByValue))
+ static_cast<QPixmap>(d5.mask()),
+ static_cast<QPixmap>(test.mask())
);
}
#endif
diff --git a/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt b/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt
index b77b8212fb..a2cdb10535 100644
--- a/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qdatastream_core_pixmap.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qdatastream_core_pixmap
SOURCES
tst_qdatastream_core_pixmap.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt
index 15798c963f..f73d1ddede 100644
--- a/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qtextstream.pro.
add_subdirectory(test)
diff --git a/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt
index 785785d43a..c8a27e0130 100644
--- a/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from readAllStdinProcess.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt
index 897444c9af..06ce649a16 100644
--- a/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from readLineStdinProcess.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt
index 73eccd1ed8..41f7768ff6 100644
--- a/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from stdinProcess.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt
index 1db76f274f..c1b9ae2faa 100644
--- a/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qtextstream Test:
#####################################################################
@@ -15,13 +18,17 @@ qt_internal_add_test(tst_qtextstream
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
SOURCES
../tst_qtextstream.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Network
Qt::TestPrivate
TESTDATA ${test_data}
QT_TEST_SERVER_LIST "cyrus"
)
+if(QT_FEATURE_sanitize_address)
+ set_property(TEST tst_qtextstream APPEND PROPERTY ENVIRONMENT "QTEST_FUNCTION_TIMEOUT=900000")
+endif()
+
# Resources:
set(qtextstream_resource_files
"../resources/big_endian/"
diff --git a/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt b/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt
index f3602c92fb..9e4ed2114f 100644
--- a/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt
+++ b/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qxmlstream.pro.
#####################################################################
diff --git a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
index 2799e7a999..3cad03641b 100644
--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
@@ -16,6 +16,8 @@
#include "qc14n.h"
+using namespace Qt::StringLiterals;
+
Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour)
static const char *const catalogFile = "XML-Test-Suite/xmlconf/finalCatalog.xml";
@@ -558,6 +560,7 @@ private slots:
void setEntityResolver();
void readFromQBuffer() const;
void readFromQBufferInvalid() const;
+ void readFromLatin1String() const;
void readNextStartElement() const;
void readElementText() const;
void readElementText_data() const;
@@ -1099,6 +1102,25 @@ void tst_QXmlStream::readFromQBufferInvalid() const
QVERIFY(reader.hasError());
}
+void tst_QXmlStream::readFromLatin1String() const
+{
+ const auto in = "<a>M\xE5rten</a>"_L1;
+ {
+ QXmlStreamReader reader(in);
+ QVERIFY(reader.readNextStartElement());
+ QString text = reader.readElementText();
+ QCOMPARE(text, "M\xE5rten"_L1);
+ }
+ // Same as above, but with addData()
+ {
+ QXmlStreamReader reader;
+ reader.addData(in);
+ QVERIFY(reader.readNextStartElement());
+ QString text = reader.readElementText();
+ QCOMPARE(text, "M\xE5rten"_L1);
+ }
+}
+
void tst_QXmlStream::readNextStartElement() const
{
QLatin1String in("<?xml version=\"1.0\"?><A><!-- blah --><B><C/></B><B attr=\"value\"/>text</A>");
diff --git a/tests/auto/corelib/text/CMakeLists.txt b/tests/auto/corelib/text/CMakeLists.txt
index 5264c3e2fc..abe5ac2169 100644
--- a/tests/auto/corelib/text/CMakeLists.txt
+++ b/tests/auto/corelib/text/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from text.pro.
add_subdirectory(qanystringview)
diff --git a/tests/auto/corelib/text/qanystringview/CMakeLists.txt b/tests/auto/corelib/text/qanystringview/CMakeLists.txt
index 6a01874c5d..7e795eb0f8 100644
--- a/tests/auto/corelib/text/qanystringview/CMakeLists.txt
+++ b/tests/auto/corelib/text/qanystringview/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qstringview Test:
#####################################################################
diff --git a/tests/auto/corelib/text/qanystringview/tst_qanystringview.cpp b/tests/auto/corelib/text/qanystringview/tst_qanystringview.cpp
index fe7083502e..4433b8efbc 100644
--- a/tests/auto/corelib/text/qanystringview/tst_qanystringview.cpp
+++ b/tests/auto/corelib/text/qanystringview/tst_qanystringview.cpp
@@ -42,6 +42,14 @@
# define ONLY_WIN(expr) QSKIP("This is a Windows-only test")
#endif
+#ifdef __cpp_impl_three_way_comparison
+# define ONLY_3WAY(expr) expr
+#else
+# define ONLY_3WAY(expr) \
+ QSKIP("This test requires C++20 spaceship operator (<=>) " \
+ "support enabled in the standard library.")
+#endif
+
using namespace Qt::StringLiterals;
template <typename T>
@@ -292,6 +300,7 @@ private Q_SLOTS:
void fromQStringBuilder_QString_QString() const { fromQStringBuilder(u"1"_s % u"2"_s, u"12"); }
void comparison();
+ void compare3way();
private:
template <typename StringBuilder>
@@ -629,5 +638,27 @@ void tst_QAnyStringView::comparison()
QVERIFY(QAnyStringView::compare(bb, aa) > 0);
}
+void tst_QAnyStringView::compare3way()
+{
+#define COMPARE_3WAY(lhs, rhs, res) \
+ do { \
+ const auto qt_3way_cmp_res = (lhs) <=> (rhs); \
+ static_assert(std::is_same_v<decltype(qt_3way_cmp_res), decltype(res)>); \
+ QCOMPARE(std::is_eq(qt_3way_cmp_res), std::is_eq(res)); \
+ QCOMPARE(std::is_lt(qt_3way_cmp_res), std::is_lt(res)); \
+ QCOMPARE(std::is_gt(qt_3way_cmp_res), std::is_gt(res)); \
+ } while (false)
+
+ ONLY_3WAY(
+ const QAnyStringView aa = u"aa";
+ const QAnyStringView upperAa = u"AA";
+ const QAnyStringView bb = u"bb";
+ COMPARE_3WAY(aa, aa, std::strong_ordering::equal);
+ COMPARE_3WAY(aa, bb, std::strong_ordering::less);
+ COMPARE_3WAY(bb, aa, std::strong_ordering::greater)
+ );
+#undef COMPARE_3WAY
+}
+
QTEST_APPLESS_MAIN(tst_QAnyStringView)
#include "tst_qanystringview.moc"
diff --git a/tests/auto/corelib/text/qbytearray/CMakeLists.txt b/tests/auto/corelib/text/qbytearray/CMakeLists.txt
index d1a65adcd8..930fa75456 100644
--- a/tests/auto/corelib/text/qbytearray/CMakeLists.txt
+++ b/tests/auto/corelib/text/qbytearray/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbytearray.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "rfc3252.txt")
qt_internal_add_test(tst_qbytearray
SOURCES
tst_qbytearray.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${test_data}
)
@@ -21,6 +24,6 @@ qt_internal_add_test(tst_qbytearray
qt_internal_extend_target(tst_qbytearray CONDITION APPLE
SOURCES
tst_qbytearray_mac.mm
- PUBLIC_LIBRARIES
+ LIBRARIES
${FWFoundation}
)
diff --git a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
index f3e9115181..823dd679e5 100644
--- a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
@@ -12,6 +12,9 @@
#include "../shared/test_number_shared.h"
+#include <stdexcept>
+#include <string_view>
+
class tst_QByteArray : public QObject
{
Q_OBJECT
@@ -40,6 +43,7 @@ private slots:
void split();
void base64_data();
void base64();
+ void base64_2GiB();
void fromBase64_data();
void fromBase64();
void qvsnprintf();
@@ -150,7 +154,7 @@ QByteArray verifyZeroTermination(const QByteArray &ba)
if (!baDataPtr->isMutable())
return ba;
- int baSize = ba.size();
+ qsizetype baSize = ba.size();
char baTerminator = ba.constData()[baSize];
if ('\0' != baTerminator)
return QString::fromUtf8(
@@ -575,6 +579,42 @@ void tst_QByteArray::base64()
QCOMPARE(arr64, base64urlnoequals);
}
+void tst_QByteArray::base64_2GiB()
+{
+ if constexpr (sizeof(qsizetype) > sizeof(int)) {
+ try {
+ constexpr qint64 GiB = 1024 * 1024 * 1024;
+ static_assert((2 * GiB + 1) % 3 == 0);
+ const char inputChar = '\0'; // all-NULs encode as
+ const char outputChar = 'A'; // all-'A's
+ const qint64 inputSize = 2 * GiB + 1;
+ const qint64 outputSize = inputSize / 3 * 4;
+ const auto sv = [](const QByteArray &ba) {
+ return std::string_view{ba.data(), size_t(ba.size())};
+ };
+ QByteArray output;
+ {
+ const QByteArray input(inputSize, inputChar);
+ output = input.toBase64();
+ QCOMPARE(output.size(), outputSize);
+ QCOMPARE(sv(output).find_first_not_of(outputChar),
+ std::string_view::npos);
+ }
+ {
+ auto r = QByteArray::fromBase64Encoding(output);
+ QCOMPARE_EQ(r.decodingStatus, QByteArray::Base64DecodingStatus::Ok);
+ QCOMPARE(r.decoded.size(), inputSize);
+ QCOMPARE(sv(r.decoded).find_first_not_of(inputChar),
+ std::string_view::npos);
+ }
+ } catch (const std::bad_alloc &) {
+ QSKIP("Could not allocate enough RAM.");
+ }
+ } else {
+ QSKIP("This is a 64-bit only test");
+ }
+}
+
//different from the previous test as the input are invalid
void tst_QByteArray::fromBase64_data()
{
diff --git a/tests/auto/corelib/text/qbytearrayapisymmetry/CMakeLists.txt b/tests/auto/corelib/text/qbytearrayapisymmetry/CMakeLists.txt
index 68689a4b79..38bb3d2f42 100644
--- a/tests/auto/corelib/text/qbytearrayapisymmetry/CMakeLists.txt
+++ b/tests/auto/corelib/text/qbytearrayapisymmetry/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbytearrayapisymmetry.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt b/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt
index 4add3dabe4..cea291bfdd 100644
--- a/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt
+++ b/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbytearraylist.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt b/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt
index a70d8d91b6..4d23965e85 100644
--- a/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt
+++ b/tests/auto/corelib/text/qbytearraymatcher/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbytearraymatcher.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qbytearrayview/CMakeLists.txt b/tests/auto/corelib/text/qbytearrayview/CMakeLists.txt
index 43a0e09ce3..20dc1a915d 100644
--- a/tests/auto/corelib/text/qbytearrayview/CMakeLists.txt
+++ b/tests/auto/corelib/text/qbytearrayview/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbytearrayview.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt b/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt
index 3d4010c3f3..ddf4be6cda 100644
--- a/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt
+++ b/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qbytedatabuffer.pro.
#####################################################################
@@ -7,6 +10,6 @@
qt_internal_add_test(tst_qbytedatabuffer
SOURCES
tst_qbytedatabuffer.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/text/qchar/CMakeLists.txt b/tests/auto/corelib/text/qchar/CMakeLists.txt
index e46bb37422..abcf406671 100644
--- a/tests/auto/corelib/text/qchar/CMakeLists.txt
+++ b/tests/auto/corelib/text/qchar/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qchar.pro.
#####################################################################
@@ -10,7 +13,7 @@ list(APPEND test_data "data/NormalizationTest.txt")
qt_internal_add_test(tst_qchar
SOURCES
tst_qchar.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
TESTDATA ${test_data}
)
diff --git a/tests/auto/corelib/text/qchar/tst_qchar.cpp b/tests/auto/corelib/text/qchar/tst_qchar.cpp
index 725a7e0d72..1739fb5f7e 100644
--- a/tests/auto/corelib/text/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/text/qchar/tst_qchar.cpp
@@ -42,8 +42,10 @@ private slots:
void mirroredChar();
void decomposition();
void script();
+#if !defined(Q_OS_WASM)
void normalization_data();
void normalization();
+#endif // !defined(Q_OS_WASM)
void normalization_manual();
void normalizationCorrections();
void unicodeVersion();
@@ -759,6 +761,8 @@ void tst_QChar::script()
QVERIFY(QChar::script(0xe0100) == QChar::Script_Inherited);
}
+// wasm is limited in reading filesystems, so omit this test for now
+#if !defined(Q_OS_WASM)
void tst_QChar::normalization_data()
{
QTest::addColumn<QStringList>("columns");
@@ -881,6 +885,7 @@ void tst_QChar::normalization()
// #################
}
+#endif // !defined(Q_OS_WASM)
void tst_QChar::normalization_manual()
{
diff --git a/tests/auto/corelib/text/qcollator/CMakeLists.txt b/tests/auto/corelib/text/qcollator/CMakeLists.txt
index 8112ecb887..a8869cbb2f 100644
--- a/tests/auto/corelib/text/qcollator/CMakeLists.txt
+++ b/tests/auto/corelib/text/qcollator/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qcollator.pro.
#####################################################################
@@ -9,6 +12,6 @@ qt_internal_add_test(tst_qcollator
tst_qcollator.cpp
DEFINES
QT_NO_CAST_TO_ASCII
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt b/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt
index 4064783722..87d630c1a6 100644
--- a/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt
+++ b/tests/auto/corelib/text/qlatin1stringview/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qlatin1stringview Test:
#####################################################################
diff --git a/tests/auto/corelib/text/qlatin1stringview/tst_qlatin1stringview.cpp b/tests/auto/corelib/text/qlatin1stringview/tst_qlatin1stringview.cpp
index 17454c8cc9..14dee9d58d 100644
--- a/tests/auto/corelib/text/qlatin1stringview/tst_qlatin1stringview.cpp
+++ b/tests/auto/corelib/text/qlatin1stringview/tst_qlatin1stringview.cpp
@@ -31,6 +31,8 @@ private Q_SLOTS:
void relationalOperators_data();
void relationalOperators();
void count();
+ void indexOf_data();
+ void indexOf();
};
void tst_QLatin1StringView::constExpr()
@@ -410,6 +412,108 @@ void tst_QLatin1StringView::count()
QCOMPARE("a\0b"_L1.count(QChar::SpecialCharacter::LineSeparator), 0);
}
+void tst_QLatin1StringView::indexOf_data()
+{
+ using namespace Qt::Literals::StringLiterals;
+
+ QTest::addColumn<QLatin1StringView>("needle");
+ QTest::addColumn<QLatin1StringView>("haystack");
+ QTest::addColumn<int>("from");
+ QTest::addColumn<int>("indexCaseSensitive");
+ QTest::addColumn<int>("indexCaseInsensitive");
+
+ // Should never trigger Boyer Moore algorithm
+ QTest::newRow("Single letter match start")
+ << QLatin1StringView("A") << QLatin1StringView("ABCDEF") << 0 << 0 << 0;
+ QTest::newRow("Single letter match second letter")
+ << QLatin1StringView("B") << QLatin1StringView("ABCDEF") << 0 << 1 << 1;
+ QTest::newRow("Single letter mismatch")
+ << QLatin1StringView("G") << QLatin1StringView("ABCDEF") << 0 << -1 << -1;
+ QTest::newRow("Single letter case sensitive start")
+ << QLatin1StringView("a") << QLatin1StringView("ABCDEF") << 0 << -1 << 0;
+ QTest::newRow("Single letter case sensitive end")
+ << QLatin1StringView("f") << QLatin1StringView("ABCDEF") << 0 << -1 << 5;
+ QTest::newRow("Single letter different match depending on case")
+ << QLatin1StringView("a") << QLatin1StringView("ABCabc") << 0 << 3 << 0;
+ QTest::newRow("Single letter different match depending on case from 2")
+ << QLatin1StringView("a") << QLatin1StringView("ABCABCabc") << 2 << 6 << 3;
+ QTest::newRow("Single letter negative from")
+ << QLatin1StringView("a") << QLatin1StringView("abcabc") << -3 << 3 << 3;
+ QTest::newRow("Single letter non-ASCII") // searching for "ø" in "Øø"
+ << "\xf8"_L1
+ << "\xd8\xf8"_L1 << 0 << 1 << 0;
+ QTest::newRow("Single uppercase letter")
+ << QLatin1StringView("A") << QLatin1StringView("aA") << 0 << 1 << 0;
+
+ // Might trigger Boyer Moore algorithm
+ QTest::newRow("Small match start")
+ << QLatin1StringView("ABC") << QLatin1StringView("ABCDEF") << 0 << 0 << 0;
+ QTest::newRow("Small match second letter")
+ << QLatin1StringView("BCD") << QLatin1StringView("ABCDEF") << 0 << 1 << 1;
+ QTest::newRow("Small mismatch")
+ << QLatin1StringView("EFG") << QLatin1StringView("ABCDEF") << 0 << -1 << -1;
+ QTest::newRow("Small case sensitive start")
+ << QLatin1StringView("abc") << QLatin1StringView("ABCDEF") << 0 << -1 << 0;
+ QTest::newRow("Small case sensitive end")
+ << QLatin1StringView("DEF") << QLatin1StringView("abcdef") << 0 << -1 << 3;
+ QTest::newRow("Small different match depending on case")
+ << QLatin1StringView("abcabc") << QLatin1StringView("!!ABCabcabcABC") << 0 << 5 << 2;
+ QTest::newRow("Small different match depending on case from 2")
+ << QLatin1StringView("abcabc") << QLatin1StringView("ABCABCabcabcABC") << 2 << 6 << 3;
+ QTest::newRow("Small negative from") << QLatin1StringView("negative")
+ << QLatin1StringView("negativenegative") << -8 << 8 << 8;
+ QTest::newRow("Small non-ASCII") // searching for "løve" in "LØVEløve"
+ << "l\xf8ve"_L1
+ << "L\xd8VEl\xf8ve"_L1 << 0 << 4 << 0;
+ QTest::newRow("Small skip test")
+ << QLatin1StringView("ABBB") << QLatin1StringView("ABABBB") << 0 << 2 << 2;
+ QTest::newRow("Small uppercase needle")
+ << QLatin1StringView("ABCDEF") << QLatin1StringView("abcdefABCDEF") << 0 << 6 << 0;
+
+ // Should trigger Boyer Moore algorithm
+ QTest::newRow("Medium match start")
+ << QLatin1StringView("ABCDEFGHIJKLMNOP")
+ << QLatin1StringView("ABCDEFGHIJKLMNOPQRSTUVWXYZ") << 0 << 0 << 0;
+ QTest::newRow("Medium match second letter")
+ << QLatin1StringView("BCDEFGHIJKLMNOPQ")
+ << QLatin1StringView("ABCDEFGHIJKLMNOPQRSTUVWXYZ") << 0 << 1 << 1;
+ QTest::newRow("Medium mismatch")
+ << QLatin1StringView("PONMLKJIHGFEDCBA")
+ << QLatin1StringView("ABCDEFGHIJKLMNOPQRSTUVWXYZ") << 0 << -1 << -1;
+ QTest::newRow("Medium case sensitive start")
+ << QLatin1StringView("abcdefghijklmnopq")
+ << QLatin1StringView("ABCDEFGHIJKLMNOPQRSTUVWXYZ") << 0 << -1 << 0;
+ QTest::newRow("Medium case sensitive second letter")
+ << QLatin1StringView("BCDEFGHIJKLMNOPQR")
+ << QLatin1StringView("abcdefghijklmnopqrstuvxyz") << 0 << -1 << 1;
+ QTest::newRow("Medium different match depending on case")
+ << QLatin1StringView("testingtesting")
+ << QLatin1StringView("TESTINGtestingtestingTESTING") << 0 << 7 << 0;
+ QTest::newRow("Medium different match depending on case from 2")
+ << QLatin1StringView("testingtesting")
+ << QLatin1StringView("TESTINGTESTINGtestingtestingTESTING") << 2 << 14 << 7;
+ QTest::newRow("Medium negative from")
+ << QLatin1StringView("abcdefghijklmnop")
+ << QLatin1StringView("abcdefghijklmnopabcdefghijklmnop") << -16 << 16 << 16;
+ QTest::newRow("Medium non-ASCII") // searching for "dampfschiffahrtsgesellschaftskapitän"
+ << "dampfschiffahrtsgesellschaftskapit\xe4n"_L1
+ << "DAMPFSCHIFFAHRTSGESELLSCHAFTSKAPIT\xc4Ndampfschiffahrtsgesellschaftskapit\xe4n"_L1
+ << 0 << 36 << 0;
+ QTest::newRow("Medium skip test") << QLatin1StringView("ABBBBBBBBBBBBBBB")
+ << QLatin1StringView("ABABBBBBBBBBBBBBBB") << 0 << 2 << 2;
+}
+
+void tst_QLatin1StringView::indexOf()
+{
+ QFETCH(QLatin1StringView, needle);
+ QFETCH(QLatin1StringView, haystack);
+ QFETCH(int, from);
+ QFETCH(int, indexCaseSensitive);
+ QFETCH(int, indexCaseInsensitive);
+ QCOMPARE(haystack.indexOf(needle, from, Qt::CaseSensitive), (qsizetype)indexCaseSensitive);
+ QCOMPARE(haystack.indexOf(needle, from, Qt::CaseInsensitive), (qsizetype)indexCaseInsensitive);
+}
+
QTEST_APPLESS_MAIN(tst_QLatin1StringView)
#include "tst_qlatin1stringview.moc"
diff --git a/tests/auto/corelib/text/qlocale/CMakeLists.txt b/tests/auto/corelib/text/qlocale/CMakeLists.txt
index 363baa8d52..3f5ecf9ca5 100644
--- a/tests/auto/corelib/text/qlocale/CMakeLists.txt
+++ b/tests/auto/corelib/text/qlocale/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qlocale.pro.
add_subdirectory(test)
diff --git a/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt b/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt
index 3b7df027d4..b585abe070 100644
--- a/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt
+++ b/tests/auto/corelib/text/qlocale/syslocaleapp/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from syslocaleapp.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qlocale/test/CMakeLists.txt b/tests/auto/corelib/text/qlocale/test/CMakeLists.txt
index faf90c0a8e..fc3689e825 100644
--- a/tests/auto/corelib/text/qlocale/test/CMakeLists.txt
+++ b/tests/auto/corelib/text/qlocale/test/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
#####################################################################
## tst_qlocale Test:
#####################################################################
@@ -6,7 +9,7 @@ qt_internal_add_test(tst_qlocale
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
SOURCES
../tst_qlocale.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
@@ -14,7 +17,7 @@ qt_internal_add_test(tst_qlocale
#####################################################################
qt_internal_extend_target(tst_qlocale CONDITION embedded
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 4dd2cf6aff..df2721cfc3 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -1664,7 +1664,7 @@ void tst_QLocale::formatTime_data()
QTest::newRow("C-quote-dquote-H") << QTime(1, 2, 3) << "C" << "'\"H\"'" << "\"H\"";
QTest::newRow("C-H:m:s.z") << QTime(1, 2, 3, 456) << "C" << "H:m:s.z" << "1:2:3.456";
- QTest::newRow("C-H:m:s.zz") << QTime(1, 2, 3, 456) << "C" << "H:m:s.zz" << "1:2:3.456456";
+ QTest::newRow("C-H:m:s.zz") << QTime(1, 2, 3, 456) << "C" << "H:m:s.zz" << "1:2:3.456";
QTest::newRow("C-H:m:s.zzz") << QTime(1, 2, 3, 456) << "C" << "H:m:s.zzz" << "1:2:3.456";
QTest::newRow("C-H:m:s.z=400") << QTime(1, 2, 3, 400) << "C" << "H:m:s.z" << "1:2:3.4";
QTest::newRow("C-H:m:s.zzz=400") << QTime(1, 2, 3, 400) << "C" << "H:m:s.zzz" << "1:2:3.400";
diff --git a/tests/auto/corelib/text/qregularexpression/CMakeLists.txt b/tests/auto/corelib/text/qregularexpression/CMakeLists.txt
index 78e842b658..28d77d2e2d 100644
--- a/tests/auto/corelib/text/qregularexpression/CMakeLists.txt
+++ b/tests/auto/corelib/text/qregularexpression/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qregularexpression.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp
index 37fa8147ed..7f3bef66e6 100644
--- a/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp
+++ b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp
@@ -393,6 +393,7 @@ static void testMatch(const QRegularExpression &regexp,
result);
}
+// ### Qt 7: there should no longer be the need for these
typedef QRegularExpressionMatch (QRegularExpression::*QREMatchStringPMF)(const QString &, qsizetype, QRegularExpression::MatchType, QRegularExpression::MatchOptions) const;
typedef QRegularExpressionMatch (QRegularExpression::*QREMatchStringViewPMF)(QStringView, qsizetype, QRegularExpression::MatchType, QRegularExpression::MatchOptions) const;
typedef QRegularExpressionMatchIterator (QRegularExpression::*QREGlobalMatchStringPMF)(const QString &, qsizetype, QRegularExpression::MatchType, QRegularExpression::MatchOptions) const;
@@ -1096,7 +1097,7 @@ void tst_QRegularExpression::normalMatch()
testMatch<QRegularExpressionMatch>(regexp,
static_cast<QREMatchStringPMF>(&QRegularExpression::match),
- static_cast<QREMatchStringViewPMF>(&QRegularExpression::match),
+ static_cast<QREMatchStringViewPMF>(&QRegularExpression::matchView),
subject,
offset,
QRegularExpression::NormalMatch,
@@ -1368,7 +1369,7 @@ void tst_QRegularExpression::partialMatch()
testMatch<QRegularExpressionMatch>(regexp,
static_cast<QREMatchStringPMF>(&QRegularExpression::match),
- static_cast<QREMatchStringViewPMF>(&QRegularExpression::match),
+ static_cast<QREMatchStringViewPMF>(&QRegularExpression::matchView),
subject,
offset,
matchType,
@@ -1645,7 +1646,7 @@ void tst_QRegularExpression::globalMatch()
testMatch<QRegularExpressionMatchIterator>(regexp,
static_cast<QREGlobalMatchStringPMF>(&QRegularExpression::globalMatch),
- static_cast<QREGlobalMatchStringViewPMF>(&QRegularExpression::globalMatch),
+ static_cast<QREGlobalMatchStringViewPMF>(&QRegularExpression::globalMatchView),
subject,
offset,
matchType,
@@ -1985,7 +1986,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QCOMPARE(match.capturedEnd(), 4);
}
{
- const QRegularExpressionMatch match = re.match(QStringView(subject));
+ const QRegularExpressionMatch match = re.matchView(QStringView(subject));
consistencyCheck(match);
QVERIFY(match.isValid());
QVERIFY(match.hasMatch());
@@ -2003,7 +2004,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QCOMPARE(match.capturedEnd(), 4);
}
{
- const QRegularExpressionMatch match = re.match(QStringView(subject), 1);
+ const QRegularExpressionMatch match = re.matchView(QStringView(subject), 1);
consistencyCheck(match);
QVERIFY(match.isValid());
QVERIFY(match.hasMatch());
@@ -2021,7 +2022,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QCOMPARE(match.capturedEnd(), 6);
}
{
- const QRegularExpressionMatch match = re.match(QStringView(subject).mid(1));
+ const QRegularExpressionMatch match = re.matchView(QStringView(subject).mid(1));
consistencyCheck(match);
QVERIFY(match.isValid());
QVERIFY(match.hasMatch());
@@ -2039,7 +2040,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QCOMPARE(match.capturedEnd(), 6);
}
{
- const QRegularExpressionMatch match = re.match(QStringView(subject).mid(1), 1);
+ const QRegularExpressionMatch match = re.matchView(QStringView(subject).mid(1), 1);
consistencyCheck(match);
QVERIFY(match.isValid());
QVERIFY(match.hasMatch());
@@ -2057,7 +2058,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QCOMPARE(match.capturedEnd(), 7);
}
{
- const QRegularExpressionMatch match = re.match(QStringView(subject), 4);
+ const QRegularExpressionMatch match = re.matchView(QStringView(subject), 4);
consistencyCheck(match);
QVERIFY(match.isValid());
QVERIFY(match.hasMatch());
@@ -2072,7 +2073,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!match.hasMatch());
}
{
- const QRegularExpressionMatch match = re.match(QStringView(subject).mid(4));
+ const QRegularExpressionMatch match = re.matchView(QStringView(subject).mid(4));
consistencyCheck(match);
QVERIFY(match.isValid());
QVERIFY(!match.hasMatch());
@@ -2105,7 +2106,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject));
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject));
QVERIFY(i.isValid());
consistencyCheck(i);
@@ -2157,7 +2158,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject), 1);
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject), 1);
QVERIFY(i.isValid());
consistencyCheck(i);
@@ -2199,7 +2200,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject).mid(1));
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject).mid(1));
QVERIFY(i.isValid());
consistencyCheck(i);
@@ -2231,7 +2232,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject).mid(1), 1);
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject).mid(1), 1);
QVERIFY(i.isValid());
consistencyCheck(i);
@@ -2263,7 +2264,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject).mid(1), 1);
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject).mid(1), 1);
QVERIFY(i.isValid());
consistencyCheck(i);
@@ -2296,7 +2297,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject), 4);
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject), 4);
QVERIFY(i.isValid());
consistencyCheck(i);
@@ -2318,7 +2319,7 @@ void tst_QRegularExpression::QStringAndQStringViewEquivalence()
QVERIFY(!i.hasNext());
}
{
- QRegularExpressionMatchIterator i = re.globalMatch(QStringView(subject).mid(4));
+ QRegularExpressionMatchIterator i = re.globalMatchView(QStringView(subject).mid(4));
consistencyCheck(i);
QVERIFY(i.isValid());
QVERIFY(!i.hasNext());
diff --git a/tests/auto/corelib/text/qstring/CMakeLists.txt b/tests/auto/corelib/text/qstring/CMakeLists.txt
index e5f64742a2..0f89ad4868 100644
--- a/tests/auto/corelib/text/qstring/CMakeLists.txt
+++ b/tests/auto/corelib/text/qstring/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstring.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_test(tst_qstring
tst_qstring.cpp
DEFINES
QT_DISABLE_DEPRECATED_BEFORE=0
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
@@ -24,6 +27,6 @@ qt_internal_extend_target(tst_qstring CONDITION NOT QT_FEATURE_doubleconversion
qt_internal_extend_target(tst_qstring CONDITION APPLE
SOURCES
tst_qstring_mac.mm
- PUBLIC_LIBRARIES
+ LIBRARIES
${FWFoundation}
)
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index 467d5b0b39..239b3498a9 100644
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -537,6 +537,7 @@ private slots:
#if QT_CONFIG(regularexpression)
void split_regularexpression_data();
void split_regularexpression();
+ void regularexpression_lifetime();
#endif
void fromUtf16_data();
void fromUtf16();
@@ -6244,6 +6245,45 @@ void tst_QString::split_regularexpression()
split_regexp<QStringList, QRegularExpression>(string, pattern, result);
split_regexp<QList<QStringView>, QRegularExpression>(string, pattern, result);
}
+
+// Test that rvalue strings (e.g. temporaries) are kept alive in
+// QRegularExpression-related APIs
+void tst_QString::regularexpression_lifetime()
+{
+ const auto getString = [] {
+ // deliberately heap-allocated
+ return QString(QLatin1String("the quick brown fox jumps over the lazy dog"));
+ };
+
+ QRegularExpression re("\\w{5}");
+
+ {
+ QString s = getString();
+ QRegularExpressionMatch match;
+ const bool contains = std::move(s).contains(re, &match);
+ s.fill('X'); // NOLINT(bugprone-use-after-move)
+ QVERIFY(contains);
+ QCOMPARE(match.capturedView(), u"quick");
+ }
+
+ {
+ QString s = getString();
+ QRegularExpressionMatch match;
+ const auto index = std::move(s).indexOf(re, 0, &match);
+ s.fill('X'); // NOLINT(bugprone-use-after-move)
+ QCOMPARE(index, 4);
+ QCOMPARE(match.capturedView(), u"quick");
+ }
+
+ {
+ QString s = getString();
+ QRegularExpressionMatch match;
+ const auto lastIndex = std::move(s).lastIndexOf(re, &match);
+ s.fill('X'); // NOLINT(bugprone-use-after-move)
+ QCOMPARE(lastIndex, 20);
+ QCOMPARE(match.capturedView(), u"jumps");
+ }
+}
#endif
void tst_QString::fromUtf16_data()
diff --git a/tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt
index 10771fc04a..0aabe129db 100644
--- a/tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt
+++ b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstring_no_cast_from_bytearray.pro.
#####################################################################
diff --git a/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt b/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt
index 20b4466f20..c20c1021ad 100644
--- a/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt
+++ b/tests/auto/corelib/text/qstringapisymmetry/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
# Generated from qstringapisymmetry.pro.
#####################################################################
@@ -7,7 +10,7 @@
qt_internal_add_test(tst_qstringapisymmetry
SOURCES
tst_qstringapisymmetry.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::CorePrivate
)
diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
index b44fe5f741..e4f3759c6f 100644
--- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -1215,11 +1215,11 @@ void tst_QStringApiSymmetry::compare_impl() const
auto icResult = sign(
QAnyStringView::compare(QAnyStringView(lhs), QAnyStringView(rhs), Qt::CaseInsensitive));