summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/.prev_CMakeLists.txt7
-rw-r--r--tests/CMakeLists.txt13
-rw-r--r--tests/auto/CMakeLists.txt66
-rw-r--r--tests/auto/auto.pro4
-rw-r--r--tests/auto/concurrent/CMakeLists.txt8
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt15
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro2
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp694
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt12
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/.prev_CMakeLists.txt17
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt18
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro2
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp763
-rw-r--r--tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt12
-rw-r--r--tests/auto/concurrent/qtconcurrentmedian/qtconcurrentmedian.pro1
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt15
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/.prev_CMakeLists.txt18
-rw-r--r--tests/auto/corelib/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/animation/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/codecs/CMakeLists.txt3
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/codecs/utf8/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/global/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/global/q_func_info/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/global/qflags/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/global/qfloat16/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/global/qgetputenv/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/global/qglobal/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp101
-rw-r--r--tests/auto/corelib/global/qglobalstatic/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/global/qhooks/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt25
-rw-r--r--tests/auto/corelib/global/qlogging/test/test.pro1
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp15
-rw-r--r--tests/auto/corelib/global/qnumeric/CMakeLists.txt26
-rw-r--r--tests/auto/corelib/global/qrand/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp1
-rw-r--r--tests/auto/corelib/global/qtendian/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/.prev_CMakeLists.txt56
-rw-r--r--tests/auto/corelib/io/CMakeLists.txt56
-rw-r--r--tests/auto/corelib/io/largefile/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt25
-rw-r--r--tests/auto/corelib/io/qbuffer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qdataurl/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/qdebug/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp23
-rw-r--r--tests/auto/corelib/io/qdir/CMakeLists.txt99
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/io/qdiriterator/CMakeLists.txt38
-rw-r--r--tests/auto/corelib/io/qfile/.prev_CMakeLists.txt89
-rw-r--r--tests/auto/corelib/io/qfile/CMakeLists.txt89
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qfileinfo/CMakeLists.txt47
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp2
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+mac/test50
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+osx/test40
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+ios/test (renamed from tests/auto/corelib/io/qfileselector/platforms/+mac/test)0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+macos/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/+macos/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+macos/test (renamed from tests/auto/corelib/io/qfileselector/platforms/+osx/test)0
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.qrc114
-rw-r--r--tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp8
-rw-r--r--tests/auto/corelib/io/qfilesystementry/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qiodevice/CMakeLists.txt36
-rw-r--r--tests/auto/corelib/io/qipaddress/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/qlockfile/CMakeLists.txt23
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/.prev_CMakeLists.txt11
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/qloggingcategory/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/io/qloggingregistry/CMakeLists.txt36
-rw-r--r--tests/auto/corelib/io/qnodebug/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp108
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/io/qsavefile/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/io/qsettings/CMakeLists.txt50
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp6
-rw-r--r--tests/auto/corelib/io/qstandardpaths/CMakeLists.txt26
-rw-r--r--tests/auto/corelib/io/qstorageinfo/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/io/qtemporarydir/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt47
-rw-r--r--tests/auto/corelib/io/qurl/CMakeLists.txt20
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp57
-rw-r--r--tests/auto/corelib/io/qurlinternal/CMakeLists.txt20
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp1
-rw-r--r--tests/auto/corelib/io/qurlquery/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/itemmodels/CMakeLists.txt19
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt17
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regexp/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/kernel/.prev_CMakeLists.txt40
-rw-r--r--tests/auto/corelib/kernel/CMakeLists.txt40
-rw-r--r--tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qeventloop/CMakeLists.txt26
-rw-r--r--tests/auto/corelib/kernel/qmath/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp80
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp7
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp1
-rw-r--r--tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt42
-rw-r--r--tests/auto/corelib/kernel/qmetatype/CMakeLists.txt42
-rw-r--r--tests/auto/corelib/kernel/qmetatype/qmetatype.pro1
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp213
-rw-r--r--tests/auto/corelib/kernel/qmimedata/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/kernel/qobject/CMakeLists.txt29
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp66
-rw-r--r--tests/auto/corelib/kernel/qpointer/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt30
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt38
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt20
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/kernel/qtimer/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/kernel/qtranslator/CMakeLists.txt47
-rw-r--r--tests/auto/corelib/kernel/qvariant/.prev_CMakeLists.txt34
-rw-r--r--tests/auto/corelib/kernel/qvariant/CMakeLists.txt34
-rw-r--r--tests/auto/corelib/kernel/qvariant/qvariant.pro1
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp473
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/mimetypes/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/.prev_CMakeLists.txt107
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt103
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/.prev_CMakeLists.txt107
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt103
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp8
-rw-r--r--tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/plugin/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt36
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt36
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt42
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt68
-rw-r--r--tests/auto/corelib/plugin/qlibrary/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt34
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt43
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt104
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt37
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt50
-rw-r--r--tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt3
-rw-r--r--tests/auto/corelib/plugin/qplugin/CMakeLists.txt27
-rw-r--r--tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt19
-rw-r--r--tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt19
-rw-r--r--tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt19
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp6
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt30
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt32
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt34
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt41
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt23
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt25
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt31
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt45
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt43
-rw-r--r--tests/auto/corelib/plugin/quuid/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt29
-rw-r--r--tests/auto/corelib/plugin/quuid/test/CMakeLists.txt30
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/serialization/CMakeLists.txt17
-rw-r--r--tests/auto/corelib/serialization/json/CMakeLists.txt36
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp78
-rw-r--r--tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt14
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/serialization/qcborvalue_json/tst_qcborvalue_json.cpp15
-rw-r--r--tests/auto/corelib/serialization/qdatastream/.prev_CMakeLists.txt35
-rw-r--r--tests/auto/corelib/serialization/qdatastream/CMakeLists.txt35
-rw-r--r--tests/auto/corelib/serialization/qdatastream/qdatastream.pro2
-rw-r--r--tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp160
-rw-r--r--tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/serialization/qtextstream/CMakeLists.txt6
-rw-r--r--tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt56
-rw-r--r--tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp6
-rw-r--r--tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/statemachine/CMakeLists.txt2
-rw-r--r--tests/auto/corelib/statemachine/qstate/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/CMakeLists.txt22
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp76
-rw-r--r--tests/auto/corelib/text/qbytearraylist/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp72
-rw-r--r--tests/auto/corelib/text/qregexp/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qregularexpression/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp52
-rw-r--r--tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder2/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder3/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder4/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstringiterator/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/text/qstringlist/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstringmatcher/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/text/qstringref/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/text/qstringref/tst_qstringref.cpp13
-rw-r--r--tests/auto/corelib/thread/CMakeLists.txt24
-rw-r--r--tests/auto/corelib/thread/qatomicint/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp17
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/char16_t/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/char32_t/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qlonglong/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qptrdiff/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/quintptr/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qulonglong/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/schar/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/short/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/uchar/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/ulong/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/ushort/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/wchar_t/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp6
-rw-r--r--tests/auto/corelib/thread/qfuture/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/corelib/thread/qfuture/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/thread/qfuture/qfuture.pro1
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/thread/qmutex/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qreadlocker/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qresultstore/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/thread/qresultstore/qresultstore.pro1
-rw-r--r--tests/auto/corelib/thread/qsemaphore/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qthread/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/corelib/thread/qthread/CMakeLists.txt18
-rw-r--r--tests/auto/corelib/thread/qthreadonce/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/thread/qthreadpool/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt21
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/thread/qwritelocker/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/time/CMakeLists.txt7
-rw-r--r--tests/auto/corelib/time/qcalendar/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/time/qdate/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/time/qdatetime/CMakeLists.txt26
-rw-r--r--tests/auto/corelib/time/qtime/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/time/qtimezone/CMakeLists.txt27
-rw-r--r--tests/auto/corelib/tools/CMakeLists.txt49
-rw-r--r--tests/auto/corelib/tools/collections/collections.pro2
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp385
-rw-r--r--tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro4
-rw-r--r--tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp15
-rw-r--r--tests/auto/corelib/tools/qalgorithms/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qarraydata/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/tools/qarraydata/simplevector.h53
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp634
-rw-r--r--tests/auto/corelib/tools/qarraydata_strictiterators/qarraydata_strictiterators.pro3
-rw-r--r--tests/auto/corelib/tools/qbitarray/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp93
-rw-r--r--tests/auto/corelib/tools/qcache/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/testhelper/CMakeLists.txt11
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qflatmap/qflatmap.pro4
-rw-r--r--tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp453
-rw-r--r--tests/auto/corelib/tools/qhash/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/corelib/tools/qhash/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp243
-rw-r--r--tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro3
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro7
-rw-r--r--tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp1133
-rw-r--r--tests/auto/corelib/tools/qlist/.gitignore1
-rw-r--r--tests/auto/corelib/tools/qlist/qlist.pro6
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp2115
-rw-r--r--tests/auto/corelib/tools/qlist_strictiterators/qlist_strictiterators.pro3
-rw-r--r--tests/auto/corelib/tools/qmakearray/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/tools/qmap/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/corelib/tools/qmap/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp82
-rw-r--r--tests/auto/corelib/tools/qmap_strictiterators/qmap_strictiterators.pro3
-rw-r--r--tests/auto/corelib/tools/qmargins/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro1
-rw-r--r--tests/auto/corelib/tools/qpair/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/tools/qpoint/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qpointf/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qqueue/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qrect/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qringbuffer/CMakeLists.txt12
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qscopeguard/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp2
-rw-r--r--tests/auto/corelib/tools/qset/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/corelib/tools/qset/CMakeLists.txt15
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp149
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp30
-rw-r--r--tests/auto/corelib/tools/qsize/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qsizef/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qstl/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qtimeline/CMakeLists.txt10
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt13
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp2
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp606
-rw-r--r--tests/auto/corelib/tools/qvector_strictiterators/qvector_strictiterators.pro3
-rw-r--r--tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp151
-rw-r--r--tests/auto/corelib/tools/tools.pro8
-rw-r--r--tests/auto/dbus/CMakeLists.txt29
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt15
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt21
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/.prev_CMakeLists.txt18
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt9
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt15
-rw-r--r--tests/auto/dbus/qdbusconnection/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt16
-rw-r--r--tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt15
-rw-r--r--tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp73
-rw-r--r--tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt16
-rw-r--r--tests/auto/dbus/qdbuscontext/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusinterface/CMakeLists.txt41
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt15
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro2
-rw-r--r--tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp13
-rw-r--r--tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusmarshall/CMakeLists.txt4
-rw-r--r--tests/auto/dbus/qdbusmarshall/qdbusmarshall/.prev_CMakeLists.txt29
-rw-r--r--tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt33
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt13
-rw-r--r--tests/auto/dbus/qdbusmetaobject/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp1
-rw-r--r--tests/auto/dbus/qdbusmetatype/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp2
-rw-r--r--tests/auto/dbus/qdbuspendingcall/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbuspendingreply/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusreply/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbusthreading/CMakeLists.txt12
-rw-r--r--tests/auto/dbus/qdbustype/CMakeLists.txt28
-rw-r--r--tests/auto/dbus/qdbusxmlparser/CMakeLists.txt14
-rw-r--r--tests/auto/gui/.prev_CMakeLists.txt19
-rw-r--r--tests/auto/gui/CMakeLists.txt19
-rw-r--r--tests/auto/gui/image/CMakeLists.txt17
-rw-r--r--tests/auto/gui/image/qicoimageformat/CMakeLists.txt49
-rw-r--r--tests/auto/gui/image/qicon/CMakeLists.txt94
-rw-r--r--tests/auto/gui/image/qiconhighdpi/CMakeLists.txt37
-rw-r--r--tests/auto/gui/image/qimage/CMakeLists.txt66
-rw-r--r--tests/auto/gui/image/qimageiohandler/CMakeLists.txt12
-rw-r--r--tests/auto/gui/image/qimagereader/CMakeLists.txt65
-rw-r--r--tests/auto/gui/image/qimagewriter/CMakeLists.txt50
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp4
-rw-r--r--tests/auto/gui/image/qmovie/CMakeLists.txt56
-rw-r--r--tests/auto/gui/image/qpicture/CMakeLists.txt12
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp31
-rw-r--r--tests/auto/gui/image/qpixmap/CMakeLists.txt107
-rw-r--r--tests/auto/gui/image/qpixmapcache/CMakeLists.txt13
-rw-r--r--tests/auto/gui/itemmodels/CMakeLists.txt4
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/CMakeLists.txt38
-rw-r--r--tests/auto/gui/kernel/kernel.pro13
-rw-r--r--tests/auto/gui/kernel/noqteventloop/CMakeLists.txt23
-rw-r--r--tests/auto/gui/kernel/qbackingstore/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qclipboard/CMakeLists.txt7
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt26
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt26
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt24
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt24
-rw-r--r--tests/auto/gui/kernel/qcursor/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qdrag/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qevent/CMakeLists.txt10
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt16
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguiaction/.gitignore (renamed from tests/auto/widgets/kernel/qaction/.gitignore)0
-rw-r--r--tests/auto/gui/kernel/qguiaction/qguiaction.pro4
-rw-r--r--tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp235
-rw-r--r--tests/auto/gui/kernel/qguiactiongroup/.gitignore1
-rw-r--r--tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro4
-rw-r--r--tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp235
-rw-r--r--tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt45
-rw-r--r--tests/auto/gui/kernel/qguiapplication/BLACKLIST3
-rw-r--r--tests/auto/gui/kernel/qguiapplication/CMakeLists.txt55
-rw-r--r--tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt28
-rw-r--r--tests/auto/gui/kernel/qguieventloop/CMakeLists.txt27
-rw-r--r--tests/auto/gui/kernel/qguimetatype/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp26
-rw-r--r--tests/auto/gui/kernel/qguishortcut/qguishortcut.pro4
-rw-r--r--tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp82
-rw-r--r--tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt13
-rw-r--r--tests/auto/gui/kernel/qguitimer/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qguivariant/CMakeLists.txt4
-rw-r--r--tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt38
-rw-r--r--tests/auto/gui/kernel/qinputmethod/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qkeyevent/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp6
-rw-r--r--tests/auto/gui/kernel/qkeysequence/CMakeLists.txt28
-rw-r--r--tests/auto/gui/kernel/qmouseevent/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt13
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt15
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro2
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp2
-rw-r--r--tests/auto/gui/kernel/qpalette/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp89
-rw-r--r--tests/auto/gui/kernel/qpixelformat/CMakeLists.txt12
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qscreen/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qtouchevent/CMakeLists.txt14
-rw-r--r--tests/auto/gui/kernel/qwindow/CMakeLists.txt22
-rw-r--r--tests/auto/gui/math3d/CMakeLists.txt3
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt14
-rw-r--r--tests/auto/gui/math3d/qquaternion/CMakeLists.txt12
-rw-r--r--tests/auto/gui/math3d/qvectornd/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/CMakeLists.txt20
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp37
-rw-r--r--tests/auto/gui/painting/qpagesize/CMakeLists.txt14
-rw-r--r--tests/auto/gui/painting/qpaintengine/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qpainterpath/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qpen/CMakeLists.txt12
-rw-r--r--tests/auto/gui/painting/qtransform/tst_qtransform.cpp63
-rw-r--r--tests/auto/gui/qopengl/CMakeLists.txt23
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp13
-rw-r--r--tests/auto/gui/qopenglconfig/CMakeLists.txt18
-rw-r--r--tests/auto/gui/qvulkan/CMakeLists.txt14
-rw-r--r--tests/auto/gui/rhi/CMakeLists.txt4
-rw-r--r--tests/auto/gui/rhi/qrhi/CMakeLists.txt26
-rw-r--r--tests/auto/gui/rhi/qshader/CMakeLists.txt26
-rw-r--r--tests/auto/gui/text/CMakeLists.txt41
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt12
-rw-r--r--tests/auto/gui/text/qcssparser/CMakeLists.txt57
-rw-r--r--tests/auto/gui/text/qfont/CMakeLists.txt35
-rw-r--r--tests/auto/gui/text/qfontcache/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qfontdatabase/CMakeLists.txt47
-rw-r--r--tests/auto/gui/text/qfontmetrics/CMakeLists.txt31
-rw-r--r--tests/auto/gui/text/qglyphrun/CMakeLists.txt28
-rw-r--r--tests/auto/gui/text/qinputcontrol/CMakeLists.txt13
-rw-r--r--tests/auto/gui/text/qrawfont/CMakeLists.txt32
-rw-r--r--tests/auto/gui/text/qstatictext/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt20
-rw-r--r--tests/auto/gui/text/qtextblock/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextcursor/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextdocument/CMakeLists.txt16
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt20
-rw-r--r--tests/auto/gui/text/qtextformat/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextlayout/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextlist/CMakeLists.txt15
-rw-r--r--tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qtextobject/CMakeLists.txt20
-rw-r--r--tests/auto/gui/text/qtextodfwriter/CMakeLists.txt16
-rw-r--r--tests/auto/gui/text/qtextpiecetable/CMakeLists.txt25
-rw-r--r--tests/auto/gui/text/qtextscriptengine/CMakeLists.txt14
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt17
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp3
-rw-r--r--tests/auto/gui/text/qtexttable/CMakeLists.txt21
-rw-r--r--tests/auto/gui/text/qzip/CMakeLists.txt35
-rw-r--r--tests/auto/gui/util/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/gui/util/qdesktopservices/CMakeLists.txt14
-rw-r--r--tests/auto/gui/util/qdoublevalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qintvalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qregexpvalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt12
-rw-r--r--tests/auto/gui/util/qshadergenerator/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadergraph/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadergraphloader/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadernodes/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadernodesloader/CMakeLists.txt13
-rw-r--r--tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp4
-rw-r--r--tests/auto/gui/util/qtexturefilereader/CMakeLists.txt30
-rw-r--r--tests/auto/network/CMakeLists.txt21
-rw-r--r--tests/auto/network/access/CMakeLists.txt22
-rw-r--r--tests/auto/network/access/access.pro7
-rw-r--r--tests/auto/network/access/hpack/CMakeLists.txt17
-rw-r--r--tests/auto/network/access/hsts/CMakeLists.txt17
-rw-r--r--tests/auto/network/access/http2/CMakeLists.txt20
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp7
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/CMakeLists.txt22
-rw-r--r--tests/auto/network/access/qftp/CMakeLists.txt25
-rw-r--r--tests/auto/network/access/qftp/qftp.pro2
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/CMakeLists.txt21
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt20
-rw-r--r--tests/auto/network/access/qnetworkaccessmanager/CMakeLists.txt12
-rw-r--r--tests/auto/network/access/qnetworkcachemetadata/CMakeLists.txt12
-rw-r--r--tests/auto/network/access/qnetworkcookie/CMakeLists.txt12
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/CMakeLists.txt18
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/CMakeLists.txt12
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST2
-rw-r--r--tests/auto/network/access/qnetworkreply/CMakeLists.txt7
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/.prev_CMakeLists.txt10
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt11
-rw-r--r--tests/auto/network/access/qnetworkreply/test/CMakeLists.txt60
-rw-r--r--tests/auto/network/access/qnetworkreply/test/test.pro2
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp55
-rw-r--r--tests/auto/network/access/qnetworkrequest/CMakeLists.txt12
-rw-r--r--tests/auto/network/access/spdy/BLACKLIST7
-rw-r--r--tests/auto/network/access/spdy/spdy.pro7
-rw-r--r--tests/auto/network/access/spdy/tst_spdy.cpp694
-rw-r--r--tests/auto/network/bearer/CMakeLists.txt6
-rw-r--r--tests/auto/network/bearer/qnetworkconfiguration/CMakeLists.txt13
-rw-r--r--tests/auto/network/bearer/qnetworkconfigurationmanager/CMakeLists.txt13
-rw-r--r--tests/auto/network/bearer/qnetworkconfigurationmanagerqappless/CMakeLists.txt13
-rw-r--r--tests/auto/network/bearer/qnetworksession/CMakeLists.txt7
-rw-r--r--tests/auto/network/bearer/qnetworksession/lackey/CMakeLists.txt13
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/.prev_CMakeLists.txt29
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/CMakeLists.txt30
-rw-r--r--tests/auto/network/kernel/CMakeLists.txt19
-rw-r--r--tests/auto/network/kernel/qauthenticator/CMakeLists.txt21
-rw-r--r--tests/auto/network/kernel/qdnslookup/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qhostaddress/CMakeLists.txt20
-rw-r--r--tests/auto/network/kernel/qhostinfo/CMakeLists.txt31
-rw-r--r--tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt15
-rw-r--r--tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt12
-rw-r--r--tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt12
-rw-r--r--tests/auto/network/socket/CMakeLists.txt20
-rw-r--r--tests/auto/network/socket/platformsocketengine/CMakeLists.txt38
-rw-r--r--tests/auto/network/socket/platformsocketengine/platformsocketengine.pri2
-rw-r--r--tests/auto/network/socket/qabstractsocket/CMakeLists.txt12
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/CMakeLists.txt41
-rw-r--r--tests/auto/network/socket/qlocalsocket/CMakeLists.txt4
-rw-r--r--tests/auto/network/socket/qlocalsocket/socketprocess/CMakeLists.txt14
-rw-r--r--tests/auto/network/socket/qlocalsocket/test/CMakeLists.txt28
-rw-r--r--tests/auto/network/socket/qsctpsocket/CMakeLists.txt12
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt41
-rw-r--r--tests/auto/network/socket/qtcpserver/CMakeLists.txt4
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/CMakeLists.txt16
-rw-r--r--tests/auto/network/socket/qtcpserver/test/CMakeLists.txt27
-rw-r--r--tests/auto/network/socket/qtcpserver/test/test.pro6
-rw-r--r--tests/auto/network/socket/qtcpsocket/CMakeLists.txt7
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/CMakeLists.txt19
-rw-r--r--tests/auto/network/socket/qtcpsocket/test/.prev_CMakeLists.txt33
-rw-r--r--tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt39
-rw-r--r--tests/auto/network/socket/qudpsocket/CMakeLists.txt4
-rw-r--r--tests/auto/network/socket/qudpsocket/clientserver/CMakeLists.txt13
-rw-r--r--tests/auto/network/socket/qudpsocket/test/CMakeLists.txt34
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/CMakeLists.txt13
-rw-r--r--tests/auto/network/ssl/CMakeLists.txt36
-rw-r--r--tests/auto/network/ssl/qasn1element/CMakeLists.txt13
-rw-r--r--tests/auto/network/ssl/qdtls/CMakeLists.txt25
-rw-r--r--tests/auto/network/ssl/qdtls/tst_qdtls.cpp1
-rw-r--r--tests/auto/network/ssl/qdtlscookie/CMakeLists.txt21
-rw-r--r--tests/auto/network/ssl/qocsp/CMakeLists.txt22
-rw-r--r--tests/auto/network/ssl/qocsp/tst_qocsp.cpp1
-rw-r--r--tests/auto/network/ssl/qpassworddigestor/CMakeLists.txt12
-rw-r--r--tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt31
-rw-r--r--tests/auto/network/ssl/qsslcertificate/CMakeLists.txt38
-rw-r--r--tests/auto/network/ssl/qsslcipher/CMakeLists.txt21
-rw-r--r--tests/auto/network/ssl/qssldiffiehellmanparameters/CMakeLists.txt12
-rw-r--r--tests/auto/network/ssl/qsslellipticcurve/CMakeLists.txt12
-rw-r--r--tests/auto/network/ssl/qsslerror/CMakeLists.txt21
-rw-r--r--tests/auto/network/ssl/qsslkey/CMakeLists.txt32
-rw-r--r--tests/auto/network/ssl/qsslsocket/CMakeLists.txt38
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp177
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/CMakeLists.txt35
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/CMakeLists.txt34
-rw-r--r--tests/auto/opengl/CMakeLists.txt1
-rw-r--r--tests/auto/opengl/opengl.pro8
-rw-r--r--tests/auto/opengl/qgl/.gitignore1
-rw-r--r--tests/auto/opengl/qgl/BLACKLIST8
-rw-r--r--tests/auto/opengl/qgl/qgl.pro11
-rw-r--r--tests/auto/opengl/qgl/qgl.qrc5
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp2524
-rw-r--r--tests/auto/opengl/qglbuffer/qglbuffer.pro10
-rw-r--r--tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp257
-rw-r--r--tests/auto/opengl/qglfunctions/qglfunctions.pro6
-rw-r--r--tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp233
-rw-r--r--tests/auto/opengl/qglthreads/qglthreads.pro7
-rw-r--r--tests/auto/opengl/qglthreads/tst_qglthreads.cpp687
-rw-r--r--tests/auto/other/CMakeLists.txt49
-rw-r--r--tests/auto/other/android/CMakeLists.txt19
-rw-r--r--tests/auto/other/compiler/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/other/compiler/CMakeLists.txt17
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp4
-rw-r--r--tests/auto/other/gestures/CMakeLists.txt13
-rw-r--r--tests/auto/other/lancelot/CMakeLists.txt84
-rw-r--r--tests/auto/other/lancelot/lancelot.pro1
-rw-r--r--tests/auto/other/languagechange/CMakeLists.txt21
-rw-r--r--tests/auto/other/macgui/.prev_CMakeLists.txt32
-rw-r--r--tests/auto/other/macgui/CMakeLists.txt32
-rw-r--r--tests/auto/other/macnativeevents/CMakeLists.txt27
-rw-r--r--tests/auto/other/macplist/CMakeLists.txt7
-rw-r--r--tests/auto/other/macplist/app/.prev_CMakeLists.txt14
-rw-r--r--tests/auto/other/macplist/app/CMakeLists.txt15
-rw-r--r--tests/auto/other/macplist/test/CMakeLists.txt16
-rw-r--r--tests/auto/other/networkselftest/CMakeLists.txt13
-rw-r--r--tests/auto/other/qaccessibility/.prev_CMakeLists.txt45
-rw-r--r--tests/auto/other/qaccessibility/CMakeLists.txt51
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp18
-rw-r--r--tests/auto/other/qaccessibilitylinux/.prev_CMakeLists.txt19
-rw-r--r--tests/auto/other/qaccessibilitylinux/CMakeLists.txt32
-rw-r--r--tests/auto/other/qaccessibilitymac/CMakeLists.txt33
-rw-r--r--tests/auto/other/qcomplextext/CMakeLists.txt41
-rw-r--r--tests/auto/other/qfocusevent/CMakeLists.txt14
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp6
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt14
-rw-r--r--tests/auto/other/qobjectrace/CMakeLists.txt13
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt13
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt13
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt15
-rw-r--r--tests/auto/other/qtokenautomaton/CMakeLists.txt16
-rw-r--r--tests/auto/other/toolsupport/CMakeLists.txt12
-rw-r--r--tests/auto/other/toolsupport/tst_toolsupport.cpp8
-rw-r--r--tests/auto/other/xkbkeyboard/CMakeLists.txt13
-rw-r--r--tests/auto/printsupport/CMakeLists.txt4
-rw-r--r--tests/auto/printsupport/dialogs/CMakeLists.txt3
-rw-r--r--tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt14
-rw-r--r--tests/auto/printsupport/kernel/CMakeLists.txt5
-rw-r--r--tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt15
-rw-r--r--tests/auto/printsupport/kernel/qprinter/CMakeLists.txt14
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt15
-rw-r--r--tests/auto/sql/CMakeLists.txt4
-rw-r--r--tests/auto/sql/kernel/CMakeLists.txt9
-rw-r--r--tests/auto/sql/kernel/qsql/CMakeLists.txt13
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt14
-rw-r--r--tests/auto/sql/kernel/qsqldriver/CMakeLists.txt14
-rw-r--r--tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp2
-rw-r--r--tests/auto/sql/kernel/qsqlerror/CMakeLists.txt12
-rw-r--r--tests/auto/sql/kernel/qsqlfield/CMakeLists.txt12
-rw-r--r--tests/auto/sql/kernel/qsqlquery/CMakeLists.txt14
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt12
-rw-r--r--tests/auto/sql/kernel/qsqlresult/CMakeLists.txt15
-rw-r--r--tests/auto/sql/kernel/qsqlthread/CMakeLists.txt14
-rw-r--r--tests/auto/sql/models/CMakeLists.txt6
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt16
-rw-r--r--tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt15
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt14
-rw-r--r--tests/auto/sql/models/qsqltablemodel/CMakeLists.txt14
-rw-r--r--tests/auto/testlib/.prev_CMakeLists.txt8
-rw-r--r--tests/auto/testlib/CMakeLists.txt8
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt16
-rw-r--r--tests/auto/testlib/qsignalspy/CMakeLists.txt10
-rw-r--r--tests/auto/testlib/selftests/.prev_CMakeLists.txt9
-rw-r--r--tests/auto/testlib/selftests/CMakeLists.txt411
-rw-r--r--tests/auto/testlib/selftests/assert/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/assert/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/badxml/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/badxml/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/benchlibcounting/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/blacklisted/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/blacklisted/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/cmptest/.prev_CMakeLists.txt20
-rw-r--r--tests/auto/testlib/selftests/cmptest/CMakeLists.txt22
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/counting/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/counting/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/crashes/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/crashes/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/datatable/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/datatable/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/datetime/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/datetime/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/deleteLater/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/testlib/selftests/deleteLater/CMakeLists.txt14
-rw-r--r--tests/auto/testlib/selftests/deleteLater_noApp/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt14
-rw-r--r--tests/auto/testlib/selftests/differentexec/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/differentexec/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/expected_signaldumper.junitxml8
-rw-r--r--tests/auto/testlib/selftests/expected_signaldumper.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_signaldumper.tap4
-rw-r--r--tests/auto/testlib/selftests/expected_signaldumper.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_signaldumper.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_signaldumper.xml4
-rw-r--r--tests/auto/testlib/selftests/expectfail/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/expectfail/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/failcleanup/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/failcleanup/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/faildatatype/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/faildatatype/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/failinit/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/failinit/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/failinitdata/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/failinitdata/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/findtestdata/.prev_CMakeLists.txt28
-rw-r--r--tests/auto/testlib/selftests/findtestdata/CMakeLists.txt30
-rw-r--r--tests/auto/testlib/selftests/float/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/float/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/globaldata/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/globaldata/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/keyboard/.prev_CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/keyboard/CMakeLists.txt20
-rw-r--r--tests/auto/testlib/selftests/longstring/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/longstring/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/mouse/.prev_CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/mouse/CMakeLists.txt20
-rw-r--r--tests/auto/testlib/selftests/multiexec/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/multiexec/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/pairdiagnostics/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt14
-rw-r--r--tests/auto/testlib/selftests/printdatatags/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/printdatatags/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/signaldumper/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/signaldumper/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/silent/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/silent/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/singleskip/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/singleskip/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/skip/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/skip/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/skipinit/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/skipinit/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/sleep/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/sleep/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/strcmp/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/strcmp/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/subtest/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/subtest/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/testlib/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/testlib/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/.prev_CMakeLists.txt12
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt14
-rw-r--r--tests/auto/testlib/selftests/verbose1/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/verbose1/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/verbose2/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/verbose2/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt18
-rw-r--r--tests/auto/testlib/selftests/warnings/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/warnings/CMakeLists.txt17
-rw-r--r--tests/auto/testlib/selftests/watchdog/.prev_CMakeLists.txt20
-rw-r--r--tests/auto/testlib/selftests/watchdog/CMakeLists.txt22
-rw-r--r--tests/auto/testlib/selftests/xunit/.prev_CMakeLists.txt15
-rw-r--r--tests/auto/testlib/selftests/xunit/CMakeLists.txt17
-rw-r--r--tests/auto/tools/CMakeLists.txt17
-rw-r--r--tests/auto/tools/moc/allmocs_baseline_in.json2299
-rw-r--r--tests/auto/tools/moc/fwdclass1.h (renamed from tests/auto/tools/moc/task189996.h)25
-rw-r--r--tests/auto/tools/moc/fwdclass2.h (renamed from tests/auto/opengl/qglthreads/tst_qglthreads.h)27
-rw-r--r--tests/auto/tools/moc/fwdclass3.h38
-rw-r--r--tests/auto/tools/moc/moc.pro5
-rw-r--r--tests/auto/tools/moc/moc_include.h74
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp135
-rw-r--r--tests/auto/tools/qdbuscpp2xml/CMakeLists.txt26
-rw-r--r--tests/auto/tools/qdbusxml2cpp/CMakeLists.txt10
-rw-r--r--tests/auto/tools/qmake/.prev_CMakeLists.txt39
-rw-r--r--tests/auto/tools/qmake/CMakeLists.txt42
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp3
-rw-r--r--tests/auto/tools/qmakelib/CMakeLists.txt34
-rw-r--r--tests/auto/tools/uic/CMakeLists.txt10
-rw-r--r--tests/auto/widgets/CMakeLists.txt10
-rw-r--r--tests/auto/widgets/dialogs/CMakeLists.txt19
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/dialogs/qdialog/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt27
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt39
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/dialogs/qwizard/CMakeLists.txt30
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp7
-rw-r--r--tests/auto/widgets/effects/CMakeLists.txt2
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/graphicsview/CMakeLists.txt26
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt27
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt77
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt23
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt32
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp8
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/itemviews/CMakeLists.txt21
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt49
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt22
-rw-r--r--tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qitemview/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qlistview/CMakeLists.txt25
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/itemviews/qtableview/CMakeLists.txt17
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp6
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/kernel/CMakeLists.txt23
-rw-r--r--tests/auto/widgets/kernel/kernel.pro13
-rw-r--r--tests/auto/widgets/kernel/qaction/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp160
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp192
-rw-r--r--tests/auto/widgets/kernel/qapplication/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/.prev_CMakeLists.txt16
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/.prev_CMakeLists.txt17
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt19
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt42
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt43
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/kernel/qformlayout/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp20
-rw-r--r--tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt20
-rw-r--r--tests/auto/widgets/kernel/qlayout/CMakeLists.txt39
-rw-r--r--tests/auto/widgets/kernel/qshortcut/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt17
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/kernel/qtooltip/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/kernel/qwidget/CMakeLists.txt57
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/styles/CMakeLists.txt12
-rw-r--r--tests/auto/widgets/styles/qmacstyle/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/styles/qstyle/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/styles/qstyleoption/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt37
-rw-r--r--tests/auto/widgets/util/CMakeLists.txt7
-rw-r--r--tests/auto/widgets/util/qcompleter/CMakeLists.txt17
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp4
-rw-r--r--tests/auto/widgets/util/qscroller/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/util/qundogroup/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/util/qundostack/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/CMakeLists.txt55
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp22
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp37
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qcombobox/CMakeLists.txt24
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp8
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp50
-rw-r--r--tests/auto/widgets/widgets/qdial/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt16
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp10
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qframe/CMakeLists.txt20
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qlabel/CMakeLists.txt27
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp16
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qlineedit/CMakeLists.txt25
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp30
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt32
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp24
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt19
-rw-r--r--tests/auto/widgets/widgets/qmenu/CMakeLists.txt30
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp9
-rw-r--r--tests/auto/widgets/widgets/qmenubar/CMakeLists.txt24
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp12
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro2
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt25
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp14
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp5
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt14
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/widgets/qslider/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qspinbox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp15
-rw-r--r--tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qsplitter/CMakeLists.txt18
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qtabbar/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt24
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt37
-rw-r--r--tests/auto/widgets/widgets/qtextedit/CMakeLists.txt28
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt15
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt13
-rw-r--r--tests/auto/widgets/widgets/widgets.pro3
-rw-r--r--tests/auto/xml/CMakeLists.txt4
-rw-r--r--tests/auto/xml/dom/CMakeLists.txt3
-rw-r--r--tests/auto/xml/dom/qdom/CMakeLists.txt21
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp8
-rw-r--r--tests/auto/xml/sax/CMakeLists.txt7
-rw-r--r--tests/auto/xml/sax/qxml/CMakeLists.txt16
-rw-r--r--tests/auto/xml/sax/qxmlinputsource/CMakeLists.txt13
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/CMakeLists.txt27
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/CMakeLists.txt19
-rw-r--r--tests/baselineserver/shared/baselineprotocol.cpp4
-rw-r--r--tests/benchmarks/CMakeLists.txt19
-rw-r--r--tests/benchmarks/corelib/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/codecs/CMakeLists.txt3
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/io/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/io/qdir/CMakeLists.txt3
-rw-r--r--tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt28
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt21
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp31
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro6
-rw-r--r--tests/benchmarks/corelib/io/qfile/CMakeLists.txt24
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt16
-rw-r--r--tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/io/qprocess/CMakeLists.txt4
-rw-r--r--tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt13
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt21
-rw-r--r--tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/io/qurl/CMakeLists.txt23
-rw-r--r--tests/benchmarks/corelib/json/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/kernel/CMakeLists.txt11
-rw-r--r--tests/benchmarks/corelib/kernel/events/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt17
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt18
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/main.cpp47
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt17
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt18
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt21
-rw-r--r--tests/benchmarks/corelib/mimetypes/CMakeLists.txt3
-rw-r--r--tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/plugin/CMakeLists.txt3
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/text/CMakeLists.txt10
-rw-r--r--tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt16
-rw-r--r--tests/benchmarks/corelib/text/qchar/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/text/qlocale/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/text/qregexp/CMakeLists.txt46
-rw-r--r--tests/benchmarks/corelib/text/qstring/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt18
-rw-r--r--tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/thread/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt16
-rw-r--r--tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/time/CMakeLists.txt5
-rw-r--r--tests/benchmarks/corelib/time/qdate/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/tools/CMakeLists.txt13
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/tools/qchar/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qhash/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/tools/qlist/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qmap/CMakeLists.txt14
-rw-r--r--tests/benchmarks/corelib/tools/qrect/CMakeLists.txt15
-rw-r--r--tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt16
-rw-r--r--tests/benchmarks/corelib/tools/qset/CMakeLists.txt12
-rw-r--r--tests/benchmarks/corelib/tools/qstack/CMakeLists.txt13
-rw-r--r--tests/benchmarks/corelib/tools/qstring/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt1
-rw-r--r--tests/benchmarks/corelib/tools/qvector/CMakeLists.txt16
-rw-r--r--tests/benchmarks/corelib/tools/qvector/outofline.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h75
-rw-r--r--tests/benchmarks/dbus/CMakeLists.txt6
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt4
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt15
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt14
-rw-r--r--tests/benchmarks/dbus/qdbustype/CMakeLists.txt29
-rw-r--r--tests/benchmarks/gui/CMakeLists.txt8
-rw-r--r--tests/benchmarks/gui/animation/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/animation/qanimation/CMakeLists.txt17
-rw-r--r--tests/benchmarks/gui/image/CMakeLists.txt8
-rw-r--r--tests/benchmarks/gui/image/blendbench/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt30
-rw-r--r--tests/benchmarks/gui/image/qimagereader/CMakeLists.txt31
-rw-r--r--tests/benchmarks/gui/image/qimagescale/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/image/qpixmap/CMakeLists.txt17
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/kernel/CMakeLists.txt4
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/math3d/CMakeLists.txt4
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/painting/CMakeLists.txt11
-rw-r--r--tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt17
-rw-r--r--tests/benchmarks/gui/painting/lancebench/CMakeLists.txt157
-rw-r--r--tests/benchmarks/gui/painting/lancebench/lancebench.pro2
-rw-r--r--tests/benchmarks/gui/painting/qcolor/CMakeLists.txt17
-rw-r--r--tests/benchmarks/gui/painting/qpainter/CMakeLists.txt19
-rw-r--r--tests/benchmarks/gui/painting/qregion/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/painting/qtbench/CMakeLists.txt17
-rw-r--r--tests/benchmarks/gui/painting/qtransform/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/text/CMakeLists.txt5
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt16
-rw-r--r--tests/benchmarks/gui/text/qtext/CMakeLists.txt18
-rw-r--r--tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt17
-rw-r--r--tests/benchmarks/network/CMakeLists.txt23
-rw-r--r--tests/benchmarks/network/access/CMakeLists.txt6
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt16
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp6
-rw-r--r--tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt16
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt18
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp34
-rw-r--r--tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt13
-rw-r--r--tests/benchmarks/network/kernel/CMakeLists.txt5
-rw-r--r--tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt18
-rw-r--r--tests/benchmarks/network/socket/CMakeLists.txt4
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt16
-rw-r--r--tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt16
-rw-r--r--tests/benchmarks/network/ssl/CMakeLists.txt3
-rw-r--r--tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt16
-rw-r--r--tests/benchmarks/opengl/CMakeLists.txt22
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt17
-rw-r--r--tests/benchmarks/sql/CMakeLists.txt3
-rw-r--r--tests/benchmarks/sql/kernel/CMakeLists.txt4
-rw-r--r--tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt15
-rw-r--r--tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt15
-rw-r--r--tests/benchmarks/testlib/CMakeLists.txt3
-rw-r--r--tests/benchmarks/testlib/tostring/CMakeLists.txt12
-rw-r--r--tests/benchmarks/widgets/CMakeLists.txt7
-rw-r--r--tests/benchmarks/widgets/graphicsview/CMakeLists.txt10
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt2
-rw-r--r--tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt367
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt55
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt48
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt13
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt13
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp7
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h1
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp21
-rw-r--r--tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/itemviews/CMakeLists.txt5
-rw-r--r--tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/kernel/CMakeLists.txt4
-rw-r--r--tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt14
-rw-r--r--tests/benchmarks/widgets/styles/CMakeLists.txt5
-rw-r--r--tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt17
-rw-r--r--tests/benchmarks/widgets/widgets/CMakeLists.txt3
-rw-r--r--tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt17
-rw-r--r--tests/manual/CMakeLists.txt86
-rw-r--r--tests/manual/bearerex/CMakeLists.txt25
-rw-r--r--tests/manual/cocoa/appicon/CMakeLists.txt17
-rw-r--r--tests/manual/cocoa/menurama/CMakeLists.txt21
-rw-r--r--tests/manual/cocoa/menurama/menurama.pro4
-rw-r--r--tests/manual/cocoa/menus/CMakeLists.txt16
-rw-r--r--tests/manual/cocoa/nativewidgets/CMakeLists.txt17
-rw-r--r--tests/manual/cocoa/popups/CMakeLists.txt13
-rw-r--r--tests/manual/cocoa/qmaccocoaviewcontainer/CMakeLists.txt21
-rw-r--r--tests/manual/cocoa/qsystemtrayicon/CMakeLists.txt38
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt22
-rw-r--r--tests/manual/cocoa/wheelevent/CMakeLists.txt20
-rw-r--r--tests/manual/corelib/tools/qhash/main.cpp1
-rw-r--r--tests/manual/corelib/tools/qlist/main.cpp3
-rw-r--r--tests/manual/corelib/tools/qset/main.cpp1
-rw-r--r--tests/manual/corelib/tools/qvarlengtharray/main.cpp1
-rw-r--r--tests/manual/corelib/tools/qvector/main.cpp1
-rw-r--r--tests/manual/diaglib/debugproxystyle.cpp4
-rw-r--r--tests/manual/diaglib/diaglib.pri27
-rw-r--r--tests/manual/diaglib/nativewindowdump_win.cpp2
-rw-r--r--tests/manual/diaglib/qwidgetdump.cpp6
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp9
-rw-r--r--tests/manual/diaglib/textdump.cpp6
-rw-r--r--tests/manual/dialogs/CMakeLists.txt38
-rw-r--r--tests/manual/dialogs/dialogs.pro8
-rw-r--r--tests/manual/dialogs/messageboxpanel.cpp4
-rw-r--r--tests/manual/dialogs/printdialogpanel.cpp3
-rw-r--r--tests/manual/embeddedintoforeignwindow/CMakeLists.txt57
-rw-r--r--tests/manual/filetest/CMakeLists.txt13
-rw-r--r--tests/manual/foreignwindows/CMakeLists.txt57
-rw-r--r--tests/manual/gestures/CMakeLists.txt4
-rw-r--r--tests/manual/gestures/graphicsview/CMakeLists.txt17
-rw-r--r--tests/manual/gestures/graphicsview/graphicsview.pro2
-rw-r--r--tests/manual/gestures/scrollarea/CMakeLists.txt15
-rw-r--r--tests/manual/highdpi/CMakeLists.txt40
-rw-r--r--tests/manual/highdpi/main.cpp2
-rw-r--r--tests/manual/inputmethodhints/CMakeLists.txt20
-rw-r--r--tests/manual/keypadnavigation/CMakeLists.txt17
-rw-r--r--tests/manual/lance/CMakeLists.txt175
-rw-r--r--tests/manual/lance/lance.pro2
-rw-r--r--tests/manual/lance/main.cpp32
-rw-r--r--tests/manual/manual.pro4
-rw-r--r--tests/manual/markdown/CMakeLists.txt18
-rw-r--r--tests/manual/network_remote_stresstest/CMakeLists.txt28
-rw-r--r--tests/manual/network_stresstest/CMakeLists.txt33
-rw-r--r--tests/manual/qcursor/CMakeLists.txt8
-rw-r--r--tests/manual/qcursor/allcursors/CMakeLists.txt20
-rw-r--r--tests/manual/qcursor/childwidget/CMakeLists.txt19
-rw-r--r--tests/manual/qcursor/childwidget/childwidget.pro2
-rw-r--r--tests/manual/qcursor/childwindow/CMakeLists.txt18
-rw-r--r--tests/manual/qcursor/childwindowcontainer/CMakeLists.txt19
-rw-r--r--tests/manual/qcursor/grab_override/CMakeLists.txt33
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt26
-rw-r--r--tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro3
-rw-r--r--tests/manual/qdesktopservices/CMakeLists.txt19
-rw-r--r--tests/manual/qdesktopservices/qdesktopservices.pro2
-rw-r--r--tests/manual/qdesktopwidget/CMakeLists.txt17
-rw-r--r--tests/manual/qgraphicsitem/CMakeLists.txt14
-rw-r--r--tests/manual/qgraphicsitemgroup/CMakeLists.txt21
-rw-r--r--tests/manual/qgraphicslayout/flicker/CMakeLists.txt15
-rw-r--r--tests/manual/qhttpnetworkconnection/CMakeLists.txt16
-rw-r--r--tests/manual/qhttpnetworkconnection/main.cpp2
-rw-r--r--tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro2
-rw-r--r--tests/manual/qimagereader/CMakeLists.txt14
-rw-r--r--tests/manual/qlayout/CMakeLists.txt21
-rw-r--r--tests/manual/qlocale/CMakeLists.txt22
-rw-r--r--tests/manual/qmetatype/CMakeLists.txt12
-rw-r--r--tests/manual/qmimedatabase/CMakeLists.txt13
-rw-r--r--tests/manual/qnetconmonitor/.prev_CMakeLists.txt16
-rw-r--r--tests/manual/qnetconmonitor/CMakeLists.txt22
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt17
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.cpp52
-rw-r--r--tests/manual/qnetworkconfiguration/CMakeLists.txt16
-rw-r--r--tests/manual/qnetworkconfiguration/qnetworkconfiguration.pro2
-rw-r--r--tests/manual/qnetworkconfigurationmanager/CMakeLists.txt16
-rw-r--r--tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro2
-rw-r--r--tests/manual/qnetworkreply/.prev_CMakeLists.txt18
-rw-r--r--tests/manual/qnetworkreply/CMakeLists.txt24
-rw-r--r--tests/manual/qnetworkreply/main.cpp204
-rw-r--r--tests/manual/qnetworkreply/qnetworkreply.pro2
-rw-r--r--tests/manual/qopenglcontext/CMakeLists.txt19
-rw-r--r--tests/manual/qopengltextureblitter/.prev_CMakeLists.txt20
-rw-r--r--tests/manual/qopengltextureblitter/CMakeLists.txt21
-rw-r--r--tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp2
-rw-r--r--tests/manual/qopenglwidget/openglwidget/CMakeLists.txt21
-rw-r--r--tests/manual/qopenglwindow/multiwindow/CMakeLists.txt16
-rw-r--r--tests/manual/qprintdevice_dump/CMakeLists.txt17
-rw-r--r--tests/manual/qscreen/CMakeLists.txt18
-rw-r--r--tests/manual/qscreen/main.cpp14
-rw-r--r--tests/manual/qssloptions/CMakeLists.txt13
-rw-r--r--tests/manual/qssloptions/main.cpp14
-rw-r--r--tests/manual/qsslsocket/CMakeLists.txt12
-rw-r--r--tests/manual/qsslsocket/qsslsocket.pro2
-rw-r--r--tests/manual/qstorageinfo/CMakeLists.txt10
-rw-r--r--tests/manual/qsysinfo/CMakeLists.txt13
-rw-r--r--tests/manual/qt_poll/CMakeLists.txt16
-rw-r--r--tests/manual/qtabbar/CMakeLists.txt20
-rw-r--r--tests/manual/qtabletevent/CMakeLists.txt5
-rw-r--r--tests/manual/qtabletevent/device_information/CMakeLists.txt15
-rw-r--r--tests/manual/qtabletevent/event_compression/CMakeLists.txt15
-rw-r--r--tests/manual/qtabletevent/regular_widgets/CMakeLists.txt17
-rw-r--r--tests/manual/qtbug-52641/CMakeLists.txt17
-rw-r--r--tests/manual/qtbug-8933/CMakeLists.txt20
-rw-r--r--tests/manual/qtexteditlist/CMakeLists.txt20
-rw-r--r--tests/manual/qtexteditlist/qtexteditlist.pro2
-rw-r--r--tests/manual/qtexttableborders/CMakeLists.txt35
-rw-r--r--tests/manual/qtexttableborders/qtexttableborders.pro3
-rw-r--r--tests/manual/qtouchevent/CMakeLists.txt18
-rw-r--r--tests/manual/qtouchevent/qtouchevent.pro3
-rw-r--r--tests/manual/qvulkaninstance/CMakeLists.txt17
-rw-r--r--tests/manual/qwidget_zorder/CMakeLists.txt14
-rw-r--r--tests/manual/repaint/CMakeLists.txt9
-rw-r--r--tests/manual/repaint/mainwindow/CMakeLists.txt15
-rw-r--r--tests/manual/repaint/mainwindow/mainwindow.pro1
-rw-r--r--tests/manual/repaint/scrollarea/CMakeLists.txt15
-rw-r--r--tests/manual/repaint/scrollarea/scrollarea.pro1
-rw-r--r--tests/manual/repaint/splitter/CMakeLists.txt15
-rw-r--r--tests/manual/repaint/tableview/CMakeLists.txt15
-rw-r--r--tests/manual/repaint/task141091/CMakeLists.txt13
-rw-r--r--tests/manual/repaint/toplevel/CMakeLists.txt14
-rw-r--r--tests/manual/repaint/toplevel/toplevel.pro1
-rw-r--r--tests/manual/repaint/widget/CMakeLists.txt15
-rw-r--r--tests/manual/rhi/CMakeLists.txt23
-rw-r--r--tests/manual/rhi/compressedtexture_bc1/CMakeLists.txt41
-rw-r--r--tests/manual/rhi/compressedtexture_bc1_subupload/CMakeLists.txt45
-rw-r--r--tests/manual/rhi/computebuffer/CMakeLists.txt32
-rw-r--r--tests/manual/rhi/computeimage/CMakeLists.txt42
-rw-r--r--tests/manual/rhi/cubemap/CMakeLists.txt32
-rw-r--r--tests/manual/rhi/cubemap_scissor/CMakeLists.txt41
-rw-r--r--tests/manual/rhi/floattexture/CMakeLists.txt41
-rw-r--r--tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt38
-rw-r--r--tests/manual/rhi/instancing/CMakeLists.txt31
-rw-r--r--tests/manual/rhi/mrt/CMakeLists.txt39
-rw-r--r--tests/manual/rhi/msaarenderbuffer/CMakeLists.txt45
-rw-r--r--tests/manual/rhi/msaatexture/CMakeLists.txt49
-rw-r--r--tests/manual/rhi/multiwindow/CMakeLists.txt38
-rw-r--r--tests/manual/rhi/multiwindow_threaded/CMakeLists.txt43
-rw-r--r--tests/manual/rhi/offscreen/CMakeLists.txt36
-rw-r--r--tests/manual/rhi/qrhiprof/CMakeLists.txt19
-rw-r--r--tests/manual/rhi/shadowmap/CMakeLists.txt33
-rw-r--r--tests/manual/rhi/texuploads/CMakeLists.txt41
-rw-r--r--tests/manual/rhi/triquadcube/CMakeLists.txt53
-rw-r--r--tests/manual/shortcuts/CMakeLists.txt17
-rw-r--r--tests/manual/socketengine/.prev_CMakeLists.txt17
-rw-r--r--tests/manual/socketengine/CMakeLists.txt23
-rw-r--r--tests/manual/textrendering/CMakeLists.txt5
-rw-r--r--tests/manual/textrendering/glyphshaping/CMakeLists.txt19
-rw-r--r--tests/manual/textrendering/nativetext/CMakeLists.txt28
-rw-r--r--tests/manual/textrendering/textperformance/CMakeLists.txt14
-rw-r--r--tests/manual/touch/CMakeLists.txt16
-rw-r--r--tests/manual/touch/main.cpp2
-rw-r--r--tests/manual/touch/touch.pro3
-rw-r--r--tests/manual/touchGraphicsItem/CMakeLists.txt19
-rw-r--r--tests/manual/transientwindow/CMakeLists.txt18
-rw-r--r--tests/manual/triangulator/CMakeLists.txt19
-rw-r--r--tests/manual/unc/CMakeLists.txt17
-rw-r--r--tests/manual/unc/unc.pro3
-rw-r--r--tests/manual/widgetgrab/CMakeLists.txt17
-rw-r--r--tests/manual/widgetgrab/widgetgrab.pro6
-rw-r--r--tests/manual/widgets/CMakeLists.txt7
-rw-r--r--tests/manual/widgets/itemviews/CMakeLists.txt8
-rw-r--r--tests/manual/widgets/itemviews/autoResizePrecision/tablehorz/CMakeLists.txt14
-rw-r--r--tests/manual/widgets/itemviews/autoResizePrecision/tablevert/CMakeLists.txt14
-rw-r--r--tests/manual/widgets/itemviews/autoResizePrecision/treeview/CMakeLists.txt14
-rw-r--r--tests/manual/widgets/itemviews/delegate/CMakeLists.txt17
-rw-r--r--tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/CMakeLists.txt19
-rw-r--r--tests/manual/widgets/itemviews/qheaderview/CMakeLists.txt17
-rw-r--r--tests/manual/widgets/itemviews/qtreeview/CMakeLists.txt17
-rw-r--r--tests/manual/widgets/itemviews/qtreewidget/CMakeLists.txt18
-rw-r--r--tests/manual/widgets/itemviews/tableview-span-navigation/CMakeLists.txt19
-rw-r--r--tests/manual/widgets/kernel/CMakeLists.txt5
-rw-r--r--tests/manual/widgets/kernel/layoutreplace/CMakeLists.txt14
-rw-r--r--tests/manual/widgets/kernel/qtooltip/CMakeLists.txt14
-rw-r--r--tests/manual/widgets/kernel/sizeonhide/CMakeLists.txt18
-rw-r--r--tests/manual/widgets/qgraphicsview/CMakeLists.txt3
-rw-r--r--tests/manual/widgets/qgraphicsview/rubberband/CMakeLists.txt17
-rw-r--r--tests/manual/widgets/styles/CMakeLists.txt15
-rw-r--r--tests/manual/widgets/styles/styles.pro1
-rw-r--r--tests/manual/widgets/widgets.pro3
-rw-r--r--tests/manual/widgets/widgets/CMakeLists.txt6
-rw-r--r--tests/manual/widgets/widgets/bigmenucreator/CMakeLists.txt22
-rw-r--r--tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro4
-rw-r--r--tests/manual/widgets/widgets/defaultUpMenuBar/CMakeLists.txt17
-rw-r--r--tests/manual/widgets/widgets/multiscreen-menus/CMakeLists.txt20
-rw-r--r--tests/manual/widgets/widgets/qmainwindow/saveStateSize/CMakeLists.txt17
-rw-r--r--tests/manual/widgets/widgets/qtoolbutton/menuOnMultiScreens/CMakeLists.txt17
-rw-r--r--tests/manual/windowchildgeometry/CMakeLists.txt23
-rw-r--r--tests/manual/windowchildgeometry/windowchildgeometry.pro3
-rw-r--r--tests/manual/windowflags/CMakeLists.txt17
-rw-r--r--tests/manual/windowflags/previewwindow.cpp8
-rw-r--r--tests/manual/windowflags/windowflags.pro4
-rw-r--r--tests/manual/windowgeometry/CMakeLists.txt21
-rw-r--r--tests/manual/windowgeometry/windowgeometry.pro3
-rw-r--r--tests/manual/windowmodality/CMakeLists.txt19
-rw-r--r--tests/manual/windowmodality/windowmodality.pro2
-rw-r--r--tests/manual/windowtransparency/CMakeLists.txt13
-rw-r--r--tests/manual/xcb_gl_integration/CMakeLists.txt19
-rw-r--r--tests/manual/xembed-raster/CMakeLists.txt17
-rw-r--r--tests/manual/xembed-raster/xembed-raster.pro2
-rw-r--r--tests/manual/xembed-widgets/CMakeLists.txt18
-rw-r--r--tests/manual/xembed-widgets/xembed-widgets.pro2
1358 files changed, 26439 insertions, 14440 deletions
diff --git a/tests/.prev_CMakeLists.txt b/tests/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..221413713e
--- /dev/null
+++ b/tests/.prev_CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from tests.pro.
+
+if(QT_BUILD_STANDALONE_TESTS)
+ # Add qt_find_package calls for extra dependencies that need to be found when building
+ # the standalone tests here.
+endif()
+qt_build_tests()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000000..d1a395c9f3
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from tests.pro.
+
+if(QT_BUILD_STANDALONE_TESTS)
+ # Add qt_find_package calls for extra dependencies that need to be found when building
+ # the standalone tests here.
+ # special case begin
+ qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1)
+ qt_find_package(ICU COMPONENTS i18n uc data PROVIDED_TARGETS ICU::i18n ICU::uc ICU::data)
+ qt_find_package(Threads PROVIDED_TARGETS Threads::Threads)
+ qt_find_package(OpenSSL PROVIDED_TARGETS OpenSSL::OpenSSL)
+ # special case end
+endif()
+qt_build_tests()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
new file mode 100644
index 0000000000..64996503eb
--- /dev/null
+++ b/tests/auto/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Generated from auto.pro.
+
+add_subdirectory(corelib)
+if (QT_FEATURE_dbus)
+ set(run_dbus_tests ON)
+ if(NOT CMAKE_CROSSCOMPILING AND TARGET Qt::DBus)
+ execute_process(COMMAND dbus-send --session --type=signal / local.AutotestCheck.Hello
+ RESULT_VARIABLE dbus_session_test
+ OUTPUT_QUIET ERROR_QUIET)
+ if(NOT "${dbus_session_test}" STREQUAL "0")
+ set(run_dbus_tests OFF)
+ if(QT_FEATURE_dbus_linked)
+ message(WARNING
+ " QtDBus is enabled but session bus is not available for testing.\n"
+ " Please check the installation. Skipping QtDBus tests.")
+ else()
+ message(WARNING
+ " QtDBus is enabled with runtime support, but session bus is not available.\n"
+ " Skipping QtDBus tests.")
+ endif()
+ endif()
+ endif()
+ if(run_dbus_tests)
+ add_subdirectory(dbus)
+ endif()
+endif()
+if (TARGET Qt::Gui)
+ add_subdirectory(gui)
+endif()
+
+# special case begin
+# Build only corelib and gui tests when targeting uikit (iOS),
+# because the script can't handle the SUBDIRS assignment well.
+if (APPLE_UIKIT)
+ return()
+endif()
+# special case end
+
+if (TARGET Qt::Network AND NOT WINRT)
+ add_subdirectory(network)
+endif()
+if (TARGET Qt::OpenGL AND NOT WINRT)
+ add_subdirectory(opengl)
+endif()
+if (TARGET Qt::Sql)
+ add_subdirectory(sql)
+endif()
+add_subdirectory(testlib)
+if (NOT CMAKE_CROSSCOMPILE AND QT_FEATURE_process)
+ add_subdirectory(tools)
+endif()
+if (TARGET Qt::Xml)
+ add_subdirectory(xml)
+endif()
+if (TARGET Qt::Concurrent)
+ add_subdirectory(concurrent)
+endif()
+add_subdirectory(other)
+if (TARGET Qt::Widgets)
+ add_subdirectory(widgets)
+endif()
+if (TARGET Qt::PrintSupport)
+ add_subdirectory(printsupport)
+endif()
+# add_subdirectory(cmake) ## FIXME: Does this still make sense in this form?
+# add_subdirectory(installed_cmake) ## FIXME: Does this still make sense in this form?
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 9eb741edac..c9d1da8649 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,5 +1,9 @@
TEMPLATE = subdirs
+# Tests with developer-build started failing on qemu-armv7/armv8 after commit
+# b88acae7a8e773c307e44f84da037d01d19e60f7 in qt5.
+boot2qt:qtConfig(private_tests): return()
+
SUBDIRS += \
corelib \
dbus \
diff --git a/tests/auto/concurrent/CMakeLists.txt b/tests/auto/concurrent/CMakeLists.txt
new file mode 100644
index 0000000000..ae1e256bbd
--- /dev/null
+++ b/tests/auto/concurrent/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from concurrent.pro.
+
+add_subdirectory(qtconcurrentfilter)
+add_subdirectory(qtconcurrentiteratekernel)
+add_subdirectory(qtconcurrentmap)
+add_subdirectory(qtconcurrentmedian)
+add_subdirectory(qtconcurrentrun)
+add_subdirectory(qtconcurrentthreadengine)
diff --git a/tests/auto/concurrent/qtconcurrentfilter/.prev_CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfilter/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..62b0308851
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentfilter/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtconcurrentfilter.pro.
+
+#####################################################################
+## tst_qtconcurrentfilter Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentfilter
+ SOURCES
+ tst_qtconcurrentfilter.cpp
+ DEFINES
+ -QT_NO_LINKED_LIST
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
diff --git a/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
new file mode 100644
index 0000000000..9da443a3f9
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentfilter/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtconcurrentfilter.pro.
+
+#####################################################################
+## tst_qtconcurrentfilter Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentfilter
+ SOURCES
+ tst_qtconcurrentfilter.cpp
+ DEFINES
+ # -QT_NO_LINKED_LIST # special case remove until figured out how to deal with this
+ QT_STRICT_ITERATORS
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
diff --git a/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro b/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro
index 15345d40db..f2e3e0c8e1 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro
+++ b/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_qtconcurrentfilter
QT = core testlib concurrent
SOURCES = tst_qtconcurrentfilter.cpp
-DEFINES += QT_STRICT_ITERATORS
-DEFINES -= QT_NO_LINKED_LIST
diff --git a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 84ebd46886..e6ac829230 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -28,7 +28,6 @@
#include <qtconcurrentfilter.h>
#include <QCoreApplication>
#include <QList>
-#include <QLinkedList>
#include <QtTest/QtTest>
#include "../qtconcurrentmap/functions.h"
@@ -63,18 +62,6 @@ void tst_QtConcurrentFilter::filter()
QCOMPARE(list, QList<int>() << 2 << 4);
}
{
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::filter(linkedList, KeepEvenIntegers()).waitForFinished();
- QCOMPARE(linkedList, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::blockingFilter(linkedList, KeepEvenIntegers());
- QCOMPARE(linkedList, QLinkedList<int>() << 2 << 4);
- }
- {
QVector<int> vector;
vector << 1 << 2 << 3 << 4;
QtConcurrent::filter(vector, KeepEvenIntegers()).waitForFinished();
@@ -100,18 +87,6 @@ void tst_QtConcurrentFilter::filter()
QtConcurrent::blockingFilter(list, keepEvenIntegers);
QCOMPARE(list, QList<int>() << 2 << 4);
}
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::filter(linkedList, keepEvenIntegers).waitForFinished();
- QCOMPARE(linkedList, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::blockingFilter(linkedList, keepEvenIntegers);
- QCOMPARE(linkedList, QLinkedList<int>() << 2 << 4);
- }
// bound function
{
@@ -126,18 +101,6 @@ void tst_QtConcurrentFilter::filter()
QtConcurrent::blockingFilter(list, keepEvenIntegers);
QCOMPARE(list, QList<int>() << 2 << 4);
}
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::filter(linkedList, keepEvenIntegers).waitForFinished();
- QCOMPARE(linkedList, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::blockingFilter(linkedList, keepEvenIntegers);
- QCOMPARE(linkedList, QLinkedList<int>() << 2 << 4);
- }
// member
{
@@ -152,18 +115,6 @@ void tst_QtConcurrentFilter::filter()
QtConcurrent::blockingFilter(list, &Number::isEven);
QCOMPARE(list, QList<Number>() << 2 << 4);
}
- {
- QLinkedList<Number> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::filter(linkedList, &Number::isEven).waitForFinished();
- QCOMPARE(linkedList, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QtConcurrent::blockingFilter(linkedList, &Number::isEven);
- QCOMPARE(linkedList, QLinkedList<Number>() << 2 << 4);
- }
}
void tst_QtConcurrentFilter::filtered()
@@ -219,19 +170,6 @@ void tst_QtConcurrentFilter::filtered()
QCOMPARE(f.results(), QList<int>() << 2 << 4);
}
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered(linkedList, KeepEvenIntegers());
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QFuture<int> f = QtConcurrent::filtered(linkedList, KeepEvenIntegers());
- QCOMPARE(f.results(), QList<int>() << 2 << 4);
- }
-
// function
{
QFuture<int> f = QtConcurrent::filtered(list, keepEvenIntegers);
@@ -351,172 +289,6 @@ void tst_QtConcurrentFilter::filtered()
&Number::isEven);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
-
- // same thing on linked lists
-
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
-
- // functor
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList, KeepEvenIntegers());
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers());
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers());
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered(linkedList, KeepEvenIntegers());
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<int> >(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers());
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<int> >(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers());
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
-
- // function
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList, keepEvenIntegers);
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers);
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers);
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered(linkedList, keepEvenIntegers);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<int> >(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<int> >(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
-
- // bound function
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList, keepEvenIntegers);
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers);
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QFuture<int> f = QtConcurrent::filtered(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers);
- QList<int> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered(linkedList, keepEvenIntegers);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<int> >(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<int> >(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
-
- // const member function
- {
- QLinkedList<Number> integers;
- integers << 1 << 2 << 3 << 4;
- QFuture<Number> f = QtConcurrent::filtered(integers, &Number::isEven);
- QList<Number> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> integers;
- integers << 1 << 2 << 3 << 4;
- QFuture<Number> f = QtConcurrent::filtered(integers.begin(),
- integers.end(),
- &Number::isEven);
- QList<Number> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> integers;
- integers << 1 << 2 << 3 << 4;
- QFuture<Number> f = QtConcurrent::filtered(integers.constBegin(),
- integers.constEnd(),
- &Number::isEven);
- QList<Number> linkedList2 = f.results();
- QCOMPARE(linkedList2, QList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> integers;
- integers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::blockingFiltered(integers, &Number::isEven);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> integers;
- integers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::blockingFiltered<QLinkedList<Number> >(integers.begin(),
- integers.end(),
- &Number::isEven);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> integers;
- integers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 =
- QtConcurrent::blockingFiltered<QLinkedList<Number> >(integers.constBegin(),
- integers.constEnd(),
- &Number::isEven);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
}
void tst_QtConcurrentFilter::filteredReduced()
@@ -714,16 +486,17 @@ void tst_QtConcurrentFilter::filteredReduced()
QCOMPARE(sum, 6);
}
+ auto push_back = static_cast<void (QVector<int>::*)(const int &)>(&QVector<int>::push_back);
// functor-member
{
- QList<int> list2 = QtConcurrent::filteredReduced(list, KeepEvenIntegers(), &QList<int>::push_back, QtConcurrent::OrderedReduce);
+ QList<int> list2 = QtConcurrent::filteredReduced(list, KeepEvenIntegers(), push_back, QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
{
QList<int> list2 = QtConcurrent::filteredReduced(list.begin(),
list.end(),
KeepEvenIntegers(),
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
@@ -731,19 +504,19 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<int> list2 = QtConcurrent::filteredReduced(list.constBegin(),
list.constEnd(),
KeepEvenIntegers(),
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
{
- QList<int> list2 = QtConcurrent::blockingFilteredReduced(list, KeepEvenIntegers(), &QList<int>::push_back, QtConcurrent::OrderedReduce);
+ QList<int> list2 = QtConcurrent::blockingFilteredReduced(list, KeepEvenIntegers(), push_back, QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
{
QList<int> list2 = QtConcurrent::blockingFilteredReduced(list.begin(),
list.end(),
KeepEvenIntegers(),
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
@@ -751,7 +524,7 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<int> list2 = QtConcurrent::blockingFilteredReduced(list.constBegin(),
list.constEnd(),
KeepEvenIntegers(),
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
@@ -805,12 +578,15 @@ void tst_QtConcurrentFilter::filteredReduced()
}
// member-member
+
+ auto push_back_number = static_cast<void (QVector<Number>::*)(const Number &)>(&QVector<Number>::push_back);
+
{
QList<Number> numbers;
numbers << 1 << 2 << 3 << 4;
QList<Number> list2 = QtConcurrent::filteredReduced(numbers,
&Number::isEven,
- &QList<Number>::push_back, QtConcurrent::OrderedReduce);
+ push_back_number, QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
{
@@ -819,7 +595,7 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<Number> list2 = QtConcurrent::filteredReduced(numbers.begin(),
numbers.end(),
&Number::isEven,
- &QList<Number>::push_back,
+ push_back_number,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
@@ -829,7 +605,7 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<Number> list2 = QtConcurrent::filteredReduced(numbers.constBegin(),
numbers.constEnd(),
&Number::isEven,
- &QList<Number>::push_back,
+ push_back_number,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
@@ -838,7 +614,7 @@ void tst_QtConcurrentFilter::filteredReduced()
numbers << 1 << 2 << 3 << 4;
QList<Number> list2 = QtConcurrent::blockingFilteredReduced(numbers,
&Number::isEven,
- &QList<Number>::push_back, QtConcurrent::OrderedReduce);
+ push_back_number, QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
{
@@ -847,7 +623,7 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<Number> list2 = QtConcurrent::blockingFilteredReduced(numbers.begin(),
numbers.end(),
&Number::isEven,
- &QList<Number>::push_back,
+ push_back_number,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
@@ -857,21 +633,21 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<Number> list2 = QtConcurrent::blockingFilteredReduced(numbers.constBegin(),
numbers.constEnd(),
&Number::isEven,
- &QList<Number>::push_back,
+ push_back_number,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<Number>() << 2 << 4);
}
// function-member
{
- QList<int> list2 = QtConcurrent::filteredReduced(list, keepEvenIntegers, &QList<int>::push_back, QtConcurrent::OrderedReduce);
+ QList<int> list2 = QtConcurrent::filteredReduced(list, keepEvenIntegers, push_back, QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
{
QList<int> list2 = QtConcurrent::filteredReduced(list.begin(),
list.end(),
keepEvenIntegers,
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
@@ -879,19 +655,19 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<int> list2 = QtConcurrent::filteredReduced(list.constBegin(),
list.constEnd(),
keepEvenIntegers,
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
{
- QList<int> list2 = QtConcurrent::blockingFilteredReduced(list, keepEvenIntegers, &QList<int>::push_back, QtConcurrent::OrderedReduce);
+ QList<int> list2 = QtConcurrent::blockingFilteredReduced(list, keepEvenIntegers, push_back, QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
{
QList<int> list2 = QtConcurrent::blockingFilteredReduced(list.begin(),
list.end(),
keepEvenIntegers,
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
@@ -899,7 +675,7 @@ void tst_QtConcurrentFilter::filteredReduced()
QList<int> list2 = QtConcurrent::blockingFilteredReduced(list.constBegin(),
list.constEnd(),
keepEvenIntegers,
- &QList<int>::push_back,
+ push_back,
QtConcurrent::OrderedReduce);
QCOMPARE(list2, QList<int>() << 2 << 4);
}
@@ -952,432 +728,6 @@ void tst_QtConcurrentFilter::filteredReduced()
QCOMPARE(sum, 6);
}
- // same as above on linked lists
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3 << 4;
- QLinkedList<Number> numberLinkedList;
- numberLinkedList << 1 << 2 << 3 << 4;
-
- // functor-functor
- {
- int sum = QtConcurrent::filteredReduced<int>(linkedList, KeepEvenIntegers(), IntSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::filteredReduced<int>(linkedList, keepEvenIntegers, intSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced<int>(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers(),
- IntSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::filteredReduced<int>(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers(),
- IntSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::filteredReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(linkedList, KeepEvenIntegers(), IntSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::blockingFilteredReduced<int>(linkedList, keepEvenIntegers, intSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers(),
- IntSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::blockingFilteredReduced<int>(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers(),
- IntSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::blockingFilteredReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum2, 6);
- }
-
- // function-functor
- {
- int sum = QtConcurrent::filteredReduced<int>(linkedList, keepEvenIntegers, IntSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced<int>(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- IntSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- IntSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(linkedList, keepEvenIntegers, IntSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- IntSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- IntSumReduce());
- QCOMPARE(sum, 6);
- }
-
- // functor-function
- {
- int sum = QtConcurrent::filteredReduced(linkedList, KeepEvenIntegers(), intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers(),
- intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers(),
- intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(linkedList, KeepEvenIntegers(), intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers(),
- intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers(),
- intSumReduce);
- QCOMPARE(sum, 6);
- }
-
- // function-function
- {
- int sum = QtConcurrent::filteredReduced(linkedList, keepEvenIntegers, intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(linkedList, keepEvenIntegers, intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- intSumReduce);
- QCOMPARE(sum, 6);
- }
-
- // functor-member
- {
- QLinkedList<int> linkedList2 = QtConcurrent::filteredReduced(linkedList, KeepEvenIntegers(), &QLinkedList<int>::append, QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::filteredReduced(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers(),
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::filteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers(),
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFilteredReduced(linkedList, KeepEvenIntegers(), &QLinkedList<int>::append, QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFilteredReduced(linkedList.begin(),
- linkedList.end(),
- KeepEvenIntegers(),
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFilteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- KeepEvenIntegers(),
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
-
- // member-functor
- {
- int sum = QtConcurrent::filteredReduced<int>(numberLinkedList, &Number::isEven, NumberSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::filteredReduced<int>(QLinkedList<Number>(numberLinkedList),
- &Number::isEven,
- NumberSumReduce());
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced<int>(numberLinkedList.begin(),
- numberLinkedList.end(),
- &Number::isEven,
- NumberSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced<int>(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::isEven,
- NumberSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(numberLinkedList, &Number::isEven, NumberSumReduce());
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::blockingFilteredReduced<int>(QLinkedList<Number>(numberLinkedList),
- &Number::isEven,
- NumberSumReduce());
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(numberLinkedList.begin(),
- numberLinkedList.end(),
- &Number::isEven,
- NumberSumReduce());
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced<int>(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::isEven,
- NumberSumReduce());
- QCOMPARE(sum, 6);
- }
-
- // member-member
- {
- QLinkedList<Number> numbers;
- numbers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::filteredReduced(numbers,
- &Number::isEven,
- &QLinkedList<Number>::append, QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> numbers;
- numbers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::filteredReduced(numbers.begin(),
- numbers.end(),
- &Number::isEven,
- &QLinkedList<Number>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> numbers;
- numbers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::filteredReduced(numbers.constBegin(),
- numbers.constEnd(),
- &Number::isEven,
- &QLinkedList<Number>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> numbers;
- numbers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::blockingFilteredReduced(numbers,
- &Number::isEven,
- &QLinkedList<Number>::append, QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> numbers;
- numbers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::blockingFilteredReduced(numbers.begin(),
- numbers.end(),
- &Number::isEven,
- &QLinkedList<Number>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
- {
- QLinkedList<Number> numbers;
- numbers << 1 << 2 << 3 << 4;
- QLinkedList<Number> linkedList2 = QtConcurrent::blockingFilteredReduced(numbers.constBegin(),
- numbers.constEnd(),
- &Number::isEven,
- &QLinkedList<Number>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<Number>() << 2 << 4);
- }
-
- // function-member
- {
- QLinkedList<int> linkedList2 = QtConcurrent::filteredReduced(linkedList, keepEvenIntegers, &QLinkedList<int>::append, QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::filteredReduced(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::filteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFilteredReduced(linkedList, keepEvenIntegers, &QLinkedList<int>::append, QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFilteredReduced(linkedList.begin(),
- linkedList.end(),
- keepEvenIntegers,
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingFilteredReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- keepEvenIntegers,
- &QLinkedList<int>::append,
- QtConcurrent::OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4);
- }
-
- // member-function
- {
- int sum = QtConcurrent::filteredReduced(numberLinkedList, &Number::isEven, numberSumReduce);
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::filteredReduced(QLinkedList<Number>(numberLinkedList),
- &Number::isEven,
- numberSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced(numberLinkedList.begin(),
- numberLinkedList.end(),
- &Number::isEven,
- numberSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::filteredReduced(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::isEven,
- numberSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(numberLinkedList, &Number::isEven, numberSumReduce);
- QCOMPARE(sum, 6);
-
- int sum2 = QtConcurrent::blockingFilteredReduced(QLinkedList<Number>(numberLinkedList),
- &Number::isEven,
- numberSumReduce);
- QCOMPARE(sum2, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(numberLinkedList.begin(),
- numberLinkedList.end(),
- &Number::isEven,
- numberSumReduce);
- QCOMPARE(sum, 6);
- }
- {
- int sum = QtConcurrent::blockingFilteredReduced(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::isEven,
- numberSumReduce);
- QCOMPARE(sum, 6);
- }
-
// ### the same as above, with an initial result value
}
diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
new file mode 100644
index 0000000000..af44d66642
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qtconcurrentiteratekernel.pro.
+
+#####################################################################
+## tst_qtconcurrentiteratekernel Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentiteratekernel
+ SOURCES
+ tst_qtconcurrentiteratekernel.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
diff --git a/tests/auto/concurrent/qtconcurrentmap/.prev_CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..be51bf09bd
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentmap/.prev_CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtconcurrentmap.pro.
+
+#####################################################################
+## tst_qtconcurrentmap Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentmap
+ SOURCES
+ tst_qtconcurrentmap.cpp
+ DEFINES
+ -QT_NO_LINKED_LIST
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
new file mode 100644
index 0000000000..8ae79db0cf
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentmap/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qtconcurrentmap.pro.
+
+#####################################################################
+## tst_qtconcurrentmap Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentmap
+ SOURCES
+ tst_qtconcurrentmap.cpp
+ DEFINES
+ # -QT_NO_LINKED_LIST # special case remove until we figure this out
+ QT_STRICT_ITERATORS
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro b/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro
index 717d103e44..bbadd1ada1 100644
--- a/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro
+++ b/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro
@@ -2,8 +2,6 @@ CONFIG += testcase
TARGET = tst_qtconcurrentmap
QT = core testlib concurrent
SOURCES = tst_qtconcurrentmap.cpp
-DEFINES += QT_STRICT_ITERATORS
-DEFINES -= QT_NO_LINKED_LIST
# Force C++17 if available
contains(QT_CONFIG, c++1z): CONFIG += c++1z
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 383de0b2ce..fbcac35fee 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -164,38 +164,6 @@ void tst_QtConcurrentMap::map()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
}
- // Linked lists and forward iterators
- {
- QLinkedList<int> list;
- list << 1 << 2 << 3;
-
- // functor
- QtConcurrent::map(list, MultiplyBy2InPlace()).waitForFinished();
- QCOMPARE(list, QLinkedList<int>() << 2 << 4 << 6);
- QtConcurrent::map(list.begin(), list.end(), MultiplyBy2InPlace()).waitForFinished();
- QCOMPARE(list, QLinkedList<int>() << 4 << 8 << 12);
-
- // function
- QtConcurrent::map(list, multiplyBy2InPlace).waitForFinished();
- QCOMPARE(list, QLinkedList<int>() << 8 << 16 << 24);
- QtConcurrent::map(list.begin(), list.end(), multiplyBy2InPlace).waitForFinished();
- QCOMPARE(list, QLinkedList<int>() << 16 << 32 << 48);
-
- // bound function
- QtConcurrent::map(list, multiplyBy2InPlace).waitForFinished();
- QCOMPARE(list, QLinkedList<int>() << 32 << 64 << 96);
- QtConcurrent::map(list.begin(), list.end(), multiplyBy2InPlace).waitForFinished();
- QCOMPARE(list, QLinkedList<int>() << 64 << 128 << 192);
-
- // member function
- QLinkedList<Number> numberList;
- numberList << 1 << 2 << 3;
- QtConcurrent::map(numberList, &Number::multiplyBy2).waitForFinished();
- QCOMPARE(numberList, QLinkedList<Number>() << 2 << 4 << 6);
- QtConcurrent::map(numberList.begin(), numberList.end(), &Number::multiplyBy2).waitForFinished();
- QCOMPARE(numberList, QLinkedList<Number>() << 4 << 8 << 12);
- }
-
#if 0
// not allowed: map() with immutable sequences makes no sense
{
@@ -296,38 +264,6 @@ void tst_QtConcurrentMap::blocking_map()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
}
- // Linked lists and forward iterators
- {
- QLinkedList<int> list;
- list << 1 << 2 << 3;
-
- // functor
- QtConcurrent::blockingMap(list, MultiplyBy2InPlace());
- QCOMPARE(list, QLinkedList<int>() << 2 << 4 << 6);
- QtConcurrent::blockingMap(list.begin(), list.end(), MultiplyBy2InPlace());
- QCOMPARE(list, QLinkedList<int>() << 4 << 8 << 12);
-
- // function
- QtConcurrent::blockingMap(list, multiplyBy2InPlace);
- QCOMPARE(list, QLinkedList<int>() << 8 << 16 << 24);
- QtConcurrent::blockingMap(list.begin(), list.end(), multiplyBy2InPlace);
- QCOMPARE(list, QLinkedList<int>() << 16 << 32 << 48);
-
- // bound function
- QtConcurrent::blockingMap(list, multiplyBy2InPlace);
- QCOMPARE(list, QLinkedList<int>() << 32 << 64 << 96);
- QtConcurrent::blockingMap(list.begin(), list.end(), multiplyBy2InPlace);
- QCOMPARE(list, QLinkedList<int>() << 64 << 128 << 192);
-
- // member function
- QLinkedList<Number> numberList;
- numberList << 1 << 2 << 3;
- QtConcurrent::blockingMap(numberList, &Number::multiplyBy2);
- QCOMPARE(numberList, QLinkedList<Number>() << 2 << 4 << 6);
- QtConcurrent::blockingMap(numberList.begin(), numberList.end(), &Number::multiplyBy2);
- QCOMPARE(numberList, QLinkedList<Number>() << 4 << 8 << 12);
- }
-
#if 0
// not allowed: map() with immutable sequences makes no sense
{
@@ -424,12 +360,8 @@ void tst_QtConcurrentMap::mapped()
{
QList<int> list;
list << 1 << 2 << 3;
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3;
QList<Number> numberList;
numberList << 1 << 2 << 3;
- QLinkedList<Number> numberLinkedList;
- numberLinkedList << 1 << 2 << 3;
// functor
{
@@ -447,22 +379,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
}
- {
- QList<int> list2 = QtConcurrent::mapped(linkedList, MultiplyBy2()).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<int>() << 2 << 4 << 6);
-
- QList<int> list3 = QtConcurrent::mapped(linkedList.constBegin(),
- linkedList.constEnd(),
- MultiplyBy2()).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<int>() << 2 << 4 << 6);
-
- QList<int> list4 =
- QtConcurrent::mapped(QLinkedList<int>(linkedList), MultiplyBy2()).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
- }
// function
{
@@ -480,22 +396,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
}
- {
- QList<int> list2 = QtConcurrent::mapped(linkedList, multiplyBy2).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<int>() << 2 << 4 << 6);
-
- QList<int> list3 = QtConcurrent::mapped(linkedList.constBegin(),
- linkedList.constEnd(),
- multiplyBy2).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<int>() << 2 << 4 << 6);
-
- QList<int> list4 =
- QtConcurrent::mapped(QLinkedList<int>(linkedList), multiplyBy2).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
- }
// bound function
{
@@ -513,23 +413,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
}
- {
- QList<int> list2 = QtConcurrent::mapped(linkedList, multiplyBy2).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<int>() << 2 << 4 << 6);
-
- QList<int> list3 = QtConcurrent::mapped(linkedList.constBegin(),
- linkedList.constEnd(),
- multiplyBy2)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<int>() << 2 << 4 << 6);
-
- QList<int> list4 = QtConcurrent::mapped(QLinkedList<int>(linkedList), multiplyBy2)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
- }
// const member function
{
@@ -551,25 +434,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(numberList, QList<Number>() << 1 << 2 << 3);
QCOMPARE(numberList4, QList<Number>() << 2 << 4 << 6);
}
- {
- QList<Number> numberList2 = QtConcurrent::mapped(numberLinkedList, &Number::multipliedBy2)
- .results();
- QCOMPARE(numberLinkedList, QLinkedList<Number>() << 1 << 2 << 3);
- QCOMPARE(numberList2, QList<Number>() << 2 << 4 << 6);
-
- QList<Number> numberList3 = QtConcurrent::mapped(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::multipliedBy2)
- .results();
- QCOMPARE(numberLinkedList, QLinkedList<Number>() << 1 << 2 << 3);
- QCOMPARE(numberList3, QList<Number>() << 2 << 4 << 6);
-
- QList<Number> numberList4 = QtConcurrent::mapped(QLinkedList<Number>(numberLinkedList),
- &Number::multipliedBy2)
- .results();
- QCOMPARE(numberLinkedList, QLinkedList<Number>() << 1 << 2 << 3);
- QCOMPARE(numberList4, QList<Number>() << 2 << 4 << 6);
- }
// change the value_type, same container
@@ -592,24 +456,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
}
- {
- QList<double> list2 = QtConcurrent::mapped(linkedList, IntToDouble()).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<double>() << 1.0 << 2.0 << 3.0);
-
- QList<double> list3 = QtConcurrent::mapped(linkedList.constBegin(),
- linkedList.constEnd(),
- IntToDouble())
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<double>() << 1.0 << 2.0 << 3.0);
-
- QList<double> list4 = QtConcurrent::mapped(QLinkedList<int>(linkedList),
- IntToDouble())
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
- }
// function
{
@@ -628,23 +474,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
}
- {
- QList<double> list2 = QtConcurrent::mapped(linkedList, intToDouble).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<double>() << 1.0 << 2.0 << 3.0);
-
- QList<double> list3 = QtConcurrent::mapped(linkedList.constBegin(),
- linkedList.constEnd(),
- intToDouble)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<double>() << 1.0 << 2.0 << 3.0);
-
- QList<double> list4 = QtConcurrent::mapped(QLinkedList<int>(linkedList), intToDouble)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
- }
// bound function
{
@@ -666,25 +495,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
}
- {
- QList<double> list2 = QtConcurrent::mapped(linkedList, intToDouble).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<double>() << 1.0 << 2.0 << 3.0);
-
- QList<double> list3 = QtConcurrent::mapped(linkedList.constBegin(),
- linkedList.constEnd(),
- intToDouble)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<double>() << 1.0 << 2.0 << 3.0);
-
-
- QList<double> list4 = QtConcurrent::mapped(QLinkedList<int>(linkedList),
- intToDouble)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
- }
// const member function
{
@@ -704,24 +514,6 @@ void tst_QtConcurrentMap::mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<QString>() << "1" << "2" << "3");
}
- {
- QList<QString> list2 = QtConcurrent::mapped(numberLinkedList, &Number::toString).results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list2, QList<QString>() << "1" << "2" << "3");
-
- QList<QString> list3 = QtConcurrent::mapped(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toString)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list3, QList<QString>() << "1" << "2" << "3");
-
- QList<QString> list4 = QtConcurrent::mapped(QLinkedList<Number>(numberLinkedList),
- &Number::toString)
- .results();
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(list4, QList<QString>() << "1" << "2" << "3");
- }
// change the value_type
{
@@ -786,12 +578,8 @@ void tst_QtConcurrentMap::blocking_mapped()
{
QList<int> list;
list << 1 << 2 << 3;
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3;
QList<Number> numberList;
numberList << 1 << 2 << 3;
- QLinkedList<Number> numberLinkedList;
- numberLinkedList << 1 << 2 << 3;
// functor
{
@@ -809,21 +597,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingMapped(linkedList, MultiplyBy2());
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4 << 6);
-
- QLinkedList<int> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<int> >(linkedList.constBegin(),
- linkedList.constEnd(),
- MultiplyBy2());
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 2 << 4 << 6);
-
- QLinkedList<int> linkedList4 = QtConcurrent::blockingMapped(QLinkedList<int>(linkedList), MultiplyBy2());
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 2 << 4 << 6);
- }
// function
{
@@ -841,21 +614,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingMapped(linkedList, multiplyBy2);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4 << 6);
-
- QLinkedList<int> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<int> >(linkedList.constBegin(),
- linkedList.constEnd(),
- multiplyBy2);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 2 << 4 << 6);
-
- QLinkedList<int> linkedList4 = QtConcurrent::blockingMapped(QLinkedList<int>(linkedList), multiplyBy2);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 2 << 4 << 6);
- }
// bound function
{
@@ -873,21 +631,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 2 << 4 << 6);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingMapped(linkedList, multiplyBy2);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 2 << 4 << 6);
-
- QLinkedList<int> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<int> >(linkedList.constBegin(),
- linkedList.constEnd(),
- multiplyBy2);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 2 << 4 << 6);
-
- QLinkedList<int> linkedList4 = QtConcurrent::blockingMapped(QLinkedList<int>(linkedList), multiplyBy2);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 2 << 4 << 6);
- }
// const member function
{
@@ -906,22 +649,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(numberList, QList<Number>() << 1 << 2 << 3);
QCOMPARE(numberList4, QList<Number>() << 2 << 4 << 6);
}
- {
- QLinkedList<Number> numberLinkedList2 = QtConcurrent::blockingMapped(numberLinkedList, &Number::multipliedBy2);
- QCOMPARE(numberLinkedList, QLinkedList<Number>() << 1 << 2 << 3);
- QCOMPARE(numberLinkedList2, QLinkedList<Number>() << 2 << 4 << 6);
-
- QLinkedList<Number> numberLinkedList3 = QtConcurrent::blockingMapped<QLinkedList<Number> >(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::multipliedBy2);
- QCOMPARE(numberLinkedList, QLinkedList<Number>() << 1 << 2 << 3);
- QCOMPARE(numberLinkedList3, QLinkedList<Number>() << 2 << 4 << 6);
-
- QLinkedList<Number> numberLinkedList4 = QtConcurrent::blockingMapped(QLinkedList<Number>(numberLinkedList),
- &Number::multipliedBy2);
- QCOMPARE(numberLinkedList, QLinkedList<Number>() << 1 << 2 << 3);
- QCOMPARE(numberLinkedList4, QLinkedList<Number>() << 2 << 4 << 6);
- }
// change the value_type, same container
@@ -942,22 +669,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
}
- {
- QLinkedList<double> linkedList2 = QtConcurrent::blockingMapped<QLinkedList<double> >(linkedList, IntToDouble());
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
-
- QLinkedList<double> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<double> >(linkedList.constBegin(),
- linkedList.constEnd(),
- IntToDouble());
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
-
- QLinkedList<double> linkedList4 = QtConcurrent::blockingMapped<QLinkedList<double> >(QLinkedList<int>(linkedList),
- IntToDouble());
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
- }
// function
{
@@ -975,21 +686,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
}
- {
- QLinkedList<double> linkedList2 = QtConcurrent::blockingMapped<QLinkedList<double> >(linkedList, intToDouble);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
-
- QLinkedList<double> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<double> >(linkedList.constBegin(),
- linkedList.constEnd(),
- intToDouble);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
-
- QLinkedList<double> linkedList4 = QtConcurrent::blockingMapped<QLinkedList<double> >(QLinkedList<int>(linkedList), intToDouble);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
- }
// bound function
{
@@ -1009,23 +705,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<double>() << 1.0 << 2.0 << 3.0);
}
- {
- QLinkedList<double> linkedList2 = QtConcurrent::blockingMapped<QLinkedList<double> >(linkedList, intToDouble);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
-
- QLinkedList<double> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<double> >(linkedList.constBegin(),
- linkedList.constEnd(),
- intToDouble);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
-
-
- QLinkedList<double> linkedList4 = QtConcurrent::blockingMapped<QLinkedList<double> >(QLinkedList<int>(linkedList),
- intToDouble);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<double>() << 1.0 << 2.0 << 3.0);
- }
// const member function
{
@@ -1045,23 +724,6 @@ void tst_QtConcurrentMap::blocking_mapped()
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<QString>() << "1" << "2" << "3");
}
- {
- QLinkedList<QString> linkedList2 =
- QtConcurrent::blockingMapped<QLinkedList<QString> >(numberLinkedList, &Number::toString);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<QString>() << "1" << "2" << "3");
-
- QLinkedList<QString> linkedList3 = QtConcurrent::blockingMapped<QLinkedList<QString> >(numberLinkedList.constBegin(),
- numberLinkedList.constEnd()
- , &Number::toString);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<QString>() << "1" << "2" << "3");
-
- QLinkedList<QString> linkedList4 =
- QtConcurrent::blockingMapped<QLinkedList<QString> >(QLinkedList<Number>(numberLinkedList), &Number::toString);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<QString>() << "1" << "2" << "3");
- }
// change the value_type
{
@@ -1240,12 +902,8 @@ void tst_QtConcurrentMap::mappedReduced()
{
QList<int> list;
list << 1 << 2 << 3;
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3;
QList<Number> numberList;
numberList << 1 << 2 << 3;
- QLinkedList<Number> numberLinkedList;
- numberLinkedList << 1 << 2 << 3;
// test Q_DECLARE_OPERATORS_FOR_FLAGS
QtConcurrent::ReduceOptions opt = (QtConcurrent::UnorderedReduce | QtConcurrent::SequentialReduce);
@@ -1277,31 +935,6 @@ void tst_QtConcurrentMap::mappedReduced()
intSumReduce);
QCOMPARE(sum6, 14);
}
- {
- int sum = QtConcurrent::mappedReduced<int>(linkedList, IntSquare(), IntSumReduce());
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::mappedReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- IntSquare(),
- IntSumReduce());
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::mappedReduced<int>(QLinkedList<int>(linkedList), IntSquare(), IntSumReduce());
- QCOMPARE(sum3, 14);
-
- int sum4 = QtConcurrent::mappedReduced<int>(linkedList, intSquare, intSumReduce);
- QCOMPARE(sum4, 14);
- int sum5 = QtConcurrent::mappedReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- intSumReduce);
- QCOMPARE(sum5, 14);
-
- int sum6 = QtConcurrent::mappedReduced<int>(QLinkedList<int>(linkedList),
- intSquare,
- intSumReduce);
- QCOMPARE(sum6, 14);
- }
// function-functor
{
@@ -1316,18 +949,6 @@ void tst_QtConcurrentMap::mappedReduced()
int sum3 = QtConcurrent::mappedReduced<int>(QList<int>(list), intSquare, IntSumReduce());
QCOMPARE(sum3, 14);
}
- {
- int sum = QtConcurrent::mappedReduced<int>(linkedList, intSquare, IntSumReduce());
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::mappedReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- IntSumReduce());
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::mappedReduced<int>(QLinkedList<int>(linkedList), intSquare, IntSumReduce());
- QCOMPARE(sum3, 14);
- }
// functor-function
{
@@ -1342,18 +963,6 @@ void tst_QtConcurrentMap::mappedReduced()
int sum3 = QtConcurrent::mappedReduced(QList<int>(list), IntSquare(), intSumReduce);
QCOMPARE(sum3, 14);
}
- {
- int sum = QtConcurrent::mappedReduced(linkedList, IntSquare(), intSumReduce);
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::mappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- IntSquare(),
- intSumReduce);
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::mappedReduced(QLinkedList<int>(linkedList), IntSquare(), intSumReduce);
- QCOMPARE(sum3, 14);
- }
// function-function
{
@@ -1368,24 +977,14 @@ void tst_QtConcurrentMap::mappedReduced()
int sum3 = QtConcurrent::mappedReduced(QList<int>(list), intSquare, intSumReduce);
QCOMPARE(sum3, 14);
}
- {
- int sum = QtConcurrent::mappedReduced(linkedList, intSquare, intSumReduce);
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::mappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- intSumReduce);
- QCOMPARE(sum2, 14);
- int sum3 = QtConcurrent::mappedReduced(QLinkedList<int>(linkedList), intSquare, intSumReduce);
- QCOMPARE(sum3, 14);
- }
+ auto push_back = static_cast<void (QVector<int>::*)(const int &)>(&QVector<int>::push_back);
// functor-member
{
QList<int> list2 = QtConcurrent::mappedReduced(list,
IntSquare(),
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list2, QList<int>() << 1 << 4 << 9);
@@ -1393,41 +992,18 @@ void tst_QtConcurrentMap::mappedReduced()
QList<int> list3 = QtConcurrent::mappedReduced(list.constBegin(),
list.constEnd(),
IntSquare(),
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list3, QList<int>() << 1 << 4 << 9);
QList<int> list4 = QtConcurrent::mappedReduced(QList<int>(list),
IntSquare(),
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 1 << 4 << 9);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::mappedReduced(linkedList,
- IntSquare(),
- &QLinkedList<int>::push_back,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList3 = QtConcurrent::mappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- IntSquare(),
- &QLinkedList<int>::push_back,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList4 = QtConcurrent::mappedReduced(QLinkedList<int>(linkedList),
- IntSquare(),
- &QLinkedList<int>::push_back,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 1 << 4 << 9);
- }
// member-functor
{
@@ -1444,66 +1020,33 @@ void tst_QtConcurrentMap::mappedReduced()
IntSumReduce());
QCOMPARE(sum3, 6);
}
- {
- int sum = QtConcurrent::mappedReduced<int>(numberLinkedList, &Number::toInt, IntSumReduce());
- QCOMPARE(sum, 6);
- int sum2 = QtConcurrent::mappedReduced<int>(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toInt,
- IntSumReduce());
- QCOMPARE(sum2, 6);
-
- int sum3 = QtConcurrent::mappedReduced<int>(QLinkedList<Number>(numberLinkedList),
- &Number::toInt,
- IntSumReduce());
- QCOMPARE(sum3, 6);
- }
// member-member
{
QList<int> list2 = QtConcurrent::mappedReduced(numberList,
&Number::toInt,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list2, QList<int>() << 1 << 2 << 3);
QList<int> list3 = QtConcurrent::mappedReduced(numberList.constBegin(),
numberList.constEnd(),
&Number::toInt,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list3, QList<int>() << 1 << 2 << 3);
QList<int> list4 = QtConcurrent::mappedReduced(QList<Number>(numberList),
&Number::toInt,
- &QList<int>::push_back, OrderedReduce);
+ push_back, OrderedReduce);
QCOMPARE(list4, QList<int>() << 1 << 2 << 3);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::mappedReduced(numberLinkedList,
- &Number::toInt,
- &QLinkedList<int>::push_back,
- OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 1 << 2 << 3);
-
- QLinkedList<int> linkedList3 = QtConcurrent::mappedReduced(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toInt,
- &QLinkedList<int>::push_back,
- OrderedReduce);
- QCOMPARE(linkedList3, QLinkedList<int>() << 1 << 2 << 3);
-
- QLinkedList<int> linkedList4 = QtConcurrent::mappedReduced(QLinkedList<Number>(numberLinkedList),
- &Number::toInt,
- &QLinkedList<int>::push_back, OrderedReduce);
- QCOMPARE(linkedList4, QLinkedList<int>() << 1 << 2 << 3);
- }
// function-member
{
QList<int> list2 = QtConcurrent::mappedReduced(list,
intSquare,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list2, QList<int>() << 1 << 4 << 9);
@@ -1511,41 +1054,18 @@ void tst_QtConcurrentMap::mappedReduced()
QList<int> list3 = QtConcurrent::mappedReduced(list.constBegin(),
list.constEnd(),
intSquare,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list3, QList<int>() << 1 << 4 << 9);
QList<int> list4 = QtConcurrent::mappedReduced(QList<int>(list),
intSquare,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 1 << 4 << 9);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::mappedReduced(linkedList,
- intSquare,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList3 = QtConcurrent::mappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList4 = QtConcurrent::mappedReduced(QLinkedList<int>(linkedList),
- intSquare,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 1 << 4 << 9);
- }
// member-function
{
@@ -1564,56 +1084,6 @@ void tst_QtConcurrentMap::mappedReduced()
intSumReduce);
QCOMPARE(sum3, 6);
}
- {
- int sum = QtConcurrent::mappedReduced(numberLinkedList,
- &Number::toInt,
- intSumReduce);
- QCOMPARE(sum, 6);
- int sum2 = QtConcurrent::mappedReduced(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toInt,
- intSumReduce);
- QCOMPARE(sum2, 6);
-
- int sum3 = QtConcurrent::mappedReduced(QLinkedList<Number>(numberLinkedList),
- &Number::toInt,
- intSumReduce);
- QCOMPARE(sum3, 6);
- }
-
- // linked lists
- {
-
- QLinkedList<int> list;
- list << 1 << 2 << 3;
-
- QLinkedList<Number> numberList;
- numberList << 1 << 2 << 3;
-
- int sum = QtConcurrent::mappedReduced<int>(list, IntSquare(), IntSumReduce());
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::mappedReduced<int>(list.constBegin(),
- list.constEnd(),
- IntSquare(),
- IntSumReduce());
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::mappedReduced<int>(QLinkedList<int>(list), IntSquare(), IntSumReduce());
- QCOMPARE(sum3, 14);
-
- int sum4 = QtConcurrent::mappedReduced<int>(list, intSquare, intSumReduce);
- QCOMPARE(sum4, 14);
- int sum5 = QtConcurrent::mappedReduced<int>(list.constBegin(),
- list.constEnd(),
- intSquare,
- intSumReduce);
- QCOMPARE(sum5, 14);
-
- int sum6 = QtConcurrent::mappedReduced<int>(QLinkedList<int>(list),
- intSquare,
- intSumReduce);
- QCOMPARE(sum6, 14);
- }
// ### the same as above, with an initial result value
}
@@ -1622,12 +1092,8 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
{
QList<int> list;
list << 1 << 2 << 3;
- QLinkedList<int> linkedList;
- linkedList << 1 << 2 << 3;
QList<Number> numberList;
numberList << 1 << 2 << 3;
- QLinkedList<Number> numberLinkedList;
- numberLinkedList << 1 << 2 << 3;
// functor-functor
{
@@ -1655,31 +1121,6 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
intSumReduce);
QCOMPARE(sum6, 14);
}
- {
- int sum = QtConcurrent::blockingMappedReduced<int>(linkedList, IntSquare(), IntSumReduce());
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::blockingMappedReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- IntSquare(),
- IntSumReduce());
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::blockingMappedReduced<int>(QLinkedList<int>(linkedList), IntSquare(), IntSumReduce());
- QCOMPARE(sum3, 14);
-
- int sum4 = QtConcurrent::blockingMappedReduced<int>(linkedList, intSquare, intSumReduce);
- QCOMPARE(sum4, 14);
- int sum5 = QtConcurrent::blockingMappedReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- intSumReduce);
- QCOMPARE(sum5, 14);
-
- int sum6 = QtConcurrent::blockingMappedReduced<int>(QLinkedList<int>(linkedList),
- intSquare,
- intSumReduce);
- QCOMPARE(sum6, 14);
- }
// function-functor
{
@@ -1694,18 +1135,6 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
int sum3 = QtConcurrent::blockingMappedReduced<int>(QList<int>(list), intSquare, IntSumReduce());
QCOMPARE(sum3, 14);
}
- {
- int sum = QtConcurrent::blockingMappedReduced<int>(linkedList, intSquare, IntSumReduce());
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::blockingMappedReduced<int>(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- IntSumReduce());
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::blockingMappedReduced<int>(QLinkedList<int>(linkedList), intSquare, IntSumReduce());
- QCOMPARE(sum3, 14);
- }
// functor-function
{
@@ -1720,18 +1149,6 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
int sum3 = QtConcurrent::blockingMappedReduced(QList<int>(list), IntSquare(), intSumReduce);
QCOMPARE(sum3, 14);
}
- {
- int sum = QtConcurrent::blockingMappedReduced(linkedList, IntSquare(), intSumReduce);
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::blockingMappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- IntSquare(),
- intSumReduce);
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::blockingMappedReduced(QLinkedList<int>(linkedList), IntSquare(), intSumReduce);
- QCOMPARE(sum3, 14);
- }
// function-function
{
@@ -1746,24 +1163,14 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
int sum3 = QtConcurrent::blockingMappedReduced(QList<int>(list), intSquare, intSumReduce);
QCOMPARE(sum3, 14);
}
- {
- int sum = QtConcurrent::blockingMappedReduced(linkedList, intSquare, intSumReduce);
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::blockingMappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- intSumReduce);
- QCOMPARE(sum2, 14);
- int sum3 = QtConcurrent::blockingMappedReduced(QLinkedList<int>(linkedList), intSquare, intSumReduce);
- QCOMPARE(sum3, 14);
- }
+ auto push_back = static_cast<void (QVector<int>::*)(const int &)>(&QVector<int>::push_back);
// functor-member
{
QList<int> list2 = QtConcurrent::blockingMappedReduced(list,
IntSquare(),
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list2, QList<int>() << 1 << 4 << 9);
@@ -1771,41 +1178,18 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
QList<int> list3 = QtConcurrent::blockingMappedReduced(list.constBegin(),
list.constEnd(),
IntSquare(),
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list3, QList<int>() << 1 << 4 << 9);
QList<int> list4 = QtConcurrent::blockingMappedReduced(QList<int>(list),
IntSquare(),
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 1 << 4 << 9);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingMappedReduced(linkedList,
- IntSquare(),
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList3 = QtConcurrent::blockingMappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- IntSquare(),
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList4 = QtConcurrent::blockingMappedReduced(QLinkedList<int>(linkedList),
- IntSquare(),
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 1 << 4 << 9);
- }
// member-functor
{
@@ -1823,66 +1207,33 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
IntSumReduce());
QCOMPARE(sum3, 6);
}
- {
- int sum = QtConcurrent::blockingMappedReduced<int>(numberLinkedList, &Number::toInt, IntSumReduce());
- QCOMPARE(sum, 6);
- int sum2 = QtConcurrent::blockingMappedReduced<int>(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toInt,
- IntSumReduce());
- QCOMPARE(sum2, 6);
-
- int sum3 = QtConcurrent::blockingMappedReduced<int>(QLinkedList<Number>(numberLinkedList),
- &Number::toInt,
- IntSumReduce());
- QCOMPARE(sum3, 6);
- }
// member-member
{
QList<int> list2 = QtConcurrent::blockingMappedReduced(numberList,
&Number::toInt,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list2, QList<int>() << 1 << 2 << 3);
QList<int> list3 = QtConcurrent::blockingMappedReduced(numberList.constBegin(),
numberList.constEnd(),
&Number::toInt,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list3, QList<int>() << 1 << 2 << 3);
QList<int> list4 = QtConcurrent::blockingMappedReduced(QList<Number>(numberList),
&Number::toInt,
- &QList<int>::push_back, OrderedReduce);
+ push_back, OrderedReduce);
QCOMPARE(list4, QList<int>() << 1 << 2 << 3);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingMappedReduced(numberLinkedList,
- &Number::toInt,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList2, QLinkedList<int>() << 1 << 2 << 3);
-
- QLinkedList<int> linkedList3 = QtConcurrent::blockingMappedReduced(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toInt,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList3, QLinkedList<int>() << 1 << 2 << 3);
-
- QLinkedList<int> linkedList4 = QtConcurrent::blockingMappedReduced(QLinkedList<Number>(numberLinkedList),
- &Number::toInt,
- &QLinkedList<int>::append, OrderedReduce);
- QCOMPARE(linkedList4, QLinkedList<int>() << 1 << 2 << 3);
- }
// function-member
{
QList<int> list2 = QtConcurrent::blockingMappedReduced(list,
intSquare,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list2, QList<int>() << 1 << 4 << 9);
@@ -1890,41 +1241,18 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
QList<int> list3 = QtConcurrent::blockingMappedReduced(list.constBegin(),
list.constEnd(),
intSquare,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list3, QList<int>() << 1 << 4 << 9);
QList<int> list4 = QtConcurrent::blockingMappedReduced(QList<int>(list),
intSquare,
- &QList<int>::push_back,
+ push_back,
OrderedReduce);
QCOMPARE(list, QList<int>() << 1 << 2 << 3);
QCOMPARE(list4, QList<int>() << 1 << 4 << 9);
}
- {
- QLinkedList<int> linkedList2 = QtConcurrent::blockingMappedReduced(linkedList,
- intSquare,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList2, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList3 = QtConcurrent::blockingMappedReduced(linkedList.constBegin(),
- linkedList.constEnd(),
- intSquare,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList3, QLinkedList<int>() << 1 << 4 << 9);
-
- QLinkedList<int> linkedList4 = QtConcurrent::blockingMappedReduced(QLinkedList<int>(linkedList),
- intSquare,
- &QLinkedList<int>::append,
- OrderedReduce);
- QCOMPARE(linkedList, QLinkedList<int>() << 1 << 2 << 3);
- QCOMPARE(linkedList4, QLinkedList<int>() << 1 << 4 << 9);
- }
// member-function
{
@@ -1943,56 +1271,6 @@ void tst_QtConcurrentMap::blocking_mappedReduced()
intSumReduce);
QCOMPARE(sum3, 6);
}
- {
- int sum = QtConcurrent::blockingMappedReduced(numberLinkedList,
- &Number::toInt,
- intSumReduce);
- QCOMPARE(sum, 6);
- int sum2 = QtConcurrent::blockingMappedReduced(numberLinkedList.constBegin(),
- numberLinkedList.constEnd(),
- &Number::toInt,
- intSumReduce);
- QCOMPARE(sum2, 6);
-
- int sum3 = QtConcurrent::blockingMappedReduced(QLinkedList<Number>(numberLinkedList),
- &Number::toInt,
- intSumReduce);
- QCOMPARE(sum3, 6);
- }
-
- // linked lists
- {
-
- QLinkedList<int> list;
- list << 1 << 2 << 3;
-
- QLinkedList<Number> numberList;
- numberList << 1 << 2 << 3;
-
- int sum = QtConcurrent::blockingMappedReduced<int>(list, IntSquare(), IntSumReduce());
- QCOMPARE(sum, 14);
- int sum2 = QtConcurrent::blockingMappedReduced<int>(list.constBegin(),
- list.constEnd(),
- IntSquare(),
- IntSumReduce());
- QCOMPARE(sum2, 14);
-
- int sum3 = QtConcurrent::blockingMappedReduced<int>(QLinkedList<int>(list), IntSquare(), IntSumReduce());
- QCOMPARE(sum3, 14);
-
- int sum4 = QtConcurrent::blockingMappedReduced<int>(list, intSquare, intSumReduce);
- QCOMPARE(sum4, 14);
- int sum5 = QtConcurrent::blockingMappedReduced<int>(list.constBegin(),
- list.constEnd(),
- intSquare,
- intSumReduce);
- QCOMPARE(sum5, 14);
-
- int sum6 = QtConcurrent::blockingMappedReduced<int>(QLinkedList<int>(list),
- intSquare,
- intSumReduce);
- QCOMPARE(sum6, 14);
- }
// ### the same as above, with an initial result value
}
@@ -2118,7 +1396,6 @@ public:
};
Q_DECLARE_METATYPE(QVector<MemFnTester>);
-Q_DECLARE_METATYPE(QList<MemFnTester>);
void tst_QtConcurrentMap::functionOverloads()
{
diff --git a/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
new file mode 100644
index 0000000000..27b376a406
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentmedian/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qtconcurrentmedian.pro.
+
+#####################################################################
+## tst_qtconcurrentmedian Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentmedian
+ SOURCES
+ tst_qtconcurrentmedian.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
diff --git a/tests/auto/concurrent/qtconcurrentmedian/qtconcurrentmedian.pro b/tests/auto/concurrent/qtconcurrentmedian/qtconcurrentmedian.pro
index 0d07642028..59e22d24a1 100644
--- a/tests/auto/concurrent/qtconcurrentmedian/qtconcurrentmedian.pro
+++ b/tests/auto/concurrent/qtconcurrentmedian/qtconcurrentmedian.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qtconcurrentmedian
QT = core testlib concurrent
SOURCES = tst_qtconcurrentmedian.cpp
-DEFINES += QT_STRICT_ITERATORS
diff --git a/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
new file mode 100644
index 0000000000..ca1f616137
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentrun/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtconcurrentrun.pro.
+
+#####################################################################
+## tst_qtconcurrentrun Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentrun
+ SOURCES
+ tst_qtconcurrentrun.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
new file mode 100644
index 0000000000..e9384c4fb4
--- /dev/null
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qtconcurrentthreadengine.pro.
+
+#####################################################################
+## tst_qtconcurrentthreadengine Test:
+#####################################################################
+
+add_qt_test(tst_qtconcurrentthreadengine
+ SOURCES
+ tst_qtconcurrentthreadengine.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
diff --git a/tests/auto/corelib/.prev_CMakeLists.txt b/tests/auto/corelib/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1029b14654
--- /dev/null
+++ b/tests/auto/corelib/.prev_CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from corelib.pro.
+
+add_subdirectory(kernel)
+if(NOT APPLE_UIKIT)
+ add_subdirectory(animation)
+ add_subdirectory(codecs)
+ add_subdirectory(global)
+ add_subdirectory(io)
+ add_subdirectory(itemmodels)
+ add_subdirectory(mimetypes)
+ add_subdirectory(plugin)
+ add_subdirectory(serialization)
+ add_subdirectory(statemachine)
+ add_subdirectory(text)
+ add_subdirectory(thread)
+ add_subdirectory(time)
+ add_subdirectory(tools)
+endif()
diff --git a/tests/auto/corelib/CMakeLists.txt b/tests/auto/corelib/CMakeLists.txt
new file mode 100644
index 0000000000..1029b14654
--- /dev/null
+++ b/tests/auto/corelib/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from corelib.pro.
+
+add_subdirectory(kernel)
+if(NOT APPLE_UIKIT)
+ add_subdirectory(animation)
+ add_subdirectory(codecs)
+ add_subdirectory(global)
+ add_subdirectory(io)
+ add_subdirectory(itemmodels)
+ add_subdirectory(mimetypes)
+ add_subdirectory(plugin)
+ add_subdirectory(serialization)
+ add_subdirectory(statemachine)
+ add_subdirectory(text)
+ add_subdirectory(thread)
+ add_subdirectory(time)
+ add_subdirectory(tools)
+endif()
diff --git a/tests/auto/corelib/animation/CMakeLists.txt b/tests/auto/corelib/animation/CMakeLists.txt
new file mode 100644
index 0000000000..ed238bb4f7
--- /dev/null
+++ b/tests/auto/corelib/animation/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory(qabstractanimation)
+add_subdirectory(qanimationgroup)
+add_subdirectory(qparallelanimationgroup)
+add_subdirectory(qpauseanimation)
+add_subdirectory(qsequentialanimationgroup)
+add_subdirectory(qvariantanimation)
diff --git a/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt b/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
new file mode 100644
index 0000000000..d5f4a9a016
--- /dev/null
+++ b/tests/auto/corelib/animation/qabstractanimation/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qabstractanimation.pro.
+
+#####################################################################
+## tst_qabstractanimation Test:
+#####################################################################
+
+add_qt_test(tst_qabstractanimation
+ SOURCES
+ tst_qabstractanimation.cpp
+)
diff --git a/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
new file mode 100644
index 0000000000..9b165f7983
--- /dev/null
+++ b/tests/auto/corelib/animation/qanimationgroup/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qanimationgroup.pro.
+
+#####################################################################
+## tst_qanimationgroup Test:
+#####################################################################
+
+add_qt_test(tst_qanimationgroup
+ SOURCES
+ tst_qanimationgroup.cpp
+)
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
new file mode 100644
index 0000000000..376c9351bd
--- /dev/null
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qparallelanimationgroup.pro.
+
+#####################################################################
+## tst_qparallelanimationgroup Test:
+#####################################################################
+
+add_qt_test(tst_qparallelanimationgroup
+ SOURCES
+ tst_qparallelanimationgroup.cpp
+)
diff --git a/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
new file mode 100644
index 0000000000..183127519f
--- /dev/null
+++ b/tests/auto/corelib/animation/qpauseanimation/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpauseanimation.pro.
+
+#####################################################################
+## tst_qpauseanimation Test:
+#####################################################################
+
+add_qt_test(tst_qpauseanimation
+ SOURCES
+ tst_qpauseanimation.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
new file mode 100644
index 0000000000..a3381b06b0
--- /dev/null
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsequentialanimationgroup.pro.
+
+#####################################################################
+## tst_qsequentialanimationgroup Test:
+#####################################################################
+
+add_qt_test(tst_qsequentialanimationgroup
+ SOURCES
+ tst_qsequentialanimationgroup.cpp
+)
diff --git a/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
new file mode 100644
index 0000000000..1c5f9bd03b
--- /dev/null
+++ b/tests/auto/corelib/animation/qvariantanimation/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qvariantanimation.pro.
+
+#####################################################################
+## tst_qvariantanimation Test:
+#####################################################################
+
+add_qt_test(tst_qvariantanimation
+ SOURCES
+ tst_qvariantanimation.cpp
+)
diff --git a/tests/auto/corelib/codecs/CMakeLists.txt b/tests/auto/corelib/codecs/CMakeLists.txt
new file mode 100644
index 0000000000..272b19f5f8
--- /dev/null
+++ b/tests/auto/corelib/codecs/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory(qtextcodec)
+add_subdirectory(utf8)
+
diff --git a/tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt b/tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt
new file mode 100644
index 0000000000..09b46eaa1d
--- /dev/null
+++ b/tests/auto/corelib/codecs/qtextcodec/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_qt_test(tst_qtextcodec SOURCES tst_qtextcodec.cpp)
+
+if(UNIX)
+ add_subdirectory(echo)
+endif()
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt b/tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt
new file mode 100644
index 0000000000..fc63473cbc
--- /dev/null
+++ b/tests/auto/corelib/codecs/qtextcodec/echo/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from echo.pro.
+
+#####################################################################
+## echo_helper Binary:
+#####################################################################
+
+add_qt_test_helper(echo_helper
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/codecs/utf8/CMakeLists.txt b/tests/auto/corelib/codecs/utf8/CMakeLists.txt
new file mode 100644
index 0000000000..1f794d63d0
--- /dev/null
+++ b/tests/auto/corelib/codecs/utf8/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from utf8.pro.
+
+#####################################################################
+## tst_utf8 Test:
+#####################################################################
+
+add_qt_test(tst_utf8
+ SOURCES
+ tst_utf8.cpp
+ utf8data.cpp
+)
diff --git a/tests/auto/corelib/global/CMakeLists.txt b/tests/auto/corelib/global/CMakeLists.txt
new file mode 100644
index 0000000000..58e083d665
--- /dev/null
+++ b/tests/auto/corelib/global/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_subdirectory(q_func_info)
+add_subdirectory(qflags)
+add_subdirectory(qfloat16)
+add_subdirectory(qgetputenv)
+add_subdirectory(qglobalstatic)
+add_subdirectory(qhooks)
+add_subdirectory(qlogging)
+add_subdirectory(qnumeric)
+add_subdirectory(qrand)
+add_subdirectory(qrandomgenerator)
+add_subdirectory(qtendian)
+
diff --git a/tests/auto/corelib/global/q_func_info/CMakeLists.txt b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
new file mode 100644
index 0000000000..5435c97cf8
--- /dev/null
+++ b/tests/auto/corelib/global/q_func_info/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from q_func_info.pro.
+
+#####################################################################
+## tst_q_func_info Test:
+#####################################################################
+
+add_qt_test(tst_q_func_info
+ SOURCES
+ tst_q_func_info.cpp
+)
diff --git a/tests/auto/corelib/global/qflags/CMakeLists.txt b/tests/auto/corelib/global/qflags/CMakeLists.txt
new file mode 100644
index 0000000000..f1fdb7a5f8
--- /dev/null
+++ b/tests/auto/corelib/global/qflags/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qflags.pro.
+
+#####################################################################
+## tst_qflags Test:
+#####################################################################
+
+add_qt_test(tst_qflags
+ SOURCES
+ tst_qflags.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/global/qfloat16/CMakeLists.txt b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
new file mode 100644
index 0000000000..36e15d8225
--- /dev/null
+++ b/tests/auto/corelib/global/qfloat16/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qfloat16.pro.
+
+#####################################################################
+## tst_qfloat16 Test:
+#####################################################################
+
+add_qt_test(tst_qfloat16
+ SOURCES
+ tst_qfloat16.cpp
+)
diff --git a/tests/auto/corelib/global/qgetputenv/CMakeLists.txt b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
new file mode 100644
index 0000000000..c5f3a53810
--- /dev/null
+++ b/tests/auto/corelib/global/qgetputenv/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qgetputenv.pro.
+
+#####################################################################
+## tst_qgetputenv Test:
+#####################################################################
+
+add_qt_test(tst_qgetputenv
+ SOURCES
+ tst_qgetputenv.cpp
+)
diff --git a/tests/auto/corelib/global/qglobal/CMakeLists.txt b/tests/auto/corelib/global/qglobal/CMakeLists.txt
new file mode 100644
index 0000000000..1efaaa71d0
--- /dev/null
+++ b/tests/auto/corelib/global/qglobal/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qglobal.pro.
+
+#####################################################################
+## tst_qglobal Test:
+#####################################################################
+
+add_qt_test(tst_qglobal
+ SOURCES
+ qglobal.c
+ tst_qglobal.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index b33dec8a61..047130d5ea 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -49,7 +49,6 @@ private slots:
void qConstructorFunction();
void qCoreAppStartupFunction();
void qCoreAppStartupFunctionRestart();
- void qAlignOf();
void integerForSize();
void qprintable();
void qprintable_data();
@@ -434,106 +433,6 @@ template <class T> struct AlignmentInStruct { T dummy; };
typedef int (*fun) ();
typedef int (Empty::*memFun) ();
-#define TEST_AlignOf(type, alignment) \
- do { \
- TEST_AlignOf_impl(type, alignment); \
- \
- TEST_AlignOf_impl(type &, alignment); \
- TEST_AlignOf_RValueRef(type &&, alignment); \
- \
- TEST_AlignOf_impl(type [5], alignment); \
- TEST_AlignOf_impl(type (&) [5], alignment); \
- \
- TEST_AlignOf_impl(AlignmentInStruct<type>, alignment); \
- \
- /* Some internal sanity validation, just for fun */ \
- TEST_AlignOf_impl(AlignmentInStruct<type [5]>, alignment); \
- TEST_AlignOf_impl(AlignmentInStruct<type &>, Q_ALIGNOF(void *)); \
- TEST_AlignOf_impl(AlignmentInStruct<type (&) [5]>, \
- Q_ALIGNOF(void *)); \
- TEST_AlignOf_RValueRef(AlignmentInStruct<type &&>, \
- Q_ALIGNOF(void *)); \
- } while (false) \
- /**/
-
-#define TEST_AlignOf_RValueRef(type, alignment) \
- TEST_AlignOf_impl(type, alignment)
-
-#define TEST_AlignOf_impl(type, alignment) \
- do { \
- QCOMPARE(Q_ALIGNOF(type), size_t(alignment)); \
- /* Compare to native operator for compilers that support it,
- otherwise... erm... check consistency! :-) */ \
- QCOMPARE(alignof(type), Q_ALIGNOF(type)); \
- } while (false)
- /**/
-
-void tst_QGlobal::qAlignOf()
-{
- // Built-in types, except 64-bit integers and double
- TEST_AlignOf(char, 1);
- TEST_AlignOf(signed char, 1);
- TEST_AlignOf(unsigned char, 1);
- TEST_AlignOf(qint8, 1);
- TEST_AlignOf(quint8, 1);
- TEST_AlignOf(qint16, 2);
- TEST_AlignOf(quint16, 2);
- TEST_AlignOf(qint32, 4);
- TEST_AlignOf(quint32, 4);
- TEST_AlignOf(void *, sizeof(void *));
-
- // Depends on platform and compiler, disabling test for now
- // TEST_AlignOf(long double, 16);
-
- // Empty struct
- TEST_AlignOf(Empty, 1);
-
- // Function pointers
- TEST_AlignOf(fun, Q_ALIGNOF(void *));
- TEST_AlignOf(memFun, Q_ALIGNOF(void *));
-
-
- // 64-bit integers and double
- TEST_AlignOf_impl(qint64, 8);
- TEST_AlignOf_impl(quint64, 8);
- TEST_AlignOf_impl(double, 8);
-
- TEST_AlignOf_impl(qint64 &, 8);
- TEST_AlignOf_impl(quint64 &, 8);
- TEST_AlignOf_impl(double &, 8);
-
- TEST_AlignOf_RValueRef(qint64 &&, 8);
- TEST_AlignOf_RValueRef(quint64 &&, 8);
- TEST_AlignOf_RValueRef(double &&, 8);
-
- // 32-bit x86 ABI idiosyncrasies
-#if defined(Q_PROCESSOR_X86_32) && !defined(Q_OS_WIN)
- TEST_AlignOf_impl(AlignmentInStruct<qint64>, 4);
-#else
- TEST_AlignOf_impl(AlignmentInStruct<qint64>, 8);
-#endif
-
- TEST_AlignOf_impl(AlignmentInStruct<quint64>, Q_ALIGNOF(AlignmentInStruct<qint64>));
- TEST_AlignOf_impl(AlignmentInStruct<double>, Q_ALIGNOF(AlignmentInStruct<qint64>));
-
- // 32-bit x86 ABI, Clang disagrees with gcc
-#if !defined(Q_PROCESSOR_X86_32) || !defined(Q_CC_CLANG) || defined(Q_OS_ANDROID)
- TEST_AlignOf_impl(qint64 [5], Q_ALIGNOF(qint64));
-#else
- TEST_AlignOf_impl(qint64 [5], Q_ALIGNOF(AlignmentInStruct<qint64>));
-#endif
-
- TEST_AlignOf_impl(qint64 (&) [5], Q_ALIGNOF(qint64 [5]));
- TEST_AlignOf_impl(quint64 [5], Q_ALIGNOF(quint64 [5]));
- TEST_AlignOf_impl(quint64 (&) [5], Q_ALIGNOF(quint64 [5]));
- TEST_AlignOf_impl(double [5], Q_ALIGNOF(double [5]));
- TEST_AlignOf_impl(double (&) [5], Q_ALIGNOF(double [5]));
-}
-
-#undef TEST_AlignOf
-#undef TEST_AlignOf_RValueRef
-#undef TEST_AlignOf_impl
-
void tst_QGlobal::integerForSize()
{
// compile-only test:
diff --git a/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
new file mode 100644
index 0000000000..7e8eee14d3
--- /dev/null
+++ b/tests/auto/corelib/global/qglobalstatic/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qglobalstatic.pro.
+
+#####################################################################
+## tst_qglobalstatic Test:
+#####################################################################
+
+add_qt_test(tst_qglobalstatic
+ EXCEPTIONS
+ SOURCES
+ tst_qglobalstatic.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/global/qhooks/CMakeLists.txt b/tests/auto/corelib/global/qhooks/CMakeLists.txt
new file mode 100644
index 0000000000..c86faba75f
--- /dev/null
+++ b/tests/auto/corelib/global/qhooks/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qhooks.pro.
+
+#####################################################################
+## tst_qhooks Test:
+#####################################################################
+
+add_qt_test(tst_qhooks
+ SOURCES
+ tst_qhooks.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
new file mode 100644
index 0000000000..bd0ab6aeca
--- /dev/null
+++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt
@@ -0,0 +1,25 @@
+if(NOT WINRT)
+ add_qt_executable(qlogging_helper
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES app/main.cpp
+ DEFINES QT_MESSAGELOGCONTEXT
+ LIBRARIES Qt::Core)
+
+ #special case begin
+ # Fixes required for the backtrace stack to be correct
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+ target_link_options(qlogging_helper PRIVATE -rdynamic)
+ endif()
+ set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default)
+ # special case end
+endif()
+
+add_qt_test(tst_qlogging SOURCES tst_qlogging.cpp
+ DEFINES
+ QT_MESSAGELOGCONTEXT
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper" # special case
+)
+
+target_compile_definitions(tst_qlogging PRIVATE QT_CMAKE_BUILD) # special case # to fix the binary name
diff --git a/tests/auto/corelib/global/qlogging/test/test.pro b/tests/auto/corelib/global/qlogging/test/test.pro
index 91896d4494..81445247e0 100644
--- a/tests/auto/corelib/global/qlogging/test/test.pro
+++ b/tests/auto/corelib/global/qlogging/test/test.pro
@@ -19,3 +19,4 @@ SOURCES = ../tst_qlogging.cpp
DEFINES += QT_MESSAGELOGCONTEXT
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES += HELPER_BINARY=\\\"helper\\\"
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 3af637d13a..6c6f3a2168 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -792,10 +792,17 @@ void tst_qmessagehandler::qMessagePattern_data()
#define QT_NAMESPACE_STR ""
#endif
+
+#ifdef QT_CMAKE_BUILD
+#define BACKTRACE_HELPER_NAME "qlogging_helper"
+#else
+#define BACKTRACE_HELPER_NAME "helper"
+#endif
+
#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|?helper?|" QT_NAMESPACE_STR "QMetaMethod::invoke|" QT_NAMESPACE_STR "QMetaObject::invokeMethod] from_a_function 34");
+ << "[MyClass::myFunction|MyClass::mySlot1|?" BACKTRACE_HELPER_NAME "?|" QT_NAMESPACE_STR "QMetaMethod::invoke|" QT_NAMESPACE_STR "QMetaObject::invokeMethod] from_a_function 34");
#endif
QTest::newRow("backtrace depth,separator") << "[%{backtrace depth=2 separator=\"\n\"}] %{message}" << true << (QList<QByteArray>()
@@ -820,9 +827,9 @@ void tst_qmessagehandler::qMessagePattern()
QProcess process;
#ifndef Q_OS_ANDROID
- const QString appExe(QLatin1String("helper"));
+ const QString appExe(QLatin1String(HELPER_BINARY));
#else
- const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/libhelper.so"));
+ const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/lib" BACKTRACE_HELPER_NAME ".so"));
#endif
//
@@ -870,7 +877,7 @@ void tst_qmessagehandler::setMessagePattern()
QProcess process;
#ifndef Q_OS_ANDROID
- const QString appExe(QLatin1String("helper"));
+ const QString appExe(QLatin1String(HELPER_BINARY));
#else
const QString appExe(QCoreApplication::applicationDirPath() + QLatin1String("/libhelper.so"));
#endif
diff --git a/tests/auto/corelib/global/qnumeric/CMakeLists.txt b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
new file mode 100644
index 0000000000..8a857c5622
--- /dev/null
+++ b/tests/auto/corelib/global/qnumeric/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qnumeric.pro.
+
+#####################################################################
+## tst_qnumeric Test:
+#####################################################################
+
+add_qt_test(tst_qnumeric
+ SOURCES
+ tst_qnumeric.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qnumeric CONDITION ICC
+ COMPILE_OPTIONS
+ -fp-model
+ strict
+)
+
+extend_target(tst_qnumeric CONDITION intel_icl
+ COMPILE_OPTIONS
+ /fp:strict
+)
diff --git a/tests/auto/corelib/global/qrand/CMakeLists.txt b/tests/auto/corelib/global/qrand/CMakeLists.txt
new file mode 100644
index 0000000000..80e8132809
--- /dev/null
+++ b/tests/auto/corelib/global/qrand/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qrand.pro.
+
+#####################################################################
+## tst_qrand Test:
+#####################################################################
+
+add_qt_test(tst_qrand
+ SOURCES
+ tst_qrand.cpp
+)
diff --git a/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
new file mode 100644
index 0000000000..edd2efe760
--- /dev/null
+++ b/tests/auto/corelib/global/qrandomgenerator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qrandomgenerator.pro.
+
+#####################################################################
+## tst_qrandomgenerator Test:
+#####################################################################
+
+add_qt_test(tst_qrandomgenerator
+ SOURCES
+ tst_qrandomgenerator.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
index 6f9dcc08f9..f997a40119 100644
--- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
+++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp
@@ -27,7 +27,6 @@
****************************************************************************/
#include <QtTest>
-#include <qlinkedlist.h>
#include <qobject.h>
#include <qrandom.h>
#include <qvector.h>
diff --git a/tests/auto/corelib/global/qtendian/CMakeLists.txt b/tests/auto/corelib/global/qtendian/CMakeLists.txt
new file mode 100644
index 0000000000..9efb17712e
--- /dev/null
+++ b/tests/auto/corelib/global/qtendian/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qtendian.pro.
+
+#####################################################################
+## tst_qtendian Test:
+#####################################################################
+
+add_qt_test(tst_qtendian
+ SOURCES
+ tst_qtendian.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/.prev_CMakeLists.txt b/tests/auto/corelib/io/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5baf4c35de
--- /dev/null
+++ b/tests/auto/corelib/io/.prev_CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from io.pro.
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qabstractfileengine)
+ add_subdirectory(qfileinfo)
+ add_subdirectory(qipaddress)
+ add_subdirectory(qloggingregistry)
+ add_subdirectory(qurlinternal)
+endif()
+add_subdirectory(qbuffer)
+add_subdirectory(qdataurl)
+add_subdirectory(qdiriterator)
+add_subdirectory(qfile)
+add_subdirectory(largefile)
+add_subdirectory(qfileselector)
+add_subdirectory(qfilesystemmetadata)
+add_subdirectory(qloggingcategory)
+add_subdirectory(qnodebug)
+add_subdirectory(qsavefile)
+add_subdirectory(qstandardpaths)
+add_subdirectory(qtemporarydir)
+add_subdirectory(qtemporaryfile)
+add_subdirectory(qurlquery)
+if(TARGET Qt::Concurrent)
+ add_subdirectory(qdebug)
+ add_subdirectory(qlockfile)
+ add_subdirectory(qurl)
+endif()
+if(NOT ANDROID)
+ add_subdirectory(qdir)
+ add_subdirectory(qresourceengine)
+endif()
+if(QT_FEATURE_private_tests OR UNIX)
+ add_subdirectory(qfilesystementry)
+endif()
+if(QT_FEATURE_filesystemwatcher)
+ add_subdirectory(qfilesystemwatcher)
+endif()
+if(TARGET Qt::Network)
+ add_subdirectory(qiodevice)
+endif()
+if(QT_FEATURE_process AND TARGET Qt::Network AND NOT ANDROID)
+ add_subdirectory(qprocess)
+endif()
+if(QT_FEATURE_process)
+ add_subdirectory(qprocess-noapplication)
+endif()
+if(QT_FEATURE_processenvironment)
+ add_subdirectory(qprocessenvironment)
+endif()
+if(QT_FEATURE_settings AND TARGET Qt::Gui)
+ add_subdirectory(qsettings)
+endif()
+if(NOT WINRT)
+ add_subdirectory(qstorageinfo)
+endif()
diff --git a/tests/auto/corelib/io/CMakeLists.txt b/tests/auto/corelib/io/CMakeLists.txt
new file mode 100644
index 0000000000..cb1246c3a2
--- /dev/null
+++ b/tests/auto/corelib/io/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from io.pro.
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qabstractfileengine)
+ add_subdirectory(qfileinfo)
+ add_subdirectory(qipaddress)
+ add_subdirectory(qloggingregistry)
+ add_subdirectory(qurlinternal)
+endif()
+add_subdirectory(qbuffer)
+add_subdirectory(qdataurl)
+add_subdirectory(qdiriterator)
+add_subdirectory(qfile)
+add_subdirectory(largefile)
+# add_subdirectory(qfileselector) # special case needs fixes
+add_subdirectory(qfilesystemmetadata)
+add_subdirectory(qloggingcategory)
+add_subdirectory(qnodebug)
+add_subdirectory(qsavefile)
+add_subdirectory(qstandardpaths)
+add_subdirectory(qtemporarydir)
+add_subdirectory(qtemporaryfile)
+add_subdirectory(qurlquery)
+if(TARGET Qt::Concurrent)
+ add_subdirectory(qdebug)
+ add_subdirectory(qlockfile)
+ add_subdirectory(qurl)
+endif()
+if(NOT ANDROID)
+ add_subdirectory(qdir)
+ # add_subdirectory(qresourceengine) # special case needs fixes
+endif()
+if(QT_FEATURE_private_tests OR UNIX)
+ add_subdirectory(qfilesystementry)
+endif()
+if(QT_FEATURE_filesystemwatcher)
+ add_subdirectory(qfilesystemwatcher)
+endif()
+if(TARGET Qt::Network)
+ add_subdirectory(qiodevice)
+endif()
+if(QT_FEATURE_process AND TARGET Qt::Network AND NOT ANDROID)
+ # add_subdirectory(qprocess) # special case needs fixes
+endif()
+if(QT_FEATURE_process)
+ add_subdirectory(qprocess-noapplication)
+endif()
+if(QT_FEATURE_processenvironment)
+ add_subdirectory(qprocessenvironment)
+endif()
+if(QT_FEATURE_settings AND TARGET Qt::Gui)
+ add_subdirectory(qsettings)
+endif()
+if(NOT WINRT)
+ add_subdirectory(qstorageinfo)
+endif()
diff --git a/tests/auto/corelib/io/largefile/CMakeLists.txt b/tests/auto/corelib/io/largefile/CMakeLists.txt
new file mode 100644
index 0000000000..cb1eba8526
--- /dev/null
+++ b/tests/auto/corelib/io/largefile/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from largefile.pro.
+
+#####################################################################
+## tst_largefile Test:
+#####################################################################
+
+add_qt_test(tst_largefile
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_largefile.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+)
diff --git a/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt b/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt
new file mode 100644
index 0000000000..1b7a11d657
--- /dev/null
+++ b/tests/auto/corelib/io/qabstractfileengine/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qabstractfileengine.pro.
+
+#####################################################################
+## tst_qabstractfileengine Test:
+#####################################################################
+
+add_qt_test(tst_qabstractfileengine
+ SOURCES
+ tst_qabstractfileengine.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+# Resources:
+set(qabstractfileengine_resource_files
+ "resources/"
+)
+
+add_qt_resource(tst_qabstractfileengine "qabstractfileengine"
+ PREFIX
+ "/tst_qabstractfileengine/"
+ FILES
+ ${qabstractfileengine_resource_files}
+)
+
diff --git a/tests/auto/corelib/io/qbuffer/CMakeLists.txt b/tests/auto/corelib/io/qbuffer/CMakeLists.txt
new file mode 100644
index 0000000000..40502dd004
--- /dev/null
+++ b/tests/auto/corelib/io/qbuffer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qbuffer.pro.
+
+#####################################################################
+## tst_qbuffer Test:
+#####################################################################
+
+add_qt_test(tst_qbuffer
+ SOURCES
+ tst_qbuffer.cpp
+)
diff --git a/tests/auto/corelib/io/qdataurl/CMakeLists.txt b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
new file mode 100644
index 0000000000..507852a11e
--- /dev/null
+++ b/tests/auto/corelib/io/qdataurl/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdataurl.pro.
+
+#####################################################################
+## tst_qdataurl Test:
+#####################################################################
+
+add_qt_test(tst_qdataurl
+ SOURCES
+ tst_qdataurl.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/qdebug/CMakeLists.txt b/tests/auto/corelib/io/qdebug/CMakeLists.txt
new file mode 100644
index 0000000000..d7fa4fb7cd
--- /dev/null
+++ b/tests/auto/corelib/io/qdebug/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdebug.pro.
+
+#####################################################################
+## tst_qdebug Test:
+#####################################################################
+
+add_qt_test(tst_qdebug
+ SOURCES
+ tst_qdebug.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index 584e66a7db..7b9e614cf7 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -66,6 +66,7 @@ private slots:
void resetFormat() const;
void defaultMessagehandler() const;
void threadSafety() const;
+ void toString() const;
};
void tst_QDebug::assignment() const
@@ -740,6 +741,28 @@ void tst_QDebug::threadSafety() const
}
}
+void tst_QDebug::toString() const
+{
+ // By reference.
+ {
+ MyPoint point(3, 4);
+ QString expectedString;
+ QDebug stream(&expectedString);
+ stream << point;
+ QCOMPARE(QDebug::toString(point), expectedString);
+ }
+
+ // By pointer.
+ {
+ QObject qobject;
+ qobject.setObjectName("test");
+ QString expectedString;
+ QDebug stream(&expectedString);
+ stream << &qobject;
+ QCOMPARE(QDebug::toString(&qobject), expectedString);
+ }
+}
+
// Should compile: instentiation of unrelated operator<< should not cause cause compilation
// error in QDebug operators (QTBUG-47375)
class TestClassA {};
diff --git a/tests/auto/corelib/io/qdir/CMakeLists.txt b/tests/auto/corelib/io/qdir/CMakeLists.txt
new file mode 100644
index 0000000000..84136283c1
--- /dev/null
+++ b/tests/auto/corelib/io/qdir/CMakeLists.txt
@@ -0,0 +1,99 @@
+# Generated from qdir.pro.
+
+#####################################################################
+## tst_qdir Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "testdir")
+list(APPEND test_data "testData")
+list(APPEND test_data "searchdir")
+list(APPEND test_data "resources")
+list(APPEND test_data "entrylist")
+list(APPEND test_data "types")
+list(APPEND test_data "tst_qdir.cpp")
+
+add_qt_test(tst_qdir
+ SOURCES
+ tst_qdir.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qdir_resource_files
+ "resources/entryList/"
+)
+
+add_qt_resource(tst_qdir "qdir"
+ PREFIX
+ "/tst_qdir/"
+ FILES
+ ${qdir_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qdir.pro:APPLE_IOS:
+# QMAKE_INFO_PLIST = "Info.plist"
+
+extend_target(tst_qdir CONDITION CONFIG___contains___builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "entrylist/directory/dummy"
+ "entrylist/file"
+ "resources/entryList/file1.data"
+ "resources/entryList/file2.data"
+ "resources/entryList/file3.data"
+ "resources/entryList/file4.nothing"
+ "searchdir/subdir1/picker.png"
+ "searchdir/subdir2/picker.png"
+ "testData/empty"
+ "testdir/dir/qdir.pro"
+ "testdir/dir/qrc_qdir.cpp"
+ "testdir/dir/tmp/empty"
+ "testdir/dir/tst_qdir.cpp"
+ "testdir/spaces/foo. bar"
+ "testdir/spaces/foo.bar"
+ "tst_qdir.cpp"
+ "types/a"
+ "types/a.a"
+ "types/a.b"
+ "types/a.c"
+ "types/b"
+ "types/b.a"
+ "types/b.b"
+ "types/b.c"
+ "types/c"
+ "types/c.a"
+ "types/c.b"
+ "types/c.c"
+ "types/d.a/dummy"
+ "types/d.b/dummy"
+ "types/d.c/dummy"
+ "types/d/dummy"
+ "types/e.a/dummy"
+ "types/e.b/dummy"
+ "types/e.c/dummy"
+ "types/e/dummy"
+ "types/f.a/dummy"
+ "types/f.b/dummy"
+ "types/f.c/dummy"
+ "types/f/dummy"
+ )
+
+ add_qt_resource(tst_qdir "android_testdata"
+ PREFIX
+ "/android_testdata"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt b/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
new file mode 100644
index 0000000000..e50fcb60ca
--- /dev/null
+++ b/tests/auto/corelib/io/qdir/testdir/dir/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdir.pro.
+
+#####################################################################
+## qdir Binary:
+#####################################################################
+
+add_qt_executable(qdir
+ GUI
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/io/qdiriterator/CMakeLists.txt b/tests/auto/corelib/io/qdiriterator/CMakeLists.txt
new file mode 100644
index 0000000000..2e120b4621
--- /dev/null
+++ b/tests/auto/corelib/io/qdiriterator/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from qdiriterator.pro.
+
+#####################################################################
+## tst_qdiriterator Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "entrylist")
+
+add_qt_test(tst_qdiriterator
+ SOURCES
+ tst_qdiriterator.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qdiriterator_resource_files
+ "entrylist/directory/dummy"
+ "entrylist/file"
+)
+
+add_qt_resource(tst_qdiriterator "qdiriterator"
+ PREFIX
+ "/testdata/"
+ FILES
+ ${qdiriterator_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qdiriterator CONDITION CONFIG___contains___builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
diff --git a/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt b/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..b976754629
--- /dev/null
+++ b/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt
@@ -0,0 +1,89 @@
+# Generated from qfile.pro.
+
+#####################################################################
+## tst_qfile Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "BLACKLIST")
+list(APPEND test_data "dosfile.txt")
+list(APPEND test_data "noendofline.txt")
+list(APPEND test_data "testfile.txt")
+list(APPEND test_data "testlog.txt")
+list(APPEND test_data "two.dots.file")
+list(APPEND test_data "tst_qfile.cpp")
+list(APPEND test_data "Makefile")
+list(APPEND test_data "forCopying.txt")
+list(APPEND test_data "forRenaming.txt")
+list(APPEND test_data "resources/file1.ext1")
+
+add_qt_test(tst_qfile
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qfile.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qfile_resource_files
+ "resources/"
+)
+
+add_qt_resource(tst_qfile "qfile"
+ PREFIX
+ "/tst_qfileinfo/"
+ FILES
+ ${qfile_resource_files}
+)
+set(rename-fallback_resource_files
+ "rename-fallback.qrc"
+)
+
+add_qt_resource(tst_qfile "rename-fallback"
+ PREFIX
+ "/"
+ FILES
+ ${rename-fallback_resource_files}
+)
+set(copy-fallback_resource_files
+ "copy-fallback.qrc"
+)
+
+add_qt_resource(tst_qfile "copy-fallback"
+ PREFIX
+ "/"
+ FILES
+ ${copy-fallback_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfile CONDITION TARGET Qt::Network
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+extend_target(tst_qfile CONDITION NOT TARGET Qt::Network
+ DEFINES
+ QT_NO_NETWORK
+)
+
+extend_target(tst_qfile CONDITION CONFIG___contains___builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
+
+extend_target(tst_qfile CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ ole32
+ uuid
+)
+if(NOT WINRT)
+ add_subdirectory(stdinprocess)
+endif()
diff --git a/tests/auto/corelib/io/qfile/CMakeLists.txt b/tests/auto/corelib/io/qfile/CMakeLists.txt
new file mode 100644
index 0000000000..03b648d76f
--- /dev/null
+++ b/tests/auto/corelib/io/qfile/CMakeLists.txt
@@ -0,0 +1,89 @@
+# Generated from qfile.pro.
+
+#####################################################################
+## tst_qfile Test:
+#####################################################################
+
+# Collect test data
+# list(APPEND test_data "BLACKLIST") # special case remove
+list(APPEND test_data "dosfile.txt")
+list(APPEND test_data "noendofline.txt")
+list(APPEND test_data "testfile.txt")
+list(APPEND test_data "testlog.txt")
+list(APPEND test_data "two.dots.file")
+list(APPEND test_data "tst_qfile.cpp")
+# list(APPEND test_data "Makefile") # special case remove
+list(APPEND test_data "forCopying.txt")
+list(APPEND test_data "forRenaming.txt")
+list(APPEND test_data "resources/file1.ext1")
+
+add_qt_test(tst_qfile
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qfile.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qfile_resource_files
+ "resources/"
+)
+
+add_qt_resource(tst_qfile "qfile"
+ PREFIX
+ "/tst_qfileinfo/"
+ FILES
+ ${qfile_resource_files}
+)
+set(rename-fallback_resource_files
+ "rename-fallback.qrc"
+)
+
+add_qt_resource(tst_qfile "rename-fallback"
+ PREFIX
+ "/"
+ FILES
+ ${rename-fallback_resource_files}
+)
+set(copy-fallback_resource_files
+ "copy-fallback.qrc"
+)
+
+add_qt_resource(tst_qfile "copy-fallback"
+ PREFIX
+ "/"
+ FILES
+ ${copy-fallback_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfile CONDITION TARGET Qt::Network
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+extend_target(tst_qfile CONDITION NOT TARGET Qt::Network
+ DEFINES
+ QT_NO_NETWORK
+)
+
+extend_target(tst_qfile CONDITION CONFIG___contains___builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
+
+extend_target(tst_qfile CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ ole32
+ uuid
+)
+if(NOT WINRT)
+ add_subdirectory(stdinprocess)
+endif()
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt b/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
new file mode 100644
index 0000000000..994c2fc268
--- /dev/null
+++ b/tests/auto/corelib/io/qfile/stdinprocess/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from stdinprocess.pro.
+
+#####################################################################
+## stdinprocess_helper Binary:
+#####################################################################
+
+add_qt_test_helper(stdinprocess_helper
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/io/qfileinfo/CMakeLists.txt b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt
new file mode 100644
index 0000000000..a6cf3a38f1
--- /dev/null
+++ b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from qfileinfo.pro.
+
+#####################################################################
+## tst_qfileinfo Test:
+#####################################################################
+
+add_qt_test(tst_qfileinfo
+ SOURCES
+ tst_qfileinfo.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+# Resources:
+set(qfileinfo_resource_files
+ "resources/"
+)
+
+add_qt_resource(tst_qfileinfo "qfileinfo"
+ PREFIX
+ "/tst_qfileinfo/"
+ FILES
+ ${qfileinfo_resource_files}
+)
+set(testdata_resource_files
+ "resources/file1"
+ "resources/file1.ext1"
+ "resources/file1.ext1.ext2"
+ "tst_qfileinfo.cpp"
+)
+
+add_qt_resource(tst_qfileinfo "testdata"
+ PREFIX
+ "/testdata"
+ FILES
+ ${testdata_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfileinfo CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ advapi32
+ netapi32
+)
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 09ef0ea44f..ebb9a0a44c 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -116,7 +116,7 @@ static DWORD createSymbolicLink(const QString &symLinkName, const QString &targe
reinterpret_cast<const wchar_t*>(nativeTarget.utf16()), flags) == FALSE) {
result = GetLastError();
QTextStream(errorMessage) << "CreateSymbolicLink(" << nativeSymLinkName << ", "
- << nativeTarget << ", 0x" << hex << flags << dec << ") failed with error " << result
+ << nativeTarget << ", 0x" << Qt::hex << flags << Qt::dec << ") failed with error " << result
<< ": " << qt_error_string(int(result));
}
return result;
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+mac/test5 b/tests/auto/corelib/io/qfileselector/platforms/+mac/test5
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+mac/test5
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+osx/test4 b/tests/auto/corelib/io/qfileselector/platforms/+osx/test4
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+osx/test4
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+mac/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+ios/test
index e69de29bb2..e69de29bb2 100644
--- a/tests/auto/corelib/io/qfileselector/platforms/+mac/test
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+ios/test
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+ios/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+macos/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+macos/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+macos/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/+macos/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/+macos/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/+macos/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/+osx/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+mac/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+osx/test b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+macos/test
index e69de29bb2..e69de29bb2 100644
--- a/tests/auto/corelib/io/qfileselector/platforms/+osx/test
+++ b/tests/auto/corelib/io/qfileselector/platforms/+unix/+darwin/+macos/test
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.qrc b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
index 54b2e0a0e2..f3b3ede575 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
@@ -1,65 +1,51 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/">
- <file>extras/test</file>
- <file>extras/test2</file>
- <file>extras/+custom1/test</file>
- <file>extras/+custom1/test3</file>
- <file>extras/+custom2/test</file>
- <file>extras/+custom3/test</file>
- <file>extras/+custom3/+custom2/test</file>
- <file>extras/+custom3/+custom4/test</file>
- <file>extras/+custom3/+custom5/test</file>
- <file>extras/+custom5/+custom3/test</file>
-
- <!-- platforms/test: deepest possible selection -->
- <file>platforms/test</file>
- <file>platforms/+unix/+android/test</file>
- <file>platforms/+unix/+darwin/+mac/+ios/test</file>
- <file>platforms/+unix/+darwin/+mac/+osx/+macos/test</file>
- <file>platforms/+unix/+darwin/+mac/+osx/test</file>
- <file>platforms/+unix/+darwin/+mac/test</file>
- <file>platforms/+unix/+darwin/test</file>
- <file>platforms/+unix/+haiku/test</file>
- <file>platforms/+unix/+linux/test</file>
- <file>platforms/+unix/+qnx/test</file>
- <file>platforms/+unix/test</file>
- <file>platforms/+windows/+wince/test</file>
- <file>platforms/+windows/+winnt/test</file>
- <file>platforms/+windows/+winrt/test</file>
- <file>platforms/+windows/test</file>
- <file>platforms/+android/test</file>
- <file>platforms/+ios/test</file>
- <file>platforms/+macos/test</file>
- <file>platforms/+osx/test</file>
- <file>platforms/+darwin/test</file>
- <file>platforms/+mac/test</file>
- <file>platforms/+haiku/test</file>
- <file>platforms/+linux/test</file>
- <file>platforms/+qnx/test</file>
- <file>platforms/+wince/test</file>
- <file>platforms/+winrt/test</file>
-
- <!-- platforms/test2: shallow selection for the deepest selector -->
- <file>platforms/test2</file>
- <file>platforms/+android/test2</file>
- <file>platforms/+ios/test2</file>
- <file>platforms/+macos/test2</file>
- <file>platforms/+haiku/test2</file>
- <file>platforms/+linux/test2</file>
- <file>platforms/+qnx/test2</file>
- <file>platforms/+wince/test2</file>
- <file>platforms/+winnt/test2</file>
- <file>platforms/+winrt/test2</file>
-
- <!-- platforms/test3: selection for the family only -->
- <file>platforms/test3</file>
- <file>platforms/+windows/test3</file>
- <file>platforms/+unix/test3</file>
-
- <!-- platforms/test4 and 5: special cases for macOS -->
- <file>platforms/test4</file>
- <file>platforms/+osx/test4</file>
- <file>platforms/test5</file>
- <file>platforms/+mac/test5</file>
-</qresource>
+<RCC>
+ <qresource prefix="/">
+ <file>extras/test</file>
+ <file>extras/test2</file>
+ <file>extras/+custom1/test</file>
+ <file>extras/+custom1/test3</file>
+ <file>extras/+custom2/test</file>
+ <file>extras/+custom3/test</file>
+ <file>extras/+custom3/+custom2/test</file>
+ <file>extras/+custom3/+custom4/test</file>
+ <file>extras/+custom3/+custom5/test</file>
+ <file>extras/+custom5/+custom3/test</file>
+ <file>platforms/test</file>
+ <file>platforms/+unix/+android/test</file>
+ <file>platforms/+unix/+darwin/test</file>
+ <file>platforms/+unix/+haiku/test</file>
+ <file>platforms/+unix/+linux/test</file>
+ <file>platforms/+unix/+qnx/test</file>
+ <file>platforms/+unix/test</file>
+ <file>platforms/+windows/+wince/test</file>
+ <file>platforms/+windows/+winnt/test</file>
+ <file>platforms/+windows/+winrt/test</file>
+ <file>platforms/+windows/test</file>
+ <file>platforms/+android/test</file>
+ <file>platforms/+ios/test</file>
+ <file>platforms/+macos/test</file>
+ <file>platforms/+darwin/test</file>
+ <file>platforms/+haiku/test</file>
+ <file>platforms/+linux/test</file>
+ <file>platforms/+qnx/test</file>
+ <file>platforms/+wince/test</file>
+ <file>platforms/+winrt/test</file>
+ <file>platforms/test2</file>
+ <file>platforms/+android/test2</file>
+ <file>platforms/+ios/test2</file>
+ <file>platforms/+macos/test2</file>
+ <file>platforms/+haiku/test2</file>
+ <file>platforms/+linux/test2</file>
+ <file>platforms/+qnx/test2</file>
+ <file>platforms/+wince/test2</file>
+ <file>platforms/+winnt/test2</file>
+ <file>platforms/+winrt/test2</file>
+ <file>platforms/test3</file>
+ <file>platforms/+windows/test3</file>
+ <file>platforms/+unix/test3</file>
+ <file>platforms/test4</file>
+ <file>platforms/test5</file>
+ <file>platforms/+unix/+darwin/+macos/test</file>
+ <file>platforms/+unix/+darwin/+ios/test</file>
+ </qresource>
</RCC>
diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
index 11b1fdaeeb..bac7a69e0f 100644
--- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
+++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
@@ -126,14 +126,6 @@ void tst_QFileSelector::basicTest_data()
QTest::newRow("platform3") << QString(":/platforms/test3") << QStringList()
<< expectedPlatform3File;
-#ifdef Q_OS_MACOS
- // special case for compatibility code
- QTest::newRow("osx-compat") << QString(":/platforms/test4") << QStringList()
- << ":/platforms/+osx/test4";
- QTest::newRow("mac-compat") << QString(":/platforms/test5") << QStringList()
- << ":/platforms/+mac/test5";
-#endif
-
QString resourceTestPath(":/extras/test");
QString custom1("custom1");
QTest::newRow("custom1-noselector") << resourceTestPath << QStringList()
diff --git a/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt b/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
new file mode 100644
index 0000000000..e989315bdd
--- /dev/null
+++ b/tests/auto/corelib/io/qfilesystementry/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qfilesystementry.pro.
+
+#####################################################################
+## tst_qfilesystementry Test:
+#####################################################################
+
+add_qt_test(tst_qfilesystementry
+ SOURCES
+ ${QT_SOURCE_TREE}/src/corelib/io/qfilesystementry.cpp ${QT_SOURCE_TREE}/src/corelib/io/qfilesystementry_p.h
+ tst_qfilesystementry.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt b/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt
new file mode 100644
index 0000000000..a237090a48
--- /dev/null
+++ b/tests/auto/corelib/io/qfilesystemmetadata/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qfilesystemmetadata.pro.
+
+#####################################################################
+## tst_qfilesystemmetadata Test:
+#####################################################################
+
+add_qt_test(tst_qfilesystemmetadata
+ SOURCES
+ tst_qfilesystemmetadata.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt b/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
new file mode 100644
index 0000000000..1dfef5acab
--- /dev/null
+++ b/tests/auto/corelib/io/qfilesystemwatcher/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qfilesystemwatcher.pro.
+
+#####################################################################
+## tst_qfilesystemwatcher Test:
+#####################################################################
+
+add_qt_test(tst_qfilesystemwatcher
+ SOURCES
+ tst_qfilesystemwatcher.cpp
+)
diff --git a/tests/auto/corelib/io/qiodevice/CMakeLists.txt b/tests/auto/corelib/io/qiodevice/CMakeLists.txt
new file mode 100644
index 0000000000..6b7833ac22
--- /dev/null
+++ b/tests/auto/corelib/io/qiodevice/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from qiodevice.pro.
+
+#####################################################################
+## tst_qiodevice Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "tst_qiodevice.cpp")
+
+add_qt_test(tst_qiodevice
+ SOURCES
+ tst_qiodevice.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qiodevice.pro:<TRUE>:
+# MOC_DIR = "tmp"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "tst_qiodevice.cpp"
+ )
+
+ add_qt_resource(tst_qiodevice "android_testdata"
+ PREFIX
+ "/"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/io/qipaddress/CMakeLists.txt b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
new file mode 100644
index 0000000000..821cd58bdb
--- /dev/null
+++ b/tests/auto/corelib/io/qipaddress/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qipaddress.pro.
+
+#####################################################################
+## tst_qipaddress Test:
+#####################################################################
+
+add_qt_test(tst_qipaddress
+ SOURCES
+ tst_qipaddress.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/qlockfile/CMakeLists.txt b/tests/auto/corelib/io/qlockfile/CMakeLists.txt
new file mode 100644
index 0000000000..52bd7bfd8f
--- /dev/null
+++ b/tests/auto/corelib/io/qlockfile/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from qlockfile.pro.
+
+#####################################################################
+## tst_qlockfile Test:
+#####################################################################
+
+add_qt_test(tst_qlockfile
+ SOURCES
+ tst_qlockfile.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qlockfile CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ advapi32
+)
+add_subdirectory(qlockfiletesthelper)
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/.prev_CMakeLists.txt b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..755dc7cf39
--- /dev/null
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/.prev_CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from qlockfile_test_helper.pro.
+
+#####################################################################
+## qlockfile_test_helper Binary:
+#####################################################################
+
+add_qt_executable(qlockfile_test_helper
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ qlockfile_test_helper.cpp
+)
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt
new file mode 100644
index 0000000000..b515037d56
--- /dev/null
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qlockfile_test_helper.pro.
+
+#####################################################################
+## qlockfile_test_helper Binary:
+#####################################################################
+
+add_qt_test_helper(qlockfile_test_helper # special case
+ OVERRIDE_OUTPUT_DIRECTORY # special case
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ qlockfile_test_helper.cpp
+)
diff --git a/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt b/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
new file mode 100644
index 0000000000..9e1eaf3e4a
--- /dev/null
+++ b/tests/auto/corelib/io/qloggingcategory/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qloggingcategory.pro.
+
+#####################################################################
+## tst_qloggingcategory Test:
+#####################################################################
+
+add_qt_test(tst_qloggingcategory
+ SOURCES
+ tst_qloggingcategory.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+#### Keys ignored in scope 1:.:.:qloggingcategory.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt b/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt
new file mode 100644
index 0000000000..3c42af9d01
--- /dev/null
+++ b/tests/auto/corelib/io/qloggingregistry/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from qloggingregistry.pro.
+
+#####################################################################
+## tst_qloggingregistry Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "qtlogging.ini")
+
+add_qt_test(tst_qloggingregistry
+ SOURCES
+ tst_qloggingregistry.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qloggingregistry.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "qtlogging.ini"
+ )
+
+ add_qt_resource(tst_qloggingregistry "android_testdata"
+ PREFIX
+ "/"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/io/qnodebug/CMakeLists.txt b/tests/auto/corelib/io/qnodebug/CMakeLists.txt
new file mode 100644
index 0000000000..4d1b57e222
--- /dev/null
+++ b/tests/auto/corelib/io/qnodebug/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qnodebug.pro.
+
+#####################################################################
+## tst_qnodebug Test:
+#####################################################################
+
+add_qt_test(tst_qnodebug
+ SOURCES
+ tst_qnodebug.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt b/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt
new file mode 100644
index 0000000000..ce6195fc37
--- /dev/null
+++ b/tests/auto/corelib/io/qprocess-noapplication/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qprocess-noapplication.pro.
+
+#####################################################################
+## qprocess-noapplication Test:
+#####################################################################
+
+add_qt_test(qprocess-noapplication
+ SOURCES
+ tst_qprocessnoapplication.cpp
+)
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index e799369c8a..269a59ae41 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -42,8 +42,6 @@
#include <QtNetwork/QHostInfo>
#include <stdlib.h>
-typedef void (QProcess::*QProcessFinishedSignal1)(int);
-typedef void (QProcess::*QProcessFinishedSignal2)(int, QProcess::ExitStatus);
typedef void (QProcess::*QProcessErrorSignal)(QProcess::ProcessError);
class tst_QProcess : public QObject
@@ -152,7 +150,6 @@ private slots:
void failToStartEmptyArgs();
#if QT_DEPRECATED_SINCE(5, 13)
- void crashTest2_deprecated();
void restartProcessDeadlock_deprecated();
void waitForReadyReadInAReadyReadSlot_deprecated();
void finishProcessBeforeReadingDone_deprecated();
@@ -350,7 +347,7 @@ void tst_QProcess::crashTest()
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
QSignalSpy spy(process.data(), &QProcess::errorOccurred);
- QSignalSpy spy2(process.data(), static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy spy2(process.data(), &QProcess::finished);
QVERIFY(spy.isValid());
QVERIFY(spy2.isValid());
@@ -393,13 +390,12 @@ void tst_QProcess::crashTest2()
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
QSignalSpy spy(&process, static_cast<QProcessErrorSignal>(&QProcess::errorOccurred));
- QSignalSpy spy2(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy spy2(&process, &QProcess::finished);
QVERIFY(spy.isValid());
QVERIFY(spy2.isValid());
- QObject::connect(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished),
- this, &tst_QProcess::exitLoopSlot);
+ QObject::connect(&process, &QProcess::finished, this, &tst_QProcess::exitLoopSlot);
QTestEventLoop::instance().enterLoop(30);
if (QTestEventLoop::instance().timeout())
@@ -724,15 +720,14 @@ void tst_QProcess::restartProcessDeadlock()
// process in the finished() connected slot causes a deadlock
// because of the way QProcessManager uses its locks.
QProcess process;
- connect(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished),
- this, &tst_QProcess::restartProcess);
+ connect(&process, &QProcess::finished, this, &tst_QProcess::restartProcess);
process.start("testProcessEcho/testProcessEcho");
QCOMPARE(process.write("", 1), qlonglong(1));
QVERIFY(process.waitForFinished(5000));
- QObject::disconnect(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished), nullptr, nullptr);
+ QObject::disconnect(&process, &QProcess::finished, nullptr, nullptr);
QCOMPARE(process.write("", 1), qlonglong(1));
QVERIFY(process.waitForFinished(5000));
@@ -931,8 +926,7 @@ public:
SoftExitProcess(int n) : waitedForFinished(false), n(n), killing(false)
{
- connect(this, static_cast<QProcessFinishedSignal2>(&QProcess::finished),
- this, &SoftExitProcess::finishedSlot);
+ connect(this, &QProcess::finished, this, &SoftExitProcess::finishedSlot);
switch (n) {
case 0:
@@ -1177,8 +1171,7 @@ protected:
exitCode = 90210;
QProcess process;
- connect(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished),
- this, &TestThread::catchExitCode, Qt::DirectConnection);
+ connect(&process, &QProcess::finished, this, &TestThread::catchExitCode, Qt::DirectConnection);
process.start("testProcessEcho/testProcessEcho");
@@ -1251,8 +1244,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
{
QProcess process;
connect(&process, &QIODevice::readyRead, this, &tst_QProcess::waitForReadyReadInAReadyReadSlotSlot);
- connect(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished),
- this, &tst_QProcess::exitLoopSlot);
+ connect(&process, &QProcess::finished, this, &tst_QProcess::exitLoopSlot);
bytesAvailable = 0;
process.start("testProcessEcho/testProcessEcho");
@@ -1490,7 +1482,7 @@ void tst_QProcess::failToStart()
QProcess process;
QSignalSpy stateSpy(&process, &QProcess::stateChanged);
QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
- QSignalSpy finishedSpy(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy finishedSpy(&process, &QProcess::finished);
QVERIFY(stateSpy.isValid());
QVERIFY(errorSpy.isValid());
QVERIFY(finishedSpy.isValid());
@@ -1499,10 +1491,6 @@ void tst_QProcess::failToStart()
QSignalSpy errorSpy2(&process, static_cast<QProcessErrorSignal>(&QProcess::error));
QVERIFY(errorSpy2.isValid());
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QSignalSpy finishedSpy2(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished));
- QVERIFY(finishedSpy2.isValid());
-#endif
// OS X and HP-UX have a really low default process limit (~100), so spawning
// to many processes here will cause test failures later on.
@@ -1548,9 +1536,6 @@ void tst_QProcess::failToStart()
#if QT_DEPRECATED_SINCE(5, 6)
QCOMPARE(errorSpy2.count(), j * attempts + i + 1);
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QCOMPARE(finishedSpy2.count(), 0);
-#endif
int it = j * attempts + i + 1;
@@ -1569,7 +1554,7 @@ void tst_QProcess::failToStartWithWait()
QProcess process;
QEventLoop loop;
QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
- QSignalSpy finishedSpy(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy finishedSpy(&process, &QProcess::finished);
QVERIFY(errorSpy.isValid());
QVERIFY(finishedSpy.isValid());
@@ -1577,10 +1562,6 @@ void tst_QProcess::failToStartWithWait()
QSignalSpy errorSpy2(&process, static_cast<QProcessErrorSignal>(&QProcess::error));
QVERIFY(errorSpy2.isValid());
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QSignalSpy finishedSpy2(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished));
- QVERIFY(finishedSpy2.isValid());
-#endif
for (int i = 0; i < 50; ++i) {
process.start("/blurp", QStringList() << "-v" << "-debug");
@@ -1592,10 +1573,6 @@ void tst_QProcess::failToStartWithWait()
#if QT_DEPRECATED_SINCE(5, 6)
QCOMPARE(errorSpy2.count(), i + 1);
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QCOMPARE(finishedSpy2.count(), 0);
-#endif
-
}
}
@@ -1607,7 +1584,7 @@ void tst_QProcess::failToStartWithEventLoop()
QProcess process;
QEventLoop loop;
QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
- QSignalSpy finishedSpy(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy finishedSpy(&process, &QProcess::finished);
QVERIFY(errorSpy.isValid());
QVERIFY(finishedSpy.isValid());
@@ -1615,10 +1592,6 @@ void tst_QProcess::failToStartWithEventLoop()
QSignalSpy errorSpy2(&process, static_cast<QProcessErrorSignal>(&QProcess::error));
QVERIFY(errorSpy2.isValid());
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QSignalSpy finishedSpy2(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished));
- QVERIFY(finishedSpy2.isValid());
-#endif
// The error signal may be emitted before start() returns
connect(&process, &QProcess::errorOccurred, &loop, &QEventLoop::quit, Qt::QueuedConnection);
@@ -1635,9 +1608,6 @@ void tst_QProcess::failToStartWithEventLoop()
#if QT_DEPRECATED_SINCE(5, 6)
QCOMPARE(errorSpy2.count(), i + 1);
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QCOMPARE(finishedSpy2.count(), 0);
-#endif
}
}
@@ -1912,7 +1882,7 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QProcess process;
QSignalSpy errorSpy(&process, &QProcess::errorOccurred);
- QSignalSpy finishedSpy(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy finishedSpy(&process, &QProcess::finished);
QVERIFY(errorSpy.isValid());
QVERIFY(finishedSpy.isValid());
@@ -1920,10 +1890,6 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QSignalSpy errorSpy2(&process, static_cast<QProcessErrorSignal>(&QProcess::error));
QVERIFY(errorSpy2.isValid());
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QSignalSpy finishedSpy1(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished));
- QVERIFY(finishedSpy1.isValid());
-#endif
QVERIFY(!process.waitForReadyRead()); // used to crash
process.start("doesntexist");
@@ -1935,9 +1901,6 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QCOMPARE(errorSpy2.count(), 1);
QCOMPARE(errorSpy2.at(0).at(0).toInt(), 0);
#endif
-#if QT_DEPRECATED_SINCE(5, 13)
- QCOMPARE(finishedSpy1.count(), 0);
-#endif
}
void tst_QProcess::setStandardInputFile()
@@ -2390,7 +2353,7 @@ void tst_QProcess::onlyOneStartedSignal()
QProcess process;
QSignalSpy spyStarted(&process, &QProcess::started);
- QSignalSpy spyFinished(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
+ QSignalSpy spyFinished(&process, &QProcess::finished);
QVERIFY(spyStarted.isValid());
QVERIFY(spyFinished.isValid());
@@ -2433,8 +2396,7 @@ void tst_QProcess::finishProcessBeforeReadingDone()
QProcess process;
BlockOnReadStdOut blocker(&process);
QEventLoop loop;
- connect(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished),
- &loop, &QEventLoop::quit);
+ connect(&process, &QProcess::finished, &loop, &QEventLoop::quit);
process.start("testProcessOutput/testProcessOutput");
QVERIFY(process.waitForStarted());
loop.exec();
@@ -2581,52 +2543,20 @@ void tst_QProcess::processEventsInAReadyReadSlot()
#if QT_DEPRECATED_SINCE(5, 13)
-void tst_QProcess::crashTest2_deprecated()
-{
- QProcess process;
- process.start("testProcessCrash/testProcessCrash");
- QVERIFY(process.waitForStarted(5000));
-
- qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
- qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
-
- QSignalSpy spy(&process, static_cast<QProcessErrorSignal>(&QProcess::errorOccurred));
- QSignalSpy spy2(&process, static_cast<QProcessFinishedSignal2>(&QProcess::finished));
-
- QVERIFY(spy.isValid());
- QVERIFY(spy2.isValid());
-
- QObject::connect(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished),
- this, &tst_QProcess::exitLoopSlot);
-
- QTestEventLoop::instance().enterLoop(30);
- if (QTestEventLoop::instance().timeout())
- QFAIL("Failed to detect crash : operation timed out");
-
- QCOMPARE(spy.count(), 1);
- QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy.at(0).at(0).constData()), QProcess::Crashed);
-
- QCOMPARE(spy2.count(), 1);
- QCOMPARE(*static_cast<const QProcess::ExitStatus *>(spy2.at(0).at(1).constData()), QProcess::CrashExit);
-
- QCOMPARE(process.exitStatus(), QProcess::CrashExit);
-}
-
void tst_QProcess::restartProcessDeadlock_deprecated()
{
// The purpose of this test is to detect whether restarting a
// process in the finished() connected slot causes a deadlock
// because of the way QProcessManager uses its locks.
QProcess process;
- connect(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished),
- this, &tst_QProcess::restartProcess);
+ connect(&process, &QProcess::finished, this, &tst_QProcess::restartProcess);
process.start("testProcessEcho/testProcessEcho");
QCOMPARE(process.write("", 1), qlonglong(1));
QVERIFY(process.waitForFinished(5000));
- QObject::disconnect(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished), nullptr, nullptr);
+ QObject::disconnect(&process, &QProcess::finished, nullptr, nullptr);
QCOMPARE(process.write("", 1), qlonglong(1));
QVERIFY(process.waitForFinished(5000));
@@ -2638,8 +2568,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot_deprecated()
{
QProcess process;
connect(&process, &QIODevice::readyRead, this, &tst_QProcess::waitForReadyReadInAReadyReadSlotSlot);
- connect(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished),
- this, &tst_QProcess::exitLoopSlot);
+ connect(&process, &QProcess::finished, this, &tst_QProcess::exitLoopSlot);
bytesAvailable = 0;
process.start("testProcessEcho/testProcessEcho");
@@ -2665,8 +2594,7 @@ void tst_QProcess::finishProcessBeforeReadingDone_deprecated()
QProcess process;
BlockOnReadStdOut blocker(&process);
QEventLoop loop;
- connect(&process, static_cast<QProcessFinishedSignal1>(&QProcess::finished),
- &loop, &QEventLoop::quit);
+ connect(&process, &QProcess::finished, &loop, &QEventLoop::quit);
process.start("testProcessOutput/testProcessOutput");
QVERIFY(process.waitForStarted());
loop.exec();
diff --git a/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt b/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
new file mode 100644
index 0000000000..dbcd8c8172
--- /dev/null
+++ b/tests/auto/corelib/io/qprocessenvironment/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qprocessenvironment.pro.
+
+#####################################################################
+## tst_qprocessenvironment Test:
+#####################################################################
+
+add_qt_test(tst_qprocessenvironment
+ SOURCES
+ tst_qprocessenvironment.cpp
+)
diff --git a/tests/auto/corelib/io/qsavefile/CMakeLists.txt b/tests/auto/corelib/io/qsavefile/CMakeLists.txt
new file mode 100644
index 0000000000..aec5da1f99
--- /dev/null
+++ b/tests/auto/corelib/io/qsavefile/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsavefile.pro.
+
+#####################################################################
+## tst_qsavefile Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "tst_qsavefile.cpp")
+
+add_qt_test(tst_qsavefile
+ SOURCES
+ tst_qsavefile.cpp
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/corelib/io/qsettings/CMakeLists.txt b/tests/auto/corelib/io/qsettings/CMakeLists.txt
new file mode 100644
index 0000000000..161b03b041
--- /dev/null
+++ b/tests/auto/corelib/io/qsettings/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Generated from qsettings.pro.
+
+#####################################################################
+## tst_qsettings Test:
+#####################################################################
+
+add_qt_test(tst_qsettings
+ SOURCES
+ tst_qsettings.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../../kernel/qmetatype
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+)
+
+# Resources:
+set(qsettings_resource_files
+ "bom.ini"
+ "resourcefile.ini"
+ "resourcefile2.ini"
+ "resourcefile3.ini"
+ "resourcefile4.ini"
+ "resourcefile5.ini"
+ "resourcefile6.plist"
+ "withcomments.ini"
+)
+
+add_qt_resource(tst_qsettings "qsettings"
+ PREFIX
+ "/"
+ FILES
+ ${qsettings_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qsettings CONDITION MSVC
+ PUBLIC_LIBRARIES
+ advapi32
+)
+
+extend_target(tst_qsettings CONDITION APPLE
+ PUBLIC_LIBRARIES
+ ${FWCoreFoundation}
+)
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 0f07ba4bb2..c969e72c18 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -39,7 +39,9 @@
#include <QtCore/QDir>
#include <QtCore/QThread>
#include <QtCore/QSysInfo>
-#include <QtGui/QKeySequence>
+#if QT_CONFIG(shortcut)
+# include <QtGui/QKeySequence>
+#endif
#include <QtCore>
#include <QtGui>
@@ -1364,6 +1366,7 @@ void tst_QSettings::testVariantTypes()
dt.setOffsetFromUtc(3600);
testVal("key14", dt, QDateTime, DateTime);
+#if QT_CONFIG(shortcut)
// We store key sequences as strings instead of binary variant blob, for improved
// readability in the resulting format.
if (format >= QSettings::InvalidFormat) {
@@ -1373,6 +1376,7 @@ void tst_QSettings::testVariantTypes()
QKeySequence(Qt::ControlModifier + Qt::Key_F1).toString(QKeySequence::NativeText),
QString, String);
}
+#endif // QT_CONFIG(shortcut)
#undef testVal
}
diff --git a/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt b/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt
new file mode 100644
index 0000000000..5bceaf1d77
--- /dev/null
+++ b/tests/auto/corelib/io/qstandardpaths/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qstandardpaths.pro.
+
+#####################################################################
+## tst_qstandardpaths Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "tst_qstandardpaths.cpp")
+list(APPEND test_data "qstandardpaths.pro")
+
+add_qt_test(tst_qstandardpaths
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qstandardpaths.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qstandardpaths CONDITION boot2qt
+ DEFINES
+ SKIP_FINDEXECUTABLE
+)
diff --git a/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt b/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
new file mode 100644
index 0000000000..08af02dc6c
--- /dev/null
+++ b/tests/auto/corelib/io/qstorageinfo/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstorageinfo.pro.
+
+#####################################################################
+## tst_qstorageinfo Test:
+#####################################################################
+
+add_qt_test(tst_qstorageinfo
+ SOURCES
+ tst_qstorageinfo.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt b/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt
new file mode 100644
index 0000000000..855495bbbb
--- /dev/null
+++ b/tests/auto/corelib/io/qtemporarydir/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtemporarydir.pro.
+
+#####################################################################
+## tst_qtemporarydir Test:
+#####################################################################
+
+add_qt_test(tst_qtemporarydir
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qtemporarydir.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
diff --git a/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
new file mode 100644
index 0000000000..af614552cc
--- /dev/null
+++ b/tests/auto/corelib/io/qtemporaryfile/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from qtemporaryfile.pro.
+
+#####################################################################
+## tst_qtemporaryfile Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "tst_qtemporaryfile.cpp")
+
+add_qt_test(tst_qtemporaryfile
+ SOURCES
+ tst_qtemporaryfile.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qtemporaryfile_resource_files
+ "resources/test.txt"
+)
+
+add_qt_resource(tst_qtemporaryfile "qtemporaryfile"
+ PREFIX
+ "/"
+ FILES
+ ${qtemporaryfile_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "resources/test.txt"
+ "tst_qtemporaryfile.cpp"
+ )
+
+ add_qt_resource(tst_qtemporaryfile "android_testdata"
+ PREFIX
+ "/android_testdata"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/io/qurl/CMakeLists.txt b/tests/auto/corelib/io/qurl/CMakeLists.txt
new file mode 100644
index 0000000000..c23ad27cfc
--- /dev/null
+++ b/tests/auto/corelib/io/qurl/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qurl.pro.
+
+#####################################################################
+## tst_qurl Test:
+#####################################################################
+
+add_qt_test(tst_qurl
+ SOURCES
+ tst_qurl.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qurl CONDITION APPLE
+ SOURCES
+ tst_qurl_mac.mm
+)
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index ef4325d2ea..8d046d5499 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -48,8 +48,6 @@ class tst_QUrl : public QObject
private slots:
void initTestCase();
void cleanupTestCase();
- void effectiveTLDs_data();
- void effectiveTLDs();
void getSetCheck();
void constructing();
void hashInPath();
@@ -3387,61 +3385,6 @@ void tst_QUrl::acceptEmptyAuthoritySegments()
QCOMPARE(QUrl(file_uni_bar, QUrl::StrictMode).toString(), file_triple_bar);
}
-void tst_QUrl::effectiveTLDs_data()
-{
- // See also: tst_QNetworkCookieJar::setCookiesFromUrl().
- // in tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
- QTest::addColumn<QUrl>("domain");
- QTest::addColumn<QString>("TLD");
- // TODO: autogenerate test-cases from:
- // https://raw.githubusercontent.com/publicsuffix/list/master/tests/test_psl.txt
- // checkPublicSuffix(domain, tail) appears in the list if
- // either tail is null and domain is public or
- // tail is the "registrable" part of domain; i.e. its minimal non-public tail.
-
- QTest::newRow("yes0") << QUrl::fromEncoded("http://test.co.uk") << ".co.uk";
- QTest::newRow("yes1") << QUrl::fromEncoded("http://test.com") << ".com";
- QTest::newRow("yes2") << QUrl::fromEncoded("http://www.test.de") << ".de";
- QTest::newRow("yes3") << QUrl::fromEncoded("http://test.ulm.museum") << ".ulm.museum";
- QTest::newRow("yes4") << QUrl::fromEncoded("http://www.com.krodsherad.no") << ".krodsherad.no";
- QTest::newRow("yes5") << QUrl::fromEncoded("http://www.co.uk.1.bg") << ".1.bg";
- QTest::newRow("yes6") << QUrl::fromEncoded("http://www.com.com.cn") << ".com.cn";
- QTest::newRow("yes7") << QUrl::fromEncoded("http://www.test.org.ws") << ".org.ws";
- QTest::newRow("yes9") << QUrl::fromEncoded("http://www.com.co.uk.wallonie.museum") << ".wallonie.museum";
- QTest::newRow("yes10") << QUrl::fromEncoded("http://www.com.evje-og-hornnes.no") << ".evje-og-hornnes.no";
- QTest::newRow("yes11") << QUrl::fromEncoded("http://www.bla.kamijima.ehime.jp") << ".kamijima.ehime.jp";
- QTest::newRow("yes12") << QUrl::fromEncoded("http://www.bla.kakuda.miyagi.jp") << ".kakuda.miyagi.jp";
- QTest::newRow("yes13") << QUrl::fromEncoded("http://mypage.betainabox.com") << ".betainabox.com";
- QTest::newRow("yes14") << QUrl::fromEncoded("http://mypage.rhcloud.com") << ".rhcloud.com";
- QTest::newRow("yes15") << QUrl::fromEncoded("http://mypage.int.az") << ".int.az";
- QTest::newRow("yes16") << QUrl::fromEncoded("http://anything.pagespeedmobilizer.com") << ".pagespeedmobilizer.com";
- QTest::newRow("yes17") << QUrl::fromEncoded("http://anything.eu-central-1.compute.amazonaws.com") << ".eu-central-1.compute.amazonaws.com";
- QTest::newRow("yes18") << QUrl::fromEncoded("http://anything.ltd.hk") << ".ltd.hk";
- QTest::newRow("trentino.it")
- << QUrl::fromEncoded("http://any.thing.trentino.it") << ".trentino.it";
- QTest::newRow("net.ni") << QUrl::fromEncoded("http://test.net.ni") << ".net.ni";
- QTest::newRow("dyn.cosidns.de")
- << QUrl::fromEncoded("http://test.dyn.cosidns.de") << ".dyn.cosidns.de";
- QTest::newRow("freeddns.org")
- << QUrl::fromEncoded("http://test.freeddns.org") << ".freeddns.org";
- QTest::newRow("app.os.stg.fedoraproject.org")
- << QUrl::fromEncoded("http://test.app.os.stg.fedoraproject.org")
- << ".app.os.stg.fedoraproject.org";
- QTest::newRow("development.run") << QUrl::fromEncoded("http://test.development.run") << ".development.run";
- QTest::newRow("crafting.xyz") << QUrl::fromEncoded("http://test.crafting.xyz") << ".crafting.xyz";
- QTest::newRow("nym.ie") << QUrl::fromEncoded("http://shamus.nym.ie") << ".nym.ie";
- QTest::newRow("vapor.cloud") << QUrl::fromEncoded("http://test.vapor.cloud") << ".vapor.cloud";
- QTest::newRow("official.academy") << QUrl::fromEncoded("http://acredited.official.academy") << ".official.academy";
-}
-
-void tst_QUrl::effectiveTLDs()
-{
- QFETCH(QUrl, domain);
- QFETCH(QString, TLD);
- QCOMPARE(domain.topLevelDomain(QUrl::PrettyDecoded), TLD);
- QCOMPARE(domain.topLevelDomain(QUrl::FullyDecoded), TLD);
-}
-
void tst_QUrl::lowercasesScheme()
{
QUrl url;
diff --git a/tests/auto/corelib/io/qurlinternal/CMakeLists.txt b/tests/auto/corelib/io/qurlinternal/CMakeLists.txt
new file mode 100644
index 0000000000..5ad3bc1919
--- /dev/null
+++ b/tests/auto/corelib/io/qurlinternal/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qurlinternal.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qurlinternal Test:
+#####################################################################
+
+add_qt_test(tst_qurlinternal
+ SOURCES
+ ../../codecs/utf8/utf8data.cpp
+ tst_qurlinternal.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+#### Keys ignored in scope 1:.:.:qurlinternal.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index 5c6e633749..f644979c06 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -30,7 +30,6 @@
#include <QtCore/QUrl>
#include <QtTest/QtTest>
-#include "private/qtldurl_p.h"
#include "private/qurl_p.h"
// For testsuites
diff --git a/tests/auto/corelib/io/qurlquery/CMakeLists.txt b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
new file mode 100644
index 0000000000..8a0cc54aeb
--- /dev/null
+++ b/tests/auto/corelib/io/qurlquery/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qurlquery.pro.
+
+#####################################################################
+## tst_qurlquery Test:
+#####################################################################
+
+add_qt_test(tst_qurlquery
+ SOURCES
+ tst_qurlquery.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/itemmodels/CMakeLists.txt b/tests/auto/corelib/itemmodels/CMakeLists.txt
new file mode 100644
index 0000000000..6f52ed2600
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from itemmodels.pro.
+
+add_subdirectory(qstringlistmodel)
+if(TARGET Qt::Gui)
+ add_subdirectory(qabstractitemmodel)
+ add_subdirectory(qabstractproxymodel)
+ add_subdirectory(qconcatenatetablesproxymodel)
+ add_subdirectory(qidentityproxymodel)
+ add_subdirectory(qitemselectionmodel)
+ add_subdirectory(qsortfilterproxymodel_recursive)
+ add_subdirectory(qtransposeproxymodel)
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(qsortfilterproxymodel_regexp)
+ add_subdirectory(qsortfilterproxymodel_regularexpression)
+endif()
+if(TARGET Qt::Sql AND TARGET Qt::Widgets)
+ add_subdirectory(qitemmodel)
+endif()
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
new file mode 100644
index 0000000000..edc7f4321a
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qabstractitemmodel.pro.
+
+#####################################################################
+## tst_qabstractitemmodel Test:
+#####################################################################
+
+add_qt_test(tst_qabstractitemmodel
+ SOURCES
+ ../../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../../other/qabstractitemmodelutils/dynamictreemodel.h
+ tst_qabstractitemmodel.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../../../other/qabstractitemmodelutils
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
new file mode 100644
index 0000000000..f6a443213c
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qabstractproxymodel.pro.
+
+#####################################################################
+## tst_qabstractproxymodel Test:
+#####################################################################
+
+add_qt_test(tst_qabstractproxymodel
+ SOURCES
+ tst_qabstractproxymodel.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt
new file mode 100644
index 0000000000..90b371cb1b
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qconcatenatetablesproxymodel.pro.
+
+#####################################################################
+## tst_qconcatenatetablesproxymodel Test:
+#####################################################################
+
+add_qt_test(tst_qconcatenatetablesproxymodel
+ SOURCES
+ tst_qconcatenatetablesproxymodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt
new file mode 100644
index 0000000000..c02e7b5ad4
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qidentityproxymodel.pro.
+
+#####################################################################
+## tst_qidentityproxymodel Test:
+#####################################################################
+
+add_qt_test(tst_qidentityproxymodel
+ SOURCES
+ ../../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../../other/qabstractitemmodelutils/dynamictreemodel.h
+ tst_qidentityproxymodel.cpp
+ INCLUDE_DIRECTORIES
+ ../../../other/qabstractitemmodelutils
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt
new file mode 100644
index 0000000000..3baf727cf9
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qitemmodel/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qitemmodel.pro.
+
+#####################################################################
+## tst_qitemmodel Test:
+#####################################################################
+
+add_qt_test(tst_qitemmodel
+ SOURCES
+ tst_qitemmodel.cpp
+ PUBLIC_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
new file mode 100644
index 0000000000..bd79cba5e2
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qitemselectionmodel.pro.
+
+#####################################################################
+## tst_qitemselectionmodel Test:
+#####################################################################
+
+add_qt_test(tst_qitemselectionmodel
+ SOURCES
+ tst_qitemselectionmodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
new file mode 100644
index 0000000000..59f5d8ae76
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_recursive/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsortfilterproxymodel_recursive.pro.
+
+#####################################################################
+## tst_qsortfilterproxymodel_recursive Test:
+#####################################################################
+
+add_qt_test(tst_qsortfilterproxymodel_recursive
+ SOURCES
+ tst_qsortfilterproxymodel_recursive.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regexp/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regexp/CMakeLists.txt
new file mode 100644
index 0000000000..8df14a96b1
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regexp/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qsortfilterproxymodel_regexp.pro.
+
+#####################################################################
+## tst_qsortfilterproxymodel_regexp Test:
+#####################################################################
+
+add_qt_test(tst_qsortfilterproxymodel_regexp
+ SOURCES
+ ../../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../../other/qabstractitemmodelutils/dynamictreemodel.h
+ ../qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp ../qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h
+ tst_qsortfilterproxymodel_regexp.cpp
+ INCLUDE_DIRECTORIES
+ ../../../other/qabstractitemmodelutils
+ ../qsortfilterproxymodel_common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt
new file mode 100644
index 0000000000..8bc7f55f7c
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_regularexpression/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qsortfilterproxymodel_regularexpression.pro.
+
+#####################################################################
+## tst_qsortfilterproxymodel_regularexpression Test:
+#####################################################################
+
+add_qt_test(tst_qsortfilterproxymodel_regularexpression
+ SOURCES
+ ../../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../../other/qabstractitemmodelutils/dynamictreemodel.h
+ ../qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp ../qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h
+ tst_qsortfilterproxymodel_regularexpression.cpp
+ INCLUDE_DIRECTORIES
+ ../../../other/qabstractitemmodelutils
+ ../qsortfilterproxymodel_common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
new file mode 100644
index 0000000000..53bfdbe419
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from qstringlistmodel.pro.
+
+#####################################################################
+## tst_qstringlistmodel Test:
+#####################################################################
+
+add_qt_test(tst_qstringlistmodel
+ SOURCES
+ qmodellistener.h
+ tst_qstringlistmodel.cpp
+)
diff --git a/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt b/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt
new file mode 100644
index 0000000000..ad1b65d348
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qtransposeproxymodel/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qtransposeproxymodel.pro.
+
+#####################################################################
+## tst_qtransposeproxymodel Test:
+#####################################################################
+
+add_qt_test(tst_qtransposeproxymodel
+ SOURCES
+ tst_qtransposeproxymodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/kernel/.prev_CMakeLists.txt b/tests/auto/corelib/kernel/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5415a23a98
--- /dev/null
+++ b/tests/auto/corelib/kernel/.prev_CMakeLists.txt
@@ -0,0 +1,40 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qcoreapplication)
+add_subdirectory(qdeadlinetimer)
+add_subdirectory(qelapsedtimer)
+add_subdirectory(qeventdispatcher)
+if(TARGET Qt::Network)
+ add_subdirectory(qeventloop)
+endif()
+add_subdirectory(qmath)
+add_subdirectory(qmetaobject)
+add_subdirectory(qmetaobjectbuilder)
+add_subdirectory(qmetamethod)
+add_subdirectory(qmetaproperty)
+add_subdirectory(qmetatype)
+add_subdirectory(qmetaenum)
+if(TARGET Qt::Gui)
+ add_subdirectory(qmimedata)
+endif()
+if(TARGET Qt::Network AND NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qobject)
+endif()
+add_subdirectory(qpointer)
+if(QT_FEATURE_private_tests AND NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qsharedmemory)
+endif()
+add_subdirectory(qsignalblocker)
+add_subdirectory(qsignalmapper)
+if(QT_FEATURE_private_tests AND TARGET Qt::Network)
+ add_subdirectory(qsocketnotifier)
+endif()
+if(QT_FEATURE_systemsemaphore AND NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qsystemsemaphore)
+endif()
+add_subdirectory(qtimer)
+add_subdirectory(qtranslator)
+add_subdirectory(qvariant)
+if(win32_x_ AND NOT WINRT)
+ add_subdirectory(qwineventnotifier)
+endif()
diff --git a/tests/auto/corelib/kernel/CMakeLists.txt b/tests/auto/corelib/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..9fbe2b8b7a
--- /dev/null
+++ b/tests/auto/corelib/kernel/CMakeLists.txt
@@ -0,0 +1,40 @@
+# Generated from kernel.pro.
+
+# add_subdirectory(qcoreapplication) # special case
+add_subdirectory(qdeadlinetimer)
+add_subdirectory(qelapsedtimer)
+add_subdirectory(qeventdispatcher)
+if(TARGET Qt::Network)
+ add_subdirectory(qeventloop)
+endif()
+add_subdirectory(qmath)
+add_subdirectory(qmetaobject)
+add_subdirectory(qmetaobjectbuilder)
+add_subdirectory(qmetamethod)
+add_subdirectory(qmetaproperty)
+# add_subdirectory(qmetatype) # special case
+add_subdirectory(qmetaenum)
+if(TARGET Qt::Gui)
+ add_subdirectory(qmimedata)
+endif()
+if(TARGET Qt::Network AND NOT ANDROID AND NOT APPLE_UIKIT)
+ # add_subdirectory(qobject) # special case
+endif()
+add_subdirectory(qpointer)
+if(QT_FEATURE_private_tests AND NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qsharedmemory)
+endif()
+add_subdirectory(qsignalblocker)
+add_subdirectory(qsignalmapper)
+if(QT_FEATURE_private_tests AND TARGET Qt::Network)
+ add_subdirectory(qsocketnotifier)
+endif()
+if(QT_FEATURE_systemsemaphore AND NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qsystemsemaphore)
+endif()
+# add_subdirectory(qtimer) # special case
+add_subdirectory(qtranslator)
+add_subdirectory(qvariant)
+if(win32_x_ AND NOT WINRT)
+ add_subdirectory(qwineventnotifier)
+endif()
diff --git a/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt b/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
new file mode 100644
index 0000000000..5feb9ff535
--- /dev/null
+++ b/tests/auto/corelib/kernel/qdeadlinetimer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qdeadlinetimer.pro.
+
+#####################################################################
+## tst_qdeadlinetimer Test:
+#####################################################################
+
+add_qt_test(tst_qdeadlinetimer
+ SOURCES
+ tst_qdeadlinetimer.cpp
+)
diff --git a/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
new file mode 100644
index 0000000000..e188c94933
--- /dev/null
+++ b/tests/auto/corelib/kernel/qelapsedtimer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qelapsedtimer.pro.
+
+#####################################################################
+## tst_qelapsedtimer Test:
+#####################################################################
+
+add_qt_test(tst_qelapsedtimer
+ SOURCES
+ tst_qelapsedtimer.cpp
+)
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt b/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
new file mode 100644
index 0000000000..4dbabc2d69
--- /dev/null
+++ b/tests/auto/corelib/kernel/qeventdispatcher/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qeventdispatcher.pro.
+
+#####################################################################
+## tst_qeventdispatcher Test:
+#####################################################################
+
+add_qt_test(tst_qeventdispatcher
+ SOURCES
+ tst_qeventdispatcher.cpp
+)
diff --git a/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt
new file mode 100644
index 0000000000..ac952f64f7
--- /dev/null
+++ b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qeventloop.pro.
+
+#####################################################################
+## tst_qeventloop Test:
+#####################################################################
+
+add_qt_test(tst_qeventloop
+ SOURCES
+ tst_qeventloop.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qeventloop CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(tst_qeventloop CONDITION QT_FEATURE_glib
+ DEFINES
+ HAVE_GLIB
+)
diff --git a/tests/auto/corelib/kernel/qmath/CMakeLists.txt b/tests/auto/corelib/kernel/qmath/CMakeLists.txt
new file mode 100644
index 0000000000..5e73597c67
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmath/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmath.pro.
+
+#####################################################################
+## tst_qmath Test:
+#####################################################################
+
+add_qt_test(tst_qmath
+ SOURCES
+ tst_qmath.cpp
+)
diff --git a/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
new file mode 100644
index 0000000000..12c9d9a8a7
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaenum/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmetaenum.pro.
+
+#####################################################################
+## tst_qmetaenum Test:
+#####################################################################
+
+add_qt_test(tst_qmetaenum
+ SOURCES
+ tst_qmetaenum.cpp
+)
diff --git a/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
new file mode 100644
index 0000000000..b16101a1a1
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetamethod/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmetamethod.pro.
+
+#####################################################################
+## tst_qmetamethod Test:
+#####################################################################
+
+add_qt_test(tst_qmetamethod
+ SOURCES
+ tst_qmetamethod.cpp
+)
diff --git a/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
new file mode 100644
index 0000000000..888bfeaa78
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaobject/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qmetaobject.pro.
+
+#####################################################################
+## tst_qmetaobject Test:
+#####################################################################
+
+add_qt_test(tst_qmetaobject
+ SOURCES
+ tst_qmetaobject.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 60000316cc..9db2bb241a 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -1320,32 +1320,38 @@ void tst_QMetaObject::normalizedSignature_data()
QTest::newRow("function ptr spaces") << "void foo( void ( * ) ( void ))" << "void foo(void(*)())";
QTest::newRow("function ptr void*") << "void foo(void(*)(void*))" << "void foo(void(*)(void*))";
QTest::newRow("function ptr void* spaces") << "void foo( void ( * ) ( void * ))" << "void foo(void(*)(void*))";
- QTest::newRow("template args") << " void foo( QMap<a, a>, QList<b>) "
- << "void foo(QMap<a,a>,QList<b>)";
+ QTest::newRow("template args") << " void foo( QMap<a, a>, QVector<b>) "
+ << "void foo(QMap<a,a>,QVector<b>)";
QTest::newRow("void template args") << " void foo( Foo<void>, Bar<void> ) "
<< "void foo(Foo<void>,Bar<void>)";
QTest::newRow("void* template args") << " void foo( Foo<void*>, Bar<void *> ) "
<< "void foo(Foo<void*>,Bar<void*>)";
- QTest::newRow("rettype") << "QList<int, int> foo()" << "QList<int,int>foo()";
+ QTest::newRow("rettype") << "QVector<int, int> foo()" << "QVector<int,int>foo()";
QTest::newRow("rettype void template") << "Foo<void> foo()" << "Foo<void>foo()";
QTest::newRow("const rettype") << "const QString *foo()" << "const QString*foo()";
QTest::newRow("const ref") << "const QString &foo()" << "const QString&foo()";
QTest::newRow("reference") << "QString &foo()" << "QString&foo()";
QTest::newRow("const1") << "void foo(QString const *)" << "void foo(const QString*)";
- QTest::newRow("const2") << "void foo(QString * const)" << "void foo(QString*const)";
+ QTest::newRow("const2") << "void foo(QString * const)" << "void foo(QString*)";
QTest::newRow("const3") << "void foo(QString const &)" << "void foo(QString)";
QTest::newRow("const4") << "void foo(const int)" << "void foo(int)";
QTest::newRow("const5") << "void foo(const int, int const, const int &, int const &)"
<< "void foo(int,int,int,int)";
- QTest::newRow("const6") << "void foo(QList<const int>)" << "void foo(QList<const int>)";
- QTest::newRow("const7") << "void foo(QList<const int*>)" << "void foo(QList<const int*>)";
- QTest::newRow("const8") << "void foo(QList<int const*>)" << "void foo(QList<const int*>)";
+ QTest::newRow("const6") << "void foo(QVector<const int>)" << "void foo(QVector<const int>)";
+ QTest::newRow("const7") << "void foo(QVector<const int*>)" << "void foo(QVector<const int*>)";
+ QTest::newRow("const8") << "void foo(QVector<int const*>)" << "void foo(QVector<const int*>)";
QTest::newRow("const9") << "void foo(const Foo<Bar>)" << "void foo(Foo<Bar>)";
QTest::newRow("const10") << "void foo(Foo<Bar>const)" << "void foo(Foo<Bar>)";
- QTest::newRow("const11") << "void foo(Foo<Bar> *const)" << "void foo(Foo<Bar>*const)";
- QTest::newRow("const12") << "void foo(Foo<Bar>const*const *const)" << "void foo(Foo<Bar>*const*const)";
+ QTest::newRow("const11") << "void foo(Foo<Bar> *const)" << "void foo(Foo<Bar>*)";
+ QTest::newRow("const12") << "void foo(Foo<Bar>const*const *const)" << "void foo(const Foo<Bar>*const*)";
QTest::newRow("const13") << "void foo(const Foo<Bar>&)" << "void foo(Foo<Bar>)";
QTest::newRow("const14") << "void foo(Foo<Bar>const&)" << "void foo(Foo<Bar>)";
+ QTest::newRow("QList") << "void foo(QList<int>)" << "void foo(QVector<int>)";
+ QTest::newRow("QList1") << "void foo(const Template<QList, MyQList const>)"
+ << "void foo(Template<QVector,const MyQList>)";
+
+ QTest::newRow("refref") << "const char* foo(const X &&,X const &&, const X* &&) && "
+ << "const char*foo(const X&&,const X&&,const X*&&)&&";
QTest::newRow("invalid1") << "a( b" << "a(b";
}
@@ -1367,26 +1373,63 @@ void tst_QMetaObject::normalizedType_data()
QTest::newRow("white") << " int " << "int";
QTest::newRow("const1") << "int const *" << "const int*";
QTest::newRow("const2") << "const int *" << "const int*";
- QTest::newRow("template1") << "QList<int const *>" << "QList<const int*>";
- QTest::newRow("template2") << "QList<const int *>" << "QList<const int*>";
+ QTest::newRow("template1") << "QVector<int const *>" << "QVector<const int*>";
+ QTest::newRow("template2") << "QVector<const int *>" << "QVector<const int*>";
QTest::newRow("template3") << "QMap<QString, int>" << "QMap<QString,int>";
QTest::newRow("template4") << "const QMap<QString, int> &" << "QMap<QString,int>";
- QTest::newRow("template5") << "QList< ::Foo::Bar>" << "QList< ::Foo::Bar>";
- QTest::newRow("template6") << "QList<::Foo::Bar>" << "QList<::Foo::Bar>";
- QTest::newRow("template7") << "QList<QList<int> >" << "QList<QList<int> >";
+ QTest::newRow("template5") << "QVector< ::Foo::Bar>" << "QVector<::Foo::Bar>";
+ QTest::newRow("template6") << "QVector<::Foo::Bar>" << "QVector<::Foo::Bar>";
+ QTest::newRow("template7") << "QVector<QVector<int> >" << "QVector<QVector<int>>";
QTest::newRow("template8") << "QMap<const int, const short*>" << "QMap<const int,const short*>";
- QTest::newRow("template9") << "QPair<const QPair<int, int const *> , QPair<QHash<int, const char*> > >" << "QPair<const QPair<int,const int*>,QPair<QHash<int,const char*> > >";
+ QTest::newRow("template9") << "QPair<const QPair<int, int const *> , QPair<QHash<int, const char*> > >" << "QPair<const QPair<int,const int*>,QPair<QHash<int,const char*>>>";
+ QTest::newRow("template10") << "QList<int const * const> const" << "QVector<const int*const>";
+ QTest::newRow("template11") << " QSharedPointer<QVarLengthArray< QString const, ( 16>> 2 )> > const & "
+ << "QSharedPointer<QVarLengthArray<const QString,(16>>2)>>";
+ QTest::newRow("template_sub") << "X<( Y < 8), (Y >6)> const & " << "X<(Y<8),(Y>6)>";
QTest::newRow("value1") << "const QString &" << "QString";
QTest::newRow("value2") << "QString const &" << "QString";
QTest::newRow("constInName1") << "constconst" << "constconst";
QTest::newRow("constInName2") << "constconst*" << "constconst*";
QTest::newRow("constInName3") << "const constconst&" << "constconst";
- QTest::newRow("constInName4") << "constconst const*const" << "constconst*const";
+ QTest::newRow("constInName4") << "constconst const*const" << "const constconst*";
QTest::newRow("class") << "const class foo&" << "foo";
QTest::newRow("struct") << "const struct foo*" << "const foo*";
QTest::newRow("struct2") << "struct foo const*" << "const foo*";
QTest::newRow("enum") << "enum foo" << "foo";
QTest::newRow("void") << "void" << "void";
+ QTest::newRow("QList") << "QList<int>" << "QVector<int>";
+ QTest::newRow("refref") << "X const*const&&" << "const X*const&&";
+ QTest::newRow("refref2") << "const X<T const&&>&&" << "const X<const T&&>&&";
+ QTest::newRow("long1") << "long unsigned int long" << "unsigned long long";
+ QTest::newRow("long2") << "int signed long" << "long";
+ QTest::newRow("long3") << "long unsigned" << "ulong";
+ QTest::newRow("long double") << " long double" << "long double";
+ QTest::newRow("signed char") << "char signed" << "signed char";
+ QTest::newRow("unsigned char") << "char unsigned" << "unsigned char";
+ QTest::newRow("signed short") << "short signed" << "short";
+ QTest::newRow("unsigned shot") << "short unsigned" << "unsigned short";
+ QTest::newRow("unsigned shot") << "short unsigned" << "unsigned short";
+ QTest::newRow("array1") << "unsigned int [4]" << "uint[4]";
+ QTest::newRow("array2") << "unsigned int const [4][5]" << "const uint[4][5]";
+ QTest::newRow("array3") << "unsigned[] const" << "uint[]";
+ QTest::newRow("nttp1") << "S<'>', int const> const"
+ << "S<'>',const int>";
+ QTest::newRow("nttp2") << "S< \"> \\\">const * \\\\\" , int const> const"
+ << "S<\"> \\\">const * \\\\\",const int>";
+ QTest::newRow("nttp3") << "S<\"Q <\" , int const> const*"
+ << "const S<\"Q <\",const int>*";
+ QTest::newRow("nttp4") << "S< 1'2 , int const> const"
+ << "S<1'2,const int>";
+ QTest::newRow("invalid") << "'const"
+ << "'const";
+ QTest::newRow("anonym1") << "XX::<unnamed struct>"
+ << "XX::<unnamed struct>";
+ QTest::newRow("anonym2") << "XX::{unnamed type#1}"
+ << "XX::{unnamed type#1}";
+ QTest::newRow("anonym3") << "struct XX::<unnamed-type-s>"
+ << "XX::<unnamed-type-s>";
+ QTest::newRow("anonym4") << "XX::(anonymous struct at ./example.cpp:10:13)"
+ << "XX::(anonymous struct at./example.cpp:10:13)";
}
void tst_QMetaObject::normalizedType()
@@ -1395,6 +1438,7 @@ void tst_QMetaObject::normalizedType()
QFETCH(QString, result);
QCOMPARE(QMetaObject::normalizedType(type.toLatin1()), result.toLatin1());
+ QCOMPARE(QMetaObject::normalizedType(result.toLatin1()), result.toLatin1());
}
void tst_QMetaObject::customPropertyType()
@@ -1402,13 +1446,15 @@ void tst_QMetaObject::customPropertyType()
QMetaProperty prop = metaObject()->property(metaObject()->indexOfProperty("value3"));
QCOMPARE(prop.type(), QVariant::UserType);
- QCOMPARE(prop.userType(), 0);
+ QCOMPARE(prop.userType(), QMetaType::fromType<MyStruct>().id());
+ QCOMPARE(prop.metaType(), QMetaType::fromType<MyStruct>());
qRegisterMetaType<MyStruct>("MyStruct");
QCOMPARE(prop.userType(), QMetaType::type("MyStruct"));
prop = metaObject()->property(metaObject()->indexOfProperty("value4"));
QCOMPARE(prop.type(), QVariant::List);
+ QCOMPARE(prop.metaType(), QMetaType::fromType<QList<QVariant>>());
prop = metaObject()->property(metaObject()->indexOfProperty("value5"));
QCOMPARE(prop.type(), QVariant::List);
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
new file mode 100644
index 0000000000..e7586d580b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmetaobjectbuilder.pro.
+
+#####################################################################
+## tst_qmetaobjectbuilder Test:
+#####################################################################
+
+add_qt_test(tst_qmetaobjectbuilder
+ SOURCES
+ tst_qmetaobjectbuilder.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 9fe7d63727..14719f36f8 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -1702,9 +1702,10 @@ void tst_QMetaObjectBuilder::classNameFirstInStringData()
builder.setClassName(QByteArrayLiteral("TestClass"));
QMetaObject *mo = builder.toMetaObject();
- QByteArrayDataPtr header;
- header.ptr = const_cast<QByteArrayData*>(mo->d.stringdata);
- QCOMPARE(QByteArray(header), QByteArrayLiteral("TestClass"));
+ uint offset = mo->d.stringdata[0];
+ uint len = mo->d.stringdata[1];
+ QByteArray className(reinterpret_cast<const char *>(mo->d.stringdata) + offset, len);
+ QCOMPARE(className, QByteArrayLiteral("TestClass"));
free(mo);
}
diff --git a/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt b/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
new file mode 100644
index 0000000000..2d657d5217
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetaproperty/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmetaproperty.pro.
+
+#####################################################################
+## tst_qmetaproperty Test:
+#####################################################################
+
+add_qt_test(tst_qmetaproperty
+ SOURCES
+ tst_qmetaproperty.cpp
+)
diff --git a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
index cc67fc7884..43ed535019 100644
--- a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
+++ b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
@@ -138,6 +138,7 @@ void tst_QMetaProperty::gadget()
const QMetaObject *mo = &MyGadget::staticMetaObject;
QMetaProperty valueProp = mo->property(mo->indexOfProperty("value"));
QVERIFY(valueProp.isValid());
+ QCOMPARE(valueProp.metaType(), QMetaType::fromType<QString>());
{
MyGadget g;
QString hello = QLatin1String("hello");
diff --git a/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..62d517c27d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from qmetatype.pro.
+
+#####################################################################
+## tst_qmetatype Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "./typeFlags.bin")
+
+add_qt_test(tst_qmetatype
+ SOURCES
+ tst_qmetatype.cpp
+ DEFINES
+ -QT_NO_LINKED_LIST
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmetatype CONDITION MSVC OR WINRT
+ COMPILE_OPTIONS
+ /bigobj
+)
+
+#### Keys ignored in scope 3:.:.:qmetatype.pro:WINRT:
+# QMAKE_CFLAGS_RELEASE = "--O2"
+# QMAKE_CXXFLAGS_RELEASE = "--O2"
+
+#### Keys ignored in scope 4:.:.:qmetatype.pro:CLANG:
+# QMAKE_CFLAGS_RELEASE = "--O2" "--g"
+# QMAKE_CXXFLAGS_RELEASE = "--O2" "--g"
+
+extend_target(tst_qmetatype CONDITION CLANG AND (TEST_architecture_arch STREQUAL "arm")
+ DEFINES
+ TST_QMETATYPE_BROKEN_COMPILER
+)
diff --git a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
new file mode 100644
index 0000000000..3c9bb97825
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from qmetatype.pro.
+
+#####################################################################
+## tst_qmetatype Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "./typeFlags.bin")
+
+add_qt_test(tst_qmetatype
+ SOURCES
+ tst_qmetatype.cpp
+ DEFINES
+ # -QT_NO_LINKED_LIST # special case remove until we fix this
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmetatype CONDITION MSVC OR WINRT
+ COMPILE_OPTIONS
+ /bigobj
+)
+
+#### Keys ignored in scope 3:.:.:qmetatype.pro:WINRT:
+# QMAKE_CFLAGS_RELEASE = "--O2"
+# QMAKE_CXXFLAGS_RELEASE = "--O2"
+
+#### Keys ignored in scope 4:.:.:qmetatype.pro:CLANG:
+# QMAKE_CFLAGS_RELEASE = "--O2" "--g"
+# QMAKE_CXXFLAGS_RELEASE = "--O2" "--g"
+
+extend_target(tst_qmetatype CONDITION CLANG AND (TEST_architecture_arch STREQUAL "arm")
+ DEFINES
+ TST_QMETATYPE_BROKEN_COMPILER
+)
diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
index 4856b138c3..56b8c071c3 100644
--- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
@@ -5,7 +5,6 @@ INCLUDEPATH += $$PWD/../../../other/qvariant_common
SOURCES = tst_qmetatype.cpp
TESTDATA=./typeFlags.bin
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-DEFINES -= QT_NO_LINKED_LIST
msvc|winrt {
# Prevents "fatal error C1128: number of sections exceeded object file format limit".
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index 19b3289390..0d9dfc1c4c 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -120,17 +120,18 @@ private slots:
void constRefs();
void convertCustomType_data();
void convertCustomType();
- void compareCustomType_data();
- void compareCustomType();
void compareCustomEqualOnlyType();
void customDebugStream();
void unknownType();
void fromType();
+ void operatorEq_data();
+ void operatorEq();
};
struct BaseGenericType
{
int m_typeId = -1;
+ QMetaType m_metatype;
virtual void *constructor(int typeId, void *where, const void *copy) = 0;
virtual void staticMetacallFunction(QMetaObject::Call _c, int _id, void **_a) = 0;
virtual void saveOperator(QDataStream & out) const = 0;
@@ -302,11 +303,19 @@ void tst_QMetaType::registerGadget(const char *name, const QVector<GadgetPropert
meta->d.static_metacall = &GadgetsStaticMetacallFunction;
meta->d.superdata = nullptr;
const auto flags = QMetaType::WasDeclaredAsMetaType | QMetaType::IsGadget | QMetaType::NeedsConstruction | QMetaType::NeedsDestruction;
- int gadgetTypeId = QMetaType::registerType(name,
- &GadgetTypedDestructor,
- &GadgetTypedConstructor,
- sizeof(GenericGadgetType),
- flags, meta);
+ using TypeInfo = QtPrivate::QMetaTypeInterface;
+ auto typeInfo = new TypeInfo {
+ 0, sizeof(GenericGadgetType), alignof(GenericGadgetType), uint(flags), meta, name, 0,
+ QtPrivate::RefCount{ 0 },
+ [](TypeInfo *self) { delete self; },
+ [](const TypeInfo *self, void *where) { GadgetTypedConstructor(self->typeId, where, nullptr); },
+ [](const TypeInfo *self, void *where, const void *copy) { GadgetTypedConstructor(self->typeId, where, copy); },
+ [](const TypeInfo *self, void *where, void *copy) { GadgetTypedConstructor(self->typeId, where, copy); },
+ [](const TypeInfo *self, void *ptr) { GadgetTypedDestructor(self->typeId, ptr); },
+ nullptr };
+ QMetaType gadgetMetaType(typeInfo);
+ dynamicGadgetProperties->m_metatype = gadgetMetaType;
+ int gadgetTypeId = QMetaType(typeInfo).id();
QVERIFY(gadgetTypeId > 0);
QMetaType::registerStreamOperators(gadgetTypeId, &GadgetSaveOperator, &GadgetLoadOperator);
s_managedTypes[gadgetTypeId] = qMakePair(dynamicGadgetProperties, std::shared_ptr<QMetaObject>{meta, [](QMetaObject *ptr){ ::free(ptr); }});
@@ -392,10 +401,6 @@ protected:
++failureCount;
qWarning() << "Wrong metatype returned for" << name;
}
- if (QMetaType::typeName(tp) != name) {
- ++failureCount;
- qWarning() << "Wrong typeName returned for" << tp;
- }
void *buf1 = QMetaType::create(tp, 0);
void *buf2 = QMetaType::create(tp, buf1);
void *buf3 = info.create(tp, 0);
@@ -574,11 +579,13 @@ void tst_QMetaType::typeName_data()
QTest::newRow("124125534") << 124125534 << QString();
// automatic registration
- QTest::newRow("QList<int>") << ::qMetaTypeId<QList<int> >() << QString::fromLatin1("QList<int>");
QTest::newRow("QHash<int,int>") << ::qMetaTypeId<QHash<int, int> >() << QString::fromLatin1("QHash<int,int>");
QTest::newRow("QMap<int,int>") << ::qMetaTypeId<QMap<int, int> >() << QString::fromLatin1("QMap<int,int>");
- QTest::newRow("QVector<QList<int>>") << ::qMetaTypeId<QVector<QList<int> > >() << QString::fromLatin1("QVector<QList<int> >");
- QTest::newRow("QVector<QMap<int,int>>") << ::qMetaTypeId<QVector<QMap<int, int> > >() << QString::fromLatin1("QVector<QMap<int,int> >");
+ QTest::newRow("QVector<QMap<int,int>>") << ::qMetaTypeId<QVector<QMap<int, int> > >() << QString::fromLatin1("QVector<QMap<int,int>>");
+
+ // automatic registration with automatic QList to QVector aliasing
+ QTest::newRow("QList<int>") << ::qMetaTypeId<QList<int> >() << QString::fromLatin1("QVector<int>");
+ QTest::newRow("QVector<QList<int>>") << ::qMetaTypeId<QVector<QList<int> > >() << QString::fromLatin1("QVector<QVector<int>>");
QTest::newRow("CustomQObject*") << ::qMetaTypeId<CustomQObject*>() << QString::fromLatin1("CustomQObject*");
QTest::newRow("CustomGadget") << ::qMetaTypeId<CustomGadget>() << QString::fromLatin1("CustomGadget");
@@ -1006,6 +1013,10 @@ void tst_QMetaType::flagsBinaryCompatibility5_0_data()
for (int i = 0; i < buffer.size(); i+=2) {
const quint32 id = buffer.at(i);
const quint32 flags = buffer.at(i + 1);
+ if (id > QMetaType::LastCoreType)
+ continue; // We do not link against QtGui, so we do longer consider such type as registered
+ if (id == QMetaType::Void)
+ continue; // The meaning of QMetaType::Void has changed in Qt6
QVERIFY2(QMetaType::isRegistered(id), "A type could not be removed in BC way");
QTest::newRow(QMetaType::typeName(id)) << id << flags;
}
@@ -1032,9 +1043,9 @@ static void testConstructHelper()
typedef typename MetaEnumToType<ID>::Type Type;
QMetaType info(ID);
int size = info.sizeOf();
- void *storage1 = qMallocAligned(size, Q_ALIGNOF(Type));
+ void *storage1 = qMallocAligned(size, alignof(Type));
void *actual1 = QMetaType::construct(ID, storage1, /*copy=*/0);
- void *storage2 = qMallocAligned(size, Q_ALIGNOF(Type));
+ void *storage2 = qMallocAligned(size, alignof(Type));
void *actual2 = info.construct(storage2, /*copy=*/0);
QCOMPARE(actual1, storage1);
QCOMPARE(actual2, storage2);
@@ -1158,11 +1169,19 @@ void tst_QMetaType::typedConstruct()
auto dynamicGadgetProperties = std::make_shared<GenericPODType>();
dynamicGadgetProperties->podData = myPodTesData;
const auto flags = QMetaType::NeedsConstruction | QMetaType::NeedsDestruction;
- int podTypeId = QMetaType::registerType(podTypeName,
- &GadgetTypedDestructor,
- &GadgetTypedConstructor,
- sizeof(GenericGadgetType),
- flags, nullptr);
+ using TypeInfo = QtPrivate::QMetaTypeInterface;
+ auto typeInfo = new TypeInfo {
+ 0, sizeof(GenericGadgetType), alignof(GenericGadgetType), uint(flags), nullptr, podTypeName,
+ 0, QtPrivate::RefCount{0},
+ [](TypeInfo *self) { delete self; },
+ [](const TypeInfo *self, void *where) { GadgetTypedConstructor(self->typeId, where, nullptr); },
+ [](const TypeInfo *self, void *where, const void *copy) { GadgetTypedConstructor(self->typeId, where, copy); },
+ [](const TypeInfo *self, void *where, void *copy) { GadgetTypedConstructor(self->typeId, where, copy); },
+ [](const TypeInfo *self, void *ptr) { GadgetTypedDestructor(self->typeId, ptr); },
+ nullptr };
+ QMetaType metatype(typeInfo);
+ dynamicGadgetProperties->m_metatype = metatype;
+ int podTypeId = metatype.id();
QVERIFY(podTypeId > 0);
QMetaType::registerStreamOperators(podTypeId, &GadgetSaveOperator, &GadgetLoadOperator);
s_managedTypes[podTypeId] = qMakePair(dynamicGadgetProperties, std::shared_ptr<QMetaObject>{});
@@ -1186,9 +1205,9 @@ static void testConstructCopyHelper()
QMetaType info(ID);
int size = QMetaType::sizeOf(ID);
QCOMPARE(info.sizeOf(), size);
- void *storage1 = qMallocAligned(size, Q_ALIGNOF(Type));
+ void *storage1 = qMallocAligned(size, alignof(Type));
void *actual1 = QMetaType::construct(ID, storage1, expected);
- void *storage2 = qMallocAligned(size, Q_ALIGNOF(Type));
+ void *storage2 = qMallocAligned(size, alignof(Type));
void *actual2 = info.construct(storage2, expected);
QCOMPARE(actual1, storage1);
QCOMPARE(actual2, storage2);
@@ -1309,54 +1328,6 @@ void tst_QMetaType::registerType()
QCOMPARE(qRegisterMetaType<MyFoo>("MyFoo"), fooId);
QCOMPARE(QMetaType::type("MyFoo"), fooId);
-
- // cannot unregister built-in types
- QVERIFY(!QMetaType::unregisterType(QMetaType::QString));
- QCOMPARE(QMetaType::type("QString"), int(QMetaType::QString));
- QCOMPARE(QMetaType::type("MyString"), int(QMetaType::QString));
-
- // cannot unregister declared types
- QVERIFY(!QMetaType::unregisterType(fooId));
- QCOMPARE(QMetaType::type("TestSpace::Foo"), fooId);
- QCOMPARE(QMetaType::type("MyFoo"), fooId);
-
- // test unregistration of dynamic types (used by Qml)
- int unregId = QMetaType::registerType("UnregisterMe",
- 0,
- 0,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Destruct,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Construct,
- 0, QMetaType::TypeFlags(), 0);
- QCOMPARE(QMetaType::registerTypedef("UnregisterMeTypedef", unregId), unregId);
- int unregId2 = QMetaType::registerType("UnregisterMe2",
- 0,
- 0,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Destruct,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Construct,
- 0, QMetaType::TypeFlags(), 0);
- QVERIFY(unregId >= int(QMetaType::User));
- QCOMPARE(unregId2, unregId + 2);
-
- QVERIFY(QMetaType::unregisterType(unregId));
- QCOMPARE(QMetaType::type("UnregisterMe"), 0);
- QCOMPARE(QMetaType::type("UnregisterMeTypedef"), 0);
- QCOMPARE(QMetaType::type("UnregisterMe2"), unregId2);
- QVERIFY(QMetaType::unregisterType(unregId2));
- QCOMPARE(QMetaType::type("UnregisterMe2"), 0);
-
- // re-registering should always return the lowest free index
- QCOMPARE(QMetaType::registerType("UnregisterMe2",
- 0,
- 0,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Destruct,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Construct,
- 0, QMetaType::TypeFlags(), 0), unregId);
- QCOMPARE(QMetaType::registerType("UnregisterMe",
- 0,
- 0,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Destruct,
- QtMetaTypePrivate::QMetaTypeFunctionHelper<void>::Construct,
- 0, QMetaType::TypeFlags(), 0), unregId + 1);
}
class IsRegisteredDummyType { };
@@ -1367,7 +1338,7 @@ void tst_QMetaType::isRegistered_data()
QTest::addColumn<bool>("registered");
// predefined/custom types
- QTest::newRow("QMetaType::Void") << int(QMetaType::Void) << true;
+ QTest::newRow("QMetaType::Void") << int(QMetaType::Void) << false;
QTest::newRow("QMetaType::Int") << int(QMetaType::Int) << true;
int dummyTypeId = qRegisterMetaType<IsRegisteredDummyType>("IsRegisteredDummyType");
@@ -1733,8 +1704,8 @@ void tst_QMetaType::automaticTemplateRegistration()
CONTAINER< __VA_ARGS__ > t; \
const QVariant v = QVariant::fromValue(t); \
QByteArray tn = createTypeName(#CONTAINER "<", #__VA_ARGS__); \
- const int type = QMetaType::type(tn); \
const int expectedType = ::qMetaTypeId<CONTAINER< __VA_ARGS__ > >(); \
+ const int type = QMetaType::type(tn); \
QCOMPARE(type, expectedType); \
QCOMPARE((QMetaType::fromType<CONTAINER< __VA_ARGS__ >>().id()), expectedType); \
}
@@ -1742,7 +1713,6 @@ void tst_QMetaType::automaticTemplateRegistration()
#define FOR_EACH_1ARG_TEMPLATE_TYPE(F, TYPE) \
F(QList, TYPE) \
F(QVector, TYPE) \
- F(QLinkedList, TYPE) \
F(QVector, TYPE) \
F(QVector, TYPE) \
F(QQueue, TYPE) \
@@ -1777,7 +1747,7 @@ void tst_QMetaType::automaticTemplateRegistration()
PRINT_2ARG_TEMPLATE
)
- CREATE_AND_VERIFY_CONTAINER(QList, QList<QMap<int, QHash<char, QVariantList> > >)
+ CREATE_AND_VERIFY_CONTAINER(QList, QList<QMap<int, QHash<char, QList<QVariant> > > >)
CREATE_AND_VERIFY_CONTAINER(QVector, void*)
CREATE_AND_VERIFY_CONTAINER(QVector, const void*)
CREATE_AND_VERIFY_CONTAINER(QList, void*)
@@ -2017,7 +1987,7 @@ void tst_QMetaType::metaObject_data()
QTest::newRow("MyGadget") << ::qMetaTypeId<MyGadget>() << &MyGadget::staticMetaObject << true << false << false;
QTest::newRow("MyGadget*") << ::qMetaTypeId<MyGadget*>() << &MyGadget::staticMetaObject << false << true << false;
QTest::newRow("MyEnum") << ::qMetaTypeId<MyGadget::MyEnum>() << &MyGadget::staticMetaObject << false << false << false;
- QTest::newRow("Qt::ScrollBarPolicy") << ::qMetaTypeId<Qt::ScrollBarPolicy>() << &QObject::staticQtMetaObject << false << false << false;
+ QTest::newRow("Qt::ScrollBarPolicy") << ::qMetaTypeId<Qt::ScrollBarPolicy>() << &Qt::staticMetaObject << false << false << false;
QTest::newRow("MyQObjectFromGadget*") << ::qMetaTypeId<MyQObjectFromGadget*>() << &MyQObjectFromGadget::staticMetaObject << false << false << true;
QTest::newRow("GadgetDerivedAndTyped<int>") << ::qMetaTypeId<GadgetDerivedAndTyped<int>>() << &GadgetDerivedAndTyped<int>::staticMetaObject << true << false << false;
@@ -2139,7 +2109,7 @@ struct CustomConvertibleType
};
bool operator<(const CustomConvertibleType &lhs, const CustomConvertibleType &rhs)
-{ return lhs.m_foo < rhs.m_foo; }
+{ return lhs.m_foo.toString() < rhs.m_foo.toString(); }
bool operator==(const CustomConvertibleType &lhs, const CustomConvertibleType &rhs)
{ return lhs.m_foo == rhs.m_foo; }
bool operator!=(const CustomConvertibleType &lhs, const CustomConvertibleType &rhs)
@@ -2429,43 +2399,6 @@ void tst_QMetaType::convertCustomType()
QCOMPARE(v.value<CustomConvertibleType2>().m_foo, testCustom.m_foo);
}
-void tst_QMetaType::compareCustomType_data()
-{
- QMetaType::registerComparators<CustomConvertibleType>();
-
- QTest::addColumn<QVariantList>("unsorted");
- QTest::addColumn<QVariantList>("sorted");
-
- QTest::newRow("int") << (QVariantList() << 37 << 458 << 1 << 243 << -4 << 383)
- << (QVariantList() << -4 << 1 << 37 << 243 << 383 << 458);
-
- QTest::newRow("dobule") << (QVariantList() << 4934.93 << 0.0 << 302.39 << -39.0)
- << (QVariantList() << -39.0 << 0.0 << 302.39 << 4934.93);
-
- QTest::newRow("QString") << (QVariantList() << "Hello" << "World" << "this" << "is" << "a" << "test")
- << (QVariantList() << "a" << "Hello" << "is" << "test" << "this" << "World");
-
- QTest::newRow("QTime") << (QVariantList() << QTime(14, 39) << QTime(0, 0) << QTime(18, 18) << QTime(9, 27))
- << (QVariantList() << QTime(0, 0) << QTime(9, 27) << QTime(14, 39) << QTime(18, 18));
-
- QTest::newRow("QDate") << (QVariantList() << QDate(2013, 3, 23) << QDate(1900, 12, 1) << QDate(2001, 2, 2) << QDate(1982, 12, 16))
- << (QVariantList() << QDate(1900, 12, 1) << QDate(1982, 12, 16) << QDate(2001, 2, 2) << QDate(2013, 3, 23));
-
- QTest::newRow("mixed") << (QVariantList() << "Hello" << "World" << QChar('a') << 38 << QChar('z') << -39 << 4.6)
- << (QVariantList() << -39 << 4.6 << 38 << QChar('a') << "Hello" << "World" << QChar('z'));
-
- QTest::newRow("custom") << (QVariantList() << QVariant::fromValue(CustomConvertibleType(1)) << QVariant::fromValue(CustomConvertibleType(100)) << QVariant::fromValue(CustomConvertibleType(50)))
- << (QVariantList() << QVariant::fromValue(CustomConvertibleType(1)) << QVariant::fromValue(CustomConvertibleType(50)) << QVariant::fromValue(CustomConvertibleType(100)));
-}
-
-void tst_QMetaType::compareCustomType()
-{
- QFETCH(QVariantList, unsorted);
- QFETCH(QVariantList, sorted);
- std::sort(unsorted.begin(), unsorted.end());
- QCOMPARE(unsorted, sorted);
-}
-
void tst_QMetaType::compareCustomEqualOnlyType()
{
int metaTypeId = qRegisterMetaType<CustomEqualsOnlyType>();
@@ -2487,11 +2420,6 @@ void tst_QMetaType::compareCustomEqualOnlyType()
QCOMPARE(variant100, variant100x);
QCOMPARE(variant100, variant100);
- // compare always fails
- QVERIFY(!(variant50 < variant50));
- QVERIFY(!(variant50 < variant100));
- QVERIFY(!(variant100 < variant50));
-
// check QMetaType::compare works/doesn't crash for equals only comparators
bool wasSuccess = QMetaType::compare(variant50.constData(), variant50.constData(),
metaTypeId, &result);
@@ -2588,7 +2516,8 @@ void tst_QMetaType::fromType()
QCOMPARE(QMetaType::fromType<RealType>(), QMetaType(MetaTypeId)); \
QVERIFY(QMetaType::fromType<RealType>() == QMetaType(MetaTypeId)); \
QVERIFY(!(QMetaType::fromType<RealType>() != QMetaType(MetaTypeId))); \
- QCOMPARE(QMetaType::fromType<RealType>().id(), MetaTypeId);
+ if (MetaTypeId != QMetaType::Void) \
+ QCOMPARE(QMetaType::fromType<RealType>().id(), MetaTypeId);
FOR_EACH_CORE_METATYPE(FROMTYPE_CHECK)
@@ -2600,6 +2529,50 @@ void tst_QMetaType::fromType()
#undef FROMTYPE_CHECK
}
+template<char X, typename T = void>
+struct CharTemplate
+{
+ struct
+ {
+ int a;
+ } x;
+};
+
+void tst_QMetaType::operatorEq_data()
+{
+ QTest::addColumn<QMetaType>("typeA");
+ QTest::addColumn<QMetaType>("typeB");
+ QTest::addColumn<bool>("eq");
+
+ QTest::newRow("String") << QMetaType(QMetaType::QString)
+ << QMetaType::fromType<const QString &>() << true;
+ QTest::newRow("void1") << QMetaType(QMetaType::UnknownType) << QMetaType::fromType<void>()
+ << true;
+ QTest::newRow("void2") << QMetaType::fromType<const void>() << QMetaType::fromType<void>()
+ << true;
+ QTest::newRow("vec1") << QMetaType::fromType<QVector<const int *>>()
+ << QMetaType::fromType<QVector<const int *>>() << true;
+ QTest::newRow("vec2") << QMetaType::fromType<QVector<const int *>>()
+ << QMetaType::fromType<QVector<int *>>() << false;
+ QTest::newRow("char1") << QMetaType::fromType<CharTemplate<'>'>>()
+ << QMetaType::fromType<CharTemplate<'>', void>>() << true;
+ QTest::newRow("annon1") << QMetaType::fromType<decltype(CharTemplate<'>'>::x)>()
+ << QMetaType::fromType<decltype(CharTemplate<'>'>::x)>() << true;
+ QTest::newRow("annon2") << QMetaType::fromType<decltype(CharTemplate<'>'>::x)>()
+ << QMetaType::fromType<decltype(CharTemplate<'<'>::x)>() << false;
+}
+
+void tst_QMetaType::operatorEq()
+{
+ QFETCH(QMetaType, typeA);
+ QFETCH(QMetaType, typeB);
+ QFETCH(bool, eq);
+
+ QCOMPARE(typeA == typeB, eq);
+ QCOMPARE(typeB == typeA, eq);
+ QCOMPARE(typeA != typeB, !eq);
+ QCOMPARE(typeB != typeA, !eq);
+}
// Compile-time test, it should be possible to register function pointer types
class Undefined;
diff --git a/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
new file mode 100644
index 0000000000..b4965302dd
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmimedata/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmimedata.pro.
+
+#####################################################################
+## tst_qmimedata Test:
+#####################################################################
+
+add_qt_test(tst_qmimedata
+ SOURCES
+ tst_qmimedata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/kernel/qobject/CMakeLists.txt b/tests/auto/corelib/kernel/qobject/CMakeLists.txt
new file mode 100644
index 0000000000..3be3287532
--- /dev/null
+++ b/tests/auto/corelib/kernel/qobject/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from qobject.pro.
+
+#####################################################################
+## tst_qobject Test:
+#####################################################################
+
+add_qt_test(tst_qobject
+ SOURCES
+ tst_qobject.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+#### Keys ignored in scope 3:.:.:test.pro:<TRUE>:
+# CONFIG = "testcase" "console"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 4:.:.:test.pro:QT_CONFIG___contains___c++1z:
+# CONFIG = "c++1z"
+
+if(NOT WINRT)
+ add_subdirectory(signalbug)
+endif()
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt b/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt
new file mode 100644
index 0000000000..e798028b1b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qobject/signalbug/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from signalbug.pro.
+
+#####################################################################
+## signalbug_helper Binary:
+#####################################################################
+
+add_qt_test_helper(signalbug_helper
+ SOURCES
+ signalbug.cpp signalbug.h
+)
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 21615d6ec4..b1d3ea19d6 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -81,9 +81,6 @@ private slots:
void senderTest();
void declareInterface();
void qpointerResetBeforeDestroyedSignal();
-#ifndef QT_NO_USERDATA
- void testUserData();
-#endif
void childDeletesItsSibling();
void dynamicProperties();
void floatProperty();
@@ -463,7 +460,7 @@ void tst_QObject::connectSlotsByName()
sender.setObjectName("Sender");
QTest::ignoreMessage(QtWarningMsg, "QMetaObject::connectSlotsByName: No matching signal for on_child_signal()");
- QTest::ignoreMessage(QtWarningMsg, "QMetaObject::connectSlotsByName: Connecting slot on_Sender_signalManyParams() with the first of the following compatible signals: (\"signalManyParams(int,int,int,QString,bool)\", \"signalManyParams(int,int,int,QString,bool,bool)\")");
+ QTest::ignoreMessage(QtWarningMsg, "QMetaObject::connectSlotsByName: Connecting slot on_Sender_signalManyParams() with the first of the following compatible signals: QVector(\"signalManyParams(int,int,int,QString,bool)\", \"signalManyParams(int,int,int,QString,bool,bool)\")");
QMetaObject::connectSlotsByName(&receiver);
receiver.called_slots.clear();
@@ -1917,7 +1914,7 @@ void tst_QObject::property()
property = mo->property(mo->indexOfProperty("alpha"));
QVERIFY(property.isEnumType());
QCOMPARE(property.typeName(), "Alpha");
- QCOMPARE(property.type(), QVariant::Int);
+ QCOMPARE(property.userType(), QMetaType::fromType<PropertyObject::Alpha>().id());
QVariant var = object.property("alpha");
QVERIFY(!var.isNull());
@@ -1928,7 +1925,8 @@ void tst_QObject::property()
QCOMPARE(object.property("alpha").toInt(), int(PropertyObject::Alpha2));
QVERIFY(object.setProperty("alpha", "Alpha1"));
QCOMPARE(object.property("alpha").toInt(), int(PropertyObject::Alpha1));
- QVERIFY(!object.setProperty("alpha", QVariant()));
+ QVERIFY(object.setProperty("alpha", QVariant()));
+ QCOMPARE(object.property("alpha").toInt(), 0);
QVERIFY(mo->indexOfProperty("number") != -1);
QCOMPARE(object.property("number").toInt(), 0);
@@ -1998,7 +1996,7 @@ void tst_QObject::property()
property = mo->property(mo->indexOfProperty("priority"));
QVERIFY(property.isEnumType());
QCOMPARE(property.typeName(), "Priority");
- QCOMPARE(property.type(), QVariant::Int);
+ QCOMPARE(property.userType(), QMetaType::fromType<PropertyObject::Priority>().id());
var = object.property("priority");
QVERIFY(!var.isNull());
@@ -2009,7 +2007,8 @@ void tst_QObject::property()
QCOMPARE(object.property("priority").toInt(), int(PropertyObject::VeryHigh));
QVERIFY(object.setProperty("priority", "High"));
QCOMPARE(object.property("priority").toInt(), int(PropertyObject::High));
- QVERIFY(!object.setProperty("priority", QVariant()));
+ QVERIFY(object.setProperty("priority", QVariant()));
+ QCOMPARE(object.property("priority").toInt(), 0);
// now it's registered, so it works as expected
int priorityMetaTypeId = qRegisterMetaType<PropertyObject::Priority>("PropertyObject::Priority");
@@ -2031,7 +2030,8 @@ void tst_QObject::property()
QCOMPARE(qvariant_cast<PropertyObject::Priority>(object.property("priority")), PropertyObject::VeryHigh);
QVERIFY(object.setProperty("priority", "High"));
QCOMPARE(qvariant_cast<PropertyObject::Priority>(object.property("priority")), PropertyObject::High);
- QVERIFY(!object.setProperty("priority", QVariant()));
+ QVERIFY(object.setProperty("priority", QVariant()));
+ QCOMPARE(object.property("priority").toInt(), 0);
var = object.property("priority");
QCOMPARE(qvariant_cast<PropertyObject::Priority>(var), PropertyObject::High);
@@ -2341,51 +2341,6 @@ void tst_QObject::declareInterface()
}
-#ifndef QT_NO_USERDATA
-class CustomData : public QObjectUserData
-{
-public:
- int id;
-};
-
-void tst_QObject::testUserData()
-{
- const int USER_DATA_COUNT = 100;
- int user_data_ids[USER_DATA_COUNT];
-
- // Register a few
- for (int i=0; i<USER_DATA_COUNT; ++i) {
- user_data_ids[i] = QObject::registerUserData();
- }
-
- // Randomize the table a bit
- for (int i=0; i<100; ++i) {
- int p1 = QRandomGenerator::global()->bounded(USER_DATA_COUNT);
- int p2 = QRandomGenerator::global()->bounded(USER_DATA_COUNT);
-
- int tmp = user_data_ids[p1];
- user_data_ids[p1] = user_data_ids[p2];
- user_data_ids[p2] = tmp;
- }
-
- // insert the user data into an object
- QObject my_test_object;
- for (int i=0; i<USER_DATA_COUNT; ++i) {
- CustomData *data = new CustomData;
- data->id = user_data_ids[i];
- my_test_object.setUserData(data->id, data);
- }
-
- // verify that all ids and positions are matching
- for (int i=0; i<USER_DATA_COUNT; ++i) {
- int id = user_data_ids[i];
- CustomData *data = static_cast<CustomData *>(my_test_object.userData(id));
- QVERIFY(data != nullptr);
- QCOMPARE(data->id, id);
- }
-}
-#endif // QT_NO_USERDATA
-
class DestroyedListener : public QObject
{
Q_OBJECT
@@ -6974,8 +6929,7 @@ void tst_QObject::noDeclarativeParentChangedOnDestruction()
QObject *parent = new QObject;
QObject *child = new QObject;
- QAbstractDeclarativeDataImpl dummy;
- dummy.ownedByQml1 = false;
+ QAbstractDeclarativeData dummy;
QObjectPrivate::get(child)->declarativeData = &dummy;
parentChangeCalled = false;
diff --git a/tests/auto/corelib/kernel/qpointer/CMakeLists.txt b/tests/auto/corelib/kernel/qpointer/CMakeLists.txt
new file mode 100644
index 0000000000..804a3a9def
--- /dev/null
+++ b/tests/auto/corelib/kernel/qpointer/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qpointer.pro.
+
+#####################################################################
+## tst_qpointer Test:
+#####################################################################
+
+add_qt_test(tst_qpointer
+ SOURCES
+ tst_qpointer.cpp
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qpointer CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt b/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt
new file mode 100644
index 0000000000..366e76d034
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from qsharedmemory.pro.
+
+
+if(QT_FEATURE_sharedmemory)
+ #####################################################################
+ ## tst_qsharedmemory Test:
+ #####################################################################
+
+ add_qt_test(tst_qsharedmemory
+ SOURCES
+ tst_qsharedmemory.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ )
+
+#### Keys ignored in scope 4:.:.:test.pro:<TRUE>:
+ # CONFIG = "testcase"
+
+ ## Scopes:
+ #####################################################################
+
+ extend_target(tst_qsharedmemory CONDITION LINUX
+ PUBLIC_LIBRARIES
+ rt
+ )
+
+ if(NOT WINRT)
+ add_subdirectory(producerconsumer)
+ endif()
+endif()
diff --git a/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt b/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt
new file mode 100644
index 0000000000..2e16a673b1
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsharedmemory/producerconsumer/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from producerconsumer.pro.
+
+#####################################################################
+## producerconsumer_helper Binary:
+#####################################################################
+
+add_qt_test_helper(producerconsumer_helper
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt b/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt
new file mode 100644
index 0000000000..ae86137c94
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsignalblocker/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsignalblocker.pro.
+
+#####################################################################
+## tst_qsignalblocker Test:
+#####################################################################
+
+add_qt_test(tst_qsignalblocker
+ SOURCES
+ tst_qsignalblocker.cpp
+)
diff --git a/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt b/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
new file mode 100644
index 0000000000..1360e76ea1
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsignalmapper/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsignalmapper.pro.
+
+#####################################################################
+## tst_qsignalmapper Test:
+#####################################################################
+
+add_qt_test(tst_qsignalmapper
+ SOURCES
+ tst_qsignalmapper.cpp
+)
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt b/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt
new file mode 100644
index 0000000000..cb847dc503
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsocketnotifier/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from qsocketnotifier.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qsocketnotifier Test:
+#####################################################################
+
+add_qt_test(tst_qsocketnotifier
+ SOURCES
+ tst_qsocketnotifier.cpp
+ INCLUDE_DIRECTORIES
+ ${QT_SOURCE_TREE}/src/network
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qsocketnotifier.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qsocketnotifier CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+extend_target(tst_qsocketnotifier CONDITION QT_FEATURE_reduce_exports AND UNIX
+ SOURCES
+ ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_unix.cpp
+)
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt b/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt
new file mode 100644
index 0000000000..1e6889eec0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qsystemsemaphore.pro.
+
+add_subdirectory(acquirerelease)
+#####################################################################
+## tst_qsystemsemaphore Test:
+#####################################################################
+
+add_qt_test(tst_qsystemsemaphore
+ SOURCES
+ tst_qsystemsemaphore.cpp
+)
+
+#### Keys ignored in scope 2:.:.:test.pro:<TRUE>:
+# CONFIG = "testcase"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:test.pro:WIN32:
+# CONFIG = "console"
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt b/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt
new file mode 100644
index 0000000000..ddce7297d2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/acquirerelease/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from acquirerelease.pro.
+
+#####################################################################
+## acquirerelease_helper Binary:
+#####################################################################
+
+add_qt_test_helper(acquirerelease_helper
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/corelib/kernel/qtimer/CMakeLists.txt b/tests/auto/corelib/kernel/qtimer/CMakeLists.txt
new file mode 100644
index 0000000000..84585751ac
--- /dev/null
+++ b/tests/auto/corelib/kernel/qtimer/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtimer.pro.
+
+#####################################################################
+## tst_qtimer Test:
+#####################################################################
+
+add_qt_test(tst_qtimer
+ SOURCES
+ tst_qtimer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt b/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt
new file mode 100644
index 0000000000..79e44bc928
--- /dev/null
+++ b/tests/auto/corelib/kernel/qtranslator/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from qtranslator.pro.
+
+#####################################################################
+## tst_qtranslator Test:
+#####################################################################
+
+add_qt_test(tst_qtranslator
+ SOURCES
+ tst_qtranslator.cpp
+)
+
+# Resources:
+set(qtranslator_resource_files
+ "hellotr_empty.qm"
+ "hellotr_la.qm"
+)
+
+add_qt_resource(tst_qtranslator "qtranslator"
+ PREFIX
+ "/tst_qtranslator"
+ FILES
+ ${qtranslator_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "dependencies_la.qm"
+ "hellotr_empty.qm"
+ "hellotr_la.qm"
+ "msgfmt_from_po.qm"
+ )
+
+ add_qt_resource(tst_qtranslator "android_testdata"
+ PREFIX
+ "/android_testdata"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
+
+#### Keys ignored in scope 3:.:.:qtranslator.pro:else:
+# TESTDATA = "dependencies_la.qm" "hellotr_empty.qm" "hellotr_la.qm" "msgfmt_from_po.qm"
diff --git a/tests/auto/corelib/kernel/qvariant/.prev_CMakeLists.txt b/tests/auto/corelib/kernel/qvariant/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..dc676d11fe
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from qvariant.pro.
+
+#####################################################################
+## tst_qvariant Test:
+#####################################################################
+
+add_qt_test(tst_qvariant
+ SOURCES
+ tst_qvariant.cpp
+ DEFINES
+ -QT_NO_LINKED_LIST
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+# Resources:
+set(qvariant_resource_files
+ "stream/qt4.9/"
+ "stream/qt5.0/"
+)
+
+add_qt_resource(tst_qvariant "qvariant"
+ PREFIX
+ "/"
+ FILES
+ ${qvariant_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/kernel/qvariant/CMakeLists.txt b/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
new file mode 100644
index 0000000000..dff731cfc2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from qvariant.pro.
+
+#####################################################################
+## tst_qvariant Test:
+#####################################################################
+
+add_qt_test(tst_qvariant
+ SOURCES
+ tst_qvariant.cpp
+ DEFINES
+ # -QT_NO_LINKED_LIST # special case remove until we fix this
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+# Resources:
+set(qvariant_resource_files
+ "stream/qt4.9/"
+ "stream/qt5.0/"
+)
+
+add_qt_resource(tst_qvariant "qvariant"
+ PREFIX
+ "/"
+ FILES
+ ${qvariant_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.pro b/tests/auto/corelib/kernel/qvariant/qvariant.pro
index 0b5280df86..a620be0091 100644
--- a/tests/auto/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/auto/corelib/kernel/qvariant/qvariant.pro
@@ -5,7 +5,6 @@ INCLUDEPATH += $$PWD/../../../other/qvariant_common
SOURCES = tst_qvariant.cpp
RESOURCES += qvariant.qrc
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-DEFINES -= QT_NO_LINKED_LIST
qtConfig(c++14): CONFIG += c++14
qtConfig(c++1z): CONFIG += c++1z
!qtConfig(doubleconversion):!qtConfig(system-doubleconversion) {
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 5af1353a0f..22464daf67 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -49,7 +49,6 @@
#if __has_include(<variant>) && __cplusplus >= 201703L
#include <variant>
#endif
-#include <QLinkedList>
#include <QRegularExpression>
#include <QDir>
#include <QBuffer>
@@ -190,8 +189,6 @@ private slots:
void operator_eq_eq_data();
void operator_eq_eq();
void operator_eq_eq_rhs();
- void compareNumbers_data() const;
- void compareNumbers() const;
void typeName_data();
void typeName();
@@ -270,9 +267,6 @@ private slots:
void enums();
void metaEnums();
- void compareSanity_data();
- void compareSanity();
- void compareRich();
void nullConvert();
@@ -355,13 +349,13 @@ void tst_QVariant::constructor_invalid()
QFETCH(uint, typeId);
{
- QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type, type id:"));
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type"));
QVariant variant(static_cast<QVariant::Type>(typeId));
QVERIFY(!variant.isValid());
QCOMPARE(variant.userType(), int(QMetaType::UnknownType));
}
{
- QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type, type id:"));
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type"));
QVariant variant(typeId, /* copy */ 0);
QVERIFY(!variant.isValid());
QCOMPARE(variant.userType(), int(QMetaType::UnknownType));
@@ -1439,10 +1433,7 @@ void tst_QVariant::checkDataStream()
const int typeId = QMetaType::LastCoreType + 1;
QVERIFY(!QMetaType::isRegistered(typeId));
- QByteArray errorMessage("Trying to construct an instance of an invalid type, type id: ");
- errorMessage.append(QString::number(typeId, 10));
-
- QTest::ignoreMessage(QtWarningMsg, errorMessage.constData());
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type"));
QByteArray settingsHex("000000");
settingsHex.append(QString::number(typeId, 16));
settingsHex.append("ffffffffff");
@@ -1732,344 +1723,6 @@ void tst_QVariant::operator_eq_eq_rhs()
#endif
}
-void tst_QVariant::compareNumbers_data() const
-{
- typedef signed char schar;
- QTest::addColumn<QVariant>("v1");
- QTest::addColumn<QVariant>("v2");
- QTest::addColumn<int>("expected");
-
- // sanity checking: same types
- QTest::newRow("bool1") << QVariant(false) << QVariant(false) << 0;
- QTest::newRow("bool2") << QVariant(true) << QVariant(true) << 0;
- QTest::newRow("bool3") << QVariant(false) << QVariant(true) << -1;
- QTest::newRow("bool4") << QVariant(true) << QVariant(false) << +1;
-
- QTest::newRow("char1") << QVariant::fromValue(char(0)) << QVariant::fromValue(char(0)) << 0;
- QTest::newRow("char2") << QVariant::fromValue(CHAR_MAX) << QVariant::fromValue(CHAR_MAX) << 0;
- QTest::newRow("char3") << QVariant::fromValue(CHAR_MIN) << QVariant::fromValue(CHAR_MIN) << 0;
- QTest::newRow("char4") << QVariant::fromValue(CHAR_MIN) << QVariant::fromValue(CHAR_MAX) << -1;
- QTest::newRow("char5") << QVariant::fromValue(CHAR_MAX) << QVariant::fromValue(CHAR_MIN) << +1;
-
- QTest::newRow("schar1") << QVariant::fromValue(schar(0)) << QVariant::fromValue(schar(0)) << 0;
- QTest::newRow("schar2") << QVariant::fromValue(SCHAR_MAX) << QVariant::fromValue(SCHAR_MAX) << 0;
- QTest::newRow("schar3") << QVariant::fromValue(SCHAR_MIN) << QVariant::fromValue(SCHAR_MIN) << 0;
- QTest::newRow("schar4") << QVariant::fromValue(SCHAR_MIN) << QVariant::fromValue(SCHAR_MAX) << -1;
- QTest::newRow("schar5") << QVariant::fromValue(SCHAR_MAX) << QVariant::fromValue(SCHAR_MIN) << +1;
-
- QTest::newRow("uchar1") << QVariant::fromValue(uchar(0)) << QVariant::fromValue(uchar(0)) << 0;
- QTest::newRow("uchar2") << QVariant::fromValue(UCHAR_MAX) << QVariant::fromValue(UCHAR_MAX) << 0;
- QTest::newRow("uchar3") << QVariant::fromValue(uchar(0)) << QVariant::fromValue(UCHAR_MAX) << -1;
- QTest::newRow("uchar4") << QVariant::fromValue(UCHAR_MAX) << QVariant::fromValue(uchar(0)) << +1;
-
- QTest::newRow("short1") << QVariant::fromValue(short(0)) << QVariant::fromValue(short(0)) << 0;
- QTest::newRow("short2") << QVariant::fromValue(SHRT_MAX) << QVariant::fromValue(SHRT_MAX) << 0;
- QTest::newRow("short3") << QVariant::fromValue(SHRT_MIN) << QVariant::fromValue(SHRT_MIN) << 0;
- QTest::newRow("short4") << QVariant::fromValue(SHRT_MIN) << QVariant::fromValue(SHRT_MAX) << -1;
- QTest::newRow("short5") << QVariant::fromValue(SHRT_MAX) << QVariant::fromValue(SHRT_MIN) << +1;
-
- QTest::newRow("ushort1") << QVariant::fromValue(ushort(0)) << QVariant::fromValue(ushort(0)) << 0;
- QTest::newRow("ushort2") << QVariant::fromValue(USHRT_MAX) << QVariant::fromValue(USHRT_MAX) << 0;
- QTest::newRow("ushort3") << QVariant::fromValue(ushort(0)) << QVariant::fromValue(USHRT_MAX) << -1;
- QTest::newRow("ushort4") << QVariant::fromValue(USHRT_MAX) << QVariant::fromValue(ushort(0)) << +1;
-
- QTest::newRow("int1") << QVariant::fromValue(int(0)) << QVariant::fromValue(int(0)) << 0;
- QTest::newRow("int2") << QVariant::fromValue(INT_MAX) << QVariant::fromValue(INT_MAX) << 0;
- QTest::newRow("int3") << QVariant::fromValue(INT_MIN) << QVariant::fromValue(INT_MIN) << 0;
- QTest::newRow("int4") << QVariant::fromValue(INT_MIN) << QVariant::fromValue(INT_MAX) << -1;
- QTest::newRow("int5") << QVariant::fromValue(INT_MAX) << QVariant::fromValue(INT_MIN) << +1;
-
- QTest::newRow("uint1") << QVariant::fromValue(uint(0)) << QVariant::fromValue(uint(0)) << 0;
- QTest::newRow("uint2") << QVariant::fromValue(UINT_MAX) << QVariant::fromValue(UINT_MAX) << 0;
- QTest::newRow("uint3") << QVariant::fromValue(uint(0)) << QVariant::fromValue(UINT_MAX) << -1;
- QTest::newRow("uint4") << QVariant::fromValue(UINT_MAX) << QVariant::fromValue(uint(0)) << +1;
-
- QTest::newRow("long1") << QVariant::fromValue(long(0)) << QVariant::fromValue(long(0)) << 0;
- QTest::newRow("long2") << QVariant::fromValue(LONG_MAX) << QVariant::fromValue(LONG_MAX) << 0;
- QTest::newRow("long3") << QVariant::fromValue(LONG_MIN) << QVariant::fromValue(LONG_MIN) << 0;
- QTest::newRow("long4") << QVariant::fromValue(LONG_MIN) << QVariant::fromValue(LONG_MAX) << -1;
- QTest::newRow("long5") << QVariant::fromValue(LONG_MAX) << QVariant::fromValue(LONG_MIN) << +1;
-
- QTest::newRow("ulong1") << QVariant::fromValue(ulong(0)) << QVariant::fromValue(ulong(0)) << 0;
- QTest::newRow("ulong2") << QVariant::fromValue(ULONG_MAX) << QVariant::fromValue(ULONG_MAX) << 0;
- QTest::newRow("ulong3") << QVariant::fromValue(ulong(0)) << QVariant::fromValue(ULONG_MAX) << -1;
- QTest::newRow("ulong4") << QVariant::fromValue(ULONG_MAX) << QVariant::fromValue(ulong(0)) << +1;
-
- QTest::newRow("llong1") << QVariant::fromValue(qlonglong(0)) << QVariant::fromValue(qlonglong(0)) << 0;
- QTest::newRow("llong2") << QVariant::fromValue(LLONG_MAX) << QVariant::fromValue(LLONG_MAX) << 0;
- QTest::newRow("llong3") << QVariant::fromValue(LLONG_MIN) << QVariant::fromValue(LLONG_MIN) << 0;
- QTest::newRow("llong4") << QVariant::fromValue(LLONG_MIN) << QVariant::fromValue(LLONG_MAX) << -1;
- QTest::newRow("llong5") << QVariant::fromValue(LLONG_MAX) << QVariant::fromValue(LLONG_MIN) << +1;
-
- QTest::newRow("ullong1") << QVariant::fromValue(qulonglong(0)) << QVariant::fromValue(qulonglong(0)) << 0;
- QTest::newRow("ullong2") << QVariant::fromValue(ULLONG_MAX) << QVariant::fromValue(ULLONG_MAX) << 0;
- QTest::newRow("ullong3") << QVariant::fromValue(qulonglong(0)) << QVariant::fromValue(ULLONG_MAX) << -1;
- QTest::newRow("ullong4") << QVariant::fromValue(ULLONG_MAX) << QVariant::fromValue(qulonglong(0)) << +1;
-
- QTest::newRow("float1") << QVariant::fromValue(0.f) << QVariant::fromValue(0.f) << 0;
- QTest::newRow("float2") << QVariant::fromValue(-1.f) << QVariant::fromValue(0.f) << -1;
- QTest::newRow("float3") << QVariant::fromValue(0.f) << QVariant::fromValue(-1.f) << +1;
- QTest::newRow("float4") << QVariant::fromValue(-float(qInf())) << QVariant::fromValue(0.f) << -1;
- QTest::newRow("float5") << QVariant::fromValue(0.f) << QVariant::fromValue(-float(qInf())) << +1;
- QTest::newRow("float6") << QVariant::fromValue(-float(qInf())) << QVariant::fromValue(-float(qInf())) << 0;
- QTest::newRow("float7") << QVariant::fromValue(float(qInf())) << QVariant::fromValue(float(qInf())) << 0;
-
- QTest::newRow("double1") << QVariant::fromValue(0.) << QVariant::fromValue(0.) << 0;
- QTest::newRow("double2") << QVariant::fromValue(-1.) << QVariant::fromValue(0.) << -1;
- QTest::newRow("double3") << QVariant::fromValue(0.) << QVariant::fromValue(-1.) << +1;
- QTest::newRow("double4") << QVariant::fromValue(-qInf()) << QVariant::fromValue(0.) << -1;
- QTest::newRow("double5") << QVariant::fromValue(0.) << QVariant::fromValue(-qInf()) << +1;
- QTest::newRow("double6") << QVariant::fromValue(-double(qInf())) << QVariant::fromValue(-qInf()) << 0;
- QTest::newRow("double7") << QVariant::fromValue(qInf()) << QVariant::fromValue(qInf()) << 0;
- QTest::newRow("double8") << QVariant::fromValue(-qInf()) << QVariant::fromValue(qInf()) << -1;
- QTest::newRow("double9") << QVariant::fromValue(qQNaN()) << QVariant::fromValue(0.) << INT_MAX;
- QTest::newRow("double10") << QVariant::fromValue(0.) << QVariant::fromValue(qQNaN()) << INT_MAX;
- QTest::newRow("double11") << QVariant::fromValue(qQNaN()) << QVariant::fromValue(qQNaN()) << INT_MAX;
-
- // mixed comparisons
- // fp + fp
- QTest::newRow("float+double1") << QVariant::fromValue(0.f) << QVariant::fromValue(0.) << 0;
- QTest::newRow("float+double2") << QVariant::fromValue(-1.f) << QVariant::fromValue(0.) << -1;
- QTest::newRow("float+double3") << QVariant::fromValue(0.f) << QVariant::fromValue(-1.) << +1;
- QTest::newRow("float+double4") << QVariant::fromValue(-float(qInf())) << QVariant::fromValue(0.) << -1;
- QTest::newRow("float+double5") << QVariant::fromValue(0.f) << QVariant::fromValue(-qInf()) << +1;
- QTest::newRow("float+double6") << QVariant::fromValue(-float(qInf())) << QVariant::fromValue(-qInf()) << 0;
- QTest::newRow("float+double7") << QVariant::fromValue(float(qInf())) << QVariant::fromValue(qInf()) << 0;
- QTest::newRow("float+double8") << QVariant::fromValue(-float(qInf())) << QVariant::fromValue(qInf()) << -1;
- QTest::newRow("float+double9") << QVariant::fromValue(qQNaN()) << QVariant::fromValue(0.) << INT_MAX;
- QTest::newRow("float+double10") << QVariant::fromValue(0.) << QVariant::fromValue(qQNaN()) << INT_MAX;
- QTest::newRow("float+double11") << QVariant::fromValue(qQNaN()) << QVariant::fromValue(qQNaN()) << INT_MAX;
-
- // fp + int
- QTest::newRow("float+int1") << QVariant::fromValue(0.f) << QVariant::fromValue(0) << 0;
- QTest::newRow("double+int1") << QVariant::fromValue(0.) << QVariant::fromValue(0) << 0;
- QTest::newRow("float+int2") << QVariant::fromValue(-1.f) << QVariant::fromValue(0) << -1;
- QTest::newRow("double+int2") << QVariant::fromValue(-1.) << QVariant::fromValue(0) << -1;
- QTest::newRow("float+int3") << QVariant::fromValue(0.f) << QVariant::fromValue(-1) << +1;
- QTest::newRow("double+int3") << QVariant::fromValue(0.) << QVariant::fromValue(-1) << +1;
- QTest::newRow("float+int4") << QVariant::fromValue(1.5f) << QVariant::fromValue(1) << +1;
- QTest::newRow("double+int4") << QVariant::fromValue(1.5) << QVariant::fromValue(1) << +1;
- QTest::newRow("double+int5") << QVariant::fromValue(qInf()) << QVariant::fromValue(1) << +1;
-
- // fp + uint
- QTest::newRow("float+uint1") << QVariant::fromValue(0.f) << QVariant::fromValue(0U) << 0;
- QTest::newRow("double+uint1") << QVariant::fromValue(0.) << QVariant::fromValue(0U) << 0;
- QTest::newRow("float+uint2") << QVariant::fromValue(-1.f) << QVariant::fromValue(0U) << -1;
- QTest::newRow("double+uint2") << QVariant::fromValue(-1.) << QVariant::fromValue(0U) << -1;
- QTest::newRow("float+uint3") << QVariant::fromValue(0.f) << QVariant::fromValue(1U) << -1;
- QTest::newRow("double+uint3") << QVariant::fromValue(0.) << QVariant::fromValue(1U) << -1;
- QTest::newRow("float+uint4") << QVariant::fromValue(1.5f) << QVariant::fromValue(1U) << +1;
- QTest::newRow("double+uint4") << QVariant::fromValue(1.5) << QVariant::fromValue(1U) << +1;
-
- // lower ranked + int
- QTest::newRow("bool+int1") << QVariant::fromValue(false) << QVariant::fromValue(0) << 0;
- QTest::newRow("bool+int2") << QVariant::fromValue(false) << QVariant::fromValue(1) << -1;
- QTest::newRow("bool+int3") << QVariant::fromValue(true) << QVariant::fromValue(0) << +1;
- QTest::newRow("bool+int4") << QVariant::fromValue(true) << QVariant::fromValue(1) << 0;
- QTest::newRow("bool+int5") << QVariant::fromValue(true) << QVariant::fromValue(2) << -1;
-
- QTest::newRow("char+int1") << QVariant::fromValue(char(0)) << QVariant::fromValue(0) << 0;
- QTest::newRow("char+int2") << QVariant::fromValue(char(0)) << QVariant::fromValue(1) << -1;
- QTest::newRow("char+int3") << QVariant::fromValue(char(1)) << QVariant::fromValue(0) << +1;
- QTest::newRow("char+int4") << QVariant::fromValue(char(1)) << QVariant::fromValue(1) << 0;
- if (std::numeric_limits<char>::is_signed) {
- QTest::newRow("char+int5") << QVariant::fromValue(char(-1)) << QVariant::fromValue(0) << -1;
- QTest::newRow("char+int6") << QVariant::fromValue(char(-1)) << QVariant::fromValue(-1) << 0;
- }
-
- QTest::newRow("schar+int1") << QVariant::fromValue(schar(0)) << QVariant::fromValue(0) << 0;
- QTest::newRow("schar+int2") << QVariant::fromValue(schar(0)) << QVariant::fromValue(1) << -1;
- QTest::newRow("schar+int3") << QVariant::fromValue(schar(1)) << QVariant::fromValue(0) << +1;
- QTest::newRow("schar+int4") << QVariant::fromValue(schar(1)) << QVariant::fromValue(1) << 0;
- QTest::newRow("schar+int5") << QVariant::fromValue(schar(-1)) << QVariant::fromValue(0) << -1;
- QTest::newRow("schar+int6") << QVariant::fromValue(schar(-1)) << QVariant::fromValue(-1) << 0;
-
- QTest::newRow("uchar+int1") << QVariant::fromValue(uchar(0)) << QVariant::fromValue(0) << 0;
- QTest::newRow("uchar+int2") << QVariant::fromValue(uchar(0)) << QVariant::fromValue(1) << -1;
- QTest::newRow("uchar+int3") << QVariant::fromValue(uchar(1)) << QVariant::fromValue(0) << +1;
- QTest::newRow("uchar+int4") << QVariant::fromValue(uchar(1)) << QVariant::fromValue(1) << 0;
-
- QTest::newRow("short+int1") << QVariant::fromValue(short(0)) << QVariant::fromValue(0) << 0;
- QTest::newRow("short+int2") << QVariant::fromValue(short(0)) << QVariant::fromValue(1) << -1;
- QTest::newRow("short+int3") << QVariant::fromValue(short(1)) << QVariant::fromValue(0) << +1;
- QTest::newRow("short+int4") << QVariant::fromValue(short(1)) << QVariant::fromValue(1) << 0;
- QTest::newRow("short+int5") << QVariant::fromValue(short(-1)) << QVariant::fromValue(0) << -1;
- QTest::newRow("short+int6") << QVariant::fromValue(short(-1)) << QVariant::fromValue(-1) << 0;
-
- QTest::newRow("ushort+int1") << QVariant::fromValue(ushort(0)) << QVariant::fromValue(0) << 0;
- QTest::newRow("ushort+int2") << QVariant::fromValue(ushort(0)) << QVariant::fromValue(1) << -1;
- QTest::newRow("ushort+int3") << QVariant::fromValue(ushort(1)) << QVariant::fromValue(0) << +1;
- QTest::newRow("ushort+int4") << QVariant::fromValue(ushort(1)) << QVariant::fromValue(1) << 0;
-
- // lower ranked + uint (without sign change)
- QTest::newRow("bool+uint1") << QVariant::fromValue(false) << QVariant::fromValue(0U) << 0;
- QTest::newRow("bool+uint2") << QVariant::fromValue(false) << QVariant::fromValue(1U) << -1;
- QTest::newRow("bool+uint3") << QVariant::fromValue(true) << QVariant::fromValue(0U) << +1;
- QTest::newRow("bool+uint4") << QVariant::fromValue(true) << QVariant::fromValue(1U) << 0;
- QTest::newRow("bool+uint5") << QVariant::fromValue(true) << QVariant::fromValue(2U) << -1;
-
- QTest::newRow("char+uint1") << QVariant::fromValue(char(0)) << QVariant::fromValue(0U) << 0;
- QTest::newRow("char+uint2") << QVariant::fromValue(char(0)) << QVariant::fromValue(1U) << -1;
- QTest::newRow("char+uint3") << QVariant::fromValue(char(1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("char+uint4") << QVariant::fromValue(char(1)) << QVariant::fromValue(1U) << 0;
-
- QTest::newRow("schar+uint1") << QVariant::fromValue(schar(0)) << QVariant::fromValue(0U) << 0;
- QTest::newRow("schar+uint2") << QVariant::fromValue(schar(0)) << QVariant::fromValue(1U) << -1;
- QTest::newRow("schar+uint3") << QVariant::fromValue(schar(1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("schar+uint4") << QVariant::fromValue(schar(1)) << QVariant::fromValue(1U) << 0;
-
- QTest::newRow("uchar+uint1") << QVariant::fromValue(uchar(0)) << QVariant::fromValue(0U) << 0;
- QTest::newRow("uchar+uint2") << QVariant::fromValue(uchar(0)) << QVariant::fromValue(1U) << -1;
- QTest::newRow("uchar+uint3") << QVariant::fromValue(uchar(1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("uchar+uint4") << QVariant::fromValue(uchar(1)) << QVariant::fromValue(1U) << 0;
-
- QTest::newRow("short+uint1") << QVariant::fromValue(short(0)) << QVariant::fromValue(0U) << 0;
- QTest::newRow("short+uint2") << QVariant::fromValue(short(0)) << QVariant::fromValue(1U) << -1;
- QTest::newRow("short+uint3") << QVariant::fromValue(short(1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("short+uint4") << QVariant::fromValue(short(1)) << QVariant::fromValue(1U) << 0;
-
- QTest::newRow("ushort+uint1") << QVariant::fromValue(ushort(0)) << QVariant::fromValue(0U) << 0;
- QTest::newRow("ushort+uint2") << QVariant::fromValue(ushort(0)) << QVariant::fromValue(1U) << -1;
- QTest::newRow("ushort+uint3") << QVariant::fromValue(ushort(1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("ushort+uint4") << QVariant::fromValue(ushort(1)) << QVariant::fromValue(1U) << 0;
-
- // int + qlonglong
- QTest::newRow("int+qlonglong1") << QVariant::fromValue(0) << QVariant::fromValue(Q_INT64_C(0)) << 0;
- QTest::newRow("int+qlonglong2") << QVariant::fromValue(1) << QVariant::fromValue(Q_INT64_C(0)) << +1;
- QTest::newRow("int+qlonglong3") << QVariant::fromValue(0) << QVariant::fromValue(Q_INT64_C(1)) << -1;
- QTest::newRow("int+qlonglong4") << QVariant::fromValue(1) << QVariant::fromValue(Q_INT64_C(1)) << 0;
- QTest::newRow("int+qlonglong5") << QVariant::fromValue(0) << QVariant::fromValue(Q_INT64_C(-1)) << +1;
- QTest::newRow("int+qlonglong6") << QVariant::fromValue(-1) << QVariant::fromValue(Q_INT64_C(0)) << -1;
- QTest::newRow("int+qlonglong7") << QVariant::fromValue(-1) << QVariant::fromValue(Q_INT64_C(-1)) << 0;
-
- // uint + qulonglong
- QTest::newRow("uint+qulonglong1") << QVariant::fromValue(0U) << QVariant::fromValue(Q_UINT64_C(0)) << 0;
- QTest::newRow("uint+qulonglong2") << QVariant::fromValue(1U) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("uint+qulonglong3") << QVariant::fromValue(0U) << QVariant::fromValue(Q_UINT64_C(1)) << -1;
- QTest::newRow("uint+qulonglong4") << QVariant::fromValue(1U) << QVariant::fromValue(Q_UINT64_C(1)) << 0;
-
- // int + uint (without sign change)
- QTest::newRow("int+uint1") << QVariant::fromValue(0) << QVariant::fromValue(0U) << 0;
- QTest::newRow("int+uint2") << QVariant::fromValue(1) << QVariant::fromValue(0U) << +1;
- QTest::newRow("int+uint3") << QVariant::fromValue(0) << QVariant::fromValue(1U) << -1;
- QTest::newRow("int+uint4") << QVariant::fromValue(1) << QVariant::fromValue(1U) << 0;
-
- // uint + qlonglong
- QTest::newRow("uint+qlonglong1") << QVariant::fromValue(0U) << QVariant::fromValue(Q_INT64_C(0)) << 0;
- QTest::newRow("uint+qlonglong2") << QVariant::fromValue(1U) << QVariant::fromValue(Q_INT64_C(0)) << +1;
- QTest::newRow("uint+qlonglong3") << QVariant::fromValue(0U) << QVariant::fromValue(Q_INT64_C(1)) << -1;
- QTest::newRow("uint+qlonglong4") << QVariant::fromValue(1U) << QVariant::fromValue(Q_INT64_C(1)) << 0;
- QTest::newRow("uint+qlonglong5") << QVariant::fromValue(0U) << QVariant::fromValue(Q_INT64_C(-1)) << +1;
-
- // boundary conditions
- QTest::newRow("charmax+intmax") << QVariant::fromValue(CHAR_MAX) << QVariant::fromValue(INT_MAX) << -1;
- QTest::newRow("charmax+uintmax") << QVariant::fromValue(CHAR_MAX) << QVariant::fromValue(UINT_MAX) << -1;
- QTest::newRow("scharmax+intmax") << QVariant::fromValue(SCHAR_MAX) << QVariant::fromValue(INT_MAX) << -1;
- QTest::newRow("scharmax+uintmax") << QVariant::fromValue(SCHAR_MAX) << QVariant::fromValue(UINT_MAX) << -1;
- QTest::newRow("ucharmax+intmax") << QVariant::fromValue(UCHAR_MAX) << QVariant::fromValue(INT_MAX) << -1;
- QTest::newRow("ucharmax+uintmax") << QVariant::fromValue(UCHAR_MAX) << QVariant::fromValue(UINT_MAX) << -1;
- QTest::newRow("shortmax+intmax") << QVariant::fromValue(SHRT_MAX) << QVariant::fromValue(INT_MAX) << -1;
- QTest::newRow("shortmax+uintmax") << QVariant::fromValue(SHRT_MAX) << QVariant::fromValue(UINT_MAX) << -1;
- QTest::newRow("ushortmax+intmax") << QVariant::fromValue(USHRT_MAX) << QVariant::fromValue(INT_MAX) << -1;
- QTest::newRow("ushortmax+uintmax") << QVariant::fromValue(USHRT_MAX) << QVariant::fromValue(UINT_MAX) << -1;
-
- QTest::newRow("intmin+qlonglongmin") << QVariant::fromValue(INT_MIN) << QVariant::fromValue(LLONG_MIN) << +1;
- QTest::newRow("intmax+uintmax") << QVariant::fromValue(INT_MAX) << QVariant::fromValue(UINT_MAX) << -1;
- QTest::newRow("intmax+qlonglongmax") << QVariant::fromValue(INT_MAX) << QVariant::fromValue(LLONG_MAX) << -1;
- QTest::newRow("uintmax+qlonglongmax") << QVariant::fromValue(UINT_MAX) << QVariant::fromValue(LLONG_MAX) << -1;
- QTest::newRow("intmax+qulonglongmax") << QVariant::fromValue(INT_MAX) << QVariant::fromValue(ULLONG_MAX) << -1;
- QTest::newRow("qlonglongmax+qulonglongmax") << QVariant::fromValue(LLONG_MAX) << QVariant::fromValue(ULLONG_MAX) << -1;
- QTest::newRow("uintmax+qlonglongmin") << QVariant::fromValue(UINT_MAX) << QVariant::fromValue(LLONG_MIN) << +1;
-
- // check for no sign-extension issues
- QTest::newRow("ushortmax+intzero") << QVariant::fromValue(USHRT_MAX) << QVariant::fromValue(0) << +1;
- QTest::newRow("ushortmax+qlonglongzero") << QVariant::fromValue(USHRT_MAX) << QVariant::fromValue(Q_INT64_C(0)) << +1;
- QTest::newRow("uintmax+qlonglongzero") << QVariant::fromValue(UINT_MAX) << QVariant::fromValue(Q_INT64_C(0)) << +1;
-
- // sign changes
- // the tests below check that a signed negative number sign-changes to a non-zero unsigned number and that
- // signed -1 sign-changes to unsigned maximum (all bits set, ~0). This works on two's complement machines
- // (all that Qt supports), and would also work on one's complement.
- if (std::numeric_limits<char>::is_signed) {
- QTest::newRow("signchange-char+uint") << QVariant::fromValue(char(-1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-char+uintmax") << QVariant::fromValue(char(-1)) << QVariant::fromValue(UINT_MAX) << 0;
- QTest::newRow("signchange-charmin+uint") << QVariant::fromValue(CHAR_MIN) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-char+qulonglong") << QVariant::fromValue(char(-1)) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-char+qulonglongmax") << QVariant::fromValue(char(-1)) << QVariant::fromValue(ULLONG_MAX) << 0;
- QTest::newRow("signchange-charmin+qulonglong") << QVariant::fromValue(CHAR_MIN) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- }
- QTest::newRow("signchange-schar+uint") << QVariant::fromValue(schar(-1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-schar+uintmax") << QVariant::fromValue(schar(-1)) << QVariant::fromValue(UINT_MAX) << 0;
- QTest::newRow("signchange-scharmin+uint") << QVariant::fromValue(SCHAR_MIN) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-schar+qulonglong") << QVariant::fromValue(schar(-1)) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-schar+qulonglongmax") << QVariant::fromValue(schar(-1)) << QVariant::fromValue(ULLONG_MAX) << 0;
- QTest::newRow("signchange-scharmin+qulonglong") << QVariant::fromValue(SCHAR_MIN) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-short+uint") << QVariant::fromValue(short(-1)) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-short+uintmax") << QVariant::fromValue(short(-1)) << QVariant::fromValue(UINT_MAX) << 0;
- QTest::newRow("signchange-shortmin+uint") << QVariant::fromValue(SHRT_MIN) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-short+qulonglong") << QVariant::fromValue(short(-1)) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-short+qulonglongmax") << QVariant::fromValue(short(-1)) << QVariant::fromValue(ULLONG_MAX) << 0;
- QTest::newRow("signchange-shortmin+qulonglong") << QVariant::fromValue(SHRT_MIN) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-int+uint") << QVariant::fromValue(-1) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-int+uintmax") << QVariant::fromValue(-1) << QVariant::fromValue(UINT_MAX) << 0;
- QTest::newRow("signchange-intmin+uint") << QVariant::fromValue(INT_MIN) << QVariant::fromValue(0U) << +1;
- QTest::newRow("signchange-int+qulonglong") << QVariant::fromValue(-1) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-int+qulonglongmax") << QVariant::fromValue(-1) << QVariant::fromValue(ULLONG_MAX) << 0;
- QTest::newRow("signchange-intmin+qulonglong") << QVariant::fromValue(INT_MIN) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- // no qlonglong+uint, since that should promote to qlonglong and then the comparison is signed (tested above)
- QTest::newRow("signchange-qlonglong+qulonglong") << QVariant::fromValue(Q_INT64_C(-1)) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
- QTest::newRow("signchange-qlonglong+qulonglongmax") << QVariant::fromValue(Q_INT64_C(-1)) << QVariant::fromValue(ULLONG_MAX) << 0;
- QTest::newRow("signchange-qlonglongmin+qulonglong") << QVariant::fromValue(LLONG_MIN) << QVariant::fromValue(Q_UINT64_C(0)) << +1;
-}
-
-void tst_QVariant::compareNumbers() const
-{
- QFETCH(QVariant, v1);
- QFETCH(QVariant, v2);
- QFETCH(int, expected);
-
- if (expected == -1) {
- QVERIFY(v1 < v2);
- QVERIFY(v1 <= v2);
- QVERIFY(!(v1 == v2));
- QVERIFY(!(v1 > v2));
- QVERIFY(!(v1 >= v2));
-
- QVERIFY(!(v2 < v1));
- QVERIFY(!(v2 <= v1));
- QVERIFY(!(v2 == v1));
- QVERIFY(v2 >= v1);
- QVERIFY(v2 > v1);
- } else if (expected == 0) {
- QVERIFY(!(v1 < v2));
- QVERIFY(v1 <= v2);
- QCOMPARE(v1, v2);
- QVERIFY(!(v1 > v2));
- QVERIFY(v1 >= v2);
-
- QVERIFY(!(v2 < v1));
- QVERIFY(v2 <= v1);
- QCOMPARE(v2, v1);
- QVERIFY(v2 >= v1);
- QVERIFY(!(v2 > v1));
- } else if (expected == +1) {
- QVERIFY(!(v1 < v2));
- QVERIFY(!(v1 <= v2));
- QVERIFY(!(v1 == v2));
- QVERIFY(v1 > v2);
- QVERIFY(v1 >= v2);
-
- QVERIFY(v2 < v1);
- QVERIFY(v2 <= v1);
- QVERIFY(!(v2 == v1));
- QVERIFY(!(v2 >= v1));
- QVERIFY(!(v2 > v1));
- } else {
- // unorderable (NaN)
- QVERIFY(!(v1 == v2));
- }
-}
-
void tst_QVariant::typeName_data()
{
QTest::addColumn<int>("type");
@@ -2624,16 +2277,6 @@ void tst_QVariant::variantMap()
QCOMPARE(qvariant_cast<QVariantMap>(v3).value("test").toInt(), 42);
QCOMPARE(v, QVariant(v.toHash()));
-
- // multi-keys
- map.insertMulti("test", 47);
- v = map;
- map2 = qvariant_cast<QVariantMap>(v);
- QCOMPARE(map2, map);
- map2 = v.toMap();
- QCOMPARE(map2, map);
-
- QCOMPARE(v, QVariant(v.toHash()));
}
void tst_QVariant::variantHash()
@@ -2657,16 +2300,6 @@ void tst_QVariant::variantHash()
QCOMPARE(qvariant_cast<QVariantHash>(v3).value("test").toInt(), 42);
QCOMPARE(v, QVariant(v.toMap()));
-
- // multi-keys
- hash.insertMulti("test", 47);
- v = hash;
- hash2 = qvariant_cast<QVariantHash>(v);
- QCOMPARE(hash2, hash);
- hash2 = v.toHash();
- QCOMPARE(hash2, hash);
-
- QCOMPARE(v, QVariant(v.toMap()));
}
class CustomQObject : public QObject {
@@ -3203,7 +2836,7 @@ void tst_QVariant::loadUnknownUserType()
void tst_QVariant::loadBrokenUserType()
{
- QTest::ignoreMessage(QtWarningMsg, "Trying to construct an instance of an invalid type, type id: 127");
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type"));
char data[] = {0, 0, 0, 127, 0 };
QByteArray ba(data, sizeof(data));
@@ -3408,7 +3041,7 @@ void tst_QVariant::convertIterables() const
QCOMPARE(QVariant::fromValue(map).value<QVariantHash>().count(), map.count());
QCOMPARE(QVariant::fromValue(map).value<QVariantMap>().count(), map.count());
- map.insertMulti("3", 5);
+ map.insert("4", 5);
QCOMPARE(QVariant::fromValue(map).value<QVariantHash>().count(), map.count());
QCOMPARE(QVariant::fromValue(map).value<QVariantMap>().count(), map.count());
}
@@ -3418,7 +3051,7 @@ void tst_QVariant::convertIterables() const
QCOMPARE(QVariant::fromValue(map).value<QVariantHash>().count(), map.count());
QCOMPARE(QVariant::fromValue(map).value<QVariantMap>().count(), map.count());
- map.insertMulti("3", 5);
+ map.insert("4", 5);
QCOMPARE(QVariant::fromValue(map).value<QVariantHash>().count(), map.count());
QCOMPARE(QVariant::fromValue(map).value<QVariantMap>().count(), map.count());
}
@@ -3428,7 +3061,7 @@ void tst_QVariant::convertIterables() const
QCOMPARE(QVariant::fromValue(hash).value<QVariantHash>().count(), hash.count());
QCOMPARE(QVariant::fromValue(hash).value<QVariantMap>().count(), hash.count());
- hash.insertMulti("3", 5);
+ hash.insert("4", 5);
QCOMPARE(QVariant::fromValue(hash).value<QVariantHash>().count(), hash.count());
QCOMPARE(QVariant::fromValue(hash).value<QVariantMap>().count(), hash.count());
}
@@ -3438,7 +3071,7 @@ void tst_QVariant::convertIterables() const
QCOMPARE(QVariant::fromValue(hash).value<QVariantHash>().count(), hash.count());
QCOMPARE(QVariant::fromValue(hash).value<QVariantMap>().count(), hash.count());
- hash.insertMulti("3", 5);
+ hash.insert("4", 5);
QCOMPARE(QVariant::fromValue(hash).value<QVariantHash>().count(), hash.count());
QCOMPARE(QVariant::fromValue(hash).value<QVariantMap>().count(), hash.count());
}
@@ -3884,13 +3517,6 @@ void tst_QVariant::moreCustomTypes()
data << (QSet<int>() << 42);
PLAY_WITH_VARIANT(data, false, QString(), 0, false);
}
-
- {
- QList<QLinkedList<int> > data;
- PLAY_WITH_VARIANT(data, false, QString(), 0, false);
- data << (QLinkedList<int>() << 42);
- PLAY_WITH_VARIANT(data, false, QString(), 0, false);
- }
}
void tst_QVariant::movabilityTest()
@@ -3963,8 +3589,7 @@ Q_DECLARE_METATYPE(Convertible);
struct BigConvertible {
double d;
- double dummy;
- double dummy2;
+ double dummy[sizeof(QVariant) / sizeof(double)];
operator int() const { return (int)d; }
operator double() const { return d; }
operator QString() const { return QString::number(d); }
@@ -4865,86 +4490,6 @@ void tst_QVariant::metaEnums()
METAENUMS_TEST(MetaEnumTest_Enum8_value);
}
-void tst_QVariant::compareSanity_data()
-{
- QTest::addColumn<QVariant>("value1");
- QTest::addColumn<QVariant>("value2");
-
- QTest::newRow( "int <>/== QUrl" ) << QVariant( 97 ) << QVariant(QUrl("a"));
- QTest::newRow( "int <>/== QChar" ) << QVariant( 97 ) << QVariant(QChar('a'));
- QTest::newRow( "int <>/== QString" ) << QVariant( 97 ) << QVariant(QString("a"));
- QTest::newRow( "QUrl <>/== QChar" ) << QVariant(QUrl("a")) << QVariant(QChar('a'));
- QTest::newRow( "QUrl <>/== QString" ) << QVariant(QUrl("a")) << QVariant(QString("a"));
- QTest::newRow( "QChar <>/== QString" ) << QVariant(QChar('a')) << QVariant(QString("a"));
-}
-
-void tst_QVariant::compareSanity()
-{
- QFETCH(QVariant, value1);
- QFETCH(QVariant, value2);
-
- if (value1 == value2) {
- QVERIFY(!(value1 < value2) && !(value1 > value2));
- } else {
- QVERIFY(value1 != value2);
- QVERIFY((value1 < value2) || (value1 > value2));
- }
-}
-
-static void richComparison(const QVariant& less, const QVariant& more)
-{
- QVERIFY(less.type() == more.type());
-
- QVERIFY(less < more);
- QVERIFY(!(more < less));
-
- QVERIFY(more > less);
- QVERIFY(!(less > more));
-
- QVERIFY(less <= more);
- QVERIFY(!(more <= less));
- QVERIFY(less <= less);
-
- QVERIFY(more >= less);
- QVERIFY(!(less >= more));
- QVERIFY(more >= more);
-}
-
-void tst_QVariant::compareRich()
-{
- richComparison(QUuid("{49d8ad2a-2ee8-4c3d-949f-1b5a3765ddf0}"),
- QUuid("{f6d56824-16e9-4543-a375-add2877c2d05}"));
- richComparison(QByteArray::fromRawData("a", 1),
- QByteArray::fromRawData("b", 1));
- richComparison(QStringLiteral("a"), QStringLiteral("b"));
- richComparison(QLatin1String("a"), QLatin1String("b"));
- richComparison(QChar('a'), QChar('b'));
- richComparison(QDate(2016, 7, 23), QDate(2016, 7, 24));
- richComparison(QTime(0, 0), QTime(0, 1));
- richComparison(QDateTime(QDate(2016, 7, 23), QTime(0, 0)),
- QDateTime(QDate(2016, 7, 23), QTime(0, 1)));
-
- richComparison(QStringList(), QStringList() << QStringLiteral("a"));
- richComparison(QStringList(), QStringList() << QStringLiteral("a")
- << QStringLiteral("b"));
- richComparison(QStringList() << QStringLiteral("a"),
- QStringList() << QStringLiteral("b"));
- richComparison(QStringList() << QStringLiteral("a"),
- QStringList() << QStringLiteral("b")
- << QStringLiteral("c"));
- richComparison(QStringList() << QStringLiteral("a")
- << QStringLiteral("c"),
- QStringList() << QStringLiteral("b"));
- richComparison(QStringList() << QStringLiteral("a")
- << QStringLiteral("c"),
- QStringList() << QStringLiteral("b")
- << QStringLiteral("d"));
- richComparison(QStringList() << QStringLiteral("a")
- << QStringLiteral("c"),
- QStringList() << QStringLiteral("a")
- << QStringLiteral("d"));
-}
-
void tst_QVariant::nullConvert()
{
// Test quirks with QVariants different types of null states.
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt b/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
new file mode 100644
index 0000000000..0f287a1652
--- /dev/null
+++ b/tests/auto/corelib/kernel/qwineventnotifier/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qwineventnotifier.pro.
+
+#####################################################################
+## tst_qwineventnotifier Test:
+#####################################################################
+
+add_qt_test(tst_qwineventnotifier
+ SOURCES
+ tst_qwineventnotifier.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/mimetypes/CMakeLists.txt b/tests/auto/corelib/mimetypes/CMakeLists.txt
new file mode 100644
index 0000000000..ea0463de36
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from mimetypes.pro.
+
+# special case begin
+if(FEATURE_private_tests)
+# special case end
+ add_subdirectory(qmimetype)
+ add_subdirectory(qmimedatabase)
+# special case begin
+endif()
+# special case end
+
+if(NOT QT_FEATURE_private_tests)
+ ### remove_subdirectory("qmimetype")
+endif()
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt
new file mode 100644
index 0000000000..6661952a68
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmimedatabase.pro.
+
+
+if(TARGET Qt::Concurrent)
+ add_subdirectory(qmimedatabase-xml)
+
+ if(UNIX AND NOT APPLE AND NOT QNX)
+ add_subdirectory(qmimedatabase-cache)
+ endif()
+endif()
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/.prev_CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9dc2ea18bf
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/.prev_CMakeLists.txt
@@ -0,0 +1,107 @@
+# Generated from qmimedatabase-cache.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qmimedatabase-cache Test:
+#####################################################################
+
+add_qt_test(tst_qmimedatabase-cache
+ SOURCES
+ ../tst_qmimedatabase.h
+ tst_qmimedatabase-cache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+# Resources:
+set_source_files_properties("/devel/work/qt-cmake/qtbase/src/corelib/mimetypes/mime/packages/freedesktop.org.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "freedesktop.org.xml"
+)
+set(mimetypes_resource_files
+ "mime/packages/freedesktop.org.xml"
+)
+
+add_qt_resource(tst_qmimedatabase-cache "mimetypes"
+ PREFIX
+ "/qt-project.org/qmime/packages"
+ BASE
+ "/devel/work/qt-cmake/qtbase/src/corelib/mimetypes"
+ FILES
+ ${mimetypes_resource_files}
+)
+set_source_files_properties("../invalid-magic1.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic1.xml"
+)
+set_source_files_properties("../invalid-magic2.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic2.xml"
+)
+set_source_files_properties("../invalid-magic3.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic3.xml"
+)
+set_source_files_properties("../magic-and-hierarchy.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.foo"
+)
+set_source_files_properties("../magic-and-hierarchy.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.xml"
+)
+set_source_files_properties("../magic-and-hierarchy2.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy2.foo"
+)
+set_source_files_properties("../qml-again.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "qml-again.xml"
+)
+set_source_files_properties("../test.qml"
+ PROPERTIES QT_RESOURCE_ALIAS "test.qml"
+)
+set_source_files_properties("../text-x-objcsrc.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "text-x-objcsrc.xml"
+)
+set_source_files_properties("../yast2-metapackage-handler-mimetypes.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "yast2-metapackage-handler-mimetypes.xml"
+)
+set(testdata_resource_files
+ "invalid-magic1.xml"
+ "invalid-magic2.xml"
+ "invalid-magic3.xml"
+ "magic-and-hierarchy.foo"
+ "magic-and-hierarchy.xml"
+ "magic-and-hierarchy2.foo"
+ "qml-again.xml"
+ "test.qml"
+ "text-x-objcsrc.xml"
+ "yast2-metapackage-handler-mimetypes.xml"
+)
+
+add_qt_resource(tst_qmimedatabase-cache "testdata"
+ PREFIX
+ "/qt-project.org/qmime"
+ BASE
+ ".."
+ FILES
+ ${testdata_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qmimedatabase-cache.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmimedatabase-cache CONDITION GCC
+ COMPILE_OPTIONS
+ -W
+ -Wall
+ -Wextra
+ -Wno-long-long
+ -Wnon-virtual-dtor
+ -Wshadow
+)
+
+extend_target(tst_qmimedatabase-cache CONDITION UNIX AND NOT APPLE AND NOT QNX
+ DEFINES
+ USE_XDG_DATA_DIRS
+)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
new file mode 100644
index 0000000000..7720e4d18e
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
@@ -0,0 +1,103 @@
+# Generated from qmimedatabase-cache.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qmimedatabase-cache Test:
+#####################################################################
+
+add_qt_test(tst_qmimedatabase-cache
+ SOURCES
+ ../tst_qmimedatabase.h
+ tst_qmimedatabase-cache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+# Resources:
+# special case begin
+# the freedesktop resources are handled manually below via mimetypes_resources.cmake
+#set(mimetypes_resource_files
+ #"mime/packages/freedesktop.org.xml"
+#)
+# special case end
+set_source_files_properties("../invalid-magic1.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic1.xml"
+)
+set_source_files_properties("../invalid-magic2.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic2.xml"
+)
+set_source_files_properties("../invalid-magic3.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic3.xml"
+)
+set_source_files_properties("../magic-and-hierarchy.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.foo"
+)
+set_source_files_properties("../magic-and-hierarchy.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.xml"
+)
+set_source_files_properties("../magic-and-hierarchy2.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy2.foo"
+)
+set_source_files_properties("../qml-again.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "qml-again.xml"
+)
+set_source_files_properties("../test.qml"
+ PROPERTIES QT_RESOURCE_ALIAS "test.qml"
+)
+set_source_files_properties("../text-x-objcsrc.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "text-x-objcsrc.xml"
+)
+set_source_files_properties("../yast2-metapackage-handler-mimetypes.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "yast2-metapackage-handler-mimetypes.xml"
+)
+set(testdata_resource_files
+ "invalid-magic1.xml"
+ "invalid-magic2.xml"
+ "invalid-magic3.xml"
+ "magic-and-hierarchy.foo"
+ "magic-and-hierarchy.xml"
+ "magic-and-hierarchy2.foo"
+ "qml-again.xml"
+ "test.qml"
+ "text-x-objcsrc.xml"
+ "yast2-metapackage-handler-mimetypes.xml"
+)
+
+add_qt_resource(tst_qmimedatabase-cache "testdata"
+ PREFIX
+ "/qt-project.org/qmime"
+ BASE
+ ".."
+ FILES
+ ${testdata_resource_files}
+)
+
+# special case begin
+set(corelib_source_dir ../../../../../../src/corelib)
+include(${corelib_source_dir}/mimetypes/mimetypes_resources.cmake)
+corelib_add_mimetypes_resources(tst_qmimedatabase-cache)
+# special case end
+
+#### Keys ignored in scope 1:.:.:qmimedatabase-cache.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmimedatabase-cache CONDITION GCC
+ COMPILE_OPTIONS
+ -W
+ -Wall
+ -Wextra
+ -Wno-long-long
+ -Wnon-virtual-dtor
+ -Wshadow
+)
+
+extend_target(tst_qmimedatabase-cache CONDITION UNIX AND NOT APPLE AND NOT QNX
+ DEFINES
+ USE_XDG_DATA_DIRS
+)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/.prev_CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1672255d29
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/.prev_CMakeLists.txt
@@ -0,0 +1,107 @@
+# Generated from qmimedatabase-xml.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qmimedatabase-xml Test:
+#####################################################################
+
+add_qt_test(tst_qmimedatabase-xml
+ SOURCES
+ ../tst_qmimedatabase.h
+ tst_qmimedatabase-xml.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+# Resources:
+set_source_files_properties("/devel/work/qt-cmake/qtbase/src/corelib/mimetypes/mime/packages/freedesktop.org.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "freedesktop.org.xml"
+)
+set(mimetypes_resource_files
+ "mime/packages/freedesktop.org.xml"
+)
+
+add_qt_resource(tst_qmimedatabase-xml "mimetypes"
+ PREFIX
+ "/qt-project.org/qmime/packages"
+ BASE
+ "/devel/work/qt-cmake/qtbase/src/corelib/mimetypes"
+ FILES
+ ${mimetypes_resource_files}
+)
+set_source_files_properties("../invalid-magic1.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic1.xml"
+)
+set_source_files_properties("../invalid-magic2.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic2.xml"
+)
+set_source_files_properties("../invalid-magic3.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic3.xml"
+)
+set_source_files_properties("../magic-and-hierarchy.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.foo"
+)
+set_source_files_properties("../magic-and-hierarchy.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.xml"
+)
+set_source_files_properties("../magic-and-hierarchy2.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy2.foo"
+)
+set_source_files_properties("../qml-again.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "qml-again.xml"
+)
+set_source_files_properties("../test.qml"
+ PROPERTIES QT_RESOURCE_ALIAS "test.qml"
+)
+set_source_files_properties("../text-x-objcsrc.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "text-x-objcsrc.xml"
+)
+set_source_files_properties("../yast2-metapackage-handler-mimetypes.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "yast2-metapackage-handler-mimetypes.xml"
+)
+set(testdata_resource_files
+ "invalid-magic1.xml"
+ "invalid-magic2.xml"
+ "invalid-magic3.xml"
+ "magic-and-hierarchy.foo"
+ "magic-and-hierarchy.xml"
+ "magic-and-hierarchy2.foo"
+ "qml-again.xml"
+ "test.qml"
+ "text-x-objcsrc.xml"
+ "yast2-metapackage-handler-mimetypes.xml"
+)
+
+add_qt_resource(tst_qmimedatabase-xml "testdata"
+ PREFIX
+ "/qt-project.org/qmime"
+ BASE
+ ".."
+ FILES
+ ${testdata_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qmimedatabase-xml.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmimedatabase-xml CONDITION GCC
+ COMPILE_OPTIONS
+ -W
+ -Wall
+ -Wextra
+ -Wno-long-long
+ -Wnon-virtual-dtor
+ -Wshadow
+)
+
+extend_target(tst_qmimedatabase-xml CONDITION UNIX AND NOT APPLE AND NOT QNX
+ DEFINES
+ USE_XDG_DATA_DIRS
+)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
new file mode 100644
index 0000000000..cf8e349226
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
@@ -0,0 +1,103 @@
+# Generated from qmimedatabase-xml.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qmimedatabase-xml Test:
+#####################################################################
+
+add_qt_test(tst_qmimedatabase-xml
+ SOURCES
+ ../tst_qmimedatabase.h
+ tst_qmimedatabase-xml.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+)
+
+# Resources:
+# special case begin
+# the freedesktop resources are handled manually below via mimetypes_resources.cmake
+#set(mimetypes_resource_files
+ #"mime/packages/freedesktop.org.xml"
+#)
+# special case end
+set_source_files_properties("../invalid-magic1.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic1.xml"
+)
+set_source_files_properties("../invalid-magic2.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic2.xml"
+)
+set_source_files_properties("../invalid-magic3.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "invalid-magic3.xml"
+)
+set_source_files_properties("../magic-and-hierarchy.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.foo"
+)
+set_source_files_properties("../magic-and-hierarchy.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy.xml"
+)
+set_source_files_properties("../magic-and-hierarchy2.foo"
+ PROPERTIES QT_RESOURCE_ALIAS "magic-and-hierarchy2.foo"
+)
+set_source_files_properties("../qml-again.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "qml-again.xml"
+)
+set_source_files_properties("../test.qml"
+ PROPERTIES QT_RESOURCE_ALIAS "test.qml"
+)
+set_source_files_properties("../text-x-objcsrc.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "text-x-objcsrc.xml"
+)
+set_source_files_properties("../yast2-metapackage-handler-mimetypes.xml"
+ PROPERTIES QT_RESOURCE_ALIAS "yast2-metapackage-handler-mimetypes.xml"
+)
+set(testdata_resource_files
+ "invalid-magic1.xml"
+ "invalid-magic2.xml"
+ "invalid-magic3.xml"
+ "magic-and-hierarchy.foo"
+ "magic-and-hierarchy.xml"
+ "magic-and-hierarchy2.foo"
+ "qml-again.xml"
+ "test.qml"
+ "text-x-objcsrc.xml"
+ "yast2-metapackage-handler-mimetypes.xml"
+)
+
+add_qt_resource(tst_qmimedatabase-xml "testdata"
+ PREFIX
+ "/qt-project.org/qmime"
+ BASE
+ ".."
+ FILES
+ ${testdata_resource_files}
+)
+
+# special case begin
+set(corelib_source_dir ../../../../../../src/corelib)
+include(${corelib_source_dir}/mimetypes/mimetypes_resources.cmake)
+corelib_add_mimetypes_resources(tst_qmimedatabase-xml)
+# special case end
+
+#### Keys ignored in scope 1:.:.:qmimedatabase-xml.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmimedatabase-xml CONDITION GCC
+ COMPILE_OPTIONS
+ -W
+ -Wall
+ -Wextra
+ -Wno-long-long
+ -Wnon-virtual-dtor
+ -Wshadow
+)
+
+extend_target(tst_qmimedatabase-xml CONDITION UNIX AND NOT APPLE AND NOT QNX
+ DEFINES
+ USE_XDG_DATA_DIRS
+)
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index fd3cc18af5..60017d53fa 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -73,12 +73,12 @@ static inline QString testSuiteWarning()
str << "\nCannot find the shared-mime-info test suite\nstarting from: "
<< QDir::toNativeSeparators(QDir::currentPath()) << "\n"
"cd " << QDir::toNativeSeparators(QStringLiteral("tests/auto/corelib/mimetypes/qmimedatabase")) << "\n"
- "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-10.zip\n"
- "unzip Release-1-10.zip\n";
+ "wget https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/Release-1-10/shared-mime-info-Release-1-10.zip\n"
+ "unzip shared-mime-info-Release-1-10.zip\n";
#ifdef Q_OS_WIN
- str << "mkdir testfiles\nxcopy /s Release-1-10 s-m-i\n";
+ str << "mkdir testfiles\nxcopy /s shared-mime-info-Release-1-10 s-m-i\n";
#else
- str << "ln -s Release-1-10 s-m-i\n";
+ str << "ln -s shared-mime-info-Release-1-10 s-m-i\n";
#endif
return result;
}
diff --git a/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
new file mode 100644
index 0000000000..990835c86a
--- /dev/null
+++ b/tests/auto/corelib/mimetypes/qmimetype/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmimetype.pro.
+
+#####################################################################
+## tst_qmimetype Test:
+#####################################################################
+
+add_qt_test(tst_qmimetype
+ SOURCES
+ tst_qmimetype.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/plugin/CMakeLists.txt b/tests/auto/corelib/plugin/CMakeLists.txt
new file mode 100644
index 0000000000..710d471e8a
--- /dev/null
+++ b/tests/auto/corelib/plugin/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from plugin.pro.
+
+if(QT_BUILD_SHARED_LIBS)
+ add_subdirectory(qfactoryloader)
+endif()
+add_subdirectory(quuid)
+if(QT_FEATURE_library)
+ add_subdirectory(qpluginloader)
+ add_subdirectory(qlibrary)
+endif()
+if(QT_BUILD_SHARED_LIBS AND QT_FEATURE_library)
+ add_subdirectory(qplugin)
+endif()
diff --git a/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
new file mode 100644
index 0000000000..6263be15a2
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from qfactoryloader.pro.
+
+add_subdirectory(plugin1)
+add_subdirectory(plugin2)
+add_subdirectory(test)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
new file mode 100644
index 0000000000..940dcc2b09
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from plugin1.pro.
+
+#####################################################################
+## plugin1 Generic Library:
+#####################################################################
+
+add_cmake_library(plugin1
+ MODULE
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qfactoryloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ plugin1.cpp plugin1.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:plugin1.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 7:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+extend_target(plugin1 CONDITION NOT QT_FEATURE_library
+ DEFINES
+ QT_STATICPLUGIN
+)
+
+qt_autogen_tools_initial_setup(plugin1)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
new file mode 100644
index 0000000000..2df999c292
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from plugin2.pro.
+
+#####################################################################
+## plugin2 Generic Library:
+#####################################################################
+
+add_cmake_library(plugin2
+ MODULE
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qfactoryloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ plugin2.cpp plugin2.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:plugin2.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 7:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+extend_target(plugin2 CONDITION NOT QT_FEATURE_library
+ DEFINES
+ QT_STATICPLUGIN
+)
+
+qt_autogen_tools_initial_setup(plugin2)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..454b6c061a
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qfactoryloader Test:
+#####################################################################
+
+add_qt_test(tst_qfactoryloader
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../plugin1/plugininterface1.h
+ ../plugin2/plugininterface2.h
+ ../tst_qfactoryloader.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library
+ PUBLIC_LIBRARIES
+ # Remove: L
+ ../bin/
+ plugin1
+ plugin2
+)
+
+if(ANDROID)
+ # Resources:
+ set(qmake_libs_resource_files
+ ${CMAKE_CURRENT_BINARY_DIR}/../bin
+ )
+
+ add_qt_resource(tst_qfactoryloader "qmake_libs"
+ PREFIX
+ "android_test_data"
+ BASE
+ "${CMAKE_CURRENT_BINARY_DIR}/.."
+ FILES
+ ${qmake_libs_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
new file mode 100644
index 0000000000..d532eeeb4b
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
@@ -0,0 +1,68 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qfactoryloader Test:
+#####################################################################
+
+add_qt_test(tst_qfactoryloader
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../plugin1/plugininterface1.h
+ ../plugin2/plugininterface2.h
+ ../tst_qfactoryloader.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+# special case begin
+if (NOT QT_FEATURE_library)
+ target_link_directories(tst_qfactoryloader PRIVATE "${CMAKE_CURRENT_BINARY_DIR}../bin")
+endif()
+# special case end
+
+extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library
+ PUBLIC_LIBRARIES
+ # Remove: L
+ # special case begin
+ # this part is handled as a special case above
+ # ../bin/
+ # special case end
+)
+
+if(ANDROID)
+ # special case begin
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/../bin/libplugin1.so
+ PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY plugin1
+ )
+
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/../bin/libplugin2.so
+ PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY plugin2
+ )
+ # Resources:
+ if (ANDROID)
+ set(qmake_libs_resource_files
+ bin/libplugin1_${CMAKE_ANDROID_ARCH_ABI}.so
+ bin/libplugin2_${CMAKE_ANDROID_ARCH_ABI}.so
+ )
+ else()
+ set(qmake_libs_resource_files
+ bin/libplugin1.so
+ bin/libplugin2.so
+ )
+ endif()
+ # special case end
+
+ add_qt_resource(tst_qfactoryloader "qmake_libs"
+ PREFIX
+ "android_test_data"
+ BASE
+ "${CMAKE_CURRENT_BINARY_DIR}/.."
+ FILES
+ ${qmake_libs_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt
new file mode 100644
index 0000000000..c0faebc91d
--- /dev/null
+++ b/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from qlibrary.pro.
+
+add_subdirectory(lib)
+add_subdirectory(lib2)
+add_subdirectory(tst)
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6dbbd7a060
--- /dev/null
+++ b/tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from lib.pro.
+
+#####################################################################
+## mylib Generic Library:
+#####################################################################
+
+add_cmake_library(mylib
+ SHARED
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qlibrary"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ mylib.c
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qlibrary"
+
+## Scopes:
+#####################################################################
+
+extend_target(mylib CONDITION MSVC
+ DEFINES
+ WIN32_MSVC
+)
+
+#### Keys ignored in scope 4:.:.:lib.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/"
+
+#### Keys ignored in scope 5:.:.:lib.pro:else:
+# DESTDIR = "../release/"
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt
new file mode 100644
index 0000000000..f2de91635a
--- /dev/null
+++ b/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt
@@ -0,0 +1,43 @@
+# Generated from lib.pro.
+
+#####################################################################
+## mylib Generic Library:
+#####################################################################
+
+add_cmake_library(mylib
+ SHARED
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qlibrary"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ mylib.c
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+# special case begin
+set_target_properties(mylib PROPERTIES
+ VERSION 1.0.0
+ SOVERSION 1
+ C_VISIBILITY_PRESET "default"
+ CXX_VISIBILITY_PRESET "default"
+)
+# special case end
+
+#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qlibrary"
+
+## Scopes:
+#####################################################################
+
+extend_target(mylib CONDITION MSVC
+ DEFINES
+ WIN32_MSVC
+)
+
+#### Keys ignored in scope 4:.:.:lib.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/"
+
+#### Keys ignored in scope 5:.:.:lib.pro:else:
+# DESTDIR = "../release/"
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt
new file mode 100644
index 0000000000..716ad488d0
--- /dev/null
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt
@@ -0,0 +1,104 @@
+# Generated from lib2.pro.
+
+#####################################################################
+## mylib Generic Library:
+#####################################################################
+
+add_cmake_library(mylib2 # special case
+ SHARED
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}tst_qlibrary"
+ #OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ mylib.c
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+# special case begin
+# This test is very "annoying" to get working with CMake as it involves having
+# two targets with the same name on the parent scope, which is not possible with
+# CMake. Furthermore, on UNIX, this version of the library should override the
+# root symlink (libmylib.so) to point to version 2.
+# Since we can't build two targets with the same name and in the same directory,
+# we build mylib2 in it's own directory and manually copy and create the
+# symlinks in the parent directory.
+# Finally we also need to create a libmylib.so2 file in the parent directory.
+#
+set_target_properties(mylib2 PROPERTIES
+ OUTPUT_NAME mylib
+)
+set_target_properties(mylib2 PROPERTIES
+ VERSION 2.0.0
+ SOVERSION 2
+ C_VISIBILITY_PRESET "default"
+ CXX_VISIBILITY_PRESET "default"
+)
+if (UNIX)
+ add_dependencies(mylib2 mylib)
+ add_custom_command(TARGET mylib2 POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ $<TARGET_FILE:mylib2>
+ "${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ $<TARGET_FILE:mylib2>
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0"
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0"
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2"
+ COMMAND ${CMAKE_COMMAND} -E remove
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so"
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0"
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so"
+ COMMAND ${CMAKE_COMMAND} -E create_symlink
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0"
+ "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2"
+ )
+else() #Win32
+ add_custom_command(TARGET mylib2 POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ $<TARGET_FILE:mylib2>
+ "${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.dll"
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ $<TARGET_FILE:mylib2>
+ "${CMAKE_CURRENT_BINARY_DIR}/../mylib.dl2"
+ )
+endif()
+# special case end
+
+#### Keys ignored in scope 1:.:.:lib2.pro:<TRUE>:
+# INSTALLS = "target" "renamed_target"
+# QMAKE_POST_LINK = "$$member(QMAKE_POST_LINK, 0, -2)"
+# TEMPLATE = "lib"
+# VERSION = "2"
+# renamed_target.extra = "$$member(renamed_target.extra, 0, -2)"
+# renamed_target.path = "$$target.path"
+# target.path = "$$[QT_INSTALL_TESTS]$${QMAKE_DIR_SEP}tst_qlibrary"
+
+## Scopes:
+#####################################################################
+
+extend_target(mylib2 CONDITION MSVC # special case
+ DEFINES
+ WIN32_MSVC
+)
+
+#### Keys ignored in scope 3:.:.:lib2.pro:WIN32:
+# DESTDIR = "../$$BUILD_FOLDER/"
+# files = "$$BUILD_FOLDER$${QMAKE_DIR_SEP}mylib.dl2" "$$BUILD_FOLDER$${QMAKE_DIR_SEP}system.qt.test.mylib.dll"
+
+#### Keys ignored in scope 4:.:.:lib2.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# BUILD_FOLDER = "debug"
+
+#### Keys ignored in scope 5:.:.:lib2.pro:else:
+# BUILD_FOLDER = "release"
+
+#### Keys ignored in scope 6:.:.:lib2.pro:TEMPLATE___contains___vc._x_:
+# src = "$(TargetPath)"
+
+#### Keys ignored in scope 7:.:.:lib2.pro:else:
+# src = "$(DESTDIR_TARGET)"
+
+#### Keys ignored in scope 8:.:.:lib2.pro:else:
+# files = "libmylib.so2" "system.qt.test.mylib.so"
+# src = "$(DESTDIR)$(TARGET)"
diff --git a/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ac6515ba63
--- /dev/null
+++ b/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from tst.pro.
+
+#####################################################################
+## tst_qlibrary Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../library_path/invalid.so")
+
+add_qt_test(tst_qlibrary
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qlibrary.cpp
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(qmake_libs_resource_files
+ ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.prl
+ ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so
+ ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2
+ ${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so
+ )
+
+ add_qt_resource(tst_qlibrary "qmake_libs"
+ PREFIX
+ "android_test_data"
+ BASE
+ "${CMAKE_CURRENT_BINARY_DIR}/.."
+ FILES
+ ${qmake_libs_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt
new file mode 100644
index 0000000000..e6086a982f
--- /dev/null
+++ b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Generated from tst.pro.
+
+#####################################################################
+## tst_qlibrary Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../library_path/invalid.so")
+
+add_qt_test(tst_qlibrary
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qlibrary.cpp
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # special case begin
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so
+ PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY mylib
+ )
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2
+ ${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so
+ PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY mylib2
+ )
+ # special case end
+ # Resources:
+ set(qmake_libs_resource_files
+ # special case begin
+ #libmylib.prl
+ libmylib.so
+ libmylib.so2
+ system.qt.test.mylib.so
+ # special case end
+ )
+
+ add_qt_resource(tst_qlibrary "qmake_libs"
+ PREFIX
+ "android_test_data"
+ BASE
+ "${CMAKE_CURRENT_BINARY_DIR}/.."
+ FILES
+ ${qmake_libs_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7e6ccc966d
--- /dev/null
+++ b/tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from qplugin.pro.
+
+add_subdirectory(invalidplugin)
diff --git a/tests/auto/corelib/plugin/qplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
new file mode 100644
index 0000000000..b2829099aa
--- /dev/null
+++ b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qplugin.pro.
+
+add_subdirectory(invalidplugin)
+
+# special case begin
+add_subdirectory(debugplugin)
+add_subdirectory(releaseplugin)
+
+# The contents below are generated from ./tst_qplugin.pro
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ plugins/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qplugin
+ SOURCES
+ tst_qplugin.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ TESTDATA ${test_data}
+)
+
+target_compile_definitions(tst_qplugin PRIVATE CMAKE_BUILD=1)
+
+add_dependencies(tst_qplugin invalidplugin debugplugin releaseplugin)
+# special case end
diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt
new file mode 100644
index 0000000000..ab32e5e364
--- /dev/null
+++ b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from debugplugin.pro.
+
+#####################################################################
+## debugplugin Generic Library:
+#####################################################################
+
+add_cmake_library(debugplugin
+ MODULE
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:debugplugin.pro:<TRUE>:
+# TEMPLATE = "lib"
+
+qt_autogen_tools_initial_setup(debugplugin)
diff --git a/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt
new file mode 100644
index 0000000000..c3eb37d930
--- /dev/null
+++ b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from invalidplugin.pro.
+
+#####################################################################
+## invalidplugin Generic Library:
+#####################################################################
+
+add_cmake_library(invalidplugin
+ MODULE
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:invalidplugin.pro:<TRUE>:
+# TEMPLATE = "lib"
+
+qt_autogen_tools_initial_setup(invalidplugin)
diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt
new file mode 100644
index 0000000000..893386bc6b
--- /dev/null
+++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from releaseplugin.pro.
+
+#####################################################################
+## releaseplugin Generic Library:
+#####################################################################
+
+add_cmake_library(releaseplugin
+ MODULE
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:releaseplugin.pro:<TRUE>:
+# TEMPLATE = "lib"
+
+qt_autogen_tools_initial_setup(releaseplugin)
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
index aa85a7c35b..644b8b700d 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
@@ -81,6 +81,9 @@ void tst_QPlugin::loadDebugPlugin()
QObject *object = loader.instance();
QVERIFY(object != 0);
#else
+# if defined(CMAKE_BUILD) && defined(QT_NO_DEBUG)
+ QSKIP("Skipping test as it is not possible to disable build targets based on configuration with CMake");
+# endif
// loading a plugin is dependent on which lib we are running against
# if defined(QT_NO_DEBUG)
// release build, we cannot load debug plugins
@@ -111,6 +114,9 @@ void tst_QPlugin::loadReleasePlugin()
QObject *object = loader.instance();
QVERIFY(object != 0);
#else
+# if defined(CMAKE_BUILD) && !defined(QT_NO_DEBUG)
+ QSKIP("Skipping test as it is not possible to disable build targets based on configuration with CMake");
+# endif
// loading a plugin is dependent on which lib we are running against
# if defined(QT_NO_DEBUG)
// release build, we can load debug plugins
diff --git a/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt
new file mode 100644
index 0000000000..ba7d375e3b
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpluginloader.pro.
+
+add_subdirectory(lib)
+add_subdirectory(staticplugin)
+add_subdirectory(theplugin)
+add_subdirectory(tst)
+if(UNIX AND NOT ANDROID AND NOT APPLE)
+ add_subdirectory(almostplugin)
+endif()
+if(APPLE_OSX AND QT_FEATURE_private_tests AND TARGET Qt::Gui)
+ add_subdirectory(machtest)
+endif()
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5e42a1aef0
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from almostplugin.pro.
+
+#####################################################################
+## almostplugin Generic Library:
+#####################################################################
+
+add_cmake_library(almostplugin
+ MODULE
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ almostplugin.cpp almostplugin.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:almostplugin.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin"
+
+## Scopes:
+#####################################################################
+
+extend_target(almostplugin CONDITION GCC
+ LINK_OPTIONS
+ "--Wl,--no-undefined"
+)
+
+qt_autogen_tools_initial_setup(almostplugin)
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt
new file mode 100644
index 0000000000..5208a70c9d
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from almostplugin.pro.
+
+#####################################################################
+## almostplugin Generic Library:
+#####################################################################
+
+add_cmake_library(almostplugin
+ MODULE
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ almostplugin.cpp almostplugin.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:almostplugin.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin"
+
+## Scopes:
+#####################################################################
+
+qt_autogen_tools_initial_setup(almostplugin)
+# special case begin
+# We want the opposite of this
+#extend_target(almostplugin CONDITION GCC
+# LINK_OPTIONS
+# "--Wl,--no-undefined"
+#)
+# special case end
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..74945fc6d8
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from lib.pro.
+
+#####################################################################
+## tst_qpluginloaderlib Generic Library:
+#####################################################################
+
+add_cmake_library(tst_qpluginloaderlib
+ SHARED
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ mylib.c
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 7:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+extend_target(tst_qpluginloaderlib CONDITION MSVC
+ DEFINES
+ WIN32_MSVC
+)
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt
new file mode 100644
index 0000000000..8d723cf3ce
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from lib.pro.
+
+#####################################################################
+## tst_qpluginloaderlib Generic Library:
+#####################################################################
+
+add_cmake_library(tst_qpluginloaderlib
+ SHARED
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ mylib.c
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 7:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+extend_target(tst_qpluginloaderlib CONDITION MSVC
+ DEFINES
+ WIN32_MSVC
+)
+
+# special case begin
+set_target_properties(tst_qpluginloaderlib PROPERTIES
+ C_VISIBILITY_PRESET "default"
+ CXX_VISIBILITY_PRESET "default"
+)
+# special case end
diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt
new file mode 100644
index 0000000000..05cd044aa3
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Generated from machtest.pro.
+
diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..bfc30d7c1d
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from staticplugin.pro.
+
+#####################################################################
+## staticplugin Generic Library:
+#####################################################################
+
+add_cmake_library(staticplugin
+ STATIC
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ MOC_OPTIONS
+ "-M"
+ "ExtraMetaData=StaticPlugin"
+ "-M"
+ "ExtraMetaData=foo"
+)
+
+#### Keys ignored in scope 1:.:.:staticplugin.pro:<TRUE>:
+# TEMPLATE = "lib"
+
+qt_autogen_tools_initial_setup(staticplugin)
diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt
new file mode 100644
index 0000000000..fb9d365d74
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from staticplugin.pro.
+
+#####################################################################
+## staticplugin Generic Library:
+#####################################################################
+
+add_cmake_library(staticplugin
+ STATIC
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ MOC_OPTIONS
+ "-M"
+ "ExtraMetaData=StaticPlugin"
+ "-M"
+ "ExtraMetaData=foo"
+)
+
+#### Keys ignored in scope 1:.:.:staticplugin.pro:<TRUE>:
+# TEMPLATE = "lib"
+
+qt_autogen_tools_initial_setup(staticplugin)
+
+target_compile_definitions(staticplugin PRIVATE QT_STATICPLUGIN)
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt
new file mode 100644
index 0000000000..5389790fba
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from theplugin.pro.
+
+#####################################################################
+## theplugin Generic Library:
+#####################################################################
+
+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
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:theplugin.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 5:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+qt_autogen_tools_initial_setup(theplugin)
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8bef975168
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from tst.pro.
+
+#####################################################################
+## tst_qpluginloader Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../elftest")
+list(APPEND test_data "../machtest")
+
+add_qt_test(tst_qpluginloader
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../fakeplugin.cpp
+ ../theplugin/plugininterface.h
+ ../tst_qpluginloader.cpp
+ PUBLIC_LIBRARIES
+ staticplugin
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release
+ PUBLIC_LIBRARIES
+ # Remove: L../staticplugin/debug
+)
+
+extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug
+ PUBLIC_LIBRARIES
+ # Remove: L../staticplugin/release
+)
+
+extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release
+ PUBLIC_LIBRARIES
+ # Remove: L../staticplugin
+)
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt
new file mode 100644
index 0000000000..c1c0d4b02b
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt
@@ -0,0 +1,43 @@
+# Generated from tst.pro.
+
+#####################################################################
+## tst_qpluginloader Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../elftest")
+list(APPEND test_data "../machtest")
+
+add_qt_test(tst_qpluginloader
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../fakeplugin.cpp
+ ../theplugin/plugininterface.h
+ ../tst_qpluginloader.cpp
+ PUBLIC_LIBRARIES
+ staticplugin
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release
+ PUBLIC_LIBRARIES
+ # Remove: L../staticplugin/debug
+)
+
+extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug
+ PUBLIC_LIBRARIES
+ # Remove: L../staticplugin/release
+)
+
+extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release
+ PUBLIC_LIBRARIES
+ # Remove: L../staticplugin
+)
diff --git a/tests/auto/corelib/plugin/quuid/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/CMakeLists.txt
new file mode 100644
index 0000000000..91e75fe0ae
--- /dev/null
+++ b/tests/auto/corelib/plugin/quuid/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from quuid.pro.
+
+add_subdirectory(testProcessUniqueness)
+add_subdirectory(test)
diff --git a/tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c635f6479c
--- /dev/null
+++ b/tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_quuid Test:
+#####################################################################
+
+add_qt_test(tst_quuid
+ SOURCES
+ ../tst_quuid.cpp
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_quuid CONDITION APPLE
+ SOURCES
+ ../tst_quuid_darwin.mm
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+)
+
+#### Keys ignored in scope 4:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 6:.:.:test.pro:else:
+# DESTDIR = ".."
diff --git a/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt
new file mode 100644
index 0000000000..5707dfa5a1
--- /dev/null
+++ b/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_quuid Test:
+#####################################################################
+
+add_qt_test(tst_quuid
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ ../tst_quuid.cpp
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_quuid CONDITION APPLE
+ SOURCES
+ ../tst_quuid_darwin.mm
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+)
+
+#### Keys ignored in scope 4:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 6:.:.:test.pro:else:
+# DESTDIR = ".."
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt
new file mode 100644
index 0000000000..39ff85c466
--- /dev/null
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from testProcessUniqueness.pro.
+
+#####################################################################
+## testProcessUniqueness Binary:
+#####################################################################
+
+add_qt_executable(testProcessUniqueness
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_quuid/testProcessUniqueness"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/serialization/CMakeLists.txt b/tests/auto/corelib/serialization/CMakeLists.txt
new file mode 100644
index 0000000000..f6af7fa256
--- /dev/null
+++ b/tests/auto/corelib/serialization/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from serialization.pro.
+
+add_subdirectory(json)
+add_subdirectory(qcborstreamreader)
+add_subdirectory(qcborstreamwriter)
+add_subdirectory(qcborvalue)
+add_subdirectory(qcborvalue_json)
+add_subdirectory(qdatastream_core_pixmap)
+if(TARGET Qt::Gui)
+ add_subdirectory(qdatastream)
+endif()
+if(TARGET Qt::Network)
+ add_subdirectory(qtextstream)
+endif()
+if(TARGET Qt::Network AND TARGET Qt::Xml)
+ add_subdirectory(qxmlstream)
+endif()
diff --git a/tests/auto/corelib/serialization/json/CMakeLists.txt b/tests/auto/corelib/serialization/json/CMakeLists.txt
new file mode 100644
index 0000000000..b38b6223ed
--- /dev/null
+++ b/tests/auto/corelib/serialization/json/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from json.pro.
+
+#####################################################################
+## tst_json Test:
+#####################################################################
+
+add_qt_test(tst_json
+ SOURCES
+ tst_qtjson.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:json.pro:NOT ANDROID:
+# TESTDATA = "bom.json" "test.json" "test.bjson" "test3.json" "test2.json"
+
+if(ANDROID)
+ # Resources:
+ set(json_resource_files
+ "bom.json"
+ "test.bjson"
+ "test.json"
+ "test2.json"
+ "test3.json"
+ )
+
+ add_qt_resource(tst_json "json"
+ PREFIX
+ "/"
+ FILES
+ ${json_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
index 45f815f810..4c85482c6a 100644
--- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
@@ -52,6 +52,8 @@ private Q_SLOTS:
void testNumbers_3();
void testNumbers_4();
+ void testNumberComparisons();
+
void testObjectSimple();
void testObjectSmallKeys();
void testArraySimple();
@@ -218,26 +220,32 @@ void tst_QtJson::testNumbers()
{
int numbers[] = {
0,
- -1,
1,
+ 2,
+ -1,
+ -2,
+ (1<<25),
(1<<26),
(1<<27),
(1<<28),
+ -(1<<25),
-(1<<26),
-(1<<27),
-(1<<28),
(1<<26) - 1,
(1<<27) - 1,
(1<<28) - 1,
+ (1<<29) - 1,
-((1<<26) - 1),
-((1<<27) - 1),
- -((1<<28) - 1)
+ -((1<<28) - 1),
+ -((1<<29) - 1)
};
int n = sizeof(numbers)/sizeof(int);
QJsonArray array;
for (int i = 0; i < n; ++i)
- array.append((double)numbers[i]);
+ array.append(numbers[i]);
QByteArray serialized = QJsonDocument(array).toJson();
QJsonDocument json = QJsonDocument::fromJson(serialized);
@@ -246,8 +254,10 @@ void tst_QtJson::testNumbers()
QCOMPARE(array.size(), array2.size());
for (int i = 0; i < array.size(); ++i) {
QCOMPARE(array.at(i).type(), QJsonValue::Double);
+ QCOMPARE(array.at(i).toInt(), numbers[i]);
QCOMPARE(array.at(i).toDouble(), (double)numbers[i]);
QCOMPARE(array2.at(i).type(), QJsonValue::Double);
+ QCOMPARE(array2.at(i).toInt(), numbers[i]);
QCOMPARE(array2.at(i).toDouble(), (double)numbers[i]);
}
}
@@ -255,8 +265,10 @@ void tst_QtJson::testNumbers()
{
qint64 numbers[] = {
0,
- -1,
1,
+ 2,
+ -1,
+ -2,
(1ll<<54),
(1ll<<55),
(1ll<<56),
@@ -266,15 +278,21 @@ void tst_QtJson::testNumbers()
(1ll<<54) - 1,
(1ll<<55) - 1,
(1ll<<56) - 1,
+ (1ll<<57) - 1,
+ (1ll<<58) - 1,
+ (1ll<<59) + 1001,
-((1ll<<54) - 1),
-((1ll<<55) - 1),
- -((1ll<<56) - 1)
+ -((1ll<<56) - 1),
+ -((1ll<<57) - 1),
+ -((1ll<<58) - 1),
+ -((1ll<<59) + 1001),
};
int n = sizeof(numbers)/sizeof(qint64);
QJsonArray array;
for (int i = 0; i < n; ++i)
- array.append((double)numbers[i]);
+ array.append(QJsonValue(numbers[i]));
QByteArray serialized = QJsonDocument(array).toJson();
QJsonDocument json = QJsonDocument::fromJson(serialized);
@@ -283,8 +301,10 @@ void tst_QtJson::testNumbers()
QCOMPARE(array.size(), array2.size());
for (int i = 0; i < array.size(); ++i) {
QCOMPARE(array.at(i).type(), QJsonValue::Double);
+ QCOMPARE(array.at(i).toInteger(), numbers[i]);
QCOMPARE(array.at(i).toDouble(), (double)numbers[i]);
QCOMPARE(array2.at(i).type(), QJsonValue::Double);
+ QCOMPARE(array2.at(i).toInteger(), numbers[i]);
QCOMPARE(array2.at(i).toDouble(), (double)numbers[i]);
}
}
@@ -422,6 +442,46 @@ void tst_QtJson::testNumbers_4()
" -18446744073709552000\n"
"]\n";
QCOMPARE(json, expected);
+
+ QJsonArray array2;
+ array2 << QJsonValue(Q_INT64_C(+1000000000000000));
+ array2 << QJsonValue(Q_INT64_C(-1000000000000000));
+ array2 << QJsonValue(Q_INT64_C(+9007199254740992));
+ array2 << QJsonValue(Q_INT64_C(-9007199254740992));
+ array2 << QJsonValue(Q_INT64_C(+9223372036854775807));
+ array2 << QJsonValue(Q_INT64_C(-9223372036854775807));
+ const QByteArray json2(QJsonDocument(array2).toJson());
+ const QByteArray expected2 =
+ "[\n"
+ " 1000000000000000,\n"
+ " -1000000000000000,\n"
+ " 9007199254740992,\n"
+ " -9007199254740992,\n"
+ " 9223372036854775807,\n"
+ " -9223372036854775807\n"
+ "]\n";
+ QCOMPARE(json2, expected2);
+}
+
+void tst_QtJson::testNumberComparisons()
+{
+ // QJsonValues created using doubles only have double precision
+ QJsonValue llMinDbl(-9223372036854775807.0);
+ QJsonValue llMinPlus1Dbl(-9223372036854775806.0);
+ QCOMPARE(llMinDbl == llMinPlus1Dbl, -9223372036854775807.0 == -9223372036854775806.0); // true
+
+ // QJsonValues created using qint64 have full qint64 precision
+ QJsonValue llMin(Q_INT64_C(-9223372036854775807));
+ QJsonValue llMinPlus1(Q_INT64_C(-9223372036854775806));
+ QCOMPARE(llMin == llMinPlus1, Q_INT64_C(-9223372036854775807) == Q_INT64_C(-9223372036854775806)); // false
+
+ // The different storage formats should be able to compare as their C++ versions (all true)
+ QCOMPARE(llMin == llMinDbl, Q_INT64_C(-9223372036854775807) == -9223372036854775807.0);
+ QCOMPARE(llMinDbl == llMin, -9223372036854775807.0 == Q_INT64_C(-9223372036854775807));
+ QCOMPARE(llMinPlus1 == llMinPlus1Dbl, Q_INT64_C(-9223372036854775806) == -9223372036854775806.0);
+ QCOMPARE(llMinPlus1Dbl == llMinPlus1, -9223372036854775806.0 == Q_INT64_C(-9223372036854775806));
+ QCOMPARE(llMinPlus1 == llMinDbl, Q_INT64_C(-9223372036854775806) == -9223372036854775807.0);
+ QCOMPARE(llMinPlus1Dbl == llMin, -9223372036854775806.0 == Q_INT64_C(-9223372036854775807));
}
void tst_QtJson::testObjectSimple()
@@ -1162,8 +1222,8 @@ void tst_QtJson::fromVariant_data()
bool boolValue = true;
int intValue = -1;
uint uintValue = 1;
- long long longlongValue = -2;
- unsigned long long ulonglongValue = 2;
+ qlonglong longlongValue = -2;
+ qulonglong ulonglongValue = 2;
float floatValue = 3.3f;
double doubleValue = 4.4;
QString stringValue("str");
@@ -1209,7 +1269,7 @@ void tst_QtJson::fromVariant_data()
QTest::newRow("nullptr") << QVariant::fromValue(nullptr) << QJsonValue(QJsonValue::Null);
QTest::newRow("bool") << QVariant(boolValue) << QJsonValue(boolValue);
QTest::newRow("int") << QVariant(intValue) << QJsonValue(intValue);
- QTest::newRow("uint") << QVariant(uintValue) << QJsonValue(static_cast<double>(uintValue));
+ QTest::newRow("uint") << QVariant(uintValue) << QJsonValue(static_cast<qint64>(uintValue));
QTest::newRow("longlong") << QVariant(longlongValue) << QJsonValue(longlongValue);
QTest::newRow("ulonglong") << QVariant(ulonglongValue) << QJsonValue(static_cast<double>(ulonglongValue));
QTest::newRow("float") << QVariant(floatValue) << QJsonValue(floatValue);
diff --git a/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt b/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
new file mode 100644
index 0000000000..198cca8435
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborstreamreader/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qcborstreamreader.pro.
+
+#####################################################################
+## tst_qcborstreamreader Test:
+#####################################################################
+
+add_qt_test(tst_qcborstreamreader
+ SOURCES
+ tst_qcborstreamreader.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ INCLUDE_DIRECTORIES
+ ../../../../../src/3rdparty/tinycbor/src
+ ../../../../../src/3rdparty/tinycbor/tests/parser
+)
diff --git a/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt b/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
new file mode 100644
index 0000000000..9265df415e
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborstreamwriter/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qcborstreamwriter.pro.
+
+#####################################################################
+## tst_qcborstreamwriter Test:
+#####################################################################
+
+add_qt_test(tst_qcborstreamwriter
+ SOURCES
+ tst_qcborstreamwriter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ INCLUDE_DIRECTORIES
+ ../../../../../src/3rdparty/tinycbor/tests/encoder
+)
diff --git a/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt b/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
new file mode 100644
index 0000000000..66cb80c56a
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborvalue/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qcborvalue.pro.
+
+#####################################################################
+## tst_qcborvalue Test:
+#####################################################################
+
+add_qt_test(tst_qcborvalue
+ SOURCES
+ tst_qcborvalue.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ INCLUDE_DIRECTORIES
+ ../../../../../src/3rdparty/tinycbor/src
+ ../../../../../src/3rdparty/tinycbor/tests/parser
+)
diff --git a/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt b/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
new file mode 100644
index 0000000000..0346d2d0e0
--- /dev/null
+++ b/tests/auto/corelib/serialization/qcborvalue_json/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qcborvalue_json.pro.
+
+#####################################################################
+## tst_qcborvalue_json Test:
+#####################################################################
+
+add_qt_test(tst_qcborvalue_json
+ SOURCES
+ tst_qcborvalue_json.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+)
diff --git a/tests/auto/corelib/serialization/qcborvalue_json/tst_qcborvalue_json.cpp b/tests/auto/corelib/serialization/qcborvalue_json/tst_qcborvalue_json.cpp
index 56245a7173..76f2bb924a 100644
--- a/tests/auto/corelib/serialization/qcborvalue_json/tst_qcborvalue_json.cpp
+++ b/tests/auto/corelib/serialization/qcborvalue_json/tst_qcborvalue_json.cpp
@@ -97,9 +97,12 @@ void tst_QCborValue_Json::toVariant_data()
add(1, 1, 1);
add(-1, -1, -1);
add(0., 0., 0.);
+ add(2., 2., 2.);
add(1.25, 1.25, 1.25);
add(-1.25, -1.25, -1.25);
add("Hello", "Hello", "Hello");
+ add(std::numeric_limits<qint64>::max(), std::numeric_limits<qint64>::max(), std::numeric_limits<qint64>::max());
+ add(std::numeric_limits<qint64>::min(), std::numeric_limits<qint64>::min(), std::numeric_limits<qint64>::min());
// converts to string in JSON:
add(QByteArray("Hello"), QByteArray("Hello"), "SGVsbG8");
@@ -123,14 +126,6 @@ void tst_QCborValue_Json::toVariant_data()
<< QVariant(qQNaN())
<< QJsonValue();
- // large integral values lose precision in JSON
- QTest::newRow("Integer:max") << QCborValue(std::numeric_limits<qint64>::max())
- << QVariant(std::numeric_limits<qint64>::max())
- << QJsonValue(std::numeric_limits<qint64>::max());
- QTest::newRow("Integer:min") << QCborValue(std::numeric_limits<qint64>::min())
- << QVariant(std::numeric_limits<qint64>::min())
- << QJsonValue(std::numeric_limits<qint64>::min());
-
// empty arrays and maps
add(QCborArray(), QVariantList(), QJsonArray());
add(QCborMap(), QVariantMap(), QJsonObject());
@@ -257,6 +252,10 @@ void tst_QCborValue_Json::fromJson_data()
QTest::newRow("0") << QCborValue(0) << QJsonValue(0.);
QTest::newRow("1") << QCborValue(1) << QJsonValue(1);
QTest::newRow("1.5") << QCborValue(1.5) << QJsonValue(1.5);
+ QTest::newRow("Integer:max") << QCborValue(std::numeric_limits<qint64>::max())
+ << QJsonValue(std::numeric_limits<qint64>::max());
+ QTest::newRow("Integer:min") << QCborValue(std::numeric_limits<qint64>::min())
+ << QJsonValue(std::numeric_limits<qint64>::min());
QTest::newRow("string") << QCborValue("Hello") << QJsonValue("Hello");
QTest::newRow("array") << QCborValue(QCborValue::Array) << QJsonValue(QJsonValue::Array);
QTest::newRow("map") << QCborValue(QCborValue::Map) << QJsonValue(QJsonValue::Object);
diff --git a/tests/auto/corelib/serialization/qdatastream/.prev_CMakeLists.txt b/tests/auto/corelib/serialization/qdatastream/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1402aed9ab
--- /dev/null
+++ b/tests/auto/corelib/serialization/qdatastream/.prev_CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qdatastream.pro.
+
+#####################################################################
+## tst_qdatastream Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "datastream.q42")
+
+add_qt_test(tst_qdatastream
+ SOURCES
+ tst_qdatastream.cpp
+ DEFINES
+ -QT_NO_LINKED_LIST
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(testdata_resource_files
+ "datastream.q42"
+ )
+
+ add_qt_resource(tst_qdatastream "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt b/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt
new file mode 100644
index 0000000000..2bb2e842e8
--- /dev/null
+++ b/tests/auto/corelib/serialization/qdatastream/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qdatastream.pro.
+
+#####################################################################
+## tst_qdatastream Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "datastream.q42")
+
+add_qt_test(tst_qdatastream
+ SOURCES
+ tst_qdatastream.cpp
+ DEFINES
+ # -QT_NO_LINKED_LIST # special case remove
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(testdata_resource_files
+ "datastream.q42"
+ )
+
+ add_qt_resource(tst_qdatastream "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/corelib/serialization/qdatastream/qdatastream.pro b/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
index 469d689f3f..25f8b889a0 100644
--- a/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
+++ b/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
@@ -3,8 +3,6 @@ TARGET = tst_qdatastream
QT += testlib
SOURCES = tst_qdatastream.cpp
-DEFINES -= QT_NO_LINKED_LIST
-
TESTDATA += datastream.q42
android:!android-embedded {
diff --git a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
index aed84cb14e..d777d69d3c 100644
--- a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
@@ -121,9 +121,15 @@ private slots:
void stream_Map_data();
void stream_Map();
+ void stream_MultiMap_data();
+ void stream_MultiMap();
+
void stream_Hash_data();
void stream_Hash();
+ void stream_MultiHash_data();
+ void stream_MultiHash();
+
void stream_qint64_data();
void stream_qint64();
@@ -180,7 +186,7 @@ private slots:
void status_QHash_QMap();
- void status_QLinkedList_QList_QVector();
+ void status_QList_QVector();
void streamToAndFromQByteArray();
@@ -230,7 +236,9 @@ private:
void writeQRegularExpression(QDataStream *dev);
#endif
void writeMap(QDataStream* dev);
+ void writeMultiMap(QDataStream* dev);
void writeHash(QDataStream* dev);
+ void writeMultiHash(QDataStream* dev);
void writeqint64(QDataStream *s);
void writeQIcon(QDataStream *s);
void writeQEasingCurve(QDataStream *s);
@@ -262,7 +270,9 @@ private:
void readQRegularExpression(QDataStream *s);
#endif
void readMap(QDataStream *s);
+ void readMultiMap(QDataStream *s);
void readHash(QDataStream *s);
+ void readMultiHash(QDataStream *s);
void readqint64(QDataStream *s);
void readQIcon(QDataStream *s);
void readQEasingCurve(QDataStream *s);
@@ -650,16 +660,10 @@ static Map MapData(int index)
map.insert(2, "bbb");
map.insert(3, "cccccc");
break;
- case 2:
- map.insert(1, "a");
- map.insert(2, "one");
- map.insertMulti(2, "two");
- map.insertMulti(2, "three");
- map.insert(3, "cccccc");
}
return map;
}
-#define MAX_MAP_DATA 3
+#define MAX_MAP_DATA 2
void tst_QDataStream::stream_Map_data()
{
@@ -689,6 +693,60 @@ void tst_QDataStream::readMap(QDataStream *s)
QCOMPARE(S, test);
}
+typedef QMultiMap<int, QString> MultiMap;
+
+static MultiMap MultiMapData(int index)
+{
+ MultiMap map;
+
+ switch (index) {
+ case 0:
+ default:
+ break;
+ case 1:
+ map.insert(1, "a");
+ map.insert(2, "bbb");
+ map.insert(3, "cccccc");
+ break;
+ case 2:
+ map.insert(1, "a");
+ map.insert(2, "one");
+ map.insert(2, "two");
+ map.insert(2, "three");
+ map.insert(3, "cccccc");
+ }
+ return map;
+}
+#define MAX_MULTIMAP_DATA 3
+
+void tst_QDataStream::stream_MultiMap_data()
+{
+ stream_data(MAX_MULTIMAP_DATA);
+}
+
+void tst_QDataStream::stream_MultiMap()
+{
+ STREAM_IMPL(MultiMap);
+}
+
+void tst_QDataStream::writeMultiMap(QDataStream* s)
+{
+ MultiMap test(MultiMapData(dataIndex(QTest::currentDataTag())));
+ *s << test;
+ *s << test;
+}
+
+void tst_QDataStream::readMultiMap(QDataStream *s)
+{
+ MultiMap S;
+ MultiMap test(MultiMapData(dataIndex(QTest::currentDataTag())));
+
+ *s >> S;
+ QCOMPARE(S, test);
+ *s >> S;
+ QCOMPARE(S, test);
+}
+
// ************************************
typedef QHash<int, QString> Hash;
@@ -706,16 +764,10 @@ static Hash HashData(int index)
map.insert(2, "bbb");
map.insert(3, "cccccc");
break;
- case 2:
- map.insert(1, "a");
- map.insert(2, "one");
- map.insertMulti(2, "two");
- map.insertMulti(2, "three");
- map.insert(3, "cccccc");
}
return map;
}
-#define MAX_HASH_DATA 3
+#define MAX_HASH_DATA 2
void tst_QDataStream::stream_Hash_data()
{
@@ -745,6 +797,60 @@ void tst_QDataStream::readHash(QDataStream *s)
QCOMPARE(S, test);
}
+typedef QMultiHash<int, QString> MultiHash;
+
+static MultiHash MultiHashData(int index)
+{
+ MultiHash map;
+
+ switch (index) {
+ case 0:
+ default:
+ break;
+ case 1:
+ map.insert(1, "a");
+ map.insert(2, "bbb");
+ map.insert(3, "cccccc");
+ break;
+ case 2:
+ map.insert(1, "a");
+ map.insert(2, "one");
+ map.insert(2, "two");
+ map.insert(2, "three");
+ map.insert(3, "cccccc");
+ }
+ return map;
+}
+#define MAX_MULTIHASH_DATA 3
+
+void tst_QDataStream::stream_MultiHash_data()
+{
+ stream_data(MAX_HASH_DATA);
+}
+
+void tst_QDataStream::stream_MultiHash()
+{
+ STREAM_IMPL(MultiHash);
+}
+
+void tst_QDataStream::writeMultiHash(QDataStream* s)
+{
+ MultiHash test(MultiHashData(dataIndex(QTest::currentDataTag())));
+ *s << test;
+ *s << test;
+}
+
+void tst_QDataStream::readMultiHash(QDataStream *s)
+{
+ MultiHash S;
+ MultiHash test(MultiHashData(dataIndex(QTest::currentDataTag())));
+
+ *s >> S;
+ QCOMPARE(S, test);
+ *s >> S;
+ QCOMPARE(S, test);
+}
+
// ************************************
static QEasingCurve QEasingCurveData(int index)
@@ -2327,6 +2433,7 @@ void tst_QDataStream::setVersion()
QDataStream latest;
QFETCH(int, vers);
+#if QT_CONFIG(shortcut)
/*
Test QKeySequence.
*/
@@ -2351,6 +2458,7 @@ void tst_QDataStream::setVersion()
}
QCOMPARE(deadbeef, 0xDEADBEEF);
}
+#endif // QT_CONFIG(shortcut)
/*
Test QPalette.
@@ -3064,24 +3172,6 @@ void tst_QDataStream::status_QHash_QMap()
} \
} \
{ \
- LinkedList expectedLinkedList; \
- for (int i = 0; i < expectedList.count(); ++i) \
- expectedLinkedList << expectedList.at(i); \
- QByteArray ba = byteArray; \
- QDataStream stream(&ba, QIODevice::ReadOnly); \
- if (inTransaction) \
- stream.startTransaction(); \
- stream.setStatus(initialStatus); \
- stream >> linkedList; \
- QCOMPARE((int)stream.status(), (int)expectedStatus); \
- if (!inTransaction || stream.commitTransaction()) { \
- QCOMPARE(linkedList.size(), expectedLinkedList.size()); \
- QCOMPARE(linkedList, expectedLinkedList); \
- } else { \
- QVERIFY(linkedList.isEmpty()); \
- } \
- } \
- { \
Vector expectedVector; \
for (int i = 0; i < expectedList.count(); ++i) \
expectedVector << expectedList.at(i); \
@@ -3103,12 +3193,10 @@ void tst_QDataStream::status_QHash_QMap()
break; \
}
-void tst_QDataStream::status_QLinkedList_QList_QVector()
+void tst_QDataStream::status_QList_QVector()
{
- typedef QLinkedList<QString> LinkedList;
typedef QList<QString> List;
typedef QVector<QString> Vector;
- LinkedList linkedList;
List list;
Vector vector;
diff --git a/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt b/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt
new file mode 100644
index 0000000000..55e8c164e5
--- /dev/null
+++ b/tests/auto/corelib/serialization/qdatastream_core_pixmap/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdatastream_core_pixmap.pro.
+
+#####################################################################
+## tst_qdatastream_core_pixmap Test:
+#####################################################################
+
+add_qt_test(tst_qdatastream_core_pixmap
+ SOURCES
+ tst_qdatastream_core_pixmap.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt
new file mode 100644
index 0000000000..15798c963f
--- /dev/null
+++ b/tests/auto/corelib/serialization/qtextstream/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Generated from qtextstream.pro.
+
+add_subdirectory(test)
+add_subdirectory(stdinProcess)
+add_subdirectory(readAllStdinProcess)
+add_subdirectory(readLineStdinProcess)
diff --git a/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt
new file mode 100644
index 0000000000..f377c97c2d
--- /dev/null
+++ b/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from readAllStdinProcess.pro.
+
+#####################################################################
+## readAllStdinProcess Binary:
+#####################################################################
+
+add_qt_executable(readAllStdinProcess
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qtextstream/readAllStdinProcess"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt
new file mode 100644
index 0000000000..ae899e55df
--- /dev/null
+++ b/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from readLineStdinProcess.pro.
+
+#####################################################################
+## readLineStdinProcess Binary:
+#####################################################################
+
+add_qt_executable(readLineStdinProcess
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qtextstream/readLineStdinProcess"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt
new file mode 100644
index 0000000000..fed74b64c2
--- /dev/null
+++ b/tests/auto/corelib/serialization/qtextstream/stdinProcess/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from stdinProcess.pro.
+
+#####################################################################
+## stdinProcess Binary:
+#####################################################################
+
+add_qt_executable(stdinProcess
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qtextstream/stdinProcess"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt b/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt
new file mode 100644
index 0000000000..21ba0d47fb
--- /dev/null
+++ b/tests/auto/corelib/serialization/qtextstream/test/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qtextstream Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../rfc3261.txt")
+list(APPEND test_data "../shift-jis.txt")
+list(APPEND test_data "../task113817.txt")
+list(APPEND test_data "../qtextstream.qrc")
+list(APPEND test_data "../tst_qtextstream.cpp")
+list(APPEND test_data "../resources")
+list(APPEND test_data "../BLACKLIST")
+
+add_qt_test(tst_qtextstream
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../../../../../shared/emulationdetector.h
+ ../tst_qtextstream.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set_source_files_properties("../resources/big_endian/"
+ PROPERTIES QT_RESOURCE_ALIAS "resources/big_endian/"
+)
+set_source_files_properties("../resources/little_endian/"
+ PROPERTIES QT_RESOURCE_ALIAS "resources/little_endian/"
+)
+set(qtextstream_resource_files
+ "resources/big_endian/"
+ "resources/little_endian/"
+)
+
+add_qt_resource(tst_qtextstream "qtextstream"
+ PREFIX
+ "/tst_textstream/"
+ BASE
+ ".."
+ FILES
+ ${qtextstream_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextstream CONDITION builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
index 6381ce5ed0..6565924f58 100644
--- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -2449,8 +2449,8 @@ void tst_QTextStream::generateRealNumbersDataWrite()
QTest::newRow("0") << 0.0 << QByteArray("0") << QByteArray("0");
QTest::newRow("3.14") << 3.14 << QByteArray("3.14") << QByteArray("3.14");
QTest::newRow("-3.14") << -3.14 << QByteArray("-3.14") << QByteArray("-3.14");
- QTest::newRow("1.2e+10") << 1.2e+10 << QByteArray("1.2e+10") << QByteArray("1.2e+10");
- QTest::newRow("-1.2e+10") << -1.2e+10 << QByteArray("-1.2e+10") << QByteArray("-1.2e+10");
+ QTest::newRow("1.2e+10") << 1.2e+10 << QByteArray("1.2e+10") << QByteArray("1.2E+10");
+ QTest::newRow("-1.2e+10") << -1.2e+10 << QByteArray("-1.2e+10") << QByteArray("-1.2E+10");
QTest::newRow("12345") << 12345. << QByteArray("12345") << QByteArray("12,345");
}
diff --git a/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt b/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt
new file mode 100644
index 0000000000..0339b57c71
--- /dev/null
+++ b/tests/auto/corelib/serialization/qxmlstream/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qxmlstream.pro.
+
+#####################################################################
+## tst_qxmlstream Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "data")
+list(APPEND test_data "XML-Test-Suite")
+
+add_qt_test(tst_qxmlstream
+ SOURCES
+ tst_qxmlstream.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Xml
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/corelib/statemachine/CMakeLists.txt b/tests/auto/corelib/statemachine/CMakeLists.txt
new file mode 100644
index 0000000000..52c956cd03
--- /dev/null
+++ b/tests/auto/corelib/statemachine/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(qstate)
+
diff --git a/tests/auto/corelib/statemachine/qstate/CMakeLists.txt b/tests/auto/corelib/statemachine/qstate/CMakeLists.txt
new file mode 100644
index 0000000000..e269f7191a
--- /dev/null
+++ b/tests/auto/corelib/statemachine/qstate/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstate.pro.
+
+#####################################################################
+## tst_qstate Test:
+#####################################################################
+
+add_qt_test(tst_qstate
+ SOURCES
+ tst_qstate.cpp
+)
diff --git a/tests/auto/corelib/text/CMakeLists.txt b/tests/auto/corelib/text/CMakeLists.txt
new file mode 100644
index 0000000000..dd51385aa6
--- /dev/null
+++ b/tests/auto/corelib/text/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from text.pro.
+
+# add_subdirectory(qbytearray) # special case not ported
+add_subdirectory(qbytearraylist)
+# add_subdirectory(qbytearraymatcher) # special case not ported
+add_subdirectory(qbytedatabuffer)
+# add_subdirectory(qchar) # special case not ported
+# add_subdirectory(qcollator) # special case not ported
+# add_subdirectory(qlatin1string) # special case not ported
+# add_subdirectory(qlocale) # special case not ported
+add_subdirectory(qregexp)
+add_subdirectory(qregularexpression)
+# add_subdirectory(qstring) # special case not ported
+add_subdirectory(qstring_no_cast_from_bytearray)
+# add_subdirectory(qstringapisymmetry) # special case not ported
+# add_subdirectory(qstringbuilder) # special case not ported
+add_subdirectory(qstringiterator)
+add_subdirectory(qstringlist)
+add_subdirectory(qstringmatcher)
+add_subdirectory(qstringref)
+# add_subdirectory(qstringview) # special case not ported
+# add_subdirectory(qtextboundaryfinder) # special case not ported
diff --git a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
index 48dd7a241e..e3009a78fb 100644
--- a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
@@ -149,36 +149,17 @@ private slots:
void stdString();
};
-static const struct StaticByteArrays {
- struct Standard {
- QByteArrayData data;
- const char string[8];
- } standard;
- struct NotNullTerminated {
- QByteArrayData data;
- const char string[8];
- } notNullTerminated;
- struct Shifted {
- QByteArrayData data;
- const char dummy; // added to change offset of string
- const char string[8];
- } shifted;
- struct ShiftedNotNullTerminated {
- QByteArrayData data;
- const char dummy; // added to change offset of string
- const char string[8];
- } shiftedNotNullTerminated;
-
-} statics = {{Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER(4), "data"}
- ,{Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER(4), "dataBAD"}
- ,{Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(4, sizeof(QByteArrayData) + sizeof(char)), 0, "data"}
- ,{Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(4, sizeof(QByteArrayData) + sizeof(char)), 0, "dataBAD"}
- };
-
-static const QByteArrayDataPtr staticStandard = { const_cast<QByteArrayData *>(&statics.standard.data) };
-static const QByteArrayDataPtr staticNotNullTerminated = { const_cast<QByteArrayData *>(&statics.notNullTerminated.data) };
-static const QByteArrayDataPtr staticShifted = { const_cast<QByteArrayData *>(&statics.shifted.data) };
-static const QByteArrayDataPtr staticShiftedNotNullTerminated = { const_cast<QByteArrayData *>(&statics.shiftedNotNullTerminated.data) };
+static const QArrayData staticDataFlags = { Q_BASIC_ATOMIC_INITIALIZER(-1), QArrayData::StaticDataFlags, 0 };
+static const QByteArray::DataPointer staticStandard = {
+ static_cast<QTypedArrayData<char> *>(const_cast<QArrayData *>(&staticDataFlags)),
+ const_cast<char *>("data"),
+ 4
+};
+static const QByteArray::DataPointer staticNotNullTerminated = {
+ static_cast<QTypedArrayData<char> *>(const_cast<QArrayData *>(&staticDataFlags)),
+ const_cast<char *>("dataBAD"),
+ 4
+};
template <class T> const T &verifyZeroTermination(const T &t) { return t; }
@@ -186,11 +167,10 @@ QByteArray verifyZeroTermination(const QByteArray &ba)
{
// This test does some evil stuff, it's all supposed to work.
- QByteArray::DataPtr baDataPtr = const_cast<QByteArray &>(ba).data_ptr();
+ QByteArray::DataPointer baDataPtr = const_cast<QByteArray &>(ba).data_ptr();
// Skip if isStatic() or fromRawData(), as those offer no guarantees
- if (baDataPtr->ref.isStatic()
- || baDataPtr->offset != QByteArray().data_ptr()->offset)
+ if (baDataPtr->isStatic() || baDataPtr->flags() & QArrayData::RawDataType)
return ba;
int baSize = ba.size();
@@ -201,7 +181,7 @@ QByteArray verifyZeroTermination(const QByteArray &ba)
.arg(baTerminator, 2, 16, QChar('0')).toLatin1();
// Skip mutating checks on shared strings
- if (baDataPtr->ref.isShared())
+ if (baDataPtr->isShared())
return ba;
const char *baData = ba.constData();
@@ -253,11 +233,11 @@ void tst_QByteArray::qChecksum_data()
QTest::addColumn<uint>("checksum");
// Examples from ISO 14443-3
- QTest::newRow("1") << QByteArray("\x00\x00") << 2U << Qt::ChecksumItuV41 << 0x1EA0U;
- QTest::newRow("2") << QByteArray("\x12\x34") << 2U << Qt::ChecksumItuV41 << 0xCF26U;
- QTest::newRow("3") << QByteArray("\x00\x00\x00") << 3U << Qt::ChecksumIso3309 << 0xC6CCU;
- QTest::newRow("4") << QByteArray("\x0F\xAA\xFF") << 3U << Qt::ChecksumIso3309 << 0xD1FCU;
- QTest::newRow("5") << QByteArray("\x0A\x12\x34\x56") << 4U << Qt::ChecksumIso3309 << 0xF62CU;
+ QTest::newRow("1") << QByteArray("\x00\x00", 2) << 2U << Qt::ChecksumItuV41 << 0x1EA0U;
+ QTest::newRow("2") << QByteArray("\x12\x34", 2) << 2U << Qt::ChecksumItuV41 << 0xCF26U;
+ QTest::newRow("3") << QByteArray("\x00\x00\x00", 3) << 3U << Qt::ChecksumIso3309 << 0xC6CCU;
+ QTest::newRow("4") << QByteArray("\x0F\xAA\xFF", 3) << 3U << Qt::ChecksumIso3309 << 0xD1FCU;
+ QTest::newRow("5") << QByteArray("\x0A\x12\x34\x56", 4) << 4U << Qt::ChecksumIso3309 << 0xF62CU;
}
void tst_QByteArray::qChecksum()
@@ -267,6 +247,7 @@ void tst_QByteArray::qChecksum()
QFETCH(Qt::ChecksumType, standard);
QFETCH(uint, checksum);
+ QCOMPARE(data.length(), int(len));
if (standard == Qt::ChecksumIso3309) {
QCOMPARE(::qChecksum(data.constData(), len), static_cast<quint16>(checksum));
}
@@ -1054,9 +1035,7 @@ void tst_QByteArray::prependExtended_data()
QTest::addColumn<QByteArray>("array");
QTest::newRow("literal") << QByteArray(QByteArrayLiteral("data"));
QTest::newRow("standard") << QByteArray(staticStandard);
- QTest::newRow("shifted") << QByteArray(staticShifted);
QTest::newRow("notNullTerminated") << QByteArray(staticNotNullTerminated);
- QTest::newRow("shiftedNotNullTerminated") << QByteArray(staticShiftedNotNullTerminated);
QTest::newRow("non static data") << QByteArray("data");
QTest::newRow("from raw data") << QByteArray::fromRawData("data", 4);
QTest::newRow("from raw data not terminated") << QByteArray::fromRawData("dataBAD", 4);
@@ -2122,21 +2101,13 @@ void tst_QByteArray::repeated_data() const
<< QByteArray(staticStandard)
<< QByteArray("datadatadatadata")
<< 4;
- QTest::newRow("static shifted not null terminated")
- << QByteArray(staticShiftedNotNullTerminated)
- << QByteArray("datadatadatadata")
- << 4;
- QTest::newRow("static shifted")
- << QByteArray(staticShifted)
- << QByteArray("datadatadatadata")
- << 4;
}
void tst_QByteArray::byteRefDetaching() const
{
{
QByteArray str = "str";
- QByteArray copy;
+ QByteArray copy = str;
copy[0] = 'S';
QCOMPARE(str, QByteArray("str"));
@@ -2266,7 +2237,7 @@ void tst_QByteArray::movablity()
const int newSize = size + 2;
const bool newIsEmpty = false;
const bool newIsNull = false;
- const int newCapacity = 16;
+ const int newCapacity = memSpace.capacity();
// move back memSpace -> array
array.~QByteArray();
@@ -2301,8 +2272,7 @@ void tst_QByteArray::literals()
QVERIFY(str.length() == 4);
QVERIFY(str == "abcd");
- QVERIFY(str.data_ptr()->ref.isStatic());
- QVERIFY(str.data_ptr()->offset == sizeof(QByteArrayData));
+ QVERIFY(str.data_ptr()->isStatic());
const char *s = str.constData();
QByteArray str2 = str;
diff --git a/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt b/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt
new file mode 100644
index 0000000000..780216a38c
--- /dev/null
+++ b/tests/auto/corelib/text/qbytearraylist/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qbytearraylist.pro.
+
+#####################################################################
+## tst_qbytearraylist Test:
+#####################################################################
+
+add_qt_test(tst_qbytearraylist
+ SOURCES
+ tst_qbytearraylist.cpp
+)
diff --git a/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt b/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt
new file mode 100644
index 0000000000..c9cd01231b
--- /dev/null
+++ b/tests/auto/corelib/text/qbytedatabuffer/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qbytedatabuffer.pro.
+
+#####################################################################
+## tst_qbytedatabuffer Test:
+#####################################################################
+
+add_qt_test(tst_qbytedatabuffer
+ SOURCES
+ tst_qbytedatabuffer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index ec85a6c5c6..a70b07e389 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -59,6 +59,7 @@
#endif
Q_DECLARE_METATYPE(QLocale::FormatType)
+Q_DECLARE_METATYPE(QStringView)
class tst_QLocale : public QObject
{
@@ -95,6 +96,7 @@ private slots:
void long_long_conversion_extra();
void testInfAndNan();
void fpExceptions();
+ void negativeZero_data();
void negativeZero();
void dayOfWeek();
void dayOfWeek_data();
@@ -1060,8 +1062,8 @@ void tst_QLocale::doubleToString_data()
QTest::newRow("de_DE 3,4 f 1") << QString("de_DE") << QString("3,4") << 3.4 << 'f' << 1;
QTest::newRow("de_DE 3,4 f -") << QString("de_DE") << QString("3,4") << 3.4 << 'f' << shortest;
- QTest::newRow("de_DE 3,4 e 1") << QString("de_DE") << QString("3,4e+00") << 3.4 << 'e' << 1;
- QTest::newRow("de_DE 3,4 e -") << QString("de_DE") << QString("3,4e+00") << 3.4 << 'e' << shortest;
+ QTest::newRow("de_DE 3,4 e 1") << QString("de_DE") << QString("3,4E+00") << 3.4 << 'e' << 1;
+ QTest::newRow("de_DE 3,4 e -") << QString("de_DE") << QString("3,4E+00") << 3.4 << 'e' << shortest;
QTest::newRow("de_DE 3,4 g 2") << QString("de_DE") << QString("3,4") << 3.4 << 'g' << 2;
QTest::newRow("de_DE 3,4 g -") << QString("de_DE") << QString("3,4") << 3.4 << 'g' << shortest;
@@ -1081,8 +1083,8 @@ void tst_QLocale::doubleToString_data()
QTest::newRow("de_DE 0,035003945 f 9") << QString("de_DE") << QString("0,035003945") << 0.035003945 << 'f' << 9;
QTest::newRow("de_DE 0,035003945 f -") << QString("de_DE") << QString("0,035003945") << 0.035003945 << 'f' << shortest;
- QTest::newRow("de_DE 0,035003945 e 7") << QString("de_DE") << QString("3,5003945e-02") << 0.035003945 << 'e' << 7;
- QTest::newRow("de_DE 0,035003945 e -") << QString("de_DE") << QString("3,5003945e-02") << 0.035003945 << 'e' << shortest;
+ QTest::newRow("de_DE 0,035003945 e 7") << QString("de_DE") << QString("3,5003945E-02") << 0.035003945 << 'e' << 7;
+ QTest::newRow("de_DE 0,035003945 e -") << QString("de_DE") << QString("3,5003945E-02") << 0.035003945 << 'e' << shortest;
QTest::newRow("de_DE 0,035003945 g 8") << QString("de_DE") << QString("0,035003945") << 0.035003945 << 'g' << 8;
QTest::newRow("de_DE 0,035003945 g -") << QString("de_DE") << QString("0,035003945") << 0.035003945 << 'g' << shortest;
@@ -1102,10 +1104,10 @@ void tst_QLocale::doubleToString_data()
QTest::newRow("de_DE 0,000003945 f 9") << QString("de_DE") << QString("0,000003945") << 0.000003945 << 'f' << 9;
QTest::newRow("de_DE 0,000003945 f -") << QString("de_DE") << QString("0,000003945") << 0.000003945 << 'f' << shortest;
- QTest::newRow("de_DE 0,000003945 e 3") << QString("de_DE") << QString("3,945e-06") << 0.000003945 << 'e' << 3;
- QTest::newRow("de_DE 0,000003945 e -") << QString("de_DE") << QString("3,945e-06") << 0.000003945 << 'e' << shortest;
- QTest::newRow("de_DE 0,000003945 g 4") << QString("de_DE") << QString("3,945e-06") << 0.000003945 << 'g' << 4;
- QTest::newRow("de_DE 0,000003945 g -") << QString("de_DE") << QString("3,945e-06") << 0.000003945 << 'g' << shortest;
+ QTest::newRow("de_DE 0,000003945 e 3") << QString("de_DE") << QString("3,945E-06") << 0.000003945 << 'e' << 3;
+ QTest::newRow("de_DE 0,000003945 e -") << QString("de_DE") << QString("3,945E-06") << 0.000003945 << 'e' << shortest;
+ QTest::newRow("de_DE 0,000003945 g 4") << QString("de_DE") << QString("3,945E-06") << 0.000003945 << 'g' << 4;
+ QTest::newRow("de_DE 0,000003945 g -") << QString("de_DE") << QString("3,945E-06") << 0.000003945 << 'g' << shortest;
QTest::newRow("C 12456789012 f 3") << QString("C") << QString("12456789012.000") << 12456789012.0 << 'f' << 3;
QTest::newRow("C 12456789012 e 13") << QString("C") << QString("1.2456789012000e+10") << 12456789012.0 << 'e' << 13;
@@ -1122,8 +1124,8 @@ void tst_QLocale::doubleToString_data()
QTest::newRow("de_DE 12456789012 f 0") << QString("de_DE") << QString("12.456.789.012") << 12456789012.0 << 'f' << 0;
QTest::newRow("de_DE 12456789012 f -") << QString("de_DE") << QString("12.456.789.012") << 12456789012.0 << 'f' << shortest;
- QTest::newRow("de_DE 12456789012 e 10") << QString("de_DE") << QString("1,2456789012e+10") << 12456789012.0 << 'e' << 10;
- QTest::newRow("de_DE 12456789012 e -") << QString("de_DE") << QString("1,2456789012e+10") << 12456789012.0 << 'e' << shortest;
+ QTest::newRow("de_DE 12456789012 e 10") << QString("de_DE") << QString("1,2456789012E+10") << 12456789012.0 << 'e' << 10;
+ QTest::newRow("de_DE 12456789012 e -") << QString("de_DE") << QString("1,2456789012E+10") << 12456789012.0 << 'e' << shortest;
QTest::newRow("de_DE 12456789012 g 11") << QString("de_DE") << QString("12.456.789.012") << 12456789012.0 << 'g' << 11;
QTest::newRow("de_DE 12456789012 g -") << QString("de_DE") << QString("12.456.789.012") << 12456789012.0 << 'g' << shortest;
}
@@ -1422,13 +1424,32 @@ void tst_QLocale::fpExceptions()
#endif
}
+void tst_QLocale::negativeZero_data()
+{
+ QTest::addColumn<QLocale::Language>("language");
+ QTest::addColumn<QLocale::Script>("script");
+ QTest::addColumn<QLocale::Country>("territory");
+ QTest::addColumn<QStringView>("expect");
+
+ QTest::newRow("C")
+ << QLocale::C << QLocale::AnyScript << QLocale::AnyCountry
+ << QStringView(u"0");
+ QTest::newRow("Arabic")
+ << QLocale::Arabic << QLocale::ArabicScript << QLocale::AnyCountry
+ << QStringView(u"\u0660");
+ QTest::newRow("Chakma")
+ << QLocale::Chakma << QLocale::ChakmaScript << QLocale::AnyCountry
+ << QStringView(u"\xD804\xDD36"); // A surrogate pair.
+}
+
void tst_QLocale::negativeZero()
{
- double negativeZero( 0.0 ); // Initialise to zero.
- uchar *ptr = (uchar *)&negativeZero;
- ptr[QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 7] = 0x80;
- QString s = QString::number(negativeZero);
- QCOMPARE(s, QString("0"));
+ QFETCH(QLocale::Language, language);
+ QFETCH(QLocale::Script, script);
+ QFETCH(QLocale::Country, territory);
+ QFETCH(QStringView, expect);
+ QLocale locale(language, script, territory);
+ QCOMPARE(locale.toString(std::copysign(0.0, -1.0)), expect);
}
void tst_QLocale::dayOfWeek_data()
@@ -1900,15 +1921,14 @@ void tst_QLocale::macDefaultLocale()
// On OS X the decimal point and group separator are configurable
// independently of the locale. Verify that they have one of the
// allowed values and are not the same.
- QVERIFY(locale.decimalPoint() == QChar('.') || locale.decimalPoint() == QChar(','));
- if (!(locale.numberOptions() & QLocale::OmitGroupSeparator)) {
- QVERIFY(locale.groupSeparator() == QChar(',')
- || locale.groupSeparator() == QChar('.')
- || locale.groupSeparator() == QChar('\xA0') // no-breaking space
- || locale.groupSeparator() == QChar('\'')
- || locale.groupSeparator() == QChar());
- QVERIFY(locale.decimalPoint() != locale.groupSeparator());
- }
+ QVERIFY(locale.decimalPoint() == QStringView(u".")
+ || locale.decimalPoint() == QStringView(u","));
+ QVERIFY(locale.groupSeparator() == QStringView(u",")
+ || locale.groupSeparator() == QStringView(u".")
+ || locale.groupSeparator() == QStringView(u"\xA0") // no-breaking space
+ || locale.groupSeparator() == QStringView(u"'")
+ || locale.groupSeparator().isEmpty());
+ QVERIFY(locale.decimalPoint() != locale.groupSeparator());
// make sure we are using the system to parse them
QCOMPARE(locale.toString(1234.56), systemLocaleFormatNumber(QString("1,234.56")));
@@ -2049,8 +2069,8 @@ void tst_QLocale::windowsDefaultLocale()
QLocale locale = QLocale::system();
// make sure we are seeing the system's format strings
- QCOMPARE(locale.decimalPoint(), QChar('@'));
- QCOMPARE(locale.groupSeparator(), QChar('?'));
+ QCOMPARE(locale.decimalPoint(), QStringView(u"@"));
+ QCOMPARE(locale.groupSeparator(), QStringView(u"?"));
QCOMPARE(locale.dateFormat(QLocale::ShortFormat), shortDateFormat);
QCOMPARE(locale.dateFormat(QLocale::LongFormat), longDateFormat);
QCOMPARE(locale.timeFormat(QLocale::ShortFormat), shortTimeFormat);
diff --git a/tests/auto/corelib/text/qregexp/CMakeLists.txt b/tests/auto/corelib/text/qregexp/CMakeLists.txt
new file mode 100644
index 0000000000..e14979d7fe
--- /dev/null
+++ b/tests/auto/corelib/text/qregexp/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qregexp.pro.
+
+#####################################################################
+## tst_qregexp Test:
+#####################################################################
+
+add_qt_test(tst_qregexp
+ SOURCES
+ tst_qregexp.cpp
+)
diff --git a/tests/auto/corelib/text/qregularexpression/CMakeLists.txt b/tests/auto/corelib/text/qregularexpression/CMakeLists.txt
new file mode 100644
index 0000000000..b1ee1ff7de
--- /dev/null
+++ b/tests/auto/corelib/text/qregularexpression/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qregularexpression.pro.
+
+#####################################################################
+## tst_qregularexpression Test:
+#####################################################################
+
+add_qt_test(tst_qregularexpression
+ SOURCES
+ tst_qregularexpression.cpp
+)
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index 7072cb9516..2c02fb2264 100644
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -607,11 +607,10 @@ QString verifyZeroTermination(const QString &str)
{
// This test does some evil stuff, it's all supposed to work.
- QString::DataPtr strDataPtr = const_cast<QString &>(str).data_ptr();
+ QString::DataPointer strDataPtr = const_cast<QString &>(str).data_ptr();
// Skip if isStatic() or fromRawData(), as those offer no guarantees
- if (strDataPtr->ref.isStatic()
- || strDataPtr->offset != QString().data_ptr()->offset)
+ if (strDataPtr->isStatic() || !strDataPtr->isMutable())
return str;
int strSize = str.size();
@@ -622,7 +621,7 @@ QString verifyZeroTermination(const QString &str)
.arg(strTerminator.unicode(), 4, 16, QChar('0'));
// Skip mutating checks on shared strings
- if (strDataPtr->ref.isShared())
+ if (strDataPtr->isShared())
return str;
const QChar *strData = str.constData();
@@ -986,28 +985,6 @@ void tst_QString::acc_01()
f[7]='F';
QCOMPARE(text[7],'!');
- a="";
- a[0]='A';
- QCOMPARE(a, QLatin1String("A"));
- QCOMPARE(a.length(),1);
- a[1]='B';
- QCOMPARE(a, QLatin1String("AB"));
- QCOMPARE(a.length(),2);
- a[2]='C';
- QCOMPARE(a, QLatin1String("ABC"));
- QCOMPARE(a.length(),3);
- a = QString();
- QVERIFY(a.isNull());
- a[0]='A';
- QCOMPARE(a, QLatin1String("A"));
- QCOMPARE(a.length(),1);
- a[1]='B';
- QCOMPARE(a, QLatin1String("AB"));
- QCOMPARE(a.length(),2);
- a[2]='C';
- QCOMPARE(a, QLatin1String("ABC"));
- QCOMPARE(a.length(),3);
-
a="123";
b="456";
a[0]=a[1];
@@ -4110,8 +4087,9 @@ void tst_QString::setRawData()
QVERIFY(cstr.constData() == ptr);
QVERIFY(cstr == QString(ptr, 1));
+ QSKIP("This is currently not working.");
// This actually tests the recycling of the shared data object
- QString::DataPtr csd = cstr.data_ptr();
+ QString::DataPointer csd = cstr.data_ptr();
cstr.setRawData(ptr2, 1);
QVERIFY(cstr.isDetached());
QVERIFY(cstr.constData() == ptr2);
@@ -4955,13 +4933,14 @@ void tst_QString::arg()
void tst_QString::number()
{
- QCOMPARE( QString::number(int(0)), QLatin1String("0") );
- QCOMPARE( QString::number((unsigned int)(11)), QLatin1String("11") );
- QCOMPARE( QString::number(-22L), QLatin1String("-22") );
- QCOMPARE( QString::number(333UL), QLatin1String("333") );
- QCOMPARE( QString::number(4.4), QLatin1String("4.4") );
- QCOMPARE( QString::number(Q_INT64_C(-555)), QLatin1String("-555") );
- QCOMPARE( QString::number(Q_UINT64_C(6666)), QLatin1String("6666") );
+ QCOMPARE(QString::number(int(0)), QLatin1String("0"));
+ QCOMPARE(QString::number(std::copysign(0.0, -1.0)), QLatin1String("0"));
+ QCOMPARE(QString::number((unsigned int)(11)), QLatin1String("11"));
+ QCOMPARE(QString::number(-22L), QLatin1String("-22"));
+ QCOMPARE(QString::number(333UL), QLatin1String("333"));
+ QCOMPARE(QString::number(4.4), QLatin1String("4.4"));
+ QCOMPARE(QString::number(Q_INT64_C(-555)), QLatin1String("-555"));
+ QCOMPARE(QString::number(Q_UINT64_C(6666)), QLatin1String("6666"));
#ifndef QT_NO_DOUBLECONVERSION // snprintf_l is too stupid for this
QCOMPARE( QString::number(12.05, 'f', 1), QString("12.1") );
@@ -6463,7 +6442,7 @@ void tst_QString::QCharRefDetaching() const
{
{
QString str = QString::fromLatin1("str");
- QString copy;
+ QString copy = str;
copy[0] = QLatin1Char('S');
QCOMPARE(str, QString::fromLatin1("str"));
@@ -6684,8 +6663,7 @@ void tst_QString::literals()
QVERIFY(str.length() == 4);
QVERIFY(str == QLatin1String("abcd"));
- QVERIFY(str.data_ptr()->ref.isStatic());
- QVERIFY(str.data_ptr()->offset == sizeof(QStringData));
+ QVERIFY(str.data_ptr()->isStatic());
const QChar *s = str.constData();
QString str2 = str;
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
new file mode 100644
index 0000000000..d0285cce3c
--- /dev/null
+++ b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstring_no_cast_from_bytearray.pro.
+
+#####################################################################
+## tst_qstring_no_cast_from_bytearray Test:
+#####################################################################
+
+add_qt_test(tst_qstring_no_cast_from_bytearray
+ SOURCES
+ tst_qstring_no_cast_from_bytearray.cpp
+ DEFINES
+ QT_NO_CAST_FROM_BYTEARRAY
+)
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/CMakeLists.txt b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/CMakeLists.txt
new file mode 100644
index 0000000000..959f04f07e
--- /dev/null
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstringbuilder1.pro.
+
+#####################################################################
+## tst_qstringbuilder1 Test:
+#####################################################################
+
+add_qt_test(tst_qstringbuilder1
+ SOURCES
+ tst_qstringbuilder1.cpp
+)
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/CMakeLists.txt b/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/CMakeLists.txt
new file mode 100644
index 0000000000..ff9dfd4ce1
--- /dev/null
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstringbuilder2.pro.
+
+#####################################################################
+## tst_qstringbuilder2 Test:
+#####################################################################
+
+add_qt_test(tst_qstringbuilder2
+ SOURCES
+ tst_qstringbuilder2.cpp
+)
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/CMakeLists.txt b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/CMakeLists.txt
new file mode 100644
index 0000000000..810004cc7d
--- /dev/null
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstringbuilder3.pro.
+
+#####################################################################
+## tst_qstringbuilder3 Test:
+#####################################################################
+
+add_qt_test(tst_qstringbuilder3
+ SOURCES
+ tst_qstringbuilder3.cpp
+)
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/CMakeLists.txt b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/CMakeLists.txt
new file mode 100644
index 0000000000..1ad6d02418
--- /dev/null
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstringbuilder4.pro.
+
+#####################################################################
+## tst_qstringbuilder4 Test:
+#####################################################################
+
+add_qt_test(tst_qstringbuilder4
+ SOURCES
+ tst_qstringbuilder4.cpp
+)
diff --git a/tests/auto/corelib/text/qstringiterator/CMakeLists.txt b/tests/auto/corelib/text/qstringiterator/CMakeLists.txt
new file mode 100644
index 0000000000..e3388ee1b9
--- /dev/null
+++ b/tests/auto/corelib/text/qstringiterator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstringiterator.pro.
+
+#####################################################################
+## tst_qstringiterator Test:
+#####################################################################
+
+add_qt_test(tst_qstringiterator
+ SOURCES
+ tst_qstringiterator.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/text/qstringlist/CMakeLists.txt b/tests/auto/corelib/text/qstringlist/CMakeLists.txt
new file mode 100644
index 0000000000..aff8b59c15
--- /dev/null
+++ b/tests/auto/corelib/text/qstringlist/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstringlist.pro.
+
+#####################################################################
+## tst_qstringlist Test:
+#####################################################################
+
+add_qt_test(tst_qstringlist
+ SOURCES
+ tst_qstringlist.cpp
+)
diff --git a/tests/auto/corelib/text/qstringmatcher/CMakeLists.txt b/tests/auto/corelib/text/qstringmatcher/CMakeLists.txt
new file mode 100644
index 0000000000..15616a0b13
--- /dev/null
+++ b/tests/auto/corelib/text/qstringmatcher/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstringmatcher.pro.
+
+#####################################################################
+## tst_qstringmatcher Test:
+#####################################################################
+
+add_qt_test(tst_qstringmatcher
+ SOURCES
+ tst_qstringmatcher.cpp
+ DEFINES
+ QT_NO_CAST_TO_ASCII
+)
diff --git a/tests/auto/corelib/text/qstringref/CMakeLists.txt b/tests/auto/corelib/text/qstringref/CMakeLists.txt
new file mode 100644
index 0000000000..961f37c93d
--- /dev/null
+++ b/tests/auto/corelib/text/qstringref/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstringref.pro.
+
+#####################################################################
+## tst_qstringref Test:
+#####################################################################
+
+add_qt_test(tst_qstringref
+ SOURCES
+ tst_qstringref.cpp
+)
diff --git a/tests/auto/corelib/text/qstringref/tst_qstringref.cpp b/tests/auto/corelib/text/qstringref/tst_qstringref.cpp
index 6f01947131..20d5426bf7 100644
--- a/tests/auto/corelib/text/qstringref/tst_qstringref.cpp
+++ b/tests/auto/corelib/text/qstringref/tst_qstringref.cpp
@@ -87,6 +87,7 @@ private slots:
void mid();
void split_data();
void split();
+ void nullToString();
};
static QStringRef emptyRef()
@@ -2177,6 +2178,18 @@ void tst_QStringRef::split()
}
}
+void tst_QStringRef::nullToString()
+{
+ QStringRef nullRef;
+ QVERIFY(nullRef.isNull());
+ QVERIFY(nullRef.toString().isNull());
+
+ QString str;
+ nullRef = &str;
+ QVERIFY(nullRef.isNull());
+ QVERIFY(nullRef.toString().isNull());
+}
+
QTEST_APPLESS_MAIN(tst_QStringRef)
#include "tst_qstringref.moc"
diff --git a/tests/auto/corelib/thread/CMakeLists.txt b/tests/auto/corelib/thread/CMakeLists.txt
new file mode 100644
index 0000000000..d07c583a77
--- /dev/null
+++ b/tests/auto/corelib/thread/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from thread.pro.
+
+if(QT_FEATURE_thread)
+ add_subdirectory(qatomicint)
+ add_subdirectory(qatomicinteger)
+ add_subdirectory(qatomicpointer)
+ add_subdirectory(qresultstore)
+ add_subdirectory(qfuture)
+ add_subdirectory(qfuturesynchronizer)
+ add_subdirectory(qmutex)
+ add_subdirectory(qmutexlocker)
+ add_subdirectory(qreadlocker)
+ add_subdirectory(qreadwritelock)
+ add_subdirectory(qsemaphore)
+ add_subdirectory(qthread)
+ add_subdirectory(qthreadonce)
+ add_subdirectory(qthreadpool)
+ add_subdirectory(qthreadstorage)
+ add_subdirectory(qwaitcondition)
+ add_subdirectory(qwritelocker)
+endif()
+if(TARGET Qt::Concurrent)
+ add_subdirectory(qfuturewatcher)
+endif()
diff --git a/tests/auto/corelib/thread/qatomicint/CMakeLists.txt b/tests/auto/corelib/thread/qatomicint/CMakeLists.txt
new file mode 100644
index 0000000000..1a084fb28c
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicint/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qatomicint.pro.
+
+#####################################################################
+## tst_qatomicint Test:
+#####################################################################
+
+add_qt_test(tst_qatomicint
+ SOURCES
+ tst_qatomicint.cpp
+)
diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
index bef491d5f0..22ee7d17b7 100644
--- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
+++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
@@ -237,28 +237,23 @@ template <typename T> struct TypeInStruct { T type; };
void tst_QAtomicInt::alignment()
{
-#ifdef Q_ALIGNOF
- // this will cause a build error if the alignment isn't the same
- char dummy1[Q_ALIGNOF(QBasicAtomicInt) == Q_ALIGNOF(TypeInStruct<int>) ? 1 : -1];
- char dummy2[Q_ALIGNOF(QAtomicInt) == Q_ALIGNOF(TypeInStruct<int>) ? 1 : -1];
- (void)dummy1; (void)dummy2;
+ Q_STATIC_ASSERT(alignof(QBasicAtomicInt) == alignof(TypeInStruct<int>));
+ Q_STATIC_ASSERT(alignof(QBasicAtomicInt) == alignof(TypeInStruct<int>));
#ifdef Q_ATOMIC_INT32_IS_SUPPORTED
- QCOMPARE(Q_ALIGNOF(QBasicAtomicInteger<int>), Q_ALIGNOF(TypeInStruct<int>));
+ QCOMPARE(alignof(QBasicAtomicInteger<int>), alignof(TypeInStruct<int>));
#endif
#ifdef Q_ATOMIC_INT16_IS_SUPPORTED
- QCOMPARE(Q_ALIGNOF(QBasicAtomicInteger<short>), Q_ALIGNOF(TypeInStruct<short>));
+ QCOMPARE(alignof(QBasicAtomicInteger<short>), alignof(TypeInStruct<short>));
#endif
#ifdef Q_ATOMIC_INT8_IS_SUPPORTED
- QCOMPARE(Q_ALIGNOF(QBasicAtomicInteger<char>), Q_ALIGNOF(TypeInStruct<char>));
+ QCOMPARE(alignof(QBasicAtomicInteger<char>), alignof(TypeInStruct<char>));
#endif
#ifdef Q_ATOMIC_INT64_IS_SUPPORTED
- QCOMPARE(Q_ALIGNOF(QBasicAtomicInteger<qlonglong>), Q_ALIGNOF(TypeInStruct<qlonglong>));
-#endif
-
+ QCOMPARE(alignof(QBasicAtomicInteger<qlonglong>), alignof(TypeInStruct<qlonglong>));
#endif
}
diff --git a/tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt
new file mode 100644
index 0000000000..8f0637a4d2
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qatomicinteger.pro.
+
+add_subdirectory(char)
+add_subdirectory(char16_t)
+add_subdirectory(char32_t)
+add_subdirectory(int)
+add_subdirectory(long)
+add_subdirectory(qlonglong)
+add_subdirectory(qptrdiff)
+add_subdirectory(quintptr)
+add_subdirectory(qulonglong)
+add_subdirectory(schar)
+add_subdirectory(short)
+add_subdirectory(uchar)
+add_subdirectory(uint)
+add_subdirectory(ulong)
+add_subdirectory(ushort)
+add_subdirectory(wchar_t)
diff --git a/tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt
new file mode 100644
index 0000000000..6ccaf3291d
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/char/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from char.pro.
+
+#####################################################################
+## tst_qatomicinteger_char Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_char
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=char
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_char
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/char16_t/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/char16_t/CMakeLists.txt
new file mode 100644
index 0000000000..d57d4b89dc
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/char16_t/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from char16_t.pro.
+
+#####################################################################
+## tst_qatomicinteger_char16_t Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_char16_t
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=char16_t
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_char16_t
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/char32_t/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/char32_t/CMakeLists.txt
new file mode 100644
index 0000000000..7e04c7864b
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/char32_t/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from char32_t.pro.
+
+#####################################################################
+## tst_qatomicinteger_char32_t Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_char32_t
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=char32_t
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_char32_t
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt
new file mode 100644
index 0000000000..16332fcf3b
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/int/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from int.pro.
+
+#####################################################################
+## tst_qatomicinteger_int Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_int
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=int
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_int
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt
new file mode 100644
index 0000000000..17c2510ac2
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/long/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from long.pro.
+
+#####################################################################
+## tst_qatomicinteger_long Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_long
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=long
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_long
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/qlonglong/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/qlonglong/CMakeLists.txt
new file mode 100644
index 0000000000..021b865e67
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/qlonglong/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qlonglong.pro.
+
+#####################################################################
+## tst_qatomicinteger_qlonglong Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_qlonglong
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=qlonglong
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_qlonglong
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/qptrdiff/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/qptrdiff/CMakeLists.txt
new file mode 100644
index 0000000000..4beff29882
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/qptrdiff/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qptrdiff.pro.
+
+#####################################################################
+## tst_qatomicinteger_qptrdiff Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_qptrdiff
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=qptrdiff
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_qptrdiff
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/quintptr/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/quintptr/CMakeLists.txt
new file mode 100644
index 0000000000..a5f9b7aef3
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/quintptr/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from quintptr.pro.
+
+#####################################################################
+## tst_qatomicinteger_quintptr Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_quintptr
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=quintptr
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_quintptr
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/qulonglong/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/qulonglong/CMakeLists.txt
new file mode 100644
index 0000000000..d2e1c31856
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/qulonglong/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qulonglong.pro.
+
+#####################################################################
+## tst_qatomicinteger_qulonglong Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_qulonglong
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=qulonglong
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_qulonglong
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/schar/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/schar/CMakeLists.txt
new file mode 100644
index 0000000000..9354bbe2e2
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/schar/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from schar.pro.
+
+#####################################################################
+## tst_qatomicinteger_schar Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_schar
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=schar
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_schar
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/short/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/short/CMakeLists.txt
new file mode 100644
index 0000000000..07143ed431
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/short/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from short.pro.
+
+#####################################################################
+## tst_qatomicinteger_short Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_short
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=short
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_short
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/uchar/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/uchar/CMakeLists.txt
new file mode 100644
index 0000000000..ebc64efea5
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/uchar/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from uchar.pro.
+
+#####################################################################
+## tst_qatomicinteger_uchar Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_uchar
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=uchar
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_uchar
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt
new file mode 100644
index 0000000000..561274da9d
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/uint/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from uint.pro.
+
+#####################################################################
+## tst_qatomicinteger_uint Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_uint
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=uint
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_uint
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/ulong/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/ulong/CMakeLists.txt
new file mode 100644
index 0000000000..c859818838
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/ulong/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from ulong.pro.
+
+#####################################################################
+## tst_qatomicinteger_ulong Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_ulong
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=ulong
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_ulong
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/ushort/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/ushort/CMakeLists.txt
new file mode 100644
index 0000000000..6608390b8e
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/ushort/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from ushort.pro.
+
+#####################################################################
+## tst_qatomicinteger_ushort Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_ushort
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=ushort
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_ushort
+)
diff --git a/tests/auto/corelib/thread/qatomicinteger/wchar_t/CMakeLists.txt b/tests/auto/corelib/thread/qatomicinteger/wchar_t/CMakeLists.txt
new file mode 100644
index 0000000000..9c7e17f1bd
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicinteger/wchar_t/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from wchar_t.pro.
+
+#####################################################################
+## tst_qatomicinteger_wchar_t Test:
+#####################################################################
+
+add_qt_test(tst_qatomicinteger_wchar_t
+ SOURCES
+ ../tst_qatomicinteger.cpp
+ DEFINES
+ QATOMIC_TEST_TYPE=wchar_t
+ tst_QAtomicIntegerXX=tst_QAtomicInteger_wchar_t
+)
diff --git a/tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt b/tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt
new file mode 100644
index 0000000000..f400ad7b2e
--- /dev/null
+++ b/tests/auto/corelib/thread/qatomicpointer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qatomicpointer.pro.
+
+#####################################################################
+## tst_qatomicpointer Test:
+#####################################################################
+
+add_qt_test(tst_qatomicpointer
+ SOURCES
+ tst_qatomicpointer.cpp
+)
diff --git a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
index a699cf6202..9e12e7ccce 100644
--- a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
+++ b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
@@ -108,11 +108,7 @@ void tst_QAtomicPointer::warningFree()
void tst_QAtomicPointer::alignment()
{
-#ifdef Q_ALIGNOF
- // this will cause a build error if the alignment isn't the same
- char dummy[Q_ALIGNOF(QBasicAtomicPointer<void>) == Q_ALIGNOF(void*) ? 1 : -1];
- (void)dummy;
-#endif
+ Q_STATIC_ASSERT(alignof(QBasicAtomicPointer<void>) == alignof(void*));
}
void tst_QAtomicPointer::constructor()
diff --git a/tests/auto/corelib/thread/qfuture/.prev_CMakeLists.txt b/tests/auto/corelib/thread/qfuture/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..671eeef665
--- /dev/null
+++ b/tests/auto/corelib/thread/qfuture/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qfuture.pro.
+
+#####################################################################
+## tst_qfuture Test:
+#####################################################################
+
+add_qt_test(tst_qfuture
+ SOURCES
+ tst_qfuture.cpp
+ DEFINES
+ -QT_NO_JAVA_STYLE_ITERATORS
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/thread/qfuture/CMakeLists.txt b/tests/auto/corelib/thread/qfuture/CMakeLists.txt
new file mode 100644
index 0000000000..db1afabc0d
--- /dev/null
+++ b/tests/auto/corelib/thread/qfuture/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qfuture.pro.
+
+#####################################################################
+## tst_qfuture Test:
+#####################################################################
+
+add_qt_test(tst_qfuture
+ SOURCES
+ tst_qfuture.cpp
+ DEFINES
+ # -QT_NO_JAVA_STYLE_ITERATORS # special case
+ QT_STRICT_ITERATORS
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/thread/qfuture/qfuture.pro b/tests/auto/corelib/thread/qfuture/qfuture.pro
index 1f21130af7..fe097edf20 100644
--- a/tests/auto/corelib/thread/qfuture/qfuture.pro
+++ b/tests/auto/corelib/thread/qfuture/qfuture.pro
@@ -2,5 +2,4 @@ CONFIG += testcase
TARGET = tst_qfuture
QT = core core-private testlib
SOURCES = tst_qfuture.cpp
-DEFINES += QT_STRICT_ITERATORS
DEFINES -= QT_NO_JAVA_STYLE_ITERATORS
diff --git a/tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt b/tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt
new file mode 100644
index 0000000000..54e3eb861d
--- /dev/null
+++ b/tests/auto/corelib/thread/qfuturesynchronizer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qfuturesynchronizer.pro.
+
+#####################################################################
+## tst_qfuturesynchronizer Test:
+#####################################################################
+
+add_qt_test(tst_qfuturesynchronizer
+ SOURCES
+ tst_qfuturesynchronizer.cpp
+)
diff --git a/tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt b/tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt
new file mode 100644
index 0000000000..c27412daac
--- /dev/null
+++ b/tests/auto/corelib/thread/qfuturewatcher/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qfuturewatcher.pro.
+
+#####################################################################
+## tst_qfuturewatcher Test:
+#####################################################################
+
+add_qt_test(tst_qfuturewatcher
+ SOURCES
+ tst_qfuturewatcher.cpp
+ PUBLIC_LIBRARIES
+ Qt::Concurrent
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/thread/qmutex/CMakeLists.txt b/tests/auto/corelib/thread/qmutex/CMakeLists.txt
new file mode 100644
index 0000000000..536802f127
--- /dev/null
+++ b/tests/auto/corelib/thread/qmutex/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qmutex.pro.
+
+#####################################################################
+## tst_qmutex Test:
+#####################################################################
+
+add_qt_test(tst_qmutex
+ SOURCES
+ tst_qmutex.cpp
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmutex CONDITION WIN32
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt b/tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt
new file mode 100644
index 0000000000..a07548a494
--- /dev/null
+++ b/tests/auto/corelib/thread/qmutexlocker/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmutexlocker.pro.
+
+#####################################################################
+## tst_qmutexlocker Test:
+#####################################################################
+
+add_qt_test(tst_qmutexlocker
+ SOURCES
+ tst_qmutexlocker.cpp
+)
diff --git a/tests/auto/corelib/thread/qreadlocker/CMakeLists.txt b/tests/auto/corelib/thread/qreadlocker/CMakeLists.txt
new file mode 100644
index 0000000000..c52bc24491
--- /dev/null
+++ b/tests/auto/corelib/thread/qreadlocker/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qreadlocker.pro.
+
+#####################################################################
+## tst_qreadlocker Test:
+#####################################################################
+
+add_qt_test(tst_qreadlocker
+ SOURCES
+ tst_qreadlocker.cpp
+)
diff --git a/tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt b/tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt
new file mode 100644
index 0000000000..3de89adb2d
--- /dev/null
+++ b/tests/auto/corelib/thread/qreadwritelock/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qreadwritelock.pro.
+
+#####################################################################
+## tst_qreadwritelock Test:
+#####################################################################
+
+add_qt_test(tst_qreadwritelock
+ SOURCES
+ tst_qreadwritelock.cpp
+)
diff --git a/tests/auto/corelib/thread/qresultstore/CMakeLists.txt b/tests/auto/corelib/thread/qresultstore/CMakeLists.txt
new file mode 100644
index 0000000000..f630bdc43b
--- /dev/null
+++ b/tests/auto/corelib/thread/qresultstore/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qresultstore.pro.
+
+#####################################################################
+## tst_qresultstore Test:
+#####################################################################
+
+add_qt_test(tst_qresultstore
+ SOURCES
+ tst_qresultstore.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/thread/qresultstore/qresultstore.pro b/tests/auto/corelib/thread/qresultstore/qresultstore.pro
index bbebe0976b..80e79b1c1a 100644
--- a/tests/auto/corelib/thread/qresultstore/qresultstore.pro
+++ b/tests/auto/corelib/thread/qresultstore/qresultstore.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qresultstore
QT = core-private testlib
SOURCES = tst_qresultstore.cpp
-DEFINES += QT_STRICT_ITERATORS
diff --git a/tests/auto/corelib/thread/qsemaphore/CMakeLists.txt b/tests/auto/corelib/thread/qsemaphore/CMakeLists.txt
new file mode 100644
index 0000000000..3aaa71423e
--- /dev/null
+++ b/tests/auto/corelib/thread/qsemaphore/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsemaphore.pro.
+
+#####################################################################
+## tst_qsemaphore Test:
+#####################################################################
+
+add_qt_test(tst_qsemaphore
+ SOURCES
+ tst_qsemaphore.cpp
+)
diff --git a/tests/auto/corelib/thread/qthread/.prev_CMakeLists.txt b/tests/auto/corelib/thread/qthread/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..749a5e9734
--- /dev/null
+++ b/tests/auto/corelib/thread/qthread/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qthread.pro.
+
+#####################################################################
+## tst_qthread Test:
+#####################################################################
+
+add_qt_test(tst_qthread
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qthread.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/thread/qthread/CMakeLists.txt b/tests/auto/corelib/thread/qthread/CMakeLists.txt
new file mode 100644
index 0000000000..a21e239c35
--- /dev/null
+++ b/tests/auto/corelib/thread/qthread/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qthread.pro.
+
+#####################################################################
+## tst_qthread Test:
+#####################################################################
+
+add_qt_test(tst_qthread
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qthread.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ LIBRARIES # special case
+ Threads::Threads # special case
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt b/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
new file mode 100644
index 0000000000..c29b4e640a
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadonce/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from qthreadonce.pro.
+
+#####################################################################
+## tst_qthreadonce Test:
+#####################################################################
+
+add_qt_test(tst_qthreadonce
+ SOURCES
+ qthreadonce.cpp
+ tst_qthreadonce.cpp
+)
diff --git a/tests/auto/corelib/thread/qthreadpool/CMakeLists.txt b/tests/auto/corelib/thread/qthreadpool/CMakeLists.txt
new file mode 100644
index 0000000000..bc3fca1b6a
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadpool/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qthreadpool.pro.
+
+#####################################################################
+## tst_qthreadpool Test:
+#####################################################################
+
+add_qt_test(tst_qthreadpool
+ SOURCES
+ tst_qthreadpool.cpp
+)
diff --git a/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt
new file mode 100644
index 0000000000..52a928863c
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt
@@ -0,0 +1,21 @@
+# special case skip regeneration
+# Generated from qthreadstorage.pro.
+
+#####################################################################
+## tst_qthreadstorage Test:
+#####################################################################
+
+add_qt_test(tst_qthreadstorage
+ SOURCES
+ tst_qthreadstorage.cpp
+ LIBRARIES # special case
+ Threads::Threads # special case
+
+)
+
+## Scopes:
+#####################################################################
+
+if(NOT ANDROID AND NOT WINRT)
+ add_subdirectory(crashonexit)
+endif()
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/.prev_CMakeLists.txt b/tests/auto/corelib/thread/qthreadstorage/crashonexit/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..87ae29a04c
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from crashonexit.pro.
+
+#####################################################################
+## crashonexit Binary:
+#####################################################################
+
+add_qt_executable(crashonexit
+ OUTPUT_DIRECTORY "${INSTALL_TESTSDIR}/tst_qthreadstorage/crashonexit"
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qthreadstorage/crashonexit"
+ SOURCES
+ crashOnExit.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt b/tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt
new file mode 100644
index 0000000000..b2bac9713a
--- /dev/null
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from crashonexit.pro.
+
+#####################################################################
+## crashonexit Binary:
+#####################################################################
+
+add_qt_executable(crashOnExit_helper
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." # special case
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qthreadstorage/crashOnExit_helper" # special case
+ SOURCES
+ crashOnExit.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt
new file mode 100644
index 0000000000..76f8b33aa4
--- /dev/null
+++ b/tests/auto/corelib/thread/qwaitcondition/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qwaitcondition.pro.
+
+#####################################################################
+## tst_qwaitcondition Test:
+#####################################################################
+
+add_qt_test(tst_qwaitcondition
+ SOURCES
+ tst_qwaitcondition.cpp
+)
diff --git a/tests/auto/corelib/thread/qwritelocker/CMakeLists.txt b/tests/auto/corelib/thread/qwritelocker/CMakeLists.txt
new file mode 100644
index 0000000000..00a9809174
--- /dev/null
+++ b/tests/auto/corelib/thread/qwritelocker/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qwritelocker.pro.
+
+#####################################################################
+## tst_qwritelocker Test:
+#####################################################################
+
+add_qt_test(tst_qwritelocker
+ SOURCES
+ tst_qwritelocker.cpp
+)
diff --git a/tests/auto/corelib/time/CMakeLists.txt b/tests/auto/corelib/time/CMakeLists.txt
new file mode 100644
index 0000000000..ed990d1979
--- /dev/null
+++ b/tests/auto/corelib/time/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from time.pro.
+
+add_subdirectory(qcalendar)
+add_subdirectory(qdate)
+add_subdirectory(qdatetime)
+add_subdirectory(qtime)
+add_subdirectory(qtimezone)
diff --git a/tests/auto/corelib/time/qcalendar/CMakeLists.txt b/tests/auto/corelib/time/qcalendar/CMakeLists.txt
new file mode 100644
index 0000000000..1e59a1f0b0
--- /dev/null
+++ b/tests/auto/corelib/time/qcalendar/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qcalendar.pro.
+
+#####################################################################
+## tst_qcalendar Test:
+#####################################################################
+
+add_qt_test(tst_qcalendar
+ SOURCES
+ tst_qcalendar.cpp
+)
diff --git a/tests/auto/corelib/time/qdate/CMakeLists.txt b/tests/auto/corelib/time/qdate/CMakeLists.txt
new file mode 100644
index 0000000000..b39828b5df
--- /dev/null
+++ b/tests/auto/corelib/time/qdate/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdate.pro.
+
+#####################################################################
+## tst_qdate Test:
+#####################################################################
+
+add_qt_test(tst_qdate
+ SOURCES
+ tst_qdate.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/time/qdatetime/CMakeLists.txt b/tests/auto/corelib/time/qdatetime/CMakeLists.txt
new file mode 100644
index 0000000000..e992936e60
--- /dev/null
+++ b/tests/auto/corelib/time/qdatetime/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qdatetime.pro.
+
+#####################################################################
+## tst_qdatetime Test:
+#####################################################################
+
+add_qt_test(tst_qdatetime
+ SOURCES
+ tst_qdatetime.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qdatetime.pro:MSVC:
+# QMAKE_CFLAGS_RELEASE = "--O1"
+# QMAKE_CXXFLAGS_RELEASE = "--O1"
+
+extend_target(tst_qdatetime CONDITION APPLE
+ SOURCES
+ tst_qdatetime_mac.mm
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+)
diff --git a/tests/auto/corelib/time/qtime/CMakeLists.txt b/tests/auto/corelib/time/qtime/CMakeLists.txt
new file mode 100644
index 0000000000..ef224b45e3
--- /dev/null
+++ b/tests/auto/corelib/time/qtime/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qtime.pro.
+
+#####################################################################
+## tst_qtime Test:
+#####################################################################
+
+add_qt_test(tst_qtime
+ SOURCES
+ tst_qtime.cpp
+)
diff --git a/tests/auto/corelib/time/qtimezone/CMakeLists.txt b/tests/auto/corelib/time/qtimezone/CMakeLists.txt
new file mode 100644
index 0000000000..d95a2ac767
--- /dev/null
+++ b/tests/auto/corelib/time/qtimezone/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qtimezone.pro.
+
+#####################################################################
+## tst_qtimezone Test:
+#####################################################################
+
+add_qt_test(tst_qtimezone
+ SOURCES
+ tst_qtimezone.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtimezone CONDITION QT_FEATURE_icu
+ LIBRARIES
+ ICU::i18n ICU::uc ICU::data
+)
+
+extend_target(tst_qtimezone CONDITION APPLE
+ SOURCES
+ tst_qtimezone_darwin.mm
+ PUBLIC_LIBRARIES
+ ${FWFoundation}
+)
diff --git a/tests/auto/corelib/tools/CMakeLists.txt b/tests/auto/corelib/tools/CMakeLists.txt
new file mode 100644
index 0000000000..f1967c3664
--- /dev/null
+++ b/tests/auto/corelib/tools/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from tools.pro.
+
+# add_subdirectory(collections) # special case not ported
+# add_subdirectory(containerapisymmetry) # special case not ported
+add_subdirectory(qalgorithms)
+add_subdirectory(qarraydata)
+# add_subdirectory(qarraydata_strictiterators) # special case not ported
+add_subdirectory(qbitarray)
+add_subdirectory(qcache)
+add_subdirectory(qcommandlineparser)
+add_subdirectory(qcontiguouscache)
+# add_subdirectory(qcryptographichash) # special case not ported
+add_subdirectory(qeasingcurve)
+add_subdirectory(qexplicitlyshareddatapointer)
+# add_subdirectory(qfreelist) # special case not ported
+add_subdirectory(qhash)
+# add_subdirectory(qhash_strictiterators) # special case not ported
+add_subdirectory(qhashfunctions)
+# add_subdirectory(qline) # special case not ported
+# add_subdirectory(qlist) # special case no longer exists
+# add_subdirectory(qlist_strictiterators) # special case not ported
+add_subdirectory(qmakearray)
+add_subdirectory(qmap)
+# add_subdirectory(qmap_strictiterators) # special case not ported
+add_subdirectory(qmargins)
+add_subdirectory(qmessageauthenticationcode)
+# add_subdirectory(qoffsetstringarray) # special case not ported
+add_subdirectory(qpair)
+add_subdirectory(qpoint)
+add_subdirectory(qpointf)
+add_subdirectory(qqueue)
+add_subdirectory(qrect)
+add_subdirectory(qringbuffer)
+add_subdirectory(qscopedpointer)
+add_subdirectory(qscopedvaluerollback)
+add_subdirectory(qscopeguard)
+add_subdirectory(qset)
+# add_subdirectory(qsharedpointer) # special case not ported
+add_subdirectory(qsize)
+add_subdirectory(qsizef)
+add_subdirectory(qstl)
+add_subdirectory(qtimeline)
+add_subdirectory(qvarlengtharray)
+# add_subdirectory(qvector) # special case not ported
+# add_subdirectory(qvector_strictiterators) # special case not ported
+# add_subdirectory(qversionnumber) # special case not ported
+if(APPLE)
+ # add_subdirectory(qmacautoreleasepool) # special case not ported
+endif()
diff --git a/tests/auto/corelib/tools/collections/collections.pro b/tests/auto/corelib/tools/collections/collections.pro
index e0f9f0a0ea..0182a0c837 100644
--- a/tests/auto/corelib/tools/collections/collections.pro
+++ b/tests/auto/corelib/tools/collections/collections.pro
@@ -4,6 +4,4 @@ SOURCES += tst_collections.cpp
QT = core testlib
# This test does not work with strict iterators
-DEFINES -= QT_NO_LINKED_LIST
-DEFINES -= QT_STRICT_ITERATORS
DEFINES -= QT_NO_JAVA_STYLE_ITERATORS
diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp
index e79a4dba29..6fcf726c21 100644
--- a/tests/auto/corelib/tools/collections/tst_collections.cpp
+++ b/tests/auto/corelib/tools/collections/tst_collections.cpp
@@ -32,7 +32,6 @@
static QCache<int, int> *cacheX;
static QHash<int, int> *hashX;
-static QLinkedList<int> *linkedListX;
static QList<int> *listX;
static QMap<int, int> *mapX;
static QMultiHash<int, int> *multiHashX;
@@ -49,7 +48,6 @@ void foo()
{
cacheX = 0;
hashX = 0;
- linkedListX = 0;
listX = 0;
mapX = 0;
multiHashX = 0;
@@ -71,7 +69,6 @@ void foo()
#include "qbytearray.h"
#include "qcache.h"
#include "qhash.h"
-#include "qlinkedlist.h"
#include "qlist.h"
#include "qmap.h"
#include "qpair.h"
@@ -84,10 +81,6 @@ void foo()
#include "qvector.h"
#include "qqueue.h"
-QT_BEGIN_NAMESPACE
-template class QList<int>;
-QT_END_NAMESPACE
-
class tst_Collections : public QObject
{
Q_OBJECT
@@ -96,7 +89,6 @@ private slots:
void typeinfo();
void qstring();
void list();
- void linkedList();
void vector();
void byteArray();
void stack();
@@ -109,7 +101,6 @@ private slots:
#endif
void pair();
void sharableQList();
- void sharableQLinkedList();
void sharableQVector();
void sharableQMap();
void sharableQHash();
@@ -121,8 +112,6 @@ private slots:
void vector_stl();
void list_stl_data();
void list_stl();
- void linkedlist_stl_data();
- void linkedlist_stl();
void q_init();
void pointersize();
void containerInstantiation();
@@ -551,19 +540,12 @@ void tst_Collections::list()
list << "foo" << "bar";
QVERIFY(!list.isEmpty());
- list.insert(-1, "lessthanzero");
- QCOMPARE(list.at(0), QString("lessthanzero"));
-
list.insert(0, "atzero");
QCOMPARE(list.at(0), QString("atzero"));
int listCount = list.count();
list.insert(listCount, "atcount");
QCOMPARE(list.at(listCount), QString("atcount"));
-
- listCount = list.count();
- list.insert(listCount + 1, "beyondcount");
- QCOMPARE(list.at(listCount), QString("beyondcount"));
}
{
@@ -736,228 +718,6 @@ void tst_Collections::list()
}
}
-void tst_Collections::linkedList()
-{
- {
- QLinkedList<int> list;
- QVERIFY(list.isEmpty());
- list.append(1);
- list.push_back(2);
- list += (3);
- list << 4 << 5 << 6;
- QVERIFY(!list.isEmpty());
- QVERIFY(list.size() == 6);
- {
- int sum = 0;
- QLinkedListIterator<int> i = list;
- while (i.hasNext()) {
- sum += i.next();
- }
- QVERIFY(sum == 21);
- }
- {
- int sum = 0;
- QLinkedList<int>::const_iterator i = list.begin();
- while (i != list.end())
- sum += *i++;
- QVERIFY(sum == 21);
- }
- {
- QMutableLinkedListIterator<int> i = list;
- while (i.hasNext())
- i.setValue(2*i.next());
- }
- {
- int sum = 0;
- QLinkedListIterator<int> i = list;
- i.toBack();
- while (i.hasPrevious())
- sum += i.previous();
- QVERIFY(sum == 2*21);
- }
- {
- QMutableLinkedListIterator<int> i = list;
- i.toBack();
- while (i.hasPrevious())
- i.setValue(2*i.previous());
- }
- {
- int sum = 0;
- QLinkedListIterator<int> i = list;
- i.toBack();
- while (i.hasPrevious())
- sum += i.previous();
- QVERIFY(sum == 2*2*21);
- }
- {
- QMutableLinkedListIterator<int> i = list;
- while (i.hasNext()) {
- int a = i.next();
- i.insert(a);
- }
- }
- {
- int sum = 0;
- QLinkedList<int>::iterator i = list.begin();
- while (i != list.end())
- sum += *i++;
- QVERIFY(sum == 2*2*2*21);
- }
- {
- int duplicates = 0;
- QLinkedListIterator<int> i = list;
- while (i.hasNext()) {
- int a = i.next();
- if (i.hasNext() && a == i.peekNext())
- duplicates++;
- }
- QVERIFY(duplicates == 6);
- }
- {
- int duplicates = 0;
- QLinkedListIterator<int> i = list;
- i.toBack();
- while (i.hasPrevious()) {
- int a = i.previous();
- if (i.hasPrevious() && a == i.peekPrevious())
- duplicates++;
- }
- QVERIFY(duplicates == 6);
- }
- {
- QMutableLinkedListIterator<int> i = list;
- while (i.hasNext()) {
- int a = i.next();
- if (i.hasNext() &&
- i.peekNext() == a)
- i.remove();
- }
- }
- {
- int duplicates = 0;
- QMutableLinkedListIterator<int> i = list;
- i.toBack();
- while (i.hasPrevious()) {
- int a = i.previous();
- if (i.hasPrevious() && a == i.peekPrevious())
- duplicates++;
- }
- QVERIFY(duplicates == 0);
- }
- {
- QVERIFY(list.size() == 6);
- QMutableLinkedListIterator<int> i = list;
- while (i.hasNext()) {
- int a = i.peekNext();
- i.insert(42);
- QVERIFY(i.peekPrevious() == 42 && i.peekNext() == a);
- i.next();
- }
- QVERIFY(list.size() == 12);
- i.toFront();
- while (i.findNext(42))
- i.remove();
- }
- {
- QLinkedList<int> l;
- l << 4 << 8 << 12 << 16 << 20 << 24;
- QVERIFY(l == list);
- QLinkedList<int> copy = list;
- list += list;
- QVERIFY(l != list && l.size() == list.size()/2 && l == copy);
- l += copy;
- QVERIFY(l == list);
- list = copy;
- }
- {
- QLinkedList<int> copy = list;
- list.prepend(999);
- list.append(999);
- QVERIFY(list.contains(999));
- QVERIFY(list.count(999) == 2);
- list.removeAll(999);
- QVERIFY(list == copy);
- }
- {
- QLinkedList<QString> list;
- list << "one" << "two" << "three" << "four" << "five" << "six";
- while (!list.isEmpty())
- list.removeAll(list.first());
- }
- {
- QLinkedList<QString> list;
- list << "one" << "two" << "one" << "two";
- QVERIFY(!list.removeOne("three"));
- QVERIFY(list.removeOne("two"));
- QCOMPARE(list, QLinkedList<QString>() << "one" << "one" << "two");;
- QVERIFY(list.removeOne("two"));
- QCOMPARE(list, QLinkedList<QString>() << "one" << "one");
- QVERIFY(!list.removeOne("two"));
- QCOMPARE(list, QLinkedList<QString>() << "one" << "one");
- QVERIFY(list.removeOne("one"));
- QCOMPARE(list, QLinkedList<QString>() << "one");
- QVERIFY(list.removeOne("one"));
- QVERIFY(list.isEmpty());
- QVERIFY(!list.removeOne("one"));
- QVERIFY(list.isEmpty());
- }
- {
- list.clear();
- QVERIFY(list.isEmpty());
- QVERIFY(list.begin() == list.end());
- QLinkedListIterator<int> i(list);
- QVERIFY(!i.hasNext() && !i.hasPrevious());
- }
- }
-
- {
- QLinkedList<QString> list;
- list.append("Hello");
-
- QLinkedList<QString>::iterator it = list.begin();
- QVERIFY((*it)[0] == QChar('H'));
- QVERIFY(it->constData()[0] == QChar('H'));
- it->replace(QChar('H'), QChar('X'));
- QCOMPARE(list.first(), QLatin1String("Xello"));
-
- QLinkedList<QString>::const_iterator cit = list.constBegin();
- QCOMPARE((*cit).toLower(), QLatin1String("xello"));
- QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
-
- cit = list.cbegin();
- QCOMPARE((*cit).toLower(), QLatin1String("xello"));
- QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
- }
-
- {
- QLinkedList<QString> list;
- list << "alpha" << "beta";
- list += list;
- QVERIFY(list.size() == 4);
- QCOMPARE(*list.begin(), QLatin1String("alpha"));
- QCOMPARE(*(list.begin() + 1), QLatin1String("beta"));
- QCOMPARE(*(list.begin() + 2), QLatin1String("alpha"));
- QCOMPARE(*(list.begin() + 3), QLatin1String("beta"));
- }
-
- {
- QLinkedList<int> a;
- QCOMPARE(a.startsWith(1), false);
- QCOMPARE(a.endsWith(1), false);
- a.append(1);
- QCOMPARE(a.startsWith(1), true);
- QCOMPARE(a.startsWith(2), false);
- QCOMPARE(a.endsWith(1), true);
- QCOMPARE(a.endsWith(2), false);
- a.append(2);
- QCOMPARE(a.startsWith(1), true);
- QCOMPARE(a.startsWith(2), false);
- QCOMPARE(a.endsWith(1), false);
- QCOMPARE(a.endsWith(2), true);
- }
-};
-
-
void tst_Collections::vector()
{
QVector<int> v1;
@@ -1562,12 +1322,12 @@ void tst_Collections::hash()
}
{
- QHash<int, QString> hash1, hash2;
- hash1.insertMulti(1, "Alpha");
- hash1.insertMulti(1, "Gamma");
- hash2.insertMulti(1, "Beta");
- hash2.insertMulti(1, "Gamma");
- hash2.insertMulti(1, "Gamma");
+ QMultiHash<int, QString> hash1, hash2;
+ hash1.insert(1, "Alpha");
+ hash1.insert(1, "Gamma");
+ hash2.insert(1, "Beta");
+ hash2.insert(1, "Gamma");
+ hash2.insert(1, "Gamma");
hash1.unite(hash2);
QCOMPARE(hash1.size(), 5);
@@ -1997,15 +1757,6 @@ void tst_Collections::qstring()
QVERIFY(null.isNull());
QVERIFY(!nonNull.isNull());
-#if QT_DEPRECATED_SINCE(5, 9)
- QVERIFY(null == QString::null);
- QVERIFY(QString::null == null);
- QVERIFY(nonNull != QString::null);
- QVERIFY(QString::null != nonNull);
- QVERIFY(null == nonNull);
- QVERIFY(QString::null == QString::null);
-#endif
-
QString fill = "123";
fill.fill('a');
QCOMPARE(fill, QLatin1String("aaa"));
@@ -2331,18 +2082,6 @@ void populate(QList<int> &container)
}
template <>
-void populate(QLinkedList<int> &container)
-{
- container << 1 << 2 << 4 << 8;
-}
-
-template <>
-void populate(QVector<int> &container)
-{
- container << 1 << 2 << 4 << 8;
-}
-
-template <>
void populate(QMap<int, int> &container)
{
container.insert(1, 1);
@@ -2431,11 +2170,6 @@ void tst_Collections::sharableQList()
TEST_SEQUENTIAL_CONTAINER(List);
}
-void tst_Collections::sharableQLinkedList()
-{
- TEST_SEQUENTIAL_CONTAINER(LinkedList);
-}
-
void tst_Collections::sharableQVector()
{
TEST_SEQUENTIAL_CONTAINER(Vector);
@@ -2727,8 +2461,10 @@ void testMapLikeStlIterators()
QString t;
fake.insert(k, t);
- typename Container::iterator i1 = fake.begin(), i2 = i1 + 1;
- typename Container::const_iterator c1 = i1, c2 = c1 + 1;
+ typename Container::iterator i1 = fake.begin(), i2 = i1;
+ ++i2;
+ typename Container::const_iterator c1 = i1, c2 = c1;
+ ++c2;
QVERIFY(i1 == i1);
QVERIFY(i1 == c1);
@@ -2738,8 +2474,6 @@ void testMapLikeStlIterators()
QVERIFY(i2 == c2);
QVERIFY(c2 == i2);
QVERIFY(c2 == c2);
- QVERIFY(1 + i1 == i1 + 1);
- QVERIFY(1 + c1 == c1 + 1);
QVERIFY(i1 != i2);
QVERIFY(i1 != c2);
@@ -2755,7 +2489,6 @@ void tst_Collections::constAndNonConstStlIterators()
{
testListLikeStlIterators<QList<int> >();
testListLikeStlIterators<QStringList >();
- testLinkedListLikeStlIterators<QLinkedList<int> >();
testListLikeStlIterators<QVector<int> >();
testMapLikeStlIterators<QMap<QString, QString> >();
testMapLikeStlIterators<QMultiMap<QString, QString> >();
@@ -2798,31 +2531,6 @@ void tst_Collections::vector_stl()
QCOMPARE(QVector<QString>(stdVector.begin(), stdVector.end()), vector);
}
-void tst_Collections::linkedlist_stl_data()
-{
- list_stl_data();
-}
-
-void tst_Collections::linkedlist_stl()
-{
- QFETCH(QStringList, elements);
-
- QLinkedList<QString> list;
- for (int i = 0; i < elements.count(); ++i)
- list << elements.at(i);
-
- std::list<QString> stdList = list.toStdList();
-
- QCOMPARE(int(stdList.size()), elements.size());
-
- std::list<QString>::const_iterator it = stdList.begin();
- QLinkedList<QString>::const_iterator it2 = list.cbegin();
- for (uint j = 0; j < stdList.size(); ++j, ++it, ++it2)
- QCOMPARE(*it, *it2);
-
- QCOMPARE(QLinkedList<QString>::fromStdList(stdList), list);
-}
-
void tst_Collections::list_stl_data()
{
QTest::addColumn<QStringList>("elements");
@@ -2950,10 +2658,6 @@ void instantiateMutableIterationContainer()
it = container.begin();
it = container.end();
Q_UNUSED(it)
-
- // QSet lacks count(T).
- const ValueType value = ValueType();
- container.count(value);
}
template <typename ContainerType, typename ValueType>
@@ -2961,10 +2665,9 @@ void instantiateSequence()
{
instantiateMutableIterationContainer<ContainerType, ValueType>();
-// QVector lacks removeAll(T)
-// ValueType value = ValueType();
-// ContainerType container;
-// container.removeAll(value);
+ ValueType value = ValueType();
+ ContainerType container;
+ container.removeAll(value);
}
template <typename ContainerType, typename ValueType>
@@ -3037,11 +2740,10 @@ void instantiatePairAssociative()
constContainer.keys();
container.remove(key);
container.take(key);
- container.unite(constContainer);
+ container.insert(constContainer);
container.value(key);
container.value(key, value);
container.values();
- container.values(key);
container[key];
const int foo = constContainer[key];
Q_UNUSED(foo);
@@ -3070,15 +2772,6 @@ void tst_Collections::containerInstantiation()
typedef QSet<EqualsComparable> Set;
instantiateAssociative<Set, EqualsComparable>();
- //Instantiate QLinkedList member functions.
- typedef QLinkedList<EqualsComparable> LinkedList;
- instantiateSequence<LinkedList, EqualsComparable> ();
- {
- EqualsComparable value;
- LinkedList list;
- list.removeAll(value);
- }
-
//Instantiate QList member functions.
typedef QList<EqualsComparable> List;
instantiateRandomAccess<List, EqualsComparable>();
@@ -3185,7 +2878,6 @@ void tst_Collections::containerTypedefs()
testContainerTypedefs(QVector<int>());
testContainerTypedefs(QStack<int>());
testContainerTypedefs(QList<int>());
- testContainerTypedefs(QLinkedList<int>());
testContainerTypedefs(QQueue<int>());
testPairAssociativeContainerTypedefs(QMap<int, int>());
@@ -3207,16 +2899,13 @@ void tst_Collections::forwardDeclared()
{ typedef QMultiMap<Key1, T1> C; C *x = 0; C::iterator i; C::const_iterator j; Q_UNUSED(x) }
{ typedef QPair<T1, T2> C; C *x = 0; Q_UNUSED(x) }
{ typedef QList<T1> C; C *x = 0; C::iterator i; C::const_iterator j; Q_UNUSED(x) }
- { typedef QLinkedList<T1> C; C *x = 0; C::iterator i; C::const_iterator j; Q_UNUSED(x) }
{ typedef QVector<T1> C; C *x = 0; C::iterator i; C::const_iterator j; Q_UNUSED(x) Q_UNUSED(i) Q_UNUSED(j) }
{ typedef QStack<T1> C; C *x = 0; C::iterator i; C::const_iterator j; Q_UNUSED(x) Q_UNUSED(i) Q_UNUSED(j) }
{ typedef QQueue<T1> C; C *x = 0; C::iterator i; C::const_iterator j; Q_UNUSED(x) }
{ typedef QSet<T1> C; C *x = 0; /* C::iterator i; */ C::const_iterator j; Q_UNUSED(x) }
}
-#if defined(Q_ALIGNOF) && defined(Q_DECL_ALIGN)
-
-class Q_DECL_ALIGN(4) Aligned4
+class alignas(4) Aligned4
{
char i;
public:
@@ -3228,7 +2917,7 @@ public:
inline bool operator<(const Aligned4 &other) const { return i < other.i; }
friend inline int qHash(const Aligned4 &a) { return qHash(a.i); }
};
-Q_STATIC_ASSERT(Q_ALIGNOF(Aligned4) % 4 == 0);
+Q_STATIC_ASSERT(alignof(Aligned4) % 4 == 0);
#if defined(Q_PROCESSOR_ARM)
# if defined(Q_COMPILER_ALIGNAS) && defined(__BIGGEST_ALIGNMENT__)
@@ -3242,7 +2931,7 @@ Q_STATIC_ASSERT(Q_ALIGNOF(Aligned4) % 4 == 0);
# define BIGGEST_ALIGNMENT_TO_TEST 128
#endif
-class Q_DECL_ALIGN(BIGGEST_ALIGNMENT_TO_TEST) AlignedBiggest
+class alignas(BIGGEST_ALIGNMENT_TO_TEST) AlignedBiggest
{
char i;
public:
@@ -3254,7 +2943,7 @@ public:
inline bool operator<(const AlignedBiggest &other) const { return i < other.i; }
friend inline int qHash(const AlignedBiggest &a) { return qHash(a.i); }
};
-Q_STATIC_ASSERT(Q_ALIGNOF(AlignedBiggest) % BIGGEST_ALIGNMENT_TO_TEST == 0);
+Q_STATIC_ASSERT(alignof(AlignedBiggest) % BIGGEST_ALIGNMENT_TO_TEST == 0);
template<typename C>
void testVectorAlignment()
@@ -3325,13 +3014,6 @@ void tst_Collections::alignment()
testAssociativeContainerAlignment<QHash<AlignedBiggest, AlignedBiggest> >();
}
-#else
-void tst_Collections::alignment()
-{
- QSKIP("Compiler doesn't support necessary extension keywords");
-}
-#endif
-
#ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
template<template<class> class C>
@@ -3441,7 +3123,6 @@ void tst_Collections::QTBUG13079_collectionInsideCollection()
QTBUG13079_collectionInsideCollectionImpl<QVector>();
QTBUG13079_collectionInsideCollectionImpl<QStack>();
QTBUG13079_collectionInsideCollectionImpl<QList>();
- QTBUG13079_collectionInsideCollectionImpl<QLinkedList>();
QTBUG13079_collectionInsideCollectionImpl<QQueue>();
{
@@ -3510,9 +3191,6 @@ void tst_Collections::foreach_2()
QCOMPARE(varl1.count(), intlist.count());
QCOMPARE(varl2.count(), intlist.count());
QCOMPARE(varl3.count(), intlist.count());
- foreach_test_arrays(varl1);
- foreach_test_arrays(varl2);
- foreach_test_arrays(varl3);
QVarLengthArray<QString> varl4;
QVarLengthArray<QString, 3> varl5;
@@ -3525,9 +3203,6 @@ void tst_Collections::foreach_2()
QCOMPARE(varl4.count(), strlist.count());
QCOMPARE(varl5.count(), strlist.count());
QCOMPARE(varl6.count(), strlist.count());
- foreach_test_arrays(varl4);
- foreach_test_arrays(varl5);
- foreach_test_arrays(varl6);
}
struct IntOrString
@@ -3615,30 +3290,8 @@ template<class Container> void insert_remove_loop_impl()
}
-//Add insert(int, int, T) so it has the same interface as QVector and QVarLengthArray for the test.
template<typename T>
-struct ExtList : QList<T> {
- using QList<T>::insert;
- void insert(int before, int n, const T&x) {
- while (n--) {
- this->insert(before, x );
- }
- }
- void insert(typename QList<T>::iterator before, int n, const T&x) {
- while (n--) {
- before = this->insert(before, x);
- }
- }
-
- void remove(int i) {
- this->removeAt(i);
- }
- void remove(int i, int n) {
- while (n--) {
- this->removeAt(i);
- }
- }
-};
+using ExtList = QList<T>;
void tst_Collections::insert_remove_loop()
{
diff --git a/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro b/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro
index e46d51761e..c114014bf4 100644
--- a/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro
+++ b/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro
@@ -2,7 +2,3 @@ CONFIG += testcase
TARGET = tst_containerapisymmetry
SOURCES += tst_containerapisymmetry.cpp
QT = core testlib
-
-# This test does not work with strict iterators
-DEFINES -= QT_STRICT_ITERATORS
-DEFINES -= QT_NO_LINKED_LIST
diff --git a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp
index 88c0c5055c..fe6e82e19c 100644
--- a/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp
+++ b/tests/auto/corelib/tools/containerapisymmetry/tst_containerapisymmetry.cpp
@@ -29,7 +29,6 @@
#include <QtTest/QtTest>
#include "qbytearray.h"
-#include "qlinkedlist.h"
#include "qlist.h"
#include "qstring.h"
#include "qvarlengtharray.h"
@@ -324,11 +323,6 @@ private Q_SLOTS:
#endif
}
- void ranged_ctor_QLinkedList_int() { ranged_ctor_non_associative_impl<QLinkedList<int>>(); }
- void ranged_ctor_QLinkedList_Movable() { ranged_ctor_non_associative_impl<QLinkedList<Movable>>(); }
- void ranged_ctor_QLinkedList_Complex() { ranged_ctor_non_associative_impl<QLinkedList<Complex>>(); }
- void ranged_ctor_QLinkedList_duplicates_strategy() { non_associative_container_duplicates_strategy<QLinkedList>(); }
-
void ranged_ctor_std_set_int() { ranged_ctor_non_associative_impl<std::set<int>>(); }
void ranged_ctor_std_set_Movable() { ranged_ctor_non_associative_impl<std::set<Movable>>(); }
void ranged_ctor_std_set_Complex() { ranged_ctor_non_associative_impl<std::set<Complex>>(); }
@@ -482,7 +476,6 @@ private Q_SLOTS:
void front_back_std_vector() { front_back_impl<std::vector<int>>(); }
void front_back_QVector() { front_back_impl<QVector<int>>(); }
void front_back_QList() { front_back_impl<QList<qintptr>>(); }
- void front_back_QLinkedList() { front_back_impl<QLinkedList<int>>(); }
void front_back_QVarLengthArray() { front_back_impl<QVarLengthArray<int>>(); }
void front_back_QString() { front_back_impl<QString>(); }
void front_back_QStringRef() { front_back_impl<QStringRef>(); }
@@ -580,9 +573,6 @@ template<typename ... T>
struct ContainerDuplicatedValuesStrategy<VarLengthArray<T...>> : ContainerAcceptsDuplicateValues {};
template<typename ... T>
-struct ContainerDuplicatedValuesStrategy<QList<T...>> : ContainerAcceptsDuplicateValues {};
-
-template<typename ... T>
struct ContainerDuplicatedValuesStrategy<std::list<T...>> : ContainerAcceptsDuplicateValues {};
#if COMPILER_HAS_STDLIB_INCLUDE(<forward_list>)
@@ -590,9 +580,6 @@ template<typename ... T>
struct ContainerDuplicatedValuesStrategy<std::forward_list<T...>> : ContainerAcceptsDuplicateValues {};
#endif
-template<typename ... T>
-struct ContainerDuplicatedValuesStrategy<QLinkedList<T...>> : ContainerAcceptsDuplicateValues {};
-
// assuming https://cplusplus.github.io/LWG/lwg-active.html#2844 resolution
template<typename ... T>
struct ContainerDuplicatedValuesStrategy<std::set<T...>> : ContainerRejectsDuplicateValues {};
@@ -798,8 +785,6 @@ template <> QStringView make(int size) { return QStringView(s_string).left(siz
template <> QLatin1String make(int size) { return QLatin1String("\1\2\3\4\5\6\7", size); }
template <typename T> T clean(T &&t) { return std::forward<T>(t); }
-inline QChar clean(QCharRef ch) { return ch; }
-inline char clean(QByteRef ch) { return ch; }
inline char clean(QLatin1Char ch) { return ch.toLatin1(); }
template <typename Container>
diff --git a/tests/auto/corelib/tools/qalgorithms/CMakeLists.txt b/tests/auto/corelib/tools/qalgorithms/CMakeLists.txt
new file mode 100644
index 0000000000..14b7c95f4b
--- /dev/null
+++ b/tests/auto/corelib/tools/qalgorithms/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qalgorithms.pro.
+
+#####################################################################
+## tst_qalgorithms Test:
+#####################################################################
+
+add_qt_test(tst_qalgorithms
+ SOURCES
+ tst_qalgorithms.cpp
+)
diff --git a/tests/auto/corelib/tools/qarraydata/CMakeLists.txt b/tests/auto/corelib/tools/qarraydata/CMakeLists.txt
new file mode 100644
index 0000000000..f68c3714aa
--- /dev/null
+++ b/tests/auto/corelib/tools/qarraydata/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from qarraydata.pro.
+
+#####################################################################
+## tst_qarraydata Test:
+#####################################################################
+
+add_qt_test(tst_qarraydata
+ SOURCES
+ simplevector.h
+ tst_qarraydata.cpp
+)
diff --git a/tests/auto/corelib/tools/qarraydata/simplevector.h b/tests/auto/corelib/tools/qarraydata/simplevector.h
index 9dd8b05796..94cee5d887 100644
--- a/tests/auto/corelib/tools/qarraydata/simplevector.h
+++ b/tests/auto/corelib/tools/qarraydata/simplevector.h
@@ -76,25 +76,32 @@ public:
{
}
- explicit SimpleVector(Data *ptr)
- : d(ptr)
+ template <size_t N>
+ explicit SimpleVector(QStaticArrayData<T, N> &ptr)
+ : d(static_cast<Data *>(&ptr.header), ptr.data, N)
+ {
+ }
+
+ SimpleVector(Data *header, T *data, size_t len = 0)
+ : d(header, data, len)
+ {
+ }
+
+ explicit SimpleVector(QPair<Data*, T*> ptr, size_t len = 0)
+ : d(ptr, len)
{
}
- bool empty() const { return d->size == 0; }
+ bool empty() const { return d.size == 0; }
bool isNull() const { return d.isNull(); }
bool isEmpty() const { return this->empty(); }
- bool isStatic() const { return d->ref.isStatic(); }
- bool isShared() const { return d->ref.isShared(); }
+ bool isStatic() const { return d->isStatic(); }
+ bool isShared() const { return d->isShared(); }
bool isSharedWith(const SimpleVector &other) const { return d == other.d; }
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- bool isSharable() const { return d->ref.isSharable(); }
- void setSharable(bool sharable) { d.setSharable(sharable); }
-#endif
- size_t size() const { return d->size; }
- size_t capacity() const { return d->alloc; }
+ size_t size() const { return d.size; }
+ size_t capacity() const { return d->constAllocatedCapacity(); }
iterator begin() { detach(); return d->begin(); }
iterator end() { detach(); return d->end(); }
@@ -143,10 +150,10 @@ public:
return;
if (n <= capacity()) {
- if (d->capacityReserved)
+ if (d->flags() & Data::CapacityReserved)
return;
- if (!d->ref.isShared()) {
- d->capacityReserved = 1;
+ if (!d->isShared()) {
+ d->flags() |= Data::CapacityReserved;
return;
}
}
@@ -163,7 +170,7 @@ public:
if (size() == newSize)
return;
- if (d.needsDetach() || newSize > capacity()) {
+ if (d->needsDetach() || newSize > capacity()) {
SimpleVector detached(Data::allocate(
d->detachCapacity(newSize), d->detachFlags()));
if (newSize) {
@@ -199,11 +206,11 @@ public:
return;
T *const begin = d->begin();
- if (d.needsDetach()
+ if (d->needsDetach()
|| capacity() - size() < size_t(last - first)) {
SimpleVector detached(Data::allocate(
d->detachCapacity(size() + (last - first)),
- d->detachFlags() | Data::Grow));
+ d->detachFlags() | Data::GrowsForward));
detached.d->copyAppend(first, last);
detached.d->copyAppend(begin, begin + d->size);
@@ -220,11 +227,11 @@ public:
if (first == last)
return;
- if (d.needsDetach()
+ if (d->needsDetach()
|| capacity() - size() < size_t(last - first)) {
SimpleVector detached(Data::allocate(
d->detachCapacity(size() + (last - first)),
- d->detachFlags() | Data::Grow));
+ d->detachFlags() | Data::GrowsForward));
if (d->size) {
const T *const begin = constBegin();
@@ -260,11 +267,11 @@ public:
const iterator begin = d->begin();
const iterator where = begin + position;
const iterator end = begin + d->size;
- if (d.needsDetach()
+ if (d->needsDetach()
|| capacity() - size() < size_t(last - first)) {
SimpleVector detached(Data::allocate(
d->detachCapacity(size() + (last - first)),
- d->detachFlags() | Data::Grow));
+ d->detachFlags() | Data::GrowsForward));
if (position)
detached.d->copyAppend(begin, where);
@@ -298,7 +305,7 @@ public:
const T *const begin = d->begin();
const T *const end = begin + d->size;
- if (d.needsDetach()) {
+ if (d->needsDetach()) {
SimpleVector detached(Data::allocate(
d->detachCapacity(size() - (last - first)),
d->detachFlags()));
@@ -332,7 +339,7 @@ public:
}
static SimpleVector fromRawData(const T *data, size_t size,
- QArrayData::AllocationOptions options = Data::Default)
+ QArrayData::ArrayOptions options = Data::DefaultRawFlags)
{
return SimpleVector(Data::fromRawData(data, size, options));
}
diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
index 25e2f21d03..1366eebf97 100644
--- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
+++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
@@ -37,11 +37,8 @@ struct SharedNullVerifier
{
SharedNullVerifier()
{
- Q_ASSERT(QArrayData::shared_null[0].ref.isStatic());
- Q_ASSERT(QArrayData::shared_null[0].ref.isShared());
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- Q_ASSERT(QArrayData::shared_null[0].ref.isSharable());
-#endif
+ Q_ASSERT(QArrayData::shared_null[0].isStatic());
+ Q_ASSERT(QArrayData::shared_null[0].isShared());
}
};
@@ -59,7 +56,6 @@ class tst_QArrayData : public QObject
private slots:
void referenceCounting();
void sharedNullEmpty();
- void staticData();
void simpleVector();
void simpleVectorReserve_data();
void simpleVectorReserve();
@@ -73,8 +69,6 @@ private slots:
void gccBug43247();
void arrayOps();
void arrayOps2();
- void setSharable_data();
- void setSharable();
void fromRawData_data();
void fromRawData();
void literals();
@@ -89,70 +83,42 @@ void tst_QArrayData::referenceCounting()
{
{
// Reference counting initialized to 1 (owned)
- QArrayData array = { { Q_BASIC_ATOMIC_INITIALIZER(1) }, 0, 0, 0, 0 };
+ QArrayData array = { Q_BASIC_ATOMIC_INITIALIZER(1), QArrayData::DefaultRawFlags, 0 };
- QCOMPARE(array.ref.atomic.loadRelaxed(), 1);
+ QCOMPARE(array.ref_.loadRelaxed(), 1);
- QVERIFY(!array.ref.isStatic());
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QVERIFY(array.ref.isSharable());
-#endif
+ QVERIFY(!array.isStatic());
- QVERIFY(array.ref.ref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), 2);
+ QVERIFY(array.ref());
+ QCOMPARE(array.ref_.loadRelaxed(), 2);
- QVERIFY(array.ref.deref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), 1);
+ QVERIFY(array.deref());
+ QCOMPARE(array.ref_.loadRelaxed(), 1);
- QVERIFY(array.ref.ref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), 2);
+ QVERIFY(array.ref());
+ QCOMPARE(array.ref_.loadRelaxed(), 2);
- QVERIFY(array.ref.deref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), 1);
+ QVERIFY(array.deref());
+ QCOMPARE(array.ref_.loadRelaxed(), 1);
- QVERIFY(!array.ref.deref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), 0);
+ QVERIFY(!array.deref());
+ QCOMPARE(array.ref_.loadRelaxed(), 0);
// Now would be a good time to free/release allocated data
}
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- {
- // Reference counting initialized to 0 (non-sharable)
- QArrayData array = { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 };
-
- QCOMPARE(array.ref.atomic.loadRelaxed(), 0);
-
- QVERIFY(!array.ref.isStatic());
- QVERIFY(!array.ref.isSharable());
-
- QVERIFY(!array.ref.ref());
- // Reference counting fails, data should be copied
- QCOMPARE(array.ref.atomic.loadRelaxed(), 0);
-
- QVERIFY(!array.ref.deref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), 0);
-
- // Free/release data
- }
-#endif
-
{
// Reference counting initialized to -1 (static read-only data)
- QArrayData array = { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, 0 };
+ QArrayData array = { Q_BASIC_ATOMIC_INITIALIZER(-1), QArrayData::StaticDataFlags, 0 };
- QCOMPARE(array.ref.atomic.loadRelaxed(), -1);
+ QCOMPARE(array.ref_.loadRelaxed(), -1);
- QVERIFY(array.ref.isStatic());
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QVERIFY(array.ref.isSharable());
-#endif
+ QVERIFY(array.isStatic());
- QVERIFY(array.ref.ref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), -1);
+ QVERIFY(array.ref());
+ QCOMPARE(array.ref_.loadRelaxed(), -1);
- QVERIFY(array.ref.deref());
- QCOMPARE(array.ref.atomic.loadRelaxed(), -1);
+ QVERIFY(array.deref());
+ QCOMPARE(array.ref_.loadRelaxed(), -1);
}
}
@@ -160,74 +126,39 @@ void tst_QArrayData::referenceCounting()
void tst_QArrayData::sharedNullEmpty()
{
QArrayData *null = const_cast<QArrayData *>(QArrayData::shared_null);
- QArrayData *empty = QArrayData::allocate(1, Q_ALIGNOF(QArrayData), 0);
-
- QVERIFY(null->ref.isStatic());
- QVERIFY(null->ref.isShared());
+ QArrayData *empty;
+ QArrayData::allocate(&empty, 1, alignof(QArrayData), 0);
- QVERIFY(empty->ref.isStatic());
- QVERIFY(empty->ref.isShared());
+ QVERIFY(null->isStatic());
+ QVERIFY(null->isShared());
- QCOMPARE(null->ref.atomic.loadRelaxed(), -1);
- QCOMPARE(empty->ref.atomic.loadRelaxed(), -1);
+ QVERIFY(empty->isStatic());
+ QVERIFY(empty->isShared());
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QVERIFY(null->ref.isSharable());
- QVERIFY(empty->ref.isSharable());
-#endif
+ QCOMPARE(null->ref_.loadRelaxed(), -1);
+ QCOMPARE(empty->ref_.loadRelaxed(), -1);
- QVERIFY(null->ref.ref());
- QVERIFY(empty->ref.ref());
+ QCOMPARE(null->ref_.loadRelaxed(), -1);
+ QCOMPARE(empty->ref_.loadRelaxed(), -1);
- QCOMPARE(null->ref.atomic.loadRelaxed(), -1);
- QCOMPARE(empty->ref.atomic.loadRelaxed(), -1);
+ QVERIFY(null->deref());
+ QVERIFY(empty->deref());
- QVERIFY(null->ref.deref());
- QVERIFY(empty->ref.deref());
-
- QCOMPARE(null->ref.atomic.loadRelaxed(), -1);
- QCOMPARE(empty->ref.atomic.loadRelaxed(), -1);
+ QCOMPARE(null->ref_.loadRelaxed(), -1);
+ QCOMPARE(empty->ref_.loadRelaxed(), -1);
QVERIFY(null != empty);
- QCOMPARE(null->size, 0);
- QCOMPARE(null->alloc, 0u);
- QCOMPARE(null->capacityReserved, 0u);
+ QCOMPARE(null->allocatedCapacity(), size_t(0));
- QCOMPARE(empty->size, 0);
- QCOMPARE(empty->alloc, 0u);
- QCOMPARE(empty->capacityReserved, 0u);
-}
-
-void tst_QArrayData::staticData()
-{
- QStaticArrayData<char, 10> charArray = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(char, 10),
- { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' }
- };
- QStaticArrayData<int, 10> intArray = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(int, 10),
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
- };
- QStaticArrayData<double, 10> doubleArray = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(double, 10),
- { 0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f }
- };
-
- QCOMPARE(charArray.header.size, 10);
- QCOMPARE(intArray.header.size, 10);
- QCOMPARE(doubleArray.header.size, 10);
-
- QCOMPARE(charArray.header.data(), reinterpret_cast<void *>(&charArray.data));
- QCOMPARE(intArray.header.data(), reinterpret_cast<void *>(&intArray.data));
- QCOMPARE(doubleArray.header.data(), reinterpret_cast<void *>(&doubleArray.data));
+ QCOMPARE(empty->allocatedCapacity(), size_t(0));
}
void tst_QArrayData::simpleVector()
{
- QArrayData data0 = { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, 0 };
+ QArrayData data0 = { Q_BASIC_ATOMIC_INITIALIZER(-1), QArrayData::StaticDataFlags, 0 };
QStaticArrayData<int, 7> data1 = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(int, 7),
+ { Q_BASIC_ATOMIC_INITIALIZER(-1), QArrayData::StaticDataFlags, 0 },
{ 0, 1, 2, 3, 4, 5, 6 }
};
@@ -235,10 +166,10 @@ void tst_QArrayData::simpleVector()
SimpleVector<int> v1;
SimpleVector<int> v2(v1);
- SimpleVector<int> v3(static_cast<QTypedArrayData<int> *>(&data0));
- SimpleVector<int> v4(static_cast<QTypedArrayData<int> *>(&data1.header));
- SimpleVector<int> v5(static_cast<QTypedArrayData<int> *>(&data0));
- SimpleVector<int> v6(static_cast<QTypedArrayData<int> *>(&data1.header));
+ SimpleVector<int> v3(static_cast<QTypedArrayData<int> *>(&data0), 0, 0);
+ SimpleVector<int> v4(data1);
+ SimpleVector<int> v5(static_cast<QTypedArrayData<int> *>(&data0), 0, 0);
+ SimpleVector<int> v6(data1);
SimpleVector<int> v7(10, 5);
SimpleVector<int> v8(array, array + sizeof(array)/sizeof(*array));
@@ -302,17 +233,6 @@ void tst_QArrayData::simpleVector()
QVERIFY(!v7.isShared());
QVERIFY(!v8.isShared());
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QVERIFY(v1.isSharable());
- QVERIFY(v2.isSharable());
- QVERIFY(v3.isSharable());
- QVERIFY(v4.isSharable());
- QVERIFY(v5.isSharable());
- QVERIFY(v6.isSharable());
- QVERIFY(v7.isSharable());
- QVERIFY(v8.isSharable());
-#endif
-
QVERIFY(v1.isSharedWith(v2));
QVERIFY(v1.isSharedWith(v3));
QVERIFY(v1.isSharedWith(v4));
@@ -494,71 +414,6 @@ void tst_QArrayData::simpleVector()
for (int i = 0; i < 120; ++i)
QCOMPARE(v1[i], v8[i % 10]);
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- {
- v7.setSharable(true);
- QVERIFY(v7.isSharable());
-
- SimpleVector<int> copy1(v7);
- QVERIFY(copy1.isSharedWith(v7));
-
- v7.setSharable(false);
- QVERIFY(!v7.isSharable());
-
- QVERIFY(!copy1.isSharedWith(v7));
- QCOMPARE(v7.size(), copy1.size());
- for (size_t i = 0; i < copy1.size(); ++i)
- QCOMPARE(v7[i], copy1[i]);
-
- SimpleVector<int> clone(v7);
- QVERIFY(!clone.isSharedWith(v7));
- QCOMPARE(clone.size(), copy1.size());
- for (size_t i = 0; i < copy1.size(); ++i)
- QCOMPARE(clone[i], copy1[i]);
-
- v7.setSharable(true);
- QVERIFY(v7.isSharable());
-
- SimpleVector<int> copy2(v7);
- QVERIFY(copy2.isSharedWith(v7));
- }
-
- {
- SimpleVector<int> null;
- SimpleVector<int> empty(0, 5);
-
- QVERIFY(null.isSharable());
- QVERIFY(empty.isSharable());
-
- null.setSharable(true);
- empty.setSharable(true);
-
- QVERIFY(null.isSharable());
- QVERIFY(empty.isSharable());
-
- QVERIFY(null.isEmpty());
- QVERIFY(empty.isEmpty());
-
- null.setSharable(false);
- empty.setSharable(false);
-
- QVERIFY(!null.isSharable());
- QVERIFY(!empty.isSharable());
-
- QVERIFY(null.isEmpty());
- QVERIFY(empty.isEmpty());
-
- null.setSharable(true);
- empty.setSharable(true);
-
- QVERIFY(null.isSharable());
- QVERIFY(empty.isSharable());
-
- QVERIFY(null.isEmpty());
- QVERIFY(empty.isEmpty());
- }
-#endif
}
Q_DECLARE_METATYPE(SimpleVector<int>)
@@ -574,11 +429,13 @@ void tst_QArrayData::simpleVectorReserve_data()
QTest::newRow("non-empty") << SimpleVector<int>(5, 42) << size_t(5) << size_t(5);
static const QStaticArrayData<int, 15> array = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(int, 15),
+ { Q_BASIC_ATOMIC_INITIALIZER(-1), QArrayData::StaticDataFlags, 0 },
{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } };
- QArrayDataPointerRef<int> p = {
+ const QArrayDataPointerRef<int> p = {
static_cast<QTypedArrayData<int> *>(
- const_cast<QArrayData *>(&array.header)) };
+ const_cast<QArrayData *>(&array.header)),
+ const_cast<int *>(array.data),
+ sizeof(array.data) / sizeof(array.data[0]) };
QTest::newRow("static") << SimpleVector<int>(p) << size_t(0) << size_t(15);
QTest::newRow("raw-data") << SimpleVector<int>::fromRawData(array.data, 15) << size_t(0) << size_t(15);
@@ -641,15 +498,14 @@ struct Deallocator
};
Q_DECLARE_METATYPE(const QArrayData *)
-Q_DECLARE_METATYPE(QArrayData::AllocationOptions)
+Q_DECLARE_METATYPE(QArrayData::ArrayOptions)
void tst_QArrayData::allocate_data()
{
QTest::addColumn<size_t>("objectSize");
QTest::addColumn<size_t>("alignment");
- QTest::addColumn<QArrayData::AllocationOptions>("allocateOptions");
+ QTest::addColumn<QArrayData::ArrayOptions>("allocateOptions");
QTest::addColumn<bool>("isCapacityReserved");
- QTest::addColumn<bool>("isSharable"); // ### Qt6: remove
QTest::addColumn<const QArrayData *>("commonEmpty");
struct {
@@ -657,35 +513,24 @@ void tst_QArrayData::allocate_data()
size_t objectSize;
size_t alignment;
} types[] = {
- { "char", sizeof(char), Q_ALIGNOF(char) },
- { "short", sizeof(short), Q_ALIGNOF(short) },
- { "void *", sizeof(void *), Q_ALIGNOF(void *) }
+ { "char", sizeof(char), alignof(char) },
+ { "short", sizeof(short), alignof(short) },
+ { "void *", sizeof(void *), alignof(void *) }
};
- QArrayData *shared_empty = QArrayData::allocate(0, Q_ALIGNOF(QArrayData), 0);
+ QArrayData *shared_empty;
+ QArrayData::allocate(&shared_empty, 1, alignof(QArrayData), 0);
QVERIFY(shared_empty);
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QArrayData *unsharable_empty = QArrayData::allocate(0, Q_ALIGNOF(QArrayData), 0, QArrayData::Unsharable);
- QVERIFY(unsharable_empty);
-#endif
-
struct {
char const *description;
- QArrayData::AllocationOptions allocateOptions;
+ QArrayData::ArrayOptions allocateOptions;
bool isCapacityReserved;
- bool isSharable;
const QArrayData *commonEmpty;
} options[] = {
- { "Default", QArrayData::Default, false, true, shared_empty },
- { "Reserved", QArrayData::CapacityReserved, true, true, shared_empty },
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- { "Reserved | Unsharable",
- QArrayData::CapacityReserved | QArrayData::Unsharable, true, false,
- unsharable_empty },
- { "Unsharable", QArrayData::Unsharable, false, false, unsharable_empty },
-#endif
- { "Grow", QArrayData::Grow, false, true, shared_empty }
+ { "Default", QArrayData::DefaultAllocationFlags, false, shared_empty },
+ { "Reserved", QArrayData::CapacityReserved, true, shared_empty },
+ { "Grow", QArrayData::GrowsForward, false, shared_empty }
};
for (size_t i = 0; i < sizeof(types)/sizeof(types[0]); ++i)
@@ -696,47 +541,45 @@ void tst_QArrayData::allocate_data()
+ QLatin1String(options[j].description)))
<< types[i].objectSize << types[i].alignment
<< options[j].allocateOptions << options[j].isCapacityReserved
- << options[j].isSharable << options[j].commonEmpty;
+ << options[j].commonEmpty;
}
void tst_QArrayData::allocate()
{
QFETCH(size_t, objectSize);
QFETCH(size_t, alignment);
- QFETCH(QArrayData::AllocationOptions, allocateOptions);
+ QFETCH(QArrayData::ArrayOptions, allocateOptions);
QFETCH(bool, isCapacityReserved);
QFETCH(const QArrayData *, commonEmpty);
// Minimum alignment that can be requested is that of QArrayData.
// Typically, this alignment is sizeof(void *) and ensured by malloc.
- size_t minAlignment = qMax(alignment, Q_ALIGNOF(QArrayData));
+ size_t minAlignment = qMax(alignment, alignof(QArrayData));
// Shared Empty
- QCOMPARE(QArrayData::allocate(objectSize, minAlignment, 0,
- QArrayData::AllocationOptions(allocateOptions)), commonEmpty);
+ QArrayData *empty;
+ QCOMPARE((QArrayData::allocate(&empty, objectSize, minAlignment, 0,
+ QArrayData::ArrayOptions(allocateOptions)), empty), commonEmpty);
Deallocator keeper(objectSize, minAlignment);
keeper.headers.reserve(1024);
for (int capacity = 1; capacity <= 1024; capacity <<= 1) {
- QArrayData *data = QArrayData::allocate(objectSize, minAlignment,
- capacity, QArrayData::AllocationOptions(allocateOptions));
+ QArrayData *data;
+ void *dataPointer = QArrayData::allocate(&data, objectSize, minAlignment,
+ capacity, QArrayData::ArrayOptions(allocateOptions));
+
keeper.headers.append(data);
- QCOMPARE(data->size, 0);
- if (allocateOptions & QArrayData::Grow)
- QVERIFY(data->alloc > uint(capacity));
+ if (allocateOptions & QArrayData::GrowsForward)
+ QVERIFY(data->allocatedCapacity() > uint(capacity));
else
- QCOMPARE(data->alloc, uint(capacity));
- QCOMPARE(data->capacityReserved, uint(isCapacityReserved));
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QFETCH(bool, isSharable);
- QCOMPARE(data->ref.isSharable(), isSharable);
-#endif
+ QCOMPARE(data->allocatedCapacity(), size_t(capacity));
+ QCOMPARE(bool(data->flags & QArrayData::CapacityReserved), isCapacityReserved);
// Check that the allocated array can be used. Best tested with a
// memory checker, such as valgrind, running.
- ::memset(data->data(), 'A', objectSize * capacity);
+ ::memset(dataPointer, 'A', objectSize * capacity);
}
}
@@ -744,47 +587,40 @@ void tst_QArrayData::reallocate()
{
QFETCH(size_t, objectSize);
QFETCH(size_t, alignment);
- QFETCH(QArrayData::AllocationOptions, allocateOptions);
+ QFETCH(QArrayData::ArrayOptions, allocateOptions);
QFETCH(bool, isCapacityReserved);
- // Maximum alignment that can be requested is that of QArrayData,
- // otherwise, we can't use reallocate().
- Q_ASSERT(alignment <= Q_ALIGNOF(QArrayData));
-
// Minimum alignment that can be requested is that of QArrayData.
// Typically, this alignment is sizeof(void *) and ensured by malloc.
- size_t minAlignment = qMax(alignment, Q_ALIGNOF(QArrayData));
+ size_t minAlignment = qMax(alignment, alignof(QArrayData));
int capacity = 10;
Deallocator keeper(objectSize, minAlignment);
- QArrayData *data = QArrayData::allocate(objectSize, minAlignment, capacity,
- QArrayData::AllocationOptions(allocateOptions) & ~QArrayData::Grow);
+ QArrayData *data;
+ void *dataPointer = QArrayData::allocate(&data, objectSize, minAlignment, capacity,
+ QArrayData::ArrayOptions(allocateOptions) & ~QArrayData::GrowsForward);
keeper.headers.append(data);
- memset(data->data(), 'A', objectSize * capacity);
- data->size = capacity;
+ memset(dataPointer, 'A', objectSize * capacity);
// now try to reallocate
int newCapacity = 40;
- data = QArrayData::reallocateUnaligned(data, objectSize, newCapacity,
- QArrayData::AllocationOptions(allocateOptions));
+ auto pair = QArrayData::reallocateUnaligned(data, dataPointer, objectSize, newCapacity,
+ QArrayData::ArrayOptions(allocateOptions));
+ data = pair.first;
+ dataPointer = pair.second;
QVERIFY(data);
keeper.headers.clear();
keeper.headers.append(data);
- QCOMPARE(data->size, capacity);
- if (allocateOptions & QArrayData::Grow)
- QVERIFY(data->alloc > uint(newCapacity));
+ if (allocateOptions & QArrayData::GrowsForward)
+ QVERIFY(data->allocatedCapacity() > size_t(newCapacity));
else
- QCOMPARE(data->alloc, uint(newCapacity));
- QCOMPARE(data->capacityReserved, uint(isCapacityReserved));
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QFETCH(bool, isSharable);
- QCOMPARE(data->ref.isSharable(), isSharable);
-#endif
+ QCOMPARE(data->allocatedCapacity(), size_t(newCapacity));
+ QCOMPARE(!(data->flags & QArrayData::CapacityReserved), !isCapacityReserved);
for (int i = 0; i < capacity; ++i)
- QCOMPARE(static_cast<char *>(data->data())[i], 'A');
+ QCOMPARE(static_cast<char *>(dataPointer)[i], 'A');
}
class Unaligned
@@ -808,95 +644,52 @@ void tst_QArrayData::alignment()
// Minimum alignment that can be requested is that of QArrayData.
// Typically, this alignment is sizeof(void *) and ensured by malloc.
- size_t minAlignment = qMax(alignment, Q_ALIGNOF(QArrayData));
+ size_t minAlignment = qMax(alignment, alignof(QArrayData));
Deallocator keeper(sizeof(Unaligned), minAlignment);
keeper.headers.reserve(100);
for (int i = 0; i < 100; ++i) {
- QArrayData *data = QArrayData::allocate(sizeof(Unaligned),
- minAlignment, 8, QArrayData::Default);
+ QArrayData *data;
+ void *dataPointer = QArrayData::allocate(&data, sizeof(Unaligned),
+ minAlignment, 8, QArrayData::DefaultAllocationFlags);
keeper.headers.append(data);
QVERIFY(data);
- QCOMPARE(data->size, 0);
- QVERIFY(data->alloc >= uint(8));
+ QVERIFY(data->allocatedCapacity() >= uint(8));
// These conditions should hold as long as header and array are
// allocated together
- QVERIFY(data->offset >= qptrdiff(sizeof(QArrayData)));
- QVERIFY(data->offset <= qptrdiff(sizeof(QArrayData)
- + minAlignment - Q_ALIGNOF(QArrayData)));
+ qptrdiff offset = reinterpret_cast<char *>(dataPointer) -
+ reinterpret_cast<char *>(data);
+ QVERIFY(offset >= qptrdiff(sizeof(QArrayData)));
+ QVERIFY(offset <= qptrdiff(sizeof(QArrayData)
+ + minAlignment - alignof(QArrayData)));
// Data is aligned
- QCOMPARE(quintptr(quintptr(data->data()) % alignment), quintptr(0u));
+ QCOMPARE(quintptr(quintptr(dataPointer) % alignment), quintptr(0u));
// Check that the allocated array can be used. Best tested with a
// memory checker, such as valgrind, running.
- ::memset(data->data(), 'A', sizeof(Unaligned) * 8);
+ ::memset(dataPointer, 'A', sizeof(Unaligned) * 8);
}
}
void tst_QArrayData::typedData()
{
- QStaticArrayData<int, 10> data = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(int, 10),
- { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
- };
- QCOMPARE(data.header.size, 10);
-
- {
- QTypedArrayData<int> *array =
- static_cast<QTypedArrayData<int> *>(&data.header);
- QCOMPARE(array->data(), data.data);
-
- int j = 0;
- for (QTypedArrayData<int>::iterator iter = array->begin();
- iter != array->end(); ++iter, ++j)
- QCOMPARE((const int *)iter, data.data + j);
- QCOMPARE(j, 10);
- }
-
- {
- const QTypedArrayData<int> *array =
- static_cast<const QTypedArrayData<int> *>(&data.header);
-
- QCOMPARE(array->data(), data.data);
-
- int j = 0;
- for (QTypedArrayData<int>::const_iterator iter = array->begin();
- iter != array->end(); ++iter, ++j)
- QCOMPARE((const int *)iter, data.data + j);
- QCOMPARE(j, 10);
- }
-
- {
- QTypedArrayData<int> *null = QTypedArrayData<int>::sharedNull();
- QTypedArrayData<int> *empty = QTypedArrayData<int>::allocate(0);
-
- QVERIFY(null != empty);
-
- QCOMPARE(null->size, 0);
- QCOMPARE(empty->size, 0);
-
- QCOMPARE(null->begin(), null->end());
- QCOMPARE(empty->begin(), empty->end());
- }
-
-
{
Deallocator keeper(sizeof(char),
- Q_ALIGNOF(QTypedArrayData<char>::AlignmentDummy));
- QArrayData *array = QTypedArrayData<char>::allocate(10);
+ alignof(QTypedArrayData<char>::AlignmentDummy));
+ QPair<QTypedArrayData<char> *, char *> pair = QTypedArrayData<char>::allocate(10);
+ QArrayData *array = pair.first;
keeper.headers.append(array);
QVERIFY(array);
- QCOMPARE(array->size, 0);
- QCOMPARE(array->alloc, 10u);
+ QCOMPARE(array->allocatedCapacity(), size_t(10));
// Check that the allocated array can be used. Best tested with a
// memory checker, such as valgrind, running.
- ::memset(array->data(), 0, 10 * sizeof(char));
+ ::memset(pair.second, 0, 10 * sizeof(char));
keeper.headers.clear();
QTypedArrayData<short>::deallocate(array);
@@ -906,17 +699,17 @@ void tst_QArrayData::typedData()
{
Deallocator keeper(sizeof(short),
- Q_ALIGNOF(QTypedArrayData<short>::AlignmentDummy));
- QArrayData *array = QTypedArrayData<short>::allocate(10);
+ alignof(QTypedArrayData<short>::AlignmentDummy));
+ QPair<QTypedArrayData<short> *, short *> pair = QTypedArrayData<short>::allocate(10);
+ QArrayData *array = pair.first;
keeper.headers.append(array);
QVERIFY(array);
- QCOMPARE(array->size, 0);
- QCOMPARE(array->alloc, 10u);
+ QCOMPARE(array->allocatedCapacity(), size_t(10));
// Check that the allocated array can be used. Best tested with a
// memory checker, such as valgrind, running.
- ::memset(array->data(), 0, 10 * sizeof(short));
+ ::memset(pair.second, 0, 10 * sizeof(short));
keeper.headers.clear();
QTypedArrayData<short>::deallocate(array);
@@ -926,17 +719,17 @@ void tst_QArrayData::typedData()
{
Deallocator keeper(sizeof(double),
- Q_ALIGNOF(QTypedArrayData<double>::AlignmentDummy));
- QArrayData *array = QTypedArrayData<double>::allocate(10);
+ alignof(QTypedArrayData<double>::AlignmentDummy));
+ QPair<QTypedArrayData<double> *, double *> pair = QTypedArrayData<double>::allocate(10);
+ QArrayData *array = pair.first;
keeper.headers.append(array);
QVERIFY(array);
- QCOMPARE(array->size, 0);
- QCOMPARE(array->alloc, 10u);
+ QCOMPARE(array->allocatedCapacity(), size_t(10));
// Check that the allocated array can be used. Best tested with a
// memory checker, such as valgrind, running.
- ::memset(array->data(), 0, 10 * sizeof(double));
+ ::memset(pair.second, 0, 10 * sizeof(double));
keeper.headers.clear();
QTypedArrayData<double>::deallocate(array);
@@ -1354,136 +1147,6 @@ static inline bool arrayIsFilledWith(const QArrayDataPointer<int> &array,
return true;
}
-void tst_QArrayData::setSharable_data()
-{
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QTest::addColumn<QArrayDataPointer<int> >("array");
- QTest::addColumn<size_t>("size");
- QTest::addColumn<size_t>("capacity");
- QTest::addColumn<bool>("isCapacityReserved");
- QTest::addColumn<int>("fillValue");
-
- QArrayDataPointer<int> null;
- QArrayDataPointer<int> empty; empty.clear();
-
- static QStaticArrayData<int, 10> staticArrayData = {
- Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER(int, 10),
- { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }
- };
-
- QArrayDataPointer<int> emptyReserved(QTypedArrayData<int>::allocate(5,
- QArrayData::CapacityReserved));
- QArrayDataPointer<int> nonEmpty(QTypedArrayData<int>::allocate(5,
- QArrayData::Default));
- QArrayDataPointer<int> nonEmptyExtraCapacity(
- QTypedArrayData<int>::allocate(10, QArrayData::Default));
- QArrayDataPointer<int> nonEmptyReserved(QTypedArrayData<int>::allocate(15,
- QArrayData::CapacityReserved));
- QArrayDataPointer<int> staticArray(
- static_cast<QTypedArrayData<int> *>(&staticArrayData.header));
- QArrayDataPointer<int> rawData(
- QTypedArrayData<int>::fromRawData(staticArrayData.data, 10));
-
- nonEmpty->copyAppend(5, 1);
- nonEmptyExtraCapacity->copyAppend(5, 1);
- nonEmptyReserved->copyAppend(7, 2);
-
- QTest::newRow("shared-null") << null << size_t(0) << size_t(0) << false << 0;
- QTest::newRow("shared-empty") << empty << size_t(0) << size_t(0) << false << 0;
- // unsharable-empty implicitly tested in shared-empty
- QTest::newRow("empty-reserved") << emptyReserved << size_t(0) << size_t(5) << true << 0;
- QTest::newRow("non-empty") << nonEmpty << size_t(5) << size_t(5) << false << 1;
- QTest::newRow("non-empty-extra-capacity") << nonEmptyExtraCapacity << size_t(5) << size_t(10) << false << 1;
- QTest::newRow("non-empty-reserved") << nonEmptyReserved << size_t(7) << size_t(15) << true << 2;
- QTest::newRow("static-array") << staticArray << size_t(10) << size_t(0) << false << 3;
- QTest::newRow("raw-data") << rawData << size_t(10) << size_t(0) << false << 3;
-#endif
-}
-
-void tst_QArrayData::setSharable()
-{
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QFETCH(QArrayDataPointer<int>, array);
- QFETCH(size_t, size);
- QFETCH(size_t, capacity);
- QFETCH(bool, isCapacityReserved);
- QFETCH(int, fillValue);
-
- QVERIFY(array->ref.isShared()); // QTest has a copy
- QVERIFY(array->ref.isSharable());
-
- QCOMPARE(size_t(array->size), size);
- QCOMPARE(size_t(array->alloc), capacity);
- QCOMPARE(bool(array->capacityReserved), isCapacityReserved);
- QVERIFY(arrayIsFilledWith(array, fillValue, size));
-
- // shared-null becomes shared-empty, may otherwise detach
- array.setSharable(true);
-
- QVERIFY(array->ref.isSharable());
- QVERIFY(arrayIsFilledWith(array, fillValue, size));
-
- {
- QArrayDataPointer<int> copy(array);
- QVERIFY(array->ref.isShared());
- QVERIFY(array->ref.isSharable());
- QCOMPARE(copy.data(), array.data());
- }
-
- // Unshare, must detach
- array.setSharable(false);
-
- // Immutability (alloc == 0) is lost on detach, as is additional capacity
- // if capacityReserved flag is not set.
- if ((capacity == 0 && size != 0)
- || (!isCapacityReserved && capacity > size))
- capacity = size;
-
- QVERIFY(!array->ref.isShared());
- QVERIFY(!array->ref.isSharable());
-
- QCOMPARE(size_t(array->size), size);
- QCOMPARE(size_t(array->alloc), capacity);
- QCOMPARE(bool(array->capacityReserved), isCapacityReserved);
- QVERIFY(arrayIsFilledWith(array, fillValue, size));
-
- {
- QArrayDataPointer<int> copy(array);
- QVERIFY(!array->ref.isShared());
- QVERIFY(!array->ref.isSharable());
-
- // Null/empty is always shared
- QCOMPARE(copy->ref.isShared(), !(size || isCapacityReserved));
- QVERIFY(copy->ref.isSharable());
-
- QCOMPARE(size_t(copy->size), size);
- QCOMPARE(size_t(copy->alloc), capacity);
- QCOMPARE(bool(copy->capacityReserved), isCapacityReserved);
- QVERIFY(arrayIsFilledWith(copy, fillValue, size));
- }
-
- // Make sharable, again
- array.setSharable(true);
-
- QCOMPARE(array->ref.isShared(), !(size || isCapacityReserved));
- QVERIFY(array->ref.isSharable());
-
- QCOMPARE(size_t(array->size), size);
- QCOMPARE(size_t(array->alloc), capacity);
- QCOMPARE(bool(array->capacityReserved), isCapacityReserved);
- QVERIFY(arrayIsFilledWith(array, fillValue, size));
-
- {
- QArrayDataPointer<int> copy(array);
- QVERIFY(array->ref.isShared());
- QCOMPARE(copy.data(), array.data());
- }
-
- QCOMPARE(array->ref.isShared(), !(size || isCapacityReserved));
- QVERIFY(array->ref.isSharable());
-#endif
-}
-
struct ResetOnDtor
{
ResetOnDtor()
@@ -1517,7 +1180,7 @@ void fromRawData_impl()
{
// Default: Immutable, sharable
SimpleVector<T> raw = SimpleVector<T>::fromRawData(array,
- sizeof(array)/sizeof(array[0]), QArrayData::Default);
+ sizeof(array)/sizeof(array[0]), QArrayData::DefaultRawFlags);
QCOMPARE(raw.size(), size_t(11));
QCOMPARE((const T *)raw.constBegin(), array);
@@ -1531,37 +1194,6 @@ void fromRawData_impl()
QCOMPARE(raw.back(), T(11));
QVERIFY((const T *)raw.constBegin() != array);
}
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- {
- // Immutable, unsharable
- SimpleVector<T> raw = SimpleVector<T>::fromRawData(array,
- sizeof(array)/sizeof(array[0]), QArrayData::Unsharable);
-
- QCOMPARE(raw.size(), size_t(11));
- QCOMPARE((const T *)raw.constBegin(), array);
- QCOMPARE((const T *)raw.constEnd(), (const T *)(array + sizeof(array)/sizeof(array[0])));
-
- SimpleVector<T> copy(raw);
- QVERIFY(!copy.isSharedWith(raw));
- QVERIFY(!raw.isShared());
-
- QCOMPARE(copy.size(), size_t(11));
-
- for (size_t i = 0; i < 11; ++i) {
- QCOMPARE(const_(copy)[i], const_(raw)[i]);
- QCOMPARE(const_(copy)[i], T(i + 1));
- }
-
- QCOMPARE(raw.size(), size_t(11));
- QCOMPARE((const T *)raw.constBegin(), array);
- QCOMPARE((const T *)raw.constEnd(), (const T *)(array + sizeof(array)/sizeof(array[0])));
-
- // Detach
- QCOMPARE(raw.back(), T(11));
- QVERIFY((const T *)raw.constBegin() != array);
- }
-#endif
}
void tst_QArrayData::fromRawData_data()
@@ -1593,17 +1225,17 @@ void tst_QArrayData::literals()
{
{
QArrayDataPointer<char> d = Q_ARRAY_LITERAL(char, "ABCDEFGHIJ");
- QCOMPARE(d->size, 10 + 1);
+ QCOMPARE(d.size, 10u + 1u);
for (int i = 0; i < 10; ++i)
- QCOMPARE(d->data()[i], char('A' + i));
+ QCOMPARE(d.data()[i], char('A' + i));
}
{
// wchar_t is not necessarily 2-bytes
QArrayDataPointer<wchar_t> d = Q_ARRAY_LITERAL(wchar_t, L"ABCDEFGHIJ");
- QCOMPARE(d->size, 10 + 1);
+ QCOMPARE(d.size, 10u + 1u);
for (int i = 0; i < 10; ++i)
- QCOMPARE(d->data()[i], wchar_t('A' + i));
+ QCOMPARE(d.data()[i], wchar_t('A' + i));
}
{
@@ -1615,10 +1247,6 @@ void tst_QArrayData::literals()
// v.capacity() is unspecified, for now
QVERIFY(v.isStatic());
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QVERIFY(v.isSharable());
-#endif
QCOMPARE((void*)(const char*)(v.constBegin() + v.size()), (void*)(const char*)v.constEnd());
for (int i = 0; i < 10; ++i)
@@ -1645,26 +1273,26 @@ void tst_QArrayData::variadicLiterals()
{
QArrayDataPointer<int> d =
Q_ARRAY_LITERAL(int, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
- QCOMPARE(d->size, 10);
+ QCOMPARE(d.size, 10u);
for (int i = 0; i < 10; ++i)
- QCOMPARE(d->data()[i], i);
+ QCOMPARE(d.data()[i], i);
}
{
QArrayDataPointer<char> d = Q_ARRAY_LITERAL(char,
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J');
- QCOMPARE(d->size, 10);
+ QCOMPARE(d.size, 10u);
for (int i = 0; i < 10; ++i)
- QCOMPARE(d->data()[i], char('A' + i));
+ QCOMPARE(d.data()[i], char('A' + i));
}
{
QArrayDataPointer<const char *> d = Q_ARRAY_LITERAL(const char *,
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J");
- QCOMPARE(d->size, 10);
+ QCOMPARE(d.size, 10u);
for (int i = 0; i < 10; ++i) {
- QCOMPARE(d->data()[i][0], char('A' + i));
- QCOMPARE(d->data()[i][1], '\0');
+ QCOMPARE(d.data()[i][0], char('A' + i));
+ QCOMPARE(d.data()[i][1], '\0');
}
}
@@ -1677,10 +1305,6 @@ void tst_QArrayData::variadicLiterals()
// v.capacity() is unspecified, for now
QVERIFY(v.isStatic());
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QVERIFY(v.isSharable());
-#endif
QCOMPARE((const int *)(v.constBegin() + v.size()), (const int *)v.constEnd());
for (int i = 0; i < 7; ++i)
diff --git a/tests/auto/corelib/tools/qarraydata_strictiterators/qarraydata_strictiterators.pro b/tests/auto/corelib/tools/qarraydata_strictiterators/qarraydata_strictiterators.pro
deleted file mode 100644
index b01fbd84d1..0000000000
--- a/tests/auto/corelib/tools/qarraydata_strictiterators/qarraydata_strictiterators.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../qarraydata/qarraydata.pro)
-TARGET = tst_qarraydata_strictiterators
-DEFINES += QT_STRICT_ITERATORS=1 tst_QArrayData=tst_QArrayData_StrictIterators
diff --git a/tests/auto/corelib/tools/qbitarray/CMakeLists.txt b/tests/auto/corelib/tools/qbitarray/CMakeLists.txt
new file mode 100644
index 0000000000..65150c02a2
--- /dev/null
+++ b/tests/auto/corelib/tools/qbitarray/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qbitarray.pro.
+
+#####################################################################
+## tst_qbitarray Test:
+#####################################################################
+
+add_qt_test(tst_qbitarray
+ SOURCES
+ tst_qbitarray.cpp
+)
diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
index 9a7c099228..b2c7915aa0 100644
--- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
@@ -86,6 +86,9 @@ private slots:
void resize();
void fromBits_data();
void fromBits();
+
+ void toUInt32_data();
+ void toUInt32();
};
void tst_QBitArray::size_data()
@@ -667,5 +670,95 @@ void tst_QBitArray::fromBits()
QCOMPARE(QBitArray::fromBits(fromBits.bits(), fromBits.size()), expected);
}
+void tst_QBitArray::toUInt32_data()
+{
+ QTest::addColumn<QBitArray>("data");
+ QTest::addColumn<int>("endianness");
+ QTest::addColumn<bool>("check");
+ QTest::addColumn<quint32>("result");
+
+ QTest::newRow("ctor") << QBitArray()
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(0);
+
+ QTest::newRow("empty") << QBitArray(0)
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(0);
+
+ QTest::newRow("LittleEndian4") << QStringToQBitArray(QString("0111"))
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(14);
+
+ QTest::newRow("BigEndian4") << QStringToQBitArray(QString("0111"))
+ << static_cast<int>(QSysInfo::Endian::BigEndian)
+ << true
+ << quint32(7);
+
+ QTest::newRow("LittleEndian8") << QStringToQBitArray(QString("01111111"))
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(254);
+
+ QTest::newRow("BigEndian8") << QStringToQBitArray(QString("01111111"))
+ << static_cast<int>(QSysInfo::Endian::BigEndian)
+ << true
+ << quint32(127);
+
+ QTest::newRow("LittleEndian16") << QStringToQBitArray(QString("0111111111111111"))
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(65534);
+
+ QTest::newRow("BigEndian16") << QStringToQBitArray(QString("0111111111111111"))
+ << static_cast<int>(QSysInfo::Endian::BigEndian)
+ << true
+ << quint32(32767);
+
+ QTest::newRow("LittleEndian31") << QBitArray(31, true)
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(2147483647);
+
+ QTest::newRow("BigEndian31") << QBitArray(31, true)
+ << static_cast<int>(QSysInfo::Endian::BigEndian)
+ << true
+ << quint32(2147483647);
+
+ QTest::newRow("LittleEndian32") << QBitArray(32, true)
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << true
+ << quint32(4294967295);
+
+ QTest::newRow("BigEndian32") << QBitArray(32, true)
+ << static_cast<int>(QSysInfo::Endian::BigEndian)
+ << true
+ << quint32(4294967295);
+
+ QTest::newRow("LittleEndian33") << QBitArray(33, true)
+ << static_cast<int>(QSysInfo::Endian::LittleEndian)
+ << false
+ << quint32(0);
+
+ QTest::newRow("BigEndian33") << QBitArray(33, true)
+ << static_cast<int>(QSysInfo::Endian::BigEndian)
+ << false
+ << quint32(0);
+}
+
+void tst_QBitArray::toUInt32()
+{
+ QFETCH(QBitArray, data);
+ QFETCH(int, endianness);
+ QFETCH(bool, check);
+ QFETCH(quint32, result);
+ bool ok = false;
+
+ QCOMPARE(data.toUInt32(static_cast<QSysInfo::Endian>(endianness), &ok), result);
+ QCOMPARE(ok, check);
+}
+
QTEST_APPLESS_MAIN(tst_QBitArray)
#include "tst_qbitarray.moc"
diff --git a/tests/auto/corelib/tools/qcache/CMakeLists.txt b/tests/auto/corelib/tools/qcache/CMakeLists.txt
new file mode 100644
index 0000000000..50fb2372c3
--- /dev/null
+++ b/tests/auto/corelib/tools/qcache/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qcache.pro.
+
+#####################################################################
+## tst_qcache Test:
+#####################################################################
+
+add_qt_test(tst_qcache
+ SOURCES
+ tst_qcache.cpp
+)
diff --git a/tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt b/tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt
new file mode 100644
index 0000000000..2fc50a7d89
--- /dev/null
+++ b/tests/auto/corelib/tools/qcommandlineparser/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from qcommandlineparser.pro.
+
+#####################################################################
+## tst_qcommandlineparser Test:
+#####################################################################
+
+add_qt_test(tst_qcommandlineparser
+ SOURCES
+ tst_qcommandlineparser.cpp
+)
+add_subdirectory(testhelper)
diff --git a/tests/auto/corelib/tools/qcommandlineparser/testhelper/CMakeLists.txt b/tests/auto/corelib/tools/qcommandlineparser/testhelper/CMakeLists.txt
new file mode 100644
index 0000000000..3d0989d841
--- /dev/null
+++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from qcommandlineparser_test_helper.pro.
+
+#####################################################################
+## qcommandlineparser_test_helper Binary:
+#####################################################################
+
+add_qt_executable(qcommandlineparser_test_helper
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ qcommandlineparser_test_helper.cpp
+)
diff --git a/tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt b/tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt
new file mode 100644
index 0000000000..bce8ce11bd
--- /dev/null
+++ b/tests/auto/corelib/tools/qcontiguouscache/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qcontiguouscache.pro.
+
+#####################################################################
+## tst_qcontiguouscache Test:
+#####################################################################
+
+add_qt_test(tst_qcontiguouscache
+ SOURCES
+ tst_qcontiguouscache.cpp
+)
diff --git a/tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt b/tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt
new file mode 100644
index 0000000000..c2611921ab
--- /dev/null
+++ b/tests/auto/corelib/tools/qeasingcurve/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qeasingcurve.pro.
+
+#####################################################################
+## tst_qeasingcurve Test:
+#####################################################################
+
+add_qt_test(tst_qeasingcurve
+ SOURCES
+ tst_qeasingcurve.cpp
+)
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt
new file mode 100644
index 0000000000..cacc36beaa
--- /dev/null
+++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qexplicitlyshareddatapointer.pro.
+
+#####################################################################
+## tst_qexplicitlyshareddatapointer Test:
+#####################################################################
+
+add_qt_test(tst_qexplicitlyshareddatapointer
+ SOURCES
+ tst_qexplicitlyshareddatapointer.cpp
+)
diff --git a/tests/auto/corelib/tools/qflatmap/qflatmap.pro b/tests/auto/corelib/tools/qflatmap/qflatmap.pro
new file mode 100644
index 0000000000..3927cee30c
--- /dev/null
+++ b/tests/auto/corelib/tools/qflatmap/qflatmap.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qflatmap
+QT = core-private testlib
+SOURCES = tst_qflatmap.cpp
diff --git a/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp b/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp
new file mode 100644
index 0000000000..a5ae6f5f44
--- /dev/null
+++ b/tests/auto/corelib/tools/qflatmap/tst_qflatmap.cpp
@@ -0,0 +1,453 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <private/qflatmap_p.h>
+#include <qbytearray.h>
+#include <qstring.h>
+#include <qstringview.h>
+#include <qvarlengtharray.h>
+#include <qvector.h>
+
+#include <algorithm>
+#include <list>
+#include <tuple>
+
+class tst_QFlatMap : public QObject
+{
+ Q_OBJECT
+private slots:
+ void constructing();
+ void constAccess();
+ void insertion();
+ void removal();
+ void extraction();
+ void iterators();
+ void statefulComparator();
+ void transparency();
+ void viewIterators();
+ void varLengthArray();
+};
+
+void tst_QFlatMap::constructing()
+{
+ using Map = QFlatMap<int, QByteArray>;
+ Map fmDefault;
+ QVERIFY(fmDefault.isEmpty());
+ QCOMPARE(fmDefault.size(), Map::size_type(0));
+ QCOMPARE(fmDefault.size(), fmDefault.count());
+
+ auto key_compare = fmDefault.key_comp();
+ auto selfbuilt_value_compare
+ = [&key_compare](const Map::value_type &a, const Map::value_type &b)
+ {
+ return key_compare(a.first, b.first);
+ };
+ auto value_compare = fmDefault.value_comp();
+
+ Map::key_container_type kv = { 6, 2, 1 };
+ Map::mapped_container_type mv = { "foo", "bar", "baz" };
+ Map fmCopy{kv, mv};
+ QCOMPARE(fmCopy.size(), Map::size_type(3));
+ QVERIFY(std::is_sorted(fmCopy.begin(), fmCopy.end(), selfbuilt_value_compare));
+ QVERIFY(std::is_sorted(fmCopy.begin(), fmCopy.end(), value_compare));
+
+ Map fmMove{
+ Map::key_container_type{ 6, 2, 1 },
+ Map::mapped_container_type{ "foo", "bar", "baz" }
+ };
+ QCOMPARE(fmMove.size(), Map::size_type(3));
+ QVERIFY(std::is_sorted(fmMove.begin(), fmMove.end(), value_compare));
+
+ auto fmInitList = Map{ { 1, 2 }, { "foo", "bar" } };
+ QVERIFY(std::is_sorted(fmInitList.begin(), fmInitList.end(), value_compare));
+
+ auto fmRange = Map(fmCopy.begin(), fmCopy.end());
+ QVERIFY(std::is_sorted(fmRange.begin(), fmRange.end(), value_compare));
+
+ kv.clear();
+ mv.clear();
+ std::vector<Map::value_type> sv;
+ for (auto it = fmRange.begin(); it != fmRange.end(); ++it) {
+ kv.push_back(it->first);
+ mv.push_back(it->second);
+ sv.push_back(*it);
+ }
+ auto fmFromSortedVectorCopy = Map(Qt::OrderedUniqueRange, kv, mv);
+ auto fmFromSortedVectorMove = Map(Qt::OrderedUniqueRange, Map::key_container_type(kv),
+ Map::mapped_container_type(mv));
+ auto fmFromSortedInitList = Map(Qt::OrderedUniqueRange, { { 1, "foo" }, { 2, "bar" } });
+ auto fmFromSortedRange = Map(Qt::OrderedUniqueRange, sv.begin(), sv.end());
+}
+
+void tst_QFlatMap::constAccess()
+{
+ using Map = QFlatMap<QByteArray, QByteArray>;
+ const Map m{ { { "foo", "FOO" }, { "bar", "BAR" } } };
+
+ const std::vector<Map::value_type> v{ { "foo", "FOO" }, { "bar", "BAR" } };
+
+ QCOMPARE(m.value("foo").data(), "FOO");
+ QCOMPARE(m.value("bar").data(), "BAR");
+ QCOMPARE(m.value("nix"), QByteArray());
+ QCOMPARE(m.value("nix", "NIX").data(), "NIX");
+ QCOMPARE(m["foo"].data(), "FOO");
+ QCOMPARE(m["bar"].data(), "BAR");
+ QCOMPARE(m["nix"], QByteArray());
+ QVERIFY(m.contains("foo"));
+ QVERIFY(!m.contains("nix"));
+}
+
+void tst_QFlatMap::insertion()
+{
+ using Map = QFlatMap<QByteArray, QByteArray>;
+ Map m;
+ QByteArray foo = "foo";
+ m[foo] = foo.toUpper();
+ m["bar"] = "BAR";
+ m["baz"] = "BAZ";
+ QVERIFY(m.insert("oof", "eek").second);
+ QVERIFY(!m.insert("oof", "OOF").second);
+ const std::vector<Map::value_type> container = { { "bla", "BLA" }, { "blubb", "BLUBB" } };
+ m.insert(container.begin(), container.end());
+ QCOMPARE(m.value("foo").data(), "FOO");
+ QCOMPARE(m.value("bar").data(), "BAR");
+ QCOMPARE(m.value("baz").data(), "BAZ");
+ QCOMPARE(m.value("oof").data(), "OOF");
+ QCOMPARE(m.value("bla").data(), "BLA");
+ QCOMPARE(m.value("blubb").data(), "BLUBB");
+
+ Map::value_type a1[] = { { "narf", "NARF" },
+ { "zort", "ZORT" },
+ { "troz", "TROZ" } };
+ Map::value_type a2[] = { { "gnampf", "GNAMPF" },
+ { "narf", "NARFFFF" },
+ { "narf", "NARFFFFF" },
+ { "narf", "NARFFFFFF" } };
+ m.insert(std::begin(a1), std::end(a1));
+ m.insert(Qt::OrderedUniqueRange, std::begin(a2), std::end(a2));
+ QCOMPARE(m.size(), 10);
+ QCOMPARE(m.value("narf").data(), "NARFFFFFF");
+ QCOMPARE(m.value("gnampf").data(), "GNAMPF");
+}
+
+void tst_QFlatMap::extraction()
+{
+ using Map = QFlatMap<int, QByteArray>;
+ Map::key_container_type expectedKeys = { 1, 2, 3 };
+ Map::mapped_container_type expectedValues = { "een", "twee", "dree" };
+ Map m(expectedKeys, expectedValues);
+ auto keys = m.keys();
+ auto values = m.values();
+ QCOMPARE(keys, expectedKeys);
+ QCOMPARE(values, expectedValues);
+ Map::containers c = std::move(m).extract();
+ QCOMPARE(c.keys, expectedKeys);
+ QCOMPARE(c.values, expectedValues);
+}
+
+void tst_QFlatMap::iterators()
+{
+ using Map = QFlatMap<int, QByteArray>;
+ auto m = Map{ { 1, "foo" }, { 2, "bar" }, { 3, "baz" } };
+ {
+ // forward / backward
+ Map::iterator a = m.begin();
+ QVERIFY(a != m.end());
+ QCOMPARE(a.key(), 1);
+ QCOMPARE(a.value(), "foo");
+ ++a;
+ QCOMPARE(a.key(), 2);
+ QCOMPARE(a.value(), "bar");
+ Map::iterator b = a++;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ QCOMPARE(std::tie(b.key(), b.value()), std::make_tuple(2, "bar"));
+ QCOMPARE(++a, m.end());
+ --a;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ a.value() = "buzz";
+ b = a--;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(2, "bar"));
+ QCOMPARE(std::tie(b.key(), b.value()), std::make_tuple(3, "buzz"));
+ b.value() = "baz";
+
+ // random access
+ a = m.begin();
+ a += 2;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ a = m.begin() + 1;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(2, "bar"));
+ a = 1 + m.begin();
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(2, "bar"));
+ a = m.end() - 1;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ b = m.end();
+ b -= 1;
+ QCOMPARE(std::tie(b.key(), b.value()), std::make_tuple(3, "baz"));
+ QCOMPARE(m.end() - m.begin(), m.size());
+
+ // comparison
+ a = m.begin() + m.size() - 1;
+ b = m.end() - 1;
+ QVERIFY(a == b);
+ a = m.begin();
+ b = m.end();
+ QVERIFY(a < b);
+ QVERIFY(a <= b);
+ QVERIFY(b > a);
+ QVERIFY(b >= a);
+ a = b;
+ QVERIFY(!(a < b));
+ QVERIFY(a <= b);
+ QVERIFY(!(b > a));
+ QVERIFY(b >= a);
+
+ // de-referencing
+ a = m.begin();
+ auto ref0 = *a;
+ QCOMPARE(ref0.first, 1);
+ QCOMPARE(ref0.second, "foo");
+ auto ref1 = a[1];
+ QCOMPARE(ref1.first, 2);
+ QCOMPARE(ref1.second, "bar");
+ }
+ {
+ // forward / backward
+ Map::const_iterator a = m.cbegin();
+ QVERIFY(a != m.cend());
+ QCOMPARE(a.key(), 1);
+ QCOMPARE(a.value(), "foo");
+ ++a;
+ QCOMPARE(a.key(), 2);
+ QCOMPARE(a.value(), "bar");
+ Map::const_iterator b = a++;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ QCOMPARE(std::tie(b.key(), b.value()), std::make_tuple(2, "bar"));
+ QCOMPARE(++a, m.cend());
+ --a;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ b = a--;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(2, "bar"));
+
+ // random access
+ a = m.cbegin();
+ a += 2;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ a = m.cbegin() + 1;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(2, "bar"));
+ a = 1 + m.cbegin();
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(2, "bar"));
+ a = m.cend() - 1;
+ QCOMPARE(std::tie(a.key(), a.value()), std::make_tuple(3, "baz"));
+ b = m.cend();
+ b -= 1;
+ QCOMPARE(std::tie(b.key(), b.value()), std::make_tuple(3, "baz"));
+ QCOMPARE(m.cend() - m.cbegin(), m.size());
+
+ // comparison
+ a = m.cbegin() + m.size() - 1;
+ b = m.cend() - 1;
+ QVERIFY(a == b);
+ a = m.cbegin();
+ b = m.cend();
+ QVERIFY(a < b);
+ QVERIFY(a <= b);
+ QVERIFY(b > a);
+ QVERIFY(b >= a);
+ a = b;
+ QVERIFY(!(a < b));
+ QVERIFY(a <= b);
+ QVERIFY(!(b > a));
+ QVERIFY(b >= a);
+
+ // de-referencing
+ a = m.cbegin();
+ auto ref0 = *a;
+ QCOMPARE(ref0.first, 1);
+ QCOMPARE(ref0.second, "foo");
+ auto ref1 = a[1];
+ QCOMPARE(ref1.first, 2);
+ QCOMPARE(ref1.second, "bar");
+ }
+ {
+ Map::iterator it = m.begin();
+ Map::const_iterator cit = it;
+ Q_UNUSED(it);
+ Q_UNUSED(cit);
+ }
+ {
+ std::list<Map::value_type> revlst;
+ std::copy(m.begin(), m.end(), std::front_inserter(revlst));
+ std::vector<Map::value_type> v0;
+ std::copy(revlst.begin(), revlst.end(), std::back_inserter(v0));
+ std::vector<Map::value_type> v1;
+ std::copy(m.rbegin(), m.rend(), std::back_inserter(v1));
+ const Map cm = m;
+ std::vector<Map::value_type> v2;
+ std::copy(cm.rbegin(), cm.rend(), std::back_inserter(v2));
+ std::vector<Map::value_type> v3;
+ std::copy(m.crbegin(), m.crend(), std::back_inserter(v3));
+ QCOMPARE(v0, v1);
+ QCOMPARE(v1, v2);
+ QCOMPARE(v2, v3);
+ }
+}
+
+void tst_QFlatMap::removal()
+{
+ using Map = QFlatMap<int, QByteArray>;
+ Map m({ { 2, "bar" }, { 3, "baz" }, { 1, "foo" } });
+ QCOMPARE(m.value(2).data(), "bar");
+ QCOMPARE(m.take(2).data(), "bar");
+ QVERIFY(!m.contains(2));
+ QCOMPARE(m.size(), Map::size_type(2));
+ QVERIFY(m.remove(1));
+ QVERIFY(!m.contains(1));
+ QVERIFY(!m.remove(1));
+ QCOMPARE(m.size(), Map::size_type(1));
+ m.clear();
+ QVERIFY(m.isEmpty());
+ QVERIFY(m.empty());
+
+ m[1] = "een";
+ m[2] = "twee";
+ m[3] = "dree";
+ auto it = m.lower_bound(1);
+ QCOMPARE(it.key(), 1);
+ it = m.erase(it);
+ QCOMPARE(it.key(), 2);
+ QVERIFY(!m.contains(1));
+}
+
+void tst_QFlatMap::statefulComparator()
+{
+ struct CountingCompare {
+ mutable int count = 0;
+
+ bool operator()(const QString &lhs, const QString &rhs) const
+ {
+ ++count;
+ return lhs < rhs;
+ }
+ };
+
+ using Map = QFlatMap<QString, QString, CountingCompare>;
+ auto m1 = Map{ { "en", "een"}, { "to", "twee" }, { "tre", "dree" } };
+ QVERIFY(m1.key_comp().count > 0);
+ auto m2 = Map(m1.key_comp());
+ QCOMPARE(m2.key_comp().count, m1.key_comp().count);
+ m2.insert(m1.begin(), m1.end());
+ QVERIFY(m2.key_comp().count > m1.key_comp().count);
+}
+
+void tst_QFlatMap::transparency()
+{
+ struct StringViewCompare
+ {
+ using is_transparent = void;
+ bool operator()(const QStringView &lhs, const QStringView &rhs) const
+ {
+ return lhs < rhs;
+ }
+ };
+
+ using Map = QFlatMap<QString, QString, StringViewCompare>;
+ auto m = Map{ { "one", "een" }, { "two", "twee" }, { "three", "dree" } };
+
+ const QString numbers = "one two three";
+ const QStringView sv1{numbers.constData(), 3};
+ const QStringView sv2{numbers.constData() + 4, 3};
+ const QStringView sv3{numbers.constData() + 8, 5};
+ QCOMPARE(m.lower_bound(sv1).value(), "een");
+ QCOMPARE(m.lower_bound(sv2).value(), "twee");
+ QCOMPARE(m.lower_bound(sv3).value(), "dree");
+}
+
+void tst_QFlatMap::viewIterators()
+{
+ using Map = QFlatMap<QByteArray, QByteArray>;
+ Map m({ { "yksi", "een"}, { "kaksi", "twee" }, { "kolme", "dree" } });
+ {
+ std::vector<QByteArray> keys;
+ std::transform(m.begin(), m.end(), std::back_inserter(keys),
+ [](const Map::value_type &v)
+ {
+ return v.first;
+ });
+ auto it = keys.begin();
+ QCOMPARE(*it, "kaksi");
+ QCOMPARE(it->length(), 5);
+ ++it;
+ QCOMPARE(*it, "kolme");
+ it++;
+ QCOMPARE(*it, "yksi");
+ ++it;
+ QCOMPARE(it, keys.end());
+ --it;
+ QCOMPARE(*it, "yksi");
+ it--;
+ QCOMPARE(*it, "kolme");
+ }
+ {
+ std::vector<QByteArray> values;
+ std::transform(m.begin(), m.end(), std::back_inserter(values),
+ [](const Map::value_type &v)
+ {
+ return v.second;
+ });
+ auto it = values.begin();
+ QCOMPARE(*it, "twee");
+ QCOMPARE(it->length(), 4);
+ ++it;
+ QCOMPARE(*it, "dree");
+ it++;
+ QCOMPARE(*it, "een");
+ ++it;
+ QCOMPARE(it, values.end());
+ --it;
+ QCOMPARE(*it, "een");
+ it--;
+ QCOMPARE(*it, "dree");
+ }
+}
+
+void tst_QFlatMap::varLengthArray()
+{
+ using Map = QFlatMap<int, QByteArray, std::less<int>,
+ QVarLengthArray<int, 1024>, QVarLengthArray<QByteArray, 1024>>;
+ Map m{ { 2, "twee" } };
+ m.insert(1, "een");
+ m.remove(1);
+ QVERIFY(!m.isEmpty());
+ m.remove(2);
+ QVERIFY(m.isEmpty());
+}
+
+QTEST_APPLESS_MAIN(tst_QFlatMap)
+#include "tst_qflatmap.moc"
diff --git a/tests/auto/corelib/tools/qhash/.prev_CMakeLists.txt b/tests/auto/corelib/tools/qhash/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5dfeedb322
--- /dev/null
+++ b/tests/auto/corelib/tools/qhash/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qhash.pro.
+
+#####################################################################
+## tst_qhash Test:
+#####################################################################
+
+add_qt_test(tst_qhash
+ SOURCES
+ tst_qhash.cpp
+ DEFINES
+ -QT_NO_JAVA_STYLE_ITERATORS
+)
diff --git a/tests/auto/corelib/tools/qhash/CMakeLists.txt b/tests/auto/corelib/tools/qhash/CMakeLists.txt
new file mode 100644
index 0000000000..32edf72073
--- /dev/null
+++ b/tests/auto/corelib/tools/qhash/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qhash.pro.
+
+#####################################################################
+## tst_qhash Test:
+#####################################################################
+
+add_qt_test(tst_qhash
+ SOURCES
+ tst_qhash.cpp
+ DEFINES
+ #-QT_NO_JAVA_STYLE_ITERATORS # special case remove
+)
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index b98ac38288..4052eff0ae 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -451,20 +451,6 @@ void tst_QHash::insert1()
QCOMPARE(hash.find(searchKey).value(), id01.id); // last-inserted value
QCOMPARE(hash.find(searchKey).key().id, id00.id); // but first-inserted key
}
- {
- QMultiHash<IdentityTracker, int> hash;
- QCOMPARE(hash.size(), 0);
- const int dummy = -1;
- IdentityTracker id00 = {0, 0}, id01 = {0, 1}, searchKey = {0, dummy};
- QCOMPARE(hash.insert(id00, id00.id).key().id, id00.id);
- QCOMPARE(hash.size(), 1);
- QCOMPARE(hash.insert(id01, id01.id).key().id, id01.id);
- QCOMPARE(hash.size(), 2);
- QMultiHash<IdentityTracker, int>::const_iterator pos = hash.constFind(searchKey);
- QCOMPARE(pos.value(), pos.key().id); // key fits to value it was inserted with
- ++pos;
- QCOMPARE(pos.value(), pos.key().id); // key fits to value it was inserted with
- }
}
void tst_QHash::erase()
@@ -491,13 +477,15 @@ void tst_QHash::erase()
++n;
}
QVERIFY(n == 3);
- QHash<int, int> h2;
- h2.insertMulti(20, 41);
- h2.insertMulti(20, 42);
+
+ QMultiHash<int, int> h2;
+ h2.insert(20, 41);
+ h2.insert(20, 42);
QVERIFY(h2.size() == 2);
- it1 = h2.erase(h2.begin());
- it1 = h2.erase(h2.begin());
- QVERIFY(it1 == h2.end());
+ auto bit = h2.begin();
+ auto mit = h2.erase(bit);
+ mit = h2.erase(h2.begin());
+ QVERIFY(mit == h2.end());
}
void tst_QHash::key()
@@ -631,14 +619,15 @@ void tst_QHash::find()
QCOMPARE(map1.find(1).value(), QLatin1String("Mayer"));
QCOMPARE(map1.find(2).value(), QLatin1String("Hej"));
- for(i = 3; i < 10; ++i) {
+ QMultiHash<int, QString> multiMap(map1);
+ for (i = 3; i < 10; ++i) {
compareString = testString.arg(i);
- map1.insertMulti(4, compareString);
+ multiMap.insert(4, compareString);
}
- QHash<int, QString>::const_iterator it=map1.constFind(4);
+ auto it = multiMap.constFind(4);
- for(i = 9; i > 2 && it != map1.constEnd() && it.key() == 4; --i) {
+ for (i = 9; i > 2 && it != multiMap.constEnd() && it.key() == 4; --i) {
compareString = testString.arg(i);
QVERIFY(it.value() == compareString);
++it;
@@ -664,14 +653,15 @@ void tst_QHash::constFind()
QCOMPARE(map1.constFind(1).value(), QLatin1String("Mayer"));
QCOMPARE(map1.constFind(2).value(), QLatin1String("Hej"));
- for(i = 3; i < 10; ++i) {
+ QMultiHash<int, QString> multiMap(map1);
+ for (i = 3; i < 10; ++i) {
compareString = testString.arg(i);
- map1.insertMulti(4, compareString);
+ multiMap.insert(4, compareString);
}
- QHash<int, QString>::const_iterator it=map1.constFind(4);
+ auto it = multiMap.constFind(4);
- for(i = 9; i > 2 && it != map1.constEnd() && it.key() == 4; --i) {
+ for (i = 9; i > 2 && it != multiMap.constEnd() && it.key() == 4; --i) {
compareString = testString.arg(i);
QVERIFY(it.value() == compareString);
++it;
@@ -689,9 +679,9 @@ void tst_QHash::contains()
map1.insert(1, "one");
QVERIFY(map1.contains(1));
- for(i=2; i < 100; ++i)
+ for (i=2; i < 100; ++i)
map1.insert(i, "teststring");
- for(i=99; i > 1; --i)
+ for (i=99; i > 1; --i)
QVERIFY(map1.contains(i));
map1.remove(43);
@@ -855,33 +845,33 @@ void tst_QHash::operator_eq()
// regardless of insertion or iteration order
{
- QHash<int, int> a;
- QHash<int, int> b;
+ QMultiHash<int, int> a;
+ QMultiHash<int, int> b;
- a.insertMulti(0, 0);
- a.insertMulti(0, 1);
+ a.insert(0, 0);
+ a.insert(0, 1);
- b.insertMulti(0, 1);
- b.insertMulti(0, 0);
+ b.insert(0, 1);
+ b.insert(0, 0);
QVERIFY(a == b);
QVERIFY(!(a != b));
}
{
- QHash<int, int> a;
- QHash<int, int> b;
+ QMultiHash<int, int> a;
+ QMultiHash<int, int> b;
enum { Count = 100 };
for (int key = 0; key < Count; ++key) {
for (int value = 0; value < Count; ++value)
- a.insertMulti(key, value);
+ a.insert(key, value);
}
for (int key = Count - 1; key >= 0; --key) {
for (int value = 0; value < Count; ++value)
- b.insertMulti(key, value);
+ b.insert(key, value);
}
QVERIFY(a == b);
@@ -889,8 +879,8 @@ void tst_QHash::operator_eq()
}
{
- QHash<int, int> a;
- QHash<int, int> b;
+ QMultiHash<int, int> a;
+ QMultiHash<int, int> b;
enum {
Count = 100,
@@ -900,7 +890,7 @@ void tst_QHash::operator_eq()
for (int key = 0; key < Count; ++key) {
for (int value = 0; value < Count; ++value)
- a.insertMulti(key, value);
+ a.insert(key, value);
}
// Generates two permutations of [0, Count) for the keys and values,
@@ -909,7 +899,7 @@ void tst_QHash::operator_eq()
for (int k = 0; k < Count; ++k) {
const int key = (k * KeyStep) % Count;
for (int v = 0; v < Count; ++v)
- b.insertMulti(key, (v * ValueStep) % Count);
+ b.insert(key, (v * ValueStep) % Count);
}
QVERIFY(a == b);
@@ -923,10 +913,10 @@ void tst_QHash::compare()
QString testString = "Teststring %1";
int i;
- for(i = 0; i < 1000; ++i)
+ for (i = 0; i < 1000; ++i)
hash1.insert(i,testString.arg(i));
- for(--i; i >= 0; --i)
+ for (--i; i >= 0; --i)
hash2.insert(i,testString.arg(i));
hash1.squeeze();
@@ -947,39 +937,39 @@ void tst_QHash::compare()
void tst_QHash::compare2()
{
- QHash<int, int> a;
- QHash<int, int> b;
+ QMultiHash<int, int> a;
+ QMultiHash<int, int> b;
- a.insertMulti(17, 1);
- a.insertMulti(17 * 2, 1);
- b.insertMulti(17 * 2, 1);
- b.insertMulti(17, 1);
+ a.insert(17, 1);
+ a.insert(17 * 2, 1);
+ b.insert(17 * 2, 1);
+ b.insert(17, 1);
QVERIFY(a == b);
QVERIFY(b == a);
- a.insertMulti(17, 2);
- a.insertMulti(17 * 2, 3);
- b.insertMulti(17 * 2, 3);
- b.insertMulti(17, 2);
+ a.insert(17, 2);
+ a.insert(17 * 2, 3);
+ b.insert(17 * 2, 3);
+ b.insert(17, 2);
QVERIFY(a == b);
QVERIFY(b == a);
- a.insertMulti(17, 4);
- a.insertMulti(17 * 2, 5);
- b.insertMulti(17 * 2, 4);
- b.insertMulti(17, 5);
+ a.insert(17, 4);
+ a.insert(17 * 2, 5);
+ b.insert(17 * 2, 4);
+ b.insert(17, 5);
QVERIFY(!(a == b));
QVERIFY(!(b == a));
a.clear();
b.clear();
- a.insertMulti(1, 1);
- a.insertMulti(1, 2);
- a.insertMulti(1, 3);
- b.insertMulti(1, 1);
- b.insertMulti(1, 2);
- b.insertMulti(1, 3);
- b.insertMulti(1, 4);
+ a.insert(1, 1);
+ a.insert(1, 2);
+ a.insert(1, 3);
+ b.insert(1, 1);
+ b.insert(1, 2);
+ b.insert(1, 3);
+ b.insert(1, 4);
QVERIFY(!(a == b));
QVERIFY(!(b == a));
}
@@ -993,7 +983,7 @@ void tst_QHash::iterators()
QString testString1;
int i;
- for(i = 1; i < 100; ++i)
+ for (i = 1; i < 100; ++i)
hash.insert(i, testString.arg(i));
//to get some chaos in the hash
@@ -1010,18 +1000,13 @@ void tst_QHash::iterators()
QVERIFY(stlIt.value() == testMap.value(1));
- stlIt+=5;
+ for (int i = 0; i < 5; ++i)
+ ++stlIt;
QVERIFY(stlIt.value() == testMap.value(6));
stlIt++;
QVERIFY(stlIt.value() == testMap.value(7));
- stlIt-=3;
- QVERIFY(stlIt.value() == testMap.value(4));
-
- stlIt--;
- QVERIFY(stlIt.value() == testMap.value(3));
-
testMap.clear();
//STL-Style const-iterators
@@ -1035,18 +1020,13 @@ void tst_QHash::iterators()
QVERIFY(cstlIt.value() == testMap.value(1));
- cstlIt+=5;
+ for (int i = 0; i < 5; ++i)
+ ++cstlIt;
QVERIFY(cstlIt.value() == testMap.value(6));
cstlIt++;
QVERIFY(cstlIt.value() == testMap.value(7));
- cstlIt-=3;
- QVERIFY(cstlIt.value() == testMap.value(4));
-
- cstlIt--;
- QVERIFY(cstlIt.value() == testMap.value(3));
-
testMap.clear();
//Java-Style iterators
@@ -1068,14 +1048,7 @@ void tst_QHash::iterators()
QVERIFY(javaIt.value() == testMap.value(i));
}
- ++i;
- while(javaIt.hasPrevious()) {
- --i;
- javaIt.previous();
- QVERIFY(javaIt.value() == testMap.value(i));
- }
-
- //peekNext() peekPrevious()
+ //peekNext()
javaIt.toFront();
javaIt.next();
while(javaIt.hasNext()) {
@@ -1083,14 +1056,6 @@ void tst_QHash::iterators()
testString1 = javaIt.peekNext().value();
javaIt.next();
QVERIFY(javaIt.value() == testString1);
- QCOMPARE(javaIt.peekPrevious().value(), testString1);
- }
- while(javaIt.hasPrevious()) {
- testString = javaIt.value();
- testString1 = javaIt.peekPrevious().value();
- javaIt.previous();
- QVERIFY(javaIt.value() == testString1);
- QCOMPARE(javaIt.peekNext().value(), testString1);
}
}
@@ -1115,9 +1080,15 @@ void tst_QHash::keyIterator()
QVERIFY(key_it != hash.keyEnd());
QCOMPARE(*key_it, it.key());
QCOMPARE(*(key_it++), (it++).key());
- QCOMPARE(*(key_it--), (it--).key());
- QCOMPARE(*(++key_it), (++it).key());
- QCOMPARE(*(--key_it), (--it).key());
+ if (key_it != hash.keyEnd()) {
+ QVERIFY(it != hash.end());
+ ++key_it;
+ ++it;
+ if (key_it != hash.keyEnd())
+ QCOMPARE(*key_it, it.key());
+ else
+ QVERIFY(it == hash.end());
+ }
QCOMPARE(std::count(hash.keyBegin(), hash.keyEnd(), 99), 1);
@@ -1162,19 +1133,11 @@ void tst_QHash::keyValueIterator()
++it;
++key_value_it;
- QCOMPARE(*key_value_it, entry_type(it.key(), it.value()));
-
- --it;
- --key_value_it;
- QCOMPARE(*key_value_it, entry_type(it.key(), it.value()));
-
- ++it;
- ++key_value_it;
- QCOMPARE(*key_value_it, entry_type(it.key(), it.value()));
+ if (it != hash.end())
+ QCOMPARE(*key_value_it, entry_type(it.key(), it.value()));
+ else
+ QVERIFY(key_value_it == hash.constKeyValueEnd());
- --it;
- --key_value_it;
- QCOMPARE(*key_value_it, entry_type(it.key(), it.value()));
key = 99;
value = 99 * 100;
QCOMPARE(std::count(hash.constKeyValueBegin(), hash.constKeyValueEnd(), entry_type(key, value)), 1);
@@ -1184,9 +1147,9 @@ void tst_QHash::rehash_isnt_quadratic()
{
// this test should be incredibly slow if rehash() is quadratic
for (int j = 0; j < 5; ++j) {
- QHash<int, int> testHash;
+ QMultiHash<int, int> testHash;
for (int i = 0; i < 500000; ++i)
- testHash.insertMulti(1, 1);
+ testHash.insert(1, 1);
}
}
@@ -1330,27 +1293,27 @@ QList<T> sorted(const QList<T> &list)
void tst_QHash::keys_values_uniqueKeys()
{
- QHash<QString, int> hash;
+ QMultiHash<QString, int> hash;
QVERIFY(hash.uniqueKeys().isEmpty());
QVERIFY(hash.keys().isEmpty());
QVERIFY(hash.values().isEmpty());
- hash.insertMulti("alpha", 1);
+ hash.insert("alpha", 1);
QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha"));
QVERIFY(hash.keys() == hash.uniqueKeys());
QVERIFY(hash.values() == (QList<int>() << 1));
- hash.insertMulti("beta", -2);
+ hash.insert("beta", -2);
QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha" << "beta"));
QVERIFY(hash.keys() == hash.uniqueKeys());
QVERIFY(sorted(hash.values()) == sorted(QList<int>() << 1 << -2));
- hash.insertMulti("alpha", 2);
+ hash.insert("alpha", 2);
QVERIFY(sorted(hash.uniqueKeys()) == (QList<QString>() << "alpha" << "beta"));
QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha" << "alpha" << "beta"));
QVERIFY(sorted(hash.values()) == sorted(QList<int>() << 2 << 1 << -2));
- hash.insertMulti("beta", 4);
+ hash.insert("beta", 4);
QVERIFY(sorted(hash.uniqueKeys()) == (QList<QString>() << "alpha" << "beta"));
QVERIFY(sorted(hash.keys()) == (QList<QString>() << "alpha" << "alpha" << "beta" << "beta"));
QVERIFY(sorted(hash.values()) == sorted(QList<int>() << 2 << 1 << 4 << -2));
@@ -1373,13 +1336,6 @@ void tst_QHash::noNeedlessRehashes()
void tst_QHash::const_shared_null()
{
QHash<int, QString> hash2;
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QHash<int, QString> hash1;
- hash1.setSharable(false);
- QVERIFY(hash1.isDetached());
-
- hash2.setSharable(true);
-#endif
QVERIFY(!hash2.isDetached());
}
@@ -1511,14 +1467,14 @@ void tst_QHash::initializerList()
void tst_QHash::eraseValidIteratorOnSharedHash()
{
- QHash<int, int> a, b;
+ QMultiHash<int, int> a, b;
a.insert(10, 10);
- a.insertMulti(10, 25);
- a.insertMulti(10, 30);
+ a.insert(10, 25);
+ a.insert(10, 30);
a.insert(20, 20);
a.insert(40, 40);
- QHash<int, int>::iterator i = a.begin();
+ auto i = a.begin();
while (i.value() != 25)
++i;
@@ -1540,7 +1496,7 @@ void tst_QHash::eraseValidIteratorOnSharedHash()
void tst_QHash::equal_range()
{
- QHash<int, QString> hash;
+ QMultiHash<int, QString> hash;
auto result = hash.equal_range(0);
QCOMPARE(result.first, hash.end());
@@ -1553,7 +1509,7 @@ void tst_QHash::equal_range()
QCOMPARE(result.first, hash.find(1));
QVERIFY(std::distance(result.first, result.second) == 1);
- QHash<int, int> h1;
+ QMultiHash<int, int> h1;
{
auto p = h1.equal_range(0);
QVERIFY(p.first == p.second);
@@ -1604,7 +1560,7 @@ void tst_QHash::equal_range()
QVERIFY(p2.first == m1.begin() || p2.second == m1.end());
}
- const QHash<int, int> ch1 = h1;
+ const QMultiHash<int, int> ch1 = h1;
{
auto p1 = ch1.equal_range(9);
QVERIFY(p1.first == p1.second);
@@ -1630,10 +1586,10 @@ void tst_QHash::equal_range()
QVERIFY(p2.first == cm1.cbegin() || p2.second == cm1.cend());
}
- QHash<int, int> h2;
+ QMultiHash<int, int> h2;
for (int i = 0; i < 8; ++i)
for (int j = 0; j < 8; ++j)
- h2.insertMulti(i, i*j);
+ h2.insert(i, i*j);
for (int i = 0; i < 8; ++i) {
auto pair = h2.equal_range(i);
@@ -1699,21 +1655,6 @@ void tst_QHash::insert_hash()
QCOMPARE(hash[2], 5);
QCOMPARE(hash[7], 55);
}
- {
- // This will use a QMultiHash and then insert that into QHash,
- // the ordering is undefined so we won't test that but make
- // sure this isn't adding multiple entries with the same key
- // to the QHash.
- QHash<int, int> hash;
- QMultiHash<int, int> hash2;
- hash2.insert(0, 5);
- hash2.insert(0, 6);
- hash2.insert(0, 7);
-
- hash.insert(hash2);
-
- QCOMPARE(hash.count(), 1);
- }
}
QTEST_APPLESS_MAIN(tst_QHash)
diff --git a/tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro b/tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro
deleted file mode 100644
index 715e9bf0c9..0000000000
--- a/tests/auto/corelib/tools/qhash_strictiterators/qhash_strictiterators.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../qhash/qhash.pro)
-TARGET = tst_qhash_strictiterators
-DEFINES += QT_STRICT_ITERATORS tst_QHash=tst_QHash_StrictIterators
diff --git a/tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt b/tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt
new file mode 100644
index 0000000000..87d109f997
--- /dev/null
+++ b/tests/auto/corelib/tools/qhashfunctions/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qhashfunctions.pro.
+
+#####################################################################
+## tst_qhashfunctions Test:
+#####################################################################
+
+add_qt_test(tst_qhashfunctions
+ SOURCES
+ tst_qhashfunctions.cpp
+)
diff --git a/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro b/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
deleted file mode 100644
index c53d553d6d..0000000000
--- a/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qlinkedlist
-QT = core testlib
-qtConfig(c++14): CONFIG += c++14
-qtConfig(c++1z): CONFIG += c++1z
-SOURCES = tst_qlinkedlist.cpp
-DEFINES -= QT_NO_LINKED_LIST
diff --git a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp
deleted file mode 100644
index df42b5dea9..0000000000
--- a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp
+++ /dev/null
@@ -1,1133 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QLinkedList>
-
-struct Movable
-{
- Movable(char input = 'j') : i(input), state(Constructed)
- {
- ++liveCount;
- }
- Movable(const Movable &other)
- : i(other.i)
- , state(Constructed)
- {
- check(other.state, Constructed);
- ++liveCount;
- }
-
- ~Movable()
- {
- check(state, Constructed);
- i = 0;
- --liveCount;
- state = Destructed;
- }
-
- bool operator ==(const Movable &other) const
- {
- check(state, Constructed);
- check(other.state, Constructed);
- return i == other.i;
- }
-
- Movable &operator=(const Movable &other)
- {
- check(state, Constructed);
- check(other.state, Constructed);
- i = other.i;
- return *this;
- }
- char i;
-
- static int getLiveCount() { return liveCount; }
-private:
- static int liveCount;
-
- enum State { Constructed = 106, Destructed = 110 };
- State state;
-
- static void check(const State state1, const State state2)
- {
- QCOMPARE(int(state1), int(state2));
- }
-};
-
-int Movable::liveCount = 0;
-
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(Movable, Q_MOVABLE_TYPE);
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(Movable);
-
-Q_DECLARE_METATYPE(QLinkedList<int>);
-
-
-int qHash(const Movable& movable)
-{
- return qHash(movable.i);
-}
-
-struct Complex
-{
- Complex(int val = 0)
- : value(val)
- , checkSum(this)
- {
- ++liveCount;
- }
-
- Complex(Complex const &other)
- : value(other.value)
- , checkSum(this)
- {
- ++liveCount;
- }
-
- Complex &operator=(Complex const &other)
- {
- check(); other.check();
-
- value = other.value;
- return *this;
- }
-
- ~Complex()
- {
- --liveCount;
- check();
- }
-
- operator int() const { return value; }
-
- bool operator==(Complex const &other) const
- {
- check(); other.check();
- return value == other.value;
- }
-
- void check() const
- {
- QVERIFY(this == checkSum);
- }
-
- static int getLiveCount() { return liveCount; }
-private:
- static int liveCount;
-
- int value;
- void *checkSum;
-};
-
-int Complex::liveCount = 0;
-
-Q_DECLARE_METATYPE(Complex);
-
-// Tests depend on the fact that:
-Q_STATIC_ASSERT(!QTypeInfo<int>::isStatic);
-Q_STATIC_ASSERT(!QTypeInfo<int>::isComplex);
-Q_STATIC_ASSERT(!QTypeInfo<Movable>::isStatic);
-Q_STATIC_ASSERT(QTypeInfo<Movable>::isComplex);
-Q_STATIC_ASSERT(QTypeInfo<Complex>::isStatic);
-Q_STATIC_ASSERT(QTypeInfo<Complex>::isComplex);
-
-class tst_QLinkedList : public QObject
-{
- Q_OBJECT
-private slots:
- void eraseValidIteratorsOnSharedList() const;
- void insertWithIteratorsOnSharedList() const;
- void lengthInt() const;
- void lengthMovable() const;
- void lengthComplex() const;
- void lengthSignature() const;
- void firstInt() const;
- void firstMovable() const;
- void firstComplex() const;
- void lastInt() const;
- void lastMovable() const;
- void lastComplex() const;
- void beginInt() const;
- void beginMovable() const;
- void beginComplex() const;
- void endInt() const;
- void endMovable() const;
- void endComplex() const;
- void containsInt() const;
- void containsMovable() const;
- void containsComplex() const;
- void countInt() const;
- void countMovable() const;
- void countComplex() const;
- void cpp17ctad() const;
- void emptyInt() const;
- void emptyMovable() const;
- void emptyComplex() const;
- void endsWithInt() const;
- void endsWithMovable() const;
- void endsWithComplex() const;
- void removeAllInt() const;
- void removeAllMovable() const;
- void removeAllComplex() const;
- void removeOneInt() const;
- void removeOneMovable() const;
- void removeOneComplex() const;
- void reverseIterators() const;
- void startsWithInt() const;
- void startsWithMovable() const;
- void startsWithComplex() const;
- void takeFirstInt() const;
- void takeFirstMovable() const;
- void takeFirstComplex() const;
- void takeLastInt() const;
- void takeLastMovable() const;
- void takeLastComplex() const;
- void toStdListInt() const;
- void toStdListMovable() const;
- void toStdListComplex() const;
- void testOperatorsInt() const;
- void testOperatorsMovable() const;
- void testOperatorsComplex() const;
- void testSTLIteratorsInt() const;
- void testSTLIteratorsMovable() const;
- void testSTLIteratorsComplex() const;
-
- void initializeList() const;
-
- void constSharedNullInt() const;
- void constSharedNullMovable() const;
- void constSharedNullComplex() const;
-
- void setSharableInt() const;
-private:
- template<typename T> void length() const;
- template<typename T> void first() const;
- template<typename T> void last() const;
- template<typename T> void begin() const;
- template<typename T> void end() const;
- template<typename T> void contains() const;
- template<typename T> void count() const;
- template<typename T> void empty() const;
- template<typename T> void endsWith() const;
- template<typename T> void move() const;
- template<typename T> void removeAll() const;
- template<typename T> void removeOne() const;
- template<typename T> void startsWith() const;
- template<typename T> void swap() const;
- template<typename T> void takeFirst() const;
- template<typename T> void takeLast() const;
- template<typename T> void toStdList() const;
- template<typename T> void value() const;
-
- template<typename T> void testOperators() const;
- template<typename T> void testSTLIterators() const;
-
- template<typename T> void constSharedNull() const;
-
- int dummyForGuard;
-};
-
-template<typename T> struct SimpleValue
-{
- static T at(int index)
- {
- return values[index % maxSize];
- }
- static const uint maxSize = 7;
- static const T values[maxSize];
-};
-
-template<>
-const int SimpleValue<int>::values[] = { 10, 20, 30, 40, 100, 101, 102 };
-template<>
-const Movable SimpleValue<Movable>::values[] = { 10, 20, 30, 40, 100, 101, 102 };
-template<>
-const Complex SimpleValue<Complex>::values[] = { 10, 20, 30, 40, 100, 101, 102 };
-
-// Make some macros for the tests to use in order to be slightly more readable...
-#define T_FOO SimpleValue<T>::at(0)
-#define T_BAR SimpleValue<T>::at(1)
-#define T_BAZ SimpleValue<T>::at(2)
-#define T_CAT SimpleValue<T>::at(3)
-#define T_DOG SimpleValue<T>::at(4)
-#define T_BLAH SimpleValue<T>::at(5)
-#define T_WEEE SimpleValue<T>::at(6)
-
-template<typename T>
-void tst_QLinkedList::length() const
-{
- /* Empty list. */
- {
- const QLinkedList<T> list;
- QCOMPARE(list.size(), 0);
- }
-
- /* One entry. */
- {
- QLinkedList<T> list;
- list.append(T_FOO);
- QCOMPARE(list.size(), 1);
- }
-
- /* Two entries. */
- {
- QLinkedList<T> list;
- list.append(T_FOO);
- list.append(T_BAR);
- QCOMPARE(list.size(), 2);
- }
-
- /* Three entries. */
- {
- QLinkedList<T> list;
- list.append(T_FOO);
- list.append(T_BAR);
- list.append(T_BAZ);
- QCOMPARE(list.size(), 3);
- }
-}
-
-void tst_QLinkedList::eraseValidIteratorsOnSharedList() const
-{
- QLinkedList<int> a, b;
- a.append(5);
- a.append(10);
- a.append(20);
- a.append(20);
- a.append(20);
- a.append(20);
- a.append(30);
-
- QLinkedList<int>::iterator i = a.begin();
- ++i;
- ++i;
- ++i;
- b = a;
- QLinkedList<int>::iterator r = a.erase(i);
- QCOMPARE(b.size(), 7);
- QCOMPARE(a.size(), 6);
- --r;
- --r;
- QCOMPARE(*r, 10); // Ensure that number 2 instance was removed;
-}
-
-void tst_QLinkedList::insertWithIteratorsOnSharedList() const
-{
- QLinkedList<int> a, b;
- a.append(5);
- a.append(10);
- a.append(20);
- QLinkedList<int>::iterator i = a.begin();
- ++i;
- ++i;
- b = a;
-
- QLinkedList<int>::iterator i2 = a.insert(i, 15);
- QCOMPARE(b.size(), 3);
- QCOMPARE(a.size(), 4);
- --i2;
- QCOMPARE(*i2, 10);
-}
-
-void tst_QLinkedList::lengthInt() const
-{
- length<int>();
-}
-
-void tst_QLinkedList::lengthMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- length<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::lengthComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- length<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QLinkedList::lengthSignature() const
-{
- /* Constness. */
- {
- const QLinkedList<int> list;
- /* The function should be const. */
- list.size();
- }
-}
-
-template<typename T>
-void tst_QLinkedList::first() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(list.first(), T_FOO);
-
- // remove an item, make sure it still works
- list.pop_front();
- QVERIFY(list.size() == 1);
- QCOMPARE(list.first(), T_BAR);
-}
-
-void tst_QLinkedList::firstInt() const
-{
- first<int>();
-}
-
-void tst_QLinkedList::firstMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- first<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::firstComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- first<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::last() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(list.last(), T_BAR);
-
- // remove an item, make sure it still works
- list.pop_back();
- QVERIFY(list.size() == 1);
- QCOMPARE(list.last(), T_FOO);
-}
-
-void tst_QLinkedList::lastInt() const
-{
- last<int>();
-}
-
-void tst_QLinkedList::lastMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- last<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::lastComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- last<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::begin() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(*list.begin(), T_FOO);
-
- // remove an item, make sure it still works
- list.pop_front();
- QVERIFY(list.size() == 1);
- QCOMPARE(*list.begin(), T_BAR);
-}
-
-void tst_QLinkedList::beginInt() const
-{
- begin<int>();
-}
-
-void tst_QLinkedList::beginMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- begin<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::beginComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- begin<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::end() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(*--list.end(), T_BAR);
-
- // remove an item, make sure it still works
- list.pop_back();
- QVERIFY(list.size() == 1);
- QCOMPARE(*--list.end(), T_FOO);
-}
-
-void tst_QLinkedList::endInt() const
-{
- end<int>();
-}
-
-void tst_QLinkedList::endMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- end<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::endComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- end<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::contains() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QVERIFY(list.contains(T_FOO));
- QVERIFY(list.contains(T_BLAH) != true);
-
- // add it and make sure it matches
- list.append(T_BLAH);
- QVERIFY(list.contains(T_BLAH));
-}
-
-void tst_QLinkedList::containsInt() const
-{
- contains<int>();
-}
-
-void tst_QLinkedList::containsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- contains<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::containsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- contains<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::count() const
-{
- QLinkedList<T> list;
-
- // starts empty
- QVERIFY(list.count() == 0);
-
- // goes up
- list.append(T_FOO);
- QVERIFY(list.count() == 1);
-
- // and up
- list.append(T_BAR);
- QVERIFY(list.count() == 2);
-
- // and down
- list.pop_back();
- QVERIFY(list.count() == 1);
-
- // and empty. :)
- list.pop_back();
- QVERIFY(list.count() == 0);
-}
-
-void tst_QLinkedList::countInt() const
-{
- count<int>();
-}
-
-void tst_QLinkedList::countMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- count<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::countComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- count<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QLinkedList::cpp17ctad() const
-{
-#ifdef __cpp_deduction_guides
-#define QVERIFY_IS_LIST_OF(obj, Type) \
- QVERIFY2((std::is_same<decltype(obj), QLinkedList<Type>>::value), \
- QMetaType::typeName(qMetaTypeId<decltype(obj)::value_type>()))
-#define CHECK(Type, One, Two, Three) \
- do { \
- const Type v[] = {One, Two, Three}; \
- QLinkedList v1 = {One, Two, Three}; \
- QVERIFY_IS_LIST_OF(v1, Type); \
- QLinkedList v2(v1.begin(), v1.end()); \
- QVERIFY_IS_LIST_OF(v2, Type); \
- QLinkedList v3(std::begin(v), std::end(v)); \
- QVERIFY_IS_LIST_OF(v3, Type); \
- } while (false) \
- /*end*/
- CHECK(int, 1, 2, 3);
- CHECK(double, 1.0, 2.0, 3.0);
- CHECK(QString, QStringLiteral("one"), QStringLiteral("two"), QStringLiteral("three"));
-#undef QVERIFY_IS_LIST_OF
-#undef CHECK
-#else
- QSKIP("This test requires C++17 Constructor Template Argument Deduction support enabled in the compiler.");
-#endif
-}
-
-template<typename T>
-void tst_QLinkedList::empty() const
-{
- QLinkedList<T> list;
-
- // make sure it starts empty
- QVERIFY(list.empty());
-
- // and doesn't stay empty
- list.append(T_FOO);
- QVERIFY(!list.empty());
-
- // and goes back to being empty
- list.pop_back();
- QVERIFY(list.empty());
-}
-
-void tst_QLinkedList::emptyInt() const
-{
- empty<int>();
-}
-
-void tst_QLinkedList::emptyMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- empty<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::emptyComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- empty<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::endsWith() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // test it returns correctly in both cases
- QVERIFY(list.endsWith(T_BAZ));
- QVERIFY(!list.endsWith(T_BAR));
-
- // remove an item and make sure the end item changes
- list.pop_back();
- QVERIFY(list.endsWith(T_BAR));
-}
-
-void tst_QLinkedList::endsWithInt() const
-{
- endsWith<int>();
-}
-
-void tst_QLinkedList::endsWithMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- endsWith<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::endsWithComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- endsWith<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::removeAll() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // remove one instance
- list.removeAll(T_BAR);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAZ);
-
- // many instances
- list << T_FOO << T_BAR << T_BAZ << T_FOO << T_BAR << T_BAZ << T_FOO << T_BAR << T_BAZ;
- list.removeAll(T_BAR);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ);
-
- // try remove something that doesn't exist
- list.removeAll(T_WEEE);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ);
-}
-
-void tst_QLinkedList::removeAllInt() const
-{
- removeAll<int>();
-}
-
-void tst_QLinkedList::removeAllMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- removeAll<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::removeAllComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- removeAll<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::removeOne() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // middle
- list.removeOne(T_BAR);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAZ);
-
- // start
- list.removeOne(T_FOO);
- QCOMPARE(list, QLinkedList<T>() << T_BAZ);
-
- // last
- list.removeOne(T_BAZ);
- QCOMPARE(list, QLinkedList<T>());
-
- // make sure it really only removes one :)
- list << T_FOO << T_FOO;
- list.removeOne(T_FOO);
- QCOMPARE(list, QLinkedList<T>() << T_FOO);
-
- // try remove something that doesn't exist
- list.removeOne(T_WEEE);
- QCOMPARE(list, QLinkedList<T>() << T_FOO);
-}
-
-void tst_QLinkedList::removeOneInt() const
-{
- removeOne<int>();
-}
-
-void tst_QLinkedList::removeOneMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- removeOne<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::removeOneComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- removeOne<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QLinkedList::reverseIterators() const
-{
- QLinkedList<int> l;
- l << 1 << 2 << 3 << 4;
- QLinkedList<int> lr = l;
- std::reverse(lr.begin(), lr.end());
- const QLinkedList<int> &clr = lr;
- QVERIFY(std::equal(l.begin(), l.end(), lr.rbegin()));
- QVERIFY(std::equal(l.begin(), l.end(), lr.crbegin()));
- QVERIFY(std::equal(l.begin(), l.end(), clr.rbegin()));
- QVERIFY(std::equal(lr.rbegin(), lr.rend(), l.begin()));
- QVERIFY(std::equal(lr.crbegin(), lr.crend(), l.begin()));
- QVERIFY(std::equal(clr.rbegin(), clr.rend(), l.begin()));
-}
-
-template<typename T>
-void tst_QLinkedList::startsWith() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // make sure it starts ok
- QVERIFY(list.startsWith(T_FOO));
-
- // remove an item
- list.removeFirst();
- QVERIFY(list.startsWith(T_BAR));
-}
-
-void tst_QLinkedList::startsWithInt() const
-{
- startsWith<int>();
-}
-
-void tst_QLinkedList::startsWithMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- startsWith<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::startsWithComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- startsWith<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::takeFirst() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QCOMPARE(list.takeFirst(), T_FOO);
- QVERIFY(list.size() == 2);
- QCOMPARE(list.takeFirst(), T_BAR);
- QVERIFY(list.size() == 1);
- QCOMPARE(list.takeFirst(), T_BAZ);
- QVERIFY(list.size() == 0);
-}
-
-void tst_QLinkedList::takeFirstInt() const
-{
- takeFirst<int>();
-}
-
-void tst_QLinkedList::takeFirstMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- takeFirst<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::takeFirstComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- takeFirst<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::takeLast() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QCOMPARE(list.takeLast(), T_BAZ);
- QCOMPARE(list.takeLast(), T_BAR);
- QCOMPARE(list.takeLast(), T_FOO);
-}
-
-void tst_QLinkedList::takeLastInt() const
-{
- takeLast<int>();
-}
-
-void tst_QLinkedList::takeLastMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- takeLast<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::takeLastComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- takeLast<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::toStdList() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // yuck.
- std::list<T> slist;
- slist.push_back(T_FOO);
- slist.push_back(T_BAR);
- slist.push_back(T_BAZ);
-
- QCOMPARE(list.toStdList(), slist);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAR << T_BAZ);
-}
-
-void tst_QLinkedList::toStdListInt() const
-{
- toStdList<int>();
-}
-
-void tst_QLinkedList::toStdListMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- toStdList<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::toStdListComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- toStdList<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::testOperators() const
-{
- QLinkedList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QLinkedList<T> listtwo;
- listtwo << T_FOO << T_BAR << T_BAZ;
-
- // test equal
- QVERIFY(list == listtwo);
-
- // not equal
- listtwo.append(T_CAT);
- QVERIFY(list != listtwo);
-
- // +=
- list += listtwo;
- QVERIFY(list.size() == 7);
- QVERIFY(listtwo.size() == 4);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAR << T_BAZ
- << T_FOO << T_BAR << T_BAZ << T_CAT);
-
- // =
- list = listtwo;
- QCOMPARE(list, listtwo);
- QCOMPARE(list, QLinkedList<T>() << T_FOO << T_BAR << T_BAZ << T_CAT);
-}
-
-void tst_QLinkedList::testOperatorsInt() const
-{
- testOperators<int>();
-}
-
-void tst_QLinkedList::testOperatorsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- testOperators<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::testOperatorsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- testOperators<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QLinkedList::testSTLIterators() const
-{
- QLinkedList<T> list;
-
- // create a list
- list << T_FOO << T_BAR << T_BAZ;
- typename QLinkedList<T>::iterator it = list.begin();
- QCOMPARE(*it, T_FOO); it++;
- QCOMPARE(*it, T_BAR); it++;
- QCOMPARE(*it, T_BAZ); it++;
- QCOMPARE(it, list.end()); it--;
-
- // walk backwards
- QCOMPARE(*it, T_BAZ); it--;
- QCOMPARE(*it, T_BAR); it--;
- QCOMPARE(*it, T_FOO);
-
- // test erase
- it = list.erase(it);
- QVERIFY(list.size() == 2);
- QCOMPARE(*it, T_BAR);
-
- // test multiple erase
- it = list.erase(it, it + 2);
- QVERIFY(list.size() == 0);
- QCOMPARE(it, list.end());
-
- // insert again
- it = list.insert(it, T_FOO);
- QVERIFY(list.size() == 1);
- QCOMPARE(*it, T_FOO);
-
- // insert again
- it = list.insert(it, T_BAR);
- QVERIFY(list.size() == 2);
- QCOMPARE(*it++, T_BAR);
- QCOMPARE(*it, T_FOO);
-}
-
-void tst_QLinkedList::testSTLIteratorsInt() const
-{
- testSTLIterators<int>();
-}
-
-void tst_QLinkedList::testSTLIteratorsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- testSTLIterators<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::testSTLIteratorsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- testSTLIterators<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QLinkedList::initializeList() const
-{
- QLinkedList<int> v1 { 2, 3, 4 };
- QCOMPARE(v1, QLinkedList<int>() << 2 << 3 << 4);
- QCOMPARE(v1, (QLinkedList<int> { 2, 3, 4}));
-
- QLinkedList<QLinkedList<int>> v2{ v1, { 1 }, QLinkedList<int>(), { 2, 3, 4 } };
- QLinkedList<QLinkedList<int>> v3;
- v3 << v1 << (QLinkedList<int>() << 1) << QLinkedList<int>() << v1;
- QCOMPARE(v3, v2);
-}
-
-
-template<typename T>
-void tst_QLinkedList::constSharedNull() const
-{
- QLinkedList<T> list2;
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QLinkedList<T> list1;
- list1.setSharable(false);
- QVERIFY(list1.isDetached());
-
- list2.setSharable(true);
-#endif
- QVERIFY(!list2.isDetached());
-}
-
-void tst_QLinkedList::constSharedNullInt() const
-{
- constSharedNull<int>();
-}
-
-void tst_QLinkedList::constSharedNullMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- constSharedNull<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QLinkedList::constSharedNullComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- constSharedNull<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-
-void tst_QLinkedList::setSharableInt() const
-{
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QLinkedList<int> orglist;
- orglist << 0 << 1 << 2 << 3 << 4 << 5;
- int size = 6;
-
- QLinkedList<int> list;
- list = orglist;
-
- QVERIFY(!list.isDetached());
- list.setSharable(true);
-
- QCOMPARE(list.size(), size);
-
- {
- QLinkedList<int> copy(list);
- QVERIFY(!copy.isDetached());
- QVERIFY(copy.isSharedWith(list));
- }
-
- list.setSharable(false);
- QVERIFY(list.isDetached() || list.isSharedWith(QLinkedList<int>()));
-
- {
- QLinkedList<int> copy(list);
-
- QVERIFY(copy.isDetached() || copy.isSharedWith(QLinkedList<int>()));
- QCOMPARE(copy.size(), size);
- QCOMPARE(copy, list);
- }
-
- list.setSharable(true);
-
- {
- QLinkedList<int> copy(list);
-
- QVERIFY(!copy.isDetached());
- QVERIFY(copy.isSharedWith(list));
- }
-
- QLinkedList<int>::const_iterator it = list.constBegin();
- for (int i = 0; i < list.size(); ++i) {
- QCOMPARE(int(*it), i);
- ++it;
- }
-
- QCOMPARE(list.size(), size);
-#endif
-}
-
-QTEST_APPLESS_MAIN(tst_QLinkedList)
-#include "tst_qlinkedlist.moc"
diff --git a/tests/auto/corelib/tools/qlist/.gitignore b/tests/auto/corelib/tools/qlist/.gitignore
deleted file mode 100644
index df208b6e78..0000000000
--- a/tests/auto/corelib/tools/qlist/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-tst_qlist
diff --git a/tests/auto/corelib/tools/qlist/qlist.pro b/tests/auto/corelib/tools/qlist/qlist.pro
deleted file mode 100644
index 118c607880..0000000000
--- a/tests/auto/corelib/tools/qlist/qlist.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qlist
-QT = core testlib
-qtConfig(c++14): CONFIG += c++14
-qtConfig(c++1z): CONFIG += c++1z
-SOURCES = $$PWD/tst_qlist.cpp
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
deleted file mode 100644
index cc9a3a16d1..0000000000
--- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp
+++ /dev/null
@@ -1,2115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-#include <QList>
-
-template <typename T, class MemoryLayout>
-class is_qlist_array_memory_layout {
- struct No { char c; };
- struct Yes { No n[2]; };
- Q_STATIC_ASSERT(sizeof(No) != sizeof(Yes));
- static No check(...);
- static Yes check(MemoryLayout);
-public:
- enum { value = sizeof(check(typename QList<T>::MemoryLayout())) == sizeof(Yes) };
-};
-
-struct Movable {
- Movable(char input = 'j')
- : i(input)
- , state(Constructed)
- {
- ++liveCount;
- }
- Movable(const Movable &other)
- : i(other.i)
- , state(Constructed)
- {
- check(other.state, Constructed);
- ++liveCount;
- }
-
- ~Movable()
- {
- check(state, Constructed);
- i = 0;
- --liveCount;
- state = Destructed;
- }
-
- bool operator ==(const Movable &other) const
- {
- check(state, Constructed);
- check(other.state, Constructed);
- return i == other.i;
- }
-
- bool operator<(const Movable &other) const
- {
- check(state, Constructed);
- check(other.state, Constructed);
- return i < other.i;
- }
-
- Movable &operator=(const Movable &other)
- {
- check(state, Constructed);
- check(other.state, Constructed);
- i = other.i;
- return *this;
- }
- char i;
-
- static int getLiveCount() { return liveCount; }
-private:
- static int liveCount;
-
- enum State { Constructed = 106, Destructed = 110 };
- uchar state;
-
- static void check(const uchar state1, const uchar state2)
- {
- QCOMPARE(state1, state2);
- }
-};
-
-Q_STATIC_ASSERT(sizeof(Movable) < sizeof(void*));
-
-int Movable::liveCount = 0;
-
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(Movable, Q_MOVABLE_TYPE);
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(Movable);
-
-int qHash(const Movable& movable)
-{
- return qHash(movable.i);
-}
-
-struct Optimal
-{
- Optimal(char input = 'j')
- : i(input),
- state(Constructed)
- {
- ++liveCount;
- }
- Optimal(const Optimal &other)
- : i(other.i),
- state(Constructed)
- {
- check(other.state, Constructed);
- ++liveCount;
- }
-
- ~Optimal()
- {
- check(state, Constructed);
- i = 0;
- --liveCount;
- state = Destructed;
- }
-
- bool operator ==(const Optimal &other) const
- {
- check(state, Constructed);
- check(other.state, Constructed);
- return i == other.i;
- }
-
- bool operator<(const Optimal &other) const
- {
- check(state, Constructed);
- check(other.state, Constructed);
- return i < other.i;
- }
-
- Optimal &operator=(const Optimal &other)
- {
- check(state, Constructed);
- check(other.state, Constructed);
- i = other.i;
- return *this;
- }
- char i;
-
- static int getLiveCount() { return liveCount; }
-private:
- static int liveCount;
-
- enum State { Constructed = 106, Destructed = 110 };
- uchar state;
- char padding[sizeof(void*) - 2];
-
- static void check(const uchar state1, const uchar state2)
- {
- QCOMPARE(state1, state2);
- }
-};
-
-Q_STATIC_ASSERT(sizeof(Optimal) == sizeof(void*));
-
-int Optimal::liveCount = 0;
-
-QT_BEGIN_NAMESPACE
-Q_DECLARE_TYPEINFO(Optimal, Q_MOVABLE_TYPE);
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(Optimal);
-
-int qHash(const Optimal& key)
-{
- return qHash(key.i);
-}
-
-struct Complex
-{
- Complex(int val = 0)
- : value(val)
- , checkSum(this)
- {
- ++liveCount;
- }
-
- Complex(Complex const &other)
- : value(other.value)
- , checkSum(this)
- {
- ++liveCount;
- }
-
- Complex &operator=(Complex const &other)
- {
- check(); other.check();
-
- value = other.value;
- return *this;
- }
-
- ~Complex()
- {
- --liveCount;
- check();
- }
-
- operator int() const { return value; }
-
- bool operator==(Complex const &other) const
- {
- check(); other.check();
- return value == other.value;
- }
-
- bool operator<(Complex const &other) const
- {
- check(); other.check();
- return value < other.value;
- }
-
- void check() const
- {
- QVERIFY(this == checkSum);
- }
-
- static int getLiveCount() { return liveCount; }
-private:
- static int liveCount;
-
- int value;
- void *checkSum;
-};
-
-int Complex::liveCount = 0;
-
-Q_DECLARE_METATYPE(Complex);
-
-// Tests depend on the fact that:
-Q_STATIC_ASSERT(!QTypeInfo<int>::isStatic);
-Q_STATIC_ASSERT(!QTypeInfo<int>::isComplex);
-Q_STATIC_ASSERT(!QTypeInfo<Movable>::isStatic);
-Q_STATIC_ASSERT(QTypeInfo<Movable>::isComplex);
-Q_STATIC_ASSERT(!QTypeInfo<Optimal>::isStatic);
-Q_STATIC_ASSERT(QTypeInfo<Optimal>::isComplex);
-Q_STATIC_ASSERT(QTypeInfo<Complex>::isStatic);
-Q_STATIC_ASSERT(QTypeInfo<Complex>::isComplex);
-// iow:
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<int, QListData::NotIndirectLayout> ::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<int, QListData::IndirectLayout> ::value));
-
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Optimal, QListData::InlineWithPaddingLayout> ::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Optimal, QListData::NotArrayCompatibleLayout>::value));
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Optimal, QListData::NotIndirectLayout> ::value));
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Optimal, QListData::ArrayCompatibleLayout> ::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Optimal, QListData::IndirectLayout> ::value));
-
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Movable, QListData::InlineWithPaddingLayout> ::value));
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Movable, QListData::NotArrayCompatibleLayout>::value));
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Movable, QListData::NotIndirectLayout> ::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Movable, QListData::ArrayCompatibleLayout> ::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Movable, QListData::IndirectLayout> ::value));
-
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Complex, QListData::InlineWithPaddingLayout> ::value));
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Complex, QListData::NotArrayCompatibleLayout>::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Complex, QListData::NotIndirectLayout> ::value));
-Q_STATIC_ASSERT((!is_qlist_array_memory_layout<Complex, QListData::ArrayCompatibleLayout> ::value));
-Q_STATIC_ASSERT(( is_qlist_array_memory_layout<Complex, QListData::IndirectLayout> ::value));
-
-class tst_QList : public QObject
-{
- Q_OBJECT
-
-private slots:
- void lengthOptimal() const;
- void lengthMovable() const;
- void lengthComplex() const;
- void lengthSignature() const;
- void appendOptimal() const;
- void appendMovable() const;
- void appendComplex() const;
- void prepend() const;
- void midOptimal() const;
- void midMovable() const;
- void midComplex() const;
- void atOptimal() const;
- void atMovable() const;
- void atComplex() const;
- void firstOptimal() const;
- void firstMovable() const;
- void firstComplex() const;
- void lastOptimal() const;
- void lastMovable() const;
- void lastComplex() const;
- void constFirst() const;
- void constLast() const;
- void cpp17ctad() const;
- void beginOptimal() const;
- void beginMovable() const;
- void beginComplex() const;
- void endOptimal() const;
- void endMovable() const;
- void endComplex() const;
- void containsOptimal() const;
- void containsMovable() const;
- void containsComplex() const;
- void countOptimal() const;
- void countMovable() const;
- void countComplex() const;
- void emptyOptimal() const;
- void emptyMovable() const;
- void emptyComplex() const;
- void endsWithOptimal() const;
- void endsWithMovable() const;
- void endsWithComplex() const;
- void lastIndexOfOptimal() const;
- void lastIndexOfMovable() const;
- void lastIndexOfComplex() const;
- void moveOptimal() const;
- void moveMovable() const;
- void moveComplex() const;
- void removeAllOptimal() const;
- void removeAllMovable() const;
- void removeAllComplex() const;
- void removeAtOptimal() const;
- void removeAtMovable() const;
- void removeAtComplex() const;
- void removeOneOptimal() const;
- void removeOneMovable() const;
- void removeOneComplex() const;
- void replaceOptimal() const;
- void replaceMovable() const;
- void replaceComplex() const;
- void reverseIteratorsOptimal() const;
- void reverseIteratorsMovable() const;
- void reverseIteratorsComplex() const;
- void startsWithOptimal() const;
- void startsWithMovable() const;
- void startsWithComplex() const;
- void swapOptimal() const;
- void swapMovable() const;
- void swapComplex() const;
- void takeAtOptimal() const;
- void takeAtMovable() const;
- void takeAtComplex() const;
- void takeFirstOptimal() const;
- void takeFirstMovable() const;
- void takeFirstComplex() const;
- void takeLastOptimal() const;
- void takeLastMovable() const;
- void takeLastComplex() const;
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
- void toSetOptimal() const;
- void toSetMovable() const;
- void toSetComplex() const;
- void toStdListOptimal() const;
- void toStdListMovable() const;
- void toStdListComplex() const;
-#endif
- void toVectorOptimal() const;
- void toVectorMovable() const;
- void toVectorComplex() const;
- void valueOptimal() const;
- void valueMovable() const;
- void valueComplex() const;
-
- void testOperatorsOptimal() const;
- void testOperatorsMovable() const;
- void testOperatorsComplex() const;
- void testSTLIteratorsOptimal() const;
- void testSTLIteratorsMovable() const;
- void testSTLIteratorsComplex() const;
-
- void initializeList() const;
-
- void constSharedNullOptimal() const;
- void constSharedNullMovable() const;
- void constSharedNullComplex() const;
- void setSharableInt_data() const;
- void setSharableInt() const;
- void setSharableComplex_data() const;
- void setSharableComplex() const;
- void eraseValidIteratorsOnSharedList() const;
- void insertWithValidIteratorsOnSharedList() const;
-
- void qhashOptimal() const { qhash<Optimal>(); }
- void qhashMovable() const { qhash<Movable>(); }
- void qhashComplex() const { qhash<Complex>(); }
- void reserve() const;
-private:
- template<typename T> void length() const;
- template<typename T> void append() const;
- template<typename T> void mid() const;
- template<typename T> void at() const;
- template<typename T> void first() const;
- template<typename T> void last() const;
- template<typename T> void begin() const;
- template<typename T> void end() const;
- template<typename T> void contains() const;
- template<typename T> void count() const;
- template<typename T> void empty() const;
- template<typename T> void endsWith() const;
- template<typename T> void lastIndexOf() const;
- template<typename T> void move() const;
- template<typename T> void qhash() const;
- template<typename T> void removeAll() const;
- template<typename T> void removeAt() const;
- template<typename T> void removeOne() const;
- template<typename T> void replace() const;
- template<typename T> void reverseIterators() const;
- template<typename T> void startsWith() const;
- template<typename T> void swap() const;
- template<typename T> void takeAt() const;
- template<typename T> void takeFirst() const;
- template<typename T> void takeLast() const;
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
- template<typename T> void toSet() const;
- template<typename T> void toStdList() const;
-#endif
- template<typename T> void toVector() const;
- template<typename T> void value() const;
-
- template<typename T> void testOperators() const;
- template<typename T> void testSTLIterators() const;
-
- template<typename T> void constSharedNull() const;
-
- int dummyForGuard;
-};
-
-template<typename T> struct SimpleValue
-{
- static T at(int index)
- {
- return values[index % maxSize];
- }
- static const uint maxSize = 7;
- static const T values[maxSize];
-};
-
-template<>
-const Optimal SimpleValue<Optimal>::values[] = { 10, 20, 30, 40, 100, 101, 102 };
-template<>
-const Movable SimpleValue<Movable>::values[] = { 10, 20, 30, 40, 100, 101, 102 };
-template<>
-const Complex SimpleValue<Complex>::values[] = { 10, 20, 30, 40, 100, 101, 102 };
-
-// Make some macros for the tests to use in order to be slightly more readable...
-#define T_FOO SimpleValue<T>::at(0)
-#define T_BAR SimpleValue<T>::at(1)
-#define T_BAZ SimpleValue<T>::at(2)
-#define T_CAT SimpleValue<T>::at(3)
-#define T_DOG SimpleValue<T>::at(4)
-#define T_BLAH SimpleValue<T>::at(5)
-#define T_WEEE SimpleValue<T>::at(6)
-
-template<typename T>
-void tst_QList::length() const
-{
- /* Empty list. */
- {
- const QList<T> list;
- QCOMPARE(list.length(), 0);
- }
-
- /* One entry. */
- {
- QList<T> list;
- list.append(T_FOO);
- QCOMPARE(list.length(), 1);
- }
-
- /* Two entries. */
- {
- QList<T> list;
- list.append(T_FOO);
- list.append(T_BAR);
- QCOMPARE(list.length(), 2);
- }
-
- /* Three entries. */
- {
- QList<T> list;
- list.append(T_FOO);
- list.append(T_BAR);
- list.append(T_BAZ);
- QCOMPARE(list.length(), 3);
- }
-}
-
-void tst_QList::lengthOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- length<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::lengthMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- length<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::lengthComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- length<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QList::lengthSignature() const
-{
- /* Constness. */
- {
- const QList<int> list;
- /* The function should be const. */
- list.length();
- }
-}
-
-template<typename T>
-void tst_QList::append() const
-{
- /* test append(const QList<T> &) function */
- T one(T_FOO);
- T two(T_BAR);
- T three(T_BAZ);
- T four(T_CAT);
- QList<T> list1;
- QList<T> list2;
- QList<T> listTotal;
- list1.append(one);
- list1.append(two);
- list2.append(three);
- list2.append(four);
- list1.append(list2);
- listTotal.append(one);
- listTotal.append(two);
- listTotal.append(three);
- listTotal.append(four);
- QCOMPARE(list1, listTotal);
-}
-
-void tst_QList::appendOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- append<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::appendMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- append<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::appendComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- append<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QList::prepend() const
-{
- QList<int *> list;
- int *t1 = new int(0);
- list.prepend(t1);
- QVERIFY(list.size() == 1);
- QVERIFY(list.at(0) == t1);
- int *t2 = new int(0);
- list.prepend(t2);
- QVERIFY(list.size() == 2);
- QVERIFY(list.at(0) == t2);
- QVERIFY(list.at(1) == t1);
- int *t3 = new int(0);
- list.prepend(t3);
- QVERIFY(list.size() == 3);
- QVERIFY(list.at(0) == t3);
- QVERIFY(list.at(1) == t2);
- QVERIFY(list.at(2) == t1);
- list.removeAll(t2);
- delete t2;
- QVERIFY(list.size() == 2);
- QVERIFY(list.at(0) == t3);
- QVERIFY(list.at(1) == t1);
- int *t4 = new int(0);
- list.prepend(t4);
- QVERIFY(list.size() == 3);
- QVERIFY(list.at(0) == t4);
- QVERIFY(list.at(1) == t3);
- QVERIFY(list.at(2) == t1);
- qDeleteAll(list);
- list.clear();
-}
-
-template<typename T>
-void tst_QList::mid() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ << T_CAT << T_DOG << T_BLAH << T_WEEE;
-
- QCOMPARE(list.mid(3, 3),
- QList<T>() << T_CAT << T_DOG << T_BLAH);
-
- QList<T> list1;
- QCOMPARE(list1.mid(1, 1).length(), 0);
-}
-
-void tst_QList::midOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- mid<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::midMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- mid<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::midComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- mid<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::at() const
-{
- // test at() and make sure it functions correctly with some simple list manipulation.
- QList<T> list;
-
- // create a list
- list << T_FOO << T_BAR << T_BAZ;
- QVERIFY(list.size() == 3);
- QCOMPARE(list.at(0), T_FOO);
- QCOMPARE(list.at(1), T_BAR);
- QCOMPARE(list.at(2), T_BAZ);
-
- // append an item
- list << T_CAT;
- QVERIFY(list.size() == 4);
- QCOMPARE(list.at(0), T_FOO);
- QCOMPARE(list.at(1), T_BAR);
- QCOMPARE(list.at(2), T_BAZ);
- QCOMPARE(list.at(3), T_CAT);
-
- // remove an item
- list.removeAt(1);
- QVERIFY(list.size() == 3);
- QCOMPARE(list.at(0), T_FOO);
- QCOMPARE(list.at(1), T_BAZ);
- QCOMPARE(list.at(2), T_CAT);
-}
-
-void tst_QList::atOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- at<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::atMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- at<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::atComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- at<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::first() const
-{
- QList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(list.first(), T_FOO);
-
- // remove an item, make sure it still works
- list.pop_front();
- QVERIFY(list.size() == 1);
- QCOMPARE(list.first(), T_BAR);
-}
-
-void tst_QList::firstOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- first<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::firstMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- first<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::firstComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- first<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QList::constFirst() const
-{
- // Based on tst_QVector::constFirst()
- QList<int> list;
- list << 69 << 42 << 3;
-
- // test it starts ok
- QCOMPARE(list.constFirst(), 69);
- QVERIFY(list.isDetached());
-
- QList<int> listCopy = list;
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- QCOMPARE(list.constFirst(), 69);
- QCOMPARE(listCopy.constFirst(), 69);
-
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- // test removal changes
- list.removeAt(0);
- QVERIFY(list.isDetached());
- QVERIFY(!list.isSharedWith(listCopy));
- QCOMPARE(list.constFirst(), 42);
- QCOMPARE(listCopy.constFirst(), 69);
-
- listCopy = list;
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- QCOMPARE(list.constFirst(), 42);
- QCOMPARE(listCopy.constFirst(), 42);
-
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- // test prepend changes
- list.prepend(23);
- QVERIFY(list.isDetached());
- QVERIFY(!list.isSharedWith(listCopy));
- QCOMPARE(list.constFirst(), 23);
- QCOMPARE(listCopy.constFirst(), 42);
-
- listCopy = list;
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- QCOMPARE(list.constFirst(), 23);
- QCOMPARE(listCopy.constFirst(), 23);
-
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-}
-
-void tst_QList::constLast() const
-{
- // Based on tst_QVector::constLast()
- QList<int> list;
- list << 69 << 42 << 3;
-
- // test it starts ok
- QCOMPARE(list.constLast(), 3);
- QVERIFY(list.isDetached());
-
- QList<int> listCopy = list;
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- QCOMPARE(list.constLast(), 3);
- QCOMPARE(listCopy.constLast(), 3);
-
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- // test removal changes
- list.removeLast();
- QVERIFY(list.isDetached());
- QVERIFY(!list.isSharedWith(listCopy));
- QCOMPARE(list.constLast(), 42);
- QCOMPARE(listCopy.constLast(), 3);
-
- listCopy = list;
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- QCOMPARE(list.constLast(), 42);
- QCOMPARE(listCopy.constLast(), 42);
-
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- // test prepend changes
- list.append(23);
- QVERIFY(list.isDetached());
- QVERIFY(!list.isSharedWith(listCopy));
- QCOMPARE(list.constLast(), 23);
- QCOMPARE(listCopy.constLast(), 42);
-
- listCopy = list;
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-
- QCOMPARE(list.constLast(), 23);
- QCOMPARE(listCopy.constLast(), 23);
-
- QVERIFY(!list.isDetached());
- QVERIFY(!listCopy.isDetached());
- QVERIFY(list.isSharedWith(listCopy));
- QVERIFY(listCopy.isSharedWith(list));
-}
-
-void tst_QList::cpp17ctad() const
-{
-#ifdef __cpp_deduction_guides
-#define QVERIFY_IS_LIST_OF(obj, Type) \
- QVERIFY2((std::is_same<decltype(obj), QList<Type>>::value), \
- QMetaType::typeName(qMetaTypeId<decltype(obj)::value_type>()))
-#define CHECK(Type, One, Two, Three) \
- do { \
- const Type v[] = {One, Two, Three}; \
- QList v1 = {One, Two, Three}; \
- QVERIFY_IS_LIST_OF(v1, Type); \
- QList v2(v1.begin(), v1.end()); \
- QVERIFY_IS_LIST_OF(v2, Type); \
- QList v3(std::begin(v), std::end(v)); \
- QVERIFY_IS_LIST_OF(v3, Type); \
- } while (false) \
- /*end*/
- CHECK(int, 1, 2, 3);
- CHECK(double, 1.0, 2.0, 3.0);
- CHECK(QString, QStringLiteral("one"), QStringLiteral("two"), QStringLiteral("three"));
-#undef QVERIFY_IS_LIST_OF
-#undef CHECK
-#else
- QSKIP("This test requires C++17 Constructor Template Argument Deduction support enabled in the compiler.");
-#endif
-}
-
-template<typename T>
-void tst_QList::last() const
-{
- QList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(list.last(), T_BAR);
-
- // remove an item, make sure it still works
- list.pop_back();
- QVERIFY(list.size() == 1);
- QCOMPARE(list.last(), T_FOO);
-}
-
-void tst_QList::lastOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- last<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::lastMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- last<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::lastComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- last<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::begin() const
-{
- QList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(*list.begin(), T_FOO);
-
- // remove an item, make sure it still works
- list.pop_front();
- QVERIFY(list.size() == 1);
- QCOMPARE(*list.begin(), T_BAR);
-}
-
-void tst_QList::beginOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- begin<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::beginMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- begin<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::beginComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- begin<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::end() const
-{
- QList<T> list;
- list << T_FOO << T_BAR;
-
- QCOMPARE(*--list.end(), T_BAR);
-
- // remove an item, make sure it still works
- list.pop_back();
- QVERIFY(list.size() == 1);
- QCOMPARE(*--list.end(), T_FOO);
-}
-
-void tst_QList::endOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- end<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::endMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- end<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::endComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- end<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::contains() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QVERIFY(list.contains(T_FOO));
- QVERIFY(list.contains(T_BLAH) != true);
-
- // add it and make sure it matches
- list.append(T_BLAH);
- QVERIFY(list.contains(T_BLAH));
-}
-
-void tst_QList::containsOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- contains<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::containsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- contains<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::containsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- contains<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::count() const
-{
- QList<T> list;
-
- // starts empty
- QVERIFY(list.count() == 0);
-
- // goes up
- list.append(T_FOO);
- QVERIFY(list.count() == 1);
-
- // and up
- list.append(T_BAR);
- QVERIFY(list.count() == 2);
-
- // and down
- list.pop_back();
- QVERIFY(list.count() == 1);
-
- // and empty. :)
- list.pop_back();
- QVERIFY(list.count() == 0);
-}
-
-void tst_QList::countOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- count<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::countMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- count<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::countComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- count<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::empty() const
-{
- QList<T> list;
-
- // make sure it starts empty
- QVERIFY(list.empty());
-
- // and doesn't stay empty
- list.append(T_FOO);
- QVERIFY(!list.empty());
-
- // and goes back to being empty
- list.pop_back();
- QVERIFY(list.empty());
-}
-
-void tst_QList::emptyOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- empty<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::emptyMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- empty<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::emptyComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- empty<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::endsWith() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // test it returns correctly in both cases
- QVERIFY(list.endsWith(T_BAZ));
- QVERIFY(!list.endsWith(T_BAR));
-
- // remove an item and make sure the end item changes
- list.pop_back();
- QVERIFY(list.endsWith(T_BAR));
-}
-
-void tst_QList::endsWithOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- endsWith<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::endsWithMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- endsWith<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::endsWithComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- endsWith<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::lastIndexOf() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // one instance of the target item
- QVERIFY(list.lastIndexOf(T_BAZ) == 2);
-
- // shouldn't find this
- QVERIFY(list.lastIndexOf(T_WEEE) == -1);
-
- // multiple instances
- list.append(T_BAZ);
- list.append(T_BAZ);
- QVERIFY(list.lastIndexOf(T_BAZ) == 4);
-
- // search from the middle to find the last one
- QVERIFY(list.lastIndexOf(T_BAZ, 3) == 3);
-
- // try to find none
- QVERIFY(list.lastIndexOf(T_BAZ, 1) == -1);
-}
-
-void tst_QList::lastIndexOfOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- lastIndexOf<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::lastIndexOfMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- lastIndexOf<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::lastIndexOfComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- lastIndexOf<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::move() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // move an item
- list.move(0, list.count() - 1);
- QCOMPARE(list, QList<T>() << T_BAR << T_BAZ << T_FOO);
-
- // move it back
- list.move(list.count() - 1, 0);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAR << T_BAZ);
-
- // move an item in the middle
- list.move(1, 0);
- QCOMPARE(list, QList<T>() << T_BAR << T_FOO << T_BAZ);
-}
-
-void tst_QList::moveOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- move<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::moveMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- move<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::moveComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- move<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::removeAll() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // remove one instance
- list.removeAll(T_BAR);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAZ);
-
- // many instances
- list << T_FOO << T_BAR << T_BAZ << T_FOO << T_BAR << T_BAZ << T_FOO << T_BAR << T_BAZ;
- list.removeAll(T_BAR);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ);
-
- // try remove something that doesn't exist
- list.removeAll(T_WEEE);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ << T_FOO << T_BAZ);
-}
-
-void tst_QList::removeAllOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- removeAll<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::removeAllMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- removeAll<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::removeAllComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- removeAll<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::removeAt() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // middle
- list.removeAt(1);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAZ);
-
- // start
- list.removeAt(0);
- QCOMPARE(list, QList<T>() << T_BAZ);
-
- // final
- list.removeAt(0);
- QCOMPARE(list, QList<T>());
-}
-
-void tst_QList::removeAtOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- removeAt<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::removeAtMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- removeAt<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::removeAtComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- removeAt<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::removeOne() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // middle
- list.removeOne(T_BAR);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAZ);
-
- // start
- list.removeOne(T_FOO);
- QCOMPARE(list, QList<T>() << T_BAZ);
-
- // last
- list.removeOne(T_BAZ);
- QCOMPARE(list, QList<T>());
-
- // make sure it really only removes one :)
- list << T_FOO << T_FOO;
- list.removeOne(T_FOO);
- QCOMPARE(list, QList<T>() << T_FOO);
-
- // try remove something that doesn't exist
- list.removeOne(T_WEEE);
- QCOMPARE(list, QList<T>() << T_FOO);
-}
-
-void tst_QList::removeOneOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- removeOne<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::removeOneMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- removeOne<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::removeOneComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- removeOne<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::replace() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // start
- list.replace(0, T_CAT);
- QCOMPARE(list, QList<T>() << T_CAT
- << T_BAR << T_BAZ);
-
- // middle
- list.replace(1, T_DOG);
- QCOMPARE(list, QList<T>() << T_CAT
- << T_DOG << T_BAZ);
-
- // end
- list.replace(2, T_BLAH);
- QCOMPARE(list, QList<T>() << T_CAT
- << T_DOG << T_BLAH);
-}
-
-void tst_QList::replaceOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- replace<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::replaceMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- replace<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::replaceComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- replace<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::reverseIterators() const
-{
- QList<T> v;
- v << T_CAT << T_DOG << T_BLAH << T_BAZ;
- QList<T> vr = v;
- std::reverse(vr.begin(), vr.end());
- const QList<T> &cvr = vr;
- QVERIFY(std::equal(v.begin(), v.end(), vr.rbegin()));
- QVERIFY(std::equal(v.begin(), v.end(), vr.crbegin()));
- QVERIFY(std::equal(v.begin(), v.end(), cvr.rbegin()));
- QVERIFY(std::equal(vr.rbegin(), vr.rend(), v.begin()));
- QVERIFY(std::equal(vr.crbegin(), vr.crend(), v.begin()));
- QVERIFY(std::equal(cvr.rbegin(), cvr.rend(), v.begin()));
-}
-
-void tst_QList::reverseIteratorsOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- reverseIterators<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::reverseIteratorsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- reverseIterators<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::reverseIteratorsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- reverseIterators<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::startsWith() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // make sure it starts ok
- QVERIFY(list.startsWith(T_FOO));
-
- // remove an item
- list.removeFirst();
- QVERIFY(list.startsWith(T_BAR));
-}
-
-void tst_QList::startsWithOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- startsWith<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::startsWithMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- startsWith<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::startsWithComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- startsWith<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::swap() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // swap
- list.swapItemsAt(0, 2);
- QCOMPARE(list, QList<T>() << T_BAZ << T_BAR << T_FOO);
-
- // swap again
- list.swapItemsAt(1, 2);
- QCOMPARE(list, QList<T>() << T_BAZ << T_FOO << T_BAR);
-
- QList<T> list2;
- list2 << T_DOG << T_BLAH;
-
- list.swap(list2);
- QCOMPARE(list, QList<T>() << T_DOG << T_BLAH);
- QCOMPARE(list2, QList<T>() << T_BAZ << T_FOO << T_BAR);
-}
-
-void tst_QList::swapOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- swap<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::swapMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- swap<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::swapComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- swap<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::takeAt() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QCOMPARE(list.takeAt(0), T_FOO);
- QVERIFY(list.size() == 2);
- QCOMPARE(list.takeAt(1), T_BAZ);
- QVERIFY(list.size() == 1);
- QCOMPARE(list.takeAt(0), T_BAR);
- QVERIFY(list.size() == 0);
-}
-
-void tst_QList::takeAtOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- takeAt<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::takeAtMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- takeAt<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::takeAtComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- takeAt<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::takeFirst() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QCOMPARE(list.takeFirst(), T_FOO);
- QVERIFY(list.size() == 2);
- QCOMPARE(list.takeFirst(), T_BAR);
- QVERIFY(list.size() == 1);
- QCOMPARE(list.takeFirst(), T_BAZ);
- QVERIFY(list.size() == 0);
-}
-
-void tst_QList::takeFirstOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- takeFirst<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::takeFirstMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- takeFirst<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::takeFirstComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- takeFirst<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::takeLast() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QCOMPARE(list.takeLast(), T_BAZ);
- QCOMPARE(list.takeLast(), T_BAR);
- QCOMPARE(list.takeLast(), T_FOO);
-}
-
-void tst_QList::takeLastOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- takeLast<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::takeLastMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- takeLast<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::takeLastComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- takeLast<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
-template<typename T>
-void tst_QList::toSet() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // no duplicates
- QCOMPARE(list.toSet(), QSet<T>() << T_FOO << T_BAR << T_BAZ);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAR << T_BAZ);
-
- // duplicates (is this more of a QSet test?)
- list << T_FOO << T_BAR << T_BAZ;
- QCOMPARE(list.toSet(), QSet<T>() << T_FOO << T_BAR << T_BAZ);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAR << T_BAZ
- << T_FOO << T_BAR << T_BAZ);
-}
-
-void tst_QList::toSetOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- toSet<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::toSetMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- toSet<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::toSetComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- toSet<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::toStdList() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // yuck.
- std::list<T> slist;
- slist.push_back(T_FOO);
- slist.push_back(T_BAR);
- slist.push_back(T_BAZ);
-
- QCOMPARE(list.toStdList(), slist);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAR << T_BAZ);
-}
-
-void tst_QList::toStdListOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- toStdList<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::toStdListMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- toStdList<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::toStdListComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- toStdList<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-#endif
-
-template<typename T>
-void tst_QList::toVector() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QCOMPARE(list.toVector(), QVector<T>() << T_FOO << T_BAR << T_BAZ);
-}
-
-void tst_QList::toVectorOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- toVector<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::toVectorMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- toVector<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::toVectorComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- toVector<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::value() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- // test real values
- QCOMPARE(list.value(0), T_FOO);
- QCOMPARE(list.value(2), T_BAZ);
-
- // test empty default
- QCOMPARE(list.value(3), T());
- QCOMPARE(list.value(-1), T());
-
- // test defaults
- T defaultT(T_WEEE);
- QCOMPARE(list.value(-1, defaultT), defaultT);
- QCOMPARE(list.value(3, defaultT), defaultT);
-}
-
-void tst_QList::valueOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- value<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::valueMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- value<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::valueComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- value<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::testOperators() const
-{
- QList<T> list;
- list << T_FOO << T_BAR << T_BAZ;
-
- QList<T> listtwo;
- listtwo << T_FOO << T_BAR << T_BAZ;
-
- // test equal
- QVERIFY(list == listtwo);
-
- // not equal
- listtwo.append(T_CAT);
- QVERIFY(list != listtwo);
-
- // +=
- list += listtwo;
- QVERIFY(list.size() == 7);
- QVERIFY(listtwo.size() == 4);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAR << T_BAZ
- << T_FOO << T_BAR << T_BAZ << T_CAT);
-
- // =
- list = listtwo;
- QCOMPARE(list, listtwo);
- QCOMPARE(list, QList<T>() << T_FOO << T_BAR << T_BAZ << T_CAT);
-
- // []
- QCOMPARE(list[0], T_FOO);
- QCOMPARE(list[list.size() - 1], T_CAT);
-
- // <, >, <=, >=
- QVERIFY(!(list < listtwo));
- QVERIFY(!(list > listtwo));
- QVERIFY( list <= listtwo);
- QVERIFY( list >= listtwo);
- listtwo.push_back(T_CAT);
- QVERIFY( list < listtwo);
- QVERIFY(!(list > listtwo));
- QVERIFY( list <= listtwo);
- QVERIFY(!(list >= listtwo));
- QVERIFY(listtwo > list);
- QVERIFY(listtwo >= list);
-}
-
-void tst_QList::testOperatorsOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- testOperators<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::testOperatorsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- testOperators<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::testOperatorsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- testOperators<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template<typename T>
-void tst_QList::testSTLIterators() const
-{
- QList<T> list;
-
- // create a list
- list << T_FOO << T_BAR << T_BAZ;
- typename QList<T>::iterator it = list.begin();
- QCOMPARE(*it, T_FOO); it++;
- QCOMPARE(*it, T_BAR); it++;
- QCOMPARE(*it, T_BAZ); it++;
- QCOMPARE(it, list.end()); it--;
-
- // walk backwards
- QCOMPARE(*it, T_BAZ); it--;
- QCOMPARE(*it, T_BAR); it--;
- QCOMPARE(*it, T_FOO);
-
- // test erase
- it = list.erase(it);
- QVERIFY(list.size() == 2);
- QCOMPARE(*it, T_BAR);
-
- // test multiple erase
- it = list.erase(it, it + 2);
- QVERIFY(list.size() == 0);
- QCOMPARE(it, list.end());
-
- // insert again
- it = list.insert(it, T_FOO);
- QVERIFY(list.size() == 1);
- QCOMPARE(*it, T_FOO);
-
- // insert again
- it = list.insert(it, T_BAR);
- QVERIFY(list.size() == 2);
- QCOMPARE(*it++, T_BAR);
- QCOMPARE(*it, T_FOO);
-}
-
-void tst_QList::testSTLIteratorsOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- testSTLIterators<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::testSTLIteratorsMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- testSTLIterators<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::testSTLIteratorsComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- testSTLIterators<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-void tst_QList::initializeList() const
-{
- QList<int> v1{2,3,4};
- QCOMPARE(v1, QList<int>() << 2 << 3 << 4);
- QCOMPARE(v1, (QList<int>{2,3,4}));
-
- QList<QList<int>> v2{ v1, {1}, QList<int>(), {2,3,4} };
- QList<QList<int>> v3;
- v3 << v1 << (QList<int>() << 1) << QList<int>() << v1;
- QCOMPARE(v3, v2);
-}
-
-template<typename T>
-void tst_QList::constSharedNull() const
-{
- QList<T> list2;
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QList<T> list1;
- list1.setSharable(false);
- QVERIFY(list1.isDetached());
-
- list2.setSharable(true);
-#endif
- QVERIFY(!list2.isDetached());
-}
-
-void tst_QList::constSharedNullOptimal() const
-{
- const int liveCount = Optimal::getLiveCount();
- constSharedNull<Optimal>();
- QCOMPARE(liveCount, Optimal::getLiveCount());
-}
-
-void tst_QList::constSharedNullMovable() const
-{
- const int liveCount = Movable::getLiveCount();
- constSharedNull<Movable>();
- QCOMPARE(liveCount, Movable::getLiveCount());
-}
-
-void tst_QList::constSharedNullComplex() const
-{
- const int liveCount = Complex::getLiveCount();
- constSharedNull<Complex>();
- QCOMPARE(liveCount, Complex::getLiveCount());
-}
-
-template <class T>
-void generateSetSharableData()
-{
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QTest::addColumn<QList<T> >("list");
- QTest::addColumn<int>("size");
-
- QTest::newRow("null") << QList<T>() << 0;
- QTest::newRow("non-empty") << (QList<T>() << T(0) << T(1) << T(2) << T(3) << T(4)) << 5;
-#endif
-}
-
-template <class T>
-void runSetSharableTest()
-{
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QFETCH(QList<T>, list);
- QFETCH(int, size);
-
- QVERIFY(!list.isDetached()); // Shared with QTest
-
- list.setSharable(true);
-
- QCOMPARE(list.size(), size);
-
- {
- QList<T> copy(list);
- QVERIFY(!copy.isDetached());
- QVERIFY(copy.isSharedWith(list));
- }
-
- list.setSharable(false);
- QVERIFY(list.isDetached() || list.isSharedWith(QList<T>()));
-
- {
- QList<T> copy(list);
-
- QVERIFY(copy.isDetached() || copy.isSharedWith(QList<T>()));
- QCOMPARE(copy.size(), size);
- QCOMPARE(copy, list);
- }
-
- list.setSharable(true);
-
- {
- QList<T> copy(list);
-
- QVERIFY(!copy.isDetached());
- QVERIFY(copy.isSharedWith(list));
- }
-
- for (int i = 0; i < list.size(); ++i)
- QCOMPARE(int(list[i]), i);
-
- QCOMPARE(list.size(), size);
-#endif
-}
-
-void tst_QList::setSharableInt_data() const
-{
- generateSetSharableData<int>();
-}
-
-void tst_QList::setSharableComplex_data() const
-{
- generateSetSharableData<Complex>();
-}
-
-void tst_QList::setSharableInt() const
-{
- runSetSharableTest<int>();
-}
-
-void tst_QList::setSharableComplex() const
-{
- runSetSharableTest<Complex>();
-}
-
-void tst_QList::eraseValidIteratorsOnSharedList() const
-{
- QList<int> a, b;
- a.push_back(10);
- a.push_back(20);
- a.push_back(30);
- QList<int>::iterator i = a.begin();
- ++i;
- b = a;
- a.erase(i);
- QCOMPARE(b.size(), 3);
- QCOMPARE(a.size(), 2);
- QCOMPARE(a.at(0), 10);
- QCOMPARE(a.at(1), 30);
-
- a.push_back(40);
- a.push_back(50);
- a.push_back(60);
- QCOMPARE(a.size(), 5);
- i = a.begin();
- b = a;
- ++i;
- QList<int>::iterator j = i;
- ++j;
- ++j;
- a.erase(i, j); // remove 3 elements
- QCOMPARE(b.size(), 5);
- QCOMPARE(a.size(), 3);
- QCOMPARE(a.at(0), 10);
- QCOMPARE(a.at(1), 50);
-}
-
-void tst_QList::insertWithValidIteratorsOnSharedList() const
-{
- QList<int> a, b;
- a.push_back(10);
- a.push_back(20);
- a.push_back(30);
- QList<int>::iterator i = a.begin();
- ++i;
- b = a;
- a.insert(i, 15);
- QCOMPARE(a.size(), b.size() + 1);
- QCOMPARE(b.at(1), 20);
- QCOMPARE(a.at(1), 15);
-}
-
-template <typename T>
-void tst_QList::qhash() const
-{
- QList<T> l1, l2;
- QCOMPARE(qHash(l1), qHash(l2));
- l1 << T_BAR;
- l2 << T_BAR;
- QCOMPARE(qHash(l1), qHash(l2));
-}
-
-void tst_QList::reserve() const
-{
- // Note:
- // This test depends on QList's current behavior that ints are stored in the array itself.
- // This test would not work for QList<Complex>.
- int capacity = 100;
- QList<int> list;
- list.reserve(capacity);
- list << 0;
- int *data = &list[0];
-
- for (int i = 1; i < capacity; i++) {
- list << i;
- QCOMPARE(&list.at(0), data);
- }
-
- QList<int> copy = list;
- list.reserve(capacity / 2);
- QCOMPARE(list.size(), capacity); // we didn't shrink the size!
-
- copy = list;
- list.reserve(capacity * 2);
- QCOMPARE(list.size(), capacity);
- QVERIFY(&list.at(0) != data);
-}
-
-QTEST_APPLESS_MAIN(tst_QList)
-#include "tst_qlist.moc"
diff --git a/tests/auto/corelib/tools/qlist_strictiterators/qlist_strictiterators.pro b/tests/auto/corelib/tools/qlist_strictiterators/qlist_strictiterators.pro
deleted file mode 100644
index e39ad38919..0000000000
--- a/tests/auto/corelib/tools/qlist_strictiterators/qlist_strictiterators.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../qlist/qlist.pro)
-TARGET = tst_qlist_strictiterators
-DEFINES += QT_STRICT_ITERATORS tst_QList=tst_QList_StrictIterators
diff --git a/tests/auto/corelib/tools/qmakearray/CMakeLists.txt b/tests/auto/corelib/tools/qmakearray/CMakeLists.txt
new file mode 100644
index 0000000000..36b20c3b4f
--- /dev/null
+++ b/tests/auto/corelib/tools/qmakearray/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmakearray.pro.
+
+#####################################################################
+## tst_qmakearray Test:
+#####################################################################
+
+add_qt_test(tst_qmakearray
+ SOURCES
+ tst_qmakearray.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/tools/qmap/.prev_CMakeLists.txt b/tests/auto/corelib/tools/qmap/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..96378d3278
--- /dev/null
+++ b/tests/auto/corelib/tools/qmap/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmap.pro.
+
+#####################################################################
+## tst_qmap Test:
+#####################################################################
+
+add_qt_test(tst_qmap
+ SOURCES
+ tst_qmap.cpp
+ DEFINES
+ -QT_NO_JAVA_STYLE_ITERATORS
+)
diff --git a/tests/auto/corelib/tools/qmap/CMakeLists.txt b/tests/auto/corelib/tools/qmap/CMakeLists.txt
new file mode 100644
index 0000000000..677159ae0d
--- /dev/null
+++ b/tests/auto/corelib/tools/qmap/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmap.pro.
+
+#####################################################################
+## tst_qmap Test:
+#####################################################################
+
+add_qt_test(tst_qmap
+ SOURCES
+ tst_qmap.cpp
+ DEFINES
+ #-QT_NO_JAVA_STYLE_ITERATORS # special case remove
+)
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index c3a8a88f0c..1638ebc992 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -68,7 +68,6 @@ private slots:
void const_shared_null();
void equal_range();
- void setSharable();
void insert();
void insertMap();
@@ -1066,13 +1065,6 @@ void tst_QMap::qmultimap_specific()
void tst_QMap::const_shared_null()
{
QMap<int, QString> map2;
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QMap<int, QString> map1;
- map1.setSharable(false);
- QVERIFY(map1.isDetached());
-
- map2.setSharable(true);
-#endif
QVERIFY(!map2.isDetached());
}
@@ -1161,61 +1153,6 @@ const T &const_(const T &t)
return t;
}
-void tst_QMap::setSharable()
-{
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- QMap<int, QString> map;
-
- map.insert(1, "um");
- map.insert(2, "dois");
- map.insert(4, "quatro");
- map.insert(5, "cinco");
-
- map.setSharable(true);
- QCOMPARE(map.size(), 4);
- QCOMPARE(const_(map)[4], QString("quatro"));
-
- {
- QMap<int, QString> copy(map);
-
- QVERIFY(!map.isDetached());
- QVERIFY(copy.isSharedWith(map));
- sanityCheckTree(copy, __LINE__);
- }
-
- map.setSharable(false);
- sanityCheckTree(map, __LINE__);
- QVERIFY(map.isDetached());
- QCOMPARE(map.size(), 4);
- QCOMPARE(const_(map)[4], QString("quatro"));
-
- {
- QMap<int, QString> copy(map);
-
- QVERIFY(map.isDetached());
- QVERIFY(copy.isDetached());
-
- QCOMPARE(copy.size(), 4);
- QCOMPARE(const_(copy)[4], QString("quatro"));
-
- QCOMPARE(map, copy);
- sanityCheckTree(map, __LINE__);
- sanityCheckTree(copy, __LINE__);
- }
-
- map.setSharable(true);
- QCOMPARE(map.size(), 4);
- QCOMPARE(const_(map)[4], QString("quatro"));
-
- {
- QMap<int, QString> copy(map);
-
- QVERIFY(!map.isDetached());
- QVERIFY(copy.isSharedWith(map));
- }
-#endif
-}
-
void tst_QMap::insert()
{
QMap<QString, float> map;
@@ -1510,17 +1447,16 @@ void tst_QMap::testInsertMultiWithHint()
{
QMap<int, int> map;
- typedef QMap<int, int>::const_iterator cite; // Hack since we define QT_STRICT_ITERATORS
- map.insertMulti(cite(map.end()), 64, 65);
+ map.insertMulti(map.end(), 64, 65);
map[128] = 129;
map[256] = 257;
sanityCheckTree(map, __LINE__);
- map.insertMulti(cite(map.end()), 512, 513);
- map.insertMulti(cite(map.end()), 512, 513 * 2);
+ map.insertMulti(map.end(), 512, 513);
+ map.insertMulti(map.end(), 512, 513 * 2);
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 5);
- map.insertMulti(cite(map.end()), 256, 258); // wrong hint
+ map.insertMulti(map.end(), 256, 258); // wrong hint
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 6);
@@ -1532,23 +1468,23 @@ void tst_QMap::testInsertMultiWithHint()
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 8);
- j = map.insertMulti(cite(j), 68, 259);
+ j = map.insertMulti(j, 68, 259);
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 9);
- j = map.insertMulti(cite(j), 67, 67);
+ j = map.insertMulti(j, 67, 67);
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 10);
- i = map.insertMulti(cite(i), 256, 259);
+ i = map.insertMulti(i, 256, 259);
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 11);
- i = map.insertMulti(cite(i), 256, 260);
+ i = map.insertMulti(i, 256, 260);
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 12);
- map.insertMulti(cite(i), 64, 67);
+ map.insertMulti(i, 64, 67);
sanityCheckTree(map, __LINE__);
QCOMPARE(map.size(), 13);
diff --git a/tests/auto/corelib/tools/qmap_strictiterators/qmap_strictiterators.pro b/tests/auto/corelib/tools/qmap_strictiterators/qmap_strictiterators.pro
deleted file mode 100644
index 6c1f4727c1..0000000000
--- a/tests/auto/corelib/tools/qmap_strictiterators/qmap_strictiterators.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../qmap/qmap.pro)
-TARGET = tst_qmap_strictiterators
-DEFINES += QT_STRICT_ITERATORS tst_QMap=tst_QMap_StrictIterators
diff --git a/tests/auto/corelib/tools/qmargins/CMakeLists.txt b/tests/auto/corelib/tools/qmargins/CMakeLists.txt
new file mode 100644
index 0000000000..632e5dc8d2
--- /dev/null
+++ b/tests/auto/corelib/tools/qmargins/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmargins.pro.
+
+#####################################################################
+## tst_qmargins Test:
+#####################################################################
+
+add_qt_test(tst_qmargins
+ SOURCES
+ tst_qmargins.cpp
+)
diff --git a/tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt b/tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt
new file mode 100644
index 0000000000..6e142facfb
--- /dev/null
+++ b/tests/auto/corelib/tools/qmessageauthenticationcode/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qmessageauthenticationcode.pro.
+
+#####################################################################
+## tst_qmessageauthenticationcode Test:
+#####################################################################
+
+add_qt_test(tst_qmessageauthenticationcode
+ SOURCES
+ tst_qmessageauthenticationcode.cpp
+)
diff --git a/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro b/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro
index c8e6a8e05a..6c00f4f081 100644
--- a/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro
+++ b/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro
@@ -1,6 +1,5 @@
CONFIG += testcase
TARGET = tst_qoffsetstringarray
QT = core testlib core-private
-CONFIG += c++11
CONFIG += strict_c++
SOURCES = $$PWD/tst_qoffsetstringarray.cpp
diff --git a/tests/auto/corelib/tools/qpair/CMakeLists.txt b/tests/auto/corelib/tools/qpair/CMakeLists.txt
new file mode 100644
index 0000000000..4c226f5a02
--- /dev/null
+++ b/tests/auto/corelib/tools/qpair/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qpair.pro.
+
+#####################################################################
+## tst_qpair Test:
+#####################################################################
+
+add_qt_test(tst_qpair
+ SOURCES
+ tst_qpair.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/tools/qpoint/CMakeLists.txt b/tests/auto/corelib/tools/qpoint/CMakeLists.txt
new file mode 100644
index 0000000000..6ef68c30cb
--- /dev/null
+++ b/tests/auto/corelib/tools/qpoint/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qpoint.pro.
+
+#####################################################################
+## tst_qpoint Test:
+#####################################################################
+
+add_qt_test(tst_qpoint
+ SOURCES
+ tst_qpoint.cpp
+)
diff --git a/tests/auto/corelib/tools/qpointf/CMakeLists.txt b/tests/auto/corelib/tools/qpointf/CMakeLists.txt
new file mode 100644
index 0000000000..b1784d999f
--- /dev/null
+++ b/tests/auto/corelib/tools/qpointf/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qpointf.pro.
+
+#####################################################################
+## tst_qpointf Test:
+#####################################################################
+
+add_qt_test(tst_qpointf
+ SOURCES
+ tst_qpointf.cpp
+)
diff --git a/tests/auto/corelib/tools/qqueue/CMakeLists.txt b/tests/auto/corelib/tools/qqueue/CMakeLists.txt
new file mode 100644
index 0000000000..6d1aeda5b2
--- /dev/null
+++ b/tests/auto/corelib/tools/qqueue/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qqueue.pro.
+
+#####################################################################
+## tst_qqueue Test:
+#####################################################################
+
+add_qt_test(tst_qqueue
+ SOURCES
+ tst_qqueue.cpp
+)
diff --git a/tests/auto/corelib/tools/qrect/CMakeLists.txt b/tests/auto/corelib/tools/qrect/CMakeLists.txt
new file mode 100644
index 0000000000..47b8aced46
--- /dev/null
+++ b/tests/auto/corelib/tools/qrect/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qrect.pro.
+
+#####################################################################
+## tst_qrect Test:
+#####################################################################
+
+add_qt_test(tst_qrect
+ SOURCES
+ tst_qrect.cpp
+)
diff --git a/tests/auto/corelib/tools/qringbuffer/CMakeLists.txt b/tests/auto/corelib/tools/qringbuffer/CMakeLists.txt
new file mode 100644
index 0000000000..4bab92b0c6
--- /dev/null
+++ b/tests/auto/corelib/tools/qringbuffer/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qringbuffer.pro.
+
+#####################################################################
+## tst_qringbuffer Test:
+#####################################################################
+
+add_qt_test(tst_qringbuffer
+ SOURCES
+ tst_qringbuffer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt b/tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt
new file mode 100644
index 0000000000..141bab267b
--- /dev/null
+++ b/tests/auto/corelib/tools/qscopedpointer/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qscopedpointer.pro.
+
+#####################################################################
+## tst_qscopedpointer Test:
+#####################################################################
+
+add_qt_test(tst_qscopedpointer
+ SOURCES
+ tst_qscopedpointer.cpp
+)
diff --git a/tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt b/tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt
new file mode 100644
index 0000000000..e23a4d55f9
--- /dev/null
+++ b/tests/auto/corelib/tools/qscopedvaluerollback/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qscopedvaluerollback.pro.
+
+#####################################################################
+## tst_qscopedvaluerollback Test:
+#####################################################################
+
+add_qt_test(tst_qscopedvaluerollback
+ SOURCES
+ tst_qscopedvaluerollback.cpp
+)
diff --git a/tests/auto/corelib/tools/qscopeguard/CMakeLists.txt b/tests/auto/corelib/tools/qscopeguard/CMakeLists.txt
new file mode 100644
index 0000000000..11b425448b
--- /dev/null
+++ b/tests/auto/corelib/tools/qscopeguard/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qscopeguard.pro.
+
+#####################################################################
+## tst_qscopeguard Test:
+#####################################################################
+
+add_qt_test(tst_qscopeguard
+ SOURCES
+ tst_qscopeguard.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
index e5393f694e..4bb4113845 100644
--- a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
+++ b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
@@ -100,9 +100,11 @@ void tst_QScopeGuard::construction()
QScopeGuard fromFunctionPointer(&func);
QScopeGuard fromNonVoidFunction(intFunc);
QScopeGuard fromNoDiscardFunction(noDiscardFunc);
+#ifndef __apple_build_version__
QScopeGuard fromStdFunction{std::function(func)};
std::function stdFunction(func);
QScopeGuard fromNamedStdFunction(stdFunction);
+#endif
#else
QSKIP("This test requires C++17 Class Template Argument Deduction support enabled in the compiler.");
#endif
diff --git a/tests/auto/corelib/tools/qset/.prev_CMakeLists.txt b/tests/auto/corelib/tools/qset/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..68a8f64822
--- /dev/null
+++ b/tests/auto/corelib/tools/qset/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qset.pro.
+
+#####################################################################
+## tst_qset Test:
+#####################################################################
+
+add_qt_test(tst_qset
+ SOURCES
+ tst_qset.cpp
+ DEFINES
+ -QT_NO_JAVA_STYLE_ITERATORS
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/tools/qset/CMakeLists.txt b/tests/auto/corelib/tools/qset/CMakeLists.txt
new file mode 100644
index 0000000000..a423e4aa23
--- /dev/null
+++ b/tests/auto/corelib/tools/qset/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qset.pro.
+
+#####################################################################
+## tst_qset Test:
+#####################################################################
+
+add_qt_test(tst_qset
+ SOURCES
+ tst_qset.cpp
+ #DEFINES # special case remove
+ #-QT_NO_JAVA_STYLE_ITERATORS # special case remove
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index 8a545712a2..0ca8be7fa3 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -26,8 +26,6 @@
**
****************************************************************************/
-//#define QT_STRICT_ITERATORS
-
#include <QtTest/QtTest>
#include <qset.h>
#include <qdebug.h>
@@ -61,7 +59,6 @@ private slots:
void begin();
void end();
void insert();
- void reverseIterators();
void setOperations();
void stlIterator();
void stlMutableIterator();
@@ -579,21 +576,6 @@ void tst_QSet::insert()
}
}
-void tst_QSet::reverseIterators()
-{
- QSet<int> s;
- s << 1 << 17 << 61 << 127 << 911;
- std::vector<int> v(s.begin(), s.end());
- std::reverse(v.begin(), v.end());
- const QSet<int> &cs = s;
- QVERIFY(std::equal(v.begin(), v.end(), s.rbegin()));
- QVERIFY(std::equal(v.begin(), v.end(), s.crbegin()));
- QVERIFY(std::equal(v.begin(), v.end(), cs.rbegin()));
- QVERIFY(std::equal(s.rbegin(), s.rend(), v.begin()));
- QVERIFY(std::equal(s.crbegin(), s.crend(), v.begin()));
- QVERIFY(std::equal(cs.rbegin(), cs.rend(), v.begin()));
-}
-
void tst_QSet::setOperations()
{
QSet<QString> set1, set2;
@@ -707,16 +689,6 @@ void tst_QSet::stlIterator()
}
QVERIFY(sum == 24999 * 25000 / 2);
}
-
- {
- int sum = 0;
- QSet<QString>::const_iterator i = set1.end();
- while (i != set1.begin()) {
- --i;
- sum += toNumber(*i);
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
}
void tst_QSet::stlMutableIterator()
@@ -736,21 +708,10 @@ void tst_QSet::stlMutableIterator()
}
{
- int sum = 0;
- QSet<QString>::iterator i = set1.end();
- while (i != set1.begin()) {
- --i;
- sum += toNumber(*i);
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
QSet<QString> set2 = set1;
QSet<QString> set3 = set2;
QSet<QString>::iterator i = set2.begin();
- QSet<QString>::iterator j = set3.begin();
while (i != set2.end()) {
i = set2.erase(i);
@@ -758,24 +719,7 @@ void tst_QSet::stlMutableIterator()
QVERIFY(set2.isEmpty());
QVERIFY(!set3.isEmpty());
- j = set3.end();
- while (j != set3.begin()) {
- j--;
- if (j + 1 != set3.end())
- set3.erase(j + 1);
- }
- if (set3.begin() != set3.end())
- set3.erase(set3.begin());
-
- QVERIFY(set2.isEmpty());
- QVERIFY(set3.isEmpty());
-
-// #if QT_VERSION >= 0x050000
-// i = set2.insert("foo");
-// #else
- QSet<QString>::const_iterator k = set2.insert("foo");
- i = reinterpret_cast<QSet<QString>::iterator &>(k);
-// #endif
+ i = set2.insert("foo");
QCOMPARE(*i, QLatin1String("foo"));
}
}
@@ -804,47 +748,6 @@ void tst_QSet::javaIterator()
QVERIFY(sum == 24999 * 25000 / 2);
}
- {
- int sum = 0;
- QSetIterator<QString> i(set1);
- while (i.hasNext()) {
- i.next();
- sum += toNumber(i.peekPrevious());
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
- int sum = 0;
- QSetIterator<QString> i(set1);
- i.toBack();
- while (i.hasPrevious())
- sum += toNumber(i.previous());
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
- int sum = 0;
- QSetIterator<QString> i(set1);
- i.toBack();
- while (i.hasPrevious()) {
- sum += toNumber(i.peekPrevious());
- i.previous();
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
- int sum = 0;
- QSetIterator<QString> i(set1);
- i.toBack();
- while (i.hasPrevious()) {
- i.previous();
- sum += toNumber(i.peekNext());
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
int sum1 = 0;
int sum2 = 0;
QSetIterator<QString> i(set1);
@@ -899,52 +802,10 @@ void tst_QSet::javaMutableIterator()
}
{
- int sum = 0;
- QMutableSetIterator<QString> i(set1);
- while (i.hasNext()) {
- i.next();
- sum += toNumber(i.peekPrevious());
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
- int sum = 0;
- QMutableSetIterator<QString> i(set1);
- i.toBack();
- while (i.hasPrevious())
- sum += toNumber(i.previous());
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
- int sum = 0;
- QMutableSetIterator<QString> i(set1);
- i.toBack();
- while (i.hasPrevious()) {
- sum += toNumber(i.peekPrevious());
- i.previous();
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
- int sum = 0;
- QMutableSetIterator<QString> i(set1);
- i.toBack();
- while (i.hasPrevious()) {
- i.previous();
- sum += toNumber(i.peekNext());
- }
- QVERIFY(sum == 24999 * 25000 / 2);
- }
-
- {
QSet<QString> set2 = set1;
QSet<QString> set3 = set2;
QMutableSetIterator<QString> i(set2);
- QMutableSetIterator<QString> j(set3);
while (i.hasNext()) {
i.next();
@@ -952,14 +813,6 @@ void tst_QSet::javaMutableIterator()
}
QVERIFY(set2.isEmpty());
QVERIFY(!set3.isEmpty());
-
- j.toBack();
- while (j.hasPrevious()) {
- j.previous();
- j.remove();
- }
- QVERIFY(set2.isEmpty());
- QVERIFY(set3.isEmpty());
}
}
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index a9fd282ac9..8a621cd5d9 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -2155,7 +2155,7 @@ void tst_QSharedPointer::threadStressTest()
}
}
-template<typename Container, bool Ordered>
+template<typename Container, bool Ordered, bool Multi>
void hashAndMapTest()
{
typedef typename Container::key_type Key;
@@ -2200,26 +2200,30 @@ void hashAndMapTest()
QVERIFY(it == c.end());
}
- c.insertMulti(k1, Value(47));
- it = c.find(k1);
- QVERIFY(it != c.end());
- QCOMPARE(it.key(), k1);
- ++it;
- QVERIFY(it != c.end());
- QCOMPARE(it.key(), k1);
- ++it;
- if (Ordered)
- QVERIFY(it == c.end());
+ if (Multi) {
+ c.insert(k1, Value(47));
+ it = c.find(k1);
+ QVERIFY(it != c.end());
+ QCOMPARE(it.key(), k1);
+ ++it;
+ QVERIFY(it != c.end());
+ QCOMPARE(it.key(), k1);
+ ++it;
+ if (Ordered)
+ QVERIFY(it == c.end());
+ }
}
void tst_QSharedPointer::map()
{
- hashAndMapTest<QMap<QSharedPointer<int>, int>, true>();
+ hashAndMapTest<QMap<QSharedPointer<int>, int>, true, false>();
+ hashAndMapTest<QMultiMap<QSharedPointer<int>, int>, true, true>();
}
void tst_QSharedPointer::hash()
{
- hashAndMapTest<QHash<QSharedPointer<int>, int>, false>();
+ hashAndMapTest<QHash<QSharedPointer<int>, int>, false, false>();
+ hashAndMapTest<QMultiHash<QSharedPointer<int>, int>, false, true>();
}
void tst_QSharedPointer::validConstructs()
diff --git a/tests/auto/corelib/tools/qsize/CMakeLists.txt b/tests/auto/corelib/tools/qsize/CMakeLists.txt
new file mode 100644
index 0000000000..f516941180
--- /dev/null
+++ b/tests/auto/corelib/tools/qsize/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsize.pro.
+
+#####################################################################
+## tst_qsize Test:
+#####################################################################
+
+add_qt_test(tst_qsize
+ SOURCES
+ tst_qsize.cpp
+)
diff --git a/tests/auto/corelib/tools/qsizef/CMakeLists.txt b/tests/auto/corelib/tools/qsizef/CMakeLists.txt
new file mode 100644
index 0000000000..d767ca92d7
--- /dev/null
+++ b/tests/auto/corelib/tools/qsizef/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsizef.pro.
+
+#####################################################################
+## tst_qsizef Test:
+#####################################################################
+
+add_qt_test(tst_qsizef
+ SOURCES
+ tst_qsizef.cpp
+)
diff --git a/tests/auto/corelib/tools/qstl/CMakeLists.txt b/tests/auto/corelib/tools/qstl/CMakeLists.txt
new file mode 100644
index 0000000000..975ddfe0b5
--- /dev/null
+++ b/tests/auto/corelib/tools/qstl/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstl.pro.
+
+#####################################################################
+## tst_qstl Test:
+#####################################################################
+
+add_qt_test(tst_qstl
+ SOURCES
+ tst_qstl.cpp
+)
diff --git a/tests/auto/corelib/tools/qtimeline/CMakeLists.txt b/tests/auto/corelib/tools/qtimeline/CMakeLists.txt
new file mode 100644
index 0000000000..802cd56305
--- /dev/null
+++ b/tests/auto/corelib/tools/qtimeline/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qtimeline.pro.
+
+#####################################################################
+## tst_qtimeline Test:
+#####################################################################
+
+add_qt_test(tst_qtimeline
+ SOURCES
+ tst_qtimeline.cpp
+)
diff --git a/tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt b/tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt
new file mode 100644
index 0000000000..17989ae31d
--- /dev/null
+++ b/tests/auto/corelib/tools/qvarlengtharray/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qvarlengtharray.pro.
+
+#####################################################################
+## tst_qvarlengtharray Test:
+#####################################################################
+
+add_qt_test(tst_qvarlengtharray
+ SOURCES
+ tst_qvarlengtharray.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index a1d0100f96..6220cc766a 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -827,7 +827,7 @@ void tst_QVarLengthArray::operators()
// +=: not provided, emulate
//myvla += myvlatwo;
- Q_FOREACH (const QString &s, myvlatwo)
+ for (const QString &s : qAsConst(myvlatwo))
myvla.push_back(s);
QCOMPARE(myvla, combined);
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index 08d5a8cd50..6ae312fb8d 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -104,7 +104,7 @@ private:
static void check(const State state1, const State state2)
{
- QCOMPARE(state1, state2);
+ QCOMPARE(int(state1), int(state2));
}
};
@@ -174,7 +174,7 @@ private:
{
// check if c object has been moved
QCOMPARE(c, c->that);
- QCOMPARE(c->state, Constructed);
+ QCOMPARE(int(c->state), int(Constructed));
}
};
QAtomicInt Custom::counter = 0;
@@ -307,22 +307,11 @@ private slots:
void reserve();
void reserveZero();
- void reallocAfterCopy_data();
- void reallocAfterCopy();
void initializeListInt();
void initializeListMovable();
void initializeListCustom();
void const_shared_null();
-#if 1
- // ### Qt6 remove this section
- void setSharableInt_data();
- void setSharableInt();
- void setSharableMovable_data();
- void setSharableMovable();
- void setSharableCustom_data();
- void setSharableCustom();
-#endif
void detachInt() const;
void detachMovable() const;
@@ -335,6 +324,18 @@ private slots:
void swapItemsAt() const;
+ void emplaceInt();
+ void emplaceCustom();
+ void emplaceMovable();
+ void emplaceConsistentWithStdVectorInt();
+ void emplaceConsistentWithStdVectorCustom();
+ void emplaceConsistentWithStdVectorMovable();
+ void emplaceReturnsIterator();
+ void emplaceBack();
+ void emplaceBackReturnsRef();
+ void emplaceWithElementFromTheSameContainer();
+ void emplaceWithElementFromTheSameContainer_data();
+
private:
template<typename T> void copyConstructor() const;
template<typename T> void add() const;
@@ -358,10 +359,10 @@ private:
template<typename T> void size() const;
template<typename T> void swap() const;
template<typename T> void initializeList();
- template<typename T> void setSharable_data() const;
- template<typename T> void setSharable() const;
template<typename T> void detach() const;
template<typename T> void detachThreadSafety() const;
+ template<typename T> void emplaceImpl() const;
+ template<typename T> void emplaceConsistentWithStdVectorImpl() const;
};
@@ -467,24 +468,6 @@ void tst_QVector::copyConstructor() const
QVector<T> v2(v1);
QCOMPARE(v1, v2);
}
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- {
- QVector<T> v1;
- v1.setSharable(false);
- QVector<T> v2(v1);
- QVERIFY(!v1.isSharedWith(v2));
- QCOMPARE(v1, v2);
- }
- {
- QVector<T> v1;
- v1 << value1 << value2 << value3 << value4;
- v1.setSharable(false);
- QVector<T> v2(v1);
- QVERIFY(!v1.isSharedWith(v2));
- QCOMPARE(v1, v2);
- }
-#endif
}
void tst_QVector::copyConstructorInt() const
@@ -665,17 +648,6 @@ void tst_QVector::append() const
QVERIFY(v.size() == 3);
QCOMPARE(v.at(v.size() - 1), SimpleValue<T>::at(0));
}
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- {
- QVector<T> v(2);
- v.reserve(12);
- v.setSharable(false);
- v.append(SimpleValue<T>::at(0));
- QVERIFY(v.size() == 3);
- QCOMPARE(v.last(), SimpleValue<T>::at(0));
- }
-#endif
{
QVector<int> v;
v << 1 << 2 << 3;
@@ -766,16 +738,12 @@ void tst_QVector::capacity() const
myvec.remove(3);
myvec.remove(3);
myvec.remove(3);
- // TODO: is this a safe assumption? presumably it won't release memory until shrink(), but can we asser that is true?
- QVERIFY(myvec.capacity() >= 6);
myvec.squeeze();
QVERIFY(myvec.capacity() >= 3);
myvec.remove(0);
myvec.remove(0);
myvec.remove(0);
- // TODO: as above note
- QVERIFY(myvec.capacity() >= 3);
myvec.squeeze();
QVERIFY(myvec.capacity() == 0);
}
@@ -1019,20 +987,9 @@ void tst_QVector::endsWith() const
template<typename T>
void tst_QVector::eraseEmpty() const
{
- {
- QVector<T> v;
- v.erase(v.begin(), v.end());
- QCOMPARE(v.size(), 0);
- }
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- {
- QVector<T> v;
- v.setSharable(false);
- v.erase(v.begin(), v.end());
- QCOMPARE(v.size(), 0);
- }
-#endif
+ QVector<T> v;
+ v.erase(v.begin(), v.end());
+ QCOMPARE(v.size(), 0);
}
void tst_QVector::eraseEmptyInt() const
@@ -1057,22 +1014,10 @@ void tst_QVector::eraseEmptyCustom() const
template<typename T>
void tst_QVector::eraseEmptyReserved() const
{
- {
- QVector<T> v;
- v.reserve(10);
- v.erase(v.begin(), v.end());
- QCOMPARE(v.size(), 0);
- }
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- {
- QVector<T> v;
- v.reserve(10);
- v.setSharable(false);
- v.erase(v.begin(), v.end());
- QCOMPARE(v.size(), 0);
- }
-#endif
+ QVector<T> v;
+ v.reserve(10);
+ v.erase(v.begin(), v.end());
+ QCOMPARE(v.size(), 0);
}
void tst_QVector::eraseEmptyReservedInt() const
@@ -1179,21 +1124,6 @@ void tst_QVector::erase(bool shared) const
if (shared)
QCOMPARE(SimpleValue<T>::vector(12), *svc.copy);
}
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- {
- QVector<T> v = SimpleValue<T>::vector(10);
- SharedVectorChecker<T> svc(v, shared);
- v.setSharable(false);
- SharedVectorChecker<T> svc2(v, shared);
- v.erase(v.begin() + 3);
- QCOMPARE(v.size(), 9);
- v.erase(v.begin(), v.end() - 1);
- QCOMPARE(v.size(), 1);
- if (shared)
- QCOMPARE(SimpleValue<T>::vector(10), *svc.copy);
- }
-#endif
}
void tst_QVector::eraseInt() const
@@ -1266,18 +1196,6 @@ template<typename T> void tst_QVector::eraseReserved() const
v.erase(v.begin() + 1, v.end() - 1);
QCOMPARE(v.size(), 2);
}
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- {
- QVector<T> v(10);
- v.reserve(16);
- v.setSharable(false);
- v.erase(v.begin() + 3);
- QCOMPARE(v.size(), 9);
- v.erase(v.begin(), v.end() - 1);
- QCOMPARE(v.size(), 1);
- }
-#endif
}
void tst_QVector::eraseReservedInt() const
@@ -2019,33 +1937,6 @@ void tst_QVector::resizePOD_data() const
QTest::newRow("emptyReserved") << emptyReserved << 10;
QTest::newRow("nonEmpty") << nonEmpty << 10;
QTest::newRow("nonEmptyReserved") << nonEmptyReserved << 10;
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- QVector<int> nullNotShared;
- QVector<int> emptyNotShared(0, 5);
- QVector<int> emptyReservedNotShared;
- QVector<int> nonEmptyNotShared;
- QVector<int> nonEmptyReservedNotShared;
-
- emptyReservedNotShared.reserve(10);
- nonEmptyReservedNotShared.reserve(15);
- nonEmptyNotShared << 0 << 1 << 2 << 3 << 4;
- nonEmptyReservedNotShared << 0 << 1 << 2 << 3 << 4 << 5 << 6;
- QVERIFY(emptyReservedNotShared.capacity() >= 10);
- QVERIFY(nonEmptyReservedNotShared.capacity() >= 15);
-
- emptyNotShared.setSharable(false);
- emptyReservedNotShared.setSharable(false);
- nonEmptyNotShared.setSharable(false);
- nonEmptyReservedNotShared.setSharable(false);
-
- QTest::newRow("nullNotShared") << nullNotShared << 10;
- QTest::newRow("emptyNotShared") << emptyNotShared << 10;
- QTest::newRow("emptyReservedNotShared") << emptyReservedNotShared << 10;
- QTest::newRow("nonEmptyNotShared") << nonEmptyNotShared << 10;
- QTest::newRow("nonEmptyReservedNotShared") << nonEmptyReservedNotShared << 10;
-#endif
}
void tst_QVector::resizePOD() const
@@ -2094,33 +1985,6 @@ void tst_QVector::resizeComplexMovable_data() const
QTest::newRow("emptyReserved") << emptyReserved << 10;
QTest::newRow("nonEmpty") << nonEmpty << 10;
QTest::newRow("nonEmptyReserved") << nonEmptyReserved << 10;
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- QVector<Movable> nullNotShared;
- QVector<Movable> emptyNotShared(0, 'Q');
- QVector<Movable> emptyReservedNotShared;
- QVector<Movable> nonEmptyNotShared;
- QVector<Movable> nonEmptyReservedNotShared;
-
- emptyReservedNotShared.reserve(10);
- nonEmptyReservedNotShared.reserve(15);
- nonEmptyNotShared << '0' << '1' << '2' << '3' << '4';
- nonEmptyReservedNotShared << '0' << '1' << '2' << '3' << '4' << '5' << '6';
- QVERIFY(emptyReservedNotShared.capacity() >= 10);
- QVERIFY(nonEmptyReservedNotShared.capacity() >= 15);
-
- emptyNotShared.setSharable(false);
- emptyReservedNotShared.setSharable(false);
- nonEmptyNotShared.setSharable(false);
- nonEmptyReservedNotShared.setSharable(false);
-
- QTest::newRow("nullNotShared") << nullNotShared << 10;
- QTest::newRow("emptyNotShared") << emptyNotShared << 10;
- QTest::newRow("emptyReservedNotShared") << emptyReservedNotShared << 10;
- QTest::newRow("nonEmptyNotShared") << nonEmptyNotShared << 10;
- QTest::newRow("nonEmptyReservedNotShared") << nonEmptyReservedNotShared << 10;
-#endif
}
void tst_QVector::resizeComplexMovable() const
@@ -2173,33 +2037,6 @@ void tst_QVector::resizeComplex_data() const
QTest::newRow("emptyReserved") << emptyReserved << 10;
QTest::newRow("nonEmpty") << nonEmpty << 10;
QTest::newRow("nonEmptyReserved") << nonEmptyReserved << 10;
-
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- QVector<Custom> nullNotShared;
- QVector<Custom> emptyNotShared(0, '0');
- QVector<Custom> emptyReservedNotShared;
- QVector<Custom> nonEmptyNotShared;
- QVector<Custom> nonEmptyReservedNotShared;
-
- emptyReservedNotShared.reserve(10);
- nonEmptyReservedNotShared.reserve(15);
- nonEmptyNotShared << '0' << '1' << '2' << '3' << '4';
- nonEmptyReservedNotShared << '0' << '1' << '2' << '3' << '4' << '5' << '6';
- QVERIFY(emptyReservedNotShared.capacity() >= 10);
- QVERIFY(nonEmptyReservedNotShared.capacity() >= 15);
-
- emptyNotShared.setSharable(false);
- emptyReservedNotShared.setSharable(false);
- nonEmptyNotShared.setSharable(false);
- nonEmptyReservedNotShared.setSharable(false);
-
- QTest::newRow("nullNotShared") << nullNotShared << 10;
- QTest::newRow("emptyNotShared") << emptyNotShared << 10;
- QTest::newRow("emptyReservedNotShared") << emptyReservedNotShared << 10;
- QTest::newRow("nonEmptyNotShared") << nonEmptyNotShared << 10;
- QTest::newRow("nonEmptyReservedNotShared") << nonEmptyReservedNotShared << 10;
-#endif
}
void tst_QVector::resizeComplex() const
@@ -2512,87 +2349,6 @@ void tst_QVector::reserveZero()
QVERIFY(vec.capacity() >= 1);
}
-// This is a regression test for QTBUG-11763, where memory would be reallocated
-// soon after copying a QVector.
-void tst_QVector::reallocAfterCopy_data()
-{
- QTest::addColumn<int>("capacity");
- QTest::addColumn<int>("fill_size");
- QTest::addColumn<int>("func_id");
- QTest::addColumn<int>("result1");
- QTest::addColumn<int>("result2");
- QTest::addColumn<int>("result3");
- QTest::addColumn<int>("result4");
-
- int result1, result2, result3, result4;
- int fill_size;
- for (int i = 70; i <= 100; i += 10) {
- const QByteArray prefix = "reallocAfterCopy:" + QByteArray::number(i) + ',';
- fill_size = i - 20;
- for (int j = 0; j <= 3; j++) {
- if (j == 0) { // append
- result1 = i;
- result2 = i;
- result3 = i - 19;
- result4 = i - 20;
- } else if (j == 1) { // insert(0)
- result1 = i;
- result2 = i;
- result3 = i - 19;
- result4 = i - 20;
- } else if (j == 2) { // insert(20)
- result1 = i;
- result2 = i;
- result3 = i - 19;
- result4 = i - 20;
- } else if (j == 3) { // insert(0, 10)
- result1 = i;
- result2 = i;
- result3 = i - 10;
- result4 = i - 20;
- }
- QTest::newRow((prefix + QByteArray::number(j)).constData())
- << i << fill_size << j << result1 << result2 << result3 << result4;
- }
- }
-}
-
-void tst_QVector::reallocAfterCopy()
-{
- QFETCH(int, capacity);
- QFETCH(int, fill_size);
- QFETCH(int, func_id);
- QFETCH(int, result1);
- QFETCH(int, result2);
- QFETCH(int, result3);
- QFETCH(int, result4);
-
- QVector<qreal> v1;
- QVector<qreal> v2;
-
- v1.reserve(capacity);
- v1.resize(0);
- v1.fill(qreal(1.0), fill_size);
-
- v2 = v1;
-
- // no need to test begin() and end(), there is a detach() in them
- if (func_id == 0) {
- v1.append(qreal(1.0)); //push_back is same as append
- } else if (func_id == 1) {
- v1.insert(0, qreal(1.0)); //push_front is same as prepend, insert(0)
- } else if (func_id == 2) {
- v1.insert(20, qreal(1.0));
- } else if (func_id == 3) {
- v1.insert(0, 10, qreal(1.0));
- }
-
- QCOMPARE(v1.capacity(), result1);
- QCOMPARE(v2.capacity(), result2);
- QCOMPARE(v1.size(), result3);
- QCOMPARE(v2.size(), result4);
-}
-
template<typename T>
void tst_QVector::initializeList()
{
@@ -2636,154 +2392,9 @@ void tst_QVector::initializeListCustom()
void tst_QVector::const_shared_null()
{
QVector<int> v2;
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
- // ### Qt6 remove this section
- QVector<int> v1;
- v1.setSharable(false);
- QVERIFY(v1.isDetached());
-
- v2.setSharable(true);
-#endif
QVERIFY(!v2.isDetached());
}
-#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
-// ### Qt6 remove this section
-template<typename T>
-void tst_QVector::setSharable_data() const
-{
- QTest::addColumn<QVector<T> >("vector");
- QTest::addColumn<int>("size");
- QTest::addColumn<int>("capacity");
- QTest::addColumn<bool>("isCapacityReserved");
-
- QVector<T> null;
- QVector<T> empty(0, SimpleValue<T>::at(1));
- QVector<T> emptyReserved;
- QVector<T> nonEmpty;
- QVector<T> nonEmptyReserved;
-
- emptyReserved.reserve(10);
- nonEmptyReserved.reserve(15);
-
- nonEmpty << SimpleValue<T>::at(0) << SimpleValue<T>::at(1) << SimpleValue<T>::at(2) << SimpleValue<T>::at(3) << SimpleValue<T>::at(4);
- nonEmptyReserved << SimpleValue<T>::at(0) << SimpleValue<T>::at(1) << SimpleValue<T>::at(2) << SimpleValue<T>::at(3) << SimpleValue<T>::at(4) << SimpleValue<T>::at(5) << SimpleValue<T>::at(6);
-
- QVERIFY(emptyReserved.capacity() >= 10);
- QVERIFY(nonEmptyReserved.capacity() >= 15);
-
- QTest::newRow("null") << null << 0 << 0 << false;
- QTest::newRow("empty") << empty << 0 << 0 << false;
- QTest::newRow("empty, Reserved") << emptyReserved << 0 << 10 << true;
- QTest::newRow("non-empty") << nonEmpty << 5 << 0 << false;
- QTest::newRow("non-empty, Reserved") << nonEmptyReserved << 7 << 15 << true;
-}
-
-template<typename T>
-void tst_QVector::setSharable() const
-{
- QFETCH(QVector<T>, vector);
- QFETCH(int, size);
- QFETCH(int, capacity);
- QFETCH(bool, isCapacityReserved);
-
- QVERIFY(!vector.isDetached()); // Shared with QTest
-
- vector.setSharable(true);
-
- QCOMPARE(vector.size(), size);
- if (isCapacityReserved)
- QVERIFY2(vector.capacity() >= capacity,
- qPrintable(QString("Capacity is %1, expected at least %2.")
- .arg(vector.capacity())
- .arg(capacity)));
-
- {
- QVector<T> copy(vector);
-
- QVERIFY(!copy.isDetached());
- QVERIFY(copy.isSharedWith(vector));
- }
-
- vector.setSharable(false);
- QVERIFY(vector.isDetached() || vector.isSharedWith(QVector<T>()));
-
- {
- QVector<T> copy(vector);
-
- QVERIFY(copy.isDetached() || copy.isEmpty() || copy.isSharedWith(QVector<T>()));
- QCOMPARE(copy.size(), size);
- if (isCapacityReserved)
- QVERIFY2(copy.capacity() >= capacity,
- qPrintable(QString("Capacity is %1, expected at least %2.")
- .arg(copy.capacity())
- .arg(capacity)));
- QCOMPARE(copy, vector);
- }
-
- vector.setSharable(true);
-
- {
- QVector<T> copy(vector);
-
- QVERIFY(!copy.isDetached());
- QVERIFY(copy.isSharedWith(vector));
- }
-
- for (int i = 0; i < vector.size(); ++i)
- QCOMPARE(vector[i], SimpleValue<T>::at(i));
-
- QCOMPARE(vector.size(), size);
- if (isCapacityReserved)
- QVERIFY2(vector.capacity() >= capacity,
- qPrintable(QString("Capacity is %1, expected at least %2.")
- .arg(vector.capacity())
- .arg(capacity)));
-}
-#else
-template<typename T> void tst_QVector::setSharable_data() const
-{
-}
-
-template<typename T> void tst_QVector::setSharable() const
-{
-}
-#endif
-
-void tst_QVector::setSharableInt_data()
-{
- setSharable_data<int>();
-}
-
-void tst_QVector::setSharableMovable_data()
-{
- setSharable_data<Movable>();
-}
-
-void tst_QVector::setSharableCustom_data()
-{
- setSharable_data<Custom>();
-}
-
-void tst_QVector::setSharableInt()
-{
- setSharable<int>();
-}
-
-void tst_QVector::setSharableMovable()
-{
- const int instancesCount = Movable::counter.loadAcquire();
- setSharable<Movable>();
- QCOMPARE(instancesCount, Movable::counter.loadAcquire());
-}
-
-void tst_QVector::setSharableCustom()
-{
- const int instancesCount = Custom::counter.loadAcquire();
- setSharable<Custom>();
- QCOMPARE(instancesCount, Custom::counter.loadAcquire());
-}
-
template<typename T>
void tst_QVector::detach() const
{
@@ -2791,7 +2402,7 @@ void tst_QVector::detach() const
// detach an empty vector
QVector<T> v;
v.detach();
- QVERIFY(v.isDetached());
+ QVERIFY(!v.isDetached());
QCOMPARE(v.size(), 0);
QCOMPARE(v.capacity(), 0);
}
@@ -2801,7 +2412,7 @@ void tst_QVector::detach() const
QVector<T> ref(v);
QVERIFY(!v.isDetached());
v.detach();
- QVERIFY(v.isDetached());
+ QVERIFY(!v.isDetached());
QCOMPARE(v.size(), 0);
QCOMPARE(v.capacity(), 0);
}
@@ -3048,5 +2659,172 @@ void tst_QVector::swapItemsAt() const
QCOMPARE(copy.at(2), 2);
}
+void tst_QVector::emplaceInt()
+{
+ emplaceImpl<int>();
+}
+
+void tst_QVector::emplaceCustom()
+{
+ emplaceImpl<Custom>();
+}
+
+void tst_QVector::emplaceMovable()
+{
+ emplaceImpl<Movable>();
+}
+
+void tst_QVector::emplaceConsistentWithStdVectorInt()
+{
+ emplaceConsistentWithStdVectorImpl<int>();
+}
+
+void tst_QVector::emplaceConsistentWithStdVectorCustom()
+{
+ emplaceConsistentWithStdVectorImpl<Custom>();
+}
+
+void tst_QVector::emplaceConsistentWithStdVectorMovable()
+{
+ emplaceConsistentWithStdVectorImpl<Movable>();
+}
+
+void tst_QVector::emplaceReturnsIterator()
+{
+ QVector<Movable> vec;
+
+ vec.emplace(0, 'k')->i = 'p';
+
+ QCOMPARE(vec[0].i, 'p');
+}
+
+void tst_QVector::emplaceBack()
+{
+ QScopedValueRollback<QAtomicInt> rollback(Movable::counter, 0);
+
+ QVector<Movable> vec;
+
+ vec.emplaceBack('k');
+
+ QCOMPARE(Movable::counter, 1);
+}
+
+void tst_QVector::emplaceBackReturnsRef()
+{
+ QVector<Movable> vec;
+
+ vec.emplaceBack('k').i = 'p';
+
+ QCOMPARE(vec.at(0).i, 'p');
+}
+
+void tst_QVector::emplaceWithElementFromTheSameContainer()
+{
+ QFETCH(int, elementPos);
+ QFETCH(int, insertPos);
+ QFETCH(bool, doCopy);
+
+ QVector<QString> vec {"a", "b", "c", "d", "e"};
+ const QString e = vec[elementPos];
+
+ if (doCopy)
+ vec.emplace(insertPos, vec[elementPos]);
+ else
+ vec.emplace(insertPos, std::move(vec[elementPos]));
+
+ QCOMPARE(vec[insertPos], e);
+}
+
+void tst_QVector::emplaceWithElementFromTheSameContainer_data()
+{
+ QTest::addColumn<int>("elementPos");
+ QTest::addColumn<int>("insertPos");
+ QTest::addColumn<bool>("doCopy");
+
+ for (int i = 0; i < 2; ++i) {
+ const bool doCopy = i == 0;
+ const char *opName = doCopy ? "copy" : "move";
+
+ QTest::addRow("%s: begin -> end" , opName) << 0 << 5 << doCopy;
+ QTest::addRow("%s: begin -> middle", opName) << 0 << 2 << doCopy;
+ QTest::addRow("%s: middle -> begin" , opName) << 2 << 0 << doCopy;
+ QTest::addRow("%s: middle -> end" , opName) << 2 << 5 << doCopy;
+ QTest::addRow("%s: end -> middle", opName) << 4 << 2 << doCopy;
+ QTest::addRow("%s: end -> begin" , opName) << 4 << 0 << doCopy;
+ }
+}
+
+template<typename T>
+void tst_QVector::emplaceImpl() const
+{
+ QVector<T> vec {'a', 'b', 'c', 'd'};
+
+ vec.emplace(2, 'k');
+
+ QCOMPARE(vec[2], T('k'));
+}
+
+template <class T>
+static void vecEq(const QVector<T> &qVec, const std::vector<T> &stdVec)
+{
+ QCOMPARE(std::size_t(qVec.size()), stdVec.size());
+ QVERIFY(std::equal(qVec.begin(), qVec.end(), stdVec.begin(), stdVec.end()));
+}
+
+template <class T>
+static void squeezeVec(QVector<T> &qVec, std::vector<T> &stdVec)
+{
+ qVec.squeeze();
+ stdVec.shrink_to_fit();
+}
+
+template<typename T>
+void tst_QVector::emplaceConsistentWithStdVectorImpl() const
+{
+ QVector<T> qVec {'a', 'b', 'c', 'd', 'e'};
+ std::vector<T> stdVec {'a', 'b', 'c', 'd', 'e'};
+ vecEq(qVec, stdVec);
+
+ qVec.emplaceBack('f');
+ stdVec.emplace_back('f');
+ vecEq(qVec, stdVec);
+
+ qVec.emplace(3, 'g');
+ stdVec.emplace(stdVec.begin() + 3, 'g');
+ vecEq(qVec, stdVec);
+
+ qVec.emplaceBack(std::move(qVec[0]));
+ stdVec.emplace_back(std::move(stdVec[0]));
+ vecEq(qVec, stdVec);
+
+ squeezeVec(qVec, stdVec);
+
+ qVec.emplaceBack(std::move(qVec[1]));
+ stdVec.emplace_back(std::move(stdVec[1]));
+ vecEq(qVec, stdVec);
+
+ squeezeVec(qVec, stdVec);
+
+ qVec.emplace(3, std::move(qVec[5]));
+ stdVec.emplace(stdVec.begin() + 3, std::move(stdVec[5]));
+ vecEq(qVec, stdVec);
+
+ qVec.emplaceBack(qVec[3]);
+ stdVec.emplace_back(stdVec[3]);
+ vecEq(qVec, stdVec);
+
+ squeezeVec(qVec, stdVec);
+
+ qVec.emplaceBack(qVec[4]);
+ stdVec.emplace_back(stdVec[4]);
+ vecEq(qVec, stdVec);
+
+ squeezeVec(qVec, stdVec);
+
+ qVec.emplace(5, qVec[7]);
+ stdVec.emplace(stdVec.begin() + 5, stdVec[7]);
+ vecEq(qVec, stdVec);
+}
+
QTEST_MAIN(tst_QVector)
#include "tst_qvector.moc"
diff --git a/tests/auto/corelib/tools/qvector_strictiterators/qvector_strictiterators.pro b/tests/auto/corelib/tools/qvector_strictiterators/qvector_strictiterators.pro
deleted file mode 100644
index d6cad86aac..0000000000
--- a/tests/auto/corelib/tools/qvector_strictiterators/qvector_strictiterators.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-include(../qvector/qvector.pro)
-TARGET = tst_qvector_strictiterators
-DEFINES += QT_STRICT_ITERATORS=1 tst_QVector=tst_QVector_StrictIterators
diff --git a/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp b/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
index 7c4d1071ce..928bd365fd 100644
--- a/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
+++ b/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
@@ -81,6 +81,10 @@ private slots:
void serialize();
void moveSemantics();
void qtVersion();
+ void qTypeRevision_data();
+ void qTypeRevision();
+ void qTypeRevisionTypes();
+ void qTypeRevisionComparison();
};
void tst_QVersionNumber::singleInstanceData()
@@ -645,6 +649,153 @@ void tst_QVersionNumber::qtVersion()
QCOMPARE(v.toString(), QString(qVersion()));
}
+template<typename Integer>
+void compileTestRevisionMajorMinor()
+{
+ const Integer major = 8;
+ const Integer minor = 4;
+
+ const QTypeRevision r2 = QTypeRevision::fromVersion(major, minor);
+ QCOMPARE(r2.majorVersion(), 8);
+ QCOMPARE(r2.minorVersion(), 4);
+
+ const QTypeRevision r3 = QTypeRevision::fromMajorVersion(major);
+ QCOMPARE(r3.majorVersion(), 8);
+ QVERIFY(!r3.hasMinorVersion());
+
+ const QTypeRevision r4 = QTypeRevision::fromMinorVersion(minor);
+ QVERIFY(!r4.hasMajorVersion());
+ QCOMPARE(r4.minorVersion(), 4);
+}
+
+
+template<typename Integer>
+void compileTestRevision()
+{
+ if (std::is_signed<Integer>::value)
+ compileTestRevision<typename QIntegerForSize<sizeof(Integer) / 2>::Signed>();
+ else
+ compileTestRevision<typename QIntegerForSize<sizeof(Integer) / 2>::Unsigned>();
+
+ const Integer value = 0x0510;
+ const QTypeRevision r = QTypeRevision::fromEncodedVersion(value);
+
+ QCOMPARE(r.majorVersion(), 5);
+ QCOMPARE(r.minorVersion(), 16);
+ QCOMPARE(r.toEncodedVersion<Integer>(), value);
+
+ compileTestRevisionMajorMinor<Integer>();
+}
+
+template<>
+void compileTestRevision<qint16>()
+{
+ compileTestRevisionMajorMinor<quint8>();
+}
+
+template<>
+void compileTestRevision<quint8>()
+{
+ compileTestRevisionMajorMinor<quint8>();
+}
+
+template<>
+void compileTestRevision<qint8>()
+{
+ compileTestRevisionMajorMinor<qint8>();
+}
+
+void tst_QVersionNumber::qTypeRevision_data()
+{
+ QTest::addColumn<QTypeRevision>("revision");
+ QTest::addColumn<bool>("valid");
+ QTest::addColumn<int>("major");
+ QTest::addColumn<int>("minor");
+
+ QTest::addRow("Qt revision") << QTypeRevision::fromVersion(QT_VERSION_MAJOR, QT_VERSION_MINOR)
+ << true << QT_VERSION_MAJOR << QT_VERSION_MINOR;
+ QTest::addRow("invalid") << QTypeRevision() << false << 0xff << 0xff;
+ QTest::addRow("major") << QTypeRevision::fromMajorVersion(6) << true << 6 << 0xff;
+ QTest::addRow("minor") << QTypeRevision::fromMinorVersion(15) << true << 0xff << 15;
+ QTest::addRow("zero") << QTypeRevision::fromVersion(0, 0) << true << 0 << 0;
+
+ // We're intentionally not testing negative numbers.
+ // There are asserts against negative numbers in QTypeRevision.
+ // You must not pass them as major or minor versions, or values.
+}
+
+void tst_QVersionNumber::qTypeRevision()
+{
+ const QTypeRevision other = QTypeRevision::fromVersion(127, 128);
+
+ QFETCH(QTypeRevision, revision);
+
+ QFETCH(bool, valid);
+ QFETCH(int, major);
+ QFETCH(int, minor);
+
+ QCOMPARE(revision.isValid(), valid);
+ QCOMPARE(revision.majorVersion(), major);
+ QCOMPARE(revision.minorVersion(), minor);
+
+ QCOMPARE(revision.hasMajorVersion(), QTypeRevision::isValidSegment(major));
+ QCOMPARE(revision.hasMinorVersion(), QTypeRevision::isValidSegment(minor));
+
+ const QTypeRevision copy = QTypeRevision::fromEncodedVersion(revision.toEncodedVersion<int>());
+ QCOMPARE(copy, revision);
+
+ QVERIFY(revision != other);
+ QVERIFY(copy != other);
+}
+
+void tst_QVersionNumber::qTypeRevisionTypes()
+{
+ compileTestRevision<quint64>();
+ compileTestRevision<qint64>();
+
+ QVERIFY(!QTypeRevision::isValidSegment(0xff));
+ QVERIFY(!QTypeRevision::isValidSegment(-1));
+
+ const QTypeRevision maxRevision = QTypeRevision::fromVersion(254, 254);
+ QVERIFY(maxRevision.hasMajorVersion());
+ QVERIFY(maxRevision.hasMinorVersion());
+}
+
+void tst_QVersionNumber::qTypeRevisionComparison()
+{
+ const QTypeRevision revisions[] = {
+ QTypeRevision::zero(),
+ QTypeRevision::fromMajorVersion(0),
+ QTypeRevision::fromVersion(0, 1),
+ QTypeRevision::fromVersion(0, 20),
+ QTypeRevision::fromMinorVersion(0),
+ QTypeRevision(),
+ QTypeRevision::fromMinorVersion(1),
+ QTypeRevision::fromMinorVersion(20),
+ QTypeRevision::fromVersion(1, 0),
+ QTypeRevision::fromMajorVersion(1),
+ QTypeRevision::fromVersion(1, 1),
+ QTypeRevision::fromVersion(1, 20),
+ QTypeRevision::fromVersion(20, 0),
+ QTypeRevision::fromMajorVersion(20),
+ QTypeRevision::fromVersion(20, 1),
+ QTypeRevision::fromVersion(20, 20),
+ };
+
+ const int length = sizeof(revisions) / sizeof(QTypeRevision);
+
+ for (int i = 0; i < length; ++i) {
+ for (int j = 0; j < length; ++j) {
+ QCOMPARE(revisions[i] == revisions[j], i == j);
+ QCOMPARE(revisions[i] != revisions[j], i != j);
+ QCOMPARE(revisions[i] < revisions[j], i < j);
+ QCOMPARE(revisions[i] > revisions[j], i > j);
+ QCOMPARE(revisions[i] <= revisions[j], i <= j);
+ QCOMPARE(revisions[i] >= revisions[j], i >= j);
+ }
+ }
+}
+
QTEST_APPLESS_MAIN(tst_QVersionNumber)
#include "tst_qversionnumber.moc"
diff --git a/tests/auto/corelib/tools/tools.pro b/tests/auto/corelib/tools/tools.pro
index 49b2a1f075..e51be90100 100644
--- a/tests/auto/corelib/tools/tools.pro
+++ b/tests/auto/corelib/tools/tools.pro
@@ -4,7 +4,6 @@ SUBDIRS=\
containerapisymmetry \
qalgorithms \
qarraydata \
- qarraydata_strictiterators \
qbitarray \
qcache \
qcommandlineparser \
@@ -12,17 +11,13 @@ SUBDIRS=\
qcryptographichash \
qeasingcurve \
qexplicitlyshareddatapointer \
+ qflatmap \
qfreelist \
qhash \
- qhash_strictiterators \
qhashfunctions \
qline \
- qlinkedlist \
- qlist \
- qlist_strictiterators \
qmakearray \
qmap \
- qmap_strictiterators \
qmargins \
qmessageauthenticationcode \
qoffsetstringarray \
@@ -43,7 +38,6 @@ SUBDIRS=\
qtimeline \
qvarlengtharray \
qvector \
- qvector_strictiterators \
qversionnumber
darwin: SUBDIRS += qmacautoreleasepool
diff --git a/tests/auto/dbus/CMakeLists.txt b/tests/auto/dbus/CMakeLists.txt
new file mode 100644
index 0000000000..1b5022454a
--- /dev/null
+++ b/tests/auto/dbus/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from dbus.pro.
+
+add_subdirectory(qdbusconnection_delayed)
+add_subdirectory(qdbusconnection)
+add_subdirectory(qdbusconnection_no_app)
+add_subdirectory(qdbusconnection_no_bus)
+add_subdirectory(qdbusconnection_no_libdbus)
+add_subdirectory(qdbusconnection_spyhook)
+add_subdirectory(qdbuscontext)
+add_subdirectory(qdbuslocalcalls)
+add_subdirectory(qdbusmetaobject)
+add_subdirectory(qdbusmetatype)
+add_subdirectory(qdbuspendingcall)
+add_subdirectory(qdbuspendingreply)
+add_subdirectory(qdbusreply)
+add_subdirectory(qdbusservicewatcher)
+add_subdirectory(qdbustype)
+add_subdirectory(qdbusthreading)
+if(QT_FEATURE_process)
+ add_subdirectory(qdbusabstractadaptor)
+ add_subdirectory(qdbusabstractinterface)
+ add_subdirectory(qdbusinterface)
+endif()
+if(QT_FEATURE_private_tests AND QT_FEATURE_process)
+ add_subdirectory(qdbusmarshall)
+endif()
+if(TARGET Qt::Xml)
+ add_subdirectory(qdbusxmlparser)
+endif()
diff --git a/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
new file mode 100644
index 0000000000..a97accb925
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractadaptor/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+# Generated from qdbusabstractadaptor.pro.
+
+add_subdirectory(qmyserver)
+
+add_qt_test(tst_qdbusabstractadaptor
+ SOURCES
+ myobject.h
+ tst_qdbusabstractadaptor.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::DBus
+)
+
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/.prev_CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..caea7b1e64
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qmyserver.pro.
+
+#####################################################################
+## qmyserver Binary:
+#####################################################################
+
+add_qt_executable(qmyserver
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ ../myobject.h
+ qmyserver.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
new file mode 100644
index 0000000000..839b952591
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qmyserver.pro.
+
+#####################################################################
+## qmyserver Binary:
+#####################################################################
+
+add_qt_executable(qmyserver
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ NO_INSTALL # special case
+ SOURCES
+ ../myobject.h
+ qmyserver.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
new file mode 100644
index 0000000000..facac1a7fc
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qdbusabstractinterface.pro.
+
+add_subdirectory(qpinger)
+
+add_qt_test(tst_qdbusabstractinterface
+ SOURCES
+ interface.cpp
+ tst_qdbusabstractinterface.cpp
+ LIBRARIES
+ Qt::Core
+ Qt::DBus
+)
+
+extend_target(tst_qdbusabstractinterface
+ DBUS_INTERFACE_SOURCES
+ org.qtproject.QtDBus.Pinger.xml
+ DBUS_INTERFACE_BASENAME
+ pinger_interface
+ DBUS_INTERFACE_FLAGS
+ -i interface.h
+)
diff --git a/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/.prev_CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ee5a7c4003
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/.prev_CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qdbusabstractinterface.pro.
+
+#####################################################################
+## tst_qdbusabstractinterface Test:
+#####################################################################
+
+add_qt_test(tst_qdbusabstractinterface
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../interface.cpp ../interface.h
+ ../tst_qdbusabstractinterface.cpp
+ DBUS_INTERFACE_SOURCES
+ ../org.qtproject.QtDBus.Pinger.xml
+ DBUS_INTERFACE_FLAGS
+ "-i" "../interface.h"
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt
new file mode 100644
index 0000000000..3df1ff8177
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Generated from qdbusabstractinterface.pro.
+
+#####################################################################
+## tst_qdbusabstractinterface Test:
+#####################################################################
+# special case begin
+# this test can not be generated here. It needs to be set up in the
+# parent directory
+# special case end
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/.prev_CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qpinger/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4e2b5fe567
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qpinger.pro.
+
+#####################################################################
+## qpinger Binary:
+#####################################################################
+
+add_qt_executable(qpinger
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ ../interface.cpp ../interface.h
+ qpinger.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
new file mode 100644
index 0000000000..47e3cfbb69
--- /dev/null
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qpinger.pro.
+
+#####################################################################
+## qpinger Binary:
+#####################################################################
+
+add_qt_executable(qpinger
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ NO_INSTALL # special case
+ SOURCES
+ ../interface.cpp ../interface.h
+ qpinger.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection/CMakeLists.txt b/tests/auto/dbus/qdbusconnection/CMakeLists.txt
new file mode 100644
index 0000000000..b1927e5d10
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusconnection.pro.
+
+#####################################################################
+## tst_qdbusconnection Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection
+ SOURCES
+ tst_qdbusconnection.cpp tst_qdbusconnection.h
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
new file mode 100644
index 0000000000..0602c67fbb
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_delayed/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdbusconnection_delayed.pro.
+
+#####################################################################
+## tst_qdbusconnection_delayed Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_delayed
+ SOURCES
+ tst_qdbusconnection_delayed.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
new file mode 100644
index 0000000000..061c59579d
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_app/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qdbusconnection_no_app.pro.
+
+#####################################################################
+## tst_qdbusconnection_no_app Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_no_app
+ SOURCES
+ ../qdbusconnection/tst_qdbusconnection.h
+ tst_qdbusconnection_no_app.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ tst_QDBusConnection=tst_QDBusConnection_NoApplication
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
new file mode 100644
index 0000000000..b05ac03b2d
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_bus/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusconnection_no_bus.pro.
+
+#####################################################################
+## tst_qdbusconnection_no_bus Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_no_bus
+ SOURCES
+ tst_qdbusconnection_no_bus.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
new file mode 100644
index 0000000000..c372f16d12
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_libdbus/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qdbusconnection_no_libdbus.pro.
+
+#####################################################################
+## tst_qdbusconnection_no_libdbus Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_no_libdbus
+ SOURCES
+ ../qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
+ DEFINES
+ SIMULATE_LOAD_FAIL
+ tst_QDBusConnectionNoBus=tst_QDBusConnectionNoLibDBus1
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp b/tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp
new file mode 100644
index 0000000000..e93b8aa609
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_no_libdbus/tst_qdbusconnection_no_libdbus.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <qcoreapplication.h>
+#include <qdebug.h>
+
+#include <QtTest/QtTest>
+#include <QtDBus/QtDBus>
+
+#include <stdlib.h>
+
+/* This test uses an appless main, to ensure that no D-Bus stuff is implicitly done
+ It also sets the magic "QT_SIMULATE_DBUS_LIBFAIL" env variable, that is only available
+ in developer builds. That env variable simulates a D-Bus library load fail.
+
+ In no case should the QDBus module crash because D-Bus libs couldn't be loaded */
+
+class tst_QDBusConnectionNoBus : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QDBusConnectionNoBus()
+ {
+ qputenv("DBUS_SESSION_BUS_ADDRESS", "unix:abstract=/tmp/does_not_exist");
+#ifdef SIMULATE_LOAD_FAIL
+ qputenv("QT_SIMULATE_DBUS_LIBFAIL", "1");
+#endif
+ }
+
+private slots:
+ void connectToBus();
+};
+
+
+void tst_QDBusConnectionNoBus::connectToBus()
+{
+ int argc = 0;
+ QCoreApplication app(argc, 0);
+
+ QDBusConnection con = QDBusConnection::sessionBus();
+
+ QVERIFY(!con.isConnected()); // if we didn't crash here, the test passed :)
+}
+
+QTEST_APPLESS_MAIN(tst_QDBusConnectionNoBus)
+
+#include "tst_qdbusconnection_no_libdbus.moc"
+
diff --git a/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
new file mode 100644
index 0000000000..0005c36c36
--- /dev/null
+++ b/tests/auto/dbus/qdbusconnection_spyhook/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qdbusconnection_spyhook.pro.
+
+#####################################################################
+## tst_qdbusconnection_spyhook Test:
+#####################################################################
+
+add_qt_test(tst_qdbusconnection_spyhook
+ SOURCES
+ ../qdbusconnection/tst_qdbusconnection.h
+ tst_qdbusconnection_spyhook.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ tst_QDBusConnection=tst_QDBusConnection_SpyHook
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbuscontext/CMakeLists.txt b/tests/auto/dbus/qdbuscontext/CMakeLists.txt
new file mode 100644
index 0000000000..d8adf50bd2
--- /dev/null
+++ b/tests/auto/dbus/qdbuscontext/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbuscontext.pro.
+
+#####################################################################
+## tst_qdbuscontext Test:
+#####################################################################
+
+add_qt_test(tst_qdbuscontext
+ SOURCES
+ tst_qdbuscontext.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusinterface/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/CMakeLists.txt
new file mode 100644
index 0000000000..c96944cd56
--- /dev/null
+++ b/tests/auto/dbus/qdbusinterface/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from qdbusinterface.pro.
+
+# special case begin
+add_subdirectory(qmyserver)
+
+#####################################################################
+## ../tst_qdbusinterface Test:
+#####################################################################
+
+add_qt_test(tst_qdbusinterface
+ SOURCES
+ myobject.h
+ tst_qdbusinterface.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::DBus
+)
+
+#### Keys ignored in scope 1:.:.:qdbusinterface.pro:<TRUE>:
+# CONFIG = "testcase"
+# DESTDIR = "./"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qdbusinterface CONDITION QT_FEATURE_dbus_linked
+ DEFINES
+ QT_LINKED_LIBDBUS
+ PUBLIC_LIBRARIES
+ dbus-1
+)
+
+extend_target(tst_qdbusinterface CONDITION NOT QT_FEATURE_dbus_linked
+ SOURCES
+ ../../../../src/dbus/qdbus_symbols.cpp
+)
+
+# special case end
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/.prev_CMakeLists.txt b/tests/auto/dbus/qdbusinterface/qmyserver/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..671403999b
--- /dev/null
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qmyserver.pro.
+
+#####################################################################
+## qmyserver_qdbusinterface Binary:
+#####################################################################
+
+add_qt_executable(qmyserver_qdbusinterface
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ ../myobject.h
+ qmyserver.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt b/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt
new file mode 100644
index 0000000000..de633f2aa9
--- /dev/null
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qmyserver.pro.
+
+#####################################################################
+## qmyserver_qdbusinterface Binary:
+#####################################################################
+
+add_qt_executable(qmyserver_qdbusinterface
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ NO_INSTALL # special case
+ SOURCES
+ ../myobject.h
+ qmyserver.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro
index 8f2d261899..406f3d7d36 100644
--- a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.pro
@@ -1,6 +1,6 @@
SOURCES = qmyserver.cpp
HEADERS = ../myobject.h
-TARGET = qmyserver
+TARGET = qmyserver_qdbusinterface
DESTDIR = ./
QT = core dbus
CONFIG -= app_bundle
diff --git a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
index 05480c6dd2..e416266b5f 100644
--- a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
+++ b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
@@ -31,6 +31,7 @@
#include <qcoreapplication.h>
#include <qmetatype.h>
#include <QtTest/QtTest>
+#include <QtCore/qregularexpression.h>
#include <QtCore/qvariant.h>
#include <QtDBus/QtDBus>
#include <QtDBus/private/qdbus_symbols_p.h>
@@ -270,7 +271,7 @@ void tst_QDBusInterface::initTestCase()
# define EXE ""
#endif
proc.setProcessChannelMode(QProcess::ForwardedErrorChannel);
- proc.start(QFINDTESTDATA("qmyserver/qmyserver" EXE));
+ proc.start(QFINDTESTDATA("qmyserver/qmyserver_qdbusinterface" EXE)); // FIXME CMake: This is most probably wrong now since the binary ends up in bin/ not in the build tree
QVERIFY2(proc.waitForStarted(), qPrintable(proc.errorString()));
QVERIFY(proc.waitForReadyRead());
@@ -451,14 +452,16 @@ void tst_QDBusInterface::introspectVirtualObject()
QDBusMessage message = QDBusMessage::createMethodCall(con.baseService(), path, "org.freedesktop.DBus.Introspectable", "Introspect");
QDBusMessage reply = con.call(message, QDBus::Block, 5000);
QVERIFY(reply.arguments().at(0).toString().contains(
- QRegExp("<node>.*zitroneneis.*<interface name=") ));
+ QRegularExpression("<node>.*zitroneneis.*<interface name=",
+ QRegularExpression::DotMatchesEverythingOption)));
QDBusMessage message2 = QDBusMessage::createMethodCall(con.baseService(), path + "/foo", "org.freedesktop.DBus.Introspectable", "Introspect");
QDBusMessage reply2 = con.call(message2, QDBus::Block, 5000);
QVERIFY(reply2.arguments().at(0).toString().contains(
- QRegExp("<node>.*<interface name=\"org.qtproject.QtDBus.VirtualObject\">"
- ".*<method name=\"klingeling\" />\n"
- ".*</interface>.*<interface name=") ));
+ QRegularExpression("<node>.*<interface name=\"org.qtproject.QtDBus.VirtualObject\">"
+ ".*<method name=\"klingeling\" />\n"
+ ".*</interface>.*<interface name=",
+ QRegularExpression::DotMatchesEverythingOption)));
}
void tst_QDBusInterface::callMethod()
diff --git a/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt
new file mode 100644
index 0000000000..c65b48f948
--- /dev/null
+++ b/tests/auto/dbus/qdbuslocalcalls/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbuslocalcalls.pro.
+
+#####################################################################
+## tst_qdbuslocalcalls Test:
+#####################################################################
+
+add_qt_test(tst_qdbuslocalcalls
+ SOURCES
+ tst_qdbuslocalcalls.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt
new file mode 100644
index 0000000000..aabeae0f4a
--- /dev/null
+++ b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qdbusmarshall.pro.
+
+add_subdirectory(qpong)
+add_subdirectory(qdbusmarshall)
diff --git a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/.prev_CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..fc5f59990f
--- /dev/null
+++ b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/.prev_CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from qdbusmarshall.pro.
+
+#####################################################################
+## tst_qdbusmarshall Test:
+#####################################################################
+
+add_qt_test(tst_qdbusmarshall
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qdbusmarshall.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qdbusmarshall CONDITION QT_FEATURE_dbus_linked
+ DEFINES
+ QT_LINKED_LIBDBUS
+ PUBLIC_LIBRARIES
+ dbus-1
+)
+
+extend_target(tst_qdbusmarshall CONDITION NOT QT_FEATURE_dbus_linked
+ SOURCES
+ ../../../../../src/dbus/qdbus_symbols.cpp
+)
diff --git a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt
new file mode 100644
index 0000000000..bd615ab900
--- /dev/null
+++ b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from qdbusmarshall.pro.
+
+#####################################################################
+## tst_qdbusmarshall Test:
+#####################################################################
+
+add_qt_test(tst_qdbusmarshall
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qdbusmarshall.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+)
+
+## Scopes:
+#####################################################################
+
+# special case begin
+# This test case interacts with dbus code directly via the private
+# headers. The include path is also not exposed via Qt:DBus.
+# special case end
+extend_target(tst_qdbusmarshall CONDITION QT_FEATURE_dbus_linked
+ DEFINES
+ QT_LINKED_LIBDBUS
+ PUBLIC_LIBRARIES
+ dbus-1
+)
+
+extend_target(tst_qdbusmarshall CONDITION NOT QT_FEATURE_dbus_linked
+ SOURCES
+ ../../../../../src/dbus/qdbus_symbols.cpp
+)
diff --git a/tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt
new file mode 100644
index 0000000000..e53c11aabe
--- /dev/null
+++ b/tests/auto/dbus/qdbusmarshall/qpong/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qpong.pro.
+
+#####################################################################
+## qpong Binary:
+#####################################################################
+
+add_qt_executable(qpong
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ qpong.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt
new file mode 100644
index 0000000000..31cf3aff44
--- /dev/null
+++ b/tests/auto/dbus/qdbusmetaobject/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusmetaobject.pro.
+
+#####################################################################
+## tst_qdbusmetaobject Test:
+#####################################################################
+
+add_qt_test(tst_qdbusmetaobject
+ SOURCES
+ tst_qdbusmetaobject.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBusPrivate
+)
diff --git a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
index a4afae4b46..2a39a73a5a 100644
--- a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
+++ b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
@@ -394,7 +394,6 @@ void tst_QDBusMetaObject::types()
QCOMPARE(constructed.name(), expected.name());
QCOMPARE(constructed.parameterCount(), expected.parameterCount());
QCOMPARE(constructed.parameterNames(), expected.parameterNames());
- QCOMPARE(constructed.parameterTypes(), expected.parameterTypes());
for (int j = 0; j < constructed.parameterCount(); ++j)
QCOMPARE(constructed.parameterType(j), expected.parameterType(j));
QCOMPARE(constructed.tag(), expected.tag());
diff --git a/tests/auto/dbus/qdbusmetatype/CMakeLists.txt b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt
new file mode 100644
index 0000000000..1bc7871f8c
--- /dev/null
+++ b/tests/auto/dbus/qdbusmetatype/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusmetatype.pro.
+
+#####################################################################
+## tst_qdbusmetatype Test:
+#####################################################################
+
+add_qt_test(tst_qdbusmetatype
+ SOURCES
+ tst_qdbusmetatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
index 4b926dcd05..ec3e71ac8f 100644
--- a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
+++ b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
@@ -402,7 +402,7 @@ void tst_QDBusMetaType::invalidTypes()
else if (qstrcmp(QTest::currentDataTag(), "Invalid7") == 0)
QTest::ignoreMessage(QtWarningMsg, "QDBusMarshaller: type `Invalid7' produces invalid D-BUS signature `()' (Did you forget to call beginStructure() ?)");
else if (qstrcmp(QTest::currentDataTag(), "QList<Invalid0>") == 0)
- QTest::ignoreMessage(QtWarningMsg, "QDBusMarshaller: type `QList<Invalid0>' produces invalid D-BUS signature `a' (Did you forget to call beginStructure() ?)");
+ QTest::ignoreMessage(QtWarningMsg, "QDBusMarshaller: type `QVector<Invalid0>' produces invalid D-BUS signature `a' (Did you forget to call beginStructure() ?)");
staticTypes();
staticTypes(); // run twice: the error messages should be printed once only
diff --git a/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt
new file mode 100644
index 0000000000..d432fd3f6c
--- /dev/null
+++ b/tests/auto/dbus/qdbuspendingcall/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbuspendingcall.pro.
+
+#####################################################################
+## tst_qdbuspendingcall Test:
+#####################################################################
+
+add_qt_test(tst_qdbuspendingcall
+ SOURCES
+ tst_qdbuspendingcall.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt
new file mode 100644
index 0000000000..f6ff6afe8c
--- /dev/null
+++ b/tests/auto/dbus/qdbuspendingreply/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbuspendingreply.pro.
+
+#####################################################################
+## tst_qdbuspendingreply Test:
+#####################################################################
+
+add_qt_test(tst_qdbuspendingreply
+ SOURCES
+ tst_qdbuspendingreply.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusreply/CMakeLists.txt b/tests/auto/dbus/qdbusreply/CMakeLists.txt
new file mode 100644
index 0000000000..11770e16d5
--- /dev/null
+++ b/tests/auto/dbus/qdbusreply/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusreply.pro.
+
+#####################################################################
+## tst_qdbusreply Test:
+#####################################################################
+
+add_qt_test(tst_qdbusreply
+ SOURCES
+ tst_qdbusreply.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt
new file mode 100644
index 0000000000..436629ab80
--- /dev/null
+++ b/tests/auto/dbus/qdbusservicewatcher/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusservicewatcher.pro.
+
+#####################################################################
+## tst_qdbusservicewatcher Test:
+#####################################################################
+
+add_qt_test(tst_qdbusservicewatcher
+ SOURCES
+ tst_qdbusservicewatcher.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbusthreading/CMakeLists.txt b/tests/auto/dbus/qdbusthreading/CMakeLists.txt
new file mode 100644
index 0000000000..1c8f8a6053
--- /dev/null
+++ b/tests/auto/dbus/qdbusthreading/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdbusthreading.pro.
+
+#####################################################################
+## tst_qdbusthreading Test:
+#####################################################################
+
+add_qt_test(tst_qdbusthreading
+ SOURCES
+ tst_qdbusthreading.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/auto/dbus/qdbustype/CMakeLists.txt b/tests/auto/dbus/qdbustype/CMakeLists.txt
new file mode 100644
index 0000000000..34456d6331
--- /dev/null
+++ b/tests/auto/dbus/qdbustype/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qdbustype.pro.
+
+#####################################################################
+## tst_qdbustype Test:
+#####################################################################
+
+add_qt_test(tst_qdbustype
+ SOURCES
+ tst_qdbustype.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qdbustype CONDITION QT_FEATURE_dbus_linked
+ DEFINES
+ QT_LINKED_LIBDBUS
+ PUBLIC_LIBRARIES
+ dbus-1
+)
+
+extend_target(tst_qdbustype CONDITION NOT QT_FEATURE_dbus_linked
+ SOURCES
+ ../../../../src/dbus/qdbus_symbols.cpp
+)
diff --git a/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt
new file mode 100644
index 0000000000..879f8d28e4
--- /dev/null
+++ b/tests/auto/dbus/qdbusxmlparser/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdbusxmlparser.pro.
+
+#####################################################################
+## tst_qdbusxmlparser Test:
+#####################################################################
+
+add_qt_test(tst_qdbusxmlparser
+ SOURCES
+ tst_qdbusxmlparser.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+ Qt::Xml
+)
diff --git a/tests/auto/gui/.prev_CMakeLists.txt b/tests/auto/gui/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8cbfa78aad
--- /dev/null
+++ b/tests/auto/gui/.prev_CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from gui.pro.
+
+add_subdirectory(kernel)
+if(NOT APPLE_UIKIT)
+ add_subdirectory(image)
+ add_subdirectory(math3d)
+ add_subdirectory(painting)
+ add_subdirectory(text)
+ add_subdirectory(util)
+ add_subdirectory(itemmodels)
+ add_subdirectory(rhi)
+endif()
+if(QT_FEATURE_opengl AND NOT APPLE_UIKIT AND NOT WINRT)
+ add_subdirectory(qopenglconfig)
+ add_subdirectory(qopengl)
+endif()
+if(QT_FEATURE_vulkan AND NOT APPLE_UIKIT)
+ add_subdirectory(qvulkan)
+endif()
diff --git a/tests/auto/gui/CMakeLists.txt b/tests/auto/gui/CMakeLists.txt
new file mode 100644
index 0000000000..9a1312bd48
--- /dev/null
+++ b/tests/auto/gui/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from gui.pro.
+
+add_subdirectory(kernel)
+if(NOT APPLE_UIKIT)
+ add_subdirectory(image)
+ add_subdirectory(math3d)
+ add_subdirectory(painting)
+ add_subdirectory(text)
+ add_subdirectory(util)
+ add_subdirectory(itemmodels)
+ add_subdirectory(rhi)
+endif()
+if(QT_FEATURE_opengl AND NOT APPLE_UIKIT AND NOT WINRT)
+ add_subdirectory(qopenglconfig)
+ add_subdirectory(qopengl)
+endif()
+if(QT_FEATURE_vulkan AND NOT APPLE_UIKIT)
+ add_subdirectory(qvulkan)
+endif()
diff --git a/tests/auto/gui/image/CMakeLists.txt b/tests/auto/gui/image/CMakeLists.txt
new file mode 100644
index 0000000000..8ae016a8f8
--- /dev/null
+++ b/tests/auto/gui/image/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from image.pro.
+
+if(TARGET Qt::Network)
+ add_subdirectory(qimagereader)
+endif()
+add_subdirectory(qicoimageformat)
+add_subdirectory(qpixmap)
+add_subdirectory(qimage)
+add_subdirectory(qimageiohandler)
+add_subdirectory(qimagewriter)
+add_subdirectory(qmovie)
+add_subdirectory(qpicture)
+add_subdirectory(qicon)
+add_subdirectory(qiconhighdpi)
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qpixmapcache)
+endif()
diff --git a/tests/auto/gui/image/qicoimageformat/CMakeLists.txt b/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
new file mode 100644
index 0000000000..0c8393631a
--- /dev/null
+++ b/tests/auto/gui/image/qicoimageformat/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from qicoimageformat.pro.
+
+#####################################################################
+## tst_qicoimageformat Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ icons/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qicoimageformat
+ SOURCES
+ tst_qicoimageformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(qicoimageformat_resource_files
+ "icons/invalid/35floppy.ico"
+ "icons/valid/35FLOPPY.ICO"
+ "icons/valid/AddPerfMon.ico"
+ "icons/valid/App.ico"
+ "icons/valid/Obj_N2_Internal_Mem.ico"
+ "icons/valid/Qt.ico"
+ "icons/valid/Status_Play.ico"
+ "icons/valid/TIMER01.ICO"
+ "icons/valid/WORLD.ico"
+ "icons/valid/WORLDH.ico"
+ "icons/valid/abcardWindow.ico"
+ "icons/valid/semitransparent.ico"
+ "icons/valid/trolltechlogo_tiny.ico"
+ "icons/valid/yellow.cur"
+ )
+
+ add_qt_resource(tst_qicoimageformat "qicoimageformat"
+ PREFIX
+ "/"
+ FILES
+ ${qicoimageformat_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/image/qicon/CMakeLists.txt b/tests/auto/gui/image/qicon/CMakeLists.txt
new file mode 100644
index 0000000000..81f5390d79
--- /dev/null
+++ b/tests/auto/gui/image/qicon/CMakeLists.txt
@@ -0,0 +1,94 @@
+# Generated from qicon.pro.
+
+#####################################################################
+## tst_qicon Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ icons/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ second_icons/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ fallback_icons/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.png)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.svg)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.svgz)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qicon
+ SOURCES
+ tst_qicon.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(tst_qicon_resource_files
+ "./fallback_icons/red.png"
+ "./icons/testtheme/16x16/actions/appointment-new.png"
+ "./icons/testtheme/22x22/actions/appointment-new.png"
+ "./icons/testtheme/index.theme"
+ "./icons/testtheme/scalable/actions/svg-only.svg"
+ "./icons/themeparent/16x16/actions/address-book-new.png"
+ "./icons/themeparent/16x16/actions/appointment-new.png"
+ "./icons/themeparent/22x22/actions/address-book-new.png"
+ "./icons/themeparent/22x22/actions/appointment-new.png"
+ "./icons/themeparent/32x32/actions/address-book-new.png"
+ "./icons/themeparent/32x32/actions/appointment-new.png"
+ "./icons/themeparent/icon-theme.cache"
+ "./icons/themeparent/index.theme"
+ "./icons/themeparent/scalable/actions/address-book-new.svg"
+ "./icons/themeparent/scalable/actions/appointment-new.svg"
+ "./second_icons/testtheme/32x32/actions/appointment-new.png"
+ "./styles/commonstyle/images/standardbutton-open-128.png"
+ "./styles/commonstyle/images/standardbutton-open-16.png"
+ "./styles/commonstyle/images/standardbutton-open-32.png"
+ "./styles/commonstyle/images/standardbutton-save-128.png"
+ "./styles/commonstyle/images/standardbutton-save-16.png"
+ "./styles/commonstyle/images/standardbutton-save-32.png"
+ "image.png"
+ "rect.png"
+ "tst_qicon.cpp"
+)
+
+add_qt_resource(tst_qicon "tst_qicon"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qicon_resource_files}
+)
+set(qmake_immediate_resource_files
+ "tst_qicon.cpp"
+)
+
+add_qt_resource(tst_qicon "qmake_immediate"
+ PREFIX
+ "/"
+ FILES
+ ${qmake_immediate_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qicon CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt b/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
new file mode 100644
index 0000000000..6f6aaedca5
--- /dev/null
+++ b/tests/auto/gui/image/qiconhighdpi/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from qiconhighdpi.pro.
+
+#####################################################################
+## tst_qiconhighdpi Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ icons/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qiconhighdpi
+ SOURCES
+ tst_qiconhighdpi.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(tst_qiconhighdpi_resource_files
+ "icons/misc/button.9.png"
+ "icons/misc/button@2x.9.png"
+ "icons/testtheme/16x16/actions/appointment-new.png"
+ "icons/testtheme/22x22/actions/appointment-new.png"
+ "icons/testtheme/22x22@2/actions/appointment-new.png"
+ "icons/testtheme/index.theme"
+)
+
+add_qt_resource(tst_qiconhighdpi "tst_qiconhighdpi"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qiconhighdpi_resource_files}
+)
+
diff --git a/tests/auto/gui/image/qimage/CMakeLists.txt b/tests/auto/gui/image/qimage/CMakeLists.txt
new file mode 100644
index 0000000000..865f1124b9
--- /dev/null
+++ b/tests/auto/gui/image/qimage/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Generated from qimage.pro.
+
+#####################################################################
+## tst_qimage Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qimage
+ SOURCES
+ tst_qimage.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(qimage_resource_files
+ "images/image.bmp"
+ "images/image.gif"
+ "images/image.ico"
+ "images/image.jpg"
+ "images/image.pbm"
+ "images/image.pgm"
+ "images/image.png"
+ "images/image.ppm"
+ "images/image.xbm"
+ "images/image.xpm"
+ "images/jpeg_exif_orientation_value_1.jpg"
+ "images/jpeg_exif_orientation_value_2.jpg"
+ "images/jpeg_exif_orientation_value_3.jpg"
+ "images/jpeg_exif_orientation_value_4.jpg"
+ "images/jpeg_exif_orientation_value_5.jpg"
+ "images/jpeg_exif_orientation_value_6.jpg"
+ "images/jpeg_exif_orientation_value_7.jpg"
+ "images/jpeg_exif_orientation_value_8.jpg"
+ )
+
+ add_qt_resource(tst_qimage "qimage"
+ PREFIX
+ "/"
+ FILES
+ ${qimage_resource_files}
+ )
+endif()
+
+extend_target(tst_qimage CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ gdi32
+ user32
+)
+
+extend_target(tst_qimage CONDITION APPLE
+ PUBLIC_LIBRARIES
+ ${FWCoreGraphics}
+)
diff --git a/tests/auto/gui/image/qimageiohandler/CMakeLists.txt b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
new file mode 100644
index 0000000000..23e5e98b16
--- /dev/null
+++ b/tests/auto/gui/image/qimageiohandler/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qimageiohandler.pro.
+
+#####################################################################
+## tst_qimageiohandler Test:
+#####################################################################
+
+add_qt_test(tst_qimageiohandler
+ SOURCES
+ tst_qimageiohandler.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/image/qimagereader/CMakeLists.txt b/tests/auto/gui/image/qimagereader/CMakeLists.txt
new file mode 100644
index 0000000000..8a96fa18cf
--- /dev/null
+++ b/tests/auto/gui/image/qimagereader/CMakeLists.txt
@@ -0,0 +1,65 @@
+# Generated from qimagereader.pro.
+
+#####################################################################
+## tst_qimagereader Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ baseline/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qimagereader
+ SOURCES
+ tst_qimagereader.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+file(GLOB resource_glob_0 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "images/*")
+foreach(file IN LISTS resource_glob_0)
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}")
+endforeach()
+
+# Resources:
+set(qmake_immediate_resource_files
+ ${resource_glob_0}
+)
+
+add_qt_resource(tst_qimagereader "qmake_immediate"
+ PREFIX
+ "/"
+ FILES
+ ${qmake_immediate_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qimagereader.pro:<TRUE>:
+# MOC_DIR = "tmp"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(android_testdata_resource_files
+ "images/kollada-noext"
+ "images/trans.gif"
+ )
+
+ add_qt_resource(tst_qimagereader "android_testdata"
+ PREFIX
+ "/"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/image/qimagewriter/CMakeLists.txt b/tests/auto/gui/image/qimagewriter/CMakeLists.txt
new file mode 100644
index 0000000000..1a04dfbce0
--- /dev/null
+++ b/tests/auto/gui/image/qimagewriter/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Generated from qimagewriter.pro.
+
+#####################################################################
+## tst_qimagewriter Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qimagewriter
+ SOURCES
+ tst_qimagewriter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qimagewriter.pro:<TRUE>:
+# MOC_DIR = "tmp"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(qimagewriter_resource_files
+ "images/YCbCr_cmyk.jpg"
+ "images/YCbCr_rgb.jpg"
+ "images/beavis.jpg"
+ "images/colorful.bmp"
+ "images/earth.gif"
+ "images/font.bmp"
+ "images/gnus.xbm"
+ "images/kollada.png"
+ "images/marble.xpm"
+ "images/ship63.pbm"
+ "images/teapot.ppm"
+ "images/trolltech.gif"
+ )
+
+ add_qt_resource(tst_qimagewriter "qimagewriter"
+ PREFIX
+ "/"
+ FILES
+ ${qimagewriter_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index aaa8475c74..247f6443c1 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -94,8 +94,8 @@ private:
static void initializePadding(QImage *image)
{
- int effectiveBytesPerLine = (image->width() * image->depth() + 7) / 8;
- int paddingBytes = image->bytesPerLine() - effectiveBytesPerLine;
+ qsizetype effectiveBytesPerLine = (qsizetype(image->width()) * image->depth() + 7) / 8;
+ qsizetype paddingBytes = image->bytesPerLine() - effectiveBytesPerLine;
if (paddingBytes == 0)
return;
for (int y = 0; y < image->height(); ++y) {
diff --git a/tests/auto/gui/image/qmovie/CMakeLists.txt b/tests/auto/gui/image/qmovie/CMakeLists.txt
new file mode 100644
index 0000000000..bc841b5d29
--- /dev/null
+++ b/tests/auto/gui/image/qmovie/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from qmovie.pro.
+
+#####################################################################
+## tst_qmovie Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ animations/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qmovie
+ SOURCES
+ tst_qmovie.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(resources_resource_files
+ "animations/comicsecard.gif"
+ "animations/corrupt.gif"
+ "animations/trolltech.gif"
+)
+
+add_qt_resource(tst_qmovie "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qmovie.pro:<TRUE>:
+# MOC_DIR = "tmp"
+# QT_FOR_CONFIG = "gui-private"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmovie CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
+
+extend_target(tst_qmovie CONDITION QT_FEATURE_gif
+ DEFINES
+ QTEST_HAVE_GIF
+)
+
+extend_target(tst_qmovie CONDITION QT_FEATURE_jpeg
+ DEFINES
+ QTEST_HAVE_JPEG
+)
diff --git a/tests/auto/gui/image/qpicture/CMakeLists.txt b/tests/auto/gui/image/qpicture/CMakeLists.txt
new file mode 100644
index 0000000000..625d19b3a5
--- /dev/null
+++ b/tests/auto/gui/image/qpicture/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpicture.pro.
+
+#####################################################################
+## tst_qpicture Test:
+#####################################################################
+
+add_qt_test(tst_qpicture
+ SOURCES
+ tst_qpicture.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index ec6bb8dcee..6287960457 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -37,6 +37,8 @@
#include <qscreen.h>
#include <limits.h>
+#ifndef QT_NO_PICTURE
+
class tst_QPicture : public QObject
{
Q_OBJECT
@@ -45,7 +47,6 @@ public:
tst_QPicture();
private slots:
- void getSetCheck();
void devType();
void paintingActive();
void boundingRect();
@@ -56,31 +57,6 @@ private slots:
void boundaryValues();
};
-// Testing get/set functions
-void tst_QPicture::getSetCheck()
-{
- QPictureIO obj1;
- // const QPicture & QPictureIO::picture()
- // void QPictureIO::setPicture(const QPicture &)
- // const char * QPictureIO::format()
- // void QPictureIO::setFormat(const char *)
- const char var2[] = "PNG";
- obj1.setFormat(var2);
- QCOMPARE(var2, obj1.format());
- obj1.setFormat((char *)0);
- // The format is stored internally in a QString, so return is always a valid char *
- QVERIFY(QString(obj1.format()).isEmpty());
-
- // const char * QPictureIO::parameters()
- // void QPictureIO::setParameters(const char *)
- const char var3[] = "Bogus data";
- obj1.setParameters(var3);
- QCOMPARE(var3, obj1.parameters());
- obj1.setParameters((char *)0);
- // The format is stored internally in a QString, so return is always a valid char *
- QVERIFY(QString(obj1.parameters()).isEmpty());
-}
-
tst_QPicture::tst_QPicture()
{
}
@@ -316,6 +292,7 @@ void tst_QPicture::boundaryValues()
painter.end();
}
-
QTEST_MAIN(tst_QPicture)
#include "tst_qpicture.moc"
+
+#endif // QT_NO_PICTURE
diff --git a/tests/auto/gui/image/qpixmap/CMakeLists.txt b/tests/auto/gui/image/qpixmap/CMakeLists.txt
new file mode 100644
index 0000000000..f6a83aa0da
--- /dev/null
+++ b/tests/auto/gui/image/qpixmap/CMakeLists.txt
@@ -0,0 +1,107 @@
+# Generated from qpixmap.pro.
+
+#####################################################################
+## tst_qpixmap Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ convertFromImage/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ convertFromToHICON/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ loadFromData/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qpixmap
+ SOURCES
+ tst_qpixmap.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(qpixmap_resource_files
+ "convertFromImage/task31722_0/img1.png"
+ "convertFromImage/task31722_0/img2.png"
+ "convertFromImage/task31722_1/img1.png"
+ "convertFromImage/task31722_1/img2.png"
+ "convertFromToHICON/icon_32bpp.ico"
+ "convertFromToHICON/icon_32bpp_16x16.png"
+ "convertFromToHICON/icon_32bpp_256x256.png"
+ "convertFromToHICON/icon_32bpp_32x32.png"
+ "convertFromToHICON/icon_32bpp_48x48.png"
+ "convertFromToHICON/icon_8bpp.ico"
+ "convertFromToHICON/icon_8bpp_16x16.png"
+ "convertFromToHICON/icon_8bpp_32x32.png"
+ "convertFromToHICON/icon_8bpp_48x48.png"
+ "images/designer.png"
+ "images/dx_-10_dy_-10_50_50_100_100.png"
+ "images/dx_-10_dy_-10_x_y_w_h.png"
+ "images/dx_-10_dy_0_50_50_100_100.png"
+ "images/dx_-10_dy_0_x_y_w_h.png"
+ "images/dx_-128_dy_-128_x_y_w_h.png"
+ "images/dx_-128_dy_0_x_y_w_h.png"
+ "images/dx_0_dy_-10_50_50_100_100.png"
+ "images/dx_0_dy_-10_x_y_w_h.png"
+ "images/dx_0_dy_-128_x_y_w_h.png"
+ "images/dx_0_dy_0_50_50_100_100.png"
+ "images/dx_0_dy_0_null.png"
+ "images/dx_0_dy_0_x_y_w_h.png"
+ "images/dx_0_dy_10_50_50_100_100.png"
+ "images/dx_0_dy_10_x_y_w_h.png"
+ "images/dx_0_dy_128_x_y_w_h.png"
+ "images/dx_0_dy_1_null.png"
+ "images/dx_10_dy_0_50_50_100_100.png"
+ "images/dx_10_dy_0_x_y_w_h.png"
+ "images/dx_10_dy_10_50_50_100_100.png"
+ "images/dx_10_dy_10_x_y_w_h.png"
+ "images/dx_128_dy_0_x_y_w_h.png"
+ "images/dx_128_dy_128_64_64_128_128.png"
+ "images/dx_128_dy_128_x_y_w_h.png"
+ "images/dx_1_dy_0_null.png"
+ "loadFromData/designer_argb32.png"
+ "loadFromData/designer_indexed8_no_alpha.gif"
+ "loadFromData/designer_indexed8_no_alpha.png"
+ "loadFromData/designer_indexed8_no_alpha_animated.gif"
+ "loadFromData/designer_indexed8_with_alpha.gif"
+ "loadFromData/designer_indexed8_with_alpha.png"
+ "loadFromData/designer_indexed8_with_alpha_animated.gif"
+ "loadFromData/designer_rgb32.jpg"
+ "loadFromData/designer_rgb32.png"
+)
+
+add_qt_resource(tst_qpixmap "qpixmap"
+ PREFIX
+ "/"
+ FILES
+ ${qpixmap_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qpixmap CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+extend_target(tst_qpixmap CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ gdi32
+ user32
+)
diff --git a/tests/auto/gui/image/qpixmapcache/CMakeLists.txt b/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
new file mode 100644
index 0000000000..ef73f60ca6
--- /dev/null
+++ b/tests/auto/gui/image/qpixmapcache/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qpixmapcache.pro.
+
+#####################################################################
+## tst_qpixmapcache Test:
+#####################################################################
+
+add_qt_test(tst_qpixmapcache
+ SOURCES
+ tst_qpixmapcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/itemmodels/CMakeLists.txt b/tests/auto/gui/itemmodels/CMakeLists.txt
new file mode 100644
index 0000000000..196168b1b2
--- /dev/null
+++ b/tests/auto/gui/itemmodels/CMakeLists.txt
@@ -0,0 +1,4 @@
+add_subdirectory("qstandarditem")
+if (QT_FEATURE_widgets)
+# add_subdirectory("qstandarditemmodel")
+endif()
diff --git a/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
new file mode 100644
index 0000000000..8a19f6afaf
--- /dev/null
+++ b/tests/auto/gui/itemmodels/qstandarditem/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstandarditem.pro.
+
+#####################################################################
+## tst_qstandarditem Test:
+#####################################################################
+
+add_qt_test(tst_qstandarditem
+ SOURCES
+ tst_qstandarditem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/CMakeLists.txt b/tests/auto/gui/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..b2397bed19
--- /dev/null
+++ b/tests/auto/gui/kernel/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qbackingstore)
+add_subdirectory(qcursor)
+add_subdirectory(qdrag)
+add_subdirectory(qevent)
+add_subdirectory(qfileopenevent)
+add_subdirectory(qguieventdispatcher)
+add_subdirectory(qguimetatype)
+add_subdirectory(qguitimer)
+add_subdirectory(qguivariant)
+add_subdirectory(qinputmethod)
+add_subdirectory(qkeyevent)
+add_subdirectory(qkeysequence)
+add_subdirectory(qmouseevent)
+add_subdirectory(qpalette)
+add_subdirectory(qscreen)
+add_subdirectory(qsurfaceformat)
+add_subdirectory(qwindow)
+add_subdirectory(qguiapplication)
+add_subdirectory(qpixelformat)
+add_subdirectory(qrasterwindow)
+if(NOT ANDROID AND NOT APPLE_UIKIT)
+ add_subdirectory(qclipboard)
+endif()
+if(TARGET Qt::Network)
+ add_subdirectory(qguieventloop)
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(qmouseevent_modal)
+ add_subdirectory(qtouchevent)
+endif()
+if(QT_FEATURE_opengl)
+ add_subdirectory(qopenglwindow)
+endif()
+if(TARGET Qt::Network AND WIN32 AND NOT WINRT)
+ add_subdirectory(noqteventloop)
+endif()
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index 42135dae24..106e9050b8 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -4,11 +4,14 @@ SUBDIRS=\
qclipboard \
qcursor \
qdrag \
+ qguiaction \
+ qguiactiongroup \
qevent \
qfileopenevent \
qguieventdispatcher \
qguieventloop \
qguimetatype \
+ qguishortcut \
qguitimer \
qguivariant \
qhighdpiscaling \
@@ -29,6 +32,12 @@ SUBDIRS=\
win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
+!qtConfig(shortcut): SUBDIRS -= \
+ qkeysequence \
+ qguishortcut \
+ qguimetatype \
+ qguivariant
+
!qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \
qtouchevent
@@ -36,6 +45,10 @@ win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
!qtHaveModule(network): SUBDIRS -= \
qguieventloop
+!qtConfig(action): SUBDIRS -= \
+ qguiaction \
+ qguiactiongroup
+
!qtConfig(highdpiscaling): SUBDIRS -= qhighdpiscaling
!qtConfig(opengl): SUBDIRS -= qopenglwindow
diff --git a/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
new file mode 100644
index 0000000000..82de116f8d
--- /dev/null
+++ b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from noqteventloop.pro.
+
+#####################################################################
+## tst_noqteventloop Test:
+#####################################################################
+
+add_qt_test(tst_noqteventloop
+ SOURCES
+ tst_noqteventloop.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_noqteventloop CONDITION QT_FEATURE_dynamicgl AND WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt b/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
new file mode 100644
index 0000000000..639e88fb4c
--- /dev/null
+++ b/tests/auto/gui/kernel/qbackingstore/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qbackingstore.pro.
+
+#####################################################################
+## tst_qbackingstore Test:
+#####################################################################
+
+add_qt_test(tst_qbackingstore
+ SOURCES
+ tst_qbackingstore.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qclipboard/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
new file mode 100644
index 0000000000..b795d32520
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from qclipboard.pro.
+
+add_subdirectory(test)
+if(NOT WINRT)
+ add_subdirectory(copier)
+ add_subdirectory(paster)
+endif()
diff --git a/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
new file mode 100644
index 0000000000..4595093b3b
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/copier/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from copier.pro.
+
+#####################################################################
+## copier Binary:
+#####################################################################
+
+# special case begin
+set(win32_args)
+if (WIN32)
+ set(win32_args OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+endif()
+# special case end
+
+add_qt_executable(copier
+ ${win32_args} # special case
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:copier.pro:WIN32:
+# DESTDIR = "../copier"
diff --git a/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
new file mode 100644
index 0000000000..b9f118929c
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/paster/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from paster.pro.
+
+#####################################################################
+## paster Binary:
+#####################################################################
+
+# special case begin
+set(win32_args)
+if (WIN32)
+ set(win32_args OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+endif()
+# special case end
+
+add_qt_executable(paster
+ ${win32_args} # special case
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:paster.pro:WIN32:
+# DESTDIR = "../paster"
diff --git a/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..620ef96a5b
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qclipboard Test:
+#####################################################################
+
+add_qt_test(tst_qclipboard
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qclipboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qclipboard CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../copier/copier" "../paster/paster"
diff --git a/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
new file mode 100644
index 0000000000..620ef96a5b
--- /dev/null
+++ b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qclipboard Test:
+#####################################################################
+
+add_qt_test(tst_qclipboard
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_qclipboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qclipboard CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../copier/copier" "../paster/paster"
diff --git a/tests/auto/gui/kernel/qcursor/CMakeLists.txt b/tests/auto/gui/kernel/qcursor/CMakeLists.txt
new file mode 100644
index 0000000000..8f4062a42a
--- /dev/null
+++ b/tests/auto/gui/kernel/qcursor/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qcursor.pro.
+
+#####################################################################
+## tst_qcursor Test:
+#####################################################################
+
+add_qt_test(tst_qcursor
+ SOURCES
+ tst_qcursor.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qdrag/CMakeLists.txt b/tests/auto/gui/kernel/qdrag/CMakeLists.txt
new file mode 100644
index 0000000000..84bceaf0de
--- /dev/null
+++ b/tests/auto/gui/kernel/qdrag/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdrag.pro.
+
+#####################################################################
+## tst_qdrag Test:
+#####################################################################
+
+add_qt_test(tst_qdrag
+ SOURCES
+ tst_qdrag.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qevent/CMakeLists.txt b/tests/auto/gui/kernel/qevent/CMakeLists.txt
new file mode 100644
index 0000000000..01d6db7225
--- /dev/null
+++ b/tests/auto/gui/kernel/qevent/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qevent.pro.
+
+#####################################################################
+## tst_qevent Test:
+#####################################################################
+
+add_qt_test(tst_qevent
+ SOURCES
+ tst_qevent.cpp
+)
diff --git a/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
new file mode 100644
index 0000000000..2404833737
--- /dev/null
+++ b/tests/auto/gui/kernel/qfileopenevent/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qfileopenevent.pro.
+
+add_subdirectory(test)
+add_subdirectory(qfileopeneventexternal)
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
new file mode 100644
index 0000000000..0c50f7ff56
--- /dev/null
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qfileopeneventexternal.pro.
+
+#####################################################################
+## qfileopeneventexternal Binary:
+#####################################################################
+
+add_qt_executable(qfileopeneventexternal
+ GUI
+ SOURCES
+ qfileopeneventexternal.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:qfileopeneventexternal.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
new file mode 100644
index 0000000000..6695ef42b3
--- /dev/null
+++ b/tests/auto/gui/kernel/qfileopenevent/test/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qfileopenevent Test:
+#####################################################################
+
+add_qt_test(tst_qfileopenevent
+ SOURCES
+ tst_qfileopenevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/widgets/kernel/qaction/.gitignore b/tests/auto/gui/kernel/qguiaction/.gitignore
index bf81f5bf2c..bf81f5bf2c 100644
--- a/tests/auto/widgets/kernel/qaction/.gitignore
+++ b/tests/auto/gui/kernel/qguiaction/.gitignore
diff --git a/tests/auto/gui/kernel/qguiaction/qguiaction.pro b/tests/auto/gui/kernel/qguiaction/qguiaction.pro
new file mode 100644
index 0000000000..2a39636119
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiaction/qguiaction.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qguiaction
+QT += gui-private core-private testlib
+SOURCES += tst_qguiaction.cpp
diff --git a/tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp b/tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp
new file mode 100644
index 0000000000..3f314a74ae
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiaction/tst_qguiaction.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <qguiapplication.h>
+#include <qevent.h>
+#include <qguiaction.h>
+#include <qguiactiongroup.h>
+#include <qpa/qplatformtheme.h>
+
+#include <private/qguiapplication_p.h>
+
+class tst_QGuiAction : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QGuiAction();
+
+private slots:
+ void cleanup();
+ void getSetCheck();
+ void setText_data();
+ void setText();
+ void setIconText_data() { setText_data(); }
+ void setIconText();
+#if QT_CONFIG(shortcut)
+ void setStandardKeys();
+ void task200823_tooltip();
+#endif
+ void task229128TriggeredSignalWithoutActiongroup();
+ void setData();
+ void setEnabledSetVisible();
+
+private:
+ const int m_keyboardScheme;
+};
+
+tst_QGuiAction::tst_QGuiAction()
+ : m_keyboardScheme(QGuiApplicationPrivate::platformTheme()->themeHint(QPlatformTheme::KeyboardScheme).toInt())
+{
+}
+
+void tst_QGuiAction::cleanup()
+{
+ QVERIFY(QGuiApplication::topLevelWindows().isEmpty());
+}
+
+// Testing get/set functions
+void tst_QGuiAction::getSetCheck()
+{
+ QGuiAction obj1(nullptr);
+ // QActionGroup * QAction::actionGroup()
+ // void QAction::setActionGroup(QActionGroup *)
+ auto var1 = new QGuiActionGroup(nullptr);
+ obj1.setActionGroup(var1);
+ QCOMPARE(var1, obj1.guiActionGroup());
+ obj1.setActionGroup(nullptr);
+ QCOMPARE(obj1.guiActionGroup(), nullptr);
+ delete var1;
+
+ QCOMPARE(obj1.priority(), QGuiAction::NormalPriority);
+ obj1.setPriority(QGuiAction::LowPriority);
+ QCOMPARE(obj1.priority(), QGuiAction::LowPriority);
+}
+
+void tst_QGuiAction::setText_data()
+{
+ QTest::addColumn<QString>("text");
+ QTest::addColumn<QString>("iconText");
+ QTest::addColumn<QString>("textFromIconText");
+
+ //next we fill it with data
+ QTest::newRow("Normal") << "Action" << "Action" << "Action";
+ QTest::newRow("Ampersand") << "Search && Destroy" << "Search & Destroy" << "Search && Destroy";
+ QTest::newRow("Mnemonic and ellipsis") << "O&pen File ..." << "Open File" << "Open File";
+}
+
+void tst_QGuiAction::setText()
+{
+ QFETCH(QString, text);
+
+ QGuiAction action(nullptr);
+ action.setText(text);
+
+ QCOMPARE(action.text(), text);
+
+ QFETCH(QString, iconText);
+ QCOMPARE(action.iconText(), iconText);
+}
+
+void tst_QGuiAction::setIconText()
+{
+ QFETCH(QString, iconText);
+
+ QGuiAction action(nullptr);
+ action.setIconText(iconText);
+ QCOMPARE(action.iconText(), iconText);
+
+ QFETCH(QString, textFromIconText);
+ QCOMPARE(action.text(), textFromIconText);
+}
+
+#if QT_CONFIG(shortcut)
+
+//basic testing of standard keys
+void tst_QGuiAction::setStandardKeys()
+{
+ QGuiAction act(nullptr);
+ act.setShortcut(QKeySequence("CTRL+L"));
+ QList<QKeySequence> list;
+ act.setShortcuts(list);
+ act.setShortcuts(QKeySequence::Copy);
+ QCOMPARE(act.shortcut(), act.shortcuts().constFirst());
+
+ QList<QKeySequence> expected;
+ const QKeySequence ctrlC = QKeySequence(QStringLiteral("CTRL+C"));
+ const QKeySequence ctrlInsert = QKeySequence(QStringLiteral("CTRL+INSERT"));
+ switch (m_keyboardScheme) {
+ case QPlatformTheme::MacKeyboardScheme:
+ expected << ctrlC;
+ break;
+ case QPlatformTheme::WindowsKeyboardScheme:
+ expected << ctrlC << ctrlInsert;
+ break;
+ default: // X11
+ expected << ctrlC << ctrlInsert << QKeySequence(QStringLiteral("F16"));
+ break;
+ }
+
+ QCOMPARE(act.shortcuts(), expected);
+}
+
+void tst_QGuiAction::task200823_tooltip()
+{
+ const QScopedPointer<QGuiAction> action(new QGuiAction("foo", nullptr));
+ QString shortcut("ctrl+o");
+ action->setShortcut(shortcut);
+
+ // we want a non-standard tooltip that shows the shortcut
+ action->setToolTip(action->text() + QLatin1String(" (") + action->shortcut().toString() + QLatin1Char(')'));
+
+ QString ref = QLatin1String("foo (") + QKeySequence(shortcut).toString() + QLatin1Char(')');
+ QCOMPARE(action->toolTip(), ref);
+}
+
+#endif // QT_CONFIG(shortcut)
+
+void tst_QGuiAction::task229128TriggeredSignalWithoutActiongroup()
+{
+ // test without a group
+ const QScopedPointer<QGuiAction> actionWithoutGroup(new QGuiAction("Test", nullptr));
+ QSignalSpy spyWithoutGroup(actionWithoutGroup.data(), QOverload<bool>::of(&QGuiAction::triggered));
+ QCOMPARE(spyWithoutGroup.count(), 0);
+ actionWithoutGroup->trigger();
+ // signal should be emitted
+ QCOMPARE(spyWithoutGroup.count(), 1);
+
+ // it is now a checkable checked action
+ actionWithoutGroup->setCheckable(true);
+ actionWithoutGroup->setChecked(true);
+ spyWithoutGroup.clear();
+ QCOMPARE(spyWithoutGroup.count(), 0);
+ actionWithoutGroup->trigger();
+ // signal should be emitted
+ QCOMPARE(spyWithoutGroup.count(), 1);
+}
+
+void tst_QGuiAction::setData() // QTBUG-62006
+{
+ QGuiAction act(nullptr);
+ QSignalSpy spy(&act, &QGuiAction::changed);
+ QCOMPARE(act.data(), QVariant());
+ QCOMPARE(spy.count(), 0);
+ act.setData(QVariant());
+ QCOMPARE(spy.count(), 0);
+
+ act.setData(-1);
+ QCOMPARE(spy.count(), 1);
+ act.setData(-1);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QGuiAction::setEnabledSetVisible()
+{
+ QGuiAction action(nullptr);
+ QSignalSpy spy(&action, &QGuiAction::enabledChanged);
+ QVERIFY(action.isEnabled());
+ QVERIFY(action.isVisible());
+ QCOMPARE(spy.count(), 0);
+ action.setVisible(false);
+ QVERIFY(!action.isEnabled());
+ QVERIFY(!action.isVisible());
+ QCOMPARE(spy.count(), 1);
+ action.setEnabled(false);
+ QVERIFY(!action.isEnabled());
+ QVERIFY(!action.isVisible());
+ QCOMPARE(spy.count(), 1);
+ action.setVisible(true);
+ QVERIFY(!action.isEnabled());
+ QVERIFY(action.isVisible());
+ QCOMPARE(spy.count(), 1);
+ action.resetEnabled();
+ QVERIFY(action.isEnabled());
+ QCOMPARE(spy.count(), 2);
+}
+
+QTEST_MAIN(tst_QGuiAction)
+#include "tst_qguiaction.moc"
diff --git a/tests/auto/gui/kernel/qguiactiongroup/.gitignore b/tests/auto/gui/kernel/qguiactiongroup/.gitignore
new file mode 100644
index 0000000000..daba003e96
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiactiongroup/.gitignore
@@ -0,0 +1 @@
+tst_qactiongroup
diff --git a/tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro b/tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro
new file mode 100644
index 0000000000..7fd64e70f1
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiactiongroup/qguiactiongroup.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qactiongroup
+QT += testlib
+SOURCES += tst_qguiactiongroup.cpp
diff --git a/tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp b/tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp
new file mode 100644
index 0000000000..1ac14280fb
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiactiongroup/tst_qguiactiongroup.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <qguiaction.h>
+#include <qguiactiongroup.h>
+
+class tst_QGuiActionGroup : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void cleanup() { QVERIFY(QGuiApplication::topLevelWindows().isEmpty()); }
+ void enabledPropagation();
+ void visiblePropagation();
+ void exclusive();
+ void exclusiveOptional();
+ void testActionInTwoQActionGroup();
+ void unCheckCurrentAction();
+};
+
+void tst_QGuiActionGroup::enabledPropagation()
+{
+ QGuiActionGroup testActionGroup(nullptr);
+
+ auto childAction = new QGuiAction( &testActionGroup );
+ auto anotherChildAction = new QGuiAction( &testActionGroup );
+ auto freeAction = new QGuiAction(nullptr);
+
+ QVERIFY( testActionGroup.isEnabled() );
+ QVERIFY( childAction->isEnabled() );
+
+ testActionGroup.setEnabled( false );
+ QVERIFY( !testActionGroup.isEnabled() );
+ QVERIFY( !childAction->isEnabled() );
+ QVERIFY( !anotherChildAction->isEnabled() );
+
+ childAction->setEnabled(true);
+ QVERIFY( !childAction->isEnabled());
+
+ anotherChildAction->setEnabled( false );
+
+ testActionGroup.setEnabled( true );
+ QVERIFY( testActionGroup.isEnabled() );
+ QVERIFY( childAction->isEnabled() );
+ QVERIFY( !anotherChildAction->isEnabled() );
+
+ testActionGroup.setEnabled( false );
+ auto lastChildAction = new QGuiAction(&testActionGroup);
+
+ QVERIFY(!lastChildAction->isEnabled());
+ testActionGroup.setEnabled( true );
+ QVERIFY(lastChildAction->isEnabled());
+
+ freeAction->setEnabled(false);
+ testActionGroup.addAction(freeAction);
+ QVERIFY(!freeAction->isEnabled());
+ delete freeAction;
+}
+
+void tst_QGuiActionGroup::visiblePropagation()
+{
+ QGuiActionGroup testActionGroup(nullptr);
+
+ auto childAction = new QGuiAction( &testActionGroup );
+ auto anotherChildAction = new QGuiAction( &testActionGroup );
+ auto freeAction = new QGuiAction(nullptr);
+
+ QVERIFY( testActionGroup.isVisible() );
+ QVERIFY( childAction->isVisible() );
+
+ testActionGroup.setVisible( false );
+ QVERIFY( !testActionGroup.isVisible() );
+ QVERIFY( !childAction->isVisible() );
+ QVERIFY( !anotherChildAction->isVisible() );
+
+ anotherChildAction->setVisible(false);
+
+ testActionGroup.setVisible( true );
+ QVERIFY( testActionGroup.isVisible() );
+ QVERIFY( childAction->isVisible() );
+
+ QVERIFY( !anotherChildAction->isVisible() );
+
+ testActionGroup.setVisible( false );
+ auto lastChildAction = new QGuiAction(&testActionGroup);
+
+ QVERIFY(!lastChildAction->isVisible());
+ testActionGroup.setVisible( true );
+ QVERIFY(lastChildAction->isVisible());
+
+ freeAction->setVisible(false);
+ testActionGroup.addAction(freeAction);
+ QVERIFY(!freeAction->isVisible());
+ delete freeAction;
+}
+
+void tst_QGuiActionGroup::exclusive()
+{
+ QGuiActionGroup group(nullptr);
+ group.setExclusive(false);
+ QVERIFY( !group.isExclusive() );
+
+ auto actOne = new QGuiAction(&group);
+ actOne->setCheckable( true );
+ auto actTwo = new QGuiAction(&group);
+ actTwo->setCheckable( true );
+ auto actThree = new QGuiAction(&group);
+ actThree->setCheckable( true );
+
+ group.setExclusive( true );
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actOne->setChecked( true );
+ QVERIFY( actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actTwo->setChecked( true );
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+}
+
+void tst_QGuiActionGroup::exclusiveOptional()
+{
+ QGuiActionGroup group(0);
+ group.setExclusive(true);
+ QVERIFY( group.isExclusive() );
+
+ auto actOne = new QGuiAction(&group);
+ actOne->setCheckable( true );
+ auto actTwo = new QGuiAction(&group);
+ actTwo->setCheckable( true );
+ auto actThree = new QGuiAction(&group);
+ actThree->setCheckable( true );
+
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actOne->trigger();
+ QVERIFY( actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actOne->trigger();
+ QVERIFY( actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ group.setExclusionPolicy(QGuiActionGroup::ExclusionPolicy::ExclusiveOptional);
+ QVERIFY( group.isExclusive() );
+
+ actOne->trigger();
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actTwo->trigger();
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+
+ actTwo->trigger();
+ QVERIFY( !actOne->isChecked() );
+ QVERIFY( !actTwo->isChecked() );
+ QVERIFY( !actThree->isChecked() );
+}
+
+void tst_QGuiActionGroup::testActionInTwoQActionGroup()
+{
+ QGuiAction action1("Action 1", this);
+
+ QGuiActionGroup group1(this);
+ QGuiActionGroup group2(this);
+
+ group1.addAction(&action1);
+ group2.addAction(&action1);
+
+ QCOMPARE(action1.guiActionGroup(), &group2);
+ QCOMPARE(group2.guiActions().constFirst(), &action1);
+ QCOMPARE(group1.guiActions().isEmpty(), true);
+}
+
+void tst_QGuiActionGroup::unCheckCurrentAction()
+{
+ QGuiActionGroup group(nullptr);
+ QGuiAction action1(&group) ,action2(&group);
+ action1.setCheckable(true);
+ action2.setCheckable(true);
+ QVERIFY(!action1.isChecked());
+ QVERIFY(!action2.isChecked());
+ action1.setChecked(true);
+ QVERIFY(action1.isChecked());
+ QVERIFY(!action2.isChecked());
+ auto current = group.checkedGuiAction();
+ QCOMPARE(current, &action1);
+ current->setChecked(false);
+ QVERIFY(!action1.isChecked());
+ QVERIFY(!action2.isChecked());
+ QVERIFY(!group.checkedGuiAction());
+}
+
+
+QTEST_MAIN(tst_QGuiActionGroup)
+#include "tst_qguiactiongroup.moc"
diff --git a/tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..30a6436ece
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiapplication/.prev_CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from qguiapplication.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qguiapplication Test:
+#####################################################################
+
+add_qt_test(tst_qguiapplication
+ SOURCES
+ tst_qcoreapplication.cpp tst_qcoreapplication.h
+ tst_qguiapplication.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0x050E00
+ INCLUDE_DIRECTORIES
+ ../../../corelib/kernel/qcoreapplication
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(tst_qguiapplication_resource_files
+ "icons/appicon.png"
+ "icons/usericon.png"
+)
+
+add_qt_resource(tst_qguiapplication "tst_qguiapplication"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qguiapplication_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:WIN32:
+# VERSION = "1.2.3.4"
+
+#### Keys ignored in scope 4:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:else:
+# VERSION = "1.2.3"
diff --git a/tests/auto/gui/kernel/qguiapplication/BLACKLIST b/tests/auto/gui/kernel/qguiapplication/BLACKLIST
index e6ffe78ae3..58ca7bf782 100644
--- a/tests/auto/gui/kernel/qguiapplication/BLACKLIST
+++ b/tests/auto/gui/kernel/qguiapplication/BLACKLIST
@@ -1,3 +1,6 @@
[focusObject]
ubuntu-16.04
opensuse-42.3
+
+[quitOnLastWindowClosedMulti]
+macos ci
diff --git a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
new file mode 100644
index 0000000000..24fa6572c1
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from qguiapplication.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qguiapplication Test:
+#####################################################################
+
+# special case begin
+if (WIN32)
+ set(target_version "1.2.3.4")
+else()
+ set(target_version "1.2.3")
+endif()
+# special case end
+
+add_qt_test(tst_qguiapplication
+ VERSION ${target_version}
+ SOURCES
+ ../../../corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp ../../../corelib/kernel/qcoreapplication/tst_qcoreapplication.h # special case
+ tst_qguiapplication.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0x050E00
+ INCLUDE_DIRECTORIES
+ ../../../corelib/kernel/qcoreapplication
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Threads::Threads # special case
+)
+
+# Resources:
+set(tst_qguiapplication_resource_files
+ "icons/appicon.png"
+ "icons/usericon.png"
+)
+
+add_qt_resource(tst_qguiapplication "tst_qguiapplication"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qguiapplication_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:WIN32:
+# VERSION = "1.2.3.4"
+
+#### Keys ignored in scope 4:.:../../../corelib/kernel/qcoreapplication:../../../corelib/kernel/qcoreapplication/qcoreapplication.pro:else:
+# VERSION = "1.2.3"
diff --git a/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt b/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
new file mode 100644
index 0000000000..eb36e0ece7
--- /dev/null
+++ b/tests/auto/gui/kernel/qguieventdispatcher/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qguieventdispatcher.pro.
+
+#####################################################################
+## tst_qguieventdispatcher Test:
+#####################################################################
+
+add_qt_test(tst_qguieventdispatcher
+ SOURCES
+ ../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c4daa5a310
--- /dev/null
+++ b/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qguieventloop.pro.
+
+#####################################################################
+## tst_qguieventloop Test:
+#####################################################################
+
+add_qt_test(tst_qguieventloop
+ SOURCES
+ ../../../corelib/kernel/qeventloop/tst_qeventloop.cpp
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qguieventloop CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(tst_qguieventloop CONDITION QT_FEATURE_glib
+ DEFINES
+ HAVE_GLIB
+)
diff --git a/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
new file mode 100644
index 0000000000..de9a876e9d
--- /dev/null
+++ b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qguieventloop.pro.
+
+#####################################################################
+## tst_qguieventloop Test:
+#####################################################################
+
+add_qt_test(tst_qguieventloop
+ SOURCES
+ ../../../corelib/kernel/qeventloop/tst_qeventloop.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qguieventloop CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(tst_qguieventloop CONDITION QT_FEATURE_glib
+ DEFINES
+ HAVE_GLIB
+)
diff --git a/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt b/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
new file mode 100644
index 0000000000..3701b3983a
--- /dev/null
+++ b/tests/auto/gui/kernel/qguimetatype/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qguimetatype.pro.
+
+#####################################################################
+## tst_qguimetatype Test:
+#####################################################################
+
+add_qt_test(tst_qguimetatype
+ SOURCES
+ tst_qguimetatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 81f0183728..d60d6643b2 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -181,9 +181,13 @@ template<> struct TestValueFactory<QMetaType::QCursor> {
static QCursor *create() { return new QCursor(Qt::WaitCursor); }
};
#endif
+
+#if QT_CONFIG(shortcut)
template<> struct TestValueFactory<QMetaType::QKeySequence> {
static QKeySequence *create() { return new QKeySequence(QKeySequence::Close); }
};
+#endif
+
template<> struct TestValueFactory<QMetaType::QPen> {
static QPen *create() { return new QPen(Qt::DashDotDotLine); }
};
@@ -317,30 +321,10 @@ void tst_QGuiMetaType::sizeOf()
QCOMPARE(QMetaType::sizeOf(type), size);
}
-#ifndef Q_ALIGNOF
-template<uint N>
-struct RoundToNextHighestPowerOfTwo
-{
-private:
- enum { V1 = N-1 };
- enum { V2 = V1 | (V1 >> 1) };
- enum { V3 = V2 | (V2 >> 2) };
- enum { V4 = V3 | (V3 >> 4) };
- enum { V5 = V4 | (V4 >> 8) };
- enum { V6 = V5 | (V5 >> 16) };
-public:
- enum { Value = V6 + 1 };
-};
-#endif
-
template<class T>
struct TypeAlignment
{
-#ifdef Q_ALIGNOF
- enum { Value = Q_ALIGNOF(T) };
-#else
- enum { Value = RoundToNextHighestPowerOfTwo<sizeof(T)>::Value };
-#endif
+ enum { Value = alignof(T) };
};
void tst_QGuiMetaType::flags_data()
diff --git a/tests/auto/gui/kernel/qguishortcut/qguishortcut.pro b/tests/auto/gui/kernel/qguishortcut/qguishortcut.pro
new file mode 100644
index 0000000000..1417dee213
--- /dev/null
+++ b/tests/auto/gui/kernel/qguishortcut/qguishortcut.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qguishortcut
+QT += testlib
+SOURCES += tst_qguishortcut.cpp
diff --git a/tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp b/tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp
new file mode 100644
index 0000000000..bc3fb9862d
--- /dev/null
+++ b/tests/auto/gui/kernel/qguishortcut/tst_qguishortcut.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtGui/qguiapplication.h>
+#include <QtGui/qguishortcut.h>
+#include <QtGui/qpainter.h>
+#include <QtGui/qrasterwindow.h>
+#include <QtGui/qscreen.h>
+#include <QtGui/qwindow.h>
+
+class tst_QGuiShortcut : public QObject
+{
+ Q_OBJECT
+public:
+
+private slots:
+ void trigger();
+};
+
+class ColoredWindow : public QRasterWindow {
+public:
+ ColoredWindow(QColor c) : m_color(c) {}
+
+protected:
+ void paintEvent(QPaintEvent *event) override;
+
+private:
+ const QColor m_color;
+};
+
+void ColoredWindow::paintEvent(QPaintEvent *)
+{
+ QPainter p(this);
+ p.fillRect(QRect(QPoint(), size()), m_color);
+}
+
+static void sendKey(QWindow *target, Qt::Key k, char c, Qt::KeyboardModifiers modifiers)
+{
+ QTest::sendKeyEvent(QTest::Press, target, k, c, modifiers);
+ QTest::sendKeyEvent(QTest::Release, target, k, c, modifiers);
+}
+
+void tst_QGuiShortcut::trigger()
+{
+ ColoredWindow w(Qt::yellow);
+ w.setTitle(QTest::currentTestFunction());
+ w.resize(QGuiApplication::primaryScreen()->size() / 4);
+ new QGuiShortcut(Qt::CTRL + Qt::Key_Q, &w, SLOT(close()));
+ w.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
+ sendKey(&w, Qt::Key_Q, 'q', Qt::ControlModifier);
+ QTRY_VERIFY(!w.isVisible());
+}
+
+QTEST_MAIN(tst_QGuiShortcut)
+#include "tst_qguishortcut.moc"
diff --git a/tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c4e5117e8c
--- /dev/null
+++ b/tests/auto/gui/kernel/qguitimer/.prev_CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qguitimer.pro.
+
+#####################################################################
+## tst_qguitimer Test:
+#####################################################################
+
+add_qt_test(tst_qguitimer
+ SOURCES
+ ../../../corelib/kernel/qtimer/tst_qtimer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguitimer/CMakeLists.txt b/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
new file mode 100644
index 0000000000..2be3339fe3
--- /dev/null
+++ b/tests/auto/gui/kernel/qguitimer/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qguitimer.pro.
+
+#####################################################################
+## tst_qguitimer Test:
+#####################################################################
+
+add_qt_test(tst_qguitimer
+ SOURCES
+ ../../../corelib/kernel/qtimer/tst_qtimer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Threads::Threads # special case
+)
diff --git a/tests/auto/gui/kernel/qguivariant/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
new file mode 100644
index 0000000000..3a0adab6e3
--- /dev/null
+++ b/tests/auto/gui/kernel/qguivariant/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qguivariant.pro.
+
+add_subdirectory(test)
+add_subdirectory(no_application)
diff --git a/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
new file mode 100644
index 0000000000..8261212801
--- /dev/null
+++ b/tests/auto/gui/kernel/qguivariant/no_application/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from no_application.pro.
+
+#####################################################################
+## no_application Test:
+#####################################################################
+
+add_qt_test(no_application
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
new file mode 100644
index 0000000000..af2cea60e6
--- /dev/null
+++ b/tests/auto/gui/kernel/qguivariant/test/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qguivariant Test:
+#####################################################################
+
+add_qt_test(tst_qguivariant
+ SOURCES
+ tst_qguivariant.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+# Resources:
+set(tst_qguivariant_resource_files
+ "black.png"
+ "black2.png"
+)
+
+add_qt_resource(tst_qguivariant "tst_qguivariant"
+ PREFIX
+ "/"
+ FILES
+ ${tst_qguivariant_resource_files}
+)
+set(qguivariant_resource_files
+ "data"
+)
+
+add_qt_resource(tst_qguivariant "qguivariant"
+ PREFIX
+ "/"
+ FILES
+ ${qguivariant_resource_files}
+)
+
diff --git a/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt b/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
new file mode 100644
index 0000000000..2eee15b816
--- /dev/null
+++ b/tests/auto/gui/kernel/qinputmethod/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qinputmethod.pro.
+
+#####################################################################
+## tst_qinputmethod Test:
+#####################################################################
+
+add_qt_test(tst_qinputmethod
+ SOURCES
+ tst_qinputmethod.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt b/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
new file mode 100644
index 0000000000..2e36795375
--- /dev/null
+++ b/tests/auto/gui/kernel/qkeyevent/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qkeyevent.pro.
+
+#####################################################################
+## tst_qkeyevent Test:
+#####################################################################
+
+add_qt_test(tst_qkeyevent
+ SOURCES
+ tst_qkeyevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp
index 87a47bd93b..6a928cac7a 100644
--- a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp
+++ b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp
@@ -64,8 +64,10 @@ public:
private slots:
void basicEventDelivery();
+#if QT_CONFIG(shortcut)
void modifiers_data();
void modifiers();
+#endif
};
tst_QKeyEvent::tst_QKeyEvent()
@@ -128,6 +130,8 @@ static QByteArray modifiersTestRowName(const QString &keySequence)
return result;
}
+#if QT_CONFIG(shortcut)
+
void tst_QKeyEvent::modifiers_data()
{
struct Modifier
@@ -198,5 +202,7 @@ void tst_QKeyEvent::modifiers()
}
}
+#endif // QT_CONFIG(shortcut)
+
QTEST_MAIN(tst_QKeyEvent)
#include "tst_qkeyevent.moc"
diff --git a/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt b/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
new file mode 100644
index 0000000000..07e480c9dd
--- /dev/null
+++ b/tests/auto/gui/kernel/qkeysequence/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qkeysequence.pro.
+
+#####################################################################
+## tst_qkeysequence Test:
+#####################################################################
+
+add_qt_test(tst_qkeysequence
+ SOURCES
+ tst_qkeysequence.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qkeysequence_resource_files
+ "keys_de.qm"
+ "qt_de.qm"
+)
+
+add_qt_resource(tst_qkeysequence "qkeysequence"
+ PREFIX
+ "/"
+ FILES
+ ${qkeysequence_resource_files}
+)
+
diff --git a/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
new file mode 100644
index 0000000000..4e1081c6ad
--- /dev/null
+++ b/tests/auto/gui/kernel/qmouseevent/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmouseevent.pro.
+
+#####################################################################
+## tst_qmouseevent Test:
+#####################################################################
+
+add_qt_test(tst_qmouseevent
+ SOURCES
+ tst_qmouseevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt b/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
new file mode 100644
index 0000000000..c7f447ffeb
--- /dev/null
+++ b/tests/auto/gui/kernel/qmouseevent_modal/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qmouseevent_modal.pro.
+
+#####################################################################
+## tst_qmouseevent_modal Test:
+#####################################################################
+
+add_qt_test(tst_qmouseevent_modal
+ SOURCES
+ tst_qmouseevent_modal.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt b/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
new file mode 100644
index 0000000000..4176be9840
--- /dev/null
+++ b/tests/auto/gui/kernel/qopenglwindow/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qopenglwindow.pro.
+
+#####################################################################
+## tst_qopenglwindow Test:
+#####################################################################
+
+add_qt_test(tst_qopenglwindow
+ SOURCES
+ tst_qopenglwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL
+)
diff --git a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
index 759b608c93..28b12f0677 100644
--- a/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
+++ b/tests/auto/gui/kernel/qopenglwindow/qopenglwindow.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qopenglwindow
-QT += core-private gui-private testlib
+QT += opengl core-private gui-private testlib
SOURCES += tst_qopenglwindow.cpp
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 9c36b6898a..2785d57a42 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtGui/QOpenGLWindow>
+#include <QtOpenGL/QOpenGLWindow>
#include <QtTest/QtTest>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLContext>
diff --git a/tests/auto/gui/kernel/qpalette/CMakeLists.txt b/tests/auto/gui/kernel/qpalette/CMakeLists.txt
new file mode 100644
index 0000000000..4bd2ce7cc5
--- /dev/null
+++ b/tests/auto/gui/kernel/qpalette/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpalette.pro.
+
+#####################################################################
+## tst_qpalette Test:
+#####################################################################
+
+add_qt_test(tst_qpalette
+ SOURCES
+ tst_qpalette.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index 6ce6422f48..04343727bb 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -41,6 +41,12 @@ private Q_SLOTS:
void copySemantics();
void moveSemantics();
void setBrush();
+
+ void isBrushSet();
+ void setAllPossibleBrushes();
+ void noBrushesSetForDefaultPalette();
+ void cannotCheckIfInvalidBrushSet();
+ void checkIfBrushForCurrentGroupSet();
};
void tst_QPalette::roleValues_data()
@@ -118,23 +124,35 @@ void tst_QPalette::resolve()
QVERIFY(p2ResolvedTo1 != p2);
}
+
+static void compareAllPaletteData(const QPalette &firstPalette, const QPalette &secondPalette)
+{
+ QCOMPARE(firstPalette, secondPalette);
+
+ // For historical reasons, operator== compares only brushes, but it's not enough for proper
+ // comparison after move/copy, because some additional data can also be moved/copied.
+ // Let's compare this data here.
+ QCOMPARE(firstPalette.resolve(), secondPalette.resolve());
+ QCOMPARE(firstPalette.currentColorGroup(), secondPalette.currentColorGroup());
+}
+
void tst_QPalette::copySemantics()
{
QPalette src(Qt::red), dst;
const QPalette control = src; // copy construction
QVERIFY(src != dst);
QVERIFY(!src.isCopyOf(dst));
- QCOMPARE(src, control);
+ compareAllPaletteData(src, control);
QVERIFY(src.isCopyOf(control));
dst = src; // copy assignment
- QCOMPARE(dst, src);
- QCOMPARE(dst, control);
+ compareAllPaletteData(dst, src);
+ compareAllPaletteData(dst, control);
QVERIFY(dst.isCopyOf(src));
dst = QPalette(Qt::green);
QVERIFY(dst != src);
QVERIFY(dst != control);
- QCOMPARE(src, control);
+ compareAllPaletteData(src, control);
QVERIFY(!dst.isCopyOf(src));
QVERIFY(src.isCopyOf(control));
}
@@ -144,13 +162,13 @@ void tst_QPalette::moveSemantics()
QPalette src(Qt::red), dst;
const QPalette control = src;
QVERIFY(src != dst);
- QCOMPARE(src, control);
+ compareAllPaletteData(src, control);
QVERIFY(!dst.isCopyOf(src));
QVERIFY(!dst.isCopyOf(control));
dst = std::move(src); // move assignment
QVERIFY(!dst.isCopyOf(src)); // isCopyOf() works on moved-from palettes, too
QVERIFY(dst.isCopyOf(control));
- QCOMPARE(dst, control);
+ compareAllPaletteData(dst, control);
src = control; // check moved-from 'src' can still be assigned to (doesn't crash)
QVERIFY(src.isCopyOf(dst));
QVERIFY(src.isCopyOf(control));
@@ -158,7 +176,7 @@ void tst_QPalette::moveSemantics()
QVERIFY(!src.isCopyOf(dst));
QVERIFY(!src.isCopyOf(dst2));
QVERIFY(!src.isCopyOf(control));
- QCOMPARE(dst2, control);
+ compareAllPaletteData(dst2, control);
QVERIFY(dst2.isCopyOf(dst));
QVERIFY(dst2.isCopyOf(control));
// check moved-from 'src' can still be destroyed (doesn't crash)
@@ -194,5 +212,62 @@ void tst_QPalette::setBrush()
QVERIFY(pp.isCopyOf(p));
}
+void tst_QPalette::isBrushSet()
+{
+ QPalette p;
+
+ // Set only one color group
+ p.setBrush(QPalette::Active, QPalette::Mid, QBrush(Qt::red));
+ QVERIFY(p.isBrushSet(QPalette::Active, QPalette::Mid));
+ QVERIFY(!p.isBrushSet(QPalette::Inactive, QPalette::Mid));
+ QVERIFY(!p.isBrushSet(QPalette::Disabled, QPalette::Mid));
+
+ // Set all color groups
+ p.setBrush(QPalette::LinkVisited, QBrush(Qt::green));
+ QVERIFY(p.isBrushSet(QPalette::Active, QPalette::LinkVisited));
+ QVERIFY(p.isBrushSet(QPalette::Inactive, QPalette::LinkVisited));
+ QVERIFY(p.isBrushSet(QPalette::Disabled, QPalette::LinkVisited));
+}
+
+void tst_QPalette::setAllPossibleBrushes()
+{
+ QPalette p;
+
+ QCOMPARE(p.resolve(), QPalette::ResolveMask(0));
+
+ for (int r = 0; r < QPalette::NColorRoles; ++r) {
+ p.setBrush(QPalette::All, QPalette::ColorRole(r), Qt::red);
+ }
+
+ for (int r = 0; r < QPalette::NColorRoles; ++r) {
+ for (int g = 0; g < QPalette::NColorGroups; ++g) {
+ QVERIFY(p.isBrushSet(QPalette::ColorGroup(g), QPalette::ColorRole(r)));
+ }
+ }
+}
+
+void tst_QPalette::noBrushesSetForDefaultPalette()
+{
+ QCOMPARE(QPalette().resolve(), QPalette::ResolveMask(0));
+}
+
+void tst_QPalette::cannotCheckIfInvalidBrushSet()
+{
+ QPalette p(Qt::red);
+
+ QVERIFY(!p.isBrushSet(QPalette::All, QPalette::LinkVisited));
+ QVERIFY(!p.isBrushSet(QPalette::Active, QPalette::NColorRoles));
+}
+
+void tst_QPalette::checkIfBrushForCurrentGroupSet()
+{
+ QPalette p;
+
+ p.setCurrentColorGroup(QPalette::Disabled);
+ p.setBrush(QPalette::Current, QPalette::Link, QBrush(Qt::yellow));
+
+ QVERIFY(p.isBrushSet(QPalette::Current, QPalette::Link));
+}
+
QTEST_MAIN(tst_QPalette)
#include "tst_qpalette.moc"
diff --git a/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt b/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
new file mode 100644
index 0000000000..43deb02af1
--- /dev/null
+++ b/tests/auto/gui/kernel/qpixelformat/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpixelformat.pro.
+
+#####################################################################
+## tst_qpixelformat Test:
+#####################################################################
+
+add_qt_test(tst_qpixelformat
+ SOURCES
+ tst_qpixelformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt b/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
new file mode 100644
index 0000000000..9b586ce4c8
--- /dev/null
+++ b/tests/auto/gui/kernel/qrasterwindow/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qrasterwindow.pro.
+
+#####################################################################
+## tst_qrasterwindow Test:
+#####################################################################
+
+add_qt_test(tst_qrasterwindow
+ SOURCES
+ tst_qrasterwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qscreen/CMakeLists.txt b/tests/auto/gui/kernel/qscreen/CMakeLists.txt
new file mode 100644
index 0000000000..dd54db4753
--- /dev/null
+++ b/tests/auto/gui/kernel/qscreen/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qscreen.pro.
+
+#####################################################################
+## tst_qscreen Test:
+#####################################################################
+
+add_qt_test(tst_qscreen
+ SOURCES
+ tst_qscreen.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt b/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
new file mode 100644
index 0000000000..d12e1da106
--- /dev/null
+++ b/tests/auto/gui/kernel/qsurfaceformat/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsurfaceformat.pro.
+
+#####################################################################
+## tst_qsurfaceformat Test:
+#####################################################################
+
+add_qt_test(tst_qsurfaceformat
+ SOURCES
+ tst_qsurfaceformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt b/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
new file mode 100644
index 0000000000..7d489e3066
--- /dev/null
+++ b/tests/auto/gui/kernel/qtouchevent/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtouchevent.pro.
+
+#####################################################################
+## tst_qtouchevent Test:
+#####################################################################
+
+add_qt_test(tst_qtouchevent
+ SOURCES
+ tst_qtouchevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/kernel/qwindow/CMakeLists.txt b/tests/auto/gui/kernel/qwindow/CMakeLists.txt
new file mode 100644
index 0000000000..cfd17219bd
--- /dev/null
+++ b/tests/auto/gui/kernel/qwindow/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qwindow.pro.
+
+#####################################################################
+## tst_qwindow Test:
+#####################################################################
+
+add_qt_test(tst_qwindow
+ SOURCES
+ tst_qwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qwindow CONDITION QT_FEATURE_dynamicgl AND WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/gui/math3d/CMakeLists.txt b/tests/auto/gui/math3d/CMakeLists.txt
new file mode 100644
index 0000000000..91e59874b7
--- /dev/null
+++ b/tests/auto/gui/math3d/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_subdirectory("qquaternion")
+add_subdirectory("qvectornd")
+add_subdirectory("qmatrixnxn")
diff --git a/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
new file mode 100644
index 0000000000..71daeba361
--- /dev/null
+++ b/tests/auto/gui/math3d/qmatrixnxn/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qmatrixnxn.pro.
+
+#####################################################################
+## tst_qmatrixnxn Test:
+#####################################################################
+
+add_qt_test(tst_qmatrixnxn
+ SOURCES
+ tst_qmatrixnxn.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/math3d/qquaternion/CMakeLists.txt b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
new file mode 100644
index 0000000000..77d035cbf9
--- /dev/null
+++ b/tests/auto/gui/math3d/qquaternion/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qquaternion.pro.
+
+#####################################################################
+## tst_qquaternion Test:
+#####################################################################
+
+add_qt_test(tst_qquaternion
+ SOURCES
+ tst_qquaternion.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/math3d/qvectornd/CMakeLists.txt b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
new file mode 100644
index 0000000000..5d8a373234
--- /dev/null
+++ b/tests/auto/gui/math3d/qvectornd/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qvectornd.pro.
+
+#####################################################################
+## tst_qvectornd Test:
+#####################################################################
+
+add_qt_test(tst_qvectornd
+ SOURCES
+ tst_qvectornd.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/CMakeLists.txt b/tests/auto/gui/painting/CMakeLists.txt
new file mode 100644
index 0000000000..e13679e282
--- /dev/null
+++ b/tests/auto/gui/painting/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from painting.pro.
+
+add_subdirectory("qpainterpath")
+add_subdirectory("qpainterpathstroker")
+# add_subdirectory("qcolor")
+# add_subdirectory("qbrush")
+# add_subdirectory("qregion")
+# add_subdirectory("qpagelayout")
+add_subdirectory("qpagesize")
+# add_subdirectory("qpainter")
+if (QT_FEATURE_private_tests)
+ # not converted yet
+ #add_subdirectory("qpathclipper")
+endif()
+# add_subdirectory("qpdfwriter")
+add_subdirectory("qpen")
+add_subdirectory("qpaintengine")
+# add_subdirectory("qtransform")
+# add_subdirectory("qwmatrix")
+# add_subdirectory("qpolygon")
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
index 07c820dc86..f8502c1e2f 100644
--- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
@@ -1032,6 +1032,15 @@ void tst_QColor::setRgbF()
QCOMPARE(qfloat16(b2), qfloat16(b));
}
}
+ QVERIFY(color.isValid());
+ QColor invalidRgb = color;
+ QColor invalidRgbF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setRgb: RGB parameters out of range");
+ invalidRgb.setRgb(-1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setRgb: RGB parameters out of range");
+ invalidRgbF.setRgb(-1, -1, -1, -1);
+ QVERIFY(!invalidRgb.isValid());
+ QVERIFY(!invalidRgbF.isValid());
}
void tst_QColor::setRgba()
@@ -1146,6 +1155,16 @@ void tst_QColor::setHsv()
QCOMPARE(v2, v);
}
}
+ QVERIFY(color.isValid());
+ QVERIFY(color.isValid());
+ QColor invalidHsv = color;
+ QColor invalidHsvF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHsv: HSV parameters out of range");
+ invalidHsv.setHsv(-1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHsvF: HSV parameters out of range");
+ invalidHsvF.setHsvF(-1, -1, -1);
+ QVERIFY(!invalidHsv.isValid());
+ QVERIFY(!invalidHsvF.isValid());
}
void tst_QColor::setCmyk()
@@ -1271,6 +1290,15 @@ void tst_QColor::setCmyk()
QCOMPARE(k2, k);
}
}
+ QVERIFY(color.isValid());
+ QColor invalidCmyk = color;
+ QColor invalidCmykF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setCmyk: CMYK parameters out of range");
+ invalidCmyk.setCmyk(-1, -1, -1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setCmykF: CMYK parameters out of range");
+ invalidCmykF.setCmykF(-1, -1, -1, -1, -1);
+ QVERIFY(!invalidCmyk.isValid());
+ QVERIFY(!invalidCmykF.isValid());
}
void tst_QColor::setHsl()
@@ -1372,6 +1400,15 @@ void tst_QColor::setHsl()
QCOMPARE(l2, l);
}
}
+ QVERIFY(color.isValid());
+ QColor invalidHsl = color;
+ QColor invalidHslF = color;
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHsl: HSL parameters out of range");
+ invalidHsl.setHsl(-1, -1, -1, -1);
+ QTest::ignoreMessage(QtWarningMsg, "QColor::setHslF: HSL parameters out of range");
+ invalidHslF.setHslF(-1, -1, -1, -1);
+ QVERIFY(!invalidHsl.isValid());
+ QVERIFY(!invalidHslF.isValid());
}
void tst_QColor::toRgb_data()
diff --git a/tests/auto/gui/painting/qpagesize/CMakeLists.txt b/tests/auto/gui/painting/qpagesize/CMakeLists.txt
new file mode 100644
index 0000000000..260abfbc0f
--- /dev/null
+++ b/tests/auto/gui/painting/qpagesize/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qpagesize.pro.
+
+#####################################################################
+## tst_qpagesize Test:
+#####################################################################
+
+add_qt_test(tst_qpagesize
+ SOURCES
+ tst_qpagesize.cpp
+ DEFINES
+ QT_USE_USING_NAMESPACE
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpaintengine/CMakeLists.txt b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
new file mode 100644
index 0000000000..8125a98d3e
--- /dev/null
+++ b/tests/auto/gui/painting/qpaintengine/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpaintengine.pro.
+
+#####################################################################
+## tst_qpaintengine Test:
+#####################################################################
+
+add_qt_test(tst_qpaintengine
+ SOURCES
+ tst_qpaintengine.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpainterpath/CMakeLists.txt b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
new file mode 100644
index 0000000000..c2c88cc258
--- /dev/null
+++ b/tests/auto/gui/painting/qpainterpath/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpainterpath.pro.
+
+#####################################################################
+## tst_qpainterpath Test:
+#####################################################################
+
+add_qt_test(tst_qpainterpath
+ SOURCES
+ tst_qpainterpath.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
new file mode 100644
index 0000000000..a1c5f6547f
--- /dev/null
+++ b/tests/auto/gui/painting/qpainterpathstroker/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpainterpathstroker.pro.
+
+#####################################################################
+## tst_qpainterpathstroker Test:
+#####################################################################
+
+add_qt_test(tst_qpainterpathstroker
+ SOURCES
+ tst_qpainterpathstroker.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qpen/CMakeLists.txt b/tests/auto/gui/painting/qpen/CMakeLists.txt
new file mode 100644
index 0000000000..d096f7a6ce
--- /dev/null
+++ b/tests/auto/gui/painting/qpen/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpen.pro.
+
+#####################################################################
+## tst_qpen Test:
+#####################################################################
+
+add_qt_test(tst_qpen
+ SOURCES
+ tst_qpen.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
index 78638a7518..97c6ad60b8 100644
--- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
@@ -46,8 +46,6 @@ private slots:
void qhash();
void translate();
void scale();
- void matrix();
- void testOffset();
void types();
void types2_data();
void types2();
@@ -372,67 +370,6 @@ void tst_QTransform::scale()
QVERIFY( QTransform::fromScale( 1, 1 ) == QTransform());
}
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-void tst_QTransform::matrix()
-{
- QMatrix mat1;
- mat1.scale(0.3, 0.7);
- mat1.translate(53.3, 94.4);
- mat1.rotate(45);
-
- QMatrix mat2;
- mat2.rotate(33);
- mat2.scale(0.6, 0.6);
- mat2.translate(13.333, 7.777);
-
- QTransform tran1(mat1);
- QTransform tran2(mat2);
- QTransform dummy;
- dummy.setMatrix(mat1.m11(), mat1.m12(), 0,
- mat1.m21(), mat1.m22(), 0,
- mat1.dx(), mat1.dy(), 1);
-
- QCOMPARE(tran1, dummy);
- QCOMPARE(tran1.inverted(), dummy.inverted());
- QCOMPARE(tran1.inverted(), QTransform(mat1.inverted()));
- QCOMPARE(tran2.inverted(), QTransform(mat2.inverted()));
-
- QMatrix mat3 = mat1 * mat2;
- QTransform tran3 = tran1 * tran2;
- QCOMPARE(QTransform(mat3), tran3);
-
- /* QMatrix::operator==() doesn't use qFuzzyCompare(), which
- * on win32-g++ results in a failure. So we work around it by
- * calling QTranform::operator==(), which performs a fuzzy compare. */
- QCOMPARE(QTransform(mat3), QTransform(tran3.toAffine()));
-
- QTransform tranInv = tran1.inverted();
- QMatrix matInv = mat1.inverted();
-
- QRect rect(43, 70, 200, 200);
- QPoint pt(43, 66);
- QCOMPARE(tranInv.mapRect(rect), matInv.mapRect(rect));
- QCOMPARE(tranInv.map(pt), matInv.map(pt));
-
- QPainterPath path;
- path.moveTo(55, 60);
- path.lineTo(110, 110);
- path.quadTo(220, 50, 10, 20);
- path.closeSubpath();
- QCOMPARE(tranInv.map(path), matInv.map(path));
-}
-
-void tst_QTransform::testOffset()
-{
- QTransform trans;
- const QMatrix &aff = trans.toAffine();
- QCOMPARE((void*)(&aff), (void*)(&trans));
-}
-QT_WARNING_POP
-#endif
-
void tst_QTransform::types()
{
QTransform m1;
diff --git a/tests/auto/gui/qopengl/CMakeLists.txt b/tests/auto/gui/qopengl/CMakeLists.txt
new file mode 100644
index 0000000000..1c7c9b6ec0
--- /dev/null
+++ b/tests/auto/gui/qopengl/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from qopengl.pro.
+
+#####################################################################
+## tst_qopengl Test:
+#####################################################################
+
+add_qt_test(tst_qopengl
+ SOURCES
+ tst_qopengl.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qopengl CONDITION LINUX AND QT_FEATURE_xcb AND QT_FEATURE_xcb_glx_plugin
+ DEFINES
+ USE_GLX
+)
diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro
index 722c99ee0b..604aa59d8a 100644
--- a/tests/auto/gui/qopengl/qopengl.pro
+++ b/tests/auto/gui/qopengl/qopengl.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qopengl
-QT += gui-private core-private testlib
+QT += opengl gui-private core-private testlib
SOURCES += tst_qopengl.cpp
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index ede1e58a53..8dd8b95daf 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -26,22 +26,21 @@
**
****************************************************************************/
-
+#include <QtOpenGL/QOpenGLFramebufferObject>
+#include <QtOpenGL/QOpenGLPaintDevice>
+#include <QtOpenGL/QOpenGLTexture>
+#include <QtOpenGL/qopengltextureblitter.h>
+#include <QtOpenGL/QOpenGLVertexArrayObject>
+#include <QtOpenGL/QOpenGLBuffer>
#include <QtGui/private/qopenglcontext_p.h>
-#include <QtGui/QOpenGLFramebufferObject>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLFunctions_4_2_Core>
-#include <QtGui/QOpenGLVertexArrayObject>
-#include <QtGui/QOpenGLBuffer>
-#include <QtGui/QOpenGLPaintDevice>
-#include <QtGui/QOpenGLTexture>
#include <QtGui/QPainter>
#include <QtGui/QScreen>
#include <QtGui/QWindow>
#include <QtGui/QOffscreenSurface>
#include <QtGui/QGenericMatrix>
#include <QtGui/QMatrix4x4>
-#include <QtGui/qopengltextureblitter.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qopenglextensions_p.h>
#include <qpa/qplatformintegration.h>
diff --git a/tests/auto/gui/qopenglconfig/CMakeLists.txt b/tests/auto/gui/qopenglconfig/CMakeLists.txt
new file mode 100644
index 0000000000..26ce58d98c
--- /dev/null
+++ b/tests/auto/gui/qopenglconfig/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qopenglconfig.pro.
+
+#####################################################################
+## tst_qopenglconfig Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "buglist.json")
+
+add_qt_test(tst_qopenglconfig
+ SOURCES
+ tst_qopenglconfig.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/gui/qvulkan/CMakeLists.txt b/tests/auto/gui/qvulkan/CMakeLists.txt
new file mode 100644
index 0000000000..6316aa8f68
--- /dev/null
+++ b/tests/auto/gui/qvulkan/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qvulkan.pro.
+
+#####################################################################
+## tst_qvulkan Test:
+#####################################################################
+
+add_qt_test(tst_qvulkan
+ SOURCES
+ tst_qvulkan.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/rhi/CMakeLists.txt b/tests/auto/gui/rhi/CMakeLists.txt
new file mode 100644
index 0000000000..786e121f00
--- /dev/null
+++ b/tests/auto/gui/rhi/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from rhi.pro.
+
+add_subdirectory(qshader)
+add_subdirectory(qrhi)
diff --git a/tests/auto/gui/rhi/qrhi/CMakeLists.txt b/tests/auto/gui/rhi/qrhi/CMakeLists.txt
new file mode 100644
index 0000000000..8c3026c176
--- /dev/null
+++ b/tests/auto/gui/rhi/qrhi/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qrhi.pro.
+
+#####################################################################
+## tst_qrhi Test:
+#####################################################################
+
+add_qt_test(tst_qrhi
+ SOURCES
+ tst_qrhi.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qrhi_resource_files
+ "data"
+)
+
+add_qt_resource(tst_qrhi "qrhi"
+ PREFIX
+ "/"
+ FILES
+ ${qrhi_resource_files}
+)
+
diff --git a/tests/auto/gui/rhi/qshader/CMakeLists.txt b/tests/auto/gui/rhi/qshader/CMakeLists.txt
new file mode 100644
index 0000000000..472fc3b7e4
--- /dev/null
+++ b/tests/auto/gui/rhi/qshader/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qshader.pro.
+
+#####################################################################
+## tst_qshader Test:
+#####################################################################
+
+add_qt_test(tst_qshader
+ SOURCES
+ tst_qshader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qshader_resource_files
+ "data"
+)
+
+add_qt_resource(tst_qshader "qshader"
+ PREFIX
+ "/"
+ FILES
+ ${qshader_resource_files}
+)
+
diff --git a/tests/auto/gui/text/CMakeLists.txt b/tests/auto/gui/text/CMakeLists.txt
new file mode 100644
index 0000000000..8326190831
--- /dev/null
+++ b/tests/auto/gui/text/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from text.pro.
+
+add_subdirectory(qabstracttextdocumentlayout)
+add_subdirectory(qfont)
+add_subdirectory(qfontdatabase)
+add_subdirectory(qfontmetrics)
+add_subdirectory(qglyphrun)
+add_subdirectory(qrawfont)
+add_subdirectory(qstatictext)
+add_subdirectory(qsyntaxhighlighter)
+add_subdirectory(qtextblock)
+add_subdirectory(qtextcursor)
+add_subdirectory(qtextdocumentfragment)
+add_subdirectory(qtextdocumentlayout)
+add_subdirectory(qtextformat)
+add_subdirectory(qtextlist)
+add_subdirectory(qtextobject)
+add_subdirectory(qtextscriptengine)
+add_subdirectory(qtexttable)
+add_subdirectory(qinputcontrol)
+if(QT_FEATURE_private_tests AND TARGET Qt::Xml)
+ add_subdirectory(qcssparser)
+endif()
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qfontcache)
+ add_subdirectory(qtextlayout)
+ add_subdirectory(qzip)
+ add_subdirectory(qtextodfwriter)
+endif()
+if(TARGET Qt::Xml)
+ add_subdirectory(qtextdocument)
+endif()
+if(QT_FEATURE_private_tests AND UNIX)
+ add_subdirectory(qtextpiecetable)
+endif()
+if(QT_FEATURE_textmarkdownreader)
+ add_subdirectory(qtextmarkdownimporter)
+endif()
+if(QT_FEATURE_private_tests AND QT_FEATURE_textmarkdownwriter)
+ add_subdirectory(qtextmarkdownwriter)
+endif()
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt b/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
new file mode 100644
index 0000000000..62d4ce9d32
--- /dev/null
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qabstracttextdocumentlayout.pro.
+
+#####################################################################
+## tst_qabstracttextdocumentlayout Test:
+#####################################################################
+
+add_qt_test(tst_qabstracttextdocumentlayout
+ SOURCES
+ tst_qabstracttextdocumentlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/text/qcssparser/CMakeLists.txt b/tests/auto/gui/text/qcssparser/CMakeLists.txt
new file mode 100644
index 0000000000..09e1672bc4
--- /dev/null
+++ b/tests/auto/gui/text/qcssparser/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from qcssparser.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qcssparser Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "testdata")
+
+add_qt_test(tst_qcssparser
+ SOURCES
+ tst_qcssparser.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Xml
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qcssparser.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(testdata_resource_files
+ "testdata/scanner/comments/input"
+ "testdata/scanner/comments/output"
+ "testdata/scanner/comments2/input"
+ "testdata/scanner/comments2/output"
+ "testdata/scanner/comments3/input"
+ "testdata/scanner/comments3/output"
+ "testdata/scanner/comments4/input"
+ "testdata/scanner/comments4/output"
+ "testdata/scanner/quotedstring/input"
+ "testdata/scanner/quotedstring/output"
+ "testdata/scanner/simple/input"
+ "testdata/scanner/simple/output"
+ "testdata/scanner/unicode/input"
+ "testdata/scanner/unicode/output"
+ )
+
+ add_qt_resource(tst_qcssparser "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/text/qfont/CMakeLists.txt b/tests/auto/gui/text/qfont/CMakeLists.txt
new file mode 100644
index 0000000000..a04f8365b1
--- /dev/null
+++ b/tests/auto/gui/text/qfont/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qfont.pro.
+
+#####################################################################
+## tst_qfont Test:
+#####################################################################
+
+add_qt_test(tst_qfont
+ SOURCES
+ tst_qfont.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(testfont_resource_files
+ "weirdfont.otf"
+)
+
+add_qt_resource(tst_qfont "testfont"
+ PREFIX
+ "/"
+ FILES
+ ${testfont_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qfont CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qfontcache/CMakeLists.txt b/tests/auto/gui/text/qfontcache/CMakeLists.txt
new file mode 100644
index 0000000000..84f6373328
--- /dev/null
+++ b/tests/auto/gui/text/qfontcache/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qfontcache.pro.
+
+#####################################################################
+## tst_qfontcache Test:
+#####################################################################
+
+add_qt_test(tst_qfontcache
+ SOURCES
+ tst_qfontcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qfontdatabase/CMakeLists.txt b/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
new file mode 100644
index 0000000000..65c6224a00
--- /dev/null
+++ b/tests/auto/gui/text/qfontdatabase/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from qfontdatabase.pro.
+
+#####################################################################
+## tst_qfontdatabase Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "LED_REAL.TTF")
+
+add_qt_test(tst_qfontdatabase
+ SOURCES
+ tst_qfontdatabase.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont_condensed.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont_condensed.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont_italic.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont_italic.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont_open.otf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont_open.otf"
+)
+set(testdata_resource_files
+ "../../../shared/resources/testfont.ttf"
+ "../../../shared/resources/testfont_condensed.ttf"
+ "../../../shared/resources/testfont_italic.ttf"
+ "../../../shared/resources/testfont_open.otf"
+ "LED_REAL.TTF"
+)
+
+add_qt_resource(tst_qfontdatabase "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qfontmetrics/CMakeLists.txt b/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
new file mode 100644
index 0000000000..029f5d5ce3
--- /dev/null
+++ b/tests/auto/gui/text/qfontmetrics/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qfontmetrics.pro.
+
+#####################################################################
+## tst_qfontmetrics Test:
+#####################################################################
+
+add_qt_test(tst_qfontmetrics
+ SOURCES
+ tst_qfontmetrics.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set(testfont_resource_files
+ "../../../shared/resources/testfont.ttf"
+ "ucs4font.ttf"
+)
+
+add_qt_resource(tst_qfontmetrics "testfont"
+ PREFIX
+ "/fonts"
+ FILES
+ ${testfont_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qglyphrun/CMakeLists.txt b/tests/auto/gui/text/qglyphrun/CMakeLists.txt
new file mode 100644
index 0000000000..8efcfc0cf9
--- /dev/null
+++ b/tests/auto/gui/text/qglyphrun/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qglyphrun.pro.
+
+#####################################################################
+## tst_qglyphrun Test:
+#####################################################################
+
+add_qt_test(tst_qglyphrun
+ SOURCES
+ tst_qglyphrun.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/test.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "test.ttf"
+)
+set(testdata_resource_files
+ "../../../shared/resources/test.ttf"
+)
+
+add_qt_resource(tst_qglyphrun "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qinputcontrol/CMakeLists.txt b/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
new file mode 100644
index 0000000000..e544fb313c
--- /dev/null
+++ b/tests/auto/gui/text/qinputcontrol/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qinputcontrol.pro.
+
+#####################################################################
+## tst_qinputcontrol Test:
+#####################################################################
+
+add_qt_test(tst_qinputcontrol
+ SOURCES
+ tst_qinputcontrol.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qrawfont/CMakeLists.txt b/tests/auto/gui/text/qrawfont/CMakeLists.txt
new file mode 100644
index 0000000000..5044866c49
--- /dev/null
+++ b/tests/auto/gui/text/qrawfont/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from qrawfont.pro.
+
+#####################################################################
+## tst_qrawfont Test:
+#####################################################################
+
+add_qt_test(tst_qrawfont
+ SOURCES
+ tst_qrawfont.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set(testdata_resource_files
+ "../../../shared/resources/testfont.ttf"
+ "testfont_bold_italic.ttf"
+ "testfont_os2_v1.ttf"
+)
+
+add_qt_resource(tst_qrawfont "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
diff --git a/tests/auto/gui/text/qstatictext/CMakeLists.txt b/tests/auto/gui/text/qstatictext/CMakeLists.txt
new file mode 100644
index 0000000000..80eef2f254
--- /dev/null
+++ b/tests/auto/gui/text/qstatictext/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qstatictext.pro.
+
+#####################################################################
+## tst_qstatictext Test:
+#####################################################################
+
+add_qt_test(tst_qstatictext
+ SOURCES
+ tst_qstatictext.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qstatictext CONDITION QT_FEATURE_private_tests
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt b/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
new file mode 100644
index 0000000000..c4ea8b4a1e
--- /dev/null
+++ b/tests/auto/gui/text/qsyntaxhighlighter/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qsyntaxhighlighter.pro.
+
+#####################################################################
+## tst_qsyntaxhighlighter Test:
+#####################################################################
+
+add_qt_test(tst_qsyntaxhighlighter
+ SOURCES
+ tst_qsyntaxhighlighter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qsyntaxhighlighter CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qtextblock/CMakeLists.txt b/tests/auto/gui/text/qtextblock/CMakeLists.txt
new file mode 100644
index 0000000000..18e0be18c6
--- /dev/null
+++ b/tests/auto/gui/text/qtextblock/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextblock.pro.
+
+#####################################################################
+## tst_qtextblock Test:
+#####################################################################
+
+add_qt_test(tst_qtextblock
+ SOURCES
+ tst_qtextblock.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextcursor/CMakeLists.txt b/tests/auto/gui/text/qtextcursor/CMakeLists.txt
new file mode 100644
index 0000000000..78b6ed191d
--- /dev/null
+++ b/tests/auto/gui/text/qtextcursor/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextcursor.pro.
+
+#####################################################################
+## tst_qtextcursor Test:
+#####################################################################
+
+add_qt_test(tst_qtextcursor
+ SOURCES
+ tst_qtextcursor.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextdocument/CMakeLists.txt b/tests/auto/gui/text/qtextdocument/CMakeLists.txt
new file mode 100644
index 0000000000..7ea22d3fb0
--- /dev/null
+++ b/tests/auto/gui/text/qtextdocument/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtextdocument.pro.
+
+#####################################################################
+## tst_qtextdocument Test:
+#####################################################################
+
+add_qt_test(tst_qtextdocument
+ SOURCES
+ common.h
+ tst_qtextdocument.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Xml
+)
diff --git a/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt b/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
new file mode 100644
index 0000000000..f92a82a262
--- /dev/null
+++ b/tests/auto/gui/text/qtextdocumentfragment/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextdocumentfragment.pro.
+
+#####################################################################
+## tst_qtextdocumentfragment Test:
+#####################################################################
+
+add_qt_test(tst_qtextdocumentfragment
+ SOURCES
+ tst_qtextdocumentfragment.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt b/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
new file mode 100644
index 0000000000..c7212209ee
--- /dev/null
+++ b/tests/auto/gui/text/qtextdocumentlayout/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtextdocumentlayout.pro.
+
+#####################################################################
+## tst_qtextdocumentlayout Test:
+#####################################################################
+
+add_qt_test(tst_qtextdocumentlayout
+ SOURCES
+ tst_qtextdocumentlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextdocumentlayout CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qtextformat/CMakeLists.txt b/tests/auto/gui/text/qtextformat/CMakeLists.txt
new file mode 100644
index 0000000000..be7653abd4
--- /dev/null
+++ b/tests/auto/gui/text/qtextformat/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextformat.pro.
+
+#####################################################################
+## tst_qtextformat Test:
+#####################################################################
+
+add_qt_test(tst_qtextformat
+ SOURCES
+ tst_qtextformat.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextlayout/CMakeLists.txt b/tests/auto/gui/text/qtextlayout/CMakeLists.txt
new file mode 100644
index 0000000000..c87d5bdd4d
--- /dev/null
+++ b/tests/auto/gui/text/qtextlayout/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextlayout.pro.
+
+#####################################################################
+## tst_qtextlayout Test:
+#####################################################################
+
+add_qt_test(tst_qtextlayout
+ SOURCES
+ tst_qtextlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextlist/CMakeLists.txt b/tests/auto/gui/text/qtextlist/CMakeLists.txt
new file mode 100644
index 0000000000..f22de38a8c
--- /dev/null
+++ b/tests/auto/gui/text/qtextlist/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtextlist.pro.
+
+#####################################################################
+## tst_qtextlist Test:
+#####################################################################
+
+add_qt_test(tst_qtextlist
+ SOURCES
+ ../qtextdocument/common.h
+ tst_qtextlist.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt b/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
new file mode 100644
index 0000000000..6a1043c89f
--- /dev/null
+++ b/tests/auto/gui/text/qtextmarkdownimporter/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qtextmarkdownimporter.pro.
+
+#####################################################################
+## tst_qtextmarkdownimporter Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "data/thematicBreaks.md")
+list(APPEND test_data "data/headingBulletsContinuations.md")
+
+add_qt_test(tst_qtextmarkdownimporter
+ SOURCES
+ tst_qtextmarkdownimporter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt b/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
new file mode 100644
index 0000000000..7360b40994
--- /dev/null
+++ b/tests/auto/gui/text/qtextmarkdownwriter/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qtextmarkdownwriter.pro.
+
+#####################################################################
+## tst_qtextmarkdownwriter Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "data/example.md")
+list(APPEND test_data "data/blockquotes.md")
+
+add_qt_test(tst_qtextmarkdownwriter
+ SOURCES
+ tst_qtextmarkdownwriter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/gui/text/qtextobject/CMakeLists.txt b/tests/auto/gui/text/qtextobject/CMakeLists.txt
new file mode 100644
index 0000000000..b8d7f7b548
--- /dev/null
+++ b/tests/auto/gui/text/qtextobject/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtextobject.pro.
+
+#####################################################################
+## tst_qtextobject Test:
+#####################################################################
+
+add_qt_test(tst_qtextobject
+ SOURCES
+ tst_qtextobject.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextobject CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt b/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
new file mode 100644
index 0000000000..18c84e5a45
--- /dev/null
+++ b/tests/auto/gui/text/qtextodfwriter/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtextodfwriter.pro.
+
+#####################################################################
+## tst_qtextodfwriter Test:
+#####################################################################
+
+add_qt_test(tst_qtextodfwriter
+ SOURCES
+ tst_qtextodfwriter.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt b/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
new file mode 100644
index 0000000000..5fb8db5405
--- /dev/null
+++ b/tests/auto/gui/text/qtextpiecetable/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qtextpiecetable.pro.
+
+if(WIN32)
+ return()
+endif()
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qtextpiecetable Test:
+#####################################################################
+
+add_qt_test(tst_qtextpiecetable
+ SOURCES
+ ../qtextdocument/common.h
+ tst_qtextpiecetable.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qtextpiecetable.pro:<TRUE>:
+# _REQUIREMENTS = "!win32" "qtConfig(private_tests)"
diff --git a/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt b/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
new file mode 100644
index 0000000000..8d94e33b6c
--- /dev/null
+++ b/tests/auto/gui/text/qtextscriptengine/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtextscriptengine.pro.
+
+#####################################################################
+## tst_qtextscriptengine Test:
+#####################################################################
+
+add_qt_test(tst_qtextscriptengine
+ SOURCES
+ tst_qtextscriptengine.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt b/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
new file mode 100644
index 0000000000..b2434569d4
--- /dev/null
+++ b/tests/auto/gui/text/qtextscriptengine/generate/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from generate.pro.
+
+#####################################################################
+## generate Binary:
+#####################################################################
+
+add_qt_executable(generate
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ /usr/include/freetype2
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+)
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 0371f51961..348042bacb 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1217,9 +1217,6 @@ void tst_QTextScriptEngine::thaiWithZWJ()
QFont font(QStringLiteral("Waree"));
font.setStyleStrategy(QFont::NoFontMerging);
- if (QFontInfo(font).styleName() != QStringLiteral("Book"))
- QSKIP("couldn't find 'Waree Book' font");
-
QString s(QString::fromUtf8("\xe0\xb8\xa3\xe2\x80\x8d\xe0\xb8\xa3\xe2\x80"
"\x8c\x2e\xe0\xb8\xa3\x2e\xe2\x80\x9c\xe0\xb8"
"\xa3\xe2\x80\xa6\xe0\xb8\xa3\xe2\x80\x9d\xe0"
diff --git a/tests/auto/gui/text/qtexttable/CMakeLists.txt b/tests/auto/gui/text/qtexttable/CMakeLists.txt
new file mode 100644
index 0000000000..de82c94233
--- /dev/null
+++ b/tests/auto/gui/text/qtexttable/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qtexttable.pro.
+
+#####################################################################
+## tst_qtexttable Test:
+#####################################################################
+
+add_qt_test(tst_qtexttable
+ SOURCES
+ tst_qtexttable.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtexttable CONDITION TARGET Qt::Widgets
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
diff --git a/tests/auto/gui/text/qzip/CMakeLists.txt b/tests/auto/gui/text/qzip/CMakeLists.txt
new file mode 100644
index 0000000000..dfeb968cc1
--- /dev/null
+++ b/tests/auto/gui/text/qzip/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qzip.pro.
+
+#####################################################################
+## tst_qzip Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "testdata")
+
+add_qt_test(tst_qzip
+ SOURCES
+ tst_qzip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(testdata_resource_files
+ "testdata/symlink.zip"
+ "testdata/test.zip"
+ )
+
+ add_qt_resource(tst_qzip "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/gui/util/CMakeLists.txt b/tests/auto/gui/util/CMakeLists.txt
new file mode 100644
index 0000000000..4e0a6b7e25
--- /dev/null
+++ b/tests/auto/gui/util/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from util.pro.
+
+add_subdirectory(qdesktopservices)
+add_subdirectory(qdoublevalidator)
+add_subdirectory(qintvalidator)
+add_subdirectory(qregexpvalidator)
+add_subdirectory(qregularexpressionvalidator)
+add_subdirectory(qshadergenerator)
+add_subdirectory(qshadergraph)
+add_subdirectory(qshadergraphloader)
+add_subdirectory(qshadernodes)
+add_subdirectory(qshadernodesloader)
+add_subdirectory(qtexturefilereader)
diff --git a/tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt b/tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8163ec80b6
--- /dev/null
+++ b/tests/auto/gui/util/qdesktopservices/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdesktopservices.pro.
+
+#####################################################################
+## tst_qdesktopservices Test:
+#####################################################################
+
+add_qt_test(tst_qdesktopservices
+ SOURCES
+ tst_qdesktopservices.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qdesktopservices/CMakeLists.txt b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
new file mode 100644
index 0000000000..c62cecac30
--- /dev/null
+++ b/tests/auto/gui/util/qdesktopservices/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qdesktopservices.pro.
+
+#####################################################################
+## tst_qdesktopservices Test:
+#####################################################################
+
+add_qt_test(tst_qdesktopservices
+ SOURCES
+ tst_qdesktopservices.cpp
+ DEFINES
+ # QT_DISABLE_DEPRECATED_BEFORE=0 # special case
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
new file mode 100644
index 0000000000..6cccd082a9
--- /dev/null
+++ b/tests/auto/gui/util/qdoublevalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdoublevalidator.pro.
+
+#####################################################################
+## tst_qdoublevalidator Test:
+#####################################################################
+
+add_qt_test(tst_qdoublevalidator
+ SOURCES
+ tst_qdoublevalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qintvalidator/CMakeLists.txt b/tests/auto/gui/util/qintvalidator/CMakeLists.txt
new file mode 100644
index 0000000000..69a5503d8e
--- /dev/null
+++ b/tests/auto/gui/util/qintvalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qintvalidator.pro.
+
+#####################################################################
+## tst_qintvalidator Test:
+#####################################################################
+
+add_qt_test(tst_qintvalidator
+ SOURCES
+ tst_qintvalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt b/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt
new file mode 100644
index 0000000000..4f7d7da0c2
--- /dev/null
+++ b/tests/auto/gui/util/qregexpvalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qregexpvalidator.pro.
+
+#####################################################################
+## tst_qregexpvalidator Test:
+#####################################################################
+
+add_qt_test(tst_qregexpvalidator
+ SOURCES
+ tst_qregexpvalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
new file mode 100644
index 0000000000..8633a171e5
--- /dev/null
+++ b/tests/auto/gui/util/qregularexpressionvalidator/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qregularexpressionvalidator.pro.
+
+#####################################################################
+## tst_qregularexpressionvalidator Test:
+#####################################################################
+
+add_qt_test(tst_qregularexpressionvalidator
+ SOURCES
+ tst_qregularexpressionvalidator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/gui/util/qshadergenerator/CMakeLists.txt b/tests/auto/gui/util/qshadergenerator/CMakeLists.txt
new file mode 100644
index 0000000000..e9cb62377f
--- /dev/null
+++ b/tests/auto/gui/util/qshadergenerator/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadergenerator.pro.
+
+#####################################################################
+## tst_qshadergenerator Test:
+#####################################################################
+
+add_qt_test(tst_qshadergenerator
+ SOURCES
+ tst_qshadergenerator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadergraph/CMakeLists.txt b/tests/auto/gui/util/qshadergraph/CMakeLists.txt
new file mode 100644
index 0000000000..ede24f2a40
--- /dev/null
+++ b/tests/auto/gui/util/qshadergraph/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadergraph.pro.
+
+#####################################################################
+## tst_qshadergraph Test:
+#####################################################################
+
+add_qt_test(tst_qshadergraph
+ SOURCES
+ tst_qshadergraph.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadergraphloader/CMakeLists.txt b/tests/auto/gui/util/qshadergraphloader/CMakeLists.txt
new file mode 100644
index 0000000000..caf863d42d
--- /dev/null
+++ b/tests/auto/gui/util/qshadergraphloader/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadergraphloader.pro.
+
+#####################################################################
+## tst_qshadergraphloader Test:
+#####################################################################
+
+add_qt_test(tst_qshadergraphloader
+ SOURCES
+ tst_qshadergraphloader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadernodes/CMakeLists.txt b/tests/auto/gui/util/qshadernodes/CMakeLists.txt
new file mode 100644
index 0000000000..d7cc14b09c
--- /dev/null
+++ b/tests/auto/gui/util/qshadernodes/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadernodes.pro.
+
+#####################################################################
+## tst_qshadernodes Test:
+#####################################################################
+
+add_qt_test(tst_qshadernodes
+ SOURCES
+ tst_qshadernodes.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadernodesloader/CMakeLists.txt b/tests/auto/gui/util/qshadernodesloader/CMakeLists.txt
new file mode 100644
index 0000000000..e381af4f7b
--- /dev/null
+++ b/tests/auto/gui/util/qshadernodesloader/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qshadernodesloader.pro.
+
+#####################################################################
+## tst_qshadernodesloader Test:
+#####################################################################
+
+add_qt_test(tst_qshadernodesloader
+ SOURCES
+ tst_qshadernodesloader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp b/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp
index 4782e40ed8..ec1bd87a32 100644
--- a/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp
+++ b/tests/auto/gui/util/qshadernodesloader/tst_qshadernodesloader.cpp
@@ -272,6 +272,10 @@ void tst_QShaderNodesLoader::shouldLoadFromJsonStream_data()
QTest::newRow("NotOpen") << createBuffer(smallJson, QIODevice::NotOpen) << NodeHash() << QShaderNodesLoader::Error;
QTest::newRow("CorrectJSON") << createBuffer(smallJson) << smallProtos << QShaderNodesLoader::Ready;
+
+ // These types are normaly registered by QShaderGraphLoader
+ qRegisterMetaType<QShaderLanguage::StorageQualifier>();
+ qRegisterMetaType<QShaderLanguage::VariableType>();
}
void tst_QShaderNodesLoader::shouldLoadFromJsonStream()
diff --git a/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
new file mode 100644
index 0000000000..3b6d99c0e8
--- /dev/null
+++ b/tests/auto/gui/util/qtexturefilereader/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from qtexturefilereader.pro.
+
+#####################################################################
+## tst_qtexturefilereader Test:
+#####################################################################
+
+add_qt_test(tst_qtexturefilereader
+ SOURCES
+ tst_qtexturefilereader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(qtexturefilereader_resource_files
+ "texturefiles/car.ktx"
+ "texturefiles/car_mips.ktx"
+ "texturefiles/newlogo.astc"
+ "texturefiles/newlogo_srgb.astc"
+ "texturefiles/pattern.pkm"
+)
+
+add_qt_resource(tst_qtexturefilereader "qtexturefilereader"
+ PREFIX
+ "/"
+ FILES
+ ${qtexturefilereader_resource_files}
+)
+
diff --git a/tests/auto/network/CMakeLists.txt b/tests/auto/network/CMakeLists.txt
new file mode 100644
index 0000000000..b7ba3de688
--- /dev/null
+++ b/tests/auto/network/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from network.pro.
+# special case begin
+# SSL library include path is not propagated with private tests which results in
+# test not being able to find the ssl header when they are not in the standard
+# include paths
+if (QT_FEATURE_private_tests)
+ if (QT_FEATURE_openssl AND QT_FEATURE_openssl_linked AND QT_FEATURE_ssl)
+ include_directories($<TARGET_PROPERTY:OpenSSL::SSL,INTERFACE_INCLUDE_DIRECTORIES>)
+ endif()
+
+ if (QT_FEATURE_openssl AND QT_FEATURE_ssl AND NOT QT_FEATURE_openssl_linked)
+ include_directories($<TARGET_PROPERTY:${INSTALL_CMAKE_NAMESPACE}::SSL_nolink,INTERFACE_INCLUDE_DIRECTORIES>)
+ endif()
+endif()
+# special case end
+
+add_subdirectory(access)
+add_subdirectory(bearer)
+add_subdirectory(kernel)
+add_subdirectory(ssl)
+add_subdirectory(socket)
diff --git a/tests/auto/network/access/CMakeLists.txt b/tests/auto/network/access/CMakeLists.txt
new file mode 100644
index 0000000000..432c19ec81
--- /dev/null
+++ b/tests/auto/network/access/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from access.pro.
+
+add_subdirectory(qnetworkdiskcache)
+add_subdirectory(qnetworkcookiejar)
+add_subdirectory(qnetworkaccessmanager)
+add_subdirectory(qnetworkcookie)
+add_subdirectory(qnetworkrequest)
+add_subdirectory(qnetworkreply)
+add_subdirectory(qnetworkcachemetadata)
+add_subdirectory(qabstractnetworkcache)
+
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qhttpnetworkconnection)
+ add_subdirectory(qhttpnetworkreply)
+ add_subdirectory(hpack)
+ add_subdirectory(http2)
+ add_subdirectory(hsts)
+endif()
+if(QT_FEATURE_ftp AND QT_FEATURE_private_tests)
+ add_subdirectory(qftp)
+endif()
diff --git a/tests/auto/network/access/access.pro b/tests/auto/network/access/access.pro
index b140b5e9f2..b451a2ccc6 100644
--- a/tests/auto/network/access/access.pro
+++ b/tests/auto/network/access/access.pro
@@ -1,4 +1,6 @@
TEMPLATE=subdirs
+QT_FOR_CONFIG += network
+
SUBDIRS=\
qnetworkdiskcache \
qnetworkcookiejar \
@@ -7,9 +9,7 @@ SUBDIRS=\
qnetworkrequest \
qhttpnetworkconnection \
qnetworkreply \
- spdy \
qnetworkcachemetadata \
- qftp \
qhttpnetworkreply \
qabstractnetworkcache \
hpack \
@@ -19,7 +19,8 @@ SUBDIRS=\
!qtConfig(private_tests): SUBDIRS -= \
qhttpnetworkconnection \
qhttpnetworkreply \
- qftp \
hpack \
http2 \
hsts
+
+qtConfig(ftp): qtConfig(private_tests): SUBDIRS += qftp
diff --git a/tests/auto/network/access/hpack/CMakeLists.txt b/tests/auto/network/access/hpack/CMakeLists.txt
new file mode 100644
index 0000000000..e1c5c1a469
--- /dev/null
+++ b/tests/auto/network/access/hpack/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from hpack.pro.
+
+#####################################################################
+## tst_hpack Test:
+#####################################################################
+
+add_qt_test(tst_hpack
+ SOURCES
+ tst_hpack.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:hpack.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/network/access/hsts/CMakeLists.txt b/tests/auto/network/access/hsts/CMakeLists.txt
new file mode 100644
index 0000000000..804ebedf61
--- /dev/null
+++ b/tests/auto/network/access/hsts/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from hsts.pro.
+
+#####################################################################
+## tst_qhsts Test:
+#####################################################################
+
+add_qt_test(tst_qhsts
+ SOURCES
+ tst_qhsts.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:hsts.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/network/access/http2/CMakeLists.txt b/tests/auto/network/access/http2/CMakeLists.txt
new file mode 100644
index 0000000000..51c7c18eac
--- /dev/null
+++ b/tests/auto/network/access/http2/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from http2.pro.
+
+#####################################################################
+## tst_http2 Test:
+#####################################################################
+
+add_qt_test(tst_http2
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ http2srv.cpp http2srv.h
+ tst_http2.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+)
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index d4e967d2cb..38db74e52c 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -939,13 +939,6 @@ void tst_Http2::replyFinished()
QVERIFY(http2Used.isValid());
QVERIFY(http2Used.toBool());
- const QVariant spdyUsed(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute));
- if (!spdyUsed.isValid() || spdyUsed.toBool())
- stopEventLoop();
-
- QVERIFY(spdyUsed.isValid());
- QVERIFY(!spdyUsed.toBool());
-
const QVariant code(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute));
if (!code.isValid() || !code.canConvert<int>() || code.value<int>() != 200)
stopEventLoop();
diff --git a/tests/auto/network/access/qabstractnetworkcache/CMakeLists.txt b/tests/auto/network/access/qabstractnetworkcache/CMakeLists.txt
new file mode 100644
index 0000000000..07128e40bb
--- /dev/null
+++ b/tests/auto/network/access/qabstractnetworkcache/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qabstractnetworkcache.pro.
+
+#####################################################################
+## tst_qabstractnetworkcache Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ tests/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qabstractnetworkcache
+ SOURCES
+ tst_qabstractnetworkcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qabstractnetworkcache.pro:<TRUE>:
+# QT_TEST_SERVER_LIST = "apache2"
diff --git a/tests/auto/network/access/qftp/CMakeLists.txt b/tests/auto/network/access/qftp/CMakeLists.txt
new file mode 100644
index 0000000000..877c3a229b
--- /dev/null
+++ b/tests/auto/network/access/qftp/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qftp.pro.
+
+if(NOT QT_FEATURE_ftp)
+ return()
+endif()
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qftp Test:
+#####################################################################
+
+add_qt_test(tst_qftp
+ SOURCES
+ tst_qftp.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qftp.pro:<TRUE>:
+# QT_FOR_CONFIG = "network"
+# QT_TEST_SERVER_LIST = "vsftpd" "ftp-proxy" "squid" "danted"
+# _REQUIREMENTS = "qtConfig(ftp)" "qtConfig(private_tests)"
diff --git a/tests/auto/network/access/qftp/qftp.pro b/tests/auto/network/access/qftp/qftp.pro
index c78020c5f8..ad610316df 100644
--- a/tests/auto/network/access/qftp/qftp.pro
+++ b/tests/auto/network/access/qftp/qftp.pro
@@ -1,7 +1,9 @@
CONFIG += testcase
TARGET = tst_qftp
SOURCES += tst_qftp.cpp
+QT_FOR_CONFIG += network
+requires(qtConfig(ftp))
requires(qtConfig(private_tests))
QT = core network network-private testlib
diff --git a/tests/auto/network/access/qhttpnetworkconnection/CMakeLists.txt b/tests/auto/network/access/qhttpnetworkconnection/CMakeLists.txt
new file mode 100644
index 0000000000..6ab8876c82
--- /dev/null
+++ b/tests/auto/network/access/qhttpnetworkconnection/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qhttpnetworkconnection.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qhttpnetworkconnection Test:
+#####################################################################
+
+add_qt_test(tst_qhttpnetworkconnection
+ SOURCES
+ tst_qhttpnetworkconnection.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qhttpnetworkconnection.pro:<TRUE>:
+# QT_TEST_SERVER_LIST = "apache2"
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt b/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt
new file mode 100644
index 0000000000..8c68a18da6
--- /dev/null
+++ b/tests/auto/network/access/qhttpnetworkreply/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qhttpnetworkreply.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qhttpnetworkreply Test:
+#####################################################################
+
+add_qt_test(tst_qhttpnetworkreply
+ SOURCES
+ tst_qhttpnetworkreply.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qhttpnetworkreply.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/network/access/qnetworkaccessmanager/CMakeLists.txt b/tests/auto/network/access/qnetworkaccessmanager/CMakeLists.txt
new file mode 100644
index 0000000000..4b58c449c6
--- /dev/null
+++ b/tests/auto/network/access/qnetworkaccessmanager/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkaccessmanager.pro.
+
+#####################################################################
+## tst_qnetworkaccessmanager Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkaccessmanager
+ SOURCES
+ tst_qnetworkaccessmanager.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/access/qnetworkcachemetadata/CMakeLists.txt b/tests/auto/network/access/qnetworkcachemetadata/CMakeLists.txt
new file mode 100644
index 0000000000..08e80d8e0d
--- /dev/null
+++ b/tests/auto/network/access/qnetworkcachemetadata/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkcachemetadata.pro.
+
+#####################################################################
+## tst_qnetworkcachemetadata Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkcachemetadata
+ SOURCES
+ tst_qnetworkcachemetadata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/access/qnetworkcookie/CMakeLists.txt b/tests/auto/network/access/qnetworkcookie/CMakeLists.txt
new file mode 100644
index 0000000000..ab90a61bb3
--- /dev/null
+++ b/tests/auto/network/access/qnetworkcookie/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkcookie.pro.
+
+#####################################################################
+## tst_qnetworkcookie Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkcookie
+ SOURCES
+ tst_qnetworkcookie.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/access/qnetworkcookiejar/CMakeLists.txt b/tests/auto/network/access/qnetworkcookiejar/CMakeLists.txt
new file mode 100644
index 0000000000..929388a10a
--- /dev/null
+++ b/tests/auto/network/access/qnetworkcookiejar/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qnetworkcookiejar.pro.
+
+#####################################################################
+## tst_qnetworkcookiejar Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "parser.json")
+
+add_qt_test(tst_qnetworkcookiejar
+ SOURCES
+ tst_qnetworkcookiejar.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/network/access/qnetworkdiskcache/CMakeLists.txt b/tests/auto/network/access/qnetworkdiskcache/CMakeLists.txt
new file mode 100644
index 0000000000..b206686139
--- /dev/null
+++ b/tests/auto/network/access/qnetworkdiskcache/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkdiskcache.pro.
+
+#####################################################################
+## tst_qnetworkdiskcache Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkdiskcache
+ SOURCES
+ tst_qnetworkdiskcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST
index 801ac65d71..a2c6224ce0 100644
--- a/tests/auto/network/access/qnetworkreply/BLACKLIST
+++ b/tests/auto/network/access/qnetworkreply/BLACKLIST
@@ -15,8 +15,6 @@ linux
# QTBUG-71953
[getFromHttp]
* !android !winrt
-[getFromHttp:success-external]
-*
[getFromHttpIntoBuffer]
osx
[getFromHttpIntoBuffer2]
diff --git a/tests/auto/network/access/qnetworkreply/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/CMakeLists.txt
new file mode 100644
index 0000000000..f7efa8f7f3
--- /dev/null
+++ b/tests/auto/network/access/qnetworkreply/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from qnetworkreply.pro.
+
+add_subdirectory(test)
+
+if(NOT WINRT)
+ add_subdirectory(echo)
+endif()
diff --git a/tests/auto/network/access/qnetworkreply/echo/.prev_CMakeLists.txt b/tests/auto/network/access/qnetworkreply/echo/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..e43272d7e8
--- /dev/null
+++ b/tests/auto/network/access/qnetworkreply/echo/.prev_CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from echo.pro.
+
+#####################################################################
+## echo Binary:
+#####################################################################
+
+add_qt_executable(echo
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt
new file mode 100644
index 0000000000..f260b97b8d
--- /dev/null
+++ b/tests/auto/network/access/qnetworkreply/echo/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from echo.pro.
+
+#####################################################################
+## echo Binary:
+#####################################################################
+
+add_qt_executable(echo
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt
new file mode 100644
index 0000000000..ef017edf58
--- /dev/null
+++ b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt
@@ -0,0 +1,60 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qnetworkreply Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../empty")
+list(APPEND test_data "../rfc3252.txt")
+list(APPEND test_data "../resource")
+list(APPEND test_data "../bigfile")
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ../*.jpg)
+list(APPEND test_data ${test_data_glob})
+list(APPEND test_data "../certs")
+list(APPEND test_data "../index.html")
+list(APPEND test_data "../smb-file.txt")
+
+add_qt_test(tst_qnetworkreply
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ ../../../../../shared/emulationdetector.h
+ ../tst_qnetworkreply.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set_source_files_properties("../resource"
+ PROPERTIES QT_RESOURCE_ALIAS "resource"
+)
+set(qnetworkreply_resource_files
+ "resource"
+)
+
+add_qt_resource(tst_qnetworkreply "qnetworkreply"
+ PREFIX
+ "/"
+ BASE
+ ".."
+ FILES
+ ${qnetworkreply_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:test.pro:<TRUE>:
+# QT_FOR_CONFIG = "gui-private"
+# QT_TEST_SERVER_LIST = "vsftpd" "apache2" "ftp-proxy" "danted" "squid"
+# testcase.timeout = "600"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../echo/echo"
diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro
index 4cc1f6431e..d3385c1929 100644
--- a/tests/auto/network/access/qnetworkreply/test/test.pro
+++ b/tests/auto/network/access/qnetworkreply/test/test.pro
@@ -4,7 +4,7 @@ CONFIG -= debug_and_release_target
INCLUDEPATH += ../../../../../shared/
HEADERS += ../../../../../shared/emulationdetector.h
SOURCES += ../tst_qnetworkreply.cpp
-TARGET = ../tst_qnetworkreply
+TARGET = tst_qnetworkreply
QT = core-private network-private testlib
QT_FOR_CONFIG += gui-private
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 1494ebbcd8..5ddcc5ae37 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -219,9 +219,11 @@ private Q_SLOTS:
void getFromFile();
void getFromFileSpecial_data();
void getFromFileSpecial();
+#if QT_CONFIG(ftp)
void getFromFtp_data();
void getFromFtp();
void getFromFtpAfterError(); // QTBUG-40797
+#endif
void getFromHttp_data();
void getFromHttp();
void getErrors_data();
@@ -232,9 +234,11 @@ private Q_SLOTS:
#endif // !QT_NO_NETWORKPROXY
void putToFile_data();
void putToFile();
+#if QT_CONFIG(ftp)
void putToFtp_data();
void putToFtp();
void putToFtpWithInvalidCredentials(); // QTBUG-40622
+#endif
void putToHttp_data();
void putToHttp();
void putToHttpSynchronous_data();
@@ -275,9 +279,11 @@ private Q_SLOTS:
void ioGetFromFileSpecial();
void ioGetFromFile_data();
void ioGetFromFile();
+#if QT_CONFIG(ftp)
void ioGetFromFtp_data();
void ioGetFromFtp();
void ioGetFromFtpWithReuse();
+#endif
void ioGetFromHttp();
void ioGetFromBuiltinHttp_data();
@@ -319,8 +325,10 @@ private Q_SLOTS:
void ioPutToFileFromLocalSocket();
void ioPutToFileFromProcess_data();
void ioPutToFileFromProcess();
+#if QT_CONFIG(ftp)
void ioPutToFtpFromFile_data();
void ioPutToFtpFromFile();
+#endif
void ioPutToHttpFromFile_data();
void ioPutToHttpFromFile();
void ioPostToHttpFromFile_data();
@@ -466,8 +474,10 @@ private Q_SLOTS:
void closeDuringDownload_data();
void closeDuringDownload();
+#if QT_CONFIG(ftp)
void ftpAuthentication_data();
void ftpAuthentication();
+#endif
void emitErrorForAllReplies(); // QTBUG-36890
@@ -1852,6 +1862,7 @@ void tst_QNetworkReply::getFromFileSpecial()
QCOMPARE(reply->readAll(), resource.readAll());
}
+#if QT_CONFIG(ftp)
void tst_QNetworkReply::getFromFtp_data()
{
QTest::addColumn<QString>("referenceName");
@@ -1904,6 +1915,7 @@ void tst_QNetworkReply::getFromFtpAfterError()
QCOMPARE(validReply->header(QNetworkRequest::ContentLengthHeader).toLongLong(), reference.size());
QCOMPARE(validReply->readAll(), reference.readAll());
}
+#endif
void tst_QNetworkReply::getFromHttp_data()
{
@@ -1914,10 +1926,6 @@ void tst_QNetworkReply::getFromHttp_data()
<< testDataDir + "/rfc3252.txt"
<< "http://" + QtNetworkSettings::httpServerName() + "/qtest/rfc3252.txt";
- QTest::newRow("success-external")
- << testDataDir + "/rfc3252.txt"
- << "http://www.ietf.org/rfc/rfc3252.txt";
-
QTest::newRow("bigfile-internal")
<< testDataDir + "/bigfile"
<< "http://" + QtNetworkSettings::httpServerName() + "/qtest/bigfile";
@@ -2077,6 +2085,7 @@ void tst_QNetworkReply::getErrors_data()
QTest::newRow("file-permissions") << "file:" + filePermissionFileName
<< int(QNetworkReply::ContentAccessDenied) << 0 << true;
+#if QT_CONFIG(ftp)
// ftp: errors
QTest::newRow("ftp-host") << "ftp://invalid.test.qt-project.org/foo.txt"
<< int(QNetworkReply::HostNotFoundError) << 0 << true;
@@ -2090,6 +2099,7 @@ void tst_QNetworkReply::getErrors_data()
<< int(QNetworkReply::ContentAccessDenied) << 0 << true;
QTest::newRow("ftp-exist") << "ftp://" + QtNetworkSettings::ftpServerName() + "/pub/this-file-doesnt-exist.txt"
<< int(QNetworkReply::ContentNotFoundError) << 0 << true;
+#endif
// http: errors
QTest::newRow("http-host") << "http://invalid.test.qt-project.org/"
@@ -2143,9 +2153,11 @@ void tst_QNetworkReply::getErrors()
QVERIFY2(waitResult != Timeout, msgGetErrors(waitResult, reply));
QFETCH(int, error);
+#if QT_CONFIG(ftp)
QEXPECT_FAIL("ftp-is-dir", "QFtp cannot provide enough detail", Abort);
// the line below is not necessary
QEXPECT_FAIL("ftp-dir-not-readable", "QFtp cannot provide enough detail", Abort);
+#endif
QCOMPARE(reply->networkError(), QNetworkReply::NetworkError(error));
QTEST(reply->readAll().isEmpty(), "dataIsEmpty");
@@ -2215,6 +2227,7 @@ void tst_QNetworkReply::putToFile()
QCOMPARE(contents, data);
}
+#if QT_CONFIG(ftp)
void tst_QNetworkReply::putToFtp_data()
{
putToFile_data();
@@ -2287,6 +2300,7 @@ void tst_QNetworkReply::putToFtpWithInvalidCredentials()
r->close();
}
}
+#endif
void tst_QNetworkReply::putToHttp_data()
{
@@ -3287,6 +3301,7 @@ void tst_QNetworkReply::ioGetFromFile()
QCOMPARE(reader.data, data);
}
+#if QT_CONFIG(ftp)
void tst_QNetworkReply::ioGetFromFtp_data()
{
QTest::addColumn<QString>("fileName");
@@ -3353,6 +3368,7 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse()
QCOMPARE(reader1.data, referenceData);
QCOMPARE(reader2.data, referenceData);
}
+#endif
void tst_QNetworkReply::ioGetFromHttp()
{
@@ -4209,6 +4225,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< "http://" + QtNetworkSettings::httpServerName() + "/qtest/rfc3252.txt"
<< QNetworkReply::NoError;
+#if QT_CONFIG(ftp)
// FTP request with FTP caching proxy
proxyList.clear();
proxyList << QNetworkProxy(QNetworkProxy::FtpCachingProxy, QtNetworkSettings::ftpProxyServerName(), 2121);
@@ -4227,6 +4244,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< proxyList << proxyList.at(0)
<< "ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/rfc3252.txt"
<< QNetworkReply::NoError;
+#endif
#ifndef QT_NO_SSL
// HTTPS with HTTP transparent proxy
@@ -4256,6 +4274,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< "http://" + QtNetworkSettings::httpServerName() + "/qtest/rfc3252.txt"
<< QNetworkReply::ProxyNotFoundError;
+#if QT_CONFIG(ftp)
// FTP request with HTTP caching proxy
proxyList.clear();
proxyList << QNetworkProxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::httpProxyServerName(), 3129);
@@ -4272,6 +4291,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< proxyList << QNetworkProxy()
<< "ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/rfc3252.txt"
<< QNetworkReply::ProxyNotFoundError;
+#endif
#ifndef QT_NO_SSL
// HTTPS with HTTP caching proxy
@@ -4339,6 +4359,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< "http://" + QtNetworkSettings::httpServerName() + "/qtest/rfc3252.txt"
<< QNetworkReply::NoError;
+#if QT_CONFIG(ftp)
// FTP request with HTTP Caching + FTP
proxyList.clear();
proxyList << QNetworkProxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::httpProxyServerName(), 3129)
@@ -4347,6 +4368,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< proxyList << proxyList.at(1) // second proxy should be used
<< "ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/rfc3252.txt"
<< QNetworkReply::NoError;
+#endif
#ifndef QT_NO_SSL
// HTTPS request with HTTP Caching + HTTP transparent
@@ -4407,7 +4429,9 @@ void tst_QNetworkReply::ioGetWithManyProxies()
#endif
QFETCH(QNetworkReply::NetworkError, expectedError);
+#if QT_CONFIG(ftp)
QEXPECT_FAIL("ftp-on-socks", "QFtp is too limited and won't accept non-FTP proxies", Abort);
+#endif
QCOMPARE(reply->networkError(), expectedError);
// Verify that the factory was called properly
@@ -4423,8 +4447,10 @@ void tst_QNetworkReply::ioGetWithManyProxies()
if (proxyUsed.type() == QNetworkProxy::NoProxy) {
QCOMPARE(authspy.count(), 0);
} else {
+#if QT_CONFIG(ftp)
if (QByteArray(QTest::currentDataTag()).startsWith("ftp-"))
return; // No authentication with current FTP or with FTP proxies
+#endif
QCOMPARE(authspy.count(), 1);
QCOMPARE(qvariant_cast<QNetworkProxy>(authspy.at(0).at(0)), proxyUsed);
}
@@ -4605,6 +4631,7 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
#endif // QT_CONFIG(process)
}
+#if QT_CONFIG(ftp)
void tst_QNetworkReply::ioPutToFtpFromFile_data()
{
ioPutToFileFromFile_data();
@@ -4653,6 +4680,7 @@ void tst_QNetworkReply::ioPutToFtpFromFile()
QTestEventLoop::instance().enterLoop(10);
QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
}
+#endif
void tst_QNetworkReply::ioPutToHttpFromFile_data()
{
@@ -8020,7 +8048,9 @@ void tst_QNetworkReply::closeDuringDownload_data()
{
QTest::addColumn<QUrl>("url");
QTest::newRow("http") << QUrl("http://" + QtNetworkSettings::httpServerName() + "/bigfile");
+#if QT_CONFIG(ftp)
QTest::newRow("ftp") << QUrl("ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/bigfile");
+#endif
}
void tst_QNetworkReply::closeDuringDownload()
@@ -8038,6 +8068,7 @@ void tst_QNetworkReply::closeDuringDownload()
QVERIFY(destroySpy.wait());
}
+#if QT_CONFIG(ftp)
void tst_QNetworkReply::ftpAuthentication_data()
{
QTest::addColumn<QString>("referenceName");
@@ -8064,6 +8095,7 @@ void tst_QNetworkReply::ftpAuthentication()
QCOMPARE(reply->url(), request.url());
QCOMPARE(reply->networkError(), QNetworkReply::NetworkError(error));
}
+#endif
void tst_QNetworkReply::emitErrorForAllReplies() // QTBUG-36890
{
@@ -8107,7 +8139,9 @@ void tst_QNetworkReply::backgroundRequest_data()
QUrl httpurl("http://" + QtNetworkSettings::httpServerName());
QUrl httpsurl("https://" + QtNetworkSettings::httpServerName());
+#if QT_CONFIG(ftp)
QUrl ftpurl("ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/rfc3252.txt");
+#endif
QTest::newRow("http, fg, normal") << httpurl << false << (int)QNetworkSession::NoPolicy << QNetworkReply::NoError;
QTest::newRow("http, bg, normal") << httpurl << true << (int)QNetworkSession::NoPolicy << QNetworkReply::NoError;
@@ -8121,10 +8155,12 @@ void tst_QNetworkReply::backgroundRequest_data()
QTest::newRow("https, bg, nobg") << httpsurl << true << (int)QNetworkSession::NoBackgroundTrafficPolicy << QNetworkReply::BackgroundRequestNotAllowedError;
#endif
+#if QT_CONFIG(ftp)
QTest::newRow("ftp, fg, normal") << ftpurl << false << (int)QNetworkSession::NoPolicy << QNetworkReply::NoError;
QTest::newRow("ftp, bg, normal") << ftpurl << true << (int)QNetworkSession::NoPolicy << QNetworkReply::NoError;
QTest::newRow("ftp, fg, nobg") << ftpurl << false << (int)QNetworkSession::NoBackgroundTrafficPolicy << QNetworkReply::NoError;
QTest::newRow("ftp, bg, nobg") << ftpurl << true << (int)QNetworkSession::NoBackgroundTrafficPolicy << QNetworkReply::BackgroundRequestNotAllowedError;
+#endif
#endif // !QT_NO_BEARERMANAGEMENT
}
#endif
@@ -8179,7 +8215,9 @@ void tst_QNetworkReply::backgroundRequestInterruption_data()
QUrl httpurl("http://" + QtNetworkSettings::httpServerName() + "/qtest/mediumfile");
QUrl httpsurl("https://" + QtNetworkSettings::httpServerName() + "/qtest/mediumfile");
+#if QT_CONFIG(ftp)
QUrl ftpurl("ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/bigfile");
+#endif
QTest::newRow("http, fg, nobg") << httpurl << false << QNetworkReply::NoError;
QTest::newRow("http, bg, nobg") << httpurl << true << QNetworkReply::BackgroundRequestNotAllowedError;
@@ -8189,9 +8227,10 @@ void tst_QNetworkReply::backgroundRequestInterruption_data()
QTest::newRow("https, bg, nobg") << httpsurl << true << QNetworkReply::BackgroundRequestNotAllowedError;
#endif
+#if QT_CONFIG(ftp)
QTest::newRow("ftp, fg, nobg") << ftpurl << false << QNetworkReply::NoError;
QTest::newRow("ftp, bg, nobg") << ftpurl << true << QNetworkReply::BackgroundRequestNotAllowedError;
-
+#endif
}
#endif
@@ -8255,13 +8294,17 @@ void tst_QNetworkReply::backgroundRequestConnectInBackground_data()
QTest::addColumn<bool>("background");
QUrl httpurl("http://" + QtNetworkSettings::httpServerName());
+#if QT_CONFIG(ftp)
QUrl ftpurl("ftp://" + QtNetworkSettings::ftpServerName() + "/qtest/rfc3252.txt");
+#endif
QTest::newRow("http, fg") << httpurl << false;
QTest::newRow("http, bg") << httpurl << true;
+#if QT_CONFIG(ftp)
QTest::newRow("ftp, fg") << ftpurl << false;
QTest::newRow("ftp, bg") << ftpurl << true;
+#endif
}
#endif
@@ -9187,7 +9230,9 @@ void tst_QNetworkReply::autoDeleteRepliesAttribute_data()
QTest::newRow("http") << QUrl("http://QInvalidDomain.qt/test");
QTest::newRow("https") << QUrl("https://QInvalidDomain.qt/test");
+#if QT_CONFIG(ftp)
QTest::newRow("ftp") << QUrl("ftp://QInvalidDomain.qt/test");
+#endif
QTest::newRow("file") << QUrl("file:///thisfolderdoesn'texist/probably.txt");
#ifdef Q_OS_WIN
// Only supported on windows.
diff --git a/tests/auto/network/access/qnetworkrequest/CMakeLists.txt b/tests/auto/network/access/qnetworkrequest/CMakeLists.txt
new file mode 100644
index 0000000000..f089c5a43e
--- /dev/null
+++ b/tests/auto/network/access/qnetworkrequest/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkrequest.pro.
+
+#####################################################################
+## tst_qnetworkrequest Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkrequest
+ SOURCES
+ tst_qnetworkrequest.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/access/spdy/BLACKLIST b/tests/auto/network/access/spdy/BLACKLIST
deleted file mode 100644
index 5cf79327be..0000000000
--- a/tests/auto/network/access/spdy/BLACKLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-[download]
-opensuse-leap
-[upload]
-opensuse-leap
-ubuntu-18.04
-b2qt
-
diff --git a/tests/auto/network/access/spdy/spdy.pro b/tests/auto/network/access/spdy/spdy.pro
deleted file mode 100644
index cdbe60a19b..0000000000
--- a/tests/auto/network/access/spdy/spdy.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG += testcase
-TARGET = tst_spdy
-SOURCES += tst_spdy.cpp
-
-QT = core core-private network network-private testlib
-
-win32:CONFIG += insignificant_test # QTBUG-47128
diff --git a/tests/auto/network/access/spdy/tst_spdy.cpp b/tests/auto/network/access/spdy/tst_spdy.cpp
deleted file mode 100644
index 66aee8cdcd..0000000000
--- a/tests/auto/network/access/spdy/tst_spdy.cpp
+++ /dev/null
@@ -1,694 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-#include <QtNetwork/QNetworkAccessManager>
-#include <QtNetwork/QNetworkReply>
-#include <QtNetwork/QHttpPart>
-#include <QtNetwork/QHttpMultiPart>
-#include <QtNetwork/QNetworkProxy>
-#include <QtNetwork/QAuthenticator>
-#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_OPENSSL)
-#include <QtNetwork/private/qsslsocket_openssl_p.h>
-#endif // QT_BUILD_INTERNAL && !QT_NO_OPENSSL
-
-#include "../../../network-settings.h"
-
-Q_DECLARE_METATYPE(QAuthenticator*)
-
-class tst_Spdy: public QObject
-{
- Q_OBJECT
-
-public:
- tst_Spdy();
- ~tst_Spdy();
-
-private Q_SLOTS:
- void initTestCase();
- void settingsAndNegotiation_data();
- void settingsAndNegotiation();
-#ifndef QT_NO_NETWORKPROXY
- void download_data();
- void download();
-#endif // !QT_NO_NETWORKPROXY
- void headerFields();
-#ifndef QT_NO_NETWORKPROXY
- void upload_data();
- void upload();
- void errors_data();
- void errors();
-#endif // !QT_NO_NETWORKPROXY
- void multipleRequests_data();
- void multipleRequests();
-
-private:
- QNetworkAccessManager m_manager;
- int m_multipleRequestsCount;
- int m_multipleRepliesFinishedCount;
- const QString m_rfc3252FilePath;
-
-protected Q_SLOTS:
- void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *authenticator);
- void multipleRequestsFinishedSlot();
-};
-
-tst_Spdy::tst_Spdy()
- : m_rfc3252FilePath(QFINDTESTDATA("../qnetworkreply/rfc3252.txt"))
-{
-#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
- qRegisterMetaType<QNetworkReply *>(); // for QSignalSpy
- qRegisterMetaType<QAuthenticator *>();
-
- connect(&m_manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)),
- this, SLOT(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
-#else
- QSKIP("Qt built withouth OpenSSL, or the OpenSSL version is too old");
-#endif // defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ...
-}
-
-tst_Spdy::~tst_Spdy()
-{
-}
-
-void tst_Spdy::initTestCase()
-{
- QVERIFY(!m_rfc3252FilePath.isEmpty());
- if (!QtNetworkSettings::verifyTestNetworkSettings())
- QSKIP("No network test server available");
-}
-
-void tst_Spdy::settingsAndNegotiation_data()
-{
- QTest::addColumn<QUrl>("url");
- QTest::addColumn<bool>("setAttribute");
- QTest::addColumn<bool>("enabled");
- QTest::addColumn<QByteArray>("expectedProtocol");
- QTest::addColumn<QByteArray>("expectedContent");
-
- QTest::newRow("default-settings") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/cgi-bin/echo.cgi?1")
- << false << false << QByteArray()
- << QByteArray("1");
-
- QTest::newRow("http-url") << QUrl("http://" + QtNetworkSettings::serverName()
- + "/qtest/cgi-bin/echo.cgi?1")
- << true << true << QByteArray()
- << QByteArray("1");
-
- QTest::newRow("spdy-disabled") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/cgi-bin/echo.cgi?1")
- << true << false << QByteArray()
- << QByteArray("1");
-
-#ifndef QT_NO_OPENSSL
- QTest::newRow("spdy-enabled") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/cgi-bin/echo.cgi?1")
- << true << true << QByteArray(QSslConfiguration::NextProtocolSpdy3_0)
- << QByteArray("1");
-#endif // QT_NO_OPENSSL
-}
-
-void tst_Spdy::settingsAndNegotiation()
-{
- QFETCH(QUrl, url);
- QFETCH(bool, setAttribute);
- QFETCH(bool, enabled);
-
- QNetworkRequest request(url);
-
- if (setAttribute) {
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, QVariant(enabled));
- }
-
- QNetworkReply *reply = m_manager.get(request);
- reply->ignoreSslErrors();
- QSignalSpy metaDataChangedSpy(reply, SIGNAL(metaDataChanged()));
- QSignalSpy readyReadSpy(reply, SIGNAL(readyRead()));
- QSignalSpy finishedSpy(reply, SIGNAL(finished()));
-
- QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QSignalSpy finishedManagerSpy(&m_manager, SIGNAL(finished(QNetworkReply*)));
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QFETCH(QByteArray, expectedProtocol);
-
-#ifndef QT_NO_OPENSSL
- bool expectedSpdyUsed = (expectedProtocol == QSslConfiguration::NextProtocolSpdy3_0);
- QCOMPARE(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(), expectedSpdyUsed);
-#endif // QT_NO_OPENSSL
-
- QCOMPARE(metaDataChangedSpy.count(), 1);
- QCOMPARE(finishedSpy.count(), 1);
-
- int statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
- QCOMPARE(statusCode, 200);
-
- QByteArray content = reply->readAll();
-
- QFETCH(QByteArray, expectedContent);
- QCOMPARE(expectedContent, content);
-
-#ifndef QT_NO_OPENSSL
- QSslConfiguration::NextProtocolNegotiationStatus expectedStatus =
- (expectedProtocol.isEmpty())
- ? QSslConfiguration::NextProtocolNegotiationNone
- : QSslConfiguration::NextProtocolNegotiationNegotiated;
- QCOMPARE(reply->sslConfiguration().nextProtocolNegotiationStatus(),
- expectedStatus);
-
- QCOMPARE(reply->sslConfiguration().nextNegotiatedProtocol(), expectedProtocol);
-#endif // QT_NO_OPENSSL
-}
-
-void tst_Spdy::proxyAuthenticationRequired(const QNetworkProxy &/*proxy*/,
- QAuthenticator *authenticator)
-{
- authenticator->setUser("qsockstest");
- authenticator->setPassword("password");
-}
-
-#ifndef QT_NO_NETWORKPROXY
-void tst_Spdy::download_data()
-{
- QTest::addColumn<QUrl>("url");
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<QNetworkProxy>("proxy");
-
- QTest::newRow("mediumfile") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/rfc3252.txt")
- << m_rfc3252FilePath
- << QNetworkProxy();
-
- QHostInfo hostInfo = QHostInfo::fromName(QtNetworkSettings::serverName());
- QString proxyserver = hostInfo.addresses().first().toString();
-
- QTest::newRow("mediumfile-http-proxy") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/rfc3252.txt")
- << m_rfc3252FilePath
- << QNetworkProxy(QNetworkProxy::HttpProxy, proxyserver, 3128);
-
- QTest::newRow("mediumfile-http-proxy-auth") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/rfc3252.txt")
- << m_rfc3252FilePath
- << QNetworkProxy(QNetworkProxy::HttpProxy,
- proxyserver, 3129);
-
- QTest::newRow("mediumfile-socks-proxy") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/rfc3252.txt")
- << m_rfc3252FilePath
- << QNetworkProxy(QNetworkProxy::Socks5Proxy, proxyserver, 1080);
-
- QTest::newRow("mediumfile-socks-proxy-auth") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/rfc3252.txt")
- << m_rfc3252FilePath
- << QNetworkProxy(QNetworkProxy::Socks5Proxy,
- proxyserver, 1081);
-
- QTest::newRow("bigfile") << QUrl("https://" + QtNetworkSettings::serverName()
- + "/qtest/bigfile")
- << QFINDTESTDATA("../qnetworkreply/bigfile")
- << QNetworkProxy();
-}
-
-void tst_Spdy::download()
-{
- QFETCH(QUrl, url);
- QFETCH(QString, fileName);
- QFETCH(QNetworkProxy, proxy);
-
- QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
-
- if (proxy.type() != QNetworkProxy::DefaultProxy) {
- m_manager.setProxy(proxy);
- }
- QNetworkReply *reply = m_manager.get(request);
- reply->ignoreSslErrors();
- QSignalSpy metaDataChangedSpy(reply, SIGNAL(metaDataChanged()));
- QSignalSpy downloadProgressSpy(reply, SIGNAL(downloadProgress(qint64, qint64)));
- QSignalSpy readyReadSpy(reply, SIGNAL(readyRead()));
- QSignalSpy finishedSpy(reply, SIGNAL(finished()));
-
- QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QSignalSpy finishedManagerSpy(&m_manager, SIGNAL(finished(QNetworkReply*)));
- QSignalSpy proxyAuthRequiredSpy(&m_manager, SIGNAL(
- proxyAuthenticationRequired(const QNetworkProxy &,
- QAuthenticator *)));
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(finishedManagerSpy.count(), 1);
- QCOMPARE(metaDataChangedSpy.count(), 1);
- QCOMPARE(finishedSpy.count(), 1);
- QVERIFY(downloadProgressSpy.count() > 0);
- QVERIFY(readyReadSpy.count() > 0);
-
- QVERIFY(proxyAuthRequiredSpy.count() <= 1);
-
- QCOMPARE(reply->networkError(), QNetworkReply::NoError);
- QCOMPARE(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(), true);
- QCOMPARE(reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool(), true);
- QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
-
- QFile file(fileName);
- QVERIFY(file.open(QIODevice::ReadOnly));
-
- qint64 contentLength = reply->header(QNetworkRequest::ContentLengthHeader).toLongLong();
- qint64 expectedContentLength = file.bytesAvailable();
- QCOMPARE(contentLength, expectedContentLength);
-
- QByteArray expectedContent = file.readAll();
- QByteArray content = reply->readAll();
- QCOMPARE(content, expectedContent);
-
- reply->deleteLater();
- m_manager.setProxy(QNetworkProxy()); // reset
-}
-#endif // !QT_NO_NETWORKPROXY
-
-void tst_Spdy::headerFields()
-{
- QUrl url(QUrl("https://" + QtNetworkSettings::serverName()));
- QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
-
- QNetworkReply *reply = m_manager.get(request);
- reply->ignoreSslErrors();
-
- QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(reply->rawHeader("Content-Type"), QByteArray("text/html"));
- QVERIFY(reply->rawHeader("Content-Length").toInt() > 0);
- QVERIFY(reply->rawHeader("server").contains("Apache"));
-
- QCOMPARE(reply->header(QNetworkRequest::ContentTypeHeader).toByteArray(), QByteArray("text/html"));
- QVERIFY(reply->header(QNetworkRequest::ContentLengthHeader).toLongLong() > 0);
- QVERIFY(reply->header(QNetworkRequest::LastModifiedHeader).toDateTime().isValid());
- QVERIFY(reply->header(QNetworkRequest::ServerHeader).toByteArray().contains("Apache"));
-}
-
-static inline QByteArray md5sum(const QByteArray &data)
-{
- return QCryptographicHash::hash(data, QCryptographicHash::Md5).toHex().append('\n');
-}
-
-#ifndef QT_NO_NETWORKPROXY
-void tst_Spdy::upload_data()
-{
- QTest::addColumn<QUrl>("url");
- QTest::addColumn<QByteArray>("data");
- QTest::addColumn<QByteArray>("uploadMethod");
- QTest::addColumn<QObject *>("uploadObject");
- QTest::addColumn<QByteArray>("md5sum");
- QTest::addColumn<QNetworkProxy>("proxy");
-
-
- // 1. test uploading of byte arrays
-
- QUrl md5Url("https://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/md5sum.cgi");
-
- QByteArray data;
- data = "";
- QObject *dummyObject = 0;
- QTest::newRow("empty") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
- data = "This is a normal message.";
- QTest::newRow("generic") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
- data = "This is a message to show that Qt rocks!\r\n\n";
- QTest::newRow("small") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
- data = QByteArray("abcd\0\1\2\abcd",12);
- QTest::newRow("with-nul") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
- data = QByteArray(4097, '\4');
- QTest::newRow("4k+1") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data)<< QNetworkProxy();
-
- QHostInfo hostInfo = QHostInfo::fromName(QtNetworkSettings::serverName());
- QString proxyserver = hostInfo.addresses().first().toString();
-
- QTest::newRow("4k+1-with-http-proxy") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data)
- << QNetworkProxy(QNetworkProxy::HttpProxy, proxyserver, 3128);
-
- QTest::newRow("4k+1-with-http-proxy-auth") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data)
- << QNetworkProxy(QNetworkProxy::HttpProxy,
- proxyserver, 3129);
-
- QTest::newRow("4k+1-with-socks-proxy") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data)
- << QNetworkProxy(QNetworkProxy::Socks5Proxy, proxyserver, 1080);
-
- QTest::newRow("4k+1-with-socks-proxy-auth") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data)
- << QNetworkProxy(QNetworkProxy::Socks5Proxy,
- proxyserver, 1081);
-
- data = QByteArray(128*1024+1, '\177');
- QTest::newRow("128k+1") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
- data = QByteArray(128*1024+1, '\177');
- QTest::newRow("128k+1-put") << md5Url << data << QByteArray("PUT") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
- data = QByteArray(2*1024*1024+1, '\177');
- QTest::newRow("2MB+1") << md5Url << data << QByteArray("POST") << dummyObject
- << md5sum(data) << QNetworkProxy();
-
-
- // 2. test uploading of files
-
- QFile *file = new QFile(m_rfc3252FilePath);
- file->open(QIODevice::ReadOnly);
- QTest::newRow("file-26K") << md5Url << QByteArray() << QByteArray("POST")
- << static_cast<QObject *>(file)
- << QByteArray("b3e32ac459b99d3f59318f3ac31e4bee\n") << QNetworkProxy();
-
- QFile *file2 = new QFile(QFINDTESTDATA("../qnetworkreply/image1.jpg"));
- file2->open(QIODevice::ReadOnly);
- QTest::newRow("file-1MB") << md5Url << QByteArray() << QByteArray("POST")
- << static_cast<QObject *>(file2)
- << QByteArray("87ef3bb319b004ba9e5e9c9fa713776e\n") << QNetworkProxy();
-
-
- // 3. test uploading of multipart
-
- QUrl multiPartUrl("https://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/multipart.cgi");
-
- QHttpPart imagePart31;
- imagePart31.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
- imagePart31.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage1\""));
- imagePart31.setRawHeader("Content-Location", "http://my.test.location.tld");
- imagePart31.setRawHeader("Content-ID", "my@id.tld");
- QFile *file31 = new QFile(QFINDTESTDATA("../qnetworkreply/image1.jpg"));
- file31->open(QIODevice::ReadOnly);
- imagePart31.setBodyDevice(file31);
- QHttpMultiPart *imageMultiPart3 = new QHttpMultiPart(QHttpMultiPart::FormDataType);
- imageMultiPart3->append(imagePart31);
- file31->setParent(imageMultiPart3);
- QHttpPart imagePart32;
- imagePart32.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
- imagePart32.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage2\""));
- QFile *file32 = new QFile(QFINDTESTDATA("../qnetworkreply/image2.jpg"));
- file32->open(QIODevice::ReadOnly);
- imagePart32.setBodyDevice(file31); // check that resetting works
- imagePart32.setBodyDevice(file32);
- imageMultiPart3->append(imagePart32);
- file32->setParent(imageMultiPart3);
- QHttpPart imagePart33;
- imagePart33.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
- imagePart33.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage3\""));
- QFile *file33 = new QFile(QFINDTESTDATA("../qnetworkreply/image3.jpg"));
- file33->open(QIODevice::ReadOnly);
- imagePart33.setBodyDevice(file33);
- imageMultiPart3->append(imagePart33);
- file33->setParent(imageMultiPart3);
- QByteArray expectedData = "content type: multipart/form-data; boundary=\""
- + imageMultiPart3->boundary();
- expectedData.append("\"\nkey: testImage1, value: 87ef3bb319b004ba9e5e9c9fa713776e\n"
- "key: testImage2, value: 483761b893f7fb1bd2414344cd1f3dfb\n"
- "key: testImage3, value: ab0eb6fd4fcf8b4436254870b4513033\n");
-
- QTest::newRow("multipart-3images") << multiPartUrl << QByteArray() << QByteArray("POST")
- << static_cast<QObject *>(imageMultiPart3) << expectedData
- << QNetworkProxy();
-}
-
-void tst_Spdy::upload()
-{
- QFETCH(QUrl, url);
- QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
-
- QFETCH(QByteArray, data);
- QFETCH(QByteArray, uploadMethod);
- QFETCH(QObject *, uploadObject);
- QFETCH(QNetworkProxy, proxy);
-
- if (proxy.type() != QNetworkProxy::DefaultProxy) {
- m_manager.setProxy(proxy);
- }
-
- QNetworkReply *reply;
- QHttpMultiPart *multiPart = 0;
-
- if (uploadObject) {
- // upload via device
- if (QIODevice *device = qobject_cast<QIODevice *>(uploadObject)) {
- reply = m_manager.post(request, device);
- } else if ((multiPart = qobject_cast<QHttpMultiPart *>(uploadObject))) {
- reply = m_manager.post(request, multiPart);
- } else {
- QFAIL("got unknown upload device");
- }
- } else {
- // upload via byte array
- if (uploadMethod == "PUT") {
- reply = m_manager.put(request, data);
- } else {
- reply = m_manager.post(request, data);
- }
- }
-
- reply->ignoreSslErrors();
- QSignalSpy metaDataChangedSpy(reply, SIGNAL(metaDataChanged()));
- QSignalSpy uploadProgressSpy(reply, SIGNAL(uploadProgress(qint64, qint64)));
- QSignalSpy readyReadSpy(reply, SIGNAL(readyRead()));
- QSignalSpy finishedSpy(reply, SIGNAL(finished()));
-
- QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- QSignalSpy finishedManagerSpy(&m_manager, SIGNAL(finished(QNetworkReply*)));
-
- QTestEventLoop::instance().enterLoop(20);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(finishedManagerSpy.count(), 1);
- QCOMPARE(metaDataChangedSpy.count(), 1);
- QCOMPARE(finishedSpy.count(), 1);
- QVERIFY(uploadProgressSpy.count() > 0);
- QVERIFY(readyReadSpy.count() > 0);
-
- QCOMPARE(reply->networkError(), QNetworkReply::NoError);
- QCOMPARE(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(), true);
- QCOMPARE(reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool(), true);
- QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
-
- qint64 contentLength = reply->header(QNetworkRequest::ContentLengthHeader).toLongLong();
- if (!multiPart) // script to test multiparts does not return a content length
- QCOMPARE(contentLength, 33); // 33 bytes for md5 sums (including new line)
-
- QFETCH(QByteArray, md5sum);
- QByteArray content = reply->readAll();
- QCOMPARE(content, md5sum);
-
- reply->deleteLater();
- if (uploadObject)
- uploadObject->deleteLater();
-
- m_manager.setProxy(QNetworkProxy()); // reset
-}
-
-void tst_Spdy::errors_data()
-{
- QTest::addColumn<QUrl>("url");
- QTest::addColumn<QNetworkProxy>("proxy");
- QTest::addColumn<bool>("ignoreSslErrors");
- QTest::addColumn<int>("expectedReplyError");
-
- QTest::newRow("http-404") << QUrl("https://" + QtNetworkSettings::serverName() + "/non-existent-url")
- << QNetworkProxy() << true << int(QNetworkReply::ContentNotFoundError);
-
- QTest::newRow("ssl-errors") << QUrl("https://" + QtNetworkSettings::serverName())
- << QNetworkProxy() << false << int(QNetworkReply::SslHandshakeFailedError);
-
- QTest::newRow("host-not-found") << QUrl("https://this-host-does-not.exist")
- << QNetworkProxy()
- << true << int(QNetworkReply::HostNotFoundError);
-
- QTest::newRow("proxy-not-found") << QUrl("https://" + QtNetworkSettings::serverName())
- << QNetworkProxy(QNetworkProxy::HttpProxy,
- "https://this-host-does-not.exist", 3128)
- << true << int(QNetworkReply::HostNotFoundError);
-
- QHostInfo hostInfo = QHostInfo::fromName(QtNetworkSettings::serverName());
- QString proxyserver = hostInfo.addresses().first().toString();
-
- QTest::newRow("proxy-unavailable") << QUrl("https://" + QtNetworkSettings::serverName())
- << QNetworkProxy(QNetworkProxy::HttpProxy, proxyserver, 10)
- << true << int(QNetworkReply::UnknownNetworkError);
-
- QTest::newRow("no-proxy-credentials") << QUrl("https://" + QtNetworkSettings::serverName())
- << QNetworkProxy(QNetworkProxy::HttpProxy, proxyserver, 3129)
- << true << int(QNetworkReply::ProxyAuthenticationRequiredError);
-}
-
-void tst_Spdy::errors()
-{
- QFETCH(QUrl, url);
- QFETCH(QNetworkProxy, proxy);
- QFETCH(bool, ignoreSslErrors);
- QFETCH(int, expectedReplyError);
-
- QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
-
- disconnect(&m_manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)),
- 0, 0);
- if (proxy.type() != QNetworkProxy::DefaultProxy) {
- m_manager.setProxy(proxy);
- }
- QNetworkReply *reply = m_manager.get(request);
- if (ignoreSslErrors)
- reply->ignoreSslErrors();
- QSignalSpy finishedSpy(reply, SIGNAL(finished()));
- QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
-
- QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(finishedSpy.count(), 1);
- QCOMPARE(errorSpy.count(), 1);
-
- QCOMPARE(reply->networkError(), static_cast<QNetworkReply::NetworkError>(expectedReplyError));
-
- m_manager.setProxy(QNetworkProxy()); // reset
- m_manager.clearAccessCache(); // e.g. to get an SSL error we need a new connection
- connect(&m_manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)),
- this, SLOT(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)),
- Qt::UniqueConnection); // reset
-}
-#endif // !QT_NO_NETWORKPROXY
-
-void tst_Spdy::multipleRequests_data()
-{
- QTest::addColumn<QList<QUrl> >("urls");
-
- QString baseUrl = "https://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/echo.cgi?";
- QList<QUrl> urls;
- for (int a = 1; a <= 50; ++a)
- urls.append(QUrl(baseUrl + QLatin1String(QByteArray::number(a))));
-
- QTest::newRow("one-request") << urls.mid(0, 1);
- QTest::newRow("two-requests") << urls.mid(0, 2);
- QTest::newRow("ten-requests") << urls.mid(0, 10);
- QTest::newRow("twenty-requests") << urls.mid(0, 20);
- QTest::newRow("fifty-requests") << urls;
-}
-
-void tst_Spdy::multipleRequestsFinishedSlot()
-{
- m_multipleRepliesFinishedCount++;
- if (m_multipleRepliesFinishedCount == m_multipleRequestsCount)
- QTestEventLoop::instance().exitLoop();
-}
-
-void tst_Spdy::multipleRequests()
-{
- QFETCH(QList<QUrl>, urls);
- m_multipleRequestsCount = urls.count();
- m_multipleRepliesFinishedCount = 0;
-
- QList<QNetworkReply *> replies;
- QList<QSignalSpy *> metaDataChangedSpies;
- QList<QSignalSpy *> readyReadSpies;
- QList<QSignalSpy *> finishedSpies;
-
- foreach (const QUrl &url, urls) {
- QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
- QNetworkReply *reply = m_manager.get(request);
- replies.append(reply);
- reply->ignoreSslErrors();
- QObject::connect(reply, SIGNAL(finished()), this, SLOT(multipleRequestsFinishedSlot()));
- QSignalSpy *metaDataChangedSpy = new QSignalSpy(reply, SIGNAL(metaDataChanged()));
- metaDataChangedSpies << metaDataChangedSpy;
- QSignalSpy *readyReadSpy = new QSignalSpy(reply, SIGNAL(readyRead()));
- readyReadSpies << readyReadSpy;
- QSignalSpy *finishedSpy = new QSignalSpy(reply, SIGNAL(finished()));
- finishedSpies << finishedSpy;
- }
-
- QSignalSpy finishedManagerSpy(&m_manager, SIGNAL(finished(QNetworkReply*)));
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(finishedManagerSpy.count(), m_multipleRequestsCount);
-
- for (int a = 0; a < replies.count(); ++a) {
-
-#ifndef QT_NO_OPENSSL
- QCOMPARE(replies.at(a)->sslConfiguration().nextProtocolNegotiationStatus(),
- QSslConfiguration::NextProtocolNegotiationNegotiated);
- QCOMPARE(replies.at(a)->sslConfiguration().nextNegotiatedProtocol(),
- QByteArray(QSslConfiguration::NextProtocolSpdy3_0));
-#endif // QT_NO_OPENSSL
-
- QCOMPARE(replies.at(a)->networkError(), QNetworkReply::NoError);
- QCOMPARE(replies.at(a)->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(), true);
- QCOMPARE(replies.at(a)->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool(), true);
- QCOMPARE(replies.at(a)->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
-
- // using the echo script, a request to "echo.cgi?1" will return a body of "1"
- QByteArray expectedContent = replies.at(a)->url().query().toUtf8();
- QByteArray content = replies.at(a)->readAll();
- QCOMPARE(expectedContent, content);
-
- QCOMPARE(metaDataChangedSpies.at(a)->count(), 1);
- metaDataChangedSpies.at(a)->deleteLater();
-
- QCOMPARE(finishedSpies.at(a)->count(), 1);
- finishedSpies.at(a)->deleteLater();
-
- QVERIFY(readyReadSpies.at(a)->count() > 0);
- readyReadSpies.at(a)->deleteLater();
-
- replies.at(a)->deleteLater();
- }
-}
-
-QTEST_MAIN(tst_Spdy)
-
-#include "tst_spdy.moc"
diff --git a/tests/auto/network/bearer/CMakeLists.txt b/tests/auto/network/bearer/CMakeLists.txt
new file mode 100644
index 0000000000..4b593aab0a
--- /dev/null
+++ b/tests/auto/network/bearer/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Generated from bearer.pro.
+
+add_subdirectory(qnetworkconfiguration)
+add_subdirectory(qnetworkconfigurationmanager)
+add_subdirectory(qnetworkconfigurationmanagerqappless)
+add_subdirectory(qnetworksession)
diff --git a/tests/auto/network/bearer/qnetworkconfiguration/CMakeLists.txt b/tests/auto/network/bearer/qnetworkconfiguration/CMakeLists.txt
new file mode 100644
index 0000000000..1db8bb1e6b
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworkconfiguration/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qnetworkconfiguration.pro.
+
+#####################################################################
+## tst_qnetworkconfiguration Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkconfiguration
+ SOURCES
+ ../qbearertestcommon.h
+ tst_qnetworkconfiguration.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanager/CMakeLists.txt b/tests/auto/network/bearer/qnetworkconfigurationmanager/CMakeLists.txt
new file mode 100644
index 0000000000..355bd4898a
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworkconfigurationmanager/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qnetworkconfigurationmanager.pro.
+
+#####################################################################
+## tst_qnetworkconfigurationmanager Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkconfigurationmanager
+ SOURCES
+ ../qbearertestcommon.h
+ tst_qnetworkconfigurationmanager.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanagerqappless/CMakeLists.txt b/tests/auto/network/bearer/qnetworkconfigurationmanagerqappless/CMakeLists.txt
new file mode 100644
index 0000000000..dcf18785bf
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworkconfigurationmanagerqappless/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qnetworkconfigurationmanagerqappless.pro.
+
+#####################################################################
+## tst_qnetworkconfigurationmanagerqappless Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkconfigurationmanagerqappless
+ SOURCES
+ ../qbearertestcommon.h
+ tst_qnetworkconfigurationmanagerqappless.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/bearer/qnetworksession/CMakeLists.txt b/tests/auto/network/bearer/qnetworksession/CMakeLists.txt
new file mode 100644
index 0000000000..99c3483e6c
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworksession/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from qnetworksession.pro.
+
+add_subdirectory(test)
+
+if(NOT WINRT)
+ add_subdirectory(lackey)
+endif()
diff --git a/tests/auto/network/bearer/qnetworksession/lackey/CMakeLists.txt b/tests/auto/network/bearer/qnetworksession/lackey/CMakeLists.txt
new file mode 100644
index 0000000000..c2d0d59d57
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworksession/lackey/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from lackey.pro.
+
+#####################################################################
+## lackey Binary:
+#####################################################################
+
+add_qt_executable(lackey
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/bearer/qnetworksession/test/.prev_CMakeLists.txt b/tests/auto/network/bearer/qnetworksession/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..e164bccbdf
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworksession/test/.prev_CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qnetworksession Test:
+#####################################################################
+
+add_qt_test(tst_qnetworksession
+ SOURCES
+ ../../qbearertestcommon.h
+ tst_qnetworksession.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 4:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = ".."
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../lackey/lackey"
diff --git a/tests/auto/network/bearer/qnetworksession/test/CMakeLists.txt b/tests/auto/network/bearer/qnetworksession/test/CMakeLists.txt
new file mode 100644
index 0000000000..c86966600d
--- /dev/null
+++ b/tests/auto/network/bearer/qnetworksession/test/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qnetworksession Test:
+#####################################################################
+
+add_qt_test(tst_qnetworksession
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ ../../qbearertestcommon.h
+ tst_qnetworksession.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 4:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = ".."
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../lackey/lackey"
diff --git a/tests/auto/network/kernel/CMakeLists.txt b/tests/auto/network/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..c1082f60b7
--- /dev/null
+++ b/tests/auto/network/kernel/CMakeLists.txt
@@ -0,0 +1,19 @@
+add_subdirectory(qdnslookup)
+add_subdirectory(qdnslookup_appless)
+add_subdirectory(qnetworkinterface)
+add_subdirectory(qnetworkdatagram)
+add_subdirectory(qnetworkaddressentry)
+add_subdirectory(qhostaddress)
+
+if(NOT WINRT)
+ add_subdirectory(qnetworkproxy)
+ add_subdirectory(qnetworkproxyfactory)
+endif()
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qauthenticator)
+
+ if(NOT APPLE_OSX)
+ add_subdirectory(qhostinfo)
+ endif()
+endif()
diff --git a/tests/auto/network/kernel/qauthenticator/CMakeLists.txt b/tests/auto/network/kernel/qauthenticator/CMakeLists.txt
new file mode 100644
index 0000000000..f461591884
--- /dev/null
+++ b/tests/auto/network/kernel/qauthenticator/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qauthenticator.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qauthenticator Test:
+#####################################################################
+
+add_qt_test(tst_qauthenticator
+ SOURCES
+ tst_qauthenticator.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qauthenticator.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/network/kernel/qdnslookup/CMakeLists.txt b/tests/auto/network/kernel/qdnslookup/CMakeLists.txt
new file mode 100644
index 0000000000..896b4431d8
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdnslookup.pro.
+
+#####################################################################
+## tst_qdnslookup Test:
+#####################################################################
+
+add_qt_test(tst_qdnslookup
+ SOURCES
+ tst_qdnslookup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt b/tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt
new file mode 100644
index 0000000000..847e1a6d90
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup_appless/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdnslookup_appless.pro.
+
+#####################################################################
+## tst_qdnslookup_appless Test:
+#####################################################################
+
+add_qt_test(tst_qdnslookup_appless
+ SOURCES
+ tst_qdnslookup_appless.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qhostaddress/CMakeLists.txt b/tests/auto/network/kernel/qhostaddress/CMakeLists.txt
new file mode 100644
index 0000000000..f967625d38
--- /dev/null
+++ b/tests/auto/network/kernel/qhostaddress/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qhostaddress.pro.
+
+#####################################################################
+## tst_qhostaddress Test:
+#####################################################################
+
+add_qt_test(tst_qhostaddress
+ SOURCES
+ tst_qhostaddress.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qhostaddress CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
diff --git a/tests/auto/network/kernel/qhostinfo/CMakeLists.txt b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt
new file mode 100644
index 0000000000..19eae0611d
--- /dev/null
+++ b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qhostinfo.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qhostinfo Test:
+#####################################################################
+
+add_qt_test(tst_qhostinfo
+ SOURCES
+ tst_qhostinfo.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qhostinfo.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qhostinfo CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+#### Keys ignored in scope 3:.:.:qhostinfo.pro:WINRT:
+# WINRT_MANIFEST.capabilities = "internetClientServer"
diff --git a/tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt b/tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt
new file mode 100644
index 0000000000..5a72d4e4a5
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkaddressentry/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkaddressentry.pro.
+
+#####################################################################
+## tst_qnetworkaddressentry Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkaddressentry
+ SOURCES
+ tst_qnetworkaddressentry.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt b/tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt
new file mode 100644
index 0000000000..ae24d32917
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkdatagram/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkdatagram.pro.
+
+#####################################################################
+## tst_qnetworkdatagram Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkdatagram
+ SOURCES
+ tst_qnetworkdatagram.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt b/tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt
new file mode 100644
index 0000000000..f23a17f077
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkinterface/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qnetworkinterface.pro.
+
+#####################################################################
+## tst_qnetworkinterface Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkinterface
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qnetworkinterface.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt b/tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt
new file mode 100644
index 0000000000..e0cbe133af
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkproxy/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkproxy.pro.
+
+#####################################################################
+## tst_qnetworkproxy Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkproxy
+ SOURCES
+ tst_qnetworkproxy.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt b/tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt
new file mode 100644
index 0000000000..ecacd338ab
--- /dev/null
+++ b/tests/auto/network/kernel/qnetworkproxyfactory/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qnetworkproxyfactory.pro.
+
+#####################################################################
+## tst_qnetworkproxyfactory Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkproxyfactory
+ SOURCES
+ tst_qnetworkproxyfactory.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)
diff --git a/tests/auto/network/socket/CMakeLists.txt b/tests/auto/network/socket/CMakeLists.txt
new file mode 100644
index 0000000000..5019e47140
--- /dev/null
+++ b/tests/auto/network/socket/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from socket.pro.
+
+add_subdirectory(qudpsocket)
+### add_subdirectory(qlocalsocket)
+add_subdirectory(qtcpserver)
+add_subdirectory(qabstractsocket)
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(platformsocketengine)
+ add_subdirectory(qtcpsocket)
+
+ if(NOT WINRT)
+ add_subdirectory(qhttpsocketengine)
+ add_subdirectory(qsocks5socketengine)
+ endif()
+endif()
+
+if(QT_FEATURE_sctp)
+ add_subdirectory(qsctpsocket)
+endif()
diff --git a/tests/auto/network/socket/platformsocketengine/CMakeLists.txt b/tests/auto/network/socket/platformsocketengine/CMakeLists.txt
new file mode 100644
index 0000000000..1dece78966
--- /dev/null
+++ b/tests/auto/network/socket/platformsocketengine/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from platformsocketengine.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_platformsocketengine Test:
+#####################################################################
+
+add_qt_test(tst_platformsocketengine
+ SOURCES
+ tst_platformsocketengine.cpp
+ INCLUDE_DIRECTORIES
+ ${QT_SOURCE_TREE}/src/network
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:platformsocketengine.pro:<TRUE>:
+# MOC_DIR = "tmp"
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_platformsocketengine CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+extend_target(tst_platformsocketengine CONDITION QT_FEATURE_reduce_exports AND UNIX
+ SOURCES
+ ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_unix.cpp
+)
diff --git a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
index 868439de6a..df43a60065 100644
--- a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
+++ b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
@@ -9,5 +9,7 @@ win32: QMAKE_USE += ws2_32
unix:qtConfig(reduce_exports) {
SOURCES += $$QNETWORK_SRC/socket/qnativesocketengine_unix.cpp
SOURCES += $$QNETWORK_SRC/socket/qnativesocketengine.cpp
+ HEADERS += $$QNETWORK_SRC/socket/qnativesocketengine_p.h
SOURCES += $$QNETWORK_SRC/socket/qabstractsocketengine.cpp
+ HEADERS += $$QNETWORK_SRC/socket/qabstractsocketengine_p.h
}
diff --git a/tests/auto/network/socket/qabstractsocket/CMakeLists.txt b/tests/auto/network/socket/qabstractsocket/CMakeLists.txt
new file mode 100644
index 0000000000..ca7d64a2ff
--- /dev/null
+++ b/tests/auto/network/socket/qabstractsocket/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qabstractsocket.pro.
+
+#####################################################################
+## tst_qabstractsocket Test:
+#####################################################################
+
+add_qt_test(tst_qabstractsocket
+ SOURCES
+ tst_qabstractsocket.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/socket/qhttpsocketengine/CMakeLists.txt b/tests/auto/network/socket/qhttpsocketengine/CMakeLists.txt
new file mode 100644
index 0000000000..6aeec0a983
--- /dev/null
+++ b/tests/auto/network/socket/qhttpsocketengine/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from qhttpsocketengine.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qhttpsocketengine Test:
+#####################################################################
+
+add_qt_test(tst_qhttpsocketengine
+ SOURCES
+ tst_qhttpsocketengine.cpp
+ INCLUDE_DIRECTORIES
+ ${QT_SOURCE_TREE}/src/network
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qhttpsocketengine.pro:<TRUE>:
+# MOC_DIR = "tmp"
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qhttpsocketengine.pro:LINUX:
+# QT_TEST_SERVER_LIST = "squid" "danted" "cyrus" "apache2"
+
+extend_target(tst_qhttpsocketengine CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+extend_target(tst_qhttpsocketengine CONDITION QT_FEATURE_reduce_exports AND UNIX
+ SOURCES
+ ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_unix.cpp
+)
diff --git a/tests/auto/network/socket/qlocalsocket/CMakeLists.txt b/tests/auto/network/socket/qlocalsocket/CMakeLists.txt
new file mode 100644
index 0000000000..97466174f9
--- /dev/null
+++ b/tests/auto/network/socket/qlocalsocket/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qlocalsocket.pro.
+
+add_subdirectory(test)
+add_subdirectory(socketprocess)
diff --git a/tests/auto/network/socket/qlocalsocket/socketprocess/CMakeLists.txt b/tests/auto/network/socket/qlocalsocket/socketprocess/CMakeLists.txt
new file mode 100644
index 0000000000..cb339eb2fa
--- /dev/null
+++ b/tests/auto/network/socket/qlocalsocket/socketprocess/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from socketprocess.pro.
+
+#####################################################################
+## socketprocess Binary:
+#####################################################################
+
+add_qt_executable(socketprocess
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
diff --git a/tests/auto/network/socket/qlocalsocket/test/CMakeLists.txt b/tests/auto/network/socket/qlocalsocket/test/CMakeLists.txt
new file mode 100644
index 0000000000..eb427796ae
--- /dev/null
+++ b/tests/auto/network/socket/qlocalsocket/test/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qlocalsocket Test:
+#####################################################################
+
+add_qt_test(tst_qlocalsocket
+ SOURCES
+ ../tst_qlocalsocket.cpp
+ DEFINES
+ QLOCALSERVER_DEBUG
+ QLOCALSOCKET_DEBUG
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/../\\\"
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 4:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = ".."
diff --git a/tests/auto/network/socket/qsctpsocket/CMakeLists.txt b/tests/auto/network/socket/qsctpsocket/CMakeLists.txt
new file mode 100644
index 0000000000..d272d018b6
--- /dev/null
+++ b/tests/auto/network/socket/qsctpsocket/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qsctpsocket.pro.
+
+#####################################################################
+## tst_qsctpsocket Test:
+#####################################################################
+
+add_qt_test(tst_qsctpsocket
+ SOURCES
+ tst_qsctpsocket.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt b/tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt
new file mode 100644
index 0000000000..fd58b931e6
--- /dev/null
+++ b/tests/auto/network/socket/qsocks5socketengine/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from qsocks5socketengine.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qsocks5socketengine Test:
+#####################################################################
+
+add_qt_test(tst_qsocks5socketengine
+ SOURCES
+ tst_qsocks5socketengine.cpp
+ INCLUDE_DIRECTORIES
+ ${QT_SOURCE_TREE}/src/network
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qsocks5socketengine.pro:<TRUE>:
+# MOC_DIR = "tmp"
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qsocks5socketengine.pro:LINUX:
+# QT_TEST_SERVER_LIST = "danted" "apache2" "cyrus"
+
+extend_target(tst_qsocks5socketengine CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+extend_target(tst_qsocks5socketengine CONDITION QT_FEATURE_reduce_exports AND UNIX
+ SOURCES
+ ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qabstractsocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine.cpp ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_p.h
+ ${QT_SOURCE_TREE}/src/network/socket/qnativesocketengine_unix.cpp
+)
diff --git a/tests/auto/network/socket/qtcpserver/CMakeLists.txt b/tests/auto/network/socket/qtcpserver/CMakeLists.txt
new file mode 100644
index 0000000000..01f6c8b672
--- /dev/null
+++ b/tests/auto/network/socket/qtcpserver/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qtcpserver.pro.
+
+add_subdirectory(test)
+add_subdirectory(crashingServer)
diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/CMakeLists.txt b/tests/auto/network/socket/qtcpserver/crashingServer/CMakeLists.txt
new file mode 100644
index 0000000000..ad291f2ad8
--- /dev/null
+++ b/tests/auto/network/socket/qtcpserver/crashingServer/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from crashingServer.pro.
+
+#####################################################################
+## crashingServer Binary:
+#####################################################################
+
+add_qt_executable(crashingServer
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt b/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt
new file mode 100644
index 0000000000..b559024724
--- /dev/null
+++ b/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qtcpserver Test:
+#####################################################################
+
+add_qt_test(tst_qtcpserver
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ ../tst_qtcpserver.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+#### Keys ignored in scope 1:.:.:test.pro:<TRUE>:
+# MOC_DIR = "tmp"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtcpserver CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+#### Keys ignored in scope 6:.:.:test.pro:LINUX:
+# QT_TEST_SERVER_LIST = "danted" "cyrus" "squid" "ftp-proxy"
diff --git a/tests/auto/network/socket/qtcpserver/test/test.pro b/tests/auto/network/socket/qtcpserver/test/test.pro
index 7e2e60a1e3..491ff28cdc 100644
--- a/tests/auto/network/socket/qtcpserver/test/test.pro
+++ b/tests/auto/network/socket/qtcpserver/test/test.pro
@@ -3,13 +3,13 @@ SOURCES += ../tst_qtcpserver.cpp
win32: QMAKE_USE += ws2_32
-TARGET = ../tst_qtcpserver
+TARGET = tst_qtcpserver
win32 {
CONFIG(debug, debug|release) {
- TARGET = ../../debug/tst_qtcpserver
+ TARGET = ../debug/tst_qtcpserver
} else {
- TARGET = ../../release/tst_qtcpserver
+ TARGET = ../release/tst_qtcpserver
}
}
diff --git a/tests/auto/network/socket/qtcpsocket/CMakeLists.txt b/tests/auto/network/socket/qtcpsocket/CMakeLists.txt
new file mode 100644
index 0000000000..b3ad79cba9
--- /dev/null
+++ b/tests/auto/network/socket/qtcpsocket/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from qtcpsocket.pro.
+
+add_subdirectory(test)
+
+if(NOT VXWORKS)
+ add_subdirectory(stressTest)
+endif()
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/CMakeLists.txt b/tests/auto/network/socket/qtcpsocket/stressTest/CMakeLists.txt
new file mode 100644
index 0000000000..da9d3a324f
--- /dev/null
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from stressTest.pro.
+
+#####################################################################
+## stressTest Binary:
+#####################################################################
+
+add_qt_executable(stressTest
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ Test.cpp Test.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:stressTest.pro:<TRUE>:
+# MOC_DIR = ".moc/"
+# TMP_DIR = ".tmp/"
diff --git a/tests/auto/network/socket/qtcpsocket/test/.prev_CMakeLists.txt b/tests/auto/network/socket/qtcpsocket/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..61b8d25736
--- /dev/null
+++ b/tests/auto/network/socket/qtcpsocket/test/.prev_CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qtcpsocket Test:
+#####################################################################
+
+add_qt_test(tst_qtcpsocket
+ SOURCES
+ ../tst_qtcpsocket.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtcpsocket CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+#### Keys ignored in scope 4:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 6:.:.:test.pro:else:
+# DESTDIR = "../"
+
+#### Keys ignored in scope 7:.:.:test.pro:LINUX:
+# QT_TEST_SERVER_LIST = "danted" "squid" "apache2" "ftp-proxy" "vsftpd" "iptables" "cyrus"
diff --git a/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt b/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt
new file mode 100644
index 0000000000..57fafe7a04
--- /dev/null
+++ b/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qtcpsocket Test:
+#####################################################################
+
+add_qt_test(tst_qtcpsocket
+ SOURCES
+ ../tst_qtcpsocket.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtcpsocket CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ws2_32
+)
+
+# special case begin
+set(THREADS_PREFER_PTHREAD_FLAG 1)
+find_package(Threads)
+target_link_libraries(tst_qtcpsocket PRIVATE Threads::Threads)
+# special case end
+
+#### Keys ignored in scope 4:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 6:.:.:test.pro:else:
+# DESTDIR = "../"
+
+#### Keys ignored in scope 7:.:.:test.pro:LINUX:
+# QT_TEST_SERVER_LIST = "danted" "squid" "apache2" "ftp-proxy" "vsftpd" "iptables" "cyrus"
diff --git a/tests/auto/network/socket/qudpsocket/CMakeLists.txt b/tests/auto/network/socket/qudpsocket/CMakeLists.txt
new file mode 100644
index 0000000000..b9d0646e58
--- /dev/null
+++ b/tests/auto/network/socket/qudpsocket/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qudpsocket.pro.
+
+add_subdirectory(test)
+add_subdirectory(clientserver)
diff --git a/tests/auto/network/socket/qudpsocket/clientserver/CMakeLists.txt b/tests/auto/network/socket/qudpsocket/clientserver/CMakeLists.txt
new file mode 100644
index 0000000000..8b594c6913
--- /dev/null
+++ b/tests/auto/network/socket/qudpsocket/clientserver/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from clientserver.pro.
+
+#####################################################################
+## clientserver Binary:
+#####################################################################
+
+add_qt_executable(clientserver
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/socket/qudpsocket/test/CMakeLists.txt b/tests/auto/network/socket/qudpsocket/test/CMakeLists.txt
new file mode 100644
index 0000000000..3c2df284fc
--- /dev/null
+++ b/tests/auto/network/socket/qudpsocket/test/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qudpsocket Test:
+#####################################################################
+
+add_qt_test(tst_qudpsocket
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ ../tst_qudpsocket.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+#### Keys ignored in scope 1:.:.:test.pro:<TRUE>:
+# MOC_DIR = "tmp"
+# testcase.timeout = "800"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug"
+
+#### Keys ignored in scope 4:.:.:test.pro:else:
+# DESTDIR = "../release"
+
+#### Keys ignored in scope 5:.:.:test.pro:else:
+# DESTDIR = "../"
+
+#### Keys ignored in scope 6:.:.:test.pro:LINUX:
+# QT_TEST_SERVER_LIST = "danted" "echo"
diff --git a/tests/auto/network/socket/qudpsocket/udpServer/.prev_CMakeLists.txt b/tests/auto/network/socket/qudpsocket/udpServer/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..be9819466f
--- /dev/null
+++ b/tests/auto/network/socket/qudpsocket/udpServer/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from udpServer.pro.
+
+#####################################################################
+## udpServer Binary:
+#####################################################################
+
+add_qt_executable(udpServer
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/socket/qudpsocket/udpServer/CMakeLists.txt b/tests/auto/network/socket/qudpsocket/udpServer/CMakeLists.txt
new file mode 100644
index 0000000000..d9da87126f
--- /dev/null
+++ b/tests/auto/network/socket/qudpsocket/udpServer/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from udpServer.pro.
+
+#####################################################################
+## udpServer Binary:
+#####################################################################
+
+add_qt_executable(udpServer
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/./" # special case
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/ssl/CMakeLists.txt b/tests/auto/network/ssl/CMakeLists.txt
new file mode 100644
index 0000000000..c10cfabbf4
--- /dev/null
+++ b/tests/auto/network/ssl/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from ssl.pro.
+
+add_subdirectory(qpassworddigestor)
+add_subdirectory(qsslcertificate)
+add_subdirectory(qsslcipher)
+add_subdirectory(qsslellipticcurve)
+add_subdirectory(qsslerror)
+add_subdirectory(qsslkey)
+
+if(QT_FEATURE_ssl)
+
+ if(QT_FEATURE_private_tests)
+ add_subdirectory(qsslsocket)
+ if(NOT WINRT)
+ add_subdirectory(qsslsocket_onDemandCertificates_member)
+ add_subdirectory(qsslsocket_onDemandCertificates_static)
+ endif()
+
+ if(QT_FEATURE_dtls)
+ add_subdirectory(qdtlscookie)
+ add_subdirectory(qdtls)
+ endif()
+
+ if(QT_FEATURE_ocsp)
+ add_subdirectory(qocsp)
+ endif()
+ endif()
+endif()
+
+if(QT_FEATURE_ssl)
+
+ if(QT_FEATURE_private_tests)
+ add_subdirectory(qasn1element)
+ add_subdirectory(qssldiffiehellmanparameters)
+ endif()
+endif()
diff --git a/tests/auto/network/ssl/qasn1element/CMakeLists.txt b/tests/auto/network/ssl/qasn1element/CMakeLists.txt
new file mode 100644
index 0000000000..aa9ff58012
--- /dev/null
+++ b/tests/auto/network/ssl/qasn1element/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qasn1element.pro.
+
+#####################################################################
+## tst_qasn1element Test:
+#####################################################################
+
+add_qt_test(tst_qasn1element
+ SOURCES
+ tst_qasn1element.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::NetworkPrivate
+)
diff --git a/tests/auto/network/ssl/qdtls/CMakeLists.txt b/tests/auto/network/ssl/qdtls/CMakeLists.txt
new file mode 100644
index 0000000000..77bf65f199
--- /dev/null
+++ b/tests/auto/network/ssl/qdtls/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qdtls.pro.
+
+#####################################################################
+## tst_qdtls Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "certs")
+
+add_qt_test(tst_qdtls
+ SOURCES
+ tst_qdtls.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qdtls.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qdtls.pro:else:
+# DESTDIR = "release"
diff --git a/tests/auto/network/ssl/qdtls/tst_qdtls.cpp b/tests/auto/network/ssl/qdtls/tst_qdtls.cpp
index 5d79b0f26b..3bbde484ce 100644
--- a/tests/auto/network/ssl/qdtls/tst_qdtls.cpp
+++ b/tests/auto/network/ssl/qdtls/tst_qdtls.cpp
@@ -162,7 +162,6 @@ Q_DECLARE_METATYPE(QSslSocket::SslMode)
Q_DECLARE_METATYPE(QSslSocket::PeerVerifyMode)
Q_DECLARE_METATYPE(QList<QSslCertificate>)
Q_DECLARE_METATYPE(QSslKey)
-Q_DECLARE_METATYPE(QVector<QSslError>)
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/network/ssl/qdtlscookie/CMakeLists.txt b/tests/auto/network/ssl/qdtlscookie/CMakeLists.txt
new file mode 100644
index 0000000000..827716c3b7
--- /dev/null
+++ b/tests/auto/network/ssl/qdtlscookie/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qdtlscookie.pro.
+
+#####################################################################
+## tst_qdtlscookie Test:
+#####################################################################
+
+add_qt_test(tst_qdtlscookie
+ SOURCES
+ tst_qdtlscookie.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qdtlscookie.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qdtlscookie.pro:else:
+# DESTDIR = "release"
diff --git a/tests/auto/network/ssl/qocsp/CMakeLists.txt b/tests/auto/network/ssl/qocsp/CMakeLists.txt
new file mode 100644
index 0000000000..399711f9a0
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qocsp.pro.
+
+#####################################################################
+## tst_qocsp Test:
+#####################################################################
+
+add_qt_test(tst_qocsp
+ SOURCES
+ tst_qocsp.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::NetworkPrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qocsp.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qocsp.pro:else:
+# DESTDIR = "release"
diff --git a/tests/auto/network/ssl/qocsp/tst_qocsp.cpp b/tests/auto/network/ssl/qocsp/tst_qocsp.cpp
index 94d206ac83..8e579f7b5e 100644
--- a/tests/auto/network/ssl/qocsp/tst_qocsp.cpp
+++ b/tests/auto/network/ssl/qocsp/tst_qocsp.cpp
@@ -60,7 +60,6 @@ using VectorOfErrors = QT_PREPEND_NAMESPACE(QVector<SslError>);
using Latin1String = QT_PREPEND_NAMESPACE(QLatin1String);
Q_DECLARE_METATYPE(SslError)
-Q_DECLARE_METATYPE(VectorOfErrors)
Q_DECLARE_METATYPE(Latin1String)
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/network/ssl/qpassworddigestor/CMakeLists.txt b/tests/auto/network/ssl/qpassworddigestor/CMakeLists.txt
new file mode 100644
index 0000000000..e0997fc26e
--- /dev/null
+++ b/tests/auto/network/ssl/qpassworddigestor/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qpassworddigestor.pro.
+
+#####################################################################
+## tst_qpassworddigestor Test:
+#####################################################################
+
+add_qt_test(tst_qpassworddigestor
+ SOURCES
+ tst_qpassworddigestor.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt b/tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1509c2e809
--- /dev/null
+++ b/tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qsslcertificate.pro.
+
+#####################################################################
+## tst_qsslcertificate Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ certificates/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ more-certificates/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ verify-certs/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ pkcs12/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qsslcertificate
+ SOURCES
+ tst_qsslcertificate.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/network/ssl/qsslcertificate/CMakeLists.txt b/tests/auto/network/ssl/qsslcertificate/CMakeLists.txt
new file mode 100644
index 0000000000..4b8fefc499
--- /dev/null
+++ b/tests/auto/network/ssl/qsslcertificate/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from qsslcertificate.pro.
+
+#####################################################################
+## tst_qsslcertificate Test:
+#####################################################################
+
+# special case begin
+# This test requires private tests to properly build
+if (NOT QT_FEATURE_private_tests)
+ return()
+endif()
+# special case end
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ certificates/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ more-certificates/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ verify-certs/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ pkcs12/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qsslcertificate
+ SOURCES
+ tst_qsslcertificate.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/network/ssl/qsslcipher/CMakeLists.txt b/tests/auto/network/ssl/qsslcipher/CMakeLists.txt
new file mode 100644
index 0000000000..44e0e78220
--- /dev/null
+++ b/tests/auto/network/ssl/qsslcipher/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qsslcipher.pro.
+
+#####################################################################
+## tst_qsslcipher Test:
+#####################################################################
+
+add_qt_test(tst_qsslcipher
+ SOURCES
+ tst_qsslcipher.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qsslcipher.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qsslcipher.pro:else:
+# DESTDIR = "release"
diff --git a/tests/auto/network/ssl/qssldiffiehellmanparameters/CMakeLists.txt b/tests/auto/network/ssl/qssldiffiehellmanparameters/CMakeLists.txt
new file mode 100644
index 0000000000..f6785a6736
--- /dev/null
+++ b/tests/auto/network/ssl/qssldiffiehellmanparameters/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qssldiffiehellmanparameters.pro.
+
+#####################################################################
+## tst_qssldiffiehellmanparameters Test:
+#####################################################################
+
+add_qt_test(tst_qssldiffiehellmanparameters
+ SOURCES
+ tst_qssldiffiehellmanparameters.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/ssl/qsslellipticcurve/CMakeLists.txt b/tests/auto/network/ssl/qsslellipticcurve/CMakeLists.txt
new file mode 100644
index 0000000000..4df88ff305
--- /dev/null
+++ b/tests/auto/network/ssl/qsslellipticcurve/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qsslellipticcurve.pro.
+
+#####################################################################
+## tst_qsslellipticcurve Test:
+#####################################################################
+
+add_qt_test(tst_qsslellipticcurve
+ SOURCES
+ tst_qsslellipticcurve.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/auto/network/ssl/qsslerror/CMakeLists.txt b/tests/auto/network/ssl/qsslerror/CMakeLists.txt
new file mode 100644
index 0000000000..e8b07ab049
--- /dev/null
+++ b/tests/auto/network/ssl/qsslerror/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qsslerror.pro.
+
+#####################################################################
+## tst_qsslerror Test:
+#####################################################################
+
+add_qt_test(tst_qsslerror
+ SOURCES
+ tst_qsslerror.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qsslerror.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qsslerror.pro:else:
+# DESTDIR = "release"
diff --git a/tests/auto/network/ssl/qsslkey/CMakeLists.txt b/tests/auto/network/ssl/qsslkey/CMakeLists.txt
new file mode 100644
index 0000000000..04634d1997
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from qsslkey.pro.
+
+#####################################################################
+## tst_qsslkey Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ keys/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ rsa-*.pem)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qsslkey
+ SOURCES
+ tst_qsslkey.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qsslkey CONDITION QT_FEATURE_private_tests
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
diff --git a/tests/auto/network/ssl/qsslsocket/CMakeLists.txt b/tests/auto/network/ssl/qsslsocket/CMakeLists.txt
new file mode 100644
index 0000000000..99ec2ad823
--- /dev/null
+++ b/tests/auto/network/ssl/qsslsocket/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from qsslsocket.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qsslsocket Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "certs")
+
+add_qt_test(tst_qsslsocket
+ SOURCES
+ tst_qsslsocket.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qsslsocket.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qsslsocket.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qsslsocket.pro:else:
+# DESTDIR = "release"
+
+#### Keys ignored in scope 5:.:.:qsslsocket.pro:LINUX:
+# QT_TEST_SERVER_LIST = "squid" "danted" "cyrus" "apache2" "echo"
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index e0364c7155..18b449a953 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -73,7 +73,7 @@ typedef QSharedPointer<QSslSocket> QSslSocketPtr;
#else
#define FLUKE_CERTIFICATE_ERROR QSslError::CertificateUntrusted
#endif
-#endif // QT_NO_SSL
+#endif // QT_NO_OPENSSL
// Detect ALPN (Application-Layer Protocol Negotiation) support
#undef ALPN_SUPPORTED // Undef the variable first to be safe
@@ -259,10 +259,14 @@ private slots:
void signatureAlgorithm();
#endif
- void disabledProtocols_data();
- void disabledProtocols();
+ void unsupportedProtocols_data();
+ void unsupportedProtocols();
void oldErrorsOnSocketReuse();
+#if QT_CONFIG(openssl)
+ void alertMissingCertificate();
+ void alertInvalidCertificate();
+#endif // openssl
void setEmptyDefaultConfiguration(); // this test should be last
@@ -337,6 +341,8 @@ tst_QSslSocket::tst_QSslSocket()
qRegisterMetaType<QSslError>("QSslError");
qRegisterMetaType<QAbstractSocket::SocketState>("QAbstractSocket::SocketState");
qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError");
+ qRegisterMetaType<QAlertLevel>("QAlertLevel");
+ qRegisterMetaType<QAlertType>("QAlertType");
#ifndef QT_NO_OPENSSL
qRegisterMetaType<QSslPreSharedKeyAuthenticator *>();
@@ -1180,25 +1186,6 @@ void tst_QSslSocket::protocol()
QCOMPARE(socket->protocol(), QSsl::AnyProtocol);
socket->abort();
}
- {
- // qt-test-server allows TlsV1, so it allows TlsV1SslV3
- socket->setProtocol(QSsl::TlsV1SslV3);
- QCOMPARE(socket->protocol(), QSsl::TlsV1SslV3);
- socket->connectToHostEncrypted(QtNetworkSettings::httpServerName(), 443);
- if (setProxy && !socket->waitForEncrypted())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- QCOMPARE(socket->protocol(), QSsl::TlsV1SslV3);
- socket->abort();
- QCOMPARE(socket->protocol(), QSsl::TlsV1SslV3);
- socket->connectToHost(QtNetworkSettings::httpServerName(), 443);
- if (setProxy && !socket->waitForConnected())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- socket->startClientEncryption();
- if (setProxy && !socket->waitForEncrypted())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- QCOMPARE(socket->protocol(), QSsl::TlsV1SslV3);
- socket->abort();
- }
}
class SslServer : public QTcpServer
@@ -1230,6 +1217,8 @@ public:
signals:
void socketError(QAbstractSocket::SocketError);
+ void gotAlert(QAlertLevel level, QAlertType type, const QString &message);
+ void alertSent(QAlertLevel level, QAlertType type, const QString &message);
protected:
void incomingConnection(qintptr socketDescriptor)
@@ -1241,6 +1230,8 @@ protected:
if (ignoreSslErrors)
connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SIGNAL(socketError(QAbstractSocket::SocketError)));
+ connect(socket, &QSslSocket::alertReceived, this, &SslServer::gotAlert);
+ connect(socket, &QSslSocket::alertSent, this, &SslServer::alertSent);
QFile file(m_keyFile);
QVERIFY(file.open(QIODevice::ReadOnly));
@@ -1304,20 +1295,13 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::addColumn<bool>("works");
QTest::newRow("tls1.0-tls1.0") << QSsl::TlsV1_0 << QSsl::TlsV1_0 << true;
- QTest::newRow("tls1ssl3-tls1ssl3") << QSsl::TlsV1SslV3 << QSsl::TlsV1SslV3 << true;
QTest::newRow("any-any") << QSsl::AnyProtocol << QSsl::AnyProtocol << true;
QTest::newRow("secure-secure") << QSsl::SecureProtocols << QSsl::SecureProtocols << true;
- QTest::newRow("tls1-tls1ssl3") << QSsl::TlsV1_0 << QSsl::TlsV1SslV3 << true;
QTest::newRow("tls1.0-secure") << QSsl::TlsV1_0 << QSsl::SecureProtocols << true;
QTest::newRow("tls1.0-any") << QSsl::TlsV1_0 << QSsl::AnyProtocol << true;
- QTest::newRow("tls1ssl3-tls1.0") << QSsl::TlsV1SslV3 << QSsl::TlsV1_0 << true;
- QTest::newRow("tls1ssl3-secure") << QSsl::TlsV1SslV3 << QSsl::SecureProtocols << true;
- QTest::newRow("tls1ssl3-any") << QSsl::TlsV1SslV3 << QSsl::AnyProtocol << true;
-
QTest::newRow("secure-tls1.0") << QSsl::SecureProtocols << QSsl::TlsV1_0 << true;
- QTest::newRow("secure-tls1ssl3") << QSsl::SecureProtocols << QSsl::TlsV1SslV3 << true;
QTest::newRow("secure-any") << QSsl::SecureProtocols << QSsl::AnyProtocol << true;
QTest::newRow("tls1.0orlater-tls1.0") << QSsl::TlsV1_0OrLater << QSsl::TlsV1_0 << true;
@@ -1349,7 +1333,6 @@ void tst_QSslSocket::protocolServerSide_data()
#endif // TLS1_3_VERSION
QTest::newRow("any-tls1.0") << QSsl::AnyProtocol << QSsl::TlsV1_0 << true;
- QTest::newRow("any-tls1ssl3") << QSsl::AnyProtocol << QSsl::TlsV1SslV3 << true;
QTest::newRow("any-secure") << QSsl::AnyProtocol << QSsl::SecureProtocols << true;
}
@@ -4326,27 +4309,30 @@ void tst_QSslSocket::forwardReadChannelFinished()
#endif // QT_NO_OPENSSL
-void tst_QSslSocket::disabledProtocols_data()
+void tst_QSslSocket::unsupportedProtocols_data()
{
- QTest::addColumn<QSsl::SslProtocol>("disabledProtocol");
- QTest::newRow("SslV2") << QSsl::SslV2;
- QTest::newRow("SslV3") << QSsl::SslV3;
+ QTest::addColumn<QSsl::SslProtocol>("unsupportedProtocol");
+ QTest::newRow("DtlsV1_0") << QSsl::DtlsV1_0;
+ QTest::newRow("DtlsV1_2") << QSsl::DtlsV1_2;
+ QTest::newRow("DtlsV1_0OrLater") << QSsl::DtlsV1_0OrLater;
+ QTest::newRow("DtlsV1_2OrLater") << QSsl::DtlsV1_2OrLater;
+ QTest::newRow("UnknownProtocol") << QSsl::UnknownProtocol;
}
-void tst_QSslSocket::disabledProtocols()
+void tst_QSslSocket::unsupportedProtocols()
{
QFETCH_GLOBAL(const bool, setProxy);
if (setProxy)
return;
- QFETCH(const QSsl::SslProtocol, disabledProtocol);
+ QFETCH(const QSsl::SslProtocol, unsupportedProtocol);
const int timeoutMS = 500;
// Test a client socket.
{
// 0. connectToHostEncrypted: client-side, non-blocking API, error is discovered
// early, preventing any real connection from ever starting.
QSslSocket socket;
- socket.setProtocol(disabledProtocol);
+ socket.setProtocol(unsupportedProtocol);
QCOMPARE(socket.socketError(), QAbstractSocket::UnknownSocketError);
socket.connectToHostEncrypted(QStringLiteral("doesnotmatter.org"), 1010);
QCOMPARE(socket.socketError(), QAbstractSocket::SslInvalidUserDataError);
@@ -4364,7 +4350,7 @@ void tst_QSslSocket::disabledProtocols()
socket.connectToHost(QHostAddress::LocalHost, server.serverPort());
QVERIFY(socket.waitForConnected(timeoutMS));
- socket.setProtocol(disabledProtocol);
+ socket.setProtocol(unsupportedProtocol);
socket.startClientEncryption();
QCOMPARE(socket.socketError(), QAbstractSocket::SslInvalidUserDataError);
}
@@ -4378,7 +4364,7 @@ void tst_QSslSocket::disabledProtocols()
// and then calls startServerEncryption() (which must fall).
{
SslServer server;
- server.protocol = disabledProtocol;
+ server.protocol = unsupportedProtocol;
QVERIFY(server.listen());
QTestEventLoop loop;
@@ -4443,6 +4429,119 @@ void tst_QSslSocket::oldErrorsOnSocketReuse()
#endif // QT_NO_SSL
+#if QT_CONFIG(openssl)
+
+void (QSslSocket::*const tlsErrorSignal)(const QList<QSslError> &) = &QSslSocket::sslErrors;
+void (QAbstractSocket::*const socketErrorSignal)(QAbstractSocket::SocketError) = &QAbstractSocket::error;
+
+void tst_QSslSocket::alertMissingCertificate()
+{
+ // In this test we want a server to abort the connection due to the failing
+ // client authentication. The server expected to send an alert before closing
+ // the connection, and the client expected to receive this alert and report it.
+
+ QFETCH_GLOBAL(const bool, setProxy);
+ if (setProxy) // Not what we test here, bail out.
+ return;
+
+ SslServer server;
+ if (!server.listen(QHostAddress::LocalHost))
+ QSKIP("SslServer::listen() returned false");
+
+ // We want a certificate request to be sent to the client:
+ server.peerVerifyMode = QSslSocket::VerifyPeer;
+ // The only way we can force OpenSSL to send an alert - is to use
+ // a special option (so we fail before handshake is finished):
+ server.config.setMissingCertificateIsFatal(true);
+
+ QSslSocket clientSocket;
+ connect(&clientSocket, tlsErrorSignal, [&clientSocket](const QList<QSslError> &errors){
+ qDebug() << "ERR";
+ clientSocket.ignoreSslErrors(errors);
+ });
+
+ QSignalSpy serverSpy(&server, &SslServer::alertSent);
+ QSignalSpy clientSpy(&clientSocket, &QSslSocket::alertReceived);
+
+ clientSocket.connectToHostEncrypted(server.serverAddress().toString(), server.serverPort());
+
+ QTestEventLoop runner;
+ QTimer::singleShot(500, [&runner](){
+ runner.exitLoop();
+ });
+
+ int waitFor = 2;
+ auto earlyQuitter = [&runner, &waitFor](QAbstractSocket::SocketError) {
+ if (!--waitFor)
+ runner.exitLoop();
+ };
+
+ // Presumably, RemoteHostClosedError for the client and SslHandshakeError
+ // for the server:
+ connect(&clientSocket, socketErrorSignal, earlyQuitter);
+ connect(&server, &SslServer::socketError, earlyQuitter);
+
+ runner.enterLoopMSecs(1000);
+
+ QVERIFY(serverSpy.count() > 0);
+ QVERIFY(clientSpy.count() > 0);
+ QVERIFY(server.socket && !server.socket->isEncrypted());
+ QVERIFY(!clientSocket.isEncrypted());
+}
+
+void tst_QSslSocket::alertInvalidCertificate()
+{
+ // In this test a client will not ignore verification errors,
+ // it also will do 'early' checks, meaning the reported and
+ // not ignored _during_ the hanshake, not after. This ensures
+ // OpenSSL sends an alert.
+ QFETCH_GLOBAL(const bool, setProxy);
+ if (setProxy) // Not what we test here, bail out.
+ return;
+
+ SslServer server;
+ if (!server.listen(QHostAddress::LocalHost))
+ QSKIP("SslServer::listen() returned false");
+
+ QSslSocket clientSocket;
+ auto configuration = QSslConfiguration::defaultConfiguration();
+ configuration.setHandshakeMustInterruptOnError(true);
+ QVERIFY(configuration.handshakeMustInterruptOnError());
+ clientSocket.setSslConfiguration(configuration);
+
+ QSignalSpy serverSpy(&server, &SslServer::gotAlert);
+ QSignalSpy clientSpy(&clientSocket, &QSslSocket::alertSent);
+ QSignalSpy interruptedSpy(&clientSocket, &QSslSocket::handshakeInterruptedOnError);
+
+ clientSocket.connectToHostEncrypted(server.serverAddress().toString(), server.serverPort());
+
+ QTestEventLoop runner;
+ QTimer::singleShot(500, [&runner](){
+ runner.exitLoop();
+ });
+
+ int waitFor = 2;
+ auto earlyQuitter = [&runner, &waitFor](QAbstractSocket::SocketError) {
+ if (!--waitFor)
+ runner.exitLoop();
+ };
+
+ // Presumably, RemoteHostClosedError for the server and SslHandshakeError
+ // for the client:
+ connect(&clientSocket, socketErrorSignal, earlyQuitter);
+ connect(&server, &SslServer::socketError, earlyQuitter);
+
+ runner.enterLoopMSecs(1000);
+
+ QVERIFY(serverSpy.count() > 0);
+ QVERIFY(clientSpy.count() > 0);
+ QVERIFY(interruptedSpy.count() > 0);
+ QVERIFY(server.socket && !server.socket->isEncrypted());
+ QVERIFY(!clientSocket.isEncrypted());
+}
+
+#endif // openssl
+
QTEST_MAIN(tst_QSslSocket)
#include "tst_qsslsocket.moc"
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/CMakeLists.txt b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/CMakeLists.txt
new file mode 100644
index 0000000000..c377e0a46a
--- /dev/null
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qsslsocket_onDemandCertificates_member.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qsslsocket_onDemandCertificates_member Test:
+#####################################################################
+
+add_qt_test(tst_qsslsocket_onDemandCertificates_member
+ SOURCES
+ tst_qsslsocket_onDemandCertificates_member.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qsslsocket_onDemandCertificates_member.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+# testcase.timeout = "300"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qsslsocket_onDemandCertificates_member.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qsslsocket_onDemandCertificates_member.pro:else:
+# DESTDIR = "release"
+
+#### Keys ignored in scope 5:.:.:qsslsocket_onDemandCertificates_member.pro:LINUX:
+# QT_TEST_SERVER_LIST = "squid" "danted"
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/CMakeLists.txt b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/CMakeLists.txt
new file mode 100644
index 0000000000..f3a3178879
--- /dev/null
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from qsslsocket_onDemandCertificates_static.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qsslsocket_onDemandCertificates_static Test:
+#####################################################################
+
+add_qt_test(tst_qsslsocket_onDemandCertificates_static
+ SOURCES
+ tst_qsslsocket_onDemandCertificates_static.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qsslsocket_onDemandCertificates_static.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 3:.:.:qsslsocket_onDemandCertificates_static.pro:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "debug"
+
+#### Keys ignored in scope 4:.:.:qsslsocket_onDemandCertificates_static.pro:else:
+# DESTDIR = "release"
+
+#### Keys ignored in scope 5:.:.:qsslsocket_onDemandCertificates_static.pro:LINUX:
+# QT_TEST_SERVER_LIST = "squid" "danted"
diff --git a/tests/auto/opengl/CMakeLists.txt b/tests/auto/opengl/CMakeLists.txt
new file mode 100644
index 0000000000..7281d56838
--- /dev/null
+++ b/tests/auto/opengl/CMakeLists.txt
@@ -0,0 +1 @@
+# Generated from opengl.pro.
diff --git a/tests/auto/opengl/opengl.pro b/tests/auto/opengl/opengl.pro
index 963cda170d..a220deae24 100644
--- a/tests/auto/opengl/opengl.pro
+++ b/tests/auto/opengl/opengl.pro
@@ -1,6 +1,2 @@
-TEMPLATE=subdirs
-SUBDIRS=\
- qgl \
- qglbuffer \
- qglfunctions \
- qglthreads \
+TEMPLATE = subdirs
+#SUBDIRS =
diff --git a/tests/auto/opengl/qgl/.gitignore b/tests/auto/opengl/qgl/.gitignore
deleted file mode 100644
index bb6e921035..0000000000
--- a/tests/auto/opengl/qgl/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-tst_qgl
diff --git a/tests/auto/opengl/qgl/BLACKLIST b/tests/auto/opengl/qgl/BLACKLIST
deleted file mode 100644
index ec75ea16eb..0000000000
--- a/tests/auto/opengl/qgl/BLACKLIST
+++ /dev/null
@@ -1,8 +0,0 @@
-[graphicsViewClipping]
-ubuntu-16.04
-rhel-7.6
-opensuse-leap
-ubuntu-18.04
-rhel-7.4
-opensuse-42.3
-
diff --git a/tests/auto/opengl/qgl/qgl.pro b/tests/auto/opengl/qgl/qgl.pro
deleted file mode 100644
index af930c5be7..0000000000
--- a/tests/auto/opengl/qgl/qgl.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-############################################################
-# Project file for autotest for file qgl.h
-############################################################
-
-CONFIG += testcase
-TARGET = tst_qgl
-requires(qtHaveModule(opengl))
-QT += widgets widgets-private opengl-private gui-private core-private testlib
-
-SOURCES += tst_qgl.cpp
-RESOURCES = qgl.qrc
diff --git a/tests/auto/opengl/qgl/qgl.qrc b/tests/auto/opengl/qgl/qgl.qrc
deleted file mode 100644
index 70f425c1b9..0000000000
--- a/tests/auto/opengl/qgl/qgl.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file alias="designer.png">../../gui/image/qpixmap/images/designer.png</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
deleted file mode 100644
index 3cc9592fb1..0000000000
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ /dev/null
@@ -1,2524 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-
-#include <qcoreapplication.h>
-#include <qdebug.h>
-#include <qgl.h>
-#include <qglpixelbuffer.h>
-#include <qglframebufferobject.h>
-#include <qglcolormap.h>
-#include <qpaintengine.h>
-#include <qopenglfunctions.h>
-#include <qopenglframebufferobject.h>
-#include <qopenglpaintdevice.h>
-
-#include <QGraphicsView>
-#include <QGraphicsProxyWidget>
-#include <QVBoxLayout>
-
-#ifdef QT_BUILD_INTERNAL
-#include <qpa/qplatformpixmap.h>
-#include <QtOpenGL/private/qgl_p.h>
-#include <QtGui/private/qimage_p.h>
-#include <QtGui/private/qimagepixmapcleanuphooks_p.h>
-#include <QtGui/private/qopenglextensions_p.h>
-#endif
-
-class tst_QGL : public QObject
-{
-Q_OBJECT
-
-public:
- tst_QGL();
- virtual ~tst_QGL();
-
- static void initMain();
-
-private slots:
- void initTestCase();
- void getSetCheck();
-#ifdef QT_BUILD_INTERNAL
- void qglContextDefaultBindTexture();
- void openGLVersionCheck();
- void shareRegister();
- void textureCleanup();
-#endif
- void partialGLWidgetUpdates_data();
- void partialGLWidgetUpdates();
- void glWidgetWithAlpha();
- void glWidgetRendering();
- void glFBOSimpleRendering();
- void glFBORendering();
- void currentFboSync();
- void multipleFBOInterleavedRendering();
- void glFBOUseInGLWidget();
- void glPBufferRendering();
- void glWidgetReparent();
- void glWidgetRenderPixmap();
- void colormap();
- void fboFormat();
- void testDontCrashOnDanglingResources();
- void replaceClipping();
- void clipTest();
- void destroyFBOAfterContext();
- void threadImages();
- void nullRectCrash();
- void graphicsViewClipping();
- void extensions();
-};
-
-tst_QGL::tst_QGL()
-{
-}
-
-tst_QGL::~tst_QGL()
-{
-}
-
-void tst_QGL::initMain()
-{
- QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
-}
-
-void tst_QGL::initTestCase()
-{
- QGLWidget glWidget;
- if (!glWidget.isValid())
- QSKIP("QGL is not supported on the test system");
-}
-
-class MyGLContext : public QGLContext
-{
-public:
- MyGLContext(const QGLFormat& format) : QGLContext(format) {}
- bool windowCreated() const { return QGLContext::windowCreated(); }
- void setWindowCreated(bool on) { QGLContext::setWindowCreated(on); }
- bool initialized() const { return QGLContext::initialized(); }
- void setInitialized(bool on) { QGLContext::setInitialized(on); }
-};
-
-class MyGLWidget : public QGLWidget
-{
-public:
- MyGLWidget() : QGLWidget() {}
- bool autoBufferSwap() const { return QGLWidget::autoBufferSwap(); }
- void setAutoBufferSwap(bool on) { QGLWidget::setAutoBufferSwap(on); }
-};
-
-static int appDefaultDepth()
-{
- static int depth = 0;
- if (depth == 0) {
- QPixmap pm(1, 1);
- depth = pm.depth();
- }
- return depth;
-}
-
-// Using INT_MIN and INT_MAX will cause failures on systems
-// where "int" is 64-bit, so use the explicit values instead.
-#define TEST_INT_MIN (-2147483647 - 1)
-#define TEST_INT_MAX 2147483647
-
-// Testing get/set functions
-void tst_QGL::getSetCheck()
-{
- QGLFormat obj1;
- // int QGLFormat::depthBufferSize()
- // void QGLFormat::setDepthBufferSize(int)
- QCOMPARE(-1, obj1.depthBufferSize());
- obj1.setDepthBufferSize(0);
- QCOMPARE(0, obj1.depthBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setDepthBufferSize: Cannot set negative depth buffer size -2147483648");
- obj1.setDepthBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.depthBufferSize()); // Makes no sense with a negative buffer size
- obj1.setDepthBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setDepthBufferSize: Cannot set negative depth buffer size -1");
- obj1.setDepthBufferSize(-1);
- QCOMPARE(3, obj1.depthBufferSize());
- obj1.setDepthBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.depthBufferSize());
-
- // int QGLFormat::accumBufferSize()
- // void QGLFormat::setAccumBufferSize(int)
- QCOMPARE(-1, obj1.accumBufferSize());
- obj1.setAccumBufferSize(0);
- QCOMPARE(0, obj1.accumBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAccumBufferSize: Cannot set negative accumulate buffer size -2147483648");
- obj1.setAccumBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.accumBufferSize()); // Makes no sense with a negative buffer size
- obj1.setAccumBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAccumBufferSize: Cannot set negative accumulate buffer size -1");
- obj1.setAccumBufferSize(-1);
- QCOMPARE(3, obj1.accumBufferSize());
- obj1.setAccumBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.accumBufferSize());
-
- // int QGLFormat::redBufferSize()
- // void QGLFormat::setRedBufferSize(int)
- QCOMPARE(-1, obj1.redBufferSize());
- obj1.setRedBufferSize(0);
- QCOMPARE(0, obj1.redBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setRedBufferSize: Cannot set negative red buffer size -2147483648");
- obj1.setRedBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.redBufferSize()); // Makes no sense with a negative buffer size
- obj1.setRedBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setRedBufferSize: Cannot set negative red buffer size -1");
- obj1.setRedBufferSize(-1);
- QCOMPARE(3, obj1.redBufferSize());
- obj1.setRedBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.redBufferSize());
-
- // int QGLFormat::greenBufferSize()
- // void QGLFormat::setGreenBufferSize(int)
- QCOMPARE(-1, obj1.greenBufferSize());
- obj1.setGreenBufferSize(0);
- QCOMPARE(0, obj1.greenBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setGreenBufferSize: Cannot set negative green buffer size -2147483648");
- obj1.setGreenBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.greenBufferSize()); // Makes no sense with a negative buffer size
- obj1.setGreenBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setGreenBufferSize: Cannot set negative green buffer size -1");
- obj1.setGreenBufferSize(-1);
- QCOMPARE(3, obj1.greenBufferSize());
- obj1.setGreenBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.greenBufferSize());
-
- // int QGLFormat::blueBufferSize()
- // void QGLFormat::setBlueBufferSize(int)
- QCOMPARE(-1, obj1.blueBufferSize());
- obj1.setBlueBufferSize(0);
- QCOMPARE(0, obj1.blueBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setBlueBufferSize: Cannot set negative blue buffer size -2147483648");
- obj1.setBlueBufferSize(TEST_INT_MIN);
- QCOMPARE(0, obj1.blueBufferSize()); // Makes no sense with a negative buffer size
- obj1.setBlueBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setBlueBufferSize: Cannot set negative blue buffer size -1");
- obj1.setBlueBufferSize(-1);
- QCOMPARE(3, obj1.blueBufferSize());
- obj1.setBlueBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.blueBufferSize());
-
- // int QGLFormat::alphaBufferSize()
- // void QGLFormat::setAlphaBufferSize(int)
- QCOMPARE(-1, obj1.alphaBufferSize());
- QCOMPARE(false, obj1.alpha());
- QVERIFY(!obj1.testOption(QGL::AlphaChannel));
- QVERIFY(obj1.testOption(QGL::NoAlphaChannel));
- obj1.setAlphaBufferSize(1);
- QCOMPARE(true, obj1.alpha()); // setAlphaBufferSize() enables alpha.
- QCOMPARE(1, obj1.alphaBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -2147483648");
- obj1.setAlphaBufferSize(TEST_INT_MIN);
- QCOMPARE(1, obj1.alphaBufferSize()); // Makes no sense with a negative buffer size
- obj1.setAlphaBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setAlphaBufferSize: Cannot set negative alpha buffer size -1");
- obj1.setAlphaBufferSize(-1);
- QCOMPARE(3, obj1.alphaBufferSize());
- obj1.setAlphaBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.alphaBufferSize());
-
- // int QGLFormat::stencilBufferSize()
- // void QGLFormat::setStencilBufferSize(int)
- QCOMPARE(-1, obj1.stencilBufferSize());
- obj1.setStencilBufferSize(1);
- QCOMPARE(1, obj1.stencilBufferSize());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -2147483648");
- obj1.setStencilBufferSize(TEST_INT_MIN);
- QCOMPARE(1, obj1.stencilBufferSize()); // Makes no sense with a negative buffer size
- obj1.setStencilBufferSize(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setStencilBufferSize: Cannot set negative stencil buffer size -1");
- obj1.setStencilBufferSize(-1);
- QCOMPARE(3, obj1.stencilBufferSize());
- obj1.setStencilBufferSize(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.stencilBufferSize());
-
- // bool QGLFormat::sampleBuffers()
- // void QGLFormat::setSampleBuffers(bool)
- QCOMPARE(false, obj1.sampleBuffers());
- QVERIFY(!obj1.testOption(QGL::SampleBuffers));
- QVERIFY(obj1.testOption(QGL::NoSampleBuffers));
-
- obj1.setSampleBuffers(false);
- QCOMPARE(false, obj1.sampleBuffers());
- QVERIFY(obj1.testOption(QGL::NoSampleBuffers));
- obj1.setSampleBuffers(true);
- QCOMPARE(true, obj1.sampleBuffers());
- QVERIFY(obj1.testOption(QGL::SampleBuffers));
-
- // int QGLFormat::samples()
- // void QGLFormat::setSamples(int)
- QCOMPARE(-1, obj1.samples());
- obj1.setSamples(0);
- QCOMPARE(0, obj1.samples());
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setSamples: Cannot have negative number of samples per pixel -2147483648");
- obj1.setSamples(TEST_INT_MIN);
- QCOMPARE(0, obj1.samples()); // Makes no sense with a negative sample size
- obj1.setSamples(3);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setSamples: Cannot have negative number of samples per pixel -1");
- obj1.setSamples(-1);
- QCOMPARE(3, obj1.samples());
- obj1.setSamples(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.samples());
-
- // int QGLFormat::swapInterval()
- // void QGLFormat::setSwapInterval(int)
- QCOMPARE(-1, obj1.swapInterval());
- obj1.setSwapInterval(0);
- QCOMPARE(0, obj1.swapInterval());
- obj1.setSwapInterval(TEST_INT_MIN);
- QCOMPARE(TEST_INT_MIN, obj1.swapInterval());
- obj1.setSwapInterval(-1);
- QCOMPARE(-1, obj1.swapInterval());
- obj1.setSwapInterval(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.swapInterval());
-
- // bool QGLFormat::doubleBuffer()
- // void QGLFormat::setDoubleBuffer(bool)
- QCOMPARE(true, obj1.doubleBuffer());
- QVERIFY(obj1.testOption(QGL::DoubleBuffer));
- QVERIFY(!obj1.testOption(QGL::SingleBuffer));
- obj1.setDoubleBuffer(false);
- QCOMPARE(false, obj1.doubleBuffer());
- QVERIFY(!obj1.testOption(QGL::DoubleBuffer));
- QVERIFY(obj1.testOption(QGL::SingleBuffer));
- obj1.setDoubleBuffer(true);
- QCOMPARE(true, obj1.doubleBuffer());
- QVERIFY(obj1.testOption(QGL::DoubleBuffer));
- QVERIFY(!obj1.testOption(QGL::SingleBuffer));
-
- // bool QGLFormat::depth()
- // void QGLFormat::setDepth(bool)
- QCOMPARE(true, obj1.depth());
- QVERIFY(obj1.testOption(QGL::DepthBuffer));
- QVERIFY(!obj1.testOption(QGL::NoDepthBuffer));
- obj1.setDepth(false);
- QCOMPARE(false, obj1.depth());
- QVERIFY(!obj1.testOption(QGL::DepthBuffer));
- QVERIFY(obj1.testOption(QGL::NoDepthBuffer));
- obj1.setDepth(true);
- QCOMPARE(true, obj1.depth());
- QVERIFY(obj1.testOption(QGL::DepthBuffer));
- QVERIFY(!obj1.testOption(QGL::NoDepthBuffer));
-
- // bool QGLFormat::rgba()
- // void QGLFormat::setRgba(bool)
- QCOMPARE(true, obj1.rgba());
- QVERIFY(obj1.testOption(QGL::Rgba));
- QVERIFY(!obj1.testOption(QGL::ColorIndex));
- obj1.setRgba(false);
- QCOMPARE(false, obj1.rgba());
- QVERIFY(!obj1.testOption(QGL::Rgba));
- QVERIFY(obj1.testOption(QGL::ColorIndex));
- obj1.setRgba(true);
- QCOMPARE(true, obj1.rgba());
- QVERIFY(obj1.testOption(QGL::Rgba));
- QVERIFY(!obj1.testOption(QGL::ColorIndex));
-
- // bool QGLFormat::alpha()
- // void QGLFormat::setAlpha(bool)
- QVERIFY(obj1.testOption(QGL::AlphaChannel));
- QVERIFY(!obj1.testOption(QGL::NoAlphaChannel));
- obj1.setAlpha(false);
- QCOMPARE(false, obj1.alpha());
- QVERIFY(!obj1.testOption(QGL::AlphaChannel));
- QVERIFY(obj1.testOption(QGL::NoAlphaChannel));
- obj1.setAlpha(true);
- QCOMPARE(true, obj1.alpha());
- QVERIFY(obj1.testOption(QGL::AlphaChannel));
- QVERIFY(!obj1.testOption(QGL::NoAlphaChannel));
-
- // bool QGLFormat::accum()
- // void QGLFormat::setAccum(bool)
- obj1.setAccumBufferSize(0);
- QCOMPARE(false, obj1.accum());
- QVERIFY(!obj1.testOption(QGL::AccumBuffer));
- QVERIFY(obj1.testOption(QGL::NoAccumBuffer));
- obj1.setAccum(false);
- QCOMPARE(false, obj1.accum());
- QVERIFY(!obj1.testOption(QGL::AccumBuffer));
- QVERIFY(obj1.testOption(QGL::NoAccumBuffer));
- obj1.setAccum(true);
- QCOMPARE(true, obj1.accum());
- QVERIFY(obj1.testOption(QGL::AccumBuffer));
- QVERIFY(!obj1.testOption(QGL::NoAccumBuffer));
-
- // bool QGLFormat::stencil()
- // void QGLFormat::setStencil(bool)
- QCOMPARE(true, obj1.stencil());
- QVERIFY(obj1.testOption(QGL::StencilBuffer));
- QVERIFY(!obj1.testOption(QGL::NoStencilBuffer));
- obj1.setStencil(false);
- QCOMPARE(false, obj1.stencil());
- QVERIFY(!obj1.testOption(QGL::StencilBuffer));
- QVERIFY(obj1.testOption(QGL::NoStencilBuffer));
- obj1.setStencil(true);
- QCOMPARE(true, obj1.stencil());
- QVERIFY(obj1.testOption(QGL::StencilBuffer));
- QVERIFY(!obj1.testOption(QGL::NoStencilBuffer));
-
- // bool QGLFormat::stereo()
- // void QGLFormat::setStereo(bool)
- QCOMPARE(false, obj1.stereo());
- QVERIFY(!obj1.testOption(QGL::StereoBuffers));
- QVERIFY(obj1.testOption(QGL::NoStereoBuffers));
- obj1.setStereo(false);
- QCOMPARE(false, obj1.stereo());
- QVERIFY(!obj1.testOption(QGL::StereoBuffers));
- QVERIFY(obj1.testOption(QGL::NoStereoBuffers));
- obj1.setStereo(true);
- QCOMPARE(true, obj1.stereo());
- QVERIFY(obj1.testOption(QGL::StereoBuffers));
- QVERIFY(!obj1.testOption(QGL::NoStereoBuffers));
-
- // bool QGLFormat::directRendering()
- // void QGLFormat::setDirectRendering(bool)
- QCOMPARE(true, obj1.directRendering());
- QVERIFY(obj1.testOption(QGL::DirectRendering));
- QVERIFY(!obj1.testOption(QGL::IndirectRendering));
- obj1.setDirectRendering(false);
- QCOMPARE(false, obj1.directRendering());
- QVERIFY(!obj1.testOption(QGL::DirectRendering));
- QVERIFY(obj1.testOption(QGL::IndirectRendering));
- obj1.setDirectRendering(true);
- QCOMPARE(true, obj1.directRendering());
- QVERIFY(obj1.testOption(QGL::DirectRendering));
- QVERIFY(!obj1.testOption(QGL::IndirectRendering));
-
- // bool QGLFormat::overlay()
- // void QGLFormat::setOverlay(bool)
- QCOMPARE(false, obj1.hasOverlay());
- QVERIFY(!obj1.testOption(QGL::HasOverlay));
- QVERIFY(obj1.testOption(QGL::NoOverlay));
- obj1.setOverlay(false);
- QCOMPARE(false, obj1.hasOverlay());
- QVERIFY(!obj1.testOption(QGL::HasOverlay));
- QVERIFY(obj1.testOption(QGL::NoOverlay));
- obj1.setOverlay(true);
- QCOMPARE(true, obj1.hasOverlay());
- QVERIFY(obj1.testOption(QGL::HasOverlay));
- QVERIFY(!obj1.testOption(QGL::NoOverlay));
-
- // int QGLFormat::plane()
- // void QGLFormat::setPlane(int)
- QCOMPARE(0, obj1.plane());
- obj1.setPlane(0);
- QCOMPARE(0, obj1.plane());
- obj1.setPlane(TEST_INT_MIN);
- QCOMPARE(TEST_INT_MIN, obj1.plane());
- obj1.setPlane(TEST_INT_MAX);
- QCOMPARE(TEST_INT_MAX, obj1.plane());
-
- // int QGLFormat::major/minorVersion()
- // void QGLFormat::setVersion(int, int)
- QCOMPARE(obj1.majorVersion(), 2);
- QCOMPARE(obj1.minorVersion(), 0);
- obj1.setVersion(3, 2);
- QCOMPARE(obj1.majorVersion(), 3);
- QCOMPARE(obj1.minorVersion(), 2);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setVersion: Cannot set zero or negative version number 0.1");
- obj1.setVersion(0, 1);
- QCOMPARE(obj1.majorVersion(), 3);
- QCOMPARE(obj1.minorVersion(), 2);
- QTest::ignoreMessage(QtWarningMsg, "QGLFormat::setVersion: Cannot set zero or negative version number 3.-1");
- obj1.setVersion(3, -1);
- QCOMPARE(obj1.majorVersion(), 3);
- QCOMPARE(obj1.minorVersion(), 2);
- obj1.setVersion(TEST_INT_MAX, TEST_INT_MAX - 1);
- QCOMPARE(obj1.majorVersion(), TEST_INT_MAX);
- QCOMPARE(obj1.minorVersion(), TEST_INT_MAX - 1);
-
-
- // operator== and operator!= for QGLFormat
- QGLFormat format1;
- QGLFormat format2;
-
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
- format1.setDoubleBuffer(false);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setDoubleBuffer(false);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setDepthBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setDepthBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setAccumBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setAccumBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setRedBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setRedBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setGreenBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setGreenBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setBlueBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setBlueBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setAlphaBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setAlphaBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setStencilBufferSize(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setStencilBufferSize(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setSamples(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setSamples(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setSwapInterval(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setSwapInterval(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setPlane(8);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setPlane(8);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setVersion(3, 2);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setVersion(3, 2);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setProfile(QGLFormat::CoreProfile);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setProfile(QGLFormat::CoreProfile);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- format1.setOption(QGL::NoDeprecatedFunctions);
- QVERIFY(!(format1 == format2));
- QVERIFY(format1 != format2);
- format2.setOption(QGL::NoDeprecatedFunctions);
- QCOMPARE(format1, format2);
- QVERIFY(!(format1 != format2));
-
- // Copy constructor and assignment for QGLFormat.
- QGLFormat format3(format1);
- QGLFormat format4;
- QCOMPARE(format1, format3);
- QVERIFY(format1 != format4);
- format4 = format1;
- QCOMPARE(format1, format4);
-
- // Check that modifying a copy doesn't affect the original.
- format3.setRedBufferSize(16);
- format4.setPlane(16);
- QCOMPARE(format1.redBufferSize(), 8);
- QCOMPARE(format1.plane(), 8);
-
- // Check the QGLFormat constructor that takes an option list.
- QGLFormat format5
- (QGL::DepthBuffer | QGL::StereoBuffers | QGL::ColorIndex, 3);
- QVERIFY(format5.depth());
- QVERIFY(format5.stereo());
- QVERIFY(format5.doubleBuffer()); // From defaultFormat()
- QVERIFY(!format5.hasOverlay()); // From defaultFormat()
- QVERIFY(!format5.rgba());
- QCOMPARE(format5.plane(), 3);
-
- // The default format should be the same as QGLFormat().
- QCOMPARE(QGLFormat::defaultFormat(), QGLFormat());
-
- // Modify the default format and check that it was changed.
- QGLFormat::setDefaultFormat(format1);
- QCOMPARE(QGLFormat::defaultFormat(), format1);
-
- // Restore the default format.
- QGLFormat::setDefaultFormat(QGLFormat());
- QCOMPARE(QGLFormat::defaultFormat(), QGLFormat());
-
- // Check the default overlay format's expected values.
- QGLFormat overlay(QGLFormat::defaultOverlayFormat());
- QCOMPARE(overlay.depthBufferSize(), -1);
- QCOMPARE(overlay.accumBufferSize(), -1);
- QCOMPARE(overlay.redBufferSize(), -1);
- QCOMPARE(overlay.greenBufferSize(), -1);
- QCOMPARE(overlay.blueBufferSize(), -1);
- QCOMPARE(overlay.alphaBufferSize(), -1);
- QCOMPARE(overlay.samples(), -1);
- QCOMPARE(overlay.swapInterval(), -1);
- QCOMPARE(overlay.plane(), 1);
- QVERIFY(!overlay.sampleBuffers());
- QVERIFY(!overlay.doubleBuffer());
- QVERIFY(!overlay.depth());
- QVERIFY(!overlay.rgba());
- QVERIFY(!overlay.alpha());
- QVERIFY(!overlay.accum());
- QVERIFY(!overlay.stencil());
- QVERIFY(!overlay.stereo());
- QVERIFY(overlay.directRendering()); // Only option that should be on.
- QVERIFY(!overlay.hasOverlay()); // Overlay doesn't need an overlay!
-
- // Modify the default overlay format and check that it was changed.
- QGLFormat::setDefaultOverlayFormat(format1);
- QCOMPARE(QGLFormat::defaultOverlayFormat(), format1);
-
- // Restore the default overlay format.
- QGLFormat::setDefaultOverlayFormat(overlay);
- QCOMPARE(QGLFormat::defaultOverlayFormat(), overlay);
-
- MyGLContext obj2(obj1);
- // bool QGLContext::windowCreated()
- // void QGLContext::setWindowCreated(bool)
- obj2.setWindowCreated(false);
- QCOMPARE(false, obj2.windowCreated());
- obj2.setWindowCreated(true);
- QCOMPARE(true, obj2.windowCreated());
-
- // bool QGLContext::initialized()
- // void QGLContext::setInitialized(bool)
- obj2.setInitialized(false);
- QCOMPARE(false, obj2.initialized());
- obj2.setInitialized(true);
- QCOMPARE(true, obj2.initialized());
-
- MyGLWidget obj3;
- // bool QGLWidget::autoBufferSwap()
- // void QGLWidget::setAutoBufferSwap(bool)
- obj3.setAutoBufferSwap(false);
- QCOMPARE(false, obj3.autoBufferSwap());
- obj3.setAutoBufferSwap(true);
- QCOMPARE(true, obj3.autoBufferSwap());
-}
-
-#ifdef QT_BUILD_INTERNAL
-QT_BEGIN_NAMESPACE
-extern QGLFormat::OpenGLVersionFlags qOpenGLVersionFlagsFromString(const QString &versionString);
-QT_END_NAMESPACE
-#endif
-
-#ifdef QT_BUILD_INTERNAL
-void tst_QGL::openGLVersionCheck()
-{
- QString versionString;
- QGLFormat::OpenGLVersionFlags expectedFlag;
- QGLFormat::OpenGLVersionFlags versionFlag;
-
- versionString = "1.1 Irix 6.5";
- expectedFlag = QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "1.2 Microsoft";
- expectedFlag = QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "1.2.1";
- expectedFlag = QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "1.3 NVIDIA";
- expectedFlag = QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "1.4";
- expectedFlag = QGLFormat::OpenGL_Version_1_4 | QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "1.5 NVIDIA";
- expectedFlag = QGLFormat::OpenGL_Version_1_5 | QGLFormat::OpenGL_Version_1_4 | QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "2.0.2 NVIDIA 87.62";
- expectedFlag = QGLFormat::OpenGL_Version_2_0 | QGLFormat::OpenGL_Version_1_5 | QGLFormat::OpenGL_Version_1_4 | QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "2.1 NVIDIA";
- expectedFlag = QGLFormat::OpenGL_Version_2_1 | QGLFormat::OpenGL_Version_2_0 | QGLFormat::OpenGL_Version_1_5 | QGLFormat::OpenGL_Version_1_4 | QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "2.1";
- expectedFlag = QGLFormat::OpenGL_Version_2_1 | QGLFormat::OpenGL_Version_2_0 | QGLFormat::OpenGL_Version_1_5 | QGLFormat::OpenGL_Version_1_4 | QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "OpenGL ES-CM 1.0 ATI";
- expectedFlag = QGLFormat::OpenGL_ES_Common_Version_1_0 | QGLFormat::OpenGL_ES_CommonLite_Version_1_0;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "OpenGL ES-CL 1.0 ATI";
- expectedFlag = QGLFormat::OpenGL_ES_CommonLite_Version_1_0;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "OpenGL ES-CM 1.1 ATI";
- expectedFlag = QGLFormat::OpenGL_ES_Common_Version_1_1 | QGLFormat::OpenGL_ES_CommonLite_Version_1_1 | QGLFormat::OpenGL_ES_Common_Version_1_0 | QGLFormat::OpenGL_ES_CommonLite_Version_1_0;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "OpenGL ES-CL 1.1 ATI";
- expectedFlag = QGLFormat::OpenGL_ES_CommonLite_Version_1_1 | QGLFormat::OpenGL_ES_CommonLite_Version_1_0;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "OpenGL ES 2.0 ATI";
- expectedFlag = QGLFormat::OpenGL_ES_Version_2_0;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- versionString = "3.0";
- expectedFlag = QGLFormat::OpenGL_Version_3_0 | QGLFormat::OpenGL_Version_2_1 | QGLFormat::OpenGL_Version_2_0 | QGLFormat::OpenGL_Version_1_5 | QGLFormat::OpenGL_Version_1_4 | QGLFormat::OpenGL_Version_1_3 | QGLFormat::OpenGL_Version_1_2 | QGLFormat::OpenGL_Version_1_1;
- versionFlag = qOpenGLVersionFlagsFromString(versionString);
- QCOMPARE(versionFlag, expectedFlag);
-
- QGLWidget glWidget;
- glWidget.show();
- glWidget.makeCurrent();
-
- // This is unfortunately the only test we can make on the actual openGLVersionFlags()
- // However, the complicated parts are in openGLVersionFlags(const QString &versionString)
- // tested above
-
-#if defined(QT_OPENGL_ES_2)
- QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
-#else
- if (QOpenGLContext::currentContext()->isOpenGLES())
- QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
- else
- QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
-#endif //defined(QT_OPENGL_ES_2)
-}
-#endif //QT_BUILD_INTERNAL
-
-static bool fuzzyComparePixels(const QRgb testPixel, const QRgb refPixel, const char* file, int line, int x = -1, int y = -1)
-{
- static int maxFuzz = 1;
- static bool maxFuzzSet = false;
-
- // On 16 bpp systems, we need to allow for more fuzz:
- if (!maxFuzzSet) {
- maxFuzzSet = true;
- if (appDefaultDepth() < 24)
- maxFuzz = 32;
- }
-
- int redFuzz = qAbs(qRed(testPixel) - qRed(refPixel));
- int greenFuzz = qAbs(qGreen(testPixel) - qGreen(refPixel));
- int blueFuzz = qAbs(qBlue(testPixel) - qBlue(refPixel));
- int alphaFuzz = qAbs(qAlpha(testPixel) - qAlpha(refPixel));
-
- if (refPixel != 0 && testPixel == 0) {
- QString msg;
- if (x >= 0) {
- msg = QString("Test pixel [%1, %2] is null (black) when it should be (%3,%4,%5,%6)")
- .arg(x).arg(y)
- .arg(qRed(refPixel)).arg(qGreen(refPixel)).arg(qBlue(refPixel)).arg(qAlpha(refPixel));
- } else {
- msg = QString("Test pixel is null (black) when it should be (%2,%3,%4,%5)")
- .arg(qRed(refPixel)).arg(qGreen(refPixel)).arg(qBlue(refPixel)).arg(qAlpha(refPixel));
- }
-
- QTest::qFail(msg.toLatin1(), file, line);
- return false;
- }
-
- if (redFuzz > maxFuzz || greenFuzz > maxFuzz || blueFuzz > maxFuzz || alphaFuzz > maxFuzz) {
- QString msg;
-
- if (x >= 0)
- msg = QString("Pixel [%1,%2]: ").arg(x).arg(y);
- else
- msg = QString("Pixel ");
-
- msg += QString("Max fuzz (%1) exceeded: (%2,%3,%4,%5) vs (%6,%7,%8,%9)")
- .arg(maxFuzz)
- .arg(qRed(testPixel)).arg(qGreen(testPixel)).arg(qBlue(testPixel)).arg(qAlpha(testPixel))
- .arg(qRed(refPixel)).arg(qGreen(refPixel)).arg(qBlue(refPixel)).arg(qAlpha(refPixel));
- QTest::qFail(msg.toLatin1(), file, line);
- return false;
- }
- return true;
-}
-
-static void fuzzyCompareImages(const QImage &testImage, const QImage &referenceImage, const char* file, int line)
-{
- QCOMPARE(testImage.width(), referenceImage.width());
- QCOMPARE(testImage.height(), referenceImage.height());
-
- for (int y = 0; y < testImage.height(); y++) {
- for (int x = 0; x < testImage.width(); x++) {
- if (!fuzzyComparePixels(testImage.pixel(x, y), referenceImage.pixel(x, y), file, line, x, y)) {
- // Might as well save the images for easier debugging:
- referenceImage.save("referenceImage.png");
- testImage.save("testImage.png");
- return;
- }
- }
- }
-}
-
-#define QFUZZY_COMPARE_IMAGES(A,B) \
- fuzzyCompareImages(A, B, __FILE__, __LINE__)
-
-#define QFUZZY_COMPARE_PIXELS(A,B) \
- fuzzyComparePixels(A, B, __FILE__, __LINE__)
-
-class UnclippedWidget : public QWidget
-{
-public:
- bool painted;
-
- UnclippedWidget()
- : painted(false)
- {
- }
-
- void paintEvent(QPaintEvent *)
- {
- QPainter p(this);
- p.fillRect(rect().adjusted(-1000, -1000, 1000, 1000), Qt::black);
-
- painted = true;
- }
-};
-
-void tst_QGL::graphicsViewClipping()
-{
- const int size = 64;
- UnclippedWidget *widget = new UnclippedWidget;
- widget->setFixedSize(size, size);
-
- QGraphicsScene scene;
-
- scene.addWidget(widget)->setPos(0, 0);
-
- QGraphicsView view(&scene);
- // Use Qt::Tool as fully decorated windows have a minimum width of 160 on Windows.
- view.setWindowFlags(view.windowFlags() | Qt::Tool);
- view.setBackgroundBrush(Qt::white);
- view.resize(2*size, 2*size);
-
- QGLWidget *viewport = new QGLWidget;
- view.setViewport(viewport);
- view.show();
- qApp->setActiveWindow(&view);
-
- if (!viewport->isValid())
- return;
-
- scene.setSceneRect(view.viewport()->rect());
-
- QVERIFY(QTest::qWaitForWindowExposed(view.viewport()->windowHandle()));
- #ifdef Q_OS_MAC
- // The black rectangle jumps from the center to the upper left for some reason.
- QTest::qWait(100);
- #endif
-
- QTRY_VERIFY(widget->painted);
-
- QImage image = viewport->grabFrameBuffer();
- QImage expected = image;
-
- QPainter p(&expected);
- p.fillRect(expected.rect(), Qt::white);
- p.fillRect(QRect(0, 0, size, size), Qt::black);
- p.end();
-
- QFUZZY_COMPARE_IMAGES(image, expected);
-}
-
-void tst_QGL::partialGLWidgetUpdates_data()
-{
- QTest::addColumn<bool>("doubleBufferedContext");
- QTest::addColumn<bool>("autoFillBackground");
- QTest::addColumn<bool>("supportsPartialUpdates");
-
- QTest::newRow("Double buffered context") << true << true << false;
- QTest::newRow("Double buffered context without auto-fill background") << true << false << false;
- QTest::newRow("Single buffered context") << false << true << false;
- QTest::newRow("Single buffered context without auto-fill background") << false << false << true;
-}
-
-void tst_QGL::partialGLWidgetUpdates()
-{
- QFETCH(bool, doubleBufferedContext);
- QFETCH(bool, autoFillBackground);
- QFETCH(bool, supportsPartialUpdates);
-
- class MyGLWidget : public QGLWidget
- {
- public:
- QRegion paintEventRegion;
- void paintEvent(QPaintEvent *e)
- {
- paintEventRegion = e->region();
- }
- };
-
- QGLFormat format = QGLFormat::defaultFormat();
- format.setDoubleBuffer(doubleBufferedContext);
- QGLFormat::setDefaultFormat(format);
-
- MyGLWidget widget;
- widget.setFixedSize(150, 150);
- widget.setAutoFillBackground(autoFillBackground);
- widget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&widget));
- QCoreApplication::processEvents(); // Process all queued paint events
-
- if (widget.format().doubleBuffer() != doubleBufferedContext)
- QSKIP("Platform does not support requested format");
-
- widget.paintEventRegion = QRegion();
- widget.repaint(50, 50, 50, 50);
-
- if (supportsPartialUpdates)
- QCOMPARE(widget.paintEventRegion, QRegion(50, 50, 50, 50));
- else
- QCOMPARE(widget.paintEventRegion, QRegion(widget.rect()));
-}
-
-
-// This tests that rendering to a QGLPBuffer using QPainter works.
-void tst_QGL::glPBufferRendering()
-{
- if (!QGLPixelBuffer::hasOpenGLPbuffers())
- QSKIP("QGLPixelBuffer not supported on this platform");
-
- QGLPixelBuffer* pbuf = new QGLPixelBuffer(128, 128);
-
- QPainter p;
- bool begun = p.begin(pbuf);
- QVERIFY(begun);
-
- QPaintEngine::Type engineType = p.paintEngine()->type();
- QVERIFY(engineType == QPaintEngine::OpenGL || engineType == QPaintEngine::OpenGL2);
-
- p.fillRect(0, 0, 128, 128, Qt::red);
- p.fillRect(32, 32, 64, 64, Qt::blue);
- p.end();
-
- QImage fb = pbuf->toImage();
- delete pbuf;
-
- QImage reference(128, 128, fb.format());
- p.begin(&reference);
- p.fillRect(0, 0, 128, 128, Qt::red);
- p.fillRect(32, 32, 64, 64, Qt::blue);
- p.end();
-
- QFUZZY_COMPARE_IMAGES(fb, reference);
-}
-
-void tst_QGL::glWidgetWithAlpha()
-{
- QGLWidget* w = new QGLWidget(QGLFormat(QGL::AlphaChannel));
- w->show();
- QVERIFY(QTest::qWaitForWindowExposed(w));
-
- delete w;
-}
-
-
-void qt_opengl_draw_test_pattern(QPainter* painter, int width, int height)
-{
- QPainterPath intersectingPath;
- intersectingPath.moveTo(0, 0);
- intersectingPath.lineTo(100, 0);
- intersectingPath.lineTo(0, 100);
- intersectingPath.lineTo(100, 100);
- intersectingPath.closeSubpath();
-
- QPainterPath trianglePath;
- trianglePath.moveTo(50, 0);
- trianglePath.lineTo(100, 100);
- trianglePath.lineTo(0, 100);
- trianglePath.closeSubpath();
-
- painter->setTransform(QTransform()); // reset xform
- painter->fillRect(-1, -1, width+2, height+2, Qt::red); // Background
- painter->translate(14, 14);
- painter->fillPath(intersectingPath, Qt::blue); // Test stencil buffer works
- painter->translate(128, 0);
- painter->setClipPath(trianglePath); // Test depth buffer works
- painter->setTransform(QTransform()); // reset xform ready for fill
- painter->fillRect(-1, -1, width+2, height+2, Qt::green);
-}
-
-void qt_opengl_check_test_pattern(const QImage& img)
-{
- // As we're doing more than trivial painting, we can't just compare to
- // an image rendered with raster. Instead, we sample at well-defined
- // test-points:
- QFUZZY_COMPARE_PIXELS(img.pixel(39, 64), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(img.pixel(89, 64), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(img.pixel(64, 39), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(img.pixel(64, 89), QColor(Qt::blue).rgb());
-
- QFUZZY_COMPARE_PIXELS(img.pixel(167, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(img.pixel(217, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(img.pixel(192, 64), QColor(Qt::green).rgb());
-}
-
-class GLWidget : public QGLWidget
-{
-public:
- GLWidget(QWidget* p = 0)
- : QGLWidget(p), beginOk(false), engineType(QPaintEngine::MaxUser) {}
- bool beginOk;
- QPaintEngine::Type engineType;
- void paintGL()
- {
- QPainter p;
- beginOk = p.begin(this);
- QPaintEngine* pe = p.paintEngine();
- engineType = pe->type();
-
- qt_opengl_draw_test_pattern(&p, width(), height());
-
- // No p.end() or swap buffers, should be done automatically
- }
-
-};
-
-void tst_QGL::glWidgetRendering()
-{
- GLWidget w;
- w.resize(256, 128);
- w.show();
-
- QVERIFY(QTest::qWaitForWindowExposed(&w));
-
- QVERIFY(w.beginOk);
- QVERIFY(w.engineType == QPaintEngine::OpenGL || w.engineType == QPaintEngine::OpenGL2);
-
-#if defined(Q_OS_QNX)
- // glReadPixels reads from the back buffer. On QNX the buffer is not preserved
- // after a buffer swap. This is why we have to swap the buffer explicitly before calling
- // grabFrameBuffer to retrieve the content of the front buffer.
- w.swapBuffers();
-#endif
- QImage fb = w.grabFrameBuffer(false);
- qt_opengl_check_test_pattern(fb);
-}
-
-void tst_QGL::glFBOSimpleRendering()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
- QGLWidget glw;
- glw.makeCurrent();
-
- // No multisample with combined depth/stencil attachment:
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::NoAttachment);
-
- QGLFramebufferObject *fbo = new QGLFramebufferObject(200, 100, fboFormat);
-
- fbo->bind();
-
- QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- funcs->glClearColor(1.0, 0.0, 0.0, 1.0);
- funcs->glClear(GL_COLOR_BUFFER_BIT);
- funcs->glFinish();
-
- QImage fb = fbo->toImage().convertToFormat(QImage::Format_RGB32);
- QImage reference(fb.size(), QImage::Format_RGB32);
- reference.fill(0xffff0000);
-
- QFUZZY_COMPARE_IMAGES(fb, reference);
-
- delete fbo;
-}
-
-// NOTE: This tests that CombinedDepthStencil attachment works by assuming the
-// GL2 engine is being used and is implemented the same way as it was when
-// this autotest was written. If this is not the case, there may be some
-// false-positives: I.e. The test passes when either the depth or stencil
-// buffer is actually missing. But that's probably ok anyway.
-void tst_QGL::glFBORendering()
-{
-#if defined(Q_OS_QNX)
- QSKIP("Reading the QGLFramebufferObject is unsupported on this platform");
-#endif
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
- QGLWidget glw;
- glw.makeCurrent();
-
- // No multisample with combined depth/stencil attachment:
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
-
- // Don't complicate things by using NPOT:
- QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat);
-
- if (fbo->attachment() != QGLFramebufferObject::CombinedDepthStencil) {
- delete fbo;
- QSKIP("FBOs missing combined depth~stencil support");
- }
-
- QPainter fboPainter;
- bool painterBegun = fboPainter.begin(fbo);
- QVERIFY(painterBegun);
-
- qt_opengl_draw_test_pattern(&fboPainter, fbo->width(), fbo->height());
-
- fboPainter.end();
-
- QImage fb = fbo->toImage().convertToFormat(QImage::Format_RGB32);
- delete fbo;
-
- qt_opengl_check_test_pattern(fb);
-}
-
-class QOpenGLFramebufferObjectPaintDevice : public QOpenGLPaintDevice
-{
-public:
- QOpenGLFramebufferObjectPaintDevice(int width, int height)
- : QOpenGLPaintDevice(width, height)
- , m_fbo(width, height, QOpenGLFramebufferObject::CombinedDepthStencil)
- {
- }
-
- void ensureActiveTarget()
- {
- m_fbo.bind();
- }
-
- QImage toImage() const
- {
- return m_fbo.toImage();
- }
-
-private:
- QOpenGLFramebufferObject m_fbo;
-};
-
-void tst_QGL::currentFboSync()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
-#if defined(Q_OS_QNX)
- QSKIP("Reading the QGLFramebufferObject is unsupported on this platform");
-#endif
-
- QGLWidget glw;
- glw.makeCurrent();
-
- // For some reason we offer inter-operatibility between QGL and QOpenGL
- // paint engines. (?!) Let's check if the two engines can be used to perform
- // drawing in turns on different targets within the same context.
-
- {
- QGLFramebufferObject fbo1(256, 256, QGLFramebufferObject::CombinedDepthStencil);
-
- QOpenGLFramebufferObjectPaintDevice fbo2(256, 256);
-
- QImage sourceImage(256, 256, QImage::Format_ARGB32_Premultiplied);
- QPainter sourcePainter(&sourceImage);
- qt_opengl_draw_test_pattern(&sourcePainter, 256, 256);
-
- QPainter fbo1Painter(&fbo1);
-
- QPainter fbo2Painter(&fbo2);
- fbo2Painter.drawImage(0, 0, sourceImage);
- fbo2Painter.end();
-
- QImage fbo2Image = fbo2.toImage();
-
- fbo1Painter.drawImage(0, 0, sourceImage);
- fbo1Painter.end();
-
- QGLFramebufferObject::bindDefault();
-
- // Convert the QGLFBO's result since QOpenGLFBO uses a wider
- // variety of possible return formats.
- QCOMPARE(fbo1.toImage().convertToFormat(fbo2Image.format()), fbo2Image);
- }
-
- {
- QGLFramebufferObject fbo1(512, 512, QGLFramebufferObject::CombinedDepthStencil);
-
- QOpenGLFramebufferObjectPaintDevice fbo2(256, 256);
-
- QImage sourceImage(256, 256, QImage::Format_ARGB32_Premultiplied);
- QPainter sourcePainter(&sourceImage);
- qt_opengl_draw_test_pattern(&sourcePainter, 256, 256);
-
- QPainter fbo2Painter(&fbo2);
- fbo2Painter.drawImage(0, 0, sourceImage);
- QImage fbo2Image1 = fbo2.toImage();
- fbo2Painter.fillRect(0, 0, 256, 256, Qt::white);
-
- QPainter fbo1Painter(&fbo1);
- fbo1Painter.drawImage(0, 0, sourceImage);
- fbo1Painter.end();
-
- // check that the OpenGL paint engine now knows it needs to sync
- fbo2Painter.drawImage(0, 0, sourceImage);
- QImage fbo2Image2 = fbo2.toImage();
-
- fbo2Painter.end();
-
- QCOMPARE(fbo2Image1, fbo2Image2);
- }
-}
-
-// Tests multiple QPainters active on different FBOs at the same time, with
-// interleaving painting. Performance-wise, this is sub-optimal, but it still
-// has to work flawlessly
-void tst_QGL::multipleFBOInterleavedRendering()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
- QGLWidget glw;
- glw.makeCurrent();
-
- // No multisample with combined depth/stencil attachment:
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
-
- QGLFramebufferObject *fbo1 = new QGLFramebufferObject(256, 128, fboFormat);
- QGLFramebufferObject *fbo2 = new QGLFramebufferObject(256, 128, fboFormat);
- QGLFramebufferObject *fbo3 = new QGLFramebufferObject(256, 128, fboFormat);
-
- if ( (fbo1->attachment() != QGLFramebufferObject::CombinedDepthStencil) ||
- (fbo2->attachment() != QGLFramebufferObject::CombinedDepthStencil) ||
- (fbo3->attachment() != QGLFramebufferObject::CombinedDepthStencil) )
- {
- delete fbo1;
- delete fbo2;
- delete fbo3;
- QSKIP("FBOs missing combined depth~stencil support");
- }
-
- QPainter fbo1Painter;
- QPainter fbo2Painter;
- QPainter fbo3Painter;
-
- QVERIFY(fbo1Painter.begin(fbo1));
- QVERIFY(fbo2Painter.begin(fbo2));
- QVERIFY(fbo3Painter.begin(fbo3));
-
- // Confirm we're using the GL2 engine, as interleaved rendering isn't supported
- // on the GL1 engine:
- if (fbo1Painter.paintEngine()->type() != QPaintEngine::OpenGL2)
- QSKIP("Interleaved GL rendering requires OpenGL 2.0 or higher");
-
- QPainterPath intersectingPath;
- intersectingPath.moveTo(0, 0);
- intersectingPath.lineTo(100, 0);
- intersectingPath.lineTo(0, 100);
- intersectingPath.lineTo(100, 100);
- intersectingPath.closeSubpath();
-
- QPainterPath trianglePath;
- trianglePath.moveTo(50, 0);
- trianglePath.lineTo(100, 100);
- trianglePath.lineTo(0, 100);
- trianglePath.closeSubpath();
-
- fbo1Painter.fillRect(0, 0, fbo1->width(), fbo1->height(), Qt::red); // Background
- fbo2Painter.fillRect(0, 0, fbo2->width(), fbo2->height(), Qt::green); // Background
- fbo3Painter.fillRect(0, 0, fbo3->width(), fbo3->height(), Qt::blue); // Background
-
- fbo1Painter.translate(14, 14);
- fbo2Painter.translate(14, 14);
- fbo3Painter.translate(14, 14);
-
- fbo1Painter.fillPath(intersectingPath, Qt::blue); // Test stencil buffer works
- fbo2Painter.fillPath(intersectingPath, Qt::red); // Test stencil buffer works
- fbo3Painter.fillPath(intersectingPath, Qt::green); // Test stencil buffer works
-
- fbo1Painter.translate(128, 0);
- fbo2Painter.translate(128, 0);
- fbo3Painter.translate(128, 0);
-
- fbo1Painter.setClipPath(trianglePath);
- fbo2Painter.setClipPath(trianglePath);
- fbo3Painter.setClipPath(trianglePath);
-
- fbo1Painter.setTransform(QTransform()); // reset xform
- fbo2Painter.setTransform(QTransform()); // reset xform
- fbo3Painter.setTransform(QTransform()); // reset xform
-
- fbo1Painter.fillRect(0, 0, fbo1->width(), fbo1->height(), Qt::green);
- fbo2Painter.fillRect(0, 0, fbo2->width(), fbo2->height(), Qt::blue);
- fbo3Painter.fillRect(0, 0, fbo3->width(), fbo3->height(), Qt::red);
-
- fbo1Painter.end();
- fbo2Painter.end();
- fbo3Painter.end();
-
- QImage fb1 = fbo1->toImage().convertToFormat(QImage::Format_RGB32);
- QImage fb2 = fbo2->toImage().convertToFormat(QImage::Format_RGB32);
- QImage fb3 = fbo3->toImage().convertToFormat(QImage::Format_RGB32);
- delete fbo1;
- delete fbo2;
- delete fbo3;
-
- // As we're doing more than trivial painting, we can't just compare to
- // an image rendered with raster. Instead, we sample at well-defined
- // test-points:
- QFUZZY_COMPARE_PIXELS(fb1.pixel(39, 64), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb1.pixel(89, 64), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb1.pixel(64, 39), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb1.pixel(64, 89), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb1.pixel(167, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb1.pixel(217, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb1.pixel(192, 64), QColor(Qt::green).rgb());
-
- QFUZZY_COMPARE_PIXELS(fb2.pixel(39, 64), QColor(Qt::green).rgb());
- QFUZZY_COMPARE_PIXELS(fb2.pixel(89, 64), QColor(Qt::green).rgb());
- QFUZZY_COMPARE_PIXELS(fb2.pixel(64, 39), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb2.pixel(64, 89), QColor(Qt::red).rgb());
- QFUZZY_COMPARE_PIXELS(fb2.pixel(167, 39), QColor(Qt::green).rgb());
- QFUZZY_COMPARE_PIXELS(fb2.pixel(217, 39), QColor(Qt::green).rgb());
- QFUZZY_COMPARE_PIXELS(fb2.pixel(192, 64), QColor(Qt::blue).rgb());
-
- QFUZZY_COMPARE_PIXELS(fb3.pixel(39, 64), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb3.pixel(89, 64), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb3.pixel(64, 39), QColor(Qt::green).rgb());
- QFUZZY_COMPARE_PIXELS(fb3.pixel(64, 89), QColor(Qt::green).rgb());
- QFUZZY_COMPARE_PIXELS(fb3.pixel(167, 39), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb3.pixel(217, 39), QColor(Qt::blue).rgb());
- QFUZZY_COMPARE_PIXELS(fb3.pixel(192, 64), QColor(Qt::red).rgb());
-}
-
-class FBOUseInGLWidget : public QGLWidget
-{
-public:
- bool widgetPainterBeginOk;
- bool fboPainterBeginOk;
- QImage fboImage;
-protected:
- void paintEvent(QPaintEvent*)
- {
- QPainter widgetPainter;
- widgetPainterBeginOk = widgetPainter.begin(this);
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::NoAttachment);
- QGLFramebufferObject *fbo = new QGLFramebufferObject(100, 100, fboFormat);
-
- QPainter fboPainter;
- fboPainterBeginOk = fboPainter.begin(fbo);
- fboPainter.fillRect(-1, -1, 130, 130, Qt::red);
- fboPainter.end();
- fboImage = fbo->toImage();
-
- widgetPainter.fillRect(-1, -1, width()+2, height()+2, Qt::blue);
-
- delete fbo;
- }
-
-};
-
-void tst_QGL::glFBOUseInGLWidget()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
- FBOUseInGLWidget w;
- w.resize(100, 100);
- w.showNormal();
-
- QVERIFY(QTest::qWaitForWindowExposed(&w));
-
- QVERIFY(w.widgetPainterBeginOk);
- QVERIFY(w.fboPainterBeginOk);
-
-#if defined(Q_OS_QNX)
- // glReadPixels reads from the back buffer. On QNX the buffer is not preserved
- // after a buffer swap. This is why we have to swap the buffer explicitly before calling
- // grabFrameBuffer to retrieve the content of the front buffer
- w.swapBuffers();
-#endif
-
- QImage widgetFB = w.grabFrameBuffer(false);
- QImage widgetReference(widgetFB.size(), widgetFB.format());
- widgetReference.fill(0xff0000ff);
- QFUZZY_COMPARE_IMAGES(widgetFB, widgetReference);
-
- QImage fboReference(w.fboImage.size(), w.fboImage.format());
- fboReference.fill(0xffff0000);
- QFUZZY_COMPARE_IMAGES(w.fboImage, fboReference);
-}
-
-void tst_QGL::glWidgetReparent()
-{
- // Try it as a top-level first:
- GLWidget *widget = new GLWidget;
- widget->setObjectName(QStringLiteral("glWidget1"));
- widget->setGeometry(0, 0, 200, 30);
- widget->show();
-
- QWidget grandParentWidget;
- grandParentWidget.setObjectName(QStringLiteral("grandParentWidget"));
- grandParentWidget.setPalette(Qt::blue);
- QVBoxLayout grandParentLayout(&grandParentWidget);
-
- QWidget parentWidget(&grandParentWidget);
- parentWidget.setObjectName(QStringLiteral("parentWidget"));
- grandParentLayout.addWidget(&parentWidget);
- parentWidget.setPalette(Qt::green);
- parentWidget.setAutoFillBackground(true);
- QVBoxLayout parentLayout(&parentWidget);
-
- grandParentWidget.setGeometry(0, 100, 200, 200);
- grandParentWidget.show();
-
- QVERIFY(QTest::qWaitForWindowExposed(widget));
- QVERIFY(QTest::qWaitForWindowExposed(&grandParentWidget));
-
- QVERIFY(parentWidget.children().count() == 1); // The layout
-
- // Now both widgets should be created & shown, time to re-parent:
- parentLayout.addWidget(widget);
-
- QVERIFY(QTest::qWaitForWindowExposed(&grandParentWidget));
-
- QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget
- QVERIFY(parentWidget.children().contains(widget));
- QTRY_VERIFY(widget->height() > 30);
-
- delete widget;
-
- QVERIFY(QTest::qWaitForWindowExposed(&grandParentWidget));
-
- QVERIFY(parentWidget.children().count() == 1); // The layout
-
- // Now do pretty much the same thing, but don't show the
- // widget first:
- widget = new GLWidget;
- widget->setObjectName(QStringLiteral("glWidget2"));
- parentLayout.addWidget(widget);
-
- QVERIFY(QTest::qWaitForWindowExposed(&grandParentWidget));
-
- QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget
- QVERIFY(parentWidget.children().contains(widget));
- QVERIFY(widget->height() > 30);
-
- delete widget;
-}
-
-class RenderPixmapWidget : public QGLWidget
-{
-protected:
- void initializeGL() {
- // Set some gl state:
- QOpenGLContext::currentContext()->functions()->glClearColor(1.0, 0.0, 0.0, 1.0);
- }
-
- void paintGL() {
- QOpenGLContext::currentContext()->functions()->glClear(GL_COLOR_BUFFER_BIT);
- }
-};
-
-void tst_QGL::glWidgetRenderPixmap()
-{
- RenderPixmapWidget *w = new RenderPixmapWidget;
-
- QSize pmSize = QSize(100, 100);
- QPixmap pm = w->renderPixmap(pmSize.width(), pmSize.height(), false);
-
- delete w;
-
- QImage fb = pm.toImage().convertToFormat(QImage::Format_RGB32);
- QImage reference(pmSize, QImage::Format_RGB32);
- reference.fill(0xffff0000);
-
- QFUZZY_COMPARE_IMAGES(fb, reference);
-}
-
-class ColormapExtended : public QGLColormap
-{
-public:
- ColormapExtended() {}
-
- Qt::HANDLE handle() { return QGLColormap::handle(); }
- void setHandle(Qt::HANDLE handle) { QGLColormap::setHandle(handle); }
-};
-
-void tst_QGL::colormap()
-{
- // Check the properties of the default empty colormap.
- QGLColormap cmap1;
- QVERIFY(cmap1.isEmpty());
- QCOMPARE(cmap1.size(), 0);
- QCOMPARE(cmap1.entryRgb(0), QRgb(0));
- QCOMPARE(cmap1.entryRgb(-1), QRgb(0));
- QCOMPARE(cmap1.entryRgb(100), QRgb(0));
- QVERIFY(!cmap1.entryColor(0).isValid());
- QVERIFY(!cmap1.entryColor(-1).isValid());
- QVERIFY(!cmap1.entryColor(100).isValid());
- QCOMPARE(cmap1.find(qRgb(255, 0, 0)), -1);
- QCOMPARE(cmap1.findNearest(qRgb(255, 0, 0)), -1);
-
- // Set an entry and re-test.
- cmap1.setEntry(56, qRgb(255, 0, 0));
- // The colormap is still considered "empty" even though it
- // has entries in it now. The isEmpty() method is used to
- // detect when the colormap is in use by a GL widget,
- // not to detect when it is empty!
- QVERIFY(cmap1.isEmpty());
- QCOMPARE(cmap1.size(), 256);
- QCOMPARE(cmap1.entryRgb(0), QRgb(0));
- QVERIFY(cmap1.entryColor(0) == QColor(0, 0, 0, 255));
- QVERIFY(cmap1.entryRgb(56) == qRgb(255, 0, 0));
- QVERIFY(cmap1.entryColor(56) == QColor(255, 0, 0, 255));
- QCOMPARE(cmap1.find(qRgb(255, 0, 0)), 56);
- QCOMPARE(cmap1.findNearest(qRgb(255, 0, 0)), 56);
-
- // Set some more entries.
- static QRgb const colors[] = {
- qRgb(255, 0, 0),
- qRgb(0, 255, 0),
- qRgb(255, 255, 255),
- qRgb(0, 0, 255),
- qRgb(0, 0, 0)
- };
- cmap1.setEntry(57, QColor(0, 255, 0));
- cmap1.setEntries(3, colors + 2, 58);
- cmap1.setEntries(5, colors, 251);
- int idx;
- for (idx = 0; idx < 5; ++idx) {
- QVERIFY(cmap1.entryRgb(56 + idx) == colors[idx]);
- QVERIFY(cmap1.entryColor(56 + idx) == QColor(colors[idx]));
- QVERIFY(cmap1.entryRgb(251 + idx) == colors[idx]);
- QVERIFY(cmap1.entryColor(251 + idx) == QColor(colors[idx]));
- }
- QCOMPARE(cmap1.size(), 256);
-
- // Perform color lookups.
- QCOMPARE(cmap1.find(qRgb(255, 0, 0)), 56);
- QCOMPARE(cmap1.find(qRgb(0, 0, 0)), 60); // Actually finds 0, 0, 0, 255.
- QCOMPARE(cmap1.find(qRgba(0, 0, 0, 0)), 0);
- QCOMPARE(cmap1.find(qRgb(0, 255, 0)), 57);
- QCOMPARE(cmap1.find(qRgb(255, 255, 255)), 58);
- QCOMPARE(cmap1.find(qRgb(0, 0, 255)), 59);
- QCOMPARE(cmap1.find(qRgb(140, 0, 0)), -1);
- QCOMPARE(cmap1.find(qRgb(0, 140, 0)), -1);
- QCOMPARE(cmap1.find(qRgb(0, 0, 140)), -1);
- QCOMPARE(cmap1.find(qRgb(64, 0, 0)), -1);
- QCOMPARE(cmap1.find(qRgb(0, 64, 0)), -1);
- QCOMPARE(cmap1.find(qRgb(0, 0, 64)), -1);
- QCOMPARE(cmap1.findNearest(qRgb(255, 0, 0)), 56);
- QCOMPARE(cmap1.findNearest(qRgb(0, 0, 0)), 60);
- QCOMPARE(cmap1.findNearest(qRgba(0, 0, 0, 0)), 0);
- QCOMPARE(cmap1.findNearest(qRgb(0, 255, 0)), 57);
- QCOMPARE(cmap1.findNearest(qRgb(255, 255, 255)), 58);
- QCOMPARE(cmap1.findNearest(qRgb(0, 0, 255)), 59);
- QCOMPARE(cmap1.findNearest(qRgb(140, 0, 0)), 56);
- QCOMPARE(cmap1.findNearest(qRgb(0, 140, 0)), 57);
- QCOMPARE(cmap1.findNearest(qRgb(0, 0, 140)), 59);
- QCOMPARE(cmap1.findNearest(qRgb(64, 0, 0)), 0);
- QCOMPARE(cmap1.findNearest(qRgb(0, 64, 0)), 0);
- QCOMPARE(cmap1.findNearest(qRgb(0, 0, 64)), 0);
-
- // Make some copies of the colormap and check that they are the same.
- QGLColormap cmap2(cmap1);
- QGLColormap cmap3;
- cmap3 = cmap1;
- QVERIFY(cmap2.isEmpty());
- QVERIFY(cmap3.isEmpty());
- QCOMPARE(cmap2.size(), 256);
- QCOMPARE(cmap3.size(), 256);
- for (idx = 0; idx < 256; ++idx) {
- QCOMPARE(cmap1.entryRgb(idx), cmap2.entryRgb(idx));
- QCOMPARE(cmap1.entryRgb(idx), cmap3.entryRgb(idx));
- }
-
- // Modify an entry in one of the copies and recheck the original.
- cmap2.setEntry(45, qRgb(255, 0, 0));
- for (idx = 0; idx < 256; ++idx) {
- if (idx != 45)
- QCOMPARE(cmap1.entryRgb(idx), cmap2.entryRgb(idx));
- else
- QCOMPARE(cmap2.entryRgb(45), qRgb(255, 0, 0));
- QCOMPARE(cmap1.entryRgb(idx), cmap3.entryRgb(idx));
- }
-
- // Check that setting the handle will cause isEmpty() to work right.
- ColormapExtended cmap4;
- cmap4.setEntry(56, qRgb(255, 0, 0));
- QVERIFY(cmap4.isEmpty());
- QCOMPARE(cmap4.size(), 256);
- cmap4.setHandle(Qt::HANDLE(42));
- QCOMPARE(cmap4.handle(), Qt::HANDLE(42));
- QVERIFY(!cmap4.isEmpty());
- QCOMPARE(cmap4.size(), 256);
-}
-
-#ifndef GL_TEXTURE_3D
-#define GL_TEXTURE_3D 0x806F
-#endif
-
-#ifndef GL_RGB16
-#define GL_RGB16 0x8054
-#endif
-
-void tst_QGL::fboFormat()
-{
- // Check the initial conditions.
- QGLFramebufferObjectFormat format1;
- QCOMPARE(format1.samples(), 0);
- QCOMPARE(format1.attachment(), QGLFramebufferObject::NoAttachment);
- QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D));
- int expectedFormat =
-#ifdef QT_OPENGL_ES_2
- GL_RGBA;
-#else
- QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8;
-#endif
- QCOMPARE(int(format1.internalTextureFormat()), expectedFormat);
-
- // Modify the values and re-check.
- format1.setSamples(8);
- format1.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
- format1.setTextureTarget(GL_TEXTURE_3D);
- format1.setInternalTextureFormat(GL_RGB16);
- QCOMPARE(format1.samples(), 8);
- QCOMPARE(format1.attachment(), QGLFramebufferObject::CombinedDepthStencil);
- QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_3D));
- QCOMPARE(int(format1.internalTextureFormat()), int(GL_RGB16));
-
- // Make copies and check that they are the same.
- QGLFramebufferObjectFormat format2(format1);
- QGLFramebufferObjectFormat format3;
- QCOMPARE(format2.samples(), 8);
- QCOMPARE(format2.attachment(), QGLFramebufferObject::CombinedDepthStencil);
- QCOMPARE(int(format2.textureTarget()), int(GL_TEXTURE_3D));
- QCOMPARE(int(format2.internalTextureFormat()), int(GL_RGB16));
- format3 = format1;
- QCOMPARE(format3.samples(), 8);
- QCOMPARE(format3.attachment(), QGLFramebufferObject::CombinedDepthStencil);
- QCOMPARE(int(format3.textureTarget()), int(GL_TEXTURE_3D));
- QCOMPARE(int(format3.internalTextureFormat()), int(GL_RGB16));
-
- // Modify the copies and check that the original is unchanged.
- format2.setSamples(9);
- format3.setTextureTarget(GL_TEXTURE_2D);
- QCOMPARE(format1.samples(), 8);
- QCOMPARE(format1.attachment(), QGLFramebufferObject::CombinedDepthStencil);
- QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_3D));
- QCOMPARE(int(format1.internalTextureFormat()), int(GL_RGB16));
-
- // operator== and operator!= for QGLFramebufferObjectFormat.
- QGLFramebufferObjectFormat format1c;
- QGLFramebufferObjectFormat format2c;
-
- QCOMPARE(format1c, format2c);
- QVERIFY(!(format1c != format2c));
- format1c.setSamples(8);
- QVERIFY(!(format1c == format2c));
- QVERIFY(format1c != format2c);
- format2c.setSamples(8);
- QCOMPARE(format1c, format2c);
- QVERIFY(!(format1c != format2c));
-
- format1c.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
- QVERIFY(!(format1c == format2c));
- QVERIFY(format1c != format2c);
- format2c.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
- QCOMPARE(format1c, format2c);
- QVERIFY(!(format1c != format2c));
-
- format1c.setTextureTarget(GL_TEXTURE_3D);
- QVERIFY(!(format1c == format2c));
- QVERIFY(format1c != format2c);
- format2c.setTextureTarget(GL_TEXTURE_3D);
- QCOMPARE(format1c, format2c);
- QVERIFY(!(format1c != format2c));
-
- format1c.setInternalTextureFormat(GL_RGB16);
- QVERIFY(!(format1c == format2c));
- QVERIFY(format1c != format2c);
- format2c.setInternalTextureFormat(GL_RGB16);
- QCOMPARE(format1c, format2c);
- QVERIFY(!(format1c != format2c));
-
- QGLFramebufferObjectFormat format3c(format1c);
- QGLFramebufferObjectFormat format4c;
- QCOMPARE(format1c, format3c);
- QVERIFY(!(format1c != format3c));
- format3c.setInternalTextureFormat(
-#ifdef QT_OPENGL_ES_2
- GL_RGBA
-#else
- QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
-#endif
- );
- QVERIFY(!(format1c == format3c));
- QVERIFY(format1c != format3c);
-
- format4c = format1c;
- QCOMPARE(format1c, format4c);
- QVERIFY(!(format1c != format4c));
- format4c.setInternalTextureFormat(
-#ifdef QT_OPENGL_ES_2
- GL_RGBA
-#else
- QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
-#endif
- );
- QVERIFY(!(format1c == format4c));
- QVERIFY(format1c != format4c);
-}
-
-void tst_QGL::testDontCrashOnDanglingResources()
-{
- // We have a number of Q_GLOBAL_STATICS inside the Qt OpenGL
- // module. This test is verify that we don't crash as a result of
- // them calling into libgl on application shutdown.
- QWidget *widget = new UnclippedWidget();
- widget->show();
- qApp->processEvents();
- widget->hide();
-}
-
-class ReplaceClippingGLWidget : public QGLWidget
-{
-public:
- void paint(QPainter *painter)
- {
- painter->fillRect(rect(), Qt::white);
-
- QPainterPath path;
- path.addRect(0, 0, 100, 100);
- path.addRect(50, 50, 100, 100);
-
- painter->setClipRect(0, 0, 150, 150);
- painter->fillPath(path, Qt::red);
-
- painter->translate(150, 150);
- painter->setClipRect(0, 0, 150, 150);
- painter->fillPath(path, Qt::red);
- }
-
-protected:
- void paintEvent(QPaintEvent*)
- {
- // clear the stencil with junk
- QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- funcs->glStencilMask(0xFFFF);
- funcs->glClearStencil(0xFFFF);
- funcs->glDisable(GL_STENCIL_TEST);
- funcs->glDisable(GL_SCISSOR_TEST);
- funcs->glClear(GL_STENCIL_BUFFER_BIT);
-
- QPainter painter(this);
- paint(&painter);
- }
-};
-
-void tst_QGL::replaceClipping()
-{
- ReplaceClippingGLWidget glw;
- glw.resize(300, 300);
- glw.show();
-
- QVERIFY(QTest::qWaitForWindowExposed(&glw));
-
- QImage reference(300, 300, QImage::Format_RGB32);
- QPainter referencePainter(&reference);
- glw.paint(&referencePainter);
- referencePainter.end();
-
-#if defined(Q_OS_QNX)
- // glReadPixels reads from the back buffer. On QNX the buffer is not preserved
- // after a buffer swap. This is why we have to swap the buffer explicitly before calling
- // grabFrameBuffer to retrieve the content of the front buffer
- glw.swapBuffers();
-#endif
- const QImage widgetFB = glw.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32);
-
- // Sample pixels in a grid pattern which avoids false failures due to
- // off-by-one pixel errors on some buggy GL implementations
- for (int x = 25; x < reference.width(); x += 50) {
- for (int y = 25; y < reference.width(); y += 50) {
- QFUZZY_COMPARE_PIXELS(widgetFB.pixel(x, y), reference.pixel(x, y));
- }
- }
-}
-
-class ClipTestGLWidget : public QGLWidget
-{
-public:
- void paint(QPainter *painter)
- {
- painter->fillRect(-1, -1, width()+2, height()+2, Qt::white);
- painter->setClipRect(10, 10, width()-20, height()-20);
- painter->fillRect(rect(), Qt::cyan);
-
- painter->save();
- painter->setClipRect(10, 10, 100, 100, Qt::IntersectClip);
-
- painter->fillRect(rect(), Qt::blue);
-
- painter->save();
- painter->setClipRect(10, 10, 50, 50, Qt::IntersectClip);
- painter->fillRect(rect(), Qt::red);
- painter->restore();
- painter->fillRect(0, 0, 40, 40, Qt::white);
- painter->save();
-
- painter->setClipRect(0, 0, 35, 35, Qt::IntersectClip);
- painter->fillRect(rect(), Qt::black);
- painter->restore();
-
- painter->fillRect(0, 0, 30, 30, Qt::magenta);
-
- painter->save();
- painter->setClipRect(60, 10, 50, 50, Qt::ReplaceClip);
- painter->fillRect(rect(), Qt::green);
- painter->restore();
-
- painter->restore();
-
- painter->translate(100, 100);
-
- {
- QPainterPath path;
- path.addRect(10, 10, 100, 100);
- path.addRect(10, 10, 10, 10);
- painter->setClipPath(path, Qt::IntersectClip);
- }
-
- painter->fillRect(rect(), Qt::blue);
-
- painter->save();
- {
- QPainterPath path;
- path.addRect(10, 10, 50, 50);
- path.addRect(10, 10, 10, 10);
- painter->setClipPath(path, Qt::IntersectClip);
- }
- painter->fillRect(rect(), Qt::red);
- painter->restore();
- painter->fillRect(0, 0, 40, 40, Qt::white);
- painter->save();
-
- {
- QPainterPath path;
- path.addRect(0, 0, 35, 35);
- path.addRect(10, 10, 10, 10);
- painter->setClipPath(path, Qt::IntersectClip);
- }
- painter->fillRect(rect(), Qt::black);
- painter->restore();
-
- painter->fillRect(0, 0, 30, 30, Qt::magenta);
-
- painter->save();
- {
- QPainterPath path;
- path.addRect(60, 10, 50, 50);
- path.addRect(10, 10, 10, 10);
- painter->setClipPath(path, Qt::ReplaceClip);
- }
- painter->fillRect(rect(), Qt::green);
- painter->restore();
- }
-
-protected:
- void paintEvent(QPaintEvent*)
- {
- QPainter painter(this);
- paint(&painter);
- }
-};
-
-void tst_QGL::clipTest()
-{
- ClipTestGLWidget glw;
- glw.resize(220, 220);
- glw.showNormal();
-
- QVERIFY(QTest::qWaitForWindowExposed(&glw));
-
- QImage reference(glw.size(), QImage::Format_RGB32);
- QPainter referencePainter(&reference);
- glw.paint(&referencePainter);
- referencePainter.end();
-
-#if defined(Q_OS_QNX)
- // glReadPixels reads from the back buffer. On QNX the buffer is not preserved
- // after a buffer swap. This is why we have to swap the buffer explicitly before calling
- // grabFrameBuffer to retrieve the content of the front buffer
- glw.swapBuffers();
-#endif
- const QImage widgetFB = glw.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32);
-
- // Sample pixels in a grid pattern which avoids false failures due to
- // off-by-one pixel errors on some buggy GL implementations
- for (int x = 2; x < reference.width(); x += 5) {
- for (int y = 2; y < reference.height(); y += 5) {
- QFUZZY_COMPARE_PIXELS(widgetFB.pixel(x, y), reference.pixel(x, y));
- }
- }
-}
-
-void tst_QGL::destroyFBOAfterContext()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
- QGLWidget *glw = new QGLWidget();
- glw->makeCurrent();
-
- // No multisample with combined depth/stencil attachment:
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
-
- // Don't complicate things by using NPOT:
- QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat);
-
- // The handle should be valid until the context is destroyed.
- QVERIFY(fbo->handle() != 0);
- QVERIFY(fbo->isValid());
-
- delete glw;
-
- // The handle should now be zero.
- QVERIFY(!fbo->handle());
- QVERIFY(!fbo->isValid());
-
- delete fbo;
-}
-
-#ifdef QT_BUILD_INTERNAL
-
-class tst_QGLResource
-{
-public:
- tst_QGLResource(const QGLContext * = 0) {}
- ~tst_QGLResource() { ++deletions; }
-
- static int deletions;
-};
-
-int tst_QGLResource::deletions = 0;
-
-#ifdef TODO
-Q_GLOBAL_STATIC(QOpenGLContextGroupResource<tst_QGLResource>, qt_shared_test)
-#endif //TODO
-#endif // QT_BUILD_INTERNAL
-
-#ifdef QT_BUILD_INTERNAL
-void tst_QGL::shareRegister()
-{
-#ifdef TODO
- // Create a context.
- QGLWidget *glw1 = new QGLWidget();
- glw1->makeCurrent();
-
- // Nothing should be sharing with glw1's context yet.
- QVERIFY(!glw1->isSharing());
-
- // Create a guard for the first context.
- QOpenGLSharedResourceGuard guard(glw1->context()->contextHandle());
- QCOMPARE(guard.id(), 0);
- guard.setId(3);
- QCOMPARE(guard.id(), 3);
-
- // Request a tst_QGLResource object for the first context.
- tst_QGLResource *res1 = qt_shared_test()->value(glw1->context()->contextHandle());
- QVERIFY(res1);
- QCOMPARE(qt_shared_test()->value(glw1->context()->contextHandle()), res1);
-
- // Create another context that shares with the first.
- QVERIFY(!glw1->isSharing());
- QGLWidget *glw2 = new QGLWidget(0, glw1);
- if (!glw2->isSharing()) {
- delete glw2;
- delete glw1;
- QSKIP("Context sharing is not supported");
- }
- QVERIFY(glw1->isSharing());
- QVERIFY(glw1->context() != glw2->context());
-
- // Check that the first context's resource is also on the second.
- QCOMPARE(qt_shared_test()->value(glw1->context()), res1);
- QCOMPARE(qt_shared_test()->value(glw2->context()), res1);
-
- // Guard should still be the same.
- QCOMPARE(guard.context(), glw1->context());
- QCOMPARE(guard.id(), 3);
-
- // Check the sharing relationships.
- QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context()));
- QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context()));
- QVERIFY(QGLContext::areSharing(glw1->context(), glw2->context()));
- QVERIFY(QGLContext::areSharing(glw2->context(), glw1->context()));
- QVERIFY(!QGLContext::areSharing(0, glw2->context()));
- QVERIFY(!QGLContext::areSharing(glw1->context(), 0));
- QVERIFY(!QGLContext::areSharing(0, 0));
-
- // Create a third context, not sharing with the others.
- QGLWidget *glw3 = new QGLWidget();
- QVERIFY(!glw3->isSharing());
-
- // Create a guard on the standalone context.
- QGLSharedResourceGuard guard3(glw3->context());
- guard3.setId(5);
-
- // Request a resource to the third context.
- tst_QGLResource *res3 = qt_shared_test()->value(glw3->context());
- QVERIFY(res3);
- QCOMPARE(qt_shared_test()->value(glw1->context()), res1);
- QCOMPARE(qt_shared_test()->value(glw2->context()), res1);
- QCOMPARE(qt_shared_test()->value(glw3->context()), res3);
-
- // Check the sharing relationships again.
- QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context()));
- QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context()));
- QVERIFY(QGLContext::areSharing(glw1->context(), glw2->context()));
- QVERIFY(QGLContext::areSharing(glw2->context(), glw1->context()));
- QVERIFY(!QGLContext::areSharing(glw1->context(), glw3->context()));
- QVERIFY(!QGLContext::areSharing(glw2->context(), glw3->context()));
- QVERIFY(!QGLContext::areSharing(glw3->context(), glw1->context()));
- QVERIFY(!QGLContext::areSharing(glw3->context(), glw2->context()));
- QVERIFY(QGLContext::areSharing(glw3->context(), glw3->context()));
- QVERIFY(!QGLContext::areSharing(0, glw2->context()));
- QVERIFY(!QGLContext::areSharing(glw1->context(), 0));
- QVERIFY(!QGLContext::areSharing(0, glw3->context()));
- QVERIFY(!QGLContext::areSharing(glw3->context(), 0));
- QVERIFY(!QGLContext::areSharing(0, 0));
-
- // Shared guard should still be the same.
- QCOMPARE(guard.context(), glw1->context());
- QCOMPARE(guard.id(), 3);
-
- // Delete the first context.
- delete glw1;
-
- // The second context should no longer register as sharing.
- QVERIFY(!glw2->isSharing());
-
- // The first context's resource should transfer to the second context.
- QCOMPARE(tst_QGLResource::deletions, 0);
- QCOMPARE(qt_shared_test()->value(glw2->context()), res1);
- QCOMPARE(qt_shared_test()->value(glw3->context()), res3);
-
- // Shared guard should now be the second context, with the id the same.
- QCOMPARE(guard.context(), glw2->context());
- QCOMPARE(guard.id(), 3);
- QCOMPARE(guard3.context(), glw3->context());
- QCOMPARE(guard3.id(), 5);
-
- // Clean up and check that the resources are properly deleted.
- delete glw2;
- QCOMPARE(tst_QGLResource::deletions, 1);
- delete glw3;
- QCOMPARE(tst_QGLResource::deletions, 2);
-
- // Guards should now be null and the id zero.
- QVERIFY(guard.context() == 0);
- QVERIFY(guard.id() == 0);
- QVERIFY(guard3.context() == 0);
- QVERIFY(guard3.id() == 0);
-#endif //TODO
-}
-#endif
-
-// Tests QGLContext::bindTexture with default options
-#ifdef QT_BUILD_INTERNAL
-void tst_QGL::qglContextDefaultBindTexture()
-{
- QGLWidget w;
- w.makeCurrent();
- QGLContext *ctx = const_cast<QGLContext*>(w.context());
-
- QImage *boundImage = new QImage(256, 256, QImage::Format_RGB32);
- boundImage->fill(0xFFFFFFFF);
- QPixmap *boundPixmap = new QPixmap(256, 256);
- boundPixmap->fill(Qt::red);
-
- int startCacheItemCount = QGLTextureCache::instance()->size();
-
- GLuint boundImageTextureId = ctx->bindTexture(*boundImage);
- GLuint boundPixmapTextureId = ctx->bindTexture(*boundPixmap);
-
- // Make sure the image & pixmap have been added to the cache:
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- // Make sure the image & pixmap have the is_cached flag set:
- QVERIFY(QImagePixmapCleanupHooks::isImageCached(*boundImage));
- QVERIFY(QImagePixmapCleanupHooks::isPixmapCached(*boundPixmap));
-
- QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- // Make sure the texture IDs returned are valid:
- QCOMPARE(funcs->glIsTexture(boundImageTextureId), GLboolean(GL_TRUE));
- QCOMPARE(funcs->glIsTexture(boundPixmapTextureId), GLboolean(GL_TRUE));
-
- // Make sure the textures are still valid after we delete the image/pixmap:
- // Also check that although the textures are left intact, the cache entries are removed:
- delete boundImage;
- boundImage = 0;
- QCOMPARE(funcs->glIsTexture(boundImageTextureId), GLboolean(GL_TRUE));
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
- delete boundPixmap;
- boundPixmap = 0;
- QCOMPARE(funcs->glIsTexture(boundPixmapTextureId), GLboolean(GL_TRUE));
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- // Finally, make sure QGLContext::deleteTexture deletes the texture IDs:
- ctx->deleteTexture(boundImageTextureId);
- ctx->deleteTexture(boundPixmapTextureId);
- QCOMPARE(funcs->glIsTexture(boundImageTextureId), GLboolean(GL_FALSE));
- QCOMPARE(funcs->glIsTexture(boundPixmapTextureId), GLboolean(GL_FALSE));
-}
-#endif
-
-#ifdef QT_BUILD_INTERNAL
-void tst_QGL::textureCleanup()
-{
- QGLWidget w;
- w.resize(200,200);
- w.show();
- QVERIFY(QTest::qWaitForWindowExposed(&w));
- w.makeCurrent();
-
- // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache
- // when the pixmap cache is cleared
- {
- int startCacheItemCount = QGLTextureCache::instance()->size();
- QPainter p(&w);
-
- QPixmap boundPixmap(":designer.png");
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- p.drawPixmap(0, 0, boundPixmap);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- // Need to call end for the GL2 paint engine to release references to pixmap if using tfp
- p.end();
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- // Check that the texture doesn't get removed from the cache when the pixmap is cleared
- // as it should still be in the cache:
- boundPixmap = QPixmap();
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- QPixmapCache::clear();
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
- }
-
- // Test pixmaps which have been loaded via QPixmapCache are removed from the texture cache
- // when they are explicitly removed from the pixmap cache
- {
- int startCacheItemCount = QGLTextureCache::instance()->size();
- QPainter p(&w);
-
- QPixmap boundPixmap(128, 128);
- QString cacheKey = QString::fromLatin1("myPixmap");
- QPixmapCache::insert(cacheKey, boundPixmap);
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- p.drawPixmap(0, 0, boundPixmap);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- // Need to call end for the GL2 paint engine to release references to pixmap if using tfp
- p.end();
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- // Check that the texture doesn't get removed from the cache when the pixmap is cleared
- // as it should still be in the cache:
- boundPixmap = QPixmap();
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- // Finally, we check that the texture cache entry is removed when we remove the
- // pixmap cache entry, which should hold the last reference:
- QPixmapCache::remove(cacheKey);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
- }
-
- // Check images & pixmaps are removed from the cache when they are deleted
- {
- int startCacheItemCount = QGLTextureCache::instance()->size();
- QPainter p(&w);
-
- QImage *boundImage = new QImage(256, 256, QImage::Format_RGB32);
- boundImage->fill(0xFFFFFFFF);
- QPixmap *boundPixmap = new QPixmap(256, 256);
- boundPixmap->fill(Qt::red);
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- p.drawImage(0, 0, *boundImage);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- p.drawPixmap(0, 0, *boundPixmap);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- // Need to call end for the GL2 paint engine to release references to pixmap if using tfp
- p.end();
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- delete boundImage;
- boundImage = 0;
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- delete boundPixmap;
- boundPixmap = 0;
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
- }
-
- // Check images & pixmaps are removed from the cache when they are assigned to
- {
- int startCacheItemCount = QGLTextureCache::instance()->size();
- QPainter p(&w);
-
- QImage boundImage(256, 256, QImage::Format_RGB32);
- boundImage.fill(0xFFFFFFFF);
- QPixmap boundPixmap(256, 256);
- boundPixmap.fill(Qt::red);
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- p.drawImage(0, 0, boundImage);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- p.drawPixmap(0, 0, boundPixmap);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- // Need to call end for the GL2 paint engine to release references to pixmap if using tfp
- p.end();
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- boundImage = QImage(64, 64, QImage::Format_RGB32);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- boundPixmap = QPixmap(64, 64);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
- }
-
- // Check images & pixmaps are removed from the cache when they are modified (detached)
- {
- int startCacheItemCount = QGLTextureCache::instance()->size();
- QPainter p(&w);
-
- QImage boundImage(256, 256, QImage::Format_RGB32);
- boundImage.fill(0xFFFFFFFF);
- QPixmap boundPixmap(256, 256);
- boundPixmap.fill(Qt::red);
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- p.drawImage(0, 0, boundImage);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- p.drawPixmap(0, 0, boundPixmap);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- // Need to call end for the GL2 paint engine to release references to pixmap if using tfp
- p.end();
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- boundImage.fill(0x00000000);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- boundPixmap.fill(Qt::blue);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
- }
-
- // Check that images/pixmaps aren't removed from the cache if a shallow copy has been made
- QImage copyOfImage;
- QPixmap copyOfPixmap;
- int startCacheItemCount = QGLTextureCache::instance()->size();
- {
- QPainter p(&w);
-
- QImage boundImage(256, 256, QImage::Format_RGB32);
- boundImage.fill(0xFFFFFFFF);
- QPixmap boundPixmap(256, 256);
- boundPixmap.fill(Qt::red);
-
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-
- p.drawImage(0, 0, boundImage);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- p.drawPixmap(0, 0, boundPixmap);
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- // Need to call end for the GL2 paint engine to release references to pixmap if using tfp
- p.end();
-
- copyOfImage = boundImage;
- copyOfPixmap = boundPixmap;
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
- } // boundImage & boundPixmap would have been deleted when they went out of scope
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+2);
-
- copyOfImage = QImage();
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount+1);
-
- copyOfPixmap = QPixmap();
- QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount);
-}
-#endif
-
-namespace ThreadImages {
-
-class Producer : public QObject
-{
- Q_OBJECT
-public:
- Producer()
- {
- startTimer(20);
-
- QThread *thread = new QThread;
- thread->start();
-
- connect(this, SIGNAL(destroyed()), thread, SLOT(quit()));
-
- moveToThread(thread);
- connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
- }
-
-signals:
- void imageReady(const QImage &image);
-
-protected:
- void timerEvent(QTimerEvent *)
- {
- QImage image(256, 256, QImage::Format_RGB32);
- QLinearGradient g(0, 0, 0, 256);
- g.setColorAt(0, QColor(255, 180, 180));
- g.setColorAt(1, Qt::white);
- g.setSpread(QGradient::ReflectSpread);
-
- QBrush brush(g);
- brush.setTransform(QTransform::fromTranslate(0, delta));
- delta += 10;
-
- QPainter p(&image);
- p.fillRect(image.rect(), brush);
-
- if (images.size() > 10)
- images.removeFirst();
-
- images.append(image);
-
- emit imageReady(image);
- }
-
-private:
- QList<QImage> images;
- int delta;
-};
-
-
-class DisplayWidget : public QGLWidget
-{
- Q_OBJECT
-public:
- DisplayWidget(QWidget *parent) : QGLWidget(parent) {}
- void paintEvent(QPaintEvent *)
- {
- QPainter p(this);
- p.drawImage(rect(), m_image);
- }
-
-public slots:
- void setImage(const QImage &image)
- {
- m_image = image;
- update();
- }
-
-private:
- QImage m_image;
-};
-
-class Widget : public QWidget
-{
- Q_OBJECT
-public:
- Widget()
- : iterations(0)
- , display(0)
- , producer(new Producer)
- {
- startTimer(400);
- connect(this, SIGNAL(destroyed()), producer, SLOT(deleteLater()));
- }
-
- int iterations;
-
-protected:
- void timerEvent(QTimerEvent *)
- {
- ++iterations;
-
- delete display;
- display = new DisplayWidget(this);
- connect(producer, SIGNAL(imageReady(QImage)), display, SLOT(setImage(QImage)));
-
- display->setGeometry(rect());
- display->show();
- }
-
-private:
- DisplayWidget *display;
- Producer *producer;
-};
-
-}
-
-void tst_QGL::threadImages()
-{
- ThreadImages::Widget *widget = new ThreadImages::Widget;
- widget->show();
-
- while (widget->iterations <= 5) {
- qApp->processEvents();
- }
-
- delete widget;
-}
-
-void tst_QGL::nullRectCrash()
-{
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects())
- QSKIP("QGLFramebufferObject not supported on this platform");
-
- QGLWidget glw;
- glw.makeCurrent();
-
- QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
-
- QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat);
-
- QPainter fboPainter(fbo);
-
- fboPainter.setPen(QPen(QColor(255, 127, 127, 127), 2));
- fboPainter.setBrush(QColor(127, 255, 127, 127));
- fboPainter.drawRect(QRectF());
-
- fboPainter.end();
-}
-
-void tst_QGL::extensions()
-{
- QGLWidget glw;
- glw.makeCurrent();
-
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
- QVERIFY(ctx);
- QOpenGLFunctions *funcs = ctx->functions();
- QVERIFY(funcs);
- QSurfaceFormat format = ctx->format();
-
-#ifdef QT_BUILD_INTERNAL
- QOpenGLExtensions *exts = static_cast<QOpenGLExtensions *>(funcs);
- QOpenGLExtensions::OpenGLExtensions allExts = exts->openGLExtensions();
- // Mipmapping is always available in GL2/GLES2+. Verify this.
- if (format.majorVersion() >= 2)
- QVERIFY(allExts.testFlag(QOpenGLExtensions::GenerateMipmap));
-#endif
-
- // Now look for some features should always be available in a given version.
- QOpenGLFunctions::OpenGLFeatures allFeatures = funcs->openGLFeatures();
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::Multitexture));
- if (format.majorVersion() >= 2) {
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::Shaders));
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::Buffers));
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::Multisample));
- QVERIFY(!ctx->isOpenGLES() || allFeatures.testFlag(QOpenGLFunctions::Framebuffers));
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::NPOTTextures)
- && allFeatures.testFlag(QOpenGLFunctions::NPOTTextureRepeat));
- if (ctx->isOpenGLES()) {
- QVERIFY(!allFeatures.testFlag(QOpenGLFunctions::FixedFunctionPipeline));
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::Framebuffers));
- }
- }
- if (format.majorVersion() >= 3)
- QVERIFY(allFeatures.testFlag(QOpenGLFunctions::Framebuffers));
-}
-
-QTEST_MAIN(tst_QGL)
-#include "tst_qgl.moc"
diff --git a/tests/auto/opengl/qglbuffer/qglbuffer.pro b/tests/auto/opengl/qglbuffer/qglbuffer.pro
deleted file mode 100644
index f12a191f79..0000000000
--- a/tests/auto/opengl/qglbuffer/qglbuffer.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-############################################################
-# Project file for autotest for file qglbuffer.h
-############################################################
-
-CONFIG += testcase
-TARGET = tst_qglbuffer
-requires(qtHaveModule(opengl))
-QT += opengl widgets testlib
-
-SOURCES += tst_qglbuffer.cpp
diff --git a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
deleted file mode 100644
index c7d26e757f..0000000000
--- a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtOpenGL/qgl.h>
-#include <QtOpenGL/qglbuffer.h>
-
-class tst_QGLBuffer : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLBuffer() {}
- ~tst_QGLBuffer() {}
-
-private slots:
- void vertexBuffer_data();
- void vertexBuffer();
- void indexBuffer_data();
- void indexBuffer();
- void bufferSharing();
-
-private:
- void testBuffer(QGLBuffer::Type type);
-};
-
-void tst_QGLBuffer::vertexBuffer_data()
-{
- QTest::addColumn<int>("usagePattern");
-
- QTest::newRow("StreamDraw") << int(QGLBuffer::StreamDraw);
- QTest::newRow("StaticDraw") << int(QGLBuffer::StaticDraw);
- QTest::newRow("DynamicDraw") << int(QGLBuffer::DynamicDraw);
-}
-
-void tst_QGLBuffer::vertexBuffer()
-{
- testBuffer(QGLBuffer::VertexBuffer);
-}
-
-void tst_QGLBuffer::indexBuffer_data()
-{
- vertexBuffer_data();
-}
-
-void tst_QGLBuffer::indexBuffer()
-{
- testBuffer(QGLBuffer::IndexBuffer);
-}
-
-void tst_QGLBuffer::testBuffer(QGLBuffer::Type type)
-{
- QFETCH(int, usagePattern);
-
- QGLWidget w;
- w.makeCurrent();
-
- // Create the local object, but not the buffer in the server.
- QGLBuffer buffer(type);
- QCOMPARE(buffer.usagePattern(), QGLBuffer::StaticDraw);
- buffer.setUsagePattern(QGLBuffer::UsagePattern(usagePattern));
-
- // Check the initial state.
- QCOMPARE(buffer.type(), type);
- QVERIFY(!buffer.isCreated());
- QCOMPARE(buffer.bufferId(), GLuint(0));
- QCOMPARE(buffer.usagePattern(), QGLBuffer::UsagePattern(usagePattern));
- QCOMPARE(buffer.size(), -1);
-
- // Should not be able to bind it yet because it isn't created.
- QVERIFY(!buffer.bind());
-
- // Create the buffer - if this fails, then assume that the
- // GL implementation does not support buffers at all.
- if (!buffer.create())
- QSKIP("Buffers are not supported on this platform");
-
- // Should now have a buffer id.
- QVERIFY(buffer.bufferId() != 0);
-
- // Bind the buffer and upload some data.
- QVERIFY(buffer.bind());
- static GLfloat const data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
- buffer.allocate(data, sizeof(data));
-
- // Check the buffer size.
- QCOMPARE(buffer.size(), int(sizeof(data)));
-
- // Map the buffer and read back its contents.
- bool haveMap = false;
- GLfloat *mapped = reinterpret_cast<GLfloat *>
- (buffer.map(QGLBuffer::ReadOnly));
- if (mapped) {
- for (int index = 0; index < 9; ++index)
- QCOMPARE(mapped[index], data[index]);
- buffer.unmap();
- haveMap = true;
- } else {
- qWarning("QGLBuffer::map() is not supported on this platform");
- }
-
- // Read back the buffer contents using read().
- bool haveRead = false;
- GLfloat readdata[9];
- if (buffer.read(0, readdata, sizeof(readdata))) {
- for (int index = 0; index < 9; ++index)
- QCOMPARE(readdata[index], data[index]);
- haveRead = true;
- } else {
- qWarning("QGLBuffer::read() is not supported on this platform");
- }
-
- // Write some different data to a specific location and check it.
- static GLfloat const diffdata[] = {11, 12, 13};
- buffer.write(sizeof(GLfloat) * 3, diffdata, sizeof(diffdata));
- if (haveMap) {
- mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::ReadOnly));
- QVERIFY(mapped != 0);
- for (int index = 0; index < 9; ++index) {
- if (index >= 3 && index <= 5)
- QCOMPARE(mapped[index], diffdata[index - 3]);
- else
- QCOMPARE(mapped[index], data[index]);
- }
- buffer.unmap();
- }
- if (haveRead) {
- QVERIFY(buffer.read(0, readdata, sizeof(readdata)));
- for (int index = 0; index < 9; ++index) {
- if (index >= 3 && index <= 5)
- QCOMPARE(readdata[index], diffdata[index - 3]);
- else
- QCOMPARE(readdata[index], data[index]);
- }
- }
-
- // Write to the buffer using the return value from map.
- if (haveMap) {
- mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::WriteOnly));
- QVERIFY(mapped != 0);
- mapped[6] = 14;
- buffer.unmap();
-
- mapped = reinterpret_cast<GLfloat *>(buffer.map(QGLBuffer::ReadOnly));
- QVERIFY(mapped != 0);
- static GLfloat const diff2data[] = {11, 12, 13, 14};
- for (int index = 0; index < 9; ++index) {
- if (index >= 3 && index <= 6)
- QCOMPARE(mapped[index], diff2data[index - 3]);
- else
- QCOMPARE(mapped[index], data[index]);
- }
- buffer.unmap();
- }
-
- // Resize the buffer.
- buffer.allocate(sizeof(GLfloat) * 20);
- QCOMPARE(buffer.size(), int(sizeof(GLfloat) * 20));
- buffer.allocate(0, sizeof(GLfloat) * 32);
- QCOMPARE(buffer.size(), int(sizeof(GLfloat) * 32));
-
- // Release the buffer.
- buffer.release();
-}
-
-void tst_QGLBuffer::bufferSharing()
-{
-#if defined(Q_OS_WIN)
- // Needs investigation on Windows: QTBUG-29692
- QSKIP("Unreproducible timeout on Windows (MSVC/MinGW) CI bots");
-#endif
-
-#if defined(Q_OS_QNX)
- QSKIP("Crashes on QNX when destroying the second QGLWidget (see QTBUG-38275)");
-#endif
-
- QGLWidget *w1 = new QGLWidget();
- w1->makeCurrent();
-
- QGLWidget *w2 = new QGLWidget(0, w1);
- if (!w2->isSharing()) {
- delete w2;
- delete w1;
- QSKIP("Context sharing is not supported on this platform");
- }
-
- // Bind the buffer in the first context and write some data to it.
- QGLBuffer buffer(QGLBuffer::VertexBuffer);
- if (!buffer.create())
- QSKIP("Buffers are not supported on this platform");
- QVERIFY(buffer.isCreated());
- QVERIFY(buffer.bind());
- static GLfloat const data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
- buffer.allocate(data, sizeof(data));
- QCOMPARE(buffer.size(), int(sizeof(data)));
- buffer.release();
-
- // Bind the buffer in the second context and read back the data.
- w2->makeCurrent();
- QVERIFY(buffer.bind());
- QCOMPARE(buffer.size(), int(sizeof(data)));
- GLfloat readdata[9];
- if (buffer.read(0, readdata, sizeof(readdata))) {
- for (int index = 0; index < 9; ++index)
- QCOMPARE(readdata[index], data[index]);
- }
- buffer.release();
-
- // Delete the first context.
- delete w1;
-
- // Make the second context current again because deleting the first
- // one will call doneCurrent() even though it wasn't current!
- w2->makeCurrent();
-
- // The buffer should still be valid in the second context.
- QVERIFY(buffer.bufferId() != 0);
- QVERIFY(buffer.isCreated());
- QVERIFY(buffer.bind());
- QCOMPARE(buffer.size(), int(sizeof(data)));
- buffer.release();
-
- // Delete the second context.
- delete w2;
-
- // The buffer should now be invalid.
- QCOMPARE(buffer.bufferId(), GLuint(0));
- QVERIFY(!buffer.isCreated());
-}
-
-QTEST_MAIN(tst_QGLBuffer)
-
-#include "tst_qglbuffer.moc"
diff --git a/tests/auto/opengl/qglfunctions/qglfunctions.pro b/tests/auto/opengl/qglfunctions/qglfunctions.pro
deleted file mode 100644
index 9b349eaf34..0000000000
--- a/tests/auto/opengl/qglfunctions/qglfunctions.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qglfunctions
-requires(qtHaveModule(opengl))
-QT += opengl widgets testlib
-
-SOURCES += tst_qglfunctions.cpp
diff --git a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
deleted file mode 100644
index 93d06659c9..0000000000
--- a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtOpenGL module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtOpenGL/qglfunctions.h>
-
-class tst_QGLFunctions : public QObject
-{
- Q_OBJECT
-public:
- tst_QGLFunctions() {}
- ~tst_QGLFunctions() {}
-
-private slots:
- void features();
- void multitexture();
- void blendColor();
-
-private:
- static bool hasExtension(const char *name);
-};
-
-bool tst_QGLFunctions::hasExtension(const char *name)
-{
- QString extensions =
- QString::fromLatin1
- (reinterpret_cast<const char *>(QOpenGLContext::currentContext()->functions()->glGetString(GL_EXTENSIONS)));
- return extensions.split(QLatin1Char(' ')).contains
- (QString::fromLatin1(name));
-}
-
-// Check that the reported features are consistent with the platform.
-void tst_QGLFunctions::features()
-{
- // Before being associated with a context, there should be
- // no features enabled.
- QGLFunctions funcs;
- QVERIFY(!funcs.openGLFeatures());
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::Multitexture));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::Shaders));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::Buffers));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::Framebuffers));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::BlendColor));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::BlendEquation));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::BlendEquationSeparate));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::BlendFuncSeparate));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::BlendSubtract));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::CompressedTextures));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::Multisample));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::StencilSeparate));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures));
-
- // Make a context current.
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("Could not create a GL context");
- glw.makeCurrent();
- funcs.initializeGLFunctions();
-
- // Validate the features against what we expect for this platform.
- if (QOpenGLContext::currentContext()->isOpenGLES()) {
-#if !defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2)
- QGLFunctions::OpenGLFeatures allFeatures =
- (QGLFunctions::Multitexture |
- QGLFunctions::Shaders |
- QGLFunctions::Buffers |
- QGLFunctions::Framebuffers |
- QGLFunctions::BlendColor |
- QGLFunctions::BlendEquation |
- QGLFunctions::BlendEquationSeparate |
- QGLFunctions::BlendFuncSeparate |
- QGLFunctions::BlendSubtract |
- QGLFunctions::CompressedTextures |
- QGLFunctions::Multisample |
- QGLFunctions::StencilSeparate |
- QGLFunctions::NPOTTextures);
- QVERIFY((funcs.openGLFeatures() & allFeatures) == allFeatures);
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Multitexture));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Shaders));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Buffers));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Framebuffers));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::BlendColor));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::BlendEquation));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::BlendEquationSeparate));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::BlendFuncSeparate));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::BlendSubtract));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::CompressedTextures));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Multisample));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::StencilSeparate));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures));
-#elif defined(QT_OPENGL_ES) && !defined(QT_OPENGL_ES_2)
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Multitexture));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Buffers));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::CompressedTextures));
- QVERIFY(funcs.hasOpenGLFeature(QGLFunctions::Multisample));
-
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::Shaders));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::BlendColor));
- QVERIFY(!funcs.hasOpenGLFeature(QGLFunctions::StencilSeparate));
-
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::Framebuffers),
- hasExtension("GL_OES_framebuffer_object"));
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendEquationSeparate),
- hasExtension("GL_OES_blend_equation_separate"));
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendFuncSeparate),
- hasExtension("GL_OES_blend_func_separate"));
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendSubtract),
- hasExtension("GL_OES_blend_subtract"));
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures),
- hasExtension("GL_OES_texture_npot"));
-#endif
- } else {
- // We check for both the extension name and the minimum OpenGL version
- // for the feature. This will help us catch situations where a platform
- // doesn't list an extension by name but does have the feature by virtue
- // of its version number.
- QGLFormat::OpenGLVersionFlags versions = QGLFormat::openGLVersionFlags();
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::Multitexture),
- hasExtension("GL_ARB_multitexture") ||
- (versions & QGLFormat::OpenGL_Version_1_3) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::Shaders),
- hasExtension("GL_ARB_shader_objects") ||
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::Buffers),
- (versions & QGLFormat::OpenGL_Version_1_5) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::Framebuffers),
- hasExtension("GL_EXT_framebuffer_object") ||
- hasExtension("GL_ARB_framebuffer_object"));
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendColor),
- hasExtension("GL_EXT_blend_color") ||
- (versions & QGLFormat::OpenGL_Version_1_2) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendEquation),
- (versions & QGLFormat::OpenGL_Version_1_2) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendEquationSeparate),
- hasExtension("GL_EXT_blend_equation_separate") ||
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendFuncSeparate),
- hasExtension("GL_EXT_blend_func_separate") ||
- (versions & QGLFormat::OpenGL_Version_1_4) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::BlendSubtract),
- hasExtension("GL_EXT_blend_subtract"));
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::CompressedTextures),
- hasExtension("GL_ARB_texture_compression") ||
- (versions & QGLFormat::OpenGL_Version_1_3) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::Multisample),
- hasExtension("GL_ARB_multisample") ||
- (versions & QGLFormat::OpenGL_Version_1_3) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::StencilSeparate),
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- QCOMPARE(funcs.hasOpenGLFeature(QGLFunctions::NPOTTextures),
- hasExtension("GL_ARB_texture_non_power_of_two") ||
- (versions & QGLFormat::OpenGL_Version_2_0) != 0);
- }
-}
-
-// Verify that the multitexture functions appear to resolve and work.
-void tst_QGLFunctions::multitexture()
-{
- QOpenGLFunctions funcs;
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("Could not create a GL context");
- glw.makeCurrent();
- funcs.initializeOpenGLFunctions();
-
- if (!funcs.hasOpenGLFeature(QOpenGLFunctions::Multitexture))
- QSKIP("Multitexture functions are not supported");
-
- funcs.glActiveTexture(GL_TEXTURE1);
-
- GLint active = 0;
- funcs.glGetIntegerv(GL_ACTIVE_TEXTURE, &active);
- QCOMPARE(active, GL_TEXTURE1);
-
- funcs.glActiveTexture(GL_TEXTURE0);
-
- active = 0;
- funcs.glGetIntegerv(GL_ACTIVE_TEXTURE, &active);
- QCOMPARE(active, GL_TEXTURE0);
-}
-
-// Verify that the glBlendColor() function appears to resolve and work.
-void tst_QGLFunctions::blendColor()
-{
- QOpenGLFunctions funcs;
- QGLWidget glw;
- if (!glw.isValid())
- QSKIP("Could not create a GL context");
- glw.makeCurrent();
- funcs.initializeOpenGLFunctions();
-
- if (!funcs.hasOpenGLFeature(QOpenGLFunctions::BlendColor))
- QSKIP("glBlendColor() is not supported");
-
- funcs.glBlendColor(0.0f, 1.0f, 0.0f, 1.0f);
-
- GLfloat colors[4] = {0.5f, 0.5f, 0.5f, 0.5f};
- funcs.glGetFloatv(GL_BLEND_COLOR, colors);
-
- QCOMPARE(colors[0], 0.0f);
- QCOMPARE(colors[1], 1.0f);
- QCOMPARE(colors[2], 0.0f);
- QCOMPARE(colors[3], 1.0f);
-}
-
-QTEST_MAIN(tst_QGLFunctions)
-
-#include "tst_qglfunctions.moc"
diff --git a/tests/auto/opengl/qglthreads/qglthreads.pro b/tests/auto/opengl/qglthreads/qglthreads.pro
deleted file mode 100644
index 9aa21fb3a2..0000000000
--- a/tests/auto/opengl/qglthreads/qglthreads.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qglthreads
-requires(qtHaveModule(opengl))
-QT += opengl widgets testlib gui-private core-private
-
-HEADERS += tst_qglthreads.h
-SOURCES += tst_qglthreads.cpp
diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
deleted file mode 100644
index e12f6d9c18..0000000000
--- a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
+++ /dev/null
@@ -1,687 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QtCore>
-#include <QtGui/QtGui>
-#include <private/qguiapplication_p.h>
-#include <qpa/qplatformintegration.h>
-#include <QtWidgets/QApplication>
-#include <QtOpenGL/QtOpenGL>
-#include <qelapsedtimer.h>
-#include "tst_qglthreads.h"
-
-#ifndef QT_OPENGL_ES_2
-#include <QtGui/QOpenGLFunctions_1_0>
-#endif
-
-#define RUNNING_TIME 5000
-
-tst_QGLThreads::tst_QGLThreads(QObject *parent)
- : QObject(parent)
-{
-}
-
-/*
-
- swapInThread
-
- The purpose of this testcase is to verify that it is possible to do rendering into
- a GL context from the GUI thread, then swap the contents in from a background thread.
-
- The usecase for this is to have the background thread do the waiting for vertical
- sync while the GUI thread is idle.
-
- Currently the locking is handled directly in the paintEvent(). For the actual usecase
- in Qt, the locking is done in the windowsurface before starting any drawing while
- unlocking is done after all drawing has been done.
- */
-
-
-class SwapThread : public QThread
-{
- Q_OBJECT
-public:
- SwapThread(QGLWidget *widget)
- : m_context(widget->context())
- , m_swapTriggered(false)
- {
- moveToThread(this);
- }
-
- void run() {
- QElapsedTimer timer;
- timer.start();
- while (timer.elapsed() < RUNNING_TIME) {
- lock();
- waitForReadyToSwap();
-
- m_context->makeCurrent();
- m_context->swapBuffers();
- m_context->doneCurrent();
-
- m_context->moveToThread(qApp->thread());
-
- signalSwapDone();
- unlock();
- }
-
- m_swapTriggered = false;
- }
-
- void lock() { m_mutex.lock(); }
- void unlock() { m_mutex.unlock(); }
-
- void waitForSwapDone() { if (m_swapTriggered) m_swapDone.wait(&m_mutex); }
- void waitForReadyToSwap() { if (!m_swapTriggered) m_readyToSwap.wait(&m_mutex); }
-
- void signalReadyToSwap()
- {
- if (!isRunning())
- return;
- m_readyToSwap.wakeAll();
- m_swapTriggered = true;
- }
-
- void signalSwapDone()
- {
- m_swapTriggered = false;
- m_swapDone.wakeAll();
- }
-
-private:
- QGLContext *m_context;
- QMutex m_mutex;
- QWaitCondition m_readyToSwap;
- QWaitCondition m_swapDone;
-
- bool m_swapTriggered;
-};
-
-class ForegroundWidget : public QGLWidget
-{
-public:
- ForegroundWidget(const QGLFormat &format)
- : QGLWidget(format), m_thread(0)
- {
- setAutoBufferSwap(false);
- }
-
- void resizeEvent(QResizeEvent *e)
- {
- m_thread->lock();
- QGLWidget::resizeEvent(e);
- m_thread->unlock();
- }
-
- void paintEvent(QPaintEvent *)
- {
- m_thread->lock();
- m_thread->waitForSwapDone();
-
- makeCurrent();
- QPainter p(this);
- p.fillRect(rect(), QColor(QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256)));
- p.setPen(Qt::red);
- p.setFont(QFont("SansSerif", 24));
- p.drawText(rect(), Qt::AlignCenter, "This is an autotest");
- p.end();
- doneCurrent();
-
- if (m_thread->isRunning()) {
- context()->moveToThread(m_thread);
- m_thread->signalReadyToSwap();
- }
-
- m_thread->unlock();
-
- update();
- }
-
- void setThread(SwapThread *thread) {
- m_thread = thread;
- }
-
- SwapThread *m_thread;
-};
-
-void tst_QGLThreads::swapInThread()
-{
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
- QSKIP("No platformsupport for ThreadedOpenGL");
- QGLFormat format;
- format.setSwapInterval(1);
- ForegroundWidget widget(format);
- SwapThread thread(&widget);
- widget.setThread(&thread);
- widget.show();
-
- QVERIFY(QTest::qWaitForWindowExposed(&widget));
- thread.start();
-
- while (thread.isRunning()) {
- qApp->processEvents();
- }
-
- widget.hide();
-
- QVERIFY(true);
-}
-
-/*
- renderInThread
-
- This test sets up a scene and renders it in a different thread.
- For simplicity, the scene is simply a bunch of rectangles, but
- if that works, we're in good shape..
- */
-
-static inline float qrandom() { return (QRandomGenerator::global()->bounded(100)) / 100.f; }
-
-void renderAScene(int w, int h)
-{
- QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
-
- if (QOpenGLContext::currentContext()->isOpenGLES()) {
- Q_UNUSED(w);
- Q_UNUSED(h);
- QGLShaderProgram program;
- program.addShaderFromSourceCode(QGLShader::Vertex, "attribute highp vec2 pos; void main() { gl_Position = vec4(pos.xy, 1.0, 1.0); }");
- program.addShaderFromSourceCode(QGLShader::Fragment, "uniform lowp vec4 color; void main() { gl_FragColor = color; }");
- program.bindAttributeLocation("pos", 0);
- program.bind();
-
- funcs->glEnableVertexAttribArray(0);
-
- for (int i=0; i<1000; ++i) {
- GLfloat pos[] = {
- (QRandomGenerator::global()->bounded(100)) / 100.f,
- (QRandomGenerator::global()->bounded(100)) / 100.f,
- (QRandomGenerator::global()->bounded(100)) / 100.f,
- (QRandomGenerator::global()->bounded(100)) / 100.f,
- (QRandomGenerator::global()->bounded(100)) / 100.f,
- (QRandomGenerator::global()->bounded(100)) / 100.f
- };
-
- funcs->glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, pos);
- funcs->glDrawArrays(GL_TRIANGLE_STRIP, 0, 3);
- }
- } else {
-#ifndef QT_OPENGL_ES_2
- QOpenGLFunctions_1_0 *gl1funcs = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_1_0>();
- gl1funcs->initializeOpenGLFunctions();
-
- gl1funcs->glViewport(0, 0, w, h);
-
- gl1funcs->glMatrixMode(GL_PROJECTION);
- gl1funcs->glLoadIdentity();
- gl1funcs->glFrustum(0, w, h, 0, 1, 100);
- gl1funcs->glTranslated(0, 0, -1);
-
- gl1funcs->glMatrixMode(GL_MODELVIEW);
- gl1funcs->glLoadIdentity();
-
- for (int i=0;i<1000; ++i) {
- gl1funcs->glBegin(GL_TRIANGLES);
- gl1funcs->glColor3f(qrandom(), qrandom(), qrandom());
- gl1funcs->glVertex2f(qrandom() * w, qrandom() * h);
- gl1funcs->glColor3f(qrandom(), qrandom(), qrandom());
- gl1funcs->glVertex2f(qrandom() * w, qrandom() * h);
- gl1funcs->glColor3f(qrandom(), qrandom(), qrandom());
- gl1funcs->glVertex2f(qrandom() * w, qrandom() * h);
- gl1funcs->glEnd();
- }
-#endif
- }
-}
-
-class ThreadSafeGLWidget : public QGLWidget
-{
-public:
- ThreadSafeGLWidget(QWidget *parent = 0) : QGLWidget(parent) {}
- void paintEvent(QPaintEvent *)
- {
- // ignored as we're anyway swapping as fast as we can
- };
-
- void resizeEvent(QResizeEvent *e)
- {
- mutex.lock();
- newSize = e->size();
- mutex.unlock();
- };
-
- QMutex mutex;
- QSize newSize;
-};
-
-class SceneRenderingThread : public QThread
-{
- Q_OBJECT
-public:
- SceneRenderingThread(ThreadSafeGLWidget *widget)
- : m_widget(widget)
- {
- moveToThread(this);
- m_size = widget->size();
- }
-
- void run() {
- QElapsedTimer timer;
- timer.start();
- failure = false;
-
- while (timer.elapsed() < RUNNING_TIME && !failure) {
-
- m_widget->makeCurrent();
-
- m_widget->mutex.lock();
- QSize s = m_widget->newSize;
- m_widget->mutex.unlock();
-
- QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- if (s != m_size) {
- funcs->glViewport(0, 0, s.width(), s.height());
- }
-
- if (QGLContext::currentContext() != m_widget->context()) {
- failure = true;
- break;
- }
-
- funcs->glClear(GL_COLOR_BUFFER_BIT);
-
- int w = m_widget->width();
- int h = m_widget->height();
-
- renderAScene(w, h);
-
- int color;
- funcs->glReadPixels(w / 2, h / 2, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &color);
-
- m_widget->swapBuffers();
- }
-
- m_widget->doneCurrent();
- }
-
- bool failure;
-
-private:
- ThreadSafeGLWidget *m_widget;
- QSize m_size;
-};
-
-void tst_QGLThreads::renderInThread_data()
-{
- QTest::addColumn<bool>("resize");
- QTest::addColumn<bool>("update");
-
- QTest::newRow("basic") << false << false;
- QTest::newRow("with-resize") << true << false;
- QTest::newRow("with-update") << false << true;
- QTest::newRow("with-resize-and-update") << true << true;
-}
-
-void tst_QGLThreads::renderInThread()
-{
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
- QSKIP("No platformsupport for ThreadedOpenGL");
-
- QFETCH(bool, resize);
- QFETCH(bool, update);
-
-#if defined(Q_OS_MACOS)
- if (resize)
- QSKIP("gldSetZero crashes in render thread, QTBUG-68524");
-#endif
-
- ThreadSafeGLWidget widget;
- widget.resize(200, 200);
- SceneRenderingThread thread(&widget);
-
- widget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&widget));
- widget.doneCurrent();
-
- widget.context()->moveToThread(&thread);
-
- thread.start();
-
- int value = 10;
- while (thread.isRunning()) {
- if (resize)
- widget.resize(200 + value, 200 + value);
- if (update)
- widget.update(100 + value, 100 + value, 20, 20);
- qApp->processEvents();
- value = -value;
-
- QThread::msleep(100);
- }
-
- QVERIFY(!thread.failure);
-}
-
-class Device
-{
-public:
- virtual ~Device() {}
- virtual QPaintDevice *realPaintDevice() = 0;
- virtual void prepareDevice() {}
- virtual void moveToThread(QThread *) {}
-};
-
-class GLWidgetWrapper : public Device
-{
-public:
- GLWidgetWrapper() {
- widget.resize(150, 150);
- widget.show();
- QVERIFY(QTest::qWaitForWindowExposed(&widget));
- widget.doneCurrent();
- }
- QPaintDevice *realPaintDevice() { return &widget; }
- void moveToThread(QThread *thread) { widget.context()->moveToThread(thread); }
-
- ThreadSafeGLWidget widget;
-};
-
-class PixmapWrapper : public Device
-{
-public:
- PixmapWrapper() { pixmap = new QPixmap(512, 512); }
- ~PixmapWrapper() { delete pixmap; }
- QPaintDevice *realPaintDevice() { return pixmap; }
-
- QPixmap *pixmap;
-};
-
-class PixelBufferWrapper : public Device
-{
-public:
- PixelBufferWrapper() { pbuffer = new QGLPixelBuffer(512, 512); }
- ~PixelBufferWrapper() { delete pbuffer; }
- QPaintDevice *realPaintDevice() { return pbuffer; }
- void moveToThread(QThread *thread) { pbuffer->context()->moveToThread(thread); }
-
- QGLPixelBuffer *pbuffer;
-};
-
-
-class FrameBufferObjectWrapper : public Device
-{
-public:
- FrameBufferObjectWrapper() {
- widget.makeCurrent();
- fbo = new QGLFramebufferObject(512, 512);
- widget.doneCurrent();
- }
- ~FrameBufferObjectWrapper() { delete fbo; }
- QPaintDevice *realPaintDevice() { return fbo; }
- void prepareDevice() { widget.makeCurrent(); }
- void moveToThread(QThread *thread) { widget.context()->moveToThread(thread); }
-
- ThreadSafeGLWidget widget;
- QGLFramebufferObject *fbo;
-};
-
-
-class ThreadPainter : public QObject
-{
- Q_OBJECT
-public:
- ThreadPainter(Device *pd) : device(pd), fail(true) {
- pixmap = QPixmap(40, 40);
- pixmap.fill(Qt::green);
- QPainter p(&pixmap);
- p.drawLine(0, 0, 40, 40);
- p.drawLine(0, 40, 40, 0);
- }
-
-public slots:
- void draw() {
- bool beginFailed = false;
- QElapsedTimer timer;
- timer.start();
- int rotAngle = 10;
- device->prepareDevice();
- QPaintDevice *paintDevice = device->realPaintDevice();
- QSize s(paintDevice->width(), paintDevice->height());
- while (timer.elapsed() < RUNNING_TIME) {
- QPainter p;
- if (!p.begin(paintDevice)) {
- beginFailed = true;
- break;
- }
- p.translate(s.width()/2, s.height()/2);
- p.rotate(rotAngle);
- p.translate(-s.width()/2, -s.height()/2);
- p.fillRect(0, 0, s.width(), s.height(), Qt::red);
- QRect rect(QPoint(0, 0), s);
- p.drawPixmap(10, 10, pixmap);
- p.drawTiledPixmap(50, 50, 100, 100, pixmap);
- p.drawText(rect.center(), "This is a piece of text");
- p.end();
- rotAngle += 2;
- QThread::msleep(20);
- }
-
- device->moveToThread(qApp->thread());
-
- fail = beginFailed;
- QThread::currentThread()->quit();
- }
-
- bool failed() { return fail; }
-
-private:
- QPixmap pixmap;
- Device *device;
- bool fail;
-};
-
-template <class T>
-class PaintThreadManager
-{
-public:
- PaintThreadManager(int count) : numThreads(count)
- {
- for (int i=0; i<numThreads; ++i)
- devices.append(new T);
- // Wait until resize events are processed on the internal
- // QGLWidgets of the buffers to suppress errors
- // about makeCurrent() from the wrong thread.
- QCoreApplication::processEvents();
- for (int i=0; i<numThreads; ++i) {
- devices.append(new T);
- threads.append(new QThread);
- painters.append(new ThreadPainter(devices.at(i)));
- painters.at(i)->moveToThread(threads.at(i));
- painters.at(i)->connect(threads.at(i), SIGNAL(started()), painters.at(i), SLOT(draw()));
- devices.at(i)->moveToThread(threads.at(i));
- }
- }
-
- ~PaintThreadManager() {
- qDeleteAll(threads);
- qDeleteAll(painters);
- qDeleteAll(devices);
- }
-
-
- void start() {
- for (int i=0; i<numThreads; ++i)
- threads.at(i)->start();
- }
-
- bool areRunning() {
- bool running = false;
- for (int i=0; i<numThreads; ++i){
- if (threads.at(i)->isRunning())
- running = true;
- }
-
- return running;
- }
-
- bool failed() {
- for (int i=0; i<numThreads; ++i) {
- if (painters.at(i)->failed())
- return true;
- }
-
- return false;
- }
-
-private:
- QList<QThread *> threads;
- QList<Device *> devices;
- QList<ThreadPainter *> painters;
- int numThreads;
-};
-
-/*
- This test uses QPainter to draw onto different QGLWidgets in
- different threads at the same time. The ThreadSafeGLWidget is
- necessary to handle paint and resize events that might come from
- the main thread at any time while the test is running. The resize
- and paint events would cause makeCurrent() calls to be issued from
- within the QGLWidget while the widget's context was current in
- another thread, which would cause errors.
-*/
-void tst_QGLThreads::painterOnGLWidgetInThread()
-{
- //QTBUG-46446 tst_qglthreads is unstable on windows 7
- if (QGuiApplication::platformName().compare("windows 7", Qt::CaseInsensitive))
- QSKIP("Doesn't work on this platform. QTBUG-46446");
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
- QSKIP("No platformsupport for ThreadedOpenGL");
- if (!((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) ||
- (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0))) {
- QSKIP("The OpenGL based threaded QPainter tests requires OpenGL/ES 2.0.");
- }
-
- PaintThreadManager<GLWidgetWrapper> painterThreads(5);
- painterThreads.start();
-
- while (painterThreads.areRunning()) {
- qApp->processEvents();
- QThread::msleep(100);
- }
- QVERIFY(!painterThreads.failed());
-}
-
-/*
- This test uses QPainter to draw onto different QPixmaps in
- different threads at the same time.
-*/
-void tst_QGLThreads::painterOnPixmapInThread()
-{
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)
- || !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedPixmaps))
- QSKIP("No platformsupport for ThreadedOpenGL or ThreadedPixmaps");
- PaintThreadManager<PixmapWrapper> painterThreads(5);
- painterThreads.start();
-
- while (painterThreads.areRunning()) {
- qApp->processEvents();
- QThread::msleep(100);
- }
- QVERIFY(!painterThreads.failed());
-}
-
-/* This test uses QPainter to draw onto different QGLPixelBuffer
- objects in different threads at the same time.
-*/
-void tst_QGLThreads::painterOnPboInThread()
-{
- //QTBUG-46446 tst_qglthreads is unstable on windows 7
- if (QGuiApplication::platformName().compare("windows 7", Qt::CaseInsensitive))
- QSKIP("Doesn't work on this platform. QTBUG-46446");
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
- QSKIP("No platformsupport for ThreadedOpenGL");
- if (!((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) ||
- (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0))) {
- QSKIP("The OpenGL based threaded QPainter tests requires OpenGL/ES 2.0.");
- }
-
- if (!QGLPixelBuffer::hasOpenGLPbuffers()) {
- QSKIP("This system doesn't support pbuffers.");
- }
-
- PaintThreadManager<PixelBufferWrapper> painterThreads(5);
- painterThreads.start();
-
- while (painterThreads.areRunning()) {
- qApp->processEvents();
- QThread::msleep(100);
- }
- QVERIFY(!painterThreads.failed());
-}
-
-/* This test uses QPainter to draw onto different
- QGLFramebufferObjects (bound in a QGLWidget's context) in different
- threads at the same time.
-*/
-void tst_QGLThreads::painterOnFboInThread()
-{
- //QTBUG-46446 tst_qglthreads is unstable on windows 7
- if (QGuiApplication::platformName().compare("windows 7", Qt::CaseInsensitive))
- QSKIP("Doesn't work on this platform. QTBUG-46446");
- if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
- QSKIP("No platformsupport for ThreadedOpenGL");
- if (!((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) ||
- (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0))) {
- QSKIP("The OpenGL based threaded QPainter tests requires OpenGL/ES 2.0.");
- }
-
- if (!QGLFramebufferObject::hasOpenGLFramebufferObjects()) {
- QSKIP("This system doesn't support framebuffer objects.");
- }
-
- PaintThreadManager<FrameBufferObjectWrapper> painterThreads(5);
- painterThreads.start();
-
- while (painterThreads.areRunning()) {
- qApp->processEvents();
- QThread::msleep(100);
- }
- QVERIFY(!painterThreads.failed());
-}
-
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
- QTEST_DISABLE_KEYPAD_NAVIGATION \
-
- tst_QGLThreads tc;
- return QTest::qExec(&tc, argc, argv);
-}
-
-#include "tst_qglthreads.moc"
diff --git a/tests/auto/other/CMakeLists.txt b/tests/auto/other/CMakeLists.txt
new file mode 100644
index 0000000000..e1d3c0e839
--- /dev/null
+++ b/tests/auto/other/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from other.pro.
+
+if(NOT cross_compile)
+ add_subdirectory(compiler)
+ # add_subdirectory(atwrapper) <- does not exist # special case
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(gestures)
+ add_subdirectory(languagechange)
+ add_subdirectory(qfocusevent)
+ add_subdirectory(qsharedpointer_and_qwidget)
+ # add_subdirectory(windowsmobile) <- does not exist # special case
+endif()
+if(TARGET Qt::Network AND TARGET Qt::Widgets AND NOT WINRT)
+ add_subdirectory(lancelot)
+ add_subdirectory(qnetworkaccessmanager_and_qprogressdialog)
+endif()
+if(APPLE_OSX AND TARGET Qt::Gui AND TARGET Qt::Widgets)
+ add_subdirectory(macgui)
+ add_subdirectory(macplist)
+ add_subdirectory(qaccessibilitymac)
+endif()
+if(TARGET Qt::Gui)
+ add_subdirectory(qcomplextext)
+endif()
+if(QT_FEATURE_process AND TARGET Qt::Gui)
+ add_subdirectory(qprocess_and_guieventloop)
+endif()
+if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets AND NOT WINRT)
+ add_subdirectory(qaccessibility)
+endif()
+if(QT_FEATURE_accessibility_atspi_bridge AND TARGET Qt::Gui AND TARGET Qt::Widgets)
+ #add_subdirectory(qaccessibilitylinux) # special case # This test is broken
+endif()
+if(TARGET Qt::Network AND NOT WINRT)
+ add_subdirectory(networkselftest)
+endif()
+if(APPLE_OSX AND TARGET Qt::Gui)
+ add_subdirectory(macnativeevents)
+endif()
+if(embedded)
+ add_subdirectory(qdirectpainter)
+endif()
+if(ANDROID)
+ add_subdirectory(android)
+endif()
+if(QT_FEATURE_xkbcommon)
+ add_subdirectory(xkbkeyboard)
+endif()
diff --git a/tests/auto/other/android/CMakeLists.txt b/tests/auto/other/android/CMakeLists.txt
new file mode 100644
index 0000000000..e59111bb40
--- /dev/null
+++ b/tests/auto/other/android/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from android.pro.
+
+#####################################################################
+## tst_android Test:
+#####################################################################
+
+add_qt_test(tst_android
+ SOURCES
+ tst_android.cpp
+)
+
+if(ANDROID)
+ set_property(TARGET tst_android APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/testdata
+ )
+endif()
+
+#### Keys ignored in scope 1:.:.:android.pro:<TRUE>:
+# DISTFILES = "testdata/assets/test.txt"
diff --git a/tests/auto/other/compiler/.prev_CMakeLists.txt b/tests/auto/other/compiler/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6824640d93
--- /dev/null
+++ b/tests/auto/other/compiler/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from compiler.pro.
+
+#####################################################################
+## tst_compiler Test:
+#####################################################################
+
+add_qt_test(tst_compiler
+ SOURCES
+ baseclass.cpp baseclass.h
+ derivedclass.cpp derivedclass.h
+ othersource.cpp
+ tst_compiler.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/other/compiler/CMakeLists.txt b/tests/auto/other/compiler/CMakeLists.txt
new file mode 100644
index 0000000000..1849b7ec2c
--- /dev/null
+++ b/tests/auto/other/compiler/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from compiler.pro.
+
+#####################################################################
+## tst_compiler Test:
+#####################################################################
+
+add_qt_test(tst_compiler
+ EXCEPTIONS # special case
+ SOURCES
+ baseclass.cpp baseclass.h
+ derivedclass.cpp derivedclass.h
+ othersource.cpp
+ tst_compiler.cpp
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp
index de15f4c62d..78026665be 100644
--- a/tests/auto/other/compiler/tst_compiler.cpp
+++ b/tests/auto/other/compiler/tst_compiler.cpp
@@ -634,7 +634,7 @@ void tst_Compiler::cxx11_alignas()
struct S {
alignas(double) char c;
};
- QCOMPARE(Q_ALIGNOF(S), Q_ALIGNOF(double));
+ QCOMPARE(alignof(S), alignof(double));
#endif
}
@@ -1396,7 +1396,7 @@ void tst_Compiler::cxx11_unrestricted_unions()
~U() {}
};
U u;
- std::aligned_storage<sizeof(QString), Q_ALIGNOF(QString)> as;
+ std::aligned_storage<sizeof(QString), alignof(QString)> as;
Q_UNUSED(u);
Q_UNUSED(as);
diff --git a/tests/auto/other/gestures/CMakeLists.txt b/tests/auto/other/gestures/CMakeLists.txt
new file mode 100644
index 0000000000..b1a07e6cb3
--- /dev/null
+++ b/tests/auto/other/gestures/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from gestures.pro.
+
+#####################################################################
+## tst_gestures Test:
+#####################################################################
+
+add_qt_test(tst_gestures
+ SOURCES
+ tst_gestures.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/other/lancelot/CMakeLists.txt b/tests/auto/other/lancelot/CMakeLists.txt
new file mode 100644
index 0000000000..6f15ff7990
--- /dev/null
+++ b/tests/auto/other/lancelot/CMakeLists.txt
@@ -0,0 +1,84 @@
+# Generated from lancelot.pro.
+
+#####################################################################
+## tst_lancelot Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ scripts/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_lancelot
+ SOURCES
+ ../../../baselineserver/shared/baselineprotocol.cpp ../../../baselineserver/shared/baselineprotocol.h
+ ../../../baselineserver/shared/lookup3.cpp
+ ../../../baselineserver/shared/qbaselinetest.cpp ../../../baselineserver/shared/qbaselinetest.h
+ paintcommands.cpp paintcommands.h
+ tst_lancelot.cpp
+ DEFINES
+ QMAKESPEC=\\\"\\\"
+ INCLUDE_DIRECTORIES
+ ../../../baselineserver/shared
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ TESTDATA ${test_data}
+)
+
+# Resources:
+set(images_resource_files
+ "images/alpha.png"
+ "images/alpha2x2.png"
+ "images/bitmap.png"
+ "images/border.png"
+ "images/borderimage.png"
+ "images/dome_argb32.png"
+ "images/dome_indexed.png"
+ "images/dome_indexed_mask.png"
+ "images/dome_mono.png"
+ "images/dome_mono_128.png"
+ "images/dome_mono_palette.png"
+ "images/dome_rgb32.png"
+ "images/dot.png"
+ "images/face.png"
+ "images/gam030.png"
+ "images/gam045.png"
+ "images/gam056.png"
+ "images/gam100.png"
+ "images/gam200.png"
+ "images/image.png"
+ "images/mask.png"
+ "images/mask_100.png"
+ "images/masked.png"
+ "images/sign.png"
+ "images/solid.png"
+ "images/solid2x2.png"
+ "images/struct-image-01.jpg"
+ "images/struct-image-01.png"
+ "images/zebra.png"
+)
+
+add_qt_resource(tst_lancelot "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_lancelot CONDITION QT_FEATURE_opengl
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
+
+#### Keys ignored in scope 4:.:../../../baselineserver/shared:../../../baselineserver/shared/qbaselinetest.pri:WIN32:
+# MKSPEC = "$$replace(QMAKESPEC, \\\\, /)"
+
+#### Keys ignored in scope 5:.:../../../baselineserver/shared:../../../baselineserver/shared/qbaselinetest.pri:else:
+# MKSPEC = "$$QMAKESPEC"
diff --git a/tests/auto/other/lancelot/lancelot.pro b/tests/auto/other/lancelot/lancelot.pro
index 6ece7315ed..5b9117983a 100644
--- a/tests/auto/other/lancelot/lancelot.pro
+++ b/tests/auto/other/lancelot/lancelot.pro
@@ -1,6 +1,7 @@
CONFIG += testcase
TARGET = tst_lancelot
QT += testlib gui-private
+qtConfig(opengl): QT += opengl
SOURCES += tst_lancelot.cpp \
paintcommands.cpp
diff --git a/tests/auto/other/languagechange/CMakeLists.txt b/tests/auto/other/languagechange/CMakeLists.txt
new file mode 100644
index 0000000000..f5c43b0ed1
--- /dev/null
+++ b/tests/auto/other/languagechange/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from languagechange.pro.
+
+#####################################################################
+## tst_languagechange Test:
+#####################################################################
+
+add_qt_test(tst_languagechange
+ SOURCES
+ tst_languagechange.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:languagechange.pro:WIN32:
+# testcase.timeout = "1800"
diff --git a/tests/auto/other/macgui/.prev_CMakeLists.txt b/tests/auto/other/macgui/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4923568a89
--- /dev/null
+++ b/tests/auto/other/macgui/.prev_CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from macgui.pro.
+
+if(NOT APPLE)
+ return()
+endif()
+if(NOT widgets)
+ return()
+endif()
+
+#####################################################################
+## tst_macgui Test:
+#####################################################################
+
+add_qt_test(tst_macgui
+ SOURCES
+ guitest.cpp guitest.h
+ tst_macgui.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:macgui.pro:<TRUE>:
+# _REQUIREMENTS = "mac" "widgets"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_macgui CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWApplicationServices}
+)
diff --git a/tests/auto/other/macgui/CMakeLists.txt b/tests/auto/other/macgui/CMakeLists.txt
new file mode 100644
index 0000000000..de69c43765
--- /dev/null
+++ b/tests/auto/other/macgui/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from macgui.pro.
+
+if(NOT APPLE)
+ return()
+endif()
+if(NOT TARGET Qt::Widgets) # special case
+ return()
+endif()
+
+#####################################################################
+## tst_macgui Test:
+#####################################################################
+
+add_qt_test(tst_macgui
+ SOURCES
+ guitest.cpp guitest.h
+ tst_macgui.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:macgui.pro:<TRUE>:
+# _REQUIREMENTS = "mac" "widgets"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_macgui CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWApplicationServices}
+)
diff --git a/tests/auto/other/macnativeevents/CMakeLists.txt b/tests/auto/other/macnativeevents/CMakeLists.txt
new file mode 100644
index 0000000000..167e46055a
--- /dev/null
+++ b/tests/auto/other/macnativeevents/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from macnativeevents.pro.
+
+if(NOT APPLE)
+ return()
+endif()
+
+#####################################################################
+## tst_macnativeevents Test:
+#####################################################################
+
+add_qt_test(tst_macnativeevents
+ SOURCES
+ expectedeventlist.cpp expectedeventlist.h
+ nativeeventlist.cpp nativeeventlist.h
+ qnativeevents.cpp qnativeevents.h
+ qnativeevents_mac.cpp
+ tst_macnativeevents.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:macnativeevents.pro:<TRUE>:
+# _REQUIREMENTS = "mac"
diff --git a/tests/auto/other/macplist/CMakeLists.txt b/tests/auto/other/macplist/CMakeLists.txt
new file mode 100644
index 0000000000..7ebb9d732c
--- /dev/null
+++ b/tests/auto/other/macplist/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from macplist.pro.
+
+if(NOT TARGET Qt::Widgets) # special case
+ return()
+endif()
+add_subdirectory(app)
+add_subdirectory(test)
diff --git a/tests/auto/other/macplist/app/.prev_CMakeLists.txt b/tests/auto/other/macplist/app/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f04afb4311
--- /dev/null
+++ b/tests/auto/other/macplist/app/.prev_CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from app.pro.
+
+#####################################################################
+## app Binary:
+#####################################################################
+
+add_qt_executable(app
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/other/macplist/app/CMakeLists.txt b/tests/auto/other/macplist/app/CMakeLists.txt
new file mode 100644
index 0000000000..2effb2aa34
--- /dev/null
+++ b/tests/auto/other/macplist/app/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from app.pro.
+
+#####################################################################
+## app Binary:
+#####################################################################
+
+add_qt_executable(app
+ GUI
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/other/macplist/test/CMakeLists.txt b/tests/auto/other/macplist/test/CMakeLists.txt
new file mode 100644
index 0000000000..3cb8066adf
--- /dev/null
+++ b/tests/auto/other/macplist/test/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_macplist Test:
+#####################################################################
+
+add_qt_test(tst_macplist
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
+ SOURCES
+ ../tst_macplist.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/other/networkselftest/CMakeLists.txt b/tests/auto/other/networkselftest/CMakeLists.txt
new file mode 100644
index 0000000000..7765557248
--- /dev/null
+++ b/tests/auto/other/networkselftest/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from networkselftest.pro.
+
+#####################################################################
+## tst_networkselftest Test:
+#####################################################################
+
+add_qt_test(tst_networkselftest
+ SOURCES
+ tst_networkselftest.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+)
diff --git a/tests/auto/other/qaccessibility/.prev_CMakeLists.txt b/tests/auto/other/qaccessibility/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8663e412c4
--- /dev/null
+++ b/tests/auto/other/qaccessibility/.prev_CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from qaccessibility.pro.
+
+if(NOT QT_FEATURE_accessibility)
+ return()
+endif()
+
+#####################################################################
+## tst_qaccessibility Test:
+#####################################################################
+
+add_qt_test(tst_qaccessibility
+ SOURCES
+ accessiblewidgets.h
+ tst_qaccessibility.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qaccessibility.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(accessibility)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qaccessibility CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT integity
+ PUBLIC_LIBRARIES
+ m
+)
+
+extend_target(tst_qaccessibility CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ole32
+ oleacc
+ oleaut32
+ uuid
+)
+
+extend_target(tst_qaccessibility CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ Qt::WindowsUIAutomationSupportPrivate
+)
diff --git a/tests/auto/other/qaccessibility/CMakeLists.txt b/tests/auto/other/qaccessibility/CMakeLists.txt
new file mode 100644
index 0000000000..f5f74bbafc
--- /dev/null
+++ b/tests/auto/other/qaccessibility/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Generated from qaccessibility.pro.
+
+if(NOT QT_FEATURE_accessibility)
+ return()
+endif()
+
+# special case begin
+if (WIN32 AND NOT TARGET Qt::WindowsUIAutomationSupport)
+ return()
+endif()
+# special case end
+
+#####################################################################
+## tst_qaccessibility Test:
+#####################################################################
+
+add_qt_test(tst_qaccessibility
+ SOURCES
+ accessiblewidgets.h
+ tst_qaccessibility.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qaccessibility.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(accessibility)"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qaccessibility CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND NOT integity
+ PUBLIC_LIBRARIES
+ m
+)
+
+extend_target(tst_qaccessibility CONDITION WIN32
+ PUBLIC_LIBRARIES
+ ole32
+ oleacc
+ oleaut32
+ uuid
+)
+
+extend_target(tst_qaccessibility CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ Qt::WindowsUIAutomationSupportPrivate
+)
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 0e61647e76..ed38976d94 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -203,11 +203,15 @@ private slots:
void applicationTest();
void mainWindowTest();
void subWindowTest();
+#if QT_CONFIG(shortcut)
void buttonTest();
+#endif
void scrollBarTest();
void tabTest();
void tabWidgetTest();
+#if QT_CONFIG(shortcut)
void menuTest();
+#endif
void spinBoxTest();
void doubleSpinBoxTest();
void textEditTest();
@@ -234,8 +238,10 @@ private slots:
void dockWidgetTest();
void comboBoxTest();
void accessibleName();
+#if QT_CONFIG(shortcut)
void labelTest();
void accelerators();
+#endif
void bridgeTest();
void focusChild();
@@ -1027,6 +1033,8 @@ public Q_SLOTS:
}
};
+#if QT_CONFIG(shortcut)
+
void tst_QAccessibility::buttonTest()
{
QWidget window;
@@ -1199,6 +1207,8 @@ void tst_QAccessibility::buttonTest()
// test->release();
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QAccessibility::scrollBarTest()
{
QScrollBar *scrollBar = new QScrollBar(Qt::Horizontal);
@@ -1408,6 +1418,8 @@ void tst_QAccessibility::tabWidgetTest()
QTestAccessibility::clearEvents();
}
+#if QT_CONFIG(shortcut)
+
void tst_QAccessibility::menuTest()
{
{
@@ -1618,6 +1630,8 @@ void tst_QAccessibility::menuTest()
QTestAccessibility::clearEvents();
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QAccessibility::spinBoxTest()
{
QSpinBox * const spinBox = new QSpinBox();
@@ -3630,6 +3644,8 @@ void tst_QAccessibility::comboBoxTest()
QTestAccessibility::clearEvents();
}
+#if QT_CONFIG(shortcut)
+
void tst_QAccessibility::labelTest()
{
QWidget *window = new QWidget;
@@ -3730,6 +3746,8 @@ void tst_QAccessibility::accelerators()
QTestAccessibility::clearEvents();
}
+#endif // QT_CONFIG(shortcut)
+
#ifdef QT_SUPPORTS_IACCESSIBLE2
static IUnknown *queryIA2(IAccessible *acc, const IID &iid)
{
diff --git a/tests/auto/other/qaccessibilitylinux/.prev_CMakeLists.txt b/tests/auto/other/qaccessibilitylinux/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7111e9cf57
--- /dev/null
+++ b/tests/auto/other/qaccessibilitylinux/.prev_CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qaccessibilitylinux.pro.
+
+#####################################################################
+## tst_qaccessibilitylinux Test:
+#####################################################################
+
+add_qt_test(tst_qaccessibilitylinux
+ SOURCES
+ tst_qaccessibilitylinux.cpp
+ DBUS_INTERFACE_SOURCES
+ ../../../../src/platformsupport/linuxaccessibility/dbusxml/Bus.xml
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+ Qt::DBus
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::LinuxAccessibilitySupportPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/other/qaccessibilitylinux/CMakeLists.txt b/tests/auto/other/qaccessibilitylinux/CMakeLists.txt
new file mode 100644
index 0000000000..ae6e7c4205
--- /dev/null
+++ b/tests/auto/other/qaccessibilitylinux/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from qaccessibilitylinux.pro.
+# special case begin
+if (NOT QT_FEATURE_accessibility OR NOT TARGET Qt::LinuxAccessibilitySupportPrivate
+ OR (QT_BUILD_STANDALONE_TESTS AND QT_WILL_INSTALL))
+ return()
+endif()
+# special case end
+
+#####################################################################
+## tst_qaccessibilitylinux Test:
+#####################################################################
+
+add_qt_test(tst_qaccessibilitylinux
+ SOURCES
+ tst_qaccessibilitylinux.cpp
+ DBUS_INTERFACE_SOURCES
+ ../../../../src/platformsupport/linuxaccessibility/dbusxml/Bus.xml
+ PUBLIC_LIBRARIES
+ Qt::AccessibilitySupportPrivate
+ Qt::DBus
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::LinuxAccessibilitySupportPrivate
+ Qt::Widgets
+)
+
+# special case begin
+# require for struct_marshallers_p.h which is included dbus_interface.h
+target_include_directories(tst_qaccessibilitylinux PRIVATE
+ ../../../../src/platformsupport/linuxaccessibility
+)
+# special case end
diff --git a/tests/auto/other/qaccessibilitymac/CMakeLists.txt b/tests/auto/other/qaccessibilitymac/CMakeLists.txt
new file mode 100644
index 0000000000..ab8b9fcb9b
--- /dev/null
+++ b/tests/auto/other/qaccessibilitymac/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from qaccessibilitymac.pro.
+
+if(NOT APPLE)
+ return()
+endif()
+
+#####################################################################
+## tst_qaccessibilitymac Test:
+#####################################################################
+
+add_qt_test(tst_qaccessibilitymac
+ SOURCES
+ tst_qaccessibilitymac.cpp
+ tst_qaccessibilitymac_helpers.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qaccessibilitymac.pro:<TRUE>:
+# _REQUIREMENTS = "mac"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qaccessibilitymac CONDITION APPLE
+ SOURCES
+ tst_qaccessibilitymac_helpers.mm
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ ${FWApplicationServices}
+ ${FWSecurity}
+)
diff --git a/tests/auto/other/qcomplextext/CMakeLists.txt b/tests/auto/other/qcomplextext/CMakeLists.txt
new file mode 100644
index 0000000000..ee504faaf7
--- /dev/null
+++ b/tests/auto/other/qcomplextext/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from qcomplextext.pro.
+
+#####################################################################
+## tst_qcomplextext Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "data")
+
+add_qt_test(tst_qcomplextext
+ SOURCES
+ tst_qcomplextext.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID)
+ # Resources:
+ set(android_testdata_resource_files
+ "data/BidiCharacterTest.txt"
+ "data/BidiTest.txt"
+ )
+
+ add_qt_resource(tst_qcomplextext "android_testdata"
+ PREFIX
+ "/android_testdata"
+ FILES
+ ${android_testdata_resource_files}
+ )
+endif()
+
+extend_target(tst_qcomplextext CONDITION builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
diff --git a/tests/auto/other/qfocusevent/CMakeLists.txt b/tests/auto/other/qfocusevent/CMakeLists.txt
new file mode 100644
index 0000000000..a2406c034a
--- /dev/null
+++ b/tests/auto/other/qfocusevent/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qfocusevent.pro.
+
+#####################################################################
+## tst_qfocusevent Test:
+#####################################################################
+
+add_qt_test(tst_qfocusevent
+ SOURCES
+ tst_qfocusevent.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index 260ba12a97..9285d5b5da 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -91,7 +91,9 @@ private slots:
void checkReason_BackTab();
void checkReason_Popup();
void checkReason_focusWidget();
+#if QT_CONFIG(shortcut)
void checkReason_Shortcut();
+#endif
void checkReason_ActiveWindow();
private:
@@ -250,6 +252,8 @@ QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
#endif
+#if QT_CONFIG(shortcut)
+
void tst_QFocusEvent::checkReason_Shortcut()
{
initWidget();
@@ -288,6 +292,8 @@ void tst_QFocusEvent::checkReason_Shortcut()
#endif
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QFocusEvent::checkReason_focusWidget()
{
// This test checks that a widget doesn't loose
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
new file mode 100644
index 0000000000..c4b9b186a1
--- /dev/null
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qnetworkaccessmanager_and_qprogressdialog.pro.
+
+#####################################################################
+## tst_qnetworkaccessmanager_and_qprogressdialog Test:
+#####################################################################
+
+add_qt_test(tst_qnetworkaccessmanager_and_qprogressdialog
+ SOURCES
+ tst_qnetworkaccessmanager_and_qprogressdialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::Widgets
+)
diff --git a/tests/auto/other/qobjectrace/CMakeLists.txt b/tests/auto/other/qobjectrace/CMakeLists.txt
new file mode 100644
index 0000000000..972fdcfcac
--- /dev/null
+++ b/tests/auto/other/qobjectrace/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qobjectrace.pro.
+
+#####################################################################
+## qobjectrace Test:
+#####################################################################
+
+add_qt_test(qobjectrace
+ SOURCES
+ ../../../shared/emulationdetector.h
+ tst_qobjectrace.cpp
+ INCLUDE_DIRECTORIES
+ ../../../shared
+)
diff --git a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
new file mode 100644
index 0000000000..ccc2c55c13
--- /dev/null
+++ b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qprocess_and_guieventloop.pro.
+
+#####################################################################
+## tst_qprocess_and_guieventloop Test:
+#####################################################################
+
+add_qt_test(tst_qprocess_and_guieventloop
+ SOURCES
+ tst_qprocess_and_guieventloop.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+add_subdirectory(write-read-write)
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
new file mode 100644
index 0000000000..dfea85f3e3
--- /dev/null
+++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from write-read-write.pro.
+
+#####################################################################
+## write-read-write Binary:
+#####################################################################
+
+add_qt_executable(write-read-write
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt b/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt
new file mode 100644
index 0000000000..5175bb68fe
--- /dev/null
+++ b/tests/auto/other/qsharedpointer_and_qwidget/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsharedpointer_and_qwidget.pro.
+
+#####################################################################
+## tst_qsharedpointer_and_qwidget Test:
+#####################################################################
+
+add_qt_test(tst_qsharedpointer_and_qwidget
+ SOURCES
+ tst_qsharedpointer_and_qwidget.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/other/qtokenautomaton/CMakeLists.txt b/tests/auto/other/qtokenautomaton/CMakeLists.txt
new file mode 100644
index 0000000000..f495ddb1c6
--- /dev/null
+++ b/tests/auto/other/qtokenautomaton/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtokenautomaton.pro.
+
+#####################################################################
+## tst_qtokenautomaton Test:
+#####################################################################
+
+add_qt_test(tst_qtokenautomaton
+ SOURCES
+ tokenizers/basic/basic.cpp tokenizers/basic/basic.h
+ tokenizers/basicNamespace/basicNamespace.cpp tokenizers/basicNamespace/basicNamespace.h
+ tokenizers/boilerplate/boilerplate.cpp tokenizers/boilerplate/boilerplate.h
+ tokenizers/noNamespace/noNamespace.cpp tokenizers/noNamespace/noNamespace.h
+ tokenizers/noToString/noToString.cpp tokenizers/noToString/noToString.h
+ tokenizers/withNamespace/withNamespace.cpp tokenizers/withNamespace/withNamespace.h
+ tst_qtokenautomaton.cpp
+)
diff --git a/tests/auto/other/toolsupport/CMakeLists.txt b/tests/auto/other/toolsupport/CMakeLists.txt
new file mode 100644
index 0000000000..51af17d866
--- /dev/null
+++ b/tests/auto/other/toolsupport/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from toolsupport.pro.
+
+#####################################################################
+## tst_toolsupport Test:
+#####################################################################
+
+add_qt_test(tst_toolsupport
+ SOURCES
+ tst_toolsupport.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+)
diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp
index ab7bca8322..9591eca16a 100644
--- a/tests/auto/other/toolsupport/tst_toolsupport.cpp
+++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp
@@ -97,14 +97,14 @@ void tst_toolsupport::offsets_data()
{
QTestData &data = QTest::newRow("sizeof(QObjectData)")
<< sizeof(QObjectData);
- data << 28 << 48; // vptr + 3 ptr + 2 int + ptr
+ data << 36 << 64; // vptr + 2 ptr + (2*ptr + int) + 2 int + ptr
}
#if RUN_MEMBER_OFFSET_TEST
{
QTestData &data = QTest::newRow("QObjectPrivate::extraData")
<< pmm_to_offsetof(&QObjectPrivate::extraData);
- data << 28 << 48; // sizeof(QObjectData)
+ data << 36 << 64; // sizeof(QObjectData)
}
{
@@ -126,9 +126,9 @@ void tst_toolsupport::offsets_data()
#ifdef Q_PROCESSOR_X86
// x86 32-bit has weird alignment rules. Refer to QtPrivate::AlignOf in
// qglobal.h for more details.
- data << 152 << 224;
+ data << 184 << 288;
#else
- data << 156 << 224;
+ data << 188 << 288;
#endif
}
#endif
diff --git a/tests/auto/other/xkbkeyboard/CMakeLists.txt b/tests/auto/other/xkbkeyboard/CMakeLists.txt
new file mode 100644
index 0000000000..93a02eea12
--- /dev/null
+++ b/tests/auto/other/xkbkeyboard/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from xkbkeyboard.pro.
+
+#####################################################################
+## tst_xkbkeyboard Test:
+#####################################################################
+
+add_qt_test(tst_xkbkeyboard
+ SOURCES
+ tst_xkbkeyboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
diff --git a/tests/auto/printsupport/CMakeLists.txt b/tests/auto/printsupport/CMakeLists.txt
new file mode 100644
index 0000000000..633c7d5e71
--- /dev/null
+++ b/tests/auto/printsupport/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from printsupport.pro.
+
+add_subdirectory(dialogs)
+add_subdirectory(kernel)
diff --git a/tests/auto/printsupport/dialogs/CMakeLists.txt b/tests/auto/printsupport/dialogs/CMakeLists.txt
new file mode 100644
index 0000000000..548ddc8577
--- /dev/null
+++ b/tests/auto/printsupport/dialogs/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from dialogs.pro.
+
+add_subdirectory(qabstractprintdialog)
diff --git a/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt b/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt
new file mode 100644
index 0000000000..91b699f648
--- /dev/null
+++ b/tests/auto/printsupport/dialogs/qabstractprintdialog/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qabstractprintdialog.pro.
+
+#####################################################################
+## tst_qabstractprintdialog Test:
+#####################################################################
+
+add_qt_test(tst_qabstractprintdialog
+ SOURCES
+ tst_qabstractprintdialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupport
+ Qt::Widgets
+)
diff --git a/tests/auto/printsupport/kernel/CMakeLists.txt b/tests/auto/printsupport/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..8154d5e868
--- /dev/null
+++ b/tests/auto/printsupport/kernel/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qprintdevice)
+add_subdirectory(qprinter)
+add_subdirectory(qprinterinfo)
diff --git a/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt b/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
new file mode 100644
index 0000000000..1ddb49d8e9
--- /dev/null
+++ b/tests/auto/printsupport/kernel/qprintdevice/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qprintdevice.pro.
+
+#####################################################################
+## tst_qprintdevice Test:
+#####################################################################
+
+add_qt_test(tst_qprintdevice
+ SOURCES
+ tst_qprintdevice.cpp
+ DEFINES
+ QT_USE_USING_NAMESPACE
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupportPrivate
+)
diff --git a/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt b/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
new file mode 100644
index 0000000000..6d15bab349
--- /dev/null
+++ b/tests/auto/printsupport/kernel/qprinter/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qprinter.pro.
+
+#####################################################################
+## tst_qprinter Test:
+#####################################################################
+
+add_qt_test(tst_qprinter
+ SOURCES
+ tst_qprinter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupport
+ Qt::Widgets
+)
diff --git a/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt b/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
new file mode 100644
index 0000000000..5923d57ef5
--- /dev/null
+++ b/tests/auto/printsupport/kernel/qprinterinfo/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qprinterinfo.pro.
+
+#####################################################################
+## tst_qprinterinfo Test:
+#####################################################################
+
+add_qt_test(tst_qprinterinfo
+ SOURCES
+ tst_qprinterinfo.cpp
+ DEFINES
+ QT_USE_USING_NAMESPACE
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupport
+)
diff --git a/tests/auto/sql/CMakeLists.txt b/tests/auto/sql/CMakeLists.txt
new file mode 100644
index 0000000000..415d7598ae
--- /dev/null
+++ b/tests/auto/sql/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from sql.pro.
+
+add_subdirectory(kernel)
+add_subdirectory(models)
diff --git a/tests/auto/sql/kernel/CMakeLists.txt b/tests/auto/sql/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..8d3f0b6bc5
--- /dev/null
+++ b/tests/auto/sql/kernel/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_subdirectory(qsqlfield)
+add_subdirectory(qsqldatabase)
+add_subdirectory(qsqlerror)
+add_subdirectory(qsqldriver)
+add_subdirectory(qsqlquery)
+add_subdirectory(qsqlrecord)
+add_subdirectory(qsqlthread)
+add_subdirectory(qsql)
+add_subdirectory(qsqlresult)
diff --git a/tests/auto/sql/kernel/qsql/CMakeLists.txt b/tests/auto/sql/kernel/qsql/CMakeLists.txt
new file mode 100644
index 0000000000..c3c3eac7d2
--- /dev/null
+++ b/tests/auto/sql/kernel/qsql/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qsql.pro.
+
+#####################################################################
+## tst_qsql Test:
+#####################################################################
+
+add_qt_test(tst_qsql
+ SOURCES
+ tst_qsql.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt b/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
new file mode 100644
index 0000000000..ae64269c11
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqldatabase/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsqldatabase.pro.
+
+#####################################################################
+## tst_qsqldatabase Test:
+#####################################################################
+
+add_qt_test(tst_qsqldatabase
+ SOURCES
+ tst_qsqldatabase.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt b/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
new file mode 100644
index 0000000000..30ce3c1053
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqldriver/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsqldriver.pro.
+
+#####################################################################
+## tst_qsqldriver Test:
+#####################################################################
+
+add_qt_test(tst_qsqldriver
+ SOURCES
+ tst_qsqldriver.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
index 15190b0f3e..5fa5c1bb58 100644
--- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
+++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
@@ -143,7 +143,7 @@ void tst_QSqlDriver::record()
QCOMPARE(rec.count(), fields.size());
QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
- // QTBUG-1363: QSqlField::length() always return -1 when using QODBC3 driver and QSqlDatabase::record()
+ // QTBUG-1363: QSqlField::length() always return -1 when using QODBC driver and QSqlDatabase::record()
if (dbType == QSqlDriver::MSSqlServer && db.driverName().startsWith("QODBC"))
QCOMPARE(rec.field(1).length(), 20);
diff --git a/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt b/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
new file mode 100644
index 0000000000..45e7bb383b
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlerror/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qsqlerror.pro.
+
+#####################################################################
+## tst_qsqlerror Test:
+#####################################################################
+
+add_qt_test(tst_qsqlerror
+ SOURCES
+ tst_qsqlerror.cpp
+ PUBLIC_LIBRARIES
+ Qt::Sql
+)
diff --git a/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt b/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
new file mode 100644
index 0000000000..0a570ed1f2
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlfield/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qsqlfield.pro.
+
+#####################################################################
+## tst_qsqlfield Test:
+#####################################################################
+
+add_qt_test(tst_qsqlfield
+ SOURCES
+ tst_qsqlfield.cpp
+ PUBLIC_LIBRARIES
+ Qt::Sql
+)
diff --git a/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt b/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
new file mode 100644
index 0000000000..a5d3c96baa
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlquery/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsqlquery.pro.
+
+#####################################################################
+## tst_qsqlquery Test:
+#####################################################################
+
+add_qt_test(tst_qsqlquery
+ SOURCES
+ tst_qsqlquery.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt b/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
new file mode 100644
index 0000000000..743dc27e9d
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlrecord/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qsqlrecord.pro.
+
+#####################################################################
+## tst_qsqlrecord Test:
+#####################################################################
+
+add_qt_test(tst_qsqlrecord
+ SOURCES
+ tst_qsqlrecord.cpp
+ PUBLIC_LIBRARIES
+ Qt::Sql
+)
diff --git a/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt b/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
new file mode 100644
index 0000000000..c150c8a9d7
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlresult/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsqlresult.pro.
+
+#####################################################################
+## tst_qsqlresult Test:
+#####################################################################
+
+add_qt_test(tst_qsqlresult
+ SOURCES
+ testsqldriver.h
+ tst_qsqlresult.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt b/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
new file mode 100644
index 0000000000..17e66f42dd
--- /dev/null
+++ b/tests/auto/sql/kernel/qsqlthread/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsqlthread.pro.
+
+#####################################################################
+## tst_qsqlthread Test:
+#####################################################################
+
+add_qt_test(tst_qsqlthread
+ SOURCES
+ tst_qsqlthread.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/models/CMakeLists.txt b/tests/auto/sql/models/CMakeLists.txt
new file mode 100644
index 0000000000..df530443c4
--- /dev/null
+++ b/tests/auto/sql/models/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_subdirectory(qsqlrelationaltablemodel)
+add_subdirectory(qsqltablemodel)
+
+if(TARGET Qt::Widgets)
+ add_subdirectory(qsqlquerymodel)
+endif()
diff --git a/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt b/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
new file mode 100644
index 0000000000..f2da569f8f
--- /dev/null
+++ b/tests/auto/sql/models/qsqlquerymodel/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qsqlquerymodel.pro.
+
+#####################################################################
+## tst_qsqlquerymodel Test:
+#####################################################################
+
+add_qt_test(tst_qsqlquerymodel
+ SOURCES
+ tst_qsqlquerymodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Sql
+ Qt::SqlPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt b/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt
new file mode 100644
index 0000000000..caadae1df5
--- /dev/null
+++ b/tests/auto/sql/models/qsqlrelationaldelegate/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsqlrelationaldelegate.pro.
+
+#####################################################################
+## tst_qsqlrelationaldelegate Test:
+#####################################################################
+
+add_qt_test(tst_qsqlrelationaldelegate
+ SOURCES
+ tst_qsqlrelationaldelegate.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt b/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt
new file mode 100644
index 0000000000..f695a6173e
--- /dev/null
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsqlrelationaltablemodel.pro.
+
+#####################################################################
+## tst_qsqlrelationaltablemodel Test:
+#####################################################################
+
+add_qt_test(tst_qsqlrelationaltablemodel
+ SOURCES
+ tst_qsqlrelationaltablemodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt b/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
new file mode 100644
index 0000000000..f3e703591f
--- /dev/null
+++ b/tests/auto/sql/models/qsqltablemodel/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qsqltablemodel.pro.
+
+#####################################################################
+## tst_qsqltablemodel Test:
+#####################################################################
+
+add_qt_test(tst_qsqltablemodel
+ SOURCES
+ tst_qsqltablemodel.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+)
diff --git a/tests/auto/testlib/.prev_CMakeLists.txt b/tests/auto/testlib/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..194852f91c
--- /dev/null
+++ b/tests/auto/testlib/.prev_CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from testlib.pro.
+
+add_subdirectory(outformat)
+add_subdirectory(qsignalspy)
+add_subdirectory(selftests)
+if(TARGET Qt::Widgets)
+ add_subdirectory(qabstractitemmodeltester)
+endif()
diff --git a/tests/auto/testlib/CMakeLists.txt b/tests/auto/testlib/CMakeLists.txt
new file mode 100644
index 0000000000..fd342e82a4
--- /dev/null
+++ b/tests/auto/testlib/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from testlib.pro.
+
+# add_subdirectory(outformat) # special case missing project
+add_subdirectory(qsignalspy)
+# add_subdirectory(selftests) # special case disable because the conversion is broken and hard to fix atm
+if(TARGET Qt::Widgets)
+ add_subdirectory(qabstractitemmodeltester)
+endif()
diff --git a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt
new file mode 100644
index 0000000000..c4c9b7d044
--- /dev/null
+++ b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qabstractitemmodeltester.pro.
+
+#####################################################################
+## qabstractitemmodeltester Test:
+#####################################################################
+
+add_qt_test(qabstractitemmodeltester
+ SOURCES
+ ../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../other/qabstractitemmodelutils/dynamictreemodel.h
+ tst_qabstractitemmodeltester.cpp
+ INCLUDE_DIRECTORIES
+ ../../other/qabstractitemmodelutils
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/testlib/qsignalspy/CMakeLists.txt b/tests/auto/testlib/qsignalspy/CMakeLists.txt
new file mode 100644
index 0000000000..b3832d44fa
--- /dev/null
+++ b/tests/auto/testlib/qsignalspy/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qsignalspy.pro.
+
+#####################################################################
+## tst_qsignalspy Test:
+#####################################################################
+
+add_qt_test(tst_qsignalspy
+ SOURCES
+ tst_qsignalspy.cpp
+)
diff --git a/tests/auto/testlib/selftests/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..124d2a60a0
--- /dev/null
+++ b/tests/auto/testlib/selftests/.prev_CMakeLists.txt
@@ -0,0 +1,9 @@
+# Generated from selftests.pro.
+
+add_subdirectory(test)
+
+if(NOT WINRT)
+
+ if(TARGET Qt::Gui)
+ endif()
+endif()
diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt
new file mode 100644
index 0000000000..6b7fdb0d53
--- /dev/null
+++ b/tests/auto/testlib/selftests/CMakeLists.txt
@@ -0,0 +1,411 @@
+# Generated from selftests.pro.
+
+# special case begin
+# The whole file is written manually.
+
+if(NOT WINRT)
+ add_subdirectory(assert)
+ add_subdirectory(badxml)
+ add_subdirectory(benchlibcallgrind)
+ add_subdirectory(benchlibcounting)
+ add_subdirectory(benchlibeventcounter)
+ add_subdirectory(benchliboptions)
+ add_subdirectory(benchlibtickcounter)
+ add_subdirectory(benchlibwalltime)
+ add_subdirectory(blacklisted)
+ add_subdirectory(cmptest)
+ add_subdirectory(commandlinedata)
+ add_subdirectory(counting)
+ add_subdirectory(crashes)
+ add_subdirectory(datatable)
+ add_subdirectory(datetime)
+ add_subdirectory(deleteLater)
+ add_subdirectory(deleteLater_noApp)
+ add_subdirectory(differentexec)
+ add_subdirectory(exceptionthrow)
+ add_subdirectory(expectfail)
+ add_subdirectory(failcleanup)
+ add_subdirectory(faildatatype)
+ add_subdirectory(failfetchtype)
+ add_subdirectory(failinit)
+ add_subdirectory(failinitdata)
+ add_subdirectory(fetchbogus)
+ add_subdirectory(findtestdata)
+ add_subdirectory(float)
+ add_subdirectory(globaldata)
+ add_subdirectory(longstring)
+ add_subdirectory(maxwarnings)
+ add_subdirectory(multiexec)
+ add_subdirectory(pairdiagnostics)
+ add_subdirectory(printdatatags)
+ add_subdirectory(printdatatagswithglobaltags)
+ add_subdirectory(qexecstringlist)
+ add_subdirectory(silent)
+ add_subdirectory(signaldumper)
+ add_subdirectory(singleskip)
+ add_subdirectory(skip)
+ add_subdirectory(skipcleanup)
+ add_subdirectory(skipinit)
+ add_subdirectory(skipinitdata)
+ add_subdirectory(sleep)
+ add_subdirectory(strcmp)
+ add_subdirectory(subtest)
+ add_subdirectory(testlib)
+ add_subdirectory(tuplediagnostics)
+ add_subdirectory(verbose1)
+ add_subdirectory(verbose2)
+ add_subdirectory(verifyexceptionthrown)
+ add_subdirectory(warnings)
+ add_subdirectory(watchdog)
+ add_subdirectory(xunit)
+
+ if(TARGET Qt::Gui)
+ add_subdirectory(keyboard)
+ add_subdirectory(mouse)
+ endif()
+endif()
+
+#####################################################################
+## tst_selftests Test:
+#####################################################################
+
+add_qt_test(tst_selftests
+ SOURCES
+ ../../../shared/emulationdetector.h
+ tst_selftests.cpp
+ INCLUDE_DIRECTORIES
+ ../../../shared
+ LIBRARIES
+ Qt::TestPrivate
+)
+
+add_qt_resource(tst_selftests "expected_files" PREFIX "/" FILES
+ expected_assert.lightxml
+ expected_assert.tap
+ expected_assert.teamcity
+ expected_assert.txt
+ expected_assert.xml
+ expected_assert.xunitxml
+ expected_badxml.lightxml
+ expected_badxml.tap
+ expected_badxml.teamcity
+ expected_badxml.txt
+ expected_badxml.xml
+ expected_badxml.xunitxml
+ expected_benchlibcallgrind_0.txt
+ expected_benchlibcallgrind_1.txt
+ expected_benchlibcallgrind.csv
+ expected_benchlibcallgrind.lightxml
+ expected_benchlibcallgrind.tap
+ expected_benchlibcallgrind.teamcity
+ expected_benchlibcallgrind.xml
+ expected_benchlibcallgrind.xunitxml
+ expected_benchlibcounting.csv
+ expected_benchlibcounting.lightxml
+ expected_benchlibcounting.tap
+ expected_benchlibcounting.teamcity
+ expected_benchlibcounting.txt
+ expected_benchlibcounting.xml
+ expected_benchlibcounting.xunitxml
+ expected_benchlibeventcounter.csv
+ expected_benchlibeventcounter.lightxml
+ expected_benchlibeventcounter.tap
+ expected_benchlibeventcounter.teamcity
+ expected_benchlibeventcounter.txt
+ expected_benchlibeventcounter.xml
+ expected_benchlibeventcounter.xunitxml
+ expected_benchliboptions.csv
+ expected_benchliboptions.lightxml
+ expected_benchliboptions.tap
+ expected_benchliboptions.teamcity
+ expected_benchliboptions.txt
+ expected_benchliboptions.xml
+ expected_benchliboptions.xunitxml
+ expected_benchlibtickcounter.csv
+ expected_benchlibtickcounter.lightxml
+ expected_benchlibtickcounter.tap
+ expected_benchlibtickcounter.teamcity
+ expected_benchlibtickcounter.txt
+ expected_benchlibtickcounter.xml
+ expected_benchlibtickcounter.xunitxml
+ expected_benchlibwalltime.csv
+ expected_benchlibwalltime.lightxml
+ expected_benchlibwalltime.tap
+ expected_benchlibwalltime.teamcity
+ expected_benchlibwalltime.txt
+ expected_benchlibwalltime.xml
+ expected_benchlibwalltime.xunitxml
+ expected_blacklisted.lightxml
+ expected_blacklisted.tap
+ expected_blacklisted.teamcity
+ expected_blacklisted.txt
+ expected_blacklisted.xml
+ expected_blacklisted.xunitxml
+ expected_cmptest.lightxml
+ expected_cmptest.tap
+ expected_cmptest.teamcity
+ expected_cmptest.txt
+ expected_cmptest.xml
+ expected_cmptest.xunitxml
+ expected_commandlinedata.lightxml
+ expected_commandlinedata.tap
+ expected_commandlinedata.teamcity
+ expected_commandlinedata.txt
+ expected_commandlinedata.xml
+ expected_commandlinedata.xunitxml
+ expected_counting.lightxml
+ expected_counting.tap
+ expected_counting.teamcity
+ expected_counting.txt
+ expected_counting.xml
+ expected_counting.xunitxml
+ expected_crashes_1.txt
+ expected_crashes_2.txt
+ expected_crashes_3.txt
+ expected_crashes_4.txt
+ expected_crashes_5.txt
+ expected_datatable.lightxml
+ expected_datatable.tap
+ expected_datatable.teamcity
+ expected_datatable.txt
+ expected_datatable.xml
+ expected_datatable.xunitxml
+ expected_datetime.lightxml
+ expected_datetime.tap
+ expected_datetime.teamcity
+ expected_datetime.txt
+ expected_datetime.xml
+ expected_datetime.xunitxml
+ expected_differentexec.lightxml
+ expected_differentexec.tap
+ expected_differentexec.teamcity
+ expected_differentexec.txt
+ expected_differentexec.xml
+ expected_differentexec.xunitxml
+ expected_exceptionthrow.lightxml
+ expected_exceptionthrow.tap
+ expected_exceptionthrow.teamcity
+ expected_exceptionthrow.txt
+ expected_exceptionthrow.xml
+ expected_exceptionthrow.xunitxml
+ expected_expectfail.lightxml
+ expected_expectfail.tap
+ expected_expectfail.teamcity
+ expected_expectfail.txt
+ expected_expectfail.xml
+ expected_expectfail.xunitxml
+ expected_failcleanup.lightxml
+ expected_failcleanup.tap
+ expected_failcleanup.teamcity
+ expected_failcleanup.txt
+ expected_failcleanup.xml
+ expected_failcleanup.xunitxml
+ expected_faildatatype.lightxml
+ expected_faildatatype.tap
+ expected_faildatatype.teamcity
+ expected_faildatatype.txt
+ expected_faildatatype.xml
+ expected_faildatatype.xunitxml
+ expected_failfetchtype.lightxml
+ expected_failfetchtype.tap
+ expected_failfetchtype.teamcity
+ expected_failfetchtype.txt
+ expected_failfetchtype.xml
+ expected_failfetchtype.xunitxml
+ expected_failinitdata.lightxml
+ expected_failinitdata.tap
+ expected_failinitdata.teamcity
+ expected_failinitdata.txt
+ expected_failinitdata.xml
+ expected_failinitdata.xunitxml
+ expected_failinit.lightxml
+ expected_failinit.tap
+ expected_failinit.teamcity
+ expected_failinit.txt
+ expected_failinit.xml
+ expected_failinit.xunitxml
+ expected_fetchbogus.lightxml
+ expected_fetchbogus.tap
+ expected_fetchbogus.teamcity
+ expected_fetchbogus.txt
+ expected_fetchbogus.xml
+ expected_fetchbogus.xunitxml
+ expected_findtestdata.lightxml
+ expected_findtestdata.tap
+ expected_findtestdata.teamcity
+ expected_findtestdata.txt
+ expected_findtestdata.xml
+ expected_findtestdata.xunitxml
+ expected_float.lightxml
+ expected_float.tap
+ expected_float.teamcity
+ expected_float.txt
+ expected_float.xml
+ expected_float.xunitxml
+ expected_globaldata.lightxml
+ expected_globaldata.tap
+ expected_globaldata.teamcity
+ expected_globaldata.txt
+ expected_globaldata.xml
+ expected_globaldata.xunitxml
+ expected_keyboard.lightxml
+ expected_keyboard.tap
+ expected_keyboard.teamcity
+ expected_keyboard.txt
+ expected_keyboard.xml
+ expected_keyboard.xunitxml
+ expected_longstring.lightxml
+ expected_longstring.tap
+ expected_longstring.teamcity
+ expected_longstring.txt
+ expected_longstring.xml
+ expected_longstring.xunitxml
+ expected_maxwarnings.lightxml
+ expected_maxwarnings.tap
+ expected_maxwarnings.teamcity
+ expected_maxwarnings.txt
+ expected_maxwarnings.xml
+ expected_maxwarnings.xunitxml
+ expected_multiexec.lightxml
+ expected_multiexec.tap
+ expected_multiexec.teamcity
+ expected_multiexec.txt
+ expected_multiexec.xml
+ expected_multiexec.xunitxml
+ expected_pairdiagnostics.lightxml
+ expected_pairdiagnostics.tap
+ expected_pairdiagnostics.teamcity
+ expected_pairdiagnostics.txt
+ expected_pairdiagnostics.xml
+ expected_pairdiagnostics.xunitxml
+ expected_printdatatags.txt
+ expected_printdatatagswithglobaltags.txt
+ expected_qexecstringlist.lightxml
+ expected_qexecstringlist.tap
+ expected_qexecstringlist.teamcity
+ expected_qexecstringlist.txt
+ expected_qexecstringlist.xml
+ expected_qexecstringlist.xunitxml
+ expected_signaldumper.lightxml
+ expected_signaldumper.tap
+ expected_signaldumper.teamcity
+ expected_signaldumper.txt
+ expected_signaldumper.xml
+ expected_signaldumper.xunitxml
+ expected_silent.lightxml
+ expected_silent.tap
+ expected_silent.teamcity
+ expected_silent.txt
+ expected_silent.xml
+ expected_silent.xunitxml
+ expected_singleskip.lightxml
+ expected_singleskip.tap
+ expected_singleskip.teamcity
+ expected_singleskip.txt
+ expected_singleskip.xml
+ expected_singleskip.xunitxml
+ expected_skipcleanup.lightxml
+ expected_skipcleanup.tap
+ expected_skipcleanup.teamcity
+ expected_skipcleanup.txt
+ expected_skipcleanup.xml
+ expected_skipcleanup.xunitxml
+ expected_skipinitdata.lightxml
+ expected_skipinitdata.tap
+ expected_skipinitdata.teamcity
+ expected_skipinitdata.txt
+ expected_skipinitdata.xml
+ expected_skipinitdata.xunitxml
+ expected_skipinit.lightxml
+ expected_skipinit.tap
+ expected_skipinit.teamcity
+ expected_skipinit.txt
+ expected_skipinit.xml
+ expected_skipinit.xunitxml
+ expected_skip.lightxml
+ expected_skip.tap
+ expected_skip.teamcity
+ expected_skip.txt
+ expected_skip.xml
+ expected_skip.xunitxml
+ expected_sleep.lightxml
+ expected_sleep.tap
+ expected_sleep.teamcity
+ expected_sleep.txt
+ expected_sleep.xml
+ expected_sleep.xunitxml
+ expected_strcmp.lightxml
+ expected_strcmp.tap
+ expected_strcmp.teamcity
+ expected_strcmp.txt
+ expected_strcmp.xml
+ expected_strcmp.xunitxml
+ expected_subtest.lightxml
+ expected_subtest.tap
+ expected_subtest.teamcity
+ expected_subtest.txt
+ expected_subtest.xml
+ expected_subtest.xunitxml
+ expected_testlib.lightxml
+ expected_testlib.tap
+ expected_testlib.teamcity
+ expected_testlib.txt
+ expected_testlib.xml
+ expected_testlib.xunitxml
+ expected_tuplediagnostics.lightxml
+ expected_tuplediagnostics.tap
+ expected_tuplediagnostics.teamcity
+ expected_tuplediagnostics.txt
+ expected_tuplediagnostics.xml
+ expected_tuplediagnostics.xunitxml
+ expected_verbose1.lightxml
+ expected_verbose1.tap
+ expected_verbose1.teamcity
+ expected_verbose1.txt
+ expected_verbose1.xml
+ expected_verbose1.xunitxml
+ expected_verbose2.lightxml
+ expected_verbose2.tap
+ expected_verbose2.teamcity
+ expected_verbose2.txt
+ expected_verbose2.xml
+ expected_verbose2.xunitxml
+ expected_verifyexceptionthrown.lightxml
+ expected_verifyexceptionthrown.tap
+ expected_verifyexceptionthrown.teamcity
+ expected_verifyexceptionthrown.txt
+ expected_verifyexceptionthrown.xml
+ expected_verifyexceptionthrown.xunitxml
+ expected_warnings.lightxml
+ expected_warnings.tap
+ expected_warnings.teamcity
+ expected_warnings.txt
+ expected_warnings.xml
+ expected_warnings.xunitxml
+ expected_watchdog.lightxml
+ expected_watchdog.tap
+ expected_watchdog.teamcity
+ expected_watchdog.txt
+ expected_watchdog.xml
+ expected_watchdog.xunitxml
+ expected_xunit.lightxml
+ expected_xunit.tap
+ expected_xunit.teamcity
+ expected_xunit.txt
+ expected_xunit.xml
+ expected_xunit.xunitxml
+)
+
+
+#### Keys ignored in scope 1:.:.:test.pro:<TRUE>:
+# CONFIG = "testcase"
+# expected_files.base = "$$PWD/.."
+# expected_files.files = "$$files$$PWD/../expected_*"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND NOT WINRT AND for(file,SUBPROGRAMS):
+# TEST_HELPER_INSTALLS = "../$${file}/$${file}"
+
+# special case end
diff --git a/tests/auto/testlib/selftests/assert/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/assert/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..65ef6ac126
--- /dev/null
+++ b/tests/auto/testlib/selftests/assert/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from assert.pro.
+
+#####################################################################
+## assert Binary:
+#####################################################################
+
+add_qt_executable(assert
+ SOURCES
+ tst_assert.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/assert/CMakeLists.txt b/tests/auto/testlib/selftests/assert/CMakeLists.txt
new file mode 100644
index 0000000000..a2904beb96
--- /dev/null
+++ b/tests/auto/testlib/selftests/assert/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from assert.pro.
+
+#####################################################################
+## assert Binary:
+#####################################################################
+
+add_qt_executable(assert
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_assert.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/badxml/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/badxml/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..755cbecd2e
--- /dev/null
+++ b/tests/auto/testlib/selftests/badxml/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from badxml.pro.
+
+#####################################################################
+## badxml Binary:
+#####################################################################
+
+add_qt_executable(badxml
+ SOURCES
+ tst_badxml.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/badxml/CMakeLists.txt b/tests/auto/testlib/selftests/badxml/CMakeLists.txt
new file mode 100644
index 0000000000..40870b1983
--- /dev/null
+++ b/tests/auto/testlib/selftests/badxml/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from badxml.pro.
+
+#####################################################################
+## badxml Binary:
+#####################################################################
+
+add_qt_executable(badxml
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_badxml.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcallgrind/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d6f35cd1de
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from benchlibcallgrind.pro.
+
+#####################################################################
+## benchlibcallgrind Binary:
+#####################################################################
+
+add_qt_executable(benchlibcallgrind
+ SOURCES
+ tst_benchlibcallgrind.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt
new file mode 100644
index 0000000000..230d11e391
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from benchlibcallgrind.pro.
+
+#####################################################################
+## benchlibcallgrind Binary:
+#####################################################################
+
+add_qt_executable(benchlibcallgrind
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_benchlibcallgrind.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibcounting/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcounting/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6b592f7515
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibcounting/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from benchlibcounting.pro.
+
+#####################################################################
+## benchlibcounting Binary:
+#####################################################################
+
+add_qt_executable(benchlibcounting
+ SOURCES
+ tst_benchlibcounting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt
new file mode 100644
index 0000000000..d89d5d8447
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibcounting/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from benchlibcounting.pro.
+
+#####################################################################
+## benchlibcounting Binary:
+#####################################################################
+
+add_qt_executable(benchlibcounting
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_benchlibcounting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/benchlibeventcounter/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..a1c6d6711b
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from benchlibeventcounter.pro.
+
+#####################################################################
+## benchlibeventcounter Binary:
+#####################################################################
+
+add_qt_executable(benchlibeventcounter
+ SOURCES
+ tst_benchlibeventcounter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt
new file mode 100644
index 0000000000..701d3f12fb
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from benchlibeventcounter.pro.
+
+#####################################################################
+## benchlibeventcounter Binary:
+#####################################################################
+
+add_qt_executable(benchlibeventcounter
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_benchlibeventcounter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchliboptions/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/benchliboptions/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d38392c896
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchliboptions/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from benchliboptions.pro.
+
+#####################################################################
+## benchliboptions Binary:
+#####################################################################
+
+add_qt_executable(benchliboptions
+ SOURCES
+ tst_benchliboptions.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt b/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt
new file mode 100644
index 0000000000..b2a704cc28
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchliboptions/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from benchliboptions.pro.
+
+#####################################################################
+## benchliboptions Binary:
+#####################################################################
+
+add_qt_executable(benchliboptions
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_benchliboptions.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/benchlibtickcounter/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..3789558508
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibtickcounter/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from benchlibtickcounter.pro.
+
+#####################################################################
+## benchlibtickcounter Binary:
+#####################################################################
+
+add_qt_executable(benchlibtickcounter
+ GUI
+ SOURCES
+ tst_benchlibtickcounter.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt
new file mode 100644
index 0000000000..1edf2826ad
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibtickcounter/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from benchlibtickcounter.pro.
+
+#####################################################################
+## benchlibtickcounter Binary:
+#####################################################################
+
+add_qt_executable(benchlibtickcounter
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ GUI
+ SOURCES
+ tst_benchlibtickcounter.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibwalltime/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/benchlibwalltime/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..0e098ace32
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibwalltime/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from benchlibwalltime.pro.
+
+#####################################################################
+## benchlibwalltime Binary:
+#####################################################################
+
+add_qt_executable(benchlibwalltime
+ SOURCES
+ tst_benchlibwalltime.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt b/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt
new file mode 100644
index 0000000000..7debe80c67
--- /dev/null
+++ b/tests/auto/testlib/selftests/benchlibwalltime/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from benchlibwalltime.pro.
+
+#####################################################################
+## benchlibwalltime Binary:
+#####################################################################
+
+add_qt_executable(benchlibwalltime
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_benchlibwalltime.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/blacklisted/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/blacklisted/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d1eae1a783
--- /dev/null
+++ b/tests/auto/testlib/selftests/blacklisted/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from blacklisted.pro.
+
+#####################################################################
+## blacklisted Binary:
+#####################################################################
+
+add_qt_executable(blacklisted
+ GUI
+ SOURCES
+ tst_blacklisted.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt b/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt
new file mode 100644
index 0000000000..8136abe3ab
--- /dev/null
+++ b/tests/auto/testlib/selftests/blacklisted/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from blacklisted.pro.
+
+#####################################################################
+## blacklisted Binary:
+#####################################################################
+
+add_qt_executable(blacklisted
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ GUI
+ SOURCES
+ tst_blacklisted.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/cmptest/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/cmptest/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..417b99571d
--- /dev/null
+++ b/tests/auto/testlib/selftests/cmptest/.prev_CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from cmptest.pro.
+
+#####################################################################
+## cmptest Binary:
+#####################################################################
+
+add_qt_executable(cmptest
+ SOURCES
+ tst_cmptest.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(cmptest CONDITION TARGET Qt::Gui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/testlib/selftests/cmptest/CMakeLists.txt b/tests/auto/testlib/selftests/cmptest/CMakeLists.txt
new file mode 100644
index 0000000000..b7698c78f7
--- /dev/null
+++ b/tests/auto/testlib/selftests/cmptest/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from cmptest.pro.
+
+#####################################################################
+## cmptest Binary:
+#####################################################################
+
+add_qt_executable(cmptest
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_cmptest.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(cmptest CONDITION TARGET Qt::Gui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/auto/testlib/selftests/commandlinedata/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/commandlinedata/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..a49902c26b
--- /dev/null
+++ b/tests/auto/testlib/selftests/commandlinedata/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from commandlinedata.pro.
+
+#####################################################################
+## commandlinedata Binary:
+#####################################################################
+
+add_qt_executable(commandlinedata
+ SOURCES
+ tst_commandlinedata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt b/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt
new file mode 100644
index 0000000000..76ce86c9a0
--- /dev/null
+++ b/tests/auto/testlib/selftests/commandlinedata/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from commandlinedata.pro.
+
+#####################################################################
+## commandlinedata Binary:
+#####################################################################
+
+add_qt_executable(commandlinedata
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_commandlinedata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/counting/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/counting/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8ad3c38e88
--- /dev/null
+++ b/tests/auto/testlib/selftests/counting/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from counting.pro.
+
+#####################################################################
+## counting Binary:
+#####################################################################
+
+add_qt_executable(counting
+ SOURCES
+ tst_counting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/counting/CMakeLists.txt b/tests/auto/testlib/selftests/counting/CMakeLists.txt
new file mode 100644
index 0000000000..5afeab937b
--- /dev/null
+++ b/tests/auto/testlib/selftests/counting/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from counting.pro.
+
+#####################################################################
+## counting Binary:
+#####################################################################
+
+add_qt_executable(counting
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_counting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/crashes/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/crashes/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..2e54976ebc
--- /dev/null
+++ b/tests/auto/testlib/selftests/crashes/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from crashes.pro.
+
+#####################################################################
+## crashes Binary:
+#####################################################################
+
+add_qt_executable(crashes
+ SOURCES
+ tst_crashes.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/crashes/CMakeLists.txt b/tests/auto/testlib/selftests/crashes/CMakeLists.txt
new file mode 100644
index 0000000000..d1eeffd23c
--- /dev/null
+++ b/tests/auto/testlib/selftests/crashes/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from crashes.pro.
+
+#####################################################################
+## crashes Binary:
+#####################################################################
+
+add_qt_executable(crashes
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_crashes.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/datatable/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/datatable/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..fbe3bfca40
--- /dev/null
+++ b/tests/auto/testlib/selftests/datatable/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from datatable.pro.
+
+#####################################################################
+## datatable Binary:
+#####################################################################
+
+add_qt_executable(datatable
+ SOURCES
+ tst_datatable.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/datatable/CMakeLists.txt b/tests/auto/testlib/selftests/datatable/CMakeLists.txt
new file mode 100644
index 0000000000..cab1fed123
--- /dev/null
+++ b/tests/auto/testlib/selftests/datatable/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from datatable.pro.
+
+#####################################################################
+## datatable Binary:
+#####################################################################
+
+add_qt_executable(datatable
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_datatable.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/datetime/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/datetime/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8f0bca0d89
--- /dev/null
+++ b/tests/auto/testlib/selftests/datetime/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from datetime.pro.
+
+#####################################################################
+## datetime Binary:
+#####################################################################
+
+add_qt_executable(datetime
+ SOURCES
+ tst_datetime.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/datetime/CMakeLists.txt b/tests/auto/testlib/selftests/datetime/CMakeLists.txt
new file mode 100644
index 0000000000..9c04c6f0b8
--- /dev/null
+++ b/tests/auto/testlib/selftests/datetime/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from datetime.pro.
+
+#####################################################################
+## datetime Binary:
+#####################################################################
+
+add_qt_executable(datetime
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_datetime.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/deleteLater/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ce2187af0b
--- /dev/null
+++ b/tests/auto/testlib/selftests/deleteLater/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from deleteLater.pro.
+
+#####################################################################
+## tst_deleteLater Binary:
+#####################################################################
+
+add_qt_executable(tst_deleteLater
+ SOURCES
+ tst_deleteLater.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt
new file mode 100644
index 0000000000..78876a9dbb
--- /dev/null
+++ b/tests/auto/testlib/selftests/deleteLater/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from deleteLater.pro.
+
+#####################################################################
+## tst_deleteLater Binary:
+#####################################################################
+
+add_qt_executable(tst_deleteLater
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_deleteLater.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater_noApp/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..48be681cbd
--- /dev/null
+++ b/tests/auto/testlib/selftests/deleteLater_noApp/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from deleteLater_noApp.pro.
+
+#####################################################################
+## tst_deleteLater_noApp Binary:
+#####################################################################
+
+add_qt_executable(tst_deleteLater_noApp
+ SOURCES
+ tst_deleteLater_noApp.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt b/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt
new file mode 100644
index 0000000000..ddcd19e8e3
--- /dev/null
+++ b/tests/auto/testlib/selftests/deleteLater_noApp/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from deleteLater_noApp.pro.
+
+#####################################################################
+## tst_deleteLater_noApp Binary:
+#####################################################################
+
+add_qt_executable(tst_deleteLater_noApp
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_deleteLater_noApp.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/differentexec/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/differentexec/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9cab4de93b
--- /dev/null
+++ b/tests/auto/testlib/selftests/differentexec/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from differentexec.pro.
+
+#####################################################################
+## differentexec Binary:
+#####################################################################
+
+add_qt_executable(differentexec
+ SOURCES
+ tst_differentexec.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/differentexec/CMakeLists.txt b/tests/auto/testlib/selftests/differentexec/CMakeLists.txt
new file mode 100644
index 0000000000..e5f19c2677
--- /dev/null
+++ b/tests/auto/testlib/selftests/differentexec/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from differentexec.pro.
+
+#####################################################################
+## differentexec Binary:
+#####################################################################
+
+add_qt_executable(differentexec
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_differentexec.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/exceptionthrow/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/exceptionthrow/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..fdd95e0805
--- /dev/null
+++ b/tests/auto/testlib/selftests/exceptionthrow/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from exceptionthrow.pro.
+
+#####################################################################
+## exceptionthrow Binary:
+#####################################################################
+
+add_qt_executable(exceptionthrow
+ EXCEPTIONS
+ SOURCES
+ tst_exceptionthrow.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt b/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt
new file mode 100644
index 0000000000..659e2e2ff3
--- /dev/null
+++ b/tests/auto/testlib/selftests/exceptionthrow/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from exceptionthrow.pro.
+
+#####################################################################
+## exceptionthrow Binary:
+#####################################################################
+
+add_qt_executable(exceptionthrow
+ EXCEPTIONS
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_exceptionthrow.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/expected_signaldumper.junitxml b/tests/auto/testlib/selftests/expected_signaldumper.junitxml
index cbf7075ba1..0c03988879 100644
--- a/tests/auto/testlib/selftests/expected_signaldumper.junitxml
+++ b/tests/auto/testlib/selftests/expected_signaldumper.junitxml
@@ -142,12 +142,12 @@
<!-- message="Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&amp;)@_POINTER_)" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))" type="info" -->
- <!-- message="Signal: SignalSlotClass(_POINTER_) qListSignal (QList&lt;int&gt;())" type="info" -->
+ <!-- message="Signal: SignalSlotClass(_POINTER_) qListSignal (QVector&lt;int&gt;())" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector&lt;int&gt;())" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector&lt;int&gt;&amp;)@_POINTER_)" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector&lt;int&gt;())" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector&lt;int&gt;*)_POINTER_)" type="info" -->
- <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()" type="info" -->
+ <!-- message="Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector&lt;int&gt;*)_POINTER_)" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())" type="info" -->
<!-- message="Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())" type="info" -->
</testcase>
@@ -274,12 +274,12 @@
<![CDATA[Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))]]>
-<![CDATA[Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>())]]>
+<![CDATA[Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)]]>
-<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()]]>
+<![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]>
<![CDATA[Signal: SignalSlotClass(_POINTER_) signalWithoutParameters ()]]>
diff --git a/tests/auto/testlib/selftests/expected_signaldumper.lightxml b/tests/auto/testlib/selftests/expected_signaldumper.lightxml
index 443f649bb6..d29319841c 100644
--- a/tests/auto/testlib/selftests/expected_signaldumper.lightxml
+++ b/tests/auto/testlib/selftests/expected_signaldumper.lightxml
@@ -542,7 +542,7 @@
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))]]></Description>
</Message>
<Message type="info" file="" line="0">
- <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>())]]></Description>
+ <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())]]></Description>
</Message>
<Message type="info" file="" line="0">
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())]]></Description>
@@ -557,7 +557,7 @@
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)]]></Description>
</Message>
<Message type="info" file="" line="0">
- <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()]]></Description>
+ <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)]]></Description>
</Message>
<Message type="info" file="" line="0">
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]></Description>
diff --git a/tests/auto/testlib/selftests/expected_signaldumper.tap b/tests/auto/testlib/selftests/expected_signaldumper.tap
index e2d664f4f1..bbaaa025c3 100644
--- a/tests/auto/testlib/selftests/expected_signaldumper.tap
+++ b/tests/auto/testlib/selftests/expected_signaldumper.tap
@@ -134,12 +134,12 @@ ok 18 - slotEmittingSignalOldSyntax(queued)
# Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)
# Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))
# Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))
-# Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>())
+# Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())
# Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())
# Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)
# Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())
# Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)
-# Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()
+# Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)
# Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())
# Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())
ok 19 - variousTypes()
diff --git a/tests/auto/testlib/selftests/expected_signaldumper.teamcity b/tests/auto/testlib/selftests/expected_signaldumper.teamcity
index 0fc568e086..dee5aa70ef 100644
--- a/tests/auto/testlib/selftests/expected_signaldumper.teamcity
+++ b/tests/auto/testlib/selftests/expected_signaldumper.teamcity
@@ -54,7 +54,7 @@
##teamcity[testStdOut name='slotEmittingSignalOldSyntax(queued)' out='INFO: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters ()|nINFO: Signal: QEventDispatcherPlatform(_POINTER_) awake ()|nINFO: Signal: SignalSlotClass(_POINTER_) nestedSignal ()' flowId='tst_Signaldumper']
##teamcity[testFinished name='slotEmittingSignalOldSyntax(queued)' flowId='tst_Signaldumper']
##teamcity[testStarted name='variousTypes()' flowId='tst_Signaldumper']
-##teamcity[testStdOut name='variousTypes()' out='INFO: Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))|nINFO: Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())' flowId='tst_Signaldumper']
+##teamcity[testStdOut name='variousTypes()' out='INFO: Signal: SignalSlotClass(_POINTER_) qStringSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))|nINFO: Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))|nINFO: Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())|nINFO: Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())' flowId='tst_Signaldumper']
##teamcity[testFinished name='variousTypes()' flowId='tst_Signaldumper']
##teamcity[testStarted name='deletingSender()' flowId='tst_Signaldumper']
##teamcity[testStdOut name='deletingSender()' out='INFO: Signal: SignalSlotClass(_POINTER_) signalWithoutParameters ()' flowId='tst_Signaldumper']
diff --git a/tests/auto/testlib/selftests/expected_signaldumper.txt b/tests/auto/testlib/selftests/expected_signaldumper.txt
index 0ee8cd38a2..86d817cd5f 100644
--- a/tests/auto/testlib/selftests/expected_signaldumper.txt
+++ b/tests/auto/testlib/selftests/expected_signaldumper.txt
@@ -134,12 +134,12 @@ INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qSt
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qStringRefSignal ((QString&)@_POINTER_)
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qStringConstRefSignal (QString(Test string))
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))
-INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>())
+INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorRefSignal ((QVector<int>&)@_POINTER_)
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorConstRefSignal (QVector<int>())
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)
-INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()
+INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())
INFO : tst_Signaldumper::variousTypes() Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())
PASS : tst_Signaldumper::variousTypes()
diff --git a/tests/auto/testlib/selftests/expected_signaldumper.xml b/tests/auto/testlib/selftests/expected_signaldumper.xml
index f11a0c3ce6..c61832ec4a 100644
--- a/tests/auto/testlib/selftests/expected_signaldumper.xml
+++ b/tests/auto/testlib/selftests/expected_signaldumper.xml
@@ -544,7 +544,7 @@
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qByteArraySignal (QByteArray(Test bytearray))]]></Description>
</Message>
<Message type="info" file="" line="0">
- <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qListSignal (QList<int>())]]></Description>
+ <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qListSignal (QVector<int>())]]></Description>
</Message>
<Message type="info" file="" line="0">
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorSignal (QVector<int>())]]></Description>
@@ -559,7 +559,7 @@
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorConstPointerSignal ((const QVector<int>*)_POINTER_)]]></Description>
</Message>
<Message type="info" file="" line="0">
- <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ()]]></Description>
+ <Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVectorPointerConstSignal ((QVector<int>*)_POINTER_)]]></Description>
</Message>
<Message type="info" file="" line="0">
<Description><![CDATA[Signal: SignalSlotClass(_POINTER_) qVariantSignal (QVariant())]]></Description>
diff --git a/tests/auto/testlib/selftests/expectfail/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/expectfail/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..175bd8129a
--- /dev/null
+++ b/tests/auto/testlib/selftests/expectfail/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from expectfail.pro.
+
+#####################################################################
+## expectfail Binary:
+#####################################################################
+
+add_qt_executable(expectfail
+ SOURCES
+ tst_expectfail.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/expectfail/CMakeLists.txt b/tests/auto/testlib/selftests/expectfail/CMakeLists.txt
new file mode 100644
index 0000000000..96de8c7a52
--- /dev/null
+++ b/tests/auto/testlib/selftests/expectfail/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from expectfail.pro.
+
+#####################################################################
+## expectfail Binary:
+#####################################################################
+
+add_qt_executable(expectfail
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_expectfail.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failcleanup/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/failcleanup/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6369874983
--- /dev/null
+++ b/tests/auto/testlib/selftests/failcleanup/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from failcleanup.pro.
+
+#####################################################################
+## failcleanup Binary:
+#####################################################################
+
+add_qt_executable(failcleanup
+ SOURCES
+ tst_failcleanup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt
new file mode 100644
index 0000000000..6994b454b4
--- /dev/null
+++ b/tests/auto/testlib/selftests/failcleanup/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from failcleanup.pro.
+
+#####################################################################
+## failcleanup Binary:
+#####################################################################
+
+add_qt_executable(failcleanup
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_failcleanup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/faildatatype/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/faildatatype/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..e03a4333bd
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from faildatatype.pro.
+
+#####################################################################
+## faildatatype Binary:
+#####################################################################
+
+add_qt_executable(faildatatype
+ SOURCES
+ tst_faildatatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt b/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt
new file mode 100644
index 0000000000..0bcf274a89
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from faildatatype.pro.
+
+#####################################################################
+## faildatatype Binary:
+#####################################################################
+
+add_qt_executable(faildatatype
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_faildatatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failfetchtype/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/failfetchtype/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6ab21d845f
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from failfetchtype.pro.
+
+#####################################################################
+## failfetchtype Binary:
+#####################################################################
+
+add_qt_executable(failfetchtype
+ SOURCES
+ tst_failfetchtype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt b/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt
new file mode 100644
index 0000000000..f0d2657be1
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from failfetchtype.pro.
+
+#####################################################################
+## failfetchtype Binary:
+#####################################################################
+
+add_qt_executable(failfetchtype
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_failfetchtype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failinit/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/failinit/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..22817fa186
--- /dev/null
+++ b/tests/auto/testlib/selftests/failinit/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from failinit.pro.
+
+#####################################################################
+## failinit Binary:
+#####################################################################
+
+add_qt_executable(failinit
+ SOURCES
+ tst_failinit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failinit/CMakeLists.txt b/tests/auto/testlib/selftests/failinit/CMakeLists.txt
new file mode 100644
index 0000000000..8eeaa38d20
--- /dev/null
+++ b/tests/auto/testlib/selftests/failinit/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from failinit.pro.
+
+#####################################################################
+## failinit Binary:
+#####################################################################
+
+add_qt_executable(failinit
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_failinit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failinitdata/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/failinitdata/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..5d519c9196
--- /dev/null
+++ b/tests/auto/testlib/selftests/failinitdata/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from failinitdata.pro.
+
+#####################################################################
+## failinitdata Binary:
+#####################################################################
+
+add_qt_executable(failinitdata
+ SOURCES
+ tst_failinitdata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt b/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt
new file mode 100644
index 0000000000..1d62d62234
--- /dev/null
+++ b/tests/auto/testlib/selftests/failinitdata/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from failinitdata.pro.
+
+#####################################################################
+## failinitdata Binary:
+#####################################################################
+
+add_qt_executable(failinitdata
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_failinitdata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/fetchbogus/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/fetchbogus/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..af1ea19d32
--- /dev/null
+++ b/tests/auto/testlib/selftests/fetchbogus/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from fetchbogus.pro.
+
+#####################################################################
+## fetchbogus Binary:
+#####################################################################
+
+add_qt_executable(fetchbogus
+ SOURCES
+ tst_fetchbogus.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt b/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt
new file mode 100644
index 0000000000..60c06b3410
--- /dev/null
+++ b/tests/auto/testlib/selftests/fetchbogus/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from fetchbogus.pro.
+
+#####################################################################
+## fetchbogus Binary:
+#####################################################################
+
+add_qt_executable(fetchbogus
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_fetchbogus.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/findtestdata/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/findtestdata/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..dc21a4d25f
--- /dev/null
+++ b/tests/auto/testlib/selftests/findtestdata/.prev_CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from findtestdata.pro.
+
+#####################################################################
+## findtestdata Binary:
+#####################################################################
+
+add_qt_executable(findtestdata
+ SOURCES
+ findtestdata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+# Resources:
+set(findtestdata_resource_files
+ "qt.conf"
+)
+
+add_qt_resource(findtestdata "findtestdata"
+ PREFIX
+ "/qt/etc/"
+ FILES
+ ${findtestdata_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt b/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt
new file mode 100644
index 0000000000..f4987f88a3
--- /dev/null
+++ b/tests/auto/testlib/selftests/findtestdata/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from findtestdata.pro.
+
+#####################################################################
+## findtestdata Binary:
+#####################################################################
+
+add_qt_executable(findtestdata
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ findtestdata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+# Resources:
+set(findtestdata_resource_files
+ "qt.conf"
+)
+
+add_qt_resource(findtestdata "findtestdata"
+ PREFIX
+ "/qt/etc/"
+ FILES
+ ${findtestdata_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c037179b74
--- /dev/null
+++ b/tests/auto/testlib/selftests/float/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from float.pro.
+
+#####################################################################
+## float Binary:
+#####################################################################
+
+add_qt_executable(float
+ SOURCES
+ tst_float.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/float/CMakeLists.txt b/tests/auto/testlib/selftests/float/CMakeLists.txt
new file mode 100644
index 0000000000..8a2ee4b76d
--- /dev/null
+++ b/tests/auto/testlib/selftests/float/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from float.pro.
+
+#####################################################################
+## float Binary:
+#####################################################################
+
+add_qt_executable(float
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_float.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/globaldata/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/globaldata/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1cff8f1b27
--- /dev/null
+++ b/tests/auto/testlib/selftests/globaldata/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from globaldata.pro.
+
+#####################################################################
+## globaldata Binary:
+#####################################################################
+
+add_qt_executable(globaldata
+ SOURCES
+ tst_globaldata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/globaldata/CMakeLists.txt b/tests/auto/testlib/selftests/globaldata/CMakeLists.txt
new file mode 100644
index 0000000000..868a637588
--- /dev/null
+++ b/tests/auto/testlib/selftests/globaldata/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from globaldata.pro.
+
+#####################################################################
+## globaldata Binary:
+#####################################################################
+
+add_qt_executable(globaldata
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_globaldata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/keyboard/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/keyboard/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..86c58467bf
--- /dev/null
+++ b/tests/auto/testlib/selftests/keyboard/.prev_CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from keyboard.pro.
+
+#####################################################################
+## keyboard Binary:
+#####################################################################
+
+add_qt_executable(keyboard
+ SOURCES
+ tst_keyboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/keyboard/CMakeLists.txt b/tests/auto/testlib/selftests/keyboard/CMakeLists.txt
new file mode 100644
index 0000000000..2766c1a36c
--- /dev/null
+++ b/tests/auto/testlib/selftests/keyboard/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from keyboard.pro.
+
+#####################################################################
+## keyboard Binary:
+#####################################################################
+
+add_qt_executable(keyboard
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_keyboard.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/longstring/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/longstring/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9f1c6bc8ad
--- /dev/null
+++ b/tests/auto/testlib/selftests/longstring/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from longstring.pro.
+
+#####################################################################
+## longstring Binary:
+#####################################################################
+
+add_qt_executable(longstring
+ SOURCES
+ tst_longstring.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/longstring/CMakeLists.txt b/tests/auto/testlib/selftests/longstring/CMakeLists.txt
new file mode 100644
index 0000000000..08002fd20d
--- /dev/null
+++ b/tests/auto/testlib/selftests/longstring/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from longstring.pro.
+
+#####################################################################
+## longstring Binary:
+#####################################################################
+
+add_qt_executable(longstring
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_longstring.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/maxwarnings/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/maxwarnings/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..a05c9afb13
--- /dev/null
+++ b/tests/auto/testlib/selftests/maxwarnings/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from maxwarnings.pro.
+
+#####################################################################
+## maxwarnings Binary:
+#####################################################################
+
+add_qt_executable(maxwarnings
+ SOURCES
+ maxwarnings.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt b/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt
new file mode 100644
index 0000000000..23eaa62629
--- /dev/null
+++ b/tests/auto/testlib/selftests/maxwarnings/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from maxwarnings.pro.
+
+#####################################################################
+## maxwarnings Binary:
+#####################################################################
+
+add_qt_executable(maxwarnings
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ maxwarnings.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/mouse/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/mouse/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4308195d73
--- /dev/null
+++ b/tests/auto/testlib/selftests/mouse/.prev_CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from mouse.pro.
+
+#####################################################################
+## mouse Binary:
+#####################################################################
+
+add_qt_executable(mouse
+ SOURCES
+ tst_mouse.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/mouse/CMakeLists.txt b/tests/auto/testlib/selftests/mouse/CMakeLists.txt
new file mode 100644
index 0000000000..9f6b364cec
--- /dev/null
+++ b/tests/auto/testlib/selftests/mouse/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from mouse.pro.
+
+#####################################################################
+## mouse Binary:
+#####################################################################
+
+add_qt_executable(mouse
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_mouse.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/multiexec/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/multiexec/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6c237edd05
--- /dev/null
+++ b/tests/auto/testlib/selftests/multiexec/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from multiexec.pro.
+
+#####################################################################
+## multiexec Binary:
+#####################################################################
+
+add_qt_executable(multiexec
+ SOURCES
+ tst_multiexec.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/multiexec/CMakeLists.txt b/tests/auto/testlib/selftests/multiexec/CMakeLists.txt
new file mode 100644
index 0000000000..a1174908e5
--- /dev/null
+++ b/tests/auto/testlib/selftests/multiexec/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from multiexec.pro.
+
+#####################################################################
+## multiexec Binary:
+#####################################################################
+
+add_qt_executable(multiexec
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_multiexec.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/pairdiagnostics/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/pairdiagnostics/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..05e8518413
--- /dev/null
+++ b/tests/auto/testlib/selftests/pairdiagnostics/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from pairdiagnostics.pro.
+
+#####################################################################
+## pairdiagnostics Binary:
+#####################################################################
+
+add_qt_executable(pairdiagnostics
+ SOURCES
+ tst_pairdiagnostics.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt b/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt
new file mode 100644
index 0000000000..a9a48fb3f2
--- /dev/null
+++ b/tests/auto/testlib/selftests/pairdiagnostics/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from pairdiagnostics.pro.
+
+#####################################################################
+## pairdiagnostics Binary:
+#####################################################################
+
+add_qt_executable(pairdiagnostics
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_pairdiagnostics.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/printdatatags/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/printdatatags/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8c9174ca44
--- /dev/null
+++ b/tests/auto/testlib/selftests/printdatatags/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from printdatatags.pro.
+
+#####################################################################
+## printdatatags Binary:
+#####################################################################
+
+add_qt_executable(printdatatags
+ SOURCES
+ tst_printdatatags.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt b/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt
new file mode 100644
index 0000000000..7eef1bce09
--- /dev/null
+++ b/tests/auto/testlib/selftests/printdatatags/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from printdatatags.pro.
+
+#####################################################################
+## printdatatags Binary:
+#####################################################################
+
+add_qt_executable(printdatatags
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_printdatatags.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/printdatatagswithglobaltags/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..161051cec4
--- /dev/null
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from printdatatagswithglobaltags.pro.
+
+#####################################################################
+## printdatatagswithglobaltags Binary:
+#####################################################################
+
+add_qt_executable(printdatatagswithglobaltags
+ SOURCES
+ tst_printdatatagswithglobaltags.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt b/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt
new file mode 100644
index 0000000000..9baefbaabf
--- /dev/null
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from printdatatagswithglobaltags.pro.
+
+#####################################################################
+## printdatatagswithglobaltags Binary:
+#####################################################################
+
+add_qt_executable(printdatatagswithglobaltags
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_printdatatagswithglobaltags.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/qexecstringlist/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/qexecstringlist/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..2a33f2dc4d
--- /dev/null
+++ b/tests/auto/testlib/selftests/qexecstringlist/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qexecstringlist.pro.
+
+#####################################################################
+## qexecstringlist Binary:
+#####################################################################
+
+add_qt_executable(qexecstringlist
+ SOURCES
+ tst_qexecstringlist.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt b/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt
new file mode 100644
index 0000000000..a4aac7f924
--- /dev/null
+++ b/tests/auto/testlib/selftests/qexecstringlist/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qexecstringlist.pro.
+
+#####################################################################
+## qexecstringlist Binary:
+#####################################################################
+
+add_qt_executable(qexecstringlist
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_qexecstringlist.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/signaldumper/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/signaldumper/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..e5989ba69e
--- /dev/null
+++ b/tests/auto/testlib/selftests/signaldumper/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from signaldumper.pro.
+
+#####################################################################
+## signaldumper Binary:
+#####################################################################
+
+add_qt_executable(signaldumper
+ GUI
+ SOURCES
+ tst_signaldumper.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt b/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt
new file mode 100644
index 0000000000..0376ffacd1
--- /dev/null
+++ b/tests/auto/testlib/selftests/signaldumper/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from signaldumper.pro.
+
+#####################################################################
+## signaldumper Binary:
+#####################################################################
+
+add_qt_executable(signaldumper
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ GUI
+ SOURCES
+ tst_signaldumper.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/silent/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/silent/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ebe7d6e299
--- /dev/null
+++ b/tests/auto/testlib/selftests/silent/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from silent.pro.
+
+#####################################################################
+## silent Binary:
+#####################################################################
+
+add_qt_executable(silent
+ GUI
+ SOURCES
+ tst_silent.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/silent/CMakeLists.txt b/tests/auto/testlib/selftests/silent/CMakeLists.txt
new file mode 100644
index 0000000000..23916b81e0
--- /dev/null
+++ b/tests/auto/testlib/selftests/silent/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from silent.pro.
+
+#####################################################################
+## silent Binary:
+#####################################################################
+
+add_qt_executable(silent
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ GUI
+ SOURCES
+ tst_silent.cpp
+ PUBLIC_LIBRARIES
+ Qt::TestPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/singleskip/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/singleskip/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..60d4984df8
--- /dev/null
+++ b/tests/auto/testlib/selftests/singleskip/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from singleskip.pro.
+
+#####################################################################
+## singleskip Binary:
+#####################################################################
+
+add_qt_executable(singleskip
+ SOURCES
+ tst_singleskip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/singleskip/CMakeLists.txt b/tests/auto/testlib/selftests/singleskip/CMakeLists.txt
new file mode 100644
index 0000000000..c3e70ddf72
--- /dev/null
+++ b/tests/auto/testlib/selftests/singleskip/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from singleskip.pro.
+
+#####################################################################
+## singleskip Binary:
+#####################################################################
+
+add_qt_executable(singleskip
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_singleskip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skip/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/skip/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..2eaac745a8
--- /dev/null
+++ b/tests/auto/testlib/selftests/skip/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from skip.pro.
+
+#####################################################################
+## skip Binary:
+#####################################################################
+
+add_qt_executable(skip
+ SOURCES
+ tst_skip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skip/CMakeLists.txt b/tests/auto/testlib/selftests/skip/CMakeLists.txt
new file mode 100644
index 0000000000..f282c3e6a3
--- /dev/null
+++ b/tests/auto/testlib/selftests/skip/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from skip.pro.
+
+#####################################################################
+## skip Binary:
+#####################################################################
+
+add_qt_executable(skip
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_skip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skipcleanup/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanup/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..77673004b2
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipcleanup/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from skipcleanup.pro.
+
+#####################################################################
+## skipcleanup Binary:
+#####################################################################
+
+add_qt_executable(skipcleanup
+ SOURCES
+ tst_skipcleanup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt
new file mode 100644
index 0000000000..09fef0967b
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipcleanup/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from skipcleanup.pro.
+
+#####################################################################
+## skipcleanup Binary:
+#####################################################################
+
+add_qt_executable(skipcleanup
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_skipcleanup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skipinit/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/skipinit/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4a36d0fa1c
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipinit/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from skipinit.pro.
+
+#####################################################################
+## skipinit Binary:
+#####################################################################
+
+add_qt_executable(skipinit
+ SOURCES
+ tst_skipinit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skipinit/CMakeLists.txt b/tests/auto/testlib/selftests/skipinit/CMakeLists.txt
new file mode 100644
index 0000000000..47c437d3b7
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipinit/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from skipinit.pro.
+
+#####################################################################
+## skipinit Binary:
+#####################################################################
+
+add_qt_executable(skipinit
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_skipinit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skipinitdata/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/skipinitdata/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7f7773c87c
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipinitdata/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from skipinitdata.pro.
+
+#####################################################################
+## skipinitdata Binary:
+#####################################################################
+
+add_qt_executable(skipinitdata
+ SOURCES
+ tst_skipinitdata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt b/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt
new file mode 100644
index 0000000000..edbf6c1389
--- /dev/null
+++ b/tests/auto/testlib/selftests/skipinitdata/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from skipinitdata.pro.
+
+#####################################################################
+## skipinitdata Binary:
+#####################################################################
+
+add_qt_executable(skipinitdata
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_skipinitdata.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/sleep/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/sleep/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c176681068
--- /dev/null
+++ b/tests/auto/testlib/selftests/sleep/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from sleep.pro.
+
+#####################################################################
+## sleep Binary:
+#####################################################################
+
+add_qt_executable(sleep
+ SOURCES
+ tst_sleep.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/sleep/CMakeLists.txt b/tests/auto/testlib/selftests/sleep/CMakeLists.txt
new file mode 100644
index 0000000000..ea85b03cc1
--- /dev/null
+++ b/tests/auto/testlib/selftests/sleep/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from sleep.pro.
+
+#####################################################################
+## sleep Binary:
+#####################################################################
+
+add_qt_executable(sleep
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_sleep.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/strcmp/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/strcmp/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ff5b402328
--- /dev/null
+++ b/tests/auto/testlib/selftests/strcmp/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from strcmp.pro.
+
+#####################################################################
+## strcmp Binary:
+#####################################################################
+
+add_qt_executable(strcmp
+ SOURCES
+ tst_strcmp.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/strcmp/CMakeLists.txt b/tests/auto/testlib/selftests/strcmp/CMakeLists.txt
new file mode 100644
index 0000000000..70a6ccf33d
--- /dev/null
+++ b/tests/auto/testlib/selftests/strcmp/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from strcmp.pro.
+
+#####################################################################
+## strcmp Binary:
+#####################################################################
+
+add_qt_executable(strcmp
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_strcmp.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/subtest/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/subtest/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..dd4ad850c6
--- /dev/null
+++ b/tests/auto/testlib/selftests/subtest/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from subtest.pro.
+
+#####################################################################
+## subtest Binary:
+#####################################################################
+
+add_qt_executable(subtest
+ SOURCES
+ tst_subtest.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/subtest/CMakeLists.txt b/tests/auto/testlib/selftests/subtest/CMakeLists.txt
new file mode 100644
index 0000000000..c532f7f77c
--- /dev/null
+++ b/tests/auto/testlib/selftests/subtest/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from subtest.pro.
+
+#####################################################################
+## subtest Binary:
+#####################################################################
+
+add_qt_executable(subtest
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_subtest.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/testlib/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/testlib/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..14a5175693
--- /dev/null
+++ b/tests/auto/testlib/selftests/testlib/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from testlib.pro.
+
+#####################################################################
+## testlib Binary:
+#####################################################################
+
+add_qt_executable(testlib
+ SOURCES
+ tst_testlib.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/testlib/CMakeLists.txt b/tests/auto/testlib/selftests/testlib/CMakeLists.txt
new file mode 100644
index 0000000000..8f23f114bc
--- /dev/null
+++ b/tests/auto/testlib/selftests/testlib/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from testlib.pro.
+
+#####################################################################
+## testlib Binary:
+#####################################################################
+
+add_qt_executable(testlib
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_testlib.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/tuplediagnostics/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/tuplediagnostics/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7b6b107dff
--- /dev/null
+++ b/tests/auto/testlib/selftests/tuplediagnostics/.prev_CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from tuplediagnostics.pro.
+
+#####################################################################
+## tuplediagnostics Binary:
+#####################################################################
+
+add_qt_executable(tuplediagnostics
+ SOURCES
+ tst_tuplediagnostics.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt b/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt
new file mode 100644
index 0000000000..d43bcbfc07
--- /dev/null
+++ b/tests/auto/testlib/selftests/tuplediagnostics/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from tuplediagnostics.pro.
+
+#####################################################################
+## tuplediagnostics Binary:
+#####################################################################
+
+add_qt_executable(tuplediagnostics
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_tuplediagnostics.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/auto/testlib/selftests/verbose1/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/verbose1/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9faa977236
--- /dev/null
+++ b/tests/auto/testlib/selftests/verbose1/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from verbose1.pro.
+
+#####################################################################
+## verbose1 Binary:
+#####################################################################
+
+add_qt_executable(verbose1
+ SOURCES
+ ../counting/tst_counting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/verbose1/CMakeLists.txt b/tests/auto/testlib/selftests/verbose1/CMakeLists.txt
new file mode 100644
index 0000000000..10f79d2d22
--- /dev/null
+++ b/tests/auto/testlib/selftests/verbose1/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from verbose1.pro.
+
+#####################################################################
+## verbose1 Binary:
+#####################################################################
+
+add_qt_executable(verbose1
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ ../counting/tst_counting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/verbose2/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/verbose2/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7b43fc0085
--- /dev/null
+++ b/tests/auto/testlib/selftests/verbose2/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from verbose2.pro.
+
+#####################################################################
+## verbose2 Binary:
+#####################################################################
+
+add_qt_executable(verbose2
+ SOURCES
+ ../counting/tst_counting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/verbose2/CMakeLists.txt b/tests/auto/testlib/selftests/verbose2/CMakeLists.txt
new file mode 100644
index 0000000000..138f343178
--- /dev/null
+++ b/tests/auto/testlib/selftests/verbose2/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from verbose2.pro.
+
+#####################################################################
+## verbose2 Binary:
+#####################################################################
+
+add_qt_executable(verbose2
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ ../counting/tst_counting.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/verifyexceptionthrown/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f4e20fcfc6
--- /dev/null
+++ b/tests/auto/testlib/selftests/verifyexceptionthrown/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from verifyexceptionthrown.pro.
+
+#####################################################################
+## verifyexceptionthrown Binary:
+#####################################################################
+
+add_qt_executable(verifyexceptionthrown
+ EXCEPTIONS
+ SOURCES
+ tst_verifyexceptionthrown.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt b/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt
new file mode 100644
index 0000000000..def296ed7b
--- /dev/null
+++ b/tests/auto/testlib/selftests/verifyexceptionthrown/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from verifyexceptionthrown.pro.
+
+#####################################################################
+## verifyexceptionthrown Binary:
+#####################################################################
+
+add_qt_executable(verifyexceptionthrown
+ EXCEPTIONS
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_verifyexceptionthrown.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/warnings/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/warnings/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..11fb5098d6
--- /dev/null
+++ b/tests/auto/testlib/selftests/warnings/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from warnings.pro.
+
+#####################################################################
+## warnings Binary:
+#####################################################################
+
+add_qt_executable(warnings
+ SOURCES
+ tst_warnings.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/warnings/CMakeLists.txt b/tests/auto/testlib/selftests/warnings/CMakeLists.txt
new file mode 100644
index 0000000000..32e3bfe68f
--- /dev/null
+++ b/tests/auto/testlib/selftests/warnings/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from warnings.pro.
+
+#####################################################################
+## warnings Binary:
+#####################################################################
+
+add_qt_executable(warnings
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_warnings.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/watchdog/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/watchdog/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1ea502875e
--- /dev/null
+++ b/tests/auto/testlib/selftests/watchdog/.prev_CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from watchdog.pro.
+
+#####################################################################
+## watchdog Binary:
+#####################################################################
+
+add_qt_executable(watchdog
+ SOURCES
+ tst_watchdog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:watchdog.pro:<TRUE>:
+# QT_TOOL_ENV = "checkenv"
+# checkenv.name = "QTEST_FUNCTION_TIMEOUT"
+# checkenv.value = "100"
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/watchdog/CMakeLists.txt b/tests/auto/testlib/selftests/watchdog/CMakeLists.txt
new file mode 100644
index 0000000000..84236e2b5e
--- /dev/null
+++ b/tests/auto/testlib/selftests/watchdog/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from watchdog.pro.
+
+#####################################################################
+## watchdog Binary:
+#####################################################################
+
+add_qt_executable(watchdog
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_watchdog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:watchdog.pro:<TRUE>:
+# QT_TOOL_ENV = "checkenv"
+# checkenv.name = "QTEST_FUNCTION_TIMEOUT"
+# checkenv.value = "100"
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/xunit/.prev_CMakeLists.txt b/tests/auto/testlib/selftests/xunit/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..6a55c59e00
--- /dev/null
+++ b/tests/auto/testlib/selftests/xunit/.prev_CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from xunit.pro.
+
+#####################################################################
+## xunit Binary:
+#####################################################################
+
+add_qt_executable(xunit
+ SOURCES
+ tst_xunit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/testlib/selftests/xunit/CMakeLists.txt b/tests/auto/testlib/selftests/xunit/CMakeLists.txt
new file mode 100644
index 0000000000..d47d479bdf
--- /dev/null
+++ b/tests/auto/testlib/selftests/xunit/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from xunit.pro.
+
+#####################################################################
+## xunit Binary:
+#####################################################################
+
+add_qt_executable(xunit
+ NO_INSTALL # special case
+ OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case
+ SOURCES
+ tst_xunit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/tools/CMakeLists.txt b/tests/auto/tools/CMakeLists.txt
new file mode 100644
index 0000000000..aa45587993
--- /dev/null
+++ b/tests/auto/tools/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from tools.pro.
+
+add_subdirectory(qmakelib)
+# special case begin
+if(NOT WIN32) # @todo: this is broken, see QTBUG-78449
+ add_subdirectory(qmake)
+endif()
+# special case end
+#add_subdirectory(moc)
+#add_subdirectory(rcc)
+if(TARGET Qt::Widgets)
+ add_subdirectory(uic)
+endif()
+if(TARGET Qt::DBus)
+ add_subdirectory(qdbuscpp2xml)
+ add_subdirectory(qdbusxml2cpp)
+endif()
diff --git a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json
index 27e25dc01c..9cc06dc7bc 100644
--- a/tests/auto/tools/moc/allmocs_baseline_in.json
+++ b/tests/auto/tools/moc/allmocs_baseline_in.json
@@ -2,71 +2,6 @@
{
"classes": [
{
- "className": "MyBooooooostishClass",
- "object": true,
- "qualifiedClassName": "MyBooooooostishClass",
- "signals": [
- {
- "access": "public",
- "name": "mySignal",
- "returnType": "void"
- }
- ],
- "slots": [
- {
- "access": "public",
- "name": "mySlot",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "no-keywords.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "Task87883",
- "object": true,
- "qualifiedClassName": "Task87883",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "task87883.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "IfdefedClass",
- "object": true,
- "qualifiedClassName": "IfdefedClass",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "c-comments.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
"className": "BackslashNewlines",
"object": true,
"qualifiedClassName": "BackslashNewlines",
@@ -91,351 +26,9 @@
{
"classes": [
{
- "className": "OldStyleCast",
- "object": true,
- "qualifiedClassName": "OldStyleCast",
- "slots": [
- {
- "access": "public",
- "name": "foo",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "int"
- },
- {
- "type": "int*"
- },
- {
- "type": "const int*"
- },
- {
- "type": "volatile int*"
- },
- {
- "type": "const int*volatile*"
- }
- ],
- "name": "bar",
- "returnType": "int"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "int"
- },
- {
- "type": "QObject*const"
- }
- ],
- "name": "slot",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "oldstyle-casts.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "SlotsWithVoidTemplateTest",
- "object": true,
- "qualifiedClassName": "SlotsWithVoidTemplateTest",
- "signals": [
- {
- "access": "public",
- "arguments": [
- {
- "type": "TestTemplate<void>"
- }
- ],
- "name": "mySignal",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "myVoidSignal",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "myVoidSignal2",
- "returnType": "void"
- }
- ],
- "slots": [
- {
- "access": "public",
- "name": "dummySlot",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "dummySlot2",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "TestTemplate<void>"
- }
- ],
- "name": "anotherSlot",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "mySlot",
- "returnType": "TestTemplate<void>"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "slots-with-void-template.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "InvokableBeforeReturnType",
- "methods": [
- {
- "access": "public",
- "name": "foo",
- "returnType": "const char*"
- }
- ],
- "object": true,
- "qualifiedClassName": "InvokableBeforeReturnType",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "InvokableBeforeInline",
- "methods": [
- {
- "access": "public",
- "name": "foo",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "bar",
- "returnType": "void"
- }
- ],
- "object": true,
- "qualifiedClassName": "InvokableBeforeInline",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "qinvokable.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "Bar",
- "enums": [
- {
- "alias": "Flag",
- "isClass": false,
- "isFlag": true,
- "name": "Flags",
- "values": [
- "Read",
- "Write"
- ]
- }
- ],
- "object": true,
- "properties": [
- {
- "constant": false,
- "designable": true,
- "final": false,
- "name": "flags",
- "read": "flags",
- "required": false,
- "scriptable": true,
- "stored": true,
- "type": "Flags",
- "user": false,
- "write": "setFlags"
- }
- ],
- "qualifiedClassName": "Foo::Bar",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "Baz",
- "object": true,
- "properties": [
- {
- "constant": false,
- "designable": true,
- "final": false,
- "name": "flags",
- "read": "flags",
- "required": false,
- "scriptable": true,
- "stored": true,
- "type": "Foo::Bar::Flags",
- "user": false,
- "write": "setFlags"
- },
- {
- "constant": false,
- "designable": true,
- "final": false,
- "name": "flagsList",
- "read": "flagsList",
- "required": false,
- "scriptable": true,
- "stored": true,
- "type": "QList<Foo::Bar::Flags>",
- "user": false,
- "write": "setFlagsList"
- }
- ],
- "qualifiedClassName": "Foo::Baz",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "namespaced-flags.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "Foo",
- "object": true,
- "qualifiedClassName": "BBB::Foo",
- "signals": [
- {
- "access": "public",
- "arguments": [
- {
- "type": "QList<QList<int> >"
- }
- ],
- "name": "foo",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "QList<QList<int> >"
- }
- ],
- "name": "foo2",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "QList< ::AAA::BaseA*>"
- }
- ],
- "name": "bar",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "QList< ::AAA::BaseA*>"
- }
- ],
- "name": "bar2",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "QList<const ::AAA::BaseA*>"
- }
- ],
- "name": "bar3",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- },
- {
- "access": "public",
- "name": "::AAA::BaseA"
- }
- ]
- }
- ],
- "inputFile": "trigraphs.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "classInfos": [
- {
- "name": "Test",
- "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\x53"
- },
- {
- "name": "Test2",
- "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\123"
- },
- {
- "name": "Test3",
- "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\nb"
- }
- ],
- "className": "StringLiterals",
+ "className": "IfdefedClass",
"object": true,
- "qualifiedClassName": "StringLiterals",
+ "qualifiedClassName": "IfdefedClass",
"superClasses": [
{
"access": "public",
@@ -444,7 +37,7 @@
]
}
],
- "inputFile": "escapes-in-string-literals.h",
+ "inputFile": "c-comments.h",
"outputRevision": 67
},
{
@@ -481,487 +74,6 @@
{
"classes": [
{
- "className": "TestQPrivateSlots",
- "methods": [
- {
- "access": "private",
- "name": "method1",
- "returnType": "void"
- }
- ],
- "object": true,
- "qualifiedClassName": "TestQPrivateSlots",
- "slots": [
- {
- "access": "private",
- "name": "_q_privateslot",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "qprivateslots.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "GadgetWithNoEnums",
- "gadget": true,
- "qualifiedClassName": "GadgetWithNoEnums"
- },
- {
- "className": "DerivedGadgetWithEnums",
- "enums": [
- {
- "isClass": false,
- "isFlag": false,
- "name": "FooEnum",
- "values": [
- "FooValue"
- ]
- }
- ],
- "gadget": true,
- "qualifiedClassName": "DerivedGadgetWithEnums",
- "superClasses": [
- {
- "access": "public",
- "name": "GadgetWithNoEnums"
- }
- ]
- }
- ],
- "inputFile": "gadgetwithnoenums.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "DirInIncludePath",
- "interfaces": [
- [
- {
- "className": "MyInterface",
- "id": "\"MyInterface\""
- }
- ]
- ],
- "object": true,
- "qualifiedClassName": "DirInIncludePath",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- },
- {
- "access": "public",
- "name": "MyInterface"
- }
- ]
- }
- ],
- "inputFile": "dir-in-include-path.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "SingleFunctionKeywordBeforeReturnType",
- "object": true,
- "qualifiedClassName": "SingleFunctionKeywordBeforeReturnType",
- "signals": [
- {
- "access": "public",
- "name": "mySignal",
- "returnType": "void"
- }
- ],
- "slots": [
- {
- "access": "public",
- "name": "mySlot",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "SingleFunctionKeywordBeforeInline",
- "object": true,
- "qualifiedClassName": "SingleFunctionKeywordBeforeInline",
- "signals": [
- {
- "access": "public",
- "name": "mySignal",
- "returnType": "void"
- }
- ],
- "slots": [
- {
- "access": "public",
- "name": "mySlot",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "SingleFunctionKeywordAfterInline",
- "object": true,
- "qualifiedClassName": "SingleFunctionKeywordAfterInline",
- "signals": [
- {
- "access": "public",
- "name": "mySignal",
- "returnType": "void"
- }
- ],
- "slots": [
- {
- "access": "public",
- "name": "mySlot",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "single_function_keyword.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "Task192552",
- "object": true,
- "qualifiedClassName": "Task192552",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "task192552.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "InlineSlotsWithThrowDeclaration",
- "object": true,
- "qualifiedClassName": "InlineSlotsWithThrowDeclaration",
- "slots": [
- {
- "access": "public",
- "name": "a",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "b",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "c",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "d",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "e",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "task189996.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "TestObject",
- "object": true,
- "qualifiedClassName": "NS_A::NS_B::TestObject",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "TestMain",
- "object": true,
- "qualifiedClassName": "NS_A::NS_Main::TestMain",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "task234909.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "TypenameWithUnsigned",
- "object": true,
- "qualifiedClassName": "TypenameWithUnsigned",
- "slots": [
- {
- "access": "public",
- "arguments": [
- {
- "type": "uint"
- }
- ],
- "name": "a",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "u",
- "type": "uint"
- }
- ],
- "name": "b",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "uint*"
- }
- ],
- "name": "c",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "p",
- "type": "uint*"
- }
- ],
- "name": "d",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "uint&"
- }
- ],
- "name": "e",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "r",
- "type": "uint&"
- }
- ],
- "name": "f",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "unsigned1"
- }
- ],
- "name": "g",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "u1",
- "type": "unsigned1"
- }
- ],
- "name": "h",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "uint"
- },
- {
- "type": "unsigned1"
- }
- ],
- "name": "i",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "unsigned1"
- },
- {
- "type": "uint"
- }
- ],
- "name": "j",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "type": "unsignedQImage"
- }
- ],
- "name": "k",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "uqi",
- "type": "unsignedQImage"
- }
- ],
- "name": "l",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "task240368.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "PureVirtualSignalsTest",
- "object": true,
- "qualifiedClassName": "PureVirtualSignalsTest",
- "signals": [
- {
- "access": "public",
- "name": "mySignal",
- "returnType": "void"
- },
- {
- "access": "public",
- "name": "myOtherSignal",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "foo",
- "type": "int"
- }
- ],
- "name": "mySignal2",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "PureVirtualSignalsImpl",
- "object": true,
- "qualifiedClassName": "PureVirtualSignalsImpl",
- "signals": [
- {
- "access": "public",
- "name": "mySignal",
- "returnType": "void"
- },
- {
- "access": "public",
- "arguments": [
- {
- "name": "foo",
- "type": "int"
- }
- ],
- "name": "mySignal2",
- "returnType": "void"
- }
- ],
- "superClasses": [
- {
- "access": "public",
- "name": "PureVirtualSignalsTest"
- }
- ]
- }
- ],
- "inputFile": "pure-virtual-signals.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
"className": "CXX11Enums",
"enums": [
{
@@ -1128,111 +240,6 @@
{
"classes": [
{
- "className": "FinalTestClassQt",
- "object": true,
- "qualifiedClassName": "FinalTestClassQt",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "ExportedFinalTestClassQt",
- "object": true,
- "qualifiedClassName": "ExportedFinalTestClassQt",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "ExportedFinalTestClassQtX",
- "object": true,
- "qualifiedClassName": "ExportedFinalTestClassQtX",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "FinalTestClassCpp11",
- "object": true,
- "qualifiedClassName": "FinalTestClassCpp11",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "ExportedFinalTestClassCpp11",
- "object": true,
- "qualifiedClassName": "ExportedFinalTestClassCpp11",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "ExportedFinalTestClassCpp11X",
- "object": true,
- "qualifiedClassName": "ExportedFinalTestClassCpp11X",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "SealedTestClass",
- "object": true,
- "qualifiedClassName": "SealedTestClass",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "ExportedSealedTestClass",
- "object": true,
- "qualifiedClassName": "ExportedSealedTestClass",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
- {
- "className": "ExportedSealedTestClassX",
- "object": true,
- "qualifiedClassName": "ExportedSealedTestClassX",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- }
- ],
- "inputFile": "cxx11-final-classes.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
"className": "ExplicitOverrideControlBase",
"object": true,
"qualifiedClassName": "ExplicitOverrideControlBase",
@@ -1536,6 +543,207 @@
{
"classes": [
{
+ "className": "FinalTestClassQt",
+ "object": true,
+ "qualifiedClassName": "FinalTestClassQt",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassQt",
+ "object": true,
+ "qualifiedClassName": "ExportedFinalTestClassQt",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassQtX",
+ "object": true,
+ "qualifiedClassName": "ExportedFinalTestClassQtX",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "FinalTestClassCpp11",
+ "object": true,
+ "qualifiedClassName": "FinalTestClassCpp11",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassCpp11",
+ "object": true,
+ "qualifiedClassName": "ExportedFinalTestClassCpp11",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedFinalTestClassCpp11X",
+ "object": true,
+ "qualifiedClassName": "ExportedFinalTestClassCpp11X",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "SealedTestClass",
+ "object": true,
+ "qualifiedClassName": "SealedTestClass",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedSealedTestClass",
+ "object": true,
+ "qualifiedClassName": "ExportedSealedTestClass",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "ExportedSealedTestClassX",
+ "object": true,
+ "qualifiedClassName": "ExportedSealedTestClassX",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "cxx11-final-classes.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "ClassInNamespace",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "GadEn",
+ "values": [
+ "Value"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "CXX17Namespace::A::B::C::D::ClassInNamespace"
+ },
+ {
+ "className": "D",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "NamEn",
+ "values": [
+ "Value"
+ ]
+ }
+ ],
+ "namespace": true,
+ "qualifiedClassName": "CXX17Namespace::A::B::C::D"
+ }
+ ],
+ "inputFile": "cxx17-namespaces.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "DirInIncludePath",
+ "interfaces": [
+ [
+ {
+ "className": "MyInterface",
+ "id": "\"MyInterface\""
+ }
+ ]
+ ],
+ "object": true,
+ "qualifiedClassName": "DirInIncludePath",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ },
+ {
+ "access": "public",
+ "name": "MyInterface"
+ }
+ ]
+ }
+ ],
+ "inputFile": "dir-in-include-path.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "classInfos": [
+ {
+ "name": "Test",
+ "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\x53"
+ },
+ {
+ "name": "Test2",
+ "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\123"
+ },
+ {
+ "name": "Test3",
+ "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\nb"
+ }
+ ],
+ "className": "StringLiterals",
+ "object": true,
+ "qualifiedClassName": "StringLiterals",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "escapes-in-string-literals.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
"className": "ForwardDeclaredParamClass",
"object": true,
"qualifiedClassName": "ForwardDeclaredParamClass",
@@ -1737,6 +945,416 @@
{
"classes": [
{
+ "className": "FunctionWithAttributes",
+ "object": true,
+ "qualifiedClassName": "FunctionWithAttributes",
+ "slots": [
+ {
+ "access": "public",
+ "name": "test1",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "test2",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "function-with-attributes.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "GadgetWithNoEnums",
+ "gadget": true,
+ "qualifiedClassName": "GadgetWithNoEnums"
+ },
+ {
+ "className": "DerivedGadgetWithEnums",
+ "enums": [
+ {
+ "isClass": false,
+ "isFlag": false,
+ "name": "FooEnum",
+ "values": [
+ "FooValue"
+ ]
+ }
+ ],
+ "gadget": true,
+ "qualifiedClassName": "DerivedGadgetWithEnums",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "GadgetWithNoEnums"
+ }
+ ]
+ }
+ ],
+ "inputFile": "gadgetwithnoenums.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "BaseGadget",
+ "gadget": true,
+ "qualifiedClassName": "GrandParentGadget::BaseGadget"
+ },
+ {
+ "className": "DerivedGadget",
+ "gadget": true,
+ "qualifiedClassName": "GrandParentGadget::DerivedGadget",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "Derived"
+ }
+ ]
+ },
+ {
+ "className": "CRTPDerivedGadget",
+ "gadget": true,
+ "qualifiedClassName": "GrandParentGadget::CRTPDerivedGadget",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "CRTP<CRTPDerivedGadget>"
+ }
+ ]
+ }
+ ],
+ "inputFile": "grand-parent-gadget-class.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TestFwdProperties",
+ "object": true,
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "prop1",
+ "read": "getProp1",
+ "required": false,
+ "scriptable": true,
+ "stored": true,
+ "type": "FwdClass1",
+ "user": false,
+ "write": "setProp1"
+ },
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "prop2",
+ "read": "getProp2",
+ "required": false,
+ "scriptable": true,
+ "stored": true,
+ "type": "FwdClass2",
+ "user": false,
+ "write": "setProp2"
+ },
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "prop3",
+ "read": "getProp3",
+ "required": false,
+ "scriptable": true,
+ "stored": true,
+ "type": "FwdClass3",
+ "user": false,
+ "write": "setProp3"
+ }
+ ],
+ "qualifiedClassName": "TestFwdProperties",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "SomeRandomNamespace",
+ "namespace": true,
+ "qualifiedClassName": "SomeRandomNamespace"
+ }
+ ],
+ "inputFile": "moc_include.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "FooNamespace",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum1",
+ "values": [
+ "Key1",
+ "Key2"
+ ]
+ }
+ ],
+ "namespace": true,
+ "qualifiedClassName": "FooNamespace"
+ },
+ {
+ "className": "FooNestedNamespace",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum2",
+ "values": [
+ "Key3",
+ "Key4"
+ ]
+ },
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum3",
+ "values": [
+ "Key5",
+ "Key6"
+ ]
+ }
+ ],
+ "namespace": true,
+ "qualifiedClassName": "FooNamespace::FooNestedNamespace"
+ },
+ {
+ "className": "FooMoreNestedNamespace",
+ "enums": [
+ {
+ "isClass": true,
+ "isFlag": false,
+ "name": "Enum4",
+ "values": [
+ "Key7",
+ "Key8"
+ ]
+ }
+ ],
+ "namespace": true,
+ "qualifiedClassName": "FooNamespace::FooNestedNamespace::FooMoreNestedNamespace"
+ }
+ ],
+ "inputFile": "namespace.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Bar",
+ "enums": [
+ {
+ "alias": "Flag",
+ "isClass": false,
+ "isFlag": true,
+ "name": "Flags",
+ "values": [
+ "Read",
+ "Write"
+ ]
+ }
+ ],
+ "object": true,
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "flags",
+ "read": "flags",
+ "required": false,
+ "scriptable": true,
+ "stored": true,
+ "type": "Flags",
+ "user": false,
+ "write": "setFlags"
+ }
+ ],
+ "qualifiedClassName": "Foo::Bar",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "Baz",
+ "object": true,
+ "properties": [
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "flags",
+ "read": "flags",
+ "required": false,
+ "scriptable": true,
+ "stored": true,
+ "type": "Foo::Bar::Flags",
+ "user": false,
+ "write": "setFlags"
+ },
+ {
+ "constant": false,
+ "designable": true,
+ "final": false,
+ "name": "flagsList",
+ "read": "flagsList",
+ "required": false,
+ "scriptable": true,
+ "stored": true,
+ "type": "QVector<Foo::Bar::Flags>",
+ "user": false,
+ "write": "setFlagsList"
+ }
+ ],
+ "qualifiedClassName": "Foo::Baz",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "namespaced-flags.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "MyBooooooostishClass",
+ "object": true,
+ "qualifiedClassName": "MyBooooooostishClass",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "no-keywords.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Derived",
+ "gadget": true,
+ "qualifiedClassName": "NonGadgetParent::Derived",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "Base"
+ }
+ ]
+ }
+ ],
+ "inputFile": "non-gadget-parent-class.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "OldStyleCast",
+ "object": true,
+ "qualifiedClassName": "OldStyleCast",
+ "slots": [
+ {
+ "access": "public",
+ "name": "foo",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "int*"
+ },
+ {
+ "type": "const int*"
+ },
+ {
+ "type": "volatile int*"
+ },
+ {
+ "type": "const int*volatile*"
+ }
+ ],
+ "name": "bar",
+ "returnType": "int"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "int"
+ },
+ {
+ "type": "QObject*"
+ }
+ ],
+ "name": "slot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "oldstyle-casts.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
"classInfos": [
{
"name": "TestString",
@@ -1937,18 +1555,46 @@
{
"classes": [
{
- "className": "FunctionWithAttributes",
+ "className": "TestPluginMetaData",
"object": true,
- "qualifiedClassName": "FunctionWithAttributes",
- "slots": [
+ "qualifiedClassName": "TestPluginMetaData",
+ "superClasses": [
{
"access": "public",
- "name": "test1",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "plugin_metadata.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "PureVirtualSignalsTest",
+ "object": true,
+ "qualifiedClassName": "PureVirtualSignalsTest",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
"returnType": "void"
},
{
"access": "public",
- "name": "test2",
+ "name": "myOtherSignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "foo",
+ "type": "int"
+ }
+ ],
+ "name": "mySignal2",
"returnType": "void"
}
],
@@ -1958,17 +1604,76 @@
"name": "QObject"
}
]
+ },
+ {
+ "className": "PureVirtualSignalsImpl",
+ "object": true,
+ "qualifiedClassName": "PureVirtualSignalsImpl",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "foo",
+ "type": "int"
+ }
+ ],
+ "name": "mySignal2",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "PureVirtualSignalsTest"
+ }
+ ]
}
],
- "inputFile": "function-with-attributes.h",
+ "inputFile": "pure-virtual-signals.h",
"outputRevision": 67
},
{
"classes": [
{
- "className": "TestPluginMetaData",
+ "className": "InvokableBeforeReturnType",
+ "methods": [
+ {
+ "access": "public",
+ "name": "foo",
+ "returnType": "const char*"
+ }
+ ],
"object": true,
- "qualifiedClassName": "TestPluginMetaData",
+ "qualifiedClassName": "InvokableBeforeReturnType",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ },
+ {
+ "className": "InvokableBeforeInline",
+ "methods": [
+ {
+ "access": "public",
+ "name": "foo",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "bar",
+ "returnType": "void"
+ }
+ ],
+ "object": true,
+ "qualifiedClassName": "InvokableBeforeInline",
"superClasses": [
{
"access": "public",
@@ -1977,25 +1682,29 @@
]
}
],
- "inputFile": "plugin_metadata.h",
+ "inputFile": "qinvokable.h",
"outputRevision": 67
},
{
"classes": [
{
- "className": "KDAB",
- "enums": [
+ "className": "TestQPrivateSlots",
+ "methods": [
{
- "isClass": false,
- "isFlag": false,
- "name": "Salaries",
- "values": [
- "Steve"
- ]
+ "access": "private",
+ "name": "method1",
+ "returnType": "void"
}
],
"object": true,
- "qualifiedClassName": "KDAB",
+ "qualifiedClassName": "TestQPrivateSlots",
+ "slots": [
+ {
+ "access": "private",
+ "name": "_q_privateslot",
+ "returnType": "void"
+ }
+ ],
"superClasses": [
{
"access": "public",
@@ -2004,7 +1713,7 @@
]
}
],
- "inputFile": "single-quote-digit-separator-n3781.h",
+ "inputFile": "qprivateslots.h",
"outputRevision": 67
},
{
@@ -2021,15 +1730,15 @@
]
}
],
- "object": true,
- "qualifiedClassName": "QTBUG_2151::A",
- "superClasses": [
- {
- "access": "public",
- "name": "QObject"
- }
- ]
- },
+ "gadget": true,
+ "qualifiedClassName": "QTBUG_35657::A"
+ }
+ ],
+ "inputFile": "qtbug-35657-gadget.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
{
"className": "B",
"object": true,
@@ -2047,7 +1756,7 @@
"user": false
}
],
- "qualifiedClassName": "QTBUG_2151::B",
+ "qualifiedClassName": "QTBUG_35657::B",
"superClasses": [
{
"access": "public",
@@ -2056,7 +1765,7 @@
]
}
],
- "inputFile": "related-metaobjects-in-namespaces.h",
+ "inputFile": "related-metaobjects-in-gadget.h",
"outputRevision": 67
},
{
@@ -2073,66 +1782,16 @@
]
}
],
- "gadget": true,
- "qualifiedClassName": "QTBUG_35657::A"
- }
- ],
- "inputFile": "qtbug-35657-gadget.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "Derived",
- "gadget": true,
- "qualifiedClassName": "NonGadgetParent::Derived",
- "superClasses": [
- {
- "access": "public",
- "name": "Base"
- }
- ]
- }
- ],
- "inputFile": "non-gadget-parent-class.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
- "className": "BaseGadget",
- "gadget": true,
- "qualifiedClassName": "GrandParentGadget::BaseGadget"
- },
- {
- "className": "DerivedGadget",
- "gadget": true,
- "qualifiedClassName": "GrandParentGadget::DerivedGadget",
+ "object": true,
+ "qualifiedClassName": "QTBUG_2151::A",
"superClasses": [
{
"access": "public",
- "name": "Derived"
+ "name": "QObject"
}
]
},
{
- "className": "CRTPDerivedGadget",
- "gadget": true,
- "qualifiedClassName": "GrandParentGadget::CRTPDerivedGadget",
- "superClasses": [
- {
- "access": "public",
- "name": "CRTP<CRTPDerivedGadget>"
- }
- ]
- }
- ],
- "inputFile": "grand-parent-gadget-class.h",
- "outputRevision": 67
- },
- {
- "classes": [
- {
"className": "B",
"object": true,
"properties": [
@@ -2149,7 +1808,7 @@
"user": false
}
],
- "qualifiedClassName": "QTBUG_35657::B",
+ "qualifiedClassName": "QTBUG_2151::B",
"superClasses": [
{
"access": "public",
@@ -2158,7 +1817,7 @@
]
}
],
- "inputFile": "related-metaobjects-in-gadget.h",
+ "inputFile": "related-metaobjects-in-namespaces.h",
"outputRevision": 67
},
{
@@ -2596,100 +2255,460 @@
{
"classes": [
{
- "className": "FooNamespace",
+ "className": "KDAB",
"enums": [
{
- "isClass": true,
+ "isClass": false,
"isFlag": false,
- "name": "Enum1",
+ "name": "Salaries",
"values": [
- "Key1",
- "Key2"
+ "Steve"
]
}
],
- "namespace": true,
- "qualifiedClassName": "FooNamespace"
+ "object": true,
+ "qualifiedClassName": "KDAB",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "single-quote-digit-separator-n3781.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "SingleFunctionKeywordBeforeReturnType",
+ "object": true,
+ "qualifiedClassName": "SingleFunctionKeywordBeforeReturnType",
+ "signals": [
+ {
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
},
{
- "className": "FooNestedNamespace",
- "enums": [
+ "className": "SingleFunctionKeywordBeforeInline",
+ "object": true,
+ "qualifiedClassName": "SingleFunctionKeywordBeforeInline",
+ "signals": [
{
- "isClass": true,
- "isFlag": false,
- "name": "Enum2",
- "values": [
- "Key3",
- "Key4"
- ]
- },
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
+ }
+ ],
+ "slots": [
{
- "isClass": true,
- "isFlag": false,
- "name": "Enum3",
- "values": [
- "Key5",
- "Key6"
- ]
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
}
],
- "namespace": true,
- "qualifiedClassName": "FooNamespace::FooNestedNamespace"
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
},
{
- "className": "FooMoreNestedNamespace",
- "enums": [
+ "className": "SingleFunctionKeywordAfterInline",
+ "object": true,
+ "qualifiedClassName": "SingleFunctionKeywordAfterInline",
+ "signals": [
{
- "isClass": true,
- "isFlag": false,
- "name": "Enum4",
- "values": [
- "Key7",
- "Key8"
- ]
+ "access": "public",
+ "name": "mySignal",
+ "returnType": "void"
}
],
- "namespace": true,
- "qualifiedClassName": "FooNamespace::FooNestedNamespace::FooMoreNestedNamespace"
+ "slots": [
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
}
],
- "inputFile": "namespace.h",
+ "inputFile": "single_function_keyword.h",
"outputRevision": 67
},
{
"classes": [
{
- "className": "ClassInNamespace",
- "enums": [
+ "className": "SlotsWithVoidTemplateTest",
+ "object": true,
+ "qualifiedClassName": "SlotsWithVoidTemplateTest",
+ "signals": [
{
- "isClass": false,
- "isFlag": false,
- "name": "GadEn",
- "values": [
- "Value"
- ]
+ "access": "public",
+ "arguments": [
+ {
+ "type": "TestTemplate<void>"
+ }
+ ],
+ "name": "mySignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "myVoidSignal",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "myVoidSignal2",
+ "returnType": "void"
}
],
- "gadget": true,
- "qualifiedClassName": "CXX17Namespace::A::B::C::D::ClassInNamespace"
+ "slots": [
+ {
+ "access": "public",
+ "name": "dummySlot",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "dummySlot2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "TestTemplate<void>"
+ }
+ ],
+ "name": "anotherSlot",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "mySlot",
+ "returnType": "TestTemplate<void>"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "slots-with-void-template.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Task192552",
+ "object": true,
+ "qualifiedClassName": "Task192552",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task192552.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TestObject",
+ "object": true,
+ "qualifiedClassName": "NS_A::NS_B::TestObject",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
},
{
- "className": "D",
- "enums": [
+ "className": "TestMain",
+ "object": true,
+ "qualifiedClassName": "NS_A::NS_Main::TestMain",
+ "superClasses": [
{
- "isClass": false,
- "isFlag": false,
- "name": "NamEn",
- "values": [
- "Value"
- ]
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task234909.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "TypenameWithUnsigned",
+ "object": true,
+ "qualifiedClassName": "TypenameWithUnsigned",
+ "slots": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint"
+ }
+ ],
+ "name": "a",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "u",
+ "type": "uint"
+ }
+ ],
+ "name": "b",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint*"
+ }
+ ],
+ "name": "c",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "p",
+ "type": "uint*"
+ }
+ ],
+ "name": "d",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint&"
+ }
+ ],
+ "name": "e",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "r",
+ "type": "uint&"
+ }
+ ],
+ "name": "f",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "unsigned1"
+ }
+ ],
+ "name": "g",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "u1",
+ "type": "unsigned1"
+ }
+ ],
+ "name": "h",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "uint"
+ },
+ {
+ "type": "unsigned1"
+ }
+ ],
+ "name": "i",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "unsigned1"
+ },
+ {
+ "type": "uint"
+ }
+ ],
+ "name": "j",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "unsignedQImage"
+ }
+ ],
+ "name": "k",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "name": "uqi",
+ "type": "unsignedQImage"
+ }
+ ],
+ "name": "l",
+ "returnType": "void"
}
],
- "namespace": true,
- "qualifiedClassName": "CXX17Namespace::A::B::C::D"
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
}
],
- "inputFile": "cxx17-namespaces.h",
+ "inputFile": "task240368.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Task87883",
+ "object": true,
+ "qualifiedClassName": "Task87883",
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ]
+ }
+ ],
+ "inputFile": "task87883.h",
+ "outputRevision": 67
+ },
+ {
+ "classes": [
+ {
+ "className": "Foo",
+ "object": true,
+ "qualifiedClassName": "BBB::Foo",
+ "signals": [
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QVector<QVector<int>>"
+ }
+ ],
+ "name": "foo",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QVector<QVector<int>>"
+ }
+ ],
+ "name": "foo2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QVector<::AAA::BaseA*>"
+ }
+ ],
+ "name": "bar",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QVector<::AAA::BaseA*>"
+ }
+ ],
+ "name": "bar2",
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "arguments": [
+ {
+ "type": "QVector<const ::AAA::BaseA*>"
+ }
+ ],
+ "name": "bar3",
+ "returnType": "void"
+ }
+ ],
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ },
+ {
+ "access": "public",
+ "name": "::AAA::BaseA"
+ }
+ ]
+ }
+ ],
+ "inputFile": "trigraphs.h",
"outputRevision": 67
}
]
diff --git a/tests/auto/tools/moc/task189996.h b/tests/auto/tools/moc/fwdclass1.h
index f94a051b3a..a8457cca77 100644
--- a/tests/auto/tools/moc/task189996.h
+++ b/tests/auto/tools/moc/fwdclass1.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -25,23 +25,14 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-// inline functions can have throw declarations
-#ifndef TASK189996_H
-#define TASK189996_H
-
-#include <QObject>
+#ifdef FWDCLASS1_H
+#error "This file can only be included once"
+#endif
+#define FWDCLASS1_H
-class InlineSlotsWithThrowDeclaration : public QObject
+class FwdClass1
{
- Q_OBJECT
-
-public slots:
- void a() throw() { }
- void b() const throw() { }
- void c() throw();
- void d() throw(int) { }
- void e() const throw(int,double) { }
+public:
+ int x;
};
-
-#endif
diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.h b/tests/auto/tools/moc/fwdclass2.h
index e4b496c163..650da18116 100644
--- a/tests/auto/opengl/qglthreads/tst_qglthreads.h
+++ b/tests/auto/tools/moc/fwdclass2.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -26,26 +26,13 @@
**
****************************************************************************/
-#ifndef TST_QGLTHREADS_H
-#define TST_QGLTHREADS_H
+#ifdef FWDCLASS2_H
+#error "This file can only be included once"
+#endif
+#define FWDCLASS2_H
-#include <QObject>
-
-class tst_QGLThreads : public QObject
+class FwdClass2
{
-Q_OBJECT
public:
- explicit tst_QGLThreads(QObject *parent = 0);
-
-private slots:
- void swapInThread();
-
- void renderInThread_data();
- void renderInThread();
- void painterOnGLWidgetInThread();
- void painterOnPixmapInThread();
- void painterOnPboInThread();
- void painterOnFboInThread();
+ int x;
};
-
-#endif // TST_QGLTHREADS_H
diff --git a/tests/auto/tools/moc/fwdclass3.h b/tests/auto/tools/moc/fwdclass3.h
new file mode 100644
index 0000000000..080ac0340d
--- /dev/null
+++ b/tests/auto/tools/moc/fwdclass3.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef FWDCLASS3_H
+#error "This file can only be included once"
+#endif
+#define FWDCLASS3_H
+
+class FwdClass3
+{
+public:
+ int x;
+};
diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro
index 1794bafd2c..094c76227b 100644
--- a/tests/auto/tools/moc/moc.pro
+++ b/tests/auto/tools/moc/moc.pro
@@ -15,7 +15,7 @@ cross_compile: DEFINES += MOC_CROSS_COMPILED
HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-newlines.h oldstyle-casts.h \
slots-with-void-template.h qinvokable.h namespaced-flags.h trigraphs.h \
escapes-in-string-literals.h cstyle-enums.h qprivateslots.h gadgetwithnoenums.h \
- dir-in-include-path.h single_function_keyword.h task192552.h task189996.h \
+ dir-in-include-path.h single_function_keyword.h task192552.h \
task234909.h task240368.h pure-virtual-signals.h cxx11-enums.h \
cxx11-final-classes.h \
cxx11-explicit-override-control.h \
@@ -30,7 +30,8 @@ HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-n
related-metaobjects-in-gadget.h \
related-metaobjects-name-conflict.h \
namespace.h cxx17-namespaces.h \
- cxx-attributes.h
+ cxx-attributes.h \
+ moc_include.h
# No platform specifics in the JSON files, so that we can compare them
JSON_HEADERS = $$HEADERS
diff --git a/tests/auto/tools/moc/moc_include.h b/tests/auto/tools/moc/moc_include.h
new file mode 100644
index 0000000000..49b484a0c9
--- /dev/null
+++ b/tests/auto/tools/moc/moc_include.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MOC_INCLUDE_H
+#define MOC_INCLUDE_H
+
+#include <QObject>
+
+class FwdClass1;
+class FwdClass2;
+class FwdClass3;
+
+Q_MOC_INCLUDE(fwdclass3.h)
+
+namespace SomeRandomNamespace {
+Q_MOC_INCLUDE("fwdclass1.h")
+Q_NAMESPACE
+}
+
+class TestFwdProperties : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(FwdClass1 prop1 WRITE setProp1 READ getProp1)
+ Q_PROPERTY(FwdClass2 prop2 WRITE setProp2 READ getProp2)
+ Q_PROPERTY(FwdClass3 prop3 WRITE setProp3 READ getProp3)
+public:
+ ~TestFwdProperties();
+
+ void setProp1(const FwdClass1 &val);
+ void setProp2(const FwdClass2 &val);
+ void setProp3(const FwdClass3 &val);
+ const FwdClass1 &getProp1() { return *prop1; }
+ const FwdClass2 &getProp2() { return *prop2; }
+ const FwdClass3 &getProp3() { return *prop3; }
+
+ QScopedPointer<FwdClass1> prop1;
+ QScopedPointer<FwdClass2> prop2;
+ QScopedPointer<FwdClass3> prop3;
+
+ Q_MOC_INCLUDE(
+ \
+ "fwdclass2.h"
+ )
+
+};
+
+Q_MOC_INCLUDE(<QString>)
+
+#endif // MOC_INCLUDE_H
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 0f801fe902..31fe68a64e 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com>
+** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -27,13 +27,12 @@
**
****************************************************************************/
-
-
#include <QtTest/QtTest>
#include <stdio.h>
#include <qobject.h>
#include <qmetaobject.h>
#include <qjsondocument.h>
+#include <qversionnumber.h>
#include "using-namespaces.h"
#include "assign-namespace.h"
@@ -74,6 +73,11 @@
#include "cxx17-namespaces.h"
#include "cxx-attributes.h"
+#include "moc_include.h"
+#include "fwdclass1.h"
+#include "fwdclass2.h"
+#include "fwdclass3.h"
+
#ifdef Q_MOC_RUN
// check that moc can parse these constructs, they are being used in Windows winsock2.h header
#define STRING_HASH_HASH(x) ("foo" ## x ## "bar")
@@ -630,7 +634,6 @@ public:
private slots:
void initTestCase();
- void slotWithException() throw(MyStruct);
void dontStripNamespaces();
void oldStyleCasts();
void warnOnExtraSignalSlotQualifiaction();
@@ -672,7 +675,6 @@ private slots:
void templateGtGt();
void qprivateslots();
void qprivateproperties();
- void inlineSlotsWithThrowDeclaration();
void warnOnPropertyWithoutREAD();
void constructors();
void typenameWithUnsigned();
@@ -719,6 +721,7 @@ private slots:
void cxx17Namespaces();
void cxxAttributes();
void mocJsonOutput();
+ void mocInclude();
void requiredProperties();
signals:
@@ -782,12 +785,6 @@ void tst_Moc::initTestCase()
#endif
}
-void tst_Moc::slotWithException() throw(MyStruct)
-{
- // be happy
- QVERIFY(true);
-}
-
void tst_Moc::dontStripNamespaces()
{
Sender sender;
@@ -822,7 +819,7 @@ void tst_Moc::oldStyleCasts()
QStringList args;
args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "."
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-";
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-";
proc.start("gcc", args);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);
@@ -892,7 +889,7 @@ void tst_Moc::inputFileNameWithDotsButNoExtension()
QStringList args;
args << "-c" << "-x" << "c++" << "-I" << ".."
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-";
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-";
proc.start("gcc", args);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);
@@ -1172,7 +1169,7 @@ void tst_Moc::ignoreOptionClashes()
QStringList gccArgs;
gccArgs << "-c" << "-x" << "c++" << "-I" << ".."
<< "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null"
- << "-fPIC" << "-std=c++11" << "-";
+ << "-fPIC" << "-std=c++1z" << "-";
proc.start("gcc", gccArgs);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);
@@ -1591,21 +1588,6 @@ void tst_Moc::qprivateproperties()
}
-#include "task189996.h"
-
-void InlineSlotsWithThrowDeclaration::c() throw() {}
-
-void tst_Moc::inlineSlotsWithThrowDeclaration()
-{
- InlineSlotsWithThrowDeclaration tst;
- const QMetaObject *mobj = tst.metaObject();
- QVERIFY(mobj->indexOfSlot("a()") != -1);
- QVERIFY(mobj->indexOfSlot("b()") != -1);
- QVERIFY(mobj->indexOfSlot("c()") != -1);
- QVERIFY(mobj->indexOfSlot("d()") != -1);
- QVERIFY(mobj->indexOfSlot("e()") != -1);
-}
-
void tst_Moc::warnOnPropertyWithoutREAD()
{
#ifdef MOC_CROSS_COMPILED
@@ -1845,8 +1827,8 @@ void tst_Moc::QTBUG12260_defaultTemplate()
{
QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomething(QHash<QString,QVariant>)") != -1);
QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doAnotherThing(bool,bool)") != -1);
- QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomethingElse(QSharedPointer<QVarLengthArray<QString,(16>>2)> >)") != -1);
- QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("performSomething(QVector<QList<QString> >,QHash<int,QVector<QString> >)") != -1);
+ QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomethingElse(QSharedPointer<QVarLengthArray<QString,(16>>2)>>)") != -1);
+ QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("performSomething(QVector<QList<QString>>,QHash<int,QVector<QString>>)") != -1);
}
void tst_Moc::notifyError()
@@ -1867,7 +1849,7 @@ void tst_Moc::notifyError()
QStringList args;
args << "-c" << "-x" << "c++" << "-I" << "."
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-";
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-";
proc.start("gcc", args);
QVERIFY(proc.waitForStarted());
proc.write(mocOut);
@@ -1914,12 +1896,14 @@ class VersionTest : public QObject
Q_OBJECT
Q_PROPERTY(int prop1 READ foo)
Q_PROPERTY(int prop2 READ foo REVISION 2)
+ Q_PROPERTY(int prop514 READ foo REVISION(5, 14))
public:
int foo() const { return 0; }
Q_INVOKABLE void method1() {}
Q_INVOKABLE Q_REVISION(4) void method2() {}
+ Q_INVOKABLE Q_REVISION(6, 0) void method60() {}
enum TestEnum { One, Two };
Q_ENUM(TestEnum);
@@ -1928,18 +1912,26 @@ public:
public slots:
void slot1() {}
Q_REVISION(3) void slot2() {}
+ Q_REVISION(6, 1) void slot61() {}
signals:
void signal1();
Q_REVISION(5) void signal2();
+ Q_REVISION(6, 2) void signal62();
public slots Q_REVISION(6):
void slot3() {}
void slot4() {}
+public slots Q_REVISION(5, 12):
+ void slot512() {}
+
signals Q_REVISION(7):
void signal3();
void signal4();
+
+signals Q_REVISION(5, 15):
+ void signal515();
};
// If changed, update VersionTest above
@@ -1948,12 +1940,14 @@ class VersionTestNotify : public QObject
Q_OBJECT
Q_PROPERTY(int prop1 READ foo NOTIFY fooChanged)
Q_PROPERTY(int prop2 READ foo REVISION 2)
+ Q_PROPERTY(int prop514 READ foo REVISION(5, 14))
public:
int foo() const { return 0; }
Q_INVOKABLE void method1() {}
Q_INVOKABLE Q_REVISION(4) void method2() {}
+ Q_INVOKABLE Q_REVISION(6, 0) void method60() {}
enum TestEnum { One, Two };
Q_ENUM(TestEnum);
@@ -1961,19 +1955,27 @@ public:
public slots:
void slot1() {}
Q_REVISION(3) void slot2() {}
+ Q_REVISION(6, 1) void slot61() {}
signals:
void fooChanged();
void signal1();
Q_REVISION(5) void signal2();
+ Q_REVISION(6, 2) void signal62();
public slots Q_REVISION(6):
void slot3() {}
void slot4() {}
+public slots Q_REVISION(5, 12):
+ void slot512() {}
+
signals Q_REVISION(7):
void signal3();
void signal4();
+
+signals Q_REVISION(5, 15):
+ void signal515();
};
template <class T>
@@ -1982,32 +1984,58 @@ void tst_Moc::revisions_T()
int idx = T::staticMetaObject.indexOfProperty("prop1");
QCOMPARE(T::staticMetaObject.property(idx).revision(), 0);
idx = T::staticMetaObject.indexOfProperty("prop2");
- QCOMPARE(T::staticMetaObject.property(idx).revision(), 2);
+ QCOMPARE(T::staticMetaObject.property(idx).revision(),
+ QTypeRevision::fromMinorVersion(2).toEncodedVersion<int>());
+ idx = T::staticMetaObject.indexOfProperty("prop514");
+ QCOMPARE(T::staticMetaObject.property(idx).revision(),
+ QTypeRevision::fromVersion(5, 14).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfMethod("method1()");
QCOMPARE(T::staticMetaObject.method(idx).revision(), 0);
idx = T::staticMetaObject.indexOfMethod("method2()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 4);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(4).toEncodedVersion<int>());
+ idx = T::staticMetaObject.indexOfMethod("method60()");
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromVersion(6, 0).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfSlot("slot1()");
QCOMPARE(T::staticMetaObject.method(idx).revision(), 0);
idx = T::staticMetaObject.indexOfSlot("slot2()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 3);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(3).toEncodedVersion<int>());
+ idx = T::staticMetaObject.indexOfSlot("slot61()");
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromVersion(6, 1).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfSlot("slot3()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 6);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(6).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfSlot("slot4()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 6);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(6).toEncodedVersion<int>());
+ idx = T::staticMetaObject.indexOfSlot("slot512()");
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromVersion(5, 12).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfSignal("signal1()");
QCOMPARE(T::staticMetaObject.method(idx).revision(), 0);
idx = T::staticMetaObject.indexOfSignal("signal2()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 5);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(5).toEncodedVersion<int>());
+ idx = T::staticMetaObject.indexOfSignal("signal62()");
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromVersion(6, 2).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfSignal("signal3()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 7);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(7).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfSignal("signal4()");
- QCOMPARE(T::staticMetaObject.method(idx).revision(), 7);
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromMinorVersion(7).toEncodedVersion<int>());
+ idx = T::staticMetaObject.indexOfSignal("signal515()");
+ QCOMPARE(T::staticMetaObject.method(idx).revision(),
+ QTypeRevision::fromVersion(5, 15).toEncodedVersion<int>());
idx = T::staticMetaObject.indexOfEnumerator("TestEnum");
QCOMPARE(T::staticMetaObject.enumerator(idx).keyCount(), 2);
@@ -3917,7 +3945,7 @@ void tst_Moc::testQNamespace()
EnumFromNamespaceClass obj;
const QVariant prop = obj.property("prop");
- QCOMPARE(prop.type(), QMetaType::Int);
+ QCOMPARE(prop.userType(), QMetaType::fromType<FooNamespace::Enum1>().id());
QCOMPARE(prop.toInt(), int(FooNamespace::Enum1::Key2));
}
@@ -4026,6 +4054,29 @@ void tst_Moc::mocJsonOutput()
QVERIFY2(actualOutput == expectedOutput, showPotentialDiff(actualOutput, expectedOutput).constData());
}
+void TestFwdProperties::setProp1(const FwdClass1 &v)
+{
+ prop1.reset(new FwdClass1(v));
+}
+void TestFwdProperties::setProp2(const FwdClass2 &v)
+{
+ prop2.reset(new FwdClass2(v));
+}
+void TestFwdProperties::setProp3(const FwdClass3 &v)
+{
+ prop3.reset(new FwdClass3(v));
+}
+TestFwdProperties::~TestFwdProperties() {}
+
+Q_DECLARE_METATYPE(FwdClass1);
+
+void tst_Moc::mocInclude()
+{
+ TestFwdProperties obj;
+ obj.setProperty("prop1", QVariant::fromValue(FwdClass1 { 45 }));
+ QCOMPARE(obj.prop1->x, 45);
+}
+
class RequiredTest :public QObject
{
Q_OBJECT
diff --git a/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt
new file mode 100644
index 0000000000..eaceac37b3
--- /dev/null
+++ b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qdbuscpp2xml.pro.
+
+#####################################################################
+## tst_qdbuscpp2xml Test:
+#####################################################################
+
+add_qt_test(tst_qdbuscpp2xml
+ SOURCES
+ test1.h
+ tst_qdbuscpp2xml.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
+
+# Resources:
+set(qdbuscpp2xml_resource_files
+ "test1.h"
+)
+
+add_qt_resource(tst_qdbuscpp2xml "qdbuscpp2xml"
+ PREFIX
+ "/tst_qdbuscpp2xml/"
+ FILES
+ ${qdbuscpp2xml_resource_files}
+)
+
diff --git a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt
new file mode 100644
index 0000000000..8095421637
--- /dev/null
+++ b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qdbusxml2cpp.pro.
+
+#####################################################################
+## tst_qdbusxml2cpp Test:
+#####################################################################
+
+add_qt_test(tst_qdbusxml2cpp
+ SOURCES
+ tst_qdbusxml2cpp.cpp
+)
diff --git a/tests/auto/tools/qmake/.prev_CMakeLists.txt b/tests/auto/tools/qmake/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c1367ec18f
--- /dev/null
+++ b/tests/auto/tools/qmake/.prev_CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from qmake.pro.
+
+#####################################################################
+## tst_qmake Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ testdata/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qmake
+ SOURCES
+ testcompiler.cpp testcompiler.h
+ tst_qmake.cpp
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qmake.pro:WIN32:
+# testcase.timeout = "900"
+
+extend_target(tst_qmake CONDITION CMAKE_CROSSCOMPILING
+ DEFINES
+ QMAKE_CROSS_COMPILED
+)
+
+extend_target(tst_qmake CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND debug_and_release
+ DEFINES
+ DEBUG_BUILD
+)
+
+extend_target(tst_qmake CONDITION debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug
+ DEFINES
+ RELEASE_BUILD
+)
diff --git a/tests/auto/tools/qmake/CMakeLists.txt b/tests/auto/tools/qmake/CMakeLists.txt
new file mode 100644
index 0000000000..994d5d47d1
--- /dev/null
+++ b/tests/auto/tools/qmake/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from qmake.pro.
+
+#####################################################################
+## tst_qmake Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ testdata/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qmake
+ SOURCES
+ testcompiler.cpp testcompiler.h
+ tst_qmake.cpp
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qmake.pro:WIN32:
+# testcase.timeout = "900"
+
+extend_target(tst_qmake CONDITION CMAKE_CROSSCOMPILING
+ DEFINES
+ QMAKE_CROSS_COMPILED
+)
+
+# special case begin
+# remove this because it's not needed
+#extend_target(tst_qmake CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND debug_and_release
+ #DEFINES
+ #DEBUG_BUILD
+#)
+
+#extend_target(tst_qmake CONDITION debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug
+ #DEFINES
+ #RELEASE_BUILD
+#)
+# special case end
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index 9b434a7b5b..7f98a0f5a0 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -318,6 +318,9 @@ void tst_qmake::subdirs()
void tst_qmake::subdir_via_pro_file_extra_target()
{
+ if (QProcessEnvironment::systemEnvironment().contains(QStringLiteral("QT_TEST_RUNNING_IN_CTEST")))
+ QSKIP("This test does not run properly when invoked from CTest.");
+
QString workDir = base_path + "/testdata/subdir_via_pro_file_extra_target";
QDir D;
diff --git a/tests/auto/tools/qmakelib/CMakeLists.txt b/tests/auto/tools/qmakelib/CMakeLists.txt
new file mode 100644
index 0000000000..1e56c81e77
--- /dev/null
+++ b/tests/auto/tools/qmakelib/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from qmakelib.pro.
+
+#####################################################################
+## tst_qmakelib Test:
+#####################################################################
+
+add_qt_test(tst_qmakelib
+ SOURCES
+ ../../../../qmake/library/ioutils.cpp
+ ../../../../qmake/library/proitems.cpp
+ ../../../../qmake/library/qmakebuiltins.cpp
+ ../../../../qmake/library/qmakeevaluator.cpp
+ ../../../../qmake/library/qmakeglobals.cpp
+ ../../../../qmake/library/qmakeparser.cpp
+ ../../../../qmake/library/qmakevfs.cpp
+ ../../../../qmake/library/registry.cpp
+ evaltest.cpp
+ parsertest.cpp
+ tst_qmakelib.cpp tst_qmakelib.h
+ DEFINES
+ PROEVALUATOR_FULL
+ PROEVALUATOR_SETENV
+ PROPARSER_DEBUG
+ INCLUDE_DIRECTORIES
+ ../../../../qmake/library
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmakelib CONDITION WIN32
+ PUBLIC_LIBRARIES
+ advapi32
+)
diff --git a/tests/auto/tools/uic/CMakeLists.txt b/tests/auto/tools/uic/CMakeLists.txt
new file mode 100644
index 0000000000..f7d91dccbe
--- /dev/null
+++ b/tests/auto/tools/uic/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from uic.pro.
+
+#####################################################################
+## tst_uic Test:
+#####################################################################
+
+add_qt_test(tst_uic
+ SOURCES
+ tst_uic.cpp
+)
diff --git a/tests/auto/widgets/CMakeLists.txt b/tests/auto/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..5870f28db0
--- /dev/null
+++ b/tests/auto/widgets/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from widgets.pro.
+
+add_subdirectory(dialogs)
+add_subdirectory(effects)
+add_subdirectory(graphicsview)
+add_subdirectory(itemviews)
+add_subdirectory(kernel)
+add_subdirectory(styles)
+add_subdirectory(util)
+add_subdirectory(widgets)
diff --git a/tests/auto/widgets/dialogs/CMakeLists.txt b/tests/auto/widgets/dialogs/CMakeLists.txt
new file mode 100644
index 0000000000..508093e7ad
--- /dev/null
+++ b/tests/auto/widgets/dialogs/CMakeLists.txt
@@ -0,0 +1,19 @@
+add_subdirectory(qcolordialog)
+add_subdirectory(qdialog)
+add_subdirectory(qerrormessage)
+if (NOT WINRT)
+ add_subdirectory(qfiledialog)
+ add_subdirectory(qfiledialog2)
+ add_subdirectory(qmessagebox)
+endif()
+if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR NOT WIN32)
+ add_subdirectory(qfilesystemmodel)
+endif()
+add_subdirectory(qfontdialog)
+add_subdirectory(qinputdialog)
+add_subdirectory(qprogressdialog)
+if (QT_FEATURE_private_tests)
+ add_subdirectory(qsidebar)
+endif()
+add_subdirectory(qwizard)
+
diff --git a/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt
new file mode 100644
index 0000000000..81ffdeff90
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qcolordialog.pro.
+
+#####################################################################
+## tst_qcolordialog Test:
+#####################################################################
+
+add_qt_test(tst_qcolordialog
+ SOURCES
+ tst_qcolordialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt
new file mode 100644
index 0000000000..2c003f6fb6
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qdialog.pro.
+
+#####################################################################
+## tst_qdialog Test:
+#####################################################################
+
+add_qt_test(tst_qdialog
+ SOURCES
+ tst_qdialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt b/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt
new file mode 100644
index 0000000000..9463020c66
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qerrormessage.pro.
+
+#####################################################################
+## tst_qerrormessage Test:
+#####################################################################
+
+add_qt_test(tst_qerrormessage
+ SOURCES
+ tst_qerrormessage.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qerrormessage.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt
new file mode 100644
index 0000000000..7b6d004776
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qfiledialog.pro.
+
+#####################################################################
+## tst_qfiledialog Test:
+#####################################################################
+
+add_qt_test(tst_qfiledialog
+ SOURCES
+ tst_qfiledialog.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt
new file mode 100644
index 0000000000..2fb610a784
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qfiledialog2.pro.
+
+#####################################################################
+## tst_qfiledialog2 Test:
+#####################################################################
+
+add_qt_test(tst_qfiledialog2
+ SOURCES
+ tst_qfiledialog2.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt b/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt
new file mode 100644
index 0000000000..38c0547390
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qfilesystemmodel.pro.
+
+#####################################################################
+## tst_qfilesystemmodel Test:
+#####################################################################
+
+add_qt_test(tst_qfilesystemmodel
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qfilesystemmodel.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 2:.:.:qfilesystemmodel.pro:WIN32:
+# testcase.timeout = "900"
+
+#### Keys ignored in scope 3:.:.:qfilesystemmodel.pro:APPLE_OSX:
+# testcase.timeout = "900"
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 2c0b3f2bcb..63bf103725 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -1071,7 +1071,7 @@ void tst_QFileSystemModel::roleNames()
QVERIFY(roles.contains(role));
QFETCH(QByteArray, roleName);
- QCOMPARE(roles.values(role).count(), 1);
+ QCOMPARE(roles.contains(role), true);
QCOMPARE(roles.value(role), roleName);
}
diff --git a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt
new file mode 100644
index 0000000000..af858c8946
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from qfontdialog.pro.
+
+#####################################################################
+## tst_qfontdialog Test:
+#####################################################################
+
+add_qt_test(tst_qfontdialog
+ SOURCES
+ tst_qfontdialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+# Resources:
+set_source_files_properties("../../../shared/resources/test.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "test.ttf"
+)
+set_source_files_properties("../../../shared/resources/testfont.ttf"
+ PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf"
+)
+set(testfonts_resource_files
+ "../../../shared/resources/test.ttf"
+ "../../../shared/resources/testfont.ttf"
+)
+
+add_qt_resource(tst_qfontdialog "testfonts"
+ PREFIX
+ "/"
+ FILES
+ ${testfonts_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt
new file mode 100644
index 0000000000..7cd02a04c0
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qinputdialog.pro.
+
+#####################################################################
+## tst_qinputdialog Test:
+#####################################################################
+
+add_qt_test(tst_qinputdialog
+ SOURCES
+ tst_qinputdialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt b/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt
new file mode 100644
index 0000000000..ae12c58ca2
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qmessagebox.pro.
+
+#####################################################################
+## tst_qmessagebox Test:
+#####################################################################
+
+add_qt_test(tst_qmessagebox
+ SOURCES
+ tst_qmessagebox.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qmessagebox.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt
new file mode 100644
index 0000000000..2f20ff0d81
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qprogressdialog.pro.
+
+#####################################################################
+## tst_qprogressdialog Test:
+#####################################################################
+
+add_qt_test(tst_qprogressdialog
+ SOURCES
+ tst_qprogressdialog.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt b/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt
new file mode 100644
index 0000000000..d1e2a6686c
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsidebar.pro.
+
+#####################################################################
+## tst_qsidebar Test:
+#####################################################################
+
+add_qt_test(tst_qsidebar
+ SOURCES
+ tst_qsidebar.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt b/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt
new file mode 100644
index 0000000000..bbe7bddd9d
--- /dev/null
+++ b/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from qwizard.pro.
+
+#####################################################################
+## tst_qwizard Test:
+#####################################################################
+
+add_qt_test(tst_qwizard
+ SOURCES
+ tst_qwizard.cpp
+ tst_qwizard_2.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+# Resources:
+set(qwizard_resource_files
+ "images/background.png"
+ "images/banner.png"
+ "images/logo.png"
+ "images/watermark.png"
+)
+
+add_qt_resource(tst_qwizard "qwizard"
+ PREFIX
+ "/"
+ FILES
+ ${qwizard_resource_files}
+)
+
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index 9ae4508bc1..dae274a8b6 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -96,8 +96,9 @@ private slots:
void task248107_backButton();
void task255350_fieldObjectDestroyed();
void taskQTBUG_25691_fieldObjectDestroyed2();
+#if QT_CONFIG(shortcut)
void taskQTBUG_46894_nextButtonShortcut();
-
+#endif
/*
Things that could be added:
@@ -2703,6 +2704,8 @@ void tst_QWizard::taskQTBUG_25691_fieldObjectDestroyed2()
::taskQTBUG_25691_fieldObjectDestroyed2();
}
+#if QT_CONFIG(shortcut)
+
void tst_QWizard::taskQTBUG_46894_nextButtonShortcut()
{
for (int i = 0; i < QWizard::NStyles; ++i) {
@@ -2717,5 +2720,7 @@ void tst_QWizard::taskQTBUG_46894_nextButtonShortcut()
}
}
+#endif // QT_CONFIG(shortcut)
+
QTEST_MAIN(tst_QWizard)
#include "tst_qwizard.moc"
diff --git a/tests/auto/widgets/effects/CMakeLists.txt b/tests/auto/widgets/effects/CMakeLists.txt
new file mode 100644
index 0000000000..2e2045e33e
--- /dev/null
+++ b/tests/auto/widgets/effects/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(qgraphicseffect)
+add_subdirectory(qpixmapfilter)
diff --git a/tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt b/tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt
new file mode 100644
index 0000000000..4cdeb6b4e5
--- /dev/null
+++ b/tests/auto/widgets/effects/qgraphicseffect/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qgraphicseffect.pro.
+
+#####################################################################
+## tst_qgraphicseffect Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicseffect
+ SOURCES
+ tst_qgraphicseffect.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt b/tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt
new file mode 100644
index 0000000000..6ffd2c4029
--- /dev/null
+++ b/tests/auto/widgets/effects/qpixmapfilter/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qpixmapfilter.pro.
+
+#####################################################################
+## tst_qpixmapfilter Test:
+#####################################################################
+
+add_qt_test(tst_qpixmapfilter
+ SOURCES
+ tst_qpixmapfilter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/graphicsview/CMakeLists.txt b/tests/auto/widgets/graphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..1f638bd806
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from graphicsview.pro.
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qgraphicsanchorlayout)
+ add_subdirectory(qgraphicsanchorlayout1)
+ add_subdirectory(qgraphicsitem)
+ add_subdirectory(qgraphicsscene)
+ add_subdirectory(qgraphicssceneindex)
+endif()
+add_subdirectory(qgraphicseffectsource)
+add_subdirectory(qgraphicsgridlayout)
+add_subdirectory(qgraphicsitemanimation)
+add_subdirectory(qgraphicslayout)
+add_subdirectory(qgraphicslayoutitem)
+add_subdirectory(qgraphicslinearlayout)
+add_subdirectory(qgraphicsobject)
+add_subdirectory(qgraphicspixmapitem)
+add_subdirectory(qgraphicspolygonitem)
+add_subdirectory(qgraphicstransform)
+if(QT_FEATURE_style_fusion)
+ add_subdirectory(qgraphicsproxywidget)
+ add_subdirectory(qgraphicswidget)
+endif()
+if(NOT WINRT)
+ add_subdirectory(qgraphicsview)
+endif()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt
new file mode 100644
index 0000000000..db323fcb15
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qgraphicsanchorlayout.pro.
+
+#####################################################################
+## tst_qgraphicsanchorlayout Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsanchorlayout
+ SOURCES
+ tst_qgraphicsanchorlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt
new file mode 100644
index 0000000000..9d9fc68832
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qgraphicsanchorlayout1.pro.
+
+#####################################################################
+## tst_qgraphicsanchorlayout1 Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsanchorlayout1
+ SOURCES
+ tst_qgraphicsanchorlayout1.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt
new file mode 100644
index 0000000000..ac1ac91f8b
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qgraphicseffectsource.pro.
+
+#####################################################################
+## tst_qgraphicseffectsource Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicseffectsource
+ SOURCES
+ tst_qgraphicseffectsource.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt
new file mode 100644
index 0000000000..c02f142182
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgraphicsgridlayout.pro.
+
+#####################################################################
+## tst_qgraphicsgridlayout Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsgridlayout
+ SOURCES
+ tst_qgraphicsgridlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt
new file mode 100644
index 0000000000..1be66372b6
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qgraphicsitem.pro.
+
+#####################################################################
+## tst_qgraphicsitem Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsitem
+ SOURCES
+ tst_qgraphicsitem.cpp
+ DEFINES
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qgraphicsitem CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index 5b11cd5d11..4206ce1f87 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -450,7 +450,9 @@ private slots:
void modality_keyEvents();
void itemIsInFront();
void scenePosChange();
+#if QT_CONFIG(shortcut)
void textItem_shortcuts();
+#endif
void scroll();
void focusHandling_data();
void focusHandling();
@@ -10811,6 +10813,8 @@ void tst_QGraphicsItem::scenePosChange()
QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0);
}
+#if QT_CONFIG(shortcut)
+
void tst_QGraphicsItem::textItem_shortcuts()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
@@ -10850,6 +10854,8 @@ void tst_QGraphicsItem::textItem_shortcuts()
QTRY_COMPARE(item->textCursor().selectedText(), item->toPlainText());
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QGraphicsItem::scroll()
{
// Create two overlapping rectangles in the scene:
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt
new file mode 100644
index 0000000000..179b6c8497
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qgraphicsitemanimation.pro.
+
+#####################################################################
+## tst_qgraphicsitemanimation Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsitemanimation
+ SOURCES
+ tst_qgraphicsitemanimation.cpp
+ DEFINES
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt
new file mode 100644
index 0000000000..9a149f9df1
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicslayout/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qgraphicslayout.pro.
+
+#####################################################################
+## tst_qgraphicslayout Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicslayout
+ SOURCES
+ tst_qgraphicslayout.cpp
+ DEFINES
+ QT_USE_USING_NAMESPACE
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt
new file mode 100644
index 0000000000..56b9f73127
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgraphicslayoutitem.pro.
+
+#####################################################################
+## tst_qgraphicslayoutitem Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicslayoutitem
+ SOURCES
+ tst_qgraphicslayoutitem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt
new file mode 100644
index 0000000000..1a44be75a1
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgraphicslinearlayout.pro.
+
+#####################################################################
+## tst_qgraphicslinearlayout Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicslinearlayout
+ SOURCES
+ tst_qgraphicslinearlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt
new file mode 100644
index 0000000000..0e29191792
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsobject/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qgraphicsobject.pro.
+
+#####################################################################
+## tst_qgraphicsobject Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsobject
+ SOURCES
+ tst_qgraphicsobject.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt
new file mode 100644
index 0000000000..cca35623e8
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgraphicspixmapitem.pro.
+
+#####################################################################
+## tst_qgraphicspixmapitem Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicspixmapitem
+ SOURCES
+ tst_qgraphicspixmapitem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt
new file mode 100644
index 0000000000..86c6965756
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgraphicspolygonitem.pro.
+
+#####################################################################
+## tst_qgraphicspolygonitem Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicspolygonitem
+ SOURCES
+ tst_qgraphicspolygonitem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt
new file mode 100644
index 0000000000..accec5ff40
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qgraphicsproxywidget.pro.
+
+#####################################################################
+## tst_qgraphicsproxywidget Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsproxywidget
+ SOURCES
+ tst_qgraphicsproxywidget.cpp
+ DEFINES
+ QTEST_QPA_MOUSE_HANDLING
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
new file mode 100644
index 0000000000..c566b6c1bf
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
@@ -0,0 +1,77 @@
+# Generated from qgraphicsscene.pro.
+
+#####################################################################
+## tst_qgraphicsscene Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsscene
+ SOURCES
+ tst_qgraphicsscene.cpp
+ DEFINES
+ QT_NO_CAST_TO_ASCII
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+# Resources:
+set(images_resource_files
+ "Ash_European.jpg"
+)
+
+add_qt_resource(tst_qgraphicsscene "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+set(testdata_resource_files
+ "testData/render/all-all-45-deg-left.png"
+ "testData/render/all-all-45-deg-right.png"
+ "testData/render/all-all-scale-2x.png"
+ "testData/render/all-all-translate-0-50.png"
+ "testData/render/all-all-translate-50-0.png"
+ "testData/render/all-all-untransformed-clip-ellipse.png"
+ "testData/render/all-all-untransformed-clip-rect.png"
+ "testData/render/all-all-untransformed.png"
+ "testData/render/all-bottomleft-untransformed.png"
+ "testData/render/all-bottomright-untransformed.png"
+ "testData/render/all-topleft-untransformed.png"
+ "testData/render/all-topright-untransformed.png"
+ "testData/render/bottom-bottomright-untransformed.png"
+ "testData/render/bottom-topleft-untransformed.png"
+ "testData/render/bottomleft-all-untransformed.png"
+ "testData/render/bottomleft-topleft-untransformed.png"
+ "testData/render/bottomright-all-untransformed.png"
+ "testData/render/bottomright-topleft-untransformed.png"
+ "testData/render/left-bottomright-untransformed.png"
+ "testData/render/left-topleft-untransformed.png"
+ "testData/render/right-bottomright-untransformed.png"
+ "testData/render/right-topleft-untransformed.png"
+ "testData/render/top-bottomright-untransformed.png"
+ "testData/render/top-topleft-untransformed.png"
+ "testData/render/topleft-all-untransformed.png"
+ "testData/render/topleft-topleft-untransformed.png"
+ "testData/render/topright-all-untransformed.png"
+ "testData/render/topright-topleft-untransformed.png"
+)
+
+add_qt_resource(tst_qgraphicsscene "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+)
+
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qgraphicsscene CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt
new file mode 100644
index 0000000000..5fa72f7b46
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from qgraphicssceneindex.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qgraphicssceneindex Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicssceneindex
+ SOURCES
+ tst_qgraphicssceneindex.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicssceneindex.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt
new file mode 100644
index 0000000000..450c0269f3
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicstransform/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgraphicstransform.pro.
+
+#####################################################################
+## tst_qgraphicstransform Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicstransform
+ SOURCES
+ tst_qgraphicstransform.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..48064c2bf4
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from qgraphicsview.pro.
+
+#####################################################################
+## tst_qgraphicsview Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicsview
+ SOURCES
+ tst_qgraphicsview.cpp tst_qgraphicsview.h
+ tst_qgraphicsview_2.cpp
+ DEFINES
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicsview.pro:<TRUE>:
+# testcase.timeout = "500"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qgraphicsview CONDITION QT_FEATURE_opengl
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+ Qt::OpenGLWidgets
+)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
index 8ed19697a4..13998d5494 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
@@ -4,6 +4,7 @@ TARGET = tst_qgraphicsview
QT += widgets widgets-private testlib
QT += core-private gui-private testlib-private
+qtConfig(opengl): QT += opengl openglwidgets
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
HEADERS += tst_qgraphicsview.h
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index acf6ce1c68..98833776cc 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -48,8 +48,8 @@
#include <QtWidgets/QBoxLayout>
#include <QtWidgets/QStyle>
#include <QtWidgets/QPushButton>
-#ifndef QT_NO_OPENGL
-#include <QtWidgets/QOpenGLWidget>
+#if QT_CONFIG(opengl)
+#include <QtOpenGLWidgets/QOpenGLWidget>
#endif
#include <private/qgraphicsscene_p.h>
#include <private/qgraphicsview_p.h>
@@ -154,7 +154,7 @@ private slots:
void sceneRect_growing();
void setSceneRect();
void viewport();
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
void openGLViewport();
#endif
void dragMode_scrollHand();
@@ -659,7 +659,7 @@ void tst_QGraphicsView::viewport()
QVERIFY(QTest::qWaitForWindowExposed(&view));
}
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
void tst_QGraphicsView::openGLViewport()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt
new file mode 100644
index 0000000000..7325f7eb21
--- /dev/null
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qgraphicswidget.pro.
+
+#####################################################################
+## tst_qgraphicswidget Test:
+#####################################################################
+
+add_qt_test(tst_qgraphicswidget
+ SOURCES
+ tst_qgraphicswidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/itemviews/CMakeLists.txt b/tests/auto/widgets/itemviews/CMakeLists.txt
new file mode 100644
index 0000000000..e7dc78b18c
--- /dev/null
+++ b/tests/auto/widgets/itemviews/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from itemviews.pro.
+
+add_subdirectory(qabstractitemview)
+add_subdirectory(qdatawidgetmapper)
+add_subdirectory(qdirmodel)
+add_subdirectory(qfileiconprovider)
+add_subdirectory(qheaderview)
+add_subdirectory(qitemdelegate)
+add_subdirectory(qitemeditorfactory)
+add_subdirectory(qitemview)
+add_subdirectory(qlistview)
+add_subdirectory(qtableview)
+add_subdirectory(qtablewidget)
+add_subdirectory(qtreeview)
+add_subdirectory(qtreewidget)
+add_subdirectory(qtreewidgetitemiterator)
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qcolumnview)
+ add_subdirectory(qlistwidget)
+endif()
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt b/tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt
new file mode 100644
index 0000000000..520a0b4b98
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qabstractitemview/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qabstractitemview.pro.
+
+#####################################################################
+## tst_qabstractitemview Test:
+#####################################################################
+
+add_qt_test(tst_qabstractitemview
+ SOURCES
+ tst_qabstractitemview.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt b/tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt
new file mode 100644
index 0000000000..d33e3b9c2e
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qcolumnview/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qcolumnview.pro.
+
+#####################################################################
+## tst_qcolumnview Test:
+#####################################################################
+
+add_qt_test(tst_qcolumnview
+ SOURCES
+ ../../../../shared/fakedirmodel.h
+ tst_qcolumnview.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt b/tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt
new file mode 100644
index 0000000000..f3e4af0c23
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qdatawidgetmapper/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdatawidgetmapper.pro.
+
+#####################################################################
+## tst_qdatawidgetmapper Test:
+#####################################################################
+
+add_qt_test(tst_qdatawidgetmapper
+ SOURCES
+ tst_qdatawidgetmapper.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt b/tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt
new file mode 100644
index 0000000000..d47cc3457d
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qdirmodel/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from qdirmodel.pro.
+
+#####################################################################
+## tst_qdirmodel Test:
+#####################################################################
+
+add_qt_test(tst_qdirmodel
+ SOURCES
+ ../../../../shared/emulationdetector.h
+ tst_qdirmodel.cpp
+ INCLUDE_DIRECTORIES
+ ../../../../shared
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qdirmodel CONDITION ANDROID
+ DEFINES
+ SRCDIR=\\\"./\\\"
+)
+
+extend_target(tst_qdirmodel CONDITION NOT ANDROID
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+)
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(testdata_resource_files
+ "dirtest/test1/dummy"
+ "dirtest/test1/test"
+ "test/file01.tst"
+ "test/file02.tst"
+ "test/file03.tst"
+ "test/file04.tst"
+ "tst_qdirmodel.cpp"
+ )
+
+ add_qt_resource(tst_qdirmodel "testdata"
+ PREFIX
+ "/android_testdata"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index 546b2ab3a8..925c578300 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -713,7 +713,7 @@ void tst_QDirModel::roleNames()
QVERIFY(roles.contains(role));
QFETCH(QByteArray, roleName);
- QCOMPARE(roles.values(role).count(), 1);
+ QCOMPARE(roles.contains(role), true);
QCOMPARE(roles.value(role), roleName);
}
diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt b/tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt
new file mode 100644
index 0000000000..024519ad9c
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qfileiconprovider/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qfileiconprovider.pro.
+
+#####################################################################
+## tst_qfileiconprovider Test:
+#####################################################################
+
+add_qt_test(tst_qfileiconprovider
+ SOURCES
+ tst_qfileiconprovider.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt
new file mode 100644
index 0000000000..8949ac4957
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qheaderview/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qheaderview.pro.
+
+#####################################################################
+## tst_qheaderview Test:
+#####################################################################
+
+add_qt_test(tst_qheaderview
+ SOURCES
+ tst_qheaderview.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index d5813d64ff..bb098f32c2 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -1744,7 +1744,7 @@ void tst_QHeaderView::restoreQt4State()
QCOMPARE(h2.length(), old_length);
QCOMPARE(h2.saveState(), old_state);
#else
- QSKIP("Qt4 compatibility no longer needed in Qt6")
+ QSKIP("Qt4 compatibility no longer needed in Qt6");
#endif
}
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt
new file mode 100644
index 0000000000..af1bac9ff0
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qitemdelegate.pro.
+
+#####################################################################
+## tst_qitemdelegate Test:
+#####################################################################
+
+add_qt_test(tst_qitemdelegate
+ SOURCES
+ tst_qitemdelegate.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qitemdelegate CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt
new file mode 100644
index 0000000000..4dfb46ff4d
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qitemeditorfactory/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qitemeditorfactory.pro.
+
+#####################################################################
+## tst_qitemeditorfactory Test:
+#####################################################################
+
+add_qt_test(tst_qitemeditorfactory
+ SOURCES
+ tst_qitemeditorfactory.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qitemview/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemview/CMakeLists.txt
new file mode 100644
index 0000000000..b27f456246
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qitemview/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qitemview.pro.
+
+#####################################################################
+## tst_qitemview Test:
+#####################################################################
+
+add_qt_test(tst_qitemview
+ SOURCES
+ tst_qitemview.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt b/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt
new file mode 100644
index 0000000000..07c290128e
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qlistview.pro.
+
+#####################################################################
+## tst_qlistview Test:
+#####################################################################
+
+add_qt_test(tst_qlistview
+ SOURCES
+ tst_qlistview.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qlistview CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt b/tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt
new file mode 100644
index 0000000000..aebcb4c49e
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qlistwidget/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qlistwidget.pro.
+
+#####################################################################
+## tst_qlistwidget Test:
+#####################################################################
+
+add_qt_test(tst_qlistwidget
+ SOURCES
+ tst_qlistwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/itemviews/qtableview/CMakeLists.txt b/tests/auto/widgets/itemviews/qtableview/CMakeLists.txt
new file mode 100644
index 0000000000..20e50d2de3
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qtableview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtableview.pro.
+
+#####################################################################
+## tst_qtableview Test:
+#####################################################################
+
+add_qt_test(tst_qtableview
+ SOURCES
+ tst_qtableview.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index ea3eb5fd0c..544069243f 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -331,8 +331,10 @@ private slots:
void selectColumn_data();
void selectColumn();
+#if QT_CONFIG(shortcut)
void selectall_data();
void selectall();
+#endif
void visualRect_data();
void visualRect();
@@ -1843,6 +1845,8 @@ void tst_QTableView::selectColumn()
QCOMPARE(view.selectionModel()->selectedIndexes().at(i).column(), column);
}
+#if QT_CONFIG(shortcut)
+
void tst_QTableView::selectall_data()
{
QTest::addColumn<int>("rowCount");
@@ -1999,6 +2003,8 @@ void tst_QTableView::selectall()
QCOMPARE(view.selectedIndexes().count(), 0);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QTableView::visualRect_data()
{
QTest::addColumn<int>("rowCount");
diff --git a/tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt b/tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt
new file mode 100644
index 0000000000..66344e9d32
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qtablewidget/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtablewidget.pro.
+
+#####################################################################
+## tst_qtablewidget Test:
+#####################################################################
+
+add_qt_test(tst_qtablewidget
+ SOURCES
+ tst_qtablewidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt b/tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt
new file mode 100644
index 0000000000..40a6a1a6d6
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qtreeview/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qtreeview.pro.
+
+#####################################################################
+## tst_qtreeview Test:
+#####################################################################
+
+add_qt_test(tst_qtreeview
+ SOURCES
+ ../../../../shared/fakedirmodel.h
+ tst_qtreeview.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt b/tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt
new file mode 100644
index 0000000000..dde2e9d4ab
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qtreewidget/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtreewidget.pro.
+
+#####################################################################
+## tst_qtreewidget Test:
+#####################################################################
+
+add_qt_test(tst_qtreewidget
+ SOURCES
+ tst_qtreewidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt
new file mode 100644
index 0000000000..65ac8cda8b
--- /dev/null
+++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtreewidgetitemiterator.pro.
+
+#####################################################################
+## tst_qtreewidgetitemiterator Test:
+#####################################################################
+
+add_qt_test(tst_qtreewidgetitemiterator
+ SOURCES
+ tst_qtreewidgetitemiterator.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/CMakeLists.txt b/tests/auto/widgets/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..51759264b2
--- /dev/null
+++ b/tests/auto/widgets/kernel/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qaction)
+add_subdirectory(qactiongroup)
+add_subdirectory(qapplication)
+add_subdirectory(qboxlayout)
+add_subdirectory(qdesktopwidget)
+add_subdirectory(qformlayout)
+add_subdirectory(qgridlayout)
+add_subdirectory(qlayout)
+add_subdirectory(qstackedlayout)
+add_subdirectory(qtooltip)
+add_subdirectory(qwidget)
+add_subdirectory(qwidget_window)
+add_subdirectory(qwidgetaction)
+add_subdirectory(qwidgetmetatype)
+add_subdirectory(qwidgetsvariant)
+add_subdirectory(qwindowcontainer)
+add_subdirectory(qshortcut)
+add_subdirectory(qsizepolicy)
+if(NOT APPLE)
+ add_subdirectory(qgesturerecognizer)
+endif()
diff --git a/tests/auto/widgets/kernel/kernel.pro b/tests/auto/widgets/kernel/kernel.pro
index af85a2bd13..c66c1822b2 100644
--- a/tests/auto/widgets/kernel/kernel.pro
+++ b/tests/auto/widgets/kernel/kernel.pro
@@ -1,7 +1,5 @@
TEMPLATE=subdirs
SUBDIRS=\
- qaction \
- qactiongroup \
qapplication \
qboxlayout \
qdesktopwidget \
@@ -13,12 +11,19 @@ SUBDIRS=\
qtooltip \
qwidget \
qwidget_window \
- qwidgetaction \
qwidgetmetatype \
qwidgetsvariant \
qwindowcontainer \
qshortcut \
qsizepolicy
-darwin:SUBDIRS -= \ # Uses native recognizers
+darwin:SUBDIRS -= \
qgesturerecognizer \
+
+qtConfig(action):SUBDIRS += \
+ qaction \
+ qactiongroup \
+ qwidgetaction
+
+!qtConfig(shortcut): SUBDIRS -= \
+ qshortcut
diff --git a/tests/auto/widgets/kernel/qaction/CMakeLists.txt b/tests/auto/widgets/kernel/qaction/CMakeLists.txt
new file mode 100644
index 0000000000..469cc4d597
--- /dev/null
+++ b/tests/auto/widgets/kernel/qaction/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qaction.pro.
+
+#####################################################################
+## tst_qaction Test:
+#####################################################################
+
+add_qt_test(tst_qaction
+ SOURCES
+ tst_qaction.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index 1247f48dd0..cf8539da68 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -50,30 +50,25 @@ public:
private slots:
void init();
void cleanup();
- void getSetCheck();
- void setText_data();
- void setText();
- void setIconText_data() { setText_data(); }
- void setIconText();
void setUnknownFont();
void actionEvent();
- void setStandardKeys();
+#if QT_CONFIG(shortcut)
void alternateShortcuts();
void enabledVisibleInteraction();
- void task200823_tooltip();
- void task229128TriggeredSignalWithoutActiongroup();
+#endif
void task229128TriggeredSignalWhenInActiongroup();
+#if QT_CONFIG(shortcut)
void repeat();
- void setData();
void keysequence(); // QTBUG-53381
void disableShortcutsWithBlockedWidgets_data();
void disableShortcutsWithBlockedWidgets();
void shortcutFromKeyEvent(); // QTBUG-48325
+#endif
private:
QEvent::Type m_lastEventType;
const int m_keyboardScheme;
- QAction *m_lastAction;
+ QGuiAction *m_lastAction;
};
tst_QAction::tst_QAction()
@@ -92,33 +87,6 @@ void tst_QAction::cleanup()
QVERIFY(QApplication::topLevelWidgets().isEmpty());
}
-// Testing get/set functions
-void tst_QAction::getSetCheck()
-{
- QAction obj1(nullptr);
- // QActionGroup * QAction::actionGroup()
- // void QAction::setActionGroup(QActionGroup *)
- QActionGroup *var1 = new QActionGroup(nullptr);
- obj1.setActionGroup(var1);
- QCOMPARE(var1, obj1.actionGroup());
- obj1.setActionGroup(nullptr);
- QCOMPARE(obj1.actionGroup(), nullptr);
- delete var1;
-
- // QMenu * QAction::menu()
- // void QAction::setMenu(QMenu *)
- QMenu *var2 = new QMenu(nullptr);
- obj1.setMenu(var2);
- QCOMPARE(var2, obj1.menu());
- obj1.setMenu(nullptr);
- QCOMPARE(obj1.menu(), nullptr);
- delete var2;
-
- QCOMPARE(obj1.priority(), QAction::NormalPriority);
- obj1.setPriority(QAction::LowPriority);
- QCOMPARE(obj1.priority(), QAction::LowPriority);
-}
-
class MyWidget : public QWidget
{
Q_OBJECT
@@ -133,43 +101,6 @@ private:
tst_QAction *m_test;
};
-void tst_QAction::setText_data()
-{
- QTest::addColumn<QString>("text");
- QTest::addColumn<QString>("iconText");
- QTest::addColumn<QString>("textFromIconText");
-
- //next we fill it with data
- QTest::newRow("Normal") << "Action" << "Action" << "Action";
- QTest::newRow("Ampersand") << "Search && Destroy" << "Search & Destroy" << "Search && Destroy";
- QTest::newRow("Mnemonic and ellipsis") << "O&pen File ..." << "Open File" << "Open File";
-}
-
-void tst_QAction::setText()
-{
- QFETCH(QString, text);
-
- QAction action(nullptr);
- action.setText(text);
-
- QCOMPARE(action.text(), text);
-
- QFETCH(QString, iconText);
- QCOMPARE(action.iconText(), iconText);
-}
-
-void tst_QAction::setIconText()
-{
- QFETCH(QString, iconText);
-
- QAction action(nullptr);
- action.setIconText(iconText);
- QCOMPARE(action.iconText(), iconText);
-
- QFETCH(QString, textFromIconText);
- QCOMPARE(action.text(), textFromIconText);
-}
-
void tst_QAction::setUnknownFont() // QTBUG-42728
{
QAction action(nullptr);
@@ -221,34 +152,7 @@ void tst_QAction::actionEvent()
QCOMPARE(m_lastAction, &a);
}
-//basic testing of standard keys
-void tst_QAction::setStandardKeys()
-{
- QAction act(nullptr);
- act.setShortcut(QKeySequence("CTRL+L"));
- QList<QKeySequence> list;
- act.setShortcuts(list);
- act.setShortcuts(QKeySequence::Copy);
- QCOMPARE(act.shortcut(), act.shortcuts().constFirst());
-
- QList<QKeySequence> expected;
- const QKeySequence ctrlC = QKeySequence(QStringLiteral("CTRL+C"));
- const QKeySequence ctrlInsert = QKeySequence(QStringLiteral("CTRL+INSERT"));
- switch (m_keyboardScheme) {
- case QPlatformTheme::MacKeyboardScheme:
- expected << ctrlC;
- break;
- case QPlatformTheme::WindowsKeyboardScheme:
- expected << ctrlC << ctrlInsert;
- break;
- default: // X11
- expected << ctrlC << ctrlInsert << QKeySequence(QStringLiteral("F16"));
- break;
- }
-
- QCOMPARE(act.shortcuts(), expected);
-}
-
+#if QT_CONFIG(shortcut)
void tst_QAction::alternateShortcuts()
{
@@ -354,38 +258,7 @@ void tst_QAction::enabledVisibleInteraction()
QCOMPARE(spy.count(), 1); //act is visible and enabled, so trigger
}
-void tst_QAction::task200823_tooltip()
-{
- const QScopedPointer<QAction> action(new QAction("foo", nullptr));
- QString shortcut("ctrl+o");
- action->setShortcut(shortcut);
-
- // we want a non-standard tooltip that shows the shortcut
- action->setToolTip(action->text() + QLatin1String(" (") + action->shortcut().toString() + QLatin1Char(')'));
-
- QString ref = QLatin1String("foo (") + QKeySequence(shortcut).toString() + QLatin1Char(')');
- QCOMPARE(action->toolTip(), ref);
-}
-
-void tst_QAction::task229128TriggeredSignalWithoutActiongroup()
-{
- // test without a group
- const QScopedPointer<QAction> actionWithoutGroup(new QAction("Test", nullptr));
- QSignalSpy spyWithoutGroup(actionWithoutGroup.data(), QOverload<bool>::of(&QAction::triggered));
- QCOMPARE(spyWithoutGroup.count(), 0);
- actionWithoutGroup->trigger();
- // signal should be emitted
- QCOMPARE(spyWithoutGroup.count(), 1);
-
- // it is now a checkable checked action
- actionWithoutGroup->setCheckable(true);
- actionWithoutGroup->setChecked(true);
- spyWithoutGroup.clear();
- QCOMPARE(spyWithoutGroup.count(), 0);
- actionWithoutGroup->trigger();
- // signal should be emitted
- QCOMPARE(spyWithoutGroup.count(), 1);
-}
+#endif // QT_CONFIG(shortcut)
void tst_QAction::task229128TriggeredSignalWhenInActiongroup()
{
@@ -408,6 +281,8 @@ void tst_QAction::task229128TriggeredSignalWhenInActiongroup()
QCOMPARE(actionSpy.count(), 1);
}
+#if QT_CONFIG(shortcut)
+
void tst_QAction::repeat()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
@@ -452,21 +327,6 @@ void tst_QAction::repeat()
QCOMPARE(spy.count(), 2);
}
-void tst_QAction::setData() // QTBUG-62006
-{
- QAction act(nullptr);
- QSignalSpy spy(&act, &QAction::changed);
- QCOMPARE(act.data(), QVariant());
- QCOMPARE(spy.count(), 0);
- act.setData(QVariant());
- QCOMPARE(spy.count(), 0);
-
- act.setData(-1);
- QCOMPARE(spy.count(), 1);
- act.setData(-1);
- QCOMPARE(spy.count(), 1);
-}
-
void tst_QAction::disableShortcutsWithBlockedWidgets_data()
{
QTest::addColumn<Qt::ShortcutContext>("shortcutContext");
@@ -556,5 +416,7 @@ void tst_QAction::shortcutFromKeyEvent()
QCOMPARE(testWidget.shortcutOverrideCount, 1);
}
+#endif // QT_CONFIG(shortcut)
+
QTEST_MAIN(tst_QAction)
#include "tst_qaction.moc"
diff --git a/tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt b/tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt
new file mode 100644
index 0000000000..a55acf2efb
--- /dev/null
+++ b/tests/auto/widgets/kernel/qactiongroup/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qactiongroup.pro.
+
+#####################################################################
+## tst_qactiongroup Test:
+#####################################################################
+
+add_qt_test(tst_qactiongroup
+ SOURCES
+ tst_qactiongroup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
index 524040d003..d3b07ba26a 100644
--- a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
+++ b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
@@ -38,166 +38,9 @@ class tst_QActionGroup : public QObject
private slots:
void cleanup() { QVERIFY(QApplication::topLevelWidgets().isEmpty()); }
- void enabledPropagation();
- void visiblePropagation();
- void exclusive();
- void exclusiveOptional();
void separators();
- void testActionInTwoQActionGroup();
- void unCheckCurrentAction();
};
-void tst_QActionGroup::enabledPropagation()
-{
- QActionGroup testActionGroup(nullptr);
-
- QAction* childAction = new QAction( &testActionGroup );
- QAction* anotherChildAction = new QAction( &testActionGroup );
- QAction* freeAction = new QAction(nullptr);
-
- QVERIFY( testActionGroup.isEnabled() );
- QVERIFY( childAction->isEnabled() );
-
- testActionGroup.setEnabled( false );
- QVERIFY( !testActionGroup.isEnabled() );
- QVERIFY( !childAction->isEnabled() );
- QVERIFY( !anotherChildAction->isEnabled() );
-
- childAction->setEnabled(true);
- QVERIFY( !childAction->isEnabled());
-
- anotherChildAction->setEnabled( false );
-
- testActionGroup.setEnabled( true );
- QVERIFY( testActionGroup.isEnabled() );
- QVERIFY( childAction->isEnabled() );
- QVERIFY( !anotherChildAction->isEnabled() );
-
- testActionGroup.setEnabled( false );
- QAction *lastChildAction = new QAction(&testActionGroup);
-
- QVERIFY(!lastChildAction->isEnabled());
- testActionGroup.setEnabled( true );
- QVERIFY(lastChildAction->isEnabled());
-
- freeAction->setEnabled(false);
- testActionGroup.addAction(freeAction);
- QVERIFY(!freeAction->isEnabled());
- delete freeAction;
-}
-
-void tst_QActionGroup::visiblePropagation()
-{
- QActionGroup testActionGroup(nullptr);
-
- QAction* childAction = new QAction( &testActionGroup );
- QAction* anotherChildAction = new QAction( &testActionGroup );
- QAction* freeAction = new QAction(nullptr);
-
- QVERIFY( testActionGroup.isVisible() );
- QVERIFY( childAction->isVisible() );
-
- testActionGroup.setVisible( false );
- QVERIFY( !testActionGroup.isVisible() );
- QVERIFY( !childAction->isVisible() );
- QVERIFY( !anotherChildAction->isVisible() );
-
- anotherChildAction->setVisible(false);
-
- testActionGroup.setVisible( true );
- QVERIFY( testActionGroup.isVisible() );
- QVERIFY( childAction->isVisible() );
-
- QVERIFY( !anotherChildAction->isVisible() );
-
- testActionGroup.setVisible( false );
- QAction *lastChildAction = new QAction(&testActionGroup);
-
- QVERIFY(!lastChildAction->isVisible());
- testActionGroup.setVisible( true );
- QVERIFY(lastChildAction->isVisible());
-
- freeAction->setVisible(false);
- testActionGroup.addAction(freeAction);
- QVERIFY(!freeAction->isVisible());
- delete freeAction;
-}
-
-void tst_QActionGroup::exclusive()
-{
- QActionGroup group(nullptr);
- group.setExclusive(false);
- QVERIFY( !group.isExclusive() );
-
- QAction* actOne = new QAction( &group );
- actOne->setCheckable( true );
- QAction* actTwo = new QAction( &group );
- actTwo->setCheckable( true );
- QAction* actThree = new QAction( &group );
- actThree->setCheckable( true );
-
- group.setExclusive( true );
- QVERIFY( !actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- actOne->setChecked( true );
- QVERIFY( actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- actTwo->setChecked( true );
- QVERIFY( !actOne->isChecked() );
- QVERIFY( actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-}
-
-void tst_QActionGroup::exclusiveOptional()
-{
- QActionGroup group(0);
- group.setExclusive(true);
- QVERIFY( group.isExclusive() );
-
- QAction* actOne = new QAction( &group );
- actOne->setCheckable( true );
- QAction* actTwo = new QAction( &group );
- actTwo->setCheckable( true );
- QAction* actThree = new QAction( &group );
- actThree->setCheckable( true );
-
- QVERIFY( !actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- actOne->trigger();
- QVERIFY( actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- actOne->trigger();
- QVERIFY( actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- group.setExclusionPolicy( QActionGroup::ExclusionPolicy::ExclusiveOptional );
- QVERIFY( group.isExclusive() );
-
- actOne->trigger();
- QVERIFY( !actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- actTwo->trigger();
- QVERIFY( !actOne->isChecked() );
- QVERIFY( actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-
- actTwo->trigger();
- QVERIFY( !actOne->isChecked() );
- QVERIFY( !actTwo->isChecked() );
- QVERIFY( !actThree->isChecked() );
-}
-
void tst_QActionGroup::separators()
{
QMainWindow mw;
@@ -233,40 +76,5 @@ void tst_QActionGroup::separators()
QCOMPARE(menu.actions().size(), 3);
}
-void tst_QActionGroup::testActionInTwoQActionGroup()
-{
- QAction action1("Action 1", this);
-
- QActionGroup group1(this);
- QActionGroup group2(this);
-
- group1.addAction(&action1);
- group2.addAction(&action1);
-
- QCOMPARE(action1.actionGroup(), &group2);
- QCOMPARE(group2.actions().first(), &action1);
- QCOMPARE(group1.actions().isEmpty(), true);
-}
-
-void tst_QActionGroup::unCheckCurrentAction()
-{
- QActionGroup group(nullptr);
- QAction action1(&group) ,action2(&group);
- action1.setCheckable(true);
- action2.setCheckable(true);
- QVERIFY(!action1.isChecked());
- QVERIFY(!action2.isChecked());
- action1.setChecked(true);
- QVERIFY(action1.isChecked());
- QVERIFY(!action2.isChecked());
- QAction *current = group.checkedAction();
- QCOMPARE(current, &action1);
- current->setChecked(false);
- QVERIFY(!action1.isChecked());
- QVERIFY(!action2.isChecked());
- QVERIFY(!group.checkedAction());
-}
-
-
QTEST_MAIN(tst_QActionGroup)
#include "tst_qactiongroup.moc"
diff --git a/tests/auto/widgets/kernel/qapplication/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/CMakeLists.txt
new file mode 100644
index 0000000000..8e68089f5e
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from qapplication.pro.
+
+add_subdirectory(test)
+if(NOT WINRT)
+ add_subdirectory(desktopsettingsaware)
+ add_subdirectory(modal)
+endif()
diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/.prev_CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..df5f5f4e6c
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from desktopsettingsaware.pro.
+
+#####################################################################
+## desktopsettingsaware Binary:
+#####################################################################
+
+add_qt_executable(desktopsettingsaware
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/CMakeLists.txt
new file mode 100644
index 0000000000..98a38da7c0
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from desktopsettingsaware.pro.
+
+#####################################################################
+## desktopsettingsaware Binary:
+#####################################################################
+
+add_qt_executable(desktopsettingsaware_helper # special case
+ SOURCES
+ main.cpp
+ OUTPUT_DIRECTORY # special case
+ ${CMAKE_CURRENT_BINARY_DIR}/.. # special case
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/widgets/kernel/qapplication/modal/.prev_CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/modal/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..fc990e790e
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/modal/.prev_CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from modal.pro.
+
+#####################################################################
+## modal Binary:
+#####################################################################
+
+add_qt_executable(modal
+ SOURCES
+ base.cpp base.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt
new file mode 100644
index 0000000000..c598ca600a
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/modal/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from modal.pro.
+
+#####################################################################
+## modal Binary:
+#####################################################################
+
+add_qt_executable(modal_helper # special case
+ SOURCES
+ base.cpp base.h
+ main.cpp
+ OUTPUT_DIRECTORY # special case
+ ${CMAKE_CURRENT_BINARY_DIR}/.. # special case
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..40e612f0de
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from test.pro.
+
+#####################################################################
+## test Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../test/test.pro")
+list(APPEND test_data "../tmp/README")
+list(APPEND test_data "../modal")
+
+add_qt_test(test
+ SOURCES
+ ../tst_qapplication.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(test CONDITION builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
+
+#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# SUBPROGRAMS = "desktopsettingsaware" "modal"
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../debug/helper"
+
+#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../release/helper"
+
+#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../helper"
diff --git a/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
new file mode 100644
index 0000000000..171ee1b273
--- /dev/null
+++ b/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt
@@ -0,0 +1,43 @@
+# Generated from test.pro.
+
+#####################################################################
+## test Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "../test/test.pro")
+list(APPEND test_data "../tmp/README")
+list(APPEND test_data "../modal")
+
+add_qt_test(tst_qapplication # special case
+ SOURCES
+ ../tst_qapplication.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${test_data}
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/.." # special case
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qapplication CONDITION builtin_testdata # special case
+ DEFINES
+ BUILTIN_TESTDATA
+)
+
+#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# SUBPROGRAMS = "desktopsettingsaware" "modal"
+
+#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../debug/helper"
+
+#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../release/helper"
+
+#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT:
+# TEST_HELPER_INSTALLS = "../helper"
diff --git a/tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt
new file mode 100644
index 0000000000..901d20f1e3
--- /dev/null
+++ b/tests/auto/widgets/kernel/qboxlayout/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qboxlayout.pro.
+
+#####################################################################
+## tst_qboxlayout Test:
+#####################################################################
+
+add_qt_test(tst_qboxlayout
+ SOURCES
+ tst_qboxlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt
new file mode 100644
index 0000000000..79790049fe
--- /dev/null
+++ b/tests/auto/widgets/kernel/qdesktopwidget/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdesktopwidget.pro.
+
+#####################################################################
+## tst_qdesktopwidget Test:
+#####################################################################
+
+add_qt_test(tst_qdesktopwidget
+ SOURCES
+ tst_qdesktopwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qformlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qformlayout/CMakeLists.txt
new file mode 100644
index 0000000000..f786f3331c
--- /dev/null
+++ b/tests/auto/widgets/kernel/qformlayout/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qformlayout.pro.
+
+#####################################################################
+## tst_qformlayout Test:
+#####################################################################
+
+add_qt_test(tst_qformlayout
+ SOURCES
+ tst_qformlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index c6760000f4..45a35fe4f1 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -99,7 +99,9 @@ class tst_QFormLayout : public QObject
private slots:
void cleanup();
void rowCount();
+#if QT_CONFIG(shortcut)
void buddies();
+#endif
void getItemPosition();
void wrapping();
void spacing();
@@ -190,6 +192,8 @@ void tst_QFormLayout::rowCount()
//TODO: remove items
}
+#if QT_CONFIG(shortcut)
+
void tst_QFormLayout::buddies()
{
QWidget w;
@@ -218,6 +222,8 @@ void tst_QFormLayout::buddies()
//TODO: empty label?
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QFormLayout::getItemPosition()
{
QWidget w;
@@ -687,17 +693,21 @@ void tst_QFormLayout::insertRow_QString_QWidget()
layout->insertRow(-5, "&Name:", fld1);
QLabel *label1 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget());
QVERIFY(label1 != 0);
+#if QT_CONFIG(shortcut)
QCOMPARE(label1->buddy(), fld1);
-
+#endif
layout->insertRow(0, "&Email:", fld2);
QLabel *label2 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget());
QVERIFY(label2 != 0);
+#if QT_CONFIG(shortcut)
QCOMPARE(label2->buddy(), fld2);
-
+#endif
layout->insertRow(5, "&Age:", fld3);
QLabel *label3 = qobject_cast<QLabel *>(layout->itemAt(2, QFormLayout::LabelRole)->widget());
QVERIFY(label3 != 0);
+#if QT_CONFIG(shortcut)
QCOMPARE(label3->buddy(), fld3);
+#endif
}
void tst_QFormLayout::insertRow_QString_QLayout()
@@ -711,21 +721,27 @@ void tst_QFormLayout::insertRow_QString_QLayout()
layout->insertRow(-5, "&Name:", fld1);
QLabel *label1 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget());
QVERIFY(label1 != 0);
+#if QT_CONFIG(shortcut)
QVERIFY(!label1->buddy());
+#endif
QCOMPARE(layout->rowCount(), 1);
layout->insertRow(0, "&Email:", fld2);
QLabel *label2 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget());
QVERIFY(label2 != 0);
+#if QT_CONFIG(shortcut)
QVERIFY(!label2->buddy());
+#endif
QCOMPARE(layout->rowCount(), 2);
layout->insertRow(5, "&Age:", fld3);
QLabel *label3 = qobject_cast<QLabel *>(layout->itemAt(2, QFormLayout::LabelRole)->widget());
QVERIFY(label3 != 0);
+#if QT_CONFIG(shortcut)
QVERIFY(!label3->buddy());
+#endif
QCOMPARE(layout->rowCount(), 3);
}
diff --git a/tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt b/tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt
new file mode 100644
index 0000000000..61bf8d303a
--- /dev/null
+++ b/tests/auto/widgets/kernel/qgesturerecognizer/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qgesturerecognizer.pro.
+
+#####################################################################
+## tst_qgesturerecognizer Test:
+#####################################################################
+
+add_qt_test(tst_qgesturerecognizer
+ SOURCES
+ tst_qgesturerecognizer.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt
new file mode 100644
index 0000000000..79995454f7
--- /dev/null
+++ b/tests/auto/widgets/kernel/qgridlayout/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qgridlayout.pro.
+
+#####################################################################
+## tst_qgridlayout Test:
+#####################################################################
+
+add_qt_test(tst_qgridlayout
+ SOURCES
+ sortdialog.ui
+ tst_qgridlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
diff --git a/tests/auto/widgets/kernel/qlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qlayout/CMakeLists.txt
new file mode 100644
index 0000000000..e63a80117f
--- /dev/null
+++ b/tests/auto/widgets/kernel/qlayout/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from qlayout.pro.
+
+#####################################################################
+## tst_qlayout Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ baseline/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qlayout
+ SOURCES
+ tst_qlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+if(ANDROID AND NOT ANDROID_EMBEDDED)
+ # Resources:
+ set(testdata_resource_files
+ "baseline/smartmaxsize"
+ )
+
+ add_qt_resource(tst_qlayout "testdata"
+ PREFIX
+ "/"
+ FILES
+ ${testdata_resource_files}
+ )
+endif()
diff --git a/tests/auto/widgets/kernel/qshortcut/CMakeLists.txt b/tests/auto/widgets/kernel/qshortcut/CMakeLists.txt
new file mode 100644
index 0000000000..5d077c87ec
--- /dev/null
+++ b/tests/auto/widgets/kernel/qshortcut/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qshortcut.pro.
+
+#####################################################################
+## tst_qshortcut Test:
+#####################################################################
+
+add_qt_test(tst_qshortcut
+ SOURCES
+ tst_qshortcut.cpp
+ INCLUDE_DIRECTORIES
+ ..
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt b/tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt
new file mode 100644
index 0000000000..582f0d582d
--- /dev/null
+++ b/tests/auto/widgets/kernel/qsizepolicy/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qsizepolicy.pro.
+
+#####################################################################
+## tst_qsizepolicy Test:
+#####################################################################
+
+add_qt_test(tst_qsizepolicy
+ SOURCES
+ tst_qsizepolicy.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
diff --git a/tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt b/tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt
new file mode 100644
index 0000000000..a41957c9a6
--- /dev/null
+++ b/tests/auto/widgets/kernel/qstackedlayout/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qstackedlayout.pro.
+
+#####################################################################
+## tst_qstackedlayout Test:
+#####################################################################
+
+add_qt_test(tst_qstackedlayout
+ SOURCES
+ tst_qstackedlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qtooltip/CMakeLists.txt b/tests/auto/widgets/kernel/qtooltip/CMakeLists.txt
new file mode 100644
index 0000000000..f63b6e63cd
--- /dev/null
+++ b/tests/auto/widgets/kernel/qtooltip/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtooltip.pro.
+
+#####################################################################
+## tst_qtooltip Test:
+#####################################################################
+
+add_qt_test(tst_qtooltip
+ SOURCES
+ tst_qtooltip.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
new file mode 100644
index 0000000000..849dfea52a
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from qwidget.pro.
+
+#####################################################################
+## tst_qwidget Test:
+#####################################################################
+
+add_qt_test(tst_qwidget
+ SOURCES
+ tst_qwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+# Resources:
+set(qwidget_resource_files
+ "geometry-fullscreen.dat"
+ "geometry-maximized.dat"
+ "geometry.dat"
+)
+
+add_qt_resource(tst_qwidget "qwidget"
+ PREFIX
+ "/"
+ FILES
+ ${qwidget_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qwidget.pro:<TRUE>:
+# testcase.timeout = "600"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qwidget CONDITION AIX
+ COMPILE_OPTIONS
+ -fpermissive
+)
+
+extend_target(tst_qwidget CONDITION APPLE
+ SOURCES
+ tst_qwidget_mac_helpers.mm
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ ${FWSecurity}
+)
+
+extend_target(tst_qwidget CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ gdi32
+ user32
+)
diff --git a/tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt
new file mode 100644
index 0000000000..201c271103
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidget_window/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qwidget_window.pro.
+
+#####################################################################
+## tst_qwidget_window Test:
+#####################################################################
+
+add_qt_test(tst_qwidget_window
+ SOURCES
+ tst_qwidget_window.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt b/tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt
new file mode 100644
index 0000000000..06a4156b57
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidgetaction/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qwidgetaction.pro.
+
+#####################################################################
+## tst_qwidgetaction Test:
+#####################################################################
+
+add_qt_test(tst_qwidgetaction
+ SOURCES
+ tst_qwidgetaction.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt b/tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt
new file mode 100644
index 0000000000..dd935fdbd7
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidgetmetatype/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qwidgetmetatype.pro.
+
+#####################################################################
+## tst_qwidgetmetatype Test:
+#####################################################################
+
+add_qt_test(tst_qwidgetmetatype
+ SOURCES
+ tst_qwidgetmetatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt b/tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt
new file mode 100644
index 0000000000..076f66cd78
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwidgetsvariant/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qwidgetsvariant.pro.
+
+#####################################################################
+## tst_qwidgetsvariant Test:
+#####################################################################
+
+add_qt_test(tst_qwidgetsvariant
+ SOURCES
+ tst_qwidgetsvariant.cpp
+ INCLUDE_DIRECTORIES
+ ../../../other/qvariant_common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt b/tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt
new file mode 100644
index 0000000000..63b8b44e6f
--- /dev/null
+++ b/tests/auto/widgets/kernel/qwindowcontainer/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qwindowcontainer.pro.
+
+#####################################################################
+## tst_qwindowcontainer Test:
+#####################################################################
+
+add_qt_test(tst_qwindowcontainer
+ SOURCES
+ tst_qwindowcontainer.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/styles/CMakeLists.txt b/tests/auto/widgets/styles/CMakeLists.txt
new file mode 100644
index 0000000000..4fc260fe39
--- /dev/null
+++ b/tests/auto/widgets/styles/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from styles.pro.
+
+if (APPLE_OSX)
+ add_subdirectory(qmacstyle)
+endif()
+add_subdirectory(qstyle)
+if (NOT APPLE_UIKIT AND NOT ANDROID AND NOT QNX)
+ add_subdirectory(qstyleoption)
+endif()
+if (QT_FEATURE_private_tests)
+ add_subdirectory(qstylesheetstyle)
+endif()
diff --git a/tests/auto/widgets/styles/qmacstyle/CMakeLists.txt b/tests/auto/widgets/styles/qmacstyle/CMakeLists.txt
new file mode 100644
index 0000000000..44053dbe3d
--- /dev/null
+++ b/tests/auto/widgets/styles/qmacstyle/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qmacstyle.pro.
+
+#####################################################################
+## tst_qmacstyle Test:
+#####################################################################
+
+add_qt_test(tst_qmacstyle
+ SOURCES
+ tst_qmacstyle.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/styles/qstyle/CMakeLists.txt b/tests/auto/widgets/styles/qstyle/CMakeLists.txt
new file mode 100644
index 0000000000..21d81113f4
--- /dev/null
+++ b/tests/auto/widgets/styles/qstyle/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qstyle.pro.
+
+#####################################################################
+## tst_qstyle Test:
+#####################################################################
+
+add_qt_test(tst_qstyle
+ SOURCES
+ tst_qstyle.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/styles/qstyleoption/CMakeLists.txt b/tests/auto/widgets/styles/qstyleoption/CMakeLists.txt
new file mode 100644
index 0000000000..e174057cbb
--- /dev/null
+++ b/tests/auto/widgets/styles/qstyleoption/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qstyleoption.pro.
+
+#####################################################################
+## tst_qstyleoption Test:
+#####################################################################
+
+add_qt_test(tst_qstyleoption
+ SOURCES
+ tst_qstyleoption.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qstyleoption.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt b/tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt
new file mode 100644
index 0000000000..01c4df38fe
--- /dev/null
+++ b/tests/auto/widgets/styles/qstylesheetstyle/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from qstylesheetstyle.pro.
+
+if(NOT QT_FEATURE_private_tests)
+ return()
+endif()
+
+#####################################################################
+## tst_qstylesheetstyle Test:
+#####################################################################
+
+add_qt_test(tst_qstylesheetstyle
+ SOURCES
+ tst_qstylesheetstyle.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+# Resources:
+set(resources_resource_files
+ "images/testimage.png"
+ "images/testimage@2x.png"
+)
+
+add_qt_resource(tst_qstylesheetstyle "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qstylesheetstyle.pro:<TRUE>:
+# _REQUIREMENTS = "qtConfig(private_tests)"
diff --git a/tests/auto/widgets/util/CMakeLists.txt b/tests/auto/widgets/util/CMakeLists.txt
new file mode 100644
index 0000000000..0372282e7b
--- /dev/null
+++ b/tests/auto/widgets/util/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from util.pro.
+
+add_subdirectory(qcompleter)
+add_subdirectory(qscroller)
+add_subdirectory(qsystemtrayicon)
+add_subdirectory(qundogroup)
+add_subdirectory(qundostack)
diff --git a/tests/auto/widgets/util/qcompleter/CMakeLists.txt b/tests/auto/widgets/util/qcompleter/CMakeLists.txt
new file mode 100644
index 0000000000..fb87c3beec
--- /dev/null
+++ b/tests/auto/widgets/util/qcompleter/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qcompleter.pro.
+
+#####################################################################
+## tst_qcompleter Test:
+#####################################################################
+
+add_qt_test(tst_qcompleter
+ SOURCES
+ tst_qcompleter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qcompleter.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 89c4a74739..fe3e3c7f72 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -1807,7 +1807,7 @@ void tst_QCompleter::QTBUG_52028_tabAutoCompletes()
QApplication::setActiveWindow(&w);
QVERIFY(QTest::qWaitForWindowActive(&w));
- QSignalSpy activatedSpy(&cbox, QOverload<int>::of(&QComboBox::activated));
+ QSignalSpy activatedSpy(&cbox, &QComboBox::activated);
// Tab key will complete but not activate
cbox.lineEdit()->clear();
@@ -1851,7 +1851,7 @@ void tst_QCompleter::QTBUG_51889_activatedSentTwice()
QApplication::setActiveWindow(&w);
QVERIFY(QTest::qWaitForWindowActive(&w));
- QSignalSpy activatedSpy(&cbox, QOverload<int>::of(&QComboBox::activated));
+ QSignalSpy activatedSpy(&cbox, &QComboBox::activated);
// Navigate + enter activates only once (first item)
cbox.lineEdit()->clear();
diff --git a/tests/auto/widgets/util/qscroller/CMakeLists.txt b/tests/auto/widgets/util/qscroller/CMakeLists.txt
new file mode 100644
index 0000000000..b6c6efcc2f
--- /dev/null
+++ b/tests/auto/widgets/util/qscroller/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qscroller.pro.
+
+#####################################################################
+## tst_qscroller Test:
+#####################################################################
+
+add_qt_test(tst_qscroller
+ SOURCES
+ tst_qscroller.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt b/tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt
new file mode 100644
index 0000000000..df6efa7281
--- /dev/null
+++ b/tests/auto/widgets/util/qsystemtrayicon/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qsystemtrayicon.pro.
+
+#####################################################################
+## tst_qsystemtrayicon Test:
+#####################################################################
+
+add_qt_test(tst_qsystemtrayicon
+ SOURCES
+ tst_qsystemtrayicon.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/util/qundogroup/CMakeLists.txt b/tests/auto/widgets/util/qundogroup/CMakeLists.txt
new file mode 100644
index 0000000000..600a7d7da1
--- /dev/null
+++ b/tests/auto/widgets/util/qundogroup/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qundogroup.pro.
+
+#####################################################################
+## tst_qundogroup Test:
+#####################################################################
+
+add_qt_test(tst_qundogroup
+ SOURCES
+ tst_qundogroup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/util/qundostack/CMakeLists.txt b/tests/auto/widgets/util/qundostack/CMakeLists.txt
new file mode 100644
index 0000000000..5fc049991f
--- /dev/null
+++ b/tests/auto/widgets/util/qundostack/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qundostack.pro.
+
+#####################################################################
+## tst_qundostack Test:
+#####################################################################
+
+add_qt_test(tst_qundostack
+ SOURCES
+ tst_qundostack.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/CMakeLists.txt b/tests/auto/widgets/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..60776f5da2
--- /dev/null
+++ b/tests/auto/widgets/widgets/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from widgets.pro.
+
+add_subdirectory(qabstractbutton)
+add_subdirectory(qabstractscrollarea)
+add_subdirectory(qabstractslider)
+add_subdirectory(qbuttongroup)
+add_subdirectory(qcalendarwidget)
+add_subdirectory(qcheckbox)
+add_subdirectory(qcommandlinkbutton)
+add_subdirectory(qdatetimeedit)
+add_subdirectory(qdial)
+add_subdirectory(qdialogbuttonbox)
+add_subdirectory(qdockwidget)
+add_subdirectory(qdoublespinbox)
+add_subdirectory(qfocusframe)
+add_subdirectory(qfontcombobox)
+add_subdirectory(qframe)
+add_subdirectory(qgroupbox)
+add_subdirectory(qkeysequenceedit)
+add_subdirectory(qlabel)
+add_subdirectory(qlcdnumber)
+add_subdirectory(qlineedit)
+add_subdirectory(qmdiarea)
+add_subdirectory(qmdisubwindow)
+add_subdirectory(qmenu)
+add_subdirectory(qmenubar)
+add_subdirectory(qplaintextedit)
+add_subdirectory(qprogressbar)
+add_subdirectory(qpushbutton)
+add_subdirectory(qradiobutton)
+add_subdirectory(qscrollarea)
+add_subdirectory(qscrollbar)
+add_subdirectory(qsizegrip)
+add_subdirectory(qslider)
+add_subdirectory(qspinbox)
+add_subdirectory(qsplitter)
+add_subdirectory(qstackedwidget)
+add_subdirectory(qstatusbar)
+add_subdirectory(qtabbar)
+add_subdirectory(qtabwidget)
+add_subdirectory(qtextbrowser)
+add_subdirectory(qtoolbox)
+add_subdirectory(qtoolbutton)
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qabstractspinbox)
+ add_subdirectory(qcombobox)
+ add_subdirectory(qmainwindow)
+ add_subdirectory(qtextedit)
+ add_subdirectory(qtoolbar)
+endif()
+
+if(NOT WINRT AND QT_FEATURE_opengl)
+ add_subdirectory(qopenglwidget)
+endif()
diff --git a/tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt
new file mode 100644
index 0000000000..48a174b6e1
--- /dev/null
+++ b/tests/auto/widgets/widgets/qabstractbutton/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qabstractbutton.pro.
+
+#####################################################################
+## tst_qabstractbutton Test:
+#####################################################################
+
+add_qt_test(tst_qabstractbutton
+ SOURCES
+ tst_qabstractbutton.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index eb108a40de..e5a891912f 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -34,7 +34,9 @@
#include <qapplication.h>
#include <qpainter.h>
#include <qstyleoption.h>
-#include <qkeysequence.h>
+#if QT_CONFIG(shortcut)
+# include <qkeysequence.h>
+#endif
#include <qevent.h>
#include <qgridlayout.h>
#include <qabstractbutton.h>
@@ -59,7 +61,9 @@ private slots:
void setText();
void setIcon();
+#if QT_CONFIG(shortcut)
void setShortcut();
+#endif
void animateClick();
@@ -68,7 +72,9 @@ private slots:
void isChecked();
void toggled();
void setEnabled();
+#if QT_CONFIG(shortcut)
void shortcutEvents();
+#endif
void stopRepeatTimer();
void mouseReleased(); // QTBUG-53244
@@ -164,8 +170,10 @@ void tst_QAbstractButton::init()
testWidget->setEnabled( true );
testWidget->setDown( false );
testWidget->setAutoRepeat( false );
+#if QT_CONFIG(shortcut)
QKeySequence seq;
testWidget->setShortcut( seq );
+#endif
toggle_count = 0;
press_count = 0;
@@ -336,17 +344,17 @@ void tst_QAbstractButton::setText()
QCOMPARE( testWidget->text(), QString("simple") );
testWidget->setText("&ampersand");
QCOMPARE( testWidget->text(), QString("&ampersand") );
-#ifndef Q_OS_MAC // no mneonics on Mac.
+#if QT_CONFIG(shortcut) && !defined(Q_OS_DARWIN) // no mnemonics on Mac.
QCOMPARE( testWidget->shortcut(), QKeySequence("ALT+A"));
#endif
testWidget->setText("te&st");
QCOMPARE( testWidget->text(), QString("te&st") );
-#ifndef Q_OS_MAC // no mneonics on Mac.
+#if QT_CONFIG(shortcut) && !defined(Q_OS_DARWIN) // no mnemonics on Mac.
QCOMPARE( testWidget->shortcut(), QKeySequence("ALT+S"));
#endif
testWidget->setText("foo");
QCOMPARE( testWidget->text(), QString("foo") );
-#ifndef Q_OS_MAC // no mneonics on Mac.
+#if QT_CONFIG(shortcut) && !defined(Q_OS_DARWIN) // no mnemonics on Mac.
QCOMPARE( testWidget->shortcut(), QKeySequence());
#endif
}
@@ -471,6 +479,7 @@ void tst_QAbstractButton::toggled()
testWidget->setCheckable(false);
}
+#if QT_CONFIG(shortcut)
void tst_QAbstractButton::setShortcut()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))
@@ -502,6 +511,7 @@ void tst_QAbstractButton::setShortcut()
// qDebug() << click_count;
}
+#endif // QT_CONFIG(shortcut)
void tst_QAbstractButton::animateClick()
{
@@ -512,6 +522,8 @@ void tst_QAbstractButton::animateClick()
QTRY_VERIFY( !testWidget->isDown() );
}
+#if QT_CONFIG(shortcut)
+
void tst_QAbstractButton::shortcutEvents()
{
MyButton button;
@@ -535,6 +547,8 @@ void tst_QAbstractButton::shortcutEvents()
QCOMPARE(clickedSpy.count(), 3);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QAbstractButton::stopRepeatTimer()
{
MyButton button;
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt
new file mode 100644
index 0000000000..cb1b2aa936
--- /dev/null
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qabstractscrollarea.pro.
+
+#####################################################################
+## tst_qabstractscrollarea Test:
+#####################################################################
+
+add_qt_test(tst_qabstractscrollarea
+ SOURCES
+ tst_qabstractscrollarea.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt
new file mode 100644
index 0000000000..0dbbf63239
--- /dev/null
+++ b/tests/auto/widgets/widgets/qabstractslider/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qabstractslider.pro.
+
+#####################################################################
+## tst_qabstractslider Test:
+#####################################################################
+
+add_qt_test(tst_qabstractslider
+ SOURCES
+ tst_qabstractslider.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt b/tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt
new file mode 100644
index 0000000000..32c814c535
--- /dev/null
+++ b/tests/auto/widgets/widgets/qabstractspinbox/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qabstractspinbox.pro.
+
+#####################################################################
+## tst_qabstractspinbox Test:
+#####################################################################
+
+add_qt_test(tst_qabstractspinbox
+ SOURCES
+ tst_qabstractspinbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt b/tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt
new file mode 100644
index 0000000000..92d04e0c26
--- /dev/null
+++ b/tests/auto/widgets/widgets/qbuttongroup/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qbuttongroup.pro.
+
+#####################################################################
+## tst_qbuttongroup Test:
+#####################################################################
+
+add_qt_test(tst_qbuttongroup
+ SOURCES
+ tst_qbuttongroup.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
index 279fe49e3a..999cf4a941 100644
--- a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
@@ -297,67 +297,43 @@ void tst_QButtonGroup::testSignals()
qRegisterMetaType<QAbstractButton *>("QAbstractButton *");
QSignalSpy clickedSpy(&buttons, SIGNAL(buttonClicked(QAbstractButton*)));
- QSignalSpy clickedIdSpy(&buttons, SIGNAL(buttonClicked(int)));
QSignalSpy pressedSpy(&buttons, SIGNAL(buttonPressed(QAbstractButton*)));
- QSignalSpy pressedIdSpy(&buttons, SIGNAL(buttonPressed(int)));
QSignalSpy releasedSpy(&buttons, SIGNAL(buttonReleased(QAbstractButton*)));
- QSignalSpy releasedIdSpy(&buttons, SIGNAL(buttonReleased(int)));
pb1.animateClick();
QTestEventLoop::instance().enterLoop(1);
QCOMPARE(clickedSpy.count(), 1);
- QCOMPARE(clickedIdSpy.count(), 1);
- int expectedId = -2;
-
- QCOMPARE(clickedIdSpy.takeFirst().at(0).toInt(), expectedId);
QCOMPARE(pressedSpy.count(), 1);
- QCOMPARE(pressedIdSpy.count(), 1);
- QCOMPARE(pressedIdSpy.takeFirst().at(0).toInt(), expectedId);
QCOMPARE(releasedSpy.count(), 1);
- QCOMPARE(releasedIdSpy.count(), 1);
- QCOMPARE(releasedIdSpy.takeFirst().at(0).toInt(), expectedId);
clickedSpy.clear();
- clickedIdSpy.clear();
pressedSpy.clear();
- pressedIdSpy.clear();
releasedSpy.clear();
- releasedIdSpy.clear();
pb2.animateClick();
QTestEventLoop::instance().enterLoop(1);
QCOMPARE(clickedSpy.count(), 1);
- QCOMPARE(clickedIdSpy.count(), 1);
- QCOMPARE(clickedIdSpy.takeFirst().at(0).toInt(), 23);
QCOMPARE(pressedSpy.count(), 1);
- QCOMPARE(pressedIdSpy.count(), 1);
- QCOMPARE(pressedIdSpy.takeFirst().at(0).toInt(), 23);
QCOMPARE(releasedSpy.count(), 1);
- QCOMPARE(releasedIdSpy.count(), 1);
- QCOMPARE(releasedIdSpy.takeFirst().at(0).toInt(), 23);
QSignalSpy toggledSpy(&buttons, SIGNAL(buttonToggled(QAbstractButton*, bool)));
- QSignalSpy toggledIdSpy(&buttons, SIGNAL(buttonToggled(int, bool)));
pb1.setCheckable(true);
pb2.setCheckable(true);
pb1.toggle();
QCOMPARE(toggledSpy.count(), 1);
- QCOMPARE(toggledIdSpy.count(), 1);
pb2.toggle();
QCOMPARE(toggledSpy.count(), 3); // equals 3 since pb1 and pb2 are both toggled
- QCOMPARE(toggledIdSpy.count(), 3);
pb1.setCheckable(false);
pb2.setCheckable(false);
pb1.toggle();
QCOMPARE(toggledSpy.count(), 3);
- QCOMPARE(toggledIdSpy.count(), 3);
}
void tst_QButtonGroup::task106609()
@@ -389,7 +365,6 @@ void tst_QButtonGroup::task106609()
qRegisterMetaType<QAbstractButton*>("QAbstractButton*");
QSignalSpy spy1(buttons, SIGNAL(buttonClicked(QAbstractButton*)));
- QSignalSpy spy2(buttons, SIGNAL(buttonClicked(int)));
QApplication::setActiveWindow(&dlg);
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&dlg));
@@ -398,8 +373,6 @@ void tst_QButtonGroup::task106609()
radio1->setChecked(true);
QTestEventLoop::instance().enterLoop(1);
- //qDebug() << "int:" << spy2.count() << "QAbstractButton*:" << spy1.count();
- QCOMPARE(spy2.count(), 2);
QCOMPARE(spy1.count(), 2);
}
@@ -444,11 +417,12 @@ public:
: group(group)
, deleteButton(deleteButton)
{
- connect(group, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int)));
+ connect(group, &QButtonGroup::buttonClicked,
+ this, &task209485_ButtonDeleter::buttonClicked);
}
private slots:
- void buttonClicked(int)
+ void buttonClicked()
{
if (deleteButton)
group->removeButton(group->buttons().first());
@@ -464,7 +438,7 @@ void tst_QButtonGroup::task209485_removeFromGroupInEventHandler_data()
QTest::addColumn<bool>("deleteButton");
QTest::addColumn<int>("signalCount");
QTest::newRow("buttonPress 1") << true << 1;
- QTest::newRow("buttonPress 2") << false << 2;
+ QTest::newRow("buttonPress 2") << false << 1;
}
void tst_QButtonGroup::task209485_removeFromGroupInEventHandler()
@@ -480,12 +454,11 @@ void tst_QButtonGroup::task209485_removeFromGroupInEventHandler()
task209485_ButtonDeleter buttonDeleter(&group, deleteButton);
QSignalSpy spy1(&group, SIGNAL(buttonClicked(QAbstractButton*)));
- QSignalSpy spy2(&group, SIGNAL(buttonClicked(int)));
// NOTE: Reintroducing the bug of this task will cause the following line to crash:
QTest::mouseClick(button, Qt::LeftButton);
- QCOMPARE(spy1.count() + spy2.count(), signalCount);
+ QCOMPARE(spy1.count(), signalCount);
}
void tst_QButtonGroup::autoIncrementId()
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt
new file mode 100644
index 0000000000..10e24a1016
--- /dev/null
+++ b/tests/auto/widgets/widgets/qcalendarwidget/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qcalendarwidget.pro.
+
+#####################################################################
+## tst_qcalendarwidget Test:
+#####################################################################
+
+add_qt_test(tst_qcalendarwidget
+ SOURCES
+ tst_qcalendarwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt b/tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt
new file mode 100644
index 0000000000..2418791e5d
--- /dev/null
+++ b/tests/auto/widgets/widgets/qcheckbox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qcheckbox.pro.
+
+#####################################################################
+## tst_qcheckbox Test:
+#####################################################################
+
+add_qt_test(tst_qcheckbox
+ SOURCES
+ tst_qcheckbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qcombobox/CMakeLists.txt b/tests/auto/widgets/widgets/qcombobox/CMakeLists.txt
new file mode 100644
index 0000000000..95fbe14eec
--- /dev/null
+++ b/tests/auto/widgets/widgets/qcombobox/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from qcombobox.pro.
+
+#####################################################################
+## tst_qcombobox Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "qtlogo.png")
+list(APPEND test_data "qtlogoinverted.png")
+
+add_qt_test(tst_qcombobox
+ SOURCES
+ tst_qcombobox.cpp
+ DEFINES
+ QTEST_QPA_MOUSE_HANDLING
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index c5be8a3f16..bd3c6d1f03 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -2482,7 +2482,7 @@ void tst_QComboBox::task247863_keyBoardSelection()
QApplication::setActiveWindow(&combo);
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo));
- QSignalSpy spy(&combo, SIGNAL(activated(QString)));
+ QSignalSpy spy(&combo, &QComboBox::activated);
qApp->setEffectEnabled(Qt::UI_AnimateCombo, false);
QTest::keyClick(&combo, Qt::Key_Space);
qApp->setEffectEnabled(Qt::UI_AnimateCombo, true);
@@ -2763,7 +2763,7 @@ void tst_QComboBox::resetModel()
};
QComboBox cb;
StringListModel model({"1", "2"});
- QSignalSpy spy(&cb, QOverload<int, const QString &>::of(&QComboBox::currentIndexChanged));
+ QSignalSpy spy(&cb, &QComboBox::currentIndexChanged);
QCOMPARE(spy.count(), 0);
QCOMPARE(cb.currentIndex(), -1); //no selection
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt
new file mode 100644
index 0000000000..59ba375358
--- /dev/null
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qcommandlinkbutton.pro.
+
+#####################################################################
+## tst_qcommandlinkbutton Test:
+#####################################################################
+
+add_qt_test(tst_qcommandlinkbutton
+ SOURCES
+ tst_qcommandlinkbutton.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index 0044d33c66..45a23984e0 100644
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -51,7 +51,9 @@ private slots:
void getSetCheck();
void pressed();
+#if QT_CONFIG(shortcut)
void setAccel();
+#endif
void isCheckable();
void setDown();
void popupCrash();
@@ -133,8 +135,10 @@ void tst_QCommandLinkButton::init()
testWidget->setText("Test");
testWidget->setDescription("Description text.");
testWidget->setEnabled( true );
+#if QT_CONFIG(shortcut)
QKeySequence seq;
testWidget->setShortcut( seq );
+#endif
resetCounters();
}
@@ -327,6 +331,8 @@ void tst_QCommandLinkButton::toggled()
QVERIFY( click_count == 1 );
}
+#if QT_CONFIG(shortcut)
+
/*
If we press an accelerator key we ONLY get a pressed signal and
NOT a released or clicked signal.
@@ -355,6 +361,8 @@ void tst_QCommandLinkButton::setAccel()
QTest::qWait(200);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QCommandLinkButton::animateClick()
{
QVERIFY( !testWidget->isDown() );
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt b/tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt
new file mode 100644
index 0000000000..8eb294d361
--- /dev/null
+++ b/tests/auto/widgets/widgets/qdatetimeedit/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qdatetimeedit.pro.
+
+#####################################################################
+## tst_qdatetimeedit Test:
+#####################################################################
+
+add_qt_test(tst_qdatetimeedit
+ SOURCES
+ tst_qdatetimeedit.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 264625777f..9eae1f10ea 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -262,6 +262,8 @@ private slots:
void timeSpec();
void timeSpecBug();
void timeSpecInit();
+ void setDateTime_data();
+ void setDateTime();
void monthEdgeCase();
void setLocale();
@@ -3476,6 +3478,54 @@ void tst_QDateTimeEdit::timeSpecInit()
QCOMPARE(widget.dateTime(), utc);
}
+void tst_QDateTimeEdit::setDateTime_data()
+{
+ QTest::addColumn<Qt::TimeSpec>("spec");
+ QDateTime localNoon(QDate(2019, 12, 24), QTime(12, 0), Qt::LocalTime);
+#if 0 // Not yet supported
+ QTest::addColumn<int>("offset");
+ QTest::addColumn<QByteArray>("zoneName");
+
+ QTest::newRow("OffsetFromUTC/LocalTime")
+ << Qt::OffsetFromUTC << 7200 << ""
+ << localNoon << localNoon.toOffsetFromUtc(7200);
+#if QT_CONFIG(timezone)
+ QTest::newRow("TimeZone/LocalTime")
+ << Qt::TimeZone << 0 << "Europe/Berlin"
+ << localNoon << localNoon.toTimeZone(QTimeZone("Europe/Berlin"));
+#endif
+#endif // unsupported
+ QTest::addColumn<QDateTime>("store");
+ QTest::addColumn<QDateTime>("expect");
+ QTest::newRow("LocalTime/LocalTime")
+ << Qt::LocalTime // << 0 << ""
+ << localNoon << localNoon;
+ QTest::newRow("LocalTime/UTC")
+ << Qt::LocalTime // << 0 << ""
+ << localNoon.toUTC() << localNoon;
+ QTest::newRow("UTC/LocalTime")
+ << Qt::UTC // << 0 << ""
+ << localNoon << localNoon.toUTC();
+ QTest::newRow("UTC/UTC")
+ << Qt::UTC // << 0 << ""
+ << localNoon.toUTC() << localNoon.toUTC();
+}
+
+void tst_QDateTimeEdit::setDateTime()
+{
+ QFETCH(const Qt::TimeSpec, spec);
+#if 0 // Not yet supported
+ QFETCH(const int, offset);
+ QFETCH(const QByteArray, zoneName);
+#endif // configuring the spec, when OffsetFromUTC or TimeZone
+ QFETCH(const QDateTime, store);
+ QFETCH(const QDateTime, expect);
+ QDateTimeEdit editor;
+ editor.setTimeSpec(spec);
+ editor.setDateTime(store);
+ QCOMPARE(editor.dateTime(), expect);
+}
+
void tst_QDateTimeEdit::cachedDayTest()
{
testWidget->setDisplayFormat("MM/dd");
diff --git a/tests/auto/widgets/widgets/qdial/CMakeLists.txt b/tests/auto/widgets/widgets/qdial/CMakeLists.txt
new file mode 100644
index 0000000000..e725edacb6
--- /dev/null
+++ b/tests/auto/widgets/widgets/qdial/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdial.pro.
+
+#####################################################################
+## tst_qdial Test:
+#####################################################################
+
+add_qt_test(tst_qdial
+ SOURCES
+ tst_qdial.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt b/tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt
new file mode 100644
index 0000000000..c4961f13a1
--- /dev/null
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdialogbuttonbox.pro.
+
+#####################################################################
+## tst_qdialogbuttonbox Test:
+#####################################################################
+
+add_qt_test(tst_qdialogbuttonbox
+ SOURCES
+ tst_qdialogbuttonbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt
new file mode 100644
index 0000000000..e2b6cc5942
--- /dev/null
+++ b/tests/auto/widgets/widgets/qdockwidget/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qdockwidget.pro.
+
+#####################################################################
+## tst_qdockwidget Test:
+#####################################################################
+
+add_qt_test(tst_qdockwidget
+ SOURCES
+ tst_qdockwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt b/tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt
new file mode 100644
index 0000000000..b639289db8
--- /dev/null
+++ b/tests/auto/widgets/widgets/qdoublespinbox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qdoublespinbox.pro.
+
+#####################################################################
+## tst_qdoublespinbox Test:
+#####################################################################
+
+add_qt_test(tst_qdoublespinbox
+ SOURCES
+ tst_qdoublespinbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index c293a4bdd2..cec2da1d57 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -166,7 +166,9 @@ private slots:
void doubleDot();
+#if QT_CONFIG(shortcut)
void undoRedo();
+#endif
void valueFromTextAndValidate_data();
void valueFromTextAndValidate();
@@ -417,7 +419,7 @@ void tst_QDoubleSpinBox::setTracking()
spin.setDecimals(decimals);
spin.show();
- connect(&spin, SIGNAL(valueChanged(QString)), this, SLOT(valueChangedHelper(QString)));
+ connect(&spin, SIGNAL(textChanged(QString)), this, SLOT(valueChangedHelper(QString)));
keys.simulate(&spin);
QCOMPARE(actualTexts, texts);
@@ -1025,6 +1027,8 @@ void tst_QDoubleSpinBox::doubleDot()
QCOMPARE(spin.lineEdit()->cursorPosition(), 2);
}
+#if QT_CONFIG(shortcut)
+
void tst_QDoubleSpinBox::undoRedo()
{
//test undo/redo feature (in conjunction with the "undoRedoEnabled" property)
@@ -1073,6 +1077,8 @@ void tst_QDoubleSpinBox::undoRedo()
QVERIFY(!spin.lineEdit()->isRedoAvailable());
}
+#endif // QT_CONFIG(shortcut)
+
struct task199226_DoubleSpinBox : public QDoubleSpinBox
{
task199226_DoubleSpinBox(QWidget *parent = 0) : QDoubleSpinBox(parent) {}
@@ -1768,7 +1774,7 @@ void tst_QDoubleSpinBox::stepModifierPressAndHold()
stepModifierStyle->stepModifier = static_cast<Qt::KeyboardModifier>(stepModifier);
spin.setStyle(stepModifierStyle.data());
- QSignalSpy spy(&spin, QOverload<double>::of(&DoubleSpinBox::valueChanged));
+ QSignalSpy spy(&spin, &DoubleSpinBox::valueChanged);
spin.show();
QVERIFY(QTest::qWaitForWindowExposed(&spin));
diff --git a/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt b/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt
new file mode 100644
index 0000000000..85160faed7
--- /dev/null
+++ b/tests/auto/widgets/widgets/qfocusframe/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qfocusframe.pro.
+
+#####################################################################
+## tst_qfocusframe Test:
+#####################################################################
+
+add_qt_test(tst_qfocusframe
+ SOURCES
+ tst_qfocusframe.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt b/tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt
new file mode 100644
index 0000000000..777abc48c5
--- /dev/null
+++ b/tests/auto/widgets/widgets/qfontcombobox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qfontcombobox.pro.
+
+#####################################################################
+## tst_qfontcombobox Test:
+#####################################################################
+
+add_qt_test(tst_qfontcombobox
+ SOURCES
+ tst_qfontcombobox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qframe/CMakeLists.txt b/tests/auto/widgets/widgets/qframe/CMakeLists.txt
new file mode 100644
index 0000000000..ae23555fa5
--- /dev/null
+++ b/tests/auto/widgets/widgets/qframe/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qframe.pro.
+
+#####################################################################
+## tst_qframe Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ images/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qframe
+ SOURCES
+ tst_qframe.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt b/tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt
new file mode 100644
index 0000000000..09d4623cd9
--- /dev/null
+++ b/tests/auto/widgets/widgets/qgroupbox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qgroupbox.pro.
+
+#####################################################################
+## tst_qgroupbox Test:
+#####################################################################
+
+add_qt_test(tst_qgroupbox
+ SOURCES
+ tst_qgroupbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt b/tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt
new file mode 100644
index 0000000000..c57f8b5c0a
--- /dev/null
+++ b/tests/auto/widgets/widgets/qkeysequenceedit/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qkeysequenceedit.pro.
+
+#####################################################################
+## tst_qkeysequenceedit Test:
+#####################################################################
+
+add_qt_test(tst_qkeysequenceedit
+ SOURCES
+ tst_qkeysequenceedit.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qlabel/CMakeLists.txt b/tests/auto/widgets/widgets/qlabel/CMakeLists.txt
new file mode 100644
index 0000000000..a4fe508a02
--- /dev/null
+++ b/tests/auto/widgets/widgets/qlabel/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qlabel.pro.
+
+#####################################################################
+## tst_qlabel Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ testdata/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.png)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qlabel
+ SOURCES
+ tst_qlabel.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index f599ac73c6..7760e12cca 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -68,7 +68,7 @@ private Q_SLOTS:
void setText_data();
void setText();
void setTextFormat();
-#ifndef Q_OS_MAC
+#if QT_CONFIG(shortcut) && !defined(Q_OS_DARWIN)
void setBuddy();
#endif
void setNum();
@@ -88,8 +88,10 @@ private Q_SLOTS:
void unicodeText_data();
void unicodeText();
+#if QT_CONFIG(shortcut)
void mnemonic_data();
void mnemonic();
+#endif
void selection();
#ifndef QT_NO_CONTEXTMENU
@@ -116,6 +118,7 @@ void tst_QLabel::getSetCheck()
obj1.setWordWrap(true);
QCOMPARE(true, obj1.wordWrap());
+#if QT_CONFIG(shortcut)
// QWidget * QLabel::buddy()
// void QLabel::setBuddy(QWidget *)
QWidget *var2 = new QWidget();
@@ -124,6 +127,7 @@ void tst_QLabel::getSetCheck()
obj1.setBuddy((QWidget *)0);
QCOMPARE((QWidget *)0, obj1.buddy());
delete var2;
+#endif // QT_CONFIG(shortcut)
// QMovie * QLabel::movie()
// void QLabel::setMovie(QMovie *)
@@ -153,7 +157,9 @@ void tst_QLabel::cleanupTestCase()
void tst_QLabel::init()
{
testWidget->setTextFormat( Qt::AutoText );
+# if QT_CONFIG(shortcut)
testWidget->setBuddy( 0 );
+#endif
testWidget->setIndent( 0 );
testWidget->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
testWidget->setScaledContents( false );
@@ -169,7 +175,7 @@ void tst_QLabel::cleanup()
}
// Set buddy doesn't make much sense on OS X
-#ifndef Q_OS_MAC
+#if QT_CONFIG(shortcut) && !defined(Q_OS_DARWIN)
void tst_QLabel::setBuddy()
{
testWidget->hide();
@@ -204,7 +210,7 @@ void tst_QLabel::setBuddy()
delete test_box;
}
-#endif
+#endif // QT_CONFIG(shortcut) && !Q_OS_DARWIN
void tst_QLabel::setText_data()
{
@@ -469,6 +475,8 @@ void tst_QLabel::unicodeText()
testWidget->show();
}
+#if QT_CONFIG(shortcut)
+
void tst_QLabel::mnemonic_data()
{
QTest::addColumn<QString>("text");
@@ -513,6 +521,8 @@ void tst_QLabel::mnemonic()
QCOMPARE(d->shortcutCursor.selectedText(), expectedShortcutCursor);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QLabel::selection()
{
QLabel label;
diff --git a/tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt b/tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt
new file mode 100644
index 0000000000..fbd9ff5913
--- /dev/null
+++ b/tests/auto/widgets/widgets/qlcdnumber/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qlcdnumber.pro.
+
+#####################################################################
+## tst_qlcdnumber Test:
+#####################################################################
+
+add_qt_test(tst_qlcdnumber
+ SOURCES
+ tst_qlcdnumber.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qlineedit/CMakeLists.txt b/tests/auto/widgets/widgets/qlineedit/CMakeLists.txt
new file mode 100644
index 0000000000..f95094aa7d
--- /dev/null
+++ b/tests/auto/widgets/widgets/qlineedit/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qlineedit.pro.
+
+#####################################################################
+## tst_qlineedit Test:
+#####################################################################
+
+add_qt_test(tst_qlineedit
+ SOURCES
+ tst_qlineedit.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qlineedit CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 6408df3f11..bf31f12958 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -56,7 +56,9 @@
#include <qsortfilterproxymodel.h>
#include <qdebug.h>
#include <qscreen.h>
-#include <qshortcut.h>
+#if QT_CONFIG(shortcut)
+# include <qshortcut.h>
+#endif
#include "qcommonstyle.h"
#include "qstyleoption.h"
@@ -133,9 +135,11 @@ private slots:
void clearInputMask();
+#if QT_CONFIG(shortcut)
void keypress_inputMask_data();
void keypress_inputMask();
void keypress_inputMethod_inputMask();
+#endif
void inputMaskAndValidator_data();
void inputMaskAndValidator();
@@ -217,7 +221,7 @@ private slots:
void setSelection_data();
void setSelection();
-#ifndef QT_NO_CLIPBOARD
+#if QT_CONFIG(clipboard) && QT_CONFIG(shortcut)
void cut();
void cutWithoutSelection();
#endif
@@ -297,8 +301,10 @@ private slots:
void shouldShowPlaceholderText();
void QTBUG1266_setInputMaskEmittingTextEdited();
+#if QT_CONFIG(shortcut)
void shortcutOverrideOnReadonlyLineEdit_data();
void shortcutOverrideOnReadonlyLineEdit();
+#endif
void QTBUG59957_clearButtonLeftmostAction();
void QTBUG_60319_setInputMaskCheckImSurroundingText();
void testQuickSelectionWithMouse();
@@ -317,7 +323,9 @@ private:
void psKeyClick(QWidget *target, Qt::Key key, Qt::KeyboardModifiers pressState = {});
void psKeyClick(QTestEventList &keys, Qt::Key key, Qt::KeyboardModifiers pressState = {});
bool unselectingWithLeftOrRightChangesCursorPosition();
+#if QT_CONFIG(shortcut)
void addKeySequenceStandardKey(QTestEventList &keys, QKeySequence::StandardKey);
+#endif
QLineEdit *ensureTestWidget();
bool validInput;
@@ -713,6 +721,8 @@ void tst_QLineEdit::clearInputMask()
QCOMPARE(testWidget->inputMask(), QString());
}
+#if QT_CONFIG(shortcut)
+
void tst_QLineEdit::keypress_inputMask_data()
{
QTest::addColumn<QString>("mask");
@@ -838,6 +848,8 @@ void tst_QLineEdit::keypress_inputMethod_inputMask()
QCOMPARE(testWidget->text(), QStringLiteral("EE.EE.EE"));
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QLineEdit::hasAcceptableInputMask_data()
{
QTest::addColumn<QString>("optionalMask");
@@ -1989,6 +2001,8 @@ void tst_QLineEdit::psKeyClick(QTestEventList &keys, Qt::Key key, Qt::KeyboardMo
keys.addKeyClick(key, pressState);
}
+#if QT_CONFIG(shortcut)
+
void tst_QLineEdit::addKeySequenceStandardKey(QTestEventList &keys, QKeySequence::StandardKey key)
{
QKeySequence keyseq = QKeySequence(key);
@@ -1996,6 +2010,8 @@ void tst_QLineEdit::addKeySequenceStandardKey(QTestEventList &keys, QKeySequence
keys.addKeyClick( Qt::Key( keyseq[i] & ~Qt::KeyboardModifierMask), Qt::KeyboardModifier(keyseq[i] & Qt::KeyboardModifierMask) );
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QLineEdit::cursorPosition()
{
QLineEdit *testWidget = ensureTestWidget();
@@ -3026,7 +3042,7 @@ void tst_QLineEdit::setSelection()
QCOMPARE(testWidget->cursorPosition(), expectedCursor);
}
-#ifndef QT_NO_CLIPBOARD
+#if QT_CONFIG(clipboard) && QT_CONFIG(shortcut)
void tst_QLineEdit::cut()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
@@ -3127,7 +3143,7 @@ void tst_QLineEdit::cutWithoutSelection()
QCOMPARE(clipboard->text(), origText.left(selectionLength));
}
-#endif // !QT_NO_CLIPBOARD
+#endif // QT_CONFIG(clipboard) && QT_CONFIG(shortcut)
class InputMaskValidator : public QValidator
{
@@ -3975,7 +3991,9 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
le.setReadOnly(true);
QAction action(QString::fromLatin1("hello"), &le);
+#if QT_CONFIG(shortcut)
action.setShortcut(QString::fromLatin1("p"));
+#endif
QSignalSpy spy(&action, SIGNAL(triggered()));
le.addAction(&action);
@@ -4710,6 +4728,8 @@ void tst_QLineEdit::QTBUG1266_setInputMaskEmittingTextEdited()
QCOMPARE(spy.count(), 0);
}
+#if QT_CONFIG(shortcut)
+
void tst_QLineEdit::shortcutOverrideOnReadonlyLineEdit_data()
{
QTest::addColumn<QKeySequence>("keySequence");
@@ -4769,6 +4789,8 @@ void tst_QLineEdit::shortcutOverrideOnReadonlyLineEdit()
QCOMPARE(spy.count(), activationCount);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QLineEdit::QTBUG59957_clearButtonLeftmostAction()
{
#ifndef QT_BUILD_INTERNAL
diff --git a/tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt b/tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt
new file mode 100644
index 0000000000..55bcf941d0
--- /dev/null
+++ b/tests/auto/widgets/widgets/qmainwindow/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qmainwindow.pro.
+
+#####################################################################
+## tst_qmainwindow Test:
+#####################################################################
+
+add_qt_test(tst_qmainwindow
+ SOURCES
+ tst_qmainwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt b/tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt
new file mode 100644
index 0000000000..961bd09492
--- /dev/null
+++ b/tests/auto/widgets/widgets/qmdiarea/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from qmdiarea.pro.
+
+#####################################################################
+## tst_qmdiarea Test:
+#####################################################################
+
+add_qt_test(tst_qmdiarea
+ SOURCES
+ tst_qmdiarea.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmdiarea CONDITION TARGET Qt::OpenGL
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
+
+extend_target(tst_qmdiarea CONDITION APPLE
+ PUBLIC_LIBRARIES
+ ${FWSecurity}
+)
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index e3b046e448..352a6314f3 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -2694,30 +2694,6 @@ void tst_QMdiArea::nativeSubWindows()
foreach (QMdiSubWindow *subWindow, mdiArea.subWindowList())
QVERIFY(subWindow->internalWinId());
}
-
-#ifndef QT_NO_OPENGL
- {
- if (!QGLFormat::hasOpenGL())
- QSKIP("QGL not supported on this platform");
-
- QMdiArea mdiArea;
- QGLWidget *glViewport = new QGLWidget;
- mdiArea.setViewport(glViewport);
- mdiArea.addSubWindow(new QWidget);
- mdiArea.addSubWindow(new QWidget);
- mdiArea.show();
- QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
-
- const QGLContext *context = glViewport->context();
- if (!context || !context->isValid())
- QSKIP("QGL is broken, cannot continue test");
-
- // The viewport and all the sub-windows must be native.
- QVERIFY(mdiArea.viewport()->internalWinId());
- foreach (QMdiSubWindow *subWindow, mdiArea.subWindowList())
- QVERIFY(subWindow->internalWinId());
- }
-#endif
}
void tst_QMdiArea::task_209615()
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt b/tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt
new file mode 100644
index 0000000000..791d411970
--- /dev/null
+++ b/tests/auto/widgets/widgets/qmdisubwindow/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qmdisubwindow.pro.
+
+#####################################################################
+## tst_qmdisubwindow Test:
+#####################################################################
+
+add_qt_test(tst_qmdisubwindow
+ SOURCES
+ tst_qmdisubwindow.cpp
+ DEFINES
+ QT_NO_CAST_FROM_ASCII
+ QT_NO_CAST_TO_ASCII
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/widgets/qmenu/CMakeLists.txt b/tests/auto/widgets/widgets/qmenu/CMakeLists.txt
new file mode 100644
index 0000000000..a20fe70492
--- /dev/null
+++ b/tests/auto/widgets/widgets/qmenu/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from qmenu.pro.
+
+#####################################################################
+## tst_qmenu Test:
+#####################################################################
+
+add_qt_test(tst_qmenu
+ SOURCES
+ tst_qmenu.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::TestPrivate
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmenu CONDITION APPLE_OSX
+ SOURCES
+ tst_qmenu_mac.mm
+ PUBLIC_LIBRARIES
+ objc
+)
+
+extend_target(tst_qmenu CONDITION NOT APPLE_OSX
+ DEFINES
+ QTEST_QPA_MOUSE_HANDLING
+)
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index d7d3a934f8..8ad4324c9e 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -483,7 +483,7 @@ void tst_QMenu::overrideMenuAction()
// On Mac and Windows CE, we need to create native key events to test menu
// action activation, so skip this part of the test.
-#if !defined(Q_OS_DARWIN)
+#if QT_CONFIG(shortcut) && !defined(Q_OS_DARWIN)
QAction *aQuit = new QAction("Quit", &w);
aQuit->setShortcut(QKeySequence("Ctrl+X"));
m->addAction(aQuit);
@@ -501,7 +501,7 @@ void tst_QMenu::overrideMenuAction()
//test if the menu still pops out
QTest::keyClick(&w, Qt::Key_F, Qt::AltModifier);
QTRY_VERIFY(m->isVisible());
-#endif
+#endif // QT_CONFIG(shortcut) && !Q_OS_DARWIN
delete aFileMenu;
@@ -1766,10 +1766,13 @@ void tst_QMenu::QTBUG_61039_menu_shortcuts()
QSKIP("Window activation is not supported");
QAction *actionKamen = new QAction("Action Kamen");
+#if QT_CONFIG(shortcut)
actionKamen->setShortcut(QKeySequence(QLatin1String("K")));
-
+#endif
QAction *actionJoe = new QAction("Action Joe");
+#if QT_CONFIG(shortcut)
actionJoe->setShortcut(QKeySequence(QLatin1String("Ctrl+J")));
+#endif
QMenu menu;
menu.addAction(actionKamen);
diff --git a/tests/auto/widgets/widgets/qmenubar/CMakeLists.txt b/tests/auto/widgets/widgets/qmenubar/CMakeLists.txt
new file mode 100644
index 0000000000..43875cd113
--- /dev/null
+++ b/tests/auto/widgets/widgets/qmenubar/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from qmenubar.pro.
+
+#####################################################################
+## tst_qmenubar Test:
+#####################################################################
+
+add_qt_test(tst_qmenubar
+ SOURCES
+ tst_qmenubar.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qmenubar CONDITION APPLE_OSX
+ SOURCES
+ tst_qmenubar_mac.mm
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index b255930138..8cbe821a68 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -232,19 +232,25 @@ TestMenu tst_QMenuBar::initSimpleMenuBar(QMenuBar *mb, bool forceNonNative) {
connect(mb, SIGNAL(triggered(QAction*)), this, SLOT(onSimpleActivated(QAction*)));
QMenu *menu = mb->addMenu(QStringLiteral("&accel"));
QAction *action = menu->addAction(QStringLiteral("menu1") );
+#if QT_CONFIG(shortcut)
action->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A));
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A));
+#endif
connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(onSimpleActivated(QAction*)));
result.menus << menu;
result.actions << action;
menu = mb->addMenu(QStringLiteral("accel1"));
action = menu->addAction(QStringLiteral("&Open...") );
+#if QT_CONFIG(shortcut)
action->setShortcut(Qt::Key_O);
+#endif
result.actions << action;
action = menu->addAction(QStringLiteral("action"));
+#if QT_CONFIG(shortcut)
action->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Z));
+#endif
result.actions << action;
result.menus << menu;
@@ -283,7 +289,9 @@ QAction *tst_QMenuBar::createCharacterAction(QMenu *menu, char lowerAscii)
QAction *action = menu->addAction(text);
action->setObjectName(text);
action->setData(QVariant(int(lowerAscii)));
+#if QT_CONFIG(shortcut)
action->setShortcut(Qt::CTRL + (lowerAscii - 'a' + Qt::Key_A));
+#endif
connect(action, SIGNAL(triggered()), this, SLOT(onComplexActionTriggered()));
return action;
}
@@ -318,7 +326,9 @@ TestMenu tst_QMenuBar::initComplexMenuBar(QMenuBar *mb)
QAction *action = mb->addAction(QStringLiteral("M&enu 3"));
action->setData(QVariant(3));
+#if QT_CONFIG(shortcut)
action->setShortcut(Qt::ALT + Qt::Key_J);
+#endif
connect(action, SIGNAL(triggered()), this, SLOT(onComplexActionTriggered()));
result.actions << action;
@@ -1422,7 +1432,9 @@ void tst_QMenuBar::taskQTBUG4965_escapeEaten()
menubar.setNativeMenuBar(false);
QMenu menu("menu1");
QAction *first = menubar.addMenu(&menu);
+#if QT_CONFIG(shortcut)
menu.addAction("quit", &menubar, SLOT(close()), QKeySequence("ESC"));
+#endif
centerOnScreen(&menubar);
menubar.show();
QApplication::setActiveWindow(&menubar);
diff --git a/tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt
new file mode 100644
index 0000000000..c3fdf39fe1
--- /dev/null
+++ b/tests/auto/widgets/widgets/qopenglwidget/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qopenglwidget.pro.
+
+#####################################################################
+## tst_qopenglwidget Test:
+#####################################################################
+
+add_qt_test(tst_qopenglwidget
+ SOURCES
+ tst_qopenglwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL
+ Qt::OpenGLPrivate
+ Qt::OpenGLWidgets
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
index 2d4cff9e10..792bbf4529 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
+++ b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
@@ -1,5 +1,5 @@
CONFIG += testcase
TARGET = tst_qopenglwidget
-QT += gui-private core-private testlib widgets
+QT += opengl opengl-private gui-private core-private testlib widgets openglwidgets
SOURCES += tst_qopenglwidget.cpp
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
index 17a5fe2cd9..73423d958b 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
+++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtWidgets/QOpenGLWidget>
+#include <QtOpenGLWidgets/QOpenGLWidget>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QPainter>
#include <QtGui/QScreen>
diff --git a/tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt b/tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt
new file mode 100644
index 0000000000..4106de04de
--- /dev/null
+++ b/tests/auto/widgets/widgets/qplaintextedit/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from qplaintextedit.pro.
+
+#####################################################################
+## tst_qplaintextedit Test:
+#####################################################################
+
+add_qt_test(tst_qplaintextedit
+ SOURCES
+ tst_qplaintextedit.cpp
+ INCLUDE_DIRECTORIES
+ ..
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qplaintextedit CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
diff --git a/tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt b/tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt
new file mode 100644
index 0000000000..f8b3ac38d9
--- /dev/null
+++ b/tests/auto/widgets/widgets/qprogressbar/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qprogressbar.pro.
+
+#####################################################################
+## tst_qprogressbar Test:
+#####################################################################
+
+add_qt_test(tst_qprogressbar
+ SOURCES
+ tst_qprogressbar.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt
new file mode 100644
index 0000000000..8d1300de79
--- /dev/null
+++ b/tests/auto/widgets/widgets/qpushbutton/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qpushbutton.pro.
+
+#####################################################################
+## tst_qpushbutton Test:
+#####################################################################
+
+add_qt_test(tst_qpushbutton
+ SOURCES
+ tst_qpushbutton.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 6f4838be7a..d0ed68c0c8 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -53,7 +53,9 @@ private slots:
void getSetCheck();
void autoRepeat();
void pressed();
+#if QT_CONFIG(shortcut)
void setAccel();
+#endif
void isCheckable();
void setDown();
void popupCrash();
@@ -65,7 +67,9 @@ private slots:
void defaultAndAutoDefault();
void sizeHint_data();
void sizeHint();
+#if QT_CONFIG(shortcut)
void taskQTBUG_20191_shortcutWithKeypadModifer();
+#endif
void emitReleasedAfterChange();
protected slots:
@@ -125,8 +129,10 @@ void tst_QPushButton::init()
testWidget->setDown( false );
testWidget->setText("Test");
testWidget->setEnabled( true );
+#if QT_CONFIG(shortcut)
QKeySequence seq;
testWidget->setShortcut( seq );
+#endif
resetCounters();
}
@@ -318,6 +324,8 @@ void tst_QPushButton::toggled()
QVERIFY( click_count == 1 );
}
+#if QT_CONFIG(shortcut)
+
/*
If we press an accelerator key we ONLY get a pressed signal and
NOT a released or clicked signal.
@@ -349,6 +357,8 @@ void tst_QPushButton::setAccel()
QTRY_VERIFY( !testWidget->isDown() );
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QPushButton::animateClick()
{
QVERIFY( !testWidget->isDown() );
@@ -571,6 +581,8 @@ void tst_QPushButton::sizeHint()
}
}
+#if QT_CONFIG(shortcut)
+
void tst_QPushButton::taskQTBUG_20191_shortcutWithKeypadModifer()
{
// setup a dialog with two buttons
@@ -617,6 +629,8 @@ void tst_QPushButton::taskQTBUG_20191_shortcutWithKeypadModifer()
QCOMPARE(spy2.count(), 1);
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QPushButton::emitReleasedAfterChange()
{
QPushButton *button1 = new QPushButton("A");
diff --git a/tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt b/tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt
new file mode 100644
index 0000000000..10db8a2db8
--- /dev/null
+++ b/tests/auto/widgets/widgets/qradiobutton/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qradiobutton.pro.
+
+#####################################################################
+## tst_qradiobutton Test:
+#####################################################################
+
+add_qt_test(tst_qradiobutton
+ SOURCES
+ tst_qradiobutton.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
index 7123acfdc3..5c7d3bf1e9 100644
--- a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
+++ b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
@@ -44,12 +44,16 @@ public:
virtual ~tst_QRadioButton(){};
private slots:
+#if QT_CONFIG(shortcut)
void task190739_focus();
+#endif
void minimumSizeHint();
private:
};
+#if QT_CONFIG(shortcut)
+
void tst_QRadioButton::task190739_focus()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
@@ -84,6 +88,7 @@ void tst_QRadioButton::task190739_focus()
QVERIFY(!radio1.hasFocus());
}
+#endif // QT_CONFIG(shortcut)
void tst_QRadioButton::minimumSizeHint()
{
diff --git a/tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt b/tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt
new file mode 100644
index 0000000000..cdfb32e0a2
--- /dev/null
+++ b/tests/auto/widgets/widgets/qscrollarea/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qscrollarea.pro.
+
+#####################################################################
+## tst_qscrollarea Test:
+#####################################################################
+
+add_qt_test(tst_qscrollarea
+ SOURCES
+ tst_qscrollarea.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt b/tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt
new file mode 100644
index 0000000000..83d091755f
--- /dev/null
+++ b/tests/auto/widgets/widgets/qscrollbar/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qscrollbar.pro.
+
+#####################################################################
+## tst_qscrollbar Test:
+#####################################################################
+
+add_qt_test(tst_qscrollbar
+ SOURCES
+ tst_qscrollbar.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::TestPrivate
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt b/tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt
new file mode 100644
index 0000000000..d3b28797f2
--- /dev/null
+++ b/tests/auto/widgets/widgets/qsizegrip/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsizegrip.pro.
+
+#####################################################################
+## tst_qsizegrip Test:
+#####################################################################
+
+add_qt_test(tst_qsizegrip
+ SOURCES
+ tst_qsizegrip.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qslider/CMakeLists.txt b/tests/auto/widgets/widgets/qslider/CMakeLists.txt
new file mode 100644
index 0000000000..583f12a1fb
--- /dev/null
+++ b/tests/auto/widgets/widgets/qslider/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qslider.pro.
+
+#####################################################################
+## tst_qslider Test:
+#####################################################################
+
+add_qt_test(tst_qslider
+ SOURCES
+ tst_qslider.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qspinbox/CMakeLists.txt b/tests/auto/widgets/widgets/qspinbox/CMakeLists.txt
new file mode 100644
index 0000000000..826de28cb4
--- /dev/null
+++ b/tests/auto/widgets/widgets/qspinbox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qspinbox.pro.
+
+#####################################################################
+## tst_qspinbox Test:
+#####################################################################
+
+add_qt_test(tst_qspinbox
+ SOURCES
+ tst_qspinbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index f8022559b2..a8b47ffc46 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -47,7 +47,9 @@
#include <QLocale>
#include <QDoubleSpinBox>
#include <QVBoxLayout>
-#include <QKeySequence>
+#if QT_CONFIG(shortcut)
+# include <QKeySequence>
+#endif
#include <QStackedWidget>
#include <QDebug>
#include <QStyleOptionSpinBox>
@@ -173,7 +175,10 @@ private slots:
void removeAll();
void startWithDash();
+
+#if QT_CONFIG(shortcut)
void undoRedo();
+#endif
void specialValue();
void textFromValue();
@@ -1025,6 +1030,8 @@ void tst_QSpinBox::startWithDash()
QCOMPARE(spin.text(), QString("0"));
}
+#if QT_CONFIG(shortcut)
+
void tst_QSpinBox::undoRedo()
{
//test undo/redo feature (in conjunction with the "undoRedoEnabled" property)
@@ -1077,6 +1084,8 @@ void tst_QSpinBox::undoRedo()
QVERIFY(!spin.lineEdit()->isRedoAvailable());
}
+#endif // QT_CONFIG(shortcut)
+
void tst_QSpinBox::specialValue()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
@@ -1821,9 +1830,9 @@ void tst_QSpinBox::stepModifierPressAndHold()
stepModifierStyle->stepModifier = static_cast<Qt::KeyboardModifier>(stepModifier);
spin.setStyle(stepModifierStyle.data());
- QSignalSpy spy(&spin, QOverload<int>::of(&SpinBox::valueChanged));
+ QSignalSpy spy(&spin, &SpinBox::valueChanged);
// TODO: remove debug output when QTBUG-69492 is fixed
- connect(&spin, QOverload<int>::of(&SpinBox::valueChanged), [=]() {
+ connect(&spin, &SpinBox::valueChanged, [=]() {
qDebug() << QTime::currentTime() << "valueChanged emitted";
});
diff --git a/tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt b/tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt
new file mode 100644
index 0000000000..babe84f43e
--- /dev/null
+++ b/tests/auto/widgets/widgets/qsplashscreen/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qsplashscreen.pro.
+
+#####################################################################
+## tst_qsplashscreen Test:
+#####################################################################
+
+add_qt_test(tst_qsplashscreen
+ SOURCES
+ tst_qsplashscreen.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qsplitter/CMakeLists.txt b/tests/auto/widgets/widgets/qsplitter/CMakeLists.txt
new file mode 100644
index 0000000000..98c165f034
--- /dev/null
+++ b/tests/auto/widgets/widgets/qsplitter/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qsplitter.pro.
+
+#####################################################################
+## tst_qsplitter Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "extradata.txt")
+list(APPEND test_data "setSizes3.dat")
+
+add_qt_test(tst_qsplitter
+ SOURCES
+ tst_qsplitter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt
new file mode 100644
index 0000000000..37807eb73a
--- /dev/null
+++ b/tests/auto/widgets/widgets/qstackedwidget/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qstackedwidget.pro.
+
+#####################################################################
+## tst_qstackedwidget Test:
+#####################################################################
+
+add_qt_test(tst_qstackedwidget
+ SOURCES
+ tst_qstackedwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt b/tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt
new file mode 100644
index 0000000000..56f3c960fd
--- /dev/null
+++ b/tests/auto/widgets/widgets/qstatusbar/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qstatusbar.pro.
+
+#####################################################################
+## tst_qstatusbar Test:
+#####################################################################
+
+add_qt_test(tst_qstatusbar
+ SOURCES
+ tst_qstatusbar.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qtabbar/CMakeLists.txt b/tests/auto/widgets/widgets/qtabbar/CMakeLists.txt
new file mode 100644
index 0000000000..d23d23d88f
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtabbar/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtabbar.pro.
+
+#####################################################################
+## tst_qtabbar Test:
+#####################################################################
+
+add_qt_test(tst_qtabbar
+ SOURCES
+ tst_qtabbar.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt
new file mode 100644
index 0000000000..9bd0018082
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from qtabwidget.pro.
+
+#####################################################################
+## tst_qtabwidget Test:
+#####################################################################
+
+add_qt_test(tst_qtabwidget
+ SOURCES
+ tst_qtabwidget.cpp
+ INCLUDE_DIRECTORIES
+ ..
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtabwidget CONDITION WIN32 AND NOT WINRT
+ PUBLIC_LIBRARIES
+ user32
+)
diff --git a/tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt b/tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt
new file mode 100644
index 0000000000..503dc32a83
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtextbrowser/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Generated from qtextbrowser.pro.
+
+#####################################################################
+## tst_qtextbrowser Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.html)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.md)
+list(APPEND test_data ${test_data_glob})
+list(APPEND test_data "markdown.really")
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ subdir/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qtextbrowser
+ SOURCES
+ tst_qtextbrowser.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextbrowser CONDITION builtin_testdata
+ DEFINES
+ BUILTIN_TESTDATA
+)
diff --git a/tests/auto/widgets/widgets/qtextedit/CMakeLists.txt b/tests/auto/widgets/widgets/qtextedit/CMakeLists.txt
new file mode 100644
index 0000000000..61641707b9
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtextedit/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from qtextedit.pro.
+
+#####################################################################
+## tst_qtextedit Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "fullWidthSelection")
+
+add_qt_test(tst_qtextedit
+ SOURCES
+ tst_qtextedit.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qtextedit CONDITION APPLE_OSX
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+)
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 485a0b0f93..bd287eb225 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -2136,7 +2136,7 @@ void tst_QTextEdit::compareWidgetAndImage(QTextEdit &widget, const QString &imag
QCOMPARE(image.depth(), 32);
QCOMPARE(original.depth(), image.depth());
- const int bytesPerLine = image.bytesPerLine();
+ const qsizetype bytesPerLine = image.bytesPerLine();
const int width = image.width();
const int height = image.height();
diff --git a/tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt b/tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt
new file mode 100644
index 0000000000..d3aef03fa1
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtoolbar/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtoolbar.pro.
+
+#####################################################################
+## tst_qtoolbar Test:
+#####################################################################
+
+add_qt_test(tst_qtoolbar
+ SOURCES
+ tst_qtoolbar.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
diff --git a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
index 61252831ed..1d5ac7c819 100644
--- a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
@@ -40,7 +40,9 @@
#include <qwidgetaction.h>
#include <qtoolbutton.h>
#include <qlineedit.h>
-#include <qkeysequence.h>
+#if QT_CONFIG(shortcut)
+# include <qkeysequence.h>
+#endif
#include <qmenu.h>
#include <qlabel.h>
#include <private/qtoolbarextension_p.h>
diff --git a/tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt b/tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt
new file mode 100644
index 0000000000..dc3e5d016c
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtoolbox/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtoolbox.pro.
+
+#####################################################################
+## tst_qtoolbox Test:
+#####################################################################
+
+add_qt_test(tst_qtoolbox
+ SOURCES
+ tst_qtoolbox.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt b/tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt
new file mode 100644
index 0000000000..ae36488341
--- /dev/null
+++ b/tests/auto/widgets/widgets/qtoolbutton/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qtoolbutton.pro.
+
+#####################################################################
+## tst_qtoolbutton Test:
+#####################################################################
+
+add_qt_test(tst_qtoolbutton
+ SOURCES
+ tst_qtoolbutton.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/widgets/widgets/widgets.pro b/tests/auto/widgets/widgets/widgets.pro
index c6325aac15..66950fa85a 100644
--- a/tests/auto/widgets/widgets/widgets.pro
+++ b/tests/auto/widgets/widgets/widgets.pro
@@ -47,6 +47,9 @@ SUBDIRS=\
qtoolbox \
qtoolbutton \
+!qtConfig(shortcut): SUBDIRS -= \
+ qkeysequenceedit
+
# The following tests depend on private API:
!qtConfig(private_tests): SUBDIRS -= \
qabstractspinbox \
diff --git a/tests/auto/xml/CMakeLists.txt b/tests/auto/xml/CMakeLists.txt
new file mode 100644
index 0000000000..703cba344d
--- /dev/null
+++ b/tests/auto/xml/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from xml.pro.
+
+add_subdirectory(dom)
+add_subdirectory(sax)
diff --git a/tests/auto/xml/dom/CMakeLists.txt b/tests/auto/xml/dom/CMakeLists.txt
new file mode 100644
index 0000000000..08a7621e88
--- /dev/null
+++ b/tests/auto/xml/dom/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from dom.pro.
+
+add_subdirectory(qdom)
diff --git a/tests/auto/xml/dom/qdom/CMakeLists.txt b/tests/auto/xml/dom/qdom/CMakeLists.txt
new file mode 100644
index 0000000000..be70ec08cc
--- /dev/null
+++ b/tests/auto/xml/dom/qdom/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qdom.pro.
+
+#####################################################################
+## tst_qdom Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ testdata/*)
+list(APPEND test_data ${test_data_glob})
+list(APPEND test_data "doubleNamespaces.xml")
+list(APPEND test_data "umlaut.xml")
+
+add_qt_test(tst_qdom
+ SOURCES
+ tst_qdom.cpp
+ PUBLIC_LIBRARIES
+ Qt::Xml
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index a2a5b22cad..9cb06f5185 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -33,7 +33,7 @@
#include <QDebug>
#include <QFile>
#include <QList>
-#include <QRegExp>
+#include <QRegularExpression>
#include <QTextStream>
#include <QtTest/QtTest>
#include <QtXml>
@@ -517,10 +517,10 @@ void tst_QDom::save_data()
QTest::addColumn<int>("indent");
QTest::addColumn<QString>("res");
- QTest::newRow( "01" ) << doc01 << 0 << QString(doc01).replace( QRegExp(" "), "" );
+ QTest::newRow( "01" ) << doc01 << 0 << QString(doc01).replace( QRegularExpression(" "), "" );
QTest::newRow( "02" ) << doc01 << 1 << doc01;
- QTest::newRow( "03" ) << doc01 << 2 << QString(doc01).replace( QRegExp(" "), " " );
- QTest::newRow( "04" ) << doc01 << 10 << QString(doc01).replace( QRegExp(" "), " " );
+ QTest::newRow( "03" ) << doc01 << 2 << QString(doc01).replace( QRegularExpression(" "), " " );
+ QTest::newRow( "04" ) << doc01 << 10 << QString(doc01).replace( QRegularExpression(" "), " " );
}
void tst_QDom::save()
diff --git a/tests/auto/xml/sax/CMakeLists.txt b/tests/auto/xml/sax/CMakeLists.txt
new file mode 100644
index 0000000000..dd826d5e4f
--- /dev/null
+++ b/tests/auto/xml/sax/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from sax.pro.
+
+add_subdirectory(qxml)
+if(TARGET Qt::Network)
+ add_subdirectory(qxmlinputsource)
+ add_subdirectory(qxmlsimplereader)
+endif()
diff --git a/tests/auto/xml/sax/qxml/CMakeLists.txt b/tests/auto/xml/sax/qxml/CMakeLists.txt
new file mode 100644
index 0000000000..bfbf7fe979
--- /dev/null
+++ b/tests/auto/xml/sax/qxml/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qxml.pro.
+
+#####################################################################
+## tst_qxml Test:
+#####################################################################
+
+# Collect test data
+list(APPEND test_data "0x010D.xml")
+
+add_qt_test(tst_qxml
+ SOURCES
+ tst_qxml.cpp
+ PUBLIC_LIBRARIES
+ Qt::Xml
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/xml/sax/qxmlinputsource/CMakeLists.txt b/tests/auto/xml/sax/qxmlinputsource/CMakeLists.txt
new file mode 100644
index 0000000000..48ba5f6e3f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlinputsource/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qxmlinputsource.pro.
+
+#####################################################################
+## tst_qxmlinputsource Test:
+#####################################################################
+
+add_qt_test(tst_qxmlinputsource
+ SOURCES
+ tst_qxmlinputsource.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Xml
+)
diff --git a/tests/auto/xml/sax/qxmlsimplereader/CMakeLists.txt b/tests/auto/xml/sax/qxmlsimplereader/CMakeLists.txt
new file mode 100644
index 0000000000..19fa0a002f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from qxmlsimplereader.pro.
+
+#####################################################################
+## tst_qxmlsimplereader Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ encodings/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ xmldocs/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qxmlsimplereader
+ SOURCES
+ parser/parser.cpp parser/parser.h
+ tst_qxmlsimplereader.cpp
+ INCLUDE_DIRECTORIES
+ parser
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Xml
+ TESTDATA ${test_data}
+)
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/CMakeLists.txt b/tests/auto/xml/sax/qxmlsimplereader/parser/CMakeLists.txt
new file mode 100644
index 0000000000..6ffb17ac0f
--- /dev/null
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/CMakeLists.txt
@@ -0,0 +1,19 @@
+# special case skip regeneration
+
+cmake_minimum_required(VERSION 3.14.0)
+
+project(Parser CXX)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Xml)
+
+add_executable(parser)
+
+target_sources(parser PRIVATE
+ main.cpp
+ parser.cpp
+ parser.h
+)
+
+target_link_libraries(parser PRIVATE
+ Qt::Gui
+ Qt::Xml
+)
diff --git a/tests/baselineserver/shared/baselineprotocol.cpp b/tests/baselineserver/shared/baselineprotocol.cpp
index 9e5321cb1b..d11369f3d2 100644
--- a/tests/baselineserver/shared/baselineprotocol.cpp
+++ b/tests/baselineserver/shared/baselineprotocol.cpp
@@ -223,8 +223,8 @@ quint32 *pb); /* IN: more seed OUT: secondary hash value */
quint64 ImageItem::computeChecksum(const QImage &image)
{
QImage img(image);
- const int bpl = img.bytesPerLine();
- const int padBytes = bpl - (img.width() * img.depth() / 8);
+ const qsizetype bpl = img.bytesPerLine();
+ const int padBytes = bpl - (qsizetype(img.width()) * img.depth() / 8);
if (padBytes) {
uchar *p = img.bits() + bpl - padBytes;
const int h = img.height();
diff --git a/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt
new file mode 100644
index 0000000000..a59ba35e50
--- /dev/null
+++ b/tests/benchmarks/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from benchmarks.pro.
+
+add_subdirectory(corelib)
+add_subdirectory(sql)
+if(TARGET Qt::DBus)
+ add_subdirectory(dbus)
+endif()
+if(TARGET Qt::Gui)
+ add_subdirectory(gui)
+endif()
+if(TARGET Qt::Network)
+ add_subdirectory(network)
+endif()
+if(TARGET Qt::Test)
+ add_subdirectory(testlib)
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(widgets)
+endif()
diff --git a/tests/benchmarks/corelib/CMakeLists.txt b/tests/benchmarks/corelib/CMakeLists.txt
new file mode 100644
index 0000000000..3414c39ef8
--- /dev/null
+++ b/tests/benchmarks/corelib/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from corelib.pro.
+
+add_subdirectory(io)
+add_subdirectory(json)
+add_subdirectory(mimetypes)
+add_subdirectory(kernel)
+add_subdirectory(text)
+add_subdirectory(thread)
+add_subdirectory(time)
+add_subdirectory(tools)
+add_subdirectory(codecs)
+add_subdirectory(plugin)
diff --git a/tests/benchmarks/corelib/codecs/CMakeLists.txt b/tests/benchmarks/corelib/codecs/CMakeLists.txt
new file mode 100644
index 0000000000..56f8edcc9e
--- /dev/null
+++ b/tests/benchmarks/corelib/codecs/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from codecs.pro.
+
+add_subdirectory(qtextcodec)
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt
new file mode 100644
index 0000000000..ea6ed8519b
--- /dev/null
+++ b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtextcodec.pro.
+
+#####################################################################
+## tst_bench_qtextcodec Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtextcodec
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtextcodec.pro:<TRUE>:
+# TESTDATA = "utf-8.txt"
diff --git a/tests/benchmarks/corelib/io/CMakeLists.txt b/tests/benchmarks/corelib/io/CMakeLists.txt
new file mode 100644
index 0000000000..3419c4a28c
--- /dev/null
+++ b/tests/benchmarks/corelib/io/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from io.pro.
+
+add_subdirectory(qdir)
+add_subdirectory(qdiriterator)
+add_subdirectory(qfile)
+add_subdirectory(qfileinfo)
+add_subdirectory(qiodevice)
+add_subdirectory(qtemporaryfile)
+add_subdirectory(qtextstream)
+if(QT_FEATURE_process)
+ add_subdirectory(qprocess)
+endif()
diff --git a/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt
new file mode 100644
index 0000000000..51f603b595
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from 10000.pro.
+
+#####################################################################
+## tst_bench_qdir_10000 Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qdir_10000
+ SOURCES
+ bench_qdir_10000.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:10000.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/io/qdir/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/CMakeLists.txt
new file mode 100644
index 0000000000..10185014fa
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qdir/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from qdir.pro.
+
+add_subdirectory(10000)
diff --git a/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt
new file mode 100644
index 0000000000..e3102a3389
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from tree.pro.
+
+#####################################################################
+## bench_qdir_tree Binary:
+#####################################################################
+
+add_qt_benchmark(bench_qdir_tree
+ SOURCES
+ bench_qdir_tree.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+# Resources:
+set(bench_qdir_tree_resource_files
+ "4.6.0-list.txt"
+)
+
+add_qt_resource(bench_qdir_tree "bench_qdir_tree"
+ PREFIX
+ "/"
+ FILES
+ ${bench_qdir_tree_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:tree.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt b/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt
new file mode 100644
index 0000000000..b1e86861b6
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qdiriterator.pro.
+
+#####################################################################
+## tst_bench_qdiriterator Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qdiriterator
+ SOURCES
+ main.cpp
+ qfilesystemiterator.cpp qfilesystemiterator.h
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qdiriterator CONDITION (QT_FEATURE_cxx17_filesystem) AND (GCC AND (QMAKE_GCC_MAJOR_VERSION LESS 9))
+ LINK_OPTIONS
+ "-lstdc++fs"
+)
diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index eae752d99a..5b10a4a689 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
@@ -44,9 +44,15 @@
#include "qfilesystemiterator.h"
+#if QT_CONFIG(cxx17_filesystem)
+#include <filesystem>
+#endif
+
class tst_qdiriterator : public QObject
{
Q_OBJECT
+
+ void data();
private slots:
void posix();
void posix_data() { data(); }
@@ -54,7 +60,8 @@ private slots:
void diriterator_data() { data(); }
void fsiterator();
void fsiterator_data() { data(); }
- void data();
+ void stdRecursiveDirectoryIterator();
+ void stdRecursiveDirectoryIterator_data() { data(); }
};
@@ -235,6 +242,28 @@ void tst_qdiriterator::fsiterator()
qDebug() << count;
}
+void tst_qdiriterator::stdRecursiveDirectoryIterator()
+{
+#if QT_CONFIG(cxx17_filesystem)
+ QFETCH(QByteArray, dirpath);
+
+ int count = 0;
+
+ QBENCHMARK {
+ int c = 0;
+ for (auto obj : std::filesystem::recursive_directory_iterator(dirpath.data())) {
+ if (obj.is_directory())
+ continue;
+ c++;
+ }
+ count = c;
+ }
+ qDebug() << count;
+#else
+ QSKIP("Not supported.");
+#endif
+}
+
QTEST_MAIN(tst_qdiriterator)
#include "main.moc"
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
index 061b22a5d1..609a578321 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
@@ -3,6 +3,12 @@ TARGET = tst_bench_qdiriterator
QT = core testlib
CONFIG += release
+# Enable c++17 support for std::filesystem
+qtConfig(cxx17_filesystem) {
+ CONFIG += c++17
+ gcc:lessThan(QMAKE_GCC_MAJOR_VERSION, 9): \
+ QMAKE_LFLAGS += -lstdc++fs
+}
SOURCES += main.cpp qfilesystemiterator.cpp
HEADERS += qfilesystemiterator.h
diff --git a/tests/benchmarks/corelib/io/qfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt
new file mode 100644
index 0000000000..7d1e19d75a
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from qfile.pro.
+
+#####################################################################
+## tst_bench_qfile Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qfile
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qfile.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qfile CONDITION WIN32
+ DEFINES
+ _CRT_SECURE_NO_WARNINGS
+)
diff --git a/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt b/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt
new file mode 100644
index 0000000000..195419f52e
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qfileinfo.pro.
+
+#####################################################################
+## tst_bench_qfileinfo Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qfileinfo
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qfileinfo.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt b/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt
new file mode 100644
index 0000000000..7663bdb99d
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qiodevice.pro.
+
+#####################################################################
+## tst_bench_qiodevice Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qiodevice
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qiodevice.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt
new file mode 100644
index 0000000000..d599539142
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qprocess.pro.
+
+add_subdirectory(testProcessLoopback)
+add_subdirectory(test)
diff --git a/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt
new file mode 100644
index 0000000000..00bbe74c2d
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_bench_qprocess Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qprocess
+ SOURCES
+ ../tst_bench_qprocess.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt
new file mode 100644
index 0000000000..44b18a4826
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from testProcessLoopback.pro.
+
+#####################################################################
+## testProcessLoopback Binary:
+#####################################################################
+
+add_qt_benchmark(testProcessLoopback
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(testProcessLoopback CONDITION WINRT
+ LINK_OPTIONS
+ "/ENTRY:mainCRTStartup"
+)
diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt
new file mode 100644
index 0000000000..82b885bb17
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtemporaryfile.pro.
+
+#####################################################################
+## tst_bench_qtemporaryfile Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtemporaryfile
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtemporaryfile.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt b/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt
new file mode 100644
index 0000000000..6dd11f1bbb
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qtextstream.pro.
+
+#####################################################################
+## tst_bench_qtextstream Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtextstream
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtextstream.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/io/qurl/CMakeLists.txt b/tests/benchmarks/corelib/io/qurl/CMakeLists.txt
new file mode 100644
index 0000000000..26d98b7eb4
--- /dev/null
+++ b/tests/benchmarks/corelib/io/qurl/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from qurl.pro.
+
+#####################################################################
+## tst_qurl Binary:
+#####################################################################
+
+add_qt_benchmark(tst_qurl
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qurl.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_qurl CONDITION WIN32
+ DEFINES
+ _CRT_SECURE_NO_WARNINGS
+)
diff --git a/tests/benchmarks/corelib/json/CMakeLists.txt b/tests/benchmarks/corelib/json/CMakeLists.txt
new file mode 100644
index 0000000000..312cae8a45
--- /dev/null
+++ b/tests/benchmarks/corelib/json/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from json.pro.
+
+#####################################################################
+## tst_bench_qtbinaryjson Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtbinaryjson
+ SOURCES
+ tst_bench_qtbinaryjson.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:json.pro:<TRUE>:
+# TESTDATA = "numbers.json" "test.json"
diff --git a/tests/benchmarks/corelib/kernel/CMakeLists.txt b/tests/benchmarks/corelib/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..2b41ea30f7
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from kernel.pro.
+
+add_subdirectory(events)
+add_subdirectory(qmetatype)
+add_subdirectory(qvariant)
+add_subdirectory(qcoreapplication)
+add_subdirectory(qtimer_vs_qmetaobject)
+if(TARGET Qt::Widgets)
+ add_subdirectory(qmetaobject)
+ add_subdirectory(qobject)
+endif()
diff --git a/tests/benchmarks/corelib/kernel/events/CMakeLists.txt b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt
new file mode 100644
index 0000000000..1e35891126
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from events.pro.
+
+#####################################################################
+## tst_bench_events Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_events
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:events.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt
new file mode 100644
index 0000000000..173b3b9077
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qcoreapplication.pro.
+
+#####################################################################
+## tst_bench_qcoreapplication Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qcoreapplication
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qcoreapplication.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt
new file mode 100644
index 0000000000..e6da0721d3
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qmetaobject.pro.
+
+#####################################################################
+## tst_bench_qmetaobject Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qmetaobject
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qmetaobject.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt
new file mode 100644
index 0000000000..00ca47aadc
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qmetatype.pro.
+
+#####################################################################
+## tst_bench_qmetatype Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qmetatype
+ SOURCES
+ tst_qmetatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qmetatype.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt
new file mode 100644
index 0000000000..4644708b54
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qobject.pro.
+
+#####################################################################
+## tst_bench_qobject Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qobject
+ SOURCES
+ main.cpp
+ object.cpp object.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qobject.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp
index 04ca69ad3b..918227f74e 100644
--- a/tests/benchmarks/corelib/kernel/qobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp
@@ -51,8 +51,55 @@ private slots:
void connect_disconnect_benchmark_data();
void connect_disconnect_benchmark();
void receiver_destroyed_benchmark();
+
+ void stdAllocator();
};
+class QObjectUsingStandardAllocator : public QObject
+{
+ Q_OBJECT
+public:
+ QObjectUsingStandardAllocator()
+ {
+ }
+};
+
+template<class T>
+inline void allocator()
+{
+ // We need to allocate certain amount of objects otherwise the new implementation
+ // may re-use the previous allocation, hiding the somehow high cost of allocation. It
+ // also helps us to reduce the noise ratio, which is high for memory allocation.
+ //
+ // The check depends on memory allocation performance, which is quite non-deterministic.
+ // When a new memory is requested, the new operator, depending on implementation, is trying
+ // to re-use existing, already allocated for the process memory. If there is not enough, it
+ // asks OS to give more. Of course the first case is faster then the second. In the same
+ // time, from an application perspective the first is also more likely.
+ //
+ // As a result, depending on which use-case one wants to test, it may be recommended to run this
+ // test in separation from others, to "force" expensive code path in the memory allocation.
+ //
+ // The time based results are heavily affected by background noise. One really needs to
+ // prepare OS (no other tasks, CPU and RAM reservations) to run this test, or use
+ // instruction counting which seems to be less fragile.
+
+ const int count = 256 * 1024;
+
+ QScopedPointer<T> objects[count];
+ QBENCHMARK_ONCE {
+ for (int i = 0; i < count; ++i)
+ objects[i].reset(new T);
+ for (int i = 0; i < count; ++i)
+ objects[i].reset();
+ }
+}
+
+void QObjectBenchmark::stdAllocator()
+{
+ allocator<QObjectUsingStandardAllocator>();
+}
+
struct Functor {
void operator()(){}
};
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4160fe7e36
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtimer_vs_qmetaobject.pro.
+
+#####################################################################
+## qtimer_vs_qmetaobject Binary:
+#####################################################################
+
+add_qt_benchmark(qtimer_vs_qmetaobject
+ SOURCES
+ tst_qtimer_vs_qmetaobject.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtimer_vs_qmetaobject.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt
new file mode 100644
index 0000000000..c76c4dca18
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qtimer_vs_qmetaobject.pro.
+
+#####################################################################
+## qtimer_vs_qmetaobject Binary:
+#####################################################################
+
+add_qt_benchmark(qtimer_vs_qmetaobject
+ SOURCES
+ tst_qtimer_vs_qmetaobject.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Test
+ Threads::Threads # special case
+)
+
+#### Keys ignored in scope 1:.:.:qtimer_vs_qmetaobject.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt
new file mode 100644
index 0000000000..5e5230566d
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qvariant.pro.
+
+#####################################################################
+## tst_bench_qvariant Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qvariant
+ SOURCES
+ tst_qvariant.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qvariant CONDITION NOT TARGET Qt::Gui
+ PUBLIC_LIBRARIES
+ # Remove: gui
+)
diff --git a/tests/benchmarks/corelib/mimetypes/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/CMakeLists.txt
new file mode 100644
index 0000000000..c825780e69
--- /dev/null
+++ b/tests/benchmarks/corelib/mimetypes/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from mimetypes.pro.
+
+add_subdirectory(qmimedatabase)
diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt
new file mode 100644
index 0000000000..7d6b6dc4f8
--- /dev/null
+++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmimedatabase.pro.
+
+#####################################################################
+## tst_bench_qmimedatabase Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qmimedatabase
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/plugin/CMakeLists.txt b/tests/benchmarks/corelib/plugin/CMakeLists.txt
new file mode 100644
index 0000000000..3ae12b23f5
--- /dev/null
+++ b/tests/benchmarks/corelib/plugin/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from plugin.pro.
+
+add_subdirectory(quuid)
diff --git a/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt
new file mode 100644
index 0000000000..2251914957
--- /dev/null
+++ b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from quuid.pro.
+
+#####################################################################
+## tst_bench_quuid Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_quuid
+ SOURCES
+ tst_quuid.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:quuid.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/text/CMakeLists.txt b/tests/benchmarks/corelib/text/CMakeLists.txt
new file mode 100644
index 0000000000..8319d1bf3b
--- /dev/null
+++ b/tests/benchmarks/corelib/text/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from text.pro.
+
+add_subdirectory(qbytearray)
+add_subdirectory(qchar)
+add_subdirectory(qlocale)
+add_subdirectory(qstringbuilder)
+add_subdirectory(qstringlist)
+if(GCC)
+ add_subdirectory(qstring)
+endif()
diff --git a/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt b/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt
new file mode 100644
index 0000000000..9c7fae62eb
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qbytearray.pro.
+
+#####################################################################
+## tst_bench_qbytearray Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qbytearray
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qbytearray.pro:<TRUE>:
+# TEMPLATE = "app"
+# TESTDATA = "main.cpp"
diff --git a/tests/benchmarks/corelib/text/qchar/CMakeLists.txt b/tests/benchmarks/corelib/text/qchar/CMakeLists.txt
new file mode 100644
index 0000000000..ba99813d2b
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qchar/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qchar.pro.
+
+#####################################################################
+## tst_bench_qchar Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qchar
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt
new file mode 100644
index 0000000000..7e67472013
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qlocale.pro.
+
+#####################################################################
+## tst_bench_qlocale Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qlocale
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt b/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt
new file mode 100644
index 0000000000..e1dcd5c131
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt
@@ -0,0 +1,46 @@
+# Generated from qregexp.pro.
+
+#####################################################################
+## tst_bench_qregexp Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qregexp
+ EXCEPTIONS
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+# Resources:
+set(qregexp_resource_files
+ "main.cpp"
+)
+
+add_qt_resource(tst_bench_qregexp "qregexp"
+ PREFIX
+ "/"
+ FILES
+ ${qregexp_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qregexp.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qregexp CONDITION TARGET Qt::Script AND NOT pcre
+ DEFINES
+ HAVE_JSC
+ PUBLIC_LIBRARIES
+ Qt::Script
+)
+
+extend_target(tst_bench_qregexp CONDITION (NOT QNX) AND (EXISTS _ss_[QT_SYSROOT]/usr/include/boost/regex.hpp)
+ DEFINES
+ HAVE_BOOST
+ PUBLIC_LIBRARIES
+ boost_regex
+)
diff --git a/tests/benchmarks/corelib/text/qstring/CMakeLists.txt b/tests/benchmarks/corelib/text/qstring/CMakeLists.txt
new file mode 100644
index 0000000000..2999cb4682
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qstring/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstring.pro.
+
+#####################################################################
+## tst_bench_qstring Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qstring
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt b/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt
new file mode 100644
index 0000000000..e326414d7a
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qstringbuilder.pro.
+
+#####################################################################
+## tst_bench_qstringbuilder Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qstringbuilder
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+ COMPILE_OPTIONS
+ -g
+)
+
+#### Keys ignored in scope 1:.:.:qstringbuilder.pro:<TRUE>:
+# QMAKE_CFLAGS = "-g"
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt b/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt
new file mode 100644
index 0000000000..a341f1aaa8
--- /dev/null
+++ b/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qstringlist.pro.
+
+#####################################################################
+## tst_bench_qstringlist Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qstringlist
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/thread/CMakeLists.txt b/tests/benchmarks/corelib/thread/CMakeLists.txt
new file mode 100644
index 0000000000..dc257262a3
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from thread.pro.
+
+add_subdirectory(qmutex)
+add_subdirectory(qreadwritelock)
+add_subdirectory(qthreadstorage)
+add_subdirectory(qthreadpool)
+add_subdirectory(qwaitcondition)
diff --git a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt
new file mode 100644
index 0000000000..71226282ab
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qmutex.pro.
+
+#####################################################################
+## tst_bench_qmutex Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qmutex
+ SOURCES
+ tst_qmutex.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qmutex.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt
new file mode 100644
index 0000000000..d582dba8db
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qreadwritelock.pro.
+
+#####################################################################
+## tst_bench_qreadwritelock Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qreadwritelock
+ SOURCES
+ tst_qreadwritelock.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qreadwritelock.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt
new file mode 100644
index 0000000000..00dbc9c298
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qthreadpool.pro.
+
+#####################################################################
+## tst_bench_qthreadpool Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qthreadpool
+ SOURCES
+ tst_qthreadpool.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qthreadpool.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt
new file mode 100644
index 0000000000..ed60ec4495
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qthreadstorage.pro.
+
+#####################################################################
+## tst_bench_qthreadstorage Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qthreadstorage
+ SOURCES
+ tst_qthreadstorage.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qthreadstorage.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt
new file mode 100644
index 0000000000..4de82d7cc9
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qwaitcondition.pro.
+
+#####################################################################
+## tst_bench_qwaitcondition Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qwaitcondition
+ SOURCES
+ tst_qwaitcondition.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qwaitcondition.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/time/CMakeLists.txt b/tests/benchmarks/corelib/time/CMakeLists.txt
new file mode 100644
index 0000000000..086650edb6
--- /dev/null
+++ b/tests/benchmarks/corelib/time/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from time.pro.
+
+add_subdirectory(qdate)
+add_subdirectory(qdatetime)
+add_subdirectory(qtimezone)
diff --git a/tests/benchmarks/corelib/time/qdate/CMakeLists.txt b/tests/benchmarks/corelib/time/qdate/CMakeLists.txt
new file mode 100644
index 0000000000..7ae18a42f5
--- /dev/null
+++ b/tests/benchmarks/corelib/time/qdate/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdate.pro.
+
+#####################################################################
+## tst_bench_qdate Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qdate
+ SOURCES
+ tst_bench_qdate.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt
new file mode 100644
index 0000000000..b44f1a5bfc
--- /dev/null
+++ b/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qdatetime.pro.
+
+#####################################################################
+## tst_bench_qdatetime Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qdatetime
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt
new file mode 100644
index 0000000000..60e8ceba13
--- /dev/null
+++ b/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qtimezone.pro.
+
+#####################################################################
+## tst_bench_qtimezone Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtimezone
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/CMakeLists.txt b/tests/benchmarks/corelib/tools/CMakeLists.txt
new file mode 100644
index 0000000000..6aed3d0f90
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from tools.pro.
+
+add_subdirectory(containers-associative)
+add_subdirectory(containers-sequential)
+add_subdirectory(qcontiguouscache)
+add_subdirectory(qcryptographichash)
+add_subdirectory(qlist)
+add_subdirectory(qmap)
+add_subdirectory(qrect)
+add_subdirectory(qringbuffer)
+add_subdirectory(qstack)
+add_subdirectory(qvector)
+add_subdirectory(qalgorithms)
diff --git a/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt
new file mode 100644
index 0000000000..0e2dace380
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from containers-associative.pro.
+
+#####################################################################
+## tst_bench_containers-associative Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_containers-associative
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:containers-associative.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt
new file mode 100644
index 0000000000..40f455752e
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from containers-sequential.pro.
+
+#####################################################################
+## tst_bench_containers-sequential Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_containers-sequential
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:containers-sequential.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt
new file mode 100644
index 0000000000..99c6a7061d
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qalgorithms.pro.
+
+#####################################################################
+## tst_bench_qalgorithms Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qalgorithms
+ SOURCES
+ tst_qalgorithms.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt
new file mode 100644
index 0000000000..c51e2a0059
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_bench_qchar SOURCES main.cpp)
diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt b/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt
new file mode 100644
index 0000000000..126c0e7a50
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qcontiguouscache.pro.
+
+#####################################################################
+## tst_bench_qcontiguouscache Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qcontiguouscache
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt
new file mode 100644
index 0000000000..1400027c1f
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qcryptographichash.pro.
+
+#####################################################################
+## tst_bench_qcryptographichash Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qcryptographichash
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt
new file mode 100644
index 0000000000..6875fdd613
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_bench_qdatetime SOURCES main.cpp)
diff --git a/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt
new file mode 100644
index 0000000000..5b3a0fe5f5
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qhash.pro.
+
+#####################################################################
+## tst_hash Binary:
+#####################################################################
+
+add_qt_benchmark(tst_hash
+ SOURCES
+ main.cpp
+ outofline.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt
new file mode 100644
index 0000000000..ba40760910
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qlist.pro.
+
+#####################################################################
+## tst_bench_qlist Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qlist
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt
new file mode 100644
index 0000000000..b8a23bc757
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_bench_qlocale SOURCES main.cpp)
diff --git a/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt b/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt
new file mode 100644
index 0000000000..a98c7d7157
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qmap.pro.
+
+#####################################################################
+## tst_bench_qmap Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qmap
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt b/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt
new file mode 100644
index 0000000000..4218092a88
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qrect.pro.
+
+#####################################################################
+## tst_bench_qrect Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qrect
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qrect.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt b/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt
new file mode 100644
index 0000000000..e0323b90db
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qringbuffer.pro.
+
+#####################################################################
+## tst_bench_qringbuffer Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qringbuffer
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qringbuffer.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/tools/qset/CMakeLists.txt b/tests/benchmarks/corelib/tools/qset/CMakeLists.txt
new file mode 100644
index 0000000000..40ee622f89
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qset/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qset.pro.
+
+#####################################################################
+## tst_qset Binary:
+#####################################################################
+
+add_qt_benchmark(tst_qset
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt
new file mode 100644
index 0000000000..530d55b19b
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qstack.pro.
+
+#####################################################################
+## tst_bench_stack Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_stack
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt
new file mode 100644
index 0000000000..1dd6678e8e
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_bench_qstring SOURCES main.cpp)
diff --git a/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt
new file mode 100644
index 0000000000..3947ae1c5e
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt
@@ -0,0 +1 @@
+add_qt_test(tst_bench_qtimezone SOURCES main.cpp)
diff --git a/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt b/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt
new file mode 100644
index 0000000000..0cc9b24236
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qvector.pro.
+
+#####################################################################
+## tst_bench_vector Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_vector
+ SOURCES
+ main.cpp
+ outofline.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Test
+)
diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
index 76a4edaa10..7182a43008 100644
--- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
@@ -54,7 +54,7 @@ QVector<double> mixedvector_fill_and_return_helper()
std::vector<double> v(N);
for (int i = 0; i != N; ++i)
v[i] = i;
- return QVector<double>::fromStdVector(v);
+ return QVector<double>(v.begin(), v.end());
}
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
index 16a911c63a..9ad5f771bd 100644
--- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h
+++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
@@ -130,78 +130,9 @@ public:
bool contains(const T &t) const;
int count(const T &t) const;
-#ifdef QT_STRICT_ITERATORS
- class iterator {
- public:
- T *i;
- typedef std::random_access_iterator_tag iterator_category;
- typedef ptrdiff_t difference_type;
- typedef T value_type;
- typedef T *pointer;
- typedef T &reference;
-
- inline iterator() : i(0) {}
- inline iterator(T *n) : i(n) {}
- inline iterator(const iterator &o): i(o.i){}
- inline T &operator*() const { return *i; }
- inline T *operator->() const { return i; }
- inline T &operator[](int j) const { return *(i + j); }
- inline bool operator==(const iterator &o) const { return i == o.i; }
- inline bool operator!=(const iterator &o) const { return i != o.i; }
- inline bool operator<(const iterator& other) const { return i < other.i; }
- inline bool operator<=(const iterator& other) const { return i <= other.i; }
- inline bool operator>(const iterator& other) const { return i > other.i; }
- inline bool operator>=(const iterator& other) const { return i >= other.i; }
- inline iterator &operator++() { ++i; return *this; }
- inline iterator operator++(int) { T *n = i; ++i; return n; }
- inline iterator &operator--() { i--; return *this; }
- inline iterator operator--(int) { T *n = i; i--; return n; }
- inline iterator &operator+=(int j) { i+=j; return *this; }
- inline iterator &operator-=(int j) { i-=j; return *this; }
- inline iterator operator+(int j) const { return iterator(i+j); }
- inline iterator operator-(int j) const { return iterator(i-j); }
- inline int operator-(iterator j) const { return i - j.i; }
- };
- friend class iterator;
-
- class const_iterator {
- public:
- T *i;
- typedef std::random_access_iterator_tag iterator_category;
- typedef ptrdiff_t difference_type;
- typedef T value_type;
- typedef const T *pointer;
- typedef const T &reference;
-
- inline const_iterator() : i(0) {}
- inline const_iterator(T *n) : i(n) {}
- inline const_iterator(const const_iterator &o): i(o.i) {}
- inline explicit const_iterator(const iterator &o): i(o.i) {}
- inline const T &operator*() const { return *i; }
- inline const T *operator->() const { return i; }
- inline const T &operator[](int j) const { return *(i + j); }
- inline bool operator==(const const_iterator &o) const { return i == o.i; }
- inline bool operator!=(const const_iterator &o) const { return i != o.i; }
- inline bool operator<(const const_iterator& other) const { return i < other.i; }
- inline bool operator<=(const const_iterator& other) const { return i <= other.i; }
- inline bool operator>(const const_iterator& other) const { return i > other.i; }
- inline bool operator>=(const const_iterator& other) const { return i >= other.i; }
- inline const_iterator &operator++() { ++i; return *this; }
- inline const_iterator operator++(int) { T *n = i; ++i; return n; }
- inline const_iterator &operator--() { i--; return *this; }
- inline const_iterator operator--(int) { T *n = i; i--; return n; }
- inline const_iterator &operator+=(int j) { i+=j; return *this; }
- inline const_iterator &operator-=(int j) { i+=j; return *this; }
- inline const_iterator operator+(int j) const { return const_iterator(i+j); }
- inline const_iterator operator-(int j) const { return const_iterator(i-j); }
- inline int operator-(const_iterator j) const { return i - j.i; }
- };
- friend class const_iterator;
-#else
// STL-style
typedef T *iterator;
typedef const T *const_iterator;
-#endif
inline iterator begin() { return m_begin; }
inline const_iterator begin() const { return m_begin; }
inline const_iterator constBegin() const { return m_begin; }
@@ -280,11 +211,7 @@ private:
}
static Q_DECL_CONSTEXPR int alignOfTypedData()
{
-#ifdef Q_ALIGNOF
- return Q_ALIGNOF(AlignmentDummy);
-#else
- return sizeof(void *);
-#endif
+ return alignof(AlignmentDummy);
}
public:
diff --git a/tests/benchmarks/dbus/CMakeLists.txt b/tests/benchmarks/dbus/CMakeLists.txt
new file mode 100644
index 0000000000..cd246922a1
--- /dev/null
+++ b/tests/benchmarks/dbus/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Generated from dbus.pro.
+
+add_subdirectory(qdbustype)
+if(QT_FEATURE_process)
+ add_subdirectory(qdbusperformance)
+endif()
diff --git a/tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt b/tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt
new file mode 100644
index 0000000000..5d79f36090
--- /dev/null
+++ b/tests/benchmarks/dbus/qdbusperformance/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from qdbusperformance.pro.
+
+add_subdirectory(server)
+add_subdirectory(test)
diff --git a/tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt b/tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt
new file mode 100644
index 0000000000..a3b5e98d4a
--- /dev/null
+++ b/tests/benchmarks/dbus/qdbusperformance/server/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from server.pro.
+
+#####################################################################
+## server Binary:
+#####################################################################
+
+add_qt_benchmark(server
+ GUI
+ OUTPUT_DIRECTORY "."
+ SOURCES
+ ../serverobject.h
+ server.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+)
diff --git a/tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt b/tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt
new file mode 100644
index 0000000000..dadca9412c
--- /dev/null
+++ b/tests/benchmarks/dbus/qdbusperformance/test/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qdbusperformance Binary:
+#####################################################################
+
+add_qt_benchmark(tst_qdbusperformance
+ SOURCES
+ ../serverobject.h
+ ../tst_qdbusperformance.cpp
+ PUBLIC_LIBRARIES
+ Qt::DBus
+ Qt::Test
+)
diff --git a/tests/benchmarks/dbus/qdbustype/CMakeLists.txt b/tests/benchmarks/dbus/qdbustype/CMakeLists.txt
new file mode 100644
index 0000000000..fb250f9f00
--- /dev/null
+++ b/tests/benchmarks/dbus/qdbustype/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from qdbustype.pro.
+
+#####################################################################
+## tst_bench_qdbustype Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qdbustype
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::DBusPrivate
+ Qt::Test
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qdbustype CONDITION QT_FEATURE_dbus_linked
+ DEFINES
+ QT_LINKED_LIBDBUS
+ PUBLIC_LIBRARIES
+ dbus-1
+)
+
+extend_target(tst_bench_qdbustype CONDITION NOT QT_FEATURE_dbus_linked
+ SOURCES
+ ../../../../src/dbus/qdbus_symbols.cpp
+)
diff --git a/tests/benchmarks/gui/CMakeLists.txt b/tests/benchmarks/gui/CMakeLists.txt
new file mode 100644
index 0000000000..6af9d8e224
--- /dev/null
+++ b/tests/benchmarks/gui/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from gui.pro.
+
+add_subdirectory(animation)
+add_subdirectory(image)
+add_subdirectory(kernel)
+add_subdirectory(math3d)
+add_subdirectory(painting)
+add_subdirectory(text)
diff --git a/tests/benchmarks/gui/animation/CMakeLists.txt b/tests/benchmarks/gui/animation/CMakeLists.txt
new file mode 100644
index 0000000000..6190f29a65
--- /dev/null
+++ b/tests/benchmarks/gui/animation/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from animation.pro.
+
+if(TARGET Qt::Widgets)
+ add_subdirectory(qanimation)
+endif()
diff --git a/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt b/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt
new file mode 100644
index 0000000000..38b4c50db8
--- /dev/null
+++ b/tests/benchmarks/gui/animation/qanimation/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qanimation.pro.
+
+#####################################################################
+## tst_bench_qanimation Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qanimation
+ SOURCES
+ dummyanimation.cpp dummyanimation.h
+ dummyobject.cpp dummyobject.h
+ main.cpp
+ rectanimation.cpp rectanimation.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
diff --git a/tests/benchmarks/gui/image/CMakeLists.txt b/tests/benchmarks/gui/image/CMakeLists.txt
new file mode 100644
index 0000000000..77cfeedc3e
--- /dev/null
+++ b/tests/benchmarks/gui/image/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from image.pro.
+
+add_subdirectory(blendbench)
+add_subdirectory(qimageconversion)
+add_subdirectory(qimagereader)
+add_subdirectory(qimagescale)
+add_subdirectory(qpixmap)
+add_subdirectory(qpixmapcache)
diff --git a/tests/benchmarks/gui/image/blendbench/CMakeLists.txt b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt
new file mode 100644
index 0000000000..3599a51371
--- /dev/null
+++ b/tests/benchmarks/gui/image/blendbench/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from blendbench.pro.
+
+#####################################################################
+## tst_bench_blendbench Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_blendbench
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:blendbench.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt
new file mode 100644
index 0000000000..d9b481ca46
--- /dev/null
+++ b/tests/benchmarks/gui/image/qimageconversion/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from qimageconversion.pro.
+
+#####################################################################
+## tst_bench_imageConversion Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_imageConversion
+ SOURCES
+ tst_qimageconversion.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qimageconversion.pro:<TRUE>:
+# QT_FOR_CONFIG = "gui-private"
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_gif
+ DEFINES
+ QTEST_HAVE_GIF
+)
+
+extend_target(tst_bench_imageConversion CONDITION QT_FEATURE_jpeg
+ DEFINES
+ QTEST_HAVE_JPEG
+)
diff --git a/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt b/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt
new file mode 100644
index 0000000000..be72a44187
--- /dev/null
+++ b/tests/benchmarks/gui/image/qimagereader/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qimagereader.pro.
+
+#####################################################################
+## tst_bench_qimagereader Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qimagereader
+ SOURCES
+ tst_qimagereader.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qimagereader.pro:<TRUE>:
+# QT_FOR_CONFIG = "gui-private"
+# TEMPLATE = "app"
+# TESTDATA = "images/*"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qimagereader CONDITION QT_FEATURE_gif
+ DEFINES
+ QTEST_HAVE_GIF
+)
+
+extend_target(tst_bench_qimagereader CONDITION QT_FEATURE_jpeg
+ DEFINES
+ QTEST_HAVE_JPEG
+)
diff --git a/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt
new file mode 100644
index 0000000000..cbf3e5459b
--- /dev/null
+++ b/tests/benchmarks/gui/image/qimagescale/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qimagescale.pro.
+
+#####################################################################
+## tst_bench_imageScale Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_imageScale
+ SOURCES
+ tst_qimagescale.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qimagescale.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt
new file mode 100644
index 0000000000..e75703f33d
--- /dev/null
+++ b/tests/benchmarks/gui/image/qpixmap/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qpixmap.pro.
+
+#####################################################################
+## tst_bench_qpixmap Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qpixmap
+ SOURCES
+ tst_qpixmap.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qpixmap.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt
new file mode 100644
index 0000000000..46347ef94a
--- /dev/null
+++ b/tests/benchmarks/gui/image/qpixmapcache/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qpixmapcache.pro.
+
+#####################################################################
+## tst_bench_qpixmapcache Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qpixmapcache
+ SOURCES
+ tst_qpixmapcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qpixmapcache.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/kernel/CMakeLists.txt b/tests/benchmarks/gui/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..451b12388d
--- /dev/null
+++ b/tests/benchmarks/gui/kernel/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qguimetatype)
+add_subdirectory(qguivariant)
diff --git a/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt
new file mode 100644
index 0000000000..cf250cdaf6
--- /dev/null
+++ b/tests/benchmarks/gui/kernel/qguimetatype/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qguimetatype.pro.
+
+#####################################################################
+## tst_bench_qguimetatype Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qguimetatype
+ SOURCES
+ tst_qguimetatype.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qguimetatype.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt
new file mode 100644
index 0000000000..0a6ddda456
--- /dev/null
+++ b/tests/benchmarks/gui/kernel/qguivariant/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qguivariant.pro.
+
+#####################################################################
+## tst_bench_qguivariant Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qguivariant
+ SOURCES
+ tst_qguivariant.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qguivariant.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/math3d/CMakeLists.txt b/tests/benchmarks/gui/math3d/CMakeLists.txt
new file mode 100644
index 0000000000..53e56a83a3
--- /dev/null
+++ b/tests/benchmarks/gui/math3d/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from math3d.pro.
+
+add_subdirectory(qmatrix4x4)
+add_subdirectory(qquaternion)
diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt
new file mode 100644
index 0000000000..8d594ef1e7
--- /dev/null
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qmatrix4x4.pro.
+
+#####################################################################
+## tst_bench_qmatrix4x4 Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qmatrix4x4
+ SOURCES
+ tst_qmatrix4x4.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qmatrix4x4.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt
new file mode 100644
index 0000000000..2409a6c43a
--- /dev/null
+++ b/tests/benchmarks/gui/math3d/qquaternion/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qquaternion.pro.
+
+#####################################################################
+## tst_bench_qquaternion Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qquaternion
+ SOURCES
+ tst_qquaternion.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qquaternion.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/CMakeLists.txt b/tests/benchmarks/gui/painting/CMakeLists.txt
new file mode 100644
index 0000000000..080fe582f2
--- /dev/null
+++ b/tests/benchmarks/gui/painting/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Generated from painting.pro.
+
+add_subdirectory(drawtexture)
+add_subdirectory(qcolor)
+add_subdirectory(qregion)
+add_subdirectory(qtransform)
+add_subdirectory(lancebench)
+if(TARGET Qt::Widgets)
+ add_subdirectory(qpainter)
+ add_subdirectory(qtbench)
+endif()
diff --git a/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt b/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt
new file mode 100644
index 0000000000..add15f25fb
--- /dev/null
+++ b/tests/benchmarks/gui/painting/drawtexture/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from drawtexture.pro.
+
+#####################################################################
+## tst_bench_drawtexture Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_drawtexture
+ SOURCES
+ tst_drawtexture.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:drawtexture.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
new file mode 100644
index 0000000000..677a3d98d4
--- /dev/null
+++ b/tests/benchmarks/gui/painting/lancebench/CMakeLists.txt
@@ -0,0 +1,157 @@
+# Generated from lancebench.pro.
+
+#####################################################################
+## tst_bench_lancebench Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_lancebench
+ SOURCES
+ ../../../../auto/other/lancelot/paintcommands.cpp ../../../../auto/other/lancelot/paintcommands.h
+ tst_lancebench.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+)
+
+# Resources:
+set_source_files_properties("../../../../auto/other/lancelot/images/alpha.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/alpha.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/alpha2x2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/alpha2x2.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/bitmap.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/bitmap.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/border.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/border.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/borderimage.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/borderimage.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_argb32.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_argb32.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_indexed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_indexed.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_indexed_mask.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_indexed_mask.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_mono.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_mono_128.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono_128.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_mono_palette.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono_palette.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dome_rgb32.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_rgb32.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dot.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/face.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/face.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/gam030.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam030.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/gam045.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam045.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/gam056.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam056.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/gam100.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam100.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/gam200.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam200.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/image.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/image.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/mask.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/mask.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/mask_100.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/mask_100.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/masked.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/masked.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/sign.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/sign.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/solid.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/solid2x2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/solid2x2.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/struct-image-01.jpg"
+ PROPERTIES QT_RESOURCE_ALIAS "images/struct-image-01.jpg"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/struct-image-01.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/struct-image-01.png"
+)
+set_source_files_properties("../../../../auto/other/lancelot/images/zebra.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/zebra.png"
+)
+set(images_resource_files
+ "images/alpha.png"
+ "images/alpha2x2.png"
+ "images/bitmap.png"
+ "images/border.png"
+ "images/borderimage.png"
+ "images/dome_argb32.png"
+ "images/dome_indexed.png"
+ "images/dome_indexed_mask.png"
+ "images/dome_mono.png"
+ "images/dome_mono_128.png"
+ "images/dome_mono_palette.png"
+ "images/dome_rgb32.png"
+ "images/dot.png"
+ "images/face.png"
+ "images/gam030.png"
+ "images/gam045.png"
+ "images/gam056.png"
+ "images/gam100.png"
+ "images/gam200.png"
+ "images/image.png"
+ "images/mask.png"
+ "images/mask_100.png"
+ "images/masked.png"
+ "images/sign.png"
+ "images/solid.png"
+ "images/solid2x2.png"
+ "images/struct-image-01.jpg"
+ "images/struct-image-01.png"
+ "images/zebra.png"
+)
+
+add_qt_resource(tst_bench_lancebench "images"
+ PREFIX
+ "/"
+ BASE
+ "../../../../auto/other/lancelot"
+ FILES
+ ${images_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:lancebench.pro:<TRUE>:
+# TEMPLATE = "app"
+# TESTDATA = "../../../../auto/other/lancelot/scripts/*"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_lancebench CONDITION QT_FEATURE_opengl
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/benchmarks/gui/painting/lancebench/lancebench.pro b/tests/benchmarks/gui/painting/lancebench/lancebench.pro
index 6458c50861..5647d26de3 100644
--- a/tests/benchmarks/gui/painting/lancebench/lancebench.pro
+++ b/tests/benchmarks/gui/painting/lancebench/lancebench.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = tst_bench_lancebench
QT += testlib gui-private
-
+qtConfig(opengl): QT += opengl
SOURCES += tst_lancebench.cpp
diff --git a/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt b/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt
new file mode 100644
index 0000000000..d5367704ae
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qcolor/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qcolor.pro.
+
+#####################################################################
+## tst_bench_qcolor Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qcolor
+ SOURCES
+ tst_qcolor.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qcolor.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt b/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt
new file mode 100644
index 0000000000..a4e3242409
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qpainter/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qpainter.pro.
+
+#####################################################################
+## tst_bench_qpainter Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qpainter
+ SOURCES
+ tst_qpainter.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qpainter.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qregion/CMakeLists.txt b/tests/benchmarks/gui/painting/qregion/CMakeLists.txt
new file mode 100644
index 0000000000..e864a1f61d
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qregion/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qregion.pro.
+
+#####################################################################
+## tst_bench_qregion Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qregion
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qregion.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt b/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt
new file mode 100644
index 0000000000..009deeb528
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtbench/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtbench.pro.
+
+#####################################################################
+## tst_bench_qtbench Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtbench
+ SOURCES
+ tst_qtbench.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qtbench.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt
new file mode 100644
index 0000000000..aa24b4a19e
--- /dev/null
+++ b/tests/benchmarks/gui/painting/qtransform/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtransform.pro.
+
+#####################################################################
+## tst_bench_qtransform Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtransform
+ SOURCES
+ tst_qtransform.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtransform.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/text/CMakeLists.txt b/tests/benchmarks/gui/text/CMakeLists.txt
new file mode 100644
index 0000000000..630f01091d
--- /dev/null
+++ b/tests/benchmarks/gui/text/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from text.pro.
+
+add_subdirectory(qfontmetrics)
+add_subdirectory(qtext)
+add_subdirectory(qtextdocument)
diff --git a/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt
new file mode 100644
index 0000000000..af42a93d27
--- /dev/null
+++ b/tests/benchmarks/gui/text/qfontmetrics/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qfontmetrics.pro.
+
+#####################################################################
+## tst_bench_QFontMetrics Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_QFontMetrics
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qfontmetrics.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/gui/text/qtext/CMakeLists.txt b/tests/benchmarks/gui/text/qtext/CMakeLists.txt
new file mode 100644
index 0000000000..b2380c8316
--- /dev/null
+++ b/tests/benchmarks/gui/text/qtext/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qtext.pro.
+
+#####################################################################
+## tst_bench_QText Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_QText
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtext.pro:<TRUE>:
+# TEMPLATE = "app"
+# TESTDATA = "bidi.txt"
diff --git a/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt
new file mode 100644
index 0000000000..eb1f633d9b
--- /dev/null
+++ b/tests/benchmarks/gui/text/qtextdocument/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtextdocument.pro.
+
+#####################################################################
+## tst_bench_QTextDocument Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_QTextDocument
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtextdocument.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/CMakeLists.txt b/tests/benchmarks/network/CMakeLists.txt
new file mode 100644
index 0000000000..4175518f34
--- /dev/null
+++ b/tests/benchmarks/network/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from network.pro.
+
+# special case begin
+# SSL library include path is not propagated with private tests which results in
+# test not being able to find the ssl header when they are not in the standard
+# include paths
+if (QT_FEATURE_private_tests)
+ if (QT_FEATURE_openssl AND QT_FEATURE_openssl_linked AND QT_FEATURE_ssl)
+ include_directories($<TARGET_PROPERTY:OpenSSL::SSL,INTERFACE_INCLUDE_DIRECTORIES>)
+ endif()
+
+ if (QT_FEATURE_openssl AND QT_FEATURE_ssl AND NOT QT_FEATURE_openssl_linked)
+ include_directories($<TARGET_PROPERTY:${INSTALL_CMAKE_NAMESPACE}::SSL_nolink,INTERFACE_INCLUDE_DIRECTORIES>)
+ endif()
+endif()
+# special case end
+
+add_subdirectory(access)
+add_subdirectory(kernel)
+add_subdirectory(socket)
+if(QT_FEATURE_openssl)
+ add_subdirectory(ssl)
+endif()
diff --git a/tests/benchmarks/network/access/CMakeLists.txt b/tests/benchmarks/network/access/CMakeLists.txt
new file mode 100644
index 0000000000..58f72cd248
--- /dev/null
+++ b/tests/benchmarks/network/access/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Generated from access.pro.
+
+add_subdirectory(qfile_vs_qnetworkaccessmanager)
+add_subdirectory(qnetworkreply)
+add_subdirectory(qnetworkreply_from_cache)
+add_subdirectory(qnetworkdiskcache)
diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt
new file mode 100644
index 0000000000..abfb0206d3
--- /dev/null
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qfile_vs_qnetworkaccessmanager.pro.
+
+#####################################################################
+## tst_bench_qfile_vs_qnetworkaccessmanager Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qfile_vs_qnetworkaccessmanager
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qfile_vs_qnetworkaccessmanager.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
index 46bb1791b4..1f3f38eaaf 100644
--- a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
@@ -105,7 +105,7 @@ void qfile_vs_qnetworkaccessmanager::qnamFileRead()
}
qint64 elapsed = t.elapsed();
- qDebug() << endl << "Finished!";
+ qDebug() << Qt::endl << "Finished!";
qDebug() << "Bytes:" << size;
qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec";
}
@@ -138,7 +138,7 @@ void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead()
}
qint64 elapsed = t.elapsed();
- qDebug() << endl << "Finished!";
+ qDebug() << Qt::endl << "Finished!";
qDebug() << "Bytes:" << size;
qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec";
}
@@ -167,7 +167,7 @@ void qfile_vs_qnetworkaccessmanager::qfileFileRead()
}
qint64 elapsed = t.elapsed();
- qDebug() << endl << "Finished!";
+ qDebug() << Qt::endl << "Finished!";
qDebug() << "Bytes:" << size;
qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec";
}
diff --git a/tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt b/tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt
new file mode 100644
index 0000000000..d70d2756a9
--- /dev/null
+++ b/tests/benchmarks/network/access/qnetworkdiskcache/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qnetworkdiskcache.pro.
+
+#####################################################################
+## tst_bench_qnetworkdiskcache Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qnetworkdiskcache
+ SOURCES
+ tst_qnetworkdiskcache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetworkdiskcache.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt b/tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt
new file mode 100644
index 0000000000..c77f7b56f8
--- /dev/null
+++ b/tests/benchmarks/network/access/qnetworkreply/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qnetworkreply.pro.
+
+#####################################################################
+## tst_bench_qnetworkreply Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qnetworkreply
+ SOURCES
+ tst_qnetworkreply.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetworkreply.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 540e197e09..1a8c8de0c8 100644
--- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -545,15 +545,10 @@ void tst_qnetworkreply::echoPerformance()
void tst_qnetworkreply::preConnectEncrypted()
{
QFETCH(int, sleepTime);
- QFETCH(QSslConfiguration, sslConfiguration);
- bool spdyEnabled = !sslConfiguration.isNull();
-
QString hostName = QLatin1String("www.google.com");
QNetworkAccessManager manager;
QNetworkRequest request(QUrl("https://" + hostName));
- if (spdyEnabled)
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
// make sure we have a full request including
// DNS lookup, TCP and SSL handshakes
@@ -579,12 +574,7 @@ void tst_qnetworkreply::preConnectEncrypted()
manager.clearAccessCache();
// now try to make the connection beforehand
- if (spdyEnabled) {
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
- manager.connectToHostEncrypted(hostName, 443, sslConfiguration);
- } else {
- manager.connectToHostEncrypted(hostName);
- }
+ manager.connectToHostEncrypted(hostName);
QTestEventLoop::instance().enterLoopMSecs(sleepTime);
// now make another request and hopefully use the existing connection
@@ -592,8 +582,6 @@ void tst_qnetworkreply::preConnectEncrypted()
QNetworkReply *preConnectReply = normalResult.first;
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(preConnectReply->networkError() == QNetworkReply::NoError);
- bool spdyWasUsed = preConnectReply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool();
- QCOMPARE(spdyEnabled, spdyWasUsed);
qint64 preConnectElapsed = preConnectResult.second;
qDebug() << request.url().toString() << "full request:" << normalElapsed
<< "ms, pre-connect request:" << preConnectElapsed << "ms, difference:"
@@ -606,27 +594,11 @@ void tst_qnetworkreply::preConnectEncrypted_data()
{
#ifndef QT_NO_OPENSSL
QTest::addColumn<int>("sleepTime");
- QTest::addColumn<QSslConfiguration>("sslConfiguration");
-
// start a new normal request after preconnecting is done
- QTest::newRow("HTTPS-2secs") << 2000 << QSslConfiguration();
+ QTest::newRow("HTTPS-2secs") << 2000;
// start a new normal request while preconnecting is in-flight
- QTest::newRow("HTTPS-100ms") << 100 << QSslConfiguration();
-
- QSslConfiguration spdySslConf = QSslConfiguration::defaultConfiguration();
- QList<QByteArray> nextProtocols = QList<QByteArray>()
- << QSslConfiguration::NextProtocolSpdy3_0
- << QSslConfiguration::NextProtocolHttp1_1;
- spdySslConf.setAllowedNextProtocols(nextProtocols);
-
-#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
- // start a new SPDY request while preconnecting is done
- QTest::newRow("SPDY-2secs") << 2000 << spdySslConf;
-
- // start a new SPDY request while preconnecting is in-flight
- QTest::newRow("SPDY-100ms") << 100 << spdySslConf;
-#endif // defined (QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ...
+ QTest::newRow("HTTPS-100ms") << 100;
#endif // QT_NO_OPENSSL
}
diff --git a/tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt b/tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt
new file mode 100644
index 0000000000..57cfebb1ff
--- /dev/null
+++ b/tests/benchmarks/network/access/qnetworkreply_from_cache/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qnetworkreply_from_cache.pro.
+
+#####################################################################
+## tst_bench_qnetworkreply_from_cache Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qnetworkreply_from_cache
+ SOURCES
+ tst_qnetworkreply_from_cache.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
diff --git a/tests/benchmarks/network/kernel/CMakeLists.txt b/tests/benchmarks/network/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..13a7caecdb
--- /dev/null
+++ b/tests/benchmarks/network/kernel/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from kernel.pro.
+
+if(QT_FEATURE_private_tests)
+ add_subdirectory(qhostinfo)
+endif()
diff --git a/tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt b/tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt
new file mode 100644
index 0000000000..f234b5d7a4
--- /dev/null
+++ b/tests/benchmarks/network/kernel/qhostinfo/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qhostinfo.pro.
+
+#####################################################################
+## tst_bench_qhostinfo Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qhostinfo
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qhostinfo.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/socket/CMakeLists.txt b/tests/benchmarks/network/socket/CMakeLists.txt
new file mode 100644
index 0000000000..6d54bc05f5
--- /dev/null
+++ b/tests/benchmarks/network/socket/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from socket.pro.
+
+add_subdirectory(qtcpserver)
+add_subdirectory(qudpsocket)
diff --git a/tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt b/tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt
new file mode 100644
index 0000000000..7e1eab88a9
--- /dev/null
+++ b/tests/benchmarks/network/socket/qtcpserver/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qtcpserver.pro.
+
+#####################################################################
+## tst_bench_qtcpserver Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtcpserver
+ SOURCES
+ tst_qtcpserver.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qtcpserver.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt b/tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt
new file mode 100644
index 0000000000..58b4ab17d4
--- /dev/null
+++ b/tests/benchmarks/network/socket/qudpsocket/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qudpsocket.pro.
+
+#####################################################################
+## tst_bench_qudpsocket Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qudpsocket
+ SOURCES
+ tst_qudpsocket.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qudpsocket.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/network/ssl/CMakeLists.txt b/tests/benchmarks/network/ssl/CMakeLists.txt
new file mode 100644
index 0000000000..bc469359f1
--- /dev/null
+++ b/tests/benchmarks/network/ssl/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from ssl.pro.
+
+add_subdirectory(qsslsocket)
diff --git a/tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt b/tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt
new file mode 100644
index 0000000000..7a127b071d
--- /dev/null
+++ b/tests/benchmarks/network/ssl/qsslsocket/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qsslsocket.pro.
+
+#####################################################################
+## tst_bench_qsslsocket Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qsslsocket
+ SOURCES
+ tst_qsslsocket.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qsslsocket.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/opengl/CMakeLists.txt b/tests/benchmarks/opengl/CMakeLists.txt
new file mode 100644
index 0000000000..bbee072587
--- /dev/null
+++ b/tests/benchmarks/opengl/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from opengl.pro.
+
+#####################################################################
+## tst_bench_opengl Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_opengl
+ SOURCES
+ main.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL
+ Qt::OpenGLPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:opengl.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt b/tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt
new file mode 100644
index 0000000000..63262d19ce
--- /dev/null
+++ b/tests/benchmarks/plugins/imageformats/jpeg/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from jpeg.pro.
+
+#####################################################################
+## jpeg Binary:
+#####################################################################
+
+add_qt_benchmark(jpeg
+ SOURCES
+ jpeg.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
+# TEMPLATE = "app"
+# TESTDATA = "n900.jpeg"
diff --git a/tests/benchmarks/sql/CMakeLists.txt b/tests/benchmarks/sql/CMakeLists.txt
new file mode 100644
index 0000000000..c4d96e338d
--- /dev/null
+++ b/tests/benchmarks/sql/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from sql.pro.
+
+add_subdirectory(kernel)
diff --git a/tests/benchmarks/sql/kernel/CMakeLists.txt b/tests/benchmarks/sql/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..86108db75d
--- /dev/null
+++ b/tests/benchmarks/sql/kernel/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qsqlquery)
+add_subdirectory(qsqlrecord)
diff --git a/tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt b/tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt
new file mode 100644
index 0000000000..95e3aca221
--- /dev/null
+++ b/tests/benchmarks/sql/kernel/qsqlquery/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsqlquery.pro.
+
+#####################################################################
+## tst_bench_qsqlquery Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qsqlquery
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+ Qt::Test
+)
diff --git a/tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt b/tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt
new file mode 100644
index 0000000000..b55d46984f
--- /dev/null
+++ b/tests/benchmarks/sql/kernel/qsqlrecord/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from qsqlrecord.pro.
+
+#####################################################################
+## tst_bench_qsqlrecord Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qsqlrecord
+ SOURCES
+ tst_qsqlrecord.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Sql
+ Qt::SqlPrivate
+ Qt::Test
+)
diff --git a/tests/benchmarks/testlib/CMakeLists.txt b/tests/benchmarks/testlib/CMakeLists.txt
new file mode 100644
index 0000000000..e7bd29b564
--- /dev/null
+++ b/tests/benchmarks/testlib/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from testlib.pro.
+
+add_subdirectory(tostring)
diff --git a/tests/benchmarks/testlib/tostring/CMakeLists.txt b/tests/benchmarks/testlib/tostring/CMakeLists.txt
new file mode 100644
index 0000000000..76c0f1db1c
--- /dev/null
+++ b/tests/benchmarks/testlib/tostring/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from tostring.pro.
+
+#####################################################################
+## tst_bench_tostring Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_tostring
+ SOURCES
+ tst_tostring.cpp
+ PUBLIC_LIBRARIES
+ Qt::Test
+)
diff --git a/tests/benchmarks/widgets/CMakeLists.txt b/tests/benchmarks/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..bf543e664d
--- /dev/null
+++ b/tests/benchmarks/widgets/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from widgets.pro.
+
+add_subdirectory(graphicsview)
+add_subdirectory(itemviews)
+add_subdirectory(kernel)
+add_subdirectory(styles)
+add_subdirectory(widgets)
diff --git a/tests/benchmarks/widgets/graphicsview/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..3928328a98
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from graphicsview.pro.
+
+add_subdirectory(functional)
+add_subdirectory(qgraphicsanchorlayout)
+add_subdirectory(qgraphicsitem)
+add_subdirectory(qgraphicslayout)
+add_subdirectory(qgraphicslinearlayout)
+add_subdirectory(qgraphicsscene)
+add_subdirectory(qgraphicsview)
+add_subdirectory(qgraphicswidget)
diff --git a/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt
new file mode 100644
index 0000000000..20e4286a6e
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/functional/CMakeLists.txt
@@ -0,0 +1,2 @@
+# Generated from functional.pro.
+
diff --git a/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt
new file mode 100644
index 0000000000..8fac5c3497
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/functional/GraphicsViewBenchmark/CMakeLists.txt
@@ -0,0 +1,367 @@
+# Generated from GraphicsViewBenchmark.pro.
+
+#####################################################################
+## tst_GraphicsViewBenchmark Binary:
+#####################################################################
+
+add_qt_benchmark(tst_GraphicsViewBenchmark
+ SOURCES
+ main.cpp
+ widgets/abstractitemcontainer.cpp widgets/abstractitemcontainer.h
+ widgets/abstractitemview.cpp widgets/abstractitemview.h
+ widgets/abstractscrollarea.cpp widgets/abstractscrollarea.h
+ widgets/abstractviewitem.cpp widgets/abstractviewitem.h
+ widgets/backgrounditem.cpp widgets/backgrounditem.h
+ widgets/button.cpp widgets/button.h
+ widgets/commandline.cpp widgets/commandline.h
+ widgets/dummydatagen.cpp widgets/dummydatagen.h
+ widgets/gvbwidget.cpp widgets/gvbwidget.h
+ widgets/iconitem.cpp widgets/iconitem.h
+ widgets/itemrecyclinglist.cpp widgets/itemrecyclinglist.h
+ widgets/itemrecyclinglistview.cpp widgets/itemrecyclinglistview.h
+ widgets/label.cpp widgets/label.h
+ widgets/listitem.cpp widgets/listitem.h
+ widgets/listitemcache.cpp widgets/listitemcache.h
+ widgets/listitemcontainer.cpp widgets/listitemcontainer.h
+ widgets/listmodel.cpp widgets/listmodel.h
+ widgets/listwidget.cpp widgets/listwidget.h
+ widgets/mainview.cpp widgets/mainview.h
+ widgets/menu.cpp widgets/menu.h
+ widgets/recycledlistitem.cpp widgets/recycledlistitem.h
+ widgets/scrollbar.cpp widgets/scrollbar.h
+ widgets/scroller.cpp widgets/scroller.h widgets/scroller_p.h
+ widgets/settings.cpp widgets/settings.h
+ widgets/simplelist.cpp widgets/simplelist.h
+ widgets/simplelistview.cpp widgets/simplelistview.h
+ widgets/theme.cpp widgets/theme.h
+ widgets/themeevent.cpp widgets/themeevent.h
+ widgets/topbar.cpp widgets/topbar.h
+ INCLUDE_DIRECTORIES
+ widgets
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Svg
+ Qt::Test
+)
+
+# Resources:
+set_source_files_properties("resources/blue_SVG/blue_background_360x640px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_background_horisontal_640x360px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_default_icon_52x52px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_list_divider_360x76px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_scroll_16x80px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scroll.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_scrollbar_7x14px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_status_field_left_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_status_field_middle_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_status_field_right_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_topbar_356x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_topbar_horisontal_636x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_default_icon_68x68px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_status_idle_38x38px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_status_offline_38x38px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_user_status_online_38x38px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg"
+)
+set(GraphicsViewBenchmark_resource_files
+ "resources/blue_SVG/blue_background_360x640px.svg"
+ "resources/blue_SVG/blue_background_horisontal_640x360px.svg"
+ "resources/blue_SVG/blue_contact_default_icon_52x52px.svg"
+ "resources/blue_SVG/blue_contact_list_divider_360x76px.svg"
+ "resources/blue_SVG/blue_contact_list_highlighter_360x76px.svg"
+ "resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ "resources/blue_SVG/blue_scroll_16x80px.svg"
+ "resources/blue_SVG/blue_scrollbar_7x14px.svg"
+ "resources/blue_SVG/blue_status_field_left_14x24px.svg"
+ "resources/blue_SVG/blue_status_field_middle_14x24px.svg"
+ "resources/blue_SVG/blue_status_field_right_14x24px.svg"
+ "resources/blue_SVG/blue_topbar_356x96px.svg"
+ "resources/blue_SVG/blue_topbar_horisontal_636x96px.svg"
+ "resources/blue_SVG/blue_user_default_icon_68x68px.svg"
+ "resources/blue_SVG/blue_user_status_idle_38x38px.svg"
+ "resources/blue_SVG/blue_user_status_offline_38x38px.svg"
+ "resources/blue_SVG/blue_user_status_online_38x38px.svg"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark"
+ PREFIX
+ "/themes/blue"
+ FILES
+ ${GraphicsViewBenchmark_resource_files}
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_idle.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_offline.svg"
+)
+set_source_files_properties("resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_status_online.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_background_360x640px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_background_horisontal_640x360px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "background_horisontal.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_53x53px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_default_icon_highlight.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_list_divider_360x76px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_divider.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "contact_list_highlighter.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_scroll_5x80px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scroll.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_scrollbar_5x14px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "scrollbar.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_status_field_left_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_left.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_status_field_middle_10x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_middle.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_status_field_right_14x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "status_field_right.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_topbar_356x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_topbar_horisontal_636x96px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "topbar_horisontal.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_default_icon_84x68px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_default_icon.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_status_idle_24x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_idle.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_status_offline_24x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_offline.svg"
+)
+set_source_files_properties("resources/lime_SVG/lime_user_status_online_24x24px.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "user_status_online.svg"
+)
+set(GraphicsViewBenchmark1_resource_files
+ "resources/blue_SVG/blue_contact_status_idle_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_offline_33x33px.svg"
+ "resources/blue_SVG/blue_contact_status_online_33x33px.svg"
+ "resources/lime_SVG/lime_background_360x640px.svg"
+ "resources/lime_SVG/lime_background_horisontal_640x360px.svg"
+ "resources/lime_SVG/lime_contact_default_icon_53x53px.svg"
+ "resources/lime_SVG/lime_contact_default_icon_highlight_53x53px.svg"
+ "resources/lime_SVG/lime_contact_list_divider_360x76px.svg"
+ "resources/lime_SVG/lime_contact_list_highlighter_357x80px.svg"
+ "resources/lime_SVG/lime_scroll_5x80px.svg"
+ "resources/lime_SVG/lime_scrollbar_5x14px.svg"
+ "resources/lime_SVG/lime_status_field_left_14x24px.svg"
+ "resources/lime_SVG/lime_status_field_middle_10x24px.svg"
+ "resources/lime_SVG/lime_status_field_right_14x24px.svg"
+ "resources/lime_SVG/lime_topbar_356x96px.svg"
+ "resources/lime_SVG/lime_topbar_horisontal_636x96px.svg"
+ "resources/lime_SVG/lime_user_default_icon_84x68px.svg"
+ "resources/lime_SVG/lime_user_status_idle_24x24px.svg"
+ "resources/lime_SVG/lime_user_status_offline_24x24px.svg"
+ "resources/lime_SVG/lime_user_status_online_24x24px.svg"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark1"
+ PREFIX
+ "/themes/lime"
+ FILES
+ ${GraphicsViewBenchmark1_resource_files}
+)
+set_source_files_properties("resources/avatars/avatar_man_001_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_001.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_002_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_002.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_003_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_003.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_004_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_004.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_005_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_005.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_006_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_006.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_007_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_007.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_008_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_008.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_009_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_009.png"
+)
+set_source_files_properties("resources/avatars/avatar_man_010_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_010.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_001_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_011.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_002_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_012.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_003_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_013.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_004_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_014.png"
+)
+set_source_files_properties("resources/avatars/avatar_picture_005_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_015.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_001_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_016.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_002_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_017.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_003_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_018.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_004_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_019.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_005_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_020.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_006_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_021.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_007_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_022.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_008_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_023.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_009_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_024.png"
+)
+set_source_files_properties("resources/avatars/avatar_woman_010_58x58.png"
+ PROPERTIES QT_RESOURCE_ALIAS "avatar_025.png"
+)
+set(GraphicsViewBenchmark2_resource_files
+ "resources/avatars/avatar_man_001_58x58.png"
+ "resources/avatars/avatar_man_002_58x58.png"
+ "resources/avatars/avatar_man_003_58x58.png"
+ "resources/avatars/avatar_man_004_58x58.png"
+ "resources/avatars/avatar_man_005_58x58.png"
+ "resources/avatars/avatar_man_006_58x58.png"
+ "resources/avatars/avatar_man_007_58x58.png"
+ "resources/avatars/avatar_man_008_58x58.png"
+ "resources/avatars/avatar_man_009_58x58.png"
+ "resources/avatars/avatar_man_010_58x58.png"
+ "resources/avatars/avatar_picture_001_58x58.png"
+ "resources/avatars/avatar_picture_002_58x58.png"
+ "resources/avatars/avatar_picture_003_58x58.png"
+ "resources/avatars/avatar_picture_004_58x58.png"
+ "resources/avatars/avatar_picture_005_58x58.png"
+ "resources/avatars/avatar_woman_001_58x58.png"
+ "resources/avatars/avatar_woman_002_58x58.png"
+ "resources/avatars/avatar_woman_003_58x58.png"
+ "resources/avatars/avatar_woman_004_58x58.png"
+ "resources/avatars/avatar_woman_005_58x58.png"
+ "resources/avatars/avatar_woman_006_58x58.png"
+ "resources/avatars/avatar_woman_007_58x58.png"
+ "resources/avatars/avatar_woman_008_58x58.png"
+ "resources/avatars/avatar_woman_009_58x58.png"
+ "resources/avatars/avatar_woman_010_58x58.png"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark2"
+ PREFIX
+ "/avatars"
+ FILES
+ ${GraphicsViewBenchmark2_resource_files}
+)
+set_source_files_properties("resources/contacts/areacodes.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "areacodes.txt"
+)
+set_source_files_properties("resources/contacts/firstnamesF.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "firstnamesF.txt"
+)
+set_source_files_properties("resources/contacts/firstnamesM.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "firstnamesM.txt"
+)
+set_source_files_properties("resources/contacts/lastnames.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "lastnames.txt"
+)
+set(GraphicsViewBenchmark3_resource_files
+ "resources/contacts/areacodes.txt"
+ "resources/contacts/firstnamesF.txt"
+ "resources/contacts/firstnamesM.txt"
+ "resources/contacts/lastnames.txt"
+)
+
+add_qt_resource(tst_GraphicsViewBenchmark "GraphicsViewBenchmark3"
+ PREFIX
+ "/contact"
+ FILES
+ ${GraphicsViewBenchmark3_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:GraphicsViewBenchmark.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_GraphicsViewBenchmark CONDITION TARGET Qt::OpenGL
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt
new file mode 100644
index 0000000000..4f526cc7b1
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsanchorlayout/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qgraphicsanchorlayout.pro.
+
+#####################################################################
+## tst_bench_qgraphicsanchorlayout Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicsanchorlayout
+ SOURCES
+ tst_qgraphicsanchorlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicsanchorlayout.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt
new file mode 100644
index 0000000000..a63c37e323
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsitem/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qgraphicsitem.pro.
+
+#####################################################################
+## tst_bench_qgraphicsitem Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicsitem
+ SOURCES
+ tst_qgraphicsitem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicsitem.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt
new file mode 100644
index 0000000000..84f277df1b
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicslayout/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qgraphicslayout.pro.
+
+#####################################################################
+## tst_bench_qgraphicslayout Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicslayout
+ SOURCES
+ tst_qgraphicslayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicslayout.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt
new file mode 100644
index 0000000000..ab88de5bec
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicslinearlayout/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qgraphicslinearlayout.pro.
+
+#####################################################################
+## tst_bench_qgraphicslinearlayout Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicslinearlayout
+ SOURCES
+ tst_qgraphicslinearlayout.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicslinearlayout.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
new file mode 100644
index 0000000000..0c72479efd
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qgraphicsscene.pro.
+
+#####################################################################
+## tst_bench_qgraphicsscene Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicsscene
+ SOURCES
+ tst_qgraphicsscene.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicsscene.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..d98e3dba19
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/CMakeLists.txt
@@ -0,0 +1,55 @@
+# Generated from qgraphicsview.pro.
+
+#####################################################################
+## tst_bench_qgraphicsview Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicsview
+ SOURCES
+ chiptester/chip.cpp chiptester/chip.h
+ chiptester/chiptester.cpp chiptester/chiptester.h
+ tst_qgraphicsview.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+# Resources:
+set(qgraphicsview_resource_files
+ "images/designer.png"
+ "images/wine-big.jpeg"
+ "images/wine.jpeg"
+ "random.data"
+)
+
+add_qt_resource(tst_bench_qgraphicsview "qgraphicsview"
+ PREFIX
+ "/"
+ FILES
+ ${qgraphicsview_resource_files}
+)
+set(images_resource_files
+ "qt4logo.png"
+)
+
+add_qt_resource(tst_bench_qgraphicsview "images"
+ PREFIX
+ "/"
+ BASE
+ "chiptester"
+ FILES
+ ${images_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qgraphicsview.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_bench_qgraphicsview CONDITION TARGET Qt::OpenGL
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt
new file mode 100644
index 0000000000..e5e01a8434
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/chipTest/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Generated from chip.pro.
+
+#####################################################################
+## chip Binary:
+#####################################################################
+
+add_qt_benchmark(chip
+ GUI
+ SOURCES
+ chip.cpp chip.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ view.cpp view.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+# Resources:
+set(images_resource_files
+ "fileprint.png"
+ "qt4logo.png"
+ "rotateleft.png"
+ "rotateright.png"
+ "zoomin.png"
+ "zoomout.png"
+)
+
+add_qt_resource(chip "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:chip.pro:<TRUE>:
+# INSTALLS = "target" "sources"
+# sources.files = "$$SOURCES" "$$HEADERS" "$$RESOURCES" "*.png" "*.pro" "*.html" "*.doc" "images"
+# sources.path = "$$[QT_INSTALL_EXAMPLES]/graphicsview/chip"
+# target.path = "$$[QT_INSTALL_EXAMPLES]/graphicsview/chip"
+
+## Scopes:
+#####################################################################
+
+extend_target(chip CONDITION TARGET Qt::OpenGL
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt
new file mode 100644
index 0000000000..ce86e56722
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/moveItems/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from moveItems.pro.
+
+#####################################################################
+## moveItems Binary:
+#####################################################################
+
+add_qt_benchmark(moveItems
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt
new file mode 100644
index 0000000000..310fcd0622
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/benchapps/scrolltest/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from scrolltest.pro.
+
+#####################################################################
+## scrolltest Binary:
+#####################################################################
+
+add_qt_benchmark(scrolltest
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp
index dfa08b6869..1eaa5f6578 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.cpp
@@ -56,13 +56,6 @@ void ChipTester::setAntialias(bool enabled)
setRenderHint(QPainter::Antialiasing, enabled);
}
-void ChipTester::setOpenGL(bool enabled)
-{
-#ifndef QT_NO_OPENGL
- setViewport(enabled ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : 0);
-#endif
-}
-
void ChipTester::setOperation(Operation operation)
{
this->operation = operation;
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h
index d85686c94e..e4c9197142 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/chiptester/chiptester.h
@@ -51,7 +51,6 @@ public:
ChipTester(QWidget *parent = 0);
void setAntialias(bool enabled);
- void setOpenGL(bool enabled);
void runBenchmark();
void setOperation(Operation operation);
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 9bb5231528..25fc439883 100644
--- a/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -382,31 +382,22 @@ void tst_QGraphicsView::mapRectFromScene()
void tst_QGraphicsView::chipTester_data()
{
QTest::addColumn<bool>("antialias");
- QTest::addColumn<bool>("opengl");
QTest::addColumn<int>("operation");
- QTest::newRow("rotate, normal") << false << false << 0;
- QTest::newRow("rotate, normal, antialias") << true << false << 0;
- QTest::newRow("rotate, opengl") << false << true << 0;
- QTest::newRow("rotate, opengl, antialias") << true << true << 0;
- QTest::newRow("zoom, normal") << false << false << 1;
- QTest::newRow("zoom, normal, antialias") << true << false << 1;
- QTest::newRow("zoom, opengl") << false << true << 1;
- QTest::newRow("zoom, opengl, antialias") << true << true << 1;
- QTest::newRow("translate, normal") << false << false << 2;
- QTest::newRow("translate, normal, antialias") << true << false << 2;
- QTest::newRow("translate, opengl") << false << true << 2;
- QTest::newRow("translate, opengl, antialias") << true << true << 2;
+ QTest::newRow("rotate") << false << 0;
+ QTest::newRow("rotate, antialias") << true << 0;
+ QTest::newRow("zoom") << false << 1;
+ QTest::newRow("zoom, antialias") << true << 1;
+ QTest::newRow("translate") << false << 2;
+ QTest::newRow("translate, antialias") << true << 2;
}
void tst_QGraphicsView::chipTester()
{
QFETCH(bool, antialias);
- QFETCH(bool, opengl);
QFETCH(int, operation);
ChipTester tester;
tester.setAntialias(antialias);
- tester.setOpenGL(opengl);
tester.setOperation(ChipTester::Operation(operation));
tester.show();
QVERIFY(QTest::qWaitForWindowExposed(&tester));
diff --git a/tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt b/tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt
new file mode 100644
index 0000000000..ab16f7081e
--- /dev/null
+++ b/tests/benchmarks/widgets/graphicsview/qgraphicswidget/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qgraphicswidget.pro.
+
+#####################################################################
+## tst_bench_qgraphicswidget Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qgraphicswidget
+ SOURCES
+ tst_qgraphicswidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicswidget.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/itemviews/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/CMakeLists.txt
new file mode 100644
index 0000000000..76747b527d
--- /dev/null
+++ b/tests/benchmarks/widgets/itemviews/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from itemviews.pro.
+
+add_subdirectory(qtableview)
+add_subdirectory(qheaderview)
+add_subdirectory(qlistview)
diff --git a/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt
new file mode 100644
index 0000000000..6d616d2579
--- /dev/null
+++ b/tests/benchmarks/widgets/itemviews/qheaderview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qheaderview.pro.
+
+#####################################################################
+## tst_bench_qheaderview Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qheaderview
+ SOURCES
+ qheaderviewbench.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qheaderview.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt
new file mode 100644
index 0000000000..58062db6c0
--- /dev/null
+++ b/tests/benchmarks/widgets/itemviews/qlistview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qlistview.pro.
+
+#####################################################################
+## tst_bench_qlistview Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qlistview
+ SOURCES
+ tst_qlistview.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qlistview.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt b/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt
new file mode 100644
index 0000000000..f0b47692d8
--- /dev/null
+++ b/tests/benchmarks/widgets/itemviews/qtableview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtableview.pro.
+
+#####################################################################
+## tst_bench_qtableview Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qtableview
+ SOURCES
+ tst_qtableview.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qtableview.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/kernel/CMakeLists.txt b/tests/benchmarks/widgets/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..b55b31fe67
--- /dev/null
+++ b/tests/benchmarks/widgets/kernel/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from kernel.pro.
+
+add_subdirectory(qapplication)
+add_subdirectory(qwidget)
diff --git a/tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt b/tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt
new file mode 100644
index 0000000000..05bc480302
--- /dev/null
+++ b/tests/benchmarks/widgets/kernel/qapplication/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qapplication.pro.
+
+#####################################################################
+## tst_bench_qapplication Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qapplication
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qapplication.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt b/tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt
new file mode 100644
index 0000000000..6165cba25a
--- /dev/null
+++ b/tests/benchmarks/widgets/kernel/qwidget/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qwidget.pro.
+
+#####################################################################
+## tst_bench_qwidget Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qwidget
+ SOURCES
+ tst_qwidget.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
diff --git a/tests/benchmarks/widgets/styles/CMakeLists.txt b/tests/benchmarks/widgets/styles/CMakeLists.txt
new file mode 100644
index 0000000000..74e57c5731
--- /dev/null
+++ b/tests/benchmarks/widgets/styles/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from styles.pro.
+
+if(TARGET Qt::Widgets)
+ add_subdirectory(qstylesheetstyle)
+endif()
diff --git a/tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt b/tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt
new file mode 100644
index 0000000000..13aa6a1f62
--- /dev/null
+++ b/tests/benchmarks/widgets/styles/qstylesheetstyle/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qstylesheetstyle.pro.
+
+#####################################################################
+## tst_bench_qstylesheetstyle Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_qstylesheetstyle
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qstylesheetstyle.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/benchmarks/widgets/widgets/CMakeLists.txt b/tests/benchmarks/widgets/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..81a8fccc05
--- /dev/null
+++ b/tests/benchmarks/widgets/widgets/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from widgets.pro.
+
+add_subdirectory(qtextbrowser)
diff --git a/tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt b/tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt
new file mode 100644
index 0000000000..983d255787
--- /dev/null
+++ b/tests/benchmarks/widgets/widgets/qtextbrowser/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtextbrowser.pro.
+
+#####################################################################
+## tst_bench_QTextBrowser Binary:
+#####################################################################
+
+add_qt_benchmark(tst_bench_QTextBrowser
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qtextbrowser.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt
new file mode 100644
index 0000000000..d7b45a1d22
--- /dev/null
+++ b/tests/manual/CMakeLists.txt
@@ -0,0 +1,86 @@
+# Generated from manual.pro.
+
+# special case begn
+# Don't build manual tests when targeting iOS.
+if(APPLE_UIKIT)
+ return()
+endif()
+# special case end
+
+add_subdirectory(bearerex)
+add_subdirectory(filetest)
+# special case begin
+# diaglib is broken in dev due to missing
+# QtOpenGL/QGLFunctions headers
+# add_subdirectory(embeddedintoforeignwindow)
+# add_subdirectory(foreignwindows)
+# special case end
+add_subdirectory(gestures)
+# add_subdirectory(highdpi) special case broken in dev
+add_subdirectory(inputmethodhints)
+add_subdirectory(keypadnavigation)
+#add_subdirectory(lance) # special case qgl.h missing
+add_subdirectory(qcursor)
+add_subdirectory(qdesktopservices)
+add_subdirectory(qdesktopwidget)
+add_subdirectory(qgraphicsitem)
+add_subdirectory(qgraphicsitemgroup)
+add_subdirectory(qgraphicslayout/flicker)
+add_subdirectory(qhttpnetworkconnection)
+add_subdirectory(qimagereader)
+add_subdirectory(qlayout)
+add_subdirectory(qlocale)
+add_subdirectory(qmimedatabase)
+add_subdirectory(qnetconmonitor)
+add_subdirectory(qnetworkaccessmanager/qget)
+add_subdirectory(qnetworkconfigurationmanager)
+add_subdirectory(qnetworkconfiguration)
+#special case begin
+if (QT_FEATURE_openssl AND UNIX)
+ add_subdirectory(qnetworkreply)
+endif()
+#special case end
+add_subdirectory(qstorageinfo)
+add_subdirectory(qscreen)
+add_subdirectory(qsslsocket)
+add_subdirectory(qsysinfo)
+add_subdirectory(qtabletevent)
+add_subdirectory(qtexteditlist)
+add_subdirectory(qtexttableborders)
+add_subdirectory(qtbug-8933)
+add_subdirectory(qtbug-52641)
+add_subdirectory(qtouchevent)
+add_subdirectory(touch)
+add_subdirectory(qwidget_zorder)
+add_subdirectory(repaint)
+add_subdirectory(socketengine)
+add_subdirectory(textrendering)
+add_subdirectory(widgets)
+add_subdirectory(windowflags)
+add_subdirectory(windowgeometry)
+add_subdirectory(windowmodality)
+add_subdirectory(widgetgrab)
+add_subdirectory(xembed-raster)
+add_subdirectory(xembed-widgets)
+add_subdirectory(shortcuts)
+add_subdirectory(dialogs)
+add_subdirectory(windowtransparency)
+add_subdirectory(unc)
+add_subdirectory(qtabbar)
+add_subdirectory(rhi)
+if(UNIX)
+ add_subdirectory(network_remote_stresstest)
+ add_subdirectory(network_stresstest)
+endif()
+if(QT_FEATURE_openssl)
+ add_subdirectory(qssloptions)
+endif()
+if(QT_FEATURE_opengl)
+ # add_subdirectory(qopengltextureblitter) special case broken in dev
+endif()
+if(QT_FEATURE_egl AND QT_FEATURE_opengl)
+ # add_subdirectory(qopenglcontext) # special case broken in dev
+endif()
+if(QT_FEATURE_vulkan)
+ add_subdirectory(qvulkaninstance)
+endif()
diff --git a/tests/manual/bearerex/CMakeLists.txt b/tests/manual/bearerex/CMakeLists.txt
new file mode 100644
index 0000000000..3a09ac5358
--- /dev/null
+++ b/tests/manual/bearerex/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from bearerex.pro.
+
+#####################################################################
+## BearerEx Binary:
+#####################################################################
+
+add_qt_manual_test(BearerEx
+ GUI
+ SOURCES
+ bearerex.cpp bearerex.h bearerex.ui
+ datatransferer.cpp datatransferer.h
+ detailedinfodialog.ui
+ main.cpp
+ sessiondialog.ui
+ xqlistwidget.cpp xqlistwidget.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Network
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:bearerex.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/appicon/CMakeLists.txt b/tests/manual/cocoa/appicon/CMakeLists.txt
new file mode 100644
index 0000000000..5cb97d7c6a
--- /dev/null
+++ b/tests/manual/cocoa/appicon/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from appicon.pro.
+
+#####################################################################
+## appicon Binary:
+#####################################################################
+
+add_qt_manual_test(appicon
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:appicon.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/menurama/CMakeLists.txt b/tests/manual/cocoa/menurama/CMakeLists.txt
new file mode 100644
index 0000000000..1c39a59fc3
--- /dev/null
+++ b/tests/manual/cocoa/menurama/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from menurama.pro.
+
+#####################################################################
+## Menurama Binary:
+#####################################################################
+
+add_qt_manual_test(Menurama
+ GUI
+ SOURCES
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ menuramaapplication.cpp menuramaapplication.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:menurama.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/menurama/menurama.pro b/tests/manual/cocoa/menurama/menurama.pro
index da6f224e0d..f0928be31d 100644
--- a/tests/manual/cocoa/menurama/menurama.pro
+++ b/tests/manual/cocoa/menurama/menurama.pro
@@ -4,9 +4,7 @@
#
#-------------------------------------------------
-QT += core gui
-
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += core gui widgets
TARGET = Menurama
TEMPLATE = app
diff --git a/tests/manual/cocoa/menus/CMakeLists.txt b/tests/manual/cocoa/menus/CMakeLists.txt
new file mode 100644
index 0000000000..a3fa70ba5d
--- /dev/null
+++ b/tests/manual/cocoa/menus/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from menus.pro.
+
+#####################################################################
+## menus Binary:
+#####################################################################
+
+add_qt_manual_test(menus
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:menus.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/nativewidgets/CMakeLists.txt b/tests/manual/cocoa/nativewidgets/CMakeLists.txt
new file mode 100644
index 0000000000..cab2da5421
--- /dev/null
+++ b/tests/manual/cocoa/nativewidgets/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from nativewigets.pro.
+
+#####################################################################
+## nativewigets Binary:
+#####################################################################
+
+add_qt_manual_test(nativewigets
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:nativewigets.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/popups/CMakeLists.txt b/tests/manual/cocoa/popups/CMakeLists.txt
new file mode 100644
index 0000000000..53468edc7c
--- /dev/null
+++ b/tests/manual/cocoa/popups/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from popups.pro.
+
+#####################################################################
+## popups Binary:
+#####################################################################
+
+add_qt_manual_test(popups
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/cocoa/qmaccocoaviewcontainer/CMakeLists.txt b/tests/manual/cocoa/qmaccocoaviewcontainer/CMakeLists.txt
new file mode 100644
index 0000000000..95317c520e
--- /dev/null
+++ b/tests/manual/cocoa/qmaccocoaviewcontainer/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qmaccocoaviewcontainer.pro.
+
+#####################################################################
+## qmaccocoaviewcontainer Binary:
+#####################################################################
+
+add_qt_manual_test(qmaccocoaviewcontainer
+ GUI
+ SOURCES
+ TestMouseMovedNSView.h TestMouseMovedNSView.m
+ main.mm
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qmaccocoaviewcontainer.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/qsystemtrayicon/CMakeLists.txt b/tests/manual/cocoa/qsystemtrayicon/CMakeLists.txt
new file mode 100644
index 0000000000..73c3157b89
--- /dev/null
+++ b/tests/manual/cocoa/qsystemtrayicon/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from qsystemtrayicon.pro.
+
+#####################################################################
+## qsystemtrayicon Binary:
+#####################################################################
+
+add_qt_manual_test(qsystemtrayicon
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+# Resources:
+set(icons_resource_files
+ "macsystray16x16.png"
+ "macsystray18x18.png"
+ "macsystray25x15.png"
+ "macsystray32x32.png"
+ "macsystray36x36.png"
+ "macsystray50x30.png"
+ "macsystray64x64.png"
+)
+
+add_qt_resource(qsystemtrayicon "icons"
+ PREFIX
+ "/"
+ FILES
+ ${icons_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qsystemtrayicon.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt b/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt
new file mode 100644
index 0000000000..066eefa313
--- /dev/null
+++ b/tests/manual/cocoa/qt_on_cocoa/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qt_on_cocoa.pro.
+
+#####################################################################
+## qt_on_cocoa Binary:
+#####################################################################
+
+add_qt_manual_test(qt_on_cocoa
+ GUI
+ SOURCES
+ main.mm
+ rasterwindow.cpp rasterwindow.h
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ Qt::Gui
+ Qt::Quick
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qt_on_cocoa.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/cocoa/wheelevent/CMakeLists.txt b/tests/manual/cocoa/wheelevent/CMakeLists.txt
new file mode 100644
index 0000000000..305036fa78
--- /dev/null
+++ b/tests/manual/cocoa/wheelevent/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from wheelevent.pro.
+
+#####################################################################
+## wheelevent Binary:
+#####################################################################
+
+add_qt_manual_test(wheelevent
+ GUI
+ SOURCES
+ main.cpp
+ window.cpp window.h
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:wheelevent.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/corelib/tools/qhash/main.cpp b/tests/manual/corelib/tools/qhash/main.cpp
index b2c40f2183..298d1777ea 100644
--- a/tests/manual/corelib/tools/qhash/main.cpp
+++ b/tests/manual/corelib/tools/qhash/main.cpp
@@ -27,7 +27,6 @@
****************************************************************************/
#include <QDebug>
-//#define QT_STRICT_ITERATORS
#include <QHash>
void testEraseNoError()
diff --git a/tests/manual/corelib/tools/qlist/main.cpp b/tests/manual/corelib/tools/qlist/main.cpp
index 3f8ade5778..0b54105f5e 100644
--- a/tests/manual/corelib/tools/qlist/main.cpp
+++ b/tests/manual/corelib/tools/qlist/main.cpp
@@ -26,7 +26,6 @@
**
****************************************************************************/
#include <QDebug>
-//#define QT_STRICT_ITERATORS
#include <QVector>
void testErase()
{
@@ -55,4 +54,4 @@ int main()
// testErase();
testInsert();
return 0;
-} \ No newline at end of file
+}
diff --git a/tests/manual/corelib/tools/qset/main.cpp b/tests/manual/corelib/tools/qset/main.cpp
index 1066e53e7d..701c8889db 100644
--- a/tests/manual/corelib/tools/qset/main.cpp
+++ b/tests/manual/corelib/tools/qset/main.cpp
@@ -27,7 +27,6 @@
****************************************************************************/
#include <QDebug>
-//#define QT_STRICT_ITERATORS
#include <QSet>
void testErase()
diff --git a/tests/manual/corelib/tools/qvarlengtharray/main.cpp b/tests/manual/corelib/tools/qvarlengtharray/main.cpp
index 8580d97a36..0544bb0c4b 100644
--- a/tests/manual/corelib/tools/qvarlengtharray/main.cpp
+++ b/tests/manual/corelib/tools/qvarlengtharray/main.cpp
@@ -27,7 +27,6 @@
****************************************************************************/
#include <QDebug>
-//#define QT_STRICT_ITERATORS
#include <QVarLengthArray>
void testErase()
diff --git a/tests/manual/corelib/tools/qvector/main.cpp b/tests/manual/corelib/tools/qvector/main.cpp
index e3dc89b149..1b35123f15 100644
--- a/tests/manual/corelib/tools/qvector/main.cpp
+++ b/tests/manual/corelib/tools/qvector/main.cpp
@@ -27,7 +27,6 @@
****************************************************************************/
#include <QDebug>
-//#define QT_STRICT_ITERATORS
#include <QVector>
void testErase()
diff --git a/tests/manual/diaglib/debugproxystyle.cpp b/tests/manual/diaglib/debugproxystyle.cpp
index ed35af5962..809613cd1d 100644
--- a/tests/manual/diaglib/debugproxystyle.cpp
+++ b/tests/manual/diaglib/debugproxystyle.cpp
@@ -68,8 +68,8 @@ QDebug operator<<(QDebug debug, const QStyleOption *option)
} else {
debug << "QStyleOption(";
}
- debug << "rect=" << option->rect.width() << 'x' << option->rect.height()
- << forcesign << option->rect.x() << option->rect.y() << noforcesign;
+ debug << "rect=" << option->rect.width() << 'x' << option->rect.height() << Qt::forcesign
+ << option->rect.x() << option->rect.y() << Qt::noforcesign;
if (option->state != QStyle::State_None)
debug << ", state=" << option->state;
#if QT_VERSION >= 0x050000
diff --git a/tests/manual/diaglib/diaglib.pri b/tests/manual/diaglib/diaglib.pri
index b57ee75841..ace9caecc6 100644
--- a/tests/manual/diaglib/diaglib.pri
+++ b/tests/manual/diaglib/diaglib.pri
@@ -17,20 +17,8 @@ win32:!winrt: {
SOURCES += $$PWD/nativewindowdump.cpp
}
-greaterThan(QT_MAJOR_VERSION, 4) {
- QT += gui-private core-private
- contains(QT, widgets) {
- HEADERS += \
- $$PWD/qwidgetdump.h \
- $$PWD/debugproxystyle.h \
- $$PWD/logwidget.h
-
- SOURCES += \
- $$PWD/qwidgetdump.cpp \
- $$PWD/debugproxystyle.cpp \
- $$PWD/logwidget.cpp
- }
-} else {
+QT += gui-private core-private
+contains(QT, widgets) {
HEADERS += \
$$PWD/qwidgetdump.h \
$$PWD/debugproxystyle.h \
@@ -40,14 +28,17 @@ greaterThan(QT_MAJOR_VERSION, 4) {
$$PWD/qwidgetdump.cpp \
$$PWD/debugproxystyle.cpp \
$$PWD/logwidget.cpp
+ QT += widgets-private
}
contains(QT, opengl) {
-HEADERS += \
- $$PWD/glinfo.h
+ HEADERS += \
+ $$PWD/glinfo.h
-SOURCES += \
- $$PWD/glinfo.cpp
+ SOURCES += \
+ $$PWD/glinfo.cpp
+
+ QT += opengl
}
DEFINES += QT_DIAG_LIB
diff --git a/tests/manual/diaglib/nativewindowdump_win.cpp b/tests/manual/diaglib/nativewindowdump_win.cpp
index d91e673d1c..6334fcfedd 100644
--- a/tests/manual/diaglib/nativewindowdump_win.cpp
+++ b/tests/manual/diaglib/nativewindowdump_win.cpp
@@ -41,6 +41,8 @@
# define WS_EX_NOREDIRECTIONBITMAP 0x00200000L
#endif
+using namespace Qt;
+
namespace QtDiag {
struct DumpContext {
diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp
index 5a2966021b..926d2aaf35 100644
--- a/tests/manual/diaglib/qwidgetdump.cpp
+++ b/tests/manual/diaglib/qwidgetdump.cpp
@@ -86,14 +86,16 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w,
formatWidgetClass(str, w);
str << ' ' << (w->isVisible() ? "[visible] " : "[hidden] ");
if (const WId nativeWinId = w->internalWinId())
- str << "[native: " << hex << showbase << nativeWinId << dec << noshowbase << "] ";
+ str << "[native: " << Qt::hex << Qt::showbase << nativeWinId << Qt::dec << Qt::noshowbase
+ << "] ";
if (w->isWindow())
str << "[top] ";
str << (w->testAttribute(Qt::WA_Mapped) ? "[mapped] " : "[not mapped] ");
if (w->testAttribute(Qt::WA_DontCreateNativeAncestors))
str << "[NoNativeAncestors] ";
if (const int states = w->windowState())
- str << "windowState=" << hex << showbase << states << dec << noshowbase << ' ';
+ str << "windowState=" << Qt::hex << Qt::showbase << states << Qt::dec << Qt::noshowbase
+ << ' ';
formatRect(str, w->geometry());
if (w->isWindow()) {
str << ' ' << w->logicalDpiX() << "DPI";
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp
index 381b683359..2be26ff142 100644
--- a/tests/manual/diaglib/qwindowdump.cpp
+++ b/tests/manual/diaglib/qwindowdump.cpp
@@ -61,8 +61,8 @@ void formatObject(QTextStream &str, const QObject *o)
void formatRect(QTextStream &str, const QRect &geom)
{
- str << geom.width() << 'x' << geom.height()
- << forcesign << geom.x() << geom.y() << noforcesign;
+ str << geom.width() << 'x' << geom.height() << Qt::forcesign << geom.x() << geom.y()
+ << Qt::noforcesign;
}
#define debugType(s, type, typeConstant) \
@@ -75,7 +75,7 @@ if (flags & flagConstant) \
void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags)
{
- str << showbase << hex << unsigned(flags) << dec << noshowbase;
+ str << Qt::showbase << Qt::hex << unsigned(flags) << Qt::dec << Qt::noshowbase;
const Qt::WindowFlags windowType = flags & Qt::WindowType_Mask;
debugFlag(str, flags, Qt::Window)
debugType(str, windowType, Qt::Dialog)
@@ -123,7 +123,8 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option
formatObject(str, w);
str << ' ' << (w->isVisible() ? "[visible] " : "[hidden] ");
if (const WId nativeWinId = pw ? pw->winId() : WId(0))
- str << "[native: " << hex << showbase << nativeWinId << dec << noshowbase << "] ";
+ str << "[native: " << Qt::hex << Qt::showbase << nativeWinId << Qt::dec << Qt::noshowbase
+ << "] ";
if (w->isTopLevel())
str << "[top] ";
if (w->isExposed())
diff --git a/tests/manual/diaglib/textdump.cpp b/tests/manual/diaglib/textdump.cpp
index 383ec4edb0..33455a2a56 100644
--- a/tests/manual/diaglib/textdump.cpp
+++ b/tests/manual/diaglib/textdump.cpp
@@ -408,8 +408,8 @@ struct FormattingContext
static void formatCharacter(QTextStream &str, const QChar &qc, FormattingContext &context)
{
const ushort unicode = qc.unicode();
- str << "U+" << qSetFieldWidth(4) << qSetPadChar('0') << uppercasedigits << hex << unicode
- << dec << qSetFieldWidth(0) << ' ';
+ str << "U+" << qSetFieldWidth(4) << qSetPadChar('0') << Qt::uppercasedigits << Qt::hex
+ << unicode << Qt::dec << qSetFieldWidth(0) << ' ';
const EnumLookup *specialChar = enumLookup(unicode, specialCharactersEnumLookup, sizeof(specialCharactersEnumLookup) / sizeof(EnumLookup));
if (specialChar)
@@ -477,7 +477,7 @@ QString dumpTextAsCode(const QString &text)
{
QString result;
QTextStream str(&result);
- str << " QString result;\n" << hex << showbase;
+ str << " QString result;\n" << Qt::hex << Qt::showbase;
for (QChar c : text)
str << " result += QChar(" << c.unicode() << ");\n";
str << '\n';
diff --git a/tests/manual/dialogs/CMakeLists.txt b/tests/manual/dialogs/CMakeLists.txt
new file mode 100644
index 0000000000..ef000529a5
--- /dev/null
+++ b/tests/manual/dialogs/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from dialogs.pro.
+
+#####################################################################
+## dialogs Binary:
+#####################################################################
+
+add_qt_manual_test(dialogs
+ GUI
+ SOURCES
+ colordialogpanel.cpp colordialogpanel.h
+ filedialogpanel.cpp filedialogpanel.h
+ fontdialogpanel.cpp fontdialogpanel.h
+ main.cpp
+ messageboxpanel.cpp messageboxpanel.h
+ utils.cpp utils.h
+ wizardpanel.cpp wizardpanel.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:dialogs.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(dialogs CONDITION TARGET Qt::PrintSupport
+ PUBLIC_LIBRARIES
+ Qt::PrintSupport
+)
+
+extend_target(dialogs CONDITION NOT (QT_FEATURE_printer EQUAL FALSE)
+ SOURCES
+ printdialogpanel.cpp printdialogpanel.h printdialogpanel.ui
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
diff --git a/tests/manual/dialogs/dialogs.pro b/tests/manual/dialogs/dialogs.pro
index d765b8cf05..1beedc251e 100644
--- a/tests/manual/dialogs/dialogs.pro
+++ b/tests/manual/dialogs/dialogs.pro
@@ -1,9 +1,5 @@
-QT += core gui
-
-greaterThan(QT_MAJOR_VERSION, 4) {
- QT += widgets
- qtHaveModule(printsupport): QT += printsupport
-}
+QT += core gui widgets
+qtHaveModule(printsupport): QT += printsupport
TARGET = dialogs
TEMPLATE = app
diff --git a/tests/manual/dialogs/messageboxpanel.cpp b/tests/manual/dialogs/messageboxpanel.cpp
index 07b387f988..6a305523ea 100644
--- a/tests/manual/dialogs/messageboxpanel.cpp
+++ b/tests/manual/dialogs/messageboxpanel.cpp
@@ -39,6 +39,8 @@
#include <QLineEdit>
#include <QLabel>
#include <QCheckBox>
+#include <QRegularExpressionValidator>
+#include <QRegularExpression>
MessageBoxPanel::MessageBoxPanel(QWidget *parent) : QWidget(parent)
,m_iconComboBox(new QComboBox)
@@ -80,7 +82,7 @@ MessageBoxPanel::MessageBoxPanel(QWidget *parent) : QWidget(parent)
// buttons mask
optionsLayout->addWidget(new QLabel(QString::fromLatin1("Message box button mask (in hex)")));
- m_validator = new QRegExpValidator(QRegExp("0[xX]?[0-9a-fA-F]+"), this);
+ m_validator = new QRegularExpressionValidator(QRegularExpression("0[xX]?[0-9a-fA-F]+"), this);
m_buttonsMask->setMaxLength(10);
m_buttonsMask->setValidator(m_validator);
m_buttonsMask->setText(QString::fromLatin1("0x00300400"));
diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp
index b7447e3d64..dcd8b43bf3 100644
--- a/tests/manual/dialogs/printdialogpanel.cpp
+++ b/tests/manual/dialogs/printdialogpanel.cpp
@@ -190,7 +190,8 @@ QTextStream &operator<<(QTextStream &s, const QSizeF &size)
QTextStream &operator<<(QTextStream &s, const QRectF &rect)
{
- s << rect.width() << 'x' << rect.height() << forcesign << rect.x() << rect.y() << noforcesign;
+ s << rect.width() << 'x' << rect.height() << Qt::forcesign << rect.x() << rect.y()
+ << Qt::noforcesign;
return s;
}
diff --git a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt
new file mode 100644
index 0000000000..02c0893cde
--- /dev/null
+++ b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from embeddedintoforeignwindow.pro.
+
+#####################################################################
+## embeddedintoforeignwindow Binary:
+#####################################################################
+
+add_qt_manual_test(embeddedintoforeignwindow
+ SOURCES
+ ../diaglib/eventfilter.cpp ../diaglib/eventfilter.h
+ ../diaglib/nativewindowdump.h
+ ../diaglib/qwindowdump.cpp ../diaglib/qwindowdump.h
+ ../diaglib/textdump.cpp ../diaglib/textdump.h
+ itemwindow.cpp itemwindow.h
+ main.cpp
+ DEFINES
+ QT_DIAG_LIB
+ INCLUDE_DIRECTORIES
+ ../diaglib
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:embeddedintoforeignwindow.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(embeddedintoforeignwindow CONDITION WIN32 AND NOT WINRT
+ SOURCES
+ ../diaglib/nativewindowdump_win.cpp
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(embeddedintoforeignwindow CONDITION UNIX OR WINRT
+ SOURCES
+ ../diaglib/nativewindowdump.cpp
+)
+
+extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_widgets
+ SOURCES
+ ../diaglib/debugproxystyle.cpp ../diaglib/debugproxystyle.h
+ ../diaglib/logwidget.cpp ../diaglib/logwidget.h
+ ../diaglib/qwidgetdump.cpp ../diaglib/qwidgetdump.h
+ PUBLIC_LIBRARIES
+ Qt::WidgetsPrivate
+)
+
+extend_target(embeddedintoforeignwindow CONDITION QT_FEATURE_opengl
+ SOURCES
+ ../diaglib/glinfo.cpp ../diaglib/glinfo.h
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/manual/filetest/CMakeLists.txt b/tests/manual/filetest/CMakeLists.txt
new file mode 100644
index 0000000000..efefc262ef
--- /dev/null
+++ b/tests/manual/filetest/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from filetest.pro.
+
+#####################################################################
+## filetest Binary:
+#####################################################################
+
+add_qt_manual_test(filetest
+ SOURCES
+ main.cpp
+)
+
+#### Keys ignored in scope 1:.:.:filetest.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/foreignwindows/CMakeLists.txt b/tests/manual/foreignwindows/CMakeLists.txt
new file mode 100644
index 0000000000..8a7f525198
--- /dev/null
+++ b/tests/manual/foreignwindows/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Generated from foreignwindows.pro.
+
+#####################################################################
+## foreignwindows Binary:
+#####################################################################
+
+add_qt_manual_test(foreignwindows
+ SOURCES
+ ../diaglib/eventfilter.cpp ../diaglib/eventfilter.h
+ ../diaglib/nativewindowdump.h
+ ../diaglib/qwindowdump.cpp ../diaglib/qwindowdump.h
+ ../diaglib/textdump.cpp ../diaglib/textdump.h
+ main.cpp
+ DEFINES
+ QT_DIAG_LIB
+ INCLUDE_DIRECTORIES
+ ../diaglib
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:foreignwindows.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(foreignwindows CONDITION WIN32 AND NOT WINRT
+ SOURCES
+ ../diaglib/nativewindowdump_win.cpp
+ PUBLIC_LIBRARIES
+ user32
+)
+
+extend_target(foreignwindows CONDITION UNIX OR WINRT
+ SOURCES
+ ../diaglib/nativewindowdump.cpp
+)
+
+extend_target(foreignwindows CONDITION QT_FEATURE_widgets
+ SOURCES
+ ../diaglib/debugproxystyle.cpp ../diaglib/debugproxystyle.h
+ ../diaglib/logwidget.cpp ../diaglib/logwidget.h
+ ../diaglib/qwidgetdump.cpp ../diaglib/qwidgetdump.h
+ PUBLIC_LIBRARIES
+ Qt::WidgetsPrivate
+)
+
+extend_target(foreignwindows CONDITION QT_FEATURE_opengl
+ SOURCES
+ ../diaglib/glinfo.cpp ../diaglib/glinfo.h
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
diff --git a/tests/manual/gestures/CMakeLists.txt b/tests/manual/gestures/CMakeLists.txt
new file mode 100644
index 0000000000..7011d3221d
--- /dev/null
+++ b/tests/manual/gestures/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Generated from gestures.pro.
+
+add_subdirectory(graphicsview)
+add_subdirectory(scrollarea)
diff --git a/tests/manual/gestures/graphicsview/CMakeLists.txt b/tests/manual/gestures/graphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..81dc1931aa
--- /dev/null
+++ b/tests/manual/gestures/graphicsview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from graphicsview.pro.
+
+#####################################################################
+## tst_manual_graphicsview Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_graphicsview
+ GUI
+ SOURCES
+ gestures.cpp gestures.h
+ imageitem.cpp imageitem.h
+ main.cpp
+ mousepangesturerecognizer.cpp mousepangesturerecognizer.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/gestures/graphicsview/graphicsview.pro b/tests/manual/gestures/graphicsview/graphicsview.pro
index 9ecd0b372f..a20c4b3948 100644
--- a/tests/manual/gestures/graphicsview/graphicsview.pro
+++ b/tests/manual/gestures/graphicsview/graphicsview.pro
@@ -1,5 +1,7 @@
QT += widgets
+TARGET = tst_manual_graphicsview
+
SOURCES += main.cpp \
imageitem.cpp \
gestures.cpp \
diff --git a/tests/manual/gestures/scrollarea/CMakeLists.txt b/tests/manual/gestures/scrollarea/CMakeLists.txt
new file mode 100644
index 0000000000..c521c8e2df
--- /dev/null
+++ b/tests/manual/gestures/scrollarea/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from scrollarea.pro.
+
+#####################################################################
+## scrollarea Binary:
+#####################################################################
+
+add_qt_manual_test(scrollarea
+ GUI
+ SOURCES
+ main.cpp
+ mousepangesturerecognizer.cpp mousepangesturerecognizer.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/highdpi/CMakeLists.txt b/tests/manual/highdpi/CMakeLists.txt
new file mode 100644
index 0000000000..dee2d1ae43
--- /dev/null
+++ b/tests/manual/highdpi/CMakeLists.txt
@@ -0,0 +1,40 @@
+# Generated from highdpi.pro.
+
+#####################################################################
+## highdpi Binary:
+#####################################################################
+
+add_qt_manual_test(highdpi
+ SOURCES
+ dragwidget.cpp dragwidget.h
+ main.cpp
+ DEFINES
+ HAVE_SCREEN_BASE_DPI
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+# Resources:
+set(highdpi_resource_files
+ "qticon16.png"
+ "qticon16@2x.png"
+ "qticon16@3x.png"
+ "qticon32.png"
+ "qticon32@2x.png"
+ "qticon64.png"
+)
+
+add_qt_resource(highdpi "highdpi"
+ PREFIX
+ "/"
+ FILES
+ ${highdpi_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:highdpi.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/highdpi/main.cpp b/tests/manual/highdpi/main.cpp
index 0c4b5c88ae..2a9fb6aa0c 100644
--- a/tests/manual/highdpi/main.cpp
+++ b/tests/manual/highdpi/main.cpp
@@ -75,7 +75,7 @@ static QTextStream &operator<<(QTextStream &str, const QSizeF &s)
static QTextStream &operator<<(QTextStream &str, const QRect &r)
{
- str << r.width() << 'x' << r.height() << forcesign << r.x() << r.y() << noforcesign;
+ str << r.width() << 'x' << r.height() << Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
return str;
}
diff --git a/tests/manual/inputmethodhints/CMakeLists.txt b/tests/manual/inputmethodhints/CMakeLists.txt
new file mode 100644
index 0000000000..1bbf7caef8
--- /dev/null
+++ b/tests/manual/inputmethodhints/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from inputmethodhints.pro.
+
+#####################################################################
+## tst_inputmethodhints Binary:
+#####################################################################
+
+add_qt_manual_test(tst_inputmethodhints
+ GUI
+ SOURCES
+ inputmethodhints.cpp inputmethodhints.h inputmethodhints.ui
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:inputmethodhints.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/keypadnavigation/CMakeLists.txt b/tests/manual/keypadnavigation/CMakeLists.txt
new file mode 100644
index 0000000000..8f11ad711c
--- /dev/null
+++ b/tests/manual/keypadnavigation/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from keypadnavigation.pro.
+
+#####################################################################
+## keypadnavigation Binary:
+#####################################################################
+
+add_qt_manual_test(keypadnavigation
+ GUI
+ SOURCES
+ keypadnavigation.ui
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
diff --git a/tests/manual/lance/CMakeLists.txt b/tests/manual/lance/CMakeLists.txt
new file mode 100644
index 0000000000..c59910d363
--- /dev/null
+++ b/tests/manual/lance/CMakeLists.txt
@@ -0,0 +1,175 @@
+# Generated from lance.pro.
+
+#####################################################################
+## lance Binary:
+#####################################################################
+
+add_qt_manual_test(lance
+ SOURCES
+ ../../auto/other/lancelot/paintcommands.cpp ../../auto/other/lancelot/paintcommands.h
+ interactivewidget.cpp interactivewidget.h
+ main.cpp
+ widgets.h
+ INCLUDE_DIRECTORIES
+ .
+ ../../auto/other/lancelot
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::PrintSupport
+ Qt::Widgets
+)
+
+# Resources:
+set(icons_resource_files
+ "enum.png"
+ "tools.png"
+)
+
+add_qt_resource(lance "icons"
+ PREFIX
+ "/icons"
+ FILES
+ ${icons_resource_files}
+)
+set_source_files_properties("../../auto/other/lancelot/images/alpha.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/alpha.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/alpha2x2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/alpha2x2.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/bitmap.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/bitmap.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/border.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/border.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/borderimage.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/borderimage.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_argb32.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_argb32.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_indexed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_indexed.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_indexed_mask.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_indexed_mask.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_mono.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_mono_128.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono_128.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_mono_palette.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_mono_palette.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dome_rgb32.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dome_rgb32.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/dot.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/face.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/face.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/gam030.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam030.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/gam045.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam045.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/gam056.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam056.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/gam100.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam100.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/gam200.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/gam200.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/image.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/image.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/mask.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/mask.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/mask_100.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/mask_100.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/masked.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/masked.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/sign.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/sign.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/solid.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/solid2x2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/solid2x2.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/struct-image-01.jpg"
+ PROPERTIES QT_RESOURCE_ALIAS "images/struct-image-01.jpg"
+)
+set_source_files_properties("../../auto/other/lancelot/images/struct-image-01.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/struct-image-01.png"
+)
+set_source_files_properties("../../auto/other/lancelot/images/zebra.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/zebra.png"
+)
+set(images_resource_files
+ "images/alpha.png"
+ "images/alpha2x2.png"
+ "images/bitmap.png"
+ "images/border.png"
+ "images/borderimage.png"
+ "images/dome_argb32.png"
+ "images/dome_indexed.png"
+ "images/dome_indexed_mask.png"
+ "images/dome_mono.png"
+ "images/dome_mono_128.png"
+ "images/dome_mono_palette.png"
+ "images/dome_rgb32.png"
+ "images/dot.png"
+ "images/face.png"
+ "images/gam030.png"
+ "images/gam045.png"
+ "images/gam056.png"
+ "images/gam100.png"
+ "images/gam200.png"
+ "images/image.png"
+ "images/mask.png"
+ "images/mask_100.png"
+ "images/masked.png"
+ "images/sign.png"
+ "images/solid.png"
+ "images/solid2x2.png"
+ "images/struct-image-01.jpg"
+ "images/struct-image-01.png"
+ "images/zebra.png"
+)
+
+add_qt_resource(lance "images"
+ PREFIX
+ "/"
+ BASE
+ "../../auto/other/lancelot"
+ FILES
+ ${images_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:lance.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(lance CONDITION TARGET Qt::OpenGL
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+ Qt::OpenGLWidgets
+)
diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro
index 78ca2f56e5..4437cb4539 100644
--- a/tests/manual/lance/lance.pro
+++ b/tests/manual/lance/lance.pro
@@ -2,7 +2,7 @@ LANCELOT_DIR = $$PWD/../../auto/other/lancelot
CONFIG += cmdline moc
TEMPLATE = app
INCLUDEPATH += . $$LANCELOT_DIR
-QT += core-private gui-private widgets printsupport
+QT += core-private gui-private widgets printsupport openglwidgets
HEADERS += widgets.h \
interactivewidget.h \
diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp
index 6dc5e2076a..b08715f83c 100644
--- a/tests/manual/lance/main.cpp
+++ b/tests/manual/lance/main.cpp
@@ -42,8 +42,9 @@
#endif
#ifndef QT_NO_OPENGL
-#include <qgl.h>
-#include <QGLPixelBuffer>
+#include <QtOpenGL/QOpenGLFramebufferObjectFormat>
+#include <QtOpenGL/QOpenGLPaintDevice>
+#include <QtOpenGLWidgets/QOpenGLWidget>
#endif
// #define DO_QWS_DEBUGGING
@@ -89,7 +90,7 @@ static void printHelp()
" -imagemono Paints the files to a monochrome image\n"
" -imagewidget same as image, but with interacion...\n"
#ifndef QT_NO_OPENGL
- " -opengl Paints the files to a QGLWidget (Qt4 style) on screen\n"
+ " -opengl Paints the files to a QOpenGLWidget on screen\n"
" -glbuffer Paints the files to a QOpenGLFrameBufferObject (Qt5 style) \n"
" -coreglbuffer Paints the files to a Core Profile context QOpenGLFrameBufferObject\n"
#endif
@@ -233,12 +234,11 @@ int main(int argc, char **argv)
bool verboseMode = false;
#ifndef QT_NO_OPENGL
- QGLFormat f = QGLFormat::defaultFormat();
- f.setSampleBuffers(true);
- f.setStencil(true);
- f.setAlpha(true);
+ QSurfaceFormat f = QSurfaceFormat::defaultFormat();
+ f.setSamples(1);
+ f.setStencilBufferSize(8);
f.setAlphaBufferSize(8);
- QGLFormat::setDefaultFormat(f);
+ QSurfaceFormat::setDefaultFormat(f);
#endif
char *arg;
@@ -447,14 +447,14 @@ int main(int argc, char **argv)
}
case OpenGLType:
{
- OnScreenWidget<QGLWidget> *qGLWidget = new OnScreenWidget<QGLWidget>(files.at(j));
- qGLWidget->setVerboseMode(verboseMode);
- qGLWidget->setType(type);
- qGLWidget->setCheckersBackground(checkers_background);
- qGLWidget->m_commands = content;
- qGLWidget->resize(width, height);
- qGLWidget->show();
- activeWidget = qGLWidget;
+ OnScreenWidget<QOpenGLWidget> *qOpenGLWidget = new OnScreenWidget<QOpenGLWidget>(files.at(j));
+ qOpenGLWidget->setVerboseMode(verboseMode);
+ qOpenGLWidget->setType(type);
+ qOpenGLWidget->setCheckersBackground(checkers_background);
+ qOpenGLWidget->m_commands = content;
+ qOpenGLWidget->resize(width, height);
+ qOpenGLWidget->show();
+ activeWidget = qOpenGLWidget;
break;
}
#else
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
index 42f9878e44..de13bc799e 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -67,8 +67,4 @@ qtConfig(opengl) {
win32: SUBDIRS -= network_remote_stresstest network_stresstest
-lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qmimedatabase qnetworkreply \
-qpainfo qscreen socketengine xembed-raster xembed-widgets windowtransparency \
-embeddedintoforeignwindow foreignwindows
-
qtConfig(vulkan): SUBDIRS += qvulkaninstance
diff --git a/tests/manual/markdown/CMakeLists.txt b/tests/manual/markdown/CMakeLists.txt
new file mode 100644
index 0000000000..f6e5284eea
--- /dev/null
+++ b/tests/manual/markdown/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from html2md.pro.
+
+#####################################################################
+## html2md Binary:
+#####################################################################
+
+add_qt_manual_test(html2md
+ GUI
+ SOURCES
+ html2md.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:html2md.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/network_remote_stresstest/CMakeLists.txt b/tests/manual/network_remote_stresstest/CMakeLists.txt
new file mode 100644
index 0000000000..46db952b46
--- /dev/null
+++ b/tests/manual/network_remote_stresstest/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from network_remote_stresstest.pro.
+
+#####################################################################
+## tst_network_remote_stresstest Binary:
+#####################################################################
+
+add_qt_manual_test(tst_network_remote_stresstest
+ SOURCES
+ tst_network_remote_stresstest.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+# Resources:
+set(url-list_resource_files
+ "url-list.txt"
+)
+
+add_qt_resource(tst_network_remote_stresstest "url-list"
+ PREFIX
+ "/"
+ FILES
+ ${url-list_resource_files}
+)
+
diff --git a/tests/manual/network_stresstest/CMakeLists.txt b/tests/manual/network_stresstest/CMakeLists.txt
new file mode 100644
index 0000000000..310c62dae8
--- /dev/null
+++ b/tests/manual/network_stresstest/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from network_stresstest.pro.
+
+#####################################################################
+## tst_network_stresstest Binary:
+#####################################################################
+
+add_qt_manual_test(tst_network_stresstest
+ SOURCES
+ minihttpserver.cpp minihttpserver.h
+ tst_network_stresstest.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+# Resources:
+set(wwwfiles_resource_files
+ "qtest"
+)
+
+add_qt_resource(tst_network_stresstest "wwwfiles"
+ PREFIX
+ "/"
+ FILES
+ ${wwwfiles_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:network_stresstest.pro:<TRUE>:
+# QMAKE_RESOURCE_FLAGS = "-no-compress"
diff --git a/tests/manual/qcursor/CMakeLists.txt b/tests/manual/qcursor/CMakeLists.txt
new file mode 100644
index 0000000000..1824c0c1a4
--- /dev/null
+++ b/tests/manual/qcursor/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from qcursor.pro.
+
+add_subdirectory(allcursors)
+add_subdirectory(childwidget)
+add_subdirectory(childwindow)
+add_subdirectory(childwindowcontainer)
+add_subdirectory(grab_override)
+add_subdirectory(qcursorhighdpi)
diff --git a/tests/manual/qcursor/allcursors/CMakeLists.txt b/tests/manual/qcursor/allcursors/CMakeLists.txt
new file mode 100644
index 0000000000..0452653b86
--- /dev/null
+++ b/tests/manual/qcursor/allcursors/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from allcursors.pro.
+
+#####################################################################
+## tst_allcursors Binary:
+#####################################################################
+
+add_qt_manual_test(tst_allcursors
+ GUI
+ SOURCES
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:allcursors.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/childwidget/CMakeLists.txt b/tests/manual/qcursor/childwidget/CMakeLists.txt
new file mode 100644
index 0000000000..5992cdaf73
--- /dev/null
+++ b/tests/manual/qcursor/childwidget/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from childwidget.pro.
+
+#####################################################################
+## tst_manual_childwidget Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_childwidget
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:childwidget.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/childwidget/childwidget.pro b/tests/manual/qcursor/childwidget/childwidget.pro
index 9ca41c5b4f..9492ec2280 100644
--- a/tests/manual/qcursor/childwidget/childwidget.pro
+++ b/tests/manual/qcursor/childwidget/childwidget.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = childwidget
+TARGET = tst_manual_childwidget
INCLUDEPATH += .
QT += widgets
diff --git a/tests/manual/qcursor/childwindow/CMakeLists.txt b/tests/manual/qcursor/childwindow/CMakeLists.txt
new file mode 100644
index 0000000000..de2a8dae6d
--- /dev/null
+++ b/tests/manual/qcursor/childwindow/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from childwindow.pro.
+
+#####################################################################
+## childwindow Binary:
+#####################################################################
+
+add_qt_manual_test(childwindow
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:childwindow.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt b/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt
new file mode 100644
index 0000000000..70c2bb7431
--- /dev/null
+++ b/tests/manual/qcursor/childwindowcontainer/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from childwindowcontainer.pro.
+
+#####################################################################
+## childwindowcontainer Binary:
+#####################################################################
+
+add_qt_manual_test(childwindowcontainer
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:childwindowcontainer.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/grab_override/CMakeLists.txt b/tests/manual/qcursor/grab_override/CMakeLists.txt
new file mode 100644
index 0000000000..d3ea88de65
--- /dev/null
+++ b/tests/manual/qcursor/grab_override/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from grab_override.pro.
+
+#####################################################################
+## t_cursors Binary:
+#####################################################################
+
+add_qt_manual_test(t_cursors
+ GUI
+ SOURCES
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+# Resources:
+set(images_resource_files
+ "data/monkey_on_64x64.png"
+)
+
+add_qt_resource(t_cursors "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:grab_override.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt b/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt
new file mode 100644
index 0000000000..9489d0675e
--- /dev/null
+++ b/tests/manual/qcursor/qcursorhighdpi/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from qcursorhighdpi.pro.
+
+#####################################################################
+## qcursorhighdpi Binary:
+#####################################################################
+
+add_qt_manual_test(qcursorhighdpi
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qcursorhighdpi.pro:<TRUE>:
+# TEMPLATE = "app"
+
+## Scopes:
+#####################################################################
+
+extend_target(qcursorhighdpi CONDITION WIN32
+ PUBLIC_LIBRARIES
+ User32
+)
diff --git a/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro b/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro
index 3a8fc25b33..b0a5a75a67 100644
--- a/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro
+++ b/tests/manual/qcursor/qcursorhighdpi/qcursorhighdpi.pro
@@ -1,6 +1,5 @@
TEMPLATE = app
-QT = core gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += gui-private core-private widgets
+QT = core gui gui-private core-private widgets
CONFIG -= app_bundle
SOURCES += main.cpp
win32: LIBS += -lUser32
diff --git a/tests/manual/qdesktopservices/CMakeLists.txt b/tests/manual/qdesktopservices/CMakeLists.txt
new file mode 100644
index 0000000000..5d880fcf65
--- /dev/null
+++ b/tests/manual/qdesktopservices/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qdesktopservices.pro.
+
+#####################################################################
+## tst_manual_qdesktopservices Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_qdesktopservices
+ SOURCES
+ tst_qdesktopservices.cpp
+ DEFINES
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qdesktopservices.pro:<TRUE>:
+# OTHER_FILES = "test.txt"
+# TEMPLATE = "app"
diff --git a/tests/manual/qdesktopservices/qdesktopservices.pro b/tests/manual/qdesktopservices/qdesktopservices.pro
index baa3c325ff..d2c5703870 100644
--- a/tests/manual/qdesktopservices/qdesktopservices.pro
+++ b/tests/manual/qdesktopservices/qdesktopservices.pro
@@ -1,6 +1,6 @@
QT += testlib
-TARGET = tst_qdesktopservices
+TARGET = tst_manual_qdesktopservices
CONFIG += cmdline
TEMPLATE = app
diff --git a/tests/manual/qdesktopwidget/CMakeLists.txt b/tests/manual/qdesktopwidget/CMakeLists.txt
new file mode 100644
index 0000000000..2034e3c368
--- /dev/null
+++ b/tests/manual/qdesktopwidget/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qdesktopwidget.pro.
+
+#####################################################################
+## qdesktopwidget Binary:
+#####################################################################
+
+add_qt_manual_test(qdesktopwidget
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qdesktopwidget.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qgraphicsitem/CMakeLists.txt b/tests/manual/qgraphicsitem/CMakeLists.txt
new file mode 100644
index 0000000000..a75b436e74
--- /dev/null
+++ b/tests/manual/qgraphicsitem/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qgraphicsitem.pro.
+
+#####################################################################
+## qgraphicsitem Binary:
+#####################################################################
+
+add_qt_manual_test(qgraphicsitem
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/qgraphicsitemgroup/CMakeLists.txt b/tests/manual/qgraphicsitemgroup/CMakeLists.txt
new file mode 100644
index 0000000000..8658c933b3
--- /dev/null
+++ b/tests/manual/qgraphicsitemgroup/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qgraphicsitemgroup.pro.
+
+#####################################################################
+## qgraphicsitemgroup Binary:
+#####################################################################
+
+add_qt_manual_test(qgraphicsitemgroup
+ GUI
+ SOURCES
+ customitem.cpp customitem.h
+ main.cpp
+ widget.cpp widget.h widget.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:qgraphicsitemgroup.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qgraphicslayout/flicker/CMakeLists.txt b/tests/manual/qgraphicslayout/flicker/CMakeLists.txt
new file mode 100644
index 0000000000..0d7fcce687
--- /dev/null
+++ b/tests/manual/qgraphicslayout/flicker/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from flicker.pro.
+
+#####################################################################
+## flicker Binary:
+#####################################################################
+
+add_qt_manual_test(flicker
+ GUI
+ SOURCES
+ main.cpp
+ window.cpp window.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/qhttpnetworkconnection/CMakeLists.txt b/tests/manual/qhttpnetworkconnection/CMakeLists.txt
new file mode 100644
index 0000000000..7331bf4611
--- /dev/null
+++ b/tests/manual/qhttpnetworkconnection/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qhttpnetworkconnection.pro.
+
+#####################################################################
+## tst_manual_qhttpnetworkconnection Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_qhttpnetworkconnection
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qhttpnetworkconnection.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qhttpnetworkconnection/main.cpp b/tests/manual/qhttpnetworkconnection/main.cpp
index 5b670a51e2..d67d76699c 100644
--- a/tests/manual/qhttpnetworkconnection/main.cpp
+++ b/tests/manual/qhttpnetworkconnection/main.cpp
@@ -58,7 +58,7 @@ void tst_qhttpnetworkconnection::bigRemoteFile()
QVERIFY(!QTestEventLoop::instance().timeout());
size = reply->size();
delete reply;
- qDebug() << "Finished!" << endl;
+ qDebug() << "Finished!" << Qt::endl;
qDebug() << "Time:" << t.elapsed() << "msec";
qDebug() << "Bytes:" << size;
qDebug() << "Speed:" << (size / qreal(1024)) / (t.elapsed() / qreal(1000)) << "KB/sec";
diff --git a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
index 62838785d6..f6763e434d 100644
--- a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = tst_qhttpnetworkconnection
+TARGET = tst_manual_qhttpnetworkconnection
QT -= gui
QT += network testlib
diff --git a/tests/manual/qimagereader/CMakeLists.txt b/tests/manual/qimagereader/CMakeLists.txt
new file mode 100644
index 0000000000..9e5869063b
--- /dev/null
+++ b/tests/manual/qimagereader/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qimagereader.pro.
+
+#####################################################################
+## qimagereader Binary:
+#####################################################################
+
+add_qt_manual_test(qimagereader
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/qlayout/CMakeLists.txt b/tests/manual/qlayout/CMakeLists.txt
new file mode 100644
index 0000000000..541dc18857
--- /dev/null
+++ b/tests/manual/qlayout/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qlayout.pro.
+
+#####################################################################
+## qlayout Binary:
+#####################################################################
+
+add_qt_manual_test(qlayout
+ GUI
+ SOURCES
+ gridwidget.cpp gridwidget.h
+ hbwidget.cpp hbwidget.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ vbwidget.cpp vbwidget.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qlayout.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qlocale/CMakeLists.txt b/tests/manual/qlocale/CMakeLists.txt
new file mode 100644
index 0000000000..60519da9a1
--- /dev/null
+++ b/tests/manual/qlocale/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qlocale.pro.
+
+#####################################################################
+## qlocale Binary:
+#####################################################################
+
+add_qt_manual_test(qlocale
+ GUI
+ SOURCES
+ calendar.cpp calendar.h
+ currency.cpp currency.h
+ dateformats.cpp dateformats.h
+ info.cpp info.h
+ languages.cpp languages.h
+ main.cpp
+ miscellaneous.cpp miscellaneous.h
+ numberformats.cpp numberformats.h
+ window.cpp window.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/qmetatype/CMakeLists.txt b/tests/manual/qmetatype/CMakeLists.txt
new file mode 100644
index 0000000000..bb5f75092a
--- /dev/null
+++ b/tests/manual/qmetatype/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qmetatype.pro.
+
+#####################################################################
+## tst_qmetatype_expect_fail Test:
+#####################################################################
+
+add_qt_test(tst_qmetatype_expect_fail
+ GUI
+ SOURCES
+ declare_metatype_noninline.cpp declare_metatype_noninline.h
+ tst_qmetatype.cpp
+)
diff --git a/tests/manual/qmimedatabase/CMakeLists.txt b/tests/manual/qmimedatabase/CMakeLists.txt
new file mode 100644
index 0000000000..038f784ac2
--- /dev/null
+++ b/tests/manual/qmimedatabase/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qmimedatabase.pro.
+
+#####################################################################
+## qmimedatabase Binary:
+#####################################################################
+
+add_qt_manual_test(qmimedatabase
+ SOURCES
+ main.cpp
+)
+
+#### Keys ignored in scope 1:.:.:qmimedatabase.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetconmonitor/.prev_CMakeLists.txt b/tests/manual/qnetconmonitor/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ed552bc435
--- /dev/null
+++ b/tests/manual/qnetconmonitor/.prev_CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qnetconmonitor.pro.
+
+#####################################################################
+## qnetconmonitor Binary:
+#####################################################################
+
+add_qt_manual_test(qnetconmonitor
+ SOURCES
+ tst_qnetconmonitor.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetconmonitor.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetconmonitor/CMakeLists.txt b/tests/manual/qnetconmonitor/CMakeLists.txt
new file mode 100644
index 0000000000..8eda85b783
--- /dev/null
+++ b/tests/manual/qnetconmonitor/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from qnetconmonitor.pro.
+
+#####################################################################
+## qnetconmonitor Binary:
+#####################################################################
+
+# special case begin
+if (NOT QT_FEATURE_private_tests)
+ return()
+endif()
+# special case end
+
+add_qt_manual_test(qnetconmonitor
+ SOURCES
+ tst_qnetconmonitor.cpp
+ PUBLIC_LIBRARIES
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetconmonitor.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt b/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt
new file mode 100644
index 0000000000..1d4ffa4b36
--- /dev/null
+++ b/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qget.pro.
+
+#####################################################################
+## qget Binary:
+#####################################################################
+
+add_qt_manual_test(qget
+ SOURCES
+ downloadmanager.cpp
+ qget.cpp qget.h
+ transferitem.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
+
+#### Keys ignored in scope 1:.:.:qget.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.cpp b/tests/manual/qnetworkaccessmanager/qget/qget.cpp
index 639506af63..14bdb589ff 100644
--- a/tests/manual/qnetworkaccessmanager/qget/qget.cpp
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.cpp
@@ -39,33 +39,41 @@
void printShortUsage()
{
- qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << endl
- << "Get one or more urls using QNetworkAccessManager" << endl
- << "--help to display detailed usage" << endl;
+ qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << Qt::endl
+ << "Get one or more urls using QNetworkAccessManager" << Qt::endl
+ << "--help to display detailed usage" << Qt::endl;
}
void printUsage()
{
- qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << endl
- << "Get one or more urls using QNetworkAccessManager" << endl
+ qDebug() << QCoreApplication::applicationName() << " [options] [list of urls]" << Qt::endl
+ << "Get one or more urls using QNetworkAccessManager" << Qt::endl
<< "Options:"
- << "--help This message" << endl
- << "--user=<username> Set username to use for authentication" << endl
- << "--password=<password> Set password to use for authentication" << endl
- << "--proxy-user=<username> Set username to use for proxy authentication" << endl
- << "--proxy-password=<password> Set password to use for proxy authentication" << endl
- << "--proxy=on Use system proxy (default)" << endl
- << "--proxy=off Don't use system proxy" << endl
- << "--proxy=<host:port>[,type] Use specified proxy" << endl
- << " ,http HTTP proxy (default)" << endl
- << " ,socks SOCKS5 proxy" << endl
- << " ,ftp FTP proxy" << endl
- << " ,httpcaching HTTP caching proxy (no CONNECT method)" << endl
- << "--headers=filename Set request headers from file contents" << endl
- << "--post=filename upload the file to the next url using HTTP POST" << endl
- << "--put=filename upload the file to the next url using HTTP PUT" << endl
- << "--content-type=<MIME> set content-type header for upload" << endl
- << "--serial don't run requests in parallel" << endl;
+ << "--help This message" << Qt::endl
+ << "--user=<username> Set username to use for authentication"
+ << Qt::endl
+ << "--password=<password> Set password to use for authentication"
+ << Qt::endl
+ << "--proxy-user=<username> Set username to use for proxy authentication"
+ << Qt::endl
+ << "--proxy-password=<password> Set password to use for proxy authentication"
+ << Qt::endl
+ << "--proxy=on Use system proxy (default)" << Qt::endl
+ << "--proxy=off Don't use system proxy" << Qt::endl
+ << "--proxy=<host:port>[,type] Use specified proxy" << Qt::endl
+ << " ,http HTTP proxy (default)" << Qt::endl
+ << " ,socks SOCKS5 proxy" << Qt::endl
+ << " ,ftp FTP proxy" << Qt::endl
+ << " ,httpcaching HTTP caching proxy (no CONNECT method)"
+ << Qt::endl
+ << "--headers=filename Set request headers from file contents"
+ << Qt::endl
+ << "--post=filename upload the file to the next url using HTTP POST"
+ << Qt::endl
+ << "--put=filename upload the file to the next url using HTTP PUT"
+ << Qt::endl
+ << "--content-type=<MIME> set content-type header for upload" << Qt::endl
+ << "--serial don't run requests in parallel" << Qt::endl;
}
int main(int argc, char *argv[])
diff --git a/tests/manual/qnetworkconfiguration/CMakeLists.txt b/tests/manual/qnetworkconfiguration/CMakeLists.txt
new file mode 100644
index 0000000000..f843446888
--- /dev/null
+++ b/tests/manual/qnetworkconfiguration/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qnetworkconfiguration.pro.
+
+#####################################################################
+## tst_manual_qnetworkconfiguration Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_qnetworkconfiguration
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetworkconfiguration.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetworkconfiguration/qnetworkconfiguration.pro b/tests/manual/qnetworkconfiguration/qnetworkconfiguration.pro
index 25ef41b92a..13c229e885 100644
--- a/tests/manual/qnetworkconfiguration/qnetworkconfiguration.pro
+++ b/tests/manual/qnetworkconfiguration/qnetworkconfiguration.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = tst_qnetworkconfiguration
+TARGET = tst_manual_qnetworkconfiguration
QT -= gui
QT += network testlib
diff --git a/tests/manual/qnetworkconfigurationmanager/CMakeLists.txt b/tests/manual/qnetworkconfigurationmanager/CMakeLists.txt
new file mode 100644
index 0000000000..4bea8449ff
--- /dev/null
+++ b/tests/manual/qnetworkconfigurationmanager/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qnetworkconfigurationmanager.pro.
+
+#####################################################################
+## tst_manual_qnetworkconfigurationmanager Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_qnetworkconfigurationmanager
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetworkconfigurationmanager.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
index 8f9314cc96..072b330894 100644
--- a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
+++ b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = tst_qnetworkconfigurationmanager
+TARGET = tst_manual_qnetworkconfigurationmanager
QT -= gui
QT += network testlib
diff --git a/tests/manual/qnetworkreply/.prev_CMakeLists.txt b/tests/manual/qnetworkreply/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..24854aa64f
--- /dev/null
+++ b/tests/manual/qnetworkreply/.prev_CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qnetworkreply.pro.
+
+#####################################################################
+## tst_manual_qnetworkreply Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_qnetworkreply
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetworkreply.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetworkreply/CMakeLists.txt b/tests/manual/qnetworkreply/CMakeLists.txt
new file mode 100644
index 0000000000..5ac12ced95
--- /dev/null
+++ b/tests/manual/qnetworkreply/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Generated from qnetworkreply.pro.
+
+#####################################################################
+## tst_manual_qnetworkreply Binary:
+#####################################################################
+
+# special case begin
+if (NOT QT_FEATURE_private_tests)
+ return()
+endif()
+# special case end
+
+add_qt_manual_test(tst_manual_qnetworkreply
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:qnetworkreply.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp
index 762bfe7b83..1086498553 100644
--- a/tests/manual/qnetworkreply/main.cpp
+++ b/tests/manual/qnetworkreply/main.cpp
@@ -58,9 +58,6 @@ private slots:
void setSslConfiguration_data();
void setSslConfiguration();
void uploadToFacebook();
- void spdy_data();
- void spdy();
- void spdyMultipleRequestsPerHost();
void proxyAuthentication_data();
void proxyAuthentication();
void authentication();
@@ -291,126 +288,6 @@ void tst_qnetworkreply::uploadToFacebook()
}
}
-void tst_qnetworkreply::spdy_data()
-{
- QTest::addColumn<QString>("host");
- QTest::addColumn<bool>("setAttribute");
- QTest::addColumn<bool>("enabled");
- QTest::addColumn<QByteArray>("expectedProtocol");
-
- QList<QString> hosts = QList<QString>()
- << QStringLiteral("www.google.com") // sends SPDY and 30x redirect
- << QStringLiteral("www.google.de") // sends SPDY and 200 OK
- << QStringLiteral("mail.google.com") // sends SPDY and 200 OK
- << QStringLiteral("www.youtube.com") // sends SPDY and 200 OK
- << QStringLiteral("www.dropbox.com") // no SPDY, but NPN which selects HTTP
- << QStringLiteral("www.facebook.com") // sends SPDY and 200 OK
- << QStringLiteral("graph.facebook.com") // sends SPDY and 200 OK
- << QStringLiteral("www.twitter.com") // sends SPDY and 30x redirect
- << QStringLiteral("twitter.com") // sends SPDY and 200 OK
- << QStringLiteral("api.twitter.com"); // sends SPDY and 200 OK
-
- foreach (const QString &host, hosts) {
- QByteArray tag = host.toLocal8Bit();
- tag.append("-not-used");
- QTest::newRow(tag)
- << QStringLiteral("https://") + host
- << false
- << false
- << QByteArray();
-
- tag = host.toLocal8Bit();
- tag.append("-disabled");
- QTest::newRow(tag)
- << QStringLiteral("https://") + host
- << true
- << false
- << QByteArray();
-
- if (host != QStringLiteral("api.twitter.com")) { // they don't offer an API over HTTP
- tag = host.toLocal8Bit();
- tag.append("-no-https-url");
- QTest::newRow(tag)
- << QStringLiteral("http://") + host
- << true
- << true
- << QByteArray();
- }
-
-#ifndef QT_NO_OPENSSL
- tag = host.toLocal8Bit();
- tag.append("-enabled");
- QTest::newRow(tag)
- << QStringLiteral("https://") + host
- << true
- << true
- << (host == QStringLiteral("www.dropbox.com")
- ? QByteArray(QSslConfiguration::NextProtocolHttp1_1)
- : QByteArray(QSslConfiguration::NextProtocolSpdy3_0));
-#endif // QT_NO_OPENSSL
- }
-}
-
-void tst_qnetworkreply::spdy()
-{
-#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
-
- m_manager.clearAccessCache();
-
- QFETCH(QString, host);
- QUrl url(host);
- QNetworkRequest request(url);
-
- QFETCH(bool, setAttribute);
- QFETCH(bool, enabled);
- if (setAttribute) {
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, QVariant(enabled));
- }
-
- QNetworkReply *reply = m_manager.get(request);
- QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QSignalSpy metaDataChangedSpy(reply, SIGNAL(metaDataChanged()));
- QSignalSpy readyReadSpy(reply, SIGNAL(readyRead()));
- QSignalSpy finishedSpy(reply, SIGNAL(finished()));
- QSignalSpy finishedManagerSpy(&m_manager, SIGNAL(finished(QNetworkReply*)));
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QFETCH(QByteArray, expectedProtocol);
-
- bool expectedSpdyUsed = (expectedProtocol == QSslConfiguration::NextProtocolSpdy3_0);
- QCOMPARE(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(), expectedSpdyUsed);
-
- QCOMPARE(metaDataChangedSpy.count(), 1);
- QCOMPARE(finishedSpy.count(), 1);
- QCOMPARE(finishedManagerSpy.count(), 1);
-
- QUrl redirectUrl = reply->header(QNetworkRequest::LocationHeader).toUrl();
- QByteArray content = reply->readAll();
-
- int statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
- QVERIFY(statusCode >= 200 && statusCode < 500);
- if (statusCode == 200 || statusCode >= 400) {
- QVERIFY(readyReadSpy.count() > 0);
- QVERIFY(!content.isEmpty());
- } else if (statusCode >= 300 && statusCode < 400) {
- QVERIFY(!redirectUrl.isEmpty());
- }
-
- QSslConfiguration::NextProtocolNegotiationStatus expectedStatus =
- expectedProtocol.isNull() ? QSslConfiguration::NextProtocolNegotiationNone
- : QSslConfiguration::NextProtocolNegotiationNegotiated;
- QCOMPARE(reply->sslConfiguration().nextProtocolNegotiationStatus(),
- expectedStatus);
-
- QCOMPARE(reply->sslConfiguration().nextNegotiatedProtocol(), expectedProtocol);
-#else
- QSKIP("Qt built withouth OpenSSL, or the OpenSSL version is too old");
-#endif // defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ...
-}
-
void tst_qnetworkreply::spdyReplyFinished()
{
static int finishedCount = 0;
@@ -420,85 +297,6 @@ void tst_qnetworkreply::spdyReplyFinished()
QTestEventLoop::instance().exitLoop();
}
-void tst_qnetworkreply::spdyMultipleRequestsPerHost()
-{
-#if defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) && OPENSSL_VERSION_NUMBER >= 0x1000100fL && !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
-
- QList<QNetworkRequest> requests;
- requests
- << QNetworkRequest(QUrl("https://www.facebook.com"))
- << QNetworkRequest(QUrl("https://www.facebook.com/images/fb_icon_325x325.png"))
-
- << QNetworkRequest(QUrl("https://www.google.de"))
- << QNetworkRequest(QUrl("https://www.google.de/preferences?hl=de"))
- << QNetworkRequest(QUrl("https://www.google.de/intl/de/policies/?fg=1"))
- << QNetworkRequest(QUrl("https://www.google.de/intl/de/about.html?fg=1"))
- << QNetworkRequest(QUrl("https://www.google.de/services/?fg=1"))
- << QNetworkRequest(QUrl("https://www.google.de/intl/de/ads/?fg=1"))
-
- << QNetworkRequest(QUrl("https://i1.ytimg.com/li/tnHdj3df7iM/default.jpg"))
- << QNetworkRequest(QUrl("https://i1.ytimg.com/li/7Dr1BKwqctY/default.jpg"))
- << QNetworkRequest(QUrl("https://i1.ytimg.com/li/hfZhJdhTqX8/default.jpg"))
- << QNetworkRequest(QUrl("https://i1.ytimg.com/vi/14Nprh8163I/hqdefault.jpg"))
- ;
- QList<QNetworkReply *> replies;
- QList<QSignalSpy *> metaDataChangedSpies;
- QList<QSignalSpy *> readyReadSpies;
- QList<QSignalSpy *> finishedSpies;
-
- QSignalSpy finishedManagerSpy(&m_manager, SIGNAL(finished(QNetworkReply*)));
-
- foreach (QNetworkRequest request, requests) {
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, true);
- QNetworkReply *reply = m_manager.get(request);
- QObject::connect(reply, SIGNAL(finished()), this, SLOT(spdyReplyFinished()));
- replies << reply;
- QSignalSpy *metaDataChangedSpy = new QSignalSpy(reply, SIGNAL(metaDataChanged()));
- metaDataChangedSpies << metaDataChangedSpy;
- QSignalSpy *readyReadSpy = new QSignalSpy(reply, SIGNAL(readyRead()));
- readyReadSpies << readyReadSpy;
- QSignalSpy *finishedSpy = new QSignalSpy(reply, SIGNAL(finished()));
- finishedSpies << finishedSpy;
- }
-
- QCOMPARE(requests.count(), replies.count());
-
- QTestEventLoop::instance().enterLoop(15);
- QVERIFY(!QTestEventLoop::instance().timeout());
-
- QCOMPARE(finishedManagerSpy.count(), requests.count());
-
- for (int a = 0; a < replies.count(); ++a) {
-
- QCOMPARE(replies.at(a)->sslConfiguration().nextProtocolNegotiationStatus(),
- QSslConfiguration::NextProtocolNegotiationNegotiated);
- QCOMPARE(replies.at(a)->sslConfiguration().nextNegotiatedProtocol(),
- QByteArray(QSslConfiguration::NextProtocolSpdy3_0));
-
- QCOMPARE(replies.at(a)->error(), QNetworkReply::NoError);
- QCOMPARE(replies.at(a)->attribute(QNetworkRequest::SpdyWasUsedAttribute).toBool(), true);
- QCOMPARE(replies.at(a)->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool(), true);
- QCOMPARE(replies.at(a)->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
-
- QByteArray content = replies.at(a)->readAll();
- QVERIFY(content.count() > 0);
-
- QCOMPARE(metaDataChangedSpies.at(a)->count(), 1);
- metaDataChangedSpies.at(a)->deleteLater();
-
- QCOMPARE(finishedSpies.at(a)->count(), 1);
- finishedSpies.at(a)->deleteLater();
-
- QVERIFY(readyReadSpies.at(a)->count() > 0);
- readyReadSpies.at(a)->deleteLater();
-
- replies.at(a)->deleteLater();
- }
-#else
- QSKIP("Qt built withouth OpenSSL, or the OpenSSL version is too old");
-#endif // defined(QT_BUILD_INTERNAL) && !defined(QT_NO_SSL) ...
-}
-
void tst_qnetworkreply::proxyAuthentication_data()
{
QTest::addColumn<QUrl>("url");
@@ -587,7 +385,7 @@ void tst_qnetworkreply::npnWithEmptyList() // QTBUG-40714
QUrl url(QStringLiteral("https://www.ossifrage.net/"));
QNetworkRequest request(url);
- request.setAttribute(QNetworkRequest::SpdyAllowedAttribute, QVariant(true));
+ request.setAttribute(QNetworkRequest::Http2AllowedAttribute, QVariant(true));
QNetworkReply *reply = m_manager.get(request);
QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
diff --git a/tests/manual/qnetworkreply/qnetworkreply.pro b/tests/manual/qnetworkreply/qnetworkreply.pro
index eddcbdff1d..2457acd749 100644
--- a/tests/manual/qnetworkreply/qnetworkreply.pro
+++ b/tests/manual/qnetworkreply/qnetworkreply.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = tst_qnetworkreply
+TARGET = tst_manual_qnetworkreply
QT -= gui
QT += core-private network network-private testlib
diff --git a/tests/manual/qopenglcontext/CMakeLists.txt b/tests/manual/qopenglcontext/CMakeLists.txt
new file mode 100644
index 0000000000..9cec06ff1e
--- /dev/null
+++ b/tests/manual/qopenglcontext/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qopenglcontext.pro.
+
+#####################################################################
+## qopenglcontext Binary:
+#####################################################################
+
+add_qt_manual_test(qopenglcontext
+ GUI
+ SOURCES
+ main.cpp
+ qopenglcontextwindow.cpp qopenglcontextwindow.h
+ PUBLIC_LIBRARIES
+ Qt::EglSupportPrivate
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qopenglcontext.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qopengltextureblitter/.prev_CMakeLists.txt b/tests/manual/qopengltextureblitter/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f56583c1e0
--- /dev/null
+++ b/tests/manual/qopengltextureblitter/.prev_CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qopengltextureblitter.pro.
+
+#####################################################################
+## qopengltextureblitter Binary:
+#####################################################################
+
+add_qt_manual_test(qopengltextureblitter
+ GUI
+ SOURCES
+ main.cpp
+ qopengltextureblitwindow.cpp qopengltextureblitwindow.h
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qopengltextureblitter.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qopengltextureblitter/CMakeLists.txt b/tests/manual/qopengltextureblitter/CMakeLists.txt
new file mode 100644
index 0000000000..1fe33049fc
--- /dev/null
+++ b/tests/manual/qopengltextureblitter/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from qopengltextureblitter.pro.
+
+#####################################################################
+## qopengltextureblitter Binary:
+#####################################################################
+
+add_qt_manual_test(qopengltextureblitter
+ GUI
+ SOURCES
+ main.cpp
+ qopengltextureblitwindow.cpp qopengltextureblitwindow.h
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::OpenGL # special case
+)
+
+#### Keys ignored in scope 1:.:.:qopengltextureblitter.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp
index f4e093a967..f8e033c927 100644
--- a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp
+++ b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp
@@ -29,7 +29,7 @@
#include "qopengltextureblitwindow.h"
#include <QtGui/QPainter>
-#include <QtGui/QOpenGLTexture>
+#include <QtOpenGL/QOpenGLTexture>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QMatrix4x4>
diff --git a/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt b/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt
new file mode 100644
index 0000000000..ffdb888040
--- /dev/null
+++ b/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from openglwidget.pro.
+
+#####################################################################
+## openglwidget Binary:
+#####################################################################
+
+add_qt_manual_test(openglwidget
+ GUI
+ SOURCES
+ main.cpp
+ openglwidget.cpp openglwidget.h
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+)
+
+#### Keys ignored in scope 1:.:.:openglwidget.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qopenglwindow/multiwindow/CMakeLists.txt b/tests/manual/qopenglwindow/multiwindow/CMakeLists.txt
new file mode 100644
index 0000000000..82acac6aff
--- /dev/null
+++ b/tests/manual/qopenglwindow/multiwindow/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from multiwindow.pro.
+
+#####################################################################
+## multiwindow Binary:
+#####################################################################
+
+add_qt_manual_test(multiwindow
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:multiwindow.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qprintdevice_dump/CMakeLists.txt b/tests/manual/qprintdevice_dump/CMakeLists.txt
new file mode 100644
index 0000000000..f619024286
--- /dev/null
+++ b/tests/manual/qprintdevice_dump/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qprintdevice_dump.pro.
+
+#####################################################################
+## qprintdevice_dump Binary:
+#####################################################################
+
+add_qt_manual_test(qprintdevice_dump
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupportPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qprintdevice_dump.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qscreen/CMakeLists.txt b/tests/manual/qscreen/CMakeLists.txt
new file mode 100644
index 0000000000..53b431c548
--- /dev/null
+++ b/tests/manual/qscreen/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qscreen.pro.
+
+#####################################################################
+## qscreen Binary:
+#####################################################################
+
+add_qt_manual_test(qscreen
+ SOURCES
+ main.cpp
+ propertyfield.cpp propertyfield.h
+ propertywatcher.cpp propertywatcher.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qscreen.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qscreen/main.cpp b/tests/manual/qscreen/main.cpp
index 0728d66bf9..ab92216d22 100644
--- a/tests/manual/qscreen/main.cpp
+++ b/tests/manual/qscreen/main.cpp
@@ -192,15 +192,15 @@ static inline QString msgScreenChange(const QWidget *w, const QScreen *oldScreen
if (!newScreen) {
result = QLatin1String("Screen changed --> null");
} else if (!oldScreen) {
- QTextStream(&result) << "Screen changed null --> \""
- << newScreen->name() << "\" at " << pos.x() << ',' << pos.y() << " geometry: "
- << geometry.width() << 'x' << geometry.height() << forcesign << geometry.x()
- << geometry.y() << '.';
+ QTextStream(&result) << "Screen changed null --> \"" << newScreen->name() << "\" at "
+ << pos.x() << ',' << pos.y() << " geometry: " << geometry.width()
+ << 'x' << geometry.height() << Qt::forcesign << geometry.x()
+ << geometry.y() << '.';
} else {
QTextStream(&result) << "Screen changed \"" << oldScreen->name() << "\" --> \""
- << newScreen->name() << "\" at " << pos.x() << ',' << pos.y() << " geometry: "
- << geometry.width() << 'x' << geometry.height() << forcesign << geometry.x()
- << geometry.y() << '.';
+ << newScreen->name() << "\" at " << pos.x() << ',' << pos.y()
+ << " geometry: " << geometry.width() << 'x' << geometry.height()
+ << Qt::forcesign << geometry.x() << geometry.y() << '.';
}
return result;
}
diff --git a/tests/manual/qssloptions/CMakeLists.txt b/tests/manual/qssloptions/CMakeLists.txt
new file mode 100644
index 0000000000..1fe53b9e50
--- /dev/null
+++ b/tests/manual/qssloptions/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qssloptions.pro.
+
+#####################################################################
+## tst_qssloptions Binary:
+#####################################################################
+
+add_qt_manual_test(tst_qssloptions
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ Qt::Test
+)
diff --git a/tests/manual/qssloptions/main.cpp b/tests/manual/qssloptions/main.cpp
index 0f06071b41..cc65c57f33 100644
--- a/tests/manual/qssloptions/main.cpp
+++ b/tests/manual/qssloptions/main.cpp
@@ -37,13 +37,13 @@ int main(int argc, char **argv)
if (argc < 3) {
QTextStream out(stdout);
- out << "Usage: " << argv[0] << " host port [options]" << endl;
- out << "The options can be one or more of the following:" << endl;
- out << "enable_empty_fragments" << endl;
- out << "disable_session_tickets" << endl;
- out << "disable_compression" << endl;
- out << "disable_sni" << endl;
- out << "enable_unsafe_reneg" << endl;
+ out << "Usage: " << argv[0] << " host port [options]" << Qt::endl;
+ out << "The options can be one or more of the following:" << Qt::endl;
+ out << "enable_empty_fragments" << Qt::endl;
+ out << "disable_session_tickets" << Qt::endl;
+ out << "disable_compression" << Qt::endl;
+ out << "disable_sni" << Qt::endl;
+ out << "enable_unsafe_reneg" << Qt::endl;
return 1;
}
diff --git a/tests/manual/qsslsocket/CMakeLists.txt b/tests/manual/qsslsocket/CMakeLists.txt
new file mode 100644
index 0000000000..bd7c9fc569
--- /dev/null
+++ b/tests/manual/qsslsocket/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Generated from qsslsocket.pro.
+
+#####################################################################
+## tst_manual_qsslsocket Test:
+#####################################################################
+
+add_qt_test(tst_manual_qsslsocket
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+)
diff --git a/tests/manual/qsslsocket/qsslsocket.pro b/tests/manual/qsslsocket/qsslsocket.pro
index c297d887ba..511d31898f 100644
--- a/tests/manual/qsslsocket/qsslsocket.pro
+++ b/tests/manual/qsslsocket/qsslsocket.pro
@@ -3,4 +3,4 @@ CONFIG += testcase
SOURCES += main.cpp
QT = core network testlib
-TARGET = tst_qsslsocket
+TARGET = tst_manual_qsslsocket
diff --git a/tests/manual/qstorageinfo/CMakeLists.txt b/tests/manual/qstorageinfo/CMakeLists.txt
new file mode 100644
index 0000000000..fab2da606b
--- /dev/null
+++ b/tests/manual/qstorageinfo/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from qstorageinfo.pro.
+
+#####################################################################
+## qstorageinfo Binary:
+#####################################################################
+
+add_qt_manual_test(qstorageinfo
+ SOURCES
+ main.cpp
+)
diff --git a/tests/manual/qsysinfo/CMakeLists.txt b/tests/manual/qsysinfo/CMakeLists.txt
new file mode 100644
index 0000000000..cd668a5bf2
--- /dev/null
+++ b/tests/manual/qsysinfo/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from qsysinfo.pro.
+
+#####################################################################
+## qsysinfo Binary:
+#####################################################################
+
+add_qt_manual_test(qsysinfo
+ SOURCES
+ main.cpp
+)
+
+#### Keys ignored in scope 1:.:.:qsysinfo.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qt_poll/CMakeLists.txt b/tests/manual/qt_poll/CMakeLists.txt
new file mode 100644
index 0000000000..0e19e6a4e3
--- /dev/null
+++ b/tests/manual/qt_poll/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from qt_poll.pro.
+
+#####################################################################
+## tst_qt_poll Test:
+#####################################################################
+
+add_qt_test(tst_qt_poll
+ SOURCES
+ ../../../src/corelib/kernel/qpoll.cpp
+ tst_qt_poll.cpp
+ INCLUDE_DIRECTORIES
+ ../../../src/corelib/kernel
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Network
+)
diff --git a/tests/manual/qtabbar/CMakeLists.txt b/tests/manual/qtabbar/CMakeLists.txt
new file mode 100644
index 0000000000..a44b6a331a
--- /dev/null
+++ b/tests/manual/qtabbar/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtabbar.pro.
+
+#####################################################################
+## qtabbar Binary:
+#####################################################################
+
+add_qt_manual_test(qtabbar
+ GUI
+ SOURCES
+ main.cpp
+ tabbarform.cpp tabbarform.h tabbarform.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:qtabbar.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qtabletevent/CMakeLists.txt b/tests/manual/qtabletevent/CMakeLists.txt
new file mode 100644
index 0000000000..422664e2a4
--- /dev/null
+++ b/tests/manual/qtabletevent/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from qtabletevent.pro.
+
+#add_subdirectory(device_information) # special case no member named 'staticQtMetaObject'
+add_subdirectory(event_compression)
+add_subdirectory(regular_widgets)
diff --git a/tests/manual/qtabletevent/device_information/CMakeLists.txt b/tests/manual/qtabletevent/device_information/CMakeLists.txt
new file mode 100644
index 0000000000..d0e12fac0a
--- /dev/null
+++ b/tests/manual/qtabletevent/device_information/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from device_information.pro.
+
+#####################################################################
+## device_information Binary:
+#####################################################################
+
+add_qt_manual_test(device_information
+ GUI
+ SOURCES
+ main.cpp
+ tabletwidget.cpp tabletwidget.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/qtabletevent/event_compression/CMakeLists.txt b/tests/manual/qtabletevent/event_compression/CMakeLists.txt
new file mode 100644
index 0000000000..b6cc8032e5
--- /dev/null
+++ b/tests/manual/qtabletevent/event_compression/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from event_compression.pro.
+
+#####################################################################
+## event_compression Binary:
+#####################################################################
+
+add_qt_manual_test(event_compression
+ SOURCES
+ main.cpp
+ mousestatwidget.cpp mousestatwidget.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
diff --git a/tests/manual/qtabletevent/regular_widgets/CMakeLists.txt b/tests/manual/qtabletevent/regular_widgets/CMakeLists.txt
new file mode 100644
index 0000000000..7937aa5d90
--- /dev/null
+++ b/tests/manual/qtabletevent/regular_widgets/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from regular_widgets.pro.
+
+#####################################################################
+## regular_widgets Binary:
+#####################################################################
+
+add_qt_manual_test(regular_widgets
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:regular_widgets.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qtbug-52641/CMakeLists.txt b/tests/manual/qtbug-52641/CMakeLists.txt
new file mode 100644
index 0000000000..7f96b66eaa
--- /dev/null
+++ b/tests/manual/qtbug-52641/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtbug-52641.pro.
+
+#####################################################################
+## qtbug-52641 Binary:
+#####################################################################
+
+add_qt_manual_test(qtbug-52641
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qtbug-52641.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qtbug-8933/CMakeLists.txt b/tests/manual/qtbug-8933/CMakeLists.txt
new file mode 100644
index 0000000000..a5de7687cb
--- /dev/null
+++ b/tests/manual/qtbug-8933/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtbug-8933.pro.
+
+#####################################################################
+## qtbug-8933 Binary:
+#####################################################################
+
+add_qt_manual_test(qtbug-8933
+ GUI
+ SOURCES
+ main.cpp
+ widget.cpp widget.h widget.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:qtbug-8933.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qtexteditlist/CMakeLists.txt b/tests/manual/qtexteditlist/CMakeLists.txt
new file mode 100644
index 0000000000..963ffa5441
--- /dev/null
+++ b/tests/manual/qtexteditlist/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from qtexteditlist.pro.
+
+#####################################################################
+## qtexteditlist Binary:
+#####################################################################
+
+add_qt_manual_test(qtexteditlist
+ GUI
+ SOURCES
+ main.cpp
+ widget.cpp widget.h widget.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:qtexteditlist.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qtexteditlist/qtexteditlist.pro b/tests/manual/qtexteditlist/qtexteditlist.pro
index 953333f3ee..972e054445 100644
--- a/tests/manual/qtexteditlist/qtexteditlist.pro
+++ b/tests/manual/qtexteditlist/qtexteditlist.pro
@@ -1,6 +1,6 @@
#This project can be used to verify QTBUG-5111 case.
QT += core gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += widgets
TARGET = qtexteditlist
TEMPLATE = app
SOURCES += main.cpp widget.cpp
diff --git a/tests/manual/qtexttableborders/CMakeLists.txt b/tests/manual/qtexttableborders/CMakeLists.txt
new file mode 100644
index 0000000000..c273b3aeb2
--- /dev/null
+++ b/tests/manual/qtexttableborders/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from qtexttableborders.pro.
+
+#####################################################################
+## qtexttableborders Binary:
+#####################################################################
+
+add_qt_manual_test(qtexttableborders
+ GUI
+ SOURCES
+ main.cpp
+ widget.cpp widget.h widget.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupport
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+# Resources:
+set(resources_resource_files
+ "table-border-test-header.html"
+ "table-border-test.html"
+)
+
+add_qt_resource(qtexttableborders "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:qtexttableborders.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qtexttableborders/qtexttableborders.pro b/tests/manual/qtexttableborders/qtexttableborders.pro
index 7e454f978d..3805ac6ed0 100644
--- a/tests/manual/qtexttableborders/qtexttableborders.pro
+++ b/tests/manual/qtexttableborders/qtexttableborders.pro
@@ -1,7 +1,6 @@
#This project can be used to verify QTBUG-36152 case.
-QT += core gui printsupport
+QT += core gui printsupport widgets
CONFIG += c++11
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = qtexttableborders
TEMPLATE = app
SOURCES += main.cpp widget.cpp
diff --git a/tests/manual/qtouchevent/CMakeLists.txt b/tests/manual/qtouchevent/CMakeLists.txt
new file mode 100644
index 0000000000..8cee742ca1
--- /dev/null
+++ b/tests/manual/qtouchevent/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qtouchevent.pro.
+
+#####################################################################
+## qtouchevent Binary:
+#####################################################################
+
+add_qt_manual_test(qtouchevent
+ SOURCES
+ form.ui
+ main.cpp
+ touchwidget.cpp touchwidget.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
diff --git a/tests/manual/qtouchevent/qtouchevent.pro b/tests/manual/qtouchevent/qtouchevent.pro
index 81384eaf24..4ba921d301 100644
--- a/tests/manual/qtouchevent/qtouchevent.pro
+++ b/tests/manual/qtouchevent/qtouchevent.pro
@@ -1,5 +1,4 @@
-QT += testlib
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += testlib widgets
SOURCES = main.cpp \
touchwidget.cpp
FORMS += form.ui
diff --git a/tests/manual/qvulkaninstance/CMakeLists.txt b/tests/manual/qvulkaninstance/CMakeLists.txt
new file mode 100644
index 0000000000..2071010da1
--- /dev/null
+++ b/tests/manual/qvulkaninstance/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qvulkaninstance.pro.
+
+#####################################################################
+## qvulkaninstance Binary:
+#####################################################################
+
+add_qt_manual_test(qvulkaninstance
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:qvulkaninstance.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/qwidget_zorder/CMakeLists.txt b/tests/manual/qwidget_zorder/CMakeLists.txt
new file mode 100644
index 0000000000..2ae52decac
--- /dev/null
+++ b/tests/manual/qwidget_zorder/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qwidget_zorder.pro.
+
+#####################################################################
+## qwidget_zorder Binary:
+#####################################################################
+
+add_qt_manual_test(qwidget_zorder
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/CMakeLists.txt b/tests/manual/repaint/CMakeLists.txt
new file mode 100644
index 0000000000..fd579a76a2
--- /dev/null
+++ b/tests/manual/repaint/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Generated from repaint.pro.
+
+add_subdirectory(mainwindow)
+add_subdirectory(scrollarea)
+add_subdirectory(splitter)
+add_subdirectory(tableview)
+add_subdirectory(task141091)
+add_subdirectory(toplevel)
+add_subdirectory(widget)
diff --git a/tests/manual/repaint/mainwindow/CMakeLists.txt b/tests/manual/repaint/mainwindow/CMakeLists.txt
new file mode 100644
index 0000000000..f71b5ddf6c
--- /dev/null
+++ b/tests/manual/repaint/mainwindow/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from mainwindow.pro.
+
+#####################################################################
+## tst_manual_mainwindow Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_mainwindow
+ GUI
+ SOURCES
+ ../shared/shared.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/mainwindow/mainwindow.pro b/tests/manual/repaint/mainwindow/mainwindow.pro
index f20e5fe402..419436032c 100644
--- a/tests/manual/repaint/mainwindow/mainwindow.pro
+++ b/tests/manual/repaint/mainwindow/mainwindow.pro
@@ -1,3 +1,4 @@
+TARGET = tst_manual_mainwindow
QT += widgets
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/scrollarea/CMakeLists.txt b/tests/manual/repaint/scrollarea/CMakeLists.txt
new file mode 100644
index 0000000000..9d2d52fd65
--- /dev/null
+++ b/tests/manual/repaint/scrollarea/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from scrollarea.pro.
+
+#####################################################################
+## tst_manual_scrollarea Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_scrollarea
+ GUI
+ SOURCES
+ ../shared/shared.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/scrollarea/scrollarea.pro b/tests/manual/repaint/scrollarea/scrollarea.pro
index f20e5fe402..deff158cce 100644
--- a/tests/manual/repaint/scrollarea/scrollarea.pro
+++ b/tests/manual/repaint/scrollarea/scrollarea.pro
@@ -1,3 +1,4 @@
QT += widgets
+TARGET = tst_manual_scrollarea
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/splitter/CMakeLists.txt b/tests/manual/repaint/splitter/CMakeLists.txt
new file mode 100644
index 0000000000..cb1d7aab0b
--- /dev/null
+++ b/tests/manual/repaint/splitter/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from splitter.pro.
+
+#####################################################################
+## splitter Binary:
+#####################################################################
+
+add_qt_manual_test(splitter
+ GUI
+ SOURCES
+ ../shared/shared.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/tableview/CMakeLists.txt b/tests/manual/repaint/tableview/CMakeLists.txt
new file mode 100644
index 0000000000..5c9634db88
--- /dev/null
+++ b/tests/manual/repaint/tableview/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from tableview.pro.
+
+#####################################################################
+## tableview Binary:
+#####################################################################
+
+add_qt_manual_test(tableview
+ GUI
+ SOURCES
+ ../shared/shared.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/task141091/CMakeLists.txt b/tests/manual/repaint/task141091/CMakeLists.txt
new file mode 100644
index 0000000000..3a74ef58de
--- /dev/null
+++ b/tests/manual/repaint/task141091/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from task141091.pro.
+
+#####################################################################
+## task141091 Binary:
+#####################################################################
+
+add_qt_manual_test(task141091
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/toplevel/CMakeLists.txt b/tests/manual/repaint/toplevel/CMakeLists.txt
new file mode 100644
index 0000000000..6b5a3c83a9
--- /dev/null
+++ b/tests/manual/repaint/toplevel/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from toplevel.pro.
+
+#####################################################################
+## tst_manual_toplevel Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_toplevel
+ SOURCES
+ ../shared/shared.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/repaint/toplevel/toplevel.pro b/tests/manual/repaint/toplevel/toplevel.pro
index a881c24f56..d142fd19bb 100644
--- a/tests/manual/repaint/toplevel/toplevel.pro
+++ b/tests/manual/repaint/toplevel/toplevel.pro
@@ -1,5 +1,6 @@
CONFIG += console
QT += widgets
+TARGET = tst_manual_toplevel
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/widget/CMakeLists.txt b/tests/manual/repaint/widget/CMakeLists.txt
new file mode 100644
index 0000000000..f58c49c9fb
--- /dev/null
+++ b/tests/manual/repaint/widget/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from widget.pro.
+
+#####################################################################
+## widget Binary:
+#####################################################################
+
+add_qt_manual_test(widget
+ GUI
+ SOURCES
+ ../shared/shared.h
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/rhi/CMakeLists.txt b/tests/manual/rhi/CMakeLists.txt
new file mode 100644
index 0000000000..621a307304
--- /dev/null
+++ b/tests/manual/rhi/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from rhi.pro.
+
+add_subdirectory(hellominimalcrossgfxtriangle)
+add_subdirectory(compressedtexture_bc1)
+add_subdirectory(compressedtexture_bc1_subupload)
+add_subdirectory(texuploads)
+add_subdirectory(msaatexture)
+add_subdirectory(msaarenderbuffer)
+add_subdirectory(cubemap)
+add_subdirectory(cubemap_scissor)
+add_subdirectory(multiwindow)
+add_subdirectory(multiwindow_threaded)
+add_subdirectory(triquadcube)
+add_subdirectory(offscreen)
+add_subdirectory(floattexture)
+add_subdirectory(mrt)
+add_subdirectory(shadowmap)
+add_subdirectory(computebuffer)
+add_subdirectory(computeimage)
+add_subdirectory(instancing)
+if(QT_FEATURE_widgets)
+ add_subdirectory(qrhiprof)
+endif()
diff --git a/tests/manual/rhi/compressedtexture_bc1/CMakeLists.txt b/tests/manual/rhi/compressedtexture_bc1/CMakeLists.txt
new file mode 100644
index 0000000000..5da0ad2932
--- /dev/null
+++ b/tests/manual/rhi/compressedtexture_bc1/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from compressedtexture_bc1.pro.
+
+#####################################################################
+## compressedtexture_bc1 Binary:
+#####################################################################
+
+add_qt_manual_test(compressedtexture_bc1
+ GUI
+ SOURCES
+ compressedtexture_bc1.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/qt256_bc1_9mips.dds"
+ PROPERTIES QT_RESOURCE_ALIAS "qt256_bc1_9mips.dds"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(compressedtexture_bc1_resource_files
+ "../shared/qt256_bc1_9mips.dds"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(compressedtexture_bc1 "compressedtexture_bc1"
+ PREFIX
+ "/"
+ FILES
+ ${compressedtexture_bc1_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:compressedtexture_bc1.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/compressedtexture_bc1_subupload/CMakeLists.txt b/tests/manual/rhi/compressedtexture_bc1_subupload/CMakeLists.txt
new file mode 100644
index 0000000000..bd82a5cb0d
--- /dev/null
+++ b/tests/manual/rhi/compressedtexture_bc1_subupload/CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from compressedtexture_bc1_subupload.pro.
+
+#####################################################################
+## compressedtexture_bc1_subupload Binary:
+#####################################################################
+
+add_qt_manual_test(compressedtexture_bc1_subupload
+ GUI
+ SOURCES
+ compressedtexture_bc1_subupload.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/bwqt224_64_nomips.dds"
+ PROPERTIES QT_RESOURCE_ALIAS "bwqt224_64_nomips.dds"
+)
+set_source_files_properties("../shared/qt256_bc1_9mips.dds"
+ PROPERTIES QT_RESOURCE_ALIAS "qt256_bc1_9mips.dds"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(compressedtexture_bc1_subupload_resource_files
+ "../shared/bwqt224_64_nomips.dds"
+ "../shared/qt256_bc1_9mips.dds"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(compressedtexture_bc1_subupload "compressedtexture_bc1_subupload"
+ PREFIX
+ "/"
+ FILES
+ ${compressedtexture_bc1_subupload_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:compressedtexture_bc1_subupload.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/computebuffer/CMakeLists.txt b/tests/manual/rhi/computebuffer/CMakeLists.txt
new file mode 100644
index 0000000000..e2a959c1e4
--- /dev/null
+++ b/tests/manual/rhi/computebuffer/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from computebuffer.pro.
+
+#####################################################################
+## computebuffer Binary:
+#####################################################################
+
+add_qt_manual_test(computebuffer
+ GUI
+ SOURCES
+ computebuffer.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(computebuffer_resource_files
+ "buffer.comp.qsb"
+ "main.frag.qsb"
+ "main.vert.qsb"
+)
+
+add_qt_resource(computebuffer "computebuffer"
+ PREFIX
+ "/"
+ FILES
+ ${computebuffer_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:computebuffer.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/computeimage/CMakeLists.txt b/tests/manual/rhi/computeimage/CMakeLists.txt
new file mode 100644
index 0000000000..a634f1cf98
--- /dev/null
+++ b/tests/manual/rhi/computeimage/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from computeimage.pro.
+
+#####################################################################
+## computeimage Binary:
+#####################################################################
+
+add_qt_manual_test(computeimage
+ GUI
+ SOURCES
+ computeimage.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/qt256.png"
+ PROPERTIES QT_RESOURCE_ALIAS "qt256.png"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(computeimage_resource_files
+ "../shared/qt256.png"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+ "image.comp.qsb"
+)
+
+add_qt_resource(computeimage "computeimage"
+ PREFIX
+ "/"
+ FILES
+ ${computeimage_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:computeimage.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/cubemap/CMakeLists.txt b/tests/manual/rhi/cubemap/CMakeLists.txt
new file mode 100644
index 0000000000..323ad78170
--- /dev/null
+++ b/tests/manual/rhi/cubemap/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from cubemap.pro.
+
+#####################################################################
+## cubemap Binary:
+#####################################################################
+
+add_qt_manual_test(cubemap
+ GUI
+ SOURCES
+ cubemap.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(cubemap_resource_files
+ "c.png"
+ "cubemap.frag.qsb"
+ "cubemap.vert.qsb"
+)
+
+add_qt_resource(cubemap "cubemap"
+ PREFIX
+ "/"
+ FILES
+ ${cubemap_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:cubemap.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/cubemap_scissor/CMakeLists.txt b/tests/manual/rhi/cubemap_scissor/CMakeLists.txt
new file mode 100644
index 0000000000..519d9dc6ec
--- /dev/null
+++ b/tests/manual/rhi/cubemap_scissor/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from cubemap_scissor.pro.
+
+#####################################################################
+## cubemap_scissor Binary:
+#####################################################################
+
+add_qt_manual_test(cubemap_scissor
+ GUI
+ SOURCES
+ cubemap_scissor.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../cubemap/c.png"
+ PROPERTIES QT_RESOURCE_ALIAS "c.png"
+)
+set_source_files_properties("../cubemap/cubemap.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "cubemap.frag.qsb"
+)
+set_source_files_properties("../cubemap/cubemap.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "cubemap.vert.qsb"
+)
+set(cubemap_scissor_resource_files
+ "../cubemap/c.png"
+ "../cubemap/cubemap.frag.qsb"
+ "../cubemap/cubemap.vert.qsb"
+)
+
+add_qt_resource(cubemap_scissor "cubemap_scissor"
+ PREFIX
+ "/"
+ FILES
+ ${cubemap_scissor_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:cubemap_scissor.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/floattexture/CMakeLists.txt b/tests/manual/rhi/floattexture/CMakeLists.txt
new file mode 100644
index 0000000000..3368812524
--- /dev/null
+++ b/tests/manual/rhi/floattexture/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from floattexture.pro.
+
+#####################################################################
+## floattexture Binary:
+#####################################################################
+
+add_qt_manual_test(floattexture
+ GUI
+ SOURCES
+ floattexture.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/OpenfootageNET_fieldairport-512.hdr"
+ PROPERTIES QT_RESOURCE_ALIAS "OpenfootageNET_fieldairport-512.hdr"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(floattexture_resource_files
+ "../shared/OpenfootageNET_fieldairport-512.hdr"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(floattexture "floattexture"
+ PREFIX
+ "/"
+ FILES
+ ${floattexture_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:floattexture.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt b/tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt
new file mode 100644
index 0000000000..8b9d3389f8
--- /dev/null
+++ b/tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from hellominimalcrossgfxtriangle.pro.
+
+#####################################################################
+## hellominimalcrossgfxtriangle Binary:
+#####################################################################
+
+add_qt_manual_test(hellominimalcrossgfxtriangle
+ SOURCES
+ hellowindow.cpp hellowindow.h
+ main.cpp
+ window.cpp window.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/color.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.frag.qsb"
+)
+set_source_files_properties("../shared/color.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.vert.qsb"
+)
+set(hellominimalcrossgfxtriangle_resource_files
+ "../shared/color.frag.qsb"
+ "../shared/color.vert.qsb"
+)
+
+add_qt_resource(hellominimalcrossgfxtriangle "hellominimalcrossgfxtriangle"
+ PREFIX
+ "/"
+ FILES
+ ${hellominimalcrossgfxtriangle_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:hellominimalcrossgfxtriangle.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/instancing/CMakeLists.txt b/tests/manual/rhi/instancing/CMakeLists.txt
new file mode 100644
index 0000000000..8c8d0c2a9a
--- /dev/null
+++ b/tests/manual/rhi/instancing/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from instancing.pro.
+
+#####################################################################
+## instancing Binary:
+#####################################################################
+
+add_qt_manual_test(instancing
+ GUI
+ SOURCES
+ instancing.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(instancing_resource_files
+ "inst.frag.qsb"
+ "inst.vert.qsb"
+)
+
+add_qt_resource(instancing "instancing"
+ PREFIX
+ "/"
+ FILES
+ ${instancing_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:instancing.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/mrt/CMakeLists.txt b/tests/manual/rhi/mrt/CMakeLists.txt
new file mode 100644
index 0000000000..db63ebe07d
--- /dev/null
+++ b/tests/manual/rhi/mrt/CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from mrt.pro.
+
+#####################################################################
+## mrt Binary:
+#####################################################################
+
+add_qt_manual_test(mrt
+ GUI
+ SOURCES
+ mrt.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(mrt_resource_files
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+ "mrt.frag.qsb"
+ "mrt.vert.qsb"
+)
+
+add_qt_resource(mrt "mrt"
+ PREFIX
+ "/"
+ FILES
+ ${mrt_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:mrt.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/msaarenderbuffer/CMakeLists.txt b/tests/manual/rhi/msaarenderbuffer/CMakeLists.txt
new file mode 100644
index 0000000000..26aa8798de
--- /dev/null
+++ b/tests/manual/rhi/msaarenderbuffer/CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from msaarenderbuffer.pro.
+
+#####################################################################
+## msaarenderbuffer Binary:
+#####################################################################
+
+add_qt_manual_test(msaarenderbuffer
+ GUI
+ SOURCES
+ msaarenderbuffer.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/color.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.frag.qsb"
+)
+set_source_files_properties("../shared/color.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.vert.qsb"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(msaarenderbuffer_resource_files
+ "../shared/color.frag.qsb"
+ "../shared/color.vert.qsb"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(msaarenderbuffer "msaarenderbuffer"
+ PREFIX
+ "/"
+ FILES
+ ${msaarenderbuffer_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:msaarenderbuffer.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/msaatexture/CMakeLists.txt b/tests/manual/rhi/msaatexture/CMakeLists.txt
new file mode 100644
index 0000000000..5a3c447db4
--- /dev/null
+++ b/tests/manual/rhi/msaatexture/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Generated from msaatexture.pro.
+
+#####################################################################
+## msaatexture Binary:
+#####################################################################
+
+add_qt_manual_test(msaatexture
+ GUI
+ SOURCES
+ msaatexture.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/color.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.frag.qsb"
+)
+set_source_files_properties("../shared/color.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.vert.qsb"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set_source_files_properties("../shared/texture_ms4.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture_ms4.frag.qsb"
+)
+set(msaatexture_resource_files
+ "../shared/color.frag.qsb"
+ "../shared/color.vert.qsb"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+ "../shared/texture_ms4.frag.qsb"
+)
+
+add_qt_resource(msaatexture "msaatexture"
+ PREFIX
+ "/"
+ FILES
+ ${msaatexture_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:msaatexture.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/multiwindow/CMakeLists.txt b/tests/manual/rhi/multiwindow/CMakeLists.txt
new file mode 100644
index 0000000000..a3e63b9d06
--- /dev/null
+++ b/tests/manual/rhi/multiwindow/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from multiwindow.pro.
+
+#####################################################################
+## multiwindow Binary:
+#####################################################################
+
+add_qt_manual_test(multiwindow
+ GUI
+ SOURCES
+ multiwindow.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+# Resources:
+set_source_files_properties("../shared/color.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.frag.qsb"
+)
+set_source_files_properties("../shared/color.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.vert.qsb"
+)
+set(multiwindow_resource_files
+ "../shared/color.frag.qsb"
+ "../shared/color.vert.qsb"
+)
+
+add_qt_resource(multiwindow "multiwindow"
+ PREFIX
+ "/"
+ FILES
+ ${multiwindow_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:multiwindow.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/multiwindow_threaded/CMakeLists.txt b/tests/manual/rhi/multiwindow_threaded/CMakeLists.txt
new file mode 100644
index 0000000000..f3f220dba6
--- /dev/null
+++ b/tests/manual/rhi/multiwindow_threaded/CMakeLists.txt
@@ -0,0 +1,43 @@
+# Generated from multiwindow_threaded.pro.
+
+#####################################################################
+## multiwindow_threaded Binary:
+#####################################################################
+
+add_qt_manual_test(multiwindow_threaded
+ GUI
+ SOURCES
+ multiwindow_threaded.cpp
+ window.cpp window.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+# Resources:
+set_source_files_properties("../shared/qt256.png"
+ PROPERTIES QT_RESOURCE_ALIAS "qt256.png"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(multiwindow_threaded_resource_files
+ "../shared/qt256.png"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(multiwindow_threaded "multiwindow_threaded"
+ PREFIX
+ "/"
+ FILES
+ ${multiwindow_threaded_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:multiwindow_threaded.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/offscreen/CMakeLists.txt b/tests/manual/rhi/offscreen/CMakeLists.txt
new file mode 100644
index 0000000000..56a9f2661d
--- /dev/null
+++ b/tests/manual/rhi/offscreen/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from offscreen.pro.
+
+#####################################################################
+## offscreen Binary:
+#####################################################################
+
+add_qt_manual_test(offscreen
+ SOURCES
+ offscreen.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/color.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.frag.qsb"
+)
+set_source_files_properties("../shared/color.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.vert.qsb"
+)
+set(offscreen_resource_files
+ "../shared/color.frag.qsb"
+ "../shared/color.vert.qsb"
+)
+
+add_qt_resource(offscreen "offscreen"
+ PREFIX
+ "/"
+ FILES
+ ${offscreen_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:offscreen.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/qrhiprof/CMakeLists.txt b/tests/manual/rhi/qrhiprof/CMakeLists.txt
new file mode 100644
index 0000000000..8f4fb3797b
--- /dev/null
+++ b/tests/manual/rhi/qrhiprof/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qrhiprof.pro.
+
+#####################################################################
+## qrhiprof Binary:
+#####################################################################
+
+add_qt_manual_test(qrhiprof
+ GUI
+ SOURCES
+ qrhiprof.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qrhiprof.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/shadowmap/CMakeLists.txt b/tests/manual/rhi/shadowmap/CMakeLists.txt
new file mode 100644
index 0000000000..d2de92d094
--- /dev/null
+++ b/tests/manual/rhi/shadowmap/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from shadowmap.pro.
+
+#####################################################################
+## shadowmap Binary:
+#####################################################################
+
+add_qt_manual_test(shadowmap
+ GUI
+ SOURCES
+ shadowmap.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set(shadowmap_resource_files
+ "main.frag.qsb"
+ "main.vert.qsb"
+ "shadowmap.frag.qsb"
+ "shadowmap.vert.qsb"
+)
+
+add_qt_resource(shadowmap "shadowmap"
+ PREFIX
+ "/"
+ FILES
+ ${shadowmap_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:shadowmap.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/texuploads/CMakeLists.txt b/tests/manual/rhi/texuploads/CMakeLists.txt
new file mode 100644
index 0000000000..2e97336a9d
--- /dev/null
+++ b/tests/manual/rhi/texuploads/CMakeLists.txt
@@ -0,0 +1,41 @@
+# Generated from texuploads.pro.
+
+#####################################################################
+## texuploads Binary:
+#####################################################################
+
+add_qt_manual_test(texuploads
+ GUI
+ SOURCES
+ texuploads.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/qt256.png"
+ PROPERTIES QT_RESOURCE_ALIAS "qt256.png"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(texuploads_resource_files
+ "../shared/qt256.png"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(texuploads "texuploads"
+ PREFIX
+ "/"
+ FILES
+ ${texuploads_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:texuploads.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/rhi/triquadcube/CMakeLists.txt b/tests/manual/rhi/triquadcube/CMakeLists.txt
new file mode 100644
index 0000000000..42ebf1f55f
--- /dev/null
+++ b/tests/manual/rhi/triquadcube/CMakeLists.txt
@@ -0,0 +1,53 @@
+# Generated from triquadcube.pro.
+
+#####################################################################
+## triquadcube Binary:
+#####################################################################
+
+add_qt_manual_test(triquadcube
+ GUI
+ SOURCES
+ quadrenderer.cpp quadrenderer.h
+ texturedcuberenderer.cpp texturedcuberenderer.h
+ triangleoncuberenderer.cpp triangleoncuberenderer.h
+ trianglerenderer.cpp trianglerenderer.h
+ triquadcube.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+# Resources:
+set_source_files_properties("../shared/color.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.frag.qsb"
+)
+set_source_files_properties("../shared/color.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "color.vert.qsb"
+)
+set_source_files_properties("../shared/qt256.png"
+ PROPERTIES QT_RESOURCE_ALIAS "qt256.png"
+)
+set_source_files_properties("../shared/texture.frag.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.frag.qsb"
+)
+set_source_files_properties("../shared/texture.vert.qsb"
+ PROPERTIES QT_RESOURCE_ALIAS "texture.vert.qsb"
+)
+set(triquadcube_resource_files
+ "../shared/color.frag.qsb"
+ "../shared/color.vert.qsb"
+ "../shared/qt256.png"
+ "../shared/texture.frag.qsb"
+ "../shared/texture.vert.qsb"
+)
+
+add_qt_resource(triquadcube "triquadcube"
+ PREFIX
+ "/"
+ FILES
+ ${triquadcube_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:triquadcube.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/shortcuts/CMakeLists.txt b/tests/manual/shortcuts/CMakeLists.txt
new file mode 100644
index 0000000000..c4ac6b040b
--- /dev/null
+++ b/tests/manual/shortcuts/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from shortcuts.pro.
+
+#####################################################################
+## shortcuts Binary:
+#####################################################################
+
+add_qt_manual_test(shortcuts
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:shortcuts.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/socketengine/.prev_CMakeLists.txt b/tests/manual/socketengine/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..61635f7e77
--- /dev/null
+++ b/tests/manual/socketengine/.prev_CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from socketengine.pro.
+
+#####################################################################
+## tst_socketengine Binary:
+#####################################################################
+
+add_qt_manual_test(tst_socketengine
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:socketengine.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/socketengine/CMakeLists.txt b/tests/manual/socketengine/CMakeLists.txt
new file mode 100644
index 0000000000..927955c3db
--- /dev/null
+++ b/tests/manual/socketengine/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from socketengine.pro.
+
+#####################################################################
+## tst_socketengine Binary:
+#####################################################################
+
+# special case begin
+if (NOT QT_FEATURE_private_tests)
+ return()
+endif()
+# special case end
+
+add_qt_manual_test(tst_socketengine
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::NetworkPrivate
+ Qt::Test
+)
+
+#### Keys ignored in scope 1:.:.:socketengine.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/textrendering/CMakeLists.txt b/tests/manual/textrendering/CMakeLists.txt
new file mode 100644
index 0000000000..788f9fc34f
--- /dev/null
+++ b/tests/manual/textrendering/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from textrendering.pro.
+
+add_subdirectory(glyphshaping)
+add_subdirectory(textperformance)
+add_subdirectory(nativetext)
diff --git a/tests/manual/textrendering/glyphshaping/CMakeLists.txt b/tests/manual/textrendering/glyphshaping/CMakeLists.txt
new file mode 100644
index 0000000000..891503dea1
--- /dev/null
+++ b/tests/manual/textrendering/glyphshaping/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from glyphshaping.pro.
+
+#####################################################################
+## glyphshaping Binary:
+#####################################################################
+
+add_qt_manual_test(glyphshaping
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:glyphshaping.pro:<TRUE>:
+# DEPLOYMENT = "glyphshaping_data"
+# glyphshaping_data.files = "$$PWD/glyphshaping_data.xml"
+# glyphshaping_data.path = "."
diff --git a/tests/manual/textrendering/nativetext/CMakeLists.txt b/tests/manual/textrendering/nativetext/CMakeLists.txt
new file mode 100644
index 0000000000..c03a8ed288
--- /dev/null
+++ b/tests/manual/textrendering/nativetext/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from nativetext.pro.
+
+#####################################################################
+## nativetext Binary:
+#####################################################################
+
+add_qt_manual_test(nativetext
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(nativetext CONDITION APPLE
+ PUBLIC_LIBRARIES
+ ${FWAppKit}
+ ${FWCoreGraphics}
+ ${FWFoundation}
+ COMPILE_OPTIONS
+ -x
+ objective-c++
+)
diff --git a/tests/manual/textrendering/textperformance/CMakeLists.txt b/tests/manual/textrendering/textperformance/CMakeLists.txt
new file mode 100644
index 0000000000..cf21b4ecac
--- /dev/null
+++ b/tests/manual/textrendering/textperformance/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from textperformance.pro.
+
+#####################################################################
+## textperformance Binary:
+#####################################################################
+
+add_qt_manual_test(textperformance
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/touch/CMakeLists.txt b/tests/manual/touch/CMakeLists.txt
new file mode 100644
index 0000000000..5f7e9ec286
--- /dev/null
+++ b/tests/manual/touch/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Generated from touch.pro.
+
+#####################################################################
+## touch Binary:
+#####################################################################
+
+add_qt_manual_test(touch
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:touch.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/touch/main.cpp b/tests/manual/touch/main.cpp
index a244230a22..8572e18955 100644
--- a/tests/manual/touch/main.cpp
+++ b/tests/manual/touch/main.cpp
@@ -526,7 +526,7 @@ void MainWindow::updateScreenLabel()
const QRect geometry = screen->geometry();
const qreal dpr = screen->devicePixelRatio();
str << '"' << screen->name() << "\" " << geometry.width() << 'x' << geometry.height()
- << forcesign << geometry.x() << geometry.y() << noforcesign;
+ << Qt::forcesign << geometry.x() << geometry.y() << Qt::noforcesign;
if (!qFuzzyCompare(dpr, qreal(1)))
str << ", dpr=" << dpr;
m_screenLabel->setText(text);
diff --git a/tests/manual/touch/touch.pro b/tests/manual/touch/touch.pro
index fcb3c47f43..08e3fdcd71 100644
--- a/tests/manual/touch/touch.pro
+++ b/tests/manual/touch/touch.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-QT = core gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT = core gui widgets
CONFIG -= app_bundle
SOURCES += main.cpp
diff --git a/tests/manual/touchGraphicsItem/CMakeLists.txt b/tests/manual/touchGraphicsItem/CMakeLists.txt
new file mode 100644
index 0000000000..cc02dcdab2
--- /dev/null
+++ b/tests/manual/touchGraphicsItem/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from touchGraphicsItem.pro.
+
+#####################################################################
+## touchGraphicsItem Binary:
+#####################################################################
+
+add_qt_manual_test(touchGraphicsItem
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:touchGraphicsItem.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/transientwindow/CMakeLists.txt b/tests/manual/transientwindow/CMakeLists.txt
new file mode 100644
index 0000000000..0356bdcd02
--- /dev/null
+++ b/tests/manual/transientwindow/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from transientwindow.pro.
+
+#####################################################################
+## transientwindow Binary:
+#####################################################################
+
+add_qt_manual_test(transientwindow
+ GUI
+ SOURCES
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:transientwindow.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/triangulator/CMakeLists.txt b/tests/manual/triangulator/CMakeLists.txt
new file mode 100644
index 0000000000..f3ebfb28a9
--- /dev/null
+++ b/tests/manual/triangulator/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from triangulator.pro.
+
+#####################################################################
+## triangulator Binary:
+#####################################################################
+
+add_qt_manual_test(triangulator
+ GUI
+ SOURCES
+ main.cpp
+ triviswidget.cpp triviswidget.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:triangulator.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/unc/CMakeLists.txt b/tests/manual/unc/CMakeLists.txt
new file mode 100644
index 0000000000..f63ffe34ad
--- /dev/null
+++ b/tests/manual/unc/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from unc.pro.
+
+#####################################################################
+## unc Binary:
+#####################################################################
+
+add_qt_manual_test(unc
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:unc.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/unc/unc.pro b/tests/manual/unc/unc.pro
index 977bd0c177..a1536a03db 100644
--- a/tests/manual/unc/unc.pro
+++ b/tests/manual/unc/unc.pro
@@ -1,5 +1,4 @@
-QT += core gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += core gui widgets
TEMPLATE = app
diff --git a/tests/manual/widgetgrab/CMakeLists.txt b/tests/manual/widgetgrab/CMakeLists.txt
new file mode 100644
index 0000000000..a556388207
--- /dev/null
+++ b/tests/manual/widgetgrab/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from widgetgrab.pro.
+
+#####################################################################
+## widgetgrab Binary:
+#####################################################################
+
+add_qt_manual_test(widgetgrab
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:widgetgrab.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgetgrab/widgetgrab.pro b/tests/manual/widgetgrab/widgetgrab.pro
index d206fb1df1..c354711197 100644
--- a/tests/manual/widgetgrab/widgetgrab.pro
+++ b/tests/manual/widgetgrab/widgetgrab.pro
@@ -1,9 +1,5 @@
-QT += core gui
+QT += core gui widgets
TARGET = widgetgrab
TEMPLATE = app
SOURCES += main.cpp
-
-greaterThan(QT_MAJOR_VERSION, 4) {
- QT += widgets
-}
diff --git a/tests/manual/widgets/CMakeLists.txt b/tests/manual/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..ac50f6c1ae
--- /dev/null
+++ b/tests/manual/widgets/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Generated from widgets.pro.
+
+add_subdirectory(itemviews)
+add_subdirectory(qgraphicsview)
+add_subdirectory(kernel)
+add_subdirectory(widgets)
+add_subdirectory(styles)
diff --git a/tests/manual/widgets/itemviews/CMakeLists.txt b/tests/manual/widgets/itemviews/CMakeLists.txt
new file mode 100644
index 0000000000..2e6a7e563b
--- /dev/null
+++ b/tests/manual/widgets/itemviews/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from itemviews.pro.
+
+add_subdirectory(delegate)
+add_subdirectory(qconcatenatetablesproxymodel)
+add_subdirectory(qheaderview)
+add_subdirectory(qtreeview)
+add_subdirectory(qtreewidget)
+add_subdirectory(tableview-span-navigation)
diff --git a/tests/manual/widgets/itemviews/autoResizePrecision/tablehorz/CMakeLists.txt b/tests/manual/widgets/itemviews/autoResizePrecision/tablehorz/CMakeLists.txt
new file mode 100644
index 0000000000..8d5730267d
--- /dev/null
+++ b/tests/manual/widgets/itemviews/autoResizePrecision/tablehorz/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from testtable1.pro.
+
+#####################################################################
+## testtable1 Binary:
+#####################################################################
+
+add_qt_manual_test(testtable1
+ GUI
+ SOURCES
+ testtable1.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/widgets/itemviews/autoResizePrecision/tablevert/CMakeLists.txt b/tests/manual/widgets/itemviews/autoResizePrecision/tablevert/CMakeLists.txt
new file mode 100644
index 0000000000..ed9f5c98eb
--- /dev/null
+++ b/tests/manual/widgets/itemviews/autoResizePrecision/tablevert/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from testtable2.pro.
+
+#####################################################################
+## testtable2 Binary:
+#####################################################################
+
+add_qt_manual_test(testtable2
+ GUI
+ SOURCES
+ testtable2.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/widgets/itemviews/autoResizePrecision/treeview/CMakeLists.txt b/tests/manual/widgets/itemviews/autoResizePrecision/treeview/CMakeLists.txt
new file mode 100644
index 0000000000..33073d3a42
--- /dev/null
+++ b/tests/manual/widgets/itemviews/autoResizePrecision/treeview/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from testtree.pro.
+
+#####################################################################
+## testtree Binary:
+#####################################################################
+
+add_qt_manual_test(testtree
+ GUI
+ SOURCES
+ testtree.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/widgets/itemviews/delegate/CMakeLists.txt b/tests/manual/widgets/itemviews/delegate/CMakeLists.txt
new file mode 100644
index 0000000000..533cf4913e
--- /dev/null
+++ b/tests/manual/widgets/itemviews/delegate/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from delegate.pro.
+
+#####################################################################
+## delegate Binary:
+#####################################################################
+
+add_qt_manual_test(delegate
+ GUI
+ SOURCES
+ example.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:delegate.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/CMakeLists.txt b/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/CMakeLists.txt
new file mode 100644
index 0000000000..21c7ed431e
--- /dev/null
+++ b/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from qconcatenatetablesproxymodel.pro.
+
+#####################################################################
+## qconcatenatetablesproxymodel Binary:
+#####################################################################
+
+add_qt_manual_test(qconcatenatetablesproxymodel
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qconcatenatetablesproxymodel.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/itemviews/qheaderview/CMakeLists.txt b/tests/manual/widgets/itemviews/qheaderview/CMakeLists.txt
new file mode 100644
index 0000000000..eeb9913126
--- /dev/null
+++ b/tests/manual/widgets/itemviews/qheaderview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qheaderview.pro.
+
+#####################################################################
+## qheaderview Binary:
+#####################################################################
+
+add_qt_manual_test(qheaderview
+ GUI
+ SOURCES
+ qheaderviewtest1.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qheaderview.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/itemviews/qtreeview/CMakeLists.txt b/tests/manual/widgets/itemviews/qtreeview/CMakeLists.txt
new file mode 100644
index 0000000000..ff69f09cf0
--- /dev/null
+++ b/tests/manual/widgets/itemviews/qtreeview/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from qtreeview.pro.
+
+#####################################################################
+## qtreeview Binary:
+#####################################################################
+
+add_qt_manual_test(qtreeview
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qtreeview.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/itemviews/qtreewidget/CMakeLists.txt b/tests/manual/widgets/itemviews/qtreewidget/CMakeLists.txt
new file mode 100644
index 0000000000..f6b1a2f7eb
--- /dev/null
+++ b/tests/manual/widgets/itemviews/qtreewidget/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from qtreewidget.pro.
+
+#####################################################################
+## qtreewidget Binary:
+#####################################################################
+
+add_qt_manual_test(qtreewidget
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:qtreewidget.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/itemviews/tableview-span-navigation/CMakeLists.txt b/tests/manual/widgets/itemviews/tableview-span-navigation/CMakeLists.txt
new file mode 100644
index 0000000000..f9efb5373d
--- /dev/null
+++ b/tests/manual/widgets/itemviews/tableview-span-navigation/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from tableview-span-navigation.pro.
+
+#####################################################################
+## tableview-span-navigation Binary:
+#####################################################################
+
+add_qt_manual_test(tableview-span-navigation
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:tableview-span-navigation.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/kernel/CMakeLists.txt b/tests/manual/widgets/kernel/CMakeLists.txt
new file mode 100644
index 0000000000..9be003391d
--- /dev/null
+++ b/tests/manual/widgets/kernel/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from kernel.pro.
+
+# add_subdirectory(qtooltip) # special case broken in dev
+add_subdirectory(sizeonhide)
+add_subdirectory(layoutreplace)
diff --git a/tests/manual/widgets/kernel/layoutreplace/CMakeLists.txt b/tests/manual/widgets/kernel/layoutreplace/CMakeLists.txt
new file mode 100644
index 0000000000..04b36ee4e3
--- /dev/null
+++ b/tests/manual/widgets/kernel/layoutreplace/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from layoutreplace.pro.
+
+#####################################################################
+## layoutreplace Binary:
+#####################################################################
+
+add_qt_manual_test(layoutreplace
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/widgets/kernel/qtooltip/CMakeLists.txt b/tests/manual/widgets/kernel/qtooltip/CMakeLists.txt
new file mode 100644
index 0000000000..2b30e5eeec
--- /dev/null
+++ b/tests/manual/widgets/kernel/qtooltip/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from qtooltip.pro.
+
+#####################################################################
+## qtooltip Binary:
+#####################################################################
+
+add_qt_manual_test(qtooltip
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Test
+ Qt::Widgets
+)
diff --git a/tests/manual/widgets/kernel/sizeonhide/CMakeLists.txt b/tests/manual/widgets/kernel/sizeonhide/CMakeLists.txt
new file mode 100644
index 0000000000..b1f8353a4f
--- /dev/null
+++ b/tests/manual/widgets/kernel/sizeonhide/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from sizeonhide.pro.
+
+#####################################################################
+## sizeonhide Binary:
+#####################################################################
+
+add_qt_manual_test(sizeonhide
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:sizeonhide.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/qgraphicsview/CMakeLists.txt b/tests/manual/widgets/qgraphicsview/CMakeLists.txt
new file mode 100644
index 0000000000..5fd7e47ccd
--- /dev/null
+++ b/tests/manual/widgets/qgraphicsview/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from qgraphicsview.pro.
+
+add_subdirectory(rubberband)
diff --git a/tests/manual/widgets/qgraphicsview/rubberband/CMakeLists.txt b/tests/manual/widgets/qgraphicsview/rubberband/CMakeLists.txt
new file mode 100644
index 0000000000..726404679e
--- /dev/null
+++ b/tests/manual/widgets/qgraphicsview/rubberband/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from rubberband.pro.
+
+#####################################################################
+## rubberband Binary:
+#####################################################################
+
+add_qt_manual_test(rubberband
+ GUI
+ SOURCES
+ rubberbandtest.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:rubberband.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/styles/CMakeLists.txt b/tests/manual/widgets/styles/CMakeLists.txt
new file mode 100644
index 0000000000..26fa8317cc
--- /dev/null
+++ b/tests/manual/widgets/styles/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Generated from styles.pro.
+
+#####################################################################
+## tst_manual_styles Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_styles
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:styles.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/styles/styles.pro b/tests/manual/widgets/styles/styles.pro
index d302ae0691..1830e21705 100644
--- a/tests/manual/widgets/styles/styles.pro
+++ b/tests/manual/widgets/styles/styles.pro
@@ -1,5 +1,6 @@
TEMPLATE = app
QT = widgets
+TARGET = tst_manual_styles
CONFIG += cmdline
CONFIG += c++11
diff --git a/tests/manual/widgets/widgets.pro b/tests/manual/widgets/widgets.pro
index e3942a49e9..03aaa880b8 100644
--- a/tests/manual/widgets/widgets.pro
+++ b/tests/manual/widgets/widgets.pro
@@ -1,3 +1,2 @@
TEMPLATE = subdirs
-SUBDIRS = itemviews qgraphicsview kernel widgets
-greaterThan(QT_MAJOR_VERSION, 4): SUBDIRS += styles
+SUBDIRS = itemviews qgraphicsview kernel widgets styles
diff --git a/tests/manual/widgets/widgets/CMakeLists.txt b/tests/manual/widgets/widgets/CMakeLists.txt
new file mode 100644
index 0000000000..d760abdd59
--- /dev/null
+++ b/tests/manual/widgets/widgets/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Generated from widgets.pro.
+
+add_subdirectory(bigmenucreator)
+add_subdirectory(defaultUpMenuBar)
+add_subdirectory(multiscreen-menus)
+add_subdirectory(qtoolbutton/menuOnMultiScreens)
diff --git a/tests/manual/widgets/widgets/bigmenucreator/CMakeLists.txt b/tests/manual/widgets/widgets/bigmenucreator/CMakeLists.txt
new file mode 100644
index 0000000000..f0161997c0
--- /dev/null
+++ b/tests/manual/widgets/widgets/bigmenucreator/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Generated from bigmenucreator.pro.
+
+#####################################################################
+## BigMenuCreator Binary:
+#####################################################################
+
+add_qt_manual_test(BigMenuCreator
+ GUI
+ SOURCES
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ DEFINES
+ QT_DEPRECATED_WARNINGS
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:bigmenucreator.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro b/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro
index 69fbea3834..408dab6482 100644
--- a/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro
+++ b/tests/manual/widgets/widgets/bigmenucreator/bigmenucreator.pro
@@ -4,9 +4,7 @@
#
#-------------------------------------------------
-QT += core gui
-
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += core gui widgets
TARGET = BigMenuCreator
TEMPLATE = app
diff --git a/tests/manual/widgets/widgets/defaultUpMenuBar/CMakeLists.txt b/tests/manual/widgets/widgets/defaultUpMenuBar/CMakeLists.txt
new file mode 100644
index 0000000000..8d86672327
--- /dev/null
+++ b/tests/manual/widgets/widgets/defaultUpMenuBar/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from defaultUpMenuBar.pro.
+
+#####################################################################
+## defaultUpMenuBar Binary:
+#####################################################################
+
+add_qt_manual_test(defaultUpMenuBar
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:defaultUpMenuBar.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/widgets/multiscreen-menus/CMakeLists.txt b/tests/manual/widgets/widgets/multiscreen-menus/CMakeLists.txt
new file mode 100644
index 0000000000..b750431d58
--- /dev/null
+++ b/tests/manual/widgets/widgets/multiscreen-menus/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Generated from multiscreen-menus.pro.
+
+#####################################################################
+## multiscreen-menus Binary:
+#####################################################################
+
+add_qt_manual_test(multiscreen-menus
+ GUI
+ SOURCES
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
+
+#### Keys ignored in scope 1:.:.:multiscreen-menus.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/widgets/qmainwindow/saveStateSize/CMakeLists.txt b/tests/manual/widgets/widgets/qmainwindow/saveStateSize/CMakeLists.txt
new file mode 100644
index 0000000000..461b595a68
--- /dev/null
+++ b/tests/manual/widgets/widgets/qmainwindow/saveStateSize/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from saveStateSize.pro.
+
+#####################################################################
+## saveStateSize Binary:
+#####################################################################
+
+add_qt_manual_test(saveStateSize
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:saveStateSize.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/widgets/widgets/qtoolbutton/menuOnMultiScreens/CMakeLists.txt b/tests/manual/widgets/widgets/qtoolbutton/menuOnMultiScreens/CMakeLists.txt
new file mode 100644
index 0000000000..f49d630de7
--- /dev/null
+++ b/tests/manual/widgets/widgets/qtoolbutton/menuOnMultiScreens/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from menuOnMultiScreens.pro.
+
+#####################################################################
+## menuOnMultiScreens Binary:
+#####################################################################
+
+add_qt_manual_test(menuOnMultiScreens
+ GUI
+ SOURCES
+ main.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:menuOnMultiScreens.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/windowchildgeometry/CMakeLists.txt b/tests/manual/windowchildgeometry/CMakeLists.txt
new file mode 100644
index 0000000000..e6f7c232a3
--- /dev/null
+++ b/tests/manual/windowchildgeometry/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Generated from windowchildgeometry.pro.
+
+#####################################################################
+## windowchildgeometry Binary:
+#####################################################################
+
+add_qt_manual_test(windowchildgeometry
+ GUI
+ SOURCES
+ ../windowflags/controls.cpp ../windowflags/controls.h
+ controllerwidget.cpp controllerwidget.h
+ main.cpp
+ DEFINES
+ QT_DISABLE_DEPRECATED_BEFORE=0
+ INCLUDE_DIRECTORIES
+ ../windowflags
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:windowchildgeometry.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/windowchildgeometry/windowchildgeometry.pro b/tests/manual/windowchildgeometry/windowchildgeometry.pro
index 921acd8a4e..7722547ce7 100644
--- a/tests/manual/windowchildgeometry/windowchildgeometry.pro
+++ b/tests/manual/windowchildgeometry/windowchildgeometry.pro
@@ -1,5 +1,4 @@
-QT += core gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += core gui widgets
TARGET = windowchildgeometry
TEMPLATE = app
diff --git a/tests/manual/windowflags/CMakeLists.txt b/tests/manual/windowflags/CMakeLists.txt
new file mode 100644
index 0000000000..1aba06d9a1
--- /dev/null
+++ b/tests/manual/windowflags/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from windowflags.pro.
+
+#####################################################################
+## tst_manual_windowflags Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_windowflags
+ GUI
+ SOURCES
+ controllerwindow.cpp controllerwindow.h
+ controls.cpp controls.h
+ main.cpp
+ previewwindow.cpp previewwindow.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp
index ef3966830b..893dbc9a41 100644
--- a/tests/manual/windowflags/previewwindow.cpp
+++ b/tests/manual/windowflags/previewwindow.cpp
@@ -48,7 +48,8 @@ void PreviewWindow::paintEvent(QPaintEvent *event)
static void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags)
{
- str << "Window flags: " << hex << showbase << unsigned(flags) << noshowbase << dec << ' ';
+ str << "Window flags: " << Qt::hex << Qt::showbase << unsigned(flags) << Qt::noshowbase
+ << Qt::dec << ' ';
switch (flags & Qt::WindowType_Mask) {
case Qt::Window:
str << "Qt::Window";
@@ -125,7 +126,8 @@ static void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags)
static void formatWindowStates(QTextStream &str, Qt::WindowStates states)
{
- str << "Window states: " << hex << showbase << unsigned(states) << noshowbase << dec << ' ';
+ str << "Window states: " << Qt::hex << Qt::showbase << unsigned(states) << Qt::noshowbase
+ << Qt::dec << ' ';
if (states & Qt::WindowActive) {
str << "Qt::WindowActive ";
states &= ~Qt::WindowActive;
@@ -150,7 +152,7 @@ static void formatWindowStates(QTextStream &str, Qt::WindowStates states)
QTextStream &operator<<(QTextStream &str, const QRect &r)
{
- str << r.width() << 'x' << r.height() << forcesign << r.x() << r.y() << noforcesign;
+ str << r.width() << 'x' << r.height() << Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
return str;
}
diff --git a/tests/manual/windowflags/windowflags.pro b/tests/manual/windowflags/windowflags.pro
index ba0f75b65c..4cd60ae6cf 100644
--- a/tests/manual/windowflags/windowflags.pro
+++ b/tests/manual/windowflags/windowflags.pro
@@ -1,3 +1,5 @@
+TARGET = tst_manual_windowflags
+
HEADERS = controllerwindow.h \
previewwindow.h \
controls.h
@@ -7,4 +9,4 @@ SOURCES = controllerwindow.cpp \
main.cpp \
controls.cpp
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += widgets
diff --git a/tests/manual/windowgeometry/CMakeLists.txt b/tests/manual/windowgeometry/CMakeLists.txt
new file mode 100644
index 0000000000..adeae599fc
--- /dev/null
+++ b/tests/manual/windowgeometry/CMakeLists.txt
@@ -0,0 +1,21 @@
+# Generated from windowgeometry.pro.
+
+#####################################################################
+## windowgeometry Binary:
+#####################################################################
+
+add_qt_manual_test(windowgeometry
+ GUI
+ SOURCES
+ ../windowflags/controls.cpp ../windowflags/controls.h
+ controllerwidget.cpp controllerwidget.h
+ main.cpp
+ INCLUDE_DIRECTORIES
+ ../windowflags
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:windowgeometry.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/windowgeometry/windowgeometry.pro b/tests/manual/windowgeometry/windowgeometry.pro
index e717799649..ee99f1950c 100644
--- a/tests/manual/windowgeometry/windowgeometry.pro
+++ b/tests/manual/windowgeometry/windowgeometry.pro
@@ -1,5 +1,4 @@
-QT += core gui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+QT += core gui widgets
TARGET = windowgeometry
TEMPLATE = app
diff --git a/tests/manual/windowmodality/CMakeLists.txt b/tests/manual/windowmodality/CMakeLists.txt
new file mode 100644
index 0000000000..67e6071add
--- /dev/null
+++ b/tests/manual/windowmodality/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from windowmodality.pro.
+
+#####################################################################
+## windowmodality Binary:
+#####################################################################
+
+add_qt_manual_test(windowmodality
+ GUI
+ SOURCES
+ dialog.ui
+ main.cpp
+ widget.ui
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::PrintSupport
+ Qt::Widgets
+ ENABLE_AUTOGEN_TOOLS
+ uic
+)
diff --git a/tests/manual/windowmodality/windowmodality.pro b/tests/manual/windowmodality/windowmodality.pro
index b29e939d27..973579c508 100644
--- a/tests/manual/windowmodality/windowmodality.pro
+++ b/tests/manual/windowmodality/windowmodality.pro
@@ -1,3 +1,3 @@
SOURCES = main.cpp
FORMS = widget.ui dialog.ui
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
+QT += widgets printsupport
diff --git a/tests/manual/windowtransparency/CMakeLists.txt b/tests/manual/windowtransparency/CMakeLists.txt
new file mode 100644
index 0000000000..42de6d67c6
--- /dev/null
+++ b/tests/manual/windowtransparency/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from windowtransparency.pro.
+
+#####################################################################
+## windowtransparency Binary:
+#####################################################################
+
+add_qt_manual_test(windowtransparency
+ SOURCES
+ windowtransparency.cpp
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/manual/xcb_gl_integration/CMakeLists.txt b/tests/manual/xcb_gl_integration/CMakeLists.txt
new file mode 100644
index 0000000000..e92e47fb8a
--- /dev/null
+++ b/tests/manual/xcb_gl_integration/CMakeLists.txt
@@ -0,0 +1,19 @@
+# Generated from xcb_gl_integration.pro.
+
+#####################################################################
+## xcb_gl_integration Binary:
+#####################################################################
+
+add_qt_manual_test(xcb_gl_integration
+ GUI
+ SOURCES
+ main.cpp
+ INCLUDE_DIRECTORIES
+ .
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+)
+
+#### Keys ignored in scope 1:.:.:xcb_gl_integration.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/xembed-raster/CMakeLists.txt b/tests/manual/xembed-raster/CMakeLists.txt
new file mode 100644
index 0000000000..6c8996e9c1
--- /dev/null
+++ b/tests/manual/xembed-raster/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Generated from xembed-raster.pro.
+
+#####################################################################
+## tst_manual_rasterwindow Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_rasterwindow
+ GUI
+ SOURCES
+ main.cpp
+ rasterwindow.cpp rasterwindow.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+)
+
+#### Keys ignored in scope 1:.:.:xembed-raster.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/xembed-raster/xembed-raster.pro b/tests/manual/xembed-raster/xembed-raster.pro
index adaf9c4d25..4c9fee07b8 100644
--- a/tests/manual/xembed-raster/xembed-raster.pro
+++ b/tests/manual/xembed-raster/xembed-raster.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET= rasterwindow
+TARGET= tst_manual_rasterwindow
QT += gui
SOURCES += \
diff --git a/tests/manual/xembed-widgets/CMakeLists.txt b/tests/manual/xembed-widgets/CMakeLists.txt
new file mode 100644
index 0000000000..ed8c5355a9
--- /dev/null
+++ b/tests/manual/xembed-widgets/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from xembed-widgets.pro.
+
+#####################################################################
+## tst_manual_lineedits Binary:
+#####################################################################
+
+add_qt_manual_test(tst_manual_lineedits
+ GUI
+ SOURCES
+ main.cpp
+ window.cpp window.h
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::Widgets
+)
+
+#### Keys ignored in scope 1:.:.:xembed-widgets.pro:<TRUE>:
+# TEMPLATE = "app"
diff --git a/tests/manual/xembed-widgets/xembed-widgets.pro b/tests/manual/xembed-widgets/xembed-widgets.pro
index e406ee47fd..28d13d5b61 100644
--- a/tests/manual/xembed-widgets/xembed-widgets.pro
+++ b/tests/manual/xembed-widgets/xembed-widgets.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET= lineedits
+TARGET= tst_manual_lineedits
QT += widgets
SOURCES += \