summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/qabstractanimation.pro3
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp29
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/qanimationgroup.pro3
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp29
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/qparallelanimationgroup.pro2
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp31
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/qpauseanimation.pro2
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp125
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/qpropertyanimation.pro2
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp32
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/qsequentialanimationgroup.pro3
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp35
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/qvariantanimation.pro3
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp33
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/echo.pro1
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/main.cpp29
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/test/test.pro2
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp38
-rw-r--r--tests/auto/corelib/codecs/utf8/tst_utf8.cpp30
-rw-r--r--tests/auto/corelib/codecs/utf8/utf8.pro2
-rw-r--r--tests/auto/corelib/codecs/utf8/utf8data.cpp29
-rw-r--r--tests/auto/corelib/global/q_func_info/q_func_info.pro3
-rw-r--r--tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp29
-rw-r--r--tests/auto/corelib/global/qflags/qflags.pro3
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp43
-rw-r--r--tests/auto/corelib/global/qgetputenv/qgetputenv.pro3
-rw-r--r--tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp31
-rw-r--r--tests/auto/corelib/global/qglobal/qglobal.pro3
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp151
-rw-r--r--tests/auto/corelib/global/qglobalstatic/qglobalstatic.pro1
-rw-r--r--tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp17
-rw-r--r--tests/auto/corelib/global/qhooks/qhooks.pro2
-rw-r--r--tests/auto/corelib/global/qhooks/tst_qhooks.cpp29
-rw-r--r--tests/auto/corelib/global/qlogging/app/app.pro1
-rw-r--r--tests/auto/corelib/global/qlogging/app/main.cpp29
-rw-r--r--tests/auto/corelib/global/qlogging/test/test.pro2
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp47
-rw-r--r--tests/auto/corelib/global/qnumeric/qnumeric.pro3
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp73
-rw-r--r--tests/auto/corelib/global/qrand/qrand.pro3
-rw-r--r--tests/auto/corelib/global/qrand/tst_qrand.cpp29
-rw-r--r--tests/auto/corelib/global/qtendian/qtendian.pro3
-rw-r--r--tests/auto/corelib/global/qtendian/tst_qtendian.cpp29
-rw-r--r--tests/auto/corelib/io/largefile/largefile.pro1
-rw-r--r--tests/auto/corelib/io/largefile/tst_largefile.cpp29
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro1
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp29
-rw-r--r--tests/auto/corelib/io/qbuffer/qbuffer.pro3
-rw-r--r--tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp31
-rw-r--r--tests/auto/corelib/io/qdatastream/qdatastream.pro3
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp508
-rw-r--r--tests/auto/corelib/io/qdataurl/qdataurl.pro3
-rw-r--r--tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp29
-rw-r--r--tests/auto/corelib/io/qdebug/qdebug.pro3
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp30
-rw-r--r--tests/auto/corelib/io/qdir/qdir.pro4
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp29
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp29
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp55
-rw-r--r--tests/auto/corelib/io/qdiriterator/qdiriterator.pro1
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp33
-rw-r--r--tests/auto/corelib/io/qfile/qfile.pro1
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro1
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp62
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro1
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp37
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+blackberry/test0
-rw-r--r--tests/auto/corelib/io/qfileselector/platforms/+blackberry/test20
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.pro1
-rw-r--r--tests/auto/corelib/io/qfileselector/qfileselector.qrc3
-rw-r--r--tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp40
-rw-r--r--tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro3
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp29
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro3
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp36
-rw-r--r--tests/auto/corelib/io/qiodevice/qiodevice.pro3
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp228
-rw-r--r--tests/auto/corelib/io/qipaddress/qipaddress.pro3
-rw-r--r--tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp29
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp27
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp29
-rw-r--r--tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp29
-rw-r--r--tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro2
-rw-r--r--tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp29
-rw-r--r--tests/auto/corelib/io/qnodebug/qnodebug.pro3
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp34
-rw-r--r--tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro1
-rw-r--r--tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/testDetached.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessHang/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp29
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro1
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp96
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro3
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp43
-rw-r--r--tests/auto/corelib/io/qresourceengine/qresourceengine.pro5
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp35
-rw-r--r--tests/auto/corelib/io/qsavefile/qsavefile.pro2
-rw-r--r--tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp27
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp237
-rw-r--r--tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro1
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp37
-rw-r--r--tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp47
-rw-r--r--tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro1
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp31
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro4
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp44
-rw-r--r--tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro1
-rw-r--r--tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro1
-rw-r--r--tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp29
-rw-r--r--tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro1
-rw-r--r--tests/auto/corelib/io/qtextstream/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp47
-rw-r--r--tests/auto/corelib/io/qurl/idna-test.c29
-rw-r--r--tests/auto/corelib/io/qurl/qurl.pro3
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp57
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl_mac.mm29
-rw-r--r--tests/auto/corelib/io/qurlinternal/qurlinternal.pro2
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp33
-rw-r--r--tests/auto/corelib/io/qurlquery/qurlquery.pro3
-rw-r--r--tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp67
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro1
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp33
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro1
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp70
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro1
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp31
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp99
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp40
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro1
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp35
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp94
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp115
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h29
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp29
-rw-r--r--tests/auto/corelib/json/json.pro6
-rw-r--r--tests/auto/corelib/json/test.bjsonbin60992 -> 35392 bytes
-rw-r--r--tests/auto/corelib/json/test.json10
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp187
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro2
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp39
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h33
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro1
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp29
-rw-r--r--tests/auto/corelib/kernel/qeventloop/qeventloop.pro2
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp36
-rw-r--r--tests/auto/corelib/kernel/qmath/qmath.pro3
-rw-r--r--tests/auto/corelib/kernel/qmath/tst_qmath.cpp29
-rw-r--r--tests/auto/corelib/kernel/qmetaenum/qmetaenum.pro1
-rw-r--r--tests/auto/corelib/kernel/qmetaenum/tst_qmetaenum.cpp27
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro2
-rw-r--r--tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp33
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/qmetaobject.pro2
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp81
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/qmetaobjectbuilder.pro3
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp137
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/qmetaproperty.pro2
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp29
-rw-r--r--tests/auto/corelib/kernel/qmetatype/qmetatype.pro2
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp38
-rw-r--r--tests/auto/corelib/kernel/qmimedata/qmimedata.pro2
-rw-r--r--tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp31
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp29
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.h29
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro1
-rw-r--r--tests/auto/corelib/kernel/qobject/test/test.pro1
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp281
-rw-r--r--tests/auto/corelib/kernel/qpointer/qpointer.pro2
-rw-r--r--tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp29
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/sharedmemoryhelper/main.cpp29
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp55
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro2
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp27
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/qsignalmapper.pro2
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp39
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro2
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp37
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/main.cpp29
-rw-r--r--tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp33
-rw-r--r--tests/auto/corelib/kernel/qtimer/qtimer.pro3
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp32
-rw-r--r--tests/auto/corelib/kernel/qtranslator/qtranslator.pro4
-rw-r--r--tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp57
-rw-r--r--tests/auto/corelib/kernel/qvariant/qvariant.pro6
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp128
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/qwineventnotifier.pro3
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp29
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro1
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp29
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro3
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp29
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/test.qml27
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp29
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h29
-rw-r--r--tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro3
-rw-r--r--tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp29
-rw-r--r--tests/auto/corelib/plugin/plugin.pro9
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp29
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h29
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro1
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/plugininterface1.h29
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.cpp29
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.h29
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro1
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/plugininterface2.h29
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/qfactoryloader.pro1
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/test.pro7
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp37
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/lib.pro1
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/mylib.c29
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro1
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/mylib.c29
-rw-r--r--tests/auto/corelib/plugin/qlibrary/qlibrary.pro1
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst/tst.pro2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp31
-rw-r--r--tests/auto/corelib/plugin/qplugin/debugplugin/debugplugin.pro1
-rw-r--r--tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp29
-rw-r--r--tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp29
-rw-r--r--tests/auto/corelib/plugin/qplugin/releaseplugin/releaseplugin.pro1
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp29
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.pro2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/lib.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/mylib.c29
-rwxr-xr-xtests/auto/corelib/plugin/qpluginloader/machtest/generate-bad.pl29
-rwxr-xr-xtests/auto/corelib/plugin/qpluginloader/machtest/ppcconverter.pl29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h29
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst/tst.pro2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp36
-rw-r--r--tests/auto/corelib/plugin/quuid/quuid.pro1
-rw-r--r--tests/auto/corelib/plugin/quuid/test/test.pro7
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp29
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness.pro1
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid.cpp45
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid_darwin.mm77
-rw-r--r--tests/auto/corelib/statemachine/qstate/qstate.pro3
-rw-r--r--tests/auto/corelib/statemachine/qstate/tst_qstate.cpp29
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro2
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp71
-rw-r--r--tests/auto/corelib/thread/qatomicint/qatomicint.pro3
-rw-r--r--tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp30
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/char/char.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/char16_t/char16_t.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/char32_t/char32_t.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/int/int.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/long/long.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/qlonglong/qlonglong.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/qptrdiff/qptrdiff.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/quintptr/quintptr.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/qulonglong/qulonglong.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/schar/schar.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/short/short.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/uchar/uchar.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/uint/uint.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/ulong/ulong.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/ushort/ushort.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/gcc/wchar_t/wchar_t.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro1
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri13
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro40
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp29
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/qatomicpointer.pro3
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp118
-rw-r--r--tests/auto/corelib/thread/qfuture/qfuture.pro3
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp75
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/qfuturesynchronizer.pro3
-rw-r--r--tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp29
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/qfuturewatcher.pro3
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp29
-rw-r--r--tests/auto/corelib/thread/qmutex/qmutex.pro2
-rw-r--r--tests/auto/corelib/thread/qmutex/tst_qmutex.cpp30
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/qmutexlocker.pro3
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp29
-rw-r--r--tests/auto/corelib/thread/qreadlocker/qreadlocker.pro3
-rw-r--r--tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp29
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/qreadwritelock.pro3
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp29
-rw-r--r--tests/auto/corelib/thread/qresultstore/qresultstore.pro3
-rw-r--r--tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp43
-rw-r--r--tests/auto/corelib/thread/qsemaphore/qsemaphore.pro1
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp29
-rw-r--r--tests/auto/corelib/thread/qthread/qthread.pro3
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp29
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp29
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.h29
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.pro3
-rw-r--r--tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp31
-rw-r--r--tests/auto/corelib/thread/qthreadpool/qthreadpool.pro3
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp30
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/crashOnExit.cpp29
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro1
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro2
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/test/test.pro1
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp29
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/qwaitcondition.pro3
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp29
-rw-r--r--tests/auto/corelib/thread/qwritelocker/qwritelocker.pro3
-rw-r--r--tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp29
-rw-r--r--tests/auto/corelib/tools/collections/collections.pro2
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp189
-rw-r--r--tests/auto/corelib/tools/qalgorithms/qalgorithms.pro2
-rw-r--r--tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp49
-rw-r--r--tests/auto/corelib/tools/qarraydata/qarraydata.pro3
-rw-r--r--tests/auto/corelib/tools/qarraydata/simplevector.h29
-rw-r--r--tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp29
-rw-r--r--tests/auto/corelib/tools/qbitarray/qbitarray.pro3
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp33
-rw-r--r--tests/auto/corelib/tools/qbytearray/qbytearray.pro5
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp169
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm29
-rw-r--r--tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro2
-rw-r--r--tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp29
-rw-r--r--tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro3
-rw-r--r--tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp29
-rw-r--r--tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp27
-rw-r--r--tests/auto/corelib/tools/qcache/qcache.pro3
-rw-r--r--tests/auto/corelib/tools/qcache/tst_qcache.cpp29
-rw-r--r--tests/auto/corelib/tools/qchar/qchar.pro5
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp94
-rw-r--r--tests/auto/corelib/tools/qcollator/qcollator.pro3
-rw-r--r--tests/auto/corelib/tools/qcollator/tst_qcollator.cpp31
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp27
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp33
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.pro2
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/qcontiguouscache.pro3
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp29
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro5
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp29
-rw-r--r--tests/auto/corelib/tools/qdate/qdate.pro3
-rw-r--r--tests/auto/corelib/tools/qdate/tst_qdate.cpp32
-rw-r--r--tests/auto/corelib/tools/qdatetime/qdatetime.pro3
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp44
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime_mac.mm29
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/qeasingcurve.pro3
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp29
-rw-r--r--tests/auto/corelib/tools/qelapsedtimer/qelapsedtimer.pro3
-rw-r--r--tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp29
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro3
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp29
-rw-r--r--tests/auto/corelib/tools/qfreelist/qfreelist.pro2
-rw-r--r--tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp29
-rw-r--r--tests/auto/corelib/tools/qhash/qhash.pro3
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp167
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/qhashfunctions.pro3
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp45
-rw-r--r--tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp27
-rw-r--r--tests/auto/corelib/tools/qline/qline.pro5
-rw-r--r--tests/auto/corelib/tools/qline/tst_qline.cpp35
-rw-r--r--tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro3
-rw-r--r--tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp29
-rw-r--r--tests/auto/corelib/tools/qlist/qlist.pro2
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp29
-rw-r--r--tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp29
-rw-r--r--tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro1
-rw-r--r--tests/auto/corelib/tools/qlocale/test/test.pro8
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp381
-rw-r--r--tests/auto/corelib/tools/qmap/qmap.pro3
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp99
-rw-r--r--tests/auto/corelib/tools/qmargins/qmargins.pro3
-rw-r--r--tests/auto/corelib/tools/qmargins/tst_qmargins.cpp29
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/qmessageauthenticationcode.pro3
-rw-r--r--tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp27
-rw-r--r--tests/auto/corelib/tools/qpair/qpair.pro3
-rw-r--r--tests/auto/corelib/tools/qpair/tst_qpair.cpp96
-rw-r--r--tests/auto/corelib/tools/qpoint/qpoint.pro3
-rw-r--r--tests/auto/corelib/tools/qpoint/tst_qpoint.cpp29
-rw-r--r--tests/auto/corelib/tools/qpointf/qpointf.pro3
-rw-r--r--tests/auto/corelib/tools/qpointf/tst_qpointf.cpp29
-rw-r--r--tests/auto/corelib/tools/qqueue/qqueue.pro3
-rw-r--r--tests/auto/corelib/tools/qqueue/tst_qqueue.cpp29
-rw-r--r--tests/auto/corelib/tools/qrect/qrect.pro3
-rw-r--r--tests/auto/corelib/tools/qrect/tst_qrect.cpp67
-rw-r--r--tests/auto/corelib/tools/qregexp/qregexp.pro3
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp43
-rw-r--r--tests/auto/corelib/tools/qregularexpression/alwaysoptimize/alwaysoptimize.pro3
-rw-r--r--tests/auto/corelib/tools/qregularexpression/alwaysoptimize/tst_qregularexpression_alwaysoptimize.cpp27
-rw-r--r--tests/auto/corelib/tools/qregularexpression/defaultoptimize/defaultoptimize.pro3
-rw-r--r--tests/auto/corelib/tools/qregularexpression/defaultoptimize/tst_qregularexpression_defaultoptimize.cpp27
-rw-r--r--tests/auto/corelib/tools/qregularexpression/forceoptimize/forceoptimize.pro2
-rw-r--r--tests/auto/corelib/tools/qregularexpression/forceoptimize/tst_qregularexpression_forceoptimize.cpp27
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp39
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h27
-rw-r--r--tests/auto/corelib/tools/qringbuffer/qringbuffer.pro3
-rw-r--r--tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp72
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/qscopedpointer.pro3
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp29
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/qscopedvaluerollback.pro3
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp29
-rw-r--r--tests/auto/corelib/tools/qset/qset.pro3
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp31
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp29
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.h29
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp31
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h31
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/nontracked.cpp29
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/nontracked.h29
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro1
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp92
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/wrapper.cpp29
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/wrapper.h29
-rw-r--r--tests/auto/corelib/tools/qsize/qsize.pro3
-rw-r--r--tests/auto/corelib/tools/qsize/tst_qsize.cpp29
-rw-r--r--tests/auto/corelib/tools/qsizef/qsizef.pro3
-rw-r--r--tests/auto/corelib/tools/qsizef/tst_qsizef.cpp29
-rw-r--r--tests/auto/corelib/tools/qstl/qstl.pro3
-rw-r--r--tests/auto/corelib/tools/qstl/tst_qstl.cpp29
-rw-r--r--tests/auto/corelib/tools/qstring/double_data.h29
-rw-r--r--tests/auto/corelib/tools/qstring/qstring.pro6
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp480
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring_mac.mm29
-rw-r--r--tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro3
-rw-r--r--tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro3
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro3
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro3
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro3
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringiterator/qstringiterator.pro2
-rw-r--r--tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp27
-rw-r--r--tests/auto/corelib/tools/qstringlist/qstringlist.pro3
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro3
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp29
-rw-r--r--tests/auto/corelib/tools/qstringref/qstringref.pro3
-rw-r--r--tests/auto/corelib/tools/qstringref/tst_qstringref.cpp90
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro5
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp33
-rw-r--r--tests/auto/corelib/tools/qtime/qtime.pro3
-rw-r--r--tests/auto/corelib/tools/qtime/tst_qtime.cpp29
-rw-r--r--tests/auto/corelib/tools/qtimeline/qtimeline.pro3
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp29
-rw-r--r--tests/auto/corelib/tools/qtimezone/qtimezone.pro3
-rw-r--r--tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp29
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/qvarlengtharray.pro3
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp41
-rw-r--r--tests/auto/corelib/tools/qvector/qvector.pro3
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp42
-rw-r--r--tests/auto/corelib/tools/qversionnumber/qversionnumber.pro2
-rw-r--r--tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp29
-rw-r--r--tests/auto/corelib/xml/qxmlstream/qc14n.h29
-rw-r--r--tests/auto/corelib/xml/qxmlstream/qxmlstream.pro2
-rwxr-xr-xtests/auto/corelib/xml/qxmlstream/setupSuite.sh29
-rw-r--r--tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp124
512 files changed, 6482 insertions, 6478 deletions
diff --git a/tests/auto/corelib/animation/qabstractanimation/qabstractanimation.pro b/tests/auto/corelib/animation/qabstractanimation/qabstractanimation.pro
index 7ec9c5f574..32701c2c9c 100644
--- a/tests/auto/corelib/animation/qabstractanimation/qabstractanimation.pro
+++ b/tests/auto/corelib/animation/qabstractanimation/qabstractanimation.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qabstractanimation
QT = core testlib
SOURCES = tst_qabstractanimation.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
index 7a4b9ae5f0..fc09d57692 100644
--- a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
+++ b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/animation/qanimationgroup/qanimationgroup.pro b/tests/auto/corelib/animation/qanimationgroup/qanimationgroup.pro
index a5e898b395..f4b5747216 100644
--- a/tests/auto/corelib/animation/qanimationgroup/qanimationgroup.pro
+++ b/tests/auto/corelib/animation/qanimationgroup/qanimationgroup.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qanimationgroup
QT = core testlib
SOURCES = tst_qanimationgroup.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
index 3d40f9c88d..2b7de50971 100644
--- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/qparallelanimationgroup.pro b/tests/auto/corelib/animation/qparallelanimationgroup/qparallelanimationgroup.pro
index 23343f27f5..5b4c6ab90a 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/qparallelanimationgroup.pro
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/qparallelanimationgroup.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qparallelanimationgroup
QT = core testlib
SOURCES = tst_qparallelanimationgroup.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index d963c5173e..320e0095d3 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -491,7 +486,7 @@ void tst_QParallelAnimationGroup::deleteChildrenWithRunningGroup()
QVERIFY(group.currentLoopTime() > 0);
delete anim1;
- QVERIFY(group.animationCount() == 0);
+ QCOMPARE(group.animationCount(), 0);
QCOMPARE(group.duration(), 0);
QCOMPARE(group.state(), QAnimationGroup::Stopped);
QCOMPARE(group.currentLoopTime(), 0); //that's the invariant
diff --git a/tests/auto/corelib/animation/qpauseanimation/qpauseanimation.pro b/tests/auto/corelib/animation/qpauseanimation/qpauseanimation.pro
index 4c2dd02951..7f19bc7545 100644
--- a/tests/auto/corelib/animation/qpauseanimation/qpauseanimation.pro
+++ b/tests/auto/corelib/animation/qpauseanimation/qpauseanimation.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpauseanimation
QT = core-private testlib
SOURCES = tst_qpauseanimation.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
index db58c797d3..25b6216075 100644
--- a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
+++ b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -114,10 +109,10 @@ void tst_QPauseAnimation::changeDirectionWhileRunning()
animation.setDuration(400);
animation.start();
QTest::qWait(100);
- QVERIFY(animation.state() == QAbstractAnimation::Running);
+ QCOMPARE(animation.state(), QAbstractAnimation::Running);
animation.setDirection(QAbstractAnimation::Backward);
QTest::qWait(animation.totalDuration() + 50);
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
}
void tst_QPauseAnimation::noTimerUpdates_data()
@@ -149,7 +144,7 @@ void tst_QPauseAnimation::noTimerUpdates()
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
const int expectedLoopCount = 1 + loopCount;
#ifdef BAD_TIMER_RESOLUTION
@@ -177,13 +172,13 @@ void tst_QPauseAnimation::multiplePauseAnimations()
if (animation.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (animation2.state() != QAbstractAnimation::Running)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(animation2.state() == QAbstractAnimation::Running);
+ QCOMPARE(animation2.state(), QAbstractAnimation::Running);
#ifdef BAD_TIMER_RESOLUTION
if (animation.m_updateCurrentTimeCount != 2)
@@ -203,7 +198,7 @@ void tst_QPauseAnimation::multiplePauseAnimations()
if (animation2.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(animation2.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation2.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (animation2.m_updateCurrentTimeCount != 3)
@@ -230,8 +225,8 @@ void tst_QPauseAnimation::pauseAndPropertyAnimations()
QTest::qWait(100);
animation.start();
- QVERIFY(animation.state() == QAbstractAnimation::Running);
- QVERIFY(pause.state() == QAbstractAnimation::Running);
+ QCOMPARE(animation.state(), QAbstractAnimation::Running);
+ QCOMPARE(pause.state(), QAbstractAnimation::Running);
QCOMPARE(pause.m_updateCurrentTimeCount, 2);
QTest::qWait(animation.totalDuration() + 100);
@@ -240,8 +235,8 @@ void tst_QPauseAnimation::pauseAndPropertyAnimations()
if (animation.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
- QVERIFY(pause.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(pause.state(), QAbstractAnimation::Stopped);
QVERIFY(pause.m_updateCurrentTimeCount > 3);
}
@@ -250,10 +245,10 @@ void tst_QPauseAnimation::pauseResume()
TestablePauseAnimation animation;
animation.setDuration(400);
animation.start();
- QVERIFY(animation.state() == QAbstractAnimation::Running);
+ QCOMPARE(animation.state(), QAbstractAnimation::Running);
QTest::qWait(200);
animation.pause();
- QVERIFY(animation.state() == QAbstractAnimation::Paused);
+ QCOMPARE(animation.state(), QAbstractAnimation::Paused);
animation.start();
QTRY_COMPARE(animation.state(), QAbstractAnimation::Stopped);
@@ -281,39 +276,39 @@ void tst_QPauseAnimation::sequentialPauseGroup()
QCOMPARE(animation2.m_updateCurrentTimeCount, 0);
QCOMPARE(animation3.m_updateCurrentTimeCount, 0);
- QVERIFY(group.state() == QAbstractAnimation::Running);
- QVERIFY(animation1.state() == QAbstractAnimation::Running);
- QVERIFY(animation2.state() == QAbstractAnimation::Stopped);
- QVERIFY(animation3.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation1.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation2.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(animation3.state(), QAbstractAnimation::Stopped);
group.setCurrentTime(250);
QCOMPARE(animation1.m_updateCurrentTimeCount, 2);
QCOMPARE(animation2.m_updateCurrentTimeCount, 1);
QCOMPARE(animation3.m_updateCurrentTimeCount, 0);
- QVERIFY(group.state() == QAbstractAnimation::Running);
- QVERIFY(animation1.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation1.state(), QAbstractAnimation::Stopped);
QCOMPARE((QAbstractAnimation*)&animation2, group.currentAnimation());
- QVERIFY(animation2.state() == QAbstractAnimation::Running);
- QVERIFY(animation3.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation2.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation3.state(), QAbstractAnimation::Stopped);
group.setCurrentTime(500);
QCOMPARE(animation1.m_updateCurrentTimeCount, 2);
QCOMPARE(animation2.m_updateCurrentTimeCount, 2);
QCOMPARE(animation3.m_updateCurrentTimeCount, 1);
- QVERIFY(group.state() == QAbstractAnimation::Running);
- QVERIFY(animation1.state() == QAbstractAnimation::Stopped);
- QVERIFY(animation2.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation1.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(animation2.state(), QAbstractAnimation::Stopped);
QCOMPARE((QAbstractAnimation*)&animation3, group.currentAnimation());
- QVERIFY(animation3.state() == QAbstractAnimation::Running);
+ QCOMPARE(animation3.state(), QAbstractAnimation::Running);
group.setCurrentTime(750);
- QVERIFY(group.state() == QAbstractAnimation::Stopped);
- QVERIFY(animation1.state() == QAbstractAnimation::Stopped);
- QVERIFY(animation2.state() == QAbstractAnimation::Stopped);
- QVERIFY(animation3.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(animation1.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(animation2.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(animation3.state(), QAbstractAnimation::Stopped);
QCOMPARE(animation1.m_updateCurrentTimeCount, 2);
QCOMPARE(animation2.m_updateCurrentTimeCount, 2);
@@ -334,22 +329,22 @@ void tst_QPauseAnimation::sequentialGroupWithPause()
group.start();
- QVERIFY(group.state() == QAbstractAnimation::Running);
- QVERIFY(animation.state() == QAbstractAnimation::Running);
- QVERIFY(pause.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation.state(), QAbstractAnimation::Running);
+ QCOMPARE(pause.state(), QAbstractAnimation::Stopped);
group.setCurrentTime(300);
- QVERIFY(group.state() == QAbstractAnimation::Running);
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Running);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
QCOMPARE((QAbstractAnimation*)&pause, group.currentAnimation());
- QVERIFY(pause.state() == QAbstractAnimation::Running);
+ QCOMPARE(pause.state(), QAbstractAnimation::Running);
group.setCurrentTime(600);
- QVERIFY(group.state() == QAbstractAnimation::Stopped);
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
- QVERIFY(pause.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
+ QCOMPARE(pause.state(), QAbstractAnimation::Stopped);
QCOMPARE(pause.m_updateCurrentTimeCount, 2);
}
@@ -401,11 +396,11 @@ void tst_QPauseAnimation::multipleSequentialGroups()
group.start();
- QVERIFY(group.state() == QAbstractAnimation::Running);
- QVERIFY(subgroup1.state() == QAbstractAnimation::Running);
- QVERIFY(subgroup2.state() == QAbstractAnimation::Running);
- QVERIFY(subgroup3.state() == QAbstractAnimation::Running);
- QVERIFY(subgroup4.state() == QAbstractAnimation::Running);
+ QCOMPARE(group.state(), QAbstractAnimation::Running);
+ QCOMPARE(subgroup1.state(), QAbstractAnimation::Running);
+ QCOMPARE(subgroup2.state(), QAbstractAnimation::Running);
+ QCOMPARE(subgroup3.state(), QAbstractAnimation::Running);
+ QCOMPARE(subgroup4.state(), QAbstractAnimation::Running);
// This is a pretty long animation so it tends to get rather out of sync
// when using the consistent timer, so run for an extra half second for good
@@ -416,31 +411,31 @@ void tst_QPauseAnimation::multipleSequentialGroups()
if (group.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(group.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(group.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (subgroup1.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(subgroup1.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(subgroup1.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (subgroup2.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(subgroup2.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(subgroup2.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (subgroup3.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(subgroup3.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(subgroup3.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (subgroup4.state() != QAbstractAnimation::Stopped)
QEXPECT_FAIL("", timerError, Abort);
#endif
- QVERIFY(subgroup4.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(subgroup4.state(), QAbstractAnimation::Stopped);
#ifdef BAD_TIMER_RESOLUTION
if (pause5.m_updateCurrentTimeCount != 4)
@@ -455,7 +450,7 @@ void tst_QPauseAnimation::zeroDuration()
animation.setDuration(0);
animation.start();
QTest::qWait(animation.totalDuration() + 100);
- QVERIFY(animation.state() == QAbstractAnimation::Stopped);
+ QCOMPARE(animation.state(), QAbstractAnimation::Stopped);
QCOMPARE(animation.m_updateCurrentTimeCount, 1);
}
diff --git a/tests/auto/corelib/animation/qpropertyanimation/qpropertyanimation.pro b/tests/auto/corelib/animation/qpropertyanimation/qpropertyanimation.pro
index 502e5aa428..bfeb183abf 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/qpropertyanimation.pro
+++ b/tests/auto/corelib/animation/qpropertyanimation/qpropertyanimation.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpropertyanimation
QT = core gui widgets testlib
SOURCES = tst_qpropertyanimation.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
index 530d7777d8..c1a8fde504 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -34,6 +29,7 @@
#include <QtTest/QtTest>
#include <QtCore/qpropertyanimation.h>
#include <QtCore/qvariantanimation.h>
+#include <QtGui/qtouchdevice.h>
#include <QtWidgets/qwidget.h>
Q_DECLARE_METATYPE(QAbstractAnimation::State)
@@ -369,7 +365,7 @@ void tst_QPropertyAnimation::deletion2()
QTimer::singleShot(0, object, SLOT(deleteLater()));
QTest::qWait(50);
- QVERIFY(anim->targetObject() == 0);
+ QVERIFY(!anim->targetObject());
}
void tst_QPropertyAnimation::deletion3()
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/qsequentialanimationgroup.pro b/tests/auto/corelib/animation/qsequentialanimationgroup/qsequentialanimationgroup.pro
index e53cde48f3..b0271e8ea2 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/qsequentialanimationgroup.pro
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/qsequentialanimationgroup.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qsequentialanimationgroup
QT = core testlib
SOURCES = tst_qsequentialanimationgroup.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index c0fcb70ff3..6d66f05835 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -916,7 +911,7 @@ void tst_QSequentialAnimationGroup::startDelay()
QTest::qWait(500);
QTRY_COMPARE(group.state(), QAnimationGroup::Stopped);
- QVERIFY(group.currentLoopTime() == 375);
+ QCOMPARE(group.currentLoopTime(), 375);
}
void tst_QSequentialAnimationGroup::clearGroup()
@@ -1518,7 +1513,7 @@ void tst_QSequentialAnimationGroup::addRemoveAnimation()
void tst_QSequentialAnimationGroup::currentAnimation()
{
QSequentialAnimationGroup group;
- QVERIFY(group.currentAnimation() == 0);
+ QVERIFY(!group.currentAnimation());
QPropertyAnimation anim;
anim.setDuration(0);
@@ -1529,7 +1524,7 @@ void tst_QSequentialAnimationGroup::currentAnimation()
void tst_QSequentialAnimationGroup::currentAnimationWithZeroDuration()
{
QSequentialAnimationGroup group;
- QVERIFY(group.currentAnimation() == 0);
+ QVERIFY(!group.currentAnimation());
QPropertyAnimation zero1;
zero1.setDuration(0);
diff --git a/tests/auto/corelib/animation/qvariantanimation/qvariantanimation.pro b/tests/auto/corelib/animation/qvariantanimation/qvariantanimation.pro
index 1c882833fc..b82d3bc6e0 100644
--- a/tests/auto/corelib/animation/qvariantanimation/qvariantanimation.pro
+++ b/tests/auto/corelib/animation/qvariantanimation/qvariantanimation.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qvariantanimation
QT = core testlib
SOURCES = tst_qvariantanimation.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
index bd539296c2..00962afa72 100644
--- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
+++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -77,9 +72,9 @@ void tst_QVariantAnimation::currentValue()
void tst_QVariantAnimation::easingCurve()
{
TestableQVariantAnimation anim;
- QVERIFY(anim.easingCurve() == QEasingCurve::Linear);
+ QCOMPARE(anim.easingCurve().type(), QEasingCurve::Linear);
anim.setEasingCurve(QEasingCurve::InQuad);
- QVERIFY(anim.easingCurve() == QEasingCurve::InQuad);
+ QCOMPARE(anim.easingCurve().type(), QEasingCurve::InQuad);
}
void tst_QVariantAnimation::endValue()
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/echo.pro b/tests/auto/corelib/codecs/qtextcodec/echo/echo.pro
index 500f123f61..bf791ffc61 100644
--- a/tests/auto/corelib/codecs/qtextcodec/echo/echo.pro
+++ b/tests/auto/corelib/codecs/qtextcodec/echo/echo.pro
@@ -4,4 +4,3 @@ CONFIG -= app_bundle debug_and_release_target
CONFIG += console
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
index 5d1a603613..52645184a3 100644
--- a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/codecs/qtextcodec/test/test.pro b/tests/auto/corelib/codecs/qtextcodec/test/test.pro
index 35b2b34690..e0a1bbd88e 100644
--- a/tests/auto/corelib/codecs/qtextcodec/test/test.pro
+++ b/tests/auto/corelib/codecs/qtextcodec/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
QT = core testlib
SOURCES = ../tst_qtextcodec.cpp
@@ -12,4 +11,3 @@ win32 {
}
}
TESTDATA += ../*.txt
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index 8a9ae0cd72..554f0dc68d 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -156,7 +152,7 @@ void tst_QTextCodec::codecForName()
QTextCodec *codec = QTextCodec::codecForName(hint.toLatin1());
if (actualCodecName.isEmpty()) {
- QVERIFY(codec == 0);
+ QVERIFY(!codec);
} else {
QVERIFY(codec != 0);
QCOMPARE(QString(codec->name()), actualCodecName);
@@ -265,7 +261,7 @@ void tst_QTextCodec::fromUnicode()
array is correct (no off by one, no trailing '\0').
*/
QByteArray result = codec->fromUnicode(QString("abc"));
- if (result.startsWith("a")) {
+ if (result.startsWith('a')) {
QCOMPARE(result.size(), 3);
QCOMPARE(result, QByteArray("abc"));
} else {
@@ -573,7 +569,7 @@ void tst_QTextCodec::utf8Codec_data()
str = "Prohl";
str += QChar::ReplacementCharacter;
str += QChar::ReplacementCharacter;
- str += "e";
+ str += QLatin1Char('e');
str += QChar::ReplacementCharacter;
str += " plugin";
str += QChar::ReplacementCharacter;
@@ -2082,7 +2078,7 @@ void tst_QTextCodec::codecForUtfText()
if (detected)
QCOMPARE(codec->mibEnum(), mib);
else
- QVERIFY(codec == 0);
+ QVERIFY(!codec);
}
#if defined(Q_OS_UNIX)
diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
index 2319aa61ec..16265c6187 100644
--- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
+++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/codecs/utf8/utf8.pro b/tests/auto/corelib/codecs/utf8/utf8.pro
index 23f8b8894e..355d890824 100644
--- a/tests/auto/corelib/codecs/utf8/utf8.pro
+++ b/tests/auto/corelib/codecs/utf8/utf8.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_utf8
QT = core testlib
SOURCES += tst_utf8.cpp utf8data.cpp
-CONFIG += parallel_test
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/codecs/utf8/utf8data.cpp b/tests/auto/corelib/codecs/utf8/utf8data.cpp
index 953d931b0d..603ebbbcef 100644
--- a/tests/auto/corelib/codecs/utf8/utf8data.cpp
+++ b/tests/auto/corelib/codecs/utf8/utf8data.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/global/q_func_info/q_func_info.pro b/tests/auto/corelib/global/q_func_info/q_func_info.pro
index aad0edf4ed..7663a880eb 100644
--- a/tests/auto/corelib/global/q_func_info/q_func_info.pro
+++ b/tests/auto/corelib/global/q_func_info/q_func_info.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_q_func_info
QT = core testlib
SOURCES = tst_q_func_info.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp b/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp
index 34eb8161e3..32e4217ad0 100644
--- a/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp
+++ b/tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/global/qflags/qflags.pro b/tests/auto/corelib/global/qflags/qflags.pro
index 7602008e22..29dfb0684c 100644
--- a/tests/auto/corelib/global/qflags/qflags.pro
+++ b/tests/auto/corelib/global/qflags/qflags.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qflags
QT = core testlib
SOURCES = tst_qflags.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
contains(QT_CONFIG, c++11): CONFIG += c++11
contains(QT_CONFIG, c++14): CONFIG += c++14
diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp
index 1f2e7ca0cd..10902b6f55 100644
--- a/tests/auto/corelib/global/qflags/tst_qflags.cpp
+++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -43,6 +38,7 @@ private slots:
void signedness();
void classEnum();
void initializerLists();
+ void testSetFlags();
};
void tst_QFlags::testFlag() const
@@ -283,6 +279,19 @@ void tst_QFlags::initializerLists()
#endif // Q_COMPILER_INITIALIZER_LISTS
}
+void tst_QFlags::testSetFlags()
+{
+ Qt::MouseButtons btn = Qt::NoButton;
+
+ btn.setFlag(Qt::LeftButton);
+ QVERIFY(btn.testFlag(Qt::LeftButton));
+ QVERIFY(!btn.testFlag(Qt::MidButton));
+
+ btn.setFlag(Qt::LeftButton, false);
+ QVERIFY(!btn.testFlag(Qt::LeftButton));
+ QVERIFY(!btn.testFlag(Qt::MidButton));
+}
+
// (statically) check QTypeInfo for QFlags instantiations:
enum MyEnum { Zero, One, Two, Four=4 };
Q_DECLARE_FLAGS( MyFlags, MyEnum )
diff --git a/tests/auto/corelib/global/qgetputenv/qgetputenv.pro b/tests/auto/corelib/global/qgetputenv/qgetputenv.pro
index 34fb1a702b..c6d1100335 100644
--- a/tests/auto/corelib/global/qgetputenv/qgetputenv.pro
+++ b/tests/auto/corelib/global/qgetputenv/qgetputenv.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qgetputenv
QT = core testlib
SOURCES = tst_qgetputenv.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
index 71a3419963..7ffb5d0fd7 100644
--- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
+++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -80,7 +75,7 @@ void tst_QGetPutEnv::getSetCheck()
QCOMPARE(qEnvironmentVariableIntValue(varName, &ok), 0);
QVERIFY(!ok);
result = qgetenv(varName);
- QVERIFY(result == "supervalue");
+ QCOMPARE(result, QByteArrayLiteral("supervalue"));
qputenv(varName,QByteArray());
diff --git a/tests/auto/corelib/global/qglobal/qglobal.pro b/tests/auto/corelib/global/qglobal/qglobal.pro
index d1c02f80e9..b8ed7761f5 100644
--- a/tests/auto/corelib/global/qglobal/qglobal.pro
+++ b/tests/auto/corelib/global/qglobal/qglobal.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qglobal
QT = core testlib
SOURCES = tst_qglobal.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 00f70f5380..bb4d1f4bf2 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -60,6 +55,7 @@ private slots:
void qprintable();
void qprintable_data();
void buildAbiEndianness();
+ void testqOverload();
};
void tst_QGlobal::qIsNull()
@@ -657,5 +653,126 @@ void tst_QGlobal::buildAbiEndianness()
QVERIFY(QSysInfo::buildAbi().contains(endian));
}
+struct Overloaded
+{
+ void foo() {}
+ void foo(QByteArray) {}
+ void foo(QByteArray, const QString &) {}
+
+ void constFoo() const {}
+ void constFoo(QByteArray) const {}
+ void constFoo(QByteArray, const QString &) const {}
+
+ void mixedFoo() {}
+ void mixedFoo(QByteArray) const {}
+};
+
+void freeOverloaded() {}
+void freeOverloaded(QByteArray) {}
+void freeOverloaded(QByteArray, const QString &) {}
+
+void freeOverloadedGet(QByteArray) {}
+QByteArray freeOverloadedGet() { return QByteArray(); }
+
+
+void tst_QGlobal::testqOverload()
+{
+#ifdef Q_COMPILER_VARIADIC_TEMPLATES
+
+ // void returning free overloaded functions
+ QVERIFY(QOverload<>::of(&freeOverloaded) ==
+ static_cast<void (*)()>(&freeOverloaded));
+
+ QVERIFY(QOverload<QByteArray>::of(&freeOverloaded) ==
+ static_cast<void (*)(QByteArray)>(&freeOverloaded));
+
+ QVERIFY((QOverload<QByteArray, const QString &>::of(&freeOverloaded)) ==
+ static_cast<void (*)(QByteArray, const QString &)>(&freeOverloaded));
+
+ // value returning free overloaded functions
+ QVERIFY(QOverload<>::of(&freeOverloadedGet) ==
+ static_cast<QByteArray (*)()>(&freeOverloadedGet));
+
+ QVERIFY(QOverload<QByteArray>::of(&freeOverloadedGet) ==
+ static_cast<void (*)(QByteArray)>(&freeOverloadedGet));
+
+ // void returning overloaded member functions
+ QVERIFY(QOverload<>::of(&Overloaded::foo) ==
+ static_cast<void (Overloaded::*)()>(&Overloaded::foo));
+
+ QVERIFY(QOverload<QByteArray>::of(&Overloaded::foo) ==
+ static_cast<void (Overloaded::*)(QByteArray)>(&Overloaded::foo));
+
+ QVERIFY((QOverload<QByteArray, const QString &>::of(&Overloaded::foo)) ==
+ static_cast<void (Overloaded::*)(QByteArray, const QString &)>(&Overloaded::foo));
+
+ // void returning overloaded const member functions
+ QVERIFY(QOverload<>::of(&Overloaded::constFoo) ==
+ static_cast<void (Overloaded::*)() const>(&Overloaded::constFoo));
+
+ QVERIFY(QOverload<QByteArray>::of(&Overloaded::constFoo) ==
+ static_cast<void (Overloaded::*)(QByteArray) const>(&Overloaded::constFoo));
+
+ QVERIFY((QOverload<QByteArray, const QString &>::of(&Overloaded::constFoo)) ==
+ static_cast<void (Overloaded::*)(QByteArray, const QString &) const>(&Overloaded::constFoo));
+
+ // void returning overloaded const AND non-const member functions
+ QVERIFY(QNonConstOverload<>::of(&Overloaded::mixedFoo) ==
+ static_cast<void (Overloaded::*)()>(&Overloaded::mixedFoo));
+
+ QVERIFY(QConstOverload<QByteArray>::of(&Overloaded::mixedFoo) ==
+ static_cast<void (Overloaded::*)(QByteArray) const>(&Overloaded::mixedFoo));
+
+#if defined(__cpp_variable_templates) && __cpp_variable_templates >= 201304 // C++14
+
+ // void returning free overloaded functions
+ QVERIFY(qOverload<>(&freeOverloaded) ==
+ static_cast<void (*)()>(&freeOverloaded));
+
+ QVERIFY(qOverload<QByteArray>(&freeOverloaded) ==
+ static_cast<void (*)(QByteArray)>(&freeOverloaded));
+
+ QVERIFY((qOverload<QByteArray, const QString &>(&freeOverloaded) ==
+ static_cast<void (*)(QByteArray, const QString &)>(&freeOverloaded)));
+
+ // value returning free overloaded functions
+ QVERIFY(qOverload<>(&freeOverloadedGet) ==
+ static_cast<QByteArray (*)()>(&freeOverloadedGet));
+
+ QVERIFY(qOverload<QByteArray>(&freeOverloadedGet) ==
+ static_cast<void (*)(QByteArray)>(&freeOverloadedGet));
+
+ // void returning overloaded member functions
+ QVERIFY(qOverload<>(&Overloaded::foo) ==
+ static_cast<void (Overloaded::*)()>(&Overloaded::foo));
+
+ QVERIFY(qOverload<QByteArray>(&Overloaded::foo) ==
+ static_cast<void (Overloaded::*)(QByteArray)>(&Overloaded::foo));
+
+ QVERIFY((qOverload<QByteArray, const QString &>(&Overloaded::foo)) ==
+ static_cast<void (Overloaded::*)(QByteArray, const QString &)>(&Overloaded::foo));
+
+ // void returning overloaded const member functions
+ QVERIFY(qOverload<>(&Overloaded::constFoo) ==
+ static_cast<void (Overloaded::*)() const>(&Overloaded::constFoo));
+
+ QVERIFY(qOverload<QByteArray>(&Overloaded::constFoo) ==
+ static_cast<void (Overloaded::*)(QByteArray) const>(&Overloaded::constFoo));
+
+ QVERIFY((qOverload<QByteArray, const QString &>(&Overloaded::constFoo)) ==
+ static_cast<void (Overloaded::*)(QByteArray, const QString &) const>(&Overloaded::constFoo));
+
+ // void returning overloaded const AND non-const member functions
+ QVERIFY(qNonConstOverload<>(&Overloaded::mixedFoo) ==
+ static_cast<void (Overloaded::*)()>(&Overloaded::mixedFoo));
+
+ QVERIFY(qConstOverload<QByteArray>(&Overloaded::mixedFoo) ==
+ static_cast<void (Overloaded::*)(QByteArray) const>(&Overloaded::mixedFoo));
+#endif
+
+#endif
+}
+
+
QTEST_APPLESS_MAIN(tst_QGlobal)
#include "tst_qglobal.moc"
diff --git a/tests/auto/corelib/global/qglobalstatic/qglobalstatic.pro b/tests/auto/corelib/global/qglobalstatic/qglobalstatic.pro
index 7b374505ce..056d940da7 100644
--- a/tests/auto/corelib/global/qglobalstatic/qglobalstatic.pro
+++ b/tests/auto/corelib/global/qglobalstatic/qglobalstatic.pro
@@ -10,4 +10,3 @@ CONFIG += exceptions
SOURCES += tst_qglobalstatic.cpp
DEFINES += SRCDIR=\\\"$$PWD/\\\"
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp
index e9fd999e9f..1253a32f97 100644
--- a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp
+++ b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp
@@ -1,12 +1,23 @@
/****************************************************************************
**
-** Copyright (C) 2011 Thiago Macieira <thiago@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Thiago Macieira <thiago@kde.org>
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** 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.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/auto/corelib/global/qhooks/qhooks.pro b/tests/auto/corelib/global/qhooks/qhooks.pro
index f886e7d49a..a5c0d63cb9 100644
--- a/tests/auto/corelib/global/qhooks/qhooks.pro
+++ b/tests/auto/corelib/global/qhooks/qhooks.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qhooks
QT = core-private testlib
SOURCES = tst_qhooks.cpp
diff --git a/tests/auto/corelib/global/qhooks/tst_qhooks.cpp b/tests/auto/corelib/global/qhooks/tst_qhooks.cpp
index b5930790e4..f0685d64c5 100644
--- a/tests/auto/corelib/global/qhooks/tst_qhooks.cpp
+++ b/tests/auto/corelib/global/qhooks/tst_qhooks.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Volker Krause <volker.krause@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -46,7 +41,7 @@ private slots:
void tst_QHooks::testVersion()
{
- QVERIFY(qtHookData[QHooks::HookDataVersion] >= 1);
+ QVERIFY(qtHookData[QHooks::HookDataVersion] >= 3);
QCOMPARE(qtHookData[QHooks::HookDataSize], (quintptr)QHooks::LastHookIndex);
QCOMPARE(qtHookData[QHooks::QtVersion], (quintptr)QT_VERSION);
}
diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro
index 4789efc478..8ada04acdc 100644
--- a/tests/auto/corelib/global/qlogging/app/app.pro
+++ b/tests/auto/corelib/global/qlogging/app/app.pro
@@ -9,7 +9,6 @@ CONFIG -= app_bundle
CONFIG += console
SOURCES += main.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
DEFINES += QT_MESSAGELOGCONTEXT
gcc:!mingw:!haiku: QMAKE_LFLAGS += -rdynamic
diff --git a/tests/auto/corelib/global/qlogging/app/main.cpp b/tests/auto/corelib/global/qlogging/app/main.cpp
index 0a78b60ff9..4c26bb85e3 100644
--- a/tests/auto/corelib/global/qlogging/app/main.cpp
+++ b/tests/auto/corelib/global/qlogging/app/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/global/qlogging/test/test.pro b/tests/auto/corelib/global/qlogging/test/test.pro
index 64a63ce28a..b5b75be3a6 100644
--- a/tests/auto/corelib/global/qlogging/test/test.pro
+++ b/tests/auto/corelib/global/qlogging/test/test.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
CONFIG -= app_bundle debug_and_release_target
contains(QT_CONFIG, c++11): CONFIG += c++11
contains(QT_CONFIG, c++14): CONFIG += c++14
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 618806f3cd..ce227a6c8b 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -725,16 +720,16 @@ void tst_qmessagehandler::qMessagePattern_data()
// %{file} is tricky because of shadow builds
QTest::newRow("basic") << "%{type} %{appname} %{line} %{function} %{message}" << true << (QList<QByteArray>()
- << "debug 44 T::T static constructor"
+ << "debug 39 T::T static constructor"
// we can't be sure whether the QT_MESSAGE_PATTERN is already destructed
<< "static destructor"
- << "debug tst_qlogging 65 MyClass::myFunction from_a_function 34"
- << "debug tst_qlogging 75 main qDebug"
- << "info tst_qlogging 76 main qInfo"
- << "warning tst_qlogging 77 main qWarning"
- << "critical tst_qlogging 78 main qCritical"
- << "warning tst_qlogging 81 main qDebug with category"
- << "debug tst_qlogging 85 main qDebug2");
+ << "debug tst_qlogging 60 MyClass::myFunction from_a_function 34"
+ << "debug tst_qlogging 70 main qDebug"
+ << "info tst_qlogging 71 main qInfo"
+ << "warning tst_qlogging 72 main qWarning"
+ << "critical tst_qlogging 73 main qCritical"
+ << "warning tst_qlogging 76 main qDebug with category"
+ << "debug tst_qlogging 80 main qDebug2");
QTest::newRow("invalid") << "PREFIX: %{unknown} %{message}" << false << (QList<QByteArray>()
@@ -832,7 +827,7 @@ void tst_qmessagehandler::qMessagePattern()
// test QT_MESSAGE_PATTERN
//
QStringList environment = m_baseEnvironment;
- environment.prepend("QT_MESSAGE_PATTERN=\"" + pattern + "\"");
+ environment.prepend("QT_MESSAGE_PATTERN=\"" + pattern + QLatin1Char('"'));
process.setEnvironment(environment);
process.start(appExe);
diff --git a/tests/auto/corelib/global/qnumeric/qnumeric.pro b/tests/auto/corelib/global/qnumeric/qnumeric.pro
index 0772ce6aab..188bb5b463 100644
--- a/tests/auto/corelib/global/qnumeric/qnumeric.pro
+++ b/tests/auto/corelib/global/qnumeric/qnumeric.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qnumeric
QT = core-private testlib
SOURCES = tst_qnumeric.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
intel_icc: QMAKE_CXXFLAGS += -fp-model strict
intel_icl: QMAKE_CXXFLAGS += /fp:strict
diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
index 6be8ff81cf..8232ca8fba 100644
--- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
+++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -55,6 +51,7 @@ private slots:
void addOverflow();
void mulOverflow_data();
void mulOverflow();
+ void signedOverflow();
};
void tst_QNumeric::fuzzyCompare_data()
@@ -105,6 +102,18 @@ void tst_QNumeric::qNan()
QVERIFY(qIsNaN(nan));
QVERIFY(qIsNaN(nan + 1));
QVERIFY(qIsNaN(-nan));
+
+ Q_STATIC_ASSERT(sizeof(double) == 8);
+#ifdef Q_LITTLE_ENDIAN
+ const uchar bytes[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f };
+#else
+ const uchar bytes[] = { 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 };
+#endif
+ memcpy(&nan, bytes, 8);
+ QVERIFY(!qIsFinite(nan));
+ QVERIFY(!qIsInf(nan));
+ QVERIFY(qIsNaN(nan));
+
double inf = qInf();
QVERIFY(inf > 0);
QVERIFY(-inf < 0);
@@ -366,5 +375,35 @@ void tst_QNumeric::mulOverflow()
MulOverflowDispatch<quint64>()();
}
+void tst_QNumeric::signedOverflow()
+{
+ const int minInt = std::numeric_limits<int>::min();
+ const int maxInt = std::numeric_limits<int>::max();
+ int r;
+
+ QCOMPARE(add_overflow(minInt + 1, int(-1), &r), false);
+ QCOMPARE(add_overflow(minInt, int(-1), &r), true);
+ QCOMPARE(add_overflow(minInt, minInt, &r), true);
+ QCOMPARE(add_overflow(maxInt - 1, int(1), &r), false);
+ QCOMPARE(add_overflow(maxInt, int(1), &r), true);
+ QCOMPARE(add_overflow(maxInt, maxInt, &r), true);
+
+ QCOMPARE(sub_overflow(minInt + 1, int(1), &r), false);
+ QCOMPARE(sub_overflow(minInt, int(1), &r), true);
+ QCOMPARE(sub_overflow(minInt, maxInt, &r), true);
+ QCOMPARE(sub_overflow(maxInt - 1, int(-1), &r), false);
+ QCOMPARE(sub_overflow(maxInt, int(-1), &r), true);
+ QCOMPARE(sub_overflow(maxInt, minInt, &r), true);
+
+ QCOMPARE(mul_overflow(minInt, int(1), &r), false);
+ QCOMPARE(mul_overflow(minInt, int(-1), &r), true);
+ QCOMPARE(mul_overflow(minInt, int(2), &r), true);
+ QCOMPARE(mul_overflow(minInt, minInt, &r), true);
+ QCOMPARE(mul_overflow(maxInt, int(1), &r), false);
+ QCOMPARE(mul_overflow(maxInt, int(-1), &r), false);
+ QCOMPARE(mul_overflow(maxInt, int(2), &r), true);
+ QCOMPARE(mul_overflow(maxInt, maxInt, &r), true);
+}
+
QTEST_APPLESS_MAIN(tst_QNumeric)
#include "tst_qnumeric.moc"
diff --git a/tests/auto/corelib/global/qrand/qrand.pro b/tests/auto/corelib/global/qrand/qrand.pro
index 7761b6721a..ee1430aea5 100644
--- a/tests/auto/corelib/global/qrand/qrand.pro
+++ b/tests/auto/corelib/global/qrand/qrand.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qrand
QT = core testlib
SOURCES = tst_qrand.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/global/qrand/tst_qrand.cpp b/tests/auto/corelib/global/qrand/tst_qrand.cpp
index fd4934054b..6a4b2b322b 100644
--- a/tests/auto/corelib/global/qrand/tst_qrand.cpp
+++ b/tests/auto/corelib/global/qrand/tst_qrand.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/global/qtendian/qtendian.pro b/tests/auto/corelib/global/qtendian/qtendian.pro
index 363b86988d..2b0af4fa4c 100644
--- a/tests/auto/corelib/global/qtendian/qtendian.pro
+++ b/tests/auto/corelib/global/qtendian/qtendian.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtendian
QT = core testlib
SOURCES = tst_qtendian.cpp
@@ -6,4 +6,3 @@ wince* { # QTBUG-37194 , internal compiler errors with MSVC2008 for Windows CE
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE -= -O2
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp
index 5726535c5b..915e40954b 100644
--- a/tests/auto/corelib/global/qtendian/tst_qtendian.cpp
+++ b/tests/auto/corelib/global/qtendian/tst_qtendian.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro
index d9938d07d5..caef116684 100644
--- a/tests/auto/corelib/io/largefile/largefile.pro
+++ b/tests/auto/corelib/io/largefile/largefile.pro
@@ -4,4 +4,3 @@ QT = core testlib
SOURCES = tst_largefile.cpp
wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp
index afbb307f03..e448093062 100644
--- a/tests/auto/corelib/io/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro b/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
index b950f8c062..641bb7341b 100644
--- a/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
+++ b/tests/auto/corelib/io/qabstractfileengine/qabstractfileengine.pro
@@ -3,4 +3,3 @@ TARGET = tst_qabstractfileengine
QT = core-private core testlib
SOURCES = tst_qabstractfileengine.cpp
RESOURCES += qabstractfileengine.qrc
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
index 8c4c8b48d7..dba920d1f7 100644
--- a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
+++ b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the FOO module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qbuffer/qbuffer.pro b/tests/auto/corelib/io/qbuffer/qbuffer.pro
index 55d91f3cde..76b1088595 100644
--- a/tests/auto/corelib/io/qbuffer/qbuffer.pro
+++ b/tests/auto/corelib/io/qbuffer/qbuffer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qbuffer
QT = core testlib
SOURCES = tst_qbuffer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
index 3b730d97f9..4968742110 100644
--- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -378,7 +373,7 @@ void tst_QBuffer::read_rawdata()
for (int i = 0; i < (int)sizeof(mydata); ++i) {
QVERIFY(!buffer.atEnd());
in >> ch;
- QVERIFY(ch == (quint8)mydata[i]);
+ QCOMPARE(ch, (quint8)mydata[i]);
}
QVERIFY(buffer.atEnd());
}
diff --git a/tests/auto/corelib/io/qdatastream/qdatastream.pro b/tests/auto/corelib/io/qdatastream/qdatastream.pro
index 9ab2b0948d..291b3eb611 100644
--- a/tests/auto/corelib/io/qdatastream/qdatastream.pro
+++ b/tests/auto/corelib/io/qdatastream/qdatastream.pro
@@ -4,9 +4,8 @@ QT += testlib
SOURCES = tst_qdatastream.cpp
TESTDATA += datastream.q42
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index 76650ea9a4..447cf2845e 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -187,6 +182,11 @@ private slots:
void floatingPointNaN();
+ void transaction_data();
+ void transaction();
+ void nestedTransactionsResult_data();
+ void nestedTransactionsResult();
+
private:
void writebool(QDataStream *s);
void writeQBitArray(QDataStream *s);
@@ -316,7 +316,7 @@ void tst_QDataStream::cleanupTestCase()
static int dataIndex(const QString &tag)
{
- int pos = tag.lastIndexOf("_");
+ int pos = tag.lastIndexOf(QLatin1Char('_'));
if (pos >= 0) {
int ret = 0;
QString count = tag.mid(pos + 1);
@@ -353,9 +353,9 @@ void tst_QDataStream::stream_data(int noOfElements)
for (int b=0; b<2; b++) {
QString byte_order = b == 0 ? "BigEndian" : "LittleEndian";
- QString tag = device + "_" + byte_order;
+ QString tag = device + QLatin1Char('_') + byte_order;
for (int e=0; e<noOfElements; e++) {
- QTest::newRow(qPrintable(tag + QString("_%1").arg(e))) << device << QString(byte_order);
+ QTest::newRow(qPrintable(tag + QLatin1Char('_') + QString::number(e))) << device << byte_order;
}
}
}
@@ -544,7 +544,7 @@ void tst_QDataStream::readQRegExp(QDataStream *s)
*s >> R;
QCOMPARE(R, test);
*s >> V;
- QVERIFY(V.type() == QVariant::RegExp);
+ QCOMPARE(V.type(), QVariant::RegExp);
QCOMPARE(V.toRegExp(), test);
}
@@ -812,7 +812,7 @@ void tst_QDataStream::readbool(QDataStream *s)
bool d1;
*s >> d1;
- QVERIFY(d1 == expected);
+ QCOMPARE(d1, expected);
}
// ************************************
@@ -875,7 +875,7 @@ void tst_QDataStream::readQBitArray(QDataStream *s)
QBitArray d1;
*s >> d1;
- QVERIFY(d1 == expected);
+ QCOMPARE(d1, expected);
}
// ************************************
@@ -934,7 +934,7 @@ void tst_QDataStream::readQBrush(QDataStream *s)
*s >> d2;
QBrush brush = qBrushData(dataIndex(QTest::currentDataTag()));
- QVERIFY(d2 == brush);
+ QCOMPARE(d2, brush);
}
// ************************************
@@ -976,7 +976,7 @@ void tst_QDataStream::readQColor(QDataStream *s)
QColor test(QColorData(dataIndex(QTest::currentDataTag())));
QColor d3;
*s >> d3;
- QVERIFY(d3 == test);
+ QCOMPARE(d3, test);
}
@@ -1072,7 +1072,7 @@ void tst_QDataStream::readQCursor(QDataStream *s)
*s >> d5;
QVERIFY(d5.shape() == test.shape()); //## lacks operator==
- QVERIFY(d5.hotSpot() == test.hotSpot());
+ QCOMPARE(d5.hotSpot(), test.hotSpot());
QVERIFY((d5.bitmap() != 0 && test.bitmap() != 0) || (d5.bitmap() == 0 && test.bitmap() == 0));
if (d5.bitmap() != 0) {
QPixmap actual = *(d5.bitmap());
@@ -1135,7 +1135,7 @@ void tst_QDataStream::readQDate(QDataStream *s)
QDate test(qDateData(dataIndex(QTest::currentDataTag())));
QDate d6;
*s >> d6;
- QVERIFY(d6 == test);
+ QCOMPARE(d6, test);
}
// ************************************
@@ -1230,7 +1230,7 @@ void tst_QDataStream::readQTime(QDataStream *s)
QTime test = qTimeData(dataIndex(QTest::currentDataTag()));
QTime d7;
*s >> d7;
- QVERIFY(d7 == test);
+ QCOMPARE(d7, test);
}
// ************************************
@@ -1280,7 +1280,7 @@ void tst_QDataStream::readQDateTime(QDataStream *s)
QDateTime test(qDateTimeData(dataIndex(QTest::currentDataTag())));
QDateTime d8;
*s >> d8;
- QVERIFY(d8 == test);
+ QCOMPARE(d8, test);
}
// ************************************
@@ -1431,16 +1431,16 @@ void tst_QDataStream::readQImage(QDataStream *s)
QImage d12;
*s >> d12;
- QVERIFY(d12 == ref);
+ QCOMPARE(d12, ref);
// do some extra neurotic tests
- QVERIFY(d12.size() == ref.size());
- QVERIFY(d12.isNull() == ref.isNull());
- QVERIFY(d12.width() == ref.width());
- QVERIFY(d12.height() == ref.height());
- QVERIFY(d12.depth() == ref.depth());
- QVERIFY(d12.colorCount() == ref.colorCount());
- QVERIFY(d12.hasAlphaChannel() == ref.hasAlphaChannel());
+ QCOMPARE(d12.size(), ref.size());
+ QCOMPARE(d12.isNull(), ref.isNull());
+ QCOMPARE(d12.width(), ref.width());
+ QCOMPARE(d12.height(), ref.height());
+ QCOMPARE(d12.depth(), ref.depth());
+ QCOMPARE(d12.colorCount(), ref.colorCount());
+ QCOMPARE(d12.hasAlphaChannel(), ref.hasAlphaChannel());
}
// ************************************
@@ -1534,9 +1534,9 @@ void tst_QDataStream::readQPen(QDataStream *s)
QCOMPARE(d15.style(), origPen.style());
QCOMPARE(d15.width(), origPen.width());
QCOMPARE(d15.color(), origPen.color());
- QVERIFY(d15.capStyle() == origPen.capStyle());
- QVERIFY(d15.joinStyle() == origPen.joinStyle());
- QVERIFY(d15 == origPen);
+ QCOMPARE(d15.capStyle(), origPen.capStyle());
+ QCOMPARE(d15.joinStyle(), origPen.joinStyle());
+ QCOMPARE(d15, origPen);
}
// ************************************
@@ -1584,11 +1584,11 @@ void tst_QDataStream::readQPixmap(QDataStream *s)
QPixmap d16;
*s >> d16;
QVERIFY(!d16.isNull() && !pm.isNull());
- QVERIFY(d16.width() == pm.width());
- QVERIFY(d16.height() == pm.height());
- QVERIFY(d16.size() == pm.size());
- QVERIFY(d16.rect() == pm.rect());
- QVERIFY(d16.depth() == pm.depth());
+ QCOMPARE(d16.width(), pm.width());
+ QCOMPARE(d16.height(), pm.height());
+ QCOMPARE(d16.size(), pm.size());
+ QCOMPARE(d16.rect(), pm.rect());
+ QCOMPARE(d16.depth(), pm.depth());
}
void tst_QDataStream::writeQIcon(QDataStream *s)
@@ -1655,11 +1655,11 @@ void tst_QDataStream::readQPoint(QDataStream *s)
QPoint ref(qPointData(dataIndex(QTest::currentDataTag())));
QPoint d17;
*s >> d17;
- QVERIFY(d17 == ref);
+ QCOMPARE(d17, ref);
QPointF d17f;
*s >> d17f;
- QVERIFY(d17f == QPointF(ref));
+ QCOMPARE(d17f, QPointF(ref));
}
// ************************************
@@ -1707,11 +1707,11 @@ void tst_QDataStream::readQRect(QDataStream *s)
QRect ref(qRectData(dataIndex(QTest::currentDataTag())));
QRect d18;
*s >> d18;
- QVERIFY(d18 == ref);
+ QCOMPARE(d18, ref);
QRectF d18f;
*s >> d18f;
- QVERIFY(d18f == QRectF(ref));
+ QCOMPARE(d18f, QRectF(ref));
}
// ************************************
@@ -1820,11 +1820,11 @@ void tst_QDataStream::readQPolygon(QDataStream *s)
QPolygon ref(qPolygonData(dataIndex(QTest::currentDataTag())));
QPolygon d19;
*s >> d19;
- QVERIFY(d19 == ref);
+ QCOMPARE(d19, ref);
QPolygonF d19f;
*s >> d19f;
- QVERIFY(d19f == QPolygonF(ref));
+ QCOMPARE(d19f, QPolygonF(ref));
}
// ************************************
@@ -1884,7 +1884,7 @@ void tst_QDataStream::readQRegion(QDataStream *s)
QRegion ref(qRegionData(dataIndex(QTest::currentDataTag())));
QRegion r;
*s >> r;
- QVERIFY(r == ref);
+ QCOMPARE(r, ref);
}
// ************************************
@@ -1932,11 +1932,11 @@ void tst_QDataStream::readQSize(QDataStream *s)
QSize ref(qSizeData(dataIndex(QTest::currentDataTag())));
QSize d21;
*s >> d21;
- QVERIFY(d21 == ref);
+ QCOMPARE(d21, ref);
QSizeF d21f;
*s >> d21f;
- QVERIFY(d21f == QSizeF(ref));
+ QCOMPARE(d21f, QSizeF(ref));
}
// *********************** atEnd ******************************
@@ -2088,7 +2088,7 @@ void tst_QDataStream::setVersion_data()
QDataStream latest;
for (int vers = 1; vers <= latest.version(); ++vers)
- QTest::newRow(qPrintable(QString("v_%1").arg(vers))) << vers;
+ QTest::newRow(("v_" + QByteArray::number(vers)).constData()) << vers;
}
void tst_QDataStream::setVersion()
@@ -2112,13 +2112,13 @@ void tst_QDataStream::setVersion()
QDataStream in(&ba1, QIODevice::ReadOnly);
in.setVersion(vers);
in >> keyseq1 >> keyseq2 >> deadbeef;
- QVERIFY(keyseq1 == QKeySequence(Qt::Key_A));
+ QCOMPARE(keyseq1, QKeySequence(Qt::Key_A));
if (vers >= 5) {
QVERIFY(keyseq2 == QKeySequence(Qt::Key_B, Qt::Key_C));
} else {
- QVERIFY(keyseq2 == QKeySequence(Qt::Key_B));
+ QCOMPARE(keyseq2, QKeySequence(Qt::Key_B));
}
- QVERIFY(deadbeef == 0xDEADBEEF);
+ QCOMPARE(deadbeef, 0xDEADBEEF);
}
/*
@@ -2127,7 +2127,7 @@ void tst_QDataStream::setVersion()
// revise the test if new color roles or color groups are added
QVERIFY(QPalette::NColorRoles == QPalette::ToolTipText + 1);
- QVERIFY(QPalette::NColorGroups == 3);
+ QCOMPARE(int(QPalette::NColorGroups), 3);
QByteArray ba2;
QPalette pal1, pal2;
@@ -2192,8 +2192,8 @@ void tst_QDataStream::setVersion()
}
}
}
- QVERIFY(pal1 == inPal1);
- QVERIFY(pal2 == inPal2);
+ QCOMPARE(pal1, inPal1);
+ QCOMPARE(pal2, inPal2);
}
}
}
@@ -2749,26 +2749,44 @@ void tst_QDataStream::status_QBitArray()
QCOMPARE(str, expectedString);
}
-#define MAP_TEST(byteArray, expectedStatus, expectedHash) \
- { \
- QByteArray ba = byteArray; \
- QDataStream stream(&ba, QIODevice::ReadOnly); \
- stream >> hash; \
- QCOMPARE((int)stream.status(), (int)expectedStatus); \
- QCOMPARE(hash.size(), expectedHash.size()); \
- QCOMPARE(hash, expectedHash); \
- } \
- { \
- QByteArray ba = byteArray; \
- StringMap expectedMap; \
- StringHash::const_iterator it = expectedHash.constBegin(); \
- for (; it != expectedHash.constEnd(); ++it) \
- expectedMap.insert(it.key(), it.value()); \
- QDataStream stream(&ba, QIODevice::ReadOnly); \
- stream >> map; \
- QCOMPARE((int)stream.status(), (int)expectedStatus); \
- QCOMPARE(map.size(), expectedMap.size()); \
- QCOMPARE(map, expectedMap); \
+#define MAP_TEST(byteArray, initialStatus, expectedStatus, expectedHash) \
+ for (bool inTransaction = false;; inTransaction = true) { \
+ { \
+ QByteArray ba = byteArray; \
+ QDataStream stream(&ba, QIODevice::ReadOnly); \
+ if (inTransaction) \
+ stream.startTransaction(); \
+ stream.setStatus(initialStatus); \
+ stream >> hash; \
+ QCOMPARE((int)stream.status(), (int)expectedStatus); \
+ if (!inTransaction || stream.commitTransaction()) { \
+ QCOMPARE(hash.size(), expectedHash.size()); \
+ QCOMPARE(hash, expectedHash); \
+ } else { \
+ QVERIFY(hash.isEmpty()); \
+ } \
+ } \
+ { \
+ QByteArray ba = byteArray; \
+ StringMap expectedMap; \
+ StringHash::const_iterator it = expectedHash.constBegin(); \
+ for (; it != expectedHash.constEnd(); ++it) \
+ expectedMap.insert(it.key(), it.value()); \
+ QDataStream stream(&ba, QIODevice::ReadOnly); \
+ if (inTransaction) \
+ stream.startTransaction(); \
+ stream.setStatus(initialStatus); \
+ stream >> map; \
+ QCOMPARE((int)stream.status(), (int)expectedStatus); \
+ if (!inTransaction || stream.commitTransaction()) { \
+ QCOMPARE(map.size(), expectedMap.size()); \
+ QCOMPARE(map, expectedMap); \
+ } else { \
+ QVERIFY(map.isEmpty()); \
+ } \
+ } \
+ if (inTransaction) \
+ break; \
}
void tst_QDataStream::status_QHash_QMap()
@@ -2786,57 +2804,87 @@ void tst_QDataStream::status_QHash_QMap()
hash2.insert("L", "MN");
// ok
- MAP_TEST(QByteArray("\x00\x00\x00\x00", 4), QDataStream::Ok, StringHash());
- MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", 12), QDataStream::Ok, hash1);
+ MAP_TEST(QByteArray("\x00\x00\x00\x00", 4), QDataStream::Ok, QDataStream::Ok, StringHash());
+ MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", 12), QDataStream::Ok, QDataStream::Ok, hash1);
MAP_TEST(QByteArray("\x00\x00\x00\x02\x00\x00\x00\x02\x00J\x00\x00\x00\x02\x00K"
- "\x00\x00\x00\x02\x00L\x00\x00\x00\x04\x00M\x00N", 30), QDataStream::Ok, hash2);
+ "\x00\x00\x00\x02\x00L\x00\x00\x00\x04\x00M\x00N", 30), QDataStream::Ok, QDataStream::Ok, hash2);
// past end
- MAP_TEST(QByteArray(), QDataStream::ReadPastEnd, StringHash());
- MAP_TEST(QByteArray("\x00", 1), QDataStream::ReadPastEnd, StringHash());
- MAP_TEST(QByteArray("\x00\x00", 2), QDataStream::ReadPastEnd, StringHash());
- MAP_TEST(QByteArray("\x00\x00\x00", 3), QDataStream::ReadPastEnd, StringHash());
- MAP_TEST(QByteArray("\x00\x00\x00\x01", 4), QDataStream::ReadPastEnd, StringHash());
+ MAP_TEST(QByteArray(), QDataStream::Ok, QDataStream::ReadPastEnd, StringHash());
+ MAP_TEST(QByteArray("\x00", 1), QDataStream::Ok, QDataStream::ReadPastEnd, StringHash());
+ MAP_TEST(QByteArray("\x00\x00", 2), QDataStream::Ok, QDataStream::ReadPastEnd, StringHash());
+ MAP_TEST(QByteArray("\x00\x00\x00", 3), QDataStream::Ok, QDataStream::ReadPastEnd, StringHash());
+ MAP_TEST(QByteArray("\x00\x00\x00\x01", 4), QDataStream::Ok, QDataStream::ReadPastEnd, StringHash());
for (int i = 4; i < 12; ++i) {
- MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", i), QDataStream::ReadPastEnd, StringHash());
+ MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", i), QDataStream::Ok, QDataStream::ReadPastEnd, StringHash());
}
// corrupt data
- MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x01", 8), QDataStream::ReadCorruptData, StringHash());
+ MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x01", 8), QDataStream::Ok, QDataStream::ReadCorruptData, StringHash());
MAP_TEST(QByteArray("\x00\x00\x00\x02\x00\x00\x00\x01\x00J\x00\x00\x00\x01\x00K"
- "\x00\x00\x00\x01\x00L\x00\x00\x00\x02\x00M\x00N", 30), QDataStream::ReadCorruptData, StringHash());
+ "\x00\x00\x00\x01\x00L\x00\x00\x00\x02\x00M\x00N", 30), QDataStream::Ok, QDataStream::ReadCorruptData, StringHash());
+
+ // test the previously latched error status is not affected by reading
+ MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", 12), QDataStream::ReadPastEnd, QDataStream::ReadPastEnd, hash1);
+ MAP_TEST(QByteArray("\x00\x00\x00\x01", 4), QDataStream::ReadCorruptData, QDataStream::ReadCorruptData, StringHash());
+ MAP_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x01", 8), QDataStream::ReadPastEnd, QDataStream::ReadPastEnd, StringHash());
}
-#define LIST_TEST(byteArray, expectedStatus, expectedList) \
- { \
- QByteArray ba = byteArray; \
- QDataStream stream(&ba, QIODevice::ReadOnly); \
- stream >> list; \
- QCOMPARE((int)stream.status(), (int)expectedStatus); \
- QCOMPARE(list.size(), expectedList.size()); \
- QCOMPARE(list, expectedList); \
- } \
- { \
- LinkedList expectedLinkedList; \
- for (int i = 0; i < expectedList.count(); ++i) \
- expectedLinkedList << expectedList.at(i); \
- QByteArray ba = byteArray; \
- QDataStream stream(&ba, QIODevice::ReadOnly); \
- stream >> linkedList; \
- QCOMPARE((int)stream.status(), (int)expectedStatus); \
- QCOMPARE(linkedList.size(), expectedLinkedList.size()); \
- QCOMPARE(linkedList, expectedLinkedList); \
- } \
- { \
- Vector expectedVector; \
- for (int i = 0; i < expectedList.count(); ++i) \
- expectedVector << expectedList.at(i); \
- QByteArray ba = byteArray; \
- QDataStream stream(&ba, QIODevice::ReadOnly); \
- stream >> vector; \
- QCOMPARE((int)stream.status(), (int)expectedStatus); \
- QCOMPARE(vector.size(), expectedVector.size()); \
- QCOMPARE(vector, expectedVector); \
+#define LIST_TEST(byteArray, initialStatus, expectedStatus, expectedList) \
+ for (bool inTransaction = false;; inTransaction = true) { \
+ { \
+ QByteArray ba = byteArray; \
+ QDataStream stream(&ba, QIODevice::ReadOnly); \
+ if (inTransaction) \
+ stream.startTransaction(); \
+ stream.setStatus(initialStatus); \
+ stream >> list; \
+ QCOMPARE((int)stream.status(), (int)expectedStatus); \
+ if (!inTransaction || stream.commitTransaction()) { \
+ QCOMPARE(list.size(), expectedList.size()); \
+ QCOMPARE(list, expectedList); \
+ } else { \
+ QVERIFY(list.isEmpty()); \
+ } \
+ } \
+ { \
+ 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); \
+ QByteArray ba = byteArray; \
+ QDataStream stream(&ba, QIODevice::ReadOnly); \
+ if (inTransaction) \
+ stream.startTransaction(); \
+ stream.setStatus(initialStatus); \
+ stream >> vector; \
+ QCOMPARE((int)stream.status(), (int)expectedStatus); \
+ if (!inTransaction || stream.commitTransaction()) { \
+ QCOMPARE(vector.size(), expectedVector.size()); \
+ QCOMPARE(vector, expectedVector); \
+ } else { \
+ QVERIFY(vector.isEmpty()); \
+ } \
+ } \
+ if (inTransaction) \
+ break; \
}
void tst_QDataStream::status_QLinkedList_QList_QVector()
@@ -2848,8 +2896,49 @@ void tst_QDataStream::status_QLinkedList_QList_QVector()
List list;
Vector vector;
- LIST_TEST(QByteArray(), QDataStream::ReadPastEnd, List());
- LIST_TEST(QByteArray("\x00\x00\x00\x00", 4), QDataStream::Ok, List());
+ // ok
+ {
+ List listWithEmptyString;
+ listWithEmptyString.append("");
+
+ List someList;
+ someList.append("J");
+ someList.append("MN");
+
+ LIST_TEST(QByteArray("\x00\x00\x00\x00", 4), QDataStream::Ok, QDataStream::Ok, List());
+ LIST_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00", 8), QDataStream::Ok, QDataStream::Ok, listWithEmptyString);
+ LIST_TEST(QByteArray("\x00\x00\x00\x02\x00\x00\x00\x02\x00J"
+ "\x00\x00\x00\x04\x00M\x00N", 18), QDataStream::Ok, QDataStream::Ok, someList);
+ }
+
+ // past end
+ {
+ LIST_TEST(QByteArray(), QDataStream::Ok, QDataStream::ReadPastEnd, List());
+ LIST_TEST(QByteArray("\x00", 1), QDataStream::Ok, QDataStream::ReadPastEnd, List());
+ LIST_TEST(QByteArray("\x00\x00", 2), QDataStream::Ok, QDataStream::ReadPastEnd, List());
+ LIST_TEST(QByteArray("\x00\x00\x00", 3), QDataStream::Ok, QDataStream::ReadPastEnd, List());
+ LIST_TEST(QByteArray("\x00\x00\x00\x01", 4), QDataStream::Ok, QDataStream::ReadPastEnd, List());
+ for (int i = 4; i < 12; ++i) {
+ LIST_TEST(QByteArray("\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", i), QDataStream::Ok, QDataStream::ReadPastEnd, List());
+ }
+ }
+
+ // corrupt data
+ {
+ LIST_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x01", 8), QDataStream::Ok, QDataStream::ReadCorruptData, List());
+ LIST_TEST(QByteArray("\x00\x00\x00\x02\x00\x00\x00\x01\x00J"
+ "\x00\x00\x00\x02\x00M\x00N", 18), QDataStream::Ok, QDataStream::ReadCorruptData, List());
+ }
+
+ // test the previously latched error status is not affected by reading
+ {
+ List listWithEmptyString;
+ listWithEmptyString.append("");
+
+ LIST_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x00", 8), QDataStream::ReadPastEnd, QDataStream::ReadPastEnd, listWithEmptyString);
+ LIST_TEST(QByteArray("\x00\x00\x00\x01", 4), QDataStream::ReadCorruptData, QDataStream::ReadCorruptData, List());
+ LIST_TEST(QByteArray("\x00\x00\x00\x01\x00\x00\x00\x01", 8), QDataStream::ReadPastEnd, QDataStream::ReadPastEnd, List());
+ }
}
void tst_QDataStream::streamToAndFromQByteArray()
@@ -3078,9 +3167,9 @@ void tst_QDataStream::compatibility_Qt3()
in >> in_palette;
in >> in_brush;
}
- QVERIFY(in_brush.style() == Qt::NoBrush);
- QVERIFY(in_palette.brush(QPalette::Button).style() == Qt::NoBrush);
- QVERIFY(in_palette.color(QPalette::Light) == Qt::green);
+ QCOMPARE(in_brush.style(), Qt::NoBrush);
+ QCOMPARE(in_palette.brush(QPalette::Button).style(), Qt::NoBrush);
+ QCOMPARE(in_palette.color(QPalette::Light), QColor(Qt::green));
}
// QTime() was serialized to (0, 0, 0, 0) in Qt3, not (0xFF, 0xFF, 0xFF, 0xFF)
// This is because in Qt3 a null time was valid, and there was no support for deserializing a value of -1.
@@ -3134,9 +3223,9 @@ void tst_QDataStream::compatibility_Qt2()
in >> in_palette;
in >> in_brush;
}
- QVERIFY(in_brush.style() == Qt::NoBrush);
- QVERIFY(in_palette.brush(QPalette::Button).style() == Qt::NoBrush);
- QVERIFY(in_palette.color(QPalette::Light) == Qt::green);
+ QCOMPARE(in_brush.style(), Qt::NoBrush);
+ QCOMPARE(in_palette.brush(QPalette::Button).style(), Qt::NoBrush);
+ QCOMPARE(in_palette.color(QPalette::Light), QColor(Qt::green));
}
void tst_QDataStream::floatingPointNaN()
@@ -3230,6 +3319,165 @@ void tst_QDataStream::floatingPointPrecision()
}
+void tst_QDataStream::transaction_data()
+{
+ QTest::addColumn<qint8>("i8Data");
+ QTest::addColumn<qint16>("i16Data");
+ QTest::addColumn<qint32>("i32Data");
+ QTest::addColumn<qint64>("i64Data");
+ QTest::addColumn<bool>("bData");
+ QTest::addColumn<float>("fData");
+ QTest::addColumn<double>("dData");
+ QTest::addColumn<QByteArray>("strData");
+ QTest::addColumn<QByteArray>("rawData");
+
+ QTest::newRow("1") << qint8(1) << qint16(2) << qint32(3) << qint64(4) << true << 5.0f
+ << double(6.0) << QByteArray("Hello world!") << QByteArray("Qt rocks!");
+ QTest::newRow("2") << qint8(1 << 6) << qint16(1 << 14) << qint32(1 << 30) << qint64Data(3) << false << 123.0f
+ << double(234.0) << stringData(5).toUtf8() << stringData(6).toUtf8();
+ QTest::newRow("3") << qint8(-1) << qint16(-2) << qint32(-3) << qint64(-4) << true << -123.0f
+ << double(-234.0) << stringData(3).toUtf8() << stringData(4).toUtf8();
+}
+
+void tst_QDataStream::transaction()
+{
+ QByteArray testBuffer;
+
+ QFETCH(qint8, i8Data);
+ QFETCH(qint16, i16Data);
+ QFETCH(qint32, i32Data);
+ QFETCH(qint64, i64Data);
+ QFETCH(bool, bData);
+ QFETCH(float, fData);
+ QFETCH(double, dData);
+ QFETCH(QByteArray, strData);
+ QFETCH(QByteArray, rawData);
+
+ {
+ QDataStream stream(&testBuffer, QIODevice::WriteOnly);
+
+ stream << i8Data << i16Data << i32Data << i64Data
+ << bData << fData << dData << strData.constData();
+ stream.writeRawData(rawData.constData(), rawData.size());
+ }
+
+ for (int splitPos = 0; splitPos <= testBuffer.size(); ++splitPos) {
+ QByteArray readBuffer(testBuffer.left(splitPos));
+ SequentialBuffer dev(&readBuffer);
+ dev.open(QIODevice::ReadOnly);
+ QDataStream stream(&dev);
+
+ qint8 i8;
+ qint16 i16;
+ qint32 i32;
+ qint64 i64;
+ bool b;
+ float f;
+ double d;
+ char *str;
+ QByteArray raw(rawData.size(), 0);
+
+ forever {
+ stream.startTransaction();
+ stream >> i8 >> i16 >> i32 >> i64 >> b >> f >> d >> str;
+ stream.readRawData(raw.data(), raw.size());
+
+ if (stream.commitTransaction())
+ break;
+
+ QVERIFY(stream.status() == QDataStream::ReadPastEnd);
+ QVERIFY(splitPos == 0 || !stream.atEnd());
+ QVERIFY(readBuffer.size() < testBuffer.size());
+ delete [] str;
+ raw.fill(0);
+ readBuffer.append(testBuffer.right(testBuffer.size() - splitPos));
+ }
+
+ QVERIFY(stream.atEnd());
+ QCOMPARE(i8, i8Data);
+ QCOMPARE(i16, i16Data);
+ QCOMPARE(i32, i32Data);
+ QCOMPARE(i64, i64Data);
+ QCOMPARE(b, bData);
+ QCOMPARE(f, fData);
+ QCOMPARE(d, dData);
+ QVERIFY(strData == str);
+ delete [] str;
+ QCOMPARE(raw, rawData);
+ }
+}
+
+void tst_QDataStream::nestedTransactionsResult_data()
+{
+ QTest::addColumn<bool>("commitFirst");
+ QTest::addColumn<bool>("rollbackFirst");
+ QTest::addColumn<bool>("commitSecond");
+ QTest::addColumn<bool>("rollbackSecond");
+ QTest::addColumn<bool>("successExpected");
+ QTest::addColumn<bool>("expectedAtEnd");
+ QTest::addColumn<int>("expectedStatus");
+
+ QTest::newRow("1") << false << false << false << false
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("2") << false << false << false << true
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("3") << false << false << true << false
+ << false << true << int(QDataStream::ReadCorruptData);
+
+ QTest::newRow("4") << false << true << false << false
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("5") << false << true << false << true
+ << false << false << int(QDataStream::ReadPastEnd);
+ QTest::newRow("6") << false << true << true << false
+ << false << false << int(QDataStream::ReadPastEnd);
+
+ QTest::newRow("7") << true << false << false << false
+ << false << true << int(QDataStream::ReadCorruptData);
+ QTest::newRow("8") << true << false << false << true
+ << false << false << int(QDataStream::ReadPastEnd);
+ QTest::newRow("9") << true << false << true << false
+ << true << true << int(QDataStream::Ok);
+}
+
+void tst_QDataStream::nestedTransactionsResult()
+{
+ QByteArray testBuffer(1, 0);
+ QDataStream stream(&testBuffer, QIODevice::ReadOnly);
+ uchar c;
+
+ QFETCH(bool, commitFirst);
+ QFETCH(bool, rollbackFirst);
+ QFETCH(bool, commitSecond);
+ QFETCH(bool, rollbackSecond);
+ QFETCH(bool, successExpected);
+ QFETCH(bool, expectedAtEnd);
+ QFETCH(int, expectedStatus);
+
+ stream.startTransaction();
+ stream.startTransaction();
+ stream >> c;
+
+ if (commitFirst)
+ QVERIFY(stream.commitTransaction());
+ else if (rollbackFirst)
+ stream.rollbackTransaction();
+ else
+ stream.abortTransaction();
+
+ stream.startTransaction();
+
+ if (commitSecond)
+ QCOMPARE(stream.commitTransaction(), commitFirst);
+ else if (rollbackSecond)
+ stream.rollbackTransaction();
+ else
+ stream.abortTransaction();
+
+ QCOMPARE(stream.commitTransaction(), successExpected);
+ QCOMPARE(stream.atEnd(), expectedAtEnd);
+ QCOMPARE(int(stream.status()), expectedStatus);
+}
+
QTEST_MAIN(tst_QDataStream)
#include "tst_qdatastream.moc"
diff --git a/tests/auto/corelib/io/qdataurl/qdataurl.pro b/tests/auto/corelib/io/qdataurl/qdataurl.pro
index d21fc4ed15..7085c9d881 100644
--- a/tests/auto/corelib/io/qdataurl/qdataurl.pro
+++ b/tests/auto/corelib/io/qdataurl/qdataurl.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qdataurl
QT = core core-private testlib
SOURCES = tst_qdataurl.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp b/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp
index 6648550dda..66720d28e0 100644
--- a/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp
+++ b/tests/auto/corelib/io/qdataurl/tst_qdataurl.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qdebug/qdebug.pro b/tests/auto/corelib/io/qdebug/qdebug.pro
index 5e902bb105..45c0aa4061 100644
--- a/tests/auto/corelib/io/qdebug/qdebug.pro
+++ b/tests/auto/corelib/io/qdebug/qdebug.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qdebug
QT = core testlib concurrent
SOURCES = tst_qdebug.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index 0c04c5058b..7147405f3b 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro
index 9cbc491800..4870922312 100644
--- a/tests/auto/corelib/io/qdir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/qdir.pro
@@ -8,8 +8,6 @@ TESTDATA += testdir testData searchdir resources entrylist types tst_qdir.cpp
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
index a03f7cef1b..a1d5c2c9ff 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
index a03f7cef1b..a1d5c2c9ff 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 90c5a4d907..48b8db949f 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -228,13 +223,13 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir()
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
: m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
#elif !defined(BUILTIN_TESTDATA)
: m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath())
#endif
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -573,7 +568,7 @@ void tst_QDir::exists_data()
char drive = 'Z';
QString driv;
do {
- driv = QString::fromLatin1("%1:/").arg(drive);
+ driv = drive + QLatin1String(":/");
if (!driveLetters.contains(driv)) break;
--drive;
} while (drive >= 'A');
@@ -638,7 +633,7 @@ void tst_QDir::compare()
dir.makeAbsolute();
QVERIFY(dir == QDir::currentPath());
- QVERIFY(QDir() == QDir(QDir::currentPath()));
+ QCOMPARE(QDir(), QDir(QDir::currentPath()));
QVERIFY(QDir("../") == QDir(QDir::currentPath() + "/.."));
}
@@ -1074,7 +1069,7 @@ void tst_QDir::current()
if (!path.isEmpty()) {
bool b = QDir::setCurrent(path);
// If path is non existent, then setCurrent should be false (currentDir is empty in testData)
- QVERIFY(b == !currentDir.isEmpty());
+ QCOMPARE(b, !currentDir.isEmpty());
}
if (!currentDir.isEmpty()) {
QDir newCurrent = QDir::current();
@@ -1096,7 +1091,7 @@ void tst_QDir::cd_data()
QTest::addColumn<bool>("successExpected");
QTest::addColumn<QString>("newDir");
- int index = m_dataPath.lastIndexOf("/");
+ int index = m_dataPath.lastIndexOf(QLatin1Char('/'));
QTest::newRow("cdUp") << m_dataPath << ".." << true << m_dataPath.left(index==0?1:index);
QTest::newRow("cdUp non existent (relative dir)") << "anonexistingDir" << ".."
<< true << m_dataPath;
@@ -1140,11 +1135,11 @@ void tst_QDir::setNameFilters_data()
QTest::newRow("spaces2") << m_dataPath + "/testdir/spaces" << QStringList("*.bar")
<< QStringList("foo.bar");
QTest::newRow("spaces3") << m_dataPath + "/testdir/spaces" << QStringList("foo.*")
- << QString("foo. bar,foo.bar").split(",");
- QTest::newRow("files1") << m_dataPath + "/testdir/dir" << QString("*r.cpp *.pro").split(" ")
- << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(",");
+ << QString("foo. bar,foo.bar").split(QLatin1Char(','));
+ QTest::newRow("files1") << m_dataPath + "/testdir/dir" << QString("*r.cpp *.pro").split(QLatin1Char(' '))
+ << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(QLatin1Char(','));
QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data")
- << QString("file1.data,file2.data,file3.data").split(',');
+ << QString("file1.data,file2.data,file3.data").split(QLatin1Char(','));
}
void tst_QDir::setNameFilters()
@@ -1719,7 +1714,7 @@ void tst_QDir::searchPaths()
QDir::setSearchPaths(searchPathPrefixList.at(i), searchPathsList.at(i).split(","));
}
for (int i = 0; i < searchPathPrefixList.count(); ++i) {
- QVERIFY(QDir::searchPaths(searchPathPrefixList.at(i)) == searchPathsList.at(i).split(","));
+ QCOMPARE(QDir::searchPaths(searchPathPrefixList.at(i)), searchPathsList.at(i).split(","));
}
QCOMPARE(QFile(filename).exists(), exists);
@@ -1742,7 +1737,7 @@ void tst_QDir::searchPaths()
}
}
for (int i = 0; i < searchPathPrefixList.count(); ++i) {
- QVERIFY(QDir::searchPaths(searchPathPrefixList.at(i)) == searchPathsList.at(i).split(","));
+ QCOMPARE(QDir::searchPaths(searchPathPrefixList.at(i)), searchPathsList.at(i).split(","));
}
QCOMPARE(QFile(filename).exists(), exists);
@@ -2146,7 +2141,7 @@ void tst_QDir::equalityOperator_data()
QString pathinroot(QDir::rootPath() + QLatin1String("assets/.."));
#elif defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/..");
diff --git a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
index ade9b66afe..5404e9058f 100644
--- a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
@@ -8,4 +8,3 @@ TESTDATA += entrylist
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
wince*mips*|wincewm50smart-msvc200*: DEFINES += WINCE_BROKEN_ITERATE=1
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 554771f4d2..0fbce74055 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -123,7 +118,7 @@ private:
void tst_QDirIterator::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@@ -551,7 +546,7 @@ void tst_QDirIterator::recurseWithFilters() const
QVERIFY(it.hasNext());
it.next();
actualEntries.insert(it.fileInfo().filePath());
- QVERIFY(actualEntries == expectedEntries);
+ QCOMPARE(actualEntries, expectedEntries);
QVERIFY(!it.hasNext());
}
diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro
index e2c714c67f..10c8d918f7 100644
--- a/tests/auto/corelib/io/qfile/qfile.pro
+++ b/tests/auto/corelib/io/qfile/qfile.pro
@@ -5,4 +5,3 @@ wince* {
SUBDIRS = test stdinprocess
}
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
index abf20a0454..6ff42c2485 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
+++ b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro b/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro
index 51badce898..8e463e4cef 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro
+++ b/tests/auto/corelib/io/qfile/stdinprocess/stdinprocess.pro
@@ -6,4 +6,3 @@ CONFIG += console
# This app is testdata for tst_qfile
target.path = $$[QT_INSTALL_TESTS]/tst_qfile/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index 9aa4119795..c9ba96cc1b 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle debug_and_release_target
QT = core-private core testlib
qtHaveModule(network): QT += network
@@ -17,4 +16,3 @@ TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \
../resources/file1.ext1
win32:!winrt: LIBS+=-lole32 -luuid
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index b26db788de..7752930ae4 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -853,7 +849,7 @@ void tst_QFile::readAll()
QByteArray a = file.readAll();
file.reset();
- QVERIFY(file.pos() == 0);
+ QCOMPARE(file.pos(), 0);
QVERIFY(file.bytesAvailable() > 7);
QByteArray b = file.read(1);
@@ -1199,7 +1195,7 @@ void tst_QFile::append()
f.close();
QVERIFY2(f.open(QIODevice::Append), msgOpenFailed(f).constData());
- QVERIFY(f.pos() == 1);
+ QCOMPARE(f.pos(), 1);
f.putChar('a');
f.close();
QCOMPARE(int(f.size()), 2);
@@ -2051,7 +2047,7 @@ void tst_QFile::longFileName()
QString line = ts.readLine();
QCOMPARE(line, fileName);
}
- QString newName = fileName + QLatin1String("1");
+ QString newName = fileName + QLatin1Char('1');
{
QVERIFY(QFile::copy(fileName, newName));
QFile file(newName);
@@ -2228,7 +2224,7 @@ void tst_QFile::removeOpenFile()
QVERIFY(removed);
QVERIFY(!f.isOpen());
QVERIFY(!f.exists());
- QVERIFY(f.error() == QFile::NoError);
+ QCOMPARE(f.error(), QFile::NoError);
}
{
@@ -2255,7 +2251,7 @@ void tst_QFile::removeOpenFile()
QVERIFY(removed);
QVERIFY(!f.isOpen());
QVERIFY(!f.exists());
- QVERIFY(f.error() == QFile::NoError);
+ QCOMPARE(f.error(), QFile::NoError);
}
}
@@ -2823,13 +2819,13 @@ void tst_QFile::readEof()
char buf[10];
int ret = file.read(buf, sizeof buf);
QCOMPARE(ret, 0);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.read(buf, sizeof buf);
QCOMPARE(ret, 0);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2844,13 +2840,13 @@ void tst_QFile::readEof()
QByteArray ret = file.read(10);
QVERIFY(ret.isEmpty());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.read(10);
QVERIFY(ret.isEmpty());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2866,13 +2862,13 @@ void tst_QFile::readEof()
char buf[10];
int ret = file.readLine(buf, sizeof buf);
QCOMPARE(ret, -1);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.readLine(buf, sizeof buf);
QCOMPARE(ret, -1);
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2887,13 +2883,13 @@ void tst_QFile::readEof()
QByteArray ret = file.readLine();
QVERIFY(ret.isNull());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
ret = file.readLine();
QVERIFY(ret.isNull());
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
@@ -2908,12 +2904,12 @@ void tst_QFile::readEof()
char c;
QVERIFY(!file.getChar(&c));
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
// Do it again to ensure that we get the same result
QVERIFY(!file.getChar(&c));
- QVERIFY(file.error() == QFile::NoError);
+ QCOMPARE(file.error(), QFile::NoError);
QVERIFY(file.atEnd());
}
}
@@ -3001,7 +2997,7 @@ void tst_QFile::map()
memory = file.map(offset, size);
QCOMPARE(file.error(), QFile::NoError);
QVERIFY(memory);
- QVERIFY(memory[0] == 'Q');
+ QCOMPARE(memory[0], uchar('Q'));
QVERIFY(file.unmap(memory));
QCOMPARE(file.error(), QFile::NoError);
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index de99447404..48673b20a9 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -6,4 +6,3 @@ RESOURCES += qfileinfo.qrc \
testdata.qrc
win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 10921ea0a3..485b24dc62 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -1117,7 +1112,7 @@ void tst_QFileInfo::consistent()
QFileInfo fi(file);
QCOMPARE(fi.filePath(), expected);
- QCOMPARE(fi.dir().path() + "/" + fi.fileName(), expected);
+ QCOMPARE(fi.dir().path() + QLatin1Char('/') + fi.fileName(), expected);
}
@@ -1217,7 +1212,7 @@ void tst_QFileInfo::fileTimes()
QEXPECT_FAIL("", "WinRT does not allow timestamp handling change in the filesystem due to sandboxing", Continue);
#elif defined(Q_OS_QNX)
QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue);
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
if (fileInfo.lastRead() <= beforeRead)
QEXPECT_FAIL("", "Android may use relatime or noatime on mounts", Continue);
#endif
@@ -1451,7 +1446,7 @@ void tst_QFileInfo::refresh()
QCOMPARE(file.write("JOJOJO"), qint64(6));
file.flush();
- QVERIFY(info.lastModified() == lastModified);
+ QCOMPARE(info.lastModified(), lastModified);
QCOMPARE(info.size(), qint64(7));
#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
@@ -1672,7 +1667,7 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
appPath += "/libtst_qfileinfo.so";
#else
appPath += "/tst_qfileinfo";
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test b/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test2 b/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test2
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/auto/corelib/io/qfileselector/platforms/+blackberry/test2
+++ /dev/null
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.pro b/tests/auto/corelib/io/qfileselector/qfileselector.pro
index ded3d6502e..edcc91e8ed 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.pro
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.pro
@@ -1,4 +1,3 @@
-CONFIG += parallel_test
CONFIG += testcase
TARGET = tst_qfileselectors
QT = core-private testlib
diff --git a/tests/auto/corelib/io/qfileselector/qfileselector.qrc b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
index 37bd397c9d..ab7a4d7f23 100644
--- a/tests/auto/corelib/io/qfileselector/qfileselector.qrc
+++ b/tests/auto/corelib/io/qfileselector/qfileselector.qrc
@@ -14,7 +14,6 @@
<!-- platforms/test: deepest possible selection -->
<file>platforms/test</file>
<file>platforms/+unix/+android/test</file>
- <file>platforms/+unix/+blackberry/test</file>
<file>platforms/+unix/+darwin/+mac/+ios/test</file>
<file>platforms/+unix/+darwin/+mac/+osx/test</file>
<file>platforms/+unix/+darwin/+mac/test</file>
@@ -27,7 +26,6 @@
<file>platforms/+windows/+winrt/test</file>
<file>platforms/+windows/test</file>
<file>platforms/+android/test</file>
- <file>platforms/+blackberry/test</file>
<file>platforms/+ios/test</file>
<file>platforms/+osx/test</file>
<file>platforms/+darwin/test</file>
@@ -40,7 +38,6 @@
<!-- platforms/test2: shallow selection for the deepest selector -->
<file>platforms/test2</file>
<file>platforms/+android/test2</file>
- <file>platforms/+blackberry/test2</file>
<file>platforms/+ios/test2</file>
<file>platforms/+osx/test2</file>
<file>platforms/+haiku/test2</file>
diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
index 112aca224c..e5ede1ad06 100644
--- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
+++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -60,6 +55,8 @@ private slots:
void urlConvenience_data();
void urlConvenience();
+
+ void addStatics();
};
void tst_QFileSelector::basicTest_data()
@@ -88,7 +85,7 @@ void tst_QFileSelector::basicTest_data()
QString expectedPlatform1File(":/platforms");
QString expectedPlatform2File(""); //Only the last selector
QString expectedPlatform3File; // Only the first selector (the family)
-#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && \
+#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && \
!defined(Q_OS_DARWIN) && !defined(Q_OS_LINUX) && !defined(Q_OS_HAIKU)
/* We are only aware of specific unixes, and do not have test files for any of the others.
However those unixes can get a selector added from the result of a uname call, so this will
@@ -229,5 +226,14 @@ void tst_QFileSelector::urlConvenience()
QCOMPARE(fs.select(testUrl), expectedUrl);
}
+void tst_QFileSelector::addStatics()
+{
+ QFileSelector fs;
+ QCOMPARE(fs.select(QStringLiteral(":/extras/test")), QStringLiteral(":/extras/test"));
+
+ QFileSelectorPrivate::addStatics(QStringList() << QStringLiteral("custom1"));
+ QCOMPARE(fs.select(QStringLiteral(":/extras/test")), QStringLiteral(":/extras/+custom1/test"));
+}
+
QTEST_MAIN(tst_QFileSelector)
#include "tst_qfileselector.moc"
diff --git a/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro b/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
index 99d3af1848..474836fba2 100644
--- a/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
+++ b/tests/auto/corelib/io/qfilesystementry/qfilesystementry.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfilesystementry
QT = core-private testlib
SOURCES = tst_qfilesystementry.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qfilesystementry.cpp
HEADERS = $$QT_SOURCE_TREE/src/corelib/io/qfilesystementry_p.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
index 049f7ef764..aed4895a47 100644
--- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
+++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
index 1faa089c6e..46dd70289b 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
+++ b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfilesystemwatcher
QT = core testlib
SOURCES = tst_qfilesystemwatcher.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 4ede1e69f3..97b5e74bc2 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -94,7 +89,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#endif // QT_NO_FILESYSTEMWATCHER
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}
@@ -733,9 +728,10 @@ void tst_QFileSystemWatcher::signalsEmittedAfterFileMoved()
QString movePath = testDir.filePath("movehere");
for (int i = 0; i < fileCount; ++i) {
- QFile f(testDir.filePath(QString("test%1.txt").arg(i)));
+ const QByteArray iB = QByteArray::number(i);
+ QFile f(testDir.filePath(QLatin1String("test") + QString::fromLatin1(iB) + QLatin1String(".txt")));
QVERIFY(f.open(QIODevice::WriteOnly));
- f.write(QByteArray("i am ") + QByteArray::number(i));
+ f.write(QByteArray("i am ") + iB);
f.close();
}
diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro
index 9fd70fb177..945022a289 100644
--- a/tests/auto/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro
@@ -5,9 +5,8 @@ SOURCES = tst_qiodevice.cpp
TESTDATA += tst_qiodevice.cpp
MOC_DIR=tmp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android:!android-no-sdk: {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index 0fdddd1180..30eaa5aab9 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -58,10 +53,12 @@ private slots:
void readLine2_data();
void readLine2();
- void peekBug();
void readAllKeepPosition();
void writeInTextMode();
+ void transaction_data();
+ void transaction();
+
private:
QSharedPointer<QTemporaryDir> m_tempDir;
QString m_previousCurrent;
@@ -69,7 +66,7 @@ private:
void tst_QIODevice::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif
@@ -117,6 +114,8 @@ void tst_QIODevice::constructing_QTcpSocket()
socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected(30000));
QVERIFY(device->isOpen());
+ QCOMPARE(device->readChannelCount(), 1);
+ QCOMPARE(device->writeChannelCount(), 1);
while (!device->canReadLine())
QVERIFY(device->waitForReadyRead(30000));
@@ -128,6 +127,8 @@ void tst_QIODevice::constructing_QTcpSocket()
QCOMPARE(socket.pos(), qlonglong(0));
socket.close();
+ QCOMPARE(socket.readChannelCount(), 0);
+ QCOMPARE(socket.writeChannelCount(), 0);
socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected(30000));
QVERIFY(device->isOpen());
@@ -161,6 +162,8 @@ void tst_QIODevice::constructing_QFile()
QVERIFY(file.open(QFile::ReadOnly));
QVERIFY(device->isOpen());
QCOMPARE((int) device->openMode(), (int) QFile::ReadOnly);
+ QCOMPARE(device->readChannelCount(), 1);
+ QCOMPARE(device->writeChannelCount(), 0);
char buf[1024];
memset(buf, 0, sizeof(buf));
@@ -541,77 +544,23 @@ void tst_QIODevice::readLine2()
}
}
-
-class PeekBug : public QIODevice {
- Q_OBJECT
-public:
- char alphabet[27];
- qint64 counter;
- PeekBug() : QIODevice(), counter(0) {
- memcpy(alphabet,"abcdefghijklmnopqrstuvqxyz",27);
- };
- qint64 readData(char *data, qint64 maxlen) {
- qint64 pos = 0;
- while (pos < maxlen) {
- *(data + pos) = alphabet[counter];
- pos++;
- counter++;
- if (counter == 26)
- counter = 0;
- }
- return maxlen;
- }
- qint64 writeData(const char * /* data */, qint64 /* maxlen */) {
- return -1;
- }
-
-};
-
-// This is a regression test for an old bug where peeking at
-// more than one character failed to put them back.
-void tst_QIODevice::peekBug()
-{
- PeekBug peekBug;
- peekBug.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
-
- char onetwo[2];
- peekBug.peek(onetwo, 2);
- QCOMPARE(onetwo[0], 'a');
- QCOMPARE(onetwo[1], 'b');
-
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'a');
-
- peekBug.peek(onetwo, 2);
- QCOMPARE(onetwo[0], 'b');
- QCOMPARE(onetwo[1], 'c');
-
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'b');
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'c');
- peekBug.read(onetwo, 1);
- QCOMPARE(onetwo[0], 'd');
-
- peekBug.peek(onetwo, 2);
- QCOMPARE(onetwo[0], 'e');
- QCOMPARE(onetwo[1], 'f');
-
-}
-
class SequentialReadBuffer : public QIODevice
{
public:
- SequentialReadBuffer(const char *data) : QIODevice(), buf(data), offset(0) { }
+ SequentialReadBuffer(const char *data)
+ : QIODevice(), buf(new QByteArray(data)), offset(0), ownbuf(true) { }
+ SequentialReadBuffer(QByteArray *byteArray)
+ : QIODevice(), buf(byteArray), offset(0), ownbuf(false) { }
+ virtual ~SequentialReadBuffer() { if (ownbuf) delete buf; }
bool isSequential() const Q_DECL_OVERRIDE { return true; }
- const QByteArray &buffer() const { return buf; }
+ const QByteArray &buffer() const { return *buf; }
protected:
qint64 readData(char *data, qint64 maxSize) Q_DECL_OVERRIDE
{
- maxSize = qMin(maxSize, qint64(buf.size() - offset));
- memcpy(data, buf.constData() + offset, maxSize);
+ maxSize = qMin(maxSize, qint64(buf->size() - offset));
+ memcpy(data, buf->constData() + offset, maxSize);
offset += maxSize;
return maxSize;
}
@@ -621,8 +570,9 @@ protected:
}
private:
- QByteArray buf;
+ QByteArray *buf;
int offset;
+ bool ownbuf;
};
// Test readAll() on position change for sequential device
@@ -632,6 +582,8 @@ void tst_QIODevice::readAllKeepPosition()
buffer.open(QIODevice::ReadOnly);
char c;
+ QCOMPARE(buffer.readChannelCount(), 1);
+ QCOMPARE(buffer.writeChannelCount(), 0);
QVERIFY(buffer.getChar(&c));
QCOMPARE(buffer.pos(), qint64(0));
buffer.ungetChar(c);
@@ -682,5 +634,117 @@ void tst_QIODevice::writeInTextMode()
#endif
}
+void tst_QIODevice::transaction_data()
+{
+ QTest::addColumn<bool>("sequential");
+ QTest::addColumn<qint8>("i8Data");
+ QTest::addColumn<qint16>("i16Data");
+ QTest::addColumn<qint32>("i32Data");
+ QTest::addColumn<qint64>("i64Data");
+ QTest::addColumn<bool>("bData");
+ QTest::addColumn<float>("fData");
+ QTest::addColumn<double>("dData");
+ QTest::addColumn<QByteArray>("strData");
+
+ bool sequential = true;
+ do {
+ QByteArray devName(sequential ? "sequential" : "random-access");
+
+ QTest::newRow(qPrintable(devName + '1')) << sequential << qint8(1) << qint16(2)
+ << qint32(3) << qint64(4) << true
+ << 5.0f << double(6.0)
+ << QByteArray("Hello world!");
+ QTest::newRow(qPrintable(devName + '2')) << sequential << qint8(1 << 6) << qint16(1 << 14)
+ << qint32(1 << 30) << (qint64(1) << 62) << false
+ << 123.0f << double(234.0)
+ << QByteArray("abcdefghijklmnopqrstuvwxyz");
+ QTest::newRow(qPrintable(devName + '3')) << sequential << qint8(-1) << qint16(-2)
+ << qint32(-3) << qint64(-4) << true
+ << -123.0f << double(-234.0)
+ << QByteArray("Qt rocks!");
+ sequential = !sequential;
+ } while (!sequential);
+}
+
+// Test transaction integrity
+void tst_QIODevice::transaction()
+{
+ QByteArray testBuffer;
+
+ QFETCH(bool, sequential);
+ QFETCH(qint8, i8Data);
+ QFETCH(qint16, i16Data);
+ QFETCH(qint32, i32Data);
+ QFETCH(qint64, i64Data);
+ QFETCH(bool, bData);
+ QFETCH(float, fData);
+ QFETCH(double, dData);
+ QFETCH(QByteArray, strData);
+
+ {
+ QDataStream stream(&testBuffer, QIODevice::WriteOnly);
+
+ stream << i8Data << i16Data << i32Data << i64Data
+ << bData << fData << dData << strData.constData();
+ }
+
+ for (int splitPos = 0; splitPos <= testBuffer.size(); ++splitPos) {
+ QByteArray readBuffer(testBuffer.left(splitPos));
+ QIODevice *dev = sequential ? (QIODevice *) new SequentialReadBuffer(&readBuffer)
+ : (QIODevice *) new QBuffer(&readBuffer);
+ dev->open(QIODevice::ReadOnly);
+ QDataStream stream(dev);
+
+ qint8 i8;
+ qint16 i16;
+ qint32 i32;
+ qint64 i64;
+ bool b;
+ float f;
+ double d;
+ char *str;
+
+ forever {
+ QVERIFY(!dev->isTransactionStarted());
+ dev->startTransaction();
+ QVERIFY(dev->isTransactionStarted());
+
+ // Try to read all data in one go. If the status of the data stream
+ // indicates an unsuccessful operation, restart a read transaction
+ // on the completed buffer.
+ stream >> i8 >> i16 >> i32 >> i64 >> b >> f >> d >> str;
+
+ QVERIFY(stream.atEnd());
+ if (stream.status() == QDataStream::Ok) {
+ dev->commitTransaction();
+ break;
+ }
+
+ dev->rollbackTransaction();
+ QVERIFY(splitPos == 0 || !stream.atEnd());
+ QCOMPARE(dev->pos(), Q_INT64_C(0));
+ QCOMPARE(dev->bytesAvailable(), qint64(readBuffer.size()));
+ QVERIFY(readBuffer.size() < testBuffer.size());
+ delete [] str;
+ readBuffer.append(testBuffer.right(testBuffer.size() - splitPos));
+ stream.resetStatus();
+ }
+
+ QVERIFY(!dev->isTransactionStarted());
+ QVERIFY(stream.atEnd());
+ QCOMPARE(i8, i8Data);
+ QCOMPARE(i16, i16Data);
+ QCOMPARE(i32, i32Data);
+ QCOMPARE(i64, i64Data);
+ QCOMPARE(b, bData);
+ QCOMPARE(f, fData);
+ QCOMPARE(d, dData);
+ QVERIFY(strData == str);
+ delete [] str;
+ stream.setDevice(0);
+ delete dev;
+ }
+}
+
QTEST_MAIN(tst_QIODevice)
#include "tst_qiodevice.moc"
diff --git a/tests/auto/corelib/io/qipaddress/qipaddress.pro b/tests/auto/corelib/io/qipaddress/qipaddress.pro
index ff569aa3d5..9c769052ed 100644
--- a/tests/auto/corelib/io/qipaddress/qipaddress.pro
+++ b/tests/auto/corelib/io/qipaddress/qipaddress.pro
@@ -1,5 +1,4 @@
SOURCES += tst_qipaddress.cpp
TARGET = tst_qipaddress
QT = core core-private testlib
-CONFIG += testcase parallel_test
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+CONFIG += testcase
diff --git a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
index 0addd89ebf..ba5e9eaaa1 100644
--- a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
+++ b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
index 87d194ed98..f10c2a7c98 100644
--- a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure+bluesystems@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index 4884c126d4..2e5cfb1053 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure+bluesystems@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -75,7 +70,7 @@ public:
void tst_QLockFile::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("This test requires deploying and running external console applications");
#elif defined(QT_NO_PROCESS)
QSKIP("This test requires QProcess support");
diff --git a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
index 0f2cfd406d..571288675e 100644
--- a/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
+++ b/tests/auto/corelib/io/qloggingcategory/tst_qloggingcategory.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
index f03ac49c5d..287ab30993 100644
--- a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
+++ b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
@@ -7,7 +7,7 @@ QT = core core-private testlib
SOURCES += tst_qloggingregistry.cpp
TESTDATA += qtlogging.ini
-android:!android-no-sdk: {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
index 58b923001e..0a74dc64c0 100644
--- a/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
+++ b/tests/auto/corelib/io/qloggingregistry/tst_qloggingregistry.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qnodebug/qnodebug.pro b/tests/auto/corelib/io/qnodebug/qnodebug.pro
index ff8e09b84b..7e35f92474 100644
--- a/tests/auto/corelib/io/qnodebug/qnodebug.pro
+++ b/tests/auto/corelib/io/qnodebug/qnodebug.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qnodebug
QT = core testlib
SOURCES = tst_qnodebug.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
index 5ece9190a5..b0acb1c58d 100644
--- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
+++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -69,8 +64,9 @@ void tst_QNoDebug::noDebugOutput() const
void tst_QNoDebug::streaming() const
{
QDateTime dt(QDate(1,2,3),QTime(4,5,6));
- const QString debugString = dt.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t"));
- QTest::ignoreMessage(QtWarningMsg, qPrintable(QString::fromLatin1("QDateTime(%1 Qt::TimeSpec(LocalTime))").arg(debugString)));
+ const QByteArray debugString = dt.toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t")).toLatin1();
+ const QByteArray message = "QDateTime(" + debugString + " Qt::TimeSpec(LocalTime))";
+ QTest::ignoreMessage(QtWarningMsg, message.constData());
qWarning() << dt;
}
diff --git a/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro b/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro
index 2f409ebdbc..e46e7e1100 100644
--- a/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro
+++ b/tests/auto/corelib/io/qprocess-noapplication/qprocess-noapplication.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle debug_and_release_target
QT = core testlib
SOURCES = tst_qprocessnoapplication.cpp
diff --git a/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp b/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp
index 3cb7455864..b9702a93cf 100644
--- a/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp
+++ b/tests/auto/corelib/io/qprocess-noapplication/tst_qprocessnoapplication.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
index 55e9b05d1a..947dc916f2 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
@@ -3,4 +3,3 @@ CONFIG += console
CONFIG -= app_bundle
QT = core
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
index 25cb66f9d2..efeadadb93 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/test/test.pro b/tests/auto/corelib/io/qprocess/test/test.pro
index f77dacc87b..96d105a4b4 100644
--- a/tests/auto/corelib/io/qprocess/test/test.pro
+++ b/tests/auto/corelib/io/qprocess/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle debug_and_release_target
QT = core-private testlib network
SOURCES = ../tst_qprocess.cpp
@@ -19,4 +18,3 @@ TEST_HELPER_INSTALLS += \
"../testProcessSpacesArgs/one space" \
"../testProcessSpacesArgs/two space s" \
"../test Space In Name/testSpaceInName"
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testDetached/main.cpp b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
index 760306ea17..702cabe873 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
index 961b28ec7d..8d1fcba624 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
+++ b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
@@ -4,4 +4,3 @@ CONFIG += console
CONFIG -= app_bundle
INSTALLS =
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
index c3cf9f56c7..f681870609 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
index 049454abe2..b08371804f 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
@@ -3,4 +3,3 @@ CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
index a588772460..d76156219e 100644
--- a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
index 1e3c0416e4..98babfacb8 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
index d3439072bb..8778da7ffe 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
@@ -3,4 +3,3 @@ QT += widgets
CONFIG += console
CONFIG -= app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
index ad2288acb2..262db73d72 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
index f7c57abc37..7ccc976efc 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
@@ -3,4 +3,3 @@ CONFIG += console
CONFIG -= qt app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
index fcad82c8d2..eb780fbc3a 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
index 56b4642bed..fbb3411d47 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
@@ -3,4 +3,3 @@ CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
index 3405adb913..4fb2e29c2d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
index 8f77e46f74..98fe78c8b9 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
@@ -4,4 +4,3 @@ CONFIG += console
win32:!mingw:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
index 18c1798af5..19f30de552 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
index 3940ddbf98..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
@@ -2,4 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
index 75c27b822f..ce4494b048 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
index 3940ddbf98..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
@@ -2,4 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
index cf13e55e4f..dfd6e009db 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
index 3940ddbf98..e236e05c7d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
@@ -2,4 +2,3 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
index c82f5cb539..abe957c1ea 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
index 8386c9378c..4de359d83f 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
index 962c1122c1..a07ae00605 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
@@ -6,4 +6,3 @@ DESTDIR = ./
mac {
CONFIG -= app_bundle
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp b/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp
index e06502f738..cb904134f9 100644
--- a/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessHang/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
index 9e0ae4be18..4611ed4547 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
index f7bb0985a3..c6db9d1bac 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
@@ -3,5 +3,4 @@ CONFIG += console
CONFIG -= qt app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
index 255f8416c0..07409166f2 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
index 2de4534896..95191098bd 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
@@ -2,5 +2,4 @@ SOURCES = main.cpp
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
index 1f67e1c6b9..494d8147a7 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp
index 7b520bfb47..488b03ab57 100644
--- a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
index 2a87027591..37d7deb1ac 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
index d425d5569e..21a115b536 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
@@ -2,5 +2,4 @@ SOURCES = main.cpp
CONFIG += console
CONFIG -= app_bundle
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
index 7c4f58d37c..ed0f16ac17 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
index 18b38dd5de..898029483f 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index b59241851f..d19a631cae 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
@@ -9,5 +9,4 @@ unix {
CONFIG -= qt app_bundle
CONFIG += console
DESTDIR = ./
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
index c9ac08e860..0e2374de06 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
index b7213ae507..afa4f32a85 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
@@ -6,5 +6,4 @@ DESTDIR = "../test Space In Name"
mac {
CONFIG -= app_bundle
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
QT = core
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 3c4bc79cde..59f271d727 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -128,7 +123,8 @@ private slots:
void spaceArgsTest();
#if defined(Q_OS_WIN)
void nativeArguments();
-#endif
+ void createProcessArgumentsModifier();
+#endif // Q_OS_WIN
void exitCodeTest();
void systemEnvironment();
void lockupsInStartDetached();
@@ -492,9 +488,11 @@ void tst_QProcess::echoTest2()
QCOMPARE(process.error(), QProcess::Timedout);
process.write("Hello");
+ QSignalSpy spy0(&process, &QProcess::channelReadyRead);
QSignalSpy spy1(&process, &QProcess::readyReadStandardOutput);
QSignalSpy spy2(&process, &QProcess::readyReadStandardError);
+ QVERIFY(spy0.isValid());
QVERIFY(spy1.isValid());
QVERIFY(spy2.isValid());
@@ -513,6 +511,7 @@ void tst_QProcess::echoTest2()
break;
}
+ QVERIFY(spy0.count() > 0);
QVERIFY(spy1.count() > 0);
QVERIFY(spy2.count() > 0);
@@ -831,11 +830,11 @@ void tst_QProcess::openModes()
{
QProcess proc;
QVERIFY(!proc.isOpen());
- QVERIFY(proc.openMode() == QProcess::NotOpen);
+ QCOMPARE(proc.openMode(), QProcess::NotOpen);
proc.start("testProcessEcho3/testProcessEcho3");
QVERIFY(proc.waitForStarted(5000));
QVERIFY(proc.isOpen());
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
QVERIFY(proc.isReadable());
QVERIFY(proc.isWritable());
@@ -844,7 +843,7 @@ void tst_QProcess::openModes()
proc.closeWriteChannel();
QVERIFY(proc.isWritable());
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
while (proc.bytesAvailable() < 4 && proc.waitForReadyRead(5000))
{ }
@@ -853,12 +852,12 @@ void tst_QProcess::openModes()
proc.closeReadChannel(QProcess::StandardOutput);
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
QVERIFY(proc.isReadable());
proc.closeReadChannel(QProcess::StandardError);
- QVERIFY(proc.openMode() == QProcess::ReadWrite);
+ QCOMPARE(proc.openMode(), QProcess::ReadWrite);
QVERIFY(proc.isReadable());
proc.close();
@@ -985,6 +984,9 @@ public:
this, &SoftExitProcess::terminateSlot);
break;
case 4:
+ setReadChannelMode(QProcess::MergedChannels);
+ connect(this, SIGNAL(channelReadyRead(int)), this, SLOT(terminateSlot()));
+ break;
default:
connect(this, &QProcess::stateChanged,
this, &SoftExitProcess::terminateSlot);
@@ -1006,8 +1008,8 @@ public:
public slots:
void terminateSlot()
{
- writePendingData(); // In cases 3 and 4 we haven't written the data yet.
- if (killing || (n == 4 && state() != Running)) {
+ writePendingData(); // In cases 3 and 5 we haven't written the data yet.
+ if (killing || (n == 5 && state() != Running)) {
// Don't try to kill the process before it is running - that can
// be hazardous, as the actual child process might not be running
// yet. Also, don't kill it "recursively".
@@ -1050,14 +1052,14 @@ void tst_QProcess::softExitInSlots_data()
QByteArray dataTagPrefix("gui app ");
#ifndef QT_NO_WIDGETS
- for (int i = 0; i < 5; ++i) {
+ for (int i = 0; i < 6; ++i) {
QTest::newRow(dataTagPrefix + QByteArray::number(i))
<< "testGuiProcess/testGuiProcess" << i;
}
#endif
dataTagPrefix = "console app ";
- for (int i = 0; i < 5; ++i) {
+ for (int i = 0; i < 6; ++i) {
QTest::newRow(dataTagPrefix + QByteArray::number(i))
<< "testProcessEcho2/testProcessEcho2" << i;
}
@@ -1437,11 +1439,11 @@ void tst_QProcess::spaceArgsTest()
QCOMPARE(actual, args);
#endif
- if (program.contains(" "))
- program = "\"" + program + "\"";
+ if (program.contains(QLatin1Char(' ')))
+ program = QLatin1Char('"') + program + QLatin1Char('"');
if (!stringArgs.isEmpty())
- program += QString::fromLatin1(" ") + stringArgs;
+ program += QLatin1Char(' ') + stringArgs;
errorMessage.clear();
process.start(program);
@@ -1487,9 +1489,9 @@ void tst_QProcess::nativeArguments()
char buf[256];
fgets(buf, 256, file);
fclose(file);
- QStringList actual = QString::fromLatin1(buf).split("|");
+ QStringList actual = QString::fromLatin1(buf).split(QLatin1Char('|'));
#else
- QStringList actual = QString::fromLatin1(proc.readAll()).split("|");
+ QStringList actual = QString::fromLatin1(proc.readAll()).split(QLatin1Char('|'));
#endif
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
@@ -1503,7 +1505,26 @@ void tst_QProcess::nativeArguments()
QCOMPARE(actual, expected);
}
-#endif
+void tst_QProcess::createProcessArgumentsModifier()
+{
+ int calls = 0;
+ const QString reversedCommand = "lamroNssecorPtset/lamroNssecorPtset";
+ QProcess process;
+ process.setCreateProcessArgumentsModifier([&calls] (QProcess::CreateProcessArguments *args)
+ {
+ calls++;
+ std::reverse(args->arguments, args->arguments + wcslen(args->arguments) - 1);
+ });
+ process.start(reversedCommand);
+ QVERIFY2(process.waitForStarted(), qUtf8Printable(process.errorString()));
+ QVERIFY(process.waitForFinished());
+ QCOMPARE(calls, 1);
+
+ process.setCreateProcessArgumentsModifier(QProcess::CreateProcessArgumentModifier());
+ QVERIFY(!process.waitForStarted());
+ QCOMPARE(calls, 1);
+}
+#endif // Q_OS_WIN
void tst_QProcess::exitCodeTest()
{
@@ -2271,6 +2292,13 @@ void tst_QProcess::setNonExistentWorkingDirectory()
process.start(QFileInfo("testSetWorkingDirectory/testSetWorkingDirectory").absoluteFilePath());
QVERIFY(!process.waitForFinished());
QCOMPARE(int(process.error()), int(QProcess::FailedToStart));
+
+#ifdef Q_OS_UNIX
+# ifdef QPROCESS_USE_SPAWN
+ QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Continue);
+# endif
+ QVERIFY2(process.errorString().startsWith("chdir:"), process.errorString().toLocal8Bit());
+#endif
}
#endif
diff --git a/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro b/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro
index 760fa11b9e..04cef29a64 100644
--- a/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro
+++ b/tests/auto/corelib/io/qprocessenvironment/qprocessenvironment.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qprocessenvironment
QT = core testlib
SOURCES = tst_qprocessenvironment.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index 2099101a91..a4a5d5b0c7 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -57,25 +52,25 @@ private slots:
void tst_QProcessEnvironment::operator_eq()
{
QProcessEnvironment e1;
- QVERIFY(e1 == e1);
+ QCOMPARE(e1, e1);
e1.clear();
- QVERIFY(e1 == e1);
+ QCOMPARE(e1, e1);
e1 = QProcessEnvironment();
QProcessEnvironment e2;
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e1.clear();
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e2.clear();
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e1.insert("FOO", "bar");
QVERIFY(e1 != e2);
e2.insert("FOO", "bar");
- QVERIFY(e1 == e2);
+ QCOMPARE(e1, e2);
e2.insert("FOO", "baz");
QVERIFY(e1 != e2);
@@ -212,7 +207,7 @@ void tst_QProcessEnvironment::insertEnv()
e3.insert(e3); // mustn't deadlock
- QVERIFY(e3 == e2);
+ QCOMPARE(e3, e2);
}
void tst_QProcessEnvironment::caseSensitivity()
diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
index 64f5cb46e0..a39de3c4d5 100644
--- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
+++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qresourceengine
load(resources)
QT = core testlib
@@ -16,8 +16,7 @@ TESTDATA += \
parentdir.txt \
testqrc/*
GENERATED_TESTDATA = $${runtime_resource.target}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 4c6a06d224..561ab193c6 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -41,7 +36,7 @@ class tst_QResourceEngine: public QObject
public:
tst_QResourceEngine()
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
@@ -68,7 +63,7 @@ private:
void tst_QResourceEngine::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@@ -125,7 +120,7 @@ void tst_QResourceEngine::checkStructure_data()
<< QLatin1String("test")
<< QLatin1String("withoutslashes");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
rootContents.insert(1, QLatin1String("android_testdata"));
#endif
diff --git a/tests/auto/corelib/io/qsavefile/qsavefile.pro b/tests/auto/corelib/io/qsavefile/qsavefile.pro
index 36db000fa7..dd22d69ce6 100644
--- a/tests/auto/corelib/io/qsavefile/qsavefile.pro
+++ b/tests/auto/corelib/io/qsavefile/qsavefile.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qsavefile
QT = core testlib
SOURCES = tst_qsavefile.cpp
diff --git a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
index 6e6dc2df95..9573f3078b 100644
--- a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
+++ b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 David Faure <faure@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index f489b9b1d3..ed298bfafa 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -121,6 +116,7 @@ private slots:
void testEmptyKey();
void testResourceFiles();
void testRegistryShortRootNames();
+ void testRegistry32And64Bit();
void trailingWhitespace();
#ifdef Q_OS_MAC
void fileName();
@@ -278,8 +274,8 @@ void tst_QSettings::initTestCase()
, Qt::CaseInsensitive
#endif
);
- QVERIFY(custom1 == QSettings::CustomFormat1);
- QVERIFY(custom2 == QSettings::CustomFormat2);
+ QCOMPARE(custom1, QSettings::CustomFormat1);
+ QCOMPARE(custom2, QSettings::CustomFormat2);
cleanupTestFiles();
}
@@ -359,30 +355,29 @@ void tst_QSettings::ctor()
QSettings settings8(format, QSettings::SystemScope, "software.org");
// test QSettings::format() while we're at it
- QVERIFY(settings1.format() == format);
- QVERIFY(settings2.format() == format);
- QVERIFY(settings3.format() == format);
- QVERIFY(settings4.format() == format);
+ QCOMPARE(settings1.format(), format);
+ QCOMPARE(settings2.format(), format);
+ QCOMPARE(settings3.format(), format);
+ QCOMPARE(settings4.format(), format);
// test QSettings::scope() while we're at it
- QVERIFY(settings1.scope() == QSettings::UserScope);
- QVERIFY(settings2.scope() == QSettings::UserScope);
- QVERIFY(settings3.scope() == QSettings::SystemScope);
- QVERIFY(settings4.scope() == QSettings::SystemScope);
+ QCOMPARE(settings1.scope(), QSettings::UserScope);
+ QCOMPARE(settings2.scope(), QSettings::UserScope);
+ QCOMPARE(settings3.scope(), QSettings::SystemScope);
+ QCOMPARE(settings4.scope(), QSettings::SystemScope);
// test QSettings::organizationName() while we're at it
- QVERIFY(settings1.organizationName() == "software.org");
- QVERIFY(settings2.organizationName() == "software.org");
- QVERIFY(settings3.organizationName() == "software.org");
- QVERIFY(settings4.organizationName() == "software.org");
+ QCOMPARE(settings1.organizationName(), QLatin1String("software.org"));
+ QCOMPARE(settings2.organizationName(), QLatin1String("software.org"));
+ QCOMPARE(settings3.organizationName(), QLatin1String("software.org"));
+ QCOMPARE(settings4.organizationName(), QLatin1String("software.org"));
// test QSettings::applicationName() while we're at it
QCOMPARE(settings1.applicationName(), QString("KillerAPP"));
QVERIFY(settings2.applicationName().isEmpty());
- QVERIFY(settings3.applicationName() == "KillerAPP");
+ QCOMPARE(settings3.applicationName(), QLatin1String("KillerAPP"));
QVERIFY(settings4.applicationName().isEmpty());
-#if !defined(Q_OS_BLACKBERRY)
/*
Go forwards.
*/
@@ -439,22 +434,6 @@ void tst_QSettings::ctor()
QCOMPARE(settings2.value("key 1").toString(), QString("bilboh"));
QCOMPARE(settings3.value("key 1").toString(), QString("catha"));
QCOMPARE(settings4.value("key 1").toString(), QString("quirko"));
-#else
- /*
- No fallback mechanism and a single scope on Blackberry OS
- */
- settings2.setValue("key 1", QString("whoa"));
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
- QCOMPARE(settings4.value("key 1").toString(), QString("whoa"));
- QVERIFY(!settings1.contains("key 1"));
- QVERIFY(!settings3.contains("key 1"));
-
- settings1.setValue("key 1", QString("blah"));
- QCOMPARE(settings1.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
- QCOMPARE(settings3.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings4.value("key 1").toString(), QString("whoa"));
-#endif
/*
Test the copies again.
@@ -491,17 +470,10 @@ void tst_QSettings::ctor()
QSettings settings3(format, QSettings::SystemScope, "software.org", "KillerAPP");
QSettings settings4(format, QSettings::SystemScope, "software.org");
-#if !defined(Q_OS_BLACKBERRY)
QCOMPARE(settings1.value("key 1").toString(), QString("gurgle"));
QCOMPARE(settings2.value("key 1").toString(), QString("bilboh"));
QCOMPARE(settings3.value("key 1").toString(), QString("catha"));
QCOMPARE(settings4.value("key 1").toString(), QString("quirko"));
-#else
- QCOMPARE(settings1.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
- QCOMPARE(settings3.value("key 1").toString(), QString("blah"));
- QCOMPARE(settings4.value("key 1").toString(), QString("whoa"));
-#endif
/*
Test problem keys.
@@ -555,7 +527,7 @@ void tst_QSettings::ctor()
settings1.endGroup();
// test QSettings::scope() while we're at it
- QVERIFY(settings1.scope() == QSettings::UserScope);
+ QCOMPARE(settings1.scope(), QSettings::UserScope);
// test QSettings::organizationName() while we're at it
QVERIFY(settings1.organizationName().isEmpty());
@@ -630,20 +602,20 @@ void tst_QSettings::ctor()
QCOMPARE(settings2.status(), QSettings::NoError);
// test QSettings::format() while we're at it
- QVERIFY(settings.format() == format);
- QVERIFY(settings2.format() == format);
+ QCOMPARE(settings.format(), format);
+ QCOMPARE(settings2.format(), format);
// test QSettings::scope() while we're at it
- QVERIFY(settings.scope() == QSettings::UserScope);
- QVERIFY(settings2.scope() == QSettings::UserScope);
+ QCOMPARE(settings.scope(), QSettings::UserScope);
+ QCOMPARE(settings2.scope(), QSettings::UserScope);
// test QSettings::organizationName() while we're at it
QVERIFY(settings.organizationName().isEmpty());
- QVERIFY(settings2.organizationName() == "software.org");
+ QCOMPARE(settings2.organizationName(), QLatin1String("software.org"));
// test QSettings::applicationName() while we're at it
QVERIFY(settings.applicationName().isEmpty());
- QVERIFY(settings2.applicationName() == "KillerAPP");
+ QCOMPARE(settings2.applicationName(), QLatin1String("KillerAPP"));
}
}
@@ -1235,16 +1207,16 @@ void tst_QSettings::remove()
{
QSettings settings0(QSettings::UserScope, "software.org", "KillerAPP");
int initialNumKeys = settings0.allKeys().size();
- QCOMPARE(settings0.value("key 1", "123").toString(), QString("123"));
+ QCOMPARE(settings0.value("key 1", "123").toString(), QLatin1String("123"));
settings0.remove("key 1");
- QCOMPARE(settings0.value("key 1", "456").toString(), QString("456"));
+ QCOMPARE(settings0.value("key 1", "456").toString(), QLatin1String("456"));
settings0.setValue("key 1", "bubloo");
- QCOMPARE(settings0.value("key 1").toString(), QString("bubloo"));
+ QCOMPARE(settings0.value("key 1").toString(), QLatin1String("bubloo"));
settings0.remove("key 2");
- QCOMPARE(settings0.value("key 1").toString(), QString("bubloo"));
+ QCOMPARE(settings0.value("key 1").toString(), QLatin1String("bubloo"));
settings0.remove("key 1");
- QCOMPARE(settings0.value("key 1", "789").toString(), QString("789"));
+ QCOMPARE(settings0.value("key 1", "789").toString(), QLatin1String("789"));
/*
Make sure that removing a key removes all the subkeys.
@@ -1372,7 +1344,6 @@ void tst_QSettings::remove()
QCOMPARE(settings1.value("key 1").toString(), QString("gurgle"));
QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
-#if !defined(Q_OS_BLACKBERRY)
if (m_canWriteNativeSystemSettings) {
QCOMPARE(settings3->value("key 1").toString(), QString("blah"));
QCOMPARE(settings4->value("key 1").toString(), QString("doodah"));
@@ -1405,14 +1376,6 @@ void tst_QSettings::remove()
QVERIFY(!settings3->contains("key 1"));
QVERIFY(!settings4->contains("key 1"));
}
-#else
- settings1.remove("key 1");
- QCOMPARE(settings2.value("key 1").toString(), QString("whoa"));
-
- settings2.remove("key 1");
- QVERIFY(!settings1.contains("key 1"));
- QVERIFY(!settings2.contains("key 1"));
-#endif
/*
Get ready for the next part of the test.
@@ -1550,7 +1513,7 @@ void tst_QSettings::contains()
}
settings1.endGroup();
- QVERIFY(settings1.group() == "alpha");
+ QCOMPARE(settings1.group(), QLatin1String("alpha"));
keys = settings1.allKeys();
QCOMPARE(keys.size(), expectedResult.size() + 3);
for (i = 0; i < keys.size(); ++i) {
@@ -1715,7 +1678,6 @@ void tst_QSettings::setFallbacksEnabled()
main associated file when fallbacks are turned off.
*/
-#if !defined(Q_OS_BLACKBERRY)
QCOMPARE(settings1.value("key 1").toString(), QString("alpha"));
QCOMPARE(settings2.value("key 1").toString(), QString("beta"));
QCOMPARE(settings3.value("key 1").toString(), QString("gamma"));
@@ -1745,22 +1707,6 @@ void tst_QSettings::setFallbacksEnabled()
QCOMPARE(settings1.value("key 5").toString(), QString(""));
QVERIFY(settings1.contains("key 1"));
QVERIFY(!settings1.contains("key 5"));
-#else
- QCOMPARE(settings1.value("key 1").toString(), QString("gamma"));
- QCOMPARE(settings2.value("key 1").toString(), QString("delta"));
- QCOMPARE(settings3.value("key 1").toString(), QString("gamma"));
- QCOMPARE(settings4.value("key 1").toString(), QString("delta"));
-
- QCOMPARE(settings1.value("key 2").toString(), QString("gamma"));
- QCOMPARE(settings2.value("key 2").toString(), QString("beta"));
- QCOMPARE(settings3.value("key 2").toString(), QString("gamma"));
- QCOMPARE(settings4.value("key 2").toString(), QString("beta"));
-
- QCOMPARE(settings1.value("key 3").toString(), QString("gamma"));
- QCOMPARE(settings2.value("key 3").toString(), QString("delta"));
- QCOMPARE(settings3.value("key 3").toString(), QString("gamma"));
- QCOMPARE(settings4.value("key 3").toString(), QString("delta"));
-#endif
}
void tst_QSettings::testChildKeysAndGroups_data()
@@ -1842,26 +1788,26 @@ void tst_QSettings::testUpdateRequestEvent()
QSettings settings1("foo", QSettings::IniFormat);
QVERIFY(!QFile::exists("foo"));
- QVERIFY(QFileInfo("foo").size() == 0);
+ QCOMPARE(QFileInfo("foo").size(), qint64(0));
settings1.setValue("key1", 1);
- QVERIFY(QFileInfo("foo").size() == 0);
+ QCOMPARE(QFileInfo("foo").size(), qint64(0));
QTRY_VERIFY(QFileInfo("foo").size() > 0);
settings1.remove("key1");
QVERIFY(QFileInfo("foo").size() > 0);
- QTRY_VERIFY(QFileInfo("foo").size() == 0);
+ QTRY_COMPARE(QFileInfo("foo").size(), qint64(0));
settings1.setValue("key2", 2);
- QVERIFY(QFileInfo("foo").size() == 0);
+ QCOMPARE(QFileInfo("foo").size(), qint64(0));
QTRY_VERIFY(QFileInfo("foo").size() > 0);
settings1.clear();
QVERIFY(QFileInfo("foo").size() > 0);
- QTRY_VERIFY(QFileInfo("foo").size() == 0);
+ QTRY_COMPARE(QFileInfo("foo").size(), qint64(0));
#ifdef Q_OS_WINRT
QDir::setCurrent(oldCur);
@@ -2008,7 +1954,7 @@ void tst_QSettings::testEmptyData()
settings.setValue("vList", vList);
settings.setValue("vList2", vList2);
settings.setValue("vList3", vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
{
QSettings settings(filename, QSettings::IniFormat);
@@ -2021,7 +1967,7 @@ void tst_QSettings::testEmptyData()
QCOMPARE(settings.value("vList").toList(), vList);
QCOMPARE(settings.value("vList2").toList(), vList2);
QCOMPARE(settings.value("vList3").toList(), vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
{
@@ -2035,7 +1981,7 @@ void tst_QSettings::testEmptyData()
settings.setValue("vList", vList);
settings.setValue("vList2", vList2);
settings.setValue("vList3", vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
{
QSettings settings("QtProject", "tst_qsettings");
@@ -2048,7 +1994,7 @@ void tst_QSettings::testEmptyData()
QCOMPARE(settings.value("vList").toList(), vList);
QCOMPARE(settings.value("vList2").toList(), vList2);
QCOMPARE(settings.value("vList3").toList(), vList3);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
}
QFile::remove(filename);
}
@@ -2066,17 +2012,17 @@ void tst_QSettings::testEmptyKey()
void tst_QSettings::testResourceFiles()
{
QSettings settings(":/resourcefile.ini", QSettings::IniFormat);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
QVERIFY(!settings.isWritable());
QCOMPARE(settings.value("Field 1/Bottom").toInt(), 89);
settings.setValue("Field 1/Bottom", 90);
// the next two lines check the statu quo; another behavior would be possible
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
QCOMPARE(settings.value("Field 1/Bottom").toInt(), 90);
settings.sync();
- QVERIFY(settings.status() == QSettings::AccessError);
+ QCOMPARE(settings.status(), QSettings::AccessError);
QCOMPARE(settings.value("Field 1/Bottom").toInt(), 90);
}
@@ -2092,6 +2038,52 @@ void tst_QSettings::testRegistryShortRootNames()
#endif
}
+void tst_QSettings::testRegistry32And64Bit()
+{
+#if !defined (Q_OS_WIN) || defined(Q_OS_WINRT)
+ QSKIP("This test is specific to the Windows registry.", SkipAll);
+#else
+
+ const QString key("HKEY_LOCAL_MACHINE\\Software");
+ const QString keyWow("HKEY_LOCAL_MACHINE\\Software\\Wow6432Node");
+
+#ifndef Q_OS_WIN64
+ // This branch is taken at compile time if targeting 32-bit; it does not
+ // necessarily mean that the OS running the test is 32-bit (it could be
+ // e.g. 64-bit).
+ QCOMPARE(QSettings(key, QSettings::NativeFormat).childGroups(),
+ QSettings(key, QSettings::Registry32Format).childGroups());
+
+ // Detect whether we are running under 64-bit Windows.
+ typedef BOOL (WINAPI *IsWow64ProcessPtr)(HANDLE hProcess, PBOOL Wow64Process);
+ IsWow64ProcessPtr IsWow64Process = (IsWow64ProcessPtr)QLibrary::resolve(
+ "kernel32.dll", "IsWow64Process");
+
+ if (IsWow64Process) {
+ BOOL IsWow64 = FALSE;
+ if (IsWow64Process(GetCurrentProcess(), &IsWow64) && IsWow64) {
+ // The 64-bit registry's "Wow6432Node" key should match the 32-bit registry.
+ // If we are not on 32-bit Windows, these should never be the same,
+ // because the 64-bit registry has a "Wow6432Node" key.
+ QCOMPARE(QSettings(keyWow, QSettings::Registry64Format).childGroups(),
+ QSettings(key, QSettings::Registry32Format).childGroups());
+ }
+ }
+#else
+ // This branch is taken at compile time if targeting 64-bit; it does not
+ // necessarily mean that the OS running the test is 64-bit (it could be
+ // e.g. 128-bit).
+ QCOMPARE(QSettings(key, QSettings::NativeFormat).childGroups(),
+ QSettings(key, QSettings::Registry64Format).childGroups());
+
+ // The 64-bit registry's "Wow6432Node" key should match the 32-bit registry.
+ QCOMPARE(QSettings(keyWow, QSettings::Registry64Format).childGroups(),
+ QSettings(key, QSettings::Registry32Format).childGroups());
+#endif
+
+#endif
+}
+
void tst_QSettings::trailingWhitespace()
{
{
@@ -2517,7 +2509,6 @@ void tst_QSettings::testArrays()
}
settings2.endArray();
-#if !defined (Q_OS_BLACKBERRY)
size1 = settings1.beginReadArray("strings");
QCOMPARE(size1, 3);
@@ -2528,7 +2519,6 @@ void tst_QSettings::testArrays()
QCOMPARE(str, fiveStrings.at(i));
}
settings1.endArray();
-#endif
}
#ifdef QT_BUILD_INTERNAL
@@ -2587,7 +2577,7 @@ QString escapeWeirdChars(const QString &s)
QChar c = s.at(i);
if (c.unicode() < ' ' || c.unicode() > '~'
|| (escapeNextDigit && c.unicode() >= '0' && c.unicode() <= 'f')) {
- result += QString("\\x%1").arg(c.unicode(), 0, 16);
+ result += QLatin1String("\\x") + QString::number(c.unicode(), 16);
escapeNextDigit = true;
} else {
result += c;
@@ -3181,7 +3171,7 @@ void tst_QSettings::registerFormat()
// so we can test error handling
QSettings::Format custom3 = QSettings::registerFormat("custom3", readCustom3File, writeCustom3File);
- QVERIFY(custom3 == QSettings::CustomFormat3);
+ QCOMPARE(custom3, QSettings::CustomFormat3);
QDir dir(settingsPath());
QVERIFY(dir.mkpath("someDir"));
@@ -3251,7 +3241,6 @@ void tst_QSettings::setPath()
path checks that it has no bad side effects.
*/
for (int i = 0; i < 2; ++i) {
-#if !defined(Q_OS_BLACKBERRY)
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
TEST_PATH(i == 0, "conf", NativeFormat, UserScope, "alpha")
TEST_PATH(i == 0, "conf", NativeFormat, SystemScope, "beta")
@@ -3262,34 +3251,28 @@ void tst_QSettings::setPath()
TEST_PATH(i == 0, "custom1", CustomFormat1, SystemScope, "zeta")
TEST_PATH(i == 0, "custom2", CustomFormat2, UserScope, "eta")
TEST_PATH(i == 0, "custom2", CustomFormat2, SystemScope, "iota")
-#else // Q_OS_BLACKBERRY: no system scope
- TEST_PATH(i == 0, "conf", NativeFormat, UserScope, "alpha")
- TEST_PATH(i == 0, "ini", IniFormat, UserScope, "gamma")
- TEST_PATH(i == 0, "custom1", CustomFormat1, UserScope, "epsilon")
- TEST_PATH(i == 0, "custom2", CustomFormat2, UserScope, "eta")
-#endif
}
}
void tst_QSettings::setDefaultFormat()
{
- QVERIFY(QSettings::defaultFormat() == QSettings::NativeFormat);
+ QCOMPARE(QSettings::defaultFormat(), QSettings::NativeFormat);
QSettings::setDefaultFormat(QSettings::CustomFormat1);
QSettings settings1("org", "app");
QSettings settings2(QSettings::SystemScope, "org", "app");
QSettings settings3;
- QVERIFY(settings1.format() == QSettings::NativeFormat);
- QVERIFY(settings2.format() == QSettings::NativeFormat);
- QVERIFY(settings3.format() == QSettings::CustomFormat1);
+ QCOMPARE(settings1.format(), QSettings::NativeFormat);
+ QCOMPARE(settings2.format(), QSettings::NativeFormat);
+ QCOMPARE(settings3.format(), QSettings::CustomFormat1);
QSettings::setDefaultFormat(QSettings::NativeFormat);
- QVERIFY(QSettings::defaultFormat() == QSettings::NativeFormat);
+ QCOMPARE(QSettings::defaultFormat(), QSettings::NativeFormat);
- QVERIFY(settings1.format() == QSettings::NativeFormat);
- QVERIFY(settings2.format() == QSettings::NativeFormat);
- QVERIFY(settings3.format() == QSettings::CustomFormat1);
+ QCOMPARE(settings1.format(), QSettings::NativeFormat);
+ QCOMPARE(settings2.format(), QSettings::NativeFormat);
+ QCOMPARE(settings3.format(), QSettings::CustomFormat1);
}
void tst_QSettings::dontCreateNeedlessPaths()
@@ -3350,7 +3333,7 @@ void tst_QSettings::dontReorderIniKeysNeedlessly()
outFile.close();
QSettings settings(outFileName, QSettings::IniFormat);
- QVERIFY(settings.status() == QSettings::NoError);
+ QCOMPARE(settings.status(), QSettings::NoError);
QVERIFY(settings.isWritable());
settings.setValue("Field 1/Bottom", 90);
diff --git a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
index 9fb6f9b31f..c72d9e4fad 100644
--- a/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
+++ b/tests/auto/corelib/io/qstandardpaths/qstandardpaths.pro
@@ -3,4 +3,3 @@ TARGET = tst_qstandardpaths
QT = core testlib
SOURCES = tst_qstandardpaths.cpp
TESTDATA += tst_qstandardpaths.cpp qstandardpaths.pro
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 92e66e20c2..a7a761a2da 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -47,7 +42,7 @@
#include <sys/types.h>
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_ANDROID)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
#define Q_XDG_PLATFORM
#endif
@@ -309,9 +304,9 @@ void tst_qstandardpaths::testDataLocation()
{
// On all platforms, DataLocation should be GenericDataLocation / organization name / app name
// This allows one app to access the data of another app.
- // Blackberry OS, Android and WinRT are an exception to this case, owing to the fact that
+ // Android and WinRT are an exception to this case, owing to the fact that
// applications are sandboxed.
-#if !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation), base + "/tst_qstandardpaths");
QCoreApplication::instance()->setOrganizationName("Qt");
@@ -340,7 +335,7 @@ void tst_qstandardpaths::testAppConfigLocation()
{
// On all platforms where applications are not sandboxed,
// AppConfigLocation should be GenericConfigLocation / organization name / app name
-#if !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT)
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation), base + "/tst_qstandardpaths");
QCoreApplication::setOrganizationName("Qt");
diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
index 004ace4e2e..8b1aa105de 100644
--- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
+++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2014 Ivan Komissarov <ABBAPOH@gmail.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -65,9 +60,9 @@ void tst_QStorageInfo::defaultValues()
QVERIFY(!storage.isRoot());
QVERIFY(storage.device().isEmpty());
QVERIFY(storage.fileSystemType().isEmpty());
- QVERIFY(storage.bytesTotal() == -1);
- QVERIFY(storage.bytesFree() == -1);
- QVERIFY(storage.bytesAvailable() == -1);
+ QCOMPARE(storage.bytesTotal(), -1);
+ QCOMPARE(storage.bytesFree(), -1);
+ QCOMPARE(storage.bytesAvailable(), -1);
}
static int qInfoPrinter(const char *format, ...)
@@ -102,19 +97,19 @@ void tst_QStorageInfo::operatorEqual()
{
QStorageInfo storage1 = QStorageInfo::root();
QStorageInfo storage2(QDir::rootPath());
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
}
{
QStorageInfo storage1(QCoreApplication::applicationDirPath());
QStorageInfo storage2(QCoreApplication::applicationFilePath());
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
}
{
QStorageInfo storage1;
QStorageInfo storage2;
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
}
}
@@ -216,16 +211,16 @@ void tst_QStorageInfo::caching()
qint64 free = storage1.bytesFree();
QStorageInfo storage2(storage1);
- QVERIFY(free == storage2.bytesFree());
+ QCOMPARE(free, storage2.bytesFree());
QVERIFY(free != -1);
file.write(QByteArray(1024*1024, '\0'));
file.flush();
- QVERIFY(free == storage1.bytesFree());
- QVERIFY(free == storage2.bytesFree());
+ QCOMPARE(free, storage1.bytesFree());
+ QCOMPARE(free, storage2.bytesFree());
storage2.refresh();
- QVERIFY(storage1 == storage2);
+ QCOMPARE(storage1, storage2);
QVERIFY(free != storage2.bytesFree());
}
#endif
diff --git a/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro b/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro
index 0908878514..4a69971f78 100644
--- a/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro
+++ b/tests/auto/corelib/io/qtemporarydir/qtemporarydir.pro
@@ -3,4 +3,3 @@ TARGET = tst_qtemporarydir
SOURCES += tst_qtemporarydir.cpp
QT = core testlib
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 67a39f21ca..0e73ea7862 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -276,7 +271,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+# if defined(Q_OS_ANDROID)
const char nonWritableDir[] = "/data";
# else
const char nonWritableDir[] = "/home";
diff --git a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
index c16a729ad0..a89e5c66ff 100644
--- a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
@@ -1,12 +1,10 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qtemporaryfile
QT = core testlib
SOURCES = tst_qtemporaryfile.cpp
TESTDATA += tst_qtemporaryfile.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
RESOURCES += qtemporaryfile.qrc
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 7fdc8fd44c..8ebde627df 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -102,7 +97,7 @@ void tst_QTemporaryFile::initTestCase()
QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX"));
QCoreApplication::setApplicationName("tst_qtemporaryfile");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -336,7 +331,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath());
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QDir::setCurrent("/data");
#else
QDir::setCurrent("/home");
@@ -512,7 +507,7 @@ void tst_QTemporaryFile::renameFdLeak()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+# if defined(Q_OS_ANDROID)
ChdirOnReturn cor(QDir::currentPath());
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
# endif
@@ -586,15 +581,16 @@ void tst_QTemporaryFile::keepOpenMode()
{
QTemporaryFile file;
QVERIFY(file.open());
+ QCOMPARE(file.openMode(), QIODevice::ReadWrite);
QCOMPARE(file.write(data), (qint64)data.size());
QVERIFY(file.rename("temporary-file.txt"));
QVERIFY(((QFile &)file).open(QIODevice::ReadOnly));
- QVERIFY(QIODevice::ReadOnly == file.openMode());
+ QCOMPARE(file.openMode(), QIODevice::ReadOnly);
QCOMPARE(file.readAll(), data);
QVERIFY(((QFile &)file).open(QIODevice::WriteOnly));
- QVERIFY(QIODevice::WriteOnly == file.openMode());
+ QCOMPARE(file.openMode(), QIODevice::WriteOnly);
}
}
@@ -720,7 +716,7 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt");
#else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");
@@ -748,7 +744,7 @@ void tst_QTemporaryFile::createNativeFile()
f.seek(currentPos);
}
QTemporaryFile *tempFile = QTemporaryFile::createNativeFile(f);
- QVERIFY(valid == (bool)tempFile);
+ QCOMPARE(valid, (bool)tempFile);
if (currentPos != -1)
QCOMPARE(currentPos, f.pos());
if (valid) {
diff --git a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
index 0f27b15229..08d2bf8183 100644
--- a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
index 578fa86f5c..4a4c091dcb 100644
--- a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
+++ b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_qtextstream
target.path = $$[QT_INSTALL_TESTS]/tst_qtextstream/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
index 2867302999..41ea5e56f0 100644
--- a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
index 578fa86f5c..4a4c091dcb 100644
--- a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
+++ b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_qtextstream
target.path = $$[QT_INSTALL_TESTS]/tst_qtextstream/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
index f3b149b6b0..a3c1fc525b 100644
--- a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro b/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro
index 578fa86f5c..4a4c091dcb 100644
--- a/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro
+++ b/tests/auto/corelib/io/qtextstream/stdinProcess/stdinProcess.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_qtextstream
target.path = $$[QT_INSTALL_TESTS]/tst_qtextstream/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qtextstream/test/test.pro b/tests/auto/corelib/io/qtextstream/test/test.pro
index 073aecdfba..50335524d3 100644
--- a/tests/auto/corelib/io/qtextstream/test/test.pro
+++ b/tests/auto/corelib/io/qtextstream/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = ../tst_qtextstream
QT = core network testlib
SOURCES = ../tst_qtextstream.cpp
@@ -20,7 +19,6 @@ TESTDATA += \
../qtextstream.qrc \
../tst_qtextstream.cpp \
../resources
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
builtin_testdata {
DEFINES += BUILTIN_TESTDATA
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index 13be58a1f1..104873b85e 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -1635,18 +1630,18 @@ void tst_QTextStream::forcePoint()
{
QString str;
QTextStream stream(&str);
- stream << fixed << forcepoint << 1.0 << " " << 1 << " " << 0 << " " << -1.0 << " " << -1;
+ stream << fixed << forcepoint << 1.0 << ' ' << 1 << ' ' << 0 << ' ' << -1.0 << ' ' << -1;
QCOMPARE(str, QString("1.000000 1 0 -1.000000 -1"));
str.clear();
stream.seek(0);
- stream << scientific << forcepoint << 1.0 << " " << 1 << " " << 0 << " " << -1.0 << " " << -1;
+ stream << scientific << forcepoint << 1.0 << ' ' << 1 << ' ' << 0 << ' ' << -1.0 << ' ' << -1;
QCOMPARE(str, QString("1.000000e+00 1 0 -1.000000e+00 -1"));
str.clear();
stream.seek(0);
stream.setRealNumberNotation(QTextStream::SmartNotation);
- stream << forcepoint << 1.0 << " " << 1 << " " << 0 << " " << -1.0 << " " << -1;
+ stream << forcepoint << 1.0 << ' ' << 1 << ' ' << 0 << ' ' << -1.0 << ' ' << -1;
QCOMPARE(str, QString("1.00000 1 0 -1.00000 -1"));
}
@@ -1656,7 +1651,7 @@ void tst_QTextStream::forceSign()
{
QString str;
QTextStream stream(&str);
- stream << forcesign << 1.2 << " " << -1.2 << " " << 0;
+ stream << forcesign << 1.2 << ' ' << -1.2 << ' ' << 0;
QCOMPARE(str, QString("+1.2 -1.2 +0"));
}
@@ -1793,9 +1788,9 @@ void tst_QTextStream::nanInf()
QString s;
QTextStream out(&s);
- out << qInf() << " " << -qInf() << " " << qQNaN()
- << uppercasedigits << " "
- << qInf() << " " << -qInf() << " " << qQNaN()
+ out << qInf() << ' ' << -qInf() << ' ' << qQNaN()
+ << uppercasedigits << ' '
+ << qInf() << ' ' << -qInf() << ' ' << qQNaN()
<< flush;
QCOMPARE(s, QString("inf -inf nan INF -INF NAN"));
@@ -2601,7 +2596,7 @@ void tst_QTextStream::useCase1()
stream.setCodec(QTextCodec::codecForName("ISO-8859-1"));
stream.setAutoDetectUnicode(true);
- stream << 4.15 << " " << QByteArray("abc") << " " << QString("ole");
+ stream << 4.15 << ' ' << QByteArray("abc") << ' ' << QString("ole");
}
file.seek(0);
@@ -2637,7 +2632,7 @@ void tst_QTextStream::useCase2()
stream.setCodec(QTextCodec::codecForName("ISO-8859-1"));
stream.setAutoDetectUnicode(true);
- stream << 4.15 << " " << QByteArray("abc") << " " << QString("ole");
+ stream << 4.15 << ' ' << QByteArray("abc") << ' ' << QString("ole");
file.close();
QVERIFY(file.open(QFile::ReadWrite));
diff --git a/tests/auto/corelib/io/qurl/idna-test.c b/tests/auto/corelib/io/qurl/idna-test.c
index 4e16e4f38e..035d3e1c89 100644
--- a/tests/auto/corelib/io/qurl/idna-test.c
+++ b/tests/auto/corelib/io/qurl/idna-test.c
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qurl/qurl.pro b/tests/auto/corelib/io/qurl/qurl.pro
index f65a9c688c..c046c75522 100644
--- a/tests/auto/corelib/io/qurl/qurl.pro
+++ b/tests/auto/corelib/io/qurl/qurl.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qurl
QT = core testlib concurrent
SOURCES = tst_qurl.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
mac: OBJECTIVE_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 670b72acc8..a4461a12d3 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -235,7 +230,7 @@ void tst_QUrl::constructing()
QVERIFY(url.isEmpty());
QCOMPARE(url.port(), -1);
QCOMPARE(url.toString(), QString());
- QVERIFY(url == url);
+ QCOMPARE(url, url);
QVERIFY(!(url < url));
QUrl fromLocal = QUrl::fromLocalFile(QString());
@@ -263,7 +258,7 @@ void tst_QUrl::hashInPath()
QCOMPARE(withHashInPath.toDisplayString(QUrl::PreferLocalFile), QString("hi%23mum.txt"));
QUrl fromHashInPath = QUrl::fromEncoded(withHashInPath.toEncoded());
- QVERIFY(withHashInPath == fromHashInPath);
+ QCOMPARE(withHashInPath, fromHashInPath);
const QUrl localWithHash = QUrl::fromLocalFile("/hi#mum.txt");
QCOMPARE(localWithHash.path(), QString::fromLatin1("/hi#mum.txt"));
@@ -293,7 +288,7 @@ void tst_QUrl::assignment()
QUrl copy;
copy = url;
- QVERIFY(url == copy);
+ QCOMPARE(url, copy);
}
void tst_QUrl::comparison()
@@ -304,7 +299,7 @@ void tst_QUrl::comparison()
QUrl url2("http://qt-project.org/");
QVERIFY(url2.isValid());
- QVERIFY(url1 == url2);
+ QCOMPARE(url1, url2);
QVERIFY(!(url1 < url2));
QVERIFY(!(url2 < url1));
QVERIFY(url1.matches(url2, QUrl::None));
@@ -338,7 +333,7 @@ void tst_QUrl::comparison()
url5.setEncodedQuery("a=%2a");
QUrl url6;
url6.setEncodedQuery("a=%2A");
- QVERIFY(url5 == url6);
+ QCOMPARE(url5, url6);
QUrl url7;
url7.setEncodedQuery("a=C");
@@ -375,7 +370,7 @@ void tst_QUrl::comparison()
QUrl hostUrl1("file:/foo");
QUrl hostUrl2("file:///foo");
- QVERIFY(hostUrl1 == hostUrl2);
+ QCOMPARE(hostUrl1, hostUrl2);
QVERIFY(hostUrl1.matches(hostUrl2, QUrl::None));
QVERIFY(hostUrl1.matches(hostUrl2, QUrl::RemoveAuthority));
@@ -469,7 +464,7 @@ void tst_QUrl::copying()
QUrl copy(url);
- QVERIFY(url == copy);
+ QCOMPARE(url, copy);
}
void tst_QUrl::setUrl()
@@ -1694,9 +1689,9 @@ void tst_QUrl::percentEncoding()
QFETCH(QByteArray, encoded);
QCOMPARE(QUrl(original).toEncoded().constData(), encoded.constData());
- QVERIFY(QUrl::fromEncoded(QUrl(original).toEncoded()) == QUrl(original));
+ QCOMPARE(QUrl::fromEncoded(QUrl(original).toEncoded()), QUrl(original));
QCOMPARE(QUrl::fromEncoded(QUrl(original).toEncoded()).toString(), original);
- QVERIFY(QUrl::fromEncoded(encoded) == QUrl(original));
+ QCOMPARE(QUrl::fromEncoded(encoded), QUrl(original));
QCOMPARE(QUrl(QUrl(original).toString()).toString(), original);
}
@@ -2984,7 +2979,8 @@ void tst_QUrl::fromUserInput_data()
int c = 0;
while (it.hasNext()) {
it.next();
- QTest::newRow(QString("file-%1").arg(c++).toLatin1()) << it.filePath() << QUrl::fromLocalFile(it.filePath());
+ QTest::newRow(("file-" + QByteArray::number(c++)).constData())
+ << it.filePath() << QUrl::fromLocalFile(it.filePath());
}
// basic latin1
@@ -3079,7 +3075,8 @@ void tst_QUrl::fromUserInputWithCwd_data()
#endif
); // fromUserInput cleans the path
}
- QTest::newRow(QString("file-%1").arg(c++).toLatin1()) << it.fileName() << QDir::currentPath() << url << url;
+ QTest::newRow(("file-" + QByteArray::number(c++)).constData())
+ << it.fileName() << QDir::currentPath() << url << url;
}
#ifndef Q_OS_WINRT // WinRT cannot cd outside current / sandbox
QDir parent = QDir::current();
@@ -3290,7 +3287,7 @@ void tst_QUrl::acceptEmptyAuthoritySegments()
// However, file:/bar is the same as file:///bar
QString file_triple_bar("file:///bar"), file_uni_bar("file:/bar");
- QVERIFY(QUrl(file_triple_bar) == QUrl(file_uni_bar));
+ QCOMPARE(QUrl(file_triple_bar), QUrl(file_uni_bar));
QCOMPARE(QUrl(file_uni_bar).toString(), file_triple_bar);
QCOMPARE(QUrl(file_uni_bar, QUrl::StrictMode).toString(), file_triple_bar);
diff --git a/tests/auto/corelib/io/qurl/tst_qurl_mac.mm b/tests/auto/corelib/io/qurl/tst_qurl_mac.mm
index 45c1681b22..f2d151a090 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl_mac.mm
+++ b/tests/auto/corelib/io/qurl/tst_qurl_mac.mm
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/io/qurlinternal/qurlinternal.pro b/tests/auto/corelib/io/qurlinternal/qurlinternal.pro
index c62cd045f3..ae5e023446 100644
--- a/tests/auto/corelib/io/qurlinternal/qurlinternal.pro
+++ b/tests/auto/corelib/io/qurlinternal/qurlinternal.pro
@@ -3,5 +3,3 @@ requires(contains(QT_CONFIG,private_tests))
TARGET = tst_qurlinternal
SOURCES += tst_qurlinternal.cpp ../../codecs/utf8/utf8data.cpp
QT = core core-private testlib
-CONFIG += parallel_test
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index 753a679d4c..f5835ec5f4 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -1003,7 +998,9 @@ void tst_QUrlInternal::encodingRecodeInvalidUtf8_data()
QTest::addColumn<QString>("utf16");
extern void loadInvalidUtf8Rows();
+ extern void loadNonCharactersRows();
loadInvalidUtf8Rows();
+ loadNonCharactersRows();
QTest::newRow("utf8-mix-4") << QByteArray("\xE0.A2\x80");
QTest::newRow("utf8-mix-5") << QByteArray("\xE0\xA2.80");
diff --git a/tests/auto/corelib/io/qurlquery/qurlquery.pro b/tests/auto/corelib/io/qurlquery/qurlquery.pro
index 3284903d5b..68129f356f 100644
--- a/tests/auto/corelib/io/qurlquery/qurlquery.pro
+++ b/tests/auto/corelib/io/qurlquery/qurlquery.pro
@@ -1,6 +1,5 @@
QT = core core-private testlib
TARGET = tst_qurlquery
-CONFIG += parallel_test testcase
+CONFIG += testcase
SOURCES += tst_qurlquery.cpp
DEFINES += SRCDIR=\\\"$$PWD/\\\"
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
index 769a96ac64..d839141091 100644
--- a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
+++ b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -103,7 +98,7 @@ static QByteArray prettyList(const T &items)
first = false;
result += prettyPair(it);
}
- result += ")";
+ result += QLatin1Char(')');
return result.toLocal8Bit();
}
@@ -176,20 +171,20 @@ void tst_QUrlQuery::constructing()
QUrlQuery copy(empty);
QVERIFY(copy.isEmpty());
QVERIFY(!copy.isDetached());
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
QCOMPARE(qHash(copy), qHash(empty));
QVERIFY(!(copy != empty));
copy = empty;
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
copy = QUrlQuery();
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
QCOMPARE(qHash(copy), qHash(empty));
}
{
QUrlQuery copy(emptyQuery());
- QVERIFY(copy == empty);
+ QCOMPARE(copy, empty);
}
QVERIFY(!empty.hasQueryItem("a"));
@@ -214,7 +209,7 @@ void tst_QUrlQuery::constructing()
QVERIFY(!(other == empty));
QUrlQuery copy(other);
- QVERIFY(copy == other);
+ QCOMPARE(copy, other);
copy.clear();
QVERIFY(copy.isEmpty());
@@ -222,7 +217,7 @@ void tst_QUrlQuery::constructing()
copy = other;
QVERIFY(!copy.isEmpty());
- QVERIFY(copy == other);
+ QCOMPARE(copy, other);
copy = QUrlQuery();
QVERIFY(copy.isEmpty());
@@ -298,7 +293,7 @@ void tst_QUrlQuery::addRemove()
QCOMPARE(allItems.at(0).first, QString("a"));
QCOMPARE(allItems.at(0).second, QString("b"));
- QVERIFY(query == original);
+ QCOMPARE(query, original);
QVERIFY(!(query != original));
QCOMPARE(qHash(query), qHash(original));
}
@@ -346,7 +341,7 @@ void tst_QUrlQuery::multiAddRemove()
QVERIFY(query.hasQueryItem("a"));
// returns the first one
- QVERIFY(query.queryItemValue("a") == "b");
+ QCOMPARE(query.queryItemValue("a"), QLatin1String("b"));
// order is the order we set them in
QVERIFY(query.allQueryItemValues("a") == QStringList() << "b" << "c");
@@ -359,9 +354,9 @@ void tst_QUrlQuery::multiAddRemove()
QVERIFY(query.hasQueryItem("A"));
QVERIFY(query.hasQueryItem("a"));
- QVERIFY(query.queryItemValue("a") == "b");
+ QCOMPARE(query.queryItemValue("a"), QLatin1String("b"));
QVERIFY(query.allQueryItemValues("a") == QStringList() << "b" << "c");
- QVERIFY(query.queryItemValue("A") == "B");
+ QCOMPARE(query.queryItemValue("A"), QLatin1String("B"));
QVERIFY(query.allQueryItemValues("A") == QStringList() << "B" << "C");
}
@@ -371,7 +366,7 @@ void tst_QUrlQuery::multiAddRemove()
QVERIFY(query.hasQueryItem("a"));
// it must have removed the first one
- QVERIFY(query.queryItemValue("a") == "c");
+ QCOMPARE(query.queryItemValue("a"), QLatin1String("c"));
}
{
@@ -720,7 +715,7 @@ void tst_QUrlQuery::old_queryItems()
QVERIFY(!url.isEmpty());
QList<QPair<QString, QString> > setItems = url.queryItems();
- QVERIFY(newItems == setItems);
+ QCOMPARE(newItems, setItems);
url.addQueryItem("1", "z");
@@ -746,18 +741,18 @@ void tst_QUrlQuery::old_queryItems()
url.removeAllQueryItems("1");
QVERIFY(!url.hasQueryItem("1"));
- QCOMPARE(url.queryItemValue("4").toLatin1().constData(), "a b");
- QCOMPARE(url.queryItemValue("5").toLatin1().constData(), "&");
- QCOMPARE(url.queryItemValue("tex").toLatin1().constData(), "a + b = c");
- QCOMPARE(url.queryItemValue("foo bar").toLatin1().constData(), "hello world");
+ QCOMPARE(url.queryItemValue("4"), QLatin1String("a b"));
+ QCOMPARE(url.queryItemValue("5"), QLatin1String("&"));
+ QCOMPARE(url.queryItemValue("tex"), QLatin1String("a + b = c"));
+ QCOMPARE(url.queryItemValue("foo bar"), QLatin1String("hello world"));
//url.setUrl("http://www.google.com/search?q=a+b");
url.setQuery("q=a+b");
- QCOMPARE(url.queryItemValue("q"), QString("a+b"));
+ QCOMPARE(url.queryItemValue("q"), QLatin1String("a+b"));
//url.setUrl("http://www.google.com/search?q=a=b"); // invalid, but should be tolerated
url.setQuery("q=a=b");
- QCOMPARE(url.queryItemValue("q"), QString("a=b"));
+ QCOMPARE(url.queryItemValue("q"), QLatin1String("a=b"));
}
void tst_QUrlQuery::old_hasQueryItem_data()
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro b/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
index b7a36459f8..4f0e9da3c2 100644
--- a/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
+++ b/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qwinoverlappedionotifier
QT = core-private testlib
SOURCES = tst_qwinoverlappedionotifier.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
index 57a01e0a79..7034c2c9fd 100644
--- a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
+++ b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -199,7 +194,7 @@ void tst_QWinOverlappedIoNotifier::waitForAnyNotified()
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
notifier.setHandle(hFile);
notifier.setEnabled(true);
- QVERIFY(notifier.waitForAnyNotified(100) == 0);
+ QVERIFY(!notifier.waitForAnyNotified(100));
OVERLAPPED overlapped1;
ZeroMemory(&overlapped1, sizeof(OVERLAPPED));
@@ -224,7 +219,7 @@ void tst_QWinOverlappedIoNotifier::waitForAnyNotified()
CloseHandle(hFile);
QVERIFY(overlappedObjects.isEmpty());
- QVERIFY(notifier.waitForAnyNotified(100) == 0);
+ QVERIFY(!notifier.waitForAnyNotified(100));
}
void tst_QWinOverlappedIoNotifier::brokenPipe()
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro b/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
index ef571de192..7480bd45f6 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qabstractitemmodel
QT = core testlib
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
index c4d2df7c3e..dcd9eda4bb 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -157,9 +152,10 @@ QtTestModel::QtTestModel(int rows, int columns, QObject *parent)
{
table.resize(rows);
for (int r = 0; r < rows; ++r) {
+ const QString prefix = QString::number(r) + QLatin1Char('/');
table[r].resize(columns);
for (int c = 0; c < columns; ++c)
- table[r][c] = QString("%1/%2").arg(r).arg(c);
+ table[r][c] = prefix + QString::number(c);
}
}
@@ -1699,8 +1695,8 @@ void tst_QAbstractItemModel::testMoveToDescendants()
moveCommand->setDestRow(row);
moveCommand->doCommand();
- QVERIFY(beforeSpy.size() == 0);
- QVERIFY(afterSpy.size() == 0);
+ QCOMPARE(beforeSpy.size(), 0);
+ QCOMPARE(afterSpy.size(), 0);
}
}
}
@@ -1757,8 +1753,8 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange()
moveCommand->setDestRow(destRow);
moveCommand->doCommand();
- QVERIFY(beforeSpy.size() == 0);
- QVERIFY(afterSpy.size() == 0);
+ QCOMPARE(beforeSpy.size(), 0);
+ QCOMPARE(afterSpy.size(), 0);
}
class ListenerObject : public QObject
@@ -1823,7 +1819,7 @@ void ListenerObject::slotAboutToBeReset()
// Nothing has been changed yet. All indexes should be the same.
for (int i = 0; i < m_persistentIndexes.size(); ++i) {
QModelIndex idx = m_persistentIndexes.at(i);
- QVERIFY(idx == m_nonPersistentIndexes.at(i));
+ QCOMPARE(idx, m_nonPersistentIndexes.at(i));
QVERIFY(m_model->mapToSource(idx).isValid());
}
}
@@ -1859,13 +1855,13 @@ void tst_QAbstractItemModel::testReset()
resetCommand->doCommand();
// Verify that the correct signals were emitted
- QVERIFY(beforeResetSpy.size() == 1);
- QVERIFY(afterResetSpy.size() == 1);
+ QCOMPARE(beforeResetSpy.size(), 1);
+ QCOMPARE(afterResetSpy.size(), 1);
// Verify that the move actually happened.
- QVERIFY(m_model->rowCount() == 9);
+ QCOMPARE(m_model->rowCount(), 9);
QModelIndex destIndex = m_model->index(4, 0);
- QVERIFY(m_model->rowCount(destIndex) == 11);
+ QCOMPARE(m_model->rowCount(destIndex), 11);
// Delete it because its slots test things which are not true after this point.
delete listener;
@@ -1877,14 +1873,14 @@ void tst_QAbstractItemModel::testReset()
QCOMPARE(nullProxy->roleNames().value(Qt::UserRole + 1), QByteArray());
nullProxy->setSourceModel(new ModelWithCustomRole(this));
- QVERIFY(proxyBeforeResetSpy.size() == 1);
- QVERIFY(proxyAfterResetSpy.size() == 1);
+ QCOMPARE(proxyBeforeResetSpy.size(), 1);
+ QCOMPARE(proxyAfterResetSpy.size(), 1);
QCOMPARE(nullProxy->roleNames().value(Qt::UserRole + 1), QByteArray("custom"));
nullProxy->setSourceModel(m_model);
- QVERIFY(proxyBeforeResetSpy.size() == 2);
- QVERIFY(proxyAfterResetSpy.size() == 2);
+ QCOMPARE(proxyBeforeResetSpy.size(), 2);
+ QCOMPARE(proxyAfterResetSpy.size(), 2);
// After being reset the proxy must be queried again.
QCOMPARE(nullProxy->roleNames().value(Qt::UserRole + 1), QByteArray());
@@ -2055,10 +2051,10 @@ void tst_QAbstractItemModel::testChildrenLayoutsChanged()
QVERIFY(afterParents.contains(p2));
// The first will be the last, and the lest will be the first.
- QVERIFY(p1FirstPersistent.row() == 1);
- QVERIFY(p1LastPersistent.row() == 0);
- QVERIFY(p2FirstPersistent.row() == 9);
- QVERIFY(p2LastPersistent.row() == 8);
+ QCOMPARE(p1FirstPersistent.row(), 1);
+ QCOMPARE(p1LastPersistent.row(), 0);
+ QCOMPARE(p2FirstPersistent.row(), 9);
+ QCOMPARE(p2LastPersistent.row(), 8);
}
insertCommand = new ModelInsertCommand(&model, this);
@@ -2115,8 +2111,8 @@ void tst_QAbstractItemModel::testChildrenLayoutsChanged()
QCOMPARE(beforeSignal.size(), 2);
QCOMPARE(afterSignal.size(), 2);
- QVERIFY(p1FirstPersistent.row() == 1);
- QVERIFY(p1LastPersistent.row() == 0);
+ QCOMPARE(p1FirstPersistent.row(), 1);
+ QCOMPARE(p1LastPersistent.row(), 0);
QCOMPARE(p2FirstPersistent.row(), 9);
QCOMPARE(p2LastPersistent.row(), 8);
}
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro b/tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro
index 7209620b91..19aec43072 100644
--- a/tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/qabstractproxymodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qabstractproxymodel
QT += testlib
SOURCES += tst_qabstractproxymodel.cpp
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
index fb9d118d60..6c870737da 100644
--- a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -351,7 +346,7 @@ static void verifySubSetOf(const QHash<int, QByteArray> &superSet, const QHash<i
const QHash<int, QByteArray>::const_iterator end = subSet.constEnd();
for ( ; it != end; ++it ) {
QVERIFY(superSet.contains(it.key()));
- QVERIFY(it.value() == superSet.value(it.key()));
+ QCOMPARE(it.value(), superSet.value(it.key()));
}
}
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro b/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
index f57b419ae5..ba32f02962 100644
--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qidentityproxymodel
mtdir = ../../../other/modeltest
@@ -7,4 +6,3 @@ INCLUDEPATH += $$PWD/$${mtdir}
QT += testlib
SOURCES += tst_qidentityproxymodel.cpp $${mtdir}/dynamictreemodel.cpp $${mtdir}/modeltest.cpp
HEADERS += $${mtdir}/dynamictreemodel.h $${mtdir}/modeltest.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
index 9eb3bc5113..e946f3104a 100644
--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -111,25 +106,25 @@ void tst_QIdentityProxyModel::verifyIdentity(QAbstractItemModel *model, const QM
const int columns = model->columnCount(parent);
const QModelIndex proxyParent = m_proxy->mapFromSource(parent);
- QVERIFY(m_proxy->mapToSource(proxyParent) == parent);
- QVERIFY(rows == m_proxy->rowCount(proxyParent));
- QVERIFY(columns == m_proxy->columnCount(proxyParent));
+ QCOMPARE(m_proxy->mapToSource(proxyParent), parent);
+ QCOMPARE(rows, m_proxy->rowCount(proxyParent));
+ QCOMPARE(columns, m_proxy->columnCount(proxyParent));
for (int row = 0; row < rows; ++row) {
for (int column = 0; column < columns; ++column) {
const QModelIndex idx = model->index(row, column, parent);
const QModelIndex proxyIdx = m_proxy->mapFromSource(idx);
- QVERIFY(proxyIdx.model() == m_proxy);
- QVERIFY(m_proxy->mapToSource(proxyIdx) == idx);
+ QCOMPARE(proxyIdx.model(), m_proxy);
+ QCOMPARE(m_proxy->mapToSource(proxyIdx), idx);
QVERIFY(proxyIdx.isValid());
- QVERIFY(proxyIdx.row() == row);
- QVERIFY(proxyIdx.column() == column);
- QVERIFY(proxyIdx.parent() == proxyParent);
- QVERIFY(proxyIdx.data() == idx.data());
- QVERIFY(proxyIdx.flags() == idx.flags());
+ QCOMPARE(proxyIdx.row(), row);
+ QCOMPARE(proxyIdx.column(), column);
+ QCOMPARE(proxyIdx.parent(), proxyParent);
+ QCOMPARE(proxyIdx.data(), idx.data());
+ QCOMPARE(proxyIdx.flags(), idx.flags());
const int childCount = m_proxy->rowCount(proxyIdx);
const bool hasChildren = m_proxy->hasChildren(proxyIdx);
- QVERIFY(model->hasChildren(idx) == hasChildren);
+ QCOMPARE(model->hasChildren(idx), hasChildren);
QVERIFY((childCount > 0) == hasChildren);
if (hasChildren)
@@ -146,7 +141,7 @@ void tst_QIdentityProxyModel::insertRows()
{
QStandardItem *parentItem = m_model->invisibleRootItem();
for (int i = 0; i < 4; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
parentItem = item;
}
@@ -171,13 +166,13 @@ void tst_QIdentityProxyModel::insertRows()
QVERIFY(modelBeforeSpy.size() == 1 && 1 == proxyBeforeSpy.size());
QVERIFY(modelAfterSpy.size() == 1 && 1 == proxyAfterSpy.size());
- QVERIFY(modelBeforeSpy.first().first().value<QModelIndex>() == m_proxy->mapToSource(proxyBeforeSpy.first().first().value<QModelIndex>()));
- QVERIFY(modelBeforeSpy.first().at(1) == proxyBeforeSpy.first().at(1));
- QVERIFY(modelBeforeSpy.first().at(2) == proxyBeforeSpy.first().at(2));
+ QCOMPARE(modelBeforeSpy.first().first().value<QModelIndex>(), m_proxy->mapToSource(proxyBeforeSpy.first().first().value<QModelIndex>()));
+ QCOMPARE(modelBeforeSpy.first().at(1), proxyBeforeSpy.first().at(1));
+ QCOMPARE(modelBeforeSpy.first().at(2), proxyBeforeSpy.first().at(2));
- QVERIFY(modelAfterSpy.first().first().value<QModelIndex>() == m_proxy->mapToSource(proxyAfterSpy.first().first().value<QModelIndex>()));
- QVERIFY(modelAfterSpy.first().at(1) == proxyAfterSpy.first().at(1));
- QVERIFY(modelAfterSpy.first().at(2) == proxyAfterSpy.first().at(2));
+ QCOMPARE(modelAfterSpy.first().first().value<QModelIndex>(), m_proxy->mapToSource(proxyAfterSpy.first().first().value<QModelIndex>()));
+ QCOMPARE(modelAfterSpy.first().at(1), proxyAfterSpy.first().at(1));
+ QCOMPARE(modelAfterSpy.first().at(2), proxyAfterSpy.first().at(2));
verifyIdentity(m_model);
}
@@ -186,7 +181,7 @@ void tst_QIdentityProxyModel::removeRows()
{
QStandardItem *parentItem = m_model->invisibleRootItem();
for (int i = 0; i < 4; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
parentItem = item;
}
@@ -216,13 +211,13 @@ void tst_QIdentityProxyModel::removeRows()
QVERIFY(modelBeforeSpy.size() == 1 && 1 == proxyBeforeSpy.size());
QVERIFY(modelAfterSpy.size() == 1 && 1 == proxyAfterSpy.size());
- QVERIFY(modelBeforeSpy.first().first().value<QModelIndex>() == m_proxy->mapToSource(proxyBeforeSpy.first().first().value<QModelIndex>()));
- QVERIFY(modelBeforeSpy.first().at(1) == proxyBeforeSpy.first().at(1));
- QVERIFY(modelBeforeSpy.first().at(2) == proxyBeforeSpy.first().at(2));
+ QCOMPARE(modelBeforeSpy.first().first().value<QModelIndex>(), m_proxy->mapToSource(proxyBeforeSpy.first().first().value<QModelIndex>()));
+ QCOMPARE(modelBeforeSpy.first().at(1), proxyBeforeSpy.first().at(1));
+ QCOMPARE(modelBeforeSpy.first().at(2), proxyBeforeSpy.first().at(2));
- QVERIFY(modelAfterSpy.first().first().value<QModelIndex>() == m_proxy->mapToSource(proxyAfterSpy.first().first().value<QModelIndex>()));
- QVERIFY(modelAfterSpy.first().at(1) == proxyAfterSpy.first().at(1));
- QVERIFY(modelAfterSpy.first().at(2) == proxyAfterSpy.first().at(2));
+ QCOMPARE(modelAfterSpy.first().first().value<QModelIndex>(), m_proxy->mapToSource(proxyAfterSpy.first().first().value<QModelIndex>()));
+ QCOMPARE(modelAfterSpy.first().at(1), proxyAfterSpy.first().at(1));
+ QCOMPARE(modelAfterSpy.first().at(2), proxyAfterSpy.first().at(2));
verifyIdentity(m_model);
}
@@ -271,17 +266,17 @@ void tst_QIdentityProxyModel::moveRows()
QVERIFY(modelBeforeSpy.size() == 1 && 1 == proxyBeforeSpy.size());
QVERIFY(modelAfterSpy.size() == 1 && 1 == proxyAfterSpy.size());
- QVERIFY(modelBeforeSpy.first().first().value<QModelIndex>() == m_proxy->mapToSource(proxyBeforeSpy.first().first().value<QModelIndex>()));
- QVERIFY(modelBeforeSpy.first().at(1) == proxyBeforeSpy.first().at(1));
- QVERIFY(modelBeforeSpy.first().at(2) == proxyBeforeSpy.first().at(2));
- QVERIFY(modelBeforeSpy.first().at(3).value<QModelIndex>() == m_proxy->mapToSource(proxyBeforeSpy.first().at(3).value<QModelIndex>()));
- QVERIFY(modelBeforeSpy.first().at(4) == proxyBeforeSpy.first().at(4));
+ QCOMPARE(modelBeforeSpy.first().first().value<QModelIndex>(), m_proxy->mapToSource(proxyBeforeSpy.first().first().value<QModelIndex>()));
+ QCOMPARE(modelBeforeSpy.first().at(1), proxyBeforeSpy.first().at(1));
+ QCOMPARE(modelBeforeSpy.first().at(2), proxyBeforeSpy.first().at(2));
+ QCOMPARE(modelBeforeSpy.first().at(3).value<QModelIndex>(), m_proxy->mapToSource(proxyBeforeSpy.first().at(3).value<QModelIndex>()));
+ QCOMPARE(modelBeforeSpy.first().at(4), proxyBeforeSpy.first().at(4));
- QVERIFY(modelAfterSpy.first().first().value<QModelIndex>() == m_proxy->mapToSource(proxyAfterSpy.first().first().value<QModelIndex>()));
- QVERIFY(modelAfterSpy.first().at(1) == proxyAfterSpy.first().at(1));
- QVERIFY(modelAfterSpy.first().at(2) == proxyAfterSpy.first().at(2));
- QVERIFY(modelAfterSpy.first().at(3).value<QModelIndex>() == m_proxy->mapToSource(proxyAfterSpy.first().at(3).value<QModelIndex>()));
- QVERIFY(modelAfterSpy.first().at(4) == proxyAfterSpy.first().at(4));
+ QCOMPARE(modelAfterSpy.first().first().value<QModelIndex>(), m_proxy->mapToSource(proxyAfterSpy.first().first().value<QModelIndex>()));
+ QCOMPARE(modelAfterSpy.first().at(1), proxyAfterSpy.first().at(1));
+ QCOMPARE(modelAfterSpy.first().at(2), proxyAfterSpy.first().at(2));
+ QCOMPARE(modelAfterSpy.first().at(3).value<QModelIndex>(), m_proxy->mapToSource(proxyAfterSpy.first().at(3).value<QModelIndex>()));
+ QCOMPARE(modelAfterSpy.first().at(4), proxyAfterSpy.first().at(4));
verifyIdentity(&model);
@@ -352,7 +347,7 @@ void tst_QIdentityProxyModel::dataChanged()
model.changeData();
QCOMPARE(modelSpy.first().at(2).value<QVector<int> >(), QVector<int>() << 1);
- QVERIFY(modelSpy.first().at(2) == proxySpy.first().at(2));
+ QCOMPARE(modelSpy.first().at(2), proxySpy.first().at(2));
verifyIdentity(&model);
m_proxy->setSourceModel(0);
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
index e0e688cc3a..4b3f76a78e 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -236,7 +231,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
{
if (QStringListModel *stringListModel = qobject_cast<QStringListModel *>(model)) {
QString alphabet = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z";
- stringListModel->setStringList( alphabet.split(",") );
+ stringListModel->setStringList( alphabet.split(QLatin1Char(',')) );
return QModelIndex();
}
@@ -317,7 +312,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
QDir tempDir(m_dirModelTempDir->path());
for (int i = 0; i < 26; ++i) {
- const QString subdir = QString("foo_") + QString::number(i);
+ const QString subdir = QLatin1String("foo_") + QString::number(i);
if (!tempDir.mkdir(subdir))
qFatal("Cannot create directory %s",
qPrintable(QDir::toNativeSeparators(tempDir.path() + QLatin1Char('/') +subdir)));
@@ -355,7 +350,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
int items = 50;
#endif
while (items--)
- listWidget->addItem(QString("item %1").arg(items));
+ listWidget->addItem(QLatin1String("item ") + QString::number(items));
return QModelIndex();
}
@@ -370,9 +365,10 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
treeWidget->setColumnCount(1);
QTreeWidgetItem *parent;
while (topItems--){
- parent = new QTreeWidgetItem(treeWidget, QStringList(QString("top %1").arg(topItems)));
+ const QString tS = QString::number(topItems);
+ parent = new QTreeWidgetItem(treeWidget, QStringList(QLatin1String("top ") + tS));
for (int i = 0; i < 20; ++i)
- new QTreeWidgetItem(parent, QStringList(QString("child %1").arg(topItems)));
+ new QTreeWidgetItem(parent, QStringList(QLatin1String("child ") + tS));
}
return QModelIndex();
}
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro b/tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro
index 42c9c8f9fb..ff21d6afa5 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro
+++ b/tests/auto/corelib/itemmodels/qitemmodel/qitemmodel.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qitemmodel
QT += widgets sql testlib
SOURCES = tst_qitemmodel.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
index 6971f7ef78..8ebb860edd 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -359,7 +354,7 @@ void tst_QItemModel::index()
// Make sure that the same index is always returned
QModelIndex a = currentModel->index(0,0);
QModelIndex b = currentModel->index(0,0);
- QVERIFY(a == b);
+ QCOMPARE(a, b);
// index is tested more extensivly more later in checkChildren(),
// but this catches the big mistakes
@@ -423,7 +418,7 @@ void checkChildren(QAbstractItemModel *currentModel, const QModelIndex &parent,
// Make sure we get the same index if we request it twice in a row
QModelIndex a = currentModel->index(r, c, parent);
QModelIndex b = currentModel->index(r, c, parent);
- QVERIFY(a == b);
+ QCOMPARE(a, b);
{
const QModelIndex sibling = currentModel->sibling( r, c, topLeftChild );
@@ -435,7 +430,7 @@ void checkChildren(QAbstractItemModel *currentModel, const QModelIndex &parent,
}
// Some basic checking on the index that is returned
- QVERIFY(index.model() == currentModel);
+ QCOMPARE(index.model(), currentModel);
QCOMPARE(index.row(), r);
QCOMPARE(index.column(), c);
QCOMPARE(currentModel->data(index, Qt::DisplayRole).isValid(), true);
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro b/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
index 1b6279ba1b..4dcddc8feb 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qitemselectionmodel
QT += testlib
SOURCES += tst_qitemselectionmodel.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
index 38e2900c25..fb3968c838 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -1515,7 +1510,7 @@ class MyStandardItemModel: public QStandardItemModel
Q_OBJECT
public:
inline MyStandardItemModel(int i1, int i2): QStandardItemModel(i1, i2) {}
- inline void reset() { QStandardItemModel::reset(); }
+ inline void reset() { beginResetModel(); endResetModel(); }
};
void tst_QItemSelectionModel::resetModel()
@@ -1760,7 +1755,7 @@ void tst_QItemSelectionModel::modelLayoutChanged()
// verify that selection is as expected
QItemSelection selection = selectionModel.selection();
QCOMPARE(selection.count(), expectedSelectedRanges.count());
- QVERIFY(selectionModel.hasSelection() == !expectedSelectedRanges.isEmpty());
+ QCOMPARE(selectionModel.hasSelection(), !expectedSelectedRanges.isEmpty());
for (int i = 0; i < expectedSelectedRanges.count(); ++i) {
IntPairPair expectedRange = expectedSelectedRanges.at(i);
@@ -1974,8 +1969,9 @@ void tst_QItemSelectionModel::rowIntersectsSelection2()
{
QStandardItemModel m;
for (int i=0; i<8; ++i) {
+ const QString text = QLatin1String("Item number ") + QString::number(i);
for (int j=0; j<8; ++j) {
- QStandardItem *item = new QStandardItem(QString("Item number %1").arg(i));
+ QStandardItem *item = new QStandardItem(text);
if ((i % 2 == 0 && j == 0) ||
(j % 2 == 0 && i == 0) ||
j == 5 || i == 5 ) {
@@ -2021,7 +2017,7 @@ void tst_QItemSelectionModel::rowIntersectsSelection3()
QStandardItemModel model;
QStandardItem *parentItem = model.invisibleRootItem();
for (int i = 0; i < 4; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
parentItem = item;
}
@@ -2046,7 +2042,7 @@ void tst_QItemSelectionModel::unselectable()
QStandardItem *parentItem = model.invisibleRootItem();
for (int i = 0; i < 10; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
}
QItemSelectionModel selectionModel(&model);
@@ -2093,7 +2089,8 @@ public:
QVariant data(const QModelIndex &idx, int role) const
{
if (role == Qt::DisplayRole || role == Qt::EditRole)
- return QString("[%1,%2]").arg(idx.row()).arg(idx.column());
+ return QLatin1Char('[') + QString::number(idx.row()) + QLatin1Char(',')
+ + QString::number(idx.column()) + QLatin1Char(']');
return QVariant();
}
@@ -2202,7 +2199,7 @@ void tst_QItemSelectionModel::childrenDeselectionSignal()
QStandardItem *parentItem = model.invisibleRootItem();
for (int i = 0; i < 4; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
parentItem = item;
}
@@ -2217,7 +2214,7 @@ void tst_QItemSelectionModel::childrenDeselectionSignal()
QSignalSpy deselectSpy(&selectionModel, &QItemSelectionModel::selectionChanged);
QVERIFY(deselectSpy.isValid());
model.removeRows(0, 1, root);
- QVERIFY(deselectSpy.count() == 1);
+ QCOMPARE(deselectSpy.count(), 1);
// More testing stress for the patch.
model.clear();
@@ -2225,13 +2222,14 @@ void tst_QItemSelectionModel::childrenDeselectionSignal()
parentItem = model.invisibleRootItem();
for (int i = 0; i < 2; ++i) {
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
}
for (int i = 0; i < 2; ++i) {
parentItem = model.invisibleRootItem()->child(i, 0);
+ const QString prefix = QLatin1String("item ") + QString::number(i) + QLatin1Char('.');
for (int j = 0; j < 2; ++j) {
- QStandardItem *item = new QStandardItem(QString("item %0.%1").arg(i).arg(j));
+ QStandardItem *item = new QStandardItem(prefix + QString::number(j));
parentItem->appendRow(item);
}
}
@@ -2245,7 +2243,7 @@ void tst_QItemSelectionModel::childrenDeselectionSignal()
QVERIFY(selectionModel.selection().contains(sel2));
deselectSpy.clear();
model.removeRow(0, model.index(0, 0));
- QVERIFY(deselectSpy.count() == 1);
+ QCOMPARE(deselectSpy.count(), 1);
QVERIFY(!selectionModel.selection().contains(sel));
QVERIFY(selectionModel.selection().contains(sel2));
}
@@ -2304,13 +2302,12 @@ void tst_QItemSelectionModel::layoutChangedWithAllSelected2()
// Populate the tree view.
for (unsigned int i = 0; i < cNumCols; i++)
- model.setHeaderData( i, Qt::Horizontal, QString::fromLatin1("Column %1").arg(i));
+ model.setHeaderData( i, Qt::Horizontal, QLatin1String("Column ") + QString::number(i));
for (unsigned int r = 0; r < cNumRows; r++) {
- for (unsigned int c = 0; c < cNumCols; c++) {
- model.setData(model.index(r, c, QModelIndex()),
- QString::fromLatin1("r:%1/c:%2").arg(r, c));
- }
+ const QString prefix = QLatin1String("r:") + QString::number(r) + QLatin1String("/c:");
+ for (unsigned int c = 0; c < cNumCols; c++)
+ model.setData(model.index(r, c, QModelIndex()), prefix + QString::number(c));
}
QCOMPARE(model.rowCount(), int(cNumRows));
@@ -2375,7 +2372,7 @@ public slots:
foreach(const QModelIndex &index, deselected.indexes()) {
QVERIFY(!m_itemSelectionModel->selection().contains(index));
}
- QVERIFY(m_itemSelectionModel->selection().size() == 2);
+ QCOMPARE(m_itemSelectionModel->selection().size(), 2);
}
};
@@ -2393,7 +2390,7 @@ void tst_QItemSelectionModel::deselectRemovedMiddleRange()
selModel.select(QItemSelection(model.index(3, 0), model.index(6, 0)), QItemSelectionModel::Select);
- QVERIFY(selModel.selection().size() == 1);
+ QCOMPARE(selModel.selection().size(), 1);
RemovalObserver ro(&selModel);
@@ -2402,7 +2399,7 @@ void tst_QItemSelectionModel::deselectRemovedMiddleRange()
bool ok = model.removeRows(4, 2);
QVERIFY(ok);
- QVERIFY(spy.size() == 1);
+ QCOMPARE(spy.size(), 1);
}
static QStandardItemModel* getModel(QObject *parent)
@@ -2412,15 +2409,16 @@ static QStandardItemModel* getModel(QObject *parent)
for (int i = 0; i < 4; ++i) {
QStandardItem *parentItem = model->invisibleRootItem();
QList<QStandardItem*> list;
+ const QString prefix = QLatin1String("item ") + QString::number(i) + QLatin1String(", ");
for (int j = 0; j < 4; ++j) {
- list.append(new QStandardItem(QString("item %1, %2").arg(i).arg(j)));
+ list.append(new QStandardItem(prefix + QString::number(j)));
}
parentItem->appendRow(list);
parentItem = list.first();
for (int j = 0; j < 4; ++j) {
QList<QStandardItem*> list;
for (int k = 0; k < 4; ++k) {
- list.append(new QStandardItem(QString("item %1, %2").arg(i).arg(j)));
+ list.append(new QStandardItem(prefix + QString::number(j)));
}
parentItem->appendRow(list);
}
@@ -2713,8 +2711,8 @@ void tst_QItemSelectionModel::testChainedSelectionClear()
QModelIndexList selectedIndexes = selectionModel.selection().indexes();
QModelIndexList duplicatedIndexes = duplicate.selection().indexes();
- QVERIFY(selectedIndexes.size() == duplicatedIndexes.size());
- QVERIFY(selectedIndexes.size() == 1);
+ QCOMPARE(selectedIndexes.size(), duplicatedIndexes.size());
+ QCOMPARE(selectedIndexes.size(), 1);
QVERIFY(selectedIndexes.first() == model.index(0, 0));
}
@@ -2724,18 +2722,18 @@ void tst_QItemSelectionModel::testChainedSelectionClear()
QModelIndexList selectedIndexes = selectionModel.selection().indexes();
QModelIndexList duplicatedIndexes = duplicate.selection().indexes();
- QVERIFY(selectedIndexes.size() == duplicatedIndexes.size());
- QVERIFY(selectedIndexes.size() == 0);
+ QCOMPARE(selectedIndexes.size(), duplicatedIndexes.size());
+ QCOMPARE(selectedIndexes.size(), 0);
}
duplicate.setCurrentIndex(model.index(0, 0), QItemSelectionModel::NoUpdate);
- QVERIFY(selectionModel.currentIndex() == duplicate.currentIndex());
+ QCOMPARE(selectionModel.currentIndex(), duplicate.currentIndex());
duplicate.clearCurrentIndex();
QVERIFY(!duplicate.currentIndex().isValid());
- QVERIFY(selectionModel.currentIndex() == duplicate.currentIndex());
+ QCOMPARE(selectionModel.currentIndex(), duplicate.currentIndex());
}
void tst_QItemSelectionModel::testClearCurrentIndex()
@@ -2750,13 +2748,13 @@ void tst_QItemSelectionModel::testClearCurrentIndex()
QModelIndex firstIndex = model.index(0, 0);
QVERIFY(firstIndex.isValid());
selectionModel.setCurrentIndex(firstIndex, QItemSelectionModel::NoUpdate);
- QVERIFY(selectionModel.currentIndex() == firstIndex);
- QVERIFY(currentIndexSpy.size() == 1);
+ QCOMPARE(selectionModel.currentIndex(), firstIndex);
+ QCOMPARE(currentIndexSpy.size(), 1);
selectionModel.clearCurrentIndex();
- QVERIFY(selectionModel.currentIndex() == QModelIndex());
- QVERIFY(currentIndexSpy.size() == 2);
+ QCOMPARE(selectionModel.currentIndex(), QModelIndex());
+ QCOMPARE(currentIndexSpy.size(), 2);
}
void tst_QItemSelectionModel::QTBUG48402_data()
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
index 25947990a7..099f666def 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsortfilterproxymodel
QT += widgets testlib
@@ -8,4 +7,3 @@ mtdir = ../../../other/modeltest
INCLUDEPATH += $$PWD/$${mtdir}
SOURCES += tst_qsortfilterproxymodel.cpp $${mtdir}/dynamictreemodel.cpp $${mtdir}/modeltest.cpp
HEADERS += $${mtdir}/dynamictreemodel.h $${mtdir}/modeltest.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 4dd0b19ce8..38e3c6890d 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -342,7 +337,7 @@ void tst_QSortFilterProxyModel::sort_data()
QStringList list;
for (int i = 10000; i < 20000; ++i)
- list.append(QString("Number: %1").arg(i));
+ list.append(QStringLiteral("Number: ") + QString::number(i));
QTest::newRow("large set ascending") << static_cast<int>(Qt::AscendingOrder) << int(Qt::CaseSensitive) << list << list;
}
@@ -1347,14 +1342,14 @@ void tst_QSortFilterProxyModel::buildHierarchy(const QStringList &l, QAbstractIt
QStack<QModelIndex> parent_stack;
for (int i = 0; i < l.count(); ++i) {
QString token = l.at(i);
- if (token == "<") { // start table
+ if (token == QLatin1String("<")) { // start table
++ind;
parent_stack.push(parent);
row_stack.push(row);
parent = m->index(row - 1, 0, parent);
row = 0;
QVERIFY(m->insertColumns(0, 1, parent)); // add column
- } else if (token == ">") { // end table
+ } else if (token == QLatin1String(">")) { // end table
--ind;
parent = parent_stack.pop();
row = row_stack.pop();
@@ -1377,14 +1372,14 @@ void tst_QSortFilterProxyModel::checkHierarchy(const QStringList &l, const QAbst
QStack<QModelIndex> parent_stack;
for (int i = 0; i < l.count(); ++i) {
QString token = l.at(i);
- if (token == "<") { // start table
+ if (token == QLatin1String("<")) { // start table
++indent;
parent_stack.push(parent);
row_stack.push(row);
parent = m->index(row - 1, 0, parent);
QVERIFY(parent.isValid());
row = 0;
- } else if (token == ">") { // end table
+ } else if (token == QLatin1String(">")) { // end table
--indent;
parent = parent_stack.pop();
row = row_stack.pop();
@@ -1419,7 +1414,7 @@ void tst_QSortFilterProxyModel::filterTable()
filter.setFilterRegExp("9");
for (int i = 0; i < filter.rowCount(); ++i)
- QVERIFY(filter.data(filter.index(i, 0)).toString().contains("9"));
+ QVERIFY(filter.data(filter.index(i, 0)).toString().contains(QLatin1Char('9')));
}
void tst_QSortFilterProxyModel::insertAfterSelect()
@@ -1664,16 +1659,16 @@ void tst_QSortFilterProxyModel::removeSourceRows()
QCOMPARE(aboutToRemoveSpy.count(), expectedRemovedProxyIntervals.count());
for (int i = 0; i < aboutToRemoveSpy.count(); ++i) {
QList<QVariant> args = aboutToRemoveSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), expectedRemovedProxyIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), expectedRemovedProxyIntervals.at(i).second);
}
QCOMPARE(removeSpy.count(), expectedRemovedProxyIntervals.count());
for (int i = 0; i < removeSpy.count(); ++i) {
QList<QVariant> args = removeSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), expectedRemovedProxyIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), expectedRemovedProxyIntervals.at(i).second);
}
@@ -1842,8 +1837,8 @@ void tst_QSortFilterProxyModel::changeFilter()
QCOMPARE(initialInsertSpy.count(), 0);
for (int i = 0; i < initialRemoveSpy.count(); ++i) {
QList<QVariant> args = initialRemoveSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), initialRemoveIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), initialRemoveIntervals.at(i).second);
}
@@ -1865,8 +1860,8 @@ void tst_QSortFilterProxyModel::changeFilter()
QCOMPARE(finalRemoveSpy.count(), finalRemoveIntervals.count());
for (int i = 0; i < finalRemoveSpy.count(); ++i) {
QList<QVariant> args = finalRemoveSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), finalRemoveIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), finalRemoveIntervals.at(i).second);
}
@@ -1877,8 +1872,8 @@ void tst_QSortFilterProxyModel::changeFilter()
QCOMPARE(finalInsertSpy.count(), insertIntervals.count());
for (int i = 0; i < finalInsertSpy.count(); ++i) {
QList<QVariant> args = finalInsertSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), insertIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), insertIntervals.at(i).second);
}
@@ -2019,8 +2014,8 @@ void tst_QSortFilterProxyModel::changeSourceData()
QCOMPARE(removeSpy.count(), removeIntervals.count());
for (int i = 0; i < removeSpy.count(); ++i) {
QList<QVariant> args = removeSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), removeIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), removeIntervals.at(i).second);
}
@@ -2028,8 +2023,8 @@ void tst_QSortFilterProxyModel::changeSourceData()
QCOMPARE(insertSpy.count(), insertIntervals.count());
for (int i = 0; i < insertSpy.count(); ++i) {
QList<QVariant> args = insertSpy.at(i);
- QVERIFY(args.at(1).type() == QVariant::Int);
- QVERIFY(args.at(2).type() == QVariant::Int);
+ QCOMPARE(args.at(1).type(), QVariant::Int);
+ QCOMPARE(args.at(2).type(), QVariant::Int);
QCOMPARE(args.at(1).toInt(), insertIntervals.at(i).first);
QCOMPARE(args.at(2).toInt(), insertIntervals.at(i).second);
}
@@ -2552,12 +2547,11 @@ void tst_QSortFilterProxyModel::sortStable()
{
QStandardItemModel* model = new QStandardItemModel(5, 2);
for (int r = 0; r < 5; r++) {
+ const QString prefix = QLatin1String("Row:") + QString::number(r) + QLatin1String(", Column:");
for (int c = 0; c < 2; c++) {
- QStandardItem* item = new QStandardItem(
- QString("Row:%0, Column:%1").arg(r).arg(c) );
+ QStandardItem* item = new QStandardItem(prefix + QString::number(c));
for (int i = 0; i < 3; i++) {
- QStandardItem* child = new QStandardItem(
- QString("Item %0").arg(i) );
+ QStandardItem* child = new QStandardItem(QLatin1String("Item ") + QString::number(i));
item->appendRow( child );
}
model->setItem(r, c, item);
@@ -2588,7 +2582,7 @@ void tst_QSortFilterProxyModel::hiddenColumns()
public:
MyStandardItemModel() : QStandardItemModel(0,5) {}
void reset()
- { QStandardItemModel::reset(); }
+ { beginResetModel(); endResetModel(); }
friend class tst_QSortFilterProxyModel;
} model;
QSortFilterProxyModel proxy;
@@ -2632,7 +2626,7 @@ void tst_QSortFilterProxyModel::staticSorting()
QSortFilterProxyModel proxy;
proxy.setSourceModel(&model);
proxy.setDynamicSortFilter(false);
- QStringList initial = QString("bateau avion dragon hirondelle flamme camion elephant").split(" ");
+ QStringList initial = QString("bateau avion dragon hirondelle flamme camion elephant").split(QLatin1Char(' '));
// prepare model
QStandardItem *root = model.invisibleRootItem ();
@@ -2687,7 +2681,7 @@ void tst_QSortFilterProxyModel::staticSorting()
void tst_QSortFilterProxyModel::dynamicSorting()
{
QStringListModel model1;
- const QStringList initial = QString("bateau avion dragon hirondelle flamme camion elephant").split(" ");
+ const QStringList initial = QString("bateau avion dragon hirondelle flamme camion elephant").split(QLatin1Char(' '));
model1.setStringList(initial);
QSortFilterProxyModel proxy1;
proxy1.setDynamicSortFilter(false);
@@ -2813,7 +2807,8 @@ public:
qWarning("Invalid modelIndex [%d,%d,%p]", idx.row(), idx.column(),
idx.internalPointer());
}
- return QString("[%1,%2]").arg(idx.row()).arg(idx.column());
+ return QLatin1Char('[') + QString::number(idx.row()) + QLatin1Char(',')
+ + QString::number(idx.column()) + QLatin1Char(']');
}
return QVariant();
}
@@ -2978,7 +2973,7 @@ void tst_QSortFilterProxyModel::doubleProxySelectionSetSourceModel()
QStandardItemModel *model1 = new QStandardItemModel;
QStandardItem *parentItem = model1->invisibleRootItem();
for (int i = 0; i < 4; ++i) {
- QStandardItem *item = new QStandardItem(QString("model1 item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("model1 item ") + QString::number(i));
parentItem->appendRow(item);
parentItem = item;
}
@@ -2986,7 +2981,7 @@ void tst_QSortFilterProxyModel::doubleProxySelectionSetSourceModel()
QStandardItemModel *model2 = new QStandardItemModel;
QStandardItem *parentItem2 = model2->invisibleRootItem();
for (int i = 0; i < 4; ++i) {
- QStandardItem *item = new QStandardItem(QString("model2 item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("model2 item ") + QString::number(i));
parentItem2->appendRow(item);
parentItem2 = item;
}
@@ -3085,7 +3080,7 @@ void tst_QSortFilterProxyModel::appearsAndSort()
void tst_QSortFilterProxyModel::unnecessaryDynamicSorting()
{
QStringListModel model;
- const QStringList initial = QString("bravo charlie delta echo").split(" ");
+ const QStringList initial = QString("bravo charlie delta echo").split(QLatin1Char(' '));
model.setStringList(initial);
QSortFilterProxyModel proxy;
proxy.setDynamicSortFilter(false);
@@ -3169,7 +3164,7 @@ private:
void tst_QSortFilterProxyModel::testMultipleProxiesWithSelection()
{
QStringListModel model;
- const QStringList initial = QString("bravo charlie delta echo").split(" ");
+ const QStringList initial = QString("bravo charlie delta echo").split(QLatin1Char(' '));
model.setStringList(initial);
QSortFilterProxyModel proxy;
@@ -3203,7 +3198,7 @@ static bool isValid(const QItemSelection &selection)
void tst_QSortFilterProxyModel::mapSelectionFromSource()
{
QStringListModel model;
- const QStringList initial = QString("bravo charlie delta echo").split(" ");
+ const QStringList initial = QString("bravo charlie delta echo").split(QLatin1Char(' '));
model.setStringList(initial);
QSortFilterProxyModel proxy;
@@ -3212,7 +3207,7 @@ void tst_QSortFilterProxyModel::mapSelectionFromSource()
proxy.setSourceModel(&model);
// Only "delta" remains.
- QVERIFY(proxy.rowCount() == 1);
+ QCOMPARE(proxy.rowCount(), 1);
QItemSelection selection;
QModelIndex charlie = model.index(1, 0);
@@ -3227,7 +3222,7 @@ void tst_QSortFilterProxyModel::mapSelectionFromSource()
QItemSelection proxiedSelection = proxy.mapSelectionFromSource(selection);
// Only "delta" is in the mapped result.
- QVERIFY(proxiedSelection.size() == 1);
+ QCOMPARE(proxiedSelection.size(), 1);
QVERIFY(isValid(proxiedSelection));
}
@@ -3384,7 +3379,10 @@ void tst_QSortFilterProxyModel::resetInvalidate()
{
switch (test) {
case 0: break;
- case 1: reset(); break;
+ case 1:
+ beginResetModel();
+ endResetModel();
+ break;
case 2: invalidate(); break;
case 3: invalidateFilter(); break;
}
@@ -3558,11 +3556,11 @@ void tst_QSortFilterProxyModel::testParentLayoutChanged()
QStandardItem *parentItem = model.invisibleRootItem();
for (int i = 0; i < 4; ++i) {
{
- QStandardItem *item = new QStandardItem(QString("item %0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item ") + QString::number(i));
parentItem->appendRow(item);
}
{
- QStandardItem *item = new QStandardItem(QString("item 1%0").arg(i));
+ QStandardItem *item = new QStandardItem(QLatin1String("item 1") + QString::number(i));
parentItem->appendRow(item);
parentItem = item;
}
@@ -3865,9 +3863,10 @@ void tst_QSortFilterProxyModel::hierarchyFilterInvalidation()
{
QStandardItemModel model;
for (int i = 0; i < 10; ++i) {
- QStandardItem *child = new QStandardItem(QString("Row %1").arg(i));
+ const QString rowText = QLatin1String("Row ") + QString::number(i);
+ QStandardItem *child = new QStandardItem(rowText);
for (int j = 0; j < 1; ++j) {
- child->appendRow(new QStandardItem(QString("Row %1/%2").arg(i).arg(j)));
+ child->appendRow(new QStandardItem(rowText + QLatin1Char('/') + QString::number(j)));
}
model.appendRow(child);
}
@@ -3926,7 +3925,7 @@ void tst_QSortFilterProxyModel::simpleFilterInvalidation()
{
QStandardItemModel model;
for (int i = 0; i < 2; ++i) {
- QStandardItem *child = new QStandardItem(QString("Row %1").arg(i));
+ QStandardItem *child = new QStandardItem(QLatin1String("Row ") + QString::number(i));
child->appendRow(new QStandardItem("child"));
model.appendRow(child);
}
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h b/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
index b458f7abc9..e08a0bdb1f 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro b/tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro
index e11e16b203..91a4cf306c 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/qstringlistmodel.pro
@@ -1,7 +1,5 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qstringlistmodel
QT = core testlib
HEADERS += qmodellistener.h
SOURCES += tst_qstringlistmodel.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
index efb9f8384c..f99241da3b 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/json/json.pro b/tests/auto/corelib/json/json.pro
index 899060764f..b3038d7ca1 100644
--- a/tests/auto/corelib/json/json.pro
+++ b/tests/auto/corelib/json/json.pro
@@ -2,10 +2,12 @@ TARGET = tst_json
QT = core testlib
CONFIG -= app_bundle
CONFIG += testcase
-CONFIG += parallel_test
!android:TESTDATA += bom.json test.json test.bjson test3.json test2.json
else:RESOURCES += json.qrc
+!contains(QT_CONFIG, doubleconversion):!contains(QT_CONFIG, system-doubleconversion) {
+ DEFINES += QT_NO_DOUBLECONVERSION
+}
+
SOURCES += tst_qtjson.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/json/test.bjson b/tests/auto/corelib/json/test.bjson
index 9a0515f3ef..137b4dfeff 100644
--- a/tests/auto/corelib/json/test.bjson
+++ b/tests/auto/corelib/json/test.bjson
Binary files differ
diff --git a/tests/auto/corelib/json/test.json b/tests/auto/corelib/json/test.json
index 7c935fffc8..330756894a 100644
--- a/tests/auto/corelib/json/test.json
+++ b/tests/auto/corelib/json/test.json
@@ -32,7 +32,7 @@
"array":[ ],
"object":{ },
"address": "50 St. James Street",
- "url": "http://www.JSON.org/",
+ "url": "nix",
"comment": "// /* <!-- --",
"# -- --> */": " ",
" s p a c e d " :[1,2 , 3
@@ -58,9 +58,9 @@
2e-00,
"rosebud",
{"foo": "bar"},
-{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
-{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
-{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
-{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}}
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"nix"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone c","description":"Elite Hori","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Ch","description":"Specificat","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Ca","description":"Descriptio","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective","description":"Made of hi","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"P® 4","description":"Do more th","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Refle","description":"NCAA iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Pro","description":"Protect an","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly ","description":"d","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Pho","description":"Snap on Ap","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox i","description":"Your iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"nix"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone c","description":"Elite Hori","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Ch","description":"Specificat","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Ca","description":"Descriptio","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective","description":"Made of hi","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"P® 4","description":"Do more th","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Refle","description":"NCAA iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Pro","description":"Protect an","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly ","description":"d","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Pho","description":"Snap on Ap","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox i","description":"Your iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"nix"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone c","description":"Elite Hori","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Ch","description":"Specificat","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Ca","description":"Descriptio","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective","description":"Made of hi","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"P® 4","description":"Do more th","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Refle","description":"NCAA iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Pro","description":"Protect an","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly ","description":"d","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Pho","description":"Snap on Ap","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox i","description":"Your iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"nix"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone c","description":"Elite Hori","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Ch","description":"Specificat","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Ca","description":"Descriptio","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective","description":"Made of hi","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"P® 4","description":"Do more th","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Refle","description":"NCAA iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Pro","description":"Protect an","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly ","description":"d","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Pho","description":"Snap on Ap","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox i","description":"Your iPhon","manufacturer":"someone","url":{"value":"nix"},"images":{"image":[{"value":"nix","xsize":60,"ysize":60},{"value":"nix","xsize":100,"ysize":100},{"value":"nix","xsize":160,"ysize":160},{"value":"nix","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}}
]
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
index f2f9166711..02f3a1901e 100644
--- a/tests/auto/corelib/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -46,14 +41,9 @@
class tst_QtJson: public QObject
{
Q_OBJECT
-public:
- tst_QtJson(QObject *parent = 0);
private Q_SLOTS:
void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
void testValueSimple();
void testNumbers();
@@ -152,10 +142,6 @@ private:
QString testDataDir;
};
-tst_QtJson::tst_QtJson(QObject *parent) : QObject(parent)
-{
-}
-
void tst_QtJson::initTestCase()
{
testDataDir = QFileInfo(QFINDTESTDATA("test.json")).absolutePath();
@@ -163,18 +149,6 @@ void tst_QtJson::initTestCase()
testDataDir = QCoreApplication::applicationDirPath();
}
-void tst_QtJson::cleanupTestCase()
-{
-}
-
-void tst_QtJson::init()
-{
-}
-
-void tst_QtJson::cleanup()
-{
-}
-
void tst_QtJson::testValueSimple()
{
QJsonObject object;
@@ -401,12 +375,13 @@ void tst_QtJson::testObjectSimple()
QJsonObject object;
object.insert("number", 999.);
QCOMPARE(object.value("number").type(), QJsonValue::Double);
- QCOMPARE(object.value("number").toDouble(), 999.);
+ QCOMPARE(object.value(QLatin1String("number")).toDouble(), 999.);
object.insert("string", QString::fromLatin1("test"));
QCOMPARE(object.value("string").type(), QJsonValue::String);
- QCOMPARE(object.value("string").toString(), QString("test"));
+ QCOMPARE(object.value(QLatin1String("string")).toString(), QString("test"));
object.insert("boolean", true);
QCOMPARE(object.value("boolean").toBool(), true);
+ QCOMPARE(object.value(QLatin1String("boolean")).toBool(), true);
QStringList keys = object.keys();
QVERIFY2(keys.contains("number"), "key number not found");
@@ -430,7 +405,7 @@ void tst_QtJson::testObjectSimple()
QString before = object.value("string").toString();
object.insert("string", QString::fromLatin1("foo"));
- QVERIFY2(object.value("string").toString() != before, "value should have been updated");
+ QVERIFY2(object.value(QLatin1String("string")).toString() != before, "value should have been updated");
size = object.size();
QJsonObject subobject;
@@ -705,7 +680,7 @@ void tst_QtJson::testValueRef()
QCOMPARE(object.value(QLatin1String("null")), QJsonValue());
object[QLatin1String("null")] = 100.;
QCOMPARE(object.value(QLatin1String("null")).type(), QJsonValue::Double);
- QJsonValue val = object[QLatin1String("null")];
+ QJsonValue val = qAsConst(object)[QLatin1String("null")];
QCOMPARE(val.toDouble(), 100.);
QCOMPARE(object.size(), 2);
@@ -742,7 +717,7 @@ void tst_QtJson::testObjectIteration()
{
QJsonObject object2 = object;
- QVERIFY(object == object2);
+ QCOMPARE(object, object2);
QJsonValue val = *object2.begin();
object2.erase(object2.begin());
@@ -758,7 +733,7 @@ void tst_QtJson::testObjectIteration()
{
QJsonObject object2 = object;
- QVERIFY(object == object2);
+ QCOMPARE(object, object2);
QJsonObject::iterator it = object2.find(QString::number(5));
object2.erase(it);
@@ -794,7 +769,7 @@ void tst_QtJson::testObjectIteration()
while (!object.isEmpty())
it = object.erase(it);
QCOMPARE(object.size() , 0);
- QVERIFY(it == object.end());
+ QCOMPARE(it, object.end());
}
void tst_QtJson::testArrayIteration()
@@ -815,7 +790,7 @@ void tst_QtJson::testArrayIteration()
{
QJsonArray array2 = array;
- QVERIFY(array == array2);
+ QCOMPARE(array, array2);
QJsonValue val = *array2.begin();
array2.erase(array2.begin());
@@ -857,7 +832,7 @@ void tst_QtJson::testArrayIteration()
while (!array.isEmpty())
it = array.erase(it);
QCOMPARE(array.size() , 0);
- QVERIFY(it == array.end());
+ QCOMPARE(it, array.end());
}
void tst_QtJson::testObjectFind()
@@ -870,15 +845,15 @@ void tst_QtJson::testObjectFind()
QJsonObject::iterator it = object.find(QLatin1String("1"));
QCOMPARE((*it).toDouble(), 1.);
- it = object.find(QLatin1String("11"));
- QVERIFY((*it).type() == QJsonValue::Undefined);
- QVERIFY(it == object.end());
+ it = object.find(QString("11"));
+ QCOMPARE((*it).type(), QJsonValue::Undefined);
+ QCOMPARE(it, object.end());
QJsonObject::const_iterator cit = object.constFind(QLatin1String("1"));
QCOMPARE((*cit).toDouble(), 1.);
- cit = object.constFind(QLatin1String("11"));
- QVERIFY((*it).type() == QJsonValue::Undefined);
- QVERIFY(it == object.end());
+ cit = object.constFind(QString("11"));
+ QCOMPARE((*it).type(), QJsonValue::Undefined);
+ QCOMPARE(it, object.end());
}
void tst_QtJson::testDocument()
@@ -899,8 +874,8 @@ void tst_QtJson::testDocument()
QCOMPARE(doc.isEmpty(), false);
QCOMPARE(doc.isArray(), false);
QCOMPARE(doc.isObject(), true);
- QVERIFY(doc.object() == object);
- QVERIFY(doc.array() == QJsonArray());
+ QCOMPARE(doc.object(), object);
+ QCOMPARE(doc.array(), QJsonArray());
doc = QJsonDocument();
QCOMPARE(doc.isEmpty(), true);
@@ -918,8 +893,8 @@ void tst_QtJson::testDocument()
QCOMPARE(doc.isEmpty(), false);
QCOMPARE(doc.isArray(), true);
QCOMPARE(doc.isObject(), false);
- QVERIFY(doc.array() == array);
- QVERIFY(doc.object() == QJsonObject());
+ QCOMPARE(doc.array(), array);
+ QCOMPARE(doc.object(), QJsonObject());
QJsonObject outer;
outer.insert(QLatin1String("outerKey"), 22);
@@ -938,7 +913,7 @@ void tst_QtJson::testDocument()
doc3.setObject(outer.value(QLatin1String("innter")).toObject());
QCOMPARE(doc3.isArray(), false);
QCOMPARE(doc3.isObject(), true);
- QVERIFY(doc3.object().contains(QLatin1String("innerKey")));
+ QVERIFY(doc3.object().contains(QString("innerKey")));
QCOMPARE(doc3.object().value(QLatin1String("innerKey")), QJsonValue(42));
QJsonDocument doc4(outer.value(QLatin1String("innterArray")).toArray());
@@ -965,9 +940,9 @@ void tst_QtJson::nullValues()
QJsonObject object;
object.insert(QString("key"), QJsonValue());
- QCOMPARE(object.contains("key"), true);
+ QCOMPARE(object.contains(QLatin1String("key")), true);
QCOMPARE(object.size(), 1);
- QCOMPARE(object.value("key"), QJsonValue());
+ QCOMPARE(object.value(QString("key")), QJsonValue());
}
void tst_QtJson::nullArrays()
@@ -1415,9 +1390,7 @@ void tst_QtJson::toJsonLargeNumericValues()
" \"Array\": [\n"
" 1.234567,\n"
" 1.7976931348623157e+308,\n"
- // ((4.9406564584124654e-324 == 5e-324) == true)
- // I can only think JavaScript has a special formatter to
- // emit this value for this IEEE754 bit pattern.
+#ifdef QT_NO_DOUBLECONVERSION // "shortest" double conversion is not very short then
" 4.9406564584124654e-324,\n"
" 2.2250738585072014e-308,\n"
" 1.7976931348623157e+308,\n"
@@ -1428,6 +1401,18 @@ void tst_QtJson::toJsonLargeNumericValues()
" -1.7976931348623157e+308,\n"
" -2.2204460492503131e-16,\n"
" -4.9406564584124654e-324,\n"
+#else
+ " 5e-324,\n"
+ " 2.2250738585072014e-308,\n"
+ " 1.7976931348623157e+308,\n"
+ " 2.220446049250313e-16,\n"
+ " 5e-324,\n"
+ " 0,\n"
+ " -2.2250738585072014e-308,\n"
+ " -1.7976931348623157e+308,\n"
+ " -2.220446049250313e-16,\n"
+ " -5e-324,\n"
+#endif
" 0,\n"
" 9007199254740992,\n"
" -9007199254740992\n"
@@ -1747,7 +1732,7 @@ void tst_QtJson::fromBinary()
QJsonDocument doc = QJsonDocument::fromJson(testJson);
QJsonDocument outdoc = QJsonDocument::fromBinaryData(doc.toBinaryData());
QVERIFY(!outdoc.isNull());
- QVERIFY(doc == outdoc);
+ QCOMPARE(doc, outdoc);
QFile bfile(testDataDir + "/test.bjson");
bfile.open(QFile::ReadOnly);
@@ -1755,8 +1740,8 @@ void tst_QtJson::fromBinary()
QJsonDocument bdoc = QJsonDocument::fromBinaryData(binary);
QVERIFY(!bdoc.isNull());
- QVERIFY(doc.toVariant() == bdoc.toVariant());
- QVERIFY(doc == bdoc);
+ QCOMPARE(doc.toVariant(), bdoc.toVariant());
+ QCOMPARE(doc, bdoc);
}
void tst_QtJson::toAndFromBinary_data()
@@ -1777,7 +1762,7 @@ void tst_QtJson::toAndFromBinary()
QVERIFY(!doc.isNull());
QJsonDocument outdoc = QJsonDocument::fromBinaryData(doc.toBinaryData());
QVERIFY(!outdoc.isNull());
- QVERIFY(doc == outdoc);
+ QCOMPARE(doc, outdoc);
}
void tst_QtJson::invalidBinaryData()
@@ -2108,7 +2093,7 @@ void tst_QtJson::assignToDocument()
QJsonDocument innerDoc(inner.toObject());
QVERIFY(innerDoc != doc);
- QVERIFY(innerDoc.object() == inner.toObject());
+ QCOMPARE(innerDoc.object(), inner.toObject());
}
{
const char *json = "[ [ true ] ]";
@@ -2120,7 +2105,7 @@ void tst_QtJson::assignToDocument()
QJsonDocument innerDoc(inner.toArray());
QVERIFY(innerDoc != doc);
- QVERIFY(innerDoc.array() == inner.toArray());
+ QCOMPARE(innerDoc.array(), inner.toArray());
}
}
@@ -2151,7 +2136,7 @@ void tst_QtJson::testCompaction()
QVERIFY(!doc.isEmpty());
QCOMPARE(doc.isArray(), false);
QCOMPARE(doc.isObject(), true);
- QVERIFY(doc.object() == obj);
+ QCOMPARE(doc.object(), obj);
}
void tst_QtJson::testDebugStream()
@@ -2350,14 +2335,14 @@ void tst_QtJson::testDetachBug()
void tst_QtJson::valueEquals()
{
- QVERIFY(QJsonValue() == QJsonValue());
+ QCOMPARE(QJsonValue(), QJsonValue());
QVERIFY(QJsonValue() != QJsonValue(QJsonValue::Undefined));
QVERIFY(QJsonValue() != QJsonValue(true));
QVERIFY(QJsonValue() != QJsonValue(1.));
QVERIFY(QJsonValue() != QJsonValue(QJsonArray()));
QVERIFY(QJsonValue() != QJsonValue(QJsonObject()));
- QVERIFY(QJsonValue(true) == QJsonValue(true));
+ QCOMPARE(QJsonValue(true), QJsonValue(true));
QVERIFY(QJsonValue(true) != QJsonValue(false));
QVERIFY(QJsonValue(true) != QJsonValue(QJsonValue::Undefined));
QVERIFY(QJsonValue(true) != QJsonValue());
@@ -2365,9 +2350,9 @@ void tst_QtJson::valueEquals()
QVERIFY(QJsonValue(true) != QJsonValue(QJsonArray()));
QVERIFY(QJsonValue(true) != QJsonValue(QJsonObject()));
- QVERIFY(QJsonValue(1) == QJsonValue(1));
+ QCOMPARE(QJsonValue(1), QJsonValue(1));
QVERIFY(QJsonValue(1) != QJsonValue(2));
- QVERIFY(QJsonValue(1) == QJsonValue(1.));
+ QCOMPARE(QJsonValue(1), QJsonValue(1.));
QVERIFY(QJsonValue(1) != QJsonValue(1.1));
QVERIFY(QJsonValue(1) != QJsonValue(QJsonValue::Undefined));
QVERIFY(QJsonValue(1) != QJsonValue());
@@ -2375,7 +2360,7 @@ void tst_QtJson::valueEquals()
QVERIFY(QJsonValue(1) != QJsonValue(QJsonArray()));
QVERIFY(QJsonValue(1) != QJsonValue(QJsonObject()));
- QVERIFY(QJsonValue(1.) == QJsonValue(1.));
+ QCOMPARE(QJsonValue(1.), QJsonValue(1.));
QVERIFY(QJsonValue(1.) != QJsonValue(2.));
QVERIFY(QJsonValue(1.) != QJsonValue(QJsonValue::Undefined));
QVERIFY(QJsonValue(1.) != QJsonValue());
@@ -2383,7 +2368,7 @@ void tst_QtJson::valueEquals()
QVERIFY(QJsonValue(1.) != QJsonValue(QJsonArray()));
QVERIFY(QJsonValue(1.) != QJsonValue(QJsonObject()));
- QVERIFY(QJsonValue(QJsonArray()) == QJsonValue(QJsonArray()));
+ QCOMPARE(QJsonValue(QJsonArray()), QJsonValue(QJsonArray()));
QJsonArray nonEmptyArray;
nonEmptyArray.append(true);
QVERIFY(QJsonValue(QJsonArray()) != nonEmptyArray);
@@ -2393,7 +2378,7 @@ void tst_QtJson::valueEquals()
QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(1.));
QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonObject()));
- QVERIFY(QJsonValue(QJsonObject()) == QJsonValue(QJsonObject()));
+ QCOMPARE(QJsonValue(QJsonObject()), QJsonValue(QJsonObject()));
QJsonObject nonEmptyObject;
nonEmptyObject.insert("Key", true);
QVERIFY(QJsonValue(QJsonObject()) != nonEmptyObject);
@@ -2403,13 +2388,13 @@ void tst_QtJson::valueEquals()
QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(1.));
QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonArray()));
- QVERIFY(QJsonValue("foo") == QJsonValue(QLatin1String("foo")));
- QVERIFY(QJsonValue("foo") == QJsonValue(QString("foo")));
- QVERIFY(QJsonValue("\x66\x6f\x6f") == QJsonValue(QString("foo")));
- QVERIFY(QJsonValue("\x62\x61\x72") == QJsonValue("bar"));
- QVERIFY(QJsonValue(UNICODE_NON_CHARACTER) == QJsonValue(QString(UNICODE_NON_CHARACTER)));
- QVERIFY(QJsonValue(UNICODE_DJE) == QJsonValue(QString(UNICODE_DJE)));
- QVERIFY(QJsonValue("\xc3\xa9") == QJsonValue(QString("\xc3\xa9")));
+ QCOMPARE(QJsonValue("foo"), QJsonValue(QLatin1String("foo")));
+ QCOMPARE(QJsonValue("foo"), QJsonValue(QString("foo")));
+ QCOMPARE(QJsonValue("\x66\x6f\x6f"), QJsonValue(QString("foo")));
+ QCOMPARE(QJsonValue("\x62\x61\x72"), QJsonValue("bar"));
+ QCOMPARE(QJsonValue(UNICODE_NON_CHARACTER), QJsonValue(QString(UNICODE_NON_CHARACTER)));
+ QCOMPARE(QJsonValue(UNICODE_DJE), QJsonValue(QString(UNICODE_DJE)));
+ QCOMPARE(QJsonValue("\xc3\xa9"), QJsonValue(QString("\xc3\xa9")));
}
void tst_QtJson::objectEquals_data()
@@ -2543,7 +2528,7 @@ void tst_QtJson::bom()
QJsonDocument doc = QJsonDocument::fromJson(json, &error);
QVERIFY(!doc.isNull());
- QVERIFY(error.error == QJsonParseError::NoError);
+ QCOMPARE(error.error, QJsonParseError::NoError);
}
void tst_QtJson::nesting()
@@ -2575,14 +2560,14 @@ void tst_QtJson::nesting()
QJsonDocument doc = QJsonDocument::fromJson(json, &error);
QVERIFY(!doc.isNull());
- QVERIFY(error.error == QJsonParseError::NoError);
+ QCOMPARE(error.error, QJsonParseError::NoError);
- json.prepend("[");
- json.append("]");
+ json.prepend('[');
+ json.append(']');
doc = QJsonDocument::fromJson(json, &error);
QVERIFY(doc.isNull());
- QVERIFY(error.error == QJsonParseError::DeepNesting);
+ QCOMPARE(error.error, QJsonParseError::DeepNesting);
json = QByteArray("true ");
@@ -2594,14 +2579,14 @@ void tst_QtJson::nesting()
doc = QJsonDocument::fromJson(json, &error);
QVERIFY(!doc.isNull());
- QVERIFY(error.error == QJsonParseError::NoError);
+ QCOMPARE(error.error, QJsonParseError::NoError);
- json.prepend("[");
- json.append("]");
+ json.prepend('[');
+ json.append(']');
doc = QJsonDocument::fromJson(json, &error);
QVERIFY(doc.isNull());
- QVERIFY(error.error == QJsonParseError::DeepNesting);
+ QCOMPARE(error.error, QJsonParseError::DeepNesting);
}
@@ -2611,7 +2596,7 @@ void tst_QtJson::longStrings()
// in the data structures (for Latin1String in qjson_p.h)
QString s(0x7ff0, 'a');
for (int i = 0x7ff0; i < 0x8010; i++) {
- s.append("c");
+ s.append(QLatin1Char('c'));
QMap <QString, QVariant> map;
map["key"] = s;
@@ -2625,12 +2610,12 @@ void tst_QtJson::longStrings()
QJsonDocument d2 = QJsonDocument::fromJson(a1);
/* ... and a QByteArray from the QJsonDocument */
QByteArray a2 = d2.toJson();
- QVERIFY(a1 == a2);
+ QCOMPARE(a1, a2);
}
s = QString(0xfff0, 'a');
for (int i = 0xfff0; i < 0x10010; i++) {
- s.append("c");
+ s.append(QLatin1Char('c'));
QMap <QString, QVariant> map;
map["key"] = s;
@@ -2644,7 +2629,7 @@ void tst_QtJson::longStrings()
QJsonDocument d2 = QJsonDocument::fromJson(a1);
/* ... and a QByteArray from the QJsonDocument */
QByteArray a2 = d2.toJson();
- QVERIFY(a1 == a2);
+ QCOMPARE(a1, a2);
}
}
@@ -2777,7 +2762,7 @@ void tst_QtJson::unicodeKeys()
QJsonParseError error;
QJsonDocument doc = QJsonDocument::fromJson(json, &error);
- QVERIFY(error.error == QJsonParseError::NoError);
+ QCOMPARE(error.error, QJsonParseError::NoError);
QJsonObject o = doc.object();
QCOMPARE(o.keys().size(), 5);
@@ -2791,12 +2776,12 @@ void tst_QtJson::garbageAtEnd()
{
QJsonParseError error;
QJsonDocument doc = QJsonDocument::fromJson("{},", &error);
- QVERIFY(error.error == QJsonParseError::GarbageAtEnd);
- QVERIFY(error.offset == 2);
+ QCOMPARE(error.error, QJsonParseError::GarbageAtEnd);
+ QCOMPARE(error.offset, 2);
QVERIFY(doc.isEmpty());
doc = QJsonDocument::fromJson("{} ", &error);
- QVERIFY(error.error == QJsonParseError::NoError);
+ QCOMPARE(error.error, QJsonParseError::NoError);
QVERIFY(!doc.isEmpty());
}
diff --git a/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
index 1039f2c08d..a49bb9ae1f 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
+++ b/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qcoreapplication
QT = core testlib core-private
SOURCES = tst_qcoreapplication.cpp
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index 655719cffc..a8de5b7a9a 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -442,14 +437,14 @@ public slots:
void threadProgress(int v)
{
++count;
- QVERIFY(v == count);
+ QCOMPARE(v, count);
QCoreApplication::postEvent(this, new QEvent(QEvent::MaxUser), -1);
}
void threadFinished()
{
- QVERIFY(count == 7);
+ QCOMPARE(count, 7);
count = 0;
thread->deleteLater();
@@ -898,6 +893,7 @@ void tst_QCoreApplication::threadedEventDelivery()
QCOMPARE(receiver.recordedEvents.contains(QEvent::User + 1), eventsReceived);
}
+#ifndef QT_NO_LIBRARY
void tst_QCoreApplication::addRemoveLibPaths()
{
QStringList paths = QCoreApplication::libraryPaths();
@@ -922,8 +918,9 @@ void tst_QCoreApplication::addRemoveLibPaths()
QStringList replace;
replace << currentDir << paths[0];
QCoreApplication::setLibraryPaths(replace);
- QVERIFY(QCoreApplication::libraryPaths() == replace);
+ QCOMPARE(QCoreApplication::libraryPaths(), replace);
}
+#endif
static void createQObjectOnDestruction()
{
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h
index d9296b3846..7fb1bde459 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -63,7 +58,9 @@ private slots:
void applicationEventFilters_auxThread();
void threadedEventDelivery_data();
void threadedEventDelivery();
+#ifndef QT_NO_LIBRARY
void addRemoveLibPaths();
+#endif
};
#endif // TST_QCOREAPPLICATION_H
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro b/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro
index c3019467ce..ff048d0429 100644
--- a/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro
+++ b/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qeventdispatcher
QT = core testlib
SOURCES += tst_qeventdispatcher.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
index aaacfcae03..5784f0728c 100644
--- a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
+++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
index ea4792fc1c..5cd043b584 100644
--- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
+++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
@@ -1,10 +1,8 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qeventloop
QT = core network testlib core-private
SOURCES = $$PWD/tst_qeventloop.cpp
win32:!wince:!winrt: LIBS += -luser32
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
contains(QT_CONFIG, glib): DEFINES += HAVE_GLIB
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index c8bb4cda6e..aff04afe08 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -430,11 +425,8 @@ public slots:
dataSent = serverSocket->waitForBytesWritten(-1);
if (dataSent) {
- fd_set fdread;
- int fd = socket->socketDescriptor();
- FD_ZERO(&fdread);
- FD_SET(fd, &fdread);
- dataReadable = (1 == qt_safe_select(fd + 1, &fdread, 0, 0, 0));
+ pollfd pfd = qt_make_pollfd(socket->socketDescriptor(), POLLIN);
+ dataReadable = (1 == qt_safe_poll(&pfd, 1, nullptr));
}
if (!dataReadable) {
diff --git a/tests/auto/corelib/kernel/qmath/qmath.pro b/tests/auto/corelib/kernel/qmath/qmath.pro
index 5b8cba4104..703c530e35 100644
--- a/tests/auto/corelib/kernel/qmath/qmath.pro
+++ b/tests/auto/corelib/kernel/qmath/qmath.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmath
QT = core testlib
SOURCES = tst_qmath.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qmath/tst_qmath.cpp b/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
index f709c29bc3..ad40b0140d 100644
--- a/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
+++ b/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2013 Laszlo Papp <lpapp@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qmetaenum/qmetaenum.pro b/tests/auto/corelib/kernel/qmetaenum/qmetaenum.pro
index f045fc5d88..718f2b51de 100644
--- a/tests/auto/corelib/kernel/qmetaenum/qmetaenum.pro
+++ b/tests/auto/corelib/kernel/qmetaenum/qmetaenum.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmetaenum
QT = core testlib
SOURCES = tst_qmetaenum.cpp
diff --git a/tests/auto/corelib/kernel/qmetaenum/tst_qmetaenum.cpp b/tests/auto/corelib/kernel/qmetaenum/tst_qmetaenum.cpp
index 5a10cf51e6..e4aa8b80c0 100644
--- a/tests/auto/corelib/kernel/qmetaenum/tst_qmetaenum.cpp
+++ b/tests/auto/corelib/kernel/qmetaenum/tst_qmetaenum.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro b/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro
index 8340bc06e3..a42cd60236 100644
--- a/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro
+++ b/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro
@@ -1,7 +1,5 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmetamethod
QT = core testlib
SOURCES = tst_qmetamethod.cpp
mac:CONFIG -= app_bundle
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
index cf3ff04aa4..87196eaef1 100644
--- a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
+++ b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -599,8 +594,8 @@ void tst_QMetaMethod::method()
QFETCH(QMetaMethod::MethodType, methodType);
QFETCH(QMetaMethod::Access, access);
- QVERIFY(parameterTypes.size() == parameterTypeNames.size());
- QVERIFY(parameterTypes.size() == parameterNames.size());
+ QCOMPARE(parameterTypes.size(), parameterTypeNames.size());
+ QCOMPARE(parameterTypes.size(), parameterNames.size());
const QMetaObject *mo = &MethodTestObject::staticMetaObject;
int index = (methodType == QMetaMethod::Constructor)
diff --git a/tests/auto/corelib/kernel/qmetaobject/qmetaobject.pro b/tests/auto/corelib/kernel/qmetaobject/qmetaobject.pro
index 509ade6e2a..e7e5a03a86 100644
--- a/tests/auto/corelib/kernel/qmetaobject/qmetaobject.pro
+++ b/tests/auto/corelib/kernel/qmetaobject/qmetaobject.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmetaobject
QT = core-private testlib
SOURCES = tst_qmetaobject.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 7c19bfb89c..fd32dc1ef8 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -136,6 +131,22 @@ namespace MyNamespace {
MyEnum m_enum;
MyFlags m_flags;
};
+
+ // Test inherits
+ class MyClassSubclass : public MyClass
+ {
+ Q_OBJECT
+ };
+
+ class MyClassSubclass2 : public MyClass2
+ {
+ Q_OBJECT
+ };
+
+ class MyClass2Subclass : public MyClass
+ {
+ Q_OBJECT
+ };
}
@@ -227,6 +238,9 @@ private slots:
void signalIndex();
void enumDebugStream();
+ void inherits_data();
+ void inherits();
+
signals:
void value6Changed();
void value7Changed(const QString &);
@@ -811,7 +825,7 @@ void tst_QMetaObject::invokeBlockingQueuedMetaMember()
void tst_QMetaObject::qtMetaObjectInheritance()
{
- QVERIFY(QObject::staticMetaObject.superClass() == 0);
+ QVERIFY(!QObject::staticMetaObject.superClass());
QCOMPARE(QSortFilterProxyModel::staticMetaObject.indexOfEnumerator("Qt::CaseSensitivity"), -1);
QCOMPARE(QSortFilterProxyModel::staticMetaObject.indexOfEnumerator("CaseSensitivity"), -1);
int indexOfSortCaseSensitivity = QSortFilterProxyModel::staticMetaObject.indexOfProperty("sortCaseSensitivity");
@@ -878,7 +892,7 @@ void tst_QMetaObject::invokeMetaConstructor()
const QMetaObject *mo = &QtTestObject::staticMetaObject;
{
QObject *obj = mo->newInstance();
- QVERIFY(obj == 0);
+ QVERIFY(!obj);
}
{
QtTestObject obj;
@@ -1430,5 +1444,34 @@ void tst_QMetaObject::enumDebugStream()
qDebug() << f1 << f2;
}
+void tst_QMetaObject::inherits_data()
+{
+ QTest::addColumn<const QMetaObject *>("derivedMetaObject");
+ QTest::addColumn<const QMetaObject *>("baseMetaObject");
+ QTest::addColumn<bool>("inheritsResult");
+
+ QTest::newRow("MyClass inherits QObject")
+ << &MyNamespace::MyClass::staticMetaObject << &QObject::staticMetaObject << true;
+ QTest::newRow("QObject inherits MyClass")
+ << &QObject::staticMetaObject << &MyNamespace::MyClass::staticMetaObject << false;
+ QTest::newRow("MyClass inherits MyClass")
+ << &MyNamespace::MyClass::staticMetaObject << &MyNamespace::MyClass::staticMetaObject << true;
+ QTest::newRow("MyClassSubclass inherits QObject")
+ << &MyNamespace::MyClassSubclass::staticMetaObject << &QObject::staticMetaObject << true;
+ QTest::newRow("MyClassSubclass2 inherits QObject")
+ << &MyNamespace::MyClassSubclass2::staticMetaObject << &QObject::staticMetaObject << true;
+ QTest::newRow("MyClassSubclass2 inherits MyClass2")
+ << &MyNamespace::MyClassSubclass2::staticMetaObject << &MyNamespace::MyClass2Subclass::staticMetaObject << false;
+}
+
+void tst_QMetaObject::inherits()
+{
+ QFETCH(const QMetaObject *, derivedMetaObject);
+ QFETCH(const QMetaObject *, baseMetaObject);
+ QFETCH(bool, inheritsResult);
+
+ QCOMPARE(derivedMetaObject->inherits(baseMetaObject), inheritsResult);
+}
+
QTEST_MAIN(tst_QMetaObject)
#include "tst_qmetaobject.moc"
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/qmetaobjectbuilder.pro b/tests/auto/corelib/kernel/qmetaobjectbuilder/qmetaobjectbuilder.pro
index 68d3b48086..f3153b3fd4 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/qmetaobjectbuilder.pro
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/qmetaobjectbuilder.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmetaobjectbuilder
QT = core-private testlib
SOURCES = tst_qmetaobjectbuilder.cpp
mac:CONFIG -= app_bundle
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 74fcde2e71..9ae39449f8 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -138,14 +133,14 @@ void tst_QMetaObjectBuilder::create()
{
QMetaObjectBuilder builder;
QVERIFY(builder.className().isEmpty());
- QVERIFY(builder.superClass() == &QObject::staticMetaObject);
+ QCOMPARE(builder.superClass(), &QObject::staticMetaObject);
QCOMPARE(builder.methodCount(), 0);
QCOMPARE(builder.constructorCount(), 0);
QCOMPARE(builder.propertyCount(), 0);
QCOMPARE(builder.enumeratorCount(), 0);
QCOMPARE(builder.classInfoCount(), 0);
QCOMPARE(builder.relatedMetaObjectCount(), 0);
- QVERIFY(builder.staticMetacallFunction() == 0);
+ QVERIFY(!builder.staticMetacallFunction());
}
void tst_QMetaObjectBuilder::className()
@@ -174,17 +169,17 @@ void tst_QMetaObjectBuilder::superClass()
// Change the super class.
builder.setSuperClass(&QObject::staticMetaObject);
- QVERIFY(builder.superClass() == &QObject::staticMetaObject);
+ QCOMPARE(builder.superClass(), &QObject::staticMetaObject);
// Change it again.
builder.setSuperClass(&staticMetaObject);
- QVERIFY(builder.superClass() == &staticMetaObject);
+ QCOMPARE(builder.superClass(), &staticMetaObject);
// Clone the super class off a static QMetaObject.
builder.addMetaObject(&QObject::staticMetaObject, QMetaObjectBuilder::SuperClass);
- QVERIFY(builder.superClass() == 0);
+ QVERIFY(!builder.superClass());
builder.addMetaObject(&staticMetaObject, QMetaObjectBuilder::SuperClass);
- QVERIFY(builder.superClass() == staticMetaObject.superClass());
+ QCOMPARE(builder.superClass(), staticMetaObject.superClass());
// Check that nothing else changed.
QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::SuperClass));
@@ -195,11 +190,11 @@ void tst_QMetaObjectBuilder::flags()
QMetaObjectBuilder builder;
// Check default
- QVERIFY(builder.flags() == 0);
+ QCOMPARE(builder.flags(), 0);
// Set flags
builder.setFlags(QMetaObjectBuilder::DynamicMetaObject);
- QVERIFY(builder.flags() == QMetaObjectBuilder::DynamicMetaObject);
+ QCOMPARE(builder.flags(), QMetaObjectBuilder::DynamicMetaObject);
}
void tst_QMetaObjectBuilder::method()
@@ -209,12 +204,12 @@ void tst_QMetaObjectBuilder::method()
// Check null method
QMetaMethodBuilder nullMethod;
QCOMPARE(nullMethod.signature(), QByteArray());
- QVERIFY(nullMethod.methodType() == QMetaMethod::Method);
+ QCOMPARE(nullMethod.methodType(), QMetaMethod::Method);
QVERIFY(nullMethod.returnType().isEmpty());
QVERIFY(nullMethod.parameterTypes().isEmpty());
QVERIFY(nullMethod.parameterNames().isEmpty());
QVERIFY(nullMethod.tag().isEmpty());
- QVERIFY(nullMethod.access() == QMetaMethod::Public);
+ QCOMPARE(nullMethod.access(), QMetaMethod::Public);
QCOMPARE(nullMethod.attributes(), 0);
QCOMPARE(nullMethod.revision(), 0);
QCOMPARE(nullMethod.index(), 0);
@@ -222,12 +217,12 @@ void tst_QMetaObjectBuilder::method()
// Add a method and check its attributes.
QMetaMethodBuilder method1 = builder.addMethod("foo(const QString&, int)");
QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(method1.methodType() == QMetaMethod::Method);
+ QCOMPARE(method1.methodType(), QMetaMethod::Method);
QCOMPARE(method1.returnType(), QByteArray("void"));
QCOMPARE(method1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QVERIFY(method1.parameterNames().isEmpty());
QVERIFY(method1.tag().isEmpty());
- QVERIFY(method1.access() == QMetaMethod::Public);
+ QCOMPARE(method1.access(), QMetaMethod::Public);
QCOMPARE(method1.attributes(), 0);
QCOMPARE(method1.revision(), 0);
QCOMPARE(method1.index(), 0);
@@ -236,12 +231,12 @@ void tst_QMetaObjectBuilder::method()
// Add another method and check again.
QMetaMethodBuilder method2 = builder.addMethod("bar(QString)", "int");
QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
- QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.methodType(), QMetaMethod::Method);
QCOMPARE(method2.returnType(), QByteArray("int"));
QCOMPARE(method2.parameterTypes(), QList<QByteArray>() << "QString");
QVERIFY(method2.parameterNames().isEmpty());
QVERIFY(method2.tag().isEmpty());
- QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.access(), QMetaMethod::Public);
QCOMPARE(method2.attributes(), 0);
QCOMPARE(method2.revision(), 0);
QCOMPARE(method2.index(), 1);
@@ -262,22 +257,22 @@ void tst_QMetaObjectBuilder::method()
// Check that method1 is changed, but method2 is not.
QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(method1.methodType() == QMetaMethod::Method);
+ QCOMPARE(method1.methodType(), QMetaMethod::Method);
QCOMPARE(method1.returnType(), QByteArray("int"));
QCOMPARE(method1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QCOMPARE(method1.parameterNames(), QList<QByteArray>() << "a" << "b");
QCOMPARE(method1.tag(), QByteArray("tag"));
- QVERIFY(method1.access() == QMetaMethod::Private);
+ QCOMPARE(method1.access(), QMetaMethod::Private);
QCOMPARE(method1.attributes(), 42);
QCOMPARE(method1.revision(), 123);
QCOMPARE(method1.index(), 0);
QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
- QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.methodType(), QMetaMethod::Method);
QCOMPARE(method2.returnType(), QByteArray("int"));
QCOMPARE(method2.parameterTypes(), QList<QByteArray>() << "QString");
QVERIFY(method2.parameterNames().isEmpty());
QVERIFY(method2.tag().isEmpty());
- QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.access(), QMetaMethod::Public);
QCOMPARE(method2.attributes(), 0);
QCOMPARE(method2.revision(), 0);
QCOMPARE(method2.index(), 1);
@@ -293,22 +288,22 @@ void tst_QMetaObjectBuilder::method()
// This time check that only method2 changed.
QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(method1.methodType() == QMetaMethod::Method);
+ QCOMPARE(method1.methodType(), QMetaMethod::Method);
QCOMPARE(method1.returnType(), QByteArray("int"));
QCOMPARE(method1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QCOMPARE(method1.parameterNames(), QList<QByteArray>() << "a" << "b");
QCOMPARE(method1.tag(), QByteArray("tag"));
- QVERIFY(method1.access() == QMetaMethod::Private);
+ QCOMPARE(method1.access(), QMetaMethod::Private);
QCOMPARE(method1.attributes(), 42);
QCOMPARE(method1.revision(), 123);
QCOMPARE(method1.index(), 0);
QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
- QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.methodType(), QMetaMethod::Method);
QCOMPARE(method2.returnType(), QByteArray("QString"));
QCOMPARE(method2.parameterTypes(), QList<QByteArray>() << "QString");
QCOMPARE(method2.parameterNames(), QList<QByteArray>() << "c");
QCOMPARE(method2.tag(), QByteArray("Q_FOO"));
- QVERIFY(method2.access() == QMetaMethod::Protected);
+ QCOMPARE(method2.access(), QMetaMethod::Protected);
QCOMPARE(method2.attributes(), 24);
QCOMPARE(method2.revision(), 321);
QCOMPARE(method2.index(), 1);
@@ -319,12 +314,12 @@ void tst_QMetaObjectBuilder::method()
QCOMPARE(builder.methodCount(), 1);
method2 = builder.method(0);
QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
- QVERIFY(method2.methodType() == QMetaMethod::Method);
+ QCOMPARE(method2.methodType(), QMetaMethod::Method);
QCOMPARE(method2.returnType(), QByteArray("QString"));
QCOMPARE(method2.parameterTypes(), QList<QByteArray>() << "QString");
QCOMPARE(method2.parameterNames(), QList<QByteArray>() << "c");
QCOMPARE(method2.tag(), QByteArray("Q_FOO"));
- QVERIFY(method2.access() == QMetaMethod::Protected);
+ QCOMPARE(method2.access(), QMetaMethod::Protected);
QCOMPARE(method2.attributes(), 24);
QCOMPARE(method2.revision(), 321);
QCOMPARE(method2.index(), 0);
@@ -347,12 +342,12 @@ void tst_QMetaObjectBuilder::slot()
// Add a slot and check its attributes.
QMetaMethodBuilder method1 = builder.addSlot("foo(const QString&, int)");
QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(method1.methodType() == QMetaMethod::Slot);
+ QCOMPARE(method1.methodType(), QMetaMethod::Slot);
QCOMPARE(method1.returnType(), QByteArray("void"));
QCOMPARE(method1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QVERIFY(method1.parameterNames().isEmpty());
QVERIFY(method1.tag().isEmpty());
- QVERIFY(method1.access() == QMetaMethod::Public);
+ QCOMPARE(method1.access(), QMetaMethod::Public);
QCOMPARE(method1.attributes(), 0);
QCOMPARE(method1.index(), 0);
QCOMPARE(builder.methodCount(), 1);
@@ -360,12 +355,12 @@ void tst_QMetaObjectBuilder::slot()
// Add another slot and check again.
QMetaMethodBuilder method2 = builder.addSlot("bar(QString)");
QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
- QVERIFY(method2.methodType() == QMetaMethod::Slot);
+ QCOMPARE(method2.methodType(), QMetaMethod::Slot);
QCOMPARE(method2.returnType(), QByteArray("void"));
QCOMPARE(method2.parameterTypes(), QList<QByteArray>() << "QString");
QVERIFY(method2.parameterNames().isEmpty());
QVERIFY(method2.tag().isEmpty());
- QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.access(), QMetaMethod::Public);
QCOMPARE(method2.attributes(), 0);
QCOMPARE(method2.index(), 1);
QCOMPARE(builder.methodCount(), 2);
@@ -386,12 +381,12 @@ void tst_QMetaObjectBuilder::signal()
// Add a signal and check its attributes.
QMetaMethodBuilder method1 = builder.addSignal("foo(const QString&, int)");
QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(method1.methodType() == QMetaMethod::Signal);
+ QCOMPARE(method1.methodType(), QMetaMethod::Signal);
QCOMPARE(method1.returnType(), QByteArray("void"));
QCOMPARE(method1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QVERIFY(method1.parameterNames().isEmpty());
QVERIFY(method1.tag().isEmpty());
- QVERIFY(method1.access() == QMetaMethod::Public);
+ QCOMPARE(method1.access(), QMetaMethod::Public);
QCOMPARE(method1.attributes(), 0);
QCOMPARE(method1.index(), 0);
QCOMPARE(builder.methodCount(), 1);
@@ -399,12 +394,12 @@ void tst_QMetaObjectBuilder::signal()
// Add another signal and check again.
QMetaMethodBuilder method2 = builder.addSignal("bar(QString)");
QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
- QVERIFY(method2.methodType() == QMetaMethod::Signal);
+ QCOMPARE(method2.methodType(), QMetaMethod::Signal);
QCOMPARE(method2.returnType(), QByteArray("void"));
QCOMPARE(method2.parameterTypes(), QList<QByteArray>() << "QString");
QVERIFY(method2.parameterNames().isEmpty());
QVERIFY(method2.tag().isEmpty());
- QVERIFY(method2.access() == QMetaMethod::Public);
+ QCOMPARE(method2.access(), QMetaMethod::Public);
QCOMPARE(method2.attributes(), 0);
QCOMPARE(method2.index(), 1);
QCOMPARE(builder.methodCount(), 2);
@@ -425,12 +420,12 @@ void tst_QMetaObjectBuilder::constructor()
// Add a constructor and check its attributes.
QMetaMethodBuilder ctor1 = builder.addConstructor("foo(const QString&, int)");
QCOMPARE(ctor1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(ctor1.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor1.methodType(), QMetaMethod::Constructor);
QVERIFY(ctor1.returnType().isEmpty());
QCOMPARE(ctor1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QVERIFY(ctor1.parameterNames().isEmpty());
QVERIFY(ctor1.tag().isEmpty());
- QVERIFY(ctor1.access() == QMetaMethod::Public);
+ QCOMPARE(ctor1.access(), QMetaMethod::Public);
QCOMPARE(ctor1.attributes(), 0);
QCOMPARE(ctor1.index(), 0);
QCOMPARE(builder.constructorCount(), 1);
@@ -438,12 +433,12 @@ void tst_QMetaObjectBuilder::constructor()
// Add another constructor and check again.
QMetaMethodBuilder ctor2 = builder.addConstructor("bar(QString)");
QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
- QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor2.methodType(), QMetaMethod::Constructor);
QVERIFY(ctor2.returnType().isEmpty());
QCOMPARE(ctor2.parameterTypes(), QList<QByteArray>() << "QString");
QVERIFY(ctor2.parameterNames().isEmpty());
QVERIFY(ctor2.tag().isEmpty());
- QVERIFY(ctor2.access() == QMetaMethod::Public);
+ QCOMPARE(ctor2.access(), QMetaMethod::Public);
QCOMPARE(ctor2.attributes(), 0);
QCOMPARE(ctor2.index(), 1);
QCOMPARE(builder.constructorCount(), 2);
@@ -464,21 +459,21 @@ void tst_QMetaObjectBuilder::constructor()
// Check that ctor1 is changed, but ctor2 is not.
QCOMPARE(ctor1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(ctor1.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor1.methodType(), QMetaMethod::Constructor);
QCOMPARE(ctor1.returnType(), QByteArray("int"));
QCOMPARE(ctor1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QCOMPARE(ctor1.parameterNames(), QList<QByteArray>() << "a" << "b");
QCOMPARE(ctor1.tag(), QByteArray("tag"));
- QVERIFY(ctor1.access() == QMetaMethod::Private);
+ QCOMPARE(ctor1.access(), QMetaMethod::Private);
QCOMPARE(ctor1.attributes(), 42);
QCOMPARE(ctor1.index(), 0);
QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
- QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor2.methodType(), QMetaMethod::Constructor);
QVERIFY(ctor2.returnType().isEmpty());
QCOMPARE(ctor2.parameterTypes(), QList<QByteArray>() << "QString");
QVERIFY(ctor2.parameterNames().isEmpty());
QVERIFY(ctor2.tag().isEmpty());
- QVERIFY(ctor2.access() == QMetaMethod::Public);
+ QCOMPARE(ctor2.access(), QMetaMethod::Public);
QCOMPARE(ctor2.attributes(), 0);
QCOMPARE(ctor2.index(), 1);
QCOMPARE(builder.constructorCount(), 2);
@@ -492,21 +487,21 @@ void tst_QMetaObjectBuilder::constructor()
// This time check that only ctor2 changed.
QCOMPARE(ctor1.signature(), QByteArray("foo(QString,int)"));
- QVERIFY(ctor1.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor1.methodType(), QMetaMethod::Constructor);
QCOMPARE(ctor1.returnType(), QByteArray("int"));
QCOMPARE(ctor1.parameterTypes(), QList<QByteArray>() << "QString" << "int");
QCOMPARE(ctor1.parameterNames(), QList<QByteArray>() << "a" << "b");
QCOMPARE(ctor1.tag(), QByteArray("tag"));
- QVERIFY(ctor1.access() == QMetaMethod::Private);
+ QCOMPARE(ctor1.access(), QMetaMethod::Private);
QCOMPARE(ctor1.attributes(), 42);
QCOMPARE(ctor1.index(), 0);
QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
- QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor2.methodType(), QMetaMethod::Constructor);
QCOMPARE(ctor2.returnType(), QByteArray("QString"));
QCOMPARE(ctor2.parameterTypes(), QList<QByteArray>() << "QString");
QCOMPARE(ctor2.parameterNames(), QList<QByteArray>() << "c");
QCOMPARE(ctor2.tag(), QByteArray("Q_FOO"));
- QVERIFY(ctor2.access() == QMetaMethod::Protected);
+ QCOMPARE(ctor2.access(), QMetaMethod::Protected);
QCOMPARE(ctor2.attributes(), 24);
QCOMPARE(ctor2.index(), 1);
QCOMPARE(builder.constructorCount(), 2);
@@ -516,12 +511,12 @@ void tst_QMetaObjectBuilder::constructor()
QCOMPARE(builder.constructorCount(), 1);
ctor2 = builder.constructor(0);
QCOMPARE(ctor2.signature(), QByteArray("bar(QString)"));
- QVERIFY(ctor2.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(ctor2.methodType(), QMetaMethod::Constructor);
QCOMPARE(ctor2.returnType(), QByteArray("QString"));
QCOMPARE(ctor2.parameterTypes(), QList<QByteArray>() << "QString");
QCOMPARE(ctor2.parameterNames(), QList<QByteArray>() << "c");
QCOMPARE(ctor2.tag(), QByteArray("Q_FOO"));
- QVERIFY(ctor2.access() == QMetaMethod::Protected);
+ QCOMPARE(ctor2.access(), QMetaMethod::Protected);
QCOMPARE(ctor2.attributes(), 24);
QCOMPARE(ctor2.index(), 0);
@@ -536,10 +531,10 @@ void tst_QMetaObjectBuilder::constructor()
QCOMPARE(builder.constructorCount(), 2);
QCOMPARE(prototypeConstructor.signature(), QByteArray("SomethingOfEverything()"));
- QVERIFY(prototypeConstructor.methodType() == QMetaMethod::Constructor);
+ QCOMPARE(prototypeConstructor.methodType(), QMetaMethod::Constructor);
QCOMPARE(prototypeConstructor.returnType(), QByteArray());
QVERIFY(prototypeConstructor.parameterTypes().isEmpty());
- QVERIFY(prototypeConstructor.access() == QMetaMethod::Public);
+ QCOMPARE(prototypeConstructor.access(), QMetaMethod::Public);
QCOMPARE(prototypeConstructor.index(), 1);
// Check that nothing else changed.
@@ -967,13 +962,13 @@ void tst_QMetaObjectBuilder::relatedMetaObject()
// Add two related meta objects and check their attributes.
QCOMPARE(builder.addRelatedMetaObject(&QObject::staticMetaObject), 0);
QCOMPARE(builder.addRelatedMetaObject(&staticMetaObject), 1);
- QVERIFY(builder.relatedMetaObject(0) == &QObject::staticMetaObject);
- QVERIFY(builder.relatedMetaObject(1) == &staticMetaObject);
+ QCOMPARE(builder.relatedMetaObject(0), &QObject::staticMetaObject);
+ QCOMPARE(builder.relatedMetaObject(1), &staticMetaObject);
QCOMPARE(builder.relatedMetaObjectCount(), 2);
// Remove the first one and check again.
builder.removeRelatedMetaObject(0);
- QVERIFY(builder.relatedMetaObject(0) == &staticMetaObject);
+ QCOMPARE(builder.relatedMetaObject(0), &staticMetaObject);
QCOMPARE(builder.relatedMetaObjectCount(), 1);
// Check that nothing else changed.
@@ -1617,7 +1612,7 @@ void tst_QMetaObjectBuilder::usage_slot()
QVERIFY(index != -1);
QMetaMethod voidSlotInt = testObject->metaObject()->method(index);
- QVERIFY(testObject->voidSlotIntArgument() == -1);
+ QCOMPARE(testObject->voidSlotIntArgument(), -1);
QVERIFY(voidSlotInt.invoke(testObject.data(), Q_ARG(int, 123)));
QCOMPARE(testObject->voidSlotIntArgument(), 123);
}
@@ -1658,7 +1653,7 @@ void tst_QMetaObjectBuilder::usage_connect()
QVERIFY(QObject::connect(testObject.data(), SIGNAL(intPropChanged(int)),
testObject.data(), SLOT(voidSlotInt(int))));
- QVERIFY(testObject->voidSlotIntArgument() == -1);
+ QCOMPARE(testObject->voidSlotIntArgument(), -1);
testObject->setProperty("intProp", 123);
QCOMPARE(testObject->voidSlotIntArgument(), 123);
@@ -1674,7 +1669,7 @@ void tst_QMetaObjectBuilder::usage_templateConnect()
testObject.data(), &TestObject::voidSlotInt);
QVERIFY(con);
- QVERIFY(testObject->voidSlotIntArgument() == -1);
+ QCOMPARE(testObject->voidSlotIntArgument(), -1);
testObject->setProperty("intProp", 123);
QCOMPARE(testObject->voidSlotIntArgument(), 123);
diff --git a/tests/auto/corelib/kernel/qmetaproperty/qmetaproperty.pro b/tests/auto/corelib/kernel/qmetaproperty/qmetaproperty.pro
index f103abdd2b..1f338a909b 100644
--- a/tests/auto/corelib/kernel/qmetaproperty/qmetaproperty.pro
+++ b/tests/auto/corelib/kernel/qmetaproperty/qmetaproperty.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmetaproperty
QT = core testlib
SOURCES = tst_qmetaproperty.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
index 22c78f8e48..681a5d0146 100644
--- a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
+++ b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
index fc262b8fc7..1d4e647a4b 100644
--- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmetatype
QT = core testlib
INCLUDEPATH += $$PWD/../../../other/qvariant_common
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index e35790351d..fbb6a30917 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -193,8 +188,11 @@ protected:
Bar space[1];
space[0].~Bar();
+ const QByteArray postFix = '_'
+ + QByteArray::number(reinterpret_cast<quintptr>(QThread::currentThreadId()));
+
for (int i = 0; i < 1000; ++i) {
- const QByteArray name = QString("Bar%1_%2").arg(i).arg((size_t)QThread::currentThreadId()).toLatin1();
+ const QByteArray name = "Bar" + QByteArray::number(i) + postFix;
const char *nm = name.constData();
int tp = qRegisterMetaType<Bar>(nm);
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
@@ -2394,8 +2392,8 @@ void tst_QMetaType::compareCustomEqualOnlyType()
QVERIFY(variant50 != variant100x);
QVERIFY(variant100 != variant50);
QVERIFY(variant100x != variant50);
- QVERIFY(variant100 == variant100x);
- QVERIFY(variant100 == variant100);
+ QCOMPARE(variant100, variant100x);
+ QCOMPARE(variant100, variant100);
// compare always fails
QVERIFY(!(variant50 < variant50));
diff --git a/tests/auto/corelib/kernel/qmimedata/qmimedata.pro b/tests/auto/corelib/kernel/qmimedata/qmimedata.pro
index 51389da6ee..502ec78024 100644
--- a/tests/auto/corelib/kernel/qmimedata/qmimedata.pro
+++ b/tests/auto/corelib/kernel/qmimedata/qmimedata.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmimedata
QT += testlib
SOURCES = tst_qmimedata.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
index d368d9961b..e3b2399456 100644
--- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
+++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -101,7 +96,7 @@ void tst_QMimeData::data() const
// set text, verify
mimeData.setData("text/plain", "pirates");
QCOMPARE(mimeData.data("text/plain"), QByteArray("pirates"));
- QVERIFY(mimeData.data("text/html").length() == 0);
+ QCOMPARE(mimeData.data("text/html").length(), 0);
// html time
mimeData.setData("text/html", "ninjas");
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
index 93146a9b66..57fb1eb836 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
index 6f4fbf88ac..e6e40c35d9 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
index b08dfb1838..125915047a 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
@@ -12,4 +12,3 @@ SOURCES += signalbug.cpp
# This app is testdata for tst_qobject
target.path = $$[QT_INSTALL_TESTS]/tst_qobject/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qobject/test/test.pro b/tests/auto/corelib/kernel/qobject/test/test.pro
index 3ac728931d..f3bc045455 100644
--- a/tests/auto/corelib/kernel/qobject/test/test.pro
+++ b/tests/auto/corelib/kernel/qobject/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase console
-CONFIG += parallel_test
TARGET = ../tst_qobject
QT = core-private network testlib
SOURCES = ../tst_qobject.cpp
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 4417aa2353..333305d603 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -134,6 +129,7 @@ private slots:
void returnValue2_data();
void returnValue2();
void connectVirtualSlots();
+ void connectSlotsVMIClass(); // VMI = Virtual or Multiple Inheritance
void connectPrivateSlots();
void connectFunctorArgDifference();
void connectFunctorOverloads();
@@ -148,6 +144,7 @@ private slots:
void qmlConnect();
void exceptions();
void noDeclarativeParentChangedOnDestruction();
+ void deleteLaterInAboutToBlockHandler();
void mutableFunctor();
};
@@ -2045,57 +2042,57 @@ void tst_QObject::metamethod()
m = mobj->method(mobj->indexOfMethod("invoke1()"));
QVERIFY(m.methodSignature() == "invoke1()");
- QVERIFY(m.methodType() == QMetaMethod::Method);
- QVERIFY(m.access() == QMetaMethod::Public);
+ QCOMPARE(m.methodType(), QMetaMethod::Method);
+ QCOMPARE(m.access(), QMetaMethod::Public);
QVERIFY(!(m.attributes() & QMetaMethod::Scriptable));
QVERIFY(!(m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("sinvoke1()"));
QVERIFY(m.methodSignature() == "sinvoke1()");
- QVERIFY(m.methodType() == QMetaMethod::Method);
- QVERIFY(m.access() == QMetaMethod::Public);
+ QCOMPARE(m.methodType(), QMetaMethod::Method);
+ QCOMPARE(m.access(), QMetaMethod::Public);
QVERIFY((m.attributes() & QMetaMethod::Scriptable));
QVERIFY(!(m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("invoke2()"));
QVERIFY(m.methodSignature() == "invoke2()");
- QVERIFY(m.methodType() == QMetaMethod::Method);
- QVERIFY(m.access() == QMetaMethod::Protected);
+ QCOMPARE(m.methodType(), QMetaMethod::Method);
+ QCOMPARE(m.access(), QMetaMethod::Protected);
QVERIFY(!(m.attributes() & QMetaMethod::Scriptable));
QVERIFY((m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("sinvoke2()"));
QVERIFY(m.methodSignature() == "sinvoke2()");
- QVERIFY(m.methodType() == QMetaMethod::Method);
- QVERIFY(m.access() == QMetaMethod::Protected);
+ QCOMPARE(m.methodType(), QMetaMethod::Method);
+ QCOMPARE(m.access(), QMetaMethod::Protected);
QVERIFY((m.attributes() & QMetaMethod::Scriptable));
QVERIFY((m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("invoke3()"));
QVERIFY(m.methodSignature() == "invoke3()");
- QVERIFY(m.methodType() == QMetaMethod::Method);
- QVERIFY(m.access() == QMetaMethod::Private);
+ QCOMPARE(m.methodType(), QMetaMethod::Method);
+ QCOMPARE(m.access(), QMetaMethod::Private);
QVERIFY(!(m.attributes() & QMetaMethod::Scriptable));
QVERIFY(!(m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("sinvoke3()"));
QVERIFY(m.methodSignature() == "sinvoke3()");
- QVERIFY(m.methodType() == QMetaMethod::Method);
- QVERIFY(m.access() == QMetaMethod::Private);
+ QCOMPARE(m.methodType(), QMetaMethod::Method);
+ QCOMPARE(m.access(), QMetaMethod::Private);
QVERIFY((m.attributes() & QMetaMethod::Scriptable));
QVERIFY(!(m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("signal5()"));
QVERIFY(m.methodSignature() == "signal5()");
- QVERIFY(m.methodType() == QMetaMethod::Signal);
- QVERIFY(m.access() == QMetaMethod::Public);
+ QCOMPARE(m.methodType(), QMetaMethod::Signal);
+ QCOMPARE(m.access(), QMetaMethod::Public);
QVERIFY(!(m.attributes() & QMetaMethod::Scriptable));
QVERIFY((m.attributes() & QMetaMethod::Compatibility));
m = mobj->method(mobj->indexOfMethod("aPublicSlot()"));
QVERIFY(m.methodSignature() == "aPublicSlot()");
- QVERIFY(m.methodType() == QMetaMethod::Slot);
- QVERIFY(m.access() == QMetaMethod::Public);
+ QCOMPARE(m.methodType(), QMetaMethod::Slot);
+ QCOMPARE(m.access(), QMetaMethod::Public);
QVERIFY(!(m.attributes() & QMetaMethod::Scriptable));
QVERIFY(!(m.attributes() & QMetaMethod::Compatibility));
@@ -2367,7 +2364,7 @@ void tst_QObject::testUserData()
int id = user_data_ids[i];
CustomData *data = static_cast<CustomData *>(my_test_object.userData(id));
QVERIFY(data != 0);
- QVERIFY(data->id == id);
+ QCOMPARE(data->id, id);
}
}
@@ -2909,12 +2906,12 @@ void tst_QObject::floatProperty()
QVERIFY(idx > 0);
QMetaProperty prop = obj.metaObject()->property(idx);
QVERIFY(prop.isValid());
- QVERIFY(prop.type() == uint(QMetaType::type("float")));
+ QCOMPARE(int(prop.type()), QMetaType::type("float"));
QVERIFY(!prop.write(&obj, QVariant("Hello")));
QVERIFY(prop.write(&obj, QVariant::fromValue(128.0f)));
QVariant v = prop.read(&obj);
- QVERIFY(int(v.userType()) == QMetaType::Float);
- QVERIFY(qvariant_cast<float>(v) == 128.0f);
+ QCOMPARE(v.userType(), int(QMetaType::Float));
+ QCOMPARE(qvariant_cast<float>(v), 128.0f);
}
void tst_QObject::qrealProperty()
@@ -2924,18 +2921,18 @@ void tst_QObject::qrealProperty()
QVERIFY(idx > 0);
QMetaProperty prop = obj.metaObject()->property(idx);
QVERIFY(prop.isValid());
- QVERIFY(prop.type() == uint(QMetaType::type("qreal")));
+ QCOMPARE(int(prop.type()), QMetaType::type("qreal"));
QVERIFY(!prop.write(&obj, QVariant("Hello")));
QVERIFY(prop.write(&obj, QVariant::fromValue(128.0f)));
QVariant v = prop.read(&obj);
QCOMPARE(v.userType(), qMetaTypeId<qreal>());
- QVERIFY(qvariant_cast<qreal>(v) == 128.0);
+ QCOMPARE(qvariant_cast<qreal>(v), 128.0);
QVERIFY(prop.write(&obj, QVariant::fromValue(double(127))));
v = prop.read(&obj);
QCOMPARE(v.userType(), qMetaTypeId<qreal>());
- QVERIFY(qvariant_cast<qreal>(v) == 127.0);
+ QCOMPARE(qvariant_cast<qreal>(v), 127.0);
}
class DynamicPropertyObject : public PropertyObject
@@ -3001,7 +2998,7 @@ void tst_QObject::recursiveSignalEmission()
proc.start(path);
QVERIFY2(proc.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, proc.errorString())));
QVERIFY(proc.waitForFinished());
- QVERIFY(proc.exitStatus() == QProcess::NormalExit);
+ QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);
#endif
}
@@ -5611,6 +5608,112 @@ void tst_QObject::connectVirtualSlots()
*/
}
+struct VirtualBase
+{
+ int virtual_base_count;
+ VirtualBase() : virtual_base_count(0) {}
+ virtual ~VirtualBase() {}
+ virtual void slot2() = 0;
+};
+
+class ObjectWithVirtualBase : public VirtualSlotsObject, public virtual VirtualBase
+{
+ Q_OBJECT
+public:
+ ObjectWithVirtualBase() : regular_call_count(0), derived_counter2(0) {}
+ int regular_call_count;
+ int derived_counter2;
+
+public slots:
+ void regularSlot() { ++regular_call_count; }
+ virtual void slot1() { ++derived_counter2; }
+ virtual void slot2() { ++virtual_base_count; }
+};
+
+// VMI = Virtual or Multiple Inheritance
+// (in this case, both)
+void tst_QObject::connectSlotsVMIClass()
+{
+ // test connecting by the base
+ {
+ ObjectWithVirtualBase obj;
+ QVERIFY( QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &VirtualSlotsObjectBase::slot1, Qt::UniqueConnection));
+ QVERIFY(!QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &VirtualSlotsObjectBase::slot1, Qt::UniqueConnection));
+
+ emit obj.signal1();
+ QCOMPARE(obj.base_counter1, 0);
+ QCOMPARE(obj.derived_counter1, 0);
+ QCOMPARE(obj.derived_counter2, 1);
+ QCOMPARE(obj.virtual_base_count, 0);
+
+ QVERIFY(QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &VirtualSlotsObjectBase::slot1));
+ QVERIFY(!QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &VirtualSlotsObjectBase::slot1));
+
+ emit obj.signal1();
+ QCOMPARE(obj.base_counter1, 0);
+ QCOMPARE(obj.derived_counter1, 0);
+ QCOMPARE(obj.derived_counter2, 1);
+ QCOMPARE(obj.virtual_base_count, 0);
+ }
+
+ // test connecting with the actual class
+ {
+ ObjectWithVirtualBase obj;
+ QVERIFY( QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::regularSlot, Qt::UniqueConnection));
+ QVERIFY(!QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::regularSlot, Qt::UniqueConnection));
+ QVERIFY( QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot1, Qt::UniqueConnection));
+ QVERIFY(!QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot1, Qt::UniqueConnection));
+
+ emit obj.signal1();
+ QCOMPARE(obj.base_counter1, 0);
+ QCOMPARE(obj.derived_counter1, 0);
+ QCOMPARE(obj.derived_counter2, 1);
+ QCOMPARE(obj.regular_call_count, 1);
+ QCOMPARE(obj.virtual_base_count, 0);
+
+ QVERIFY( QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::regularSlot));
+ QVERIFY(!QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::regularSlot));
+ QVERIFY( QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot1));
+ QVERIFY(!QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot1));
+
+ emit obj.signal1();
+ QCOMPARE(obj.base_counter1, 0);
+ QCOMPARE(obj.derived_counter1, 0);
+ QCOMPARE(obj.derived_counter2, 1);
+ QCOMPARE(obj.regular_call_count, 1);
+ QCOMPARE(obj.virtual_base_count, 0);
+
+ /* the C++ standard say the comparison between pointer to virtual member function is unspecified
+ QVERIFY( QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &VirtualSlotsObjectBase::slot1, Qt::UniqueConnection));
+ QVERIFY(!QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot1, Qt::UniqueConnection));
+ */
+ }
+
+ // test connecting a slot that is virtual from the virtual base
+ {
+ ObjectWithVirtualBase obj;
+ QVERIFY( QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot2, Qt::UniqueConnection));
+ QVERIFY(!QObject::connect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot2, Qt::UniqueConnection));
+
+ emit obj.signal1();
+ QCOMPARE(obj.base_counter1, 0);
+ QCOMPARE(obj.derived_counter1, 0);
+ QCOMPARE(obj.derived_counter2, 0);
+ QCOMPARE(obj.virtual_base_count, 1);
+ QCOMPARE(obj.regular_call_count, 0);
+
+ QVERIFY( QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot2));
+ QVERIFY(!QObject::disconnect(&obj, &VirtualSlotsObjectBase::signal1, &obj, &ObjectWithVirtualBase::slot2));
+
+ emit obj.signal1();
+ QCOMPARE(obj.base_counter1, 0);
+ QCOMPARE(obj.derived_counter1, 0);
+ QCOMPARE(obj.derived_counter2, 0);
+ QCOMPARE(obj.virtual_base_count, 1);
+ QCOMPARE(obj.regular_call_count, 0);
+ }
+}
+
#ifndef QT_BUILD_INTERNAL
void tst_QObject::connectPrivateSlots()
{QSKIP("Needs QT_BUILD_INTERNAL");}
@@ -5801,6 +5904,102 @@ void tst_QObject::connectFunctorWithContext()
context->deleteLater();
}
+class StatusChanger : public QObject
+{
+ Q_OBJECT
+public:
+ StatusChanger(int *status) : m_status(status)
+ {
+ }
+ ~StatusChanger()
+ {
+ *m_status = 2;
+ }
+private:
+ int *m_status;
+};
+
+class DispatcherWatcher : public QObject
+{
+ Q_OBJECT
+public:
+ DispatcherWatcher(QEventLoop &e, int *statusAwake, int *statusAboutToBlock) :
+ m_eventLoop(&e),
+ m_statusAwake(statusAwake),
+ m_statusAboutToBlock(statusAboutToBlock),
+ m_aboutToBlocks(0),
+ m_awakes(0)
+ {
+ awake = new StatusChanger(statusAwake);
+ abouttoblock = new StatusChanger(statusAboutToBlock);
+ QCOMPARE(*statusAwake, 1);
+ QCOMPARE(*statusAboutToBlock, 1);
+ connect(QAbstractEventDispatcher::instance(), SIGNAL(awake()), this, SLOT(onAwake()));
+ connect(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()), this, SLOT(onAboutToBlock()));
+
+ }
+
+ ~DispatcherWatcher()
+ {
+ if (awake)
+ awake->deleteLater();
+ if (abouttoblock)
+ abouttoblock->deleteLater();
+ }
+
+public slots:
+ // The order of these 2 handlers differs on different event dispatchers
+ void onAboutToBlock()
+ {
+ if (abouttoblock) {
+ abouttoblock->deleteLater();
+ abouttoblock = 0;
+ }
+ ++m_aboutToBlocks;
+ }
+ void onAwake()
+ {
+ if (awake) {
+ awake->deleteLater();
+ awake = 0;
+ }
+ ++m_awakes;
+
+ }
+ void onSignal1()
+ {
+ // Status check. At this point the event loop should have spinned enough to delete all the objects.
+ QCOMPARE(*m_statusAwake, 2);
+ QCOMPARE(*m_statusAboutToBlock, 2);
+ QMetaObject::invokeMethod(m_eventLoop, "quit", Qt::QueuedConnection);
+ }
+
+private:
+ StatusChanger *awake;
+ StatusChanger *abouttoblock;
+ QEventLoop *m_eventLoop;
+ int *m_statusAwake;
+ int *m_statusAboutToBlock;
+ int m_aboutToBlocks;
+ int m_awakes;
+};
+
+
+void tst_QObject::deleteLaterInAboutToBlockHandler()
+{
+ int statusAwake = 1;
+ int statusAboutToBlock = 1;
+ QEventLoop e;
+ DispatcherWatcher dw(e, &statusAwake, &statusAboutToBlock);
+ QTimer::singleShot(2000, &dw, &DispatcherWatcher::onSignal1);
+
+ QCOMPARE(statusAwake, 1);
+ QCOMPARE(statusAboutToBlock, 1);
+ e.exec();
+ QCOMPARE(statusAwake, 2);
+ QCOMPARE(statusAboutToBlock, 2);
+}
+
void tst_QObject::connectFunctorWithContextUnique()
{
// Qt::UniqueConnections currently don't work for functors, but we need to
diff --git a/tests/auto/corelib/kernel/qpointer/qpointer.pro b/tests/auto/corelib/kernel/qpointer/qpointer.pro
index 4b573cb6a5..02765efdbd 100644
--- a/tests/auto/corelib/kernel/qpointer/qpointer.pro
+++ b/tests/auto/corelib/kernel/qpointer/qpointer.pro
@@ -1,7 +1,5 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qpointer
QT = core testlib
qtHaveModule(widgets): QT += widgets
SOURCES = tst_qpointer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
index f3f485297a..914f9e2b9b 100644
--- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
+++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qsharedmemory/sharedmemoryhelper/main.cpp b/tests/auto/corelib/kernel/qsharedmemory/sharedmemoryhelper/main.cpp
index 03c5a13da9..ffbad37d82 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/sharedmemoryhelper/main.cpp
+++ b/tests/auto/corelib/kernel/qsharedmemory/sharedmemoryhelper/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
index 43e25743d7..b6f6d2a7f3 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
+++ b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -147,7 +142,7 @@ void tst_QSharedMemory::init()
{
existingSharedMemory = new QSharedMemory(EXISTING_SHARE);
if (!existingSharedMemory->create(EXISTING_SIZE)) {
- QVERIFY(existingSharedMemory->error() == QSharedMemory::AlreadyExists);
+ QCOMPARE(existingSharedMemory->error(), QSharedMemory::AlreadyExists);
}
}
@@ -246,10 +241,10 @@ void tst_QSharedMemory::constructor()
QSharedMemory sm;
QCOMPARE(sm.key(), QString());
QVERIFY(!sm.isAttached());
- QVERIFY(sm.data() == 0);
+ QVERIFY(!sm.data());
QCOMPARE(sm.size(), 0);
QCOMPARE(sm.error(), QSharedMemory::NoError);
- QVERIFY(sm.errorString() == QString());
+ QCOMPARE(sm.errorString(), QString());
}
void tst_QSharedMemory::key_data()
@@ -290,8 +285,8 @@ void tst_QSharedMemory::key()
QCOMPARE(sm.isAttached(), false);
QCOMPARE(sm.error(), QSharedMemory::NoError);
- QVERIFY(sm.errorString() == QString());
- QVERIFY(sm.data() == 0);
+ QCOMPARE(sm.errorString(), QString());
+ QVERIFY(!sm.data());
QCOMPARE(sm.size(), 0);
QCOMPARE(sm.detach(), false);
@@ -330,11 +325,11 @@ void tst_QSharedMemory::create()
qDebug() << sm.errorString();
QCOMPARE(sm.key(), key);
if (canCreate) {
- QVERIFY(sm.errorString() == QString());
+ QCOMPARE(sm.errorString(), QString());
QVERIFY(sm.data() != 0);
QVERIFY(sm.size() != 0);
} else {
- QVERIFY(sm.data() == 0);
+ QVERIFY(!sm.data());
QVERIFY(sm.errorString() != QString());
}
}
@@ -379,10 +374,10 @@ void tst_QSharedMemory::attach()
QVERIFY(sm.size() != 0);
QVERIFY(sm.detach());
QCOMPARE(sm.size(), 0);
- QVERIFY(sm.data() == 0);
+ QVERIFY(!sm.data());
} else {
- QVERIFY(sm.data() == 0);
- QVERIFY(sm.size() == 0);
+ QVERIFY(!sm.data());
+ QCOMPARE(sm.size(), 0);
QVERIFY(sm.errorString() != QString());
QVERIFY(!sm.detach());
}
@@ -483,7 +478,7 @@ void tst_QSharedMemory::useTooMuchMemory()
bool success = true;
int count = 0;
while (success) {
- QString key = QString("maxmemorytest_%1").arg(count++);
+ QString key = QLatin1String("maxmemorytest_") + QString::number(count++);
QSharedMemory *sm = new QSharedMemory(rememberKey(key));
QVERIFY(sm);
jail.append(sm);
@@ -500,7 +495,7 @@ void tst_QSharedMemory::useTooMuchMemory()
QVERIFY(!sm->isAttached());
QCOMPARE(sm->key(), key);
QCOMPARE(sm->size(), 0);
- QVERIFY(sm->data() == 0);
+ QVERIFY(!sm->data());
if (sm->error() != QSharedMemory::OutOfResources)
qDebug() << sm->error() << sm->errorString();
// ### Linux won't return OutOfResources if there are not enough semaphores to use.
@@ -537,7 +532,7 @@ void tst_QSharedMemory::attachTooMuch()
QVERIFY(!war->isAttached());
QCOMPARE(war->key(), government.key());
QCOMPARE(war->size(), 0);
- QVERIFY(war->data() == 0);
+ QVERIFY(!war->data());
QCOMPARE(war->error(), QSharedMemory::OutOfResources);
QVERIFY(war->errorString() != QString());
QVERIFY(!war->detach());
diff --git a/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro b/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro
index c6c6f379eb..6e4913db5d 100644
--- a/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro
+++ b/tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro
@@ -1,7 +1,5 @@
CONFIG += testcase console
-CONFIG += parallel_test
TARGET = tst_qsignalblocker
QT = core testlib
SOURCES = tst_qsignalblocker.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp b/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp
index 9a2dfb451b..fd18f00cd0 100644
--- a/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp
+++ b/tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@woboq.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qsignalmapper/qsignalmapper.pro b/tests/auto/corelib/kernel/qsignalmapper/qsignalmapper.pro
index 526db5eef3..418d6dce62 100644
--- a/tests/auto/corelib/kernel/qsignalmapper/qsignalmapper.pro
+++ b/tests/auto/corelib/kernel/qsignalmapper/qsignalmapper.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsignalmapper
QT = core testlib
SOURCES = tst_qsignalmapper.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
index 579aa78ac4..c03e3e8e9f 100644
--- a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
+++ b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -97,16 +92,16 @@ void tst_QSignalMapper::mapped()
connect(&mapper, SIGNAL(mapped(QString)), &target, SLOT(myslot(QString)));
src1.emit_mysignal(20);
- QVERIFY(target.id == 1);
+ QCOMPARE(target.id, 1);
QVERIFY(target.str.isEmpty());
src2.emit_mysignal(20);
- QVERIFY(target.id == 2);
- QVERIFY(target.str == "two");
+ QCOMPARE(target.id, 2);
+ QCOMPARE(target.str, QLatin1String("two"));
src3.emit_mysignal(20);
- QVERIFY(target.id == 2);
- QVERIFY(target.str == "three");
+ QCOMPARE(target.id, 2);
+ QCOMPARE(target.str, QLatin1String("three"));
}
QTEST_MAIN(tst_QSignalMapper)
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro b/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro
index 303a96c68f..58e4b98af7 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro
+++ b/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsocketnotifier
QT = core-private network-private testlib
SOURCES = tst_qsocketnotifier.cpp
@@ -7,4 +6,3 @@ SOURCES = tst_qsocketnotifier.cpp
requires(contains(QT_CONFIG,private_tests))
include(../../../network/socket/platformsocketengine/platformsocketengine.pri)
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
index 95e924bd77..1598382959 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
+++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -155,7 +150,7 @@ void tst_QSocketNotifier::unexpectedDisconnection()
readEnd1.initialize(QAbstractSocket::TcpSocket);
readEnd1.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd1.waitForWrite());
- QVERIFY(readEnd1.state() == QAbstractSocket::ConnectedState);
+ QCOMPARE(readEnd1.state(), QAbstractSocket::ConnectedState);
QVERIFY(server.waitForNewConnection());
QTcpSocket *writeEnd1 = server.nextPendingConnection();
QVERIFY(writeEnd1 != 0);
@@ -164,7 +159,7 @@ void tst_QSocketNotifier::unexpectedDisconnection()
readEnd2.initialize(QAbstractSocket::TcpSocket);
readEnd2.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd2.waitForWrite());
- QVERIFY(readEnd2.state() == QAbstractSocket::ConnectedState);
+ QCOMPARE(readEnd2.state(), QAbstractSocket::ConnectedState);
QVERIFY(server.waitForNewConnection());
QTcpSocket *writeEnd2 = server.nextPendingConnection();
QVERIFY(writeEnd2 != 0);
@@ -190,8 +185,8 @@ void tst_QSocketNotifier::unexpectedDisconnection()
QVERIFY(timer.isActive()); //escape if test would hang
} while(tester.sequence <= 0);
- QVERIFY(readEnd1.state() == QAbstractSocket::ConnectedState);
- QVERIFY(readEnd2.state() == QAbstractSocket::ConnectedState);
+ QCOMPARE(readEnd1.state(), QAbstractSocket::ConnectedState);
+ QCOMPARE(readEnd2.state(), QAbstractSocket::ConnectedState);
QCOMPARE(tester.sequence, 2);
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/main.cpp b/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/main.cpp
index e7e92e55ac..7bfb6b16cc 100644
--- a/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/main.cpp
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/systemsemaphorehelper/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp
index 169a13aff2..641ea5fc9d 100644
--- a/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp
+++ b/tests/auto/corelib/kernel/qsystemsemaphore/test/tst_qsystemsemaphore.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -191,13 +186,13 @@ void tst_QSystemSemaphore::basicProcesses()
acquire.start(m_helperBinary, QStringList("acquire"));
QVERIFY2(acquire.waitForStarted(), "Could not start helper binary");
acquire.waitForFinished(HELPERWAITTIME);
- QVERIFY(acquire.state() == QProcess::Running);
+ QCOMPARE(acquire.state(), QProcess::Running);
acquire.kill();
release.start(m_helperBinary, QStringList("release"));
QVERIFY2(release.waitForStarted(), "Could not start helper binary");
acquire.waitForFinished(HELPERWAITTIME);
release.waitForFinished(HELPERWAITTIME);
- QVERIFY(acquire.state() == QProcess::NotRunning);
+ QCOMPARE(acquire.state(), QProcess::NotRunning);
#endif
}
diff --git a/tests/auto/corelib/kernel/qtimer/qtimer.pro b/tests/auto/corelib/kernel/qtimer/qtimer.pro
index 48adf07f64..8afdbb148e 100644
--- a/tests/auto/corelib/kernel/qtimer/qtimer.pro
+++ b/tests/auto/corelib/kernel/qtimer/qtimer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtimer
QT = core testlib
SOURCES = tst_qtimer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
index b34a3a6beb..6fd192c357 100644
--- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
+++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -529,7 +525,7 @@ void tst_QTimer::restartedTimerFiresTooSoon()
{
RestartedTimerFiresTooSoonObject object;
object.timerFired();
- QVERIFY(object.eventLoop.exec() == 0);
+ QCOMPARE(object.eventLoop.exec(), 0);
}
class LongLastingSlotClass : public QObject
diff --git a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
index c9b160a8d1..e673278920 100644
--- a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
+++ b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
@@ -1,9 +1,9 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtranslator
QT = core testlib
SOURCES = tst_qtranslator.cpp
RESOURCES += qtranslator.qrc
-android:!android-no-sdk: RESOURCES += android_testdata.qrc
+android: RESOURCES += android_testdata.qrc
else: TESTDATA += dependencies_la.qm hellotr_la.qm msgfmt_from_po.qm
diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
index c2290add5b..66971af7b4 100644
--- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
+++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -69,7 +64,7 @@ tst_QTranslator::tst_QTranslator()
void tst_QTranslator::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -116,7 +111,7 @@ void tst_QTranslator::load()
QTranslator tor( 0 );
tor.load("hellotr_la");
QVERIFY(!tor.isEmpty());
- QCOMPARE(tor.translate("QPushButton", "Hello world!"), QString::fromLatin1("Hallo Welt!"));
+ QCOMPARE(tor.translate("QPushButton", "Hello world!"), QLatin1String("Hallo Welt!"));
}
void tst_QTranslator::load2()
@@ -127,7 +122,7 @@ void tst_QTranslator::load2()
QByteArray data = file.readAll();
tor.load((const uchar *)data.constData(), data.length());
QVERIFY(!tor.isEmpty());
- QCOMPARE(tor.translate("QPushButton", "Hello world!"), QString::fromLatin1("Hallo Welt!"));
+ QCOMPARE(tor.translate("QPushButton", "Hello world!"), QLatin1String("Hallo Welt!"));
}
class TranslatorThread : public QThread
@@ -138,7 +133,7 @@ class TranslatorThread : public QThread
if (tor.isEmpty())
qFatal("Could not load translation");
- if (tor.translate("QPushButton", "Hello world!") != QString::fromLatin1("Hallo Welt!"))
+ if (tor.translate("QPushButton", "Hello world!") != QLatin1String("Hallo Welt!"))
qFatal("Test string was not translated correctlys");
}
};
@@ -221,9 +216,9 @@ void tst_QTranslator::plural()
tor.load("hellotr_la");
QVERIFY(!tor.isEmpty());
QCoreApplication::installTranslator(&tor);
- QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 0), QString::fromLatin1("Hallo 0 Welten!"));
- QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 1), QString::fromLatin1("Hallo 1 Welt!"));
- QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 2), QString::fromLatin1("Hallo 2 Welten!"));
+ QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 0), QLatin1String("Hallo 0 Welten!"));
+ QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 1), QLatin1String("Hallo 1 Welt!"));
+ QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 2), QLatin1String("Hallo 2 Welten!"));
}
void tst_QTranslator::translate_qm_file_generated_with_msgfmt()
@@ -249,7 +244,7 @@ void tst_QTranslator::loadFromResource()
QTranslator tor;
tor.load(":/tst_qtranslator/hellotr_la.qm");
QVERIFY(!tor.isEmpty());
- QCOMPARE(tor.translate("QPushButton", "Hello world!"), QString::fromLatin1("Hallo Welt!"));
+ QCOMPARE(tor.translate("QPushButton", "Hello world!"), QLatin1String("Hallo Welt!"));
}
void tst_QTranslator::loadDirectory()
@@ -269,16 +264,16 @@ void tst_QTranslator::dependencies()
QTranslator tor;
tor.load("dependencies_la");
QVERIFY(!tor.isEmpty());
- QCOMPARE(tor.translate("QPushButton", "Hello world!"), QString::fromLatin1("Hallo Welt!"));
+ QCOMPARE(tor.translate("QPushButton", "Hello world!"), QLatin1String("Hallo Welt!"));
// plural
QCoreApplication::installTranslator(&tor);
- QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 0), QString::fromLatin1("Hallo 0 Welten!"));
- QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 1), QString::fromLatin1("Hallo 1 Welt!"));
- QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 2), QString::fromLatin1("Hallo 2 Welten!"));
+ QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 0), QLatin1String("Hallo 0 Welten!"));
+ QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 1), QLatin1String("Hallo 1 Welt!"));
+ QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 2), QLatin1String("Hallo 2 Welten!"));
// pick up translation from the file with dependencies
- QCOMPARE(tor.translate("QPushButton", "It's a small world"), QString::fromLatin1("Es ist eine kleine Welt"));
+ QCOMPARE(tor.translate("QPushButton", "It's a small world"), QLatin1String("Es ist eine kleine Welt"));
}
{
@@ -288,7 +283,7 @@ void tst_QTranslator::dependencies()
QByteArray data = file.readAll();
tor.load((const uchar *)data.constData(), data.length());
QVERIFY(!tor.isEmpty());
- QCOMPARE(tor.translate("QPushButton", "Hello world!"), QString::fromLatin1("Hallo Welt!"));
+ QCOMPARE(tor.translate("QPushButton", "Hello world!"), QLatin1String("Hallo Welt!"));
}
}
diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.pro b/tests/auto/corelib/kernel/qvariant/qvariant.pro
index 39178ba9e6..33e8b6e2ad 100644
--- a/tests/auto/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/auto/corelib/kernel/qvariant/qvariant.pro
@@ -1,9 +1,11 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qvariant
-QT = core testlib
+QT = core-private testlib
INCLUDEPATH += $$PWD/../../../other/qvariant_common
SOURCES = tst_qvariant.cpp
RESOURCES += qvariant.qrc
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
contains(QT_CONFIG, c++11): CONFIG += c++11
+!contains(QT_CONFIG, doubleconversion):!contains(QT_CONFIG, system-doubleconversion) {
+ DEFINES += QT_NO_DOUBLECONVERSION
+}
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 509eed231d..75fa424ab1 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -1,33 +1,28 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
-** Copyright (C) 2015 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Olivier Goffart <ogoffart@woboq.com>
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -57,6 +52,7 @@
#include <QBuffer>
#include "qnumeric.h"
+#include <private/qlocale_p.h>
#include "tst_qvariant_common.h"
class CustomNonQObject;
@@ -355,13 +351,13 @@ void tst_QVariant::constructor_invalid()
QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type, type id:"));
QVariant variant(static_cast<QVariant::Type>(typeId));
QVERIFY(!variant.isValid());
- QVERIFY(variant.userType() == QMetaType::UnknownType);
+ QCOMPARE(variant.userType(), int(QMetaType::UnknownType));
}
{
QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type, type id:"));
QVariant variant(typeId, /* copy */ 0);
QVERIFY(!variant.isValid());
- QVERIFY(variant.userType() == QMetaType::UnknownType);
+ QCOMPARE(variant.userType(), int(QMetaType::UnknownType));
}
}
@@ -905,7 +901,7 @@ void tst_QVariant::toFloat()
bool ok;
float d = value.toFloat(&ok);
QCOMPARE(d, result);
- QVERIFY(ok == valueOK);
+ QCOMPARE(ok, valueOK);
}
void tst_QVariant::toLongLong_data()
@@ -1032,7 +1028,11 @@ void tst_QVariant::toByteArray_data()
QTest::newRow( "int" ) << QVariant( -123 ) << QByteArray( "-123" );
QTest::newRow( "uint" ) << QVariant( (uint)123 ) << QByteArray( "123" );
QTest::newRow( "double" ) << QVariant( 123.456 ) << QByteArray( "123.456" );
- QTest::newRow( "float" ) << QVariant( 123.456f ) << QByteArray( "123.456001" );
+
+ // Conversion from float to double adds bits of which the double-to-string converter doesn't
+ // know they're insignificant
+ QTest::newRow( "float" ) << QVariant( 123.456f ) << QByteArray( "123.45600128173828" );
+
QTest::newRow( "longlong" ) << QVariant( (qlonglong)34 ) << QByteArray( "34" );
QTest::newRow( "ulonglong" ) << QVariant( (qulonglong)34 ) << QByteArray( "34" );
}
@@ -1058,7 +1058,11 @@ void tst_QVariant::toString_data()
QTest::newRow( "int" ) << QVariant( -123 ) << QString( "-123" );
QTest::newRow( "uint" ) << QVariant( (uint)123 ) << QString( "123" );
QTest::newRow( "double" ) << QVariant( 123.456 ) << QString( "123.456" );
- QTest::newRow( "float" ) << QVariant( 123.456f ) << QString( "123.456001" );
+
+ // Conversion from float to double adds bits of which the double-to-string converter doesn't
+ // know they're insignificant
+ QTest::newRow( "float" ) << QVariant( 123.456f ) << QString( "123.45600128173828" );
+
QTest::newRow( "bool" ) << QVariant( true ) << QString( "true" );
QTest::newRow( "qdate" ) << QVariant( QDate( 2002, 1, 1 ) ) << QString( "2002-01-01" );
QTest::newRow( "qtime" ) << QVariant( QTime( 12, 34, 56 ) ) << QString( "12:34:56" );
@@ -1327,9 +1331,9 @@ void tst_QVariant::writeToReadFromDataStream()
// the uninitialized float can be NaN (observed on Windows Mobile 5 ARMv4i)
float readFloat = qvariant_cast<float>(readVariant);
float writtenFloat = qvariant_cast<float>(writeVariant);
- QVERIFY(qIsNaN(readFloat) == qIsNaN(writtenFloat));
+ QCOMPARE(qIsNaN(readFloat), qIsNaN(writtenFloat));
if (!qIsNaN(readFloat))
- QVERIFY(readFloat == writtenFloat);
+ QCOMPARE(readFloat, writtenFloat);
}
break;
}
@@ -1415,12 +1419,28 @@ void tst_QVariant::operator_eq_eq_data()
QVariant mUIntQString(QString("42"));
QVariant mDouble(42.11);
+#ifdef QT_NO_DOUBLECONVERSION
+ // Without libdouble-conversion we don't get the shortest possible representation.
QVariant mDoubleString(QByteArray("42.109999999999999"));
- QVariant mDoubleQString(QString("42.109999999999999"));
+ QVariant mDoubleQString(QByteArray("42.109999999999999"));
+#else
+ // You cannot fool the double-to-string conversion into producing insignificant digits with
+ // libdouble-conversion. You can, of course, add insignificant digits to the string and fool
+ // the double-to-double comparison after converting the string to a double.
+ QVariant mDoubleString(QByteArray("42.11"));
+ QVariant mDoubleQString(QString("42.11"));
+#endif
+ // Float-to-double conversion produces insignificant extra bits.
QVariant mFloat(42.11f);
- QVariant mFloatString(QByteArray("42.1100006"));
- QVariant mFloatQString(QString("42.1100006"));
+#ifdef QT_NO_DOUBLECONVERSION
+ // The trailing '2' is not significant, but snprintf doesn't know this.
+ QVariant mFloatString(QByteArray("42.110000610351562"));
+ QVariant mFloatQString(QString("42.110000610351562"));
+#else
+ QVariant mFloatString(QByteArray("42.11000061035156"));
+ QVariant mFloatQString(QString("42.11000061035156"));
+#endif
QVariant mLongLong((qlonglong)-42);
QVariant mLongLongString(QByteArray("-42"));
@@ -2126,7 +2146,7 @@ void tst_QVariant::userType()
QVERIFY(!userVar.canConvert(QVariant::String));
QVariant userVar2(userVar);
- QVERIFY(userVar == userVar2);
+ QCOMPARE(userVar, userVar2);
userVar2.setValue(data2);
QVERIFY(userVar != userVar2);
@@ -2140,7 +2160,7 @@ void tst_QVariant::userType()
userVar3.setValue(data2);
userVar3 = userVar2;
- QVERIFY(userVar2 == userVar3);
+ QCOMPARE(userVar2, userVar3);
}
// At this point all QVariants got destroyed but we have 2 MyType instances.
QCOMPARE(instanceCount, 2);
@@ -2155,7 +2175,7 @@ void tst_QVariant::userType()
QVERIFY(!userVar.canConvert(QVariant::String));
QVariant userVar2(userVar);
- QVERIFY(userVar == userVar2);
+ QCOMPARE(userVar, userVar2);
userVar2.setValue(&data2);
QVERIFY(userVar != userVar2);
@@ -2169,10 +2189,10 @@ void tst_QVariant::userType()
/* This check is correct now. userVar2 contains a pointer to data2 and so
* does userVar3. */
- QVERIFY(userVar2 == userVar3);
+ QCOMPARE(userVar2, userVar3);
userVar3 = userVar2;
- QVERIFY(userVar2 == userVar3);
+ QCOMPARE(userVar2, userVar3);
}
QCOMPARE(instanceCount, 2);
@@ -2457,7 +2477,7 @@ void tst_QVariant::saveLoadCustomTypes()
qRegisterMetaTypeStreamOperators<Blah>("Blah");
QCOMPARE(v.userType(), tp);
- QVERIFY(v.type() == QVariant::UserType);
+ QCOMPARE(v.type(), QVariant::UserType);
{
QDataStream stream(&data, QIODevice::WriteOnly);
stream << v;
@@ -2645,7 +2665,7 @@ void tst_QVariant::qvariant_cast_QObject_derived()
{
CustomQObjectDerivedNoMetaType *object = new CustomQObjectDerivedNoMetaType(this);
QVariant data = QVariant::fromValue(object);
- QVERIFY(data.userType() == qMetaTypeId<CustomQObjectDerivedNoMetaType*>());
+ QCOMPARE(data.userType(), qMetaTypeId<CustomQObjectDerivedNoMetaType*>());
QCOMPARE(data.value<QObject *>(), object);
QCOMPARE(data.value<CustomQObjectDerivedNoMetaType *>(), object);
QCOMPARE(data.value<CustomQObject *>(), object);
@@ -2654,7 +2674,7 @@ void tst_QVariant::qvariant_cast_QObject_derived()
CustomQObjectDerived *object = new CustomQObjectDerived(this);
QVariant data = QVariant::fromValue(object);
- QVERIFY(data.userType() == qMetaTypeId<CustomQObjectDerived*>());
+ QCOMPARE(data.userType(), qMetaTypeId<CustomQObjectDerived*>());
QCOMPARE(data.value<QObject *>(), object);
QCOMPARE(data.value<CustomQObjectDerived *>(), object);
@@ -2921,10 +2941,10 @@ void tst_QVariant::voidStar() const
QVariant v1, v2;
v1 = QVariant::fromValue(p1);
v2 = v1;
- QVERIFY(v1 == v2);
+ QCOMPARE(v1, v2);
v2 = QVariant::fromValue(p2);
- QVERIFY(v1 == v2);
+ QCOMPARE(v1, v2);
p2 = 0;
v2 = QVariant::fromValue(p2);
@@ -2941,10 +2961,10 @@ void tst_QVariant::dataStar() const
QCOMPARE(qvariant_cast<Data*>(v1), p1);
QVariant v2 = v1;
- QVERIFY(v1 == v2);
+ QCOMPARE(v1, v2);
v2 = QVariant::fromValue(p1);
- QVERIFY(v1 == v2);
+ QCOMPARE(v1, v2);
delete p1;
}
@@ -3116,8 +3136,8 @@ void tst_QVariant::compareCustomTypes() const
/* We compare pointers. */
QVERIFY(variant1 != variant2);
- QVERIFY(variant1 == variant1);
- QVERIFY(variant2 == variant2);
+ QCOMPARE(variant1, variant1);
+ QCOMPARE(variant2, variant2);
}
void tst_QVariant::timeToDateTime() const
@@ -3340,7 +3360,7 @@ void tst_QVariant::toIntFromQString() const
void tst_QVariant::toIntFromDouble() const
{
double d = 2147483630; // max int 2147483647
- QVERIFY((int)d == 2147483630);
+ QCOMPARE((int)d, 2147483630);
QVariant var(d);
QVERIFY( var.canConvert( QVariant::Int ) );
@@ -3425,10 +3445,11 @@ void tst_QVariant::numericalConvert()
switch (v.userType())
{
case QVariant::Double:
- QCOMPARE(v.toString() , QString::number(num, 'g', DBL_MANT_DIG * std::log10(2.) + 2));
+ QCOMPARE(v.toString() , QString::number(num, 'g', QLocale::FloatingPointShortest));
break;
case QMetaType::Float:
- QCOMPARE(v.toString() , QString::number(float(num), 'g', FLT_MANT_DIG * std::log10(2.) + 2));
+ QCOMPARE(v.toString() ,
+ QString::number(float(num), 'g', QLocale::FloatingPointShortest));
break;
}
}
@@ -3664,8 +3685,17 @@ void tst_QVariant::moreCustomTypes()
QCOMPARE(MyNotMovable::count, 0);
{
+#ifdef QT_NO_DOUBLECONVERSION
+ // snprintf cannot do "shortest" conversion and always adds noise.
PLAY_WITH_VARIANT(12.12, false, "12.119999999999999", 12.12, true);
- PLAY_WITH_VARIANT(12.12f, false, "12.1199999", 12.12f, true);
+#else
+ // Double can be printed exactly with libdouble-conversion
+ PLAY_WITH_VARIANT(12.12, false, "12.12", 12.12, true);
+#endif
+
+ // Float is converted to double, adding insignificant bits
+ PLAY_WITH_VARIANT(12.12f, false, "12.119999885559082", 12.12f, true);
+
PLAY_WITH_VARIANT('a', false, "a", 'a', true);
PLAY_WITH_VARIANT((unsigned char)('a'), false, "a", 'a', true);
PLAY_WITH_VARIANT( quint8(12), false, "\xc", 12, true);
@@ -4170,7 +4200,7 @@ void tst_QVariant::saveInvalid()
QDataStream stream(&data, QIODevice::WriteOnly);
stream.setVersion(version);
stream << QVariant();
- QVERIFY(stream.status() == QDataStream::Ok);
+ QCOMPARE(stream.status(), QDataStream::Ok);
QVERIFY(data.size() >= 4);
QCOMPARE(int(data.constData()[0]), 0);
QCOMPARE(int(data.constData()[1]), 0);
@@ -4184,7 +4214,7 @@ void tst_QVariant::saveNewBuiltinWithOldStream()
QDataStream stream(&data, QIODevice::WriteOnly);
stream.setVersion(QDataStream::Qt_3_1);
stream << QVariant::fromValue<QJsonValue>(123); // QJsonValue class was introduced in Qt5
- QVERIFY(stream.status() == QDataStream::Ok);
+ QCOMPARE(stream.status(), QDataStream::Ok);
QVERIFY(data.size() >= 4);
QCOMPARE(int(data.constData()[0]), 0);
QCOMPARE(int(data.constData()[1]), 0);
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/qwineventnotifier.pro b/tests/auto/corelib/kernel/qwineventnotifier/qwineventnotifier.pro
index f0ac7c621f..20ec7572fb 100644
--- a/tests/auto/corelib/kernel/qwineventnotifier/qwineventnotifier.pro
+++ b/tests/auto/corelib/kernel/qwineventnotifier/qwineventnotifier.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qwineventnotifier
QT = core-private testlib
SOURCES = tst_qwineventnotifier.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
index 7fc28e2615..3221587300 100644
--- a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
+++ b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
index d0b834824a..e661ff8412 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro
@@ -10,6 +10,5 @@ RESOURCES += $$QT_SOURCE_TREE/src/corelib/mimetypes/mimetypes.qrc
RESOURCES += ../testdata.qrc
*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Wshadow -Wno-long-long -Wnon-virtual-dtor
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
unix:!mac:!qnx: DEFINES += USE_XDG_DATA_DIRS
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp
index 2113672821..1ca730d0c7 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
index 4add6c2bcd..160f359116 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmimedatabase-xml
@@ -11,6 +11,5 @@ RESOURCES += $$QT_SOURCE_TREE/src/corelib/mimetypes/mimetypes.qrc
RESOURCES += ../testdata.qrc
*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Wshadow -Wno-long-long -Wnon-virtual-dtor
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
unix:!mac:!qnx: DEFINES += USE_XDG_DATA_DIRS
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp
index c4a1dab697..e403baf714 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/test.qml b/tests/auto/corelib/mimetypes/qmimedatabase/test.qml
index 8021db8b51..8b7437d2e6 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/test.qml
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/test.qml
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 David Faure <faure@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index 9ca7e0001a..61ca1a5ddd 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h
index 4d9a360dd9..4918dc6f4a 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro b/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro
index f76a4ab951..1540e75c28 100644
--- a/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro
+++ b/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmimetype
QT = core-private testlib
SOURCES = tst_qmimetype.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
index 94608d398c..d93603f641 100644
--- a/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
+++ b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/plugin.pro b/tests/auto/corelib/plugin/plugin.pro
index e132d9da1a..777e920995 100644
--- a/tests/auto/corelib/plugin/plugin.pro
+++ b/tests/auto/corelib/plugin/plugin.pro
@@ -1,11 +1,14 @@
TEMPLATE=subdirs
SUBDIRS=\
qfactoryloader \
- qlibrary \
- qplugin \
- qpluginloader \
quuid
+load(qfeatures)
+!contains(QT_DISABLED_FEATURES, library): SUBDIRS += \
+ qpluginloader \
+ qplugin \
+ qlibrary
+
contains(CONFIG, static) {
message(Disabling tests requiring shared build of Qt)
SUBDIRS -= qfactoryloader \
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
index f454d84d53..bfa49dc34e 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h
index 59a710acb2..ca2ceed7a9 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro
index fbc9f353d9..132f01092a 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro
@@ -10,4 +10,3 @@ winrt:include(../winrt.pri)
# This is testdata for the tst_qpluginloader test.
target.path = $$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugininterface1.h b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugininterface1.h
index 4e49b4dd66..408e963adf 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugininterface1.h
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugininterface1.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.cpp b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.cpp
index edea621721..34a7207f10 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.cpp
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.h b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.h
index b6e2d89187..130bf66561 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.h
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro
index 4aa9bd0b95..b47ed91535 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro
@@ -10,4 +10,3 @@ winrt:include(../winrt.pri)
# This is testdata for the tst_qpluginloader test.
target.path = $$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugininterface2.h b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugininterface2.h
index e164a1f687..e9b7e14048 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugininterface2.h
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugininterface2.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qfactoryloader/qfactoryloader.pro b/tests/auto/corelib/plugin/qfactoryloader/qfactoryloader.pro
index 42bc01e2ed..ace9fe8fd0 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/qfactoryloader.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/qfactoryloader.pro
@@ -12,4 +12,3 @@ TARGET = tst_qpluginloader
INSTALLS =
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
index d8dfaac29e..f1e76c31bf 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = ../tst_qfactoryloader
QT = core-private testlib
@@ -19,4 +18,8 @@ win32 {
}
mac: CONFIG -= app_bundle
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+load(qfeatures)
+contains(QT_DISABLED_FEATURES, library) {
+ LIBS += -L ../bin/ -lplugin1 -lplugin2
+}
diff --git a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
index 474f4e9868..fe6b1ca299 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
+++ b/tests/auto/corelib/plugin/qfactoryloader/tst_qfactoryloader.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -38,6 +33,11 @@
#include "plugin1/plugininterface1.h"
#include "plugin2/plugininterface2.h"
+#ifdef QT_NO_LIBRARY
+Q_IMPORT_PLUGIN(Plugin1)
+Q_IMPORT_PLUGIN(Plugin2)
+#endif
+
class tst_QFactoryLoader : public QObject
{
Q_OBJECT
@@ -54,8 +54,9 @@ void tst_QFactoryLoader::initTestCase()
{
const QString binFolder = QFINDTESTDATA(binFolderC);
QVERIFY2(!binFolder.isEmpty(), "Unable to locate 'bin' folder");
-
+#ifndef QT_NO_LIBRARY
QCoreApplication::setLibraryPaths(QStringList(QFileInfo(binFolder).absolutePath()));
+#endif
}
void tst_QFactoryLoader::usingTwoFactoriesFromSameDir()
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/lib.pro b/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
index 195e48da93..44bd0be14e 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
@@ -20,4 +20,3 @@ win32 {
DESTDIR = ../release/
}
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/mylib.c b/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
index c12b97606a..419c22a446 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
index 52dd8b9679..d55747501c 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
@@ -46,4 +46,3 @@ renamed_target.extra = $$member(renamed_target.extra, 0, -2)
QMAKE_POST_LINK = $$member(QMAKE_POST_LINK, 0, -2)
INSTALLS += target renamed_target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c b/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
index 748c17698f..74eb68b2ac 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qlibrary/qlibrary.pro b/tests/auto/corelib/plugin/qlibrary/qlibrary.pro
index 5bdf780fc0..ec58838e71 100644
--- a/tests/auto/corelib/plugin/qlibrary/qlibrary.pro
+++ b/tests/auto/corelib/plugin/qlibrary/qlibrary.pro
@@ -9,4 +9,3 @@ TARGET = tst_qlibrary
# no special install rule for subdir
INSTALLS =
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro
index 27433d59c0..d59cd738bf 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro
+++ b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
CONFIG -= app_bundle
TARGET = ../tst_qlibrary
QT = core testlib
@@ -14,4 +13,3 @@ win32 {
}
TESTDATA += ../library_path/invalid.so
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
index 9063ac38de..ed41ab51e1 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -96,7 +91,7 @@
static QString sys_qualifiedLibraryName(const QString &fileName)
{
QString appDir = QCoreApplication::applicationDirPath();
- return appDir + "/" + PREFIX + fileName + SUFFIX;
+ return appDir + QLatin1Char('/') + PREFIX + fileName + SUFFIX;
}
QT_FORWARD_DECLARE_CLASS(QLibrary)
diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/debugplugin.pro b/tests/auto/corelib/plugin/qplugin/debugplugin/debugplugin.pro
index a4db0eccf6..ca47df22bd 100644
--- a/tests/auto/corelib/plugin/qplugin/debugplugin/debugplugin.pro
+++ b/tests/auto/corelib/plugin/qplugin/debugplugin/debugplugin.pro
@@ -4,4 +4,3 @@ CONFIG -= release debug_and_release
SOURCES = main.cpp
QT = core
DESTDIR = ../plugins
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp b/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
index 1e7a15a1e4..c610bfdc46 100644
--- a/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
+++ b/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp b/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
index fd40a9a1f2..dd936f7da1 100644
--- a/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
+++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/releaseplugin.pro b/tests/auto/corelib/plugin/qplugin/releaseplugin/releaseplugin.pro
index 0f698312bd..b7dea67894 100644
--- a/tests/auto/corelib/plugin/qplugin/releaseplugin/releaseplugin.pro
+++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/releaseplugin.pro
@@ -4,4 +4,3 @@ CONFIG -= debug debug_and_release
SOURCES = main.cpp
QT = core
DESTDIR = ../plugins
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
index fd769e7625..874429aab7 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.pro b/tests/auto/corelib/plugin/qplugin/tst_qplugin.pro
index d1ffff9c4e..8c6540fe87 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.pro
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.pro
@@ -1,8 +1,6 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qplugin
QT = core testlib
SOURCES = tst_qplugin.cpp
TESTDATA += plugins/*
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
index 45379f134c..75806dd285 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
index 1908d1fd56..6071d0c4d7 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro
index 70ab54a964..abfc70883e 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.pro
@@ -10,4 +10,3 @@ QT = core
# This is testdata for the tst_qpluginloader test.
target.path = $$[QT_INSTALL_TESTS]/tst_qpluginloader/bin
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp
index 9d34dcdaac..9e7a1f750b 100644
--- a/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2013 Intel Corporation
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro b/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro
index 51435b2266..44b71e6e99 100644
--- a/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro
@@ -12,4 +12,3 @@ win32-msvc: DEFINES += WIN32_MSVC
# This is testdata for the tst_qpluginloader test.
target.path = $$[QT_INSTALL_TESTS]/tst_qpluginloader/bin
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
index c6116df40a..8d23b999c4 100644
--- a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/generate-bad.pl b/tests/auto/corelib/plugin/qpluginloader/machtest/generate-bad.pl
index d99f40ccf9..4fed135049 100755
--- a/tests/auto/corelib/plugin/qpluginloader/machtest/generate-bad.pl
+++ b/tests/auto/corelib/plugin/qpluginloader/machtest/generate-bad.pl
@@ -1,32 +1,27 @@
#!/usr/bin/perl
#############################################################################
##
-## Copyright (C) 2013 Intel Corporation.
-## Contact: http://www.qt.io/licensing/
+## Copyright (C) 2016 Intel Corporation.
+## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:LGPL21$
+## $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 http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+## 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$
##
diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/ppcconverter.pl b/tests/auto/corelib/plugin/qpluginloader/machtest/ppcconverter.pl
index cd1fb5b121..7242d7596b 100755
--- a/tests/auto/corelib/plugin/qpluginloader/machtest/ppcconverter.pl
+++ b/tests/auto/corelib/plugin/qpluginloader/machtest/ppcconverter.pl
@@ -1,32 +1,27 @@
#!/usr/bin/perl
#############################################################################
##
-## Copyright (C) 2013 Intel Corporation.
-## Contact: http://www.qt.io/licensing/
+## Copyright (C) 2016 Intel Corporation.
+## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:LGPL21$
+## $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 http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+## 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$
##
diff --git a/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro b/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro
index 5c6c56e389..83d00f7cd8 100644
--- a/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro
@@ -12,4 +12,3 @@ TARGET = tst_qpluginloader
INSTALLS =
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
index 661450fbb1..12285ba016 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
index e20038290f..01563c3dc9 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
index d266127836..04ce042e24 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro
index 8acd58323c..6aa8161699 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro
@@ -12,4 +12,3 @@ QT = core
# This is testdata for the tst_qpluginloader test.
target.path = $$[QT_INSTALL_TESTS]/tst_qpluginloader/bin
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
index 3894c90ae3..101392927c 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = ../tst_qpluginloader
QT = core testlib
contains(QT_CONFIG, private_tests): QT += core-private
@@ -16,4 +15,3 @@ win32 {
}
TESTDATA += ../elftest ../machtest
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index 72bd38d116..bc853de24e 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -95,7 +91,8 @@
static QString sys_qualifiedLibraryName(const QString &fileName)
{
- QString libname = QFINDTESTDATA(QString("bin/%1%2%3").arg(PREFIX).arg(fileName).arg(SUFFIX));
+ QString name = QLatin1String("bin/") + QLatin1String(PREFIX) + fileName + QLatin1String(SUFFIX);
+ const QString libname = QFINDTESTDATA(name);
QFileInfo fi(libname);
if (fi.exists())
return fi.canonicalFilePath();
@@ -386,7 +383,8 @@ void tst_QPluginLoader::loadMachO()
void tst_QPluginLoader::loadGarbage()
{
for (int i=0; i<5; i++) {
- QPluginLoader lib(QFINDTESTDATA(QString("elftest/garbage%1.so").arg(i+1)));
+ const QString name = QLatin1String("elftest/garbage") + QString::number(i + 1) + QLatin1String(".so");
+ QPluginLoader lib(QFINDTESTDATA(name));
QCOMPARE(lib.load(), false);
QVERIFY(lib.errorString() != QString("Unknown error"));
}
diff --git a/tests/auto/corelib/plugin/quuid/quuid.pro b/tests/auto/corelib/plugin/quuid/quuid.pro
index 461956f313..25e24561ae 100644
--- a/tests/auto/corelib/plugin/quuid/quuid.pro
+++ b/tests/auto/corelib/plugin/quuid/quuid.pro
@@ -4,4 +4,3 @@ SUBDIRS = testProcessUniqueness
SUBDIRS += test
-CONFIG += parallel_test
diff --git a/tests/auto/corelib/plugin/quuid/test/test.pro b/tests/auto/corelib/plugin/quuid/test/test.pro
index c8312c0985..562bfbdc25 100644
--- a/tests/auto/corelib/plugin/quuid/test/test.pro
+++ b/tests/auto/corelib/plugin/quuid/test/test.pro
@@ -1,9 +1,13 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_quuid
QT = core testlib
SOURCES = ../tst_quuid.cpp
+darwin {
+ OBJECTIVE_SOURCES = ../tst_quuid_darwin.mm
+ LIBS += -framework Foundation
+}
+
CONFIG(debug_and_release_target) {
CONFIG(debug, debug|release) {
DESTDIR = ../debug
@@ -13,4 +17,3 @@ CONFIG(debug_and_release_target) {
} else {
DESTDIR = ..
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
index 10bda6333d..daf9b1579a 100644
--- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness.pro b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness.pro
index b2f7aaf2d3..5ee7b1a21f 100644
--- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness.pro
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness.pro
@@ -7,4 +7,3 @@ DESTDIR = ./
# This app is testdata for tst_quuid
target.path = $$[QT_INSTALL_TESTS]/tst_quuid/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
index a40f226d59..e2c137e25f 100644
--- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -73,6 +68,8 @@ private slots:
void qvariant();
void qvariant_conversion();
+ void darwinTypes();
+
public:
// Variables
QUuid uuidNS;
@@ -225,11 +222,11 @@ void tst_QUuid::equal()
QVERIFY( !(uuidA == uuidB) );
QUuid copy(uuidA);
- QVERIFY(uuidA == copy);
+ QCOMPARE(uuidA, copy);
QUuid assigned;
assigned = uuidA;
- QVERIFY(uuidA == assigned);
+ QCOMPARE(uuidA, assigned);
}
@@ -408,5 +405,15 @@ void tst_QUuid::qvariant_conversion()
QCOMPARE(sv.value<QUuid>(), uuid);
}
+void tst_QUuid::darwinTypes()
+{
+#ifndef Q_OS_DARWIN
+ QSKIP("This is a Darwin-only test");
+#else
+ extern void tst_QUuid_darwinTypes(); // in tst_quuid_darwin.mm
+ tst_QUuid_darwinTypes();
+#endif
+}
+
QTEST_MAIN(tst_QUuid)
#include "tst_quuid.moc"
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid_darwin.mm b/tests/auto/corelib/plugin/quuid/tst_quuid_darwin.mm
new file mode 100644
index 0000000000..d90bff65b3
--- /dev/null
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid_darwin.mm
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** 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 <QtCore/QUuid>
+#include <QtTest/QtTest>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <Foundation/Foundation.h>
+
+void tst_QUuid_darwinTypes()
+{
+ // QUuid <-> CFUUID
+ {
+ QUuid qtUuid(QByteArrayLiteral("0f7169cc-5711-4af9-99d9-fecb2329fdef"));
+ const CFUUIDRef cfuuid = qtUuid.toCFUUID();
+ QCOMPARE(QUuid::fromCFUUID(cfuuid), qtUuid);
+ CFStringRef cfstring = CFUUIDCreateString(0, cfuuid);
+ QCOMPARE(QString::fromCFString(cfstring), qtUuid.toString().mid(1, 36).toUpper());
+ CFRelease(cfstring);
+ CFRelease(cfuuid);
+ }
+ {
+ QUuid qtUuid(QByteArrayLiteral("0f7169cc-5711-4af9-99d9-fecb2329fdef"));
+ const CFUUIDRef cfuuid = qtUuid.toCFUUID();
+ QUuid qtUuidCopy(qtUuid);
+ qtUuid = QUuid(QByteArrayLiteral("93eec131-13c5-4d13-aaea-e456b4c57efa")); // modify
+ QCOMPARE(QUuid::fromCFUUID(cfuuid), qtUuidCopy);
+ CFStringRef cfstring = CFUUIDCreateString(0, cfuuid);
+ QCOMPARE(QString::fromCFString(cfstring), qtUuidCopy.toString().mid(1, 36).toUpper());
+ CFRelease(cfstring);
+ CFRelease(cfuuid);
+ }
+ // QUuid <-> NSUUID
+ {
+ QMacAutoReleasePool pool;
+
+ QUuid qtUuid(QByteArrayLiteral("0f7169cc-5711-4af9-99d9-fecb2329fdef"));
+ const NSUUID *nsuuid = qtUuid.toNSUUID();
+ QCOMPARE(QUuid::fromNSUUID(nsuuid), qtUuid);
+ QCOMPARE(QString::fromNSString([nsuuid UUIDString]), qtUuid.toString().mid(1, 36).toUpper());
+ }
+ {
+ QMacAutoReleasePool pool;
+
+ QUuid qtUuid(QByteArrayLiteral("0f7169cc-5711-4af9-99d9-fecb2329fdef"));
+ const NSUUID *nsuuid = qtUuid.toNSUUID();
+ QUuid qtUuidCopy(qtUuid);
+ qtUuid = QUuid(QByteArrayLiteral("93eec131-13c5-4d13-aaea-e456b4c57efa")); // modify
+ QCOMPARE(QUuid::fromNSUUID(nsuuid), qtUuidCopy);
+ QCOMPARE(QString::fromNSString([nsuuid UUIDString]), qtUuidCopy.toString().mid(1, 36).toUpper());
+ }
+}
diff --git a/tests/auto/corelib/statemachine/qstate/qstate.pro b/tests/auto/corelib/statemachine/qstate/qstate.pro
index 22e57d5615..e2251ded9d 100644
--- a/tests/auto/corelib/statemachine/qstate/qstate.pro
+++ b/tests/auto/corelib/statemachine/qstate/qstate.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstate
QT = core testlib
SOURCES = tst_qstate.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
index c64d55671a..bbc3f890bd 100644
--- a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
+++ b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro b/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
index f6fbbc83c6..4f16b2a9ca 100644
--- a/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
+++ b/tests/auto/corelib/statemachine/qstatemachine/qstatemachine.pro
@@ -1,7 +1,5 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qstatemachine
QT = core-private testlib
qtHaveModule(widgets): QT += widgets
SOURCES = tst_qstatemachine.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
index 8c76809c48..8f0d83ce32 100644
--- a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -238,6 +233,9 @@ private slots:
void multiTargetTransitionInsideParallelStateGroup();
void signalTransitionNormalizeSignature();
+#ifdef Q_COMPILER_DELEGATING_CONSTRUCTORS
+ void createPointerToMemberSignalTransition();
+#endif
void createSignalTransitionWhenRunning();
void createEventTransitionWhenRunning();
void signalTransitionSenderInDifferentThread();
@@ -3037,7 +3035,7 @@ void tst_QStateMachine::graphicsSceneEventTransitions()
QVERIFY(runningSpy.isValid());
machine.start();
QTRY_COMPARE(startedSpy.count(), 1);
- QVERIFY(finishedSpy.count() == 0);
+ QCOMPARE(finishedSpy.count(), 0);
TEST_RUNNING_CHANGED(true);
QGraphicsSceneMouseEvent mouseEvent(QEvent::GraphicsSceneMouseMove);
scene.sendEvent(textItem, &mouseEvent);
@@ -5877,6 +5875,31 @@ void tst_QStateMachine::signalTransitionNormalizeSignature()
TEST_ACTIVE_CHANGED(s1, 1);
}
+#ifdef Q_COMPILER_DELEGATING_CONSTRUCTORS
+void tst_QStateMachine::createPointerToMemberSignalTransition()
+{
+ QStateMachine machine;
+ QState *s1 = new QState(&machine);
+ DEFINE_ACTIVE_SPY(s1);
+ machine.setInitialState(s1);
+ machine.start();
+ TEST_ACTIVE_CHANGED(s1, 1);
+ QTRY_VERIFY(machine.configuration().contains(s1));
+
+ QState *s2 = new QState(&machine);
+ DEFINE_ACTIVE_SPY(s2);
+ SignalEmitter emitter;
+ QSignalTransition *t1 = new QSignalTransition(&emitter, &SignalEmitter::signalWithNoArg, s1);
+ QCOMPARE(t1->sourceState(), s1);
+ t1->setTargetState(s2);
+ s1->addTransition(t1);
+ emitter.emitSignalWithNoArg();
+ TEST_ACTIVE_CHANGED(s1, 2);
+ TEST_ACTIVE_CHANGED(s2, 1);
+ QTRY_VERIFY(machine.configuration().contains(s2));
+}
+#endif
+
void tst_QStateMachine::createSignalTransitionWhenRunning()
{
QStateMachine machine;
@@ -6159,26 +6182,26 @@ void tst_QStateMachine::childModeConstructor()
{
QStateMachine machine(QState::ExclusiveStates);
QCOMPARE(machine.childMode(), QState::ExclusiveStates);
- QVERIFY(machine.parent() == 0);
- QVERIFY(machine.parentState() == 0);
+ QVERIFY(!machine.parent());
+ QVERIFY(!machine.parentState());
}
{
QStateMachine machine(QState::ParallelStates);
QCOMPARE(machine.childMode(), QState::ParallelStates);
- QVERIFY(machine.parent() == 0);
- QVERIFY(machine.parentState() == 0);
+ QVERIFY(!machine.parent());
+ QVERIFY(!machine.parentState());
}
{
QStateMachine machine(QState::ExclusiveStates, this);
QCOMPARE(machine.childMode(), QState::ExclusiveStates);
QCOMPARE(machine.parent(), static_cast<QObject *>(this));
- QVERIFY(machine.parentState() == 0);
+ QVERIFY(!machine.parentState());
}
{
QStateMachine machine(QState::ParallelStates, this);
QCOMPARE(machine.childMode(), QState::ParallelStates);
QCOMPARE(machine.parent(), static_cast<QObject *>(this));
- QVERIFY(machine.parentState() == 0);
+ QVERIFY(!machine.parentState());
}
QState state;
{
diff --git a/tests/auto/corelib/thread/qatomicint/qatomicint.pro b/tests/auto/corelib/thread/qatomicint/qatomicint.pro
index 1a3f7cc926..89ac465e81 100644
--- a/tests/auto/corelib/thread/qatomicint/qatomicint.pro
+++ b/tests/auto/corelib/thread/qatomicint/qatomicint.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qatomicint
QT = core testlib
SOURCES = tst_qatomicint.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
index 72ae68f81a..cc197cabba 100644
--- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
+++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/char/char.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/char/char.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/char/char.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/char16_t/char16_t.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/char16_t/char16_t.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/char16_t/char16_t.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/char32_t/char32_t.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/char32_t/char32_t.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/char32_t/char32_t.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/int/int.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/int/int.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/int/int.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/long/long.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/long/long.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/long/long.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/qlonglong/qlonglong.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/qlonglong/qlonglong.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/qlonglong/qlonglong.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/qptrdiff/qptrdiff.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/qptrdiff/qptrdiff.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/qptrdiff/qptrdiff.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/quintptr/quintptr.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/quintptr/quintptr.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/quintptr/quintptr.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/qulonglong/qulonglong.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/qulonglong/qulonglong.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/qulonglong/qulonglong.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/schar/schar.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/schar/schar.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/schar/schar.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/short/short.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/short/short.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/short/short.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/uchar/uchar.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/uchar/uchar.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/uchar/uchar.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/uint/uint.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/uint/uint.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/uint/uint.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/ulong/ulong.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/ulong/ulong.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/ulong/ulong.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/ushort/ushort.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/ushort/ushort.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/ushort/ushort.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/gcc/wchar_t/wchar_t.pro b/tests/auto/corelib/thread/qatomicinteger/gcc/wchar_t/wchar_t.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/gcc/wchar_t/wchar_t.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char/char.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char16_t/char16_t.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/char32_t/char32_t.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/int/int.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/long/long.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qlonglong/qlonglong.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qptrdiff/qptrdiff.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/quintptr/quintptr.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/qulonglong/qulonglong.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/schar/schar.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/short/short.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uchar/uchar.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/uint/uint.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ulong/ulong.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/ushort/ushort.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro b/tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro
deleted file mode 100644
index 64401f0229..0000000000
--- a/tests/auto/corelib/thread/qatomicinteger/no-cxx11/wchar_t/wchar_t.pro
+++ /dev/null
@@ -1 +0,0 @@
-include(../../qatomicinteger.pri)
diff --git a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri
index e80e71f238..f1030d41ef 100644
--- a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri
+++ b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pri
@@ -2,18 +2,9 @@
TYPE = $$basename(_PRO_FILE_PWD_)
dn = $$dirname(_PRO_FILE_PWD_)
FORCE = $$basename(dn)
+suffix = $$TYPE
-equals(FORCE, no-cxx11) {
- suffix = NoCxx11_$$TYPE
- DEFINES += QT_ATOMIC_FORCE_NO_CXX11
-} else: equals(FORCE, gcc) {
- suffix = Gcc_$$TYPE
- DEFINES += QT_ATOMIC_FORCE_GCC
-} else {
- suffix = $$TYPE
-}
-
-CONFIG += testcase parallel_test
+CONFIG += testcase
QT = core testlib
TARGET = tst_qatomicinteger_$$lower($$suffix)
SOURCES = $$PWD/tst_qatomicinteger.cpp
diff --git a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro
index 9d929e649e..09458bd9c3 100644
--- a/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro
+++ b/tests/auto/corelib/thread/qatomicinteger/qatomicinteger.pro
@@ -16,43 +16,3 @@ SUBDIRS=\
ulong \
ushort \
wchar_t \
-
-
-contains(QT_CONFIG, c++11)|msvc: SUBDIRS +=\
- no-cxx11/char \
- no-cxx11/char16_t \
- no-cxx11/char32_t \
- no-cxx11/int \
- no-cxx11/long \
- no-cxx11/qlonglong \
- no-cxx11/qptrdiff \
- no-cxx11/quintptr \
- no-cxx11/qulonglong \
- no-cxx11/schar \
- no-cxx11/short \
- no-cxx11/uchar \
- no-cxx11/uint \
- no-cxx11/ulong \
- no-cxx11/ushort \
- no-cxx11/wchar_t \
-
-
-# The GCC-style atomics only support 32-bit and pointer-sized but add
-# them all anyway so we ensure the macros are properly defined
-gcc: SUBDIRS +=\
- gcc/char \
- gcc/char16_t \
- gcc/char32_t \
- gcc/int \
- gcc/long \
- gcc/qlonglong \
- gcc/qptrdiff \
- gcc/quintptr \
- gcc/qulonglong \
- gcc/schar \
- gcc/short \
- gcc/uchar \
- gcc/uint \
- gcc/ulong \
- gcc/ushort \
- gcc/wchar_t \
diff --git a/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp b/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp
index 6b3a99100b..5f5252aa96 100644
--- a/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp
+++ b/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2013 Intel Corporation
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qatomicpointer/qatomicpointer.pro b/tests/auto/corelib/thread/qatomicpointer/qatomicpointer.pro
index 8468496d9c..cce822da6e 100644
--- a/tests/auto/corelib/thread/qatomicpointer/qatomicpointer.pro
+++ b/tests/auto/corelib/thread/qatomicpointer/qatomicpointer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qatomicpointer
QT = core testlib
SOURCES = tst_qatomicpointer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
index dbc239a3f9..0200473cae 100644
--- a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
+++ b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -123,15 +119,15 @@ void tst_QAtomicPointer::constructor()
{
void *one = this;
QAtomicPointer<void> atomic1 = one;
- QVERIFY(atomic1.load() == one);
+ QCOMPARE(atomic1.load(), one);
void *two = &one;
QAtomicPointer<void> atomic2 = two;
- QVERIFY(atomic2.load() == two);
+ QCOMPARE(atomic2.load(), two);
void *three = &two;
QAtomicPointer<void> atomic3 = three;
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
}
void tst_QAtomicPointer::copy_constructor()
@@ -139,19 +135,19 @@ void tst_QAtomicPointer::copy_constructor()
void *one = this;
QAtomicPointer<void> atomic1 = one;
QAtomicPointer<void> atomic1_copy = atomic1;
- QVERIFY(atomic1_copy.load() == one);
+ QCOMPARE(atomic1_copy.load(), one);
QCOMPARE(atomic1_copy.load(), atomic1.load());
void *two = &one;
QAtomicPointer<void> atomic2 = two;
QAtomicPointer<void> atomic2_copy = atomic2;
- QVERIFY(atomic2_copy.load() == two);
+ QCOMPARE(atomic2_copy.load(), two);
QCOMPARE(atomic2_copy.load(), atomic2.load());
void *three = &two;
QAtomicPointer<void> atomic3 = three;
QAtomicPointer<void> atomic3_copy = atomic3;
- QVERIFY(atomic3_copy.load() == three);
+ QCOMPARE(atomic3_copy.load(), three);
QCOMPARE(atomic3_copy.load(), atomic3.load());
}
@@ -165,17 +161,17 @@ void tst_QAtomicPointer::assignment_operator()
QAtomicPointer<void> atomic2 = two;
QAtomicPointer<void> atomic3 = three;
- QVERIFY(atomic1.load() == one);
- QVERIFY(atomic2.load() == two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic1.load(), one);
+ QCOMPARE(atomic2.load(), two);
+ QCOMPARE(atomic3.load(), three);
atomic1 = two;
atomic2 = three;
atomic3 = one;
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
void tst_QAtomicPointer::isTestAndSetNative()
@@ -240,15 +236,15 @@ void tst_QAtomicPointer::testAndSet()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QVERIFY(atomic1.testAndSetRelaxed(one, two));
QVERIFY(atomic2.testAndSetRelaxed(two, three));
QVERIFY(atomic3.testAndSetRelaxed(three, one));
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
{
@@ -258,15 +254,15 @@ void tst_QAtomicPointer::testAndSet()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QVERIFY(atomic1.testAndSetAcquire(one, two));
QVERIFY(atomic2.testAndSetAcquire(two, three));
QVERIFY(atomic3.testAndSetAcquire(three, one));
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
{
@@ -276,15 +272,15 @@ void tst_QAtomicPointer::testAndSet()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QVERIFY(atomic1.testAndSetRelease(one, two));
QVERIFY(atomic2.testAndSetRelease(two, three));
QVERIFY(atomic3.testAndSetRelease(three, one));
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
{
@@ -294,15 +290,15 @@ void tst_QAtomicPointer::testAndSet()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QVERIFY(atomic1.testAndSetOrdered(one, two));
QVERIFY(atomic2.testAndSetOrdered(two, three));
QVERIFY(atomic3.testAndSetOrdered(three, one));
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
}
@@ -368,15 +364,15 @@ void tst_QAtomicPointer::fetchAndStore()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QCOMPARE(atomic1.fetchAndStoreRelaxed(two), one);
QCOMPARE(atomic2.fetchAndStoreRelaxed(three), two);
QCOMPARE(atomic3.fetchAndStoreRelaxed(one), three);
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
{
@@ -386,15 +382,15 @@ void tst_QAtomicPointer::fetchAndStore()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QCOMPARE(atomic1.fetchAndStoreAcquire(two), one);
QCOMPARE(atomic2.fetchAndStoreAcquire(three), two);
QCOMPARE(atomic3.fetchAndStoreAcquire(one), three);
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
{
@@ -404,15 +400,15 @@ void tst_QAtomicPointer::fetchAndStore()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QCOMPARE(atomic1.fetchAndStoreRelease(two), one);
QCOMPARE(atomic2.fetchAndStoreRelease(three), two);
QCOMPARE(atomic3.fetchAndStoreRelease(one), three);
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
{
@@ -422,15 +418,15 @@ void tst_QAtomicPointer::fetchAndStore()
QCOMPARE(atomic1.load(), one);
QCOMPARE(atomic2.load(), two);
- QVERIFY(atomic3.load() == three);
+ QCOMPARE(atomic3.load(), three);
QCOMPARE(atomic1.fetchAndStoreOrdered(two), one);
QCOMPARE(atomic2.fetchAndStoreOrdered(three), two);
QCOMPARE(atomic3.fetchAndStoreOrdered(one), three);
- QVERIFY(atomic1.load() == two);
- QVERIFY(atomic2.load() == three);
- QVERIFY(atomic3.load() == one);
+ QCOMPARE(atomic1.load(), two);
+ QCOMPARE(atomic2.load(), three);
+ QCOMPARE(atomic3.load(), one);
}
}
diff --git a/tests/auto/corelib/thread/qfuture/qfuture.pro b/tests/auto/corelib/thread/qfuture/qfuture.pro
index 36853de2f0..ed9e189668 100644
--- a/tests/auto/corelib/thread/qfuture/qfuture.pro
+++ b/tests/auto/corelib/thread/qfuture/qfuture.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfuture
QT = core core-private testlib concurrent
SOURCES = tst_qfuture.cpp
DEFINES += QT_STRICT_ITERATORS
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
index ad690a094b..b8841bb6a3 100644
--- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -84,9 +79,9 @@ void tst_QFuture::resultStore()
{
QtPrivate::ResultStore<int> store;
- QVERIFY(store.begin() == store.end());
- QVERIFY(store.resultAt(0) == store.end());
- QVERIFY(store.resultAt(1) == store.end());
+ QCOMPARE(store.begin(), store.end());
+ QCOMPARE(store.resultAt(0), store.end());
+ QCOMPARE(store.resultAt(1), store.end());
}
@@ -118,7 +113,7 @@ void tst_QFuture::resultStore()
store.addResults(-1, &vec1, 2, 2);
QtPrivate::ResultIteratorBase it = store.begin();
QCOMPARE(it.resultIndex(), 0);
- QVERIFY(it == store.begin());
+ QCOMPARE(it, store.begin());
QVERIFY(it != store.end());
++it;
@@ -133,7 +128,7 @@ void tst_QFuture::resultStore()
QCOMPARE(it.resultIndex(), 3);
++it;
- QVERIFY(it == store.end());
+ QCOMPARE(it, store.end());
}
{
QtPrivate::ResultStoreBase store;
@@ -1012,14 +1007,14 @@ void tst_QFuture::iterators()
QFuture<int>::const_iterator i1 = f.begin(), i2 = i1 + 1;
QFuture<int>::const_iterator c1 = i1, c2 = c1 + 1;
- QVERIFY(i1 == i1);
- QVERIFY(i1 == c1);
- QVERIFY(c1 == i1);
- QVERIFY(c1 == c1);
- QVERIFY(i2 == i2);
- QVERIFY(i2 == c2);
- QVERIFY(c2 == i2);
- QVERIFY(c2 == c2);
+ QCOMPARE(i1, i1);
+ QCOMPARE(i1, c1);
+ QCOMPARE(c1, i1);
+ QCOMPARE(c1, c1);
+ QCOMPARE(i2, i2);
+ QCOMPARE(i2, c2);
+ QCOMPARE(c2, i2);
+ QCOMPARE(c2, c2);
QVERIFY(i1 != i2);
QVERIFY(i1 != c2);
@@ -1061,14 +1056,14 @@ void tst_QFuture::iterators()
QFuture<QString>::const_iterator i1 = f.begin(), i2 = i1 + 1;
QFuture<QString>::const_iterator c1 = i1, c2 = c1 + 1;
- QVERIFY(i1 == i1);
- QVERIFY(i1 == c1);
- QVERIFY(c1 == i1);
- QVERIFY(c1 == c1);
- QVERIFY(i2 == i2);
- QVERIFY(i2 == c2);
- QVERIFY(c2 == i2);
- QVERIFY(c2 == c2);
+ QCOMPARE(i1, i1);
+ QCOMPARE(i1, c1);
+ QCOMPARE(c1, i1);
+ QCOMPARE(c1, c1);
+ QCOMPARE(i2, i2);
+ QCOMPARE(i2, c2);
+ QCOMPARE(c2, i2);
+ QCOMPARE(c2, c2);
QVERIFY(i1 != i2);
QVERIFY(i1 != c2);
@@ -1438,6 +1433,8 @@ void tst_QFuture::nestedExceptions()
QVERIFY(MyClass::caught);
}
+#endif // QT_NO_EXCEPTIONS
+
void tst_QFuture::nonGlobalThreadPool()
{
static Q_CONSTEXPR int Answer = 42;
@@ -1485,7 +1482,5 @@ void tst_QFuture::nonGlobalThreadPool()
}
}
-#endif // QT_NO_EXCEPTIONS
-
QTEST_MAIN(tst_QFuture)
#include "tst_qfuture.moc"
diff --git a/tests/auto/corelib/thread/qfuturesynchronizer/qfuturesynchronizer.pro b/tests/auto/corelib/thread/qfuturesynchronizer/qfuturesynchronizer.pro
index a828213ade..5eebd12deb 100644
--- a/tests/auto/corelib/thread/qfuturesynchronizer/qfuturesynchronizer.pro
+++ b/tests/auto/corelib/thread/qfuturesynchronizer/qfuturesynchronizer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfuturesynchronizer
QT = core testlib concurrent
SOURCES = tst_qfuturesynchronizer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp b/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
index 9a05188c24..2a8a340925 100644
--- a/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
+++ b/tests/auto/corelib/thread/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qfuturewatcher/qfuturewatcher.pro b/tests/auto/corelib/thread/qfuturewatcher/qfuturewatcher.pro
index 17c0363ce4..d0e8b4c982 100644
--- a/tests/auto/corelib/thread/qfuturewatcher/qfuturewatcher.pro
+++ b/tests/auto/corelib/thread/qfuturewatcher/qfuturewatcher.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qfuturewatcher
QT = core core-private testlib concurrent
SOURCES = tst_qfuturewatcher.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
index c4fad93e4b..a16e9e377c 100644
--- a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qmutex/qmutex.pro b/tests/auto/corelib/thread/qmutex/qmutex.pro
index dde0a7f88f..229e57eb89 100644
--- a/tests/auto/corelib/thread/qmutex/qmutex.pro
+++ b/tests/auto/corelib/thread/qmutex/qmutex.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qmutex
QT = core testlib
SOURCES = tst_qmutex.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
index a996e4f7e2..594bae674c 100644
--- a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qmutexlocker/qmutexlocker.pro b/tests/auto/corelib/thread/qmutexlocker/qmutexlocker.pro
index d35eca1009..76ec0471ca 100644
--- a/tests/auto/corelib/thread/qmutexlocker/qmutexlocker.pro
+++ b/tests/auto/corelib/thread/qmutexlocker/qmutexlocker.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmutexlocker
QT = core testlib
SOURCES = tst_qmutexlocker.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
index 0e98a4a0ea..67db5d1458 100644
--- a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
+++ b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qreadlocker/qreadlocker.pro b/tests/auto/corelib/thread/qreadlocker/qreadlocker.pro
index d391768102..ba46786750 100644
--- a/tests/auto/corelib/thread/qreadlocker/qreadlocker.pro
+++ b/tests/auto/corelib/thread/qreadlocker/qreadlocker.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qreadlocker
QT = core testlib
SOURCES = tst_qreadlocker.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
index 927e48cf69..7d1b3709c2 100644
--- a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
+++ b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qreadwritelock/qreadwritelock.pro b/tests/auto/corelib/thread/qreadwritelock/qreadwritelock.pro
index b38d731049..c108c3d8af 100644
--- a/tests/auto/corelib/thread/qreadwritelock/qreadwritelock.pro
+++ b/tests/auto/corelib/thread/qreadwritelock/qreadwritelock.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qreadwritelock
QT = core testlib
SOURCES = tst_qreadwritelock.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
index 36ce557d8b..8e97229752 100644
--- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
+++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qresultstore/qresultstore.pro b/tests/auto/corelib/thread/qresultstore/qresultstore.pro
index 5e9e83c503..2f6c18f64c 100644
--- a/tests/auto/corelib/thread/qresultstore/qresultstore.pro
+++ b/tests/auto/corelib/thread/qresultstore/qresultstore.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qresultstore
QT = core-private testlib concurrent
SOURCES = tst_qresultstore.cpp
DEFINES += QT_STRICT_ITERATORS
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp b/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp
index ff850683ac..3626b8db33 100644
--- a/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp
+++ b/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -80,9 +75,9 @@ void tst_QtConcurrentResultStore::iterators()
{
{
ResultStore<int> store;
- QVERIFY(store.begin() == store.end());
- QVERIFY(store.resultAt(0) == store.end());
- QVERIFY(store.resultAt(1) == store.end());
+ QCOMPARE(store.begin(), store.end());
+ QCOMPARE(store.resultAt(0), store.end());
+ QCOMPARE(store.resultAt(1), store.end());
}
{
ResultStoreBase storebase;
@@ -90,7 +85,7 @@ void tst_QtConcurrentResultStore::iterators()
storebase.addResult(1, &int1); // ResultStoreBase does not take ownership, only ResultStore<> does.
ResultIteratorBase it = storebase.begin();
QCOMPARE(it.resultIndex(), 0);
- QVERIFY(it == storebase.begin());
+ QCOMPARE(it, storebase.begin());
QVERIFY(it != storebase.end());
++it;
@@ -100,7 +95,7 @@ void tst_QtConcurrentResultStore::iterators()
++it;
QVERIFY(it != storebase.begin());
- QVERIFY(it == storebase.end());
+ QCOMPARE(it, storebase.end());
}
}
@@ -160,7 +155,7 @@ void tst_QtConcurrentResultStore::addResults()
store.addResults(-1, &vec1, 2, 2);
ResultIteratorBase it = store.begin();
QCOMPARE(it.resultIndex(), 0);
- QVERIFY(it == store.begin());
+ QCOMPARE(it, store.begin());
QVERIFY(it != store.end());
++it;
@@ -175,7 +170,7 @@ void tst_QtConcurrentResultStore::addResults()
QCOMPARE(it.resultIndex(), 3);
++it;
- QVERIFY(it == store.end());
+ QCOMPARE(it, store.end());
}
void tst_QtConcurrentResultStore::resultIndex()
diff --git a/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro b/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro
index 56e9fd5da6..5a0f0337e6 100644
--- a/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro
+++ b/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro
@@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qsemaphore
QT = core testlib
SOURCES = tst_qsemaphore.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index cb4f13a5eb..341bd21e5a 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qthread/qthread.pro b/tests/auto/corelib/thread/qthread/qthread.pro
index 9efce4e7ed..18d867ecef 100644
--- a/tests/auto/corelib/thread/qthread/qthread.pro
+++ b/tests/auto/corelib/thread/qthread/qthread.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qthread
QT = core testlib
SOURCES = tst_qthread.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index d7294c3ee6..bbd319d2db 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
index 3de801f25a..9179750218 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
index f69266574c..71e830ca16 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.pro b/tests/auto/corelib/thread/qthreadonce/qthreadonce.pro
index 2c189e7422..e8b95a06a7 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.pro
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qthreadonce
QT = core testlib
SOURCES = tst_qthreadonce.cpp
@@ -10,4 +10,3 @@ SOURCES = tst_qthreadonce.cpp
# Temporary:
SOURCES += qthreadonce.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
index 0699c50464..ba64bf2963 100644
--- a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -163,7 +158,7 @@ void tst_QThreadOnce::nesting()
}
}
- QVERIFY(variable == 1);
+ QCOMPARE(variable, 1);
}
static void reentrant(int control, int &counter)
diff --git a/tests/auto/corelib/thread/qthreadpool/qthreadpool.pro b/tests/auto/corelib/thread/qthreadpool/qthreadpool.pro
index 387b79b012..eac4ef9365 100644
--- a/tests/auto/corelib/thread/qthreadpool/qthreadpool.pro
+++ b/tests/auto/corelib/thread/qthreadpool/qthreadpool.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qthreadpool
QT = core testlib
SOURCES = tst_qthreadpool.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
index c465a07487..3bc3f8a759 100644
--- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashOnExit.cpp b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashOnExit.cpp
index 286e27e4f6..5a42156b85 100644
--- a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashOnExit.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashOnExit.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
index eb8d06d094..94a0a01e94 100644
--- a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
@@ -7,4 +7,3 @@ CONFIG += console
# This app is testdata for tst_qthreadstorage
target.path = $$[QT_INSTALL_TESTS]/tst_qthreadstorage/$$TARGET
INSTALLS += target
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro b/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
index e81038a4be..b9bc456dcf 100644
--- a/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
@@ -4,4 +4,4 @@ SUBDIRS = \
!winrt: SUBDIRS += crashonexit
-CONFIG += ordered parallel_test
+CONFIG += ordered
diff --git a/tests/auto/corelib/thread/qthreadstorage/test/test.pro b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
index d97d474e51..b9d661a9af 100644
--- a/tests/auto/corelib/thread/qthreadstorage/test/test.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/test/test.pro
@@ -7,4 +7,3 @@ SOURCES = ../tst_qthreadstorage.cpp
!winrt: TEST_HELPER_INSTALLS = ../crashonexit/crashonexit
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index ed7b446172..f3eba5c823 100644
--- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qwaitcondition/qwaitcondition.pro b/tests/auto/corelib/thread/qwaitcondition/qwaitcondition.pro
index 7383997e67..2098d9dd2f 100644
--- a/tests/auto/corelib/thread/qwaitcondition/qwaitcondition.pro
+++ b/tests/auto/corelib/thread/qwaitcondition/qwaitcondition.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qwaitcondition
QT = core testlib
SOURCES = tst_qwaitcondition.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index df52aa4949..4ef3bab87f 100644
--- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/thread/qwritelocker/qwritelocker.pro b/tests/auto/corelib/thread/qwritelocker/qwritelocker.pro
index 4a797975ab..a6c4f70b8d 100644
--- a/tests/auto/corelib/thread/qwritelocker/qwritelocker.pro
+++ b/tests/auto/corelib/thread/qwritelocker/qwritelocker.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qwritelocker
QT = core testlib
SOURCES = tst_qwritelocker.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
index 6903d95d05..876c18c721 100644
--- a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
+++ b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/collections/collections.pro b/tests/auto/corelib/tools/collections/collections.pro
index 51ea667f58..5c04515fa0 100644
--- a/tests/auto/corelib/tools/collections/collections.pro
+++ b/tests/auto/corelib/tools/collections/collections.pro
@@ -2,8 +2,6 @@ CONFIG += testcase
TARGET = tst_collections
SOURCES += tst_collections.cpp
QT = core testlib
-CONFIG += parallel_test
# This test does not work with strict iterators
DEFINES -= QT_STRICT_ITERATORS
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp
index b9487cee33..af270ded98 100644
--- a/tests/auto/corelib/tools/collections/tst_collections.cpp
+++ b/tests/auto/corelib/tools/collections/tst_collections.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -98,13 +93,6 @@ class tst_Collections : public QObject
{
Q_OBJECT
-public:
- tst_Collections();
- ~tst_Collections();
-
-public slots:
- void init();
- void cleanup();
private slots:
void typeinfo();
void qstring();
@@ -176,23 +164,6 @@ struct Pod {
int i1, i2;
};
-tst_Collections::tst_Collections()
-{
-}
-
-tst_Collections::~tst_Collections()
-{
-
-}
-
-void tst_Collections::init()
-{
-}
-
-void tst_Collections::cleanup()
-{
-}
-
void tst_Collections::typeinfo()
{
QVERIFY(QTypeInfo<int*>::isPointer);
@@ -519,11 +490,11 @@ void tst_Collections::list()
QList<QString> list = vector.toList();
QVERIFY(list.size() == 5);
- QVERIFY(list.at(0) == "99");
- QVERIFY(list.at(4) == "100");
+ QCOMPARE(list.at(0), QLatin1String("99"));
+ QCOMPARE(list.at(4), QLatin1String("100"));
list[0] = "10";
- QVERIFY(list.at(0) == "10");
- QVERIFY(vector.at(0) == "99");
+ QCOMPARE(list.at(0), QLatin1String("10"));
+ QCOMPARE(vector.at(0), QLatin1String("99"));
}
@@ -535,15 +506,15 @@ void tst_Collections::list()
QVERIFY((*it)[0] == QChar('H'));
QVERIFY(it->constData()[0] == QChar('H'));
it->replace(QChar('H'), QChar('X'));
- QVERIFY(list.first() == "Xello");
+ QCOMPARE(list.first(), QLatin1String("Xello"));
QList<QString>::const_iterator cit = list.constBegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
cit = list.cbegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(),QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
}
{
@@ -577,10 +548,10 @@ void tst_Collections::list()
list << "alpha" << "beta";
list += list;
QVERIFY(list.size() == 4);
- QVERIFY(list.at(0) == "alpha");
- QVERIFY(list.at(1) == "beta");
- QVERIFY(list.at(2) == "alpha");
- QVERIFY(list.at(3) == "beta");
+ QCOMPARE(list.at(0), QLatin1String("alpha"));
+ QCOMPARE(list.at(1), QLatin1String("beta"));
+ QCOMPARE(list.at(2), QLatin1String("alpha"));
+ QCOMPARE(list.at(3), QLatin1String("beta"));
}
// test endcases for inserting into a qlist
@@ -956,15 +927,15 @@ void tst_Collections::linkedList()
QVERIFY((*it)[0] == QChar('H'));
QVERIFY(it->constData()[0] == QChar('H'));
it->replace(QChar('H'), QChar('X'));
- QVERIFY(list.first() == "Xello");
+ QCOMPARE(list.first(), QLatin1String("Xello"));
QLinkedList<QString>::const_iterator cit = list.constBegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
cit = list.cbegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
}
{
@@ -972,10 +943,10 @@ void tst_Collections::linkedList()
list << "alpha" << "beta";
list += list;
QVERIFY(list.size() == 4);
- QVERIFY(*list.begin() == "alpha");
- QVERIFY(*(list.begin() + 1) == "beta");
- QVERIFY(*(list.begin() + 2) == "alpha");
- QVERIFY(*(list.begin() + 3) == "beta");
+ QCOMPARE(*list.begin(), QLatin1String("alpha"));
+ QCOMPARE(*(list.begin() + 1), QLatin1String("beta"));
+ QCOMPARE(*(list.begin() + 2), QLatin1String("alpha"));
+ QCOMPARE(*(list.begin() + 3), QLatin1String("beta"));
}
{
@@ -1056,8 +1027,8 @@ void tst_Collections::vector()
QVector<QString> vec;
vec << "foo" << "bar";
vec.reserve( 512 );
- QVERIFY(vec[0] == "foo");
- QVERIFY(vec[1] == "bar");
+ QCOMPARE(vec[0], QLatin1String("foo"));
+ QCOMPARE(vec[1], QLatin1String("bar"));
int initialLargeStaticCount = LargeStatic::count;
{
@@ -1072,10 +1043,10 @@ void tst_Collections::vector()
vector << "alpha" << "beta";
vector += vector;
QVERIFY(vector.size() == 4);
- QVERIFY(vector.at(0) == "alpha");
- QVERIFY(vector.at(1) == "beta");
- QVERIFY(vector.at(2) == "alpha");
- QVERIFY(vector.at(3) == "beta");
+ QCOMPARE(vector.at(0), QLatin1String("alpha"));
+ QCOMPARE(vector.at(1), QLatin1String("beta"));
+ QCOMPARE(vector.at(2), QLatin1String("alpha"));
+ QCOMPARE(vector.at(3), QLatin1String("beta"));
}
int originalLargeStaticCount = LargeStatic::count;
@@ -1596,15 +1567,15 @@ void tst_Collections::hash()
QVERIFY((*it)[0] == QChar('H'));
QVERIFY(it->constData()[0] == QChar('H'));
it->replace(QChar('H'), QChar('X'));
- QVERIFY(*hash.begin() == "Xello");
+ QCOMPARE(*hash.begin(), QLatin1String("Xello"));
QHash<int, QString>::const_iterator cit = hash.constBegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
cit = hash.cbegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
}
{
@@ -1917,15 +1888,15 @@ void tst_Collections::map()
QVERIFY((*it)[0] == QChar('H'));
QVERIFY(it->constData()[0] == QChar('H'));
it->replace(QChar('H'), QChar('X'));
- QVERIFY(*map.begin() == "Xello");
+ QCOMPARE(*map.begin(), QLatin1String("Xello"));
QMap<int, QString>::const_iterator cit = map.constBegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
cit = map.cbegin();
- QVERIFY((*cit).toLower() == "xello");
- QVERIFY(cit->toUpper() == "XELLO");
+ QCOMPARE((*cit).toLower(), QLatin1String("xello"));
+ QCOMPARE(cit->toUpper(), QLatin1String("XELLO"));
}
{
@@ -2007,17 +1978,17 @@ void tst_Collections::qstring()
QVERIFY(hello.left(0) == "");
QVERIFY(!hello.left(0).isNull());
- QVERIFY(hello.left(1) == "h");
- QVERIFY(hello.left(2) == "he");
- QVERIFY(hello.left(200) == "hello");
+ QCOMPARE(hello.left(1), QLatin1String("h"));
+ QCOMPARE(hello.left(2), QLatin1String("he"));
+ QCOMPARE(hello.left(200), QLatin1String("hello"));
QVERIFY(hello.left(hello.size()) == hello);
QVERIFY(hello.left(hello.size()+1) == hello);
QVERIFY(hello.right(0) == "");
QVERIFY(!hello.right(0).isNull());
- QVERIFY(hello.right(1) == "o");
- QVERIFY(hello.right(2) == "lo");
- QVERIFY(hello.right(200) == "hello");
+ QCOMPARE(hello.right(1), QLatin1String("o"));
+ QCOMPARE(hello.right(2), QLatin1String("lo"));
+ QCOMPARE(hello.right(200), QLatin1String("hello"));
QVERIFY(hello.right(hello.size()) == hello);
QVERIFY(hello.right(hello.size()+1) == hello);
@@ -2025,16 +1996,16 @@ void tst_Collections::qstring()
QVERIFY(hello.mid(0, 1) == "h");
QVERIFY(hello.mid(0, 2) == "he");
QVERIFY(hello.mid(0, 200) == "hello");
- QVERIFY(hello.mid(0) == "hello");
+ QCOMPARE(hello.mid(0), QLatin1String("hello"));
QVERIFY(hello.mid(0, hello.size()) == hello);
QVERIFY(hello.mid(0, hello.size()+1) == hello);
QVERIFY(hello.mid(hello.size()-0) == "");
QVERIFY(hello.mid(hello.size()-0).isEmpty());
QVERIFY(!hello.mid(hello.size()-0).isNull());
- QVERIFY(hello.mid(hello.size()-1) == "o");
- QVERIFY(hello.mid(hello.size()-2) == "lo");
- QVERIFY(hello.mid(hello.size()-200) == "hello");
+ QCOMPARE(hello.mid(hello.size()-1), QLatin1String("o"));
+ QCOMPARE(hello.mid(hello.size()-2), QLatin1String("lo"));
+ QCOMPARE(hello.mid(hello.size()-200), QLatin1String("hello"));
QString null;
QString nonNull = "";
@@ -2050,7 +2021,7 @@ void tst_Collections::qstring()
QString fill = "123";
fill.fill('a');
- QVERIFY(fill == "aaa");
+ QCOMPARE(fill, QLatin1String("aaa"));
s.clear();
s = hello;
@@ -2062,15 +2033,15 @@ void tst_Collections::qstring()
QVERIFY(s == helloWorld);
s = "012345";
s.insert(3, 'E');
- QVERIFY(s == "012E345");
+ QCOMPARE(s, QLatin1String("012E345"));
s.insert(3, "INSID");
- QVERIFY(s == "012INSIDE345");
+ QCOMPARE(s, QLatin1String("012INSIDE345"));
s = "short";
s.insert(7, 'E');
- QVERIFY(s == "short E");
+ QCOMPARE(s, QLatin1String("short E"));
s = "short";
s.insert(7, "END");
- QVERIFY(s == "short END");
+ QCOMPARE(s, QLatin1String("short END"));
QVERIFY(QString::fromLatin1("hello") == "hello");
@@ -2127,25 +2098,25 @@ void tst_Collections::qstring()
s += QChar((uchar) 0xb0);
QVERIFY(s.toUtf8() != s.toLatin1());
QCOMPARE(s[s.length()-1].unicode(), (ushort)0xb0);
- QVERIFY(s.left(s.length()-1) == "ascii");
+ QCOMPARE(s.left(s.length()-1), QLatin1String("ascii"));
QVERIFY(s == QString::fromUtf8(s.toUtf8().constData()));
s = "12";
s.append('3');
s += '4';
- QVERIFY(s == "1234");
+ QCOMPARE(s, QLatin1String("1234"));
s = "repend";
s.prepend('p');
- QVERIFY(s == "prepend");
+ QCOMPARE(s, QLatin1String("prepend"));
s.prepend("abc ");
- QVERIFY(s == "abc prepend");
+ QCOMPARE(s, QLatin1String("abc prepend"));
s = " whitespace ";
- QVERIFY(s.trimmed() == "whitespace");
+ QCOMPARE(s.trimmed(), QLatin1String("whitespace"));
s = " lots of stuff ";
- QVERIFY(s.simplified() == "lots of stuff");
+ QCOMPARE(s.simplified(), QLatin1String("lots of stuff"));
s = "a hat, a stick, a ski";
QVERIFY(s[2] == 'h');
@@ -2154,17 +2125,17 @@ void tst_Collections::qstring()
s = "12223";
s.remove(1, 2);
- QVERIFY(s == "123");
+ QCOMPARE(s, QLatin1String("123"));
s = "(%1)(%2)";
s = s.arg("foo").arg(7);
- QVERIFY(s == "(foo)(7)");
+ QCOMPARE(s, QLatin1String("(foo)(7)"));
s = "stl rocks";
std::string stl_string = s.toStdString(); // TODO: std::string stl_string = s does not work.
- QVERIFY(s == "stl rocks");
+ QCOMPARE(s, QLatin1String("stl rocks"));
s = QString::fromStdString(stl_string); // TODO: s = stl_string does not work.
- QVERIFY(s == "stl rocks");
+ QCOMPARE(s, QLatin1String("stl rocks"));
{
QString str("Bananas");
@@ -2180,10 +2151,10 @@ void tst_Collections::qstring()
QString str = "Hello";
QString cstr = QString::fromRawData(str.unicode(), str.length());
- QVERIFY(str == "Hello");
- QVERIFY(cstr == "Hello");
+ QCOMPARE(str, QLatin1String("Hello"));
+ QCOMPARE(cstr, QLatin1String("Hello"));
cstr.clear();
- QVERIFY(str == "Hello");
+ QCOMPARE(str, QLatin1String("Hello"));
QVERIFY(cstr.isEmpty());
{
@@ -2330,7 +2301,7 @@ void tst_Collections::pair()
QPair<int, QString> a(1, "Zebra"), b(2, "Ying"), c(3, "Yang"), d(3, "Ying"), e(5, "Alabama");
QVERIFY(a.first == 1);
- QVERIFY(a.second == "Zebra");
+ QCOMPARE(a.second, QLatin1String("Zebra"));
QVERIFY(a == qMakePair(1, QString("Zebra")));
QVERIFY(a == a && b == b && c == c && d == d && e == e);
@@ -3484,7 +3455,7 @@ template<class Container> void foreach_test_arrays(const Container &container)
void tst_Collections::foreach_2()
{
- QStringList strlist = QString::fromLatin1("a,b,c,d,e,f,g,h,ih,kl,mn,op,qr,st,uvw,xyz").split(",");
+ QStringList strlist = QString::fromLatin1("a,b,c,d,e,f,g,h,ih,kl,mn,op,qr,st,uvw,xyz").split(QLatin1Char(','));
foreach_test_arrays(strlist);
foreach_test_arrays(QList<QString>(strlist));
foreach_test_arrays(strlist.toVector());
diff --git a/tests/auto/corelib/tools/qalgorithms/qalgorithms.pro b/tests/auto/corelib/tools/qalgorithms/qalgorithms.pro
index cb6f6595b4..0e6e830185 100644
--- a/tests/auto/corelib/tools/qalgorithms/qalgorithms.pro
+++ b/tests/auto/corelib/tools/qalgorithms/qalgorithms.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qalgorithms
QT = core testlib
SOURCES = tst_qalgorithms.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
index 99e5c4c85d..c14e9fadf7 100644
--- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
+++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -312,24 +307,24 @@ void tst_QAlgorithms::swap()
{
QString a = "1", b = "2";
qSwap(a, b);
- QVERIFY(a == "2");
- QVERIFY(b == "1");
+ QCOMPARE(a, QLatin1String("2"));
+ QCOMPARE(b, QLatin1String("1"));
qSwap(a, a);
- QVERIFY(a == "2");
- QVERIFY(b == "1");
+ QCOMPARE(a, QLatin1String("2"));
+ QCOMPARE(b, QLatin1String("1"));
qSwap(b, b);
- QVERIFY(a == "2");
- QVERIFY(b == "1");
+ QCOMPARE(a, QLatin1String("2"));
+ QCOMPARE(b, QLatin1String("1"));
qSwap(a, b);
- QVERIFY(a == "1");
- QVERIFY(b == "2");
+ QCOMPARE(a, QLatin1String("1"));
+ QCOMPARE(b, QLatin1String("2"));
qSwap(b, a);
- QVERIFY(a == "2");
- QVERIFY(b == "1");
+ QCOMPARE(a, QLatin1String("2"));
+ QCOMPARE(b, QLatin1String("1"));
}
{
diff --git a/tests/auto/corelib/tools/qarraydata/qarraydata.pro b/tests/auto/corelib/tools/qarraydata/qarraydata.pro
index d5fe08c009..ee3faa9ad7 100644
--- a/tests/auto/corelib/tools/qarraydata/qarraydata.pro
+++ b/tests/auto/corelib/tools/qarraydata/qarraydata.pro
@@ -2,5 +2,4 @@ TARGET = tst_qarraydata
SOURCES += $$PWD/tst_qarraydata.cpp
HEADERS += $$PWD/simplevector.h
QT = core testlib
-CONFIG += testcase parallel_test
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+CONFIG += testcase
diff --git a/tests/auto/corelib/tools/qarraydata/simplevector.h b/tests/auto/corelib/tools/qarraydata/simplevector.h
index 9c7e1ae228..9dd8b05796 100644
--- a/tests/auto/corelib/tools/qarraydata/simplevector.h
+++ b/tests/auto/corelib/tools/qarraydata/simplevector.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
index 31ade26067..0c41f66357 100644
--- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
+++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qbitarray/qbitarray.pro b/tests/auto/corelib/tools/qbitarray/qbitarray.pro
index 22f62faaca..1e7185b600 100644
--- a/tests/auto/corelib/tools/qbitarray/qbitarray.pro
+++ b/tests/auto/corelib/tools/qbitarray/qbitarray.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qbitarray
QT = core testlib
SOURCES = tst_qbitarray.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
index d3bbfa338b..d19eac7530 100644
--- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -126,9 +121,9 @@ void tst_QBitArray::size()
for (int j=0; j<len; j++) {
bool b = a[j];
if (b)
- S+= "1";
+ S+= QLatin1Char('1');
else
- S+= "0";
+ S+= QLatin1Char('0');
}
QTEST(S,"res");
}
diff --git a/tests/auto/corelib/tools/qbytearray/qbytearray.pro b/tests/auto/corelib/tools/qbytearray/qbytearray.pro
index 22104f817f..f59cdf3524 100644
--- a/tests/auto/corelib/tools/qbytearray/qbytearray.pro
+++ b/tests/auto/corelib/tools/qbytearray/qbytearray.pro
@@ -1,17 +1,16 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qbytearray
QT = core-private testlib
SOURCES = tst_qbytearray.cpp
TESTDATA += rfc3252.txt
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
mac {
OBJECTIVE_SOURCES += tst_qbytearray_mac.mm
LIBS += -framework Foundation
}
-android: !android-no-sdk {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 6d1c7481a9..a100de4c41 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -111,7 +107,7 @@ private slots:
void number();
void toInt_data();
void toInt();
- void qAllocMore();
+ void blockSizeCalculations();
void resizeAfterFromRawData();
void appendAfterFromRawData();
@@ -212,12 +208,12 @@ QByteArray verifyZeroTermination(const QByteArray &ba)
const_cast<char *>(baData)[baSize] = 'x';
if ('x' != ba.constData()[baSize]) {
- return QString::fromLatin1("*** Failed to replace null-terminator in "
- "result ('%1') ***").arg(QString::fromLatin1(ba)).toLatin1();
+ return "*** Failed to replace null-terminator in "
+ "result ('" + ba + "') ***";
}
if (ba != baCopy) {
- return QString::fromLatin1( "*** Result ('%1') differs from its copy "
- "after null-terminator was replaced ***").arg(QString::fromLatin1(ba)).toLatin1();
+ return "*** Result ('" + ba + "') differs from its copy "
+ "after null-terminator was replaced ***";
}
const_cast<char *>(baData)[baSize] = '\0'; // Restore sanity
@@ -904,7 +900,9 @@ void tst_QByteArray::prepend()
QCOMPARE(ba.prepend("1"), QByteArray("1foo"));
QCOMPARE(ba.prepend(QByteArray("2")), QByteArray("21foo"));
QCOMPARE(ba.prepend('3'), QByteArray("321foo"));
- QCOMPARE(ba.prepend("\0 ", 2), QByteArray::fromRawData("\0 321foo", 8));
+ QCOMPARE(ba.prepend(-1, 'x'), QByteArray("321foo"));
+ QCOMPARE(ba.prepend(3, 'x'), QByteArray("xxx321foo"));
+ QCOMPARE(ba.prepend("\0 ", 2), QByteArray::fromRawData("\0 xxx321foo", 11));
}
void tst_QByteArray::prependExtended_data()
@@ -932,8 +930,10 @@ void tst_QByteArray::prependExtended()
QCOMPARE(array.prepend("1"), QByteArray("1data"));
QCOMPARE(array.prepend(QByteArray("2")), QByteArray("21data"));
QCOMPARE(array.prepend('3'), QByteArray("321data"));
- QCOMPARE(array.prepend("\0 ", 2), QByteArray::fromRawData("\0 321data", 9));
- QCOMPARE(array.size(), 9);
+ QCOMPARE(array.prepend(-1, 'x'), QByteArray("321data"));
+ QCOMPARE(array.prepend(3, 'x'), QByteArray("xxx321data"));
+ QCOMPARE(array.prepend("\0 ", 2), QByteArray::fromRawData("\0 xxx321data", 12));
+ QCOMPARE(array.size(), 12);
}
void tst_QByteArray::append()
@@ -944,9 +944,11 @@ void tst_QByteArray::append()
QCOMPARE(ba.append("1"), QByteArray("foo1"));
QCOMPARE(ba.append(QByteArray("2")), QByteArray("foo12"));
QCOMPARE(ba.append('3'), QByteArray("foo123"));
- QCOMPARE(ba.append("\0"), QByteArray("foo123"));
- QCOMPARE(ba.append("\0", 1), QByteArray::fromRawData("foo123\0", 7));
- QCOMPARE(ba.size(), 7);
+ QCOMPARE(ba.append(-1, 'x'), QByteArray("foo123"));
+ QCOMPARE(ba.append(3, 'x'), QByteArray("foo123xxx"));
+ QCOMPARE(ba.append("\0"), QByteArray("foo123xxx"));
+ QCOMPARE(ba.append("\0", 1), QByteArray::fromRawData("foo123xxx\0", 10));
+ QCOMPARE(ba.size(), 10);
}
void tst_QByteArray::appendExtended_data()
@@ -966,9 +968,11 @@ void tst_QByteArray::appendExtended()
QCOMPARE(array.append("1"), QByteArray("data1"));
QCOMPARE(array.append(QByteArray("2")), QByteArray("data12"));
QCOMPARE(array.append('3'), QByteArray("data123"));
- QCOMPARE(array.append("\0"), QByteArray("data123"));
- QCOMPARE(array.append("\0", 1), QByteArray::fromRawData("data123\0", 8));
- QCOMPARE(array.size(), 8);
+ QCOMPARE(array.append(-1, 'x'), QByteArray("data123"));
+ QCOMPARE(array.append(3, 'x'), QByteArray("data123xxx"));
+ QCOMPARE(array.append("\0"), QByteArray("data123xxx"));
+ QCOMPARE(array.append("\0", 1), QByteArray::fromRawData("data123xxx\0", 11));
+ QCOMPARE(array.size(), 11);
}
void tst_QByteArray::insert()
@@ -984,6 +988,12 @@ void tst_QByteArray::insert()
QCOMPARE(ba.insert(1, 'b'), QByteArray("abc"));
QCOMPARE(ba.size(), 3);
+ ba = "ac";
+ QCOMPARE(ba.insert(-1, 3, 'x'), QByteArray("ac"));
+ QCOMPARE(ba.insert(1, 3, 'x'), QByteArray("axxxc"));
+ QCOMPARE(ba.insert(6, 3, 'x'), QByteArray("axxxc xxx"));
+ QCOMPARE(ba.size(), 9);
+
ba = "ikl";
QCOMPARE(ba.insert(1, "j"), QByteArray("ijkl"));
QCOMPARE(ba.size(), 4);
@@ -1002,7 +1012,8 @@ void tst_QByteArray::insertExtended()
{
QFETCH(QByteArray, array);
QCOMPARE(array.insert(1, "i"), QByteArray("diata"));
- QCOMPARE(array.size(), 5);
+ QCOMPARE(array.insert(1, 3, 'x'), QByteArray("dxxxiata"));
+ QCOMPARE(array.size(), 8);
}
void tst_QByteArray::remove_data()
@@ -1343,28 +1354,80 @@ void tst_QByteArray::toULongLong()
QCOMPARE(b, ok);
}
-// global function defined in qbytearray.cpp
-void tst_QByteArray::qAllocMore()
+static bool checkSize(size_t value, uint min)
{
- using QT_PREPEND_NAMESPACE(qAllocMore);
+ return value >= min && value <= INT_MAX;
+}
+// global functions defined in qbytearray.cpp
+void tst_QByteArray::blockSizeCalculations()
+{
// Not very important, but please behave :-)
- QVERIFY(qAllocMore(0, 0) >= 0);
-
- for (int i = 1; i < 1 << 8; i <<= 1)
- QVERIFY(qAllocMore(i, 0) >= i);
-
- for (int i = 1 << 8; i < 1 << 30; i <<= 1) {
- const int alloc = qAllocMore(i, 0);
+ QCOMPARE(qCalculateBlockSize(0, 1), size_t(0));
+ QVERIFY(qCalculateGrowingBlockSize(0, 1).size <= MaxAllocSize);
+ QVERIFY(qCalculateGrowingBlockSize(0, 1).elementCount <= MaxAllocSize);
+
+ // boundary condition
+ QCOMPARE(qCalculateBlockSize(MaxAllocSize, 1), size_t(MaxAllocSize));
+ QCOMPARE(qCalculateBlockSize(MaxAllocSize/2, 2), size_t(MaxAllocSize) - 1);
+ QCOMPARE(qCalculateBlockSize(MaxAllocSize/2, 2, 1), size_t(MaxAllocSize));
+ QCOMPARE(qCalculateGrowingBlockSize(MaxAllocSize, 1).size, size_t(MaxAllocSize));
+ QCOMPARE(qCalculateGrowingBlockSize(MaxAllocSize, 1).elementCount, size_t(MaxAllocSize));
+ QCOMPARE(qCalculateGrowingBlockSize(MaxAllocSize/2, 2, 1).size, size_t(MaxAllocSize));
+ QCOMPARE(qCalculateGrowingBlockSize(MaxAllocSize/2, 2, 1).elementCount, size_t(MaxAllocSize)/2);
+
+ // error conditions
+ QCOMPARE(qCalculateBlockSize(uint(MaxAllocSize) + 1, 1), size_t(~0));
+ QCOMPARE(qCalculateBlockSize(size_t(-1), 1), size_t(~0));
+ QCOMPARE(qCalculateBlockSize(MaxAllocSize, 1, 1), size_t(~0));
+ QCOMPARE(qCalculateBlockSize(MaxAllocSize/2 + 1, 2), size_t(~0));
+ QCOMPARE(qCalculateGrowingBlockSize(uint(MaxAllocSize) + 1, 1).size, size_t(~0));
+ QCOMPARE(qCalculateGrowingBlockSize(MaxAllocSize/2 + 1, 2).size, size_t(~0));
+
+ // overflow conditions
+ // on 32-bit platforms, (1 << 16) * (1 << 16) = (1 << 32) which is zero
+ QCOMPARE(qCalculateBlockSize(1 << 16, 1 << 16), size_t(~0));
+ QCOMPARE(qCalculateBlockSize(MaxAllocSize/4, 16), size_t(~0));
+ // on 32-bit platforms, (1 << 30) * 3 + (1 << 30) would overflow to zero
+ QCOMPARE(qCalculateBlockSize(1U << 30, 3, 1U << 30), size_t(~0));
+
+ // exact block sizes
+ for (int i = 1; i < 1 << 31; i <<= 1) {
+ QCOMPARE(qCalculateBlockSize(0, 1, i), size_t(i));
+ QCOMPARE(qCalculateBlockSize(i, 1), size_t(i));
+ QCOMPARE(qCalculateBlockSize(i + i/2, 1), size_t(i + i/2));
+ }
+ for (int i = 1; i < 1 << 30; i <<= 1) {
+ QCOMPARE(qCalculateBlockSize(i, 2), 2 * size_t(i));
+ QCOMPARE(qCalculateBlockSize(i, 2, 1), 2 * size_t(i) + 1);
+ QCOMPARE(qCalculateBlockSize(i, 2, 16), 2 * size_t(i) + 16);
+ }
- QVERIFY(alloc >= i);
- QCOMPARE(qAllocMore(i - 8, 8), alloc - 8);
- QCOMPARE(qAllocMore(i - 16, 16), alloc - 16);
- QCOMPARE(qAllocMore(i - 24, 24), alloc - 24);
- QCOMPARE(qAllocMore(i - 32, 32), alloc - 32);
+ // growing sizes
+ for (int i = 1; i < 1 << 31; i <<= 1) {
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(i, 1).size, i));
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(i, 1).elementCount, i));
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(i, 1, 16).size, i));
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(i, 1, 16).elementCount, i));
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(i, 1, 24).size, i));
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(i, 1, 16).elementCount, i));
+ }
- QVERIFY(qAllocMore(i - 1, 0) >= i - 1);
- QVERIFY(qAllocMore(i + 1, 0) >= i + 1);
+ // growth should be limited
+ for (int elementSize = 1; elementSize < (1<<8); elementSize <<= 1) {
+ size_t alloc = 1;
+ forever {
+ QVERIFY(checkSize(qCalculateGrowingBlockSize(alloc, elementSize).size, alloc * elementSize));
+ size_t newAlloc = qCalculateGrowingBlockSize(alloc, elementSize).elementCount;
+ QVERIFY(checkSize(newAlloc, alloc));
+ if (newAlloc == alloc)
+ break; // no growth, we're at limit
+ alloc = newAlloc;
+ }
+ QVERIFY(checkSize(alloc, size_t(MaxAllocSize) / elementSize));
+
+ // the next allocation should be invalid
+ QCOMPARE(qCalculateGrowingBlockSize(alloc + 1, elementSize).size, size_t(~0));
}
}
@@ -1977,15 +2040,15 @@ void tst_QByteArray::movablity()
QCOMPARE(array.isEmpty(), newIsEmpty);
QCOMPARE(array.isNull(), newIsNull);
QCOMPARE(array.capacity(), newCapacity);
- QVERIFY(array.startsWith("a"));
- QVERIFY(array.endsWith("b"));
+ QVERIFY(array.startsWith('a'));
+ QVERIFY(array.endsWith('b'));
QCOMPARE(copy.size(), newSize);
QCOMPARE(copy.isEmpty(), newIsEmpty);
QCOMPARE(copy.isNull(), newIsNull);
QCOMPARE(copy.capacity(), newCapacity);
- QVERIFY(copy.startsWith("a"));
- QVERIFY(copy.endsWith("b"));
+ QVERIFY(copy.startsWith('a'));
+ QVERIFY(copy.endsWith('b'));
// try to not crash
array.squeeze();
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm b/tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm
index 95d05904a2..98146e3525 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm
@@ -1,32 +1,27 @@
/****************************************************************************
**
** Copyright (C) 2014 Samuel Gaist <samuel.gaist@edeltech.ch>
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro b/tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro
index 2cd4522f67..6c05c288cf 100644
--- a/tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro
+++ b/tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qbytearraylist
QT = core testlib
SOURCES = tst_qbytearraylist.cpp
diff --git a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp b/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
index 9ce9910f6f..85b4c4bfb7 100644
--- a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
+++ b/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2014 by Southwest Research Institute (R)
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro b/tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro
index 7da193d01a..0624e1886c 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro
+++ b/tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qbytearraymatcher
QT = core testlib
SOURCES = tst_qbytearraymatcher.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
index fcb35f92b6..82cc432d55 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
+++ b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp b/tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp
index ccc770d4b3..59f4d153e6 100644
--- a/tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp
+++ b/tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qcache/qcache.pro b/tests/auto/corelib/tools/qcache/qcache.pro
index 80a616ce38..07488ef40f 100644
--- a/tests/auto/corelib/tools/qcache/qcache.pro
+++ b/tests/auto/corelib/tools/qcache/qcache.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qcache
QT = core testlib
SOURCES = tst_qcache.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qcache/tst_qcache.cpp b/tests/auto/corelib/tools/qcache/tst_qcache.cpp
index f8f55d2830..d880953c1c 100644
--- a/tests/auto/corelib/tools/qcache/tst_qcache.cpp
+++ b/tests/auto/corelib/tools/qcache/tst_qcache.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qchar/qchar.pro b/tests/auto/corelib/tools/qchar/qchar.pro
index a72f16fa49..012e591298 100644
--- a/tests/auto/corelib/tools/qchar/qchar.pro
+++ b/tests/auto/corelib/tools/qchar/qchar.pro
@@ -1,12 +1,11 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qchar
QT = core-private testlib
SOURCES = tst_qchar.cpp
TESTDATA += data/NormalizationTest.txt
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index 22fbce9f8e..e51f5d4694 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -43,10 +38,8 @@
class tst_QChar : public QObject
{
Q_OBJECT
-public slots:
- void init();
- void cleanup();
private slots:
+ void operator_eqeq_int();
void operators_data();
void operators();
void toUpper();
@@ -80,25 +73,30 @@ private slots:
void normalization_manual();
void normalizationCorrections();
void unicodeVersion();
-#if defined(Q_OS_WINCE)
-private:
- QCoreApplication* app;
-#endif
};
-void tst_QChar::init()
-{
-#if defined(Q_OS_WINCE)
- int argc = 0;
- app = new QCoreApplication(argc, NULL);
-#endif
-}
-
-void tst_QChar::cleanup()
+void tst_QChar::operator_eqeq_int()
{
-#if defined(Q_OS_WINCE)
- delete app;
-#endif
+ {
+ const QChar ch = QLatin1Char(' ');
+ QVERIFY(ch != 0);
+ QVERIFY(!(ch == 0));
+
+ QVERIFY(ch == 0x20);
+ QVERIFY(!(ch != 0x20));
+ QVERIFY(0x20 == ch);
+ QVERIFY(!(0x20 != ch));
+ }
+ {
+ const QChar ch = QLatin1Char('\0');
+ QVERIFY(ch == 0);
+ QVERIFY(!(ch != 0));
+
+ QVERIFY(ch != 0x20);
+ QVERIFY(!(ch == 0x20));
+ QVERIFY(0x20 != ch);
+ QVERIFY(!(0x20 == ch));
+ }
}
void tst_QChar::operators_data()
@@ -239,8 +237,8 @@ void tst_QChar::isDigit_data()
for (ushort ucs = 0; ucs < 256; ++ucs) {
bool isDigit = (ucs <= '9' && ucs >= '0');
- QString tag = QString::fromLatin1("0x%0").arg(QString::number(ucs, 16));
- QTest::newRow(tag.toLatin1()) << ucs << isDigit;
+ const QByteArray tag = "0x" + QByteArray::number(ucs, 16);
+ QTest::newRow(tag.constData()) << ucs << isDigit;
}
}
@@ -266,8 +264,8 @@ void tst_QChar::isLetter_data()
QTest::addColumn<bool>("expected");
for (ushort ucs = 0; ucs < 256; ++ucs) {
- QString tag = QString::fromLatin1("0x%0").arg(QString::number(ucs, 16));
- QTest::newRow(tag.toLatin1()) << ucs << isExpectedLetter(ucs);
+ const QByteArray tag = "0x" + QByteArray::number(ucs, 16);
+ QTest::newRow(tag.constData()) << ucs << isExpectedLetter(ucs);
}
}
@@ -288,8 +286,8 @@ void tst_QChar::isLetterOrNumber_data()
|| (ucs >= '0' && ucs <= '9')
|| ucs == 0xB2 || ucs == 0xB3 || ucs == 0xB9
|| (ucs >= 0xBC && ucs <= 0xBE);
- QString tag = QString::fromLatin1("0x%0").arg(QString::number(ucs, 16));
- QTest::newRow(tag.toLatin1()) << ucs << isLetterOrNumber;
+ const QByteArray tag = "0x" + QByteArray::number(ucs, 16);
+ QTest::newRow(tag.constData()) << ucs << isLetterOrNumber;
}
}
@@ -403,8 +401,8 @@ void tst_QChar::isSpace_data()
for (ushort ucs = 0; ucs < 256; ++ucs) {
bool isSpace = (ucs <= 0x0D && ucs >= 0x09) || ucs == 0x20 || ucs == 0xA0 || ucs == 0x85;
- QString tag = QString::fromLatin1("0x%0").arg(QString::number(ucs, 16));
- QTest::newRow(tag.toLatin1()) << ucs << isSpace;
+ const QByteArray tag = "0x" + QByteArray::number(ucs, 16);
+ QTest::newRow(tag.constData()) << ucs << isSpace;
}
}
@@ -760,7 +758,7 @@ void tst_QChar::normalization_data()
if (comment >= 0)
line = line.left(comment);
- if (line.startsWith("@")) {
+ if (line.startsWith('@')) {
if (line.startsWith("@Part") && line.size() > 5 && QChar(line.at(5)).isDigit())
part = QChar(line.at(5)).digitValue();
continue;
@@ -797,8 +795,10 @@ void tst_QChar::normalization_data()
}
}
- QString nm = QString("line #%1 (part %2").arg(linenum).arg(part);
- QTest::newRow(nm.toLatin1()) << columns << part;
+
+ const QByteArray nm = "line #" + QByteArray::number(linenum) + " (part "
+ + QByteArray::number(part);
+ QTest::newRow(nm.constData()) << columns << part;
}
}
diff --git a/tests/auto/corelib/tools/qcollator/qcollator.pro b/tests/auto/corelib/tools/qcollator/qcollator.pro
index 3c5987ffa0..ed879ee70e 100644
--- a/tests/auto/corelib/tools/qcollator/qcollator.pro
+++ b/tests/auto/corelib/tools/qcollator/qcollator.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qcollator
QT = core testlib
SOURCES = tst_qcollator.cpp
DEFINES += QT_NO_CAST_TO_ASCII
contains(QT_CONFIG,icu):DEFINES += QT_USE_ICU
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
index b0135ab6af..d09910fd5c 100644
--- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
+++ b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -170,7 +165,7 @@ void tst_QCollator::compare()
QCollator collator(locale);
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
if (collator.locale() != QLocale())
QSKIP("Posix implementation of collation only supports default locale");
#endif
diff --git a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
index 6e09ebb09b..36bc8621d2 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
index fb0b971602..9552152136 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 David Faure <faure@kde.org>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -509,7 +504,7 @@ void tst_QCommandLineParser::testVersionOption()
#ifdef Q_OS_WINCE
QSKIP("Reading and writing to a process is not supported on Qt/CE");
#endif
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -578,7 +573,7 @@ void tst_QCommandLineParser::testHelpOption()
#ifdef Q_OS_WINCE
QSKIP("Reading and writing to a process is not supported on Qt/CE");
#endif
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -625,7 +620,7 @@ void tst_QCommandLineParser::testQuoteEscaping()
{
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#else
QCoreApplication app(empty_argc, empty_argv);
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.pro b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.pro
index 6d3e6d677f..75b74bbf4d 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.pro
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qcommandlineparser
QT = core testlib
SOURCES = tst_qcommandlineparser.cpp
diff --git a/tests/auto/corelib/tools/qcontiguouscache/qcontiguouscache.pro b/tests/auto/corelib/tools/qcontiguouscache/qcontiguouscache.pro
index db4412ed59..d79bd16c76 100644
--- a/tests/auto/corelib/tools/qcontiguouscache/qcontiguouscache.pro
+++ b/tests/auto/corelib/tools/qcontiguouscache/qcontiguouscache.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qcontiguouscache
QT = core testlib
SOURCES = tst_qcontiguouscache.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
index 76687bd478..31a5f93822 100644
--- a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
+++ b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
index 941a068f8e..7fead5938b 100644
--- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -1,12 +1,11 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qcryptographichash
QT = core testlib
SOURCES = tst_qcryptographichash.cpp
TESTDATA += data/*
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index e7958ce707..dee10cbebc 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qdate/qdate.pro b/tests/auto/corelib/tools/qdate/qdate.pro
index 6be3164fd7..dd7c6cb888 100644
--- a/tests/auto/corelib/tools/qdate/qdate.pro
+++ b/tests/auto/corelib/tools/qdate/qdate.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qdate
QT = core testlib
SOURCES = tst_qdate.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
index 937a490da2..f22138b795 100644
--- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp
+++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -1068,7 +1064,7 @@ void tst_QDate::fromStringFormat_data()
QTest::newRow("data14") << QString("132") << QString("Md") << invalidDate();
QTest::newRow("data15") << february << QString("MMMM") << QDate(defDate().year(), 2, 1);
- QString date = mon + " " + august + " 8 2005";
+ QString date = mon + QLatin1Char(' ') + august + " 8 2005";
QTest::newRow("data16") << date << QString("ddd MMMM d yyyy") << QDate(2005, 8, 8);
QTest::newRow("data17") << QString("2000:00") << QString("yyyy:yy") << QDate(2000, 1, 1);
QTest::newRow("data18") << QString("1999:99") << QString("yyyy:yy") << QDate(1999, 1, 1);
diff --git a/tests/auto/corelib/tools/qdatetime/qdatetime.pro b/tests/auto/corelib/tools/qdatetime/qdatetime.pro
index 25d11443e4..ba36621cf1 100644
--- a/tests/auto/corelib/tools/qdatetime/qdatetime.pro
+++ b/tests/auto/corelib/tools/qdatetime/qdatetime.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qdatetime
QT = core-private testlib
SOURCES = tst_qdatetime.cpp
@@ -10,7 +10,6 @@ win32-msvc|win32-msvc9x {
QMAKE_CFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O1
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
mac {
OBJECTIVE_SOURCES += tst_qdatetime_mac.mm
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 35c278da0e..cfec327319 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -1883,13 +1879,15 @@ void tst_QDateTime::operator_insert_extract_data()
const int thisVersion = tmpDataStream.version();
for (int version = QDataStream::Qt_1_0; version <= thisVersion; ++version) {
const QDataStream::Version dataStreamVersion = static_cast<QDataStream::Version>(version);
- QTest::newRow(QString::fromLatin1("v%1 WA => HAWAII %2").arg(dataStreamVersion).arg(positiveYear.toString()).toLocal8Bit().constData())
+ const QByteArray vN = QByteArray::number(dataStreamVersion);
+ const QByteArray pY = positiveYear.toString().toLatin1();
+ QTest::newRow(('v' + vN + " WA => HAWAII " + pY).constData())
<< positiveYear << westernAustralia << hawaii << dataStreamVersion;
- QTest::newRow(QString::fromLatin1("v%1 WA => WA %2").arg(dataStreamVersion).arg(positiveYear.toString()).toLocal8Bit().constData())
+ QTest::newRow(('v' + vN + " WA => WA " + pY).constData())
<< positiveYear << westernAustralia << westernAustralia << dataStreamVersion;
- QTest::newRow(QString::fromLatin1("v%1 HAWAII => WA %2").arg(dataStreamVersion).arg(negativeYear.toString()).toLocal8Bit().constData())
+ QTest::newRow(('v' + vN + " HAWAII => WA " + negativeYear.toString().toLatin1()).constData())
<< negativeYear << hawaii << westernAustralia << dataStreamVersion;
- QTest::newRow(QString::fromLatin1("v%1 HAWAII => HAWAII %2").arg(dataStreamVersion).arg(positiveYear.toString()).toLocal8Bit().constData())
+ QTest::newRow(('v' + vN + " HAWAII => HAWAII " + pY).constData())
<< positiveYear << hawaii << hawaii << dataStreamVersion;
}
}
@@ -2290,11 +2288,11 @@ void tst_QDateTime::fromStringStringFormat_data()
QTest::newRow("data9") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
QTest::newRow("data10") << QString("101010") << QString("dMyy") << QDateTime(QDate(1910, 10, 10), QTime());
QTest::newRow("data11") << date << QString("dd MMM yy") << QDateTime(QDate(1910, 10, 10), QTime());
- date = fri + " " + december + " 3 2004";
+ date = fri + QLatin1Char(' ') + december + " 3 2004";
QTest::newRow("data12") << date << QString("ddd MMMM d yyyy") << QDateTime(QDate(2004, 12, 3), QTime());
QTest::newRow("data13") << QString("30.02.2004") << QString("dd.MM.yyyy") << invalidDateTime();
QTest::newRow("data14") << QString("32.01.2004") << QString("dd.MM.yyyy") << invalidDateTime();
- date = thu + " " + january + " 2004";
+ date = thu + QLatin1Char(' ') + january + " 2004";
QTest::newRow("data15") << date << QString("ddd MMMM yyyy") << QDateTime(QDate(2004, 1, 1), QTime());
QTest::newRow("data16") << QString("2005-06-28T07:57:30.001Z")
<< QString("yyyy-MM-ddThh:mm:ss.zZ")
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime_mac.mm b/tests/auto/corelib/tools/qdatetime/tst_qdatetime_mac.mm
index 0ad9a8253b..fb49b8952e 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime_mac.mm
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime_mac.mm
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2014 Petroules Corporation.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qeasingcurve/qeasingcurve.pro b/tests/auto/corelib/tools/qeasingcurve/qeasingcurve.pro
index 679f9bbda4..80c5a94a83 100644
--- a/tests/auto/corelib/tools/qeasingcurve/qeasingcurve.pro
+++ b/tests/auto/corelib/tools/qeasingcurve/qeasingcurve.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qeasingcurve
QT = core testlib
SOURCES = tst_qeasingcurve.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
index dd88edae7b..0714883855 100644
--- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qelapsedtimer/qelapsedtimer.pro b/tests/auto/corelib/tools/qelapsedtimer/qelapsedtimer.pro
index 7e9f907915..657a63a5d7 100644
--- a/tests/auto/corelib/tools/qelapsedtimer/qelapsedtimer.pro
+++ b/tests/auto/corelib/tools/qelapsedtimer/qelapsedtimer.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qelapsedtimer
QT = core testlib
SOURCES = tst_qelapsedtimer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
index 4d6b5e4e41..9db001c37d 100644
--- a/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
+++ b/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro
index 2ee091c139..45fe1f60fe 100644
--- a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro
+++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/qexplicitlyshareddatapointer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qexplicitlyshareddatapointer
QT = core testlib
SOURCES = tst_qexplicitlyshareddatapointer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
index 750fdec3e7..f545ead1f1 100644
--- a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
+++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qfreelist/qfreelist.pro b/tests/auto/corelib/tools/qfreelist/qfreelist.pro
index 60ae819f87..fb108338bd 100644
--- a/tests/auto/corelib/tools/qfreelist/qfreelist.pro
+++ b/tests/auto/corelib/tools/qfreelist/qfreelist.pro
@@ -1,7 +1,5 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qfreelist
QT = core-private testlib
SOURCES = tst_qfreelist.cpp
!contains(QT_CONFIG,private_tests): SOURCES += $$QT_SOURCE_TREE/src/corelib/tools/qfreelist.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
index 381362961a..a09bcd5121 100644
--- a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
+++ b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qhash/qhash.pro b/tests/auto/corelib/tools/qhash/qhash.pro
index 1ed062ca91..79ffd4e9d1 100644
--- a/tests/auto/corelib/tools/qhash/qhash.pro
+++ b/tests/auto/corelib/tools/qhash/qhash.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qhash
QT = core testlib
SOURCES = $$PWD/tst_qhash.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index d485040a14..06ff09dc6c 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -37,6 +32,7 @@
#include <qmap.h>
#include <algorithm>
+#include <vector>
class tst_QHash : public QObject
{
@@ -70,6 +66,7 @@ private slots:
void twoArguments_qHash();
void initializerList();
void eraseValidIteratorOnSharedHash();
+ void equal_range();
};
struct IdentityTracker {
@@ -510,24 +507,24 @@ void tst_QHash::key()
QCOMPARE(hash1.key(1, def), def);
hash1.insert("one", 1);
- QCOMPARE(hash1.key(1), QString("one"));
- QCOMPARE(hash1.key(1, def), QString("one"));
+ QCOMPARE(hash1.key(1), QLatin1String("one"));
+ QCOMPARE(hash1.key(1, def), QLatin1String("one"));
QCOMPARE(hash1.key(2), QString());
QCOMPARE(hash1.key(2, def), def);
hash1.insert("two", 2);
- QCOMPARE(hash1.key(1), QString("one"));
- QCOMPARE(hash1.key(1, def), QString("one"));
- QCOMPARE(hash1.key(2), QString("two"));
- QCOMPARE(hash1.key(2, def), QString("two"));
+ QCOMPARE(hash1.key(1), QLatin1String("one"));
+ QCOMPARE(hash1.key(1, def), QLatin1String("one"));
+ QCOMPARE(hash1.key(2), QLatin1String("two"));
+ QCOMPARE(hash1.key(2, def), QLatin1String("two"));
QCOMPARE(hash1.key(3), QString());
QCOMPARE(hash1.key(3, def), def);
hash1.insert("deux", 2);
- QCOMPARE(hash1.key(1), QString("one"));
- QCOMPARE(hash1.key(1, def), QString("one"));
- QVERIFY(hash1.key(2) == "deux" || hash1.key(2) == "two");
- QVERIFY(hash1.key(2, def) == "deux" || hash1.key(2, def) == "two");
+ QCOMPARE(hash1.key(1), QLatin1String("one"));
+ QCOMPARE(hash1.key(1, def), QLatin1String("one"));
+ QVERIFY(hash1.key(2) == QLatin1String("deux") || hash1.key(2) == QLatin1String("two"));
+ QVERIFY(hash1.key(2, def) == QLatin1String("deux") || hash1.key(2, def) == QLatin1String("two"));
QCOMPARE(hash1.key(3), QString());
QCOMPARE(hash1.key(3, def), def);
}
@@ -628,8 +625,8 @@ void tst_QHash::find()
map1.insert(1,"Mayer");
map1.insert(2,"Hej");
- QVERIFY(map1.find(1).value() == "Mayer");
- QVERIFY(map1.find(2).value() == "Hej");
+ QCOMPARE(map1.find(1).value(), QLatin1String("Mayer"));
+ QCOMPARE(map1.find(2).value(), QLatin1String("Hej"));
for(i = 3; i < 10; ++i) {
compareString = testString.arg(i);
@@ -661,8 +658,8 @@ void tst_QHash::constFind()
map1.insert(1,"Mayer");
map1.insert(2,"Hej");
- QVERIFY(map1.constFind(1).value() == "Mayer");
- QVERIFY(map1.constFind(2).value() == "Hej");
+ QCOMPARE(map1.constFind(1).value(), QLatin1String("Mayer"));
+ QCOMPARE(map1.constFind(2).value(), QLatin1String("Hej"));
for(i = 3; i < 10; ++i) {
compareString = testString.arg(i);
@@ -706,7 +703,7 @@ void tst_QHash::take()
map.insert(2, "zwei");
map.insert(3, "drei");
- QVERIFY(map.take(3) == "drei");
+ QCOMPARE(map.take(3), QLatin1String("drei"));
QVERIFY(!map.contains(3));
}
@@ -1360,5 +1357,111 @@ void tst_QHash::eraseValidIteratorOnSharedHash()
QCOMPARE(itemsWith10, 3);
}
+void tst_QHash::equal_range()
+{
+ QHash<int, QString> hash;
+
+ auto result = hash.equal_range(0);
+ QCOMPARE(result.first, hash.end());
+ QCOMPARE(result.second, hash.end());
+
+ hash.insert(1, "one");
+
+ result = hash.equal_range(1);
+
+ QCOMPARE(result.first, hash.find(1));
+ QVERIFY(std::distance(result.first, result.second) == 1);
+
+ QHash<int, int> h1;
+ {
+ auto p = h1.equal_range(0);
+ QVERIFY(p.first == p.second);
+ QVERIFY(p.first == h1.end());
+ }
+
+ h1.insert(1, 2);
+ {
+ auto p1 = h1.equal_range(9);
+ QVERIFY(p1.first == p1.second);
+ QVERIFY(p1.first == h1.end());
+ }
+ {
+ auto p2 = h1.equal_range(1);
+ QVERIFY(p2.first != p2.second);
+ QVERIFY(p2.first == h1.begin());
+ QVERIFY(p2.second == h1.end());
+ }
+
+ QMultiHash<int, int> m1 = h1;
+ m1.insert(1, 0);
+ QCOMPARE(m1.size(), 2);
+ {
+ auto p1 = m1.equal_range(9);
+ QVERIFY(p1.first == p1.second);
+ QVERIFY(p1.first == m1.end());
+ }
+ {
+ auto p2 = m1.equal_range(1);
+ QVERIFY(p2.first != p2.second);
+ QVERIFY(p2.first == m1.begin());
+ QVERIFY(p2.second == m1.end());
+ QCOMPARE(std::distance(p2.first, p2.second), 2);
+ }
+
+ m1.insert(0, 0);
+ QCOMPARE(m1.size(), 3);
+ {
+ auto p1 = m1.equal_range(9);
+ QVERIFY(p1.first == p1.second);
+ QVERIFY(p1.first == m1.end());
+ }
+ {
+ const auto p2 = m1.equal_range(1);
+ QVERIFY(p2.first != p2.second);
+ QCOMPARE(p2.first.key(), 1);
+ QCOMPARE(std::distance(p2.first, p2.second), 2);
+ QVERIFY(p2.first == m1.begin() || p2.second == m1.end());
+ }
+
+ const QHash<int, int> ch1 = h1;
+ {
+ auto p1 = ch1.equal_range(9);
+ QVERIFY(p1.first == p1.second);
+ QVERIFY(p1.first == ch1.end());
+ }
+ {
+ auto p2 = ch1.equal_range(1);
+ QVERIFY(p2.first != p2.second);
+ QVERIFY(p2.first == ch1.begin());
+ QVERIFY(p2.second == ch1.end());
+ }
+
+ const QMultiHash<int, int> cm1 = m1;
+ {
+ auto p1 = cm1.equal_range(9);
+ QVERIFY(p1.first == p1.second);
+ QVERIFY(p1.first == cm1.end());
+ }
+ {
+ auto p2 = cm1.equal_range(1);
+ QVERIFY(p2.first != p2.second);
+ QCOMPARE(std::distance(p2.first, p2.second), 2);
+ QVERIFY(p2.first == cm1.cbegin() || p2.second == cm1.cend());
+ }
+
+ QHash<int, int> h2;
+ for (int i = 0; i < 8; ++i)
+ for (int j = 0; j < 8; ++j)
+ h2.insertMulti(i, i*j);
+
+ for (int i = 0; i < 8; ++i) {
+ auto pair = h2.equal_range(i);
+ std::vector<int> vec(pair.first, pair.second);
+ std::sort(vec.begin(), vec.end());
+ for (int j = 0; j < 8; ++j)
+ QCOMPARE(i*j, vec[j]);
+ }
+}
+
QTEST_APPLESS_MAIN(tst_QHash)
#include "tst_qhash.moc"
diff --git a/tests/auto/corelib/tools/qhashfunctions/qhashfunctions.pro b/tests/auto/corelib/tools/qhashfunctions/qhashfunctions.pro
index 21426a4f55..853e9f30e5 100644
--- a/tests/auto/corelib/tools/qhashfunctions/qhashfunctions.pro
+++ b/tests/auto/corelib/tools/qhashfunctions/qhashfunctions.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qhashfunctions
QT = core testlib
SOURCES = $$PWD/tst_qhashfunctions.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
index 4d61bc393d..1a70ac5e75 100644
--- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
+++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -117,6 +112,22 @@ void tst_QHashFunctions::qhash()
QVERIFY(qHash(pA) != qHash(pB));
}
+
+ {
+ std::pair<int, int> p12(1, 2);
+ std::pair<int, int> p21(2, 1);
+
+ using QT_PREPEND_NAMESPACE(qHash);
+
+ QVERIFY(qHash(p12) == qHash(p12));
+ QVERIFY(qHash(p21) == qHash(p21));
+ QVERIFY(qHash(p12) != qHash(p21));
+
+ std::pair<int, int> pA(0x12345678, 0x12345678);
+ std::pair<int, int> pB(0x12345675, 0x12345675);
+
+ QVERIFY(qHash(pA) != qHash(pB));
+ }
}
void tst_QHashFunctions::qhash_of_empty_and_null_qstring()
diff --git a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
index 6f16120bd0..878b4b52b6 100644
--- a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
+++ b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qline/qline.pro b/tests/auto/corelib/tools/qline/qline.pro
index 56f852ac52..81e2f17118 100644
--- a/tests/auto/corelib/tools/qline/qline.pro
+++ b/tests/auto/corelib/tools/qline/qline.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qline
QT = core testlib
SOURCES = tst_qline.cpp
-unix:!mac:!vxworks:!haiku:LIBS+=-lm
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+unix:!darwin:!vxworks:!haiku:!integrity: LIBS+=-lm
diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp
index 20373bfb15..3aee0ff17d 100644
--- a/tests/auto/corelib/tools/qline/tst_qline.cpp
+++ b/tests/auto/corelib/tools/qline/tst_qline.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -179,7 +174,7 @@ void tst_QLine::testIntersection_data()
a = a.translated(1, 1);
b = b.translated(1, 1);
- QTest::newRow(qPrintable(QString::fromLatin1("rotation-%0").arg(i)))
+ QTest::newRow(("rotation-" + QByteArray::number(i)).constData())
<< (double)a.x1() << (double)a.y1() << (double)a.x2() << (double)a.y2()
<< (double)b.x1() << (double)b.y1() << (double)b.x2() << (double)b.y2()
<< int(QLineF::BoundedIntersection)
@@ -332,7 +327,7 @@ void tst_QLine::testAngle_data()
<< 135.0;
for (int i=0; i<180; ++i) {
- QTest::newRow(QString("angle:%1").arg(i).toLatin1())
+ QTest::newRow(("angle:" + QByteArray::number(i)).constData())
<< 0.0 << 0.0 << double(cos(i*M_2PI/360)) << double(sin(i*M_2PI/360))
<< 0.0 << 0.0 << 1.0 << 0.0
<< double(i);
@@ -460,7 +455,7 @@ void tst_QLine::testAngleTo_data()
for (int i = 0; i < 360; ++i) {
const QLineF l = QLineF::fromPolar(1, i);
- QTest::newRow(QString("angle:%1").arg(i).toLatin1())
+ QTest::newRow(("angle:" + QByteArray::number(i)).constData())
<< qreal(0.0) << qreal(0.0) << qreal(1.0) << qreal(0.0)
<< qreal(0.0) << qreal(0.0) << l.p2().x() << l.p2().y()
<< qreal(i);
diff --git a/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro b/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
index 439bf03707..80630f78ad 100644
--- a/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
+++ b/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qlinkedlist
QT = core testlib
SOURCES = tst_qlinkedlist.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp
index 848fdae445..f17d6695f0 100644
--- a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp
+++ b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qlist/qlist.pro b/tests/auto/corelib/tools/qlist/qlist.pro
index 43c06e0ee1..47f0140abb 100644
--- a/tests/auto/corelib/tools/qlist/qlist.pro
+++ b/tests/auto/corelib/tools/qlist/qlist.pro
@@ -1,6 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qlist
QT = core testlib
SOURCES = $$PWD/tst_qlist.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
index 87f0012002..b3f8130d27 100644
--- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp
+++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
index 5aec10e55e..1e1bcc8c5f 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
+++ b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
index 8995fce52c..b61f51d53a 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
+++ b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
@@ -6,4 +6,3 @@ CONFIG -= app_bundle
QT = core
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qlocale/test/test.pro b/tests/auto/corelib/tools/qlocale/test/test.pro
index 60afb29233..d9004d1eb6 100644
--- a/tests/auto/corelib/tools/qlocale/test/test.pro
+++ b/tests/auto/corelib/tools/qlocale/test/test.pro
@@ -1,10 +1,13 @@
CONFIG += console testcase
-CONFIG += parallel_test
CONFIG -= app_bundle
QT = core testlib core-private
embedded: QT += gui
SOURCES = ../tst_qlocale.cpp
+!contains(QT_CONFIG, doubleconversion):!contains(QT_CONFIG, system-doubleconversion) {
+ DEFINES += QT_NO_DOUBLECONVERSION
+}
+
TARGET = ../tst_qlocale
win32 {
CONFIG(debug, debug|release) {
@@ -15,6 +18,3 @@ win32 {
}
!winrt: TEST_HELPER_INSTALLS = ../syslocaleapp/syslocaleapp
-
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-blackberry:LIBS += -lpps
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index dc5140a010..ee706e9f3d 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -42,9 +37,11 @@
#include <qdatetime.h>
#include <qprocess.h>
#include <float.h>
+#include <locale.h>
#include <qlocale.h>
#include <private/qlocale_p.h>
+#include <private/qlocale_tools_p.h>
#include <qnumeric.h>
#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
@@ -68,52 +65,6 @@ extern "C" DWORD GetThreadLocale(void) {
# include <stdlib.h>
#endif
-#ifdef Q_OS_BLACKBERRY
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/pps.h>
-
-static const char ppsLanguageLocalePath[] = "/pps/services/confstr/_CS_LOCALE";
-static const size_t ppsBufferSize = 256;
-
-static QByteArray readPpsValue(const char *ppsObject, int ppsFd)
-{
- QByteArray result;
- if (!ppsObject || ppsFd == -1)
- return result;
-
- char buffer[ppsBufferSize];
-
- int bytes = read(ppsFd, buffer, ppsBufferSize - 1);
- if (bytes == -1) {
- qFatal("Failed to read Locale pps, errno=%d", errno);
- return result;
- }
- // ensure data is null terminated
- buffer[bytes] = '\0';
-
- pps_decoder_t ppsDecoder;
- pps_decoder_initialize(&ppsDecoder, 0);
- if (pps_decoder_parse_pps_str(&ppsDecoder, buffer) == PPS_DECODER_OK) {
- pps_decoder_push(&ppsDecoder, 0);
- const char *ppsBuff;
- if (pps_decoder_get_string(&ppsDecoder, ppsObject, &ppsBuff) == PPS_DECODER_OK) {
- result = ppsBuff;
- } else {
- int val;
- if (pps_decoder_get_int(&ppsDecoder, ppsObject, &val) == PPS_DECODER_OK)
- result = QByteArray::number(val);
- }
- }
-
- pps_decoder_cleanup(&ppsDecoder);
-
- return result;
-}
-#endif // Q_OS_BLACKBERRY
-
Q_DECLARE_METATYPE(QLocale::FormatType)
class tst_QLocale : public QObject
@@ -140,8 +91,12 @@ private slots:
void legacyNames();
void unixLocaleName();
void matchingLocales();
- void double_conversion_data();
- void double_conversion();
+ void stringToDouble_data();
+ void stringToDouble();
+ void doubleToString_data();
+ void doubleToString();
+ void strtod_data();
+ void strtod();
void long_long_conversion_data();
void long_long_conversion();
void long_long_conversion_extra();
@@ -194,10 +149,6 @@ private:
QString m_decimal, m_thousand, m_sdate, m_ldate, m_time;
QString m_sysapp;
bool europeanTimeZone;
-
-#ifdef Q_OS_BLACKBERRY
- int m_languageFd;
-#endif
};
tst_QLocale::tst_QLocale()
@@ -226,19 +177,10 @@ void tst_QLocale::initTestCase()
qPrintable(QDir::toNativeSeparators(m_sysapp)
+ QStringLiteral(" does not exist or is not executable.")));
#endif // QT_NO_PROCESS
-
-#ifdef Q_OS_BLACKBERRY
- if ((m_languageFd = open(ppsLanguageLocalePath, O_RDONLY)) == -1)
- QFAIL("Failed to open language pps.");
-#endif
}
void tst_QLocale::cleanupTestCase()
-{
-#ifdef Q_OS_BLACKBERRY
- close(m_languageFd);
-#endif
-}
+{}
void tst_QLocale::ctor()
{
@@ -372,7 +314,7 @@ void tst_QLocale::ctor()
&& l.country() == QLocale::exp_country, \
QString("requested: \"" + QString(req_lc) + "\", got: " \
+ QLocale::languageToString(l.language()) \
- + "/" + QLocale::countryToString(l.country())).toLatin1().constData()); \
+ + QLatin1Char('/') + QLocale::countryToString(l.country())).toLatin1().constData()); \
QCOMPARE(l, QLocale(QLocale::exp_lang, QLocale::exp_country)); \
QCOMPARE(qHash(l), qHash(QLocale(QLocale::exp_lang, QLocale::exp_country))); \
}
@@ -433,8 +375,8 @@ void tst_QLocale::ctor()
&& l.country() == QLocale::exp_country, \
QString("requested: \"" + QString(req_lc) + "\", got: " \
+ QLocale::languageToString(l.language()) \
- + "/" + QLocale::scriptToString(l.script()) \
- + "/" + QLocale::countryToString(l.country())).toLatin1().constData()); \
+ + QLatin1Char('/') + QLocale::scriptToString(l.script()) \
+ + QLatin1Char('/') + QLocale::countryToString(l.country())).toLatin1().constData()); \
}
TEST_CTOR("zh_CN", Chinese, SimplifiedHanScript, China)
@@ -534,11 +476,6 @@ void tst_QLocale::emptyCtor()
QVERIFY2(runSysApp(m_sysapp, env, &defaultLoc, &errorMessage),
qPrintable(errorMessage));
-#ifdef Q_OS_BLACKBERRY
- QString locale = readPpsValue("_CS_LOCALE", m_languageFd);
- QVERIFY2(runSysApp(m_sysapp, env, &locale, &errorMessage),
- qPrintable(errorMessage));
-#else
TEST_CTOR("C", "C")
TEST_CTOR("bla", "C")
TEST_CTOR("zz", "C")
@@ -576,7 +513,6 @@ void tst_QLocale::emptyCtor()
TEST_CTOR("en/", defaultLoc.toLatin1())
TEST_CTOR("asdfghj", defaultLoc.toLatin1());
TEST_CTOR("123456", defaultLoc.toLatin1());
-#endif // Q_OS_BLACKBERRY
#undef TEST_CTOR
#endif
@@ -608,7 +544,7 @@ void tst_QLocale::legacyNames()
&& l.country() == QLocale::exp_country, \
QString("requested: \"" + QString(req_lc) + "\", got: " \
+ QLocale::languageToString(l.language()) \
- + "/" + QLocale::countryToString(l.country())).toLatin1().constData()); \
+ + QLatin1Char('/') + QLocale::countryToString(l.country())).toLatin1().constData()); \
}
TEST_CTOR("mo_MD", Romanian, Moldova)
@@ -667,7 +603,7 @@ void tst_QLocale::unixLocaleName()
#undef TEST_NAME
}
-void tst_QLocale::double_conversion_data()
+void tst_QLocale::stringToDouble_data()
{
QTest::addColumn<QString>("locale_name");
QTest::addColumn<QString>("num_str");
@@ -789,7 +725,7 @@ void tst_QLocale::double_conversion_data()
QTest::newRow("de_DE 9.876543,0e--2") << QString("de_DE") << QString("9.876543,0e")+QChar(8722)+QString("2") << false << 0.0;
}
-void tst_QLocale::double_conversion()
+void tst_QLocale::stringToDouble()
{
#define MY_DOUBLE_EPSILON (2.22045e-16)
@@ -806,6 +742,11 @@ void tst_QLocale::double_conversion()
double d = locale.toDouble(num_str, &ok);
QCOMPARE(ok, good);
+ char *currentLocale = setlocale(LC_ALL, "de_DE");
+ QCOMPARE(locale.toDouble(num_str, &ok), d); // make sure result is independent of locale
+ QCOMPARE(ok, good);
+ setlocale(LC_ALL, currentLocale);
+
if (ok) {
double diff = d - num;
if (diff < 0)
@@ -824,6 +765,178 @@ void tst_QLocale::double_conversion()
}
}
+void tst_QLocale::doubleToString_data()
+{
+ QTest::addColumn<QString>("locale_name");
+ QTest::addColumn<QString>("num_str");
+ QTest::addColumn<double>("num");
+ QTest::addColumn<char>("mode");
+ QTest::addColumn<int>("precision");
+
+ int shortest = QLocale::FloatingPointShortest;
+
+ QTest::newRow("C 3.4 f 5") << QString("C") << QString("3.40000") << 3.4 << 'f' << 5;
+ QTest::newRow("C 3.4 f 0") << QString("C") << QString("3") << 3.4 << 'f' << 0;
+ QTest::newRow("C 3.4 e 5") << QString("C") << QString("3.40000e+00") << 3.4 << 'e' << 5;
+ QTest::newRow("C 3.4 e 0") << QString("C") << QString("3e+00") << 3.4 << 'e' << 0;
+ QTest::newRow("C 3.4 g 5") << QString("C") << QString("3.4") << 3.4 << 'g' << 5;
+ QTest::newRow("C 3.4 g 1") << QString("C") << QString("3") << 3.4 << 'g' << 1;
+
+ QTest::newRow("C 3.4 f 1") << QString("C") << QString("3.4") << 3.4 << 'f' << 1;
+ QTest::newRow("C 3.4 f -") << QString("C") << QString("3.4") << 3.4 << 'f' << shortest;
+ QTest::newRow("C 3.4 e 1") << QString("C") << QString("3.4e+00") << 3.4 << 'e' << 1;
+ QTest::newRow("C 3.4 e -") << QString("C") << QString("3.4e+00") << 3.4 << 'e' << shortest;
+ QTest::newRow("C 3.4 g 2") << QString("C") << QString("3.4") << 3.4 << 'g' << 2;
+ QTest::newRow("C 3.4 g -") << QString("C") << QString("3.4") << 3.4 << 'g' << shortest;
+
+ 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 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;
+
+ QTest::newRow("C 0.035003945 f 12") << QString("C") << QString("0.035003945000") << 0.035003945 << 'f' << 12;
+ QTest::newRow("C 0.035003945 f 6") << QString("C") << QString("0.035004") << 0.035003945 << 'f' << 6;
+ QTest::newRow("C 0.035003945 e 10") << QString("C") << QString("3.5003945000e-02") << 0.035003945 << 'e' << 10;
+ QTest::newRow("C 0.035003945 e 4") << QString("C") << QString("3.5004e-02") << 0.035003945 << 'e' << 4;
+ QTest::newRow("C 0.035003945 g 11") << QString("C") << QString("0.035003945") << 0.035003945 << 'g' << 11;
+ QTest::newRow("C 0.035003945 g 5") << QString("C") << QString("0.035004") << 0.035003945 << 'g' << 5;
+
+ QTest::newRow("C 0.035003945 f 9") << QString("C") << QString("0.035003945") << 0.035003945 << 'f' << 9;
+ QTest::newRow("C 0.035003945 f -") << QString("C") << QString("0.035003945") << 0.035003945 << 'f' << shortest;
+ QTest::newRow("C 0.035003945 e 7") << QString("C") << QString("3.5003945e-02") << 0.035003945 << 'e' << 7;
+ QTest::newRow("C 0.035003945 e -") << QString("C") << QString("3.5003945e-02") << 0.035003945 << 'e' << shortest;
+ QTest::newRow("C 0.035003945 g 8") << QString("C") << QString("0.035003945") << 0.035003945 << 'g' << 8;
+ QTest::newRow("C 0.035003945 g -") << QString("C") << QString("0.035003945") << 0.035003945 << 'g' << shortest;
+
+ 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 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;
+
+ QTest::newRow("C 0.000003945 f 12") << QString("C") << QString("0.000003945000") << 0.000003945 << 'f' << 12;
+ QTest::newRow("C 0.000003945 f 6") << QString("C") << QString("0.000004") << 0.000003945 << 'f' << 6;
+ QTest::newRow("C 0.000003945 e 6") << QString("C") << QString("3.945000e-06") << 0.000003945 << 'e' << 6;
+ QTest::newRow("C 0.000003945 e 0") << QString("C") << QString("4e-06") << 0.000003945 << 'e' << 0;
+ QTest::newRow("C 0.000003945 g 7") << QString("C") << QString("3.945e-06") << 0.000003945 << 'g' << 7;
+ QTest::newRow("C 0.000003945 g 1") << QString("C") << QString("4e-06") << 0.000003945 << 'g' << 1;
+
+ QTest::newRow("C 0.000003945 f 9") << QString("C") << QString("0.000003945") << 0.000003945 << 'f' << 9;
+ QTest::newRow("C 0.000003945 f -") << QString("C") << QString("0.000003945") << 0.000003945 << 'f' << shortest;
+ QTest::newRow("C 0.000003945 e 3") << QString("C") << QString("3.945e-06") << 0.000003945 << 'e' << 3;
+ QTest::newRow("C 0.000003945 e -") << QString("C") << QString("3.945e-06") << 0.000003945 << 'e' << shortest;
+ QTest::newRow("C 0.000003945 g 4") << QString("C") << QString("3.945e-06") << 0.000003945 << 'g' << 4;
+ QTest::newRow("C 0.000003945 g -") << QString("C") << QString("3.945e-06") << 0.000003945 << 'g' << shortest;
+
+ 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("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;
+ QTest::newRow("C 12456789012 e 7") << QString("C") << QString("1.2456789e+10") << 12456789012.0 << 'e' << 7;
+ QTest::newRow("C 12456789012 g 14") << QString("C") << QString("12456789012") << 12456789012.0 << 'g' << 14;
+ QTest::newRow("C 12456789012 g 8") << QString("C") << QString("1.2456789e+10") << 12456789012.0 << 'g' << 8;
+
+ QTest::newRow("C 12456789012 f 0") << QString("C") << QString("12456789012") << 12456789012.0 << 'f' << 0;
+ QTest::newRow("C 12456789012 f -") << QString("C") << QString("12456789012") << 12456789012.0 << 'f' << shortest;
+ QTest::newRow("C 12456789012 e 10") << QString("C") << QString("1.2456789012e+10") << 12456789012.0 << 'e' << 10;
+ QTest::newRow("C 12456789012 e -") << QString("C") << QString("1.2456789012e+10") << 12456789012.0 << 'e' << shortest;
+ QTest::newRow("C 12456789012 g 11") << QString("C") << QString("12456789012") << 12456789012.0 << 'g' << 11;
+ QTest::newRow("C 12456789012 g -") << QString("C") << QString("12456789012") << 12456789012.0 << 'g' << shortest;
+
+ 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 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;
+}
+
+void tst_QLocale::doubleToString()
+{
+ QFETCH(QString, locale_name);
+ QFETCH(QString, num_str);
+ QFETCH(double, num);
+ QFETCH(char, mode);
+ QFETCH(int, precision);
+
+#ifdef QT_NO_DOUBLECONVERSION
+ if (precision == QLocale::FloatingPointShortest)
+ QSKIP("'Shortest' double conversion is not that short without libdouble-conversion");
+#endif
+
+ const QLocale locale(locale_name);
+ QCOMPARE(locale.toString(num, mode, precision), num_str);
+
+ char *currentLocale = setlocale(LC_ALL, "de_DE");
+ QCOMPARE(locale.toString(num, mode, precision), num_str);
+ setlocale(LC_ALL, currentLocale);
+}
+
+void tst_QLocale::strtod_data()
+{
+ QTest::addColumn<QString>("num_str");
+ QTest::addColumn<double>("num");
+ QTest::addColumn<int>("processed");
+ QTest::addColumn<bool>("ok");
+
+ QTest::newRow("3.4") << QString("3.4") << 3.4 << 3 << true;
+ QTest::newRow("0.035003945") << QString("0.035003945") << 0.035003945 << 11 << true;
+ QTest::newRow("3.5003945e-2") << QString("3.5003945e-2") << 0.035003945 << 12 << true;
+ QTest::newRow("0.000003945") << QString("0.000003945") << 0.000003945 << 11 << true;
+ QTest::newRow("3.945e-6") << QString("3.945e-6") << 0.000003945 << 8 << true;
+ QTest::newRow("12456789012") << QString("12456789012") << 12456789012.0 << 11 << true;
+ QTest::newRow("1.2456789012e10") << QString("1.2456789012e10") << 12456789012.0 << 15 << true;
+
+ QTest::newRow("a3.4") << QString("a3.4") << 0.0 << 0 << false;
+ QTest::newRow("b0.035003945") << QString("b0.035003945") << 0.0 << 0 << false;
+ QTest::newRow("c3.5003945e-2") << QString("c3.5003945e-2") << 0.0 << 0 << false;
+ QTest::newRow("d0.000003945") << QString("d0.000003945") << 0.0 << 0 << false;
+ QTest::newRow("e3.945e-6") << QString("e3.945e-6") << 0.0 << 0 << false;
+ QTest::newRow("f12456789012") << QString("f12456789012") << 0.0 << 0 << false;
+ QTest::newRow("g1.2456789012e10") << QString("g1.2456789012e10") << 0.0 << 0 << false;
+
+ QTest::newRow("3.4a") << QString("3.4a") << 3.4 << 3 << true;
+ QTest::newRow("0.035003945b") << QString("0.035003945b") << 0.035003945 << 11 << true;
+ QTest::newRow("3.5003945e-2c") << QString("3.5003945e-2c") << 0.035003945 << 12 << true;
+ QTest::newRow("0.000003945d") << QString("0.000003945d") << 0.000003945 << 11 << true;
+ QTest::newRow("3.945e-6e") << QString("3.945e-6e") << 0.000003945 << 8 << true;
+ QTest::newRow("12456789012f") << QString("12456789012f") << 12456789012.0 << 11 << true;
+ QTest::newRow("1.2456789012e10g") << QString("1.2456789012e10g") << 12456789012.0 << 15 << true;
+
+ QTest::newRow("0x3.4") << QString("0x3.4") << 0.0 << 1 << true;
+ QTest::newRow("0x0.035003945") << QString("0x0.035003945") << 0.0 << 1 << true;
+ QTest::newRow("0x3.5003945e-2") << QString("0x3.5003945e-2") << 0.0 << 1 << true;
+ QTest::newRow("0x0.000003945") << QString("0x0.000003945") << 0.0 << 1 << true;
+ QTest::newRow("0x3.945e-6") << QString("0x3.945e-6") << 0.0 << 1 << true;
+ QTest::newRow("0x12456789012") << QString("0x12456789012") << 0.0 << 1 << true;
+ QTest::newRow("0x1.2456789012e10") << QString("0x1.2456789012e10") << 0.0 << 1 << true;
+}
+
+void tst_QLocale::strtod()
+{
+ QFETCH(QString, num_str);
+ QFETCH(double, num);
+ QFETCH(int, processed);
+ QFETCH(bool, ok);
+
+ QByteArray numData = num_str.toLatin1();
+ const char *end = 0;
+ bool actualOk = false;
+ double result = qstrtod(numData.constData(), &end, &actualOk);
+
+ QCOMPARE(result, num);
+ QCOMPARE(actualOk, ok);
+ QCOMPARE(static_cast<int>(end - numData.constData()), processed);
+}
+
void tst_QLocale::long_long_conversion_data()
{
QTest::addColumn<QString>("locale_name");
@@ -955,7 +1068,8 @@ void tst_QLocale::fpExceptions()
#define _EM_INEXACT 0x00000001
#endif
- // check that qdtoa doesn't throw floating point exceptions when they are enabled
+ // check that double-to-string conversion doesn't throw floating point exceptions when they are
+ // enabled
#ifdef Q_OS_WIN
unsigned int oldbits = _control87(0, 0);
_control87( 0 | _EM_INEXACT, _MCW_EM );
@@ -1281,13 +1395,13 @@ void tst_QLocale::formatTimeZone()
QLocale enUS("en_US");
QDateTime dt1(QDate(2013, 1, 1), QTime(1, 0, 0), Qt::OffsetFromUTC, 60 * 60);
- QCOMPARE(enUS.toString(dt1, "t"), QString("UTC+01:00"));
+ QCOMPARE(enUS.toString(dt1, "t"), QLatin1String("UTC+01:00"));
QDateTime dt2(QDate(2013, 1, 1), QTime(1, 0, 0), Qt::OffsetFromUTC, -60 * 60);
- QCOMPARE(enUS.toString(dt2, "t"), QString("UTC-01:00"));
+ QCOMPARE(enUS.toString(dt2, "t"), QLatin1String("UTC-01:00"));
QDateTime dt3(QDate(2013, 1, 1), QTime(0, 0, 0), Qt::UTC);
- QCOMPARE(enUS.toString(dt3, "t"), QString("UTC"));
+ QCOMPARE(enUS.toString(dt3, "t"), QLatin1String("UTC"));
// LocalTime should vary
if (europeanTimeZone) {
@@ -1296,14 +1410,14 @@ void tst_QLocale::formatTimeZone()
#ifdef Q_OS_WIN
QEXPECT_FAIL("", "Windows only returns long name (QTBUG-32759)", Continue);
#endif // Q_OS_WIN
- QCOMPARE(enUS.toString(dt4, "t"), QString("CET"));
+ QCOMPARE(enUS.toString(dt4, "t"), QLatin1String("CET"));
// Time definitely in Daylight Time
QDateTime dt5(QDate(2013, 6, 1), QTime(0, 0, 0), Qt::LocalTime);
#ifdef Q_OS_WIN
QEXPECT_FAIL("", "Windows only returns long name (QTBUG-32759)", Continue);
#endif // Q_OS_WIN
- QCOMPARE(enUS.toString(dt5, "t"), QString("CEST"));
+ QCOMPARE(enUS.toString(dt5, "t"), QLatin1String("CEST"));
} else {
QSKIP("You must test using Central European (CET/CEST) time zone, e.g. TZ=Europe/Oslo");
}
@@ -1312,13 +1426,13 @@ void tst_QLocale::formatTimeZone()
#ifdef Q_OS_WIN
QEXPECT_FAIL("", "QTimeZone windows backend only returns long name", Continue);
#endif
- QCOMPARE(enUS.toString(dt6, "t"), QString("CET"));
+ QCOMPARE(enUS.toString(dt6, "t"), QLatin1String("CET"));
QDateTime dt7(QDate(2013, 6, 1), QTime(0, 0, 0), QTimeZone("Europe/Berlin"));
#ifdef Q_OS_WIN
QEXPECT_FAIL("", "QTimeZone windows backend only returns long name", Continue);
#endif
- QCOMPARE(enUS.toString(dt7, "t"), QString("CEST"));
+ QCOMPARE(enUS.toString(dt7, "t"), QLatin1String("CEST"));
// Current datetime should return current abbreviation
QCOMPARE(enUS.toString(QDateTime::currentDateTime(), "t"),
@@ -1464,9 +1578,9 @@ void tst_QLocale::macDefaultLocale()
if (timeString.contains(QString("GMT"))) {
QString expectedGMTSpecifierBase("GMT");
if (diff >= 0)
- expectedGMTSpecifierBase.append("+");
+ expectedGMTSpecifierBase.append(QLatin1Char('+'));
else
- expectedGMTSpecifierBase.append("-");
+ expectedGMTSpecifierBase.append(QLatin1Char('-'));
QString expectedGMTSpecifier = expectedGMTSpecifierBase + QString("%1").arg(qAbs(diff));
QString expectedGMTSpecifierZeroExtended = expectedGMTSpecifierBase + QString("0%1").arg(qAbs(diff));
@@ -1642,6 +1756,20 @@ void tst_QLocale::numberOptions()
QLocale locale2 = locale;
QCOMPARE(locale2.numberOptions(), QLocale::RejectGroupSeparator);
+
+ QCOMPARE(locale.toString(12.4, 'e', 2), QString("1.24e+01"));
+ locale.setNumberOptions(QLocale::OmitLeadingZeroInExponent);
+ QCOMPARE(locale.numberOptions(), QLocale::OmitLeadingZeroInExponent);
+ QCOMPARE(locale.toString(12.4, 'e', 2), QString("1.24e+1"));
+
+ locale.toDouble(QString("1.24e+01"), &ok);
+ QVERIFY(ok);
+ locale.setNumberOptions(QLocale::RejectLeadingZeroInExponent);
+ QCOMPARE(locale.numberOptions(), QLocale::RejectLeadingZeroInExponent);
+ locale.toDouble(QString("1.24e+1"), &ok);
+ QVERIFY(ok);
+ locale.toDouble(QString("1.24e+01"), &ok);
+ QVERIFY(!ok);
}
void tst_QLocale::negativeNumbers()
@@ -1701,9 +1829,11 @@ void tst_QLocale::testNames_data()
for (int i = 0; i < locale_data_count; ++i) {
const QLocaleData &item = locale_data[i];
- const QString testName = QString::fromLatin1("data_%1 (%2/%3)").arg(i)
- .arg(QLocale::languageToString((QLocale::Language)item.m_language_id))
- .arg(QLocale::countryToString((QLocale::Country)item.m_country_id));
+
+ const QString testName = QLatin1String("data_") + QString::number(i) + QLatin1String(" (")
+ + QLocale::languageToString((QLocale::Language)item.m_language_id)
+ + QLatin1Char('/') + QLocale::countryToString((QLocale::Country)item.m_country_id)
+ + QLatin1Char(')');
QTest::newRow(testName.toLatin1().constData()) << (int)item.m_language_id << (int)item.m_country_id;
}
}
@@ -1809,8 +1939,8 @@ void tst_QLocale::standaloneDayName_data()
QTest::newRow("C short") << QString("C") << QString("Sun") << 7 << QLocale::ShortFormat;
QTest::newRow("C narrow") << QString("C") << QString("S") << 7 << QLocale::NarrowFormat;
- QTest::newRow("ru_RU long") << QString("ru_RU") << QString::fromUtf8("\320\222\320\276\321\201\320\272\321\200\320\265\321\201\320\265\320\275\321\214\320\265") << 7 << QLocale::LongFormat;
- QTest::newRow("ru_RU short") << QString("ru_RU") << QString::fromUtf8("\320\222\321\201") << 7 << QLocale::ShortFormat;
+ QTest::newRow("ru_RU long") << QString("ru_RU") << QString::fromUtf8("\320\262\320\276\321\201\320\272\321\200\320\265\321\201\320\265\320\275\321\214\320\265") << 7 << QLocale::LongFormat;
+ QTest::newRow("ru_RU short") << QString("ru_RU") << QString::fromUtf8("\320\262\321\201") << 7 << QLocale::ShortFormat;
QTest::newRow("ru_RU narrow") << QString("ru_RU") << QString::fromUtf8("\320\222") << 7 << QLocale::NarrowFormat;
}
@@ -1831,13 +1961,27 @@ void tst_QLocale::underflowOverflow()
a(QLatin1String("0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e10"));
bool ok = false;
- a.toDouble(&ok);
+ double d = a.toDouble(&ok);
QVERIFY(!ok);
+ QCOMPARE(d, 0.0);
a = QLatin1String("1e600");
ok = false;
- a.toDouble(&ok);
+ d = a.toDouble(&ok);
+ QVERIFY(!ok); // detectable overflow
+ QVERIFY(qIsInf(d));
+
+ a = QLatin1String("-1e600");
+ ok = false;
+ d = a.toDouble(&ok);
+ QVERIFY(!ok); // detectable underflow
+ QVERIFY(qIsInf(-d));
+
+ a = QLatin1String("1e-600");
+ ok = false;
+ d = a.toDouble(&ok);
QVERIFY(!ok);
+ QCOMPARE(d, 0.0);
a = QLatin1String("-9223372036854775809");
a.toLongLong(&ok);
@@ -2041,18 +2185,24 @@ void tst_QLocale::currency()
QCOMPARE(c.toCurrencyString(qlonglong(-1234)), QString("-1234"));
QCOMPARE(c.toCurrencyString(double(1234.56)), QString("1234.56"));
QCOMPARE(c.toCurrencyString(double(-1234.56)), QString("-1234.56"));
+ QCOMPARE(c.toCurrencyString(double(-1234.5678)), QString("-1234.57"));
+ QCOMPARE(c.toCurrencyString(double(-1234.5678), NULL, 4), QString("-1234.5678"));
+ QCOMPARE(c.toCurrencyString(double(-1234.56), NULL, 4), QString("-1234.5600"));
const QLocale en_US("en_US");
QCOMPARE(en_US.toCurrencyString(qulonglong(1234)), QString("$1,234"));
QCOMPARE(en_US.toCurrencyString(qlonglong(-1234)), QString("$-1,234"));
QCOMPARE(en_US.toCurrencyString(double(1234.56)), QString("$1,234.56"));
QCOMPARE(en_US.toCurrencyString(double(-1234.56)), QString("$-1,234.56"));
+ QCOMPARE(en_US.toCurrencyString(double(-1234.5678)), QString("$-1,234.57"));
+ QCOMPARE(en_US.toCurrencyString(double(-1234.5678), NULL, 4), QString("$-1,234.5678"));
+ QCOMPARE(en_US.toCurrencyString(double(-1234.56), NULL, 4), QString("$-1,234.5600"));
const QLocale ru_RU("ru_RU");
- QCOMPARE(ru_RU.toCurrencyString(qulonglong(1234)), QString::fromUtf8("1" "\xc2\xa0" "234\xc2\xa0\xd1\x80\xd1\x83\xd0\xb1."));
- QCOMPARE(ru_RU.toCurrencyString(qlonglong(-1234)), QString::fromUtf8("-1" "\xc2\xa0" "234\xc2\xa0\xd1\x80\xd1\x83\xd0\xb1."));
- QCOMPARE(ru_RU.toCurrencyString(double(1234.56)), QString::fromUtf8("1" "\xc2\xa0" "234,56\xc2\xa0\xd1\x80\xd1\x83\xd0\xb1."));
- QCOMPARE(ru_RU.toCurrencyString(double(-1234.56)), QString::fromUtf8("-1" "\xc2\xa0" "234,56\xc2\xa0\xd1\x80\xd1\x83\xd0\xb1."));
+ QCOMPARE(ru_RU.toCurrencyString(qulonglong(1234)), QString::fromUtf8("1" "\xc2\xa0" "234\xc2\xa0\xe2\x82\xbd"));
+ QCOMPARE(ru_RU.toCurrencyString(qlonglong(-1234)), QString::fromUtf8("-1" "\xc2\xa0" "234\xc2\xa0\xe2\x82\xbd"));
+ QCOMPARE(ru_RU.toCurrencyString(double(1234.56)), QString::fromUtf8("1" "\xc2\xa0" "234,56\xc2\xa0\xe2\x82\xbd"));
+ QCOMPARE(ru_RU.toCurrencyString(double(-1234.56)), QString::fromUtf8("-1" "\xc2\xa0" "234,56\xc2\xa0\xe2\x82\xbd"));
const QLocale de_DE("de_DE");
QCOMPARE(de_DE.toCurrencyString(qulonglong(1234)), QString::fromUtf8("1.234\xc2\xa0\xe2\x82\xac"));
@@ -2212,14 +2362,20 @@ void tst_QLocale::textDirection_data()
case QLocale::CentralKurdish:
case QLocale::ClassicalMandaic:
case QLocale::Divehi:
+// case QLocale::Fulah:
+// case QLocale::Hausa:
case QLocale::Hebrew:
+// case QLocale::Hungarian:
case QLocale::Kashmiri:
+// case QLocale::Kurdish:
case QLocale::Lydian:
case QLocale::Mandingo:
case QLocale::ManichaeanMiddlePersian:
+ case QLocale::Mazanderani:
case QLocale::Mende:
case QLocale::Meroitic:
case QLocale::Nko:
+ case QLocale::NorthernLuri:
case QLocale::OldTurkish:
case QLocale::Pahlavi:
case QLocale::Parthian:
@@ -2233,6 +2389,7 @@ void tst_QLocale::textDirection_data()
case QLocale::Syriac:
case QLocale::Uighur:
case QLocale::Urdu:
+ case QLocale::Yiddish:
rightToLeft = QLocale(QLocale::Language(language)).language() == QLocale::Language(language); // false if there is no locale data for language
break;
default:
diff --git a/tests/auto/corelib/tools/qmap/qmap.pro b/tests/auto/corelib/tools/qmap/qmap.pro
index 460b6654fb..27820a76c8 100644
--- a/tests/auto/corelib/tools/qmap/qmap.pro
+++ b/tests/auto/corelib/tools/qmap/qmap.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmap
QT = core testlib
SOURCES = $$PWD/tst_qmap.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index 1fb9dc6d7d..8aa7a3e518 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -413,24 +408,24 @@ void tst_QMap::key()
QCOMPARE(map1.key(1, def), def);
map1.insert("one", 1);
- QCOMPARE(map1.key(1), QString("one"));
- QCOMPARE(map1.key(1, def), QString("one"));
+ QCOMPARE(map1.key(1), QLatin1String("one"));
+ QCOMPARE(map1.key(1, def), QLatin1String("one"));
QCOMPARE(map1.key(2), QString());
QCOMPARE(map1.key(2, def), def);
map1.insert("two", 2);
- QCOMPARE(map1.key(1), QString("one"));
- QCOMPARE(map1.key(1, def), QString("one"));
- QCOMPARE(map1.key(2), QString("two"));
- QCOMPARE(map1.key(2, def), QString("two"));
+ QCOMPARE(map1.key(1), QLatin1String("one"));
+ QCOMPARE(map1.key(1, def), QLatin1String("one"));
+ QCOMPARE(map1.key(2), QLatin1String("two"));
+ QCOMPARE(map1.key(2, def), QLatin1String("two"));
QCOMPARE(map1.key(3), QString());
QCOMPARE(map1.key(3, def), def);
map1.insert("deux", 2);
- QCOMPARE(map1.key(1), QString("one"));
- QCOMPARE(map1.key(1, def), QString("one"));
- QVERIFY(map1.key(2) == "deux" || map1.key(2) == "two");
- QVERIFY(map1.key(2, def) == "deux" || map1.key(2, def) == "two");
+ QCOMPARE(map1.key(1), QLatin1String("one"));
+ QCOMPARE(map1.key(1, def), QLatin1String("one"));
+ QVERIFY(map1.key(2) == QLatin1String("deux") || map1.key(2) == QLatin1String("two"));
+ QVERIFY(map1.key(2, def) == QLatin1String("deux") || map1.key(2, def) == QLatin1String("two"));
QCOMPARE(map1.key(3), QString());
QCOMPARE(map1.key(3, def), def);
}
@@ -608,8 +603,8 @@ void tst_QMap::find()
map1.insert(1,"Mayer");
map1.insert(2,"Hej");
- QVERIFY(map1.find(1).value() == "Mayer");
- QVERIFY(map1.find(2).value() == "Hej");
+ QCOMPARE(map1.find(1).value(), QLatin1String("Mayer"));
+ QCOMPARE(map1.find(2).value(), QLatin1String("Hej"));
for(i = 3; i < 10; ++i) {
compareString = testString.arg(i);
@@ -643,8 +638,8 @@ void tst_QMap::constFind()
QVERIFY(map1.constFind(4) == map1.constEnd());
- QVERIFY(map1.constFind(1).value() == "Mayer");
- QVERIFY(map1.constFind(2).value() == "Hej");
+ QCOMPARE(map1.constFind(1).value(), QLatin1String("Mayer"));
+ QCOMPARE(map1.constFind(2).value(), QLatin1String("Hej"));
for(i = 3; i < 10; ++i) {
compareString = testString.arg(i);
@@ -705,10 +700,10 @@ void tst_QMap::lowerUpperBound()
QCOMPARE(map1.lowerBound(5).key(), 5);
QCOMPARE(map1.lowerBound(6).key(), 7);
QCOMPARE(map1.lowerBound(7).key(), 7);
- QCOMPARE(map1.lowerBound(6).value(), QString("seven_2"));
- QCOMPARE(map1.lowerBound(7).value(), QString("seven_2"));
- QCOMPARE((++map1.lowerBound(6)).value(), QString("seven"));
- QCOMPARE((++map1.lowerBound(7)).value(), QString("seven"));
+ QCOMPARE(map1.lowerBound(6).value(), QLatin1String("seven_2"));
+ QCOMPARE(map1.lowerBound(7).value(), QLatin1String("seven_2"));
+ QCOMPARE((++map1.lowerBound(6)).value(), QLatin1String("seven"));
+ QCOMPARE((++map1.lowerBound(7)).value(), QLatin1String("seven"));
QCOMPARE(map1.lowerBound(10).key(), 10);
QVERIFY(map1.lowerBound(999) == map1.end());
}
@@ -733,11 +728,11 @@ void tst_QMap::mergeCompare()
map1b.unite(map2b);
sanityCheckTree(map1b, __LINE__);
- QVERIFY(map1.value(1) == "ett");
- QVERIFY(map1.value(2) == "tvo");
- QVERIFY(map1.value(3) == "tre");
- QVERIFY(map1.value(4) == "fyra");
- QVERIFY(map1.value(5) == "fem");
+ QCOMPARE(map1.value(1), QLatin1String("ett"));
+ QCOMPARE(map1.value(2), QLatin1String("tvo"));
+ QCOMPARE(map1.value(3), QLatin1String("tre"));
+ QCOMPARE(map1.value(4), QLatin1String("fyra"));
+ QCOMPARE(map1.value(5), QLatin1String("fem"));
map3.insert(1, "ett");
map3.insert(2, "tvo");
@@ -755,7 +750,7 @@ void tst_QMap::take()
map.insert(2, "zwei");
map.insert(3, "drei");
- QVERIFY(map.take(3) == "drei");
+ QCOMPARE(map.take(3), QLatin1String("drei"));
QVERIFY(!map.contains(3));
}
@@ -771,19 +766,19 @@ void tst_QMap::iterators()
//STL-Style iterators
QMap<int, QString>::iterator stlIt = map.begin();
- QVERIFY(stlIt.value() == "Teststring 1");
+ QCOMPARE(stlIt.value(), QLatin1String("Teststring 1"));
stlIt+=5;
- QVERIFY(stlIt.value() == "Teststring 6");
+ QCOMPARE(stlIt.value(), QLatin1String("Teststring 6"));
stlIt++;
- QVERIFY(stlIt.value() == "Teststring 7");
+ QCOMPARE(stlIt.value(), QLatin1String("Teststring 7"));
stlIt-=3;
- QVERIFY(stlIt.value() == "Teststring 4");
+ QCOMPARE(stlIt.value(), QLatin1String("Teststring 4"));
stlIt--;
- QVERIFY(stlIt.value() == "Teststring 3");
+ QCOMPARE(stlIt.value(), QLatin1String("Teststring 3"));
for(stlIt = map.begin(), i = 1; stlIt != map.end(); ++stlIt, ++i)
QVERIFY(stlIt.value() == testString.arg(i));
@@ -792,19 +787,19 @@ void tst_QMap::iterators()
//STL-Style const-iterators
QMap<int, QString>::const_iterator cstlIt = map.constBegin();
- QVERIFY(cstlIt.value() == "Teststring 1");
+ QCOMPARE(cstlIt.value(), QLatin1String("Teststring 1"));
cstlIt+=5;
- QVERIFY(cstlIt.value() == "Teststring 6");
+ QCOMPARE(cstlIt.value(), QLatin1String("Teststring 6"));
cstlIt++;
- QVERIFY(cstlIt.value() == "Teststring 7");
+ QCOMPARE(cstlIt.value(), QLatin1String("Teststring 7"));
cstlIt-=3;
- QVERIFY(cstlIt.value() == "Teststring 4");
+ QCOMPARE(cstlIt.value(), QLatin1String("Teststring 4"));
cstlIt--;
- QVERIFY(cstlIt.value() == "Teststring 3");
+ QCOMPARE(cstlIt.value(), QLatin1String("Teststring 3"));
for(cstlIt = map.constBegin(), i = 1; cstlIt != map.constEnd(); ++cstlIt, ++i)
QVERIFY(cstlIt.value() == testString.arg(i));
@@ -1062,7 +1057,7 @@ void tst_QMap::equal_range()
QCOMPARE(cresult.second, cmap.cend());
for (int i = -10; i < 10; i += 2)
- map.insert(i, QString("%1").arg(i));
+ map.insert(i, QString::number(i));
result = map.equal_range(0);
QCOMPARE(result.first, map.find(0));
diff --git a/tests/auto/corelib/tools/qmargins/qmargins.pro b/tests/auto/corelib/tools/qmargins/qmargins.pro
index 25fe715edf..696f9374a2 100644
--- a/tests/auto/corelib/tools/qmargins/qmargins.pro
+++ b/tests/auto/corelib/tools/qmargins/qmargins.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmargins
QT = core testlib
SOURCES = tst_qmargins.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
index 1233382f5c..2a35162ef0 100644
--- a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
+++ b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qmessageauthenticationcode/qmessageauthenticationcode.pro b/tests/auto/corelib/tools/qmessageauthenticationcode/qmessageauthenticationcode.pro
index afd0c1176d..a62b702f22 100644
--- a/tests/auto/corelib/tools/qmessageauthenticationcode/qmessageauthenticationcode.pro
+++ b/tests/auto/corelib/tools/qmessageauthenticationcode/qmessageauthenticationcode.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qmessageauthenticationcode
QT = core testlib
SOURCES = tst_qmessageauthenticationcode.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp b/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp
index 32a0d80282..2f8052fd4a 100644
--- a/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp
+++ b/tests/auto/corelib/tools/qmessageauthenticationcode/tst_qmessageauthenticationcode.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2013 Ruslan Nigmatullin <euroelessar@yandex.ru>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qpair/qpair.pro b/tests/auto/corelib/tools/qpair/qpair.pro
index c49215cb1c..659be887d3 100644
--- a/tests/auto/corelib/tools/qpair/qpair.pro
+++ b/tests/auto/corelib/tools/qpair/qpair.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qpair
QT = core testlib
SOURCES = tst_qpair.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qpair/tst_qpair.cpp b/tests/auto/corelib/tools/qpair/tst_qpair.cpp
index 94740d74bc..1d5f7536c8 100644
--- a/tests/auto/corelib/tools/qpair/tst_qpair.cpp
+++ b/tests/auto/corelib/tools/qpair/tst_qpair.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -42,6 +37,8 @@ class tst_QPair : public QObject
private Q_SLOTS:
void pairOfReferences();
void testConstexpr();
+ void testConversions();
+ void taskQTBUG_48780_pairContainingCArray();
};
class C { char _[4]; };
@@ -138,5 +135,72 @@ void tst_QPair::testConstexpr()
Q_UNUSED(pSI);
}
+void tst_QPair::testConversions()
+{
+ // construction from lvalue:
+ {
+ const QPair<int, double> rhs(42, 4.5);
+ const QPair<int, int> pii = rhs;
+ QCOMPARE(pii.first, 42);
+ QCOMPARE(pii.second, 4);
+
+ const QPair<int, float> pif = rhs;
+ QCOMPARE(pif.first, 42);
+ QCOMPARE(pif.second, 4.5f);
+ }
+
+ // assignment from lvalue:
+ {
+ const QPair<int, double> rhs(42, 4.5);
+ QPair<int, int> pii;
+ pii = rhs;
+ QCOMPARE(pii.first, 42);
+ QCOMPARE(pii.second, 4);
+
+ QPair<int, float> pif;
+ pif = rhs;
+ QCOMPARE(pif.first, 42);
+ QCOMPARE(pif.second, 4.5f);
+ }
+
+ // construction from rvalue:
+ {
+#define rhs qMakePair(42, 4.5)
+ const QPair<int, int> pii = rhs;
+ QCOMPARE(pii.first, 42);
+ QCOMPARE(pii.second, 4);
+
+ const QPair<int, float> pif = rhs;
+ QCOMPARE(pif.first, 42);
+ QCOMPARE(pif.second, 4.5f);
+#undef rhs
+ }
+
+ // assignment from rvalue:
+ {
+#define rhs qMakePair(42, 4.5)
+ QPair<int, int> pii;
+ pii = rhs;
+ QCOMPARE(pii.first, 42);
+ QCOMPARE(pii.second, 4);
+
+ QPair<int, float> pif;
+ pif = rhs;
+ QCOMPARE(pif.first, 42);
+ QCOMPARE(pif.second, 4.5f);
+#undef rhs
+ }
+}
+
+void tst_QPair::taskQTBUG_48780_pairContainingCArray()
+{
+ // compile-only:
+ QPair<int[2], int> pair;
+ pair.first[0] = 0;
+ pair.first[1] = 1;
+ pair.second = 2;
+ Q_UNUSED(pair);
+}
+
QTEST_APPLESS_MAIN(tst_QPair)
#include "tst_qpair.moc"
diff --git a/tests/auto/corelib/tools/qpoint/qpoint.pro b/tests/auto/corelib/tools/qpoint/qpoint.pro
index 0923abbc88..8321d08fe0 100644
--- a/tests/auto/corelib/tools/qpoint/qpoint.pro
+++ b/tests/auto/corelib/tools/qpoint/qpoint.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qpoint
QT = core testlib
SOURCES = tst_qpoint.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
index 904ceb7d35..8e184f3ef3 100644
--- a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
+++ b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qpointf/qpointf.pro b/tests/auto/corelib/tools/qpointf/qpointf.pro
index 1c594cd47c..5715b95d96 100644
--- a/tests/auto/corelib/tools/qpointf/qpointf.pro
+++ b/tests/auto/corelib/tools/qpointf/qpointf.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qpointf
QT = core testlib
SOURCES = tst_qpointf.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp b/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp
index ff58c9b181..17a43af58c 100644
--- a/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp
+++ b/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qqueue/qqueue.pro b/tests/auto/corelib/tools/qqueue/qqueue.pro
index 7b1e28baf3..55ceb65fbd 100644
--- a/tests/auto/corelib/tools/qqueue/qqueue.pro
+++ b/tests/auto/corelib/tools/qqueue/qqueue.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qqueue
QT = core testlib
SOURCES = tst_qqueue.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
index a67c46dad7..6c391bd764 100644
--- a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
+++ b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qrect/qrect.pro b/tests/auto/corelib/tools/qrect/qrect.pro
index 06fe15b0d6..8ec31db215 100644
--- a/tests/auto/corelib/tools/qrect/qrect.pro
+++ b/tests/auto/corelib/tools/qrect/qrect.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qrect
QT = core testlib
SOURCES = tst_qrect.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
index 1377e801a7..d3c6412b0d 100644
--- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp
+++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -132,6 +127,9 @@ private slots:
void translate_data();
void translate();
+ void transposed_data();
+ void transposed();
+
void moveTop();
void moveBottom();
void moveLeft();
@@ -3566,6 +3564,41 @@ void tst_QRect::translate()
}
+void tst_QRect::transposed_data()
+{
+ QTest::addColumn<QRect>("r");
+
+ QTest::newRow("InvalidQRect") << getQRectCase(InvalidQRect);
+ QTest::newRow("SmallestQRect") << getQRectCase(SmallestQRect);
+ QTest::newRow("MiddleQRect") << getQRectCase(MiddleQRect);
+ QTest::newRow("LargestQRect") << getQRectCase(LargestQRect);
+ QTest::newRow("SmallestCoordQRect") << getQRectCase(SmallestCoordQRect);
+ QTest::newRow("LargestCoordQRect") << getQRectCase(LargestCoordQRect);
+ QTest::newRow("RandomQRect") << getQRectCase(RandomQRect);
+ QTest::newRow("NegativeSizeQRect") << getQRectCase(NegativeSizeQRect);
+ QTest::newRow("NegativePointQRect") << getQRectCase(NegativePointQRect);
+ QTest::newRow("NullQRect") << getQRectCase(NullQRect);
+ QTest::newRow("EmptyQRect") << getQRectCase(EmptyQRect);
+}
+
+void tst_QRect::transposed()
+{
+ QFETCH(QRect, r);
+
+ const QRect rt = r.transposed();
+ QCOMPARE(rt.height(), r.width());
+ QCOMPARE(rt.width(), r.height());
+ QCOMPARE(rt.topLeft(), r.topLeft());
+
+ const QRectF rf = r;
+
+ const QRectF rtf = rf.transposed();
+ QCOMPARE(rtf.height(), rf.width());
+ QCOMPARE(rtf.width(), rf.height());
+ QCOMPARE(rtf.topLeft(), rf.topLeft());
+
+ QCOMPARE(rtf, QRectF(rt));
+}
void tst_QRect::moveTop()
{
diff --git a/tests/auto/corelib/tools/qregexp/qregexp.pro b/tests/auto/corelib/tools/qregexp/qregexp.pro
index d8f67eed25..5f6ff0a71c 100644
--- a/tests/auto/corelib/tools/qregexp/qregexp.pro
+++ b/tests/auto/corelib/tools/qregexp/qregexp.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qregexp
QT = core testlib
SOURCES = tst_qregexp.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index b9a3fc13c5..2f285f3393 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -880,19 +875,19 @@ void tst_QRegExp::caretAnchoredOptimization()
{
QString s = "---babnana----";
s.replace( QRegExp("^-*|(-*)$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
s.replace( QRegExp("^-*|(-{0,})$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
s.replace( QRegExp("^-*|(-{1,})$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
s.replace( QRegExp("^-*|(-+)$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
}
void tst_QRegExp::isEmpty()
@@ -1370,12 +1365,14 @@ void tst_QRegExp::escapeSequences()
{
QString perlSyntaxSpecialChars("0123456789afnrtvbBdDwWsSx\\|[]{}()^$?+*");
QString w3cXmlSchema11SyntaxSpecialChars("cCiIpP"); // as well as the perl ones
+ QString pattern = QLatin1String("\\?");
for (int i = ' '; i <= 127; ++i) {
QLatin1Char c(i);
if (perlSyntaxSpecialChars.indexOf(c) == -1) {
- QRegExp rx(QString("\\%1").arg(c), Qt::CaseSensitive, QRegExp::RegExp);
+ pattern[1] = c;
+ QRegExp rx(pattern, Qt::CaseSensitive, QRegExp::RegExp);
// we'll never have c == 'a' since it's a special character
- QString s = QString("aaa%1aaa").arg(c);
+ const QString s = QLatin1String("aaa") + c + QLatin1String("aaa");
QCOMPARE(rx.indexIn(s), 3);
rx.setPatternSyntax(QRegExp::RegExp2);
diff --git a/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/alwaysoptimize.pro b/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/alwaysoptimize.pro
index 3ecf16918c..a27286ff20 100644
--- a/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/alwaysoptimize.pro
+++ b/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/alwaysoptimize.pro
@@ -1,8 +1,7 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qregularexpression_alwaysoptimize
QT = core testlib
HEADERS = ../tst_qregularexpression.h
SOURCES = \
tst_qregularexpression_alwaysoptimize.cpp \
../tst_qregularexpression.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/tst_qregularexpression_alwaysoptimize.cpp b/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/tst_qregularexpression_alwaysoptimize.cpp
index 476b9bc1f0..6d2ae48235 100644
--- a/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/tst_qregularexpression_alwaysoptimize.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/alwaysoptimize/tst_qregularexpression_alwaysoptimize.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qregularexpression/defaultoptimize/defaultoptimize.pro b/tests/auto/corelib/tools/qregularexpression/defaultoptimize/defaultoptimize.pro
index 9e366c0f48..0b36c79c1b 100644
--- a/tests/auto/corelib/tools/qregularexpression/defaultoptimize/defaultoptimize.pro
+++ b/tests/auto/corelib/tools/qregularexpression/defaultoptimize/defaultoptimize.pro
@@ -1,8 +1,7 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qregularexpression_defaultoptimize
QT = core testlib
HEADERS = ../tst_qregularexpression.h
SOURCES = \
tst_qregularexpression_defaultoptimize.cpp \
../tst_qregularexpression.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qregularexpression/defaultoptimize/tst_qregularexpression_defaultoptimize.cpp b/tests/auto/corelib/tools/qregularexpression/defaultoptimize/tst_qregularexpression_defaultoptimize.cpp
index 92718e4adb..a815c6cab9 100644
--- a/tests/auto/corelib/tools/qregularexpression/defaultoptimize/tst_qregularexpression_defaultoptimize.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/defaultoptimize/tst_qregularexpression_defaultoptimize.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qregularexpression/forceoptimize/forceoptimize.pro b/tests/auto/corelib/tools/qregularexpression/forceoptimize/forceoptimize.pro
index d34bc9b93d..1db77781dd 100644
--- a/tests/auto/corelib/tools/qregularexpression/forceoptimize/forceoptimize.pro
+++ b/tests/auto/corelib/tools/qregularexpression/forceoptimize/forceoptimize.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qregularexpression_forceoptimize
QT = core testlib
HEADERS = ../tst_qregularexpression.h
diff --git a/tests/auto/corelib/tools/qregularexpression/forceoptimize/tst_qregularexpression_forceoptimize.cpp b/tests/auto/corelib/tools/qregularexpression/forceoptimize/tst_qregularexpression_forceoptimize.cpp
index edc94e9736..38a3a64fa3 100644
--- a/tests/auto/corelib/tools/qregularexpression/forceoptimize/tst_qregularexpression_forceoptimize.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/forceoptimize/tst_qregularexpression_forceoptimize.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
index 8ddd4979b6..5825bdb6d6 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
@@ -2,31 +2,26 @@
**
** Copyright (C) 2015 Giuseppe D'Angelo <dangelog@gmail.com>.
** Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -656,7 +651,7 @@ void tst_QRegularExpression::normalMatch_data()
m.captured << "c123def" << "c12" << "3" << "def";
offset = 2;
for (int i = 0; i <= offset; ++i) {
- QTest::newRow(QStringLiteral("match06-offset%1").arg(i).toUtf8().constData())
+ QTest::newRow(("match06-offset" + QByteArray::number(i)).constData())
<< QRegularExpression("(\\w*)(\\d+)(\\w*)")
<< QStringLiteral("abc123def").mid(offset - i)
<< i
@@ -669,7 +664,7 @@ void tst_QRegularExpression::normalMatch_data()
m.captured << QString("");
offset = 9;
for (int i = 0; i <= offset; ++i) {
- QTest::newRow(QStringLiteral("match07-offset%1").arg(i).toUtf8().constData())
+ QTest::newRow(("match07-offset" + QByteArray::number(i)).constData())
<< QRegularExpression("\\w*")
<< QStringLiteral("abc123def").mid(offset - i)
<< i
@@ -747,7 +742,7 @@ void tst_QRegularExpression::normalMatch_data()
m.isValid = true;
offset = 1;
for (int i = 0; i <= offset; ++i) {
- QTest::newRow(QStringLiteral("nomatch02-offset%1").arg(i).toUtf8().constData())
+ QTest::newRow(("nomatch02-offset" + QByteArray::number(i)).constData())
<< QRegularExpression("(\\w+) (\\w+)")
<< QStringLiteral("a string").mid(offset - i)
<< i
@@ -759,7 +754,7 @@ void tst_QRegularExpression::normalMatch_data()
m.isValid = true;
offset = 9;
for (int i = 0; i <= offset; ++i) {
- QTest::newRow(QStringLiteral("nomatch03-offset%1").arg(i).toUtf8().constData())
+ QTest::newRow(("nomatch03-offset" + QByteArray::number(i)).constData())
<< QRegularExpression("\\w+")
<< QStringLiteral("abc123def").mid(offset - i)
<< i
@@ -930,7 +925,7 @@ void tst_QRegularExpression::partialMatch_data()
m.captured << "def";
offset = 1;
for (int i = 0; i <= offset; ++i) {
- QTest::newRow(QStringLiteral("softmatch08-offset%1").arg(i).toUtf8().constData())
+ QTest::newRow(("softmatch08-offset" + QByteArray::number(i)).constData())
<< QRegularExpression("abc\\w+X|defY")
<< QStringLiteral("abcdef").mid(offset - i)
<< i
@@ -1016,7 +1011,7 @@ void tst_QRegularExpression::partialMatch_data()
m.captured << "def";
offset = 1;
for (int i = 0; i <= offset; ++i) {
- QTest::newRow(QStringLiteral("hardmatch08-offset%1").arg(i).toUtf8().constData())
+ QTest::newRow(("hardmatch08-offset" + QByteArray::number(i)).constData())
<< QRegularExpression("abc\\w+X|defY")
<< QStringLiteral("abcdef").mid(offset - i)
<< i
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h
index aed262d15d..8bb4aa0cce 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h
+++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qringbuffer/qringbuffer.pro b/tests/auto/corelib/tools/qringbuffer/qringbuffer.pro
index 0618b03309..c63544035a 100644
--- a/tests/auto/corelib/tools/qringbuffer/qringbuffer.pro
+++ b/tests/auto/corelib/tools/qringbuffer/qringbuffer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qringbuffer
QT = core-private testlib
SOURCES = tst_qringbuffer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
index c978761266..c212589f59 100644
--- a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
+++ b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -34,16 +29,18 @@
#include <QtTest/QtTest>
#include <private/qringbuffer_p.h>
+#include <qvector.h>
class tst_QRingBuffer : public QObject
{
Q_OBJECT
private slots:
+ void constructing();
+ void usingInVector();
void readPointerAtPositionWriteRead();
void readPointerAtPositionEmptyRead();
void readPointerAtPositionWithHead();
void readPointerAtPositionReadTooMuch();
- void sizeWhenEmpty();
void sizeWhenReservedAndChopped();
void sizeWhenReserved();
void free();
@@ -57,6 +54,33 @@ private slots:
void readLine();
};
+void tst_QRingBuffer::constructing()
+{
+ QRingBuffer ringBuffer;
+
+ QCOMPARE(ringBuffer.size(), Q_INT64_C(0));
+ QVERIFY(ringBuffer.isEmpty());
+ QCOMPARE(ringBuffer.nextDataBlockSize(), Q_INT64_C(0));
+ QVERIFY(ringBuffer.readPointer() == Q_NULLPTR);
+ QCOMPARE(ringBuffer.skip(5), Q_INT64_C(0));
+ QCOMPARE(ringBuffer.read(), QByteArray());
+ QCOMPARE(ringBuffer.getChar(), -1);
+ QVERIFY(!ringBuffer.canReadLine());
+
+ char buf[5];
+ QCOMPARE(ringBuffer.peek(buf, sizeof(buf)), Q_INT64_C(0));
+}
+
+void tst_QRingBuffer::usingInVector()
+{
+ QRingBuffer ringBuffer;
+ QVector<QRingBuffer> buffers;
+
+ ringBuffer.reserve(5);
+ buffers.append(ringBuffer);
+ QCOMPARE(buffers[0].size(), Q_INT64_C(5));
+}
+
void tst_QRingBuffer::sizeWhenReserved()
{
QRingBuffer ringBuffer;
@@ -74,13 +98,6 @@ void tst_QRingBuffer::sizeWhenReservedAndChopped()
QCOMPARE(ringBuffer.size(), Q_INT64_C(0));
}
-void tst_QRingBuffer::sizeWhenEmpty()
-{
- QRingBuffer ringBuffer;
-
- QCOMPARE(ringBuffer.size(), Q_INT64_C(0));
-}
-
void tst_QRingBuffer::readPointerAtPositionReadTooMuch()
{
QRingBuffer ringBuffer;
@@ -140,7 +157,7 @@ void tst_QRingBuffer::readPointerAtPositionWriteRead()
inData.putChar(0x23);
inData.write("Qt rocks!");
for (int i = 0; i < 5000; i++)
- inData.write(QString("Number %1").arg(i).toUtf8());
+ inData.write("Number " + QByteArray::number(i));
inData.reset();
QVERIFY(inData.size() > 0);
@@ -284,7 +301,8 @@ void tst_QRingBuffer::indexOf()
for (int i = 1; i < 256; ++i) {
qint64 index = ringBuffer.indexOf(char(i));
QCOMPARE(index, qint64(i - 1));
- QCOMPARE(ringBuffer.indexOf(char(i), i), index);
+ QCOMPARE(ringBuffer.indexOf(char(i), i, i >> 1), index);
+ QCOMPARE(ringBuffer.indexOf(char(i), 256, i), Q_INT64_C(-1));
QCOMPARE(ringBuffer.indexOf(char(i), i - 1), -1); // test for absent char
}
}
diff --git a/tests/auto/corelib/tools/qscopedpointer/qscopedpointer.pro b/tests/auto/corelib/tools/qscopedpointer/qscopedpointer.pro
index 5fa529e175..5248ad5528 100644
--- a/tests/auto/corelib/tools/qscopedpointer/qscopedpointer.pro
+++ b/tests/auto/corelib/tools/qscopedpointer/qscopedpointer.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qscopedpointer
QT = core testlib
SOURCES = tst_qscopedpointer.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
index 0a9683cee5..7fde84af5d 100644
--- a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
+++ b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qscopedvaluerollback/qscopedvaluerollback.pro b/tests/auto/corelib/tools/qscopedvaluerollback/qscopedvaluerollback.pro
index f823e6284b..c9c0a029d3 100644
--- a/tests/auto/corelib/tools/qscopedvaluerollback/qscopedvaluerollback.pro
+++ b/tests/auto/corelib/tools/qscopedvaluerollback/qscopedvaluerollback.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qscopedvaluerollback
QT = core testlib
SOURCES = tst_qscopedvaluerollback.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp b/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
index 5e6f5df879..656dd6a6e3 100644
--- a/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
+++ b/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qset/qset.pro b/tests/auto/corelib/tools/qset/qset.pro
index 8b5cdbc3f0..10ae3307d1 100644
--- a/tests/auto/corelib/tools/qset/qset.pro
+++ b/tests/auto/corelib/tools/qset/qset.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qset
QT = core testlib
SOURCES = tst_qset.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index fe4d81085c..0b60350380 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -753,7 +748,7 @@ void tst_QSet::stlMutableIterator()
QSet<QString>::const_iterator k = set2.insert("foo");
i = reinterpret_cast<QSet<QString>::iterator &>(k);
// #endif
- QVERIFY(*i == "foo");
+ QCOMPARE(*i, QLatin1String("foo"));
}
}
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 2128eeb164..0cccdb8262 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.h b/tests/auto/corelib/tools/qsharedpointer/externaltests.h
index 8577d00321..bae6adaefe 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.h
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
index 17af446a99..df343b5ebc 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
index e27f29375a..c72324841c 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/nontracked.cpp b/tests/auto/corelib/tools/qsharedpointer/nontracked.cpp
index a955c04bb9..e0780f8a9a 100644
--- a/tests/auto/corelib/tools/qsharedpointer/nontracked.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/nontracked.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2013 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/nontracked.h b/tests/auto/corelib/tools/qsharedpointer/nontracked.h
index 5dc8d338c0..76af80d2d7 100644
--- a/tests/auto/corelib/tools/qsharedpointer/nontracked.h
+++ b/tests/auto/corelib/tools/qsharedpointer/nontracked.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2013 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
index 2e8e335472..240137d563 100644
--- a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
+++ b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qsharedpointer
QT = core testlib
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index ab5bc410f6..b5912badf2 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Copyright (C) 2012 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -63,6 +58,7 @@ private slots:
void basics();
void operators();
void swap();
+ void moveSemantics();
void useOfForwardDeclared();
void memoryManagement();
void dropLastReferenceOfForwardDeclared();
@@ -421,6 +417,66 @@ void tst_QSharedPointer::swap()
QVERIFY(w2.isNull());
}
+void tst_QSharedPointer::moveSemantics()
+{
+#ifdef Q_COMPILER_RVALUE_REFS
+ QSharedPointer<int> p1, p2(new int(42)), control = p2;
+ QVERIFY(p1 != control);
+ QVERIFY(p1.isNull());
+ QVERIFY(p2 == control);
+ QVERIFY(!p2.isNull());
+ QVERIFY(*p2 == 42);
+
+ // move assignment
+ p1 = std::move(p2);
+ QVERIFY(p1 == control);
+ QVERIFY(!p1.isNull());
+ QVERIFY(p2 != control);
+ QVERIFY(p2.isNull());
+ QVERIFY(*p1 == 42);
+
+ // move construction
+ QSharedPointer<int> p3 = std::move(p1);
+ QVERIFY(p1 != control);
+ QVERIFY(p1.isNull());
+ QVERIFY(p3 == control);
+ QVERIFY(!p3.isNull());
+ QVERIFY(*p3 == 42);
+
+ QWeakPointer<int> w1, w2 = control;
+
+ QVERIFY(w1.isNull());
+ QVERIFY(!w2.isNull());
+ QVERIFY(w2.lock() == control);
+ QVERIFY(!w1.lock());
+
+ // move assignment
+ w1 = std::move(w2);
+ QVERIFY(w2.isNull());
+ QVERIFY(!w1.isNull());
+ QVERIFY(w1.lock() == control);
+ QVERIFY(!w2.lock());
+
+ // move construction
+ QWeakPointer<int> w3 = std::move(w1);
+ QVERIFY(w1.isNull());
+ QVERIFY(!w3.isNull());
+ QVERIFY(w3.lock() == control);
+ QVERIFY(!w1.lock());
+
+ p1.reset();
+ p2.reset();
+ p3.reset();
+ control.reset();
+
+ QVERIFY(w1.isNull());
+ QVERIFY(w2.isNull());
+ QVERIFY(w3.isNull());
+#else
+ QSKIP("This test requires C++11 rvalue/move semantics support in the compiler.");
+#endif
+}
+
void tst_QSharedPointer::useOfForwardDeclared()
{
// this just a compile test: use the forward-declared class
diff --git a/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp b/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
index f042e6500c..24a0cdc9c1 100644
--- a/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsharedpointer/wrapper.h b/tests/auto/corelib/tools/qsharedpointer/wrapper.h
index 839de41732..18cea6e199 100644
--- a/tests/auto/corelib/tools/qsharedpointer/wrapper.h
+++ b/tests/auto/corelib/tools/qsharedpointer/wrapper.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsize/qsize.pro b/tests/auto/corelib/tools/qsize/qsize.pro
index 310194ad12..9462e98e49 100644
--- a/tests/auto/corelib/tools/qsize/qsize.pro
+++ b/tests/auto/corelib/tools/qsize/qsize.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qsize
QT = core testlib
SOURCES = tst_qsize.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qsize/tst_qsize.cpp b/tests/auto/corelib/tools/qsize/tst_qsize.cpp
index cdd6d63544..385ff18ce5 100644
--- a/tests/auto/corelib/tools/qsize/tst_qsize.cpp
+++ b/tests/auto/corelib/tools/qsize/tst_qsize.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qsizef/qsizef.pro b/tests/auto/corelib/tools/qsizef/qsizef.pro
index c456e450fd..f5ba220b06 100644
--- a/tests/auto/corelib/tools/qsizef/qsizef.pro
+++ b/tests/auto/corelib/tools/qsizef/qsizef.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qsizef
QT = core testlib
SOURCES = tst_qsizef.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
index c8fca61819..42801d63a9 100644
--- a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
+++ b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstl/qstl.pro b/tests/auto/corelib/tools/qstl/qstl.pro
index 88fb53c6c6..e57e62b828 100644
--- a/tests/auto/corelib/tools/qstl/qstl.pro
+++ b/tests/auto/corelib/tools/qstl/qstl.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstl
QT = core testlib
SOURCES = tst_qstl.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstl/tst_qstl.cpp b/tests/auto/corelib/tools/qstl/tst_qstl.cpp
index fa07953d8f..6114da55b4 100644
--- a/tests/auto/corelib/tools/qstl/tst_qstl.cpp
+++ b/tests/auto/corelib/tools/qstl/tst_qstl.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstring/double_data.h b/tests/auto/corelib/tools/qstring/double_data.h
index 59ec3dd453..0d59ecb5ff 100644
--- a/tests/auto/corelib/tools/qstring/double_data.h
+++ b/tests/auto/corelib/tools/qstring/double_data.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstring/qstring.pro b/tests/auto/corelib/tools/qstring/qstring.pro
index 1eda27e1ff..1ff9a4fc9e 100644
--- a/tests/auto/corelib/tools/qstring/qstring.pro
+++ b/tests/auto/corelib/tools/qstring/qstring.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstring
QT = core testlib
SOURCES = tst_qstring.cpp
@@ -7,6 +7,10 @@ contains(QT_CONFIG,icu):DEFINES += QT_USE_ICU
contains(QT_CONFIG,c++11): CONFIG += c++11
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+!contains(QT_CONFIG, doubleconversion):!contains(QT_CONFIG, system-doubleconversion) {
+ DEFINES += QT_NO_DOUBLECONVERSION
+}
+
mac {
OBJECTIVE_SOURCES += tst_qstring_mac.mm
LIBS += -framework Foundation
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index bfcb20231b..44b8135410 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -63,7 +59,7 @@
#include <algorithm>
#define CREATE_REF(string) \
- const QString padded = QString::fromLatin1(" %1 ").arg(string); \
+ const QString padded = QLatin1Char(' ') + string + QLatin1Char(' '); \
QStringRef ref = padded.midRef(1, padded.size() - 2);
namespace {
@@ -480,6 +476,7 @@ private slots:
void indexOf3_data();
// void indexOf3();
void sprintf();
+ void sprintfS();
void fill();
void truncate();
void chop_data();
@@ -559,6 +556,7 @@ private slots:
void nanAndInf();
void compare_data();
void compare();
+ void resize();
void resizeAfterFromRawData();
void resizeAfterReserve();
void resizeWithNegative() const;
@@ -974,61 +972,61 @@ void tst_QString::acc_01()
QString f;
f = e;
f[7]='F';
- QCOMPARE(e,(QString)"String E");
+ QCOMPARE(e, QLatin1String("String E"));
char text[]="String f";
f = text;
text[7]='!';
- QCOMPARE(f,(QString)"String f");
+ QCOMPARE(f, QLatin1String("String f"));
f[7]='F';
QCOMPARE(text[7],'!');
a="";
a[0]='A';
- QCOMPARE(a,(QString)"A");
+ QCOMPARE(a, QLatin1String("A"));
QCOMPARE(a.length(),1);
a[1]='B';
- QCOMPARE(a,(QString)"AB");
+ QCOMPARE(a, QLatin1String("AB"));
QCOMPARE(a.length(),2);
a[2]='C';
- QCOMPARE(a,(QString)"ABC");
+ QCOMPARE(a, QLatin1String("ABC"));
QCOMPARE(a.length(),3);
a = QString();
QVERIFY(a.isNull());
a[0]='A';
- QCOMPARE(a,(QString)"A");
+ QCOMPARE(a, QLatin1String("A"));
QCOMPARE(a.length(),1);
a[1]='B';
- QCOMPARE(a,(QString)"AB");
+ QCOMPARE(a, QLatin1String("AB"));
QCOMPARE(a.length(),2);
a[2]='C';
- QCOMPARE(a,(QString)"ABC");
+ QCOMPARE(a, QLatin1String("ABC"));
QCOMPARE(a.length(),3);
a="123";
b="456";
a[0]=a[1];
- QCOMPARE(a,(QString)"223");
+ QCOMPARE(a, QLatin1String("223"));
a[1]=b[1];
- QCOMPARE(b,(QString)"456");
- QCOMPARE(a,(QString)"253");
+ QCOMPARE(b, QLatin1String("456"));
+ QCOMPARE(a, QLatin1String("253"));
char t[]="TEXT";
a="A";
a=t;
- QCOMPARE(a,(QString)"TEXT");
+ QCOMPARE(a, QLatin1String("TEXT"));
QCOMPARE(a,(QString)t);
a[0]='X';
- QCOMPARE(a,(QString)"XEXT");
+ QCOMPARE(a, QLatin1String("XEXT"));
QCOMPARE(t[0],'T');
t[0]='Z';
- QCOMPARE(a,(QString)"XEXT");
+ QCOMPARE(a, QLatin1String("XEXT"));
a="ABC";
QCOMPARE(char(a.toLatin1()[1]),'B');
- QCOMPARE(strcmp(a.toLatin1(),((QString)"ABC").toLatin1()),0);
- QCOMPARE(a+="DEF",(QString)"ABCDEF");
- QCOMPARE(a+='G',(QString)"ABCDEFG");
- QCOMPARE(a+=((const char*)(0)),(QString)"ABCDEFG");
+ QCOMPARE(strcmp(a.toLatin1(), QByteArrayLiteral("ABC")), 0);
+ QCOMPARE(a+="DEF", QLatin1String("ABCDEF"));
+ QCOMPARE(a+='G', QLatin1String("ABCDEFG"));
+ QCOMPARE(a+=((const char*)(0)), QLatin1String("ABCDEFG"));
// non-member operators
@@ -1050,11 +1048,11 @@ void tst_QString::acc_01()
QVERIFY(a<=c);
QVERIFY(!(c<=a));
QVERIFY(!(d<=a));
- QCOMPARE(QString(a+b),(QString)"ABCABC");
- QCOMPARE(QString(a+"XXXX"),(QString)"ABCXXXX");
- QCOMPARE(QString(a+'X'),(QString)"ABCX");
- QCOMPARE(QString("XXXX"+a),(QString)"XXXXABC");
- QCOMPARE(QString('X'+a),(QString)"XABC");
+ QCOMPARE(QString(a+b), QLatin1String("ABCABC"));
+ QCOMPARE(QString(a+"XXXX"), QLatin1String("ABCXXXX"));
+ QCOMPARE(QString(a+'X'), QLatin1String("ABCX"));
+ QCOMPARE(QString("XXXX"+a), QLatin1String("XXXXABC"));
+ QCOMPARE(QString('X'+a), QLatin1String("XABC"));
a = (const char*)0;
QVERIFY(a.isNull());
QVERIFY(*a.toLatin1().constData() == '\0');
@@ -1120,7 +1118,7 @@ void tst_QString::constructor()
QVERIFY(a == (QString)"");
QCOMPARE(b,cb);
QCOMPARE(c,cc);
- QCOMPARE(d,(QString)"String D");
+ QCOMPARE(d, QLatin1String("String D"));
QString nullStr;
QVERIFY( nullStr.isNull() );
@@ -1215,11 +1213,11 @@ void tst_QString::truncate()
{
QString e("String E");
e.truncate(4);
- QCOMPARE(e,(QString)"Stri");
+ QCOMPARE(e, QLatin1String("Stri"));
e = "String E";
e.truncate(0);
- QCOMPARE(e,(QString)"");
+ QCOMPARE(e, QLatin1String(""));
QVERIFY(e.isEmpty());
QVERIFY(!e.isNull());
@@ -1254,25 +1252,25 @@ void tst_QString::fill()
{
QString e;
e.fill('e',1);
- QCOMPARE(e,(QString)"e");
+ QCOMPARE(e, QLatin1String("e"));
QString f;
f.fill('f',3);
- QCOMPARE(f,(QString)"fff");
+ QCOMPARE(f, QLatin1String("fff"));
f.fill('F');
- QCOMPARE(f,(QString)"FFF");
+ QCOMPARE(f, QLatin1String("FFF"));
}
void tst_QString::sprintf()
{
QString a;
a.sprintf("COMPARE");
- QCOMPARE(a,(QString)"COMPARE");
+ QCOMPARE(a, QLatin1String("COMPARE"));
a.sprintf("%%%d",1);
- QCOMPARE(a,(QString)"%1");
- QCOMPARE(a.sprintf("X%dY",2),(QString)"X2Y");
- QCOMPARE(a.sprintf("X%9iY", 50000 ),(QString)"X 50000Y");
- QCOMPARE(a.sprintf("X%-9sY","hello"),(QString)"Xhello Y");
- QCOMPARE(a.sprintf("X%-9iY", 50000 ),(QString)"X50000 Y");
+ QCOMPARE(a, QLatin1String("%1"));
+ QCOMPARE(a.sprintf("X%dY",2), QLatin1String("X2Y"));
+ QCOMPARE(a.sprintf("X%9iY", 50000 ), QLatin1String("X 50000Y"));
+ QCOMPARE(a.sprintf("X%-9sY","hello"), QLatin1String("Xhello Y"));
+ QCOMPARE(a.sprintf("X%-9iY", 50000 ), QLatin1String("X50000 Y"));
QCOMPARE(a.sprintf("%lf", 1.23), QString("1.230000"));
QCOMPARE(a.sprintf("%lf", 1.23456789), QString("1.234568"));
QCOMPARE(a.sprintf("%p", (void *)0xbfffd350), QString("0xbfffd350"));
@@ -1288,14 +1286,18 @@ void tst_QString::sprintf()
double d = -514.25683;
S1.sprintf("%f",d);
QCOMPARE(S1, QString("-514.256830"));
+}
- QCOMPARE(a.sprintf("%.3s", "Hello" ),(QString)"Hel");
- QCOMPARE(a.sprintf("%10.3s", "Hello" ),(QString)" Hel");
- QCOMPARE(a.sprintf("%.10s", "Hello" ),(QString)"Hello");
- QCOMPARE(a.sprintf("%10.10s", "Hello" ),(QString)" Hello");
- QCOMPARE(a.sprintf("%-10.10s", "Hello" ),(QString)"Hello ");
- QCOMPARE(a.sprintf("%-10.3s", "Hello" ),(QString)"Hel ");
- QCOMPARE(a.sprintf("%-5.5s", "Hello" ),(QString)"Hello");
+void tst_QString::sprintfS()
+{
+ QString a;
+ QCOMPARE(a.sprintf("%.3s", "Hello" ), QLatin1String("Hel"));
+ QCOMPARE(a.sprintf("%10.3s", "Hello" ), QLatin1String(" Hel"));
+ QCOMPARE(a.sprintf("%.10s", "Hello" ), QLatin1String("Hello"));
+ QCOMPARE(a.sprintf("%10.10s", "Hello" ), QLatin1String(" Hello"));
+ QCOMPARE(a.sprintf("%-10.10s", "Hello" ), QLatin1String("Hello "));
+ QCOMPARE(a.sprintf("%-10.3s", "Hello" ), QLatin1String("Hel "));
+ QCOMPARE(a.sprintf("%-5.5s", "Hello" ), QLatin1String("Hello"));
// Check utf8 conversion for %s
QCOMPARE(a.sprintf("%s", "\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205"), QString::fromLatin1("\366\344\374\326\304\334\370\346\345\330\306\305"));
@@ -1304,12 +1306,30 @@ void tst_QString::sprintf()
a.sprintf("%s%n%s", "hello", &n1, "goodbye");
QCOMPARE(n1, 5);
QCOMPARE(a, QString("hellogoodbye"));
-#ifndef Q_CC_MINGW // does not know %ll
qlonglong n2;
a.sprintf("%s%s%lln%s", "foo", "bar", &n2, "whiz");
QCOMPARE((int)n2, 6);
QCOMPARE(a, QString("foobarwhiz"));
-#endif
+
+ { // %ls
+ QCOMPARE(a.sprintf("%.3ls", qUtf16Printable("Hello")), QLatin1String("Hel"));
+ QCOMPARE(a.sprintf("%10.3ls", qUtf16Printable("Hello")), QLatin1String(" Hel"));
+ QCOMPARE(a.sprintf("%.10ls", qUtf16Printable("Hello")), QLatin1String("Hello"));
+ QCOMPARE(a.sprintf("%10.10ls", qUtf16Printable("Hello")), QLatin1String(" Hello"));
+ QCOMPARE(a.sprintf("%-10.10ls", qUtf16Printable("Hello")), QLatin1String("Hello "));
+ QCOMPARE(a.sprintf("%-10.3ls", qUtf16Printable("Hello")), QLatin1String("Hel "));
+ QCOMPARE(a.sprintf("%-5.5ls", qUtf16Printable("Hello")), QLatin1String("Hello"));
+
+ // Check utf16 is preserved for %ls
+ QCOMPARE(a.sprintf("%ls",
+ qUtf16Printable("\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205")),
+ QLatin1String("\366\344\374\326\304\334\370\346\345\330\306\305"));
+
+ int n;
+ a.sprintf("%ls%n%s", qUtf16Printable("hello"), &n, "goodbye");
+ QCOMPARE(n, 5);
+ QCOMPARE(a, QLatin1String("hellogoodbye"));
+ }
}
/*
@@ -1398,7 +1418,7 @@ void tst_QString::indexOf_data()
QString s2;
s2 += QChar(0x3bc);
QTest::newRow( "data58" ) << s1 << s2 << 0 << false << 3;
- s2.prepend("C");
+ s2.prepend(QLatin1Char('C'));
QTest::newRow( "data59" ) << s1 << s2 << 0 << false << 2;
QString veryBigHaystack(500, 'a');
@@ -1845,9 +1865,9 @@ void tst_QString::left()
{
QString a;
a="ABCDEFGHIEfGEFG"; // 15 chars
- QCOMPARE(a.left(3),(QString)"ABC");
+ QCOMPARE(a.left(3), QLatin1String("ABC"));
QVERIFY(!a.left(0).isNull());
- QCOMPARE(a.left(0),(QString)"");
+ QCOMPARE(a.left(0), QLatin1String(""));
QString n;
QVERIFY(n.left(3).isNull());
@@ -1863,10 +1883,10 @@ void tst_QString::leftRef()
{
QString a;
a="ABCDEFGHIEfGEFG"; // 15 chars
- QCOMPARE(a.leftRef(3).toString(),(QString)"ABC");
+ QCOMPARE(a.leftRef(3).toString(), QLatin1String("ABC"));
QVERIFY(a.leftRef(0).toString().isEmpty());
- QCOMPARE(a.leftRef(0).toString(),(QString)"");
+ QCOMPARE(a.leftRef(0).toString(), QLatin1String(""));
QString n;
QVERIFY(n.leftRef(3).toString().isEmpty());
@@ -1882,8 +1902,8 @@ void tst_QString::right()
{
QString a;
a="ABCDEFGHIEfGEFG"; // 15 chars
- QCOMPARE(a.right(3),(QString)"EFG");
- QCOMPARE(a.right(0),(QString)"");
+ QCOMPARE(a.right(3), QLatin1String("EFG"));
+ QCOMPARE(a.right(0), QLatin1String(""));
QString n;
QVERIFY(n.right(3).isNull());
@@ -1898,8 +1918,8 @@ void tst_QString::rightRef()
{
QString a;
a="ABCDEFGHIEfGEFG"; // 15 chars
- QCOMPARE(a.rightRef(3).toString(),(QString)"EFG");
- QCOMPARE(a.rightRef(0).toString(),(QString)"");
+ QCOMPARE(a.rightRef(3).toString(), QLatin1String("EFG"));
+ QCOMPARE(a.rightRef(0).toString(), QLatin1String(""));
QString n;
QVERIFY(n.rightRef(3).toString().isEmpty());
@@ -1915,8 +1935,8 @@ void tst_QString::mid()
QString a;
a="ABCDEFGHIEfGEFG"; // 15 chars
- QCOMPARE(a.mid(3,3),(QString)"DEF");
- QCOMPARE(a.mid(0,0),(QString)"");
+ QCOMPARE(a.mid(3,3), QLatin1String("DEF"));
+ QCOMPARE(a.mid(0,0), QLatin1String(""));
QVERIFY(!a.mid(15,0).isNull());
QVERIFY(a.mid(15,0).isEmpty());
QVERIFY(!a.mid(15,1).isNull());
@@ -1994,8 +2014,8 @@ void tst_QString::midRef()
QString a;
a="ABCDEFGHIEfGEFG"; // 15 chars
- QCOMPARE(a.midRef(3,3).toString(),(QString)"DEF");
- QCOMPARE(a.midRef(0,0).toString(),(QString)"");
+ QCOMPARE(a.midRef(3,3).toString(), QLatin1String("DEF"));
+ QCOMPARE(a.midRef(0,0).toString(), QLatin1String(""));
QVERIFY(!a.midRef(15,0).toString().isNull());
QVERIFY(a.midRef(15,0).toString().isEmpty());
QVERIFY(!a.midRef(15,1).toString().isNull());
@@ -2119,44 +2139,44 @@ void tst_QString::leftJustified()
{
QString a;
a="ABC";
- QCOMPARE(a.leftJustified(5,'-'),(QString)"ABC--");
- QCOMPARE(a.leftJustified(4,'-'),(QString)"ABC-");
- QCOMPARE(a.leftJustified(4),(QString)"ABC ");
- QCOMPARE(a.leftJustified(3),(QString)"ABC");
- QCOMPARE(a.leftJustified(2),(QString)"ABC");
- QCOMPARE(a.leftJustified(1),(QString)"ABC");
- QCOMPARE(a.leftJustified(0),(QString)"ABC");
+ QCOMPARE(a.leftJustified(5,'-'), QLatin1String("ABC--"));
+ QCOMPARE(a.leftJustified(4,'-'), QLatin1String("ABC-"));
+ QCOMPARE(a.leftJustified(4), QLatin1String("ABC "));
+ QCOMPARE(a.leftJustified(3), QLatin1String("ABC"));
+ QCOMPARE(a.leftJustified(2), QLatin1String("ABC"));
+ QCOMPARE(a.leftJustified(1), QLatin1String("ABC"));
+ QCOMPARE(a.leftJustified(0), QLatin1String("ABC"));
QString n;
QVERIFY(!n.leftJustified(3).isNull());
- QCOMPARE(a.leftJustified(4,' ',true),(QString)"ABC ");
- QCOMPARE(a.leftJustified(3,' ',true),(QString)"ABC");
- QCOMPARE(a.leftJustified(2,' ',true),(QString)"AB");
- QCOMPARE(a.leftJustified(1,' ',true),(QString)"A");
- QCOMPARE(a.leftJustified(0,' ',true),(QString)"");
+ QCOMPARE(a.leftJustified(4,' ',true), QLatin1String("ABC "));
+ QCOMPARE(a.leftJustified(3,' ',true), QLatin1String("ABC"));
+ QCOMPARE(a.leftJustified(2,' ',true), QLatin1String("AB"));
+ QCOMPARE(a.leftJustified(1,' ',true), QLatin1String("A"));
+ QCOMPARE(a.leftJustified(0,' ',true), QLatin1String(""));
}
void tst_QString::rightJustified()
{
QString a;
a="ABC";
- QCOMPARE(a.rightJustified(5,'-'),(QString)"--ABC");
- QCOMPARE(a.rightJustified(4,'-'),(QString)"-ABC");
- QCOMPARE(a.rightJustified(4),(QString)" ABC");
- QCOMPARE(a.rightJustified(3),(QString)"ABC");
- QCOMPARE(a.rightJustified(2),(QString)"ABC");
- QCOMPARE(a.rightJustified(1),(QString)"ABC");
- QCOMPARE(a.rightJustified(0),(QString)"ABC");
+ QCOMPARE(a.rightJustified(5,'-'), QLatin1String("--ABC"));
+ QCOMPARE(a.rightJustified(4,'-'), QLatin1String("-ABC"));
+ QCOMPARE(a.rightJustified(4), QLatin1String(" ABC"));
+ QCOMPARE(a.rightJustified(3), QLatin1String("ABC"));
+ QCOMPARE(a.rightJustified(2), QLatin1String("ABC"));
+ QCOMPARE(a.rightJustified(1), QLatin1String("ABC"));
+ QCOMPARE(a.rightJustified(0), QLatin1String("ABC"));
QString n;
QVERIFY(!n.rightJustified(3).isNull());
- QCOMPARE(a.rightJustified(4,'-',true),(QString)"-ABC");
- QCOMPARE(a.rightJustified(4,' ',true),(QString)" ABC");
- QCOMPARE(a.rightJustified(3,' ',true),(QString)"ABC");
- QCOMPARE(a.rightJustified(2,' ',true),(QString)"AB");
- QCOMPARE(a.rightJustified(1,' ',true),(QString)"A");
- QCOMPARE(a.rightJustified(0,' ',true),(QString)"");
- QCOMPARE(a,(QString)"ABC");
+ QCOMPARE(a.rightJustified(4,'-',true), QLatin1String("-ABC"));
+ QCOMPARE(a.rightJustified(4,' ',true), QLatin1String(" ABC"));
+ QCOMPARE(a.rightJustified(3,' ',true), QLatin1String("ABC"));
+ QCOMPARE(a.rightJustified(2,' ',true), QLatin1String("AB"));
+ QCOMPARE(a.rightJustified(1,' ',true), QLatin1String("A"));
+ QCOMPARE(a.rightJustified(0,' ',true), QLatin1String(""));
+ QCOMPARE(a, QLatin1String("ABC"));
}
void tst_QString::toUpper()
@@ -2354,21 +2374,21 @@ void tst_QString::trimmed()
{
QString a;
a="Text";
- QCOMPARE(a,(QString)"Text");
- QCOMPARE(a.trimmed(),(QString)"Text");
- QCOMPARE(a,(QString)"Text");
+ QCOMPARE(a, QLatin1String("Text"));
+ QCOMPARE(a.trimmed(), QLatin1String("Text"));
+ QCOMPARE(a, QLatin1String("Text"));
a=" ";
- QCOMPARE(a.trimmed(),(QString)"");
- QCOMPARE(a,(QString)" ");
+ QCOMPARE(a.trimmed(), QLatin1String(""));
+ QCOMPARE(a, QLatin1String(" "));
a=" a ";
- QCOMPARE(a.trimmed(),(QString)"a");
+ QCOMPARE(a.trimmed(), QLatin1String("a"));
a="Text";
- QCOMPARE(qMove(a).trimmed(),(QString)"Text");
+ QCOMPARE(qMove(a).trimmed(), QLatin1String("Text"));
a=" ";
- QCOMPARE(qMove(a).trimmed(),(QString)"");
+ QCOMPARE(qMove(a).trimmed(), QLatin1String(""));
a=" a ";
- QCOMPARE(qMove(a).trimmed(),(QString)"a");
+ QCOMPARE(qMove(a).trimmed(), QLatin1String("a"));
}
void tst_QString::simplified_data()
@@ -2494,12 +2514,13 @@ void tst_QString::insert_special_cases()
QCOMPARE(a.insert(1,'>'), QString("<>ABCABCABCABC"));
a = "Meal";
- QCOMPARE(a.insert(1, QLatin1String("ontr")), QString("Montreal"));
- QCOMPARE(a.insert(4, ""), QString("Montreal"));
- QCOMPARE(a.insert(3, QLatin1String("")), QString("Montreal"));
- QCOMPARE(a.insert(3, QLatin1String(0)), QString("Montreal"));
- QCOMPARE(a.insert(3, static_cast<const char *>(0)), QString("Montreal"));
- QCOMPARE(a.insert(0, QLatin1String("a")), QString("aMontreal"));
+ const QString montreal = QStringLiteral("Montreal");
+ QCOMPARE(a.insert(1, QLatin1String("ontr")), montreal);
+ QCOMPARE(a.insert(4, ""), montreal);
+ QCOMPARE(a.insert(3, QLatin1String("")), montreal);
+ QCOMPARE(a.insert(3, QLatin1String(0)), montreal);
+ QCOMPARE(a.insert(3, static_cast<const char *>(0)), montreal);
+ QCOMPARE(a.insert(0, QLatin1String("a")), QLatin1String("aMontreal"));
}
void tst_QString::append_data(bool emptyIsNoop)
@@ -3677,12 +3698,12 @@ void tst_QString::toDouble()
void tst_QString::setNum()
{
QString a;
- QCOMPARE(a.setNum(123),(QString)"123");
- QCOMPARE(a.setNum(-123),(QString)"-123");
- QCOMPARE(a.setNum(0x123,16),(QString)"123");
- QCOMPARE(a.setNum((short)123),(QString)"123");
- QCOMPARE(a.setNum(123L),(QString)"123");
- QCOMPARE(a.setNum(123UL),(QString)"123");
+ QCOMPARE(a.setNum(123), QLatin1String("123"));
+ QCOMPARE(a.setNum(-123), QLatin1String("-123"));
+ QCOMPARE(a.setNum(0x123,16), QLatin1String("123"));
+ QCOMPARE(a.setNum((short)123), QLatin1String("123"));
+ QCOMPARE(a.setNum(123L), QLatin1String("123"));
+ QCOMPARE(a.setNum(123UL), QLatin1String("123"));
QCOMPARE(a.setNum(2147483647L), QString("2147483647")); // 32 bit LONG_MAX
QCOMPARE(a.setNum(-2147483647L), QString("-2147483647")); // LONG_MIN + 1
QCOMPARE(a.setNum(-2147483647L-1L), QString("-2147483648")); // LONG_MIN
@@ -3939,7 +3960,7 @@ void tst_QString::check_QDataStream()
{
QDataStream in(&ar,QIODevice::ReadOnly);
in >> a;
- QCOMPARE(a,(QString)"COMPARE Text");
+ QCOMPARE(a, QLatin1String("COMPARE Text"));
}
}
@@ -3954,7 +3975,7 @@ void tst_QString::check_QTextStream()
{
QTextStream in(&ar,QIODevice::ReadOnly);
in >> a;
- QCOMPARE(a,(QString)"This");
+ QCOMPARE(a, QLatin1String("This"));
}
}
@@ -4707,100 +4728,100 @@ void tst_QString::arg()
QString s13( "%1% %x%c%2 %d%2-%" );
QString s14( "%1%2%3" );
- QCOMPARE( s4.arg("foo"), QString("[foo]") );
- QCOMPARE( s5.arg("foo"), QString("[foo]") );
- QCOMPARE( s6.arg("foo"), QString("[foo]") );
- QCOMPARE( s7.arg("foo"), QString("[foo]") );
- QCOMPARE( s8.arg("foo"), QString("[foo %1]") );
- QCOMPARE( s8.arg("foo").arg("bar"), QString("[foo bar]") );
- QCOMPARE( s8.arg("foo", "bar"), QString("[foo bar]") );
- QCOMPARE( s9.arg("foo"), QString("[foo %3]") );
- QCOMPARE( s9.arg("foo").arg("bar"), QString("[foo bar]") );
- QCOMPARE( s9.arg("foo", "bar"), QString("[foo bar]") );
- QCOMPARE( s10.arg("foo"), QString("[foo %2 %3]") );
- QCOMPARE( s10.arg("foo").arg("bar"), QString("[foo bar %3]") );
- QCOMPARE( s10.arg("foo", "bar"), QString("[foo bar %3]") );
- QCOMPARE( s10.arg("foo").arg("bar").arg("baz"), QString("[foo bar baz]") );
- QCOMPARE( s10.arg("foo", "bar", "baz"), QString("[foo bar baz]") );
- QCOMPARE( s11.arg("foo"), QString("[%9 %3 foo]") );
- QCOMPARE( s11.arg("foo").arg("bar"), QString("[%9 bar foo]") );
- QCOMPARE( s11.arg("foo", "bar"), QString("[%9 bar foo]") );
- QCOMPARE( s11.arg("foo").arg("bar").arg("baz"), QString("[baz bar foo]") );
- QCOMPARE( s11.arg("foo", "bar", "baz"), QString("[baz bar foo]") );
+ QCOMPARE( s4.arg("foo"), QLatin1String("[foo]") );
+ QCOMPARE( s5.arg("foo"), QLatin1String("[foo]") );
+ QCOMPARE( s6.arg("foo"), QLatin1String("[foo]") );
+ QCOMPARE( s7.arg("foo"), QLatin1String("[foo]") );
+ QCOMPARE( s8.arg("foo"), QLatin1String("[foo %1]") );
+ QCOMPARE( s8.arg("foo").arg("bar"), QLatin1String("[foo bar]") );
+ QCOMPARE( s8.arg("foo", "bar"), QLatin1String("[foo bar]") );
+ QCOMPARE( s9.arg("foo"), QLatin1String("[foo %3]") );
+ QCOMPARE( s9.arg("foo").arg("bar"), QLatin1String("[foo bar]") );
+ QCOMPARE( s9.arg("foo", "bar"), QLatin1String("[foo bar]") );
+ QCOMPARE( s10.arg("foo"), QLatin1String("[foo %2 %3]") );
+ QCOMPARE( s10.arg("foo").arg("bar"), QLatin1String("[foo bar %3]") );
+ QCOMPARE( s10.arg("foo", "bar"), QLatin1String("[foo bar %3]") );
+ QCOMPARE( s10.arg("foo").arg("bar").arg("baz"), QLatin1String("[foo bar baz]") );
+ QCOMPARE( s10.arg("foo", "bar", "baz"), QLatin1String("[foo bar baz]") );
+ QCOMPARE( s11.arg("foo"), QLatin1String("[%9 %3 foo]") );
+ QCOMPARE( s11.arg("foo").arg("bar"), QLatin1String("[%9 bar foo]") );
+ QCOMPARE( s11.arg("foo", "bar"), QLatin1String("[%9 bar foo]") );
+ QCOMPARE( s11.arg("foo").arg("bar").arg("baz"), QLatin1String("[baz bar foo]") );
+ QCOMPARE( s11.arg("foo", "bar", "baz"), QLatin1String("[baz bar foo]") );
QCOMPARE( s12.arg("a").arg("b").arg("c").arg("d").arg("e"),
- QString("[e b c e a d]") );
- QCOMPARE( s12.arg("a", "b", "c", "d").arg("e"), QString("[e b c e a d]") );
- QCOMPARE( s12.arg("a").arg("b", "c", "d", "e"), QString("[e b c e a d]") );
+ QLatin1String("[e b c e a d]") );
+ QCOMPARE( s12.arg("a", "b", "c", "d").arg("e"), QLatin1String("[e b c e a d]") );
+ QCOMPARE( s12.arg("a").arg("b", "c", "d", "e"), QLatin1String("[e b c e a d]") );
QCOMPARE( s13.arg("alpha").arg("beta"),
- QString("alpha% %x%cbeta %dbeta-%") );
- QCOMPARE( s13.arg("alpha", "beta"), QString("alpha% %x%cbeta %dbeta-%") );
- QCOMPARE( s14.arg("a", "b", "c"), QString("abc") );
- QCOMPARE( s8.arg("%1").arg("foo"), QString("[foo foo]") );
- QCOMPARE( s8.arg("%1", "foo"), QString("[%1 foo]") );
- QCOMPARE( s4.arg("foo", 2), QString("[foo]") );
- QCOMPARE( s4.arg("foo", -2), QString("[foo]") );
- QCOMPARE( s4.arg("foo", 10), QString("[ foo]") );
- QCOMPARE( s4.arg("foo", -10), QString("[foo ]") );
+ QLatin1String("alpha% %x%cbeta %dbeta-%") );
+ QCOMPARE( s13.arg("alpha", "beta"), QLatin1String("alpha% %x%cbeta %dbeta-%") );
+ QCOMPARE( s14.arg("a", "b", "c"), QLatin1String("abc") );
+ QCOMPARE( s8.arg("%1").arg("foo"), QLatin1String("[foo foo]") );
+ QCOMPARE( s8.arg("%1", "foo"), QLatin1String("[%1 foo]") );
+ QCOMPARE( s4.arg("foo", 2), QLatin1String("[foo]") );
+ QCOMPARE( s4.arg("foo", -2), QLatin1String("[foo]") );
+ QCOMPARE( s4.arg("foo", 10), QLatin1String("[ foo]") );
+ QCOMPARE( s4.arg("foo", -10), QLatin1String("[foo ]") );
QString firstName( "James" );
QString lastName( "Bond" );
QString fullName = QString( "My name is %2, %1 %2" )
.arg( firstName ).arg( lastName );
- QCOMPARE( fullName, QString("My name is Bond, James Bond") );
+ QCOMPARE( fullName, QLatin1String("My name is Bond, James Bond") );
// number overloads
- QCOMPARE( s4.arg(0), QString("[0]") );
- QCOMPARE( s4.arg(-1), QString("[-1]") );
- QCOMPARE( s4.arg(4294967295UL), QString("[4294967295]") ); // ULONG_MAX 32
+ QCOMPARE( s4.arg(0), QLatin1String("[0]") );
+ QCOMPARE( s4.arg(-1), QLatin1String("[-1]") );
+ QCOMPARE( s4.arg(4294967295UL), QLatin1String("[4294967295]") ); // ULONG_MAX 32
QCOMPARE( s4.arg(Q_INT64_C(9223372036854775807)), // LLONG_MAX
- QString("[9223372036854775807]") );
+ QLatin1String("[9223372036854775807]") );
QTest::ignoreMessage(QtWarningMsg, "QString::arg: Argument missing: \"\" , 0");
QCOMPARE( QString().arg(0), QString() );
QTest::ignoreMessage(QtWarningMsg, "QString::arg: Argument missing: \"\" , 0");
QCOMPARE( QString("").arg(0), QString("") );
QTest::ignoreMessage(QtWarningMsg, "QString::arg: Argument missing: \" \" , 0");
- QCOMPARE( QString(" ").arg(0), QString(" ") );
+ QCOMPARE( QString(" ").arg(0), QLatin1String(" ") );
QTest::ignoreMessage(QtWarningMsg, "QString::arg: Argument missing: \"%\" , 0");
- QCOMPARE( QString("%").arg(0), QString("%") );
+ QCOMPARE( QString("%").arg(0), QLatin1String("%") );
QTest::ignoreMessage(QtWarningMsg, "QString::arg: Argument missing: \"%%\" , 0");
- QCOMPARE( QString("%%").arg(0), QString("%%") );
+ QCOMPARE( QString("%%").arg(0), QLatin1String("%%") );
QTest::ignoreMessage(QtWarningMsg, "QString::arg: Argument missing: \"%%%\" , 0");
- QCOMPARE( QString("%%%").arg(0), QString("%%%") );
- QCOMPARE( QString("%%%1%%%2").arg("foo").arg("bar"), QString("%%foo%%bar") );
-
- QCOMPARE( QString("%1").arg("hello", -10), QString("hello ") );
- QCOMPARE( QString("%1").arg("hello", -5), QString("hello") );
- QCOMPARE( QString("%1").arg("hello", -2), QString("hello") );
- QCOMPARE( QString("%1").arg("hello", 0), QString("hello") );
- QCOMPARE( QString("%1").arg("hello", 2), QString("hello") );
- QCOMPARE( QString("%1").arg("hello", 5), QString("hello") );
- QCOMPARE( QString("%1").arg("hello", 10), QString(" hello") );
- QCOMPARE( QString("%1%1").arg("hello"), QString("hellohello") );
- QCOMPARE( QString("%2%1").arg("hello"), QString("%2hello") );
- QCOMPARE( QString("%1%1").arg(QString::null), QString("") );
- QCOMPARE( QString("%2%1").arg(""), QString("%2") );
+ QCOMPARE( QString("%%%").arg(0), QLatin1String("%%%") );
+ QCOMPARE( QString("%%%1%%%2").arg("foo").arg("bar"), QLatin1String("%%foo%%bar") );
+
+ QCOMPARE( QString("%1").arg("hello", -10), QLatin1String("hello ") );
+ QCOMPARE( QString("%1").arg("hello", -5), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg("hello", -2), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg("hello", 0), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg("hello", 2), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg("hello", 5), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg("hello", 10), QLatin1String(" hello") );
+ QCOMPARE( QString("%1%1").arg("hello"), QLatin1String("hellohello") );
+ QCOMPARE( QString("%2%1").arg("hello"), QLatin1String("%2hello") );
+ QCOMPARE( QString("%1%1").arg(QString::null), QLatin1String("") );
+ QCOMPARE( QString("%2%1").arg(""), QLatin1String("%2") );
QCOMPARE( QString("%2 %L1").arg(12345.6789).arg(12345.6789),
- QString("12345.7 12.345,7") );
+ QLatin1String("12345.7 12.345,7") );
QCOMPARE( QString("[%2] [%L1]").arg(12345.6789, 9).arg(12345.6789, 9),
- QString("[ 12345.7] [ 12.345,7]") );
+ QLatin1String("[ 12345.7] [ 12.345,7]") );
QCOMPARE( QString("[%2] [%L1]").arg(12345.6789, 9, 'g', 7).arg(12345.6789, 9, 'g', 7),
- QString("[ 12345.68] [12.345,68]") );
+ QLatin1String("[ 12345.68] [12.345,68]") );
QCOMPARE( QString("[%2] [%L1]").arg(12345.6789, 10, 'g', 7, QLatin1Char('0')).arg(12345.6789, 10, 'g', 7, QLatin1Char('0')),
- QString("[0012345.68] [012.345,68]") );
+ QLatin1String("[0012345.68] [012.345,68]") );
QCOMPARE( QString("%2 %L1").arg(123456789).arg(123456789),
- QString("123456789 123.456.789") );
+ QLatin1String("123456789 123.456.789") );
QCOMPARE( QString("[%2] [%L1]").arg(123456789, 12).arg(123456789, 12),
- QString("[ 123456789] [ 123.456.789]") );
+ QLatin1String("[ 123456789] [ 123.456.789]") );
QCOMPARE( QString("[%2] [%L1]").arg(123456789, 13, 10, QLatin1Char('0')).arg(123456789, 12, 10, QLatin1Char('0')),
- QString("[000123456789] [00123.456.789]") );
+ QLatin1String("[000123456789] [00123.456.789]") );
QCOMPARE( QString("[%2] [%L1]").arg(123456789, 13, 16, QLatin1Char('0')).arg(123456789, 12, 16, QLatin1Char('0')),
- QString("[0000075bcd15] [00000075bcd15]") );
+ QLatin1String("[0000075bcd15] [00000075bcd15]") );
QCOMPARE( QString("%L2 %L1 %3").arg(12345.7).arg(123456789).arg('c'),
- QString("123.456.789 12.345,7 c") );
+ QLatin1String("123.456.789 12.345,7 c") );
// multi-digit replacement
QString input("%%%L0 %1 %02 %3 %4 %5 %L6 %7 %8 %%% %090 %10 %11 %L12 %14 %L9888 %9999 %%%%%%%L");
@@ -4810,36 +4831,36 @@ void tst_QString::arg()
.arg("k").arg("l").arg("m")
.arg("n").arg("o").arg("p");
- QCOMPARE(input, QString("%%A B C D E f g h i %%% j0 k l m n o88 p99 %%%%%%%L"));
+ QCOMPARE(input, QLatin1String("%%A B C D E f g h i %%% j0 k l m n o88 p99 %%%%%%%L"));
QString str("%1 %2 %3 %4 %5 %6 %7 %8 %9 foo %10 %11 bar");
str = str.arg("one", "2", "3", "4", "5", "6", "7", "8", "9");
str = str.arg("ahoy", "there");
- QCOMPARE(str, QString("one 2 3 4 5 6 7 8 9 foo ahoy there bar"));
+ QCOMPARE(str, QLatin1String("one 2 3 4 5 6 7 8 9 foo ahoy there bar"));
QString str2("%123 %234 %345 %456 %567 %999 %1000 %1230");
str2 = str2.arg("A", "B", "C", "D", "E", "F");
- QCOMPARE(str2, QString("A B C D E F %1000 %1230"));
-
- QCOMPARE(QString("%1").arg(-1, 3, 10, QChar('0')), QString("-01"));
- QCOMPARE(QString("%1").arg(-100, 3, 10, QChar('0')), QString("-100"));
- QCOMPARE(QString("%1").arg(-1, 3, 10, QChar(' ')), QString(" -1"));
- QCOMPARE(QString("%1").arg(-100, 3, 10, QChar(' ')), QString("-100"));
- QCOMPARE(QString("%1").arg(1U, 3, 10, QChar(' ')), QString(" 1"));
- QCOMPARE(QString("%1").arg(1000U, 3, 10, QChar(' ')), QString("1000"));
- QCOMPARE(QString("%1").arg(-1, 3, 10, QChar('x')), QString("x-1"));
- QCOMPARE(QString("%1").arg(-100, 3, 10, QChar('x')), QString("-100"));
- QCOMPARE(QString("%1").arg(1U, 3, 10, QChar('x')), QString("xx1"));
- QCOMPARE(QString("%1").arg(1000U, 3, 10, QChar('x')), QString("1000"));
-
- QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar('0')), QString("-01"));
- QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar('0')), QString("-100"));
- QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar(' ')), QString(" -1"));
- QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar(' ')), QString("-100"));
- QCOMPARE(QString("%1").arg(1., 3, 'g', -1, QChar('x')), QString("xx1"));
- QCOMPARE(QString("%1").arg(1000., 3, 'g', -1, QChar('x')), QString("1000"));
- QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar('x')), QString("x-1"));
- QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar('x')), QString("-100"));
+ QCOMPARE(str2, QLatin1String("A B C D E F %1000 %1230"));
+
+ QCOMPARE(QString("%1").arg(-1, 3, 10, QChar('0')), QLatin1String("-01"));
+ QCOMPARE(QString("%1").arg(-100, 3, 10, QChar('0')), QLatin1String("-100"));
+ QCOMPARE(QString("%1").arg(-1, 3, 10, QChar(' ')), QLatin1String(" -1"));
+ QCOMPARE(QString("%1").arg(-100, 3, 10, QChar(' ')), QLatin1String("-100"));
+ QCOMPARE(QString("%1").arg(1U, 3, 10, QChar(' ')), QLatin1String(" 1"));
+ QCOMPARE(QString("%1").arg(1000U, 3, 10, QChar(' ')), QLatin1String("1000"));
+ QCOMPARE(QString("%1").arg(-1, 3, 10, QChar('x')), QLatin1String("x-1"));
+ QCOMPARE(QString("%1").arg(-100, 3, 10, QChar('x')), QLatin1String("-100"));
+ QCOMPARE(QString("%1").arg(1U, 3, 10, QChar('x')), QLatin1String("xx1"));
+ QCOMPARE(QString("%1").arg(1000U, 3, 10, QChar('x')), QLatin1String("1000"));
+
+ QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar('0')), QLatin1String("-01"));
+ QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar('0')), QLatin1String("-100"));
+ QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar(' ')), QLatin1String(" -1"));
+ QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar(' ')), QLatin1String("-100"));
+ QCOMPARE(QString("%1").arg(1., 3, 'g', -1, QChar('x')), QLatin1String("xx1"));
+ QCOMPARE(QString("%1").arg(1000., 3, 'g', -1, QChar('x')), QLatin1String("1000"));
+ QCOMPARE(QString("%1").arg(-1., 3, 'g', -1, QChar('x')), QLatin1String("x-1"));
+ QCOMPARE(QString("%1").arg(-100., 3, 'g', -1, QChar('x')), QLatin1String("-100"));
QLocale::setDefault(QString("ar"));
QCOMPARE( QString("%L1").arg(12345.6789, 10, 'g', 7, QLatin1Char('0')),
@@ -4852,13 +4873,18 @@ void tst_QString::arg()
void tst_QString::number()
{
- QCOMPARE( QString::number(int(0)), QString("0") );
- QCOMPARE( QString::number((unsigned int)(11)), QString("11") );
- QCOMPARE( QString::number(-22L), QString("-22") );
- QCOMPARE( QString::number(333UL), QString("333") );
- QCOMPARE( QString::number(4.4), QString("4.4") );
- QCOMPARE( QString::number(Q_INT64_C(-555)), QString("-555") );
- QCOMPARE( QString::number(Q_UINT64_C(6666)), QString("6666") );
+ 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") );
+
+#ifndef QT_NO_DOUBLECONVERSION // snprintf_l is too stupid for this
+ QCOMPARE( QString::number(12.05, 'f', 1), QString("12.1") );
+ QCOMPARE( QString::number(12.5, 'f', 0), QString("13") );
+#endif
}
void tst_QString::capacity_data()
@@ -6146,6 +6172,22 @@ void tst_QString::compare()
}
}
+void tst_QString::resize()
+{
+ QString s = QLatin1String("hello world");
+
+ s.resize(5);
+ QCOMPARE(s, QLatin1String("hello"));
+ s.resize(8);
+ QCOMPARE(s.size(), 8);
+ QVERIFY(s.startsWith(QLatin1String("hello")));
+
+ s.resize(10, QLatin1Char('n'));
+ QCOMPARE(s.size(), 10);
+ QVERIFY(s.startsWith(QLatin1String("hello")));
+ QCOMPARE(s.right(2), QLatin1String("nn"));
+}
+
void tst_QString::resizeAfterFromRawData()
{
QString buffer("hello world");
@@ -6284,9 +6326,6 @@ void tst_QString::QCharRefDetaching() const
void tst_QString::sprintfZU() const
{
-#ifdef Q_CC_MINGW
- QSKIP("MinGW does not support '%zu'.");
-#else
{
QString string;
size_t s = 6;
@@ -6315,7 +6354,6 @@ void tst_QString::sprintfZU() const
string.sprintf("%zu %s\n", s, "foo");
QCOMPARE(string, QString::fromLatin1("6 foo\n"));
}
-#endif // !Q_CC_MINGW
}
void tst_QString::repeatedSignature() const
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm b/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
index 550f835bea..60bd3f9b15 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
+++ b/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro b/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro
index 1719af631d..14dbe779db 100644
--- a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro
+++ b/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro
@@ -1,7 +1,6 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstring_no_cast_from_bytearray
QT = core testlib
SOURCES = tst_qstring_no_cast_from_bytearray.cpp
DEFINES += QT_NO_CAST_FROM_BYTEARRAY
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp b/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp
index ab7eff6b2f..47fbeb6069 100644
--- a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp
+++ b/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro
index 64ce377c29..d9cdad1bf5 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringbuilder1
QT = core testlib
SOURCES = tst_qstringbuilder1.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index 777fd5392c..7a361c0693 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
index fc502fcd4c..2d320748f2 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro
index 56ed7707d0..e134c5d934 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringbuilder2
QT = core testlib
SOURCES = tst_qstringbuilder2.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
index 67f6346b6a..669990c9bc 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro
index 2be2c24de4..29607551c3 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringbuilder3
QT = core testlib
SOURCES = tst_qstringbuilder3.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
index 4d4209a60a..397e3326bf 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro
index 3a97d49483..e55848e4bd 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringbuilder4
QT = core testlib
SOURCES = tst_qstringbuilder4.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
index 4cf30e291b..05ce334c82 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringiterator/qstringiterator.pro b/tests/auto/corelib/tools/qstringiterator/qstringiterator.pro
index e5e625d520..3a1678b5f3 100644
--- a/tests/auto/corelib/tools/qstringiterator/qstringiterator.pro
+++ b/tests/auto/corelib/tools/qstringiterator/qstringiterator.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringiterator
QT = core core-private testlib
SOURCES = tst_qstringiterator.cpp
diff --git a/tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp b/tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp
index f05caf0033..319f772516 100644
--- a/tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp
+++ b/tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
** Copyright (C) 2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringlist/qstringlist.pro b/tests/auto/corelib/tools/qstringlist/qstringlist.pro
index c3b2fe07c0..a87257decb 100644
--- a/tests/auto/corelib/tools/qstringlist/qstringlist.pro
+++ b/tests/auto/corelib/tools/qstringlist/qstringlist.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringlist
QT = core testlib
SOURCES = tst_qstringlist.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index 3d44c7051d..dc3547f9ba 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro b/tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro
index 3a6e22b469..e34928776f 100644
--- a/tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro
+++ b/tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringmatcher
QT = core testlib
SOURCES = tst_qstringmatcher.cpp
DEFINES += QT_NO_CAST_TO_ASCII
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
index a21e15aac4..0c098cb1c3 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qstringref/qstringref.pro b/tests/auto/corelib/tools/qstringref/qstringref.pro
index edb5ef995c..04f3ba6a92 100644
--- a/tests/auto/corelib/tools/qstringref/qstringref.pro
+++ b/tests/auto/corelib/tools/qstringref/qstringref.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qstringref
QT = core testlib
SOURCES = tst_qstringref.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
index 82d103c460..25b97ceaa8 100644
--- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
+++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
@@ -1,31 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2016 Intel Corporation.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -45,6 +41,7 @@ class tst_QStringRef : public QObject
public slots:
void cleanup();
private slots:
+ void at();
void endsWith();
void startsWith();
void contains();
@@ -55,6 +52,7 @@ private slots:
void indexOf();
void indexOf2_data();
void indexOf2();
+ void iteration();
void length_data();
void length();
void isEmpty();
@@ -97,7 +95,7 @@ static QStringRef emptyRef()
}
#define CREATE_REF(string) \
- const QString padded = QString::fromLatin1(" %1 ").arg(string); \
+ const QString padded = QLatin1Char(' ') + string + QLatin1Char(' '); \
QStringRef ref = padded.midRef(1, padded.size() - 2);
typedef QList<int> IntList;
@@ -176,6 +174,16 @@ void tst_QStringRef::cleanup()
QLocale::setDefault(QString(QLatin1Char('C')));
}
+void tst_QStringRef::at()
+{
+ const QString hw = QStringLiteral("Hello World");
+ const QStringRef ref = hw.midRef(6);
+ QCOMPARE(ref.at(0), QChar('W'));
+ QCOMPARE(ref.at(4), QChar('d'));
+ QCOMPARE(ref[0], QChar('W'));
+ QCOMPARE(ref[4], QChar('d'));
+}
+
void tst_QStringRef::length_data()
{
QTest::addColumn<QString>("s1");
@@ -292,7 +300,7 @@ void tst_QStringRef::indexOf_data()
QString s2;
s2 += QChar(0x3bc);
QTest::newRow("data58") << QString(s1) << QString(s2) << 0 << false << 3;
- s2.prepend("C");
+ s2.prepend(QLatin1Char('C'));
QTest::newRow("data59") << QString(s1) << QString(s2) << 0 << false << 2;
QString veryBigHaystack(500, 'a');
@@ -317,8 +325,8 @@ void tst_QStringRef::indexOf()
QFETCH(bool, bcs);
QFETCH(int, resultpos);
- const QString haystackPadded = QString::fromLatin1(" %1 ").arg(haystack);
- const QString needlePadded = QString::fromLatin1(" %1 ").arg(needle);
+ const QString haystackPadded = QLatin1Char(' ') + haystack + QLatin1Char(' ');
+ const QString needlePadded = QLatin1Char(' ') + needle + QLatin1Char(' ');
const QStringRef haystackRef(&haystackPadded, 1, haystack.size());
const QStringRef needleRef(&needlePadded, 1, needle.size());
@@ -407,8 +415,8 @@ void tst_QStringRef::indexOf2()
QFETCH(QString, needle);
QFETCH(int, resultpos);
- const QString haystackPadded = QString::fromLatin1(" %1 ").arg(haystack);
- const QString needlePadded = QString::fromLatin1(" %1 ").arg(needle);
+ const QString haystackPadded = QLatin1Char(' ') + haystack + QLatin1Char(' ');
+ const QString needlePadded = QLatin1Char(' ') + needle + QLatin1Char(' ');
const QStringRef haystackRef(&haystackPadded, 1, haystack.size());
const QStringRef needleRef(&needlePadded, 1, needle.size());
@@ -439,6 +447,38 @@ void tst_QStringRef::indexOf2()
}
}
+void tst_QStringRef::iteration()
+{
+ QString hello = "Hello";
+ QString olleh = "olleH";
+
+ QStringRef ref(&hello);
+ QStringRef rref(&olleh);
+
+ const QStringRef &cref = ref;
+ const QStringRef &crref = rref;
+
+ QVERIFY(std::equal( ref.begin(), ref.end(), hello.begin()));
+ QVERIFY(std::equal( rref.begin(), rref.end(), olleh.begin()));
+ QVERIFY(std::equal( cref.begin(), cref.end(), hello.begin()));
+ QVERIFY(std::equal(crref.begin(), crref.end(), olleh.begin()));
+
+ QVERIFY(std::equal( ref.cbegin(), ref.cend(), hello.begin()));
+ QVERIFY(std::equal( rref.cbegin(), rref.cend(), olleh.begin()));
+ QVERIFY(std::equal( cref.cbegin(), cref.cend(), hello.begin()));
+ QVERIFY(std::equal(crref.cbegin(), crref.cend(), olleh.begin()));
+
+ QVERIFY(std::equal( ref.rbegin(), ref.rend(), hello.rbegin()));
+ QVERIFY(std::equal( rref.rbegin(), rref.rend(), olleh.rbegin()));
+ QVERIFY(std::equal( cref.rbegin(), cref.rend(), hello.rbegin()));
+ QVERIFY(std::equal(crref.rbegin(), crref.rend(), olleh.rbegin()));
+
+ QVERIFY(std::equal( ref.crbegin(), ref.crend(), hello.rbegin()));
+ QVERIFY(std::equal( rref.crbegin(), rref.crend(), olleh.rbegin()));
+ QVERIFY(std::equal( cref.crbegin(), cref.crend(), hello.rbegin()));
+ QVERIFY(std::equal(crref.crbegin(), crref.crend(), olleh.rbegin()));
+}
+
void tst_QStringRef::lastIndexOf_data()
{
QTest::addColumn<QString>("haystack");
@@ -490,8 +530,8 @@ void tst_QStringRef::lastIndexOf()
QFETCH(int, expected);
QFETCH(bool, caseSensitive);
- const QString haystackPadded = QString::fromLatin1(" %1 ").arg(haystack);
- const QString needlePadded = QString::fromLatin1(" %1 ").arg(needle);
+ const QString haystackPadded = QLatin1Char(' ') + haystack + QLatin1Char(' ');
+ const QString needlePadded = QLatin1Char(' ') + needle + QLatin1Char(' ');
const QStringRef haystackRef(&haystackPadded, 1, haystack.size());
const QStringRef needleRef(&needlePadded, 1, needle.size());
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
index 29b9854ebb..8e0216b175 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
@@ -1,12 +1,11 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtextboundaryfinder
QT = core testlib
SOURCES = tst_qtextboundaryfinder.cpp
TESTDATA += data
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index 753d61f02c..4c9916cc52 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -166,8 +161,8 @@ static void generateDataFromFile(const QString &fname)
}
}
- QString nm = QString("line #%1: %2").arg(linenum).arg(comments);
- QTest::newRow(nm.toLatin1()) << testString << expectedBreakPositions;
+ const QByteArray nm = "line #" + QByteArray::number(linenum) + ": " + comments.toLatin1();
+ QTest::newRow(nm.constData()) << testString << expectedBreakPositions;
}
}
#endif
diff --git a/tests/auto/corelib/tools/qtime/qtime.pro b/tests/auto/corelib/tools/qtime/qtime.pro
index 48db4c6664..0973b7a9ef 100644
--- a/tests/auto/corelib/tools/qtime/qtime.pro
+++ b/tests/auto/corelib/tools/qtime/qtime.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtime
QT = core testlib
SOURCES = tst_qtime.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
index 213b817c3d..45af10c3ab 100644
--- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp
+++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qtimeline/qtimeline.pro b/tests/auto/corelib/tools/qtimeline/qtimeline.pro
index ca8eba41fb..9424cf8fd2 100644
--- a/tests/auto/corelib/tools/qtimeline/qtimeline.pro
+++ b/tests/auto/corelib/tools/qtimeline/qtimeline.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtimeline
QT = core testlib
SOURCES = tst_qtimeline.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
index dd41b5632d..cf43e391b5 100644
--- a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qtimezone/qtimezone.pro b/tests/auto/corelib/tools/qtimezone/qtimezone.pro
index fa2397a6bb..4459ed6020 100644
--- a/tests/auto/corelib/tools/qtimezone/qtimezone.pro
+++ b/tests/auto/corelib/tools/qtimezone/qtimezone.pro
@@ -1,8 +1,7 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qtimezone
QT = core-private testlib
SOURCES = tst_qtimezone.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
contains(QT_CONFIG,icu) {
DEFINES += QT_USE_ICU
}
diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
index ce72e7ca7f..c631b395f8 100644
--- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
+++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/tools/qvarlengtharray/qvarlengtharray.pro b/tests/auto/corelib/tools/qvarlengtharray/qvarlengtharray.pro
index 4fb8a1cf30..108fb33db5 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/qvarlengtharray.pro
+++ b/tests/auto/corelib/tools/qvarlengtharray/qvarlengtharray.pro
@@ -1,5 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
TARGET = tst_qvarlengtharray
QT = core testlib
SOURCES = tst_qvarlengtharray.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index 82f78b2b0b..7fc44343a5 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -148,14 +143,14 @@ void tst_QVarLengthArray::oldTests()
QVarLengthArray<QString> sa(10);
sa[0] = "Hello";
sa[9] = "World";
- QVERIFY(*sa.data() == "Hello");
- QVERIFY(sa[9] == "World");
+ QCOMPARE(*sa.data(), QLatin1String("Hello"));
+ QCOMPARE(sa[9], QLatin1String("World"));
sa.reserve(512);
- QVERIFY(*sa.data() == "Hello");
- QVERIFY(sa[9] == "World");
+ QCOMPARE(*sa.data(), QLatin1String("Hello"));
+ QCOMPARE(sa[9], QLatin1String("World"));
sa.resize(512);
- QVERIFY(*sa.data() == "Hello");
- QVERIFY(sa[9] == "World");
+ QCOMPARE(*sa.data(), QLatin1String("Hello"));
+ QCOMPARE(sa[9], QLatin1String("World"));
}
{
int arr[2] = {1, 2};
diff --git a/tests/auto/corelib/tools/qvector/qvector.pro b/tests/auto/corelib/tools/qvector/qvector.pro
index c1e0564915..d49516923f 100644
--- a/tests/auto/corelib/tools/qvector/qvector.pro
+++ b/tests/auto/corelib/tools/qvector/qvector.pro
@@ -1,6 +1,5 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
contains(QT_CONFIG, c++11):CONFIG += c++11
TARGET = tst_qvector
QT = core testlib
SOURCES = $$PWD/tst_qvector.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index 7c90f05ea4..374fec221e 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -740,10 +735,11 @@ void tst_QVector::clear() const
QVector<T> myvec;
myvec << SimpleValue<T>::at(0) << SimpleValue<T>::at(1) << SimpleValue<T>::at(2);
- QVERIFY(myvec.size() == 3);
+ const auto oldCapacity = myvec.capacity();
+ QCOMPARE(myvec.size(), 3);
myvec.clear();
- QVERIFY(myvec.size() == 0);
- QVERIFY(myvec.capacity() == 0);
+ QCOMPARE(myvec.size(), 0);
+ QCOMPARE(myvec.capacity(), oldCapacity);
}
void tst_QVector::clearInt() const
@@ -1951,7 +1947,7 @@ void tst_QVector::resizePOD() const
const int capacity = vector.capacity();
- vector.resize(0);
+ vector.clear();
QCOMPARE(vector.size(), 0);
QVERIFY(vector.capacity() <= capacity);
}
@@ -2413,6 +2409,7 @@ void tst_QVector::reallocAfterCopy_data()
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
@@ -2436,7 +2433,8 @@ void tst_QVector::reallocAfterCopy_data()
result3 = i - 10;
result4 = i - 20;
}
- QTest::newRow(qPrintable(QString("reallocAfterCopy:%1,%2").arg(i).arg(j))) << i << fill_size << j << result1 << result2 << result3 << result4;
+ QTest::newRow((prefix + QByteArray::number(j)).constData())
+ << i << fill_size << j << result1 << result2 << result3 << result4;
}
}
}
diff --git a/tests/auto/corelib/tools/qversionnumber/qversionnumber.pro b/tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
index e83a2b507c..834fc85a29 100644
--- a/tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
+++ b/tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
@@ -1,4 +1,4 @@
-CONFIG += testcase parallel_test
+CONFIG += testcase
contains(QT_CONFIG, c++11):CONFIG += c++11
contains(QT_CONFIG, c++14):CONFIG += c++14
TARGET = tst_qversionnumber
diff --git a/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp b/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
index 0b8b63a1e8..34d9256244 100644
--- a/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
+++ b/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
@@ -1,32 +1,27 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2014 Keith Gardner <kreios4004@gmail.com>
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/xml/qxmlstream/qc14n.h b/tests/auto/corelib/xml/qxmlstream/qc14n.h
index 72cd6d9d4b..e4056fb0db 100644
--- a/tests/auto/corelib/xml/qxmlstream/qc14n.h
+++ b/tests/auto/corelib/xml/qxmlstream/qc14n.h
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
diff --git a/tests/auto/corelib/xml/qxmlstream/qxmlstream.pro b/tests/auto/corelib/xml/qxmlstream/qxmlstream.pro
index 0a9580da62..0a739f0a0e 100644
--- a/tests/auto/corelib/xml/qxmlstream/qxmlstream.pro
+++ b/tests/auto/corelib/xml/qxmlstream/qxmlstream.pro
@@ -1,8 +1,6 @@
CONFIG += testcase
-CONFIG += parallel_test
TARGET = tst_qxmlstream
QT = core xml network testlib
SOURCES = tst_qxmlstream.cpp
TESTDATA += data XML-Test-Suite
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/xml/qxmlstream/setupSuite.sh b/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
index fc32c87524..8dc9b7d551 100755
--- a/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
+++ b/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
@@ -1,32 +1,27 @@
#!/bin/sh
#############################################################################
##
-## Copyright (C) 2015 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:LGPL21$
+## $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 http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+## 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$
##
diff --git a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
index 686b8f22fa..9556a167c5 100644
--- a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** 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:LGPL21$
+** $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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** 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$
**
@@ -119,7 +114,7 @@ static QByteArray makeCanonical(const QString &filename,
if (notation.publicId().isEmpty()) {
writeDtd << " SYSTEM \'";
writeDtd << notation.systemId().toString();
- writeDtd << "\'";
+ writeDtd << '\'';
} else {
writeDtd << " PUBLIC \'";
writeDtd << notation.publicId().toString();
@@ -127,10 +122,10 @@ static QByteArray makeCanonical(const QString &filename,
if (!notation.systemId().isEmpty() ) {
writeDtd << " \'";
writeDtd << notation.systemId().toString();
- writeDtd << "\'";
+ writeDtd << '\'';
}
}
- writeDtd << ">";
+ writeDtd << '>';
writeDtd << endl;
}
@@ -157,7 +152,7 @@ static QByteArray makeCanonical(const QString &filename,
text.indexOf(QLatin1Char(13), p),
text.indexOf(QLatin1Char(9), p))) >= 0) {
writer.writeCharacters(text.mid(p, i - p));
- writer.writeEntityReference(QString("#%1").arg(text.at(i).unicode()));
+ writer.writeEntityReference(QLatin1Char('#') + QString::number(text.at(i).unicode()));
p = i + 1;
}
writer.writeCharacters(text.mid(p));
@@ -357,7 +352,7 @@ public:
QFile inputFile(inputFilePath);
if(!inputFile.open(QIODevice::ReadOnly))
{
- failures.append(qMakePair(id, QString::fromLatin1("Failed to open input file %1").arg(inputFilePath)));
+ failures.append(qMakePair(id, QLatin1String("Failed to open input file ") + inputFilePath));
return true;
}
@@ -365,8 +360,8 @@ public:
{
if(isWellformed(&inputFile, ParseSinglePass))
{
- failures.append(qMakePair(id, QString::fromLatin1("Failed to flag %1 as not well-formed.")
- .arg(inputFilePath)));
+ failures.append(qMakePair(id, QLatin1String("Failed to flag ") + inputFilePath
+ + QLatin1String(" as not well-formed.")));
/* Exit, the incremental test will fail as well, no need to flood the output. */
return true;
@@ -376,8 +371,8 @@ public:
if(isWellformed(&inputFile, ParseIncrementally))
{
- failures.append(qMakePair(id, QString::fromLatin1("Failed to flag %1 as not well-formed with incremental parsing.")
- .arg(inputFilePath)));
+ failures.append(qMakePair(id, QLatin1String("Failed to flag ") + inputFilePath
+ + QLatin1String(" as not well-formed with incremental parsing.")));
}
else
successes.append(id);
@@ -402,7 +397,7 @@ public:
if(!expectedFile.open(QIODevice::ReadOnly))
{
- failures.append(qMakePair(id, QString::fromLatin1("Failed to open baseline %1").arg(expectedFilePath)));
+ failures.append(qMakePair(id, QLatin1String("Failed to open baseline ") + expectedFilePath));
return true;
}
@@ -668,8 +663,10 @@ void tst_QXmlStream::reportSuccess_data() const
const int len = m_handler.successes.count();
- for(int i = 0; i < len; ++i)
- QTest::newRow(qPrintable(QString("%1. %2").arg(i).arg(m_handler.successes.at(i)))) << false;
+ for (int i = 0; i < len; ++i) {
+ const QByteArray testName = QByteArray::number(i) + ". " + m_handler.successes.at(i).toLatin1();
+ QTest::newRow(testName.constData()) << false;
+ }
if(len == 0)
QTest::newRow("No test cases succeeded.") << true;
@@ -690,7 +687,7 @@ QByteArray tst_QXmlStream::readFile(const QString &filename)
while (!reader.atEnd()) {
reader.readNext();
- writer << reader.tokenString() << "(";
+ writer << reader.tokenString() << '(';
if (reader.isWhitespace())
writer << " whitespace";
if (reader.isCDATA())
@@ -698,42 +695,42 @@ QByteArray tst_QXmlStream::readFile(const QString &filename)
if (reader.isStartDocument() && reader.isStandaloneDocument())
writer << " standalone";
if (!reader.text().isEmpty())
- writer << " text=\"" << reader.text().toString() << "\"";
+ writer << " text=\"" << reader.text().toString() << '"';
if (!reader.processingInstructionTarget().isEmpty())
- writer << " processingInstructionTarget=\"" << reader.processingInstructionTarget().toString() << "\"";
+ writer << " processingInstructionTarget=\"" << reader.processingInstructionTarget().toString() << '"';
if (!reader.processingInstructionData().isEmpty())
- writer << " processingInstructionData=\"" << reader.processingInstructionData().toString() << "\"";
+ writer << " processingInstructionData=\"" << reader.processingInstructionData().toString() << '"';
if (!reader.dtdName().isEmpty())
- writer << " dtdName=\"" << reader.dtdName().toString() << "\"";
+ writer << " dtdName=\"" << reader.dtdName().toString() << '"';
if (!reader.dtdPublicId().isEmpty())
- writer << " dtdPublicId=\"" << reader.dtdPublicId().toString() << "\"";
+ writer << " dtdPublicId=\"" << reader.dtdPublicId().toString() << '"';
if (!reader.dtdSystemId().isEmpty())
- writer << " dtdSystemId=\"" << reader.dtdSystemId().toString() << "\"";
+ writer << " dtdSystemId=\"" << reader.dtdSystemId().toString() << '"';
if (!reader.documentVersion().isEmpty())
- writer << " documentVersion=\"" << reader.documentVersion().toString() << "\"";
+ writer << " documentVersion=\"" << reader.documentVersion().toString() << '"';
if (!reader.documentEncoding().isEmpty())
- writer << " documentEncoding=\"" << reader.documentEncoding().toString() << "\"";
+ writer << " documentEncoding=\"" << reader.documentEncoding().toString() << '"';
if (!reader.name().isEmpty())
- writer << " name=\"" << reader.name().toString() << "\"";
+ writer << " name=\"" << reader.name().toString() << '"';
if (!reader.namespaceUri().isEmpty())
- writer << " namespaceUri=\"" << reader.namespaceUri().toString() << "\"";
+ writer << " namespaceUri=\"" << reader.namespaceUri().toString() << '"';
if (!reader.qualifiedName().isEmpty())
- writer << " qualifiedName=\"" << reader.qualifiedName().toString() << "\"";
+ writer << " qualifiedName=\"" << reader.qualifiedName().toString() << '"';
if (!reader.prefix().isEmpty())
- writer << " prefix=\"" << reader.prefix().toString() << "\"";
+ writer << " prefix=\"" << reader.prefix().toString() << '"';
if (reader.attributes().size()) {
foreach(QXmlStreamAttribute attribute, reader.attributes()) {
writer << endl << " Attribute(";
if (!attribute.name().isEmpty())
- writer << " name=\"" << attribute.name().toString() << "\"";
+ writer << " name=\"" << attribute.name().toString() << '"';
if (!attribute.namespaceUri().isEmpty())
- writer << " namespaceUri=\"" << attribute.namespaceUri().toString() << "\"";
+ writer << " namespaceUri=\"" << attribute.namespaceUri().toString() << '"';
if (!attribute.qualifiedName().isEmpty())
- writer << " qualifiedName=\"" << attribute.qualifiedName().toString() << "\"";
+ writer << " qualifiedName=\"" << attribute.qualifiedName().toString() << '"';
if (!attribute.prefix().isEmpty())
- writer << " prefix=\"" << attribute.prefix().toString() << "\"";
+ writer << " prefix=\"" << attribute.prefix().toString() << '"';
if (!attribute.value().isEmpty())
- writer << " value=\"" << attribute.value().toString() << "\"";
+ writer << " value=\"" << attribute.value().toString() << '"';
writer << " )" << endl;
}
}
@@ -741,9 +738,9 @@ QByteArray tst_QXmlStream::readFile(const QString &filename)
foreach(QXmlStreamNamespaceDeclaration namespaceDeclaration, reader.namespaceDeclarations()) {
writer << endl << " NamespaceDeclaration(";
if (!namespaceDeclaration.prefix().isEmpty())
- writer << " prefix=\"" << namespaceDeclaration.prefix().toString() << "\"";
+ writer << " prefix=\"" << namespaceDeclaration.prefix().toString() << '"';
if (!namespaceDeclaration.namespaceUri().isEmpty())
- writer << " namespaceUri=\"" << namespaceDeclaration.namespaceUri().toString() << "\"";
+ writer << " namespaceUri=\"" << namespaceDeclaration.namespaceUri().toString() << '"';
writer << " )" << endl;
}
}
@@ -751,11 +748,11 @@ QByteArray tst_QXmlStream::readFile(const QString &filename)
foreach(QXmlStreamNotationDeclaration notationDeclaration, reader.notationDeclarations()) {
writer << endl << " NotationDeclaration(";
if (!notationDeclaration.name().isEmpty())
- writer << " name=\"" << notationDeclaration.name().toString() << "\"";
+ writer << " name=\"" << notationDeclaration.name().toString() << '"';
if (!notationDeclaration.systemId().isEmpty())
- writer << " systemId=\"" << notationDeclaration.systemId().toString() << "\"";
+ writer << " systemId=\"" << notationDeclaration.systemId().toString() << '"';
if (!notationDeclaration.publicId().isEmpty())
- writer << " publicId=\"" << notationDeclaration.publicId().toString() << "\"";
+ writer << " publicId=\"" << notationDeclaration.publicId().toString() << '"';
writer << " )" << endl;
}
}
@@ -763,15 +760,15 @@ QByteArray tst_QXmlStream::readFile(const QString &filename)
foreach(QXmlStreamEntityDeclaration entityDeclaration, reader.entityDeclarations()) {
writer << endl << " EntityDeclaration(";
if (!entityDeclaration.name().isEmpty())
- writer << " name=\"" << entityDeclaration.name().toString() << "\"";
+ writer << " name=\"" << entityDeclaration.name().toString() << '"';
if (!entityDeclaration.notationName().isEmpty())
- writer << " notationName=\"" << entityDeclaration.notationName().toString() << "\"";
+ writer << " notationName=\"" << entityDeclaration.notationName().toString() << '"';
if (!entityDeclaration.systemId().isEmpty())
- writer << " systemId=\"" << entityDeclaration.systemId().toString() << "\"";
+ writer << " systemId=\"" << entityDeclaration.systemId().toString() << '"';
if (!entityDeclaration.publicId().isEmpty())
- writer << " publicId=\"" << entityDeclaration.publicId().toString() << "\"";
+ writer << " publicId=\"" << entityDeclaration.publicId().toString() << '"';
if (!entityDeclaration.value().isEmpty())
- writer << " value=\"" << entityDeclaration.value().toString() << "\"";
+ writer << " value=\"" << entityDeclaration.value().toString() << '"';
writer << " )" << endl;
}
}
@@ -880,13 +877,13 @@ void tst_QXmlStream::testFalsePrematureError() const
while (!xml.atEnd()) {
xml.readNext();
}
- QVERIFY(xml.error() == QXmlStreamReader::PrematureEndOfDocumentError);
+ QCOMPARE(xml.error(), QXmlStreamReader::PrematureEndOfDocumentError);
QCOMPARE(xml.errorString(), QLatin1String("Premature end of document."));
xml.addData(legal_start);
while (!xml.atEnd()) {
xml.readNext();
}
- QVERIFY(xml.error() == QXmlStreamReader::PrematureEndOfDocumentError);
+ QCOMPARE(xml.error(), QXmlStreamReader::PrematureEndOfDocumentError);
QCOMPARE(xml.errorString(), QLatin1String("Premature end of document."));
xml.addData(end);
while (!xml.atEnd()) {
@@ -901,7 +898,7 @@ void tst_QXmlStream::testFalsePrematureError() const
}
QVERIFY(xml.hasError());
QCOMPARE(xml.errorString(), QLatin1String("Start tag expected."));
- QVERIFY(xml.error() == QXmlStreamReader::NotWellFormedError);
+ QCOMPARE(xml.error(), QXmlStreamReader::NotWellFormedError);
}
}
@@ -982,7 +979,8 @@ void tst_QXmlStream::writeAttributesWithSpace() const
writer.writeEmptyElement("A");
writer.writeAttribute("attribute", QStringLiteral("value") + QChar(QChar::Nbsp));
writer.writeEndDocument();
- QString s = QString("<?xml version=\"1.0\" encoding=\"UTF-8\"?><A attribute=\"value%1\"/>\n").arg(QChar(QChar::Nbsp));
+ QString s = QLatin1String("<?xml version=\"1.0\" encoding=\"UTF-8\"?><A attribute=\"value")
+ + QChar(QChar::Nbsp) + QLatin1String("\"/>\n");
QCOMPARE(buffer.buffer().data(), s.toUtf8().data());
}
@@ -1055,11 +1053,11 @@ void tst_QXmlStream::readNextStartElement() const
QXmlStreamReader reader(in);
QVERIFY(reader.readNextStartElement());
- QVERIFY(reader.isStartElement() && reader.name() == "A");
+ QVERIFY(reader.isStartElement() && reader.name() == QLatin1String("A"));
int amountOfB = 0;
while (reader.readNextStartElement()) {
- QVERIFY(reader.isStartElement() && reader.name() == "B");
+ QVERIFY(reader.isStartElement() && reader.name() == QLatin1String("B"));
++amountOfB;
reader.skipCurrentElement();
}