summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro5
-rw-r--r--tests/auto/compilerwarnings/data/test_cpp.txt4
-rw-r--r--tests/auto/concurrent/concurrent.pro (renamed from tests/auto/corelib/concurrent/concurrent.pro)3
-rw-r--r--tests/auto/concurrent/qfuture/.gitignore (renamed from tests/auto/corelib/concurrent/qfuture/.gitignore)0
-rw-r--r--tests/auto/concurrent/qfuture/qfuture.pro (renamed from tests/auto/corelib/concurrent/qfuture/qfuture.pro)2
-rw-r--r--tests/auto/concurrent/qfuture/tst_qfuture.cpp (renamed from tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp)4
-rw-r--r--tests/auto/concurrent/qfuturesynchronizer/qfuturesynchronizer.pro (renamed from tests/auto/corelib/concurrent/qfuturesynchronizer/qfuturesynchronizer.pro)2
-rw-r--r--tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp (renamed from tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp)8
-rw-r--r--tests/auto/concurrent/qfuturewatcher/.gitignore (renamed from tests/auto/corelib/concurrent/qfuturewatcher/.gitignore)0
-rw-r--r--tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro (renamed from tests/auto/corelib/concurrent/qfuturewatcher/qfuturewatcher.pro)2
-rw-r--r--tests/auto/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp (renamed from tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp)9
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/.gitignore (renamed from tests/auto/corelib/concurrent/qtconcurrentfilter/.gitignore)0
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro (renamed from tests/auto/corelib/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro)2
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp (renamed from tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp)4
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/.gitignore (renamed from tests/auto/corelib/concurrent/qtconcurrentiteratekernel/.gitignore)0
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro (renamed from tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro)2
-rw-r--r--tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp (renamed from tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp)4
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/.gitignore (renamed from tests/auto/corelib/concurrent/qtconcurrentmap/.gitignore)0
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/functions.h (renamed from tests/auto/corelib/concurrent/qtconcurrentmap/functions.h)4
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro (renamed from tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro)2
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp (renamed from tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp)4
-rw-r--r--tests/auto/concurrent/qtconcurrentresultstore/qtconcurrentresultstore.pro (renamed from tests/auto/corelib/concurrent/qtconcurrentresultstore/qtconcurrentresultstore.pro)2
-rw-r--r--tests/auto/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp (renamed from tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp)4
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/.gitignore (renamed from tests/auto/corelib/concurrent/qtconcurrentrun/.gitignore)0
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro (renamed from tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro)2
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp (renamed from tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp)4
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/.gitignore (renamed from tests/auto/corelib/concurrent/qtconcurrentthreadengine/.gitignore)0
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro (renamed from tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro)2
-rw-r--r--tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp (renamed from tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp)4
-rw-r--r--tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp4
-rw-r--r--tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp4
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp4
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp4
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp4
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp4
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp4
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/main.cpp4
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp86
-rw-r--r--tests/auto/corelib/codecs/utf8/tst_utf8.cpp4
-rw-r--r--tests/auto/corelib/corelib.pro3
-rw-r--r--tests/auto/corelib/global/global.pro3
-rw-r--r--tests/auto/corelib/global/q_func_info/tst_q_func_info.cpp4
-rw-r--r--tests/auto/corelib/global/qflags/tst_qflags.cpp4
-rw-r--r--tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp4
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp4
-rw-r--r--tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro4
-rw-r--r--tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp147
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp4
-rw-r--r--tests/auto/corelib/global/qrand/tst_qrand.cpp4
-rw-r--r--tests/auto/corelib/io/io.pro6
-rw-r--r--tests/auto/corelib/io/largefile/tst_largefile.cpp4
-rw-r--r--tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp97
-rw-r--r--tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp4
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp66
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp69
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp4
-rw-r--r--tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp4
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp6
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp4
-rw-r--r--tests/auto/corelib/io/qfile/stdinprocess/main.cpp4
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro9
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp16
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp36
-rw-r--r--tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp4
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp4
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp4
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp4
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp31
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp4
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp4
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp4
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp5
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp7
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp7
-rw-r--r--tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp4
-rw-r--r--tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp4
-rw-r--r--tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp4
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp19
-rw-r--r--tests/auto/corelib/io/qurl/idna-test.c4
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp157
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro4
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp212
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp167
-rw-r--r--tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h4
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp4
-rw-r--r--tests/auto/corelib/json/json.pro8
-rw-r--r--tests/auto/corelib/json/test.bjsonbin0 -> 60992 bytes
-rw-r--r--tests/auto/corelib/json/test.json66
-rw-r--r--tests/auto/corelib/json/test2.json1
-rw-r--r--tests/auto/corelib/json/test3.json15
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp1589
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro2
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp126
-rw-r--r--tests/auto/corelib/kernel/qeventloop/qeventloop.pro2
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp86
-rw-r--r--tests/auto/corelib/kernel/qmath/tst_qmath.cpp4
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp4
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp387
-rw-r--r--tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp4
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp107
-rw-r--r--tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp4
-rw-r--r--tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp4
-rw-r--r--tests/auto/corelib/kernel/qobject/oldnormalizeobject.h4
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp4
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.h4
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp75
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.pro4
-rw-r--r--tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp4
-rw-r--r--tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp4
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp4
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp4
-rw-r--r--tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp4
-rw-r--r--tests/auto/corelib/kernel/qvariant/qvariant.pro1
-rw-r--r--tests/auto/corelib/kernel/qvariant/qvariant.qrc6
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/bool.binbin0 -> 18 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/char.binbin0 -> 18 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/double.binbin0 -> 29 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/float.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/int.binbin0 -> 19 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/long.binbin0 -> 25 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitarray.binbin0 -> 31 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitmap.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbrush.binbin0 -> 105 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbytearray.binbin0 -> 33 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qchar.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcolor.binbin0 -> 32 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcursor.binbin0 -> 25 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdate.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdatetime.binbin0 -> 36 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qeasingcurve.binbin0 -> 43 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qfont.binbin0 -> 73 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qicon.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qimage.binbin0 -> 25 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qkeysequence.binbin0 -> 41 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qline.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlinef.binbin0 -> 53 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlocale.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlonglong.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix.binbin0 -> 71 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix4x4.binbin0 -> 157 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpalette.binbin0 -> 5065 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpen.binbin0 -> 132 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpixmap.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpoint.binbin0 -> 29 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpointf.binbin0 -> 39 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpolygon.binbin0 -> 29 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qquaternion.binbin0 -> 63 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrect.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrectf.binbin0 -> 53 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregexp.binbin0 -> 30 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregion.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsize.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizef.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizepolicy.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstring.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstringlist.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextformat.binbin0 -> 39 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextlength.binbin0 -> 43 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtime.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtransform.binbin0 -> 101 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qulonglong.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qurl.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariant.binbin0 -> 34 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvarianthash.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantlist.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantmap.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector2d.binbin0 -> 43 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector3d.binbin0 -> 51 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector4d.binbin0 -> 59 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/short.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/uchar.binbin0 -> 20 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/uint.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/ulong.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/ushort.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt4.9/void.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/bool.binbin0 -> 18 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/char.binbin0 -> 18 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/double.binbin0 -> 29 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/float.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/int.binbin0 -> 19 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/long.binbin0 -> 25 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitarray.binbin0 -> 31 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitmap.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbrush.binbin0 -> 105 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbytearray.binbin0 -> 33 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qchar.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcolor.binbin0 -> 32 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcursor.binbin0 -> 25 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdate.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdatetime.binbin0 -> 36 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qeasingcurve.binbin0 -> 43 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qfont.binbin0 -> 89 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qicon.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qimage.binbin0 -> 25 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qkeysequence.binbin0 -> 41 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qline.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlinef.binbin0 -> 53 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlocale.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlonglong.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix.binbin0 -> 71 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix4x4.binbin0 -> 157 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpalette.binbin0 -> 5065 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpen.binbin0 -> 132 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpixmap.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpoint.binbin0 -> 29 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpointf.binbin0 -> 39 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygon.binbin0 -> 29 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygonf.binbin0 -> 31 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qquaternion.binbin0 -> 63 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrect.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrectf.binbin0 -> 53 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregexp.binbin0 -> 30 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregion.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsize.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizef.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizepolicy.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstring.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstringlist.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextformat.binbin0 -> 39 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextlength.binbin0 -> 43 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtime.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtransform.binbin0 -> 101 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qulonglong.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qurl.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/quuid.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariant.binbin0 -> 34 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvarianthash.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantlist.binbin0 -> 37 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantmap.binbin0 -> 35 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector2d.binbin0 -> 43 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector3d.binbin0 -> 51 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector4d.binbin0 -> 59 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/short.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/uchar.binbin0 -> 20 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/uint.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/ulong.binbin0 -> 27 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/ushort.binbin0 -> 23 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/stream/qt5.0/void.binbin0 -> 21 bytes
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp186
-rw-r--r--tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp4
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/mylib.c4
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/mylib.c4
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp72
-rw-r--r--tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp4
-rw-r--r--tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp4
-rw-r--r--tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/mylib.c4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h4
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp4
-rw-r--r--tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp4
-rw-r--r--tests/auto/corelib/plugin/quuid/tst_quuid.cpp4
-rw-r--r--tests/auto/corelib/statemachine/qstate/tst_qstate.cpp4
-rw-r--r--tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp4
-rw-r--r--tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp4
-rw-r--r--tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp4
-rw-r--r--tests/auto/corelib/thread/qmutex/tst_qmutex.cpp4
-rw-r--r--tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp4
-rw-r--r--tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp4
-rw-r--r--tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp4
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp4
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp4
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp4
-rw-r--r--tests/auto/corelib/thread/qthreadonce/qthreadonce.h5
-rw-r--r--tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp4
-rw-r--r--tests/auto/corelib/thread/qthreadpool/.gitignore (renamed from tests/auto/corelib/concurrent/qthreadpool/.gitignore)0
-rw-r--r--tests/auto/corelib/thread/qthreadpool/qthreadpool.pro (renamed from tests/auto/corelib/concurrent/qthreadpool/qthreadpool.pro)0
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp (renamed from tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp)4
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp4
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp4
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp4
-rw-r--r--tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp4
-rw-r--r--tests/auto/corelib/thread/thread.pro1
-rw-r--r--tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp33
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp4
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp86
-rw-r--r--tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp4
-rw-r--r--tests/auto/corelib/tools/qcache/tst_qcache.cpp4
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp4
-rw-r--r--tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp4
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp4
-rw-r--r--tests/auto/corelib/tools/qdate/tst_qdate.cpp456
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp24
-rw-r--r--tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp4
-rw-r--r--tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp4
-rw-r--r--tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp4
-rw-r--r--tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp4
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp4
-rw-r--r--tests/auto/corelib/tools/qline/tst_qline.cpp4
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp4
-rw-r--r--tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp4
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp44
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp4
-rw-r--r--tests/auto/corelib/tools/qmargins/tst_qmargins.cpp4
-rw-r--r--tests/auto/corelib/tools/qpoint/tst_qpoint.cpp4
-rw-r--r--tests/auto/corelib/tools/qqueue/tst_qqueue.cpp4
-rw-r--r--tests/auto/corelib/tools/qrect/tst_qrect.cpp4
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp10
-rw-r--r--tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp4
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp4
-rw-r--r--tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp4
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp23
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.h4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/wrapper.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/wrapper.h4
-rw-r--r--tests/auto/corelib/tools/qsize/tst_qsize.cpp4
-rw-r--r--tests/auto/corelib/tools/qsizef/tst_qsizef.cpp4
-rw-r--r--tests/auto/corelib/tools/qstl/tst_qstl.cpp4
-rw-r--r--tests/auto/corelib/tools/qstring/double_data.h4
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp383
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringref/tst_qstringref.cpp4
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp4
-rw-r--r--tests/auto/corelib/tools/qtime/tst_qtime.cpp12
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp4
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp4
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp4
-rw-r--r--tests/auto/corelib/xml/qxmlstream/qc14n.h4
-rwxr-xr-xtests/auto/corelib/xml/qxmlstream/setupSuite.sh4
-rw-r--r--tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp10
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/myobject.h4
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp4
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/interface.cpp4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/interface.h4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/pinger.cpp4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/pinger.h4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp4
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp4
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp4
-rw-r--r--tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp4
-rw-r--r--tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp4
-rw-r--r--tests/auto/dbus/qdbusinterface/myobject.h4
-rw-r--r--tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp4
-rw-r--r--tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp6
-rw-r--r--tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp4
-rw-r--r--tests/auto/dbus/qdbusmarshall/common.h4
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp4
-rw-r--r--tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp4
-rw-r--r--tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp4
-rw-r--r--tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp4
-rw-r--r--tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp4
-rw-r--r--tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp4
-rw-r--r--tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp4
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp4
-rw-r--r--tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp4
-rw-r--r--tests/auto/dbus/qdbustype/tst_qdbustype.cpp4
-rw-r--r--tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp142
-rw-r--r--tests/auto/gui/image/qicoimageformat/qicoimageformat.pro8
-rw-r--r--tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp10
-rw-r--r--tests/auto/gui/image/qicon/qicon.pro11
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp65
-rw-r--r--tests/auto/gui/image/qimage/images/image.tifbin2242 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimage/qimage.pro9
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp49
-rw-r--r--tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp4
-rw-r--r--tests/auto/gui/image/qimagereader/images/ball.mngbin34394 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/corrupt-data.tifbin8590 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/corrupt.mngbin183 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/fire.mngbin44430 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/grayscale-ref.tifbin256182 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/grayscale.tifbin64162 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/image_100dpi.tifbin2242 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tifbin4784 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/rgba_lzw_littleendian.tifbin26690 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/rgba_nocompression_bigendian.tifbin160384 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/rgba_nocompression_littleendian.tifbin160388 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/rgba_packbits_littleendian.tifbin161370 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tifbin14728 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_1.tiffbin7740 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_2.tiffbin9570 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_3.tiffbin11392 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_4.tiffbin11392 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_5.tiffbin11392 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_6.tiffbin11392 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_7.tiffbin11392 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_8.tiffbin11392 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_1.tiffbin2382 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_2.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_3.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_4.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_5.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_6.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_7.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_8.tiffbin1608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/original_indexed.tiffbin5922 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/original_mono.tiffbin786 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/original_rgb.tiffbin12608 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_1.tiffbin15560 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_2.tiffbin17972 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_3.tiffbin17324 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_4.tiffbin17324 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_5.tiffbin17648 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_6.tiffbin17324 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_7.tiffbin17324 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_8.tiffbin17324 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagereader/qimagereader.qrc4
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp207
-rw-r--r--tests/auto/gui/image/qimagewriter/images/teapot.tiffbin262274 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qimagewriter/qimagewriter.pro10
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp169
-rw-r--r--tests/auto/gui/image/qmovie/animations/dutch.mngbin18534 -> 0 bytes
-rw-r--r--tests/auto/gui/image/qmovie/qmovie.pro1
-rw-r--r--tests/auto/gui/image/qmovie/tst_qmovie.cpp10
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp4
-rw-r--r--tests/auto/gui/image/qpixmap/qpixmap.pro20
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp22
-rw-r--r--tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp4
-rw-r--r--tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp4
-rw-r--r--tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp4
-rw-r--r--tests/auto/gui/kernel/kernel.pro3
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/main.cpp4
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/main.cpp4
-rw-r--r--tests/auto/gui/kernel/qclipboard/qclipboard.pro6
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/test.pro11
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp12
-rw-r--r--tests/auto/gui/kernel/qdrag/tst_qdrag.cpp4
-rw-r--r--tests/auto/gui/kernel/qevent/tst_qevent.cpp4
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp4
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp4
-rw-r--r--tests/auto/gui/kernel/qguiapplication/qguiapplication.pro4
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp156
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp4
-rw-r--r--tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp4
-rw-r--r--tests/auto/gui/kernel/qinputmethod/qinputmethod.pro4
-rw-r--r--tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp (renamed from tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp)144
-rw-r--r--tests/auto/gui/kernel/qinputpanel/qinputpanel.pro4
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp55
-rw-r--r--tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp4
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp4
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp4
-rw-r--r--tests/auto/gui/kernel/qscreen/tst_qscreen.cpp25
-rw-r--r--tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp4
-rw-r--r--tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp4
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp74
-rw-r--r--tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp4
-rw-r--r--tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp4
-rw-r--r--tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp4
-rw-r--r--tests/auto/gui/painting/qbrush/tst_qbrush.cpp4
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp4
-rw-r--r--tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp4
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro12
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp18
-rw-r--r--tests/auto/gui/painting/qpainter/utils/createImages/main.cpp4
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp12
-rw-r--r--tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp4
-rw-r--r--tests/auto/gui/painting/qpathclipper/pathcompare.h4
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.cpp4
-rw-r--r--tests/auto/gui/painting/qpathclipper/paths.h4
-rw-r--r--tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp4
-rw-r--r--tests/auto/gui/painting/qpen/tst_qpen.cpp4
-rw-r--r--tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp4
-rw-r--r--tests/auto/gui/painting/qprinter/tst_qprinter.cpp30
-rw-r--r--tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp6
-rw-r--r--tests/auto/gui/painting/qregion/tst_qregion.cpp4
-rw-r--r--tests/auto/gui/painting/qtransform/tst_qtransform.cpp4
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp4
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp13
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp4
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp4
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp6
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp12
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp4
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp4
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp8
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp4
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp4
-rw-r--r--tests/auto/gui/text/qtextblock/tst_qtextblock.cpp4
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp22
-rw-r--r--tests/auto/gui/text/qtextdocument/common.h4
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp11
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp4
-rw-r--r--tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp13
-rw-r--r--tests/auto/gui/text/qtextformat/tst_qtextformat.cpp4
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp20
-rw-r--r--tests/auto/gui/text/qtextlist/tst_qtextlist.cpp4
-rw-r--r--tests/auto/gui/text/qtextobject/tst_qtextobject.cpp4
-rw-r--r--tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp4
-rw-r--r--tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp4
-rw-r--r--tests/auto/gui/text/qtextscriptengine/generate/main.cpp4
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp34
-rw-r--r--tests/auto/gui/text/qtexttable/tst_qtexttable.cpp4
-rw-r--r--tests/auto/gui/text/qzip/tst_qzip.cpp4
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp4
-rw-r--r--tests/auto/network-settings.h4
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp4
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp4
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp4
-rw-r--r--tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp4
-rw-r--r--tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp4
-rw-r--r--tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp4
-rw-r--r--tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp4
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp4
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp7
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/main.cpp4
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp4
-rw-r--r--tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp4
-rw-r--r--tests/auto/network/bearer/qbearertestcommon.h4
-rw-r--r--tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp4
-rw-r--r--tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp4
-rw-r--r--tests/auto/network/bearer/qnetworksession/lackey/main.cpp4
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp20
-rw-r--r--tests/auto/network/kernel/kernel.pro2
-rw-r--r--tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp4
-rw-r--r--tests/auto/network/kernel/qdnslookup/qdnslookup.pro7
-rw-r--r--tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp274
-rw-r--r--tests/auto/network/kernel/qdnslookup_appless/qdnslookup_appless.pro7
-rw-r--r--tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp92
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp7
-rw-r--r--tests/auto/network/kernel/qhostinfo/qhostinfo.pro2
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp4
-rw-r--r--tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp4
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp4
-rw-r--r--tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp4
-rw-r--r--tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp4
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp4
-rw-r--r--tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp4
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp6
-rw-r--r--tests/auto/network/socket/qlocalsocket/example/client/main.cpp4
-rw-r--r--tests/auto/network/socket/qlocalsocket/example/server/main.cpp4
-rw-r--r--tests/auto/network/socket/qlocalsocket/lackey/main.cpp4
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp4
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp4
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/main.cpp4
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp4
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp4
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/Test.h4
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/main.cpp4
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp4
-rw-r--r--tests/auto/network/socket/qudpsocket/clientserver/main.cpp4
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp4
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/main.cpp4
-rwxr-xr-xtests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh4
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp8
-rw-r--r--tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp4
-rw-r--r--tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp4
-rwxr-xr-xtests/auto/network/ssl/qsslkey/keys/genkeys.sh4
-rw-r--r--tests/auto/network/ssl/qsslkey/qsslkey.pro1
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp4
-rw-r--r--tests/auto/network/ssl/qsslsocket/qsslsocket.pro1
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp118
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp4
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp4
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp4
-rw-r--r--tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp4
-rw-r--r--tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp4
-rw-r--r--tests/auto/opengl/qglthreads/tst_qglthreads.cpp4
-rw-r--r--tests/auto/opengl/qglthreads/tst_qglthreads.h4
-rw-r--r--tests/auto/other/atwrapper/atWrapper.cpp4
-rw-r--r--tests/auto/other/atwrapper/atWrapper.h4
-rw-r--r--tests/auto/other/atwrapper/atWrapperAutotest.cpp4
-rw-r--r--tests/auto/other/baselineexample/tst_baselineexample.cpp4
-rw-r--r--tests/auto/other/collections/tst_collections.cpp12
-rw-r--r--tests/auto/other/compiler/baseclass.cpp4
-rw-r--r--tests/auto/other/compiler/baseclass.h4
-rw-r--r--tests/auto/other/compiler/derivedclass.cpp4
-rw-r--r--tests/auto/other/compiler/derivedclass.h4
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp4
-rw-r--r--tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp4
-rw-r--r--tests/auto/other/exceptionsafety_objects/oomsimulator.h4
-rw-r--r--tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp4
-rw-r--r--tests/auto/other/gestures/tst_gestures.cpp4
-rw-r--r--tests/auto/other/headersclean/tst_headersclean.cpp4
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp4
-rw-r--r--tests/auto/other/lancelot/paintcommands.h4
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp4
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp4
-rw-r--r--tests/auto/other/macgui/guitest.cpp6
-rw-r--r--tests/auto/other/macgui/guitest.h4
-rw-r--r--tests/auto/other/macgui/tst_macgui.cpp4
-rw-r--r--tests/auto/other/macnativeevents/expectedeventlist.cpp4
-rw-r--r--tests/auto/other/macnativeevents/expectedeventlist.h4
-rw-r--r--tests/auto/other/macnativeevents/nativeeventlist.cpp4
-rw-r--r--tests/auto/other/macnativeevents/nativeeventlist.h4
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents.cpp4
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents.h4
-rw-r--r--tests/auto/other/macnativeevents/qnativeevents_mac.cpp4
-rw-r--r--tests/auto/other/macnativeevents/tst_macnativeevents.cpp4
-rw-r--r--tests/auto/other/macplist/app/main.cpp4
-rw-r--r--tests/auto/other/macplist/tst_macplist.cpp4
-rw-r--r--tests/auto/other/modeltest/dynamictreemodel.cpp4
-rw-r--r--tests/auto/other/modeltest/dynamictreemodel.h4
-rw-r--r--tests/auto/other/modeltest/modeltest.cpp4
-rw-r--r--tests/auto/other/modeltest/modeltest.h4
-rw-r--r--tests/auto/other/modeltest/tst_modeltest.cpp4
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp4
-rw-r--r--tests/auto/other/other.pro1
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp115
-rw-r--r--tests/auto/other/qcomplextext/bidireorderstring.h4
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp8
-rw-r--r--tests/auto/other/qdirectpainter/.gitignore2
-rw-r--r--tests/auto/other/qdirectpainter/qdirectpainter.pro5
-rw-r--r--tests/auto/other/qdirectpainter/runDirectPainter/runDirectPainter.pro7
-rw-r--r--tests/auto/other/qdirectpainter/test/test.pro7
-rw-r--r--tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp242
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp12
-rw-r--r--tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp4
-rw-r--r--tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp4
-rw-r--r--tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp4
-rw-r--r--tests/auto/other/qobjectrace/tst_qobjectrace.cpp4
-rw-r--r--tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp4
-rwxr-xr-xtests/auto/other/qtokenautomaton/generateTokenizers.sh4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp4
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h4
-rw-r--r--tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp4
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.cpp4
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.h4
-rw-r--r--tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp4
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/main.cpp4
-rw-r--r--tests/auto/platformquirks.h4
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp4
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h4
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp6
-rw-r--r--tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp4
-rw-r--r--tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp4
-rw-r--r--tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp4
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp34
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp4
-rw-r--r--tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp4
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp4
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp4
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp4
-rwxr-xr-xtests/auto/test.pl4
-rw-r--r--tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp4
-rw-r--r--tests/auto/testlib/selftests/alive/qtestalive.cpp4
-rw-r--r--tests/auto/testlib/selftests/alive/tst_alive.cpp4
-rw-r--r--tests/auto/testlib/selftests/assert/tst_assert.cpp4
-rw-r--r--tests/auto/testlib/selftests/badxml/tst_badxml.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp4
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp4
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp4
-rw-r--r--tests/auto/testlib/selftests/counting/counting.pro7
-rw-r--r--tests/auto/testlib/selftests/counting/tst_counting.cpp216
-rw-r--r--tests/auto/testlib/selftests/crashes/tst_crashes.cpp4
-rw-r--r--tests/auto/testlib/selftests/datatable/tst_datatable.cpp4
-rw-r--r--tests/auto/testlib/selftests/datetime/tst_datetime.cpp4
-rw-r--r--tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp4
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp4
-rw-r--r--tests/auto/testlib/selftests/expected_counting.lightxml78
-rw-r--r--tests/auto/testlib/selftests/expected_counting.txt32
-rw-r--r--tests/auto/testlib/selftests/expected_counting.xml81
-rw-r--r--tests/auto/testlib/selftests/expected_counting.xunitxml46
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.lightxml46
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.txt54
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xml46
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xunitxml27
-rw-r--r--tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp83
-rw-r--r--tests/auto/testlib/selftests/failinit/tst_failinit.cpp4
-rw-r--r--tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp4
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp4
-rw-r--r--tests/auto/testlib/selftests/findtestdata/findtestdata.cpp14
-rw-r--r--tests/auto/testlib/selftests/float/tst_float.cpp4
-rw-r--r--tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp4
-rw-r--r--tests/auto/testlib/selftests/longstring/tst_longstring.cpp4
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp4
-rw-r--r--tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp4
-rw-r--r--tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp4
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp4
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp4
-rw-r--r--tests/auto/testlib/selftests/selftests.pri2
-rw-r--r--tests/auto/testlib/selftests/selftests.qrc4
-rw-r--r--tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp4
-rw-r--r--tests/auto/testlib/selftests/skip/tst_skip.cpp4
-rw-r--r--tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp4
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp4
-rw-r--r--tests/auto/testlib/selftests/sleep/tst_sleep.cpp4
-rw-r--r--tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp4
-rw-r--r--tests/auto/testlib/selftests/subtest/tst_subtest.cpp4
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp5
-rw-r--r--tests/auto/testlib/selftests/warnings/tst_warnings.cpp4
-rw-r--r--tests/auto/testlib/selftests/xunit/tst_xunit.cpp4
-rw-r--r--tests/auto/tools/moc/Test.framework/Headers/testinterface.h4
-rw-r--r--tests/auto/tools/moc/assign-namespace.h4
-rw-r--r--tests/auto/tools/moc/backslash-newlines.h4
-rw-r--r--tests/auto/tools/moc/c-comments.h4
-rw-r--r--tests/auto/tools/moc/cstyle-enums.h4
-rw-r--r--tests/auto/tools/moc/cxx11-enums.h4
-rw-r--r--tests/auto/tools/moc/dir-in-include-path.h4
-rw-r--r--tests/auto/tools/moc/error-on-wrong-notify.h4
-rw-r--r--tests/auto/tools/moc/escapes-in-string-literals.h4
-rw-r--r--tests/auto/tools/moc/extraqualification.h4
-rw-r--r--tests/auto/tools/moc/forgotten-qinterface.h4
-rw-r--r--tests/auto/tools/moc/gadgetwithnoenums.h4
-rw-r--r--tests/auto/tools/moc/interface-from-framework.h4
-rw-r--r--tests/auto/tools/moc/macro-on-cmdline.h4
-rw-r--r--tests/auto/tools/moc/namespaced-flags.h4
-rw-r--r--tests/auto/tools/moc/no-keywords.h4
-rw-r--r--tests/auto/tools/moc/oldstyle-casts.h4
-rw-r--r--tests/auto/tools/moc/os9-newlines.h2
-rw-r--r--tests/auto/tools/moc/parse-boost.h4
-rw-r--r--tests/auto/tools/moc/pure-virtual-signals.h4
-rw-r--r--tests/auto/tools/moc/qinvokable.h4
-rw-r--r--tests/auto/tools/moc/qprivateslots.h4
-rw-r--r--tests/auto/tools/moc/single_function_keyword.h4
-rw-r--r--tests/auto/tools/moc/slots-with-void-template.h4
-rw-r--r--tests/auto/tools/moc/task189996.h4
-rw-r--r--tests/auto/tools/moc/task192552.h4
-rw-r--r--tests/auto/tools/moc/task234909.h4
-rw-r--r--tests/auto/tools/moc/task240368.h4
-rw-r--r--tests/auto/tools/moc/task87883.h4
-rw-r--r--tests/auto/tools/moc/template-gtgt.h4
-rw-r--r--tests/auto/tools/moc/testproject/Plugin/Plugin.h4
-rw-r--r--tests/auto/tools/moc/trigraphs.h4
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp4
-rw-r--r--tests/auto/tools/moc/using-namespaces.h4
-rw-r--r--tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h4
-rw-r--r--tests/auto/tools/moc/warn-on-property-without-read.h4
-rw-r--r--tests/auto/tools/moc/win-newlines.h4
-rw-r--r--tests/auto/tools/qmake/testcompiler.cpp4
-rw-r--r--tests/auto/tools/qmake/testcompiler.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object1.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object2.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object3.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object4.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object5.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object6.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object7.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object8.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findDeps/object9.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object1.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object2.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object3.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object4.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object5.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object6.h4
-rw-r--r--tests/auto/tools/qmake/testdata/findMocs/object7.h4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/1.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/2.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/one/1.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/one/2.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/two/1.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/two/2.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/wildcard21.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/functions/wildcard22.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/include_dir/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/include_dir/test_file.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/include_dir/test_file.h4
-rw-r--r--tests/auto/tools/qmake/testdata/include_function/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/install_depends/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/install_depends/test_file.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/install_depends/test_file.h4
-rw-r--r--tests/auto/tools/qmake/testdata/one_space/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/shadow_files/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/shadow_files/test_file.h4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/test_file.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/test_file.h4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple.h4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_lib/simple.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/simple_lib/simple.h4
-rw-r--r--tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h4
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp4
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h4
-rw-r--r--tests/auto/tools/qmake/tst_qmake.cpp4
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp4
-rw-r--r--tests/auto/tools/uic/baseline/batchtranslation.ui4
-rw-r--r--tests/auto/tools/uic/baseline/batchtranslation.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/config.ui4
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/finddialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/finddialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/formwindowsettings.ui4
-rw-r--r--tests/auto/tools/uic/baseline/formwindowsettings.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/listwidgeteditor.ui4
-rw-r--r--tests/auto/tools/uic/baseline/listwidgeteditor.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/newactiondialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/newactiondialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/newform.ui4
-rw-r--r--tests/auto/tools/uic/baseline/newform.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/orderdialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/orderdialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/paletteeditor.ui4
-rw-r--r--tests/auto/tools/uic/baseline/paletteeditor.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/phrasebookbox.ui4
-rw-r--r--tests/auto/tools/uic/baseline/phrasebookbox.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/plugindialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/plugindialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/previewwidget.ui4
-rw-r--r--tests/auto/tools/uic/baseline/previewwidget.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/qfiledialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/qfiledialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientdialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientdialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradienteditor.ui4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradienteditor.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientviewdialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/saveformastemplate.ui4
-rw-r--r--tests/auto/tools/uic/baseline/saveformastemplate.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/statistics.ui4
-rw-r--r--tests/auto/tools/uic/baseline/statistics.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/stringlisteditor.ui4
-rw-r--r--tests/auto/tools/uic/baseline/stringlisteditor.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui4
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/tablewidgeteditor.ui4
-rw-r--r--tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/translatedialog.ui4
-rw-r--r--tests/auto/tools/uic/baseline/translatedialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/treewidgeteditor.ui4
-rw-r--r--tests/auto/tools/uic/baseline/treewidgeteditor.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/trpreviewtool.ui4
-rw-r--r--tests/auto/tools/uic/baseline/trpreviewtool.ui.h4
-rw-r--r--tests/auto/tools/uic/tst_uic.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp8
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp6
-rw-r--r--tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp79
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp9
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp9
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm4
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp30
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp18
-rw-r--r--tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp22
-rw-r--r--tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp18
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp8
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp23
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp14
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp14
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp23
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp11
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp36
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp7
-rw-r--r--tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp539
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp10
-rw-r--r--tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qitemview/viewstotest.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp10
-rw-r--r--tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp24
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp7
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp10
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp4
-rw-r--r--tests/auto/widgets/kernel/kernel.pro2
-rw-r--r--tests/auto/widgets/kernel/qaction/tst_qaction.cpp4
-rw-r--r--tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp4
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro3
-rw-r--r--tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp4
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/base.cpp4
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/base.h4
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/main.cpp4
-rw-r--r--tests/auto/widgets/kernel/qapplication/modal/modal.pro3
-rw-r--r--tests/auto/widgets/kernel/qapplication/qapplication.pro8
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/test.pro18
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp606
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp4
-rw-r--r--tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro3
-rw-r--r--tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp4
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp10
-rw-r--r--tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp15
-rw-r--r--tests/auto/widgets/kernel/qwidget/qwidget.pro5
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp194
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h10
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm45
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp13
-rw-r--r--tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp6
-rw-r--r--tests/auto/widgets/shared/platforminputcontext.h4
-rw-r--r--tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp4
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp8
-rw-r--r--tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp4
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp23
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp4
-rw-r--r--tests/auto/widgets/util/qscroller/tst_qscroller.cpp4
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp4
-rw-r--r--tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp4
-rw-r--r--tests/auto/widgets/util/qundostack/tst_qundostack.cpp4
-rw-r--r--tests/auto/widgets/util/util.pro4
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp12
-rw-r--r--tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp4
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp26
-rw-r--r--tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp6
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp11
-rw-r--r--tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro4
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp54
-rw-r--r--tests/auto/widgets/widgets/qdial/tst_qdial.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp4
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp20
-rw-r--r--tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp47
-rw-r--r--tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp4
-rw-r--r--tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp30
-rw-r--r--tests/auto/widgets/widgets/qlabel/qlabel.pro9
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp8
-rw-r--r--tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp35
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp4
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp36
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp46
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp21
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp28
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp14
-rw-r--r--tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp6
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp9
-rw-r--r--tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp4
-rw-r--r--tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp6
-rw-r--r--tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp4
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp6
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro2
-rw-r--r--tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp6
-rw-r--r--tests/auto/widgets/widgets/qslider/tst_qslider.cpp4
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp12
-rw-r--r--tests/auto/widgets/widgets/qsplitter/qsplitter.pro9
-rw-r--r--tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp6
-rw-r--r--tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp4
-rw-r--r--tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.html (renamed from tests/auto/widgets/widgets/qtextbrowser.html)0
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro9
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp28
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp23
-rw-r--r--tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp15
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp4
-rw-r--r--tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp6
-rw-r--r--tests/auto/xml/dom/qdom/qdom.pro9
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp66
-rw-r--r--tests/auto/xml/sax/qxml/qxml.pro6
-rw-r--r--tests/auto/xml/sax/qxml/tst_qxml.cpp9
-rw-r--r--tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp4
-rwxr-xr-xtests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.h4
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp15
-rw-r--r--tests/baselineserver/shared/baselineprotocol.cpp4
-rw-r--r--tests/baselineserver/shared/baselineprotocol.h4
-rw-r--r--tests/baselineserver/shared/lookup3.cpp4
-rw-r--r--tests/baselineserver/shared/qbaselinetest.cpp4
-rw-r--r--tests/baselineserver/shared/qbaselinetest.h4
-rw-r--r--tests/baselineserver/src/baselineserver.cpp4
-rw-r--r--tests/baselineserver/src/baselineserver.h4
-rw-r--r--tests/baselineserver/src/main.cpp4
-rw-r--r--tests/baselineserver/src/report.cpp4
-rw-r--r--tests/baselineserver/src/report.h4
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/main.cpp4
-rw-r--r--tests/benchmarks/corelib/corelib.pro3
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h5
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qiodevice/main.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qtemporaryfile/main.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qurl/main.cpp4
-rw-r--r--tests/benchmarks/corelib/json/json.pro5
-rw-r--r--tests/benchmarks/corelib/json/numbers.json19
-rw-r--r--tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp126
-rw-r--r--tests/benchmarks/corelib/kernel/events/main.cpp4
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp4
-rw-r--r--tests/benchmarks/corelib/kernel/qmetaobject/main.cpp4
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp6
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/main.cpp4
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/object.cpp4
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/object.h4
-rw-r--r--tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp4
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp6
-rw-r--r--tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp4
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp25
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp4
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/.gitignore1
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro3
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp141
-rw-r--r--tests/benchmarks/corelib/tools/qbytearray/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qchar/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qhash/main.cpp (renamed from tests/benchmarks/corelib/tools/qhash/qhash_string.cpp)95
-rw-r--r--tests/benchmarks/corelib/tools/qhash/main.h (renamed from tests/benchmarks/corelib/tools/qhash/qhash_string.h)16
-rw-r--r--tests/benchmarks/corelib/tools/qhash/outofline.cpp30
-rw-r--r--tests/benchmarks/corelib/tools/qhash/paths_small_data.txt (renamed from tests/benchmarks/corelib/tools/qhash/data.txt)0
-rw-r--r--tests/benchmarks/corelib/tools/qhash/qhash.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qlist/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qrect/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qregexp/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/data.h4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist.pl4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/generatelist_char.pl4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstringbuilder/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qvector/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qvector/outofline.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qrawvector.h5
-rw-r--r--tests/benchmarks/corelib/tools/tools.pro3
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/server/server.cpp4
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/serverobject.h4
-rw-r--r--tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp4
-rw-r--r--tests/benchmarks/dbus/qdbustype/main.cpp4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyanimation.h4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.cpp4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/dummyobject.h4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/main.cpp4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.cpp4
-rw-r--r--tests/benchmarks/gui/animation/qanimation/rectanimation.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp4
-rw-r--r--tests/benchmarks/gui/image/blendbench/main.cpp4
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro2
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp4
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/ball.mngbin34394 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tifbin8590 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/corrupt.mngbin183 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/fire.mngbin44430 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tifbin4784 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tifbin26690 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tifbin160384 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tifbin160388 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tifbin161370 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tifbin14728 -> 0 bytes
-rw-r--r--tests/benchmarks/gui/image/qimagereader/qimagereader.pro2
-rw-r--r--tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp8
-rw-r--r--tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp4
-rw-r--r--tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp4
-rw-r--r--tests/benchmarks/gui/itemviews/itemviews.pro3
-rw-r--r--tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro7
-rw-r--r--tests/benchmarks/gui/itemviews/qheaderview/qheaderviewbench.cpp264
-rw-r--r--tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp4
-rw-r--r--tests/benchmarks/gui/kernel/qapplication/main.cpp4
-rw-r--r--tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp4
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp4
-rw-r--r--tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp4
-rw-r--r--tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp4
-rw-r--r--tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp4
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp4
-rw-r--r--tests/benchmarks/gui/painting/qregion/main.cpp4
-rw-r--r--tests/benchmarks/gui/painting/qtbench/benchmarktests.h4
-rw-r--r--tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp4
-rw-r--r--tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp4
-rw-r--r--tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp4
-rw-r--r--tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp4
-rw-r--r--tests/benchmarks/gui/text/qfontmetrics/main.cpp4
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp67
-rw-r--r--tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp4
-rw-r--r--tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp4
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp4
-rw-r--r--tests/benchmarks/network/kernel/qhostinfo/main.cpp4
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp4
-rw-r--r--tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp4
-rw-r--r--tests/benchmarks/opengl/main.cpp4
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp4
-rw-r--r--tests/benchmarks/sql/kernel/qsqlquery/main.cpp4
-rw-r--r--tests/manual/bearerex/bearerex.cpp4
-rw-r--r--tests/manual/bearerex/bearerex.h4
-rw-r--r--tests/manual/bearerex/datatransferer.cpp4
-rw-r--r--tests/manual/bearerex/datatransferer.h4
-rw-r--r--tests/manual/bearerex/main.cpp4
-rw-r--r--tests/manual/bearerex/xqlistwidget.cpp4
-rw-r--r--tests/manual/bearerex/xqlistwidget.h4
-rw-r--r--tests/manual/cmake/fail4/myobject.cpp4
-rw-r--r--tests/manual/cmake/fail4/myobject.h4
-rw-r--r--tests/manual/cmake/fail5/myobject.cpp4
-rw-r--r--tests/manual/cmake/fail5/myobject.h4
-rw-r--r--tests/manual/cmake/pass(needsquoting)6/mywidget.cpp4
-rw-r--r--tests/manual/cmake/pass(needsquoting)6/mywidget.h4
-rw-r--r--tests/manual/cmake/pass1/three.cpp4
-rw-r--r--tests/manual/cmake/pass1/two.cpp4
-rw-r--r--tests/manual/cmake/pass2/myobject.cpp4
-rw-r--r--tests/manual/cmake/pass2/myobject.h4
-rw-r--r--tests/manual/cmake/pass3/mywidget.cpp4
-rw-r--r--tests/manual/cmake/pass3/mywidget.h4
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/main.mm4
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/window.cpp4
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/window.h4
-rw-r--r--tests/manual/gestures/graphicsview/gestures.cpp4
-rw-r--r--tests/manual/gestures/graphicsview/gestures.h4
-rw-r--r--tests/manual/gestures/graphicsview/imageitem.cpp4
-rw-r--r--tests/manual/gestures/graphicsview/imageitem.h4
-rw-r--r--tests/manual/gestures/graphicsview/main.cpp4
-rw-r--r--tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp4
-rw-r--r--tests/manual/gestures/graphicsview/mousepangesturerecognizer.h4
-rw-r--r--tests/manual/gestures/scrollarea/main.cpp4
-rw-r--r--tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp4
-rw-r--r--tests/manual/gestures/scrollarea/mousepangesturerecognizer.h4
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.cpp4
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.h4
-rw-r--r--tests/manual/inputmethodhints/main.cpp4
-rw-r--r--tests/manual/keypadnavigation/main.cpp4
-rw-r--r--tests/manual/lance/interactivewidget.cpp4
-rw-r--r--tests/manual/lance/interactivewidget.h4
-rw-r--r--tests/manual/lance/main.cpp4
-rw-r--r--tests/manual/lance/widgets.h4
-rwxr-xr-xtests/manual/mkspecs/test.sh4
-rw-r--r--tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp4
-rw-r--r--tests/manual/network_stresstest/minihttpserver.cpp4
-rw-r--r--tests/manual/network_stresstest/minihttpserver.h4
-rw-r--r--tests/manual/network_stresstest/tst_network_stresstest.cpp4
-rw-r--r--tests/manual/qcursor/allcursors/main.cpp4
-rw-r--r--tests/manual/qcursor/allcursors/mainwindow.cpp4
-rw-r--r--tests/manual/qcursor/allcursors/mainwindow.h4
-rw-r--r--tests/manual/qcursor/grab_override/main.cpp4
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.cpp4
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.h4
-rw-r--r--tests/manual/qdesktopwidget/main.cpp4
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.cpp4
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.h4
-rw-r--r--tests/manual/qgraphicsitemgroup/main.cpp4
-rw-r--r--tests/manual/qgraphicsitemgroup/widget.cpp4
-rw-r--r--tests/manual/qgraphicsitemgroup/widget.h4
-rw-r--r--tests/manual/qgraphicslayout/flicker/main.cpp4
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.cpp4
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.h4
-rw-r--r--tests/manual/qhttpnetworkconnection/main.cpp4
-rw-r--r--tests/manual/qimagereader/main.cpp4
-rw-r--r--tests/manual/qlocale/calendar.cpp4
-rw-r--r--tests/manual/qlocale/calendar.h4
-rw-r--r--tests/manual/qlocale/currency.cpp4
-rw-r--r--tests/manual/qlocale/currency.h4
-rw-r--r--tests/manual/qlocale/dateformats.cpp4
-rw-r--r--tests/manual/qlocale/dateformats.h4
-rw-r--r--tests/manual/qlocale/info.cpp4
-rw-r--r--tests/manual/qlocale/info.h4
-rw-r--r--tests/manual/qlocale/languages.cpp4
-rw-r--r--tests/manual/qlocale/languages.h4
-rw-r--r--tests/manual/qlocale/main.cpp4
-rw-r--r--tests/manual/qlocale/miscellaneous.cpp4
-rw-r--r--tests/manual/qlocale/miscellaneous.h4
-rw-r--r--tests/manual/qlocale/numberformats.cpp4
-rw-r--r--tests/manual/qlocale/numberformats.h4
-rw-r--r--tests/manual/qlocale/window.cpp4
-rw-r--r--tests/manual/qlocale/window.h4
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.cpp4
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.h4
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.pro3
-rw-r--r--tests/manual/qnetworkreply/main.cpp4
-rw-r--r--tests/manual/qssloptions/main.cpp4
-rw-r--r--tests/manual/qtabletevent/device_information/main.cpp4
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.cpp4
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.h4
-rw-r--r--tests/manual/qtabletevent/event_compression/main.cpp4
-rw-r--r--tests/manual/qtabletevent/event_compression/mousestatwidget.cpp4
-rw-r--r--tests/manual/qtabletevent/event_compression/mousestatwidget.h4
-rw-r--r--tests/manual/qtabletevent/regular_widgets/main.cpp4
-rw-r--r--tests/manual/qtbug-8933/main.cpp4
-rw-r--r--tests/manual/qtbug-8933/widget.cpp4
-rw-r--r--tests/manual/qtbug-8933/widget.h4
-rw-r--r--tests/manual/qtouchevent/main.cpp4
-rw-r--r--tests/manual/qtouchevent/touchwidget.cpp4
-rw-r--r--tests/manual/qtouchevent/touchwidget.h4
-rw-r--r--tests/manual/qwidget_zorder/main.cpp4
-rw-r--r--tests/manual/repaint/mainwindow/main.cpp4
-rw-r--r--tests/manual/repaint/scrollarea/main.cpp4
-rw-r--r--tests/manual/repaint/shared/shared.h4
-rw-r--r--tests/manual/repaint/splitter/main.cpp4
-rw-r--r--tests/manual/repaint/tableview/main.cpp4
-rw-r--r--tests/manual/repaint/task141091/main.cpp4
-rw-r--r--tests/manual/repaint/toplevel/main.cpp4
-rw-r--r--tests/manual/repaint/widget/main.cpp4
-rw-r--r--tests/manual/socketengine/main.cpp4
-rw-r--r--tests/manual/textrendering/glyphshaping/main.cpp4
-rw-r--r--tests/manual/textrendering/textperformance/main.cpp4
-rw-r--r--tests/manual/widgets/itemviews/delegate/example.cpp (renamed from tests/auto/other/qdirectpainter/runDirectPainter/main.cpp)79
-rw-r--r--tests/manual/widgets/itemviews/delegate/example.pro2
-rw-r--r--tests/manual/windowflags/controllerwindow.cpp4
-rw-r--r--tests/manual/windowflags/controllerwindow.h4
-rw-r--r--tests/manual/windowflags/main.cpp4
-rw-r--r--tests/manual/windowflags/previewwindow.cpp4
-rw-r--r--tests/manual/windowflags/previewwindow.h4
-rw-r--r--tests/shared/filesystem.h4
1350 files changed, 10584 insertions, 4775 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 05b6f84fa9..1796fa2db9 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -10,6 +10,7 @@ SUBDIRS += \
testlib \
tools \
xml \
+ concurrent \
other \
widgets \
@@ -20,5 +21,7 @@ cross_compile: SUBDIRS -= tools
# disable 'make check' on Mac OS X for the following subdirs for the time being
mac {
network.CONFIG += no_check_target
- widgets.CONFIG += no_check_target
}
+
+!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent
+
diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt
index d51bc30aab..4558f7085b 100644
--- a/tests/auto/compilerwarnings/data/test_cpp.txt
+++ b/tests/auto/compilerwarnings/data/test_cpp.txt
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/concurrent.pro b/tests/auto/concurrent/concurrent.pro
index 6541b0ce42..15368aef64 100644
--- a/tests/auto/corelib/concurrent/concurrent.pro
+++ b/tests/auto/concurrent/concurrent.pro
@@ -8,6 +8,5 @@ SUBDIRS=\
qtconcurrentmap \
qtconcurrentresultstore \
qtconcurrentrun \
- qtconcurrentthreadengine \
- qthreadpool
+ qtconcurrentthreadengine
diff --git a/tests/auto/corelib/concurrent/qfuture/.gitignore b/tests/auto/concurrent/qfuture/.gitignore
index 77c055c874..77c055c874 100644
--- a/tests/auto/corelib/concurrent/qfuture/.gitignore
+++ b/tests/auto/concurrent/qfuture/.gitignore
diff --git a/tests/auto/corelib/concurrent/qfuture/qfuture.pro b/tests/auto/concurrent/qfuture/qfuture.pro
index 517871ab5d..a4c706129d 100644
--- a/tests/auto/corelib/concurrent/qfuture/qfuture.pro
+++ b/tests/auto/concurrent/qfuture/qfuture.pro
@@ -1,5 +1,5 @@
CONFIG += testcase parallel_test
TARGET = tst_qfuture
-QT = core-private testlib
+QT = concurrent-private testlib concurrent
SOURCES = tst_qfuture.cpp
DEFINES += QT_STRICT_ITERATORS
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/concurrent/qfuture/tst_qfuture.cpp
index 53694100ba..3610f8f2d4 100644
--- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp
+++ b/tests/auto/concurrent/qfuture/tst_qfuture.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qfuturesynchronizer/qfuturesynchronizer.pro b/tests/auto/concurrent/qfuturesynchronizer/qfuturesynchronizer.pro
index b36560b4ba..331a8e3c05 100644
--- a/tests/auto/corelib/concurrent/qfuturesynchronizer/qfuturesynchronizer.pro
+++ b/tests/auto/concurrent/qfuturesynchronizer/qfuturesynchronizer.pro
@@ -1,4 +1,4 @@
CONFIG += testcase parallel_test
TARGET = tst_qfuturesynchronizer
-QT = core testlib
+QT = core testlib concurrent
SOURCES = tst_qfuturesynchronizer.cpp
diff --git a/tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp b/tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
index a2145ca04f..012c90de18 100644
--- a/tests/auto/corelib/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
+++ b/tests/auto/concurrent/qfuturesynchronizer/tst_qfuturesynchronizer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,14 +34,15 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtTest>
-#include <QtCore/qfuturesynchronizer.h>
-#include <QtCore/qfuture.h>
+#include <QtConcurrent/qfuturesynchronizer.h>
+#include <QtConcurrent/qfuture.h>
class tst_QFutureSynchronizer : public QObject
{
diff --git a/tests/auto/corelib/concurrent/qfuturewatcher/.gitignore b/tests/auto/concurrent/qfuturewatcher/.gitignore
index 1d778431c5..1d778431c5 100644
--- a/tests/auto/corelib/concurrent/qfuturewatcher/.gitignore
+++ b/tests/auto/concurrent/qfuturewatcher/.gitignore
diff --git a/tests/auto/corelib/concurrent/qfuturewatcher/qfuturewatcher.pro b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro
index ae98fed3d9..3b8ebda4a4 100644
--- a/tests/auto/corelib/concurrent/qfuturewatcher/qfuturewatcher.pro
+++ b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro
@@ -1,4 +1,4 @@
CONFIG += testcase parallel_test
TARGET = tst_qfuturewatcher
-QT = core-private testlib
+QT = concurrent-private testlib concurrent
SOURCES = tst_qfuturewatcher.cpp
diff --git a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
index 4fad31b5c9..fe3eb378d5 100644
--- a/tests/auto/corelib/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/concurrent/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,10 +42,7 @@
#include <QDebug>
#include <QtTest/QtTest>
-#include <qfuture.h>
-#include <qfuturewatcher.h>
-#include <qtconcurrentrun.h>
-#include <qtconcurrentmap.h>
+#include <QtConcurrent>
#include <private/qfutureinterface_p.h>
using namespace QtConcurrent;
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/.gitignore b/tests/auto/concurrent/qtconcurrentfilter/.gitignore
index f93d27e009..f93d27e009 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentfilter/.gitignore
+++ b/tests/auto/concurrent/qtconcurrentfilter/.gitignore
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro b/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro
index f783455b2e..eb0c054f6f 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro
+++ b/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro
@@ -1,6 +1,6 @@
CONFIG += testcase parallel_test
TARGET = tst_qtconcurrentfilter
-QT = core testlib
+QT = core testlib concurrent
SOURCES = tst_qtconcurrentfilter.cpp
DEFINES += QT_STRICT_ITERATORS
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 272d8514ef..971a6992ff 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/.gitignore b/tests/auto/concurrent/qtconcurrentiteratekernel/.gitignore
index ac5dec4db6..ac5dec4db6 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/.gitignore
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/.gitignore
diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro b/tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
index e876c86725..4cfebc0e3d 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro
@@ -1,4 +1,4 @@
CONFIG += testcase parallel_test
TARGET = tst_qtconcurrentiteratekernel
-QT = core testlib
+QT = core testlib concurrent
SOURCES = tst_qtconcurrentiteratekernel.cpp
diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
index 16f61513eb..46562b5eb0 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
+++ b/tests/auto/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/.gitignore b/tests/auto/concurrent/qtconcurrentmap/.gitignore
index f1c563e979..f1c563e979 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/.gitignore
+++ b/tests/auto/concurrent/qtconcurrentmap/.gitignore
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/functions.h b/tests/auto/concurrent/qtconcurrentmap/functions.h
index ebca462676..f5963db904 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/functions.h
+++ b/tests/auto/concurrent/qtconcurrentmap/functions.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro b/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro
index b4f5cbc565..199e5ad4d6 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/qtconcurrentmap.pro
+++ b/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro
@@ -1,5 +1,5 @@
CONFIG += testcase parallel_test
TARGET = tst_qtconcurrentmap
-QT = core testlib
+QT = core testlib concurrent
SOURCES = tst_qtconcurrentmap.cpp
DEFINES += QT_STRICT_ITERATORS
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index df74c028d3..960511d87b 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qtconcurrentresultstore/qtconcurrentresultstore.pro b/tests/auto/concurrent/qtconcurrentresultstore/qtconcurrentresultstore.pro
index e93fc587a7..2c04f75025 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentresultstore/qtconcurrentresultstore.pro
+++ b/tests/auto/concurrent/qtconcurrentresultstore/qtconcurrentresultstore.pro
@@ -1,5 +1,5 @@
CONFIG += testcase parallel_test
TARGET = tst_qtconcurrentresultstore
-QT = core-private testlib
+QT = core-private testlib concurrent
SOURCES = tst_qtconcurrentresultstore.cpp
DEFINES += QT_STRICT_ITERATORS
diff --git a/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp b/tests/auto/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp
index 980fc6c282..236d0b62e3 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp
+++ b/tests/auto/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qtconcurrentrun/.gitignore b/tests/auto/concurrent/qtconcurrentrun/.gitignore
index d7a8334ec4..d7a8334ec4 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentrun/.gitignore
+++ b/tests/auto/concurrent/qtconcurrentrun/.gitignore
diff --git a/tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro b/tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro
index d4f130fecd..03d77b33a2 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentrun/qtconcurrentrun.pro
+++ b/tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro
@@ -1,4 +1,4 @@
CONFIG += testcase parallel_test
TARGET = tst_qtconcurrentrun
-QT = core testlib
+QT = core testlib concurrent
SOURCES = tst_qtconcurrentrun.cpp
diff --git a/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index 96f705d00b..86e3433c12 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/.gitignore b/tests/auto/concurrent/qtconcurrentthreadengine/.gitignore
index a2e2896246..a2e2896246 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/.gitignore
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/.gitignore
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro b/tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
index 536ccc3ea5..f6ddd33504 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro
@@ -1,4 +1,4 @@
CONFIG += testcase parallel_test
TARGET = tst_qtconcurrentthreadengine
-QT = core testlib
+QT = core testlib concurrent
SOURCES = tst_qtconcurrentthreadengine.cpp
diff --git a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
index 858faa6eab..9722887c7d 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
+++ b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
index deea511a5f..5530eb8e07 100644
--- a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
+++ b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
index 1502e5c8d2..3abd851c89 100644
--- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index 755de9d0b8..2fdf1de9c8 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
index 68ada06669..9b8b6b37e0 100644
--- a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
+++ b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
index c8688c89f6..534dec8160 100644
--- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index 3751816dbc..63a4de5ac9 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
index b7e1015a13..0c88c73d41 100644
--- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
+++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
index 934f9f904b..978a026e8d 100644
--- a/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/echo/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index b6dcd3ed63..7daed397d5 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,7 +47,6 @@
#include <qtextdocument.h>
#include <time.h>
#include <qprocess.h>
-#include <QtConcurrentMap>
#include <QThreadPool>
class tst_QTextCodec : public QObject
@@ -55,9 +54,7 @@ class tst_QTextCodec : public QObject
Q_OBJECT
private slots:
-#ifndef QT_NO_CONCURRENT
void threadSafety();
-#endif
void toUnicode_data();
void toUnicode();
@@ -1939,48 +1936,75 @@ void tst_QTextCodec::toLocal8Bit()
}
#endif
-static QByteArray loadAndConvert(const QByteArray &codecName)
+class LoadAndConvert: public QRunnable
{
- QTextCodec *c = QTextCodec::codecForName(codecName);
- if (!c) {
- qWarning() << "WARNING" << codecName << "not found?";
- return QByteArray();
+public:
+ LoadAndConvert(const QByteArray &source, QByteArray *destination)
+ : codecName(source), target(destination)
+ {}
+ QByteArray codecName;
+ QByteArray *target;
+ void run()
+ {
+ QTextCodec *c = QTextCodec::codecForName(codecName);
+ if (!c) {
+ qWarning() << "WARNING" << codecName << "not found?";
+ return;
+ }
+ QString str = QString::fromLatin1(codecName);
+ QByteArray b = c->fromUnicode(str);
+ c->toUnicode(b);
+ *target = codecName;
}
- QString str = QString::fromLatin1(codecName);
- QByteArray b = c->fromUnicode(str);
- c->toUnicode(b);
- return codecName;
-}
+};
-static int loadAndConvertMIB(int mib)
+class LoadAndConvertMIB: public QRunnable
{
- QTextCodec *c = QTextCodec::codecForMib(mib);
- if (!c) {
- qWarning() << "WARNING" << mib << "not found?";
- return 0;
+public:
+ LoadAndConvertMIB(int mib, int *target)
+ : mib(mib), target(target)
+ {}
+ int mib;
+ int *target;
+ void run()
+ {
+ QTextCodec *c = QTextCodec::codecForMib(mib);
+ if (!c) {
+ qWarning() << "WARNING" << mib << "not found?";
+ return;
+ }
+ QString str = QString::number(mib);
+ QByteArray b = c->fromUnicode(str);
+ c->toUnicode(b);
+ *target = mib;
}
- QString str = QString::number(mib);
- QByteArray b = c->fromUnicode(str);
- c->toUnicode(b);
- return mib;
-}
+};
-#ifndef QT_NO_CONCURRENT
void tst_QTextCodec::threadSafety()
{
QList<QByteArray> codecList = QTextCodec::availableCodecs();
QList<int> mibList = QTextCodec::availableMibs();
QThreadPool::globalInstance()->setMaxThreadCount(12);
- QFuture<QByteArray> res = QtConcurrent::mapped(codecList, loadAndConvert);
+ QVector<QByteArray> res;
+ res.resize(codecList.size());
+ for (int i = 0; i < codecList.size(); ++i) {
+ QThreadPool::globalInstance()->start(new LoadAndConvert(codecList.at(i), &res[i]));
+ }
- QFuture<int> res2 = QtConcurrent::mapped(mibList, loadAndConvertMIB);
+ QVector<int> res2;
+ res2.resize(mibList.size());
+ for (int i = 0; i < mibList.size(); ++i) {
+ QThreadPool::globalInstance()->start(new LoadAndConvertMIB(mibList.at(i), &res2[i]));
+ }
+
+ // wait for all threads to finish working
+ QThreadPool::globalInstance()->waitForDone();
- QCOMPARE(res.results(), codecList);
- QCOMPARE(res2.results(), mibList);
+ QCOMPARE(res.toList(), codecList);
+ QCOMPARE(res2.toList(), mibList);
}
-#endif
void tst_QTextCodec::invalidNames()
{
diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
index f6ff8b2208..69b91683d4 100644
--- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
+++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/corelib.pro b/tests/auto/corelib/corelib.pro
index 84eb3f284c..4f284ac21e 100644
--- a/tests/auto/corelib/corelib.pro
+++ b/tests/auto/corelib/corelib.pro
@@ -2,10 +2,10 @@ TEMPLATE=subdirs
SUBDIRS=\
animation \
codecs \
- concurrent \
global \
io \
itemmodels \
+ json \
kernel \
plugin \
statemachine \
@@ -13,4 +13,3 @@ SUBDIRS=\
tools \
xml
-!contains(QT_CONFIG, concurrent): SUBDIRS -= concurrent
diff --git a/tests/auto/corelib/global/global.pro b/tests/auto/corelib/global/global.pro
index e9b547be68..a6c638f530 100644
--- a/tests/auto/corelib/global/global.pro
+++ b/tests/auto/corelib/global/global.pro
@@ -5,4 +5,5 @@ SUBDIRS=\
qgetputenv \
qglobal \
qnumeric \
- qrand
+ qrand \
+ qmessagehandler
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 35a74f154d..ec021c5bb1 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,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp
index d80f401071..d466d7b8d8 100644
--- a/tests/auto/corelib/global/qflags/tst_qflags.cpp
+++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
index 41fb311837..e074aeb3e9 100644
--- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
+++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 23b9c6bbab..8fedaf427a 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro b/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro
new file mode 100644
index 0000000000..8bdba4bfc4
--- /dev/null
+++ b/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase parallel_test
+TARGET = tst_qmessagehandler
+QT = core testlib
+SOURCES = tst_qmessagehandler.cpp
diff --git a/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp b/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp
new file mode 100644
index 0000000000..39bd0986a5
--- /dev/null
+++ b/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qdebug.h>
+#include <QtTest/QtTest>
+
+#include <qglobal.h>
+
+class tst_qmessagehandler : public QObject
+{
+ Q_OBJECT
+private slots:
+ void cleanup();
+
+ void defaultHandler();
+ void installMessageHandler();
+ void installMsgHandler();
+ void installBothHandler();
+};
+
+static QtMsgType s_type;
+const char *s_file;
+int s_line;
+const char *s_function;
+static QString s_message;
+
+void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const char *msg)
+{
+ s_type = type;
+ s_file = context.file;
+ s_line = context.line;
+ s_function = context.function;
+ s_message = QString::fromLocal8Bit(msg);
+}
+
+void customMsgHandler(QtMsgType type, const char *msg)
+{
+ s_type = type;
+ s_file = 0;
+ s_line = 0;
+ s_function = 0;
+ s_message = QString::fromLocal8Bit(msg);
+}
+
+void tst_qmessagehandler::cleanup()
+{
+ qInstallMsgHandler(0);
+ qInstallMessageHandler(0);
+ s_type = QtFatalMsg;
+ s_file = 0;
+ s_line = 0;
+ s_function = 0;
+}
+
+void tst_qmessagehandler::defaultHandler()
+{
+ // check that the default works
+ QTest::ignoreMessage(QtDebugMsg, "defaultHandler");
+ qDebug("defaultHandler");
+}
+
+void tst_qmessagehandler::installMessageHandler()
+{
+ QMessageHandler oldHandler = qInstallMessageHandler(customMessageHandler);
+
+ qDebug("installMessageHandler"); int line = __LINE__;
+
+ QCOMPARE(s_type, QtDebugMsg);
+ QCOMPARE(s_message, QString::fromLocal8Bit("installMessageHandler"));
+ QCOMPARE(s_file, __FILE__);
+ QCOMPARE(s_function, Q_FUNC_INFO);
+ QCOMPARE(s_line, line);
+
+ QMessageHandler myHandler = qInstallMessageHandler(oldHandler);
+ QCOMPARE((void*)myHandler, (void*)customMessageHandler);
+}
+
+void tst_qmessagehandler::installMsgHandler()
+{
+ QtMsgHandler oldHandler = qInstallMsgHandler(customMsgHandler);
+
+ qDebug("installMsgHandler");
+
+ QCOMPARE(s_type, QtDebugMsg);
+ QCOMPARE(s_message, QString::fromLocal8Bit("installMsgHandler"));
+ QCOMPARE(s_file, (const char*)0);
+ QCOMPARE(s_function, (const char*)0);
+ QCOMPARE(s_line, 0);
+
+ QtMsgHandler myHandler = qInstallMsgHandler(oldHandler);
+ QCOMPARE((void*)myHandler, (void*)customMsgHandler);
+}
+
+void tst_qmessagehandler::installBothHandler()
+{
+ qInstallMessageHandler(customMessageHandler);
+ qInstallMsgHandler(customMsgHandler);
+
+ qDebug("installBothHandler"); int line = __LINE__;
+
+ QCOMPARE(s_type, QtDebugMsg);
+ QCOMPARE(s_message, QString::fromLocal8Bit("installBothHandler"));
+ QCOMPARE(s_file, __FILE__);
+ QCOMPARE(s_function, Q_FUNC_INFO);
+ QCOMPARE(s_line, line);
+}
+
+QTEST_MAIN(tst_qmessagehandler)
+#include "tst_qmessagehandler.moc"
diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
index f73884fe02..064724e888 100644
--- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
+++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/global/qrand/tst_qrand.cpp b/tests/auto/corelib/global/qrand/tst_qrand.cpp
index 71f14e28e2..85618d94c2 100644
--- a/tests/auto/corelib/global/qrand/tst_qrand.cpp
+++ b/tests/auto/corelib/global/qrand/tst_qrand.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro
index ae0b4968b8..095aa7a77d 100644
--- a/tests/auto/corelib/io/io.pro
+++ b/tests/auto/corelib/io/io.pro
@@ -22,6 +22,12 @@ SUBDIRS=\
qtemporaryfile \
qtextstream \
qurl \
+ qwinoverlappedionotifier \
+
+!win32|wince* {
+ SUBDIRS -=\
+ qwinoverlappedionotifier
+}
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
qfileinfo
diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp
index ba2eced60a..e72960833f 100644
--- a/tests/auto/corelib/io/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
index 1bffd63d1b..776ad4d0a7 100644
--- a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
+++ b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,10 +47,13 @@
#include <QtCore/QSharedPointer>
#include <QtCore/QScopedPointer>
#include <QtCore/QHash>
+#include <QtCore/QDir>
+#include <QtCore/QDirIterator>
#include <QtTest/QTest>
#include <QtCore/QDebug>
+#include "../../../../shared/filesystem.h"
class tst_QAbstractFileEngine
: public QObject
@@ -65,6 +68,8 @@ private slots:
void fileIO_data();
void fileIO();
+ void mounting_data();
+ void mounting();
private:
QStringList filesForRemoval;
};
@@ -74,7 +79,7 @@ class ReferenceFileEngine
{
public:
ReferenceFileEngine(const QString &fileName)
- : fileName_(fileName)
+ : fileName_(QDir::cleanPath(fileName))
, position_(-1)
, openForRead_(false)
, openForWrite_(false)
@@ -491,6 +496,60 @@ private:
mutable QSharedPointer<File> openFile_;
};
+class MountingFileEngine : public QFSFileEngine
+{
+public:
+ class Iterator : public QAbstractFileEngineIterator
+ {
+ public:
+ Iterator(QDir::Filters filters, const QStringList &filterNames)
+ : QAbstractFileEngineIterator(filters, filterNames)
+ {
+ names.append("foo");
+ names.append("bar");
+ index = -1;
+ }
+ QString currentFileName() const
+ {
+ return names.at(index);
+ }
+ bool hasNext() const
+ {
+ return index < names.size() - 1;
+ }
+ QString next()
+ {
+ if (!hasNext())
+ return QString();
+ ++index;
+ return currentFilePath();
+ }
+ QStringList names;
+ int index;
+ };
+ MountingFileEngine(QString fileName)
+ : QFSFileEngine(fileName)
+ {
+ }
+ Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames)
+ {
+ return new Iterator(filters, filterNames);
+ }
+ FileFlags fileFlags(FileFlags type) const
+ {
+ if (fileName(DefaultName).endsWith(".tar")) {
+ FileFlags ret = QFSFileEngine::fileFlags(type);
+ //make this file in file system appear to be a directory
+ ret &= ~FileType;
+ ret |= DirectoryType;
+ return ret;
+ } else {
+ //file inside the archive
+ return ExistsFlag | FileType;
+ }
+ }
+};
+
QMutex ReferenceFileEngine::fileSystemMutex;
QHash<uint, QString> ReferenceFileEngine::fileSystemUsers, ReferenceFileEngine::fileSystemGroups;
QHash<QString, QSharedPointer<ReferenceFileEngine::File> > ReferenceFileEngine::fileSystem;
@@ -500,6 +559,8 @@ class FileEngineHandler
{
QAbstractFileEngine *create(const QString &fileName) const
{
+ if (fileName.endsWith(".tar") || fileName.contains(".tar/"))
+ return new MountingFileEngine(fileName);
if (fileName.startsWith("QFSFileEngine:"))
return new QFSFileEngine(fileName.mid(14));
if (fileName.startsWith("reference-file-engine:"))
@@ -803,6 +864,36 @@ void tst_QAbstractFileEngine::fileIO()
//
}
+void tst_QAbstractFileEngine::mounting_data()
+{
+ QTest::addColumn<QString>("fileName");
+ QTest::newRow("native") << "test.tar";
+ QTest::newRow("Forced QFSFileEngine") << "QFSFileEngine:test.tar";
+}
+
+void tst_QAbstractFileEngine::mounting()
+{
+ FileSystem fs;
+ QVERIFY(fs.createFile("test.tar"));
+ FileEngineHandler handler;
+
+ QFETCH(QString, fileName);
+
+ QVERIFY(QFileInfo(fileName).isDir());
+ QDir dir(fileName);
+ QCOMPARE(dir.entryList(), (QStringList() << "bar" << "foo"));
+ QDir dir2;
+ bool found = false;
+ foreach (QFileInfo info, dir2.entryInfoList()) {
+ if (info.fileName() == QLatin1String("test.tar")) {
+ QVERIFY(!found);
+ found = true;
+ QVERIFY(info.isDir());
+ }
+ }
+ QVERIFY(found);
+}
+
QTEST_APPLESS_MAIN(tst_QAbstractFileEngine)
#include "tst_qabstractfileengine.moc"
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
index e2890d7891..bf62621bbc 100644
--- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index d17bab3bc1..eb227625a7 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -65,11 +65,6 @@ private slots:
void stream_bool_data();
void stream_bool();
- void stream_QBool_data();
- void stream_QBool();
-
- void stream_QBool_in_4_0();
-
void stream_QBitArray_data();
void stream_QBitArray();
@@ -193,7 +188,6 @@ private slots:
private:
void writebool(QDataStream *s);
- void writeQBool(QDataStream *s);
void writeQBitArray(QDataStream *s);
void writeQBrush(QDataStream *s);
void writeQColor(QDataStream *s);
@@ -221,7 +215,6 @@ private:
void writeQEasingCurve(QDataStream *s);
void readbool(QDataStream *s);
- void readQBool(QDataStream *s);
void readQBitArray(QDataStream *s);
void readQBrush(QDataStream *s);
void readQColor(QDataStream *s);
@@ -262,7 +255,8 @@ static int NColorRoles[] = {
QPalette::ToolTipText + 1, // Qt_4_4
QPalette::ToolTipText + 1, // Qt_4_5
QPalette::ToolTipText + 1, // Qt_4_6
- 0 // add the correct value for Qt_4_7 here later
+ QPalette::ToolTipText + 1, // Qt_5_0
+ 0 // add the correct value for Qt_5_1 here later
};
// Testing get/set functions
@@ -292,6 +286,7 @@ void tst_QDataStream::getSetCheck()
void tst_QDataStream::cleanupTestCase()
{
QFile::remove(QLatin1String("qdatastream.out"));
+ QFile::remove(QLatin1String("datastream.tmp"));
}
static int dataIndex(const QString &tag)
@@ -797,57 +792,6 @@ void tst_QDataStream::readbool(QDataStream *s)
// ************************************
-static QBool QBoolData(int index)
-{
- switch (index) {
- case 0: return QBool(true);
- case 1: return QBool(false);
- case 2: return QBool(bool(2));
- case 3: return QBool(bool(-1));
- case 4: return QBool(bool(127));
- }
-
- return QBool(false);
-}
-
-void tst_QDataStream::stream_QBool_data()
-{
- stream_data(5);
-}
-
-void tst_QDataStream::stream_QBool()
-{
- STREAM_IMPL(QBool);
-}
-
-void tst_QDataStream::writeQBool(QDataStream *s)
-{
- QBool d1 = QBoolData(dataIndex(QTest::currentDataTag()));
- *s << d1;
-}
-
-void tst_QDataStream::readQBool(QDataStream *s)
-{
- QBool expected = QBoolData(dataIndex(QTest::currentDataTag()));
-
- bool d1 = true;
- *s >> d1;
- QVERIFY(d1 == expected);
-}
-
-void tst_QDataStream::stream_QBool_in_4_0()
-{
- QByteArray byteArray;
- QDataStream out(&byteArray, QIODevice::WriteOnly);
-
- QString str("ABC");
- out << str.contains('A') << str.contains('Z');
-
- QCOMPARE(byteArray.size(), 2);
-}
-
-// ************************************
-
static void QBitArrayData(QBitArray *b, int index)
{
QString filler = "";
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index 535807bfc3..12f7e28a1d 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,9 +51,10 @@ private slots:
void assignment() const;
void warningWithoutDebug() const;
void criticalWithoutDebug() const;
- void debugWithQBool() const;
+ void debugWithBool() const;
void veryLongWarningMessage() const;
void qDebugQStringRef() const;
+ void qDebugQLatin1String() const;
void defaultMessagehandler() const;
};
@@ -74,11 +75,17 @@ void tst_QDebug::assignment() const
static QtMsgType s_msgType;
static QByteArray s_msg;
+static QByteArray s_file;
+static int s_line;
+static QByteArray s_function;
-static void myMessageHandler(QtMsgType type, const char *msg)
+static void myMessageHandler(QtMsgType type, const QMessageLogContext &context, const char *msg)
{
s_msg = msg;
s_msgType = type;
+ s_file = context.file;
+ s_line = context.line;
+ s_function = context.function;
}
// Helper class to ensure that the testlib message handler gets
@@ -87,17 +94,17 @@ static void myMessageHandler(QtMsgType type, const char *msg)
class MessageHandlerSetter
{
public:
- MessageHandlerSetter(QtMsgHandler newMsgHandler)
- : oldMsgHandler(qInstallMsgHandler(newMsgHandler))
+ MessageHandlerSetter(QMessageHandler newMessageHandler)
+ : oldMessageHandler(qInstallMessageHandler(newMessageHandler))
{ }
~MessageHandlerSetter()
{
- qInstallMsgHandler(oldMsgHandler);
+ qInstallMessageHandler(oldMessageHandler);
}
private:
- QtMsgHandler oldMsgHandler;
+ QMessageHandler oldMessageHandler;
};
/*! \internal
@@ -107,8 +114,12 @@ void tst_QDebug::warningWithoutDebug() const
{
MessageHandlerSetter mhs(myMessageHandler);
{ qWarning() << "A qWarning() message"; }
+ QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO;
QCOMPARE(s_msgType, QtWarningMsg);
QCOMPARE(QString::fromLatin1(s_msg.data()), QString::fromLatin1("A qWarning() message "));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
}
/*! \internal
@@ -118,16 +129,24 @@ void tst_QDebug::criticalWithoutDebug() const
{
MessageHandlerSetter mhs(myMessageHandler);
{ qCritical() << "A qCritical() message"; }
+ QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO;
QCOMPARE(s_msgType, QtCriticalMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("A qCritical() message "));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
}
-void tst_QDebug::debugWithQBool() const
+void tst_QDebug::debugWithBool() const
{
MessageHandlerSetter mhs(myMessageHandler);
- { qDebug() << QBool(false) << QBool(true); }
+ { qDebug() << false << true; }
+ QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO;
QCOMPARE(s_msgType, QtDebugMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("false true "));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
}
void tst_QDebug::veryLongWarningMessage() const
@@ -140,8 +159,12 @@ void tst_QDebug::veryLongWarningMessage() const
test.append(part);
qWarning("Test output:\n%s\nend", qPrintable(test));
}
+ QString file = __FILE__; int line = __LINE__ - 2; QString function = Q_FUNC_INFO;
QCOMPARE(s_msgType, QtWarningMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("Test output:\n")+test+QString::fromLatin1("\nend"));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
}
void tst_QDebug::qDebugQStringRef() const
@@ -153,8 +176,12 @@ void tst_QDebug::qDebugQStringRef() const
MessageHandlerSetter mhs(myMessageHandler);
{ qDebug() << inRef; }
+ QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO;
QCOMPARE(s_msgType, QtDebugMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("\"input\" "));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
}
/* Use a null QStringRef. */
@@ -163,19 +190,35 @@ void tst_QDebug::qDebugQStringRef() const
MessageHandlerSetter mhs(myMessageHandler);
{ qDebug() << inRef; }
+ QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO;
QCOMPARE(s_msgType, QtDebugMsg);
QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("\"\" "));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
}
}
+void tst_QDebug::qDebugQLatin1String() const
+{
+ MessageHandlerSetter mhs(myMessageHandler);
+ { qDebug() << QLatin1String("foo") << QLatin1String("") << QLatin1String("barbaz", 3); }
+ QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO;
+ QCOMPARE(s_msgType, QtDebugMsg);
+ QCOMPARE(QString::fromLatin1(s_msg), QString::fromLatin1("\"foo\" \"\" \"bar\" "));
+ QCOMPARE(QString::fromLatin1(s_file), file);
+ QCOMPARE(s_line, line);
+ QCOMPARE(QString::fromLatin1(s_function), function);
+}
+
void tst_QDebug::defaultMessagehandler() const
{
MessageHandlerSetter mhs(0);
- QtMsgHandler defaultMessageHandler1 = qInstallMsgHandler(0);
- QtMsgHandler defaultMessageHandler2 = qInstallMsgHandler(myMessageHandler);
+ QMessageHandler defaultMessageHandler1 = qInstallMessageHandler(0);
+ QMessageHandler defaultMessageHandler2 = qInstallMessageHandler(myMessageHandler);
bool same = (*defaultMessageHandler1 == *defaultMessageHandler2);
QVERIFY(same);
- QtMsgHandler messageHandler = qInstallMsgHandler(0);
+ QMessageHandler messageHandler = qInstallMessageHandler(0);
same = (*messageHandler == *myMessageHandler);
QVERIFY(same);
}
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 01cbc13d40..4d3d8e6f45 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/qrc_qdir.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $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 01cbc13d40..4d3d8e6f45 100644
--- a/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/testdir/dir/tst_qdir.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 1f4e05d0cd..f1c9015092 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1848,8 +1848,6 @@ void tst_QDir::equalityOperator_data()
//need a path in the root directory that is unlikely to be a symbolic link.
#if defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
-#elif defined (Q_OS_SYMBIAN)
- QString pathinroot("c:/data/..");
#else
QString pathinroot("/sbin/..");
#endif
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 3b3b2b5a04..ad61db51d6 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
index 14cb28af6b..6698440b70 100644
--- a/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
+++ b/tests/auto/corelib/io/qfile/stdinprocess/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index 2f1e50010c..2611ff39bd 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -9,13 +9,6 @@ TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \
../Makefile ../forCopying.txt ../forRenaming.txt \
../resources/file1.ext1
-win32 {
- CONFIG(debug, debug|release) {
- TARGET = ../../debug/tst_qfile
- } else {
- TARGET = ../../release/tst_qfile
- }
- LIBS+=-lole32 -luuid
-}
+win32: LIBS+=-lole32 -luuid
mac*:CONFIG+=insignificant_test
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 0549fe32f0..00e45354ba 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -343,9 +343,9 @@ void tst_QFile::cleanup()
void tst_QFile::initTestCase()
{
- // chdir to testdata directory and use relative paths.
- QString testdata_dir = QFileInfo(QFINDTESTDATA("testfile.txt")).absolutePath();
- QVERIFY2(QDir::setCurrent(testdata_dir), qPrintable("Could not chdir to " + testdata_dir));
+ QString workingDir = QFileInfo(QFINDTESTDATA("stdinprocess")).absolutePath();
+ QVERIFY2(!workingDir.isEmpty(), qPrintable("Could not find working directory!"));
+ QVERIFY2(QDir::setCurrent(workingDir), qPrintable("Could not chdir to " + workingDir));
QFile::remove("noreadfile");
@@ -832,7 +832,7 @@ void tst_QFile::readAllStdin()
QByteArray lotsOfData(1024, '@'); // 10 megs
QProcess process;
- process.start(QFINDTESTDATA("stdinprocess/stdinprocess")+" all");
+ process.start("stdinprocess/stdinprocess all");
QVERIFY( process.waitForStarted() );
for (int i = 0; i < 5; ++i) {
QTest::qWait(1000);
@@ -867,7 +867,7 @@ void tst_QFile::readLineStdin()
for (int i = 0; i < 2; ++i) {
QProcess process;
- process.start((QFINDTESTDATA("stdinprocess/stdinprocess")+QString(" line %1").arg(i)), QIODevice::Text | QIODevice::ReadWrite);
+ process.start((QString("stdinprocess/stdinprocess line %1").arg(i)), QIODevice::Text | QIODevice::ReadWrite);
for (int i = 0; i < 5; ++i) {
QTest::qWait(1000);
process.write(lotsOfData);
@@ -901,7 +901,7 @@ void tst_QFile::readLineStdin_lineByLine()
#else
for (int i = 0; i < 2; ++i) {
QProcess process;
- process.start(QFINDTESTDATA("stdinprocess/stdinprocess")+ QString(" line %1").arg(i), QIODevice::Text | QIODevice::ReadWrite);
+ process.start(QString("stdinprocess/stdinprocess line %1").arg(i), QIODevice::Text | QIODevice::ReadWrite);
QVERIFY(process.waitForStarted());
for (int j = 0; j < 3; ++j) {
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 5764cee66d..7b80152b62 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1028,6 +1028,19 @@ void tst_QFileInfo::fileTimes()
//In Vista the last-access timestamp is not updated when the file is accessed/touched (by default).
//To enable this the HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate
//is set to 0, in the test machine.
+#ifdef Q_OS_WIN
+ HKEY key;
+ if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\FileSystem",
+ 0, KEY_READ, &key)) {
+ DWORD disabledAccessTimes = 0;
+ DWORD size = sizeof(DWORD);
+ LONG error = RegQueryValueEx(key, L"NtfsDisableLastAccessUpdate"
+ , NULL, NULL, (LPBYTE)&disabledAccessTimes, &size);
+ if (ERROR_SUCCESS == error && disabledAccessTimes)
+ QEXPECT_FAIL("", "File access times are disabled in windows registry (this is the default setting)", Continue);
+ RegCloseKey(key);
+ }
+#endif
#ifdef Q_OS_WINCE
QEXPECT_FAIL("simple", "WinCE only stores date of access data, not the time", Continue);
#endif
@@ -1362,7 +1375,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
QString junction = "junction_pwd";
FileSystem::createNtfsJunction(target, junction);
QFileInfo targetInfo(target);
- QTest::newRow("junction_pwd") << junction << true << targetInfo.absoluteFilePath() << targetInfo.canonicalFilePath();
+ QTest::newRow("junction_pwd") << junction << false << QString() << QString();
QFileInfo fileInJunction(targetInfo.absoluteFilePath().append("/file"));
QFile file(fileInJunction.absoluteFilePath());
@@ -1375,7 +1388,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
junction = "junction_root";
FileSystem::createNtfsJunction(target, junction);
targetInfo.setFile(target);
- QTest::newRow("junction_root") << junction << true << targetInfo.absoluteFilePath() << targetInfo.canonicalFilePath();
+ QTest::newRow("junction_root") << junction << false << QString() << QString();
//Mountpoint
typedef BOOLEAN (WINAPI *PtrGetVolumeNameForVolumeMountPointW)(LPCWSTR, LPWSTR, DWORD);
@@ -1390,7 +1403,7 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
junction = "mountpoint";
rootVolume.replace("\\\\?\\","\\??\\");
FileSystem::createNtfsJunction(rootVolume, junction);
- QTest::newRow("mountpoint") << junction << true << QDir::fromNativeSeparators(rootPath) << QDir::rootPath();
+ QTest::newRow("mountpoint") << junction << false << QString() << QString();
}
}
@@ -1403,8 +1416,10 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks()
QFileInfo fi(path);
QCOMPARE(fi.isSymLink(), isSymLink);
- QCOMPARE(fi.symLinkTarget(), linkTarget);
- QCOMPARE(fi.canonicalFilePath(), canonicalFilePath);
+ if (isSymLink) {
+ QCOMPARE(fi.symLinkTarget(), linkTarget);
+ QCOMPARE(fi.canonicalFilePath(), canonicalFilePath);
+ }
}
void tst_QFileInfo::brokenShortcut()
@@ -1632,6 +1647,12 @@ BOOL IsUserAdmin()
}
#endif
+#if defined(Q_OS_WIN)
+QT_BEGIN_NAMESPACE
+extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
+QT_END_NAMESPACE
+#endif
+
void tst_QFileInfo::owner()
{
QString userName;
@@ -1672,7 +1693,6 @@ void tst_QFileInfo::owner()
NetApiBufferFree(pBuf);
}
}
- extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
qt_ntfs_permission_lookup = 1;
#endif
if (userName.isEmpty())
diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
index cc75801638..fe2e30a95c 100644
--- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
+++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 05b2539182..5e5a99f937 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index b1c02a6c02..07a1fff993 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
index bca4d55037..0eea94f5d9 100644
--- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
+++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
index 5851ffe3da..5edb5489f7 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testDetached/main.cpp b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
index bcf237f488..c1231d3c71 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testDetached/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
index 1475b3354d..ad8e69cad9 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
index c9e5d2e6a5..e4fba49090 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
index b7c0511d77..cb675b7369 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
index 97d9208e19..cf33f22bc6 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
index bf3d190630..ad1ebfc5f2 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
index 0c915918e4..872ed4fad4 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
index 8f3bd70a3a..0578f4794f 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
index c5eb4df307..bfcc48832e 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
index 877b3c6175..a8a17b6951 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEchoGui/main_win.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
index 146b61af0e..eab1ebac17 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp b/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp
index 78973f9f12..8b886ba5de 100644
--- a/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessLoopback/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
index 4fc8ea197c..b8b85730a8 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
index 5284607e9f..fa2b60d542 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
index 57fb68e841..d76e3054a3 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
index 6ce8892354..72af4df489 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
index fa368489d6..ef02de269f 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_unix.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $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 87ba12c008..e37fba6099 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/main_win.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
index d42b8ed083..75862c682e 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index e16e00de91..c3c4607119 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1000,9 +1000,21 @@ public:
}
}
+ void writeAfterStart(const char *buf, int count)
+ {
+ dataToWrite = QByteArray(buf, count);
+ }
+
+ void start(const QString &program)
+ {
+ QProcess::start(program);
+ writePendingData();
+ }
+
public slots:
void terminateSlot()
{
+ writePendingData(); // In cases 3 and 4 we haven't written the data yet.
if (killing || (n == 4 && 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
@@ -1025,8 +1037,18 @@ public slots:
}
private:
+ void writePendingData()
+ {
+ if (!dataToWrite.isEmpty()) {
+ write(dataToWrite);
+ dataToWrite.clear();
+ }
+ }
+
+private:
int n;
bool killing;
+ QByteArray dataToWrite;
};
//-----------------------------------------------------------------------------
@@ -1049,11 +1071,10 @@ void tst_QProcess::softExitInSlots()
for (int i = 0; i < 5; ++i) {
SoftExitProcess proc(i);
+ proc.writeAfterStart("OLEBOLE", 8); // include the \0
proc.start(appName);
- proc.write("OLEBOLE", 8); // include the \0
- QTestEventLoop::instance().enterLoop(10);
+ QTRY_VERIFY(proc.waitedForFinished);
QCOMPARE(proc.state(), QProcess::NotRunning);
- QVERIFY(proc.waitedForFinished);
}
}
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index 50579f0712..15eb7d3c48 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 539f49fa97..fa72083dcc 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 87f5b37e14..0d6443c5ac 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 1820d66496..1e288e2418 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -142,6 +142,7 @@ void tst_qstandardpaths::testLocateAll()
setCustomLocations();
const QStringList allFiles = QStandardPaths::locateAll(QStandardPaths::ConfigLocation, "qstandardpaths.pro");
+ QVERIFY2(allFiles.count() > 0, "qstandardpaths.pro not found in config locations!");
QCOMPARE(allFiles.first(), QString(m_thisDir + QString::fromLatin1("/qstandardpaths.pro")));
#endif
}
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 86aa071410..46d2fa2bde 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -228,6 +228,9 @@ void tst_QTemporaryDir::autoRemove()
void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
+ if (::geteuid() == 0)
+ QSKIP("not valid running this test as root");
+
struct ChdirOnReturn
{
ChdirOnReturn(const QString& d) : dir(d) {}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 4c2e3f211b..cda29fdf0b 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -256,6 +256,9 @@ void tst_QTemporaryFile::autoRemove()
void tst_QTemporaryFile::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
+ if (::geteuid() == 0)
+ QSKIP("not valid running this test as root");
+
struct ChdirOnReturn
{
ChdirOnReturn(const QString& d) : dir(d) {}
diff --git a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
index a33b6759b4..282ec22013 100644
--- a/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readAllStdinProcess/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
index e561fc886f..174a8368fe 100644
--- a/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/readLineStdinProcess/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
index 7fcfd6d53b..dfdd431040 100644
--- a/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
+++ b/tests/auto/corelib/io/qtextstream/stdinProcess/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index 6b6ac013bd..01aecc2a21 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -170,6 +170,7 @@ private slots:
// text write operators
void string_write_operator_ToDevice_data();
void string_write_operator_ToDevice();
+ void latin1String_write_operator_ToDevice();
// other
void skipWhiteSpace_data();
@@ -2384,6 +2385,20 @@ void tst_QTextStream::string_write_operator_ToDevice()
}
}
+void tst_QTextStream::latin1String_write_operator_ToDevice()
+{
+ QBuffer buf;
+ buf.open(QBuffer::WriteOnly);
+ QTextStream stream(&buf);
+ stream.setCodec(QTextCodec::codecForName("ISO-8859-1"));
+ stream.setAutoDetectUnicode(true);
+
+ stream << QLatin1String("No explicit length");
+ stream << QLatin1String("Explicit length - ignore this part", 15);
+ stream.flush();
+ QCOMPARE(buf.buffer().constData(), "No explicit lengthExplicit length");
+}
+
// ------------------------------------------------------------------------------
void tst_QTextStream::useCase1()
{
diff --git a/tests/auto/corelib/io/qurl/idna-test.c b/tests/auto/corelib/io/qurl/idna-test.c
index 40538dfb65..3aabaad03f 100644
--- a/tests/auto/corelib/io/qurl/idna-test.c
+++ b/tests/auto/corelib/io/qurl/idna-test.c
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index f0b6429089..611847852f 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -81,6 +81,8 @@ private slots:
void effectiveTLDs();
void getSetCheck();
void constructing();
+ void hashInPath();
+ void unc();
void assignment();
void comparison();
void copying();
@@ -134,6 +136,7 @@ private slots:
void toPercentEncoding();
void isRelative_data();
void isRelative();
+ void setQueryItems();
void queryItems();
void hasQuery_data();
void hasQuery();
@@ -242,35 +245,6 @@ void tst_QUrl::constructing()
QCOMPARE(url.port(), -1);
QCOMPARE(url.toString(), QString());
- QList<QPair<QString, QString> > query;
- query += qMakePair(QString("type"), QString("login"));
- query += qMakePair(QString("name"), QString("åge nissemannsen"));
- query += qMakePair(QString("ole&du"), QString("anne+jørgen=sant"));
- query += qMakePair(QString("prosent"), QString("%"));
- url.setQueryItems(query);
- QVERIFY(!url.isEmpty());
-
- QCOMPARE(url.encodedQuery().constData(),
- QByteArray("type=login&name=%C3%A5ge%20nissemannsen&ole%26du="
- "anne+j%C3%B8rgen%3Dsant&prosent=%25").constData());
-
- url.setQueryDelimiters('>', '/');
- url.setQueryItems(query);
-
- QCOMPARE(url.encodedQuery(),
- QByteArray("type>login/name>%C3%A5ge%20nissemannsen/ole&du>"
- "anne+j%C3%B8rgen=sant/prosent>%25"));
-
- url.setFragment(QString::fromLatin1("top"));
- QCOMPARE(url.fragment(), QString::fromLatin1("top"));
-
- url.setScheme("http");
- url.setHost("qt.nokia.com");
-
- QCOMPARE(url.toString(),
- QString::fromLatin1("http://qt.nokia.com?type>login/name>åge nissemannsen"
- "/ole&du>anne+jørgen=sant/prosent>%#top"));
-
QUrl justHost("qt.nokia.com");
QVERIFY(!justHost.isEmpty());
QVERIFY(justHost.host().isEmpty());
@@ -279,16 +253,22 @@ void tst_QUrl::constructing()
QUrl hostWithSlashes("//qt.nokia.com");
QVERIFY(hostWithSlashes.path().isEmpty());
QCOMPARE(hostWithSlashes.host(), QString::fromLatin1("qt.nokia.com"));
+}
-
+void tst_QUrl::hashInPath()
+{
QUrl withHashInPath;
withHashInPath.setPath(QString::fromLatin1("hi#mum.txt"));
QCOMPARE(withHashInPath.path(), QString::fromLatin1("hi#mum.txt"));
QCOMPARE(withHashInPath.toEncoded(), QByteArray("hi%23mum.txt"));
+ QCOMPARE(withHashInPath.toString(), QString("hi%23mum.txt"));
+
QUrl fromHashInPath = QUrl::fromEncoded(withHashInPath.toEncoded());
QVERIFY(withHashInPath == fromHashInPath);
+}
-
+void tst_QUrl::unc()
+{
QUrl buildUNC;
buildUNC.setScheme(QString::fromLatin1("file"));
buildUNC.setHost(QString::fromLatin1("somehost"));
@@ -375,7 +355,7 @@ void tst_QUrl::setUrl()
{
QUrl url("hTTp://www.foo.bar:80");
QVERIFY(url.isValid());
- QCOMPARE(url.scheme(), QString::fromLatin1("hTTp"));
+ QCOMPARE(url.scheme(), QString::fromLatin1("http"));
QCOMPARE(url.path(), QString());
QVERIFY(url.encodedQuery().isEmpty());
QVERIFY(url.userInfo().isEmpty());
@@ -385,7 +365,7 @@ void tst_QUrl::setUrl()
QCOMPARE(url.port(), 80);
QUrl url2("//www1.foo.bar");
- QCOMPARE(url.resolved(url2).toString(), QString::fromLatin1("hTTp://www1.foo.bar"));
+ QCOMPARE(url.resolved(url2).toString(), QString::fromLatin1("http://www1.foo.bar"));
}
{
@@ -544,13 +524,11 @@ void tst_QUrl::setUrl()
}
{
- QUrl notPretty;
- notPretty.setEncodedUrl("http://ferret.lmh.ox.ac.uk/%7Ekdecvs/");
+ QUrl notPretty("http://ferret.lmh.ox.ac.uk/%7Ekdecvs/");
QVERIFY(notPretty.isValid());
QCOMPARE(notPretty.toString(), QString::fromLatin1("http://ferret.lmh.ox.ac.uk/~kdecvs/"));
- QUrl notPretty2;
- notPretty2.setEncodedUrl("file:/home/test/directory%20with%20spaces");
+ QUrl notPretty2("file:/home/test/directory%20with%20spaces");
QVERIFY(notPretty2.isValid());
QCOMPARE(notPretty2.toString(), QString::fromLatin1("file:///home/test/directory with spaces"));
@@ -564,7 +542,7 @@ void tst_QUrl::setUrl()
QCOMPARE(url15581.toEncoded().constData(), QByteArray("http://alain.knaff.linux.lu/bug-reports/kde/spaces%20in%20url.html").constData());
QUrl url15582("http://alain.knaff.linux.lu/bug-reports/kde/percentage%in%url.html");
- QCOMPARE(url15582.toString(), QString::fromLatin1("http://alain.knaff.linux.lu/bug-reports/kde/percentage%in%url.html"));
+ QCOMPARE(url15582.toString(), QString::fromLatin1("http://alain.knaff.linux.lu/bug-reports/kde/percentage%25in%25url.html"));
QCOMPARE(url15582.toEncoded(), QByteArray("http://alain.knaff.linux.lu/bug-reports/kde/percentage%25in%25url.html"));
}
@@ -577,8 +555,7 @@ void tst_QUrl::setUrl()
charles.setPath("/home/charles/foo%20moo");
QCOMPARE(charles.path(), QString::fromLatin1("/home/charles/foo%20moo"));
- QUrl charles2;
- charles2.setEncodedUrl("file:/home/charles/foo%20moo");
+ QUrl charles2("file:/home/charles/foo%20moo");
QCOMPARE(charles2.path(), QString::fromLatin1("/home/charles/foo moo"));
}
@@ -642,8 +619,7 @@ void tst_QUrl::setUrl()
}
{
- QUrl url;
- url.setEncodedUrl("data:text/javascript,d5%20%3D%20'five\\u0027s'%3B");
+ QUrl url("data:text/javascript,d5%20%3D%20'five\\u0027s'%3B");
QVERIFY(url.isValid());
QCOMPARE(url.scheme(), QString("data"));
QCOMPARE(url.host(), QString());
@@ -665,11 +641,11 @@ void tst_QUrl::i18n_data()
QTest::addColumn<QString>("input");
QTest::addColumn<QByteArray>("punyOutput");
- QTest::newRow("øl") << QString::fromLatin1("http://ole:passord@www.øl.no/index.html?ole=æsemann&ilder gud=hei#top")
- << QByteArray("http://ole:passord@www.xn--l-4ga.no/index.html?ole=%C3%A6semann&ilder%20gud=hei#top");
- QTest::newRow("räksmörgås") << QString::fromLatin1("http://www.räksmörgås.no/")
+ QTest::newRow("øl") << QString::fromUtf8("http://ole:passord@www.øl.no/index.html?ole=æsemann&ilder gud=hei#top")
+ << QByteArray("http://ole:passord@www.xn--l-4ga.no/index.html?ole=%C3%A6semann&ilder%20gud=hei#top");
+ QTest::newRow("räksmörgås") << QString::fromUtf8("http://www.räksmörgås.no/")
<< QByteArray("http://www.xn--rksmrgs-5wao1o.no/");
- QTest::newRow("bühler") << QString::fromLatin1("http://www.bühler.no/")
+ QTest::newRow("bühler") << QString::fromUtf8("http://www.bühler.no/")
<< QByteArray("http://www.xn--bhler-kva.no/");
QTest::newRow("non-latin1")
<< QString::fromUtf8("http://www.\316\261\316\270\316\256\316\275\316\261.info")
@@ -1338,7 +1314,7 @@ void tst_QUrl::compat_decode_data()
QTest::newRow("HTTPUrl") << QByteArray("http://qt.nokia.com") << QString("http://qt.nokia.com");
QTest::newRow("HTTPUrlEncoded") << QByteArray("http://qt%20nokia%20com") << QString("http://qt nokia com");
QTest::newRow("EmptyString") << QByteArray("") << QString("");
- QTest::newRow("Task27166") << QByteArray("Fran%C3%A7aise") << QString("Française");
+ QTest::newRow("Task27166") << QByteArray("Fran%C3%A7aise") << QString::fromUtf8("Française");
}
void tst_QUrl::compat_decode()
@@ -1360,7 +1336,7 @@ void tst_QUrl::compat_encode_data()
QTest::newRow("HTTPUrl") << QString("http://qt.nokia.com") << QByteArray("http%3A//qt.nokia.com");
QTest::newRow("HTTPUrlEncoded") << QString("http://qt nokia com") << QByteArray("http%3A//qt%20nokia%20com");
QTest::newRow("EmptyString") << QString("") << QByteArray("");
- QTest::newRow("Task27166") << QString::fromLatin1("Française") << QByteArray("Fran%C3%A7aise");
+ QTest::newRow("Task27166") << QString::fromUtf8("Française") << QByteArray("Fran%C3%A7aise");
}
void tst_QUrl::compat_encode()
@@ -1393,7 +1369,7 @@ void tst_QUrl::percentEncoding_data()
QTest::addColumn<QByteArray>("encoded");
QTest::newRow("test_01") << QString::fromLatin1("sdfsdf") << QByteArray("sdfsdf");
- QTest::newRow("test_02") << QString::fromLatin1("æss") << QByteArray("%C3%A6ss");
+ QTest::newRow("test_02") << QString::fromUtf8("æss") << QByteArray("%C3%A6ss");
// not unreserved or reserved
QTest::newRow("test_03") << QString::fromLatin1("{}") << QByteArray("%7B%7D");
}
@@ -1407,6 +1383,7 @@ void tst_QUrl::percentEncoding()
QVERIFY(QUrl::fromEncoded(QUrl(original).toEncoded()) == QUrl(original));
QCOMPARE(QUrl::fromEncoded(QUrl(original).toEncoded()).toString(), original);
QVERIFY(QUrl::fromEncoded(encoded) == QUrl(original));
+ QCOMPARE(QUrl(QUrl(original).toString()).toString(), original);
}
void tst_QUrl::toPercentEncoding_data()
@@ -1460,15 +1437,15 @@ void tst_QUrl::swap()
void tst_QUrl::symmetry()
{
- QUrl url(QString::fromLatin1("http://www.räksmörgås.se/pub?a=b&a=dø&a=f#vræl"));
+ QUrl url(QString::fromUtf8("http://www.räksmörgås.se/pub?a=b&a=dø&a=f#vræl"));
QCOMPARE(url.scheme(), QString::fromLatin1("http"));
- QCOMPARE(url.host(), QString::fromLatin1("www.räksmörgås.se"));
+ QCOMPARE(url.host(), QString::fromUtf8("www.räksmörgås.se"));
QCOMPARE(url.path(), QString::fromLatin1("/pub"));
// this will be encoded ...
QCOMPARE(url.encodedQuery().constData(), QString::fromLatin1("a=b&a=d%C3%B8&a=f").toLatin1().constData());
// unencoded
- QCOMPARE(url.allQueryItemValues("a").join("").toLatin1().constData(), "bdøf");
- QCOMPARE(url.fragment(), QString::fromLatin1("vræl"));
+ QCOMPARE(url.allQueryItemValues("a").join(""), QString::fromUtf8("bdøf"));
+ QCOMPARE(url.fragment(), QString::fromUtf8("vræl"));
QUrl onlyHost("//qt.nokia.com");
QCOMPARE(onlyHost.toString(), QString::fromLatin1("//qt.nokia.com"));
@@ -1480,14 +1457,16 @@ void tst_QUrl::symmetry()
QByteArray b = urlPreviewList.toEncoded();
QCOMPARE(b.constData(), "http://desktop:33326/upnp/%7B32f525a6-6f31-426e-91ca-01c2e6c2c57e%7D");
QCOMPARE(QUrl::fromEncoded(b).toString(), urlString);
-
- }{
+ QCOMPARE(QUrl(b).toString(), urlString);
+ }
+ {
QString urlString = QString::fromLatin1("http://desktop:53423/deviceDescription?uuid={7977c17b-00bf-4af9-894e-fed28573c3a9}");
QUrl urlPreviewList(urlString);
QCOMPARE(urlPreviewList.toString(), urlString);
QByteArray b = urlPreviewList.toEncoded();
QCOMPARE(b.constData(), "http://desktop:53423/deviceDescription?uuid=%7B7977c17b-00bf-4af9-894e-fed28573c3a9%7D");
QCOMPARE(QUrl::fromEncoded(b).toString(), urlString);
+ QCOMPARE(QUrl(b).toString(), urlString);
}
}
@@ -1567,9 +1546,9 @@ void tst_QUrl::punycode_data()
QTest::addColumn<QString>("original");
QTest::addColumn<QByteArray>("encoded");
- QTest::newRow("øl") << QString::fromLatin1("øl") << QByteArray("xn--l-4ga");
- QTest::newRow("Bühler") << QString::fromLatin1("Bühler") << QByteArray("xn--Bhler-kva");
- QTest::newRow("räksmörgås") << QString::fromLatin1("räksmörgås") << QByteArray("xn--rksmrgs-5wao1o");
+ QTest::newRow("øl") << QString::fromUtf8("øl") << QByteArray("xn--l-4ga");
+ QTest::newRow("Bühler") << QString::fromUtf8("Bühler") << QByteArray("xn--Bhler-kva");
+ QTest::newRow("räksmörgås") << QString::fromUtf8("räksmörgås") << QByteArray("xn--rksmrgs-5wao1o");
}
void tst_QUrl::punycode()
@@ -1608,6 +1587,43 @@ void tst_QUrl::isRelative()
QCOMPARE(QUrl(url).isRelative(), trueFalse);
}
+void tst_QUrl::setQueryItems()
+{
+ QUrl url;
+
+ QList<QPair<QString, QString> > query;
+ query += qMakePair(QString("type"), QString("login"));
+ query += qMakePair(QString("name"), QString::fromUtf8("Ã¥ge nissemannsen"));
+ query += qMakePair(QString("ole&du"), QString::fromUtf8("anne+jørgen=sant"));
+ query += qMakePair(QString("prosent"), QString("%"));
+ url.setQueryItems(query);
+ QVERIFY(!url.isEmpty());
+
+ QCOMPARE(url.encodedQuery().constData(),
+ QByteArray("type=login&name=%C3%A5ge%20nissemannsen&ole%26du="
+ "anne+j%C3%B8rgen%3Dsant&prosent=%25").constData());
+
+ url.setQueryDelimiters('>', '/');
+ url.setQueryItems(query);
+
+ QCOMPARE(url.encodedQuery(),
+ QByteArray("type>login/name>%C3%A5ge%20nissemannsen/ole&du>"
+ "anne+j%C3%B8rgen=sant/prosent>%25"));
+
+ url.setFragment(QString::fromLatin1("top"));
+ QCOMPARE(url.fragment(), QString::fromLatin1("top"));
+
+ url.setScheme("http");
+ url.setHost("qt.nokia.com");
+
+ QCOMPARE(url.toEncoded().constData(),
+ "http://qt.nokia.com?type>login/name>%C3%A5ge%20nissemannsen/ole&du>"
+ "anne+j%C3%B8rgen=sant/prosent>%25#top");
+ QCOMPARE(url.toString(),
+ QString::fromUtf8("http://qt.nokia.com?type>login/name>Ã¥ge nissemannsen"
+ "/ole&du>anne+jørgen=sant/prosent>%25#top"));
+}
+
void tst_QUrl::queryItems()
{
QUrl url;
@@ -1844,8 +1860,7 @@ void tst_QUrl::tolerantParser()
QCOMPARE(url.path(), QString("/path with spaces.html"));
QCOMPARE(url.toEncoded(), QByteArray("http://www.example.com/path%20with%20spaces.html"));
url.setUrl("http://www.example.com/path%20with spaces.html", QUrl::StrictMode);
- QVERIFY(url.isValid());
- QCOMPARE(url.toEncoded(), QByteArray("http://www.example.com/path%2520with%20spaces.html"));
+ QVERIFY(!url.isValid());
}
{
QUrl url = QUrl::fromEncoded("http://www.example.com/path%20with spaces.html");
@@ -1940,7 +1955,7 @@ void tst_QUrl::correctEncodedMistakes_data()
{
QTest::addColumn<QByteArray>("encodedUrl");
QTest::addColumn<bool>("result");
- QTest::addColumn<QString>("toString");
+ QTest::addColumn<QString>("toDecoded");
QTest::addColumn<QByteArray>("toEncoded");
QTest::newRow("%") << QByteArray("%") << true << QString("%") << QByteArray("%25");
@@ -1957,13 +1972,14 @@ void tst_QUrl::correctEncodedMistakes()
{
QFETCH(QByteArray, encodedUrl);
QFETCH(bool, result);
- QFETCH(QString, toString);
+ QFETCH(QString, toDecoded);
QFETCH(QByteArray, toEncoded);
QUrl url = QUrl::fromEncoded(encodedUrl);
QCOMPARE(url.isValid(), result);
if (url.isValid()) {
- QCOMPARE(url.toString(), toString);
+ Q_UNUSED(toDecoded); // no full-decoding available at the moment
+ QCOMPARE(url.toString(), QString::fromLatin1(toEncoded));
QCOMPARE(url.toEncoded(), toEncoded);
}
}
@@ -1972,7 +1988,7 @@ void tst_QUrl::correctDecodedMistakes_data()
{
QTest::addColumn<QString>("decodedUrl");
QTest::addColumn<bool>("result");
- QTest::addColumn<QString>("toString");
+ QTest::addColumn<QString>("toDecoded");
QTest::addColumn<QByteArray>("toEncoded");
QTest::newRow("%") << QString("%") << true << QString("%") << QByteArray("%25");
@@ -1982,20 +1998,21 @@ void tst_QUrl::correctDecodedMistakes_data()
QTest::newRow("13%!!") << QString("13%!!") << true << QString("13%!!") << QByteArray("13%25!!");
QTest::newRow("13%a") << QString("13%a") << true << QString("13%a") << QByteArray("13%25a");
QTest::newRow("13%az") << QString("13%az") << true << QString("13%az") << QByteArray("13%25az");
- QTest::newRow("13%25") << QString("13%25") << true << QString("13%25") << QByteArray("13%2525");
+ QTest::newRow("13%25") << QString("13%25") << true << QString("13%25") << QByteArray("13%25");
}
void tst_QUrl::correctDecodedMistakes()
{
QFETCH(QString, decodedUrl);
QFETCH(bool, result);
- QFETCH(QString, toString);
+ QFETCH(QString, toDecoded);
QFETCH(QByteArray, toEncoded);
QUrl url(decodedUrl);
QCOMPARE(url.isValid(), result);
if (url.isValid()) {
- QCOMPARE(url.toString(), toString);
+ Q_UNUSED(toDecoded); // no full-decoding available at the moment
+ QCOMPARE(url.toString(), QString::fromLatin1(toEncoded));
QCOMPARE(url.toEncoded(), toEncoded);
}
}
@@ -2695,7 +2712,7 @@ void tst_QUrl::tldRestrictions()
{
QFETCH(QString, tld);
- // www.brød.tld
+ // www.brød.tld
QByteArray ascii = "www.xn--brd-1na." + tld.toLatin1();
QString unicode = QLatin1String("www.br\370d.") + tld;
QString encoded = QUrl::fromAce(ascii);
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro b/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
new file mode 100644
index 0000000000..0b5bf9fd5c
--- /dev/null
+++ b/tests/auto/corelib/io/qwinoverlappedionotifier/qwinoverlappedionotifier.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase parallel_test
+TARGET = tst_qwinoverlappedionotifier
+QT = core-private testlib
+SOURCES = tst_qwinoverlappedionotifier.cpp
diff --git a/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
new file mode 100644
index 0000000000..6190b62bbf
--- /dev/null
+++ b/tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <private/qwinoverlappedionotifier_p.h>
+#include <qbytearray.h>
+
+class tst_QWinOverlappedIoNotifier : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void readFile_data();
+ void readFile();
+ void waitForNotified_data();
+ void waitForNotified();
+ void brokenPipe();
+
+private:
+ QFileInfo sourceFileInfo;
+ DWORD notifiedBytesRead;
+ DWORD notifiedErrorCode;
+};
+
+class NotifierSink : public QObject
+{
+ Q_OBJECT
+public:
+ NotifierSink(QWinOverlappedIoNotifier *notifier)
+ : QObject(notifier),
+ notifications(0),
+ notifiedBytesRead(0),
+ notifiedErrorCode(ERROR_SUCCESS)
+ {
+ connect(notifier, &QWinOverlappedIoNotifier::notified, this, &NotifierSink::notified);
+ }
+
+protected slots:
+ void notified(DWORD bytesRead, DWORD errorCode)
+ {
+ notifications++;
+ notifiedBytesRead = bytesRead;
+ notifiedErrorCode = errorCode;
+ emit notificationReceived();
+ }
+
+signals:
+ void notificationReceived();
+
+public:
+ int notifications;
+ DWORD notifiedBytesRead;
+ DWORD notifiedErrorCode;
+};
+
+void tst_QWinOverlappedIoNotifier::initTestCase()
+{
+ sourceFileInfo.setFile(QFINDTESTDATA("tst_qwinoverlappedionotifier.cpp"));
+ QVERIFY2(sourceFileInfo.exists(), "File tst_qwinoverlappedionotifier.cpp not found.");
+}
+
+void tst_QWinOverlappedIoNotifier::readFile_data()
+{
+ QTest::addColumn<QString>("fileName");
+ QTest::addColumn<int>("readBufferSize");
+ QTest::addColumn<DWORD>("expectedBytesRead");
+
+ QString sourceFileName = QDir::toNativeSeparators(sourceFileInfo.absoluteFilePath());
+ int sourceFileSize = sourceFileInfo.size();
+
+ QTest::newRow("read file, less than available")
+ << sourceFileName << sourceFileSize / 2 << DWORD(sourceFileSize / 2);
+ QTest::newRow("read file, more than available")
+ << sourceFileName << sourceFileSize * 2 << DWORD(sourceFileSize);
+}
+
+void tst_QWinOverlappedIoNotifier::readFile()
+{
+ QFETCH(QString, fileName);
+ QFETCH(int, readBufferSize);
+ QFETCH(DWORD, expectedBytesRead);
+
+ QWinOverlappedIoNotifier notifier;
+ NotifierSink sink(&notifier);
+ connect(&sink, &NotifierSink::notificationReceived, &QTestEventLoop::instance(), &QTestEventLoop::exitLoop);
+
+ HANDLE hFile = CreateFile(reinterpret_cast<const wchar_t*>(fileName.utf16()),
+ GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
+ notifier.setHandle(hFile);
+ notifier.setEnabled(true);
+
+ OVERLAPPED overlapped = {0};
+ QByteArray buffer(readBufferSize, 0);
+ BOOL readSuccess = ReadFile(hFile, buffer.data(), buffer.size(), NULL, &overlapped);
+ QVERIFY(readSuccess || GetLastError() == ERROR_IO_PENDING);
+
+ QTestEventLoop::instance().enterLoop(3);
+ CloseHandle(hFile);
+ QCOMPARE(sink.notifications, 1);
+ QCOMPARE(sink.notifiedBytesRead, expectedBytesRead);
+ QCOMPARE(sink.notifiedErrorCode, DWORD(ERROR_SUCCESS));
+}
+
+void tst_QWinOverlappedIoNotifier::waitForNotified_data()
+{
+ readFile_data();
+}
+
+void tst_QWinOverlappedIoNotifier::waitForNotified()
+{
+ QFETCH(QString, fileName);
+ QFETCH(int, readBufferSize);
+ QFETCH(DWORD, expectedBytesRead);
+
+ QWinOverlappedIoNotifier notifier;
+ NotifierSink sink(&notifier);
+ HANDLE hFile = CreateFile(reinterpret_cast<const wchar_t*>(fileName.utf16()),
+ GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
+ QCOMPARE(notifier.waitForNotified(0), false);
+ notifier.setHandle(hFile);
+ notifier.setEnabled(true);
+ QCOMPARE(notifier.waitForNotified(100), false);
+
+ OVERLAPPED overlapped = {0};
+ QByteArray buffer(readBufferSize, 0);
+ BOOL readSuccess = ReadFile(hFile, buffer.data(), buffer.size(), NULL, &overlapped);
+ QVERIFY(readSuccess || GetLastError() == ERROR_IO_PENDING);
+
+ QCOMPARE(notifier.waitForNotified(3000), true);
+ CloseHandle(hFile);
+ QCOMPARE(sink.notifications, 1);
+ QCOMPARE(sink.notifiedBytesRead, expectedBytesRead);
+ QCOMPARE(sink.notifiedErrorCode, DWORD(ERROR_SUCCESS));
+ QCOMPARE(notifier.waitForNotified(100), false);
+}
+
+void tst_QWinOverlappedIoNotifier::brokenPipe()
+{
+ QWinOverlappedIoNotifier notifier;
+ NotifierSink sink(&notifier);
+ connect(&sink, &NotifierSink::notificationReceived, &QTestEventLoop::instance(), &QTestEventLoop::exitLoop);
+
+ wchar_t pipeName[] = L"\\\\.\\pipe\\tst_QWinOverlappedIoNotifier_brokenPipe";
+ HANDLE hPipe = CreateNamedPipe(pipeName,
+ PIPE_ACCESS_DUPLEX,
+ PIPE_TYPE_BYTE | PIPE_NOWAIT | PIPE_REJECT_REMOTE_CLIENTS,
+ 1, 0, 0, 0, NULL);
+ QVERIFY(hPipe != INVALID_HANDLE_VALUE);
+ HANDLE hReadEnd = CreateFile(pipeName, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
+ QVERIFY(hReadEnd != INVALID_HANDLE_VALUE);
+ notifier.setHandle(hReadEnd);
+ notifier.setEnabled(true);
+
+ OVERLAPPED overlapped = {0};
+ QByteArray buffer(1024, 0);
+ BOOL readSuccess = ReadFile(hReadEnd, buffer.data(), buffer.size(), NULL, &overlapped);
+ QVERIFY(readSuccess || GetLastError() == ERROR_IO_PENDING);
+
+ // close the write end of the pipe
+ CloseHandle(hPipe);
+
+ QTestEventLoop::instance().enterLoop(3);
+ CloseHandle(hReadEnd);
+ QCOMPARE(sink.notifications, 1);
+ QCOMPARE(sink.notifiedBytesRead, DWORD(0));
+ QCOMPARE(sink.notifiedErrorCode, DWORD(ERROR_BROKEN_PIPE));
+}
+
+QTEST_MAIN(tst_QWinOverlappedIoNotifier)
+
+#include "tst_qwinoverlappedionotifier.moc"
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro b/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
index acf74737a8..9e59251379 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/qabstractitemmodel.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qabstractitemmodel
-QT += widgets testlib
+QT += testlib
mtdir = ../../../other/modeltest
INCLUDEPATH += $$PWD/$${mtdir}
diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
index af1e492a8b..2ca5df477b 100644
--- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -72,6 +72,7 @@ private slots:
void match();
void dropMimeData_data();
void dropMimeData();
+ void canDropMimeData();
void changePersistentIndex();
void movePersistentIndex();
@@ -79,6 +80,8 @@ private slots:
void insertColumns();
void removeRows();
void removeColumns();
+ void moveRows();
+ void moveColumns();
void reset();
@@ -142,8 +145,15 @@ public:
void setPersistent(const QModelIndex &from, const QModelIndex &to);
bool removeRows ( int row, int count, const QModelIndex & parent = QModelIndex() );
bool removeColumns( int column, int count, const QModelIndex & parent = QModelIndex());
+ bool moveRows (const QModelIndex &sourceParent, int sourceRow, int count,
+ const QModelIndex &destinationParent, int destinationChild);
+ bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count,
+ const QModelIndex &destinationParent, int destinationChild);
void reset();
+ bool canDropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent) const;
+
int cCount, rCount;
mutable bool wrongIndex;
QVector<QVector<QString> > table;
@@ -246,11 +256,88 @@ bool QtTestModel::removeColumns(int column, int count, const QModelIndex & paren
return true;
}
+bool QtTestModel::moveRows(const QModelIndex &sourceParent, int src, int cnt,
+ const QModelIndex &destinationParent, int dst)
+{
+ if (!QAbstractItemModel::beginMoveRows(sourceParent, src, src + cnt - 1,
+ destinationParent, dst))
+ return false;
+
+ QVector<QString> buf;
+ if (dst < src) {
+ for (int i = 0; i < cnt; ++i) {
+ buf.swap(table[src + i]);
+ table.remove(src + 1);
+ table.insert(dst, buf);
+ }
+ } else if (src < dst) {
+ for (int i = 0; i < cnt; ++i) {
+ buf.swap(table[src]);
+ table.remove(src);
+ table.insert(dst + i, buf);
+ }
+ }
+
+ rCount = table.count();
+
+ QAbstractItemModel::endMoveRows();
+ return true;
+}
+
+bool QtTestModel::moveColumns(const QModelIndex &sourceParent, int src, int cnt,
+ const QModelIndex &destinationParent, int dst)
+{
+ if (!QAbstractItemModel::beginMoveColumns(sourceParent, src, src + cnt - 1,
+ destinationParent, dst))
+ return false;
+
+ for (int r = 0; r < rCount; ++r) {
+ QString buf;
+ if (dst < src) {
+ for (int i = 0; i < cnt; ++i) {
+ buf = table[r][src + i];
+ table[r].remove(src + 1);
+ table[r].insert(dst, buf);
+ }
+ } else if (src < dst) {
+ for (int i = 0; i < cnt; ++i) {
+ buf = table[r][src];
+ table[r].remove(src);
+ table[r].insert(dst + i, buf);
+ }
+ }
+ }
+
+ cCount = table.at(0).count();
+
+ QAbstractItemModel::endMoveColumns();
+ return true;
+}
+
void QtTestModel::reset()
{
QAbstractItemModel::reset();
}
+bool QtTestModel::canDropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent) const
+{
+ Q_UNUSED(data);
+ Q_UNUSED(action);
+
+ // For testing purposes, we impose some arbitrary rules on what may be dropped.
+ if (!parent.isValid() && row < 0 && column < 0) {
+ // a drop in emtpy space in the view is allowed.
+ // For example, in a filesystem view, a file may be dropped into empty space
+ // if it represents a writable directory.
+ return true;
+ }
+
+ // We then arbitrarily decide to only allow drops on odd rows.
+ // A filesystem view/model might be able to drop onto (writable) directories.
+ return row % 2 == 0;
+}
+
/**
* The source Model *must* be initialized before the _data function, since the _data function uses QModelIndexes to reference the items in the tables.
* Therefore, we must initialize it globally.
@@ -691,6 +778,15 @@ void tst_QAbstractItemModel::dropMimeData()
}
}
+void tst_QAbstractItemModel::canDropMimeData()
+{
+ QtTestModel model(3, 3);
+
+ QVERIFY(model.canDropMimeData(0, Qt::CopyAction, -1, -1, QModelIndex()));
+ QVERIFY(model.canDropMimeData(0, Qt::CopyAction, 0, 0, QModelIndex()));
+ QVERIFY(!model.canDropMimeData(0, Qt::CopyAction, 1, 0, QModelIndex()));
+}
+
void tst_QAbstractItemModel::changePersistentIndex()
{
QtTestModel model(3, 3);
@@ -781,6 +877,36 @@ void tst_QAbstractItemModel::insertColumns()
QCOMPARE(columnsInsertedSpy.count(), 1);
}
+void tst_QAbstractItemModel::moveRows()
+{
+ QtTestModel model(10, 10);
+
+ QSignalSpy rowsAboutToBeMovedSpy(&model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
+ QSignalSpy rowsMovedSpy(&model, SIGNAL(rowsMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
+
+ QVERIFY(rowsAboutToBeMovedSpy.isValid());
+ QVERIFY(rowsMovedSpy.isValid());
+
+ QCOMPARE(model.moveRows(QModelIndex(), 6, 4, QModelIndex(), 1), true);
+ QCOMPARE(rowsAboutToBeMovedSpy.count(), 1);
+ QCOMPARE(rowsMovedSpy.count(), 1);
+}
+
+void tst_QAbstractItemModel::moveColumns()
+{
+ QtTestModel model(10, 10);
+
+ QSignalSpy columnsAboutToBeMovedSpy(&model, SIGNAL(columnsAboutToBeMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
+ QSignalSpy columnsMovedSpy(&model, SIGNAL(columnsMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
+
+ QVERIFY(columnsAboutToBeMovedSpy.isValid());
+ QVERIFY(columnsMovedSpy.isValid());
+
+ QCOMPARE(model.moveColumns(QModelIndex(), 6, 4, QModelIndex(), 1), true);
+ QCOMPARE(columnsAboutToBeMovedSpy.count(), 1);
+ QCOMPARE(columnsMovedSpy.count(), 1);
+}
+
void tst_QAbstractItemModel::reset()
{
QtTestModel model(10, 10);
@@ -1669,6 +1795,19 @@ private:
};
+class ModelWithCustomRole : public QStringListModel
+{
+ Q_OBJECT
+public:
+ ModelWithCustomRole(QObject *parent = 0)
+ : QStringListModel(parent)
+ {
+ QHash<int, QByteArray> roleNames_ = roleNames();
+ roleNames_.insert(Qt::UserRole + 1, "custom");
+ setRoleNames(roleNames_);
+ }
+};
+
ListenerObject::ListenerObject(QAbstractProxyModel *parent)
: QObject(parent), m_model(parent)
{
@@ -1722,7 +1861,7 @@ void tst_QAbstractItemModel::testReset()
nullProxy->setSourceModel(m_model);
// Makes sure the model and proxy are in a consistent state. before and after reset.
- new ListenerObject(nullProxy);
+ ListenerObject *listener = new ListenerObject(nullProxy);
ModelResetCommandFixed *resetCommand = new ModelResetCommandFixed(m_model, this);
@@ -1741,6 +1880,28 @@ void tst_QAbstractItemModel::testReset()
QVERIFY(m_model->rowCount() == 9);
QModelIndex destIndex = m_model->index(4, 0);
QVERIFY(m_model->rowCount(destIndex) == 11);
+
+ // Delete it because its slots test things which are not true after this point.
+ delete listener;
+
+ QSignalSpy proxyBeforeResetSpy(nullProxy, SIGNAL(modelAboutToBeReset()));
+ QSignalSpy proxyAfterResetSpy(nullProxy, SIGNAL(modelReset()));
+
+ // Before setting it, it does not have custom roles.
+ QCOMPARE(nullProxy->roleNames().value(Qt::UserRole + 1), QByteArray());
+
+ nullProxy->setSourceModel(new ModelWithCustomRole(this));
+ QVERIFY(proxyBeforeResetSpy.size() == 1);
+ QVERIFY(proxyAfterResetSpy.size() == 1);
+
+ QCOMPARE(nullProxy->roleNames().value(Qt::UserRole + 1), QByteArray("custom"));
+
+ nullProxy->setSourceModel(m_model);
+ QVERIFY(proxyBeforeResetSpy.size() == 2);
+ QVERIFY(proxyAfterResetSpy.size() == 2);
+
+ // After being reset the proxy must be queried again.
+ QCOMPARE(nullProxy->roleNames().value(Qt::UserRole + 1), QByteArray());
}
class CustomRoleModel : public QStringListModel
diff --git a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
index 088ad0afdc..6d61f3f832 100644
--- a/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qabstractproxymodel/tst_qabstractproxymodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
index fc11fbf763..567bb58752 100644
--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
index 20985b69a6..99b9bb92f3 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
index 6d673ae00f..cbe7da11ad 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
index 552b3d6eab..94a81b981e 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 559a806ef3..b31b64d974 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h b/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
index 1de3018228..900b3152ae 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/qmodellistener.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
index 6c7c87c940..6345678b2f 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/json/json.pro b/tests/auto/corelib/json/json.pro
new file mode 100644
index 0000000000..5158b7337a
--- /dev/null
+++ b/tests/auto/corelib/json/json.pro
@@ -0,0 +1,8 @@
+TARGET = tst_qtjson
+QT = core testlib
+CONFIG -= app_bundle
+CONFIG += testcase
+
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
+
+SOURCES += tst_qtjson.cpp
diff --git a/tests/auto/corelib/json/test.bjson b/tests/auto/corelib/json/test.bjson
new file mode 100644
index 0000000000..aa412eec67
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..7c935fffc8
--- /dev/null
+++ b/tests/auto/corelib/json/test.json
@@ -0,0 +1,66 @@
+[
+ "JSON Test Pattern pass1",
+ {"object with 1 member":["array with 1 element"]},
+ {},
+ [],
+ -42,
+ true,
+ false,
+ null,
+ {
+ "integer": 1234567890,
+ "real": -9876.543210,
+ "e": 0.123456789e-12,
+ "E": 1.234567890E+34,
+ "": 23456789012E66,
+ "zero": 0,
+ "one": 1,
+ "space": " ",
+ "quote": "\"",
+ "backslash": "\\",
+ "controls": "\b\f\n\r\t",
+ "slash": "/ & \/",
+ "alpha": "abcdefghijklmnopqrstuvwxyz",
+ "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+ "digit": "0123456789",
+ "0123456789": "digit",
+ "special": "`1~!@#$%^&*()_+-={\':[,]}|;.</>?",
+ "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
+ "true": true,
+ "false": false,
+ "null": null,
+ "array":[ ],
+ "object":{ },
+ "address": "50 St. James Street",
+ "url": "http://www.JSON.org/",
+ "comment": "// /* <!-- --",
+ "# -- --> */": " ",
+ " s p a c e d " :[1,2 , 3
+
+,
+
+4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7],
+ "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
+ "quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
+ "\/\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?" : "A key can be any string"
+ },
+ 0.5 ,98.6
+,
+99.44
+,
+
+1066,
+1e1,
+0.1e1,
+1e-1,
+1e00,
+2e+00,
+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}}
+]
+
diff --git a/tests/auto/corelib/json/test2.json b/tests/auto/corelib/json/test2.json
new file mode 100644
index 0000000000..303f879b62
--- /dev/null
+++ b/tests/auto/corelib/json/test2.json
@@ -0,0 +1 @@
+{ "foo": ["ab"] }
diff --git a/tests/auto/corelib/json/test3.json b/tests/auto/corelib/json/test3.json
new file mode 100644
index 0000000000..48cb29a47f
--- /dev/null
+++ b/tests/auto/corelib/json/test3.json
@@ -0,0 +1,15 @@
+{
+ "firstName": "John",
+ "lastName" : "Smith",
+ "age" : 25,
+ "address" : {
+ "streetAddress": "21 2nd Street",
+ "city" : "New York",
+ "state" : "NY",
+ "postalCode" : "10021"
+ },
+ "phoneNumber": [
+ { "type" : "home", "number": "212 555-1234" },
+ { "type" : "fax", "number": "646 555-4567" }
+ ]
+}
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
new file mode 100644
index 0000000000..e35f645ef6
--- /dev/null
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -0,0 +1,1589 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest>
+#include "qjsonarray.h"
+#include "qjsonobject.h"
+#include "qjsonvalue.h"
+#include "qjsondocument.h"
+
+class TestQtJson: public QObject
+{
+ Q_OBJECT
+public:
+ TestQtJson(QObject *parent = 0);
+
+private Q_SLOTS:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void testValueSimple();
+ void testNumbers();
+
+ void testObjectSimple();
+ void testObjectSmallKeys();
+ void testArraySimple();
+ void testValueObject();
+ void testValueArray();
+ void testObjectNested();
+ void testArrayNested();
+ void testArrayNestedEmpty();
+ void testObjectNestedEmpty();
+
+ void testValueRef();
+ void testObjectIteration();
+ void testArrayIteration();
+
+ void testObjectFind();
+
+ void testDocument();
+
+ void nullValues();
+ void nullArrays();
+ void nullObject();
+
+ void keySorting();
+
+ void undefinedValues();
+
+ void fromVariantMap();
+ void toVariantMap();
+ void toVariantList();
+
+ void toJson();
+ void fromJson();
+ void fromBinary();
+ void toAndFromBinary_data();
+ void toAndFromBinary();
+ void parseNumbers();
+ void parseStrings();
+ void parseDuplicateKeys();
+ void testParser();
+
+ void compactArray();
+ void compactObject();
+
+ void validation();
+
+ void assignToDocument();
+
+ void testDuplicateKeys();
+ void testCompaction();
+ void testDebugStream();
+ void testCompactionError();
+};
+
+TestQtJson::TestQtJson(QObject *parent) : QObject(parent)
+{
+}
+
+void TestQtJson::initTestCase()
+{
+}
+
+void TestQtJson::cleanupTestCase()
+{
+}
+
+void TestQtJson::init()
+{
+}
+
+void TestQtJson::cleanup()
+{
+}
+
+void TestQtJson::testValueSimple()
+{
+ QJsonValue value(true);
+ QCOMPARE(value.type(), QJsonValue::Bool);
+ QCOMPARE(value.toDouble(), 0.);
+ QCOMPARE(value.toString(), QString());
+ QCOMPARE(value.toBool(), true);
+ QCOMPARE(value.toObject(), QJsonObject());
+ QCOMPARE(value.toArray(), QJsonArray());
+
+ value = 999.;
+ QCOMPARE(value.type(), QJsonValue::Double);
+ QCOMPARE(value.toDouble(), 999.);
+ QCOMPARE(value.toString(), QString());
+ QCOMPARE(value.toBool(), false);
+ QCOMPARE(value.toObject(), QJsonObject());
+ QCOMPARE(value.toArray(), QJsonArray());
+
+ value = QLatin1String("test");
+ QCOMPARE(value.toDouble(), 0.);
+ QCOMPARE(value.toString(), QLatin1String("test"));
+ QCOMPARE(value.toBool(), false);
+ QCOMPARE(value.toObject(), QJsonObject());
+ QCOMPARE(value.toArray(), QJsonArray());
+
+ value = true;
+ QCOMPARE(value.toDouble(), 0.);
+ QCOMPARE(value.toString(), QString());
+ QCOMPARE(value.toBool(), true);
+ QCOMPARE(value.toObject(), QJsonObject());
+ QCOMPARE(value.toArray(), QJsonArray());
+
+ value = 999.;
+ QCOMPARE(value.toDouble(), 999.);
+ QCOMPARE(value.toString(), QString());
+ QCOMPARE(value.toBool(), false);
+ QCOMPARE(value.toObject(), QJsonObject());
+ QCOMPARE(value.toArray(), QJsonArray());
+
+}
+
+void TestQtJson::testNumbers()
+{
+ {
+ int numbers[] = {
+ 0,
+ -1,
+ 1,
+ (1<<26),
+ (1<<27),
+ (1<<28),
+ -(1<<26),
+ -(1<<27),
+ -(1<<28),
+ (1<<26) - 1,
+ (1<<27) - 1,
+ (1<<28) - 1,
+ -((1<<26) - 1),
+ -((1<<27) - 1),
+ -((1<<28) - 1)
+ };
+ int n = sizeof(numbers)/sizeof(int);
+
+ QJsonArray array;
+ for (int i = 0; i < n; ++i)
+ array.append((double)numbers[i]);
+ for (int i = 0; i < array.size(); ++i) {
+ QCOMPARE(array.at(i).type(), QJsonValue::Double);
+ QCOMPARE(array.at(i).toDouble(), (double)numbers[i]);
+ }
+ }
+
+ {
+ double numbers[] = {
+ 0,
+ -1,
+ 1,
+ (1<<26),
+ (1<<27),
+ (1<<28),
+ -(1<<26),
+ -(1<<27),
+ -(1<<28),
+ (1<<26) - 1,
+ (1<<27) - 1,
+ (1<<28) - 1,
+ -((1<<26) - 1),
+ -((1<<27) - 1),
+ -((1<<28) - 1),
+ 1.1,
+ 0.1,
+ -0.1,
+ -1.1,
+ 1e200,
+ -1e200
+ };
+ int n = sizeof(numbers)/sizeof(double);
+
+ QJsonArray array;
+ for (int i = 0; i < n; ++i)
+ array.append(numbers[i]);
+ for (int i = 0; i < array.size(); ++i) {
+ QCOMPARE(array.at(i).type(), QJsonValue::Double);
+ QCOMPARE(array.at(i).toDouble(), numbers[i]);
+ }
+ }
+
+}
+
+void TestQtJson::testObjectSimple()
+{
+ QJsonObject object;
+ object.insert("number", 999.);
+ QCOMPARE(object.value("number").type(), QJsonValue::Double);
+ QCOMPARE(object.value("number").toDouble(), 999.);
+ object.insert("string", QString::fromLatin1("test"));
+ QCOMPARE(object.value("string").type(), QJsonValue::String);
+ QCOMPARE(object.value("string").toString(), QString("test"));
+ object.insert("boolean", true);
+ QCOMPARE(object.value("boolean").toBool(), true);
+
+ QStringList keys = object.keys();
+ QVERIFY2(keys.contains("number"), "key number not found");
+ QVERIFY2(keys.contains("string"), "key string not found");
+ QVERIFY2(keys.contains("boolean"), "key boolean not found");
+
+ // if we put a JsonValue into the JsonObject and retreive
+ // it, it should be identical.
+ QJsonValue value(QLatin1String("foo"));
+ object.insert("value", value);
+ QCOMPARE(object.value("value"), value);
+
+ int size = object.size();
+ object.remove("boolean");
+ QCOMPARE(object.size(), size - 1);
+ QVERIFY2(!object.contains("boolean"), "key boolean should have been removed");
+
+ QJsonValue taken = object.take("value");
+// QCOMPARE(taken, value);
+ QVERIFY2(!object.contains("value"), "key value should have been removed");
+
+ QString before = object.value("string").toString();
+ object.insert("string", QString::fromLatin1("foo"));
+ QVERIFY2(object.value("string").toString() != before, "value should have been updated");
+}
+
+void TestQtJson::testObjectSmallKeys()
+{
+ QJsonObject data1;
+ data1.insert(QStringLiteral("1"), 123);
+ QVERIFY(data1.contains(QStringLiteral("1")));
+ QCOMPARE(data1.value(QStringLiteral("1")).toDouble(), (double)123);
+ data1.insert(QStringLiteral("12"), 133);
+ QCOMPARE(data1.value(QStringLiteral("12")).toDouble(), (double)133);
+ QVERIFY(data1.contains(QStringLiteral("12")));
+ data1.insert(QStringLiteral("123"), 323);
+ QCOMPARE(data1.value(QStringLiteral("12")).toDouble(), (double)133);
+ QVERIFY(data1.contains(QStringLiteral("123")));
+ QCOMPARE(data1.value(QStringLiteral("123")).type(), QJsonValue::Double);
+ QCOMPARE(data1.value(QStringLiteral("123")).toDouble(), (double)323);
+}
+
+void TestQtJson::testArraySimple()
+{
+ QJsonArray array;
+ array.append(999.);
+ array.append(QString::fromLatin1("test"));
+ array.append(true);
+
+ QJsonValue val = array.at(0);
+ QCOMPARE(array.at(0).toDouble(), 999.);
+ QCOMPARE(array.at(1).toString(), QString("test"));
+ QCOMPARE(array.at(2).toBool(), true);
+ QCOMPARE(array.size(), 3);
+
+ // if we put a JsonValue into the JsonArray and retreive
+ // it, it should be identical.
+ QJsonValue value(QLatin1String("foo"));
+ array.append(value);
+ QCOMPARE(array.at(3), value);
+
+ int size = array.size();
+ array.removeAt(2);
+ --size;
+ QCOMPARE(array.size(), size);
+
+ QJsonValue taken = array.takeAt(0);
+ --size;
+ QCOMPARE(taken.toDouble(), 999.);
+ QCOMPARE(array.size(), size);
+
+ // check whether null values work
+ array.append(QJsonValue());
+ ++size;
+ QCOMPARE(array.size(), size);
+ QCOMPARE(array.last().type(), QJsonValue::Null);
+ QCOMPARE(array.last(), QJsonValue());
+
+ QCOMPARE(array.first().type(), QJsonValue::String);
+ QCOMPARE(array.first(), QJsonValue(QLatin1String("test")));
+
+ array.prepend(false);
+ QCOMPARE(array.first().type(), QJsonValue::Bool);
+ QCOMPARE(array.first(), QJsonValue(false));
+
+ QCOMPARE(array.at(-1), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(array.at(array.size()), QJsonValue(QJsonValue::Undefined));
+
+ array.replace(0, -555.);
+ QCOMPARE(array.first().type(), QJsonValue::Double);
+ QCOMPARE(array.first(), QJsonValue(-555.));
+ QCOMPARE(array.at(1).type(), QJsonValue::String);
+ QCOMPARE(array.at(1), QJsonValue(QLatin1String("test")));
+}
+
+void TestQtJson::testValueObject()
+{
+ QJsonObject object;
+ object.insert("number", 999.);
+ object.insert("string", QLatin1String("test"));
+ object.insert("boolean", true);
+
+ QJsonValue value(object);
+
+ // if we don't modify the original JsonObject, toObject()
+ // on the JsonValue should return the same object (non-detached).
+ QCOMPARE(value.toObject(), object);
+
+ // if we modify the original object, it should detach
+ object.insert("test", QJsonValue(QLatin1String("test")));
+ QVERIFY2(value.toObject() != object, "object should have detached");
+}
+
+void TestQtJson::testValueArray()
+{
+ QJsonArray array;
+ array.append(999.);
+ array.append(QLatin1String("test"));
+ array.append(true);
+
+ QJsonValue value(array);
+
+ // if we don't modify the original JsonArray, toArray()
+ // on the JsonValue should return the same object (non-detached).
+ QCOMPARE(value.toArray(), array);
+
+ // if we modify the original array, it should detach
+ array.append(QLatin1String("test"));
+ QVERIFY2(value.toArray() != array, "array should have detached");
+}
+
+void TestQtJson::testObjectNested()
+{
+ QJsonObject inner, outer;
+ inner.insert("number", 999.);
+ outer.insert("nested", inner);
+
+ // if we don't modify the original JsonObject, value()
+ // should return the same object (non-detached).
+ QJsonObject value = outer.value("nested").toObject();
+ QCOMPARE(value, inner);
+ QCOMPARE(value.value("number").toDouble(), 999.);
+
+ // if we modify the original object, it should detach and not
+ // affect the nested object
+ inner.insert("number", 555.);
+ value = outer.value("nested").toObject();
+ QVERIFY2(inner.value("number").toDouble() != value.value("number").toDouble(),
+ "object should have detached");
+
+ // array in object
+ QJsonArray array;
+ array.append(123.);
+ array.append(456.);
+ outer.insert("array", array);
+ QCOMPARE(outer.value("array").toArray(), array);
+ QCOMPARE(outer.value("array").toArray().at(1).toDouble(), 456.);
+
+ // two deep objects
+ QJsonObject twoDeep;
+ twoDeep.insert("boolean", true);
+ inner.insert("nested", twoDeep);
+ outer.insert("nested", inner);
+ QCOMPARE(outer.value("nested").toObject().value("nested").toObject(), twoDeep);
+ QCOMPARE(outer.value("nested").toObject().value("nested").toObject().value("boolean").toBool(),
+ true);
+}
+
+void TestQtJson::testArrayNested()
+{
+ QJsonArray inner, outer;
+ inner.append(999.);
+ outer.append(inner);
+
+ // if we don't modify the original JsonArray, value()
+ // should return the same array (non-detached).
+ QJsonArray value = outer.at(0).toArray();
+ QCOMPARE(value, inner);
+ QCOMPARE(value.at(0).toDouble(), 999.);
+
+ // if we modify the original array, it should detach and not
+ // affect the nested array
+ inner.append(555.);
+ value = outer.at(0).toArray();
+ QVERIFY2(inner.size() != value.size(), "array should have detached");
+
+ // objects in arrays
+ QJsonObject object;
+ object.insert("boolean", true);
+ outer.append(object);
+ QCOMPARE(outer.last().toObject(), object);
+ QCOMPARE(outer.last().toObject().value("boolean").toBool(), true);
+
+ // two deep arrays
+ QJsonArray twoDeep;
+ twoDeep.append(QJsonValue(QString::fromLatin1("nested")));
+ inner.append(twoDeep);
+ outer.append(inner);
+ QCOMPARE(outer.last().toArray().last().toArray(), twoDeep);
+ QCOMPARE(outer.last().toArray().last().toArray().at(0).toString(), QString("nested"));
+}
+
+void TestQtJson::testArrayNestedEmpty()
+{
+ QJsonObject object;
+ QJsonArray inner;
+ object.insert("inner", inner);
+ QJsonValue val = object.value("inner");
+ QJsonArray value = object.value("inner").toArray();
+ QCOMPARE(value.size(), 0);
+ QCOMPARE(value, inner);
+ QCOMPARE(value.size(), 0);
+ object.insert("count", 0.);
+ QCOMPARE(object.value("inner").toArray().size(), 0);
+ QVERIFY(object.value("inner").toArray().isEmpty());
+ QJsonDocument(object).toBinaryData();
+ QCOMPARE(object.value("inner").toArray().size(), 0);
+}
+
+void TestQtJson::testObjectNestedEmpty()
+{
+ QJsonObject object;
+ QJsonObject inner;
+ QJsonObject inner2;
+ object.insert("inner", inner);
+ object.insert("inner2", inner2);
+ QJsonObject value = object.value("inner").toObject();
+ QCOMPARE(value.size(), 0);
+ QCOMPARE(value, inner);
+ QCOMPARE(value.size(), 0);
+ object.insert("count", 0.);
+ QCOMPARE(object.value("inner").toObject().size(), 0);
+ QCOMPARE(object.value("inner").type(), QJsonValue::Object);
+ QJsonDocument(object).toBinaryData();
+ QVERIFY(object.value("inner").toObject().isEmpty());
+ QVERIFY(object.value("inner2").toObject().isEmpty());
+ QJsonDocument doc = QJsonDocument::fromBinaryData(QJsonDocument(object).toBinaryData());
+ QVERIFY(!doc.isNull());
+ QJsonObject reconstituted(doc.object());
+ QCOMPARE(reconstituted.value("inner").toObject().size(), 0);
+ QCOMPARE(reconstituted.value("inner").type(), QJsonValue::Object);
+ QCOMPARE(reconstituted.value("inner2").type(), QJsonValue::Object);
+}
+
+void TestQtJson::testValueRef()
+{
+ QJsonArray array;
+ array.append(1.);
+ array.append(2.);
+ array.append(3.);
+ array[1] = false;
+
+ QCOMPARE(array.size(), 3);
+ QCOMPARE(array.at(0).toDouble(), 1.);
+ QCOMPARE(array.at(2).toDouble(), 3.);
+ QCOMPARE(array.at(1).type(), QJsonValue::Bool);
+ QCOMPARE(array.at(1).toBool(), false);
+
+ QJsonObject object;
+ object[QLatin1String("key")] = true;
+ QCOMPARE(object.size(), 1);
+ object.insert(QLatin1String("null"), QJsonValue());
+ QCOMPARE(object.value(QLatin1String("null")), QJsonValue());
+ object[QLatin1String("null")] = 100.;
+ QCOMPARE(object.value(QLatin1String("null")).type(), QJsonValue::Double);
+ QJsonValue val = object[QLatin1String("null")];
+ QCOMPARE(val.toDouble(), 100.);
+ QCOMPARE(object.size(), 2);
+}
+
+void TestQtJson::testObjectIteration()
+{
+ QJsonObject object;
+ for (int i = 0; i < 10; ++i)
+ object[QString::number(i)] = (double)i;
+
+ QCOMPARE(object.size(), 10);
+
+ for (QJsonObject::iterator it = object.begin(); it != object.end(); ++it) {
+ QJsonValue value = it.value();
+ QCOMPARE((double)it.key().toInt(), value.toDouble());
+ }
+
+ {
+ QJsonObject object2 = object;
+ QVERIFY(object == object2);
+
+ QJsonValue val = *object2.begin();
+ object2.erase(object2.begin());
+ QCOMPARE(object.size(), 10);
+ QCOMPARE(object2.size(), 9);
+
+ for (QJsonObject::const_iterator it = object2.constBegin(); it != object2.constEnd(); ++it) {
+ QJsonValue value = it.value();
+ QVERIFY(it.value() != val);
+ QCOMPARE((double)it.key().toInt(), value.toDouble());
+ }
+ }
+
+ {
+ QJsonObject::Iterator it = object.begin();
+ it += 5;
+ QCOMPARE(QJsonValue(it.value()).toDouble(), 5.);
+ it -= 3;
+ QCOMPARE(QJsonValue(it.value()).toDouble(), 2.);
+ QJsonObject::Iterator it2 = it + 5;
+ QCOMPARE(QJsonValue(it2.value()).toDouble(), 7.);
+ it2 = it - 1;
+ QCOMPARE(QJsonValue(it2.value()).toDouble(), 1.);
+ }
+
+ {
+ QJsonObject::ConstIterator it = object.constBegin();
+ it += 5;
+ QCOMPARE(QJsonValue(it.value()).toDouble(), 5.);
+ it -= 3;
+ QCOMPARE(QJsonValue(it.value()).toDouble(), 2.);
+ QJsonObject::ConstIterator it2 = it + 5;
+ QCOMPARE(QJsonValue(it2.value()).toDouble(), 7.);
+ it2 = it - 1;
+ QCOMPARE(QJsonValue(it2.value()).toDouble(), 1.);
+ }
+
+ QJsonObject::Iterator it = object.begin();
+ while (!object.isEmpty())
+ it = object.erase(it);
+ QCOMPARE(object.size() , 0);
+ QVERIFY(it == object.end());
+}
+
+void TestQtJson::testArrayIteration()
+{
+ QJsonArray array;
+ for (int i = 0; i < 10; ++i)
+ array.append(i);
+
+ QCOMPARE(array.size(), 10);
+
+ int i = 0;
+ for (QJsonArray::iterator it = array.begin(); it != array.end(); ++it, ++i) {
+ QJsonValue value = (*it);
+ QCOMPARE((double)i, value.toDouble());
+ }
+
+ {
+ QJsonArray array2 = array;
+ QVERIFY(array == array2);
+
+ QJsonValue val = *array2.begin();
+ array2.erase(array2.begin());
+ QCOMPARE(array.size(), 10);
+ QCOMPARE(array2.size(), 9);
+
+ i = 1;
+ for (QJsonArray::const_iterator it = array2.constBegin(); it != array2.constEnd(); ++it, ++i) {
+ QJsonValue value = (*it);
+ QCOMPARE((double)i, value.toDouble());
+ }
+ }
+
+ {
+ QJsonArray::Iterator it = array.begin();
+ it += 5;
+ QCOMPARE(QJsonValue((*it)).toDouble(), 5.);
+ it -= 3;
+ QCOMPARE(QJsonValue((*it)).toDouble(), 2.);
+ QJsonArray::Iterator it2 = it + 5;
+ QCOMPARE(QJsonValue(*it2).toDouble(), 7.);
+ it2 = it - 1;
+ QCOMPARE(QJsonValue(*it2).toDouble(), 1.);
+ }
+
+ {
+ QJsonArray::ConstIterator it = array.constBegin();
+ it += 5;
+ QCOMPARE(QJsonValue((*it)).toDouble(), 5.);
+ it -= 3;
+ QCOMPARE(QJsonValue((*it)).toDouble(), 2.);
+ QJsonArray::ConstIterator it2 = it + 5;
+ QCOMPARE(QJsonValue(*it2).toDouble(), 7.);
+ it2 = it - 1;
+ QCOMPARE(QJsonValue(*it2).toDouble(), 1.);
+ }
+
+ QJsonArray::Iterator it = array.begin();
+ while (!array.isEmpty())
+ it = array.erase(it);
+ QCOMPARE(array.size() , 0);
+ QVERIFY(it == array.end());
+}
+
+void TestQtJson::testObjectFind()
+{
+ QJsonObject object;
+ for (int i = 0; i < 10; ++i)
+ object[QString::number(i)] = i;
+
+ QCOMPARE(object.size(), 10);
+
+ 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());
+
+ 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());
+}
+
+void TestQtJson::testDocument()
+{
+ QJsonDocument doc;
+ QCOMPARE(doc.isEmpty(), true);
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), false);
+
+ QJsonObject object;
+ doc.setObject(object);
+ QCOMPARE(doc.isEmpty(), false);
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), true);
+
+ object.insert(QLatin1String("Key"), QLatin1String("Value"));
+ doc.setObject(object);
+ QCOMPARE(doc.isEmpty(), false);
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), true);
+ QVERIFY(doc.object() == object);
+ QVERIFY(doc.array() == QJsonArray());
+
+ doc = QJsonDocument();
+ QCOMPARE(doc.isEmpty(), true);
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), false);
+
+ QJsonArray array;
+ doc.setArray(array);
+ QCOMPARE(doc.isEmpty(), false);
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+
+ array.append(QLatin1String("Value"));
+ doc.setArray(array);
+ QCOMPARE(doc.isEmpty(), false);
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QVERIFY(doc.array() == array);
+ QVERIFY(doc.object() == QJsonObject());
+
+ QJsonObject outer;
+ outer.insert(QLatin1String("outerKey"), 22);
+ QJsonObject inner;
+ inner.insert(QLatin1String("innerKey"), 42);
+ outer.insert(QLatin1String("innter"), inner);
+ QJsonArray innerArray;
+ innerArray.append(23);
+ outer.insert(QLatin1String("innterArray"), innerArray);
+
+ QJsonDocument doc2(outer.value(QLatin1String("innter")).toObject());
+ QVERIFY(doc2.object().contains(QLatin1String("innerKey")));
+ QCOMPARE(doc2.object().value(QLatin1String("innerKey")), QJsonValue(42));
+
+ QJsonDocument doc3;
+ doc3.setObject(outer.value(QLatin1String("innter")).toObject());
+ QCOMPARE(doc3.isArray(), false);
+ QCOMPARE(doc3.isObject(), true);
+ QVERIFY(doc3.object().contains(QLatin1String("innerKey")));
+ QCOMPARE(doc3.object().value(QLatin1String("innerKey")), QJsonValue(42));
+
+ QJsonDocument doc4(outer.value(QLatin1String("innterArray")).toArray());
+ QCOMPARE(doc4.isArray(), true);
+ QCOMPARE(doc4.isObject(), false);
+ QCOMPARE(doc4.array().size(), 1);
+ QCOMPARE(doc4.array().at(0), QJsonValue(23));
+
+ QJsonDocument doc5;
+ doc5.setArray(outer.value(QLatin1String("innterArray")).toArray());
+ QCOMPARE(doc5.isArray(), true);
+ QCOMPARE(doc5.isObject(), false);
+ QCOMPARE(doc5.array().size(), 1);
+ QCOMPARE(doc5.array().at(0), QJsonValue(23));
+}
+
+void TestQtJson::nullValues()
+{
+ QJsonArray array;
+ array.append(QJsonValue());
+
+ QCOMPARE(array.size(), 1);
+ QCOMPARE(array.at(0), QJsonValue());
+
+ QJsonObject object;
+ object.insert(QString("key"), QJsonValue());
+ QCOMPARE(object.contains("key"), true);
+ QCOMPARE(object.size(), 1);
+ QCOMPARE(object.value("key"), QJsonValue());
+}
+
+void TestQtJson::nullArrays()
+{
+ QJsonArray nullArray;
+ QJsonArray nonNull;
+ nonNull.append(QLatin1String("bar"));
+
+ QCOMPARE(nullArray, QJsonArray());
+ QVERIFY(nullArray != nonNull);
+ QVERIFY(nonNull != nullArray);
+
+ QCOMPARE(nullArray.size(), 0);
+ QCOMPARE(nullArray.takeAt(0), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(nullArray.first(), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(nullArray.last(), QJsonValue(QJsonValue::Undefined));
+ nullArray.removeAt(0);
+ nullArray.removeAt(-1);
+
+ nullArray.append(QString("bar"));
+ nullArray.removeAt(0);
+
+ QCOMPARE(nullArray.size(), 0);
+ QCOMPARE(nullArray.takeAt(0), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(nullArray.first(), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(nullArray.last(), QJsonValue(QJsonValue::Undefined));
+ nullArray.removeAt(0);
+ nullArray.removeAt(-1);
+}
+
+void TestQtJson::nullObject()
+{
+ QJsonObject nullObject;
+ QJsonObject nonNull;
+ nonNull.insert(QLatin1String("foo"), QLatin1String("bar"));
+
+ QCOMPARE(nullObject, QJsonObject());
+ QVERIFY(nullObject != nonNull);
+ QVERIFY(nonNull != nullObject);
+
+ QCOMPARE(nullObject.size(), 0);
+ QCOMPARE(nullObject.keys(), QStringList());
+ nullObject.remove("foo");
+ QCOMPARE(nullObject, QJsonObject());
+ QCOMPARE(nullObject.take("foo"), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(nullObject.contains("foo"), false);
+
+ nullObject.insert("foo", QString("bar"));
+ nullObject.remove("foo");
+
+ QCOMPARE(nullObject.size(), 0);
+ QCOMPARE(nullObject.keys(), QStringList());
+ nullObject.remove("foo");
+ QCOMPARE(nullObject, QJsonObject());
+ QCOMPARE(nullObject.take("foo"), QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(nullObject.contains("foo"), false);
+}
+
+void TestQtJson::keySorting()
+{
+ const char *json = "{ \"B\": true, \"A\": false }";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+
+ QCOMPARE(doc.isObject(), true);
+
+ QJsonObject o = doc.object();
+ QCOMPARE(o.size(), 2);
+ QJsonObject::const_iterator it = o.constBegin();
+ QCOMPARE(it.key(), QLatin1String("A"));
+ ++it;
+ QCOMPARE(it.key(), QLatin1String("B"));
+}
+
+void TestQtJson::undefinedValues()
+{
+ QJsonObject object;
+ object.insert("Key", QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(object.size(), 0);
+
+ object.insert("Key", QLatin1String("Value"));
+ QCOMPARE(object.size(), 1);
+ QCOMPARE(object.value("Key").type(), QJsonValue::String);
+ QCOMPARE(object.value("foo").type(), QJsonValue::Undefined);
+ object.insert("Key", QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(object.size(), 0);
+ QCOMPARE(object.value("Key").type(), QJsonValue::Undefined);
+
+ QJsonArray array;
+ array.append(QJsonValue(QJsonValue::Undefined));
+ QCOMPARE(array.size(), 1);
+ QCOMPARE(array.at(0).type(), QJsonValue::Null);
+
+ QCOMPARE(array.at(1).type(), QJsonValue::Undefined);
+ QCOMPARE(array.at(-1).type(), QJsonValue::Undefined);
+}
+
+
+void TestQtJson::fromVariantMap()
+{
+ QVariantMap map;
+ map.insert(QLatin1String("key1"), QLatin1String("value1"));
+ map.insert(QLatin1String("key2"), QLatin1String("value2"));
+ QJsonObject object = QJsonObject::fromVariantMap(map);
+ QCOMPARE(object.size(), 2);
+ QCOMPARE(object.value(QLatin1String("key1")), QJsonValue(QLatin1String("value1")));
+ QCOMPARE(object.value(QLatin1String("key2")), QJsonValue(QLatin1String("value2")));
+
+ QVariantList list;
+ list.append(true);
+ list.append(QVariant());
+ list.append(999.);
+ list.append(QLatin1String("foo"));
+ map.insert("list", list);
+ object = QJsonObject::fromVariantMap(map);
+ QCOMPARE(object.size(), 3);
+ QCOMPARE(object.value(QLatin1String("key1")), QJsonValue(QLatin1String("value1")));
+ QCOMPARE(object.value(QLatin1String("key2")), QJsonValue(QLatin1String("value2")));
+ QCOMPARE(object.value(QLatin1String("list")).type(), QJsonValue::Array);
+ QJsonArray array = object.value(QLatin1String("list")).toArray();
+ QCOMPARE(array.size(), 4);
+ QCOMPARE(array.at(0).type(), QJsonValue::Bool);
+ QCOMPARE(array.at(0).toBool(), true);
+ QCOMPARE(array.at(1).type(), QJsonValue::Null);
+ QCOMPARE(array.at(2).type(), QJsonValue::Double);
+ QCOMPARE(array.at(2).toDouble(), 999.);
+ QCOMPARE(array.at(3).type(), QJsonValue::String);
+ QCOMPARE(array.at(3).toString(), QLatin1String("foo"));
+}
+
+void TestQtJson::toVariantMap()
+{
+ QJsonObject object;
+ QVariantMap map = object.toVariantMap();
+ QVERIFY(map.isEmpty());
+
+ object.insert("Key", QString("Value"));
+ object.insert("null", QJsonValue());
+ QJsonArray array;
+ array.append(true);
+ array.append(999.);
+ array.append(QLatin1String("string"));
+ array.append(QJsonValue());
+ object.insert("Array", array);
+
+ map = object.toVariantMap();
+
+ QCOMPARE(map.size(), 3);
+ QCOMPARE(map.value("Key"), QVariant(QString("Value")));
+ QCOMPARE(map.value("null"), QVariant());
+ QCOMPARE(map.value("Array").type(), QVariant::List);
+ QVariantList list = map.value("Array").toList();
+ QCOMPARE(list.size(), 4);
+ QCOMPARE(list.at(0), QVariant(true));
+ QCOMPARE(list.at(1), QVariant(999.));
+ QCOMPARE(list.at(2), QVariant(QLatin1String("string")));
+ QCOMPARE(list.at(3), QVariant());
+}
+
+void TestQtJson::toVariantList()
+{
+ QJsonArray array;
+ QVariantList list = array.toVariantList();
+ QVERIFY(list.isEmpty());
+
+ array.append(QString("Value"));
+ array.append(QJsonValue());
+ QJsonArray inner;
+ inner.append(true);
+ inner.append(999.);
+ inner.append(QLatin1String("string"));
+ inner.append(QJsonValue());
+ array.append(inner);
+
+ list = array.toVariantList();
+
+ QCOMPARE(list.size(), 3);
+ QCOMPARE(list[0], QVariant(QString("Value")));
+ QCOMPARE(list[1], QVariant());
+ QCOMPARE(list[2].type(), QVariant::List);
+ QVariantList vlist = list[2].toList();
+ QCOMPARE(vlist.size(), 4);
+ QCOMPARE(vlist.at(0), QVariant(true));
+ QCOMPARE(vlist.at(1), QVariant(999.));
+ QCOMPARE(vlist.at(2), QVariant(QLatin1String("string")));
+ QCOMPARE(vlist.at(3), QVariant());
+}
+
+void TestQtJson::toJson()
+{
+ QJsonObject object;
+ object.insert("\\Key\n", QString("Value"));
+ object.insert("null", QJsonValue());
+ QJsonArray array;
+ array.append(true);
+ array.append(999.);
+ array.append(QLatin1String("string"));
+ array.append(QJsonValue());
+ array.append(QLatin1String("\\\a\n\r\b\tabcABC\""));
+ object.insert("Array", array);
+
+ QByteArray json = QJsonDocument(object).toJson();
+
+ QByteArray expected =
+ "{\n"
+ " \"Array\": [\n"
+ " true,\n"
+ " 999,\n"
+ " \"string\",\n"
+ " null,\n"
+ " \"\\\\\\u0007\\n\\r\\b\\tabcABC\\\"\"\n"
+ " ],\n"
+ " \"\\\\Key\\n\": \"Value\",\n"
+ " \"null\": null\n"
+ "}\n";
+ QCOMPARE(json, expected);
+
+ QJsonDocument doc;
+ doc.setObject(object);
+ json = doc.toJson();
+ QCOMPARE(json, expected);
+
+ doc.setArray(array);
+ json = doc.toJson();
+ expected =
+ "[\n"
+ " true,\n"
+ " 999,\n"
+ " \"string\",\n"
+ " null,\n"
+ " \"\\\\\\u0007\\n\\r\\b\\tabcABC\\\"\"\n"
+ "]\n";
+ QCOMPARE(json, expected);
+}
+
+void TestQtJson::fromJson()
+{
+ {
+ QByteArray json = "[\n true\n]\n";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 1);
+ QCOMPARE(array.at(0).type(), QJsonValue::Bool);
+ QCOMPARE(array.at(0).toBool(), true);
+ QCOMPARE(doc.toJson(), json);
+ }
+ {
+ QByteArray json = "[]";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 0);
+ }
+ {
+ QByteArray json = "{}";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), true);
+ QJsonObject object = doc.object();
+ QCOMPARE(object.size(), 0);
+ }
+ {
+ QByteArray json = "{\n \"Key\": true\n}\n";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), true);
+ QJsonObject object = doc.object();
+ QCOMPARE(object.size(), 1);
+ QCOMPARE(object.value("Key"), QJsonValue(true));
+ QCOMPARE(doc.toJson(), json);
+ }
+ {
+ QByteArray json = "[ null, true, false, \"Foo\", 1, [], {} ]";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 7);
+ QCOMPARE(array.at(0).type(), QJsonValue::Null);
+ QCOMPARE(array.at(1).type(), QJsonValue::Bool);
+ QCOMPARE(array.at(1).toBool(), true);
+ QCOMPARE(array.at(2).type(), QJsonValue::Bool);
+ QCOMPARE(array.at(2).toBool(), false);
+ QCOMPARE(array.at(3).type(), QJsonValue::String);
+ QCOMPARE(array.at(3).toString(), QLatin1String("Foo"));
+ QCOMPARE(array.at(4).type(), QJsonValue::Double);
+ QCOMPARE(array.at(4).toDouble(), 1.);
+ QCOMPARE(array.at(5).type(), QJsonValue::Array);
+ QCOMPARE(array.at(5).toArray().size(), 0);
+ QCOMPARE(array.at(6).type(), QJsonValue::Object);
+ QCOMPARE(array.at(6).toObject().size(), 0);
+ }
+ {
+ QByteArray json = "{ \"0\": null, \"1\": true, \"2\": false, \"3\": \"Foo\", \"4\": 1, \"5\": [], \"6\": {} }";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), true);
+ QJsonObject object = doc.object();
+ QCOMPARE(object.size(), 7);
+ QCOMPARE(object.value("0").type(), QJsonValue::Null);
+ QCOMPARE(object.value("1").type(), QJsonValue::Bool);
+ QCOMPARE(object.value("1").toBool(), true);
+ QCOMPARE(object.value("2").type(), QJsonValue::Bool);
+ QCOMPARE(object.value("2").toBool(), false);
+ QCOMPARE(object.value("3").type(), QJsonValue::String);
+ QCOMPARE(object.value("3").toString(), QLatin1String("Foo"));
+ QCOMPARE(object.value("4").type(), QJsonValue::Double);
+ QCOMPARE(object.value("4").toDouble(), 1.);
+ QCOMPARE(object.value("5").type(), QJsonValue::Array);
+ QCOMPARE(object.value("5").toArray().size(), 0);
+ QCOMPARE(object.value("6").type(), QJsonValue::Object);
+ QCOMPARE(object.value("6").toObject().size(), 0);
+ }
+}
+
+void TestQtJson::fromBinary()
+{
+ QFile file(QLatin1String(SRCDIR "test.json"));
+ file.open(QFile::ReadOnly);
+ QByteArray testJson = file.readAll();
+
+ QJsonDocument doc = QJsonDocument::fromJson(testJson);
+ QJsonDocument outdoc = QJsonDocument::fromBinaryData(doc.toBinaryData());
+ QVERIFY(!outdoc.isNull());
+ QVERIFY(doc == outdoc);
+
+ QFile bfile(QLatin1String(SRCDIR "test.bjson"));
+ bfile.open(QFile::ReadOnly);
+ QByteArray binary = bfile.readAll();
+
+ QJsonDocument bdoc = QJsonDocument::fromBinaryData(binary);
+ QVERIFY(!bdoc.isNull());
+ QVERIFY(doc.toVariant() == bdoc.toVariant());
+ QVERIFY(doc == bdoc);
+}
+
+void TestQtJson::toAndFromBinary_data()
+{
+ QTest::addColumn<QString>("filename");
+ QTest::newRow("test.json") << QString::fromLatin1(SRCDIR "test.json");
+ QTest::newRow("test2.json") << QString::fromLatin1(SRCDIR "test2.json");
+}
+
+void TestQtJson::toAndFromBinary()
+{
+ QFETCH(QString, filename);
+ QFile file(filename);
+ QVERIFY(file.open(QFile::ReadOnly));
+ QByteArray data = file.readAll();
+
+ QJsonDocument doc = QJsonDocument::fromJson(data);
+ QVERIFY(!doc.isNull());
+ QJsonDocument outdoc = QJsonDocument::fromBinaryData(doc.toBinaryData());
+ QVERIFY(!outdoc.isNull());
+ QVERIFY(doc == outdoc);
+}
+
+void TestQtJson::parseNumbers()
+{
+ {
+ // test number parsing
+ struct Numbers {
+ const char *str;
+ int n;
+ };
+ Numbers numbers [] = {
+ { "0", 0 },
+ { "1", 1 },
+ { "10", 10 },
+ { "-1", -1 },
+ { "100000", 100000 },
+ { "-999", -999 }
+ };
+ int size = sizeof(numbers)/sizeof(Numbers);
+ for (int i = 0; i < size; ++i) {
+ QByteArray json = "[ ";
+ json += numbers[i].str;
+ json += " ]";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 1);
+ QJsonValue val = array.at(0);
+ QCOMPARE(val.type(), QJsonValue::Double);
+ QCOMPARE(val.toDouble(), (double)numbers[i].n);
+ }
+ }
+ {
+ // test number parsing
+ struct Numbers {
+ const char *str;
+ double n;
+ };
+ Numbers numbers [] = {
+ { "0", 0 },
+ { "1", 1 },
+ { "10", 10 },
+ { "-1", -1 },
+ { "100000", 100000 },
+ { "-999", -999 },
+ { "1.1", 1.1 },
+ { "1e10", 1e10 },
+ { "-1.1", -1.1 },
+ { "-1e10", -1e10 },
+ { "-1E10", -1e10 },
+ { "1.1e10", 1.1e10 },
+ { "1.1e308", 1.1e308 },
+ { "-1.1e308", -1.1e308 },
+ { "1.1e-308", 1.1e-308 },
+ { "-1.1e-308", -1.1e-308 },
+ { "1.1e+308", 1.1e+308 },
+ { "-1.1e+308", -1.1e+308 },
+ { "1.e+308", 1.e+308 },
+ { "-1.e+308", -1.e+308 }
+ };
+ int size = sizeof(numbers)/sizeof(Numbers);
+ for (int i = 0; i < size; ++i) {
+ QByteArray json = "[ ";
+ json += numbers[i].str;
+ json += " ]";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 1);
+ QJsonValue val = array.at(0);
+ QCOMPARE(val.type(), QJsonValue::Double);
+ QCOMPARE(val.toDouble(), numbers[i].n);
+ }
+ }
+}
+
+void TestQtJson::parseStrings()
+{
+ const char *strings [] =
+ {
+ "Foo",
+ "abc\\\"abc",
+ "abc\\\\abc",
+ "abc\\babc",
+ "abc\\fabc",
+ "abc\\nabc",
+ "abc\\rabc",
+ "abc\\tabc",
+ "abc\\u0019abc",
+ "abcЂabc",
+ };
+ int size = sizeof(strings)/sizeof(const char *);
+
+ for (int i = 0; i < size; ++i) {
+ QByteArray json = "[\n \"";
+ json += strings[i];
+ json += "\"\n]\n";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 1);
+ QJsonValue val = array.at(0);
+ QCOMPARE(val.type(), QJsonValue::String);
+
+ QCOMPARE(doc.toJson(), json);
+ }
+
+ struct Pairs {
+ const char *in;
+ const char *out;
+ };
+ Pairs pairs [] = {
+ { "abc\\/abc", "abc/abc" },
+ { "abc\\u0402abc", "abcЂabc" },
+ { "abc\\u0065abc", "abceabc" }
+ };
+ size = sizeof(pairs)/sizeof(Pairs);
+
+ for (int i = 0; i < size; ++i) {
+ QByteArray json = "[\n \"";
+ json += pairs[i].in;
+ json += "\"\n]\n";
+ QByteArray out = "[\n \"";
+ out += pairs[i].out;
+ out += "\"\n]\n";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), true);
+ QCOMPARE(doc.isObject(), false);
+ QJsonArray array = doc.array();
+ QCOMPARE(array.size(), 1);
+ QJsonValue val = array.at(0);
+ QCOMPARE(val.type(), QJsonValue::String);
+
+ QCOMPARE(doc.toJson(), out);
+ }
+
+}
+
+void TestQtJson::parseDuplicateKeys()
+{
+ const char *json = "{ \"B\": true, \"A\": null, \"B\": false }";
+
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QCOMPARE(doc.isObject(), true);
+
+ QJsonObject o = doc.object();
+ QCOMPARE(o.size(), 2);
+ QJsonObject::const_iterator it = o.constBegin();
+ QCOMPARE(it.key(), QLatin1String("A"));
+ QCOMPARE(it.value(), QJsonValue());
+ ++it;
+ QCOMPARE(it.key(), QLatin1String("B"));
+ QCOMPARE(it.value(), QJsonValue(false));
+}
+
+void TestQtJson::testParser()
+{
+ QFile file(QLatin1String(SRCDIR "test.json"));
+ file.open(QFile::ReadOnly);
+ QByteArray testJson = file.readAll();
+
+ QJsonDocument doc = QJsonDocument::fromJson(testJson);
+ QVERIFY(!doc.isEmpty());
+}
+
+void TestQtJson::compactArray()
+{
+ QJsonArray array;
+ array.append(QLatin1String("First Entry"));
+ array.append(QLatin1String("Second Entry"));
+ array.append(QLatin1String("Third Entry"));
+ QJsonDocument doc(array);
+ int s = doc.toBinaryData().size();
+ array.removeAt(1);
+ doc.setArray(array);
+ QVERIFY(s > doc.toBinaryData().size());
+ s = doc.toBinaryData().size();
+ QCOMPARE(doc.toJson(),
+ QByteArray("[\n"
+ " \"First Entry\",\n"
+ " \"Third Entry\"\n"
+ "]\n"));
+
+ array.removeAt(0);
+ doc.setArray(array);
+ QVERIFY(s > doc.toBinaryData().size());
+ s = doc.toBinaryData().size();
+ QCOMPARE(doc.toJson(),
+ QByteArray("[\n"
+ " \"Third Entry\"\n"
+ "]\n"));
+
+ array.removeAt(0);
+ doc.setArray(array);
+ QVERIFY(s > doc.toBinaryData().size());
+ s = doc.toBinaryData().size();
+ QCOMPARE(doc.toJson(),
+ QByteArray("[\n"
+ "]\n"));
+
+}
+
+void TestQtJson::compactObject()
+{
+ QJsonObject object;
+ object.insert(QLatin1String("Key1"), QLatin1String("First Entry"));
+ object.insert(QLatin1String("Key2"), QLatin1String("Second Entry"));
+ object.insert(QLatin1String("Key3"), QLatin1String("Third Entry"));
+ QJsonDocument doc(object);
+ int s = doc.toBinaryData().size();
+ object.remove(QLatin1String("Key2"));
+ doc.setObject(object);
+ QVERIFY(s > doc.toBinaryData().size());
+ s = doc.toBinaryData().size();
+ QCOMPARE(doc.toJson(),
+ QByteArray("{\n"
+ " \"Key1\": \"First Entry\",\n"
+ " \"Key3\": \"Third Entry\"\n"
+ "}\n"));
+
+ object.remove(QLatin1String("Key1"));
+ doc.setObject(object);
+ QVERIFY(s > doc.toBinaryData().size());
+ s = doc.toBinaryData().size();
+ QCOMPARE(doc.toJson(),
+ QByteArray("{\n"
+ " \"Key3\": \"Third Entry\"\n"
+ "}\n"));
+
+ object.remove(QLatin1String("Key3"));
+ doc.setObject(object);
+ QVERIFY(s > doc.toBinaryData().size());
+ s = doc.toBinaryData().size();
+ QCOMPARE(doc.toJson(),
+ QByteArray("{\n"
+ "}\n"));
+
+}
+
+void TestQtJson::validation()
+{
+ // this basically tests that we don't crash on corrupt data
+ QFile file(QLatin1String(SRCDIR "test.json"));
+ QVERIFY(file.open(QFile::ReadOnly));
+ QByteArray testJson = file.readAll();
+ QVERIFY(!testJson.isEmpty());
+
+ QJsonDocument doc = QJsonDocument::fromJson(testJson);
+ QVERIFY(!doc.isNull());
+
+ QByteArray binary = doc.toBinaryData();
+
+ // only test the first 1000 bytes. Testing the full file takes too long
+ for (int i = 0; i < 1000; ++i) {
+ QByteArray corrupted = binary;
+ corrupted[i] = 0xff;
+ QJsonDocument doc = QJsonDocument::fromBinaryData(corrupted);
+ if (doc.isNull())
+ continue;
+ QByteArray json = doc.toJson();
+ }
+
+
+ QFile file2(QLatin1String(SRCDIR "test3.json"));
+ file2.open(QFile::ReadOnly);
+ testJson = file2.readAll();
+ QVERIFY(!testJson.isEmpty());
+
+ doc = QJsonDocument::fromJson(testJson);
+ QVERIFY(!doc.isNull());
+
+ binary = doc.toBinaryData();
+
+ for (int i = 0; i < binary.size(); ++i) {
+ QByteArray corrupted = binary;
+ corrupted[i] = 0xff;
+ QJsonDocument doc = QJsonDocument::fromBinaryData(corrupted);
+ if (doc.isNull())
+ continue;
+ QByteArray json = doc.toJson();
+
+ corrupted = binary;
+ corrupted[i] = 0x00;
+ doc = QJsonDocument::fromBinaryData(corrupted);
+ if (doc.isNull())
+ continue;
+ json = doc.toJson();
+ }
+}
+
+void TestQtJson::assignToDocument()
+{
+ {
+ const char *json = "{ \"inner\": { \"key\": true } }";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+
+ QJsonObject o = doc.object();
+ QJsonValue inner = o.value("inner");
+
+ QJsonDocument innerDoc(inner.toObject());
+
+ QVERIFY(innerDoc != doc);
+ QVERIFY(innerDoc.object() == inner.toObject());
+ }
+ {
+ const char *json = "[ [ true ] ]";
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+
+ QJsonArray a = doc.array();
+ QJsonValue inner = a.at(0);
+
+ QJsonDocument innerDoc(inner.toArray());
+
+ QVERIFY(innerDoc != doc);
+ QVERIFY(innerDoc.array() == inner.toArray());
+ }
+}
+
+
+void TestQtJson::testDuplicateKeys()
+{
+ QJsonObject obj;
+ obj.insert(QLatin1String("foo"), QLatin1String("bar"));
+ obj.insert(QLatin1String("foo"), QLatin1String("zap"));
+ QCOMPARE(obj.size(), 1);
+ QCOMPARE(obj.value(QLatin1String("foo")).toString(), QLatin1String("zap"));
+}
+
+void TestQtJson::testCompaction()
+{
+ // modify object enough times to trigger compactionCounter
+ // and make sure the data is still valid
+ QJsonObject obj;
+ for (int i = 0; i < 33; ++i) {
+ obj.remove(QLatin1String("foo"));
+ obj.insert(QLatin1String("foo"), QLatin1String("bar"));
+ }
+ QCOMPARE(obj.size(), 1);
+ QCOMPARE(obj.value(QLatin1String("foo")).toString(), QLatin1String("bar"));
+
+ QJsonDocument doc = QJsonDocument::fromBinaryData(QJsonDocument(obj).toBinaryData());
+ QVERIFY(!doc.isNull());
+ QVERIFY(!doc.isEmpty());
+ QCOMPARE(doc.isArray(), false);
+ QCOMPARE(doc.isObject(), true);
+ QVERIFY(doc.object() == obj);
+}
+
+void TestQtJson::testDebugStream()
+{
+ {
+ // QJsonObject
+
+ QJsonObject object;
+ QTest::ignoreMessage(QtDebugMsg, "QJsonObject() ");
+ qDebug() << object;
+
+ object.insert(QLatin1String("foo"), QLatin1String("bar"));
+ QTest::ignoreMessage(QtDebugMsg, "QJsonObject({\"foo\": \"bar\"}) ");
+ qDebug() << object;
+ }
+
+ {
+ // QJsonArray
+
+ QJsonArray array;
+ QTest::ignoreMessage(QtDebugMsg, "QJsonArray() ");
+ qDebug() << array;
+
+ array.append(1);
+ array.append(QLatin1String("foo"));
+ QTest::ignoreMessage(QtDebugMsg, "QJsonArray([1,\"foo\"]) ");
+ qDebug() << array;
+ }
+
+ {
+ // QJsonDocument
+
+ QJsonDocument doc;
+ QTest::ignoreMessage(QtDebugMsg, "QJsonDocument() ");
+ qDebug() << doc;
+
+ QJsonObject object;
+ object.insert(QLatin1String("foo"), QLatin1String("bar"));
+ doc.setObject(object);
+ QTest::ignoreMessage(QtDebugMsg, "QJsonDocument({\"foo\": \"bar\"}) ");
+ qDebug() << doc;
+
+ QJsonArray array;
+ array.append(1);
+ array.append(QLatin1String("foo"));
+ QTest::ignoreMessage(QtDebugMsg, "QJsonDocument([1,\"foo\"]) ");
+ doc.setArray(array);
+ qDebug() << doc;
+ }
+
+ {
+ // QJsonValue
+
+ QJsonValue value;
+
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(null) ");
+ qDebug() << value;
+
+ value = QJsonValue(true); // bool
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(bool, true) ");
+ qDebug() << value;
+
+ value = QJsonValue((double)4.2); // double
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 4.2) ");
+ qDebug() << value;
+
+ value = QJsonValue((int)42); // int
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(double, 42) ");
+ qDebug() << value;
+
+ value = QJsonValue(QLatin1String("foo")); // string
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(string, \"foo\") ");
+ qDebug() << value;
+
+ QJsonArray array;
+ array.append(1);
+ array.append(QLatin1String("foo"));
+ value = QJsonValue(array); // array
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(array, QJsonArray([1,\"foo\"]) ) ");
+ qDebug() << value;
+
+ QJsonObject object;
+ object.insert(QLatin1String("foo"), QLatin1String("bar"));
+ value = QJsonValue(object); // object
+ QTest::ignoreMessage(QtDebugMsg, "QJsonValue(object, QJsonObject({\"foo\": \"bar\"}) ) ");
+ qDebug() << value;
+ }
+}
+
+void TestQtJson::testCompactionError()
+{
+ QJsonObject schemaObject;
+ schemaObject.insert("_Type", QLatin1String("_SchemaType"));
+ schemaObject.insert("name", QLatin1String("Address"));
+ schemaObject.insert("schema", QJsonObject());
+ {
+ QJsonObject content(schemaObject);
+ QJsonDocument doc(content);
+ QVERIFY(!doc.isNull());
+ QByteArray hash = QCryptographicHash::hash(doc.toBinaryData(), QCryptographicHash::Md5).toHex();
+ schemaObject.insert("_Version", QString::fromLatin1(hash.constData(), hash.size()));
+ }
+
+ QJsonObject schema;
+ schema.insert("streetNumber", schema.value("number").toObject());
+ schemaObject.insert("schema", schema);
+ {
+ QJsonObject content(schemaObject);
+ content.remove("_Uuid");
+ content.remove("_Version");
+ QJsonDocument doc(content);
+ QVERIFY(!doc.isNull());
+ QByteArray hash = QCryptographicHash::hash(doc.toBinaryData(), QCryptographicHash::Md5).toHex();
+ schemaObject.insert("_Version", QString::fromLatin1(hash.constData(), hash.size()));
+ }
+}
+
+QTEST_MAIN(TestQtJson)
+#include "tst_qtjson.moc"
diff --git a/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/auto/corelib/kernel/qcoreapplication/qcoreapplication.pro
index f9a38c2f14..14df20c986 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
TARGET = tst_qcoreapplication
-QT = core testlib
+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 5c2ebc8948..97c9757107 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,14 +34,18 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-
#include <QtCore/QtCore>
#include <QtTest/QtTest>
+#include <private/qcoreapplication_p.h>
+#include <private/qeventloop_p.h>
+#include <private/qthread_p.h>
+
class tst_QCoreApplication: public QObject
{
Q_OBJECT
@@ -63,6 +66,7 @@ private slots:
void execAfterExit();
void eventLoopExecAfterExit();
void customEventDispatcher();
+ void testQuitLock();
};
class EventSpy : public QObject
@@ -127,7 +131,7 @@ void tst_QCoreApplication::argc()
char *argv[] = { "tst_qcoreapplication" };
QCoreApplication app(argc, argv);
QCOMPARE(argc, 1);
- QCOMPARE(app.argc(), 1);
+ QCOMPARE(app.arguments().count(), 1);
}
{
@@ -135,7 +139,7 @@ void tst_QCoreApplication::argc()
char *argv[] = { "tst_qcoreapplication", "arg1", "arg2", "arg3" };
QCoreApplication app(argc, argv);
QCOMPARE(argc, 4);
- QCOMPARE(app.argc(), 4);
+ QCOMPARE(app.arguments().count(), 4);
}
{
@@ -143,7 +147,7 @@ void tst_QCoreApplication::argc()
char **argv = 0;
QCoreApplication app(argc, argv);
QCOMPARE(argc, 0);
- QCOMPARE(app.argc(), 0);
+ QCOMPARE(app.arguments().count(), 0);
}
{
@@ -151,7 +155,7 @@ void tst_QCoreApplication::argc()
char *argv[] = { "tst_qcoreapplication", "-qmljsdebugger=port:3768,block" };
QCoreApplication app(argc, argv);
QCOMPARE(argc, 1);
- QCOMPARE(app.argc(), 1);
+ QCOMPARE(app.arguments().count(), 1);
}
}
@@ -640,5 +644,113 @@ void tst_QCoreApplication::customEventDispatcher()
QVERIFY(weak_ed.isNull());
}
+class JobObject : public QObject
+{
+ Q_OBJECT
+public:
+
+ explicit JobObject(QEventLoop *loop, QObject *parent = 0)
+ : QObject(parent), locker(loop)
+ {
+ QTimer::singleShot(1000, this, SLOT(timeout()));
+ }
+
+ explicit JobObject(QObject *parent = 0)
+ : QObject(parent)
+ {
+ QTimer::singleShot(1000, this, SLOT(timeout()));
+ }
+
+public slots:
+ void startSecondaryJob()
+ {
+ new JobObject();
+ }
+
+private slots:
+ void timeout()
+ {
+ emit done();
+ deleteLater();
+ }
+
+signals:
+ void done();
+
+private:
+ QEventLoopLocker locker;
+};
+
+class QuitTester : public QObject
+{
+ Q_OBJECT
+public:
+ QuitTester(QObject *parent = 0)
+ : QObject(parent)
+ {
+ QTimer::singleShot(0, this, SLOT(doTest()));
+ }
+
+private slots:
+ void doTest()
+ {
+ QCoreApplicationPrivate *privateClass = static_cast<QCoreApplicationPrivate*>(QObjectPrivate::get(qApp));
+
+ {
+ QCOMPARE(privateClass->quitLockRef.load(), 0);
+ // Test with a lock active so that the refcount doesn't drop to zero during these tests, causing a quit.
+ // (until we exit the scope)
+ QEventLoopLocker locker;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ JobObject *job1 = new JobObject(this);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ delete job1;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ job1 = new JobObject(this);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ JobObject *job2 = new JobObject(this);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ delete job1;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ JobObject *job3 = new JobObject(job2);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ JobObject *job4 = new JobObject(job2);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 4);
+
+ delete job2;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ }
+ QCOMPARE(privateClass->quitLockRef.load(), 0);
+ }
+};
+
+void tst_QCoreApplication::testQuitLock()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QCoreApplication app(argc, argv);
+
+ QuitTester tester;
+ app.exec();
+}
+
+
QTEST_APPLESS_MAIN(tst_QCoreApplication)
#include "tst_qcoreapplication.moc"
diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
index d21a7d64f6..adfc810788 100644
--- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
+++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qeventloop
-QT = core network testlib
+QT = core network testlib core-private
SOURCES = tst_qeventloop.cpp
win32:!wince*:LIBS += -luser32
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index 49e3fec33e..e2144134d9 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,6 +45,7 @@
#include <qcoreapplication.h>
#include <qcoreevent.h>
#include <qeventloop.h>
+#include <private/qeventloop_p.h>
#include <qmutex.h>
#include <qthread.h>
#include <qtimer.h>
@@ -194,6 +195,8 @@ private slots:
// keep this test last:
void nestedLoops();
+ void testQuitLock();
+
protected:
void customEvent(QEvent *e);
};
@@ -640,6 +643,85 @@ void tst_QEventLoop::deliverInDefinedOrder()
}
+class JobObject : public QObject
+{
+ Q_OBJECT
+public:
+
+ explicit JobObject(QEventLoop *loop, QObject *parent = 0)
+ : QObject(parent), loop(loop), locker(loop)
+ {
+ }
+
+ explicit JobObject(QObject *parent = 0)
+ : QObject(parent)
+ {
+ }
+
+public slots:
+ void start(int timeout = 200)
+ {
+ QTimer::singleShot(timeout, this, SLOT(timeout()));
+ }
+
+private slots:
+ void timeout()
+ {
+ emit done();
+ deleteLater();
+ }
+
+signals:
+ void done();
+
+private:
+ QEventLoop *loop;
+ QEventLoopLocker locker;
+};
+
+void tst_QEventLoop::testQuitLock()
+{
+ QEventLoop eventLoop;
+
+ QTimer timer;
+ timer.setInterval(100);
+ QSignalSpy timerSpy(&timer, SIGNAL(timeout()));
+ timer.start();
+
+ QEventLoopPrivate* privateClass = static_cast<QEventLoopPrivate*>(QObjectPrivate::get(&eventLoop));
+
+ QCOMPARE(privateClass->quitLockRef.load(), 0);
+
+ JobObject *job1 = new JobObject(&eventLoop, this);
+ job1->start(500);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ eventLoop.exec();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 0);
+
+ // The job takes long enough that the timer times out several times.
+ QVERIFY(timerSpy.count() > 3);
+ timerSpy.clear();
+
+ job1 = new JobObject(&eventLoop, this);
+ job1->start(200);
+
+ JobObject *previousJob = job1;
+ for (int i = 0; i < 9; ++i) {
+ JobObject *subJob = new JobObject(&eventLoop, this);
+ connect(previousJob, SIGNAL(done()), subJob, SLOT(start()));
+ previousJob = subJob;
+ }
+
+ eventLoop.exec();
+
+ qDebug() << timerSpy.count();
+ // The timer times out more if it has more subjobs to do.
+ // We run 10 jobs in sequence here of about 200ms each.
+ QVERIFY(timerSpy.count() > 17);
+}
QTEST_MAIN(tst_QEventLoop)
#include "tst_qeventloop.moc"
diff --git a/tests/auto/corelib/kernel/qmath/tst_qmath.cpp b/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
index fab95564d2..bd5339a259 100644
--- a/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
+++ b/tests/auto/corelib/kernel/qmath/tst_qmath.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 0fe82f6277..68ff8e4bb6 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index fb7122aec4..def1b74ea4 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,7 +47,6 @@ class tst_QMetaObjectBuilder : public QObject
{
Q_OBJECT
private slots:
- void mocVersionCheck();
void create();
void className();
void superClass();
@@ -57,6 +56,7 @@ private slots:
void signal();
void constructor();
void property();
+ void variantProperty();
void notifySignal();
void enumerator();
void classInfo();
@@ -66,6 +66,14 @@ private slots:
void serialize();
void removeNotifySignal();
+ void usage_signal();
+ void usage_property();
+ void usage_slot();
+ void usage_method();
+ void usage_constructor();
+ void usage_connect();
+ void usage_templateConnect();
+
private:
static bool checkForSideEffects
(const QMetaObjectBuilder& builder,
@@ -129,18 +137,6 @@ signals:
void propChanged(const QString&);
};
-void tst_QMetaObjectBuilder::mocVersionCheck()
-{
- // This test will fail when the moc version number is changed.
- // It is intended as a reminder to also update QMetaObjectBuilder
- // whenenver moc changes. Once QMetaObjectBuilder has been
- // updated, this test can be changed to check for the next version.
- int version = int(QObject::staticMetaObject.d.data[0]);
- QVERIFY(version == 4 || version == 5 || version == 6);
- version = int(staticMetaObject.d.data[0]);
- QVERIFY(version == 4 || version == 5 || version == 6);
-}
-
void tst_QMetaObjectBuilder::create()
{
QMetaObjectBuilder builder;
@@ -727,6 +723,20 @@ void tst_QMetaObjectBuilder::property()
QCOMPARE(builder.method(0).signature(), QByteArray("propChanged(QString)"));
}
+void tst_QMetaObjectBuilder::variantProperty()
+{
+ QMetaObjectBuilder builder;
+ builder.addProperty("variant", "const QVariant &");
+ QMetaObject *meta = builder.toMetaObject();
+
+ QMetaProperty prop = meta->property(meta->propertyOffset());
+ QCOMPARE(QMetaType::Type(prop.type()), QMetaType::QVariant);
+ QCOMPARE(QMetaType::Type(prop.userType()), QMetaType::QVariant);
+ QCOMPARE(QByteArray(prop.typeName()), QByteArray("QVariant"));
+
+ qFree(meta);
+}
+
void tst_QMetaObjectBuilder::notifySignal()
{
QMetaObjectBuilder builder;
@@ -1259,6 +1269,353 @@ bool tst_QMetaObjectBuilder::sameMetaObject
return true;
}
+
+// This class is used to test that the meta-object generated by QMOB can be
+// used by a real object.
+// The class manually implements the functions normally generated by moc, and
+// creates the corresponding meta-object using QMOB. The autotests check that
+// this object can be used by QObject/QMetaObject functionality (property
+// access, signals & slots, constructing instances, ...).
+
+class TestObject : public QObject
+{
+ // Manually expanded from Q_OBJECT macro
+public:
+ Q_OBJECT_CHECK
+ virtual const QMetaObject *metaObject() const;
+ virtual void *qt_metacast(const char *);
+ virtual int qt_metacall(QMetaObject::Call, int, void **);
+private:
+ Q_DECL_HIDDEN static const QMetaObjectExtraData staticMetaObjectExtraData;
+ Q_DECL_HIDDEN static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+
+ //Q_PROPERTY(int intProp READ intProp WRITE setIntProp NOTIFY intPropChanged)
+public:
+ TestObject(QObject *parent = 0); // Q_INVOKABLE
+ ~TestObject();
+
+ // Property accessors
+ int intProp() const;
+ void setIntProp(int v);
+
+ void emitIntPropChanged();
+
+ int voidSlotIntArgument() const;
+
+// Q_INVOKABLE
+ QVariantList listInvokableQRealQString(qreal, const QString &);
+
+//public Q_SLOTS:
+ void voidSlotInt(int);
+
+//Q_SIGNALS:
+ void intPropChanged(int);
+
+private:
+ static QMetaObject *buildMetaObject();
+
+ QMetaObject *m_metaObject;
+ int m_intProp;
+ int m_voidSlotIntArg;
+};
+
+const QMetaObjectExtraData TestObject::staticMetaObjectExtraData = {
+ 0, qt_static_metacall
+};
+
+TestObject::TestObject(QObject *parent)
+ : QObject(parent), m_metaObject(buildMetaObject()),
+ m_intProp(-1), m_voidSlotIntArg(-1)
+{
+}
+
+TestObject::~TestObject()
+{
+ qFree(m_metaObject);
+}
+
+QMetaObject *TestObject::buildMetaObject()
+{
+ QMetaObjectBuilder builder;
+ // NOTE: If you change the meta-object, remember to adapt qt_metacall and
+ // friends below accordingly.
+
+ builder.setClassName("TestObject");
+
+ builder.setStaticMetacallFunction(qt_static_metacall);
+
+ QMetaMethodBuilder intPropChanged = builder.addSignal("intPropChanged(int)");
+ intPropChanged.setParameterNames(QList<QByteArray>() << "newIntPropValue");
+
+ QMetaPropertyBuilder prop = builder.addProperty("intProp", "int");
+ prop.setNotifySignal(intPropChanged);
+
+ QMetaMethodBuilder voidSlotInt = builder.addSlot("voidSlotInt(int)");
+ voidSlotInt.setParameterNames(QList<QByteArray>() << "slotIntArg");
+
+ QMetaMethodBuilder listInvokableQRealQString = builder.addMethod("listInvokableQRealQString(qreal,QString)");
+ listInvokableQRealQString.setReturnType("QVariantList");
+ listInvokableQRealQString.setParameterNames(QList<QByteArray>() << "qrealArg" << "qstringArg");
+
+ builder.addConstructor("TestObject(QObject*)");
+ builder.addConstructor("TestObject()");
+
+ return builder.toMetaObject();
+}
+
+int TestObject::intProp() const
+{
+ return m_intProp;
+}
+
+void TestObject::setIntProp(int value)
+{
+ if (m_intProp != value) {
+ m_intProp = value;
+ emit intPropChanged(value);
+ }
+}
+
+void TestObject::emitIntPropChanged()
+{
+ emit intPropChanged(m_intProp);
+}
+
+QVariantList TestObject::listInvokableQRealQString(qreal r, const QString &s)
+{
+ return QVariantList() << r << s;
+}
+
+void TestObject::voidSlotInt(int value)
+{
+ m_voidSlotIntArg = value;
+}
+
+int TestObject::voidSlotIntArgument() const
+{
+ return m_voidSlotIntArg;
+}
+
+void TestObject::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
+{
+ if (_c == QMetaObject::CreateInstance) {
+ switch (_id) {
+ case 0: { TestObject *_r = new TestObject((*reinterpret_cast< QObject*(*)>(_a[1])));
+ if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;
+ case 1: { TestObject *_r = new TestObject();
+ if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;
+ default: {
+ QMetaMethod ctor = _o->metaObject()->constructor(_id);
+ qFatal("You forgot to add a case for CreateInstance %s", ctor.signature());
+ }
+ }
+ } else if (_c == QMetaObject::InvokeMetaMethod) {
+ Q_ASSERT(_o->metaObject()->cast(_o));
+ TestObject *_t = static_cast<TestObject *>(_o);
+ switch (_id) {
+ case 0: _t->intPropChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
+ case 1: _t->voidSlotInt((*reinterpret_cast< int(*)>(_a[1]))); break;
+ case 2: *reinterpret_cast<QVariantList(*)>(_a[0]) = _t->listInvokableQRealQString(*reinterpret_cast<qreal(*)>(_a[1]), *reinterpret_cast<QString(*)>(_a[2])); break;
+ default: {
+ QMetaMethod method = _o->metaObject()->method(_o->metaObject()->methodOffset() + _id);
+ qFatal("You forgot to add a case for InvokeMetaMethod %s", method.signature());
+ }
+ }
+ } else if (_c == QMetaObject::IndexOfMethod) {
+ // This code is currently unreachable because it's only used by the
+ // template-based versions of connect() and disconnect(), which don't
+ // work with dynamically generated meta-objects (see test).
+ int *result = reinterpret_cast<int *>(_a[0]);
+ void **func = reinterpret_cast<void **>(_a[1]);
+ {
+ typedef void (TestObject::*_t)(int );
+ if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TestObject::intPropChanged)) {
+ *result = 0;
+ }
+ }
+ {
+ typedef void (TestObject::*_t)(int );
+ if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TestObject::voidSlotInt)) {
+ *result = 1;
+ }
+ }
+ {
+ typedef QVariantList (TestObject::*_t)(qreal, const QString &);
+ if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&TestObject::listInvokableQRealQString)) {
+ *result = 2;
+ }
+ }
+ qFatal("You forgot to add one or more IndexOfMethod cases");
+ }
+}
+
+const QMetaObject *TestObject::metaObject() const
+{
+ return m_metaObject;
+}
+
+void *TestObject::qt_metacast(const char *_clname)
+{
+ if (!_clname) return 0;
+ if (!strcmp(_clname, "TestObject"))
+ return static_cast<void*>(const_cast< TestObject*>(this));
+ return QObject::qt_metacast(_clname);
+}
+
+int TestObject::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+ _id = QObject::qt_metacall(_c, _id, _a);
+ if (_id < 0)
+ return _id;
+ int ownMethodCount = m_metaObject->methodCount() - m_metaObject->methodOffset();
+ int ownPropertyCount = m_metaObject->propertyCount() - m_metaObject->propertyOffset();
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ if (_id < ownMethodCount)
+ qt_static_metacall(this, _c, _id, _a);
+ _id -= ownMethodCount;
+ }
+#ifndef QT_NO_PROPERTIES
+ else if (_c == QMetaObject::ReadProperty) {
+ void *_v = _a[0];
+ switch (_id) {
+ case 0: *reinterpret_cast< int*>(_v) = intProp(); break;
+ default: if (_id < ownPropertyCount) {
+ QMetaProperty prop = m_metaObject->property(m_metaObject->propertyOffset() + _id);
+ qFatal("You forgot to add a case for ReadProperty %s", prop.name());
+ }
+ }
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::WriteProperty) {
+ void *_v = _a[0];
+ switch (_id) {
+ case 0: setIntProp(*reinterpret_cast< int*>(_v)); break;
+ default: if (_id < ownPropertyCount) {
+ QMetaProperty prop = m_metaObject->property(m_metaObject->propertyOffset() + _id);
+ qFatal("You forgot to add a case for WriteProperty %s", prop.name());
+ }
+ }
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::ResetProperty) {
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::QueryPropertyDesignable) {
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::QueryPropertyScriptable) {
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::QueryPropertyStored) {
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::QueryPropertyEditable) {
+ _id -= ownPropertyCount;
+ } else if (_c == QMetaObject::QueryPropertyUser) {
+ _id -= ownPropertyCount;
+ }
+#endif // QT_NO_PROPERTIES
+ return _id;
+}
+
+// SIGNAL 0
+void TestObject::intPropChanged(int _t1)
+{
+ void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
+ QMetaObject::activate(this, m_metaObject, 0, _a);
+}
+
+
+void tst_QMetaObjectBuilder::usage_signal()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ QSignalSpy propChangedSpy(testObject.data(), SIGNAL(intPropChanged(int)));
+ testObject->emitIntPropChanged();
+ QCOMPARE(propChangedSpy.count(), 1);
+ QCOMPARE(propChangedSpy.at(0).count(), 1);
+ QCOMPARE(propChangedSpy.at(0).at(0).toInt(), testObject->intProp());
+}
+
+void tst_QMetaObjectBuilder::usage_property()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ QVariant prop = testObject->property("intProp");
+ QCOMPARE(prop.type(), QVariant::Int);
+ QCOMPARE(prop.toInt(), testObject->intProp());
+
+ QSignalSpy propChangedSpy(testObject.data(), SIGNAL(intPropChanged(int)));
+ QVERIFY(testObject->intProp() != 123);
+ testObject->setProperty("intProp", 123);
+ QCOMPARE(propChangedSpy.count(), 1);
+ prop = testObject->property("intProp");
+ QCOMPARE(prop.type(), QVariant::Int);
+ QCOMPARE(prop.toInt(), 123);
+}
+
+void tst_QMetaObjectBuilder::usage_slot()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ int index = testObject->metaObject()->indexOfMethod("voidSlotInt(int)");
+ QVERIFY(index != -1);
+ QMetaMethod voidSlotInt = testObject->metaObject()->method(index);
+
+ QVERIFY(testObject->voidSlotIntArgument() == -1);
+ QVERIFY(voidSlotInt.invoke(testObject.data(), Q_ARG(int, 123)));
+ QCOMPARE(testObject->voidSlotIntArgument(), 123);
+}
+
+void tst_QMetaObjectBuilder::usage_method()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ int index = testObject->metaObject()->indexOfMethod("listInvokableQRealQString(qreal,QString)");
+ QVERIFY(index != -1);
+ QMetaMethod listInvokableQRealQString = testObject->metaObject()->method(index);
+ QVariantList list;
+ QVERIFY(listInvokableQRealQString.invoke(testObject.data(), Q_RETURN_ARG(QVariantList, list),
+ Q_ARG(qreal, 123.0), Q_ARG(QString, "ciao")));
+ QCOMPARE(list.size(), 2);
+ QCOMPARE(list.at(0).type(), QVariant::Type(QMetaType::QReal));
+ QCOMPARE(list.at(0).toDouble(), double(123));
+ QCOMPARE(list.at(1).type(), QVariant::String);
+ QCOMPARE(list.at(1).toString(), QString::fromLatin1("ciao"));
+}
+
+void tst_QMetaObjectBuilder::usage_constructor()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ QCOMPARE(testObject->metaObject()->constructorCount(), 2);
+ QScopedPointer<QObject> testInstance(testObject->metaObject()->newInstance());
+ QVERIFY(testInstance != 0);
+ QScopedPointer<QObject> testInstance2(testObject->metaObject()->newInstance(Q_ARG(QObject*, testInstance.data())));
+ QVERIFY(testInstance2 != 0);
+ QCOMPARE(testInstance2->parent(), testInstance.data());
+}
+
+void tst_QMetaObjectBuilder::usage_connect()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ QVERIFY(QObject::connect(testObject.data(), SIGNAL(intPropChanged(int)),
+ testObject.data(), SLOT(voidSlotInt(int))));
+
+ QVERIFY(testObject->voidSlotIntArgument() == -1);
+ testObject->setProperty("intProp", 123);
+ QCOMPARE(testObject->voidSlotIntArgument(), 123);
+
+ QVERIFY(QObject::disconnect(testObject.data(), SIGNAL(intPropChanged(int)),
+ testObject.data(), SLOT(voidSlotInt(int))));
+}
+
+void tst_QMetaObjectBuilder::usage_templateConnect()
+{
+ QScopedPointer<TestObject> testObject(new TestObject);
+
+ QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in QObject");
+ QMetaObject::Connection con = QObject::connect(testObject.data(), &TestObject::intPropChanged,
+ testObject.data(), &TestObject::voidSlotInt);
+ QEXPECT_FAIL("", "template-based connect() fails because meta-object is deduced at compile-time", Abort);
+ QVERIFY(con);
+}
+
QTEST_MAIN(tst_QMetaObjectBuilder)
#include "tst_qmetaobjectbuilder.moc"
diff --git a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
index e225371a7f..3e1d4f1603 100644
--- a/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
+++ b/tests/auto/corelib/kernel/qmetaproperty/tst_qmetaproperty.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index d5aa369a92..be13b39e7e 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -89,6 +89,7 @@ private slots:
void isRegistered();
void unregisterType();
void registerStreamBuiltin();
+ void automaticTemplateRegistration();
};
struct Foo { int i; };
@@ -570,15 +571,12 @@ FOR_EACH_CORE_METATYPE(RETURN_CREATE_COPY_FUNCTION)
TypeTestFunctionGetter::get(type)();
}
-template<typename T> struct SafeSizeOf { enum {Size = sizeof(T)}; };
-template<> struct SafeSizeOf<void> { enum {Size = 0}; };
-
void tst_QMetaType::sizeOf_data()
{
QTest::addColumn<QMetaType::Type>("type");
QTest::addColumn<int>("size");
#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
- QTest::newRow(#RealType) << QMetaType::MetaTypeName << int(SafeSizeOf<RealType>::Size);
+ QTest::newRow(#RealType) << QMetaType::MetaTypeName << int(QTypeInfo<RealType>::sizeOf);
FOR_EACH_CORE_METATYPE(ADD_METATYPE_TEST_ROW)
#undef ADD_METATYPE_TEST_ROW
}
@@ -596,21 +594,50 @@ Q_DECLARE_TYPEINFO(CustomMovable, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
Q_DECLARE_METATYPE(CustomMovable);
+class CustomObject : public QObject
+{
+ Q_OBJECT
+public:
+ CustomObject(QObject *parent = 0)
+ : QObject(parent)
+ {
+
+ }
+};
+Q_DECLARE_METATYPE(CustomObject*);
+
+struct SecondBase {};
+
+class CustomMultiInheritanceObject : public QObject, SecondBase
+{
+ Q_OBJECT
+public:
+ CustomMultiInheritanceObject(QObject *parent = 0)
+ : QObject(parent)
+ {
+
+ }
+};
+Q_DECLARE_METATYPE(CustomMultiInheritanceObject*);
+
void tst_QMetaType::flags_data()
{
QTest::addColumn<int>("type");
QTest::addColumn<bool>("isMovable");
QTest::addColumn<bool>("isComplex");
+ QTest::addColumn<bool>("isPointerToQObject");
#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
- QTest::newRow(#RealType) << MetaTypeId << bool(!QTypeInfo<RealType>::isStatic) << bool(QTypeInfo<RealType>::isComplex);
+ QTest::newRow(#RealType) << MetaTypeId << bool(!QTypeInfo<RealType>::isStatic) << bool(QTypeInfo<RealType>::isComplex) << bool(QtPrivate::IsPointerToTypeDerivedFromQObject<RealType>::Value);
QT_FOR_EACH_STATIC_CORE_CLASS(ADD_METATYPE_TEST_ROW)
QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(ADD_METATYPE_TEST_ROW)
QT_FOR_EACH_STATIC_CORE_POINTER(ADD_METATYPE_TEST_ROW)
#undef ADD_METATYPE_TEST_ROW
- QTest::newRow("TestSpace::Foo") << ::qMetaTypeId<TestSpace::Foo>() << false << true;
- QTest::newRow("Whity<double>") << ::qMetaTypeId<Whity<double> >() << false << true;
- QTest::newRow("CustomMovable") << ::qMetaTypeId<CustomMovable>() << true << true;
+ QTest::newRow("TestSpace::Foo") << ::qMetaTypeId<TestSpace::Foo>() << false << true << false;
+ QTest::newRow("Whity<double>") << ::qMetaTypeId<Whity<double> >() << false << true << false;
+ QTest::newRow("CustomMovable") << ::qMetaTypeId<CustomMovable>() << true << true << false;
+ QTest::newRow("CustomObject*") << ::qMetaTypeId<CustomObject*>() << true << false << true;
+ QTest::newRow("CustomMultiInheritanceObject*") << ::qMetaTypeId<CustomMultiInheritanceObject*>() << true << false << true;
}
void tst_QMetaType::flags()
@@ -618,10 +645,12 @@ void tst_QMetaType::flags()
QFETCH(int, type);
QFETCH(bool, isMovable);
QFETCH(bool, isComplex);
+ QFETCH(bool, isPointerToQObject);
QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsConstruction), isComplex);
QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::NeedsDestruction), isComplex);
QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::MovableType), isMovable);
+ QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::PointerToQObject), isPointerToQObject);
}
void tst_QMetaType::construct_data()
@@ -857,5 +886,63 @@ void tst_QMetaType::registerStreamBuiltin()
qRegisterMetaTypeStreamOperators<QVariant>("QVariant");
}
+Q_DECLARE_METATYPE(QSharedPointer<QObject>)
+
+void tst_QMetaType::automaticTemplateRegistration()
+{
+ {
+ QList<int> intList;
+ intList << 42;
+ QVERIFY(QVariant::fromValue(intList).value<QList<int> >().first() == 42);
+ QVector<QList<int> > vectorList;
+ vectorList << intList;
+ QVERIFY(QVariant::fromValue(vectorList).value<QVector<QList<int> > >().first().first() == 42);
+ }
+
+ {
+ QList<QByteArray> bytearrayList;
+ bytearrayList << QByteArray("foo");
+ QVERIFY(QVariant::fromValue(bytearrayList).value<QList<QByteArray> >().first() == QByteArray("foo"));
+ QVector<QList<QByteArray> > vectorList;
+ vectorList << bytearrayList;
+ QVERIFY(QVariant::fromValue(vectorList).value<QVector<QList<QByteArray> > >().first().first() == QByteArray("foo"));
+ }
+
+ QCOMPARE(::qMetaTypeId<QVariantList>(), (int)QMetaType::QVariantList);
+ QCOMPARE(::qMetaTypeId<QList<QVariant> >(), (int)QMetaType::QVariantList);
+
+ {
+ QList<QVariant> variantList;
+ variantList << 42;
+ QVERIFY(QVariant::fromValue(variantList).value<QList<QVariant> >().first() == 42);
+ QVector<QList<QVariant> > vectorList;
+ vectorList << variantList;
+ QVERIFY(QVariant::fromValue(vectorList).value<QVector<QList<QVariant> > >().first().first() == 42);
+ }
+
+ {
+ QList<QSharedPointer<QObject> > sharedPointerList;
+ QObject *testObject = new QObject;
+ sharedPointerList << QSharedPointer<QObject>(testObject);
+ QVERIFY(QVariant::fromValue(sharedPointerList).value<QList<QSharedPointer<QObject> > >().first() == testObject);
+ QVector<QList<QSharedPointer<QObject> > > vectorList;
+ vectorList << sharedPointerList;
+ QVERIFY(QVariant::fromValue(vectorList).value<QVector<QList<QSharedPointer<QObject> > > >().first().first() == testObject);
+ }
+}
+
+// Compile-time test, it should be possible to register function pointer types
+class Undefined;
+
+typedef Undefined (*UndefinedFunction0)();
+typedef Undefined (*UndefinedFunction1)(Undefined);
+typedef Undefined (*UndefinedFunction2)(Undefined, Undefined);
+typedef Undefined (*UndefinedFunction3)(Undefined, Undefined, Undefined);
+
+Q_DECLARE_METATYPE(UndefinedFunction0);
+Q_DECLARE_METATYPE(UndefinedFunction1);
+Q_DECLARE_METATYPE(UndefinedFunction2);
+Q_DECLARE_METATYPE(UndefinedFunction3);
+
QTEST_MAIN(tst_QMetaType)
#include "tst_qmetatype.moc"
diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
index f55701b3ec..09f17602b3 100644
--- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
+++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp b/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp
index b4069eba6c..2d180b88ea 100644
--- a/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/moc_oldnormalizeobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h b/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h
index efd1df2f5a..f73027707a 100644
--- a/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h
+++ b/tests/auto/corelib/kernel/qobject/oldnormalizeobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
index 86e8869a33..a1fd6e7534 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
index bba612c998..661485885e 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index f3bba08544..7f95f68075 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -75,6 +75,7 @@ private slots:
void findChildren();
void connectDisconnectNotify_data();
void connectDisconnectNotify();
+ void connectNotifyPtr();
void emitInDefinedOrder();
void customTypes();
void streamCustomTypes();
@@ -134,6 +135,7 @@ private slots:
void returnValue();
void returnValue2_data();
void returnValue2();
+ void connectVirtualSlots();
};
class SenderObject : public QObject
@@ -848,6 +850,19 @@ void tst_QObject::connectDisconnectNotify()
delete r;
}
+void tst_QObject::connectNotifyPtr()
+{
+ NotifyObject *s = new NotifyObject;
+ NotifyObject *r = new NotifyObject;
+
+ connect( (SenderObject*)s, &SenderObject::signal1, (ReceiverObject*)r, &ReceiverObject::slot1 );
+ QCOMPARE( s->org_signal, s->nw_signal );
+ QCOMPARE( s->org_signal.toLatin1(), QMetaObject::normalizedSignature(SIGNAL(signal1())));
+
+ delete s;
+ delete r;
+}
+
class SequenceObject : public ReceiverObject
{
Q_OBJECT
@@ -1670,7 +1685,7 @@ void tst_QObject::property()
const int idx = mo->indexOfProperty("variant");
QVERIFY(idx != -1);
- QVERIFY(mo->property(idx).type() == QVariant::LastType);
+ QCOMPARE(QMetaType::Type(mo->property(idx).type()), QMetaType::QVariant);
QCOMPARE(object.property("variant"), QVariant());
QVariant variant1(42);
QVariant variant2("string");
@@ -3363,7 +3378,7 @@ void tst_QObject::deleteQObjectWhenDeletingEvent()
};
QObject o;
- QGuiApplication::postEvent(&o, new MyEvent);
+ QCoreApplication::postEvent(&o, new MyEvent);
QCoreApplication::removePostedEvents(&o); // here you would get a deadlock
}
@@ -4128,11 +4143,17 @@ void tst_QObject::pointerConnect()
r1->reset();
r2->reset();
ReceiverObject::sequence = 0;
+ QTimer timer;
QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot1 ) );
QVERIFY( connect( s, &SenderObject::signal1 , r2, &ReceiverObject::slot1 ) );
QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot3 ) );
QVERIFY( connect( s, &SenderObject::signal3 , r1, &ReceiverObject::slot3 ) );
+#if defined(Q_CC_GNU) && defined(Q_OS_UNIX)
+ QEXPECT_FAIL("", "Test may fail due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.", Continue);
+#endif
+ QVERIFY2( connect( &timer, &QTimer::timeout, r1, &ReceiverObject::deleteLater ),
+ "Signal connection failed most likely due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.");
s->emitSignal1();
s->emitSignal2();
@@ -5150,6 +5171,52 @@ void tst_QObject::returnValue2()
}
}
+class VirtualSlotsObjectBase : public QObject {
+ Q_OBJECT
+public slots:
+ virtual void slot1() {
+ base_counter1++;
+ }
+public:
+ VirtualSlotsObjectBase() : base_counter1(0) {}
+ int base_counter1;
+signals:
+ void signal1();
+};
+
+class VirtualSlotsObject : public VirtualSlotsObjectBase {
+ Q_OBJECT
+public slots:
+ virtual void slot1() {
+ derived_counter1++;
+ }
+public:
+ VirtualSlotsObject() : derived_counter1(0) {}
+ int derived_counter1;
+};
+
+void tst_QObject::connectVirtualSlots()
+{
+ VirtualSlotsObject 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, 1);
+
+ 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, 1);
+
+ /* 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, &VirtualSlotsObject::slot1, Qt::UniqueConnection));
+ */
+}
QTEST_MAIN(tst_QObject)
#include "tst_qobject.moc"
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.pro b/tests/auto/corelib/kernel/qobject/tst_qobject.pro
index e13852629c..d74f2bcb0f 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.pro
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.pro
@@ -1,6 +1,6 @@
-CONFIG += testcase
+CONFIG += testcase console
TARGET = tst_qobject
-QT = core-private network gui testlib
+QT = core-private network testlib
SOURCES = tst_qobject.cpp
# this is here for a reason, moc_oldnormalizedobject.cpp is not auto-generated, it was generated by
diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
index df4c5f99cb..9eac2b78be 100644
--- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
+++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
index 4b9c37a5e0..b1fdf51c20 100644
--- a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
+++ b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
index 180e7d532b..e3bfe3bc6d 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
+++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
index 098d8a8825..e8dade9387 100644
--- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
+++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
index a7ccc45642..033d10001f 100644
--- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
+++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.pro b/tests/auto/corelib/kernel/qvariant/qvariant.pro
index 93877a1059..48229ee140 100644
--- a/tests/auto/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/auto/corelib/kernel/qvariant/qvariant.pro
@@ -2,5 +2,6 @@ CONFIG += testcase
TARGET = tst_qvariant
QT += widgets network testlib
SOURCES = tst_qvariant.cpp
+RESOURCES += qvariant.qrc
mac: CONFIG += insignificant_test # QTBUG-QTBUG-22747
diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.qrc b/tests/auto/corelib/kernel/qvariant/qvariant.qrc
new file mode 100644
index 0000000000..e6f7bdac80
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/qvariant.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>stream/qt4.9/</file>
+ <file>stream/qt5.0/</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/bool.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/bool.bin
new file mode 100644
index 0000000000..7929cb4129
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/bool.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/char.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/char.bin
new file mode 100644
index 0000000000..3c15cb7850
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/char.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/double.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/double.bin
new file mode 100644
index 0000000000..ac9ed179f2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/double.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/float.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/float.bin
new file mode 100644
index 0000000000..540c010dc9
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/float.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/int.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/int.bin
new file mode 100644
index 0000000000..6b47a9aeb4
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/int.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/long.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/long.bin
new file mode 100644
index 0000000000..66891d5ed8
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/long.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitarray.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitarray.bin
new file mode 100644
index 0000000000..e534174651
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitarray.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitmap.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitmap.bin
new file mode 100644
index 0000000000..13f4dc374d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbitmap.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbrush.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbrush.bin
new file mode 100644
index 0000000000..60ea8a2b08
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbrush.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbytearray.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbytearray.bin
new file mode 100644
index 0000000000..19897811d0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qbytearray.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qchar.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qchar.bin
new file mode 100644
index 0000000000..f4ef9df794
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qchar.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcolor.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcolor.bin
new file mode 100644
index 0000000000..ba1c332e14
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcolor.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcursor.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcursor.bin
new file mode 100644
index 0000000000..545fa96a1f
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qcursor.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdate.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdate.bin
new file mode 100644
index 0000000000..d3281b1336
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdate.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdatetime.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdatetime.bin
new file mode 100644
index 0000000000..664eb736a7
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qdatetime.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qeasingcurve.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qeasingcurve.bin
new file mode 100644
index 0000000000..b9b9ea633b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qeasingcurve.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qfont.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qfont.bin
new file mode 100644
index 0000000000..76bc5d932f
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qfont.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qicon.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qicon.bin
new file mode 100644
index 0000000000..2f8713244c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qicon.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qimage.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qimage.bin
new file mode 100644
index 0000000000..0ab1cbf6fa
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qimage.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qkeysequence.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qkeysequence.bin
new file mode 100644
index 0000000000..03db168e93
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qkeysequence.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qline.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qline.bin
new file mode 100644
index 0000000000..f1f5cde63c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qline.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlinef.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlinef.bin
new file mode 100644
index 0000000000..4b1c2f05fb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlinef.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlocale.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlocale.bin
new file mode 100644
index 0000000000..44d9d1c993
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlocale.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlonglong.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlonglong.bin
new file mode 100644
index 0000000000..f1c297a91d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qlonglong.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix.bin
new file mode 100644
index 0000000000..fc88e2564a
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix4x4.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix4x4.bin
new file mode 100644
index 0000000000..3a8b664a69
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qmatrix4x4.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpalette.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpalette.bin
new file mode 100644
index 0000000000..1ad94631bd
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpalette.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpen.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpen.bin
new file mode 100644
index 0000000000..1eff5c83ad
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpen.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpixmap.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpixmap.bin
new file mode 100644
index 0000000000..ce9cb8c434
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpixmap.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpoint.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpoint.bin
new file mode 100644
index 0000000000..ca66b1ec4c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpoint.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpointf.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpointf.bin
new file mode 100644
index 0000000000..7aebb46299
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpointf.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpolygon.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpolygon.bin
new file mode 100644
index 0000000000..fbdab8fffc
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qpolygon.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qquaternion.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qquaternion.bin
new file mode 100644
index 0000000000..01ee6dcdbc
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qquaternion.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrect.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrect.bin
new file mode 100644
index 0000000000..70730db7e1
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrect.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrectf.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrectf.bin
new file mode 100644
index 0000000000..2f8dac670b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qrectf.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregexp.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregexp.bin
new file mode 100644
index 0000000000..db8518e064
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregexp.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregion.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregion.bin
new file mode 100644
index 0000000000..27eec8c4d5
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qregion.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsize.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsize.bin
new file mode 100644
index 0000000000..fec8c62c16
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsize.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizef.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizef.bin
new file mode 100644
index 0000000000..210976a005
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizef.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizepolicy.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizepolicy.bin
new file mode 100644
index 0000000000..00f1b2906e
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qsizepolicy.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstring.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstring.bin
new file mode 100644
index 0000000000..f44d7cbbc0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstring.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstringlist.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstringlist.bin
new file mode 100644
index 0000000000..34e6f73ab5
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qstringlist.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextformat.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextformat.bin
new file mode 100644
index 0000000000..91382db9c4
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextformat.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextlength.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextlength.bin
new file mode 100644
index 0000000000..945dfc0ba9
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtextlength.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtime.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtime.bin
new file mode 100644
index 0000000000..31f63fd1fb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtime.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtransform.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtransform.bin
new file mode 100644
index 0000000000..53c4db55f2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qtransform.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qulonglong.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qulonglong.bin
new file mode 100644
index 0000000000..e321e7d77d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qulonglong.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qurl.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qurl.bin
new file mode 100644
index 0000000000..4e444b7cc0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qurl.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariant.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariant.bin
new file mode 100644
index 0000000000..7d5c5303b8
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariant.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvarianthash.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvarianthash.bin
new file mode 100644
index 0000000000..e2ffb002af
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvarianthash.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantlist.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantlist.bin
new file mode 100644
index 0000000000..cf95d44875
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantlist.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantmap.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantmap.bin
new file mode 100644
index 0000000000..6b0b1fb27d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvariantmap.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector2d.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector2d.bin
new file mode 100644
index 0000000000..a219ab66dd
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector2d.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector3d.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector3d.bin
new file mode 100644
index 0000000000..4444fb6236
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector3d.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector4d.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector4d.bin
new file mode 100644
index 0000000000..46bcc26f13
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/qvector4d.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/short.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/short.bin
new file mode 100644
index 0000000000..124776f9d7
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/short.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/uchar.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/uchar.bin
new file mode 100644
index 0000000000..1dea2c16c0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/uchar.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/uint.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/uint.bin
new file mode 100644
index 0000000000..086e080224
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/uint.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/ulong.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/ulong.bin
new file mode 100644
index 0000000000..92dfdaad6c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/ulong.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/ushort.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/ushort.bin
new file mode 100644
index 0000000000..d386a76f1a
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/ushort.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt4.9/void.bin b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/void.bin
new file mode 100644
index 0000000000..7337dc7cfb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt4.9/void.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/bool.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/bool.bin
new file mode 100644
index 0000000000..7929cb4129
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/bool.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/char.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/char.bin
new file mode 100644
index 0000000000..4422f29a62
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/char.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/double.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/double.bin
new file mode 100644
index 0000000000..ac9ed179f2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/double.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/float.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/float.bin
new file mode 100644
index 0000000000..fc7cca7d07
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/float.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/int.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/int.bin
new file mode 100644
index 0000000000..6b47a9aeb4
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/int.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/long.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/long.bin
new file mode 100644
index 0000000000..5a1ed0d740
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/long.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitarray.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitarray.bin
new file mode 100644
index 0000000000..e534174651
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitarray.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitmap.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitmap.bin
new file mode 100644
index 0000000000..511e260744
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbitmap.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbrush.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbrush.bin
new file mode 100644
index 0000000000..60ea8a2b08
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbrush.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbytearray.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbytearray.bin
new file mode 100644
index 0000000000..19897811d0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qbytearray.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qchar.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qchar.bin
new file mode 100644
index 0000000000..f4ef9df794
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qchar.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcolor.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcolor.bin
new file mode 100644
index 0000000000..ba1c332e14
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcolor.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcursor.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcursor.bin
new file mode 100644
index 0000000000..a7be10e143
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qcursor.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdate.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdate.bin
new file mode 100644
index 0000000000..d3281b1336
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdate.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdatetime.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdatetime.bin
new file mode 100644
index 0000000000..664eb736a7
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qdatetime.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qeasingcurve.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qeasingcurve.bin
new file mode 100644
index 0000000000..5cf664eb27
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qeasingcurve.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qfont.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qfont.bin
new file mode 100644
index 0000000000..e8aa03af9b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qfont.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qicon.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qicon.bin
new file mode 100644
index 0000000000..bf3ca9ed4b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qicon.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qimage.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qimage.bin
new file mode 100644
index 0000000000..03665c1edc
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qimage.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qkeysequence.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qkeysequence.bin
new file mode 100644
index 0000000000..7f7447a821
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qkeysequence.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qline.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qline.bin
new file mode 100644
index 0000000000..f1f5cde63c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qline.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlinef.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlinef.bin
new file mode 100644
index 0000000000..4b1c2f05fb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlinef.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlocale.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlocale.bin
new file mode 100644
index 0000000000..44d9d1c993
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlocale.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlonglong.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlonglong.bin
new file mode 100644
index 0000000000..f1c297a91d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qlonglong.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix.bin
new file mode 100644
index 0000000000..93434b42c9
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix4x4.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix4x4.bin
new file mode 100644
index 0000000000..8d3f9b81e8
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qmatrix4x4.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpalette.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpalette.bin
new file mode 100644
index 0000000000..503c1a4664
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpalette.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpen.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpen.bin
new file mode 100644
index 0000000000..edafc2d185
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpen.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpixmap.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpixmap.bin
new file mode 100644
index 0000000000..ce9cb8c434
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpixmap.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpoint.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpoint.bin
new file mode 100644
index 0000000000..ca66b1ec4c
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpoint.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpointf.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpointf.bin
new file mode 100644
index 0000000000..7aebb46299
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpointf.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygon.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygon.bin
new file mode 100644
index 0000000000..8d3275df41
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygon.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygonf.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygonf.bin
new file mode 100644
index 0000000000..3e85997f2d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qpolygonf.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qquaternion.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qquaternion.bin
new file mode 100644
index 0000000000..c498f8fd08
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qquaternion.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrect.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrect.bin
new file mode 100644
index 0000000000..70730db7e1
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrect.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrectf.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrectf.bin
new file mode 100644
index 0000000000..2f8dac670b
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qrectf.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregexp.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregexp.bin
new file mode 100644
index 0000000000..db8518e064
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregexp.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregion.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregion.bin
new file mode 100644
index 0000000000..ecf01a8b31
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qregion.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsize.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsize.bin
new file mode 100644
index 0000000000..fec8c62c16
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsize.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizef.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizef.bin
new file mode 100644
index 0000000000..210976a005
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizef.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizepolicy.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizepolicy.bin
new file mode 100644
index 0000000000..cfdf49b4c2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qsizepolicy.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstring.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstring.bin
new file mode 100644
index 0000000000..f44d7cbbc0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstring.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstringlist.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstringlist.bin
new file mode 100644
index 0000000000..34e6f73ab5
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qstringlist.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextformat.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextformat.bin
new file mode 100644
index 0000000000..432068d921
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextformat.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextlength.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextlength.bin
new file mode 100644
index 0000000000..3b209f1be2
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtextlength.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtime.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtime.bin
new file mode 100644
index 0000000000..31f63fd1fb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtime.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtransform.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtransform.bin
new file mode 100644
index 0000000000..52cddb5e93
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qtransform.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qulonglong.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qulonglong.bin
new file mode 100644
index 0000000000..e321e7d77d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qulonglong.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qurl.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qurl.bin
new file mode 100644
index 0000000000..4e444b7cc0
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qurl.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/quuid.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/quuid.bin
new file mode 100644
index 0000000000..a8d57c6acd
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/quuid.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariant.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariant.bin
new file mode 100644
index 0000000000..1c8bc45769
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariant.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvarianthash.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvarianthash.bin
new file mode 100644
index 0000000000..e2ffb002af
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvarianthash.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantlist.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantlist.bin
new file mode 100644
index 0000000000..cf95d44875
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantlist.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantmap.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantmap.bin
new file mode 100644
index 0000000000..6b0b1fb27d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvariantmap.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector2d.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector2d.bin
new file mode 100644
index 0000000000..2bc3aeb18d
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector2d.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector3d.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector3d.bin
new file mode 100644
index 0000000000..b035f7f074
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector3d.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector4d.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector4d.bin
new file mode 100644
index 0000000000..a804c5e655
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/qvector4d.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/short.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/short.bin
new file mode 100644
index 0000000000..e7ae61f176
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/short.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/uchar.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/uchar.bin
new file mode 100644
index 0000000000..426f97426f
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/uchar.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/uint.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/uint.bin
new file mode 100644
index 0000000000..086e080224
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/uint.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/ulong.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/ulong.bin
new file mode 100644
index 0000000000..399a9ea220
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/ulong.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/ushort.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/ushort.bin
new file mode 100644
index 0000000000..25cb14e173
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/ushort.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/stream/qt5.0/void.bin b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/void.bin
new file mode 100644
index 0000000000..7337dc7cfb
--- /dev/null
+++ b/tests/auto/corelib/kernel/qvariant/stream/qt5.0/void.bin
Binary files differ
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index c2d4f0a240..2bf554dd78 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -262,6 +262,19 @@ private slots:
void forwardDeclare();
void debugStream_data();
void debugStream();
+
+ void loadQt4Stream_data();
+ void loadQt4Stream();
+ void saveQt4Stream_data();
+ void saveQt4Stream();
+ void loadQt5Stream_data();
+ void loadQt5Stream();
+ void saveQt5Stream_data();
+ void saveQt5Stream();
+private:
+ void dataStream_data(QDataStream::Version version);
+ void loadQVariantFromDataStream(QDataStream::Version version);
+ void saveQVariantFromDataStream(QDataStream::Version version);
};
Q_DECLARE_METATYPE(QDate)
@@ -1906,7 +1919,7 @@ void tst_QVariant::typeName_data()
QTest::newRow("39") << int(QVariant::RectF) << QByteArray("QRectF");
QTest::newRow("40") << int(QVariant::PointF) << QByteArray("QPointF");
QTest::newRow("41") << int(QVariant::RegExp) << QByteArray("QRegExp");
- QTest::newRow("42") << int(QVariant::UserType) << QByteArray("UserType");
+ QTest::newRow("42") << int(QVariant::UserType) << QByteArray();
QTest::newRow("43") << int(QVariant::Matrix) << QByteArray("QMatrix");
QTest::newRow("44") << int(QVariant::Transform) << QByteArray("QTransform");
QTest::newRow("45") << int(QVariant::Hash) << QByteArray("QVariantHash");
@@ -1948,7 +1961,14 @@ void tst_QVariant::typeToName()
QVERIFY( QVariant::nameToType( 0 ) == QVariant::Invalid );
QVERIFY( QVariant::nameToType( "" ) == QVariant::Invalid );
QVERIFY( QVariant::nameToType( "foo" ) == QVariant::Invalid );
- QCOMPARE(QVariant::nameToType("QIconSet"), QVariant::Icon);
+
+ QCOMPARE(QVariant::nameToType("UserType"), QVariant::Invalid);
+
+ // We don't support these old (Qt3) types anymore.
+ QCOMPARE(QVariant::nameToType("QIconSet"), QVariant::Invalid);
+ QCOMPARE(QVariant::nameToType("Q3CString"), QVariant::Invalid);
+ QCOMPARE(QVariant::nameToType("Q_LLONG"), QVariant::Invalid);
+ QCOMPARE(QVariant::nameToType("Q_ULLONG"), QVariant::Invalid);
}
void tst_QVariant::streamInvalidVariant()
@@ -2003,13 +2023,6 @@ Q_DECLARE_METATYPE(MyType*)
void tst_QVariant::userType()
{
{
- QVariant userVariant(QVariant::UserType);
-
- QVERIFY(userVariant.isValid());
- QVERIFY(userVariant.isNull());
- }
-
- {
MyType data(1, "eins");
MyType data2(2, "zwei");
@@ -3248,6 +3261,34 @@ void tst_QVariant::moreCustomTypes()
PLAY_WITH_VARIANT(d, false, QString(), 0, false);
}
QCOMPARE(MyMovable::count, 0);
+
+ {
+ QList<QList<int> > data;
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ data << (QList<int>() << 42);
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ }
+
+ {
+ QList<QVector<int> > data;
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ data << (QVector<int>() << 42);
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ }
+
+ {
+ QList<QSet<int> > data;
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ data << (QSet<int>() << 42);
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ }
+
+ {
+ QList<QLinkedList<int> > data;
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ data << (QLinkedList<int>() << 42);
+ PLAY_WITH_VARIANT(data, false, QString(), 0, false);
+ }
}
void tst_QVariant::movabilityTest()
@@ -3324,6 +3365,11 @@ void tst_QVariant::colorInteger()
}
class Forward;
+QT_BEGIN_NAMESPACE namespace QtPrivate {
+template <> struct IsPointerToTypeDerivedFromQObject<Forward*> {
+ enum { Value = false };
+};
+} QT_END_NAMESPACE
Q_DECLARE_METATYPE(Forward*);
void tst_QVariant::forwardDeclare()
@@ -3333,6 +3379,123 @@ void tst_QVariant::forwardDeclare()
QCOMPARE(qvariant_cast<Forward*>(v), f);
}
+void tst_QVariant::loadQt5Stream_data()
+{
+ dataStream_data(QDataStream::Qt_5_0);
+}
+
+void tst_QVariant::loadQt5Stream()
+{
+ loadQVariantFromDataStream(QDataStream::Qt_5_0);
+}
+
+void tst_QVariant::saveQt5Stream_data()
+{
+ dataStream_data(QDataStream::Qt_5_0);
+}
+
+void tst_QVariant::saveQt5Stream()
+{
+ saveQVariantFromDataStream(QDataStream::Qt_5_0);
+}
+
+void tst_QVariant::loadQt4Stream_data()
+{
+ dataStream_data(QDataStream::Qt_4_9);
+}
+
+void tst_QVariant::loadQt4Stream()
+{
+ loadQVariantFromDataStream(QDataStream::Qt_4_9);
+}
+
+void tst_QVariant::saveQt4Stream_data()
+{
+ dataStream_data(QDataStream::Qt_4_9);
+}
+
+void tst_QVariant::saveQt4Stream()
+{
+ saveQVariantFromDataStream(QDataStream::Qt_4_9);
+}
+
+void tst_QVariant::dataStream_data(QDataStream::Version version)
+{
+ QTest::addColumn<QString>("fileName");
+
+ QString path;
+ switch (version) {
+ case QDataStream::Qt_4_9:
+ path = QString::fromLatin1("qt4.9");
+ break;
+ case QDataStream::Qt_5_0:
+ path = QString::fromLatin1("qt5.0");
+ break;
+ default:
+ Q_UNIMPLEMENTED();
+ }
+
+ path = path.prepend(":/stream/").append("/");
+ QDir dir(path);
+ uint i = 0;
+ foreach (const QFileInfo &fileInfo, dir.entryInfoList(QStringList() << "*.bin")) {
+ QTest::newRow((path + fileInfo.fileName()).toLatin1()) << fileInfo.filePath();
+ i += 1;
+ }
+ QVERIFY(i > 10);
+}
+
+void tst_QVariant::loadQVariantFromDataStream(QDataStream::Version version)
+{
+ QFETCH(QString, fileName);
+
+ QFile file(fileName);
+ QVERIFY(file.open(QIODevice::ReadOnly));
+
+ QDataStream stream(&file);
+ stream.setVersion(version);
+
+ QString typeName;
+ QVariant loadedVariant;
+ stream >> typeName >> loadedVariant;
+
+ const int id = QMetaType::type(typeName.toLatin1());
+ QVariant constructedVariant(static_cast<QVariant::Type>(id));
+ QCOMPARE(constructedVariant.userType(), id);
+ QCOMPARE(QMetaType::typeName(loadedVariant.userType()), typeName.toLatin1().constData());
+ QCOMPARE(loadedVariant.userType(), constructedVariant.userType());
+}
+
+void tst_QVariant::saveQVariantFromDataStream(QDataStream::Version version)
+{
+ QFETCH(QString, fileName);
+
+ QFile file(fileName);
+ QVERIFY(file.open(QIODevice::ReadOnly));
+ QDataStream dataFileStream(&file);
+
+ QString typeName;
+ dataFileStream >> typeName;
+ QByteArray data = file.readAll();
+ const int id = QMetaType::type(typeName.toLatin1());
+
+ QBuffer buffer;
+ buffer.open(QIODevice::ReadWrite);
+ QDataStream stream(&buffer);
+ stream.setVersion(version);
+
+ QVariant constructedVariant(static_cast<QVariant::Type>(id));
+ QCOMPARE(constructedVariant.userType(), id);
+ stream << constructedVariant;
+
+ // We are testing QVariant there is no point in testing full array.
+ QCOMPARE(buffer.data().left(5), data.left(5));
+
+ buffer.seek(0);
+ QVariant recunstructedVariant;
+ stream >> recunstructedVariant;
+ QCOMPARE(recunstructedVariant.userType(), constructedVariant.userType());
+}
class MessageHandler {
public:
@@ -3392,6 +3555,5 @@ void tst_QVariant::debugStream()
QVERIFY(msgHandler.testPassed());
}
-
QTEST_MAIN(tst_QVariant)
#include "tst_qvariant.moc"
diff --git a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
index cd87bed601..0d3c4e0f88 100644
--- a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
+++ b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/mylib.c b/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
index 04a59f210c..8e32bb47af 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qlibrary/lib/mylib.c
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c b/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
index 525f3e3aab..e68832cabc 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/mylib.c
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
index 75f854667e..cff98de54f 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -103,8 +103,8 @@
static QString sys_qualifiedLibraryName(const QString &fileName)
{
- QString currDir = QDir::currentPath();
- return currDir + "/" + PREFIX + fileName + SUFFIX;
+ QString appDir = QCoreApplication::applicationDirPath();
+ return appDir + "/" + PREFIX + fileName + SUFFIX;
}
QT_FORWARD_DECLARE_CLASS(QLibrary)
@@ -170,8 +170,8 @@ void tst_QLibrary::version()
QFETCH( int, resultversion );
#if !defined(Q_OS_AIX) && !defined(Q_OS_WIN)
- QString currDir = QDir::currentPath();
- QLibrary library( currDir + QLatin1Char('/') + lib, loadversion );
+ QString appDir = QCoreApplication::applicationDirPath();
+ QLibrary library( appDir + QLatin1Char('/') + lib, loadversion );
QVERIFY2(library.load(), qPrintable(library.errorString()));
VersionFunction fnVersion = (VersionFunction)library.resolve("mylibversion");
@@ -190,24 +190,24 @@ void tst_QLibrary::load_data()
QTest::addColumn<QString>("lib");
QTest::addColumn<bool>("result");
- QString currDir = QDir::currentPath();
+ QString appDir = QCoreApplication::applicationDirPath();
- QTest::newRow( "ok00" ) << currDir + "/mylib" << true;
- QTest::newRow( "notexist" ) << currDir + "/nolib" << false;
- QTest::newRow( "badlibrary" ) << currDir + "/qlibrary.pro" << false;
+ QTest::newRow( "ok00" ) << appDir + "/mylib" << true;
+ QTest::newRow( "notexist" ) << appDir + "/nolib" << false;
+ QTest::newRow( "badlibrary" ) << appDir + "/qlibrary.pro" << false;
#ifdef Q_OS_MAC
- QTest::newRow("ok (libmylib ver. 1)") << currDir + "/libmylib" <<true;
+ QTest::newRow("ok (libmylib ver. 1)") << appDir + "/libmylib" <<true;
#endif
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
- QTest::newRow( "ok01 (with suffix)" ) << currDir + "/mylib.dll" << true;
- QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/mylib.dl2" << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.dll" << true;
+ QTest::newRow( "ok01 (with suffix)" ) << appDir + "/mylib.dll" << true;
+ QTest::newRow( "ok02 (with non-standard suffix)" ) << appDir + "/mylib.dl2" << true;
+ QTest::newRow( "ok03 (with many dots)" ) << appDir + "/system.qt.test.mylib.dll" << true;
# elif defined Q_OS_UNIX
- QTest::newRow( "ok01 (with suffix)" ) << currDir + "/libmylib" SUFFIX << true;
- QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/libmylib.so2" << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.so" << true;
+ QTest::newRow( "ok01 (with suffix)" ) << appDir + "/libmylib" SUFFIX << true;
+ QTest::newRow( "ok02 (with non-standard suffix)" ) << appDir + "/libmylib.so2" << true;
+ QTest::newRow( "ok03 (with many dots)" ) << appDir + "/system.qt.test.mylib.so" << true;
# endif // Q_OS_UNIX
}
@@ -231,14 +231,14 @@ void tst_QLibrary::unload_data()
QTest::addColumn<QString>("lib");
QTest::addColumn<bool>("result");
- QString currDir = QDir::currentPath();
+ QString appDir = QCoreApplication::applicationDirPath();
- QTest::newRow( "mylib" ) << currDir + "/mylib" << true;
+ QTest::newRow( "mylib" ) << appDir + "/mylib" << true;
#ifdef Q_OS_MAC
if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_3)
QEXPECT_FAIL("mylib", "dlcompat cannot unload libraries", Continue);
#endif
- QTest::newRow( "ok01" ) << currDir + "/nolib" << false;
+ QTest::newRow( "ok01" ) << appDir + "/nolib" << false;
}
void tst_QLibrary::unload()
@@ -272,11 +272,11 @@ void tst_QLibrary::resolve_data()
QTest::addColumn<QString>("symbol");
QTest::addColumn<bool>("goodPointer");
- QString currDir = QDir::currentPath();
+ QString appDir = QCoreApplication::applicationDirPath();
- QTest::newRow( "ok00" ) << currDir + "/mylib" << QString("mylibversion") << true;
- QTest::newRow( "bad00" ) << currDir + "/mylib" << QString("nosym") << false;
- QTest::newRow( "bad01" ) << currDir + "/nolib" << QString("nosym") << false;
+ QTest::newRow( "ok00" ) << appDir + "/mylib" << QString("mylibversion") << true;
+ QTest::newRow( "bad00" ) << appDir + "/mylib" << QString("nosym") << false;
+ QTest::newRow( "bad01" ) << appDir + "/nolib" << QString("nosym") << false;
}
void tst_QLibrary::resolve()
@@ -353,16 +353,16 @@ void tst_QLibrary::errorString_data()
QTest::addColumn<bool>("success");
QTest::addColumn<QString>("errorString");
- QString currDir = QDir::currentPath();
+ QString appDir = QCoreApplication::applicationDirPath();
QTest::newRow("bad load()") << (int)Load << QString("nosuchlib") << false << QString("Cannot load library nosuchlib: .*");
QTest::newRow("call errorString() on QLibrary with no d-pointer (crashtest)") << (int)(Load | DontSetFileName) << QString() << false << QString("Unknown error");
#ifdef Q_OS_WINCE
- QTest::newRow("bad resolve") << (int)Resolve << currDir + "/mylib" << false << QString("Cannot resolve symbol \"nosuchsymbol\" in .*: .*");
+ QTest::newRow("bad resolve") << (int)Resolve << appDir + "/mylib" << false << QString("Cannot resolve symbol \"nosuchsymbol\" in .*: .*");
#else
- QTest::newRow("bad resolve") << (int)Resolve << currDir + "/mylib" << false << QString("Cannot resolve symbol \"nosuchsymbol\" in \\S+: .*");
+ QTest::newRow("bad resolve") << (int)Resolve << appDir + "/mylib" << false << QString("Cannot resolve symbol \"nosuchsymbol\" in \\S+: .*");
#endif
- QTest::newRow("good resolve") << (int)Resolve << currDir + "/mylib" << true << QString("Unknown error");
+ QTest::newRow("good resolve") << (int)Resolve << appDir + "/mylib" << true << QString("Unknown error");
#ifdef Q_OS_WIN
QTest::newRow("bad load() with .dll suffix") << (int)Load << QString("nosuchlib.dll") << false << QString("Cannot load library nosuchlib.dll: The specified module could not be found.");
@@ -431,17 +431,17 @@ void tst_QLibrary::loadHints_data()
}
#endif
- QString currDir = QDir::currentPath();
+ QString appDir = QCoreApplication::applicationDirPath();
lh |= QLibrary::ResolveAllSymbolsHint;
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
- QTest::newRow( "ok01 (with suffix)" ) << currDir + "/mylib.dll" << int(lh) << true;
- QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/mylib.dl2" << int(lh) << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.dll" << int(lh) << true;
+ QTest::newRow( "ok01 (with suffix)" ) << appDir + "/mylib.dll" << int(lh) << true;
+ QTest::newRow( "ok02 (with non-standard suffix)" ) << appDir + "/mylib.dl2" << int(lh) << true;
+ QTest::newRow( "ok03 (with many dots)" ) << appDir + "/system.qt.test.mylib.dll" << int(lh) << true;
# elif defined Q_OS_UNIX
- QTest::newRow( "ok01 (with suffix)" ) << currDir + "/libmylib" SUFFIX << int(lh) << true;
- QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/libmylib.so2" << int(lh) << true;
- QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.qt.test.mylib.so" << int(lh) << true;
+ QTest::newRow( "ok01 (with suffix)" ) << appDir + "/libmylib" SUFFIX << int(lh) << true;
+ QTest::newRow( "ok02 (with non-standard suffix)" ) << appDir + "/libmylib.so2" << int(lh) << true;
+ QTest::newRow( "ok03 (with many dots)" ) << appDir + "/system.qt.test.mylib.so" << int(lh) << true;
# endif // Q_OS_UNIX
}
@@ -504,7 +504,7 @@ void tst_QLibrary::fileName()
void tst_QLibrary::multipleInstancesForOneLibrary()
{
- QString lib = QDir::currentPath() + "/mylib";
+ QString lib = QCoreApplication::applicationDirPath() + "/mylib";
{
QLibrary lib1(lib);
diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp b/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
index 3dc5ec377c..057db69174 100644
--- a/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
+++ b/tests/auto/corelib/plugin/qplugin/debugplugin/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp b/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
index 99f3c8f452..9542695112 100644
--- a/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
+++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
index 63c1100c5c..e6a83cf3d7 100644
--- a/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
+++ b/tests/auto/corelib/plugin/qplugin/tst_qplugin.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
index 353b5e0158..4b2057087a 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
index e4a9b376b2..6658a5be8d 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
index c87ec5b66d..043e857fc0 100644
--- a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
index 92b7a1b4dc..a568dd118d 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
index 660dbd2b90..b064901a4d 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
index e1ded8f07b..b769aa6eed 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index bf046524d7..b79479ace8 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
index 072d722cff..3012c532db 100644
--- a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
+++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
index 789659cd04..ea88e4832e 100644
--- a/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/auto/corelib/plugin/quuid/tst_quuid.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
index 7ca7fc5120..841a111070 100644
--- a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
+++ b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
index 2183016c32..6a06a3fb5b 100644
--- a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
index f7969eb55e..a6d38ca078 100644
--- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
+++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
index ac83601414..a8f7e037d0 100644
--- a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
+++ b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
index 6669a5c4b4..72670ab33f 100644
--- a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
index e92dddca95..33ea2bedb4 100644
--- a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
+++ b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
index 4ba28f60ef..58819dad4b 100644
--- a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
+++ b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
index 418ae02add..2fcce773bc 100644
--- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
+++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index 2901e8f6c9..1d54c8e036 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index 1afd913fe9..25e1a0587c 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
index c37823436a..6d63a4b6ea 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
index 3c5a42e814..6fc937efa9 100644
--- a/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
+++ b/tests/auto/corelib/thread/qthreadonce/qthreadonce.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@
QT_BEGIN_HEADER
-QT_MODULE(Core)
#ifndef QT_NO_THREAD
diff --git a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
index 81f57215cc..8d4ee73d7f 100644
--- a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/concurrent/qthreadpool/.gitignore b/tests/auto/corelib/thread/qthreadpool/.gitignore
index 16105821a2..16105821a2 100644
--- a/tests/auto/corelib/concurrent/qthreadpool/.gitignore
+++ b/tests/auto/corelib/thread/qthreadpool/.gitignore
diff --git a/tests/auto/corelib/concurrent/qthreadpool/qthreadpool.pro b/tests/auto/corelib/thread/qthreadpool/qthreadpool.pro
index 4d81218f24..4d81218f24 100644
--- a/tests/auto/corelib/concurrent/qthreadpool/qthreadpool.pro
+++ b/tests/auto/corelib/thread/qthreadpool/qthreadpool.pro
diff --git a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
index e08ed2b3fc..1dd0410f41 100644
--- a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp b/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp
index 4c5fcf916a..388c233d84 100644
--- a/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/crashOnExit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index c74b85154f..fff361ea2a 100644
--- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index 6bb562e146..578f867032 100644
--- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
index f975351e32..7481b9d9f1 100644
--- a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
+++ b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/thread/thread.pro b/tests/auto/corelib/thread/thread.pro
index a137748b75..12a284c7c7 100644
--- a/tests/auto/corelib/thread/thread.pro
+++ b/tests/auto/corelib/thread/thread.pro
@@ -9,6 +9,7 @@ SUBDIRS=\
qsemaphore \
qthread \
qthreadonce \
+ qthreadpool \
qthreadstorage \
qwaitcondition \
qwritelocker
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
index 5735c4043b..1d7cb1e903 100644
--- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
+++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -105,29 +105,24 @@ QVector<DataType> generateData(QString dataSetType, const int length)
{
QVector<DataType> container;
if (dataSetType == "Random") {
- for(int i=0; i < length; ++i)
+ for (int i = 0; i < length; ++i)
container.append(rand());
- }
- else if (dataSetType == "Ascending") {
- for (int i=0; i < length; ++i)
+ } else if (dataSetType == "Ascending") {
+ for (int i = 0; i < length; ++i)
container.append(i);
- }
- else if (dataSetType == "Descending") {
- for (int i=0; i < length; ++i)
+ } else if (dataSetType == "Descending") {
+ for (int i = 0; i < length; ++i)
container.append(length - i);
- }
- else if (dataSetType == "Equal") {
- for (int i=0; i < length; ++i)
+ } else if (dataSetType == "Equal") {
+ for (int i = 0; i < length; ++i)
container.append(43);
- }
- else if (dataSetType == "Duplicates") {
- for (int i=0; i < length; ++i)
+ } else if (dataSetType == "Duplicates") {
+ for (int i = 0; i < length; ++i)
container.append(i % 10);
- }
- else if (dataSetType == "Almost Sorted") {
- for (int i=0; i < length; ++i)
+ } else if (dataSetType == "Almost Sorted") {
+ for (int i = 0; i < length; ++i)
container.append(i);
- for(int i = 0; i<= length / 10; ++i) {
+ for (int i = 0; i <= length / 10; ++i) {
const int iswap = i * 9;
DataType tmp = container.at(iswap);
container[iswap] = container.at(iswap + 1);
diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
index 9ee006827f..588506534a 100644
--- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 5b660ecd3f..585d6afa44 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -130,7 +130,8 @@ private slots:
void byteRefDetaching() const;
void reserve();
-
+ void movablity_data();
+ void movablity();
void literals();
};
@@ -1497,6 +1498,85 @@ void tst_QByteArray::reserve()
nil2.reserve(0);
}
+void tst_QByteArray::movablity_data()
+{
+ QTest::addColumn<QByteArray>("array");
+
+ QTest::newRow("0x00000000") << QByteArray("\x00\x00\x00\x00", 4);
+ QTest::newRow("0x000000ff") << QByteArray("\x00\x00\x00\xff", 4);
+ QTest::newRow("0xffffffff") << QByteArray("\xff\xff\xff\xff", 4);
+ QTest::newRow("empty") << QByteArray("");
+ QTest::newRow("null") << QByteArray();
+ QTest::newRow("sss") << QByteArray(3, 's');
+}
+
+void tst_QByteArray::movablity()
+{
+ QFETCH(QByteArray, array);
+
+ QVERIFY(!QTypeInfo<QByteArray>::isStatic);
+
+ const int size = array.size();
+ const bool isEmpty = array.isEmpty();
+ const bool isNull = array.isNull();
+ const int capacity = array.capacity();
+
+ QByteArray memSpace;
+
+ // we need only memory space not the instance
+ memSpace.~QByteArray();
+ // move array -> memSpace
+ memcpy(&memSpace, &array, sizeof(QByteArray));
+ // reconstruct empty QByteArray
+ new (&array) QByteArray;
+
+ QCOMPARE(memSpace.size(), size);
+ QCOMPARE(memSpace.isEmpty(), isEmpty);
+ QCOMPARE(memSpace.isNull(), isNull);
+ QCOMPARE(memSpace.capacity(), capacity);
+
+ // try to not crash
+ memSpace.toLower();
+ memSpace.toUpper();
+ memSpace.prepend('a');
+ memSpace.append("b", 1);
+ memSpace.squeeze();
+ memSpace.reserve(array.size() + 16);
+
+ QByteArray copy(memSpace);
+
+ // reinitialize base values
+ const int newSize = size + 2;
+ const bool newIsEmpty = false;
+ const bool newIsNull = false;
+ const int newCapacity = 16;
+
+ // move back memSpace -> array
+ array.~QByteArray();
+ memcpy(&array, &memSpace, sizeof(QByteArray));
+ // reconstruct empty QByteArray
+ new (&memSpace) QByteArray;
+
+ QCOMPARE(array.size(), newSize);
+ QCOMPARE(array.isEmpty(), newIsEmpty);
+ QCOMPARE(array.isNull(), newIsNull);
+ QCOMPARE(array.capacity(), newCapacity);
+ 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"));
+
+ // try to not crash
+ array.squeeze();
+ array.reserve(array.size() + 3);
+ QVERIFY(true);
+}
+
void tst_QByteArray::literals()
{
#if defined(Q_COMPILER_LAMBDA) || defined(Q_CC_GNU)
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
index 8bc827ef7f..d0ba1fadc9 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
+++ b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qcache/tst_qcache.cpp b/tests/auto/corelib/tools/qcache/tst_qcache.cpp
index 88b56612af..8129f1510c 100644
--- a/tests/auto/corelib/tools/qcache/tst_qcache.cpp
+++ b/tests/auto/corelib/tools/qcache/tst_qcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index c5fdeeb54a..1732f628ea 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
index ad464dc40a..37fe346684 100644
--- a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
+++ b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index 14b41e178d..3a257c2f11 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
index 7bb6de8c9f..4921a7e734 100644
--- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp
+++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,20 +48,32 @@ class tst_QDate : public QObject
Q_OBJECT
private slots:
void toString();
+ void isNull_data();
+ void isNull();
void isValid_data();
void isValid();
void julianDay_data();
void julianDay();
+ void dayOfWeek_data();
+ void dayOfWeek();
+ void dayOfYear_data();
+ void dayOfYear();
+ void daysInMonth_data();
+ void daysInMonth();
+ void daysInYear();
+ void getDate();
void weekNumber_invalid_data();
void weekNumber_invalid();
void weekNumber_data();
void weekNumber();
+ void julianDaysLimits();
void addDays_data();
void addDays();
void addMonths_data();
void addMonths();
void addYears_data();
void addYears();
+ void daysTo();
void operator_eq_eq();
void operator_not_eq();
void operator_lt();
@@ -92,66 +104,92 @@ private slots:
Q_DECLARE_METATYPE(QDate)
+void tst_QDate::isNull_data()
+{
+ QTest::addColumn<qint64>("jd");
+ QTest::addColumn<bool>("null");
+
+ qint64 minJd = std::numeric_limits<qint64>::min() / 2;
+ qint64 maxJd = std::numeric_limits<qint64>::max() / 2;
+
+ QTest::newRow("qint64 min") << std::numeric_limits<qint64>::min() << true;
+ QTest::newRow("minJd - 1") << minJd - 1 << true;
+ QTest::newRow("minJd") << minJd << false;
+ QTest::newRow("minJd + 1") << minJd + 1 << false;
+ QTest::newRow("maxJd - 1") << maxJd - 1 << false;
+ QTest::newRow("maxJd") << maxJd << false;
+ QTest::newRow("maxJd + 1") << maxJd + 1 << true;
+ QTest::newRow("qint64 max") << std::numeric_limits<qint64>::max() << true;
+}
+
+void tst_QDate::isNull()
+{
+ QFETCH(qint64, jd);
+
+ QDate d = QDate::fromJulianDay(jd);
+ QTEST(d.isNull(), "null");
+}
+
void tst_QDate::isValid_data()
{
+ qint64 nullJd = std::numeric_limits<qint64>::min();
+
QTest::addColumn<int>("year");
QTest::addColumn<int>("month");
QTest::addColumn<int>("day");
- QTest::addColumn<uint>("jd");
+ QTest::addColumn<qint64>("jd");
QTest::addColumn<bool>("valid");
- QTest::newRow("0-0-0") << 0 << 0 << 0 << 0U << false;
- QTest::newRow("month 0") << 2000 << 0 << 1 << 0U << false;
- QTest::newRow("day 0") << 2000 << 1 << 0 << 0U << false;
+ QTest::newRow("0-0-0") << 0 << 0 << 0 << nullJd << false;
+ QTest::newRow("month 0") << 2000 << 0 << 1 << nullJd << false;
+ QTest::newRow("day 0") << 2000 << 1 << 0 << nullJd << false;
- QTest::newRow("month 13") << 2000 << 13 << 1 << 0U << false;
+ QTest::newRow("month 13") << 2000 << 13 << 1 << nullJd << false;
// test leap years
- QTest::newRow("non-leap") << 2006 << 2 << 29 << 0U << false;
- QTest::newRow("normal leap") << 2004 << 2 << 29 << 2453065U << true;
- QTest::newRow("century leap") << 1900 << 2 << 29 << 0U << false;
- QTest::newRow("century leap") << 2100 << 2 << 29 << 0U << false;
- QTest::newRow("400-years leap") << 2000 << 2 << 29 << 2451604U << true;
- QTest::newRow("400-years leap 2") << 2400 << 2 << 29 << 2597701U << true;
- QTest::newRow("400-years leap 3") << 1600 << 2 << 29 << 2305507U << true;
- QTest::newRow("year 0") << 0 << 2 << 27 << 0U << false;
+ QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false;
+ QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true;
+ QTest::newRow("century leap") << 1900 << 2 << 29 << nullJd << false;
+ QTest::newRow("century leap") << 2100 << 2 << 29 << nullJd << false;
+ QTest::newRow("400-years leap") << 2000 << 2 << 29 << qint64(2451604) << true;
+ QTest::newRow("400-years leap 2") << 2400 << 2 << 29 << qint64(2597701) << true;
+ QTest::newRow("400-years leap 3") << 1600 << 2 << 29 << qint64(2305507) << true;
+ QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false;
// test the number of days in months:
- QTest::newRow("jan") << 2000 << 1 << 31 << 2451575U << true;
- QTest::newRow("feb") << 2000 << 2 << 29 << 2451604U << true; // same data as 400-years leap
- QTest::newRow("mar") << 2000 << 3 << 31 << 2451635U << true;
- QTest::newRow("apr") << 2000 << 4 << 30 << 2451665U << true;
- QTest::newRow("may") << 2000 << 5 << 31 << 2451696U << true;
- QTest::newRow("jun") << 2000 << 6 << 30 << 2451726U << true;
- QTest::newRow("jul") << 2000 << 7 << 31 << 2451757U << true;
- QTest::newRow("aug") << 2000 << 8 << 31 << 2451788U << true;
- QTest::newRow("sep") << 2000 << 9 << 30 << 2451818U << true;
- QTest::newRow("oct") << 2000 << 10 << 31 << 2451849U << true;
- QTest::newRow("nov") << 2000 << 11 << 30 << 2451879U << true;
- QTest::newRow("dec") << 2000 << 12 << 31 << 2451910U << true;
+ QTest::newRow("jan") << 2000 << 1 << 31 << qint64(2451575) << true;
+ QTest::newRow("feb") << 2000 << 2 << 29 << qint64(2451604) << true; // same data as 400-years leap
+ QTest::newRow("mar") << 2000 << 3 << 31 << qint64(2451635) << true;
+ QTest::newRow("apr") << 2000 << 4 << 30 << qint64(2451665) << true;
+ QTest::newRow("may") << 2000 << 5 << 31 << qint64(2451696) << true;
+ QTest::newRow("jun") << 2000 << 6 << 30 << qint64(2451726) << true;
+ QTest::newRow("jul") << 2000 << 7 << 31 << qint64(2451757) << true;
+ QTest::newRow("aug") << 2000 << 8 << 31 << qint64(2451788) << true;
+ QTest::newRow("sep") << 2000 << 9 << 30 << qint64(2451818) << true;
+ QTest::newRow("oct") << 2000 << 10 << 31 << qint64(2451849) << true;
+ QTest::newRow("nov") << 2000 << 11 << 30 << qint64(2451879) << true;
+ QTest::newRow("dec") << 2000 << 12 << 31 << qint64(2451910) << true;
// and invalid dates:
- QTest::newRow("ijan") << 2000 << 1 << 32 << 0U << false;
- QTest::newRow("ifeb") << 2000 << 2 << 30 << 0U << false;
- QTest::newRow("imar") << 2000 << 3 << 32 << 0U << false;
- QTest::newRow("iapr") << 2000 << 4 << 31 << 0U << false;
- QTest::newRow("imay") << 2000 << 5 << 32 << 0U << false;
- QTest::newRow("ijun") << 2000 << 6 << 31 << 0U << false;
- QTest::newRow("ijul") << 2000 << 7 << 32 << 0U << false;
- QTest::newRow("iaug") << 2000 << 8 << 32 << 0U << false;
- QTest::newRow("isep") << 2000 << 9 << 31 << 0U << false;
- QTest::newRow("ioct") << 2000 << 10 << 32 << 0U << false;
- QTest::newRow("inov") << 2000 << 11 << 31 << 0U << false;
- QTest::newRow("idec") << 2000 << 12 << 32 << 0U << false;
+ QTest::newRow("ijan") << 2000 << 1 << 32 << nullJd << false;
+ QTest::newRow("ifeb") << 2000 << 2 << 30 << nullJd << false;
+ QTest::newRow("imar") << 2000 << 3 << 32 << nullJd << false;
+ QTest::newRow("iapr") << 2000 << 4 << 31 << nullJd << false;
+ QTest::newRow("imay") << 2000 << 5 << 32 << nullJd << false;
+ QTest::newRow("ijun") << 2000 << 6 << 31 << nullJd << false;
+ QTest::newRow("ijul") << 2000 << 7 << 32 << nullJd << false;
+ QTest::newRow("iaug") << 2000 << 8 << 32 << nullJd << false;
+ QTest::newRow("isep") << 2000 << 9 << 31 << nullJd << false;
+ QTest::newRow("ioct") << 2000 << 10 << 32 << nullJd << false;
+ QTest::newRow("inov") << 2000 << 11 << 31 << nullJd << false;
+ QTest::newRow("idec") << 2000 << 12 << 32 << nullJd << false;
// the beginning of the Julian Day calendar:
- QTest::newRow("jd negative1") << -4714 << 1 << 1 << 0U << false;
- QTest::newRow("jd negative2") << -4713 << 1 << 1 << 0U << false;
- QTest::newRow("jd negative3") << -4713 << 1 << 2 << 1U << true;
- QTest::newRow("jd negative4") << -4713 << 1 << 3 << 2U << true;
- QTest::newRow("jd 0") << -4713 << 1 << 1 << 0U << false;
- QTest::newRow("jd 1") << -4713 << 1 << 2 << 1U << true;
- QTest::newRow("imminent overflow") << 11754508 << 12 << 13 << 4294967295U << true;
+ QTest::newRow("jd earliest formula") << -4800 << 1 << 1 << qint64( -31738) << true;
+ QTest::newRow("jd -1") << -4714 << 11 << 23 << qint64( -1) << true;
+ QTest::newRow("jd 0") << -4714 << 11 << 24 << qint64( 0) << true;
+ QTest::newRow("jd 1") << -4714 << 11 << 25 << qint64( 1) << true;
+ QTest::newRow("jd latest formula") << 1400000 << 12 << 31 << qint64(513060925) << true;
}
void tst_QDate::isValid()
@@ -159,12 +197,25 @@ void tst_QDate::isValid()
QFETCH(int, year);
QFETCH(int, month);
QFETCH(int, day);
+ QFETCH(qint64, jd);
+ QFETCH(bool, valid);
- QTEST(QDate::isValid(year, month, day), "valid");
+ QCOMPARE(QDate::isValid(year, month, day), valid);
QDate d;
d.setDate(year, month, day);
- QTEST(d.isValid(), "valid");
+ QCOMPARE(d.isValid(), valid);
+ QCOMPARE(d.toJulianDay(), jd);
+
+ if (valid) {
+ QCOMPARE(d.year(), year);
+ QCOMPARE(d.month(), month);
+ QCOMPARE(d.day(), day);
+ } else {
+ QCOMPARE(d.year(), 0);
+ QCOMPARE(d.month(), 0);
+ QCOMPARE(d.day(), 0);
+ }
}
void tst_QDate::julianDay_data()
@@ -177,15 +228,15 @@ void tst_QDate::julianDay()
QFETCH(int, year);
QFETCH(int, month);
QFETCH(int, day);
- QFETCH(uint, jd);
+ QFETCH(qint64, jd);
{
QDate d;
d.setDate(year, month, day);
- QCOMPARE(uint(d.toJulianDay()), jd);
+ QCOMPARE(d.toJulianDay(), jd);
}
- if (jd) {
+ if (jd != std::numeric_limits<qint64>::min()) {
QDate d = QDate::fromJulianDay(jd);
QCOMPARE(d.year(), year);
QCOMPARE(d.month(), month);
@@ -193,6 +244,137 @@ void tst_QDate::julianDay()
}
}
+void tst_QDate::dayOfWeek_data()
+{
+ QTest::addColumn<int>("year");
+ QTest::addColumn<int>("month");
+ QTest::addColumn<int>("day");
+ QTest::addColumn<int>("dayOfWeek");
+
+ QTest::newRow("data0") << 0 << 0 << 0 << 0;
+ QTest::newRow("data1") << 2000 << 1 << 3 << 1;
+ QTest::newRow("data2") << 2000 << 1 << 4 << 2;
+ QTest::newRow("data3") << 2000 << 1 << 5 << 3;
+ QTest::newRow("data4") << 2000 << 1 << 6 << 4;
+ QTest::newRow("data5") << 2000 << 1 << 7 << 5;
+ QTest::newRow("data6") << 2000 << 1 << 8 << 6;
+ QTest::newRow("data7") << 2000 << 1 << 9 << 7;
+ QTest::newRow("data8") << -4800 << 1 << 1 << 1;
+ QTest::newRow("data9") << -4800 << 1 << 2 << 2;
+ QTest::newRow("data10") << -4800 << 1 << 3 << 3;
+ QTest::newRow("data12") << -4800 << 1 << 4 << 4;
+ QTest::newRow("data12") << -4800 << 1 << 5 << 5;
+ QTest::newRow("data13") << -4800 << 1 << 6 << 6;
+ QTest::newRow("data14") << -4800 << 1 << 7 << 7;
+ QTest::newRow("data15") << -4800 << 1 << 8 << 1;
+}
+
+void tst_QDate::dayOfWeek()
+{
+ QFETCH(int, year);
+ QFETCH(int, month);
+ QFETCH(int, day);
+ QFETCH(int, dayOfWeek);
+
+ QDate dt(year, month, day);
+ QCOMPARE(dt.dayOfWeek(), dayOfWeek);
+}
+
+void tst_QDate::dayOfYear_data()
+{
+ QTest::addColumn<int>("year");
+ QTest::addColumn<int>("month");
+ QTest::addColumn<int>("day");
+ QTest::addColumn<int>("dayOfYear");
+
+ QTest::newRow("data0") << 0 << 0 << 0 << 0;
+ QTest::newRow("data1") << 2000 << 1 << 1 << 1;
+ QTest::newRow("data2") << 2000 << 1 << 2 << 2;
+ QTest::newRow("data3") << 2000 << 1 << 3 << 3;
+ QTest::newRow("data4") << 2000 << 12 << 31 << 366;
+ QTest::newRow("data5") << 2001 << 12 << 31 << 365;
+ QTest::newRow("data6") << 1815 << 1 << 1 << 1;
+ QTest::newRow("data7") << 1815 << 12 << 31 << 365;
+ QTest::newRow("data8") << 1500 << 1 << 1 << 1;
+ QTest::newRow("data9") << 1500 << 12 << 31 << 365;
+ QTest::newRow("data10") << -1500 << 1 << 1 << 1;
+ QTest::newRow("data11") << -1500 << 12 << 31 << 365;
+ QTest::newRow("data12") << -4800 << 1 << 1 << 1;
+ QTest::newRow("data13") << -4800 << 12 << 31 << 365;
+}
+
+void tst_QDate::dayOfYear()
+{
+ QFETCH(int, year);
+ QFETCH(int, month);
+ QFETCH(int, day);
+ QFETCH(int, dayOfYear);
+
+ QDate dt(year, month, day);
+ QCOMPARE(dt.dayOfYear(), dayOfYear);
+}
+
+void tst_QDate::daysInMonth_data()
+{
+ QTest::addColumn<int>("year");
+ QTest::addColumn<int>("month");
+ QTest::addColumn<int>("day");
+ QTest::addColumn<int>("daysInMonth");
+
+ QTest::newRow("data0") << 0 << 0 << 0 << 0;
+ QTest::newRow("data1") << 2000 << 1 << 1 << 31;
+ QTest::newRow("data2") << 2000 << 2 << 1 << 29;
+ QTest::newRow("data3") << 2000 << 3 << 1 << 31;
+ QTest::newRow("data4") << 2000 << 4 << 1 << 30;
+ QTest::newRow("data5") << 2000 << 5 << 1 << 31;
+ QTest::newRow("data6") << 2000 << 6 << 1 << 30;
+ QTest::newRow("data7") << 2000 << 7 << 1 << 31;
+ QTest::newRow("data8") << 2000 << 8 << 1 << 31;
+ QTest::newRow("data9") << 2000 << 9 << 1 << 30;
+ QTest::newRow("data10") << 2000 << 10 << 1 << 31;
+ QTest::newRow("data11") << 2000 << 11 << 1 << 30;
+ QTest::newRow("data12") << 2000 << 12 << 1 << 31;
+ QTest::newRow("data13") << 2001 << 2 << 1 << 28;
+}
+
+void tst_QDate::daysInMonth()
+{
+ QFETCH(int, year);
+ QFETCH(int, month);
+ QFETCH(int, day);
+ QFETCH(int, daysInMonth);
+
+ QDate dt(year, month, day);
+ QCOMPARE(dt.daysInMonth(), daysInMonth);
+}
+
+void tst_QDate::daysInYear()
+{
+ QDate dt(2000, 1, 1);
+ QCOMPARE(dt.daysInYear(), 366);
+ dt.setDate(2001, 1, 1);
+ QCOMPARE(dt.daysInYear(), 365);
+ dt.setDate(4, 1, 1);
+ QCOMPARE(dt.daysInYear(), 366);
+ dt.setDate(5, 1, 1);
+ QCOMPARE(dt.daysInYear(), 365);
+}
+
+void tst_QDate::getDate()
+{
+ int y, m, d;
+ QDate dt(2000, 1, 1);
+ dt.getDate(&y, &m, &d);
+ QCOMPARE(y, 2000);
+ QCOMPARE(m, 1);
+ QCOMPARE(d, 1);
+ dt.setDate(0, 0, 0);
+ dt.getDate(&y, &m, &d);
+ QCOMPARE(y, 0);
+ QCOMPARE(m, 0);
+ QCOMPARE(d, 0);
+}
+
void tst_QDate::weekNumber_data()
{
QTest::addColumn<int>("expectedWeekNum");
@@ -244,6 +426,68 @@ void tst_QDate::weekNumber_invalid()
QCOMPARE( dt.weekNumber( &yearNumber ), 0 );
}
+void tst_QDate::julianDaysLimits()
+{
+ qint64 min = std::numeric_limits<qint64>::min();
+ qint64 max = std::numeric_limits<qint64>::max();
+ qint64 minJd = std::numeric_limits<qint64>::min() / 2;
+ qint64 maxJd = std::numeric_limits<qint64>::max() / 2;
+
+ QDate maxDate = QDate::fromJulianDay(maxJd);
+ QDate minDate = QDate::fromJulianDay(minJd);
+ QDate zeroDate = QDate::fromJulianDay(0);
+
+ QDate dt = QDate::fromJulianDay(min);
+ QCOMPARE(dt.isValid(), false);
+ dt = QDate::fromJulianDay(minJd - 1);
+ QCOMPARE(dt.isValid(), false);
+ dt = QDate::fromJulianDay(minJd);
+ QCOMPARE(dt.isValid(), true);
+ dt = QDate::fromJulianDay(minJd + 1);
+ QCOMPARE(dt.isValid(), true);
+ dt = QDate::fromJulianDay(maxJd - 1);
+ QCOMPARE(dt.isValid(), true);
+ dt = QDate::fromJulianDay(maxJd);
+ QCOMPARE(dt.isValid(), true);
+ dt = QDate::fromJulianDay(maxJd + 1);
+ QCOMPARE(dt.isValid(), false);
+ dt = QDate::fromJulianDay(max);
+ QCOMPARE(dt.isValid(), false);
+
+ dt = maxDate.addDays(1);
+ QCOMPARE(dt.isValid(), false);
+ dt = maxDate.addDays(0);
+ QCOMPARE(dt.isValid(), true);
+ dt = maxDate.addDays(-1);
+ QCOMPARE(dt.isValid(), true);
+ dt = maxDate.addDays(max);
+ QCOMPARE(dt.isValid(), false);
+ dt = maxDate.addDays(min);
+ QCOMPARE(dt.isValid(), false);
+
+ dt = minDate.addDays(-1);
+ QCOMPARE(dt.isValid(), false);
+ dt = minDate.addDays(0);
+ QCOMPARE(dt.isValid(), true);
+ dt = minDate.addDays(1);
+ QCOMPARE(dt.isValid(), true);
+ dt = minDate.addDays(min);
+ QCOMPARE(dt.isValid(), false);
+ dt = minDate.addDays(max);
+ QCOMPARE(dt.isValid(), true);
+
+ dt = zeroDate.addDays(-1);
+ QCOMPARE(dt.isValid(), true);
+ dt = zeroDate.addDays(0);
+ QCOMPARE(dt.isValid(), true);
+ dt = zeroDate.addDays(1);
+ QCOMPARE(dt.isValid(), true);
+ dt = zeroDate.addDays(min);
+ QCOMPARE(dt.isValid(), false);
+ dt = zeroDate.addDays(max);
+ QCOMPARE(dt.isValid(), false);
+}
+
void tst_QDate::addDays()
{
QFETCH( int, year );
@@ -286,9 +530,8 @@ void tst_QDate::addDays_data()
QTest::newRow( "data10" ) << 2000 << 2 << 28 << -1 << 2000 << 2 << 27;
QTest::newRow( "data11" ) << 2001 << 2 << 28 << -30 << 2001 << 1 << 29;
- QDate invalid;
- QTest::newRow( "data12" ) << -4713 << 1 << 2 << -2
- << invalid.year() << invalid.month() << invalid.day();
+ QTest::newRow( "data12" ) << -4713 << 1 << 2 << -2 << -4714 << 12 << 31;
+ QTest::newRow( "data13" ) << -4713 << 1 << 2 << 2 << -4713 << 1 << 4;
}
void tst_QDate::addMonths()
@@ -341,14 +584,6 @@ void tst_QDate::addMonths_data()
QTest::newRow( "data15" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1;
QTest::newRow( "data16" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1;
QTest::newRow( "data17" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1;
-
- // Gregorian/Julian switchover
- QTest::newRow( "data18" ) << 1582 << 9 << 4 << 1 << 1582 << 10 << 4;
- QTest::newRow( "data19" ) << 1582 << 9 << 10 << 1 << 1582 << 10 << 15;
- QTest::newRow( "data20" ) << 1582 << 9 << 20 << 1 << 1582 << 10 << 20;
- QTest::newRow( "data21" ) << 1582 << 11 << 4 << -1 << 1582 << 10 << 4;
- QTest::newRow( "data22" ) << 1582 << 11 << 10 << -1 << 1582 << 10 << 4;
- QTest::newRow( "data23" ) << 1582 << 11 << 20 << -1 << 1582 << 10 << 20;
}
void tst_QDate::addYears()
@@ -402,6 +637,35 @@ void tst_QDate::addYears_data()
QTest::newRow( "data19" ) << -2000 << 1 << 1 << 2001 << 2 << 1 << 1;
}
+void tst_QDate::daysTo()
+{
+ qint64 minJd = std::numeric_limits<qint64>::min() / 2;
+ qint64 maxJd = std::numeric_limits<qint64>::max() / 2;
+
+ QDate dt1(2000, 1, 1);
+ QDate dt2(2000, 1, 5);
+ QCOMPARE(dt1.daysTo(dt2), (qint64) 4);
+ QCOMPARE(dt2.daysTo(dt1), (qint64) -4);
+
+ dt1.setDate(0, 0, 0);
+ QCOMPARE(dt1.daysTo(dt2), (qint64) 0);
+ dt1.setDate(2000, 1, 1);
+ dt2.setDate(0, 0, 0);
+ QCOMPARE(dt1.daysTo(dt2), (qint64) 0);
+
+
+ QDate maxDate = QDate::fromJulianDay(maxJd);
+ QDate minDate = QDate::fromJulianDay(minJd);
+ QDate zeroDate = QDate::fromJulianDay(0);
+
+ QCOMPARE(maxDate.daysTo(minDate), minJd - maxJd);
+ QCOMPARE(minDate.daysTo(maxDate), maxJd - minJd);
+ QCOMPARE(maxDate.daysTo(zeroDate), -maxJd);
+ QCOMPARE(zeroDate.daysTo(maxDate), maxJd);
+ QCOMPARE(minDate.daysTo(zeroDate), -minJd);
+ QCOMPARE(zeroDate.daysTo(minDate), minJd);
+}
+
void tst_QDate::operator_eq_eq()
{
QDate d1(2000,1,2);
@@ -636,6 +900,8 @@ void tst_QDate::toString_format()
void tst_QDate::isLeapYear()
{
+ QVERIFY(QDate::isLeapYear(-4801));
+ QVERIFY(!QDate::isLeapYear(-4800));
QVERIFY(QDate::isLeapYear(-4445));
QVERIFY(!QDate::isLeapYear(-4444));
QVERIFY(!QDate::isLeapYear(-6));
@@ -651,10 +917,10 @@ void tst_QDate::isLeapYear()
QVERIFY(QDate::isLeapYear(4));
QVERIFY(!QDate::isLeapYear(7));
QVERIFY(QDate::isLeapYear(8));
- QVERIFY(QDate::isLeapYear(100));
+ QVERIFY(!QDate::isLeapYear(100));
QVERIFY(QDate::isLeapYear(400));
- QVERIFY(QDate::isLeapYear(700));
- QVERIFY(QDate::isLeapYear(1500));
+ QVERIFY(!QDate::isLeapYear(700));
+ QVERIFY(!QDate::isLeapYear(1500));
QVERIFY(QDate::isLeapYear(1600));
QVERIFY(!QDate::isLeapYear(1700));
QVERIFY(!QDate::isLeapYear(1800));
@@ -703,6 +969,7 @@ void tst_QDate::yearsZeroToNinetyNine()
QVERIFY(QDate::isValid(1, 2, 3));
QVERIFY(QDate::isValid(-1, 2, 3));
+#if QT_DEPRECATED_SINCE(5,0)
{
QDate dt;
dt.setYMD(1, 2, 3);
@@ -710,6 +977,7 @@ void tst_QDate::yearsZeroToNinetyNine()
QCOMPARE(dt.month(), 2);
QCOMPARE(dt.day(), 3);
}
+#endif
{
QDate dt;
@@ -777,6 +1045,8 @@ void tst_QDate::roundtripGermanLocale() const
void tst_QDate::shortDayName() const
{
+ QCOMPARE(QDate::shortDayName(0), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::shortDayName(1), QLatin1String("Mon"));
QCOMPARE(QDate::shortDayName(7), QLatin1String("Sun"));
@@ -790,6 +1060,8 @@ void tst_QDate::shortDayName() const
void tst_QDate::standaloneShortDayName() const
{
+ QCOMPARE(QDate::shortDayName(0, QDate::StandaloneFormat), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::shortDayName(1, QDate::StandaloneFormat), QLatin1String("Mon"));
QCOMPARE(QDate::shortDayName(7, QDate::StandaloneFormat), QLatin1String("Sun"));
@@ -803,6 +1075,8 @@ void tst_QDate::standaloneShortDayName() const
void tst_QDate::longDayName() const
{
+ QCOMPARE(QDate::longDayName(0), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::longDayName(1), QLatin1String("Monday"));
QCOMPARE(QDate::longDayName(7), QLatin1String("Sunday"));
@@ -816,6 +1090,8 @@ void tst_QDate::longDayName() const
void tst_QDate::standaloneLongDayName() const
{
+ QCOMPARE(QDate::longDayName(0, QDate::StandaloneFormat), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::longDayName(1, QDate::StandaloneFormat), QLatin1String("Monday"));
QCOMPARE(QDate::longDayName(7, QDate::StandaloneFormat), QLatin1String("Sunday"));
@@ -829,6 +1105,8 @@ void tst_QDate::standaloneLongDayName() const
void tst_QDate::shortMonthName() const
{
+ QCOMPARE(QDate::shortMonthName(0), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::shortMonthName(1), QLatin1String("Jan"));
QCOMPARE(QDate::shortMonthName(8), QLatin1String("Aug"));
@@ -842,6 +1120,8 @@ void tst_QDate::shortMonthName() const
void tst_QDate::standaloneShortMonthName() const
{
+ QCOMPARE(QDate::shortMonthName(0, QDate::StandaloneFormat), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::shortMonthName(1, QDate::StandaloneFormat), QLatin1String("Jan"));
QCOMPARE(QDate::shortMonthName(8, QDate::StandaloneFormat), QLatin1String("Aug"));
@@ -855,6 +1135,8 @@ void tst_QDate::standaloneShortMonthName() const
void tst_QDate::longMonthName() const
{
+ QCOMPARE(QDate::longMonthName(0), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::longMonthName(1), QLatin1String("January"));
QCOMPARE(QDate::longMonthName(8), QLatin1String("August"));
@@ -868,6 +1150,8 @@ void tst_QDate::longMonthName() const
void tst_QDate::standaloneLongMonthName() const
{
+ QCOMPARE(QDate::longMonthName(0, QDate::StandaloneFormat), QString());
+
if (QLocale::system().language() == QLocale::C) {
QCOMPARE(QDate::longMonthName(1, QDate::StandaloneFormat), QLatin1String("January"));
QCOMPARE(QDate::longMonthName(8, QDate::StandaloneFormat), QLatin1String("August"));
@@ -885,28 +1169,44 @@ void tst_QDate::roundtrip() const
// year(), month(), day(), julianDayFromDate(), and getDateFromJulianDay()
// to ensure they are internally consistent (but doesn't guarantee correct)
- // Test Julian round trip in both BC and AD
+ // Test Julian round trip around JD 0 and current low end of valid range
QDate testDate;
- QDate loopDate = QDate::fromJulianDay(1684899); // 1 Jan 100 BC
- while ( loopDate.toJulianDay() <= 1757948 ) { // 31 Dec 100 AD
- testDate.setDate( loopDate.year(), loopDate.month(), loopDate.day() );
- QCOMPARE( loopDate.toJulianDay(), testDate.toJulianDay() );
+ QDate loopDate = QDate::fromJulianDay(-31738); // 1 Jan 4800 BC
+ while (loopDate.toJulianDay() <= 5150) { // 31 Dec 4700 BC
+ testDate.setDate(loopDate.year(), loopDate.month(), loopDate.day());
+ QCOMPARE(loopDate.toJulianDay(), testDate.toJulianDay());
loopDate = loopDate.addDays(1);
}
- // Test Julian and Gregorian round trip during changeover period
- loopDate = QDate::fromJulianDay(2298153); // 1 Jan 1580 AD
- while ( loopDate.toJulianDay() <= 2300334 ) { // 31 Dec 1585 AD
- testDate.setDate( loopDate.year(), loopDate.month(), loopDate.day() );
- QCOMPARE( loopDate.toJulianDay(), testDate.toJulianDay() );
+ // Test Julian round trip in both BC and AD
+ loopDate = QDate::fromJulianDay(1684901); // 1 Jan 100 BC
+ while (loopDate.toJulianDay() <= 1757949) { // 31 Dec 100 AD
+ testDate.setDate(loopDate.year(), loopDate.month(), loopDate.day());
+ QCOMPARE(loopDate.toJulianDay(), testDate.toJulianDay());
loopDate = loopDate.addDays(1);
}
// Test Gregorian round trip during current useful period
loopDate = QDate::fromJulianDay(2378497); // 1 Jan 1900 AD
- while ( loopDate.toJulianDay() <= 2488433 ) { // 31 Dec 2100 AD
- testDate.setDate( loopDate.year(), loopDate.month(), loopDate.day() );
- QCOMPARE( loopDate.toJulianDay(), testDate.toJulianDay() );
+ while (loopDate.toJulianDay() <= 2488433) { // 31 Dec 2100 AD
+ testDate.setDate(loopDate.year(), loopDate.month(), loopDate.day());
+ QCOMPARE(loopDate.toJulianDay(), testDate.toJulianDay());
+ loopDate = loopDate.addDays(1);
+ }
+
+ // Test Gregorian round trip at top end of widget/format range
+ loopDate = QDate::fromJulianDay(5336961); // 1 Jan 9900 AD
+ while (loopDate.toJulianDay() <= 5373484) { // 31 Dec 9999 AD
+ testDate.setDate(loopDate.year(), loopDate.month(), loopDate.day());
+ QCOMPARE(loopDate.toJulianDay(), testDate.toJulianDay());
+ loopDate = loopDate.addDays(1);
+ }
+
+ // Test Gregorian round trip at top end of conversion range
+ loopDate = QDate::fromJulianDay(513024036); // 1 Jan 1399900 AD
+ while (loopDate.toJulianDay() <= 513060925) { // 31 Dec 1400000 AD
+ testDate.setDate(loopDate.year(), loopDate.month(), loopDate.day());
+ QCOMPARE(loopDate.toJulianDay(), testDate.toJulianDay());
loopDate = loopDate.addDays(1);
}
}
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 4ef508e92b..af8deefa4c 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -726,14 +726,6 @@ void tst_QDateTime::addSecs_data()
QTest::newRow("toPositive") << QDateTime(QDate(-1, 12, 31), QTime(23, 59, 59), Qt::UTC)
<< 1
<< QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), Qt::UTC);
-
- // Gregorian/Julian switchover
- QTest::newRow("toGregorian") << QDateTime(QDate(1582, 10, 4), QTime(23, 59, 59))
- << 1
- << QDateTime(QDate(1582, 10, 15), QTime(0, 0, 0));
- QTest::newRow("toJulian") << QDateTime(QDate(1582, 10, 15), QTime(0, 0, 0))
- << -1
- << QDateTime(QDate(1582, 10, 4), QTime(23, 59, 59));
}
void tst_QDateTime::addSecs()
@@ -883,22 +875,22 @@ void tst_QDateTime::daysTo()
QDateTime dt2(QDate(1760, 2, 2), QTime());
QDateTime dt3(QDate(1760, 3, 2), QTime());
- QCOMPARE(dt1.daysTo(dt2), 31);
+ QCOMPARE(dt1.daysTo(dt2), (qint64) 31);
QCOMPARE(dt1.addDays(31), dt2);
- QCOMPARE(dt2.daysTo(dt3), 29);
+ QCOMPARE(dt2.daysTo(dt3), (qint64) 29);
QCOMPARE(dt2.addDays(29), dt3);
- QCOMPARE(dt1.daysTo(dt3), 60);
+ QCOMPARE(dt1.daysTo(dt3), (qint64) 60);
QCOMPARE(dt1.addDays(60), dt3);
- QCOMPARE(dt2.daysTo(dt1), -31);
+ QCOMPARE(dt2.daysTo(dt1), (qint64) -31);
QCOMPARE(dt2.addDays(-31), dt1);
- QCOMPARE(dt3.daysTo(dt2), -29);
+ QCOMPARE(dt3.daysTo(dt2), (qint64) -29);
QCOMPARE(dt3.addDays(-29), dt2);
- QCOMPARE(dt3.daysTo(dt1), -60);
+ QCOMPARE(dt3.daysTo(dt1), (qint64) -60);
QCOMPARE(dt3.addDays(-60), dt1);
}
diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
index a4a96c6df7..0a006ab5b4 100644
--- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
index 0e2f61ab98..7f28e8dc0c 100644
--- a/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
+++ b/tests/auto/corelib/tools/qelapsedtimer/tst_qelapsedtimer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
index a031bf811d..e0e74efdd0 100644
--- a/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
+++ b/tests/auto/corelib/tools/qexplicitlyshareddatapointer/tst_qexplicitlyshareddatapointer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
index a713fd4ca7..86696ab0c9 100644
--- a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
+++ b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 6c941179d6..3b5d15dbfc 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp
index 0c4df63884..28ed8d3e22 100644
--- a/tests/auto/corelib/tools/qline/tst_qline.cpp
+++ b/tests/auto/corelib/tools/qline/tst_qline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
index c1b71de2b7..fbb821c730 100644
--- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp
+++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
index 2b6280fd2b..508833b5d0 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
+++ b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index a670cac03c..5544c0fd71 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -123,9 +123,6 @@ private slots:
void monthName();
void standaloneMonthName();
- // QSystemLocale tests
- void queryDateTime();
-
void ampm();
void currency();
void quoteString();
@@ -1778,43 +1775,6 @@ a(QLatin1String("0.0000000000000000000000000000000000000000000000000000000000000
QVERIFY(!ok);
}
-class SystemLocale : public QSystemLocale
-{
-public:
- virtual QVariant query(QueryType type, QVariant in) const
- {
- switch (type) {
- case DateTimeFormatLong: return QLatin1String("dddd ddd dd d MMMM MMM MM M yyyy hh:mm:ss.zzz");
- case DateTimeFormatShort: return QLatin1String("d M yy h:m");
- case DateTimeToStringLong:
- case DateTimeToStringShort:
- return in.toDateTime().toString(type == DateTimeToStringShort
- ? QLatin1String("dMyyhm")
- : QLatin1String("ddMMyyyyhhmmsszzz"));
- default:
- break;
- }
- return QSystemLocale::query(type, in);
- }
-};
-
-
-
-void tst_QLocale::queryDateTime()
-{
- SystemLocale loc;
- QCOMPARE(QLocale::system().dateTimeFormat(QLocale::LongFormat),
- loc.query(QSystemLocale::DateTimeFormatLong, QVariant()).toString());
- QCOMPARE(QLocale::system().dateTimeFormat(QLocale::ShortFormat),
- loc.query(QSystemLocale::DateTimeFormatShort, QVariant()).toString());
- QCOMPARE(QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::ShortFormat),
- QString("1127412"));
- QCOMPARE(QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::NarrowFormat),
- QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::ShortFormat));
- QCOMPARE(QLocale::system().toString(QDateTime(QDate(1974, 12, 1), QTime(1, 2, 3, 4)), QLocale::LongFormat),
- QString("01121974010203004"));
-}
-
void tst_QLocale::ampm()
{
QLocale c(QLocale::C);
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index c48bcfb4b3..79b0a931cb 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
index bdaf98cbf2..de3c0269e1 100644
--- a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
+++ b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
index acdfd20488..aaeb6bd9f5 100644
--- a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
+++ b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
index 5282d2964b..eb800e57bc 100644
--- a/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
+++ b/tests/auto/corelib/tools/qqueue/tst_qqueue.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
index c2a9d05af6..f9d0f0f291 100644
--- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp
+++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index 836c02dfca..0148e933e4 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -829,6 +829,8 @@ void tst_QRegExp::testEscapingWildcard_data(){
QTest::newRow("? Escaped") << "\\?O;" << "?O;" << true;
QTest::newRow("[] not escaped") << "[lL]" << "l" << true;
+ QTest::newRow("[] escaped") << "\\[\\]" << "[]" << true;
+
QTest::newRow("case [[]") << "[[abc]" << "[" << true;
QTest::newRow("case []abc] match ]") << "[]abc]" << "]" << true;
QTest::newRow("case []abc] match a") << "[]abc]" << "a" << true;
@@ -844,7 +846,7 @@ void tst_QRegExp::testEscapingWildcard_data(){
QTest::newRow("a true '\\' in input") << "\\Qt;" << "\\Qt;" << true;
QTest::newRow("two true '\\' in input") << "\\\\Qt;" << "\\\\Qt;" << true;
- QTest::newRow("a '\\' at the end") << "\\\\Qt;" << "\\\\Qt;" << true;
+ QTest::newRow("a '\\' at the end") << "\\\\Qt;\\" << "\\\\Qt;\\" << true;
}
void tst_QRegExp::testEscapingWildcard(){
@@ -1309,7 +1311,7 @@ void tst_QRegExp::posAndCapConsistency()
QFETCH( QString, cap2 );
QRegExp re(reStr);
- QCOMPARE(re.numCaptures(), 2);
+ QCOMPARE(re.captureCount(), 2);
QCOMPARE(re.capturedTexts().size(), 3);
QCOMPARE(re.indexIn(text), matchIndex);
diff --git a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
index 67de98b867..d94d35afaf 100644
--- a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
+++ b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
index 22f6cb7d32..45ccaa671d 100644
--- a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
+++ b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp b/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
index c0e036e232..b070b105da 100644
--- a/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
+++ b/tests/auto/corelib/tools/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index 4c0ecce5ec..d7d8c99071 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index c7ffe8cb7b..fb946d9ca1 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,6 +52,7 @@
#include <QtCore/QDirIterator>
#include <QtCore/QDateTime>
#include <QtCore/QDebug>
+#include <QtCore/QLibraryInfo>
#ifndef DEFAULT_MAKESPEC
# error DEFAULT_MAKESPEC not defined
@@ -464,7 +465,11 @@ namespace QTest {
"SOURCES += project.cpp\n"
"QT -= core gui\n"
"INCLUDEPATH += . ");
- projectFile.write(QFile::encodeName(QDir::currentPath()));
+
+ QString workingDir = QDir::currentPath();
+ if (extraProgramSources.count() > 0)
+ workingDir = QFileInfo(extraProgramSources.first()).absolutePath();
+ projectFile.write(QFile::encodeName(workingDir));
#ifndef QT_NO_DEBUG
projectFile.write("\nCONFIG += debug\n");
@@ -565,7 +570,17 @@ namespace QTest {
<< makespec()
<< QLatin1String("project.pro");
qmake.setWorkingDirectory(temporaryDirPath);
- qmake.start(QLatin1String("qmake"), args);
+
+ QString cmd = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake";
+#ifdef Q_OS_WIN
+ cmd.append(".exe");
+#endif
+ if (!QFile::exists(cmd)) {
+ cmd = "qmake";
+ qWarning("qmake from build not found, fallback to PATH's qmake");
+ }
+
+ qmake.start(cmd, args);
std_out += "### --- stdout from qmake --- ###\n";
std_err += "### --- stderr from qmake --- ###\n";
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.h b/tests/auto/corelib/tools/qsharedpointer/externaltests.h
index 6903433b70..96edbd8a2b 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.h
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp b/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp
index b5d59de037..6fb01c6aa2 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclaration.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
index 17812216c0..b10b7e53ba 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
index cebbe94ef1..23f6dbf24c 100644
--- a/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
+++ b/tests/auto/corelib/tools/qsharedpointer/forwarddeclared.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index 35b63deb4c..2bae52a622 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp b/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
index 889493ddb4..9123853696 100644
--- a/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/wrapper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsharedpointer/wrapper.h b/tests/auto/corelib/tools/qsharedpointer/wrapper.h
index 66202a5a31..98b9a804c4 100644
--- a/tests/auto/corelib/tools/qsharedpointer/wrapper.h
+++ b/tests/auto/corelib/tools/qsharedpointer/wrapper.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsize/tst_qsize.cpp b/tests/auto/corelib/tools/qsize/tst_qsize.cpp
index bc40e2aa64..be8a374a49 100644
--- a/tests/auto/corelib/tools/qsize/tst_qsize.cpp
+++ b/tests/auto/corelib/tools/qsize/tst_qsize.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
index c74f4c3754..a098abe5b0 100644
--- a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
+++ b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstl/tst_qstl.cpp b/tests/auto/corelib/tools/qstl/tst_qstl.cpp
index f9e3549a4d..6fff2b7d6b 100644
--- a/tests/auto/corelib/tools/qstl/tst_qstl.cpp
+++ b/tests/auto/corelib/tools/qstl/tst_qstl.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstring/double_data.h b/tests/auto/corelib/tools/qstring/double_data.h
index 8ffb981675..dc392723d3 100644
--- a/tests/auto/corelib/tools/qstring/double_data.h
+++ b/tests/auto/corelib/tools/qstring/double_data.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 622d494a06..37d80afd34 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -220,6 +220,11 @@ private slots:
void reserve();
void toHtmlEscaped_data();
void toHtmlEscaped();
+
+ void operatorGreaterWithQLatin1String();
+ void compareQLatin1Strings();
+ void fromQLatin1StringWithLength();
+ void assignQLatin1String();
};
typedef QList<int> IntList;
@@ -1417,6 +1422,10 @@ void tst_QString::mid()
QCOMPARE(a.mid(3,3),(QString)"DEF");
QCOMPARE(a.mid(0,0),(QString)"");
+ QVERIFY(!a.mid(15,0).isNull());
+ QVERIFY(a.mid(15,0).isEmpty());
+ QVERIFY(!a.mid(15,1).isNull());
+ QVERIFY(a.mid(15,1).isEmpty());
QVERIFY(a.mid(9999).isNull());
QVERIFY(a.mid(9999,1).isNull());
@@ -1439,6 +1448,10 @@ void tst_QString::midRef()
QCOMPARE(a.midRef(3,3).toString(),(QString)"DEF");
QCOMPARE(a.midRef(0,0).toString(),(QString)"");
+ QVERIFY(!a.midRef(15,0).toString().isNull());
+ QVERIFY(a.midRef(15,0).toString().isEmpty());
+ QVERIFY(!a.midRef(15,1).toString().isNull());
+ QVERIFY(a.midRef(15,1).toString().isEmpty());
QVERIFY(a.midRef(9999).toString().isEmpty());
QVERIFY(a.midRef(9999,1).toString().isEmpty());
@@ -3976,107 +3989,83 @@ void tst_QString::operator_smaller()
void tst_QString::integer_conversion_data()
{
- QTest::addColumn<QString>("locale_name");
QTest::addColumn<QString>("num_str");
QTest::addColumn<int>("base");
QTest::addColumn<bool>("good");
QTest::addColumn<qlonglong>("num");
- QTest::newRow("C empty 0") << QString("C") << QString("") << 0 << false << (qlonglong)0;
- QTest::newRow("C empty 8") << QString("C") << QString("") << 8 << false << (qlonglong)0;
- QTest::newRow("C empty 10") << QString("C") << QString("") << 10 << false << (qlonglong)0;
- QTest::newRow("C empty 16") << QString("C") << QString("") << 16 << false << (qlonglong)0;
-
- QTest::newRow("C null 0") << QString("C") << QString() << 0 << false << (qlonglong)0;
- QTest::newRow("C null 8") << QString("C") << QString() << 8 << false << (qlonglong)0;
- QTest::newRow("C null 10") << QString("C") << QString() << 10 << false << (qlonglong)0;
- QTest::newRow("C null 16") << QString("C") << QString() << 16 << false << (qlonglong)0;
-
- QTest::newRow("C -0xf 0") << QString("C") << QString(" -0xf") << 0 << true << (qlonglong)-15;
- QTest::newRow("C -0xf 0") << QString("C") << QString("-0xf ") << 0 << true << (qlonglong)-15;
- QTest::newRow("C \t0xf\t 0") << QString("C") << QString("\t0xf\t") << 0 << true << (qlonglong)15;
- QTest::newRow("C -010 0") << QString("C") << QString(" -010") << 0 << true << (qlonglong)-8;
- QTest::newRow("C 010 0") << QString("C") << QString("010 ") << 0 << true << (qlonglong)8;
- QTest::newRow("C \t-010\t 0") << QString("C") << QString("\t-010\t") << 0 << true << (qlonglong)-8;
- QTest::newRow("C 123 10") << QString("C") << QString(" 123") << 10 << true << (qlonglong)123;
- QTest::newRow("C 123 10") << QString("C") << QString("123 ") << 10 << true << (qlonglong)123;
- QTest::newRow("C \t123\t 10") << QString("C") << QString("\t123\t") << 10 << true << (qlonglong)123;
- QTest::newRow("C -0xf 16") << QString("C") << QString(" -0xf") << 16 << true << (qlonglong)-15;
- QTest::newRow("C -0xf 16") << QString("C") << QString("-0xf ") << 16 << true << (qlonglong)-15;
- QTest::newRow("C \t0xf\t 16") << QString("C") << QString("\t0xf\t") << 16 << true << (qlonglong)15;
-
- QTest::newRow("C -0 0") << QString("C") << QString("-0") << 0 << true << (qlonglong)0;
- QTest::newRow("C -0 8") << QString("C") << QString("-0") << 8 << true << (qlonglong)0;
- QTest::newRow("C -0 10") << QString("C") << QString("-0") << 10 << true << (qlonglong)0;
- QTest::newRow("C -0 16") << QString("C") << QString("-0") << 16 << true << (qlonglong)0;
-
- QTest::newRow("C 1.234 10") << QString("C") << QString("1.234") << 10 << false << (qlonglong)0;
- QTest::newRow("C 1,234 10") << QString("C") << QString("1,234") << 10 << false << (qlonglong)0;
- QTest::newRow("de_DE 1.234 10") << QString("de_DE") << QString("1.234") << 10 << false << (qlonglong)0;
- QTest::newRow("de_DE 1,234 10") << QString("de_DE") << QString("1,234") << 10 << false << (qlonglong)0;
-
- QTest::newRow("C 0x 0") << QString("C") << QString("0x") << 0 << false << (qlonglong)0;
- QTest::newRow("C 0x 16") << QString("C") << QString("0x") << 16 << false << (qlonglong)0;
-
- QTest::newRow("C 10 0") << QString("C") << QString("10") << 0 << true << (qlonglong)10;
- QTest::newRow("C 010 0") << QString("C") << QString("010") << 0 << true << (qlonglong)8;
- QTest::newRow("C 0x10 0") << QString("C") << QString("0x10") << 0 << true << (qlonglong)16;
- QTest::newRow("C 10 8") << QString("C") << QString("10") << 8 << true << (qlonglong)8;
- QTest::newRow("C 010 8") << QString("C") << QString("010") << 8 << true << (qlonglong)8;
- QTest::newRow("C 0x10 8") << QString("C") << QString("0x10") << 8 << false << (qlonglong)0;
- QTest::newRow("C 10 10") << QString("C") << QString("10") << 10 << true << (qlonglong)10;
- QTest::newRow("C 010 10") << QString("C") << QString("010") << 10 << true << (qlonglong)10;
- QTest::newRow("C 0x10 10") << QString("C") << QString("0x10") << 10 << false << (qlonglong)0;
- QTest::newRow("C 10 16") << QString("C") << QString("10") << 16 << true << (qlonglong)16;
- QTest::newRow("C 010 16") << QString("C") << QString("010") << 16 << true << (qlonglong)16;
- QTest::newRow("C 0x10 16") << QString("C") << QString("0x10") << 16 << true << (qlonglong)16;
-
- QTest::newRow("de_DE 10 0") << QString("de_DE") << QString("10") << 0 << true << (qlonglong)10;
- QTest::newRow("de_DE 010 0") << QString("de_DE") << QString("010") << 0 << true << (qlonglong)8;
- QTest::newRow("de_DE 0x10 0") << QString("de_DE") << QString("0x10") << 0 << true << (qlonglong)16;
- QTest::newRow("de_DE 10 8") << QString("de_DE") << QString("10") << 8 << true << (qlonglong)8;
- QTest::newRow("de_DE 010 8") << QString("de_DE") << QString("010") << 8 << true << (qlonglong)8;
- QTest::newRow("de_DE 0x10 8") << QString("de_DE") << QString("0x10") << 8 << false << (qlonglong)0;
- QTest::newRow("de_DE 10 10") << QString("de_DE") << QString("10") << 10 << true << (qlonglong)10;
- QTest::newRow("de_DE 010 10") << QString("de_DE") << QString("010") << 10 << true << (qlonglong)10;
- QTest::newRow("de_DE 0x10 10") << QString("de_DE") << QString("0x10") << 10 << false << (qlonglong)0;
- QTest::newRow("de_DE 10 16") << QString("de_DE") << QString("10") << 16 << true << (qlonglong)16;
- QTest::newRow("de_DE 010 16") << QString("de_DE") << QString("010") << 16 << true << (qlonglong)16;
- QTest::newRow("de_DE 0x10 16") << QString("de_DE") << QString("0x10") << 16 << true << (qlonglong)16;
-
- QTest::newRow("C -10 0") << QString("C") << QString("-10") << 0 << true << (qlonglong)-10;
- QTest::newRow("C -010 0") << QString("C") << QString("-010") << 0 << true << (qlonglong)-8;
- QTest::newRow("C -0x10 0") << QString("C") << QString("-0x10") << 0 << true << (qlonglong)-16;
- QTest::newRow("C -10 8") << QString("C") << QString("-10") << 8 << true << (qlonglong)-8;
- QTest::newRow("C -010 8") << QString("C") << QString("-010") << 8 << true << (qlonglong)-8;
- QTest::newRow("C -0x10 8") << QString("C") << QString("-0x10") << 8 << false << (qlonglong)0;
- QTest::newRow("C -10 10") << QString("C") << QString("-10") << 10 << true << (qlonglong)-10;
- QTest::newRow("C -010 10") << QString("C") << QString("-010") << 10 << true << (qlonglong)-10;
- QTest::newRow("C -0x10 10") << QString("C") << QString("-0x10") << 10 << false << (qlonglong)0;
- QTest::newRow("C -10 16") << QString("C") << QString("-10") << 16 << true << (qlonglong)-16;
- QTest::newRow("C -010 16") << QString("C") << QString("-010") << 16 << true << (qlonglong)-16;
- QTest::newRow("C -0x10 16") << QString("C") << QString("-0x10") << 16 << true << (qlonglong)-16;
+ QTest::newRow("C empty 0") << QString("") << 0 << false << (qlonglong)0;
+ QTest::newRow("C empty 8") << QString("") << 8 << false << (qlonglong)0;
+ QTest::newRow("C empty 10") << QString("") << 10 << false << (qlonglong)0;
+ QTest::newRow("C empty 16") << QString("") << 16 << false << (qlonglong)0;
+
+ QTest::newRow("C null 0") << QString() << 0 << false << (qlonglong)0;
+ QTest::newRow("C null 8") << QString() << 8 << false << (qlonglong)0;
+ QTest::newRow("C null 10") << QString() << 10 << false << (qlonglong)0;
+ QTest::newRow("C null 16") << QString() << 16 << false << (qlonglong)0;
+
+ QTest::newRow("C -0xf 0") << QString(" -0xf") << 0 << true << (qlonglong)-15;
+ QTest::newRow("C -0xf 0") << QString("-0xf ") << 0 << true << (qlonglong)-15;
+ QTest::newRow("C \t0xf\t 0") << QString("\t0xf\t") << 0 << true << (qlonglong)15;
+ QTest::newRow("C -010 0") << QString(" -010") << 0 << true << (qlonglong)-8;
+ QTest::newRow("C 010 0") << QString("010 ") << 0 << true << (qlonglong)8;
+ QTest::newRow("C \t-010\t 0") << QString("\t-010\t") << 0 << true << (qlonglong)-8;
+ QTest::newRow("C 123 10") << QString(" 123") << 10 << true << (qlonglong)123;
+ QTest::newRow("C 123 10") << QString("123 ") << 10 << true << (qlonglong)123;
+ QTest::newRow("C \t123\t 10") << QString("\t123\t") << 10 << true << (qlonglong)123;
+ QTest::newRow("C -0xf 16") << QString(" -0xf") << 16 << true << (qlonglong)-15;
+ QTest::newRow("C -0xf 16") << QString("-0xf ") << 16 << true << (qlonglong)-15;
+ QTest::newRow("C \t0xf\t 16") << QString("\t0xf\t") << 16 << true << (qlonglong)15;
+
+ QTest::newRow("C -0 0") << QString("-0") << 0 << true << (qlonglong)0;
+ QTest::newRow("C -0 8") << QString("-0") << 8 << true << (qlonglong)0;
+ QTest::newRow("C -0 10") << QString("-0") << 10 << true << (qlonglong)0;
+ QTest::newRow("C -0 16") << QString("-0") << 16 << true << (qlonglong)0;
+
+ QTest::newRow("C 1.234 10") << QString("1.234") << 10 << false << (qlonglong)0;
+ QTest::newRow("C 1,234 10") << QString("1,234") << 10 << false << (qlonglong)0;
+
+ QTest::newRow("C 0x 0") << QString("0x") << 0 << false << (qlonglong)0;
+ QTest::newRow("C 0x 16") << QString("0x") << 16 << false << (qlonglong)0;
+
+ QTest::newRow("C 10 0") << QString("10") << 0 << true << (qlonglong)10;
+ QTest::newRow("C 010 0") << QString("010") << 0 << true << (qlonglong)8;
+ QTest::newRow("C 0x10 0") << QString("0x10") << 0 << true << (qlonglong)16;
+ QTest::newRow("C 10 8") << QString("10") << 8 << true << (qlonglong)8;
+ QTest::newRow("C 010 8") << QString("010") << 8 << true << (qlonglong)8;
+ QTest::newRow("C 0x10 8") << QString("0x10") << 8 << false << (qlonglong)0;
+ QTest::newRow("C 10 10") << QString("10") << 10 << true << (qlonglong)10;
+ QTest::newRow("C 010 10") << QString("010") << 10 << true << (qlonglong)10;
+ QTest::newRow("C 0x10 10") << QString("0x10") << 10 << false << (qlonglong)0;
+ QTest::newRow("C 10 16") << QString("10") << 16 << true << (qlonglong)16;
+ QTest::newRow("C 010 16") << QString("010") << 16 << true << (qlonglong)16;
+ QTest::newRow("C 0x10 16") << QString("0x10") << 16 << true << (qlonglong)16;
+
+ QTest::newRow("C -10 0") << QString("-10") << 0 << true << (qlonglong)-10;
+ QTest::newRow("C -010 0") << QString("-010") << 0 << true << (qlonglong)-8;
+ QTest::newRow("C -0x10 0") << QString("-0x10") << 0 << true << (qlonglong)-16;
+ QTest::newRow("C -10 8") << QString("-10") << 8 << true << (qlonglong)-8;
+ QTest::newRow("C -010 8") << QString("-010") << 8 << true << (qlonglong)-8;
+ QTest::newRow("C -0x10 8") << QString("-0x10") << 8 << false << (qlonglong)0;
+ QTest::newRow("C -10 10") << QString("-10") << 10 << true << (qlonglong)-10;
+ QTest::newRow("C -010 10") << QString("-010") << 10 << true << (qlonglong)-10;
+ QTest::newRow("C -0x10 10") << QString("-0x10") << 10 << false << (qlonglong)0;
+ QTest::newRow("C -10 16") << QString("-10") << 16 << true << (qlonglong)-16;
+ QTest::newRow("C -010 16") << QString("-010") << 16 << true << (qlonglong)-16;
+ QTest::newRow("C -0x10 16") << QString("-0x10") << 16 << true << (qlonglong)-16;
// Let's try some Arabic
const quint16 arabic_str[] = { 0x0661, 0x0662, 0x0663, 0x0664, 0x0000 }; // "1234"
- QTest::newRow("ar_SA 1234 0") << QString("ar_SA") << QString::fromUtf16(arabic_str) << 0 << true << (qlonglong)1234;
- QTest::newRow("ar_SA 1234 8") << QString("ar_SA") << QString::fromUtf16(arabic_str) << 8 << true << (qlonglong)668;
- QTest::newRow("ar_SA 1234 10") << QString("ar_SA") << QString::fromUtf16(arabic_str) << 10 << true << (qlonglong)1234;
- QTest::newRow("ar_SA 1234 16") << QString("ar_SA") << QString::fromUtf16(arabic_str) << 16 << true << (qlonglong)4660;
+ QTest::newRow("ar_SA 1234 0") << QString::fromUtf16(arabic_str) << 0 << false << (qlonglong)0;
}
void tst_QString::integer_conversion()
{
- QFETCH(QString, locale_name);
QFETCH(QString, num_str);
QFETCH(int, base);
QFETCH(bool, good);
QFETCH(qlonglong, num);
-
- QLocale::setDefault(locale_name);
- QCOMPARE(QLocale().name(), locale_name);
-
bool ok;
qlonglong d = num_str.toLongLong(&ok, base);
QCOMPARE(ok, good);
@@ -4084,100 +4073,65 @@ void tst_QString::integer_conversion()
if (ok) {
QCOMPARE(d, num);
}
-
- QLocale::setDefault(QLocale::C);
}
void tst_QString::double_conversion_data()
{
- QTest::addColumn<QString>("locale_name");
QTest::addColumn<QString>("num_str");
QTest::addColumn<bool>("good");
QTest::addColumn<double>("num");
// The good...
- QTest::newRow("C 1") << QString("C") << QString("1") << true << 1.0;
- QTest::newRow("C 1.0") << QString("C") << QString("1.0") << true << 1.0;
- QTest::newRow("C 1.234") << QString("C") << QString("1.234") << true << 1.234;
- QTest::newRow("C 1.234e-10") << QString("C") << QString("1.234e-10") << true << 1.234e-10;
- QTest::newRow("C 1.234E10") << QString("C") << QString("1.234E10") << true << 1.234e10;
- QTest::newRow("C 1e10") << QString("C") << QString("1e10") << true << 1.0e10;
+ QTest::newRow("C 1") << QString("1") << true << 1.0;
+ QTest::newRow("C 1.0") << QString("1.0") << true << 1.0;
+ QTest::newRow("C 1.234") << QString("1.234") << true << 1.234;
+ QTest::newRow("C 1.234e-10") << QString("1.234e-10") << true << 1.234e-10;
+ QTest::newRow("C 1.234E10") << QString("1.234E10") << true << 1.234e10;
+ QTest::newRow("C 1e10") << QString("1e10") << true << 1.0e10;
// The bad...
- QTest::newRow("C empty") << QString("C") << QString("") << false << 0.0;
- QTest::newRow("C null") << QString("C") << QString() << false << 0.0;
- QTest::newRow("C .") << QString("C") << QString(".") << false << 0.0;
- QTest::newRow("C 1e") << QString("C") << QString("1e") << false << 0.0;
- QTest::newRow("C 1,") << QString("C") << QString("1,") << false << 0.0;
- QTest::newRow("C 1,0") << QString("C") << QString("1,0") << false << 0.0;
- QTest::newRow("C 1,000") << QString("C") << QString("1,000") << false << 0.0;
- QTest::newRow("C 1e1.0") << QString("C") << QString("1e1.0") << false << 0.0;
- QTest::newRow("C 1e+") << QString("C") << QString("1e+") << false << 0.0;
- QTest::newRow("C 1e-") << QString("C") << QString("1e-") << false << 0.0;
+ QTest::newRow("C empty") << QString("") << false << 0.0;
+ QTest::newRow("C null") << QString() << false << 0.0;
+ QTest::newRow("C .") << QString(".") << false << 0.0;
+ QTest::newRow("C 1e") << QString("1e") << false << 0.0;
+ QTest::newRow("C 1,") << QString("1,") << false << 0.0;
+ QTest::newRow("C 1,0") << QString("1,0") << false << 0.0;
+ QTest::newRow("C 1,000") << QString("1,000") << false << 0.0;
+ QTest::newRow("C 1e1.0") << QString("1e1.0") << false << 0.0;
+ QTest::newRow("C 1e+") << QString("1e+") << false << 0.0;
+ QTest::newRow("C 1e-") << QString("1e-") << false << 0.0;
+ QTest::newRow("de_DE 1,0") << QString("1,0") << false << 0.0;
+ QTest::newRow("de_DE 1,234") << QString("1,234") << false << 0.0;
+ QTest::newRow("de_DE 1,234e-10") << QString("1,234e-10") << false << 0.0;
+ QTest::newRow("de_DE 1,234E10") << QString("1,234E10") << false << 0.0;
// And the ugly...
- QTest::newRow("C .1") << QString("C") << QString(".1") << true << 0.1;
- QTest::newRow("C -.1") << QString("C") << QString("-.1") << true << -0.1;
- QTest::newRow("C 1.") << QString("C") << QString("1.") << true << 1.0;
- QTest::newRow("C 1.E10") << QString("C") << QString("1.E10") << true << 1.0e10;
- QTest::newRow("C 1e+10") << QString("C") << QString("1e+10") << true << 1.0e+10;
-
- QTest::newRow("de_DE 1") << QString("de_DE") << QString("1") << true << 1.0;
- QTest::newRow("de_DE 1.0") << QString("de_DE") << QString("1.0") << true << 1.0;
- QTest::newRow("de_DE 1.234") << QString("de_DE") << QString("1.234") << true << 1.234;
- QTest::newRow("de_DE 1.234e-10") << QString("de_DE") << QString("1.234e-10") << true << 1.234e-10;
- QTest::newRow("de_DE 1.234E10") << QString("de_DE") << QString("1.234E10") << true << 1.234e10;
- QTest::newRow("de_DE 1e10") << QString("de_DE") << QString("1e10") << true << 1.0e10;
- QTest::newRow("de_DE .1") << QString("de_DE") << QString(".1") << true << 0.1;
- QTest::newRow("de_DE -.1") << QString("de_DE") << QString("-.1") << true << -0.1;
- QTest::newRow("de_DE 1.") << QString("de_DE") << QString("1.") << true << 1.0;
- QTest::newRow("de_DE 1.E10") << QString("de_DE") << QString("1.E10") << true << 1.0e10;
- QTest::newRow("de_DE 1e+10") << QString("de_DE") << QString("1e+10") << true << 1.0e+10;
-
- QTest::newRow("de_DE 1,0") << QString("de_DE") << QString("1,0") << true << 1.0;
- QTest::newRow("de_DE 1,234") << QString("de_DE") << QString("1,234") << true << 1.234;
- QTest::newRow("de_DE 1,234e-10") << QString("de_DE") << QString("1,234e-10") << true << 1.234e-10;
- QTest::newRow("de_DE 1,234E10") << QString("de_DE") << QString("1,234E10") << true << 1.234e10;
- QTest::newRow("de_DE ,1") << QString("de_DE") << QString(",1") << true << 0.1;
- QTest::newRow("de_DE -,1") << QString("de_DE") << QString("-,1") << true << -0.1;
- QTest::newRow("de_DE 1,") << QString("de_DE") << QString("1,") << true << 1.0;
- QTest::newRow("de_DE 1,E10") << QString("de_DE") << QString("1,E10") << true << 1.0e10;
-
- QTest::newRow("de_DE empty") << QString("de_DE") << QString("") << false << 0.0;
- QTest::newRow("de_DE null") << QString("de_DE") << QString() << false << 0.0;
- QTest::newRow("de_DE .") << QString("de_DE") << QString(".") << false << 0.0;
- QTest::newRow("de_DE 1e") << QString("de_DE") << QString("1e") << false << 0.0;
- QTest::newRow("de_DE 1e1.0") << QString("de_DE") << QString("1e1.0") << false << 0.0;
- QTest::newRow("de_DE 1e+") << QString("de_DE") << QString("1e+") << false << 0.0;
- QTest::newRow("de_DE 1e-") << QString("de_DE") << QString("1e-") << false << 0.0;
-
- QTest::newRow("C 1") << QString("C") << QString(" 1") << true << 1.0;
- QTest::newRow("C 1 ") << QString("C") << QString("1 ") << true << 1.0;
- QTest::newRow("de_DE 1") << QString("de_DE") << QString(" 1") << true << 1.0;
- QTest::newRow("de_DE 1 ") << QString("de_DE") << QString("1 ") << true << 1.0;
+ QTest::newRow("C .1") << QString(".1") << true << 0.1;
+ QTest::newRow("C -.1") << QString("-.1") << true << -0.1;
+ QTest::newRow("C 1.") << QString("1.") << true << 1.0;
+ QTest::newRow("C 1.E10") << QString("1.E10") << true << 1.0e10;
+ QTest::newRow("C 1e+10") << QString("1e+10") << true << 1.0e+10;
+ QTest::newRow("C 1") << QString(" 1") << true << 1.0;
+ QTest::newRow("C 1 ") << QString("1 ") << true << 1.0;
// Let's try some Arabic
const quint16 arabic_str[] = { 0x0660, 0x066B, 0x0661, 0x0662,
0x0663, 0x0664, 0x0065, 0x0662,
0x0000 }; // "0.1234e2"
- QTest::newRow("ar_SA") << QString("ar_SA") << QString::fromUtf16(arabic_str) << true << 0.1234e2;
+ QTest::newRow("ar_SA") << QString::fromUtf16(arabic_str) << false << 0.0;
}
void tst_QString::double_conversion()
{
#define MY_DOUBLE_EPSILON (2.22045e-16)
- QFETCH(QString, locale_name);
QFETCH(QString, num_str);
QFETCH(bool, good);
QFETCH(double, num);
- QLocale::setDefault(locale_name);
- QCOMPARE(QLocale().name(), locale_name);
-
bool ok;
double d = num_str.toDouble(&ok);
QCOMPARE(ok, good);
@@ -4188,8 +4142,6 @@ void tst_QString::double_conversion()
diff = -diff;
QVERIFY(diff <= MY_DOUBLE_EPSILON);
}
-
- QLocale::setDefault(QLocale::C);
}
#ifndef Q_MOC_RUN
@@ -4788,6 +4740,13 @@ void tst_QString::compare()
QCOMPARE(sign(QString::compare(s1, QLatin1String(s2.toLatin1()), Qt::CaseInsensitive)), cir);
QCOMPARE(sign(QStringRef::compare(r1, QLatin1String(s2.toLatin1()))), csr);
QCOMPARE(sign(QStringRef::compare(r1, QLatin1String(s2.toLatin1()), Qt::CaseInsensitive)), cir);
+ QByteArray l1 = s2.toLatin1();
+ l1 += "x";
+ QLatin1String l1str(l1.constData(), l1.size() - 1);
+ QCOMPARE(sign(QString::compare(s1, l1str)), csr);
+ QCOMPARE(sign(QString::compare(s1, l1str, Qt::CaseInsensitive)), cir);
+ QCOMPARE(sign(QStringRef::compare(r1, l1str)), csr);
+ QCOMPARE(sign(QStringRef::compare(r1, l1str, Qt::CaseInsensitive)), cir);
}
if (isLatin(s1)) {
@@ -5167,6 +5126,128 @@ void tst_QString::toHtmlEscaped()
QCOMPARE(original.toHtmlEscaped(), expected);
}
+void tst_QString::operatorGreaterWithQLatin1String()
+{
+ QLatin1String latin1foo("fooZZ", 3);
+ QString stringfoo = QString::fromLatin1("foo");
+ QVERIFY(stringfoo >= latin1foo);
+ QVERIFY(!(stringfoo > latin1foo));
+ QVERIFY(stringfoo <= latin1foo);
+ QVERIFY(!(stringfoo < latin1foo));
+}
+
+void tst_QString::compareQLatin1Strings()
+{
+ QLatin1String abc("abc");
+ QLatin1String abcd("abcd");
+ QLatin1String cba("cba");
+ QLatin1String de("de");
+
+ QVERIFY(abc == abc);
+ QVERIFY(!(abc == cba));
+ QVERIFY(!(cba == abc));
+ QVERIFY(!(abc == abcd));
+ QVERIFY(!(abcd == abc));
+
+ QVERIFY(abc != cba);
+ QVERIFY(!(abc != abc));
+ QVERIFY(cba != abc);
+ QVERIFY(abc != abcd);
+ QVERIFY(abcd != abc);
+
+ QVERIFY(abc < abcd);
+ QVERIFY(abc < cba);
+ QVERIFY(abc < de);
+ QVERIFY(abcd < cba);
+ QVERIFY(!(abc < abc));
+ QVERIFY(!(abcd < abc));
+ QVERIFY(!(de < cba));
+
+ QVERIFY(abcd > abc);
+ QVERIFY(cba > abc);
+ QVERIFY(de > abc);
+ QVERIFY(!(abc > abc));
+ QVERIFY(!(abc > abcd));
+ QVERIFY(!(abcd > cba));
+
+ QVERIFY(abc <= abc);
+ QVERIFY(abc <= abcd);
+ QVERIFY(abc <= cba);
+ QVERIFY(abc <= de);
+ QVERIFY(!(abcd <= abc));
+ QVERIFY(!(cba <= abc));
+ QVERIFY(!(cba <= abcd));
+ QVERIFY(!(de <= abc));
+
+ QVERIFY(abc >= abc);
+ QVERIFY(abcd >= abc);
+ QVERIFY(!(abc >= abcd));
+ QVERIFY(cba >= abc);
+ QVERIFY(!(abc >= cba));
+ QVERIFY(de >= abc);
+ QVERIFY(!(abc >= de));
+
+ QLatin1String subfoo("fooZZ", 3);
+ QLatin1String foo("foo");
+ QVERIFY(subfoo == foo);
+ QVERIFY(foo == subfoo);
+ QVERIFY(!(subfoo != foo));
+ QVERIFY(!(foo != subfoo));
+ QVERIFY(!(foo < subfoo));
+ QVERIFY(!(subfoo < foo));
+ QVERIFY(foo >= subfoo);
+ QVERIFY(subfoo >= foo);
+ QVERIFY(!(foo > subfoo));
+ QVERIFY(!(subfoo > foo));
+ QVERIFY(foo <= subfoo);
+ QVERIFY(subfoo <= foo);
+
+ QLatin1String subabc("abcZZ", 3);
+ QLatin1String subab("abcZZ", 2);
+ QVERIFY(subabc != subab);
+ QVERIFY(subab != subabc);
+ QVERIFY(!(subabc == subab));
+ QVERIFY(!(subab == subabc));
+ QVERIFY(subab < subabc);
+ QVERIFY(!(subabc < subab));
+ QVERIFY(subabc > subab);
+ QVERIFY(!(subab > subabc));
+ QVERIFY(subab <= subabc);
+ QVERIFY(!(subabc <= subab));
+ QVERIFY(subabc >= subab);
+ QVERIFY(!(subab >= subabc));
+}
+
+void tst_QString::fromQLatin1StringWithLength()
+{
+ QLatin1String latin1foo("foobar", 3);
+ QString foo(latin1foo);
+ QCOMPARE(foo.size(), latin1foo.size());
+ QCOMPARE(foo, QString::fromLatin1("foo"));
+}
+
+void tst_QString::assignQLatin1String()
+{
+ QString empty = QLatin1String("");
+ QVERIFY(empty.isEmpty());
+ QVERIFY(!empty.isNull());
+
+ QString null = QLatin1String(0);
+ QVERIFY(null.isEmpty());
+ QVERIFY(null.isNull());
+
+ QLatin1String latin1foo("foo");
+ QString foo = latin1foo;
+ QCOMPARE(foo.size(), latin1foo.size());
+ QCOMPARE(foo, QString::fromLatin1("foo"));
+
+ QLatin1String latin1subfoo("foobar", 3);
+ foo = latin1subfoo;
+ QCOMPARE(foo.size(), latin1subfoo.size());
+ QCOMPARE(foo, QString::fromLatin1("foo"));
+
+}
+
QTEST_APPLESS_MAIN(tst_QString)
#include "tst_qstring.moc"
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index 283e707c1b..95e24b22fb 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $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 fd92aafadd..4201fc3f5c 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
index 6bdb607431..0e8e081c46 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
index 915c0d23ad..09d7f38125 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
index c9837a0489..91bb07039a 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index 54ca9dd3a7..e3eb1a21ac 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
index 10906902ff..ebbad86c81 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
index c0dc253167..77d2101320 100644
--- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
+++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index 100ddfcb12..89dd01ac3a 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
index bc03e74b41..d8f72dffdb 100644
--- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp
+++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -242,6 +242,7 @@ void tst_QTime::hour_data()
QTest::newRow( "data2" ) << 1 << 2 << 3 << 4;
QTest::newRow( "data3" ) << 2 << 12 << 13 << 65;
QTest::newRow( "data4" ) << 23 << 59 << 59 << 999;
+ QTest::newRow( "data5" ) << -1 << -1 << -1 << -1;
}
void tst_QTime::hour()
@@ -271,6 +272,7 @@ void tst_QTime::setHMS_data()
QTest::newRow( "data4" ) << 23 << 0 << 0;
QTest::newRow( "data5" ) << 23 << 59 << 0;
QTest::newRow( "data6" ) << 23 << 59 << 59;
+ QTest::newRow( "data7" ) << -1 << -1 << -1;
}
void tst_QTime::setHMS()
@@ -296,6 +298,9 @@ void tst_QTime::secsTo_data()
QTest::newRow( "data1" ) << QTime(0,0,0) << QTime(0,1,0) << 60;
QTest::newRow( "data2" ) << QTime(0,0,0) << QTime(0,10,0) << 600;
QTest::newRow( "data3" ) << QTime(0,0,0) << QTime(23,59,59) << 86399;
+ QTest::newRow( "data4" ) << QTime(-1, -1, -1) << QTime(0, 0, 0) << 0;
+ QTest::newRow( "data5" ) << QTime(0, 0, 0) << QTime(-1, -1, -1) << 0;
+ QTest::newRow( "data6" ) << QTime(-1, -1, -1) << QTime(-1, -1, -1) << 0;
}
void tst_QTime::secsTo()
@@ -317,6 +322,9 @@ void tst_QTime::msecsTo_data()
QTest::newRow( "data1" ) << QTime(0,0,0,0) << QTime(0,0,1,0) << 1000;
QTest::newRow( "data2" ) << QTime(0,0,0,0) << QTime(0,0,10,0) << 10000;
QTest::newRow( "data3" ) << QTime(0,0,0,0) << QTime(23,59,59,0) << 86399000;
+ QTest::newRow( "data4" ) << QTime(-1, -1, -1, -1) << QTime(0, 0, 0, 0) << 0;
+ QTest::newRow( "data5" ) << QTime(0, 0, 0, 0) << QTime(-1, -1, -1, -1) << 0;
+ QTest::newRow( "data6" ) << QTime(-1, -1, -1, -1) << QTime(-1, -1, -1, -1) << 0;
}
void tst_QTime::msecsTo()
diff --git a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
index db08bc5724..f05497d7a2 100644
--- a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index cc2bbe2f1f..8361150d1c 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index bed2e25d31..67ca547736 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/xml/qxmlstream/qc14n.h b/tests/auto/corelib/xml/qxmlstream/qc14n.h
index ed7bd3b323..a45a61eaa7 100644
--- a/tests/auto/corelib/xml/qxmlstream/qc14n.h
+++ b/tests/auto/corelib/xml/qxmlstream/qc14n.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/corelib/xml/qxmlstream/setupSuite.sh b/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
index ca85fa2884..f52a6b4ead 100755
--- a/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
+++ b/tests/auto/corelib/xml/qxmlstream/setupSuite.sh
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is the build configuration utility of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
index 8d3ddfa096..0ce0da06aa 100644
--- a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
+++ b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -532,6 +532,7 @@ public:
private slots:
void initTestCase();
+ void cleanupTestCase();
void reportFailures() const;
void reportFailures_data();
void checkBaseline() const;
@@ -589,6 +590,11 @@ void tst_QXmlStream::initTestCase()
QVERIFY(reader.parse(&source, false));
}
+void tst_QXmlStream::cleanupTestCase()
+{
+ QFile::remove(QLatin1String("test.xml"));
+}
+
void tst_QXmlStream::reportFailures() const
{
QFETCH(bool, isError);
diff --git a/tests/auto/dbus/qdbusabstractadaptor/myobject.h b/tests/auto/dbus/qdbusabstractadaptor/myobject.h
index a5dc47376d..04c8186137 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/myobject.h
+++ b/tests/auto/dbus/qdbusabstractadaptor/myobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
index ed027ae70c..d5d5f2c431 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
+++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
index cc55a942c5..c14d77eec3 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
+++ b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractinterface/interface.cpp b/tests/auto/dbus/qdbusabstractinterface/interface.cpp
index 14a9db543c..564bd15938 100644
--- a/tests/auto/dbus/qdbusabstractinterface/interface.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/interface.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractinterface/interface.h b/tests/auto/dbus/qdbusabstractinterface/interface.h
index 1c1b1bdcb1..2bd99fa11a 100644
--- a/tests/auto/dbus/qdbusabstractinterface/interface.h
+++ b/tests/auto/dbus/qdbusabstractinterface/interface.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractinterface/pinger.cpp b/tests/auto/dbus/qdbusabstractinterface/pinger.cpp
index 1bd767c8fc..93d4732f74 100644
--- a/tests/auto/dbus/qdbusabstractinterface/pinger.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/pinger.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDBus module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractinterface/pinger.h b/tests/auto/dbus/qdbusabstractinterface/pinger.h
index e1acd41021..eb05d7535a 100644
--- a/tests/auto/dbus/qdbusabstractinterface/pinger.h
+++ b/tests/auto/dbus/qdbusabstractinterface/pinger.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDBus module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
index 489bd4afdb..87c6bad7fc 100644
--- a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
index 84d2051f29..28dfd0b63f 100644
--- a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
+++ b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index f6b9edcff1..e1d128dac7 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp b/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
index a678ddd269..de08fc8390 100644
--- a/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
+++ b/tests/auto/dbus/qdbusconnection_no_bus/tst_qdbusconnection_no_bus.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp b/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
index de29f08ef8..bc06f8e377 100644
--- a/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
+++ b/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusinterface/myobject.h b/tests/auto/dbus/qdbusinterface/myobject.h
index 68f5137a4b..94e7b3d4c5 100644
--- a/tests/auto/dbus/qdbusinterface/myobject.h
+++ b/tests/auto/dbus/qdbusinterface/myobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
index cfd183c91e..1815a6ef79 100644
--- a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
+++ b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
index dc8363db42..c866c9d155 100644
--- a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
+++ b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,7 +46,7 @@
#include <QtTest/QtTest>
#include <QtCore/qvariant.h>
#include <QtDBus/QtDBus>
-
+#include <qdebug.h>
#include "../qdbusmarshall/common.h"
#include "myobject.h"
diff --git a/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp b/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp
index 3d33e92f1f..871ae6948d 100644
--- a/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp
+++ b/tests/auto/dbus/qdbuslocalcalls/tst_qdbuslocalcalls.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h
index f41cacc953..d49f4eff30 100644
--- a/tests/auto/dbus/qdbusmarshall/common.h
+++ b/tests/auto/dbus/qdbusmarshall/common.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
index 1d64e45be5..39779c1fd9 100644
--- a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
+++ b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
index b302be85ad..e8f5b255ab 100644
--- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
+++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
index 8de6ad1ce5..ed4ed4c6a2 100644
--- a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
+++ b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
index 9055fdeaac..9ab05b8ead 100644
--- a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
+++ b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
index 447532b427..60a8061ae4 100644
--- a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
+++ b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp b/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
index 347c164eda..5836945484 100644
--- a/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
+++ b/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp b/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp
index ffa7275c6a..b6026f215b 100644
--- a/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp
+++ b/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp b/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
index a07d21c4c6..d25b76d80c 100644
--- a/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
+++ b/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp b/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
index 4f88f223d3..b560a89144 100644
--- a/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
+++ b/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbustype/tst_qdbustype.cpp b/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
index 453ff629b8..9771586827 100644
--- a/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
+++ b/tests/auto/dbus/qdbustype/tst_qdbustype.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
index 42a3fd19cc..7eb31ffb41 100644
--- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -61,9 +61,6 @@ private slots:
void parsingWithDoctype_data();
void parsingWithDoctype();
- void objectWithContent_data();
- void objectWithContent();
-
void methods_data();
void methods();
void signals__data();
@@ -77,40 +74,49 @@ void tst_QDBusXmlParser::parsing_data()
QTest::addColumn<QString>("xmlData");
QTest::addColumn<int>("interfaceCount");
QTest::addColumn<int>("objectCount");
+ QTest::addColumn<int>("annotationCount");
- QTest::newRow("null") << QString() << 0 << 0;
- QTest::newRow("empty") << QString("") << 0 << 0;
+ QTest::newRow("null") << QString() << 0 << 0 << 0;
+ QTest::newRow("empty") << QString("") << 0 << 0 << 0;
- QTest::newRow("junk") << "<junk/>" << 0 << 0;
+ QTest::newRow("junk") << "<junk/>" << 0 << 0 << 0;
QTest::newRow("interface-inside-junk") << "<junk><interface name=\"iface.iface1\" /></junk>"
- << 0 << 0;
+ << 0 << 0 << 0;
QTest::newRow("object-inside-junk") << "<junk><node name=\"obj1\" /></junk>"
- << 0 << 0;
+ << 0 << 0 << 0;
- QTest::newRow("zero-interfaces") << "<node/>" << 0 << 0;
- QTest::newRow("one-interface") << "<node><interface name=\"iface.iface1\" /></node>" << 1 << 0;
+ QTest::newRow("zero-interfaces") << "<node/>" << 0 << 0 << 0;
+ QTest::newRow("one-interface") << "<node><interface name=\"iface.iface1\" /></node>" << 1 << 0 << 0;
QTest::newRow("two-interfaces") << "<node><interface name=\"iface.iface1\" />"
- "<interface name=\"iface.iface2\"></node>"
- << 2 << 0;
+ "<interface name=\"iface.iface2\" /></node>"
+ << 2 << 0 << 0;
- QTest::newRow("one-object") << "<node><node name=\"obj1\"/></node>" << 0 << 1;
- QTest::newRow("two-objects") << "<node><node name=\"obj1\"/><node name=\"obj2\"></node>" << 0 << 2;
+ QTest::newRow("one-object") << "<node><node name=\"obj1\"/></node>" << 0 << 1 << 0;
+ QTest::newRow("two-objects") << "<node><node name=\"obj1\"/><node name=\"obj2\"/></node>" << 0 << 2 << 0;
- QTest::newRow("i1o1") << "<node><interface name=\"iface.iface1\"><node name=\"obj1\"></node>" << 1 << 1;
+ QTest::newRow("i1o1") << "<node><interface name=\"iface.iface1\"/><node name=\"obj1\"/></node>" << 1 << 1 << 0;
+ QTest::newRow("one-interface-annotated") << "<node><interface name=\"iface.iface1\">"
+ "<annotation name=\"foo.testing\" value=\"nothing to see here\" />"
+ "</interface></node>" << 1 << 0 << 1;
+ QTest::newRow("one-interface-docnamespace") << "<?xml version=\"1.0\" xmlns:doc=\"foo\" ?><node>"
+ "<interface name=\"iface.iface1\"><doc:something />"
+ "</interface></node>" << 1 << 0 << 0;
}
void tst_QDBusXmlParser::parsing_common(const QString &xmlData)
{
- QDBusIntrospection::ObjectTree obj =
- QDBusIntrospection::parseObjectTree(xmlData, "local.testing", "/");
+ QDBusIntrospection::Object obj =
+ QDBusIntrospection::parseObject(xmlData, "local.testing", "/");
QFETCH(int, interfaceCount);
QFETCH(int, objectCount);
+ QFETCH(int, annotationCount);
QCOMPARE(obj.interfaces.count(), interfaceCount);
QCOMPARE(obj.childObjects.count(), objectCount);
+ QCOMPARE(QDBusIntrospection::parseInterface(xmlData).annotations.count(), annotationCount);
// also verify the naming
int i = 0;
@@ -140,92 +146,14 @@ void tst_QDBusXmlParser::parsingWithDoctype()
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n";
QFETCH(QString, xmlData);
- parsing_common(docType + xmlData);
-}
-
-void tst_QDBusXmlParser::objectWithContent_data()
-{
- QTest::addColumn<QString>("xmlData");
- QTest::addColumn<QString>("probedObject");
- QTest::addColumn<int>("interfaceCount");
- QTest::addColumn<int>("objectCount");
-
- QTest::newRow("zero") << "<node><node name=\"obj\"/></node>" << "obj" << 0 << 0;
-
- QString xmlData = "<node><node name=\"obj\">"
- "<interface name=\"iface.iface1\" />"
- "</node></node>";
- QTest::newRow("one-interface") << xmlData << "obj" << 1 << 0;
- QTest::newRow("one-interface2") << xmlData << "obj2" << 0 << 0;
-
- xmlData = "<node><node name=\"obj\">"
- "<interface name=\"iface.iface1\" />"
- "<interface name=\"iface.iface2\" />"
- "</node></node>";
- QTest::newRow("two-interfaces") << xmlData << "obj" << 2 << 0;
- QTest::newRow("two-interfaces2") << xmlData << "obj2" << 0 << 0;
-
- xmlData = "<node><node name=\"obj\">"
- "<interface name=\"iface.iface1\" />"
- "<interface name=\"iface.iface2\" />"
- "</node><node name=\"obj2\">"
- "<interface name=\"iface.iface1\" />"
- "</node></node>";
- QTest::newRow("two-nodes-two-interfaces") << xmlData << "obj" << 2 << 0;
- QTest::newRow("two-nodes-one-interface") << xmlData << "obj2" << 1 << 0;
-
- xmlData = "<node><node name=\"obj\">"
- "<node name=\"obj1\" />"
- "</node></node>";
- QTest::newRow("one-object") << xmlData << "obj" << 0 << 1;
- QTest::newRow("one-object2") << xmlData << "obj2" << 0 << 0;
-
- xmlData = "<node><node name=\"obj\">"
- "<node name=\"obj1\" />"
- "<node name=\"obj2\" />"
- "</node></node>";
- QTest::newRow("two-objects") << xmlData << "obj" << 0 << 2;
- QTest::newRow("two-objects2") << xmlData << "obj2" << 0 << 0;
-
- xmlData = "<node><node name=\"obj\">"
- "<node name=\"obj1\" />"
- "<node name=\"obj2\" />"
- "</node><node name=\"obj2\">"
- "<node name=\"obj1\" />"
- "</node></node>";
- QTest::newRow("two-nodes-two-objects") << xmlData << "obj" << 0 << 2;
- QTest::newRow("two-nodes-one-object") << xmlData << "obj2" << 0 << 1;
-}
-
-void tst_QDBusXmlParser::objectWithContent()
-{
- QFETCH(QString, xmlData);
- QFETCH(QString, probedObject);
-
- QDBusIntrospection::ObjectTree tree =
- QDBusIntrospection::parseObjectTree(xmlData, "local.testing", "/");
-
- const ObjectMap &om = tree.childObjectData;
-
- if (om.contains(probedObject)) {
- const QSharedDataPointer<QDBusIntrospection::ObjectTree>& obj = om.value(probedObject);
- QVERIFY(obj != 0);
-
- QFETCH(int, interfaceCount);
- QFETCH(int, objectCount);
-
- QCOMPARE(obj->interfaces.count(), interfaceCount);
- QCOMPARE(obj->childObjects.count(), objectCount);
-
- // verify the object names
- int i = 0;
- foreach (QString name, obj->interfaces)
- QCOMPARE(name, QString("iface.iface%1").arg(++i));
-
- i = 0;
- foreach (QString name, obj->childObjects)
- QCOMPARE(name, QString("obj%1").arg(++i));
+ QString toParse;
+ if (xmlData.startsWith(QLatin1String("<?xml"))) {
+ int split = xmlData.indexOf(QLatin1Char('>')) + 1;
+ toParse = xmlData.left(split) + docType + xmlData.mid(split);
+ } else {
+ toParse = docType + xmlData;
}
+ parsing_common(toParse);
}
void tst_QDBusXmlParser::methods_data()
@@ -261,7 +189,7 @@ void tst_QDBusXmlParser::methods_data()
QTest::newRow("method-with-annotation") <<
"<method name=\"Foo\"/>"
"<method name=\"Bar\"/>"
- "<method name=\"Baz\"><annotation name=\"foo.testing\" value=\"nothing to see here\"></method>"
+ "<method name=\"Baz\"><annotation name=\"foo.testing\" value=\"nothing to see here\" /></method>"
<< map;
// arguments
@@ -428,7 +356,7 @@ void tst_QDBusXmlParser::signals__data()
QTest::newRow("signal-with-annotation") <<
"<signal name=\"Foo\"/>"
"<signal name=\"Bar\"/>"
- "<signal name=\"Baz\"><annotation name=\"foo.testing\" value=\"nothing to see here\"></signal>"
+ "<signal name=\"Baz\"><annotation name=\"foo.testing\" value=\"nothing to see here\" /></signal>"
<< map;
// one out argument
@@ -563,6 +491,7 @@ void tst_QDBusXmlParser::properties_data()
"<property name=\"baz\" type=\"as\" access=\"write\">"
"<annotation name=\"foo.annotation\" value=\"Hello, World\" />"
"<annotation name=\"foo.annotation2\" value=\"Goodbye, World\" />"
+ "</property>"
"<property name=\"foo\" type=\"s\" access=\"readwrite\"/>" << map;
// and now change the order
@@ -570,6 +499,7 @@ void tst_QDBusXmlParser::properties_data()
"<property name=\"baz\" type=\"as\" access=\"write\">"
"<annotation name=\"foo.annotation2\" value=\"Goodbye, World\" />"
"<annotation name=\"foo.annotation\" value=\"Hello, World\" />"
+ "</property>"
"<property name=\"bar\" type=\"i\" access=\"read\"/>"
"<property name=\"foo\" type=\"s\" access=\"readwrite\"/>" << map;
}
diff --git a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
index 0ad195f629..fc25d7567a 100644
--- a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
+++ b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
@@ -4,16 +4,12 @@ SOURCES+= tst_qicoimageformat.cpp
QT += testlib
wince*: {
- DEFINES += SRCDIR=\\\".\\\"
- addFiles.files = icons
- addFiles.path = .
CONFIG(debug, debug|release):{
addPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/qico4d.dll
} else {
addPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/qico4.dll
}
addPlugins.path = imageformats
- DEPLOYMENT += addFiles addPlugins
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
+ DEPLOYMENT += addPlugins
}
+TESTDATA += icons/*
diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
index 40cd9b848a..25c6c81b2a 100644
--- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
+++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -80,8 +80,6 @@ private:
tst_QIcoImageFormat::tst_QIcoImageFormat()
{
- m_IconPath = QLatin1String(SRCDIR) + "/icons";
- qDebug() << m_IconPath;
}
tst_QIcoImageFormat::~tst_QIcoImageFormat()
@@ -101,7 +99,9 @@ void tst_QIcoImageFormat::cleanup()
void tst_QIcoImageFormat::initTestCase()
{
-
+ m_IconPath = QFINDTESTDATA("icons");
+ if (m_IconPath.isEmpty())
+ QFAIL("Cannot find icons directory containing testdata!");
}
void tst_QIcoImageFormat::cleanupTestCase()
diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/gui/image/qicon/qicon.pro
index 34fc5b7716..c44c080ced 100644
--- a/tests/auto/gui/image/qicon/qicon.pro
+++ b/tests/auto/gui/image/qicon/qicon.pro
@@ -7,15 +7,6 @@ RESOURCES = tst_qicon.qrc
wince* {
QT += xml svg
- addFiles.files += $$_PRO_FILE_PWD_/*.png
- addFiles.files += $$_PRO_FILE_PWD_/*.svg
- addFiles.files += $$_PRO_FILE_PWD_/*.svgz
- addFiles.files += $$_PRO_FILE_PWD_/tst_qicon.cpp
- addFiles.path = .
- DEPLOYMENT += addFiles
-
DEPLOYMENT_PLUGIN += qsvg
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
}
+TESTDATA += icons/* *.png *.svg *.svgz
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 55b0c81529..7d455f1010 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,9 +54,6 @@ public:
tst_QIcon();
private slots:
- void init();
- void cleanup();
-
void actualSize_data(); // test with 1 pixmap
void actualSize();
void actualSize2_data(); // test with 2 pixmaps with different aspect ratio
@@ -77,13 +74,10 @@ private slots:
void task184901_badCache();
void task223279_inconsistentAddFile();
- void task239461_custom_iconengine_crash();
private:
bool haveImageFormat(QByteArray const&);
- QString oldCurrentDir;
-
const static QIcon staticIcon;
};
@@ -91,22 +85,6 @@ private:
// But we do not officially support this. See QTBUG-8666
const QIcon tst_QIcon::staticIcon = QIcon::fromTheme("edit-find");
-void tst_QIcon::init()
-{
- QString srcdir(QLatin1String(SRCDIR));
- if (!srcdir.isEmpty()) {
- oldCurrentDir = QDir::current().absolutePath();
- QDir::setCurrent(srcdir);
- }
-}
-
-void tst_QIcon::cleanup()
-{
- if (!oldCurrentDir.isEmpty()) {
- QDir::setCurrent(oldCurrentDir);
- }
-}
-
bool tst_QIcon::haveImageFormat(QByteArray const& desiredFormat)
{
return QImageReader::supportedImageFormats().contains(desiredFormat);
@@ -136,7 +114,7 @@ void tst_QIcon::actualSize_data()
QTest::newRow("resource9") << ":/rect.png" << QSize( 15, 50) << QSize( 15, 30);
QTest::newRow("resource10") << ":/rect.png" << QSize( 25, 50) << QSize( 20, 40);
- const QString prefix = QLatin1String(SRCDIR) + QLatin1String("/");
+ const QString prefix = QFileInfo(QFINDTESTDATA("icons")).absolutePath() + "/";
QTest::newRow("external0") << prefix + "image.png" << QSize(128, 128) << QSize(128, 128);
QTest::newRow("external1") << prefix + "image.png" << QSize( 64, 64) << QSize( 64, 64);
QTest::newRow("external2") << prefix + "image.png" << QSize( 32, 64) << QSize( 32, 32);
@@ -191,7 +169,7 @@ void tst_QIcon::actualSize2_data()
void tst_QIcon::actualSize2()
{
QIcon icon;
- const QString prefix = QLatin1String(SRCDIR) + QLatin1String("/");
+ const QString prefix = QFileInfo(QFINDTESTDATA("icons")).absolutePath() + "/";
icon.addPixmap(QPixmap(prefix + "image.png"));
icon.addPixmap(QPixmap(prefix + "rect.png"));
@@ -209,7 +187,7 @@ void tst_QIcon::svgActualSize()
QSKIP("SVG support is not available");
}
- const QString prefix = QLatin1String(SRCDIR) + QLatin1String("/");
+ const QString prefix = QFileInfo(QFINDTESTDATA("icons")).absolutePath() + "/";
QIcon icon(prefix + "rect.svg");
QCOMPARE(icon.actualSize(QSize(16, 16)), QSize(16, 2));
QCOMPARE(icon.pixmap(QSize(16, 16)).size(), QSize(16, 2));
@@ -252,7 +230,7 @@ void tst_QIcon::isNull() {
QVERIFY(!iconNoFileSuffix.isNull());
QVERIFY(!iconNoFileSuffix.actualSize(QSize(32, 32)).isValid());
- const QString prefix = QLatin1String(SRCDIR) + QLatin1String("/");
+ const QString prefix = QFileInfo(QFINDTESTDATA("icons")).absolutePath() + "/";
// test string constructor with existing file but unsupported format
QIcon iconUnsupportedFormat = QIcon(prefix + "tst_qicon.cpp");
QVERIFY(!iconUnsupportedFormat.isNull());
@@ -406,7 +384,7 @@ void tst_QIcon::detach()
img.fill(0xffff0000);
QIcon icon1(QPixmap::fromImage(img));
QIcon icon2 = icon1;
- icon2.addFile("image.png", QSize(64, 64));
+ icon2.addFile(QFINDTESTDATA("image.png"), QSize(64, 64));
QImage img1 = icon1.pixmap(64, 64).toImage();
QImage img2 = icon2.pixmap(64, 64).toImage();
@@ -648,7 +626,7 @@ static inline bool operator<(const QSize &lhs, const QSize &rhs)
void tst_QIcon::task184901_badCache()
{
- QPixmap pm("image.png");
+ QPixmap pm(QFINDTESTDATA("image.png"));
QIcon icon(pm);
//the disabled icon must have an effect (grayed)
@@ -743,32 +721,5 @@ void tst_QIcon::task223279_inconsistentAddFile()
}
-// During detach, v2 engines are cloned, while v1 engines are only
-// passed on, so v1 engines need to be referenced counted. This test
-// verifies that the engine is destroyed once and only once.
-
-class IconEngine : public QIconEngine
-{
-public:
- ~IconEngine() { destructorCalled++; }
- virtual void paint(QPainter *, const QRect &, QIcon::Mode, QIcon::State) { }
- static int destructorCalled;
-};
-int IconEngine::destructorCalled = 0;
-
-void tst_QIcon::task239461_custom_iconengine_crash()
-{
- QIconEngine *engine = new IconEngine();
- {
- QIcon icon(engine);
- QIcon icon2 = icon;
-
- QPixmap pixmap(32, 32);
- icon.addPixmap(pixmap);
- }
- QCOMPARE(IconEngine::destructorCalled, 1);
-}
-
-
QTEST_MAIN(tst_QIcon)
#include "tst_qicon.moc"
diff --git a/tests/auto/gui/image/qimage/images/image.tif b/tests/auto/gui/image/qimage/images/image.tif
deleted file mode 100644
index ee0637cf25..0000000000
--- a/tests/auto/gui/image/qimage/images/image.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro
index afa279f340..d9252f036f 100644
--- a/tests/auto/gui/image/qimage/qimage.pro
+++ b/tests/auto/gui/image/qimage/qimage.pro
@@ -4,11 +4,4 @@ SOURCES += tst_qimage.cpp
QT += core-private gui-private testlib
-wince*: {
- addImages.files = images/*
- addImages.path = images
- DEPLOYMENT += addImages
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
+TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 479acea3fd..cda887d8e1 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -144,6 +144,8 @@ private slots:
void deepCopyWhenPaintingActive();
void scaled_QTBUG19157();
+
+ void cleanupFunctions();
};
tst_QImage::tst_QImage()
@@ -261,7 +263,10 @@ void tst_QImage::formatHandlersInput_data()
{
QTest::addColumn<QString>("testFormat");
QTest::addColumn<QString>("testFile");
- const QString prefix = QLatin1String(SRCDIR) + "/images/";
+
+ const QString prefix = QFINDTESTDATA("images/");
+ if (prefix.isEmpty())
+ QFAIL("can not find images directory!");
// add a new line here when a file is added
QTest::newRow("ICO") << "ICO" << prefix + "image.ico";
@@ -274,9 +279,6 @@ void tst_QImage::formatHandlersInput_data()
QTest::newRow("PPM") << "PPM" << prefix + "image.ppm";
QTest::newRow("XBM") << "XBM" << prefix + "image.xbm";
QTest::newRow("XPM") << "XPM" << prefix + "image.xpm";
-#if defined QTEST_HAVE_TIFF
- QTest::newRow("TIFF") << "TIFF" << prefix + "image.tif";
-#endif
}
void tst_QImage::formatHandlersInput()
@@ -1997,5 +1999,40 @@ void tst_QImage::scaled_QTBUG19157()
QVERIFY(!foo.isNull());
}
+static void cleanupFunction(void* info)
+{
+ bool *called = static_cast<bool*>(info);
+ *called = true;
+}
+
+void tst_QImage::cleanupFunctions()
+{
+ QImage bufferImage(64, 64, QImage::Format_ARGB32);
+ bufferImage.fill(0);
+
+ bool called;
+
+ {
+ called = false;
+ {
+ QImage image(bufferImage.bits(), bufferImage.width(), bufferImage.height(), bufferImage.format(), cleanupFunction, &called);
+ }
+ QVERIFY(called);
+ }
+
+ {
+ called = false;
+ QImage *copy = 0;
+ {
+ QImage image(bufferImage.bits(), bufferImage.width(), bufferImage.height(), bufferImage.format(), cleanupFunction, &called);
+ copy = new QImage(image);
+ }
+ QVERIFY(!called);
+ delete copy;
+ QVERIFY(called);
+ }
+
+}
+
QTEST_MAIN(tst_QImage)
#include "tst_qimage.moc"
diff --git a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
index acf4e4f4ea..b17ca9c622 100644
--- a/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
+++ b/tests/auto/gui/image/qimageiohandler/tst_qimageiohandler.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/image/qimagereader/images/ball.mng b/tests/auto/gui/image/qimagereader/images/ball.mng
deleted file mode 100644
index 81544780fd..0000000000
--- a/tests/auto/gui/image/qimagereader/images/ball.mng
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/corrupt-data.tif b/tests/auto/gui/image/qimagereader/images/corrupt-data.tif
deleted file mode 100644
index d63c688b27..0000000000
--- a/tests/auto/gui/image/qimagereader/images/corrupt-data.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/corrupt.mng b/tests/auto/gui/image/qimagereader/images/corrupt.mng
deleted file mode 100644
index 17fd43a5ca..0000000000
--- a/tests/auto/gui/image/qimagereader/images/corrupt.mng
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/fire.mng b/tests/auto/gui/image/qimagereader/images/fire.mng
deleted file mode 100644
index c6695c8369..0000000000
--- a/tests/auto/gui/image/qimagereader/images/fire.mng
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/grayscale-ref.tif b/tests/auto/gui/image/qimagereader/images/grayscale-ref.tif
deleted file mode 100644
index 960531ea86..0000000000
--- a/tests/auto/gui/image/qimagereader/images/grayscale-ref.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/grayscale.tif b/tests/auto/gui/image/qimagereader/images/grayscale.tif
deleted file mode 100644
index 5f4e11429d..0000000000
--- a/tests/auto/gui/image/qimagereader/images/grayscale.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/image_100dpi.tif b/tests/auto/gui/image/qimagereader/images/image_100dpi.tif
deleted file mode 100644
index fcf3cd89aa..0000000000
--- a/tests/auto/gui/image/qimagereader/images/image_100dpi.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif b/tests/auto/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif
deleted file mode 100644
index 78868b0d48..0000000000
--- a/tests/auto/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/rgba_lzw_littleendian.tif b/tests/auto/gui/image/qimagereader/images/rgba_lzw_littleendian.tif
deleted file mode 100644
index 107eab74e7..0000000000
--- a/tests/auto/gui/image/qimagereader/images/rgba_lzw_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif b/tests/auto/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif
deleted file mode 100644
index c314bae4c0..0000000000
--- a/tests/auto/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif b/tests/auto/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif
deleted file mode 100644
index 4f820f6649..0000000000
--- a/tests/auto/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/rgba_packbits_littleendian.tif b/tests/auto/gui/image/qimagereader/images/rgba_packbits_littleendian.tif
deleted file mode 100644
index ddeec38fbc..0000000000
--- a/tests/auto/gui/image/qimagereader/images/rgba_packbits_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif b/tests/auto/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif
deleted file mode 100644
index 50a3024246..0000000000
--- a/tests/auto/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_1.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_1.tiff
deleted file mode 100644
index 3fcb8a9aca..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_1.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_2.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_2.tiff
deleted file mode 100644
index 6f3e9d5297..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_2.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_3.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_3.tiff
deleted file mode 100644
index aab9cf2596..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_3.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_4.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_4.tiff
deleted file mode 100644
index aad96ffc6c..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_4.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_5.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_5.tiff
deleted file mode 100644
index 05d23dcb86..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_5.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_6.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_6.tiff
deleted file mode 100644
index 9ffe7fcaa4..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_6.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_7.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_7.tiff
deleted file mode 100644
index eeeb01937e..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_7.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_8.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_8.tiff
deleted file mode 100644
index 87cf2fd774..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/indexed_orientation_8.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_1.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_1.tiff
deleted file mode 100644
index 3b589b2232..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_1.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_2.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_2.tiff
deleted file mode 100644
index 9a662239db..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_2.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_3.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_3.tiff
deleted file mode 100644
index eed242388c..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_3.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_4.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_4.tiff
deleted file mode 100644
index 055480e0ca..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_4.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_5.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_5.tiff
deleted file mode 100644
index b4d0974ec8..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_5.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_6.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_6.tiff
deleted file mode 100644
index 3b1e02af56..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_6.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_7.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_7.tiff
deleted file mode 100644
index b752c745c3..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_7.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_8.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_8.tiff
deleted file mode 100644
index e228d05659..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/mono_orientation_8.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_indexed.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_indexed.tiff
deleted file mode 100644
index 7507e526a5..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_indexed.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_mono.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_mono.tiff
deleted file mode 100644
index 8ff9db80f5..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_mono.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_rgb.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_rgb.tiff
deleted file mode 100644
index 321ea3ebf5..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/original_rgb.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_1.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_1.tiff
deleted file mode 100644
index 2756a82fbb..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_1.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_2.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_2.tiff
deleted file mode 100644
index ae9af0999d..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_2.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_3.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_3.tiff
deleted file mode 100644
index a2f432526b..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_3.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_4.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_4.tiff
deleted file mode 100644
index f35bfc4c9c..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_4.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_5.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_5.tiff
deleted file mode 100644
index 70e5478065..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_5.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_6.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_6.tiff
deleted file mode 100644
index b2635fe14f..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_6.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_7.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_7.tiff
deleted file mode 100644
index 1fb0cd9df6..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_7.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_8.tiff b/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_8.tiff
deleted file mode 100644
index 666b1b4c55..0000000000
--- a/tests/auto/gui/image/qimagereader/images/tiff_oriented/rgb_orientation_8.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagereader/qimagereader.qrc b/tests/auto/gui/image/qimagereader/qimagereader.qrc
index 2c70652389..3ff41d393b 100644
--- a/tests/auto/gui/image/qimagereader/qimagereader.qrc
+++ b/tests/auto/gui/image/qimagereader/qimagereader.qrc
@@ -6,7 +6,6 @@
<file>images/YCbCr_cmyk.png</file>
<file>images/YCbCr_rgb.jpg</file>
<file>images/away.png</file>
- <file>images/ball.mng</file>
<file>images/bat1.gif</file>
<file>images/bat2.gif</file>
<file>images/beavis.jpg</file>
@@ -18,19 +17,16 @@
<file>images/corrupt.bmp</file>
<file>images/corrupt.gif</file>
<file>images/corrupt.jpg</file>
- <file>images/corrupt.mng</file>
<file>images/corrupt.png</file>
<file>images/corrupt.xbm</file>
<file>images/crash-signed-char.bmp</file>
<file>images/earth.gif</file>
- <file>images/fire.mng</file>
<file>images/font.bmp</file>
<file>images/gnus.xbm</file>
<file>images/image.pbm</file>
<file>images/image.pgm</file>
<file>images/image.png</file>
<file>images/image.ppm</file>
- <file>images/image_100dpi.tif</file>
<file>images/kollada.png</file>
<file>images/marble.xpm</file>
<file>images/namedcolors.xpm</file>
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index 7504ab3466..8a18bee83f 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -121,12 +121,6 @@ private slots:
void readFromResources_data();
void readFromResources();
- void dotsPerMeter_data();
- void dotsPerMeter();
-
- void physicalDpi_data();
- void physicalDpi();
-
void sizeBeforeRead_data();
void sizeBeforeRead();
@@ -148,15 +142,6 @@ private slots:
void supportsOption_data();
void supportsOption();
- void tiffCompression_data();
- void tiffCompression();
- void tiffEndianness();
-
- void tiffOrientation_data();
- void tiffOrientation();
-
- void tiffGrayscale();
-
void autoDetectImageFormat();
void fileNameProbing();
@@ -256,9 +241,6 @@ void tst_QImageReader::readImage_data()
QTest::newRow("GIF: earth") << QString("earth.gif") << true << QByteArray("gif");
QTest::newRow("GIF: trolltech") << QString("trolltech.gif") << true << QByteArray("gif");
- QTest::newRow("MNG: ball") << QString("ball.mng") << true << QByteArray("mng");
- QTest::newRow("MNG: fire") << QString("fire.mng") << true << QByteArray("mng");
-
QTest::newRow("SVG: rect") << QString("rect.svg") << true << QByteArray("svg");
QTest::newRow("SVGZ: rect") << QString("rect.svgz") << true << QByteArray("svgz");
}
@@ -374,9 +356,6 @@ void tst_QImageReader::setScaledSize_data()
QTest::newRow("GIF: earth") << "earth" << QSize(200, 200) << QByteArray("gif");
QTest::newRow("GIF: trolltech") << "trolltech" << QSize(200, 200) << QByteArray("gif");
- QTest::newRow("MNG: ball") << "ball" << QSize(200, 200) << QByteArray("mng");
- QTest::newRow("MNG: fire") << "fire" << QSize(200, 200) << QByteArray("mng");
-
QTest::newRow("SVG: rect") << "rect" << QSize(200, 200) << QByteArray("svg");
QTest::newRow("SVGZ: rect") << "rect" << QSize(200, 200) << QByteArray("svgz");
}
@@ -441,9 +420,6 @@ void tst_QImageReader::setClipRect_data()
QTest::newRow("GIF: earth") << "earth" << QRect(0, 0, 50, 50) << QByteArray("gif");
QTest::newRow("GIF: trolltech") << "trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif");
- QTest::newRow("MNG: ball") << "ball" << QRect(0, 0, 50, 50) << QByteArray("mng");
- QTest::newRow("MNG: fire") << "fire" << QRect(0, 0, 50, 50) << QByteArray("mng");
-
QTest::newRow("SVG: rect") << "rect" << QRect(0, 0, 50, 50) << QByteArray("svg");
QTest::newRow("SVGZ: rect") << "rect" << QRect(0, 0, 50, 50) << QByteArray("svgz");
}
@@ -489,9 +465,6 @@ void tst_QImageReader::setScaledClipRect_data()
QTest::newRow("GIF: earth") << "earth" << QRect(0, 0, 50, 50) << QByteArray("gif");
QTest::newRow("GIF: trolltech") << "trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif");
- QTest::newRow("MNG: ball") << "ball" << QRect(0, 0, 50, 50) << QByteArray("mng");
- QTest::newRow("MNG: fire") << "fire" << QRect(0, 0, 50, 50) << QByteArray("mng");
-
QTest::newRow("SVG: rect") << "rect" << QRect(0, 0, 50, 50) << QByteArray("svg");
QTest::newRow("SVGZ: rect") << "rect" << QRect(0, 0, 50, 50) << QByteArray("svgz");
}
@@ -545,8 +518,6 @@ void tst_QImageReader::imageFormat_data()
QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp") << QImage::Format_RGB32;
QTest::newRow("png") << QString("kollada.png") << QByteArray("png") << QImage::Format_ARGB32;
QTest::newRow("png-2") << QString("YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32;
- QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng") << QImage::Format_Invalid;
- QTest::newRow("mng-2") << QString("fire.mng") << QByteArray("mng") << QImage::Format_Invalid;
QTest::newRow("svg") << QString("rect.svg") << QByteArray("svg") << QImage::Format_ARGB32_Premultiplied;
QTest::newRow("svgz") << QString("rect.svgz") << QByteArray("svgz") << QImage::Format_ARGB32_Premultiplied;
}
@@ -625,9 +596,6 @@ void tst_QImageReader::setBackgroundColor_data()
QTest::newRow("GIF: earth") << QString("earth.gif") << QColor(Qt::cyan);
QTest::newRow("GIF: trolltech") << QString("trolltech.gif") << QColor(Qt::magenta);
- QTest::newRow("MNG: ball") << QString("ball.mng") << QColor(Qt::yellow);
- QTest::newRow("MNG: fire") << QString("fire.mng") << QColor(Qt::gray);
-
QTest::newRow("SVG: rect") << QString("rect.svg") << QColor(Qt::darkGreen);
QTest::newRow("SVGZ: rect") << QString("rect.svgz") << QColor(Qt::darkGreen);
}
@@ -664,9 +632,6 @@ void tst_QImageReader::supportsAnimation_data()
QTest::newRow("GIF: earth") << QString("earth.gif") << true;
QTest::newRow("GIF: trolltech") << QString("trolltech.gif") << true;
- QTest::newRow("MNG: ball") << QString("ball.mng") << true;
- QTest::newRow("MNG: fire") << QString("fire.mng") << true;
-
QTest::newRow("SVG: rect") << QString("rect.svg") << false;
QTest::newRow("SVGZ: rect") << QString("rect.svgz") << false;
}
@@ -693,10 +658,6 @@ void tst_QImageReader::sizeBeforeRead()
QImageReader reader(prefix + fileName);
QVERIFY(reader.canRead());
- if (format == "mng") {
- QCOMPARE(reader.size(), QSize());
- return;
- }
QSize size = reader.size();
QVERIFY(reader.canRead());
@@ -1043,9 +1004,6 @@ void tst_QImageReader::readFromDevice_data()
QTest::newRow("bmp-4") << QString("test32v5.bmp") << QByteArray("bmp");
QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
- QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng");
- QTest::newRow("mng-2") << QString("fire.mng") << QByteArray("mng");
-
QTest::newRow("svg") << QString("rect.svg") << QByteArray("svg");
QTest::newRow("svgz") << QString("rect.svgz") << QByteArray("svgz");
#if defined QTEST_HAVE_TGA
@@ -1165,7 +1123,7 @@ void tst_QImageReader::readFromFileAfterJunk()
if (format == "ppm" || format == "pbm" || format == "pgm" || format == "svg" || format == "svgz")
iterations = 1;
- if (format == "mng" || !QImageWriter::supportedImageFormats().contains(format)) {
+ if (!QImageWriter::supportedImageFormats().contains(format)) {
for (int i = 0; i < iterations; ++i) {
junkFile.write("deadbeef", 9);
QCOMPARE(junkFile.write(imageData), qint64(imageData.size()));
@@ -1321,15 +1279,6 @@ void tst_QImageReader::readFromResources_data()
QTest::newRow("qtbug13653-no_eoi.jpg") << QString("qtbug13653-no_eoi.jpg")
<< QByteArray("jpg") << QSize(240, 180)
<< QString("");
- QTest::newRow("corrupt.mng") << QString("corrupt.mng")
- << QByteArray("mng") << QSize(0, 0)
- << QString("MNG error 901: Application signalled I/O error; chunk IHDR; subcode 0:0");
- QTest::newRow("fire.mng") << QString("fire.mng")
- << QByteArray("mng") << QSize(30, 60)
- << QString("");
- QTest::newRow("ball.mng") << QString("ball.mng")
- << QByteArray("mng") << QSize(32, 32)
- << QString("");
QTest::newRow("rect.svg") << QString("rect.svg")
<< QByteArray("svg") << QSize(105, 137)
<< QString("");
@@ -1497,9 +1446,6 @@ void tst_QImageReader::readCorruptImage_data()
<< QString("JPEG datastream contains no image")
<< QByteArray("jpeg");
QTest::newRow("corrupt gif") << QString("corrupt.gif") << true << QString("") << QByteArray("gif");
- QTest::newRow("corrupt mng") << QString("corrupt.mng") << true
- << QString("MNG error 901: Application signalled I/O error; chunk IHDR; subcode 0:0")
- << QByteArray("mng");
QTest::newRow("corrupt png") << QString("corrupt.png") << true << QString("") << QByteArray("png");
QTest::newRow("corrupt bmp") << QString("corrupt.bmp") << true << QString("") << QByteArray("bmp");
QTest::newRow("corrupt xpm (colors)") << QString("corrupt-colors.xpm") << true
@@ -1509,7 +1455,6 @@ void tst_QImageReader::readCorruptImage_data()
<< QString("QImage: XPM pixels missing on image line 3")
<< QByteArray("xpm");
QTest::newRow("corrupt xbm") << QString("corrupt.xbm") << false << QString("") << QByteArray("xbm");
- QTest::newRow("corrupt tiff") << QString("corrupt-data.tif") << true << QString("") << QByteArray("tiff");
QTest::newRow("corrupt svg") << QString("corrupt.svg") << true << QString("") << QByteArray("svg");
QTest::newRow("corrupt svgz") << QString("corrupt.svgz") << true << QString("") << QByteArray("svgz");
}
@@ -1578,148 +1523,6 @@ void tst_QImageReader::supportsOption()
QVERIFY(!reader.supportsOption(option));
}
-void tst_QImageReader::tiffCompression_data()
-{
- QTest::addColumn<QString>("uncompressedFile");
- QTest::addColumn<QString>("compressedFile");
-
- QTest::newRow("TIFF: adobedeflate") << "rgba_nocompression_littleendian.tif"
- << "rgba_adobedeflate_littleendian.tif";
- QTest::newRow("TIFF: lzw") << "rgba_nocompression_littleendian.tif"
- << "rgba_lzw_littleendian.tif";
- QTest::newRow("TIFF: packbits") << "rgba_nocompression_littleendian.tif"
- << "rgba_packbits_littleendian.tif";
- QTest::newRow("TIFF: zipdeflate") << "rgba_nocompression_littleendian.tif"
- << "rgba_zipdeflate_littleendian.tif";
-}
-
-void tst_QImageReader::tiffCompression()
-{
- QFETCH(QString, uncompressedFile);
- QFETCH(QString, compressedFile);
-
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage uncompressedImage(prefix + uncompressedFile);
- QImage compressedImage(prefix + compressedFile);
-
- QCOMPARE(uncompressedImage, compressedImage);
-}
-
-void tst_QImageReader::tiffEndianness()
-{
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage littleEndian(prefix + "rgba_nocompression_littleendian.tif");
- QImage bigEndian(prefix + "rgba_nocompression_bigendian.tif");
-
- QCOMPARE(littleEndian, bigEndian);
-}
-
-void tst_QImageReader::tiffOrientation_data()
-{
- QTest::addColumn<QString>("expected");
- QTest::addColumn<QString>("oriented");
- QTest::newRow("Indexed TIFF, orientation1") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_1.tiff";
- QTest::newRow("Indexed TIFF, orientation2") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_2.tiff";
- QTest::newRow("Indexed TIFF, orientation3") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_3.tiff";
- QTest::newRow("Indexed TIFF, orientation4") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_4.tiff";
- QTest::newRow("Indexed TIFF, orientation5") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_5.tiff";
- QTest::newRow("Indexed TIFF, orientation6") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_6.tiff";
- QTest::newRow("Indexed TIFF, orientation7") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_7.tiff";
- QTest::newRow("Indexed TIFF, orientation8") << "tiff_oriented/original_indexed.tiff" << "tiff_oriented/indexed_orientation_8.tiff";
-
- QTest::newRow("Mono TIFF, orientation1") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_1.tiff";
- QTest::newRow("Mono TIFF, orientation2") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_2.tiff";
- QTest::newRow("Mono TIFF, orientation3") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_3.tiff";
- QTest::newRow("Mono TIFF, orientation4") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_4.tiff";
- QTest::newRow("Mono TIFF, orientation5") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_5.tiff";
- QTest::newRow("Mono TIFF, orientation6") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_6.tiff";
- QTest::newRow("Mono TIFF, orientation7") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_7.tiff";
- QTest::newRow("Mono TIFF, orientation8") << "tiff_oriented/original_mono.tiff" << "tiff_oriented/mono_orientation_8.tiff";
-
- QTest::newRow("RGB TIFF, orientation1") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_1.tiff";
- QTest::newRow("RGB TIFF, orientation2") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_2.tiff";
- QTest::newRow("RGB TIFF, orientation3") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_3.tiff";
- QTest::newRow("RGB TIFF, orientation4") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_4.tiff";
- QTest::newRow("RGB TIFF, orientation5") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_5.tiff";
- QTest::newRow("RGB TIFF, orientation6") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_6.tiff";
- QTest::newRow("RGB TIFF, orientation7") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_7.tiff";
- QTest::newRow("RGB TIFF, orientation8") << "tiff_oriented/original_rgb.tiff" << "tiff_oriented/rgb_orientation_8.tiff";
-}
-
-void tst_QImageReader::tiffOrientation()
-{
- QFETCH(QString, expected);
- QFETCH(QString, oriented);
-
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage expectedImage(prefix + expected);
- QImage orientedImage(prefix + oriented);
- QCOMPARE(expectedImage, orientedImage);
-}
-
-void tst_QImageReader::tiffGrayscale()
-{
- SKIP_IF_UNSUPPORTED("tiff");
-
- QImage actualImage(prefix + "grayscale.tif");
- QImage expectedImage(prefix + "grayscale-ref.tif");
-
- QCOMPARE(expectedImage, actualImage.convertToFormat(expectedImage.format()));
-}
-
-void tst_QImageReader::dotsPerMeter_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<int>("expectedDotsPerMeterX");
- QTest::addColumn<int>("expectedDotsPerMeterY");
- QTest::addColumn<QByteArray>("format");
- QTest::newRow("TIFF: 72 dpi") << ("rgba_nocompression_littleendian.tif") << qRound(72 * (100 / 2.54)) << qRound(72 * (100 / 2.54)) << QByteArray("tiff");
- QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54)) << QByteArray("tiff");
-}
-
-void tst_QImageReader::dotsPerMeter()
-{
- QFETCH(QString, fileName);
- QFETCH(int, expectedDotsPerMeterX);
- QFETCH(int, expectedDotsPerMeterY);
- QFETCH(QByteArray, format);
-
- SKIP_IF_UNSUPPORTED(format);
-
- QImage image(prefix + fileName);
-
- QCOMPARE(image.dotsPerMeterX(), expectedDotsPerMeterX);
- QCOMPARE(image.dotsPerMeterY(), expectedDotsPerMeterY);
-}
-
-void tst_QImageReader::physicalDpi_data()
-{
- QTest::addColumn<QString>("fileName");
- QTest::addColumn<int>("expectedPhysicalDpiX");
- QTest::addColumn<int>("expectedPhysicalDpiY");
- QTest::addColumn<QByteArray>("format");
- QTest::newRow("TIFF: 72 dpi") << "rgba_nocompression_littleendian.tif" << 72 << 72 << QByteArray("tiff");
- QTest::newRow("TIFF: 100 dpi") << "image_100dpi.tif" << 100 << 100 << QByteArray("tiff");
-}
-
-void tst_QImageReader::physicalDpi()
-{
- QFETCH(QString, fileName);
- QFETCH(int, expectedPhysicalDpiX);
- QFETCH(int, expectedPhysicalDpiY);
- QFETCH(QByteArray, format);
-
- SKIP_IF_UNSUPPORTED(format);
-
- QImage image(prefix + fileName);
-
- QCOMPARE(image.physicalDpiX(), expectedPhysicalDpiX);
- QCOMPARE(image.physicalDpiY(), expectedPhysicalDpiY);
-}
-
void tst_QImageReader::autoDetectImageFormat()
{
// Assume PNG is supported :-)
@@ -1860,10 +1663,6 @@ void tst_QImageReader::testIgnoresFormatAndExtension_data()
QTest::newRow("beavis.jpg") << "beavis" << "jpg" << "jpeg";
- QTest::newRow("fire.mng") << "fire" << "mng" << "mng";
-
- QTest::newRow("image_100dpi.tif") << "image_100dpi" << "tif" << "tiff";
-
QTest::newRow("rect.svg") << "rect" << "svg" << "svg";
QTest::newRow("rect.svgz") << "rect" << "svgz" << "svgz";
}
diff --git a/tests/auto/gui/image/qimagewriter/images/teapot.tiff b/tests/auto/gui/image/qimagewriter/images/teapot.tiff
deleted file mode 100644
index 20845c6e32..0000000000
--- a/tests/auto/gui/image/qimagewriter/images/teapot.tiff
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
index 10c950cf0a..b6c80b8d62 100644
--- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro
+++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
@@ -3,15 +3,7 @@ TARGET = tst_qimagewriter
QT += widgets testlib
SOURCES += tst_qimagewriter.cpp
MOC_DIR=tmp
-!contains(QT_CONFIG, no-tiff):DEFINES += QTEST_HAVE_TIFF
win32-msvc:QMAKE_CXXFLAGS -= -Zm200
win32-msvc:QMAKE_CXXFLAGS += -Zm800
-wince*: {
- addFiles.files = images\\*.*
- addFiles.path = images
- DEPLOYMENT += addFiles
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
+TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index 9acf210eeb..8473597dac 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -71,6 +71,7 @@ public:
public slots:
void init();
+ void initTestCase();
void cleanup();
private slots:
@@ -81,13 +82,6 @@ private slots:
void writeImage2();
void supportedFormats();
- void readWriteNonDestructive_data();
- void readWriteNonDestructive();
-
-#if defined QTEST_HAVE_TIFF
- void largeTiff();
-#endif
-
void writeToInvalidDevice();
void supportsOption_data();
@@ -96,13 +90,16 @@ private slots:
void saveWithNoFormat_data();
void saveWithNoFormat();
- void resolution_data();
- void resolution();
-
void saveToTemporaryFile();
+private:
+ QString prefix;
};
-static const QLatin1String prefix(SRCDIR "/images/");
+// helper to skip an autotest when the given image format is not supported
+#define SKIP_IF_UNSUPPORTED(format) do { \
+ if (!QByteArray(format).isEmpty() && !QImageReader::supportedImageFormats().contains(format)) \
+ QSKIP("\"" + QByteArray(format) + "\" images are not supported"); \
+} while (0)
static void initializePadding(QImage *image)
{
@@ -115,6 +112,13 @@ static void initializePadding(QImage *image)
}
}
+void tst_QImageWriter::initTestCase()
+{
+ prefix = QFINDTESTDATA("images/");
+ if (prefix.isEmpty())
+ QFAIL("Can't find images directory!");
+}
+
// Testing get/set functions
void tst_QImageWriter::getSetCheck()
{
@@ -194,9 +198,6 @@ void tst_QImageWriter::writeImage_data()
QTest::newRow("PBM: ship63") << QString("ship63.pbm") << true << QByteArray("pbm");
QTest::newRow("XBM: gnus") << QString("gnus.xbm") << false << QByteArray("xbm");
QTest::newRow("JPEG: beavis") << QString("beavis.jpg") << true << QByteArray("jpeg");
-#if defined QTEST_HAVE_TIFF
- QTest::newRow("TIFF: teapot") << QString("teapot.tiff") << false << QByteArray("tiff");
-#endif
}
void tst_QImageWriter::writeImage()
@@ -205,6 +206,8 @@ void tst_QImageWriter::writeImage()
QFETCH(bool, lossy);
QFETCH(QByteArray, format);
+ SKIP_IF_UNSUPPORTED(format);
+
QImage image;
{
QImageReader reader(prefix + fileName);
@@ -217,15 +220,22 @@ void tst_QImageWriter::writeImage()
}
{
- // Shouldn't be able to write to read-only file
- QFile sourceFile(prefix + "gen-" + fileName);
- QFile::Permissions permissions = sourceFile.permissions();
- QVERIFY(sourceFile.setPermissions(QFile::ReadOwner | QFile::ReadUser | QFile::ReadGroup | QFile::ReadOther));
+ bool skip = false;
+#if defined(Q_OS_UNIX)
+ if (::geteuid() == 0)
+ skip = true;
+#endif
+ if (!skip) {
+ // Shouldn't be able to write to read-only file
+ QFile sourceFile(prefix + "gen-" + fileName);
+ QFile::Permissions permissions = sourceFile.permissions();
+ QVERIFY(sourceFile.setPermissions(QFile::ReadOwner | QFile::ReadUser | QFile::ReadGroup | QFile::ReadOther));
- QImageWriter writer(prefix + "gen-" + fileName, format);
- QVERIFY(!writer.write(image));
+ QImageWriter writer(prefix + "gen-" + fileName, format);
+ QVERIFY(!writer.write(image));
- QVERIFY(sourceFile.setPermissions(permissions));
+ QVERIFY(sourceFile.setPermissions(permissions));
+ }
}
QImage image2;
@@ -268,41 +278,6 @@ void tst_QImageWriter::writeImage2_data()
}
}
-#if defined QTEST_HAVE_TIFF
-void tst_QImageWriter::largeTiff()
-{
-#if !defined(Q_OS_WINCE)
- QImage img(4096, 2048, QImage::Format_ARGB32);
-
- QPainter p(&img);
- img.fill(0x0);
- p.fillRect(0, 0, 4096, 2048, QBrush(Qt::CrossPattern));
- p.end();
-
- QByteArray array;
- QBuffer writeBuffer(&array);
- writeBuffer.open(QIODevice::WriteOnly);
-
- QImageWriter writer(&writeBuffer, "tiff");
- QVERIFY(writer.write(img));
-
- writeBuffer.close();
-
- QBuffer readBuffer(&array);
- readBuffer.open(QIODevice::ReadOnly);
-
- QImageReader reader(&readBuffer, "tiff");
-
- QImage img2 = reader.read();
- QVERIFY(!img2.isNull());
-
- QCOMPARE(img, img2);
-#else
- QWARN("not tested on WinCE");
-#endif
-}
-#endif
-
/*
Workaround for the equality operator for indexed formats
(which fails if the colortables are different).
@@ -377,39 +352,6 @@ void tst_QImageWriter::supportedFormats()
QCOMPARE(formatSet.size(), formats.size());
}
-void tst_QImageWriter::readWriteNonDestructive_data()
-{
- QTest::addColumn<QImage::Format>("format");
- QTest::addColumn<QImage::Format>("expectedFormat");
- QTest::addColumn<bool>("grayscale");
- QTest::newRow("tiff mono") << QImage::Format_Mono << QImage::Format_Mono << false;
- QTest::newRow("tiff indexed") << QImage::Format_Indexed8 << QImage::Format_Indexed8 << false;
- QTest::newRow("tiff rgb32") << QImage::Format_ARGB32 << QImage::Format_ARGB32 << false;
- QTest::newRow("tiff grayscale") << QImage::Format_Indexed8 << QImage::Format_Indexed8 << true;
-}
-
-void tst_QImageWriter::readWriteNonDestructive()
-{
- QFETCH(QImage::Format, format);
- QFETCH(QImage::Format, expectedFormat);
- QFETCH(bool, grayscale);
- QImage image = QImage(prefix + "colorful.bmp").convertToFormat(format);
-
- if (grayscale) {
- QVector<QRgb> colors;
- for (int i = 0; i < 256; ++i)
- colors << qRgb(i, i, i);
- image.setColorTable(colors);
- }
-
- QVERIFY(image.save(prefix + "gen-readWriteNonDestructive.tiff"));
-
- QImage image2 = QImage(prefix + "gen-readWriteNonDestructive.tiff");
- QImage::Format readFormat = image2.format();
- QCOMPARE(readFormat, expectedFormat);
- QCOMPARE(image, image2);
-}
-
void tst_QImageWriter::writeToInvalidDevice()
{
QLatin1String fileName("/these/directories/do/not/exist/001.png");
@@ -449,15 +391,12 @@ void tst_QImageWriter::supportsOption_data()
<< QImageIOHandler::Description
<< QImageIOHandler::Quality
<< QImageIOHandler::Size);
-#if defined QTEST_HAVE_TIFF
- QTest::newRow("tiff") << QString("gen-black.tiff")
- << (QIntList() << QImageIOHandler::Size
- << QImageIOHandler::CompressionRatio);
-#endif
}
void tst_QImageWriter::supportsOption()
{
+ SKIP_IF_UNSUPPORTED(QTest::currentDataTag());
+
QFETCH(QString, fileName);
QFETCH(QIntList, options);
@@ -500,9 +439,6 @@ void tst_QImageWriter::saveWithNoFormat_data()
QTest::newRow("png") << prefix + QString("gen-out.png") << QByteArray("png") << QImageWriter::ImageWriterError(0);
QTest::newRow("ppm") << prefix + QString("gen-out.ppm") << QByteArray("ppm") << QImageWriter::ImageWriterError(0);
QTest::newRow("pbm") << prefix + QString("gen-out.pbm") << QByteArray("pbm") << QImageWriter::ImageWriterError(0);
-#if defined QTEST_HAVE_TIFF
- QTest::newRow("tiff") << prefix + QString("gen-out.tiff") << QByteArray("tiff") << QImageWriter::ImageWriterError(0);
-#endif
}
void tst_QImageWriter::saveWithNoFormat()
@@ -511,6 +447,8 @@ void tst_QImageWriter::saveWithNoFormat()
QFETCH(QByteArray, format);
QFETCH(QImageWriter::ImageWriterError, error);
+ SKIP_IF_UNSUPPORTED(format);
+
QImage niceImage(64, 64, QImage::Format_ARGB32);
qMemSet(niceImage.bits(), 0, niceImage.byteCount());
@@ -532,39 +470,6 @@ void tst_QImageWriter::saveWithNoFormat()
QVERIFY2(!outImage.isNull(), qPrintable(reader.errorString()));
}
-void tst_QImageWriter::resolution_data()
-{
- QTest::addColumn<QString>("filename");
- QTest::addColumn<int>("expectedDotsPerMeterX");
- QTest::addColumn<int>("expectedDotsPerMeterY");
-#if defined QTEST_HAVE_TIFF
- QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54));
- QTest::newRow("TIFF: 50 dpi") << ("image_50dpi.tif") << qRound(50 * (100 / 2.54)) << qRound(50 * (100 / 2.54));
- QTest::newRow("TIFF: 300 dot per meter") << ("image_300dpm.tif") << 300 << 300;
-#endif
-}
-
-void tst_QImageWriter::resolution()
-{
- QFETCH(QString, filename);
- QFETCH(int, expectedDotsPerMeterX);
- QFETCH(int, expectedDotsPerMeterY);
-
- QImage image(prefix + QLatin1String("colorful.bmp"));
- image.setDotsPerMeterX(expectedDotsPerMeterX);
- image.setDotsPerMeterY(expectedDotsPerMeterY);
- const QString generatedFilepath = prefix + "gen-" + filename;
- {
- QImageWriter writer(generatedFilepath);
- QVERIFY(writer.write(image));
- }
- QImageReader reader(generatedFilepath);
- const QImage generatedImage = reader.read();
-
- QCOMPARE(expectedDotsPerMeterX, generatedImage.dotsPerMeterX());
- QCOMPARE(expectedDotsPerMeterY, generatedImage.dotsPerMeterY());
-}
-
void tst_QImageWriter::saveToTemporaryFile()
{
QImage image(prefix + "kollada.png");
diff --git a/tests/auto/gui/image/qmovie/animations/dutch.mng b/tests/auto/gui/image/qmovie/animations/dutch.mng
deleted file mode 100644
index 4917fdee7a..0000000000
--- a/tests/auto/gui/image/qmovie/animations/dutch.mng
+++ /dev/null
Binary files differ
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro
index 5da0b80670..b2891a482f 100644
--- a/tests/auto/gui/image/qmovie/qmovie.pro
+++ b/tests/auto/gui/image/qmovie/qmovie.pro
@@ -6,7 +6,6 @@ MOC_DIR=tmp
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
-!contains(QT_CONFIG, no-mng):DEFINES += QTEST_HAVE_MNG
RESOURCES += resources.qrc
TESTDATA += animations/*
diff --git a/tests/auto/gui/image/qmovie/tst_qmovie.cpp b/tests/auto/gui/image/qmovie/tst_qmovie.cpp
index d0c5e91f57..1a66141ea1 100644
--- a/tests/auto/gui/image/qmovie/tst_qmovie.cpp
+++ b/tests/auto/gui/image/qmovie/tst_qmovie.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -137,10 +137,6 @@ void tst_QMovie::playMovie_data()
{
QTest::addColumn<QString>("fileName");
QTest::addColumn<int>("frameCount");
-#if defined(QTEST_HAVE_MNG) && !defined(Q_OS_WINCE)
- // Qt/WinCE runs out of memory for this one...
- QTest::newRow("home") << QString("animations/dutch.mng") << 10;
-#endif
#ifdef QTEST_HAVE_GIF
QTest::newRow("comicsecard") << QString("animations/comicsecard.gif") << 5;
QTest::newRow("trolltech") << QString("animations/trolltech.gif") << 34;
@@ -191,7 +187,7 @@ void tst_QMovie::jumpToFrame_data()
void tst_QMovie::jumpToFrame()
{
QFETCH(QString, fileName);
- QMovie movie(fileName);
+ QMovie movie(QFINDTESTDATA(fileName));
movie.start();
movie.stop();
QVERIFY(movie.jumpToFrame(-1) == false);
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index d4dc254dcb..8c2db9bed7 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro
index fc09164c46..15098770c6 100644
--- a/tests/auto/gui/image/qpixmap/qpixmap.pro
+++ b/tests/auto/gui/image/qpixmap/qpixmap.pro
@@ -4,25 +4,9 @@ TARGET = tst_qpixmap
QT += core-private gui-private widgets widgets-private testlib
SOURCES += tst_qpixmap.cpp
-wince* {
- task31722_0.files = convertFromImage/task31722_0/*.png
- task31722_0.path = convertFromImage/task31722_0
-
- task31722_1.files = convertFromImage/task31722_1/*.png
- task31722_1.path = convertFromImage/task31722_1
-
- icons.files = convertFromToHICON/*
- icons.path = convertFromToHICON
-
- loadFromData.files = loadFromData/*
- loadFromData.path = loadFromData
-
- DEPLOYMENT += task31722_0 task31722_1 icons loadFromData
- DEFINES += SRCDIR=\\\".\\\"
- DEPLOYMENT_PLUGIN += qico
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
+!wince* {
win32:LIBS += -lgdi32 -luser32
}
RESOURCES += qpixmap.qrc
+TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/*
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 7ae680dbdb..527dcce916 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -79,6 +79,7 @@ public:
public slots:
void init();
void cleanup();
+ void cleanupTestCase();
private slots:
void swap();
@@ -215,6 +216,11 @@ void tst_QPixmap::cleanup()
{
}
+void tst_QPixmap::cleanupTestCase()
+{
+ QFile::remove(QLatin1String("temp_image.png"));
+}
+
void tst_QPixmap::swap()
{
QPixmap p1( 16, 16 ), p2( 32, 32 );
@@ -300,7 +306,7 @@ void tst_QPixmap::convertFromImage_data()
{
QTest::addColumn<QImage>("img1");
QTest::addColumn<QImage>("img2");
- const QString prefix = QLatin1String(SRCDIR) + "/convertFromImage";
+ const QString prefix = QFINDTESTDATA("convertFromImage");
{
QImage img1;
@@ -853,12 +859,14 @@ void tst_QPixmap::convertFromImageDetach()
#if defined(Q_OS_WIN)
+QT_BEGIN_NAMESPACE
Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap);
Q_GUI_EXPORT HBITMAP qt_pixmapToWinHBITMAP(const QPixmap &p, int hbitmapFormat = 0);
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0);
Q_GUI_EXPORT HICON qt_pixmapToWinHICON(const QPixmap &p);
Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h);
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHICON(HICON icon);
+QT_END_NAMESPACE
void tst_QPixmap::toWinHBITMAP_data()
{
@@ -994,7 +1002,7 @@ void tst_QPixmap::toWinHICON_data()
QTest::addColumn<int>("width");
QTest::addColumn<int>("height");
- const QString prefix = QLatin1String(SRCDIR) + "/convertFromToHICON";
+ const QString prefix = QFINDTESTDATA("convertFromToHICON");
QTest::newRow("32bpp_16x16") << prefix + QLatin1String("/icon_32bpp") << 16 << 16;
QTest::newRow("32bpp_32x32") << prefix + QLatin1String("/icon_32bpp") << 32 << 32;
@@ -1290,7 +1298,7 @@ void tst_QPixmap::loadFromDataImage_data()
{
QTest::addColumn<QString>("imagePath");
- const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
+ const QString prefix = QFINDTESTDATA("loadFromData");
QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png";
// When no extension is provided we try all extensions that has been registered by image providers
@@ -1324,7 +1332,7 @@ void tst_QPixmap::fromImageReader_data()
{
QTest::addColumn<QString>("imagePath");
- const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
+ const QString prefix = QFINDTESTDATA("loadFromData");
QTest::newRow("designer_argb32.png") << prefix + "/designer_argb32.png";
QTest::newRow("designer_indexed8_no_alpha.png") << prefix + "/designer_indexed8_no_alpha.png";
@@ -1362,7 +1370,7 @@ void tst_QPixmap::fromImageReaderAnimatedGif()
{
QFETCH(QString, imagePath);
- const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
+ const QString prefix = QFINDTESTDATA("loadFromData");
const QString path = prefix + imagePath;
QImageReader referenceReader(path);
diff --git a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index c79e42f908..0127e2cc83 100644
--- a/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/auto/gui/image/qpixmapcache/tst_qpixmapcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
index 91ba2332d1..c9b2e054da 100644
--- a/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp b/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp
index 158ccc5770..f203cfec0f 100644
--- a/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp
+++ b/tests/auto/gui/image/qvolatileimage/tst_qvolatileimage.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index e473463828..1adae128cf 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -6,7 +6,7 @@ SUBDIRS=\
qfileopenevent \
qguimetatype \
qguivariant \
- qinputpanel \
+ qinputmethod \
qkeysequence \
qmouseevent \
qmouseevent_modal \
@@ -15,3 +15,4 @@ SUBDIRS=\
qshortcut \
qtouchevent \
qwindow \
+ qguiapplication \
diff --git a/tests/auto/gui/kernel/qclipboard/copier/main.cpp b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
index 7e3efa03ba..bbce35a15d 100644
--- a/tests/auto/gui/kernel/qclipboard/copier/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qclipboard/paster/main.cpp b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
index 3ca4886f0b..473ea8bd42 100644
--- a/tests/auto/gui/kernel/qclipboard/paster/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qclipboard/qclipboard.pro b/tests/auto/gui/kernel/qclipboard/qclipboard.pro
index 692ca5dd3f..d97c58dea0 100644
--- a/tests/auto/gui/kernel/qclipboard/qclipboard.pro
+++ b/tests/auto/gui/kernel/qclipboard/qclipboard.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
-SUBDIRS = test copier paster
-
-
+SUBDIRS = copier paster
+test.depends += $$SUBDIRS
+SUBDIRS += test
diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro
index 1c92fa4107..4be6769592 100644
--- a/tests/auto/gui/kernel/qclipboard/test/test.pro
+++ b/tests/auto/gui/kernel/qclipboard/test/test.pro
@@ -12,12 +12,11 @@ win32 {
}
wince* {
- copier.files = ../copier/copier.exe
- copier.path = copier
- paster.files = ../paster/paster.exe
- paster.path = paster
-
- DEPLOYMENT += copier paster rsc reg_resource
+ DEPLOYMENT += rsc reg_resource
}
mac: CONFIG += insignificant_test # QTBUG-23057
+
+load(testcase) # for target.path and installTestHelperApp()
+installTestHelperApp("../copier/copier",copier,copier)
+installTestHelperApp("../paster/paster",paster,paster)
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index fcba0958e7..e1b0535e2f 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,7 +46,7 @@
#include <QtCore/QDir>
#include <QtGui/QGuiApplication>
#include <QtGui/QClipboard>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
#endif
@@ -74,7 +74,7 @@ void tst_QClipboard::init()
bool tst_QClipboard::nativeClipboardWorking()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)
@@ -295,7 +295,7 @@ void tst_QClipboard::setMimeData()
QCOMPARE(spySelection.count(), 1);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 0);
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
QCOMPARE(spySelection.count(), 0);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 1);
@@ -328,7 +328,7 @@ void tst_QClipboard::setMimeData()
QCOMPARE(spySelection.count(), 1);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 0);
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
QCOMPARE(spySelection.count(), 0);
QCOMPARE(spyData.count(), 1);
QCOMPARE(spyFindBuffer.count(), 1);
diff --git a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
index 47ff1b05f1..ae9cd55b7c 100644
--- a/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
+++ b/tests/auto/gui/kernel/qdrag/tst_qdrag.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
index f0771330f7..1d60ff2609 100644
--- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp
+++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
index 0c0bff551b..9d138f6a2e 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
index 207356fe84..770b729761 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro
new file mode 100644
index 0000000000..fffa097d73
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qguiapplication
+QT += core gui testlib
+SOURCES = tst_qguiapplication.cpp
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
new file mode 100644
index 0000000000..2fd875b7f4
--- /dev/null
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QWindow>
+#include <QDebug>
+
+class tst_QGuiApplication: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void focusObject();
+ void allWindows();
+ void topLevelWindows();
+};
+
+class DummyWindow : public QWindow
+{
+public:
+ DummyWindow() : m_focusObject(0) {}
+
+ virtual QObject *focusObject() const
+ {
+ return m_focusObject;
+ }
+
+ void setFocusObject(QObject *object)
+ {
+ m_focusObject = object;
+ emit focusObjectChanged(object);
+ }
+
+ QObject *m_focusObject;
+};
+
+
+void tst_QGuiApplication::focusObject()
+{
+ int argc = 0;
+ QGuiApplication app(argc, 0);
+
+ QObject obj1, obj2, obj3;
+ DummyWindow window1;
+ DummyWindow window2;
+ window1.show();
+
+ QSignalSpy spy(&app, SIGNAL(focusObjectChanged(QObject *)));
+
+
+ // verify active window focus propagates to qguiapplication
+ QTest::qWaitForWindowShown(&window1);
+ window1.requestActivateWindow();
+ QTRY_COMPARE(app.focusWindow(), &window1);
+
+ window1.setFocusObject(&obj1);
+ QCOMPARE(app.focusObject(), &obj1);
+ QCOMPARE(spy.count(), 1);
+
+ spy.clear();
+ window1.setFocusObject(&obj2);
+ QCOMPARE(app.focusObject(), &obj2);
+ QCOMPARE(spy.count(), 1);
+
+ spy.clear();
+ window2.setFocusObject(&obj3);
+ QCOMPARE(app.focusObject(), &obj2); // not yet changed
+ window2.show();
+ QTest::qWaitForWindowShown(&window2);
+ QTRY_COMPARE(app.focusWindow(), &window2);
+ QCOMPARE(app.focusObject(), &obj3);
+ QCOMPARE(spy.count(), 1);
+
+ // focus change on unfocused window does not show
+ spy.clear();
+ window1.setFocusObject(&obj1);
+ QCOMPARE(spy.count(), 0);
+ QCOMPARE(app.focusObject(), &obj3);
+}
+
+void tst_QGuiApplication::allWindows()
+{
+ int argc = 0;
+ QGuiApplication app(argc, 0);
+ QWindow *window1 = new QWindow;
+ QWindow *window2 = new QWindow(window1);
+ QVERIFY(app.allWindows().contains(window1));
+ QVERIFY(app.allWindows().contains(window2));
+ QCOMPARE(app.allWindows().count(), 2);
+ delete window1;
+ window1 = 0;
+ window2 = 0;
+ QVERIFY(!app.allWindows().contains(window2));
+ QVERIFY(!app.allWindows().contains(window1));
+ QCOMPARE(app.allWindows().count(), 0);
+}
+
+void tst_QGuiApplication::topLevelWindows()
+{
+ int argc = 0;
+ QGuiApplication app(argc, 0);
+ QWindow *window1 = new QWindow;
+ QWindow *window2 = new QWindow(window1);
+ QVERIFY(app.topLevelWindows().contains(window1));
+ QVERIFY(!app.topLevelWindows().contains(window2));
+ QCOMPARE(app.topLevelWindows().count(), 1);
+ delete window1;
+ window1 = 0;
+ window2 = 0;
+ QVERIFY(!app.topLevelWindows().contains(window2));
+ QVERIFY(!app.topLevelWindows().contains(window1));
+ QCOMPARE(app.topLevelWindows().count(), 0);
+}
+
+QTEST_APPLESS_MAIN(tst_QGuiApplication)
+#include "tst_qguiapplication.moc"
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index d0f12ea945..0514eafa2d 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp
index 56a1fb0d8f..90984eb9f9 100644
--- a/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/tst_qguivariant.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro b/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro
new file mode 100644
index 0000000000..015cc782eb
--- /dev/null
+++ b/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro
@@ -0,0 +1,4 @@
+CONFIG += testcase
+TARGET = tst_qinputmethod
+SOURCES += tst_qinputmethod.cpp
+QT += core-private gui-private testlib
diff --git a/tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
index b46899a84d..c10d954489 100644
--- a/tests/auto/gui/kernel/qinputpanel/tst_qinputpanel.cpp
+++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
#include <QtTest/QtTest>
#include <private/qguiapplication_p.h>
-#include <private/qinputpanel_p.h>
+#include <private/qinputmethod_p.h>
#include <qplatforminputcontext_qpa.h>
class PlatformInputContext : public QPlatformInputContext
@@ -57,7 +57,7 @@ public:
m_localeCallCount(0),
m_inputDirectionCallCount(0),
m_lastQueries(Qt::ImhNone),
- m_action(QInputPanel::Click),
+ m_action(QInputMethod::Click),
m_cursorPosition(0),
m_lastEventType(QEvent::None)
{}
@@ -72,7 +72,7 @@ public:
m_updateCallCount++;
m_lastQueries = queries;
}
- virtual void invokeAction(QInputPanel::Action action, int cursorPosition)
+ virtual void invokeAction(QInputMethod::Action action, int cursorPosition)
{
m_action = action;
m_cursorPosition = cursorPosition;
@@ -112,7 +112,7 @@ public:
mutable int m_localeCallCount;
mutable int m_inputDirectionCallCount;
Qt::InputMethodQueries m_lastQueries;
- QInputPanel::Action m_action;
+ QInputMethod::Action m_action;
int m_cursorPosition;
int m_lastEventType;
QRectF m_keyboardRect;
@@ -139,12 +139,12 @@ public:
Qt::InputMethodQueries m_lastQueries;
};
-class tst_qinputpanel : public QObject
+class tst_qinputmethod : public QObject
{
Q_OBJECT
public:
- tst_qinputpanel() {}
- virtual ~tst_qinputpanel() {}
+ tst_qinputmethod() {}
+ virtual ~tst_qinputmethod() {}
private slots:
void initTestCase();
void visible();
@@ -164,158 +164,158 @@ private:
PlatformInputContext m_platformInputContext;
};
-void tst_qinputpanel::initTestCase()
+void tst_qinputmethod::initTestCase()
{
- QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
- inputPanelPrivate->testContext = &m_platformInputContext;
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = &m_platformInputContext;
}
-void tst_qinputpanel::visible()
+void tst_qinputmethod::visible()
{
- QCOMPARE(qApp->inputPanel()->visible(), false);
- qApp->inputPanel()->show();
- QCOMPARE(qApp->inputPanel()->visible(), true);
+ QCOMPARE(qApp->inputMethod()->visible(), false);
+ qApp->inputMethod()->show();
+ QCOMPARE(qApp->inputMethod()->visible(), true);
- qApp->inputPanel()->hide();
- QCOMPARE(qApp->inputPanel()->visible(), false);
+ qApp->inputMethod()->hide();
+ QCOMPARE(qApp->inputMethod()->visible(), false);
- qApp->inputPanel()->setVisible(true);
- QCOMPARE(qApp->inputPanel()->visible(), true);
+ qApp->inputMethod()->setVisible(true);
+ QCOMPARE(qApp->inputMethod()->visible(), true);
- qApp->inputPanel()->setVisible(false);
- QCOMPARE(qApp->inputPanel()->visible(), false);
+ qApp->inputMethod()->setVisible(false);
+ QCOMPARE(qApp->inputMethod()->visible(), false);
}
-void tst_qinputpanel::animating()
+void tst_qinputmethod::animating()
{
- QCOMPARE(qApp->inputPanel()->isAnimating(), false);
+ QCOMPARE(qApp->inputMethod()->isAnimating(), false);
m_platformInputContext.m_animating = true;
- QCOMPARE(qApp->inputPanel()->isAnimating(), true);
+ QCOMPARE(qApp->inputMethod()->isAnimating(), true);
m_platformInputContext.m_animating = false;
- QCOMPARE(qApp->inputPanel()->isAnimating(), false);
+ QCOMPARE(qApp->inputMethod()->isAnimating(), false);
- QSignalSpy spy(qApp->inputPanel(), SIGNAL(animatingChanged()));
+ QSignalSpy spy(qApp->inputMethod(), SIGNAL(animatingChanged()));
m_platformInputContext.emitAnimatingChanged();
QCOMPARE(spy.count(), 1);
}
-void tst_qinputpanel::keyboarRectangle()
+void tst_qinputmethod::keyboarRectangle()
{
- QCOMPARE(qApp->inputPanel()->keyboardRectangle(), QRectF());
+ QCOMPARE(qApp->inputMethod()->keyboardRectangle(), QRectF());
m_platformInputContext.m_keyboardRect = QRectF(10, 20, 30, 40);
- QCOMPARE(qApp->inputPanel()->keyboardRectangle(), QRectF(10, 20, 30, 40));
+ QCOMPARE(qApp->inputMethod()->keyboardRectangle(), QRectF(10, 20, 30, 40));
- QSignalSpy spy(qApp->inputPanel(), SIGNAL(keyboardRectangleChanged()));
+ QSignalSpy spy(qApp->inputMethod(), SIGNAL(keyboardRectangleChanged()));
m_platformInputContext.emitKeyboardRectChanged();
QCOMPARE(spy.count(), 1);
}
-void tst_qinputpanel::inputItem()
+void tst_qinputmethod::inputItem()
{
- QVERIFY(!qApp->inputPanel()->inputItem());
- QSignalSpy spy(qApp->inputPanel(), SIGNAL(inputItemChanged()));
+ QVERIFY(!qApp->inputMethod()->inputItem());
+ QSignalSpy spy(qApp->inputMethod(), SIGNAL(inputItemChanged()));
- qApp->inputPanel()->setInputItem(&m_inputItem);
+ qApp->inputMethod()->setInputItem(&m_inputItem);
- QCOMPARE(qApp->inputPanel()->inputItem(), &m_inputItem);
+ QCOMPARE(qApp->inputMethod()->inputItem(), &m_inputItem);
QCOMPARE(spy.count(), 1);
// reset
- qApp->inputPanel()->setInputItem(0);
+ qApp->inputMethod()->setInputItem(0);
}
-void tst_qinputpanel::inputItemTransform()
+void tst_qinputmethod::inputItemTransform()
{
- QCOMPARE(qApp->inputPanel()->inputItemTransform(), QTransform());
- QSignalSpy spy(qApp->inputPanel(), SIGNAL(cursorRectangleChanged()));
+ QCOMPARE(qApp->inputMethod()->inputItemTransform(), QTransform());
+ QSignalSpy spy(qApp->inputMethod(), SIGNAL(cursorRectangleChanged()));
QTransform transform;
transform.translate(10, 10);
transform.scale(2, 2);
transform.shear(2, 2);
- qApp->inputPanel()->setInputItemTransform(transform);
+ qApp->inputMethod()->setInputItemTransform(transform);
- QCOMPARE(qApp->inputPanel()->inputItemTransform(), transform);
+ QCOMPARE(qApp->inputMethod()->inputItemTransform(), transform);
QCOMPARE(spy.count(), 1);
// reset
- qApp->inputPanel()->setInputItemTransform(QTransform());
+ qApp->inputMethod()->setInputItemTransform(QTransform());
}
-void tst_qinputpanel::cursorRectangle()
+void tst_qinputmethod::cursorRectangle()
{
- QCOMPARE(qApp->inputPanel()->cursorRectangle(), QRectF());
+ QCOMPARE(qApp->inputMethod()->cursorRectangle(), QRectF());
QTransform transform;
transform.translate(10, 10);
transform.scale(2, 2);
transform.shear(2, 2);
- qApp->inputPanel()->setInputItemTransform(transform);
- qApp->inputPanel()->setInputItem(&m_inputItem);
+ qApp->inputMethod()->setInputItemTransform(transform);
+ qApp->inputMethod()->setInputItem(&m_inputItem);
- QCOMPARE(qApp->inputPanel()->cursorRectangle(), transform.mapRect(QRectF(1, 2, 3, 4)));
+ QCOMPARE(qApp->inputMethod()->cursorRectangle(), transform.mapRect(QRectF(1, 2, 3, 4)));
// reset
- qApp->inputPanel()->setInputItem(0);
- qApp->inputPanel()->setInputItemTransform(QTransform());
+ qApp->inputMethod()->setInputItem(0);
+ qApp->inputMethod()->setInputItemTransform(QTransform());
}
-void tst_qinputpanel::invokeAction()
+void tst_qinputmethod::invokeAction()
{
- QCOMPARE(m_platformInputContext.m_action, QInputPanel::Click);
+ QCOMPARE(m_platformInputContext.m_action, QInputMethod::Click);
QCOMPARE(m_platformInputContext.m_cursorPosition, 0);
- qApp->inputPanel()->invokeAction(QInputPanel::ContextMenu, 5);
- QCOMPARE(m_platformInputContext.m_action, QInputPanel::ContextMenu);
+ qApp->inputMethod()->invokeAction(QInputMethod::ContextMenu, 5);
+ QCOMPARE(m_platformInputContext.m_action, QInputMethod::ContextMenu);
QCOMPARE(m_platformInputContext.m_cursorPosition, 5);
}
-void tst_qinputpanel::reset()
+void tst_qinputmethod::reset()
{
QCOMPARE(m_platformInputContext.m_resetCallCount, 0);
- qApp->inputPanel()->reset();
+ qApp->inputMethod()->reset();
QCOMPARE(m_platformInputContext.m_resetCallCount, 1);
- qApp->inputPanel()->reset();
+ qApp->inputMethod()->reset();
QCOMPARE(m_platformInputContext.m_resetCallCount, 2);
}
-void tst_qinputpanel::commit()
+void tst_qinputmethod::commit()
{
QCOMPARE(m_platformInputContext.m_commitCallCount, 0);
- qApp->inputPanel()->commit();
+ qApp->inputMethod()->commit();
QCOMPARE(m_platformInputContext.m_commitCallCount, 1);
- qApp->inputPanel()->commit();
+ qApp->inputMethod()->commit();
QCOMPARE(m_platformInputContext.m_commitCallCount, 2);
}
-void tst_qinputpanel::update()
+void tst_qinputmethod::update()
{
- qApp->inputPanel()->setInputItem(&m_inputItem);
+ qApp->inputMethod()->setInputItem(&m_inputItem);
QCOMPARE(m_platformInputContext.m_updateCallCount, 0);
QCOMPARE(int(m_platformInputContext.m_lastQueries), int(Qt::ImhNone));
- qApp->inputPanel()->update(Qt::ImQueryInput);
+ qApp->inputMethod()->update(Qt::ImQueryInput);
QCOMPARE(m_platformInputContext.m_updateCallCount, 1);
QCOMPARE(int(m_platformInputContext.m_lastQueries), int(Qt::ImQueryInput));
- qApp->inputPanel()->update(Qt::ImQueryAll);
+ qApp->inputMethod()->update(Qt::ImQueryAll);
QCOMPARE(m_platformInputContext.m_updateCallCount, 2);
QCOMPARE(int(m_platformInputContext.m_lastQueries), int(Qt::ImQueryAll));
- QCOMPARE(qApp->inputPanel()->keyboardRectangle(), QRectF(10, 20, 30, 40));
+ QCOMPARE(qApp->inputMethod()->keyboardRectangle(), QRectF(10, 20, 30, 40));
// reset
- qApp->inputPanel()->setInputItem(0);
+ qApp->inputMethod()->setInputItem(0);
}
-void tst_qinputpanel::query()
+void tst_qinputmethod::query()
{
QInputMethodQueryEvent query(Qt::InputMethodQueries(Qt::ImPreferredLanguage | Qt::ImCursorRectangle));
QGuiApplication::sendEvent(&m_inputItem, &query);
@@ -327,16 +327,16 @@ void tst_qinputpanel::query()
QCOMPARE(cursorRectangle, QRect(1,2,3,4));
}
-void tst_qinputpanel::inputDirection()
+void tst_qinputmethod::inputDirection()
{
QCOMPARE(m_platformInputContext.m_inputDirectionCallCount, 0);
- qApp->inputPanel()->inputDirection();
+ qApp->inputMethod()->inputDirection();
QCOMPARE(m_platformInputContext.m_inputDirectionCallCount, 1);
QCOMPARE(m_platformInputContext.m_localeCallCount, 0);
- qApp->inputPanel()->locale();
+ qApp->inputMethod()->locale();
QCOMPARE(m_platformInputContext.m_localeCallCount, 1);
}
-QTEST_MAIN(tst_qinputpanel)
-#include "tst_qinputpanel.moc"
+QTEST_MAIN(tst_qinputmethod)
+#include "tst_qinputmethod.moc"
diff --git a/tests/auto/gui/kernel/qinputpanel/qinputpanel.pro b/tests/auto/gui/kernel/qinputpanel/qinputpanel.pro
deleted file mode 100644
index 5e3f4b1504..0000000000
--- a/tests/auto/gui/kernel/qinputpanel/qinputpanel.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qinputpanel
-SOURCES += tst_qinputpanel.cpp
-QT += core-private gui-private testlib
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index fcc30a7afe..eed7977c82 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,7 +47,7 @@
#include <QTranslator>
#include <QLibraryInfo>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
struct MacSpecialKey {
int key;
@@ -144,7 +144,7 @@ private slots:
private:
QTranslator *ourTranslator;
QTranslator *qtTranslator;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static const QString MacCtrl;
static const QString MacMeta;
static const QString MacAlt;
@@ -154,7 +154,7 @@ private:
};
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
const QString tst_QKeySequence::MacCtrl = QString(QChar(0x2318));
const QString tst_QKeySequence::MacMeta = QString(QChar(0x2303));
const QString tst_QKeySequence::MacAlt = QString(QChar(0x2325));
@@ -195,7 +195,7 @@ void tst_QKeySequence::operatorQString_data()
QTest::newRow( "No modifier" ) << 0 << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "\x0c5" );
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::newRow( "Ctrl+Left" ) << int(Qt::CTRL) << int(Qt::Key_Left) << QString( "Ctrl+Left" );
QTest::newRow( "Ctrl+," ) << int(Qt::CTRL) << int(Qt::Key_Comma) << QString( "Ctrl+," );
QTest::newRow( "Alt+Left" ) << int(Qt::ALT) << int(Qt::Key_Left) << QString( "Alt+Left" );
@@ -339,7 +339,7 @@ void tst_QKeySequence::standardKeys_data()
QTest::newRow("zoomOut") << (int)QKeySequence::ZoomOut<< QString("CTRL+-");
QTest::newRow("whatsthis") << (int)QKeySequence::WhatsThis<< QString("SHIFT+F1");
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QTest::newRow("help") << (int)QKeySequence::HelpContents<< QString("Ctrl+?");
QTest::newRow("nextChild") << (int)QKeySequence::NextChild << QString("CTRL+}");
QTest::newRow("previousChild") << (int)QKeySequence::PreviousChild << QString("CTRL+{");
@@ -371,7 +371,7 @@ void tst_QKeySequence::keyBindings()
{
QList<QKeySequence> bindings = QKeySequence::keyBindings(QKeySequence::Copy);
QList<QKeySequence> expected;
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
expected << QKeySequence("CTRL+C");
#elif defined Q_WS_X11
expected << QKeySequence("CTRL+C") << QKeySequence("F16") << QKeySequence("CTRL+INSERT");
@@ -402,7 +402,7 @@ void tst_QKeySequence::mnemonic_data()
void tst_QKeySequence::mnemonic()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("mnemonics are not used on Mac OS X");
#endif
QFETCH(QString, string);
@@ -429,7 +429,7 @@ void tst_QKeySequence::toString_data()
QTest::addColumn<QString>("platformString");
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::newRow("Ctrl+Left") << QString("Ctrl+Left") << QString("Ctrl+Left") << QString("Ctrl+Left");
QTest::newRow("Alt+Left") << QString("Alt+Left") << QString("Alt+Left") << QString("Alt+Left");
QTest::newRow("Alt+Shift+Left") << QString("Alt+Shift+Left") << QString("Alt+Shift+Left") << QString("Alt+Shift+Left");
@@ -529,17 +529,46 @@ void tst_QKeySequence::parseString_data()
QTest::addColumn<QString>("strSequence");
QTest::addColumn<QKeySequence>("keycode");
+ // Valid
QTest::newRow("A") << "A" << QKeySequence(Qt::Key_A);
QTest::newRow("a") << "a" << QKeySequence(Qt::Key_A);
QTest::newRow("Ctrl+Left") << "Ctrl+Left" << QKeySequence(Qt::CTRL + Qt::Key_Left);
- QTest::newRow("Ctrl++") << "Ctrl++" << QKeySequence(Qt::CTRL + Qt::Key_Plus);
+ QTest::newRow("CTRL+LEFT") << "CTRL+LEFT" << QKeySequence(Qt::CTRL + Qt::Key_Left);
QTest::newRow("Meta+A") << "Meta+a" << QKeySequence(Qt::META + Qt::Key_A);
+ QTest::newRow("mEtA+A") << "mEtA+a" << QKeySequence(Qt::META + Qt::Key_A);
+ QTest::newRow("Ctrl++") << "Ctrl++" << QKeySequence(Qt::CTRL + Qt::Key_Plus);
+
+ // Invalid modifiers
QTest::newRow("Win+A") << "Win+a" << QKeySequence(Qt::Key_unknown);
- QTest::newRow("4+3=2") << "4+3=2" << QKeySequence(Qt::Key_unknown);
QTest::newRow("Super+Meta+A") << "Super+Meta+A" << QKeySequence(Qt::Key_unknown);
+
+ // Invalid Keys
QTest::newRow("Meta+Trolls") << "Meta+Trolls" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Meta+Period") << "Meta+Period" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Meta+Ypsilon") << "Meta+Ypsilon" << QKeySequence(Qt::Key_unknown);
+
+ // Garbage
+ QTest::newRow("4+3=2") << "4+3=2" << QKeySequence(Qt::Key_unknown);
QTest::newRow("Alabama") << "Alabama" << QKeySequence(Qt::Key_unknown);
QTest::newRow("Simon+G") << "Simon+G" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Shift+++2") << "Shift+++2" << QKeySequence(Qt::Key_unknown);
+
+ // Wrong order
+ QTest::newRow("A+Meta") << "a+Meta" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Meta+++Shift") << "Meta+++Shift" << QKeySequence(Qt::Key_unknown);
+ QTest::newRow("Meta+a+Shift") << "Meta+a+Shift" << QKeySequence(Qt::Key_unknown);
+
+ // Only Modifiers - currently not supported
+ //QTest::newRow("Meta+Shift") << "Meta+Shift" << QKeySequence(Qt::META + Qt::SHIFT);
+ //QTest::newRow("Ctrl") << "Ctrl" << QKeySequence(Qt::CTRL);
+ //QTest::newRow("Shift") << "Shift" << QKeySequence(Qt::SHIFT);
+
+ // Only Keys
+ QTest::newRow("a") << "a" << QKeySequence(Qt::Key_A);
+ QTest::newRow("A") << "A" << QKeySequence(Qt::Key_A);
+
+ // Incomplete
+ QTest::newRow("Meta+Shift+") << "Meta+Shift+" << QKeySequence(Qt::Key_unknown);
}
void tst_QKeySequence::parseString()
@@ -608,7 +637,7 @@ void tst_QKeySequence::translated()
{
QFETCH(QString, transKey);
QFETCH(QString, compKey);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("No need to translate modifiers on Mac OS X");
#elif defined(Q_OS_WINCE)
QSKIP("No need to translate modifiers on WinCE");
diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
index aca3ffc9cb..d8f1f0640e 100644
--- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
+++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
index ce006eaa99..d2627fe378 100644
--- a/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
+++ b/tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index 5474c4097d..cc46831965 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
index ab798a7351..475b6ca2a8 100644
--- a/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
+++ b/tests/auto/gui/kernel/qscreen/tst_qscreen.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -90,6 +90,11 @@ void tst_QScreen::angleBetween_data()
<< uint(Qt::InvertedLandscapeOrientation)
<< uint(Qt::LandscapeOrientation)
<< 180;
+
+ QTest::newRow("Landscape Primary")
+ << uint(Qt::LandscapeOrientation)
+ << uint(Qt::PrimaryOrientation)
+ << QGuiApplication::primaryScreen()->angleBetween(Qt::LandscapeOrientation, QGuiApplication::primaryScreen()->primaryOrientation());
}
void tst_QScreen::angleBetween()
@@ -101,8 +106,8 @@ void tst_QScreen::angleBetween()
Qt::ScreenOrientation a = Qt::ScreenOrientation(oa);
Qt::ScreenOrientation b = Qt::ScreenOrientation(ob);
- QCOMPARE(QScreen::angleBetween(a, b), expected);
- QCOMPARE(QScreen::angleBetween(b, a), (360 - expected) % 360);
+ QCOMPARE(QGuiApplication::primaryScreen()->angleBetween(a, b), expected);
+ QCOMPARE(QGuiApplication::primaryScreen()->angleBetween(b, a), (360 - expected) % 360);
}
void tst_QScreen::transformBetween_data()
@@ -149,6 +154,12 @@ void tst_QScreen::transformBetween_data()
<< uint(Qt::LandscapeOrientation)
<< rect
<< QTransform(-1, 0, 0, -1, rect.width(), rect.height());
+
+ QTest::newRow("Landscape Primary")
+ << uint(Qt::LandscapeOrientation)
+ << uint(Qt::PrimaryOrientation)
+ << rect
+ << QGuiApplication::primaryScreen()->transformBetween(Qt::LandscapeOrientation, QGuiApplication::primaryScreen()->primaryOrientation(), rect);
}
void tst_QScreen::transformBetween()
@@ -161,7 +172,7 @@ void tst_QScreen::transformBetween()
Qt::ScreenOrientation a = Qt::ScreenOrientation(oa);
Qt::ScreenOrientation b = Qt::ScreenOrientation(ob);
- QCOMPARE(QScreen::transformBetween(a, b, rect), expected);
+ QCOMPARE(QGuiApplication::primaryScreen()->transformBetween(a, b, rect), expected);
}
void tst_QScreen::orientationChange()
@@ -169,10 +180,10 @@ void tst_QScreen::orientationChange()
QScreen *screen = QGuiApplication::primaryScreen();
QWindowSystemInterface::handleScreenOrientationChange(screen, Qt::LandscapeOrientation);
- QTRY_COMPARE(screen->currentOrientation(), Qt::LandscapeOrientation);
+ QTRY_COMPARE(screen->orientation(), Qt::LandscapeOrientation);
QWindowSystemInterface::handleScreenOrientationChange(screen, Qt::PortraitOrientation);
- QTRY_COMPARE(screen->currentOrientation(), Qt::PortraitOrientation);
+ QTRY_COMPARE(screen->orientation(), Qt::PortraitOrientation);
}
#include <tst_qscreen.moc>
diff --git a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
index 228b73414e..97c749e5ba 100644
--- a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
index 95e644987f..391600dd57 100644
--- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 77fffef13a..d7c153dca1 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -57,6 +57,8 @@ private slots:
void touchToMouseTranslation();
void mouseToTouchTranslation();
void mouseToTouchLoop();
+ void orientation();
+ void close();
void initTestCase()
{
touchDevice = new QTouchDevice;
@@ -246,10 +248,12 @@ public:
keyReleaseCode = event->key();
}
void mousePressEvent(QMouseEvent *event) {
- if (ignoreMouse)
+ if (ignoreMouse) {
event->ignore();
- else
+ } else {
mousePressButton = event->button();
+ mousePressScreenPos = event->screenPos();
+ }
}
void mouseReleaseEvent(QMouseEvent *event) {
if (ignoreMouse)
@@ -257,6 +261,14 @@ public:
else
mouseReleaseButton = event->button();
}
+ void mouseMoveEvent(QMouseEvent *event) {
+ if (ignoreMouse) {
+ event->ignore();
+ } else {
+ mouseMoveButton = event->button();
+ mouseMoveScreenPos = event->screenPos();
+ }
+ }
void touchEvent(QTouchEvent *event) {
if (ignoreTouch) {
event->ignore();
@@ -285,7 +297,8 @@ public:
}
int keyPressCode, keyReleaseCode;
- int mousePressButton, mouseReleaseButton;
+ int mousePressButton, mouseReleaseButton, mouseMoveButton;
+ QPointF mousePressScreenPos, mouseMoveScreenPos;
int touchPressedCount, touchReleasedCount;
bool ignoreMouse, ignoreTouch;
@@ -339,12 +352,25 @@ void tst_QWindow::touchToMouseTranslation()
QList<QWindowSystemInterface::TouchPoint> points;
QWindowSystemInterface::TouchPoint tp1, tp2;
+ const QRectF pressArea(101, 102, 4, 4);
+ const QRectF moveArea(105, 108, 4, 4);
tp1.id = 1;
tp1.state = Qt::TouchPointPressed;
+ tp1.area = pressArea;
tp2.id = 2;
tp2.state = Qt::TouchPointPressed;
points << tp1 << tp2;
QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
+ // Now an update but with changed list order. The mouse event should still
+ // be generated from the point with id 1.
+ tp1.id = 2;
+ tp1.state = Qt::TouchPointStationary;
+ tp2.id = 1;
+ tp2.state = Qt::TouchPointMoved;
+ tp2.area = moveArea;
+ points.clear();
+ points << tp1 << tp2;
+ QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
points[0].state = Qt::TouchPointReleased;
points[1].state = Qt::TouchPointReleased;
QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points);
@@ -352,6 +378,8 @@ void tst_QWindow::touchToMouseTranslation()
QTRY_COMPARE(window.mousePressButton, int(Qt::LeftButton));
QTRY_COMPARE(window.mouseReleaseButton, int(Qt::LeftButton));
+ QTRY_COMPARE(window.mousePressScreenPos, pressArea.center());
+ QTRY_COMPARE(window.mouseMoveScreenPos, moveArea.center());
window.mousePressButton = 0;
window.mouseReleaseButton = 0;
@@ -455,5 +483,41 @@ void tst_QWindow::mouseToTouchLoop()
qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false);
}
+void tst_QWindow::orientation()
+{
+ QWindow window;
+ window.setGeometry(80, 80, 40, 40);
+ window.create();
+
+ window.reportContentOrientationChange(Qt::PortraitOrientation);
+ QCOMPARE(window.contentOrientation(), Qt::PortraitOrientation);
+
+ window.reportContentOrientationChange(Qt::PrimaryOrientation);
+ QCOMPARE(window.contentOrientation(), Qt::PrimaryOrientation);
+
+ QVERIFY(!window.requestWindowOrientation(Qt::LandscapeOrientation) || window.windowOrientation() == Qt::LandscapeOrientation);
+ QVERIFY(!window.requestWindowOrientation(Qt::PortraitOrientation) || window.windowOrientation() == Qt::PortraitOrientation);
+ QVERIFY(!window.requestWindowOrientation(Qt::PrimaryOrientation) || window.windowOrientation() == Qt::PrimaryOrientation);
+
+ QSignalSpy spy(&window, SIGNAL(contentOrientationChanged(Qt::ScreenOrientation)));
+ window.reportContentOrientationChange(Qt::LandscapeOrientation);
+ QCOMPARE(spy.count(), 1);
+}
+
+void tst_QWindow::close()
+{
+ QWindow a;
+ QWindow b;
+ QWindow c(&a);
+
+ a.show();
+ b.show();
+
+ // we can not close a non top level window
+ QVERIFY(!c.close());
+ QVERIFY(a.close());
+ QVERIFY(b.close());
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow);
diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
index 2c006b224e..698470ac60 100644
--- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
+++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
index 77bd22a676..1690afcac4 100644
--- a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp b/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
index 1ebad41466..067773074e 100644
--- a/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
+++ b/tests/auto/gui/math3d/qvectornd/tst_qvectornd.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
index e84cbb5c19..0ff90f69c3 100644
--- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
+++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
index 00a393562a..94e74a52e6 100644
--- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp b/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
index 07ec8458af..9e30a85655 100644
--- a/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
+++ b/tests/auto/gui/painting/qpaintengine/tst_qpaintengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index 716d70c7f5..0209043d20 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -4,13 +4,7 @@ TARGET = tst_qpainter
QT += widgets widgets-private printsupport testlib
SOURCES += tst_qpainter.cpp
-wince* {
- addFiles.files = drawEllipse drawLine_rop_bitmap drawPixmap_rop drawPixmap_rop_bitmap task217400.png
- addFiles.path = .
- DEPLOYMENT += addFiles
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
-
mac*:CONFIG+=insignificant_test
+
+TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
+ task217400.png
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index d6511d4475..553e36a884 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -89,6 +89,7 @@ public:
public slots:
void init();
void cleanup();
+ void cleanupTestCase();
private slots:
void getSetCheck();
void drawPixmap_comp_data();
@@ -364,6 +365,13 @@ void tst_QPainter::cleanup()
{
}
+void tst_QPainter::cleanupTestCase()
+{
+ QFile::remove(QLatin1String("dest.png"));
+ QFile::remove(QLatin1String("expected.png"));
+ QFile::remove(QLatin1String("foo.png"));
+}
+
static const char* const maskSource_data[] = {
"16 13 6 1",
". c None",
@@ -453,7 +461,7 @@ QRgb qt_compose_alpha(QRgb source, QRgb dest)
*/
void tst_QPainter::drawPixmap_comp()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("Mac has other ideas about alpha composition");
#endif
QFETCH(uint, dest);
@@ -1363,7 +1371,7 @@ void tst_QPainter::drawRoundRect()
QFETCH(QRect, rect);
QFETCH(bool, usePen);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (QTest::currentDataTag() == QByteArray("rect(6, 12, 3, 14) with pen") ||
QTest::currentDataTag() == QByteArray("rect(6, 17, 3, 25) with pen") ||
QTest::currentDataTag() == QByteArray("rect(10, 6, 10, 3) with pen") ||
@@ -3108,7 +3116,7 @@ void tst_QPainter::drawImage_task217400()
{
QFETCH(QImage::Format, format);
- const QImage src = QImage(QString(SRCDIR) + "/task217400.png")
+ const QImage src = QImage(QFINDTESTDATA("task217400.png"))
.convertToFormat(format);
QVERIFY(!src.isNull());
diff --git a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
index 4603d9d613..14b1ddbf04 100644
--- a/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
+++ b/tests/auto/gui/painting/qpainter/utils/createImages/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
index 5d48113aa8..bcd009dfb4 100644
--- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,7 +54,8 @@ class tst_QPainterPath : public QObject
Q_OBJECT
public:
-
+public slots:
+ void cleanupTestCase();
private slots:
void getSetCheck();
void swap();
@@ -115,6 +116,11 @@ private slots:
void lineWithinBounds();
};
+void tst_QPainterPath::cleanupTestCase()
+{
+ QFile::remove(QLatin1String("data"));
+}
+
// Testing get/set functions
void tst_QPainterPath::getSetCheck()
{
diff --git a/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp b/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
index 371a142cc3..0b19615069 100644
--- a/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
+++ b/tests/auto/gui/painting/qpainterpathstroker/tst_qpainterpathstroker.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpathclipper/pathcompare.h b/tests/auto/gui/painting/qpathclipper/pathcompare.h
index bb4c00222a..0ac33a7940 100644
--- a/tests/auto/gui/painting/qpathclipper/pathcompare.h
+++ b/tests/auto/gui/painting/qpathclipper/pathcompare.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpathclipper/paths.cpp b/tests/auto/gui/painting/qpathclipper/paths.cpp
index f4e63a200f..853548ac36 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.cpp
+++ b/tests/auto/gui/painting/qpathclipper/paths.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpathclipper/paths.h b/tests/auto/gui/painting/qpathclipper/paths.h
index e270574304..60b32c64d7 100644
--- a/tests/auto/gui/painting/qpathclipper/paths.h
+++ b/tests/auto/gui/painting/qpathclipper/paths.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
index 1e6bb20614..5c5ab53bf2 100644
--- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpen/tst_qpen.cpp b/tests/auto/gui/painting/qpen/tst_qpen.cpp
index 3da7294e9a..c3411bd981 100644
--- a/tests/auto/gui/painting/qpen/tst_qpen.cpp
+++ b/tests/auto/gui/painting/qpen/tst_qpen.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
index 46a8f80f23..5e5f661a09 100644
--- a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
+++ b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
index dd33030d7e..3460ad702b 100644
--- a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
+++ b/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -60,6 +60,23 @@ Q_DECLARE_METATYPE(QRect)
QT_FORWARD_DECLARE_CLASS(QPrinter)
+// Helper class to make sure temp files are cleaned up after test complete
+class TempFileCleanup
+{
+public:
+ TempFileCleanup(const QString &file)
+ : m_file(file)
+ {
+ }
+
+ ~TempFileCleanup()
+ {
+ QFile::remove(m_file);
+ }
+private:
+ QString m_file;
+};
+
class tst_QPrinter : public QObject
{
Q_OBJECT
@@ -288,6 +305,7 @@ void tst_QPrinter::testPageRectAndPaperRect()
QPrinter printer(QPrinter::HighResolution);
printer.setOrientation(QPrinter::Orientation(orientation));
printer.setOutputFileName("silly");
+ TempFileCleanup tmpFile("silly");
QRect pageRect = doPaperRect ? printer.paperRect() : printer.pageRect();
float inchesX = float(pageRect.width()) / float(printer.resolution());
@@ -376,6 +394,7 @@ void tst_QPrinter::testMargins()
if (painter)
delete painter;
+ QFile::remove("silly");
}
void tst_QPrinter::testNonExistentPrinter()
@@ -505,6 +524,7 @@ void tst_QPrinter::outputFormatFromSuffix()
QPrinter p;
QVERIFY(p.outputFormat() == QPrinter::NativeFormat);
p.setOutputFileName("test.pdf");
+ TempFileCleanup tmpFile("test.pdf");
QVERIFY(p.outputFormat() == QPrinter::PdfFormat);
p.setOutputFileName(QString());
QVERIFY(p.outputFormat() == QPrinter::NativeFormat);
@@ -865,6 +885,7 @@ void tst_QPrinter::errorReporting()
QCOMPARE(painter.begin(&p), false); // it should check the output file is writable
#endif
p.setOutputFileName("test.pdf");
+ TempFileCleanup tmpFile("test.pdf");
QCOMPARE(painter.begin(&p), true); // it should check the output
QCOMPARE(p.isValid(), true);
painter.end();
@@ -891,6 +912,7 @@ void tst_QPrinter::printDialogCompleter()
{
QPrintDialog dialog;
dialog.printer()->setOutputFileName("file.pdf");
+ TempFileCleanup tmpFile("file.pdf");
dialog.setEnabledOptions(QAbstractPrintDialog::PrintToFile);
dialog.show();
@@ -917,6 +939,9 @@ static void printPage(QPainter *painter)
void tst_QPrinter::taskQTBUG4497_reusePrinterOnDifferentFiles()
{
+ TempFileCleanup tmpFile1("out1.ps");
+ TempFileCleanup tmpFile2("out2.ps");
+
QPrinter printer;
{
@@ -978,6 +1003,7 @@ void tst_QPrinter::testPdfTitle()
painter.begin(&printer);
painter.end();
}
+ TempFileCleanup tmpFile("file.pdf");
QFile file("file.pdf");
QVERIFY(file.open(QIODevice::ReadOnly));
// The we expect the title to appear in the PDF as:
diff --git a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
index 6ffdc63e6c..d312469449 100644
--- a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
+++ b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -90,7 +90,7 @@ void tst_QPrinterInfo::macFixNameFormat(QString *printerName)
{
// Modify the format of the printer name to match Qt, lpstat returns
// foo___domain_no, Qt returns foo @ domain.no
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
printerName->replace(QLatin1String("___"), QLatin1String(" @ "));
printerName->replace(QLatin1String("_"), QLatin1String("."));
#else
diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp
index c9ad8e00ab..863690fd78 100644
--- a/tests/auto/gui/painting/qregion/tst_qregion.cpp
+++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
index b4e1b8ffb8..c04948899c 100644
--- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
index 725c374708..f4cf586da1 100644
--- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
+++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index 357b7359e4..e8374b0cae 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -130,6 +130,7 @@ struct SharedResource : public QOpenGLSharedResource
void tst_QOpenGL::sharedResourceCleanup()
{
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 10, 10);
window.create();
@@ -152,6 +153,7 @@ void tst_QOpenGL::sharedResourceCleanup()
QOpenGLContext *ctx2 = new QOpenGLContext;
ctx2->setShareContext(ctx);
ctx2->create();
+
delete ctx;
resource->free();
@@ -191,6 +193,7 @@ void tst_QOpenGL::sharedResourceCleanup()
void tst_QOpenGL::multiGroupSharedResourceCleanup()
{
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 10, 10);
window.create();
@@ -212,6 +215,7 @@ void tst_QOpenGL::multiGroupSharedResourceCleanup()
void tst_QOpenGL::multiGroupSharedResourceCleanupCustom()
{
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 10, 10);
window.create();
@@ -348,6 +352,7 @@ void qt_opengl_check_test_pattern(const QImage& img)
void tst_QOpenGL::fboSimpleRendering()
{
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 10, 10);
window.create();
QOpenGLContext ctx;
@@ -391,6 +396,7 @@ void tst_QOpenGL::fboRendering()
#endif
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 10, 10);
window.create();
QOpenGLContext ctx;
@@ -430,6 +436,7 @@ void tst_QOpenGL::fboRendering()
void tst_QOpenGL::fboHandleNulledAfterContextDestroyed()
{
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 10, 10);
window.create();
@@ -459,6 +466,7 @@ void tst_QOpenGL::openGLPaintDevice()
#endif
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 128, 128);
window.create();
@@ -506,6 +514,7 @@ void tst_QOpenGL::openGLPaintDevice()
void tst_QOpenGL::aboutToBeDestroyed()
{
QWindow window;
+ window.setSurfaceType(QWindow::OpenGLSurface);
window.setGeometry(0, 0, 128, 128);
window.create();
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
index d6fff734c0..c609b4a1ed 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 4f1deec996..7eda35efb8 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index c3d41a27bf..ead4c8e71a 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -613,7 +613,7 @@ void tst_QFont::lastResortFont()
void tst_QFont::styleName()
{
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
QSKIP("Only tested on Mac");
#else
QFont font("Helvetica Neue");
diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
index e7bbfbceff..7a1cc53c57 100644
--- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -63,7 +63,7 @@ private slots:
void fixedPitch_data();
void fixedPitch();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void trickyFonts_data();
void trickyFonts();
#endif
@@ -132,7 +132,7 @@ void tst_QFontDatabase::fixedPitch_data()
QTest::newRow( "Andale Mono" ) << QString( "Andale Mono" ) << true;
QTest::newRow( "Courier" ) << QString( "Courier" ) << true;
QTest::newRow( "Courier New" ) << QString( "Courier New" ) << true;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::newRow( "Script" ) << QString( "Script" ) << false;
QTest::newRow( "Lucida Console" ) << QString( "Lucida Console" ) << true;
QTest::newRow( "DejaVu Sans" ) << QString( "DejaVu Sans" ) << false;
@@ -162,7 +162,7 @@ void tst_QFontDatabase::fixedPitch()
QCOMPARE(fi.fixedPitch(), fixedPitch);
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void tst_QFontDatabase::trickyFonts_data()
{
QTest::addColumn<QString>("font");
@@ -247,7 +247,7 @@ void tst_QFontDatabase::addAppFont()
#endif
QCOMPARE(fontDbChangedSpy.count(), 1);
// addApplicationFont is supported on Mac, don't skip the test if it breaks.
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
if (id == -1)
QSKIP("Skip the test since app fonts are not supported on this system");
#endif
diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index bc858bf38a..0b5486dd5a 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
index a4e5c63e6d..8ef030ae60 100644
--- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index a0cda39c27..99e53f3261 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -98,9 +98,7 @@ private slots:
void rawFontSetPixelSize_data();
void rawFontSetPixelSize();
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
void multipleRawFontsFromData();
-#endif
private:
QString testFont;
QString testFontBoldItalic;
@@ -867,7 +865,6 @@ void tst_QRawFont::rawFontSetPixelSize()
QCOMPARE(rawFont.pixelSize(), 24.0);
}
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
void tst_QRawFont::multipleRawFontsFromData()
{
QFile file(testFont);
@@ -884,7 +881,6 @@ void tst_QRawFont::multipleRawFontsFromData()
QVERIFY(testFont.familyName() != (testFontBoldItalic.familyName())
|| testFont.styleName() != (testFontBoldItalic.styleName()));
}
-#endif
#endif // QT_NO_RAWFONT
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index b0a66eab07..66145f2dcf 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
index 0358b5d471..5774be6830 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
+++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
index 9489a2e90e..74ec9db6de 100644
--- a/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
+++ b/tests/auto/gui/text/qtextblock/tst_qtextblock.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
index 09b9a06a1d..bff014e424 100644
--- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,6 +50,7 @@
#include <qabstracttextdocumentlayout.h>
#include <qtextlayout.h>
#include <qtextcursor.h>
+#include <qtextobject.h>
#include <qdebug.h>
QT_FORWARD_DECLARE_CLASS(QTextDocument)
@@ -152,6 +153,8 @@ private slots:
void cursorPositionWithBlockUndoAndRedo2();
void cursorPositionWithBlockUndoAndRedo3();
+ void joinNonEmptyRemovedBlockUserState();
+
private:
int blockCount();
@@ -1976,5 +1979,20 @@ void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo3()
QCOMPARE(cursor.position(), cursorPositionBefore);
}
+void tst_QTextCursor::joinNonEmptyRemovedBlockUserState()
+{
+ cursor.insertText("Hello");
+ cursor.insertBlock();
+ cursor.insertText("World");
+ cursor.block().setUserState(10);
+
+ cursor.movePosition(QTextCursor::EndOfBlock);
+ cursor.movePosition(QTextCursor::PreviousBlock, QTextCursor::KeepAnchor);
+ cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+ cursor.removeSelectedText();
+
+ QCOMPARE(cursor.block().userState(), 10);
+}
+
QTEST_MAIN(tst_QTextCursor)
#include "tst_qtextcursor.moc"
diff --git a/tests/auto/gui/text/qtextdocument/common.h b/tests/auto/gui/text/qtextdocument/common.h
index 081c71ea13..0841d7cd6a 100644
--- a/tests/auto/gui/text/qtextdocument/common.h
+++ b/tests/auto/gui/text/qtextdocument/common.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index a84024ceab..c2ae853a92 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -76,6 +76,7 @@ public:
public slots:
void init();
void cleanup();
+ void cleanupTestCase();
private slots:
void getSetCheck();
void isEmpty();
@@ -231,7 +232,6 @@ tst_QTextDocument::tst_QTextDocument()
tst_QTextDocument::~tst_QTextDocument()
{
- QFile::remove(QLatin1String("foo.png"));
}
void tst_QTextDocument::init()
@@ -258,6 +258,11 @@ void tst_QTextDocument::cleanup()
doc = 0;
}
+void tst_QTextDocument::cleanupTestCase()
+{
+ QFile::remove(QLatin1String("foo.png"));
+}
+
void tst_QTextDocument::isEmpty()
{
QVERIFY(doc->isEmpty());
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 63a67a0c10..33293400c2 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
index 91da86d3d1..20b72ffa1b 100644
--- a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -60,6 +60,7 @@ public:
public slots:
void init();
void cleanup();
+ void cleanupTestCase();
private slots:
void defaultPageSizeHandling();
@@ -85,6 +86,14 @@ void tst_QTextDocumentLayout::cleanup()
doc = 0;
}
+void tst_QTextDocumentLayout::cleanupTestCase()
+{
+ if (qgetenv("QTEST_KEEP_IMAGEDATA").toInt() == 0) {
+ QFile::remove(QLatin1String("expected.png"));
+ QFile::remove(QLatin1String("img.png"));
+ }
+}
+
void tst_QTextDocumentLayout::defaultPageSizeHandling()
{
QAbstractTextDocumentLayout *layout = doc->documentLayout();
diff --git a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
index 166b5d7c82..84539b86cc 100644
--- a/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
+++ b/tests/auto/gui/text/qtextformat/tst_qtextformat.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index e816b04153..e7435743e5 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -300,7 +300,7 @@ void tst_QTextLayout::simpleBoundingRect()
void tst_QTextLayout::threeLineBoundingRect()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
/* stricter check. break text into three lines */
@@ -419,7 +419,7 @@ void tst_QTextLayout::forcedBreaks()
void tst_QTextLayout::breakAny()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString text = "ABCD";
@@ -461,7 +461,7 @@ void tst_QTextLayout::breakAny()
void tst_QTextLayout::noWrap()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString text = "AB CD";
@@ -605,7 +605,7 @@ void tst_QTextLayout::charWordStopOnLineSeparator()
void tst_QTextLayout::xToCursorAtEndOfLine()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString text = "FirstLine SecondLine";
@@ -667,7 +667,7 @@ void tst_QTextLayout::charStopForSurrogatePairs()
void tst_QTextLayout::tabStops()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("QTestFontEngine on the mac does not support logclusters at the moment");
#endif
QString txt("Hello there\tworld");
@@ -1461,7 +1461,7 @@ void tst_QTextLayout::textWidthWithLineSeparator()
void tst_QTextLayout::cursorInLigatureWithMultipleLines()
{
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
QSKIP("This test can only be run on Mac");
#endif
QTextLayout layout("first line finish", QFont("Times", 20));
@@ -1477,7 +1477,7 @@ void tst_QTextLayout::cursorInLigatureWithMultipleLines()
void tst_QTextLayout::xToCursorForLigatures()
{
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
QSKIP("This test can only be run on Mac");
#endif
QTextLayout layout("fi", QFont("Times", 20));
@@ -1501,7 +1501,7 @@ void tst_QTextLayout::xToCursorForLigatures()
void tst_QTextLayout::cursorInNonStopChars()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("This test can not be run on Mac");
#endif
QTextLayout layout(QString::fromUtf8("\xE0\xA4\xA4\xE0\xA5\x8D\xE0\xA4\xA8"));
diff --git a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
index 810c416875..79d3d8454b 100644
--- a/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
+++ b/tests/auto/gui/text/qtextlist/tst_qtextlist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
index b621763cea..7b6f155d7a 100644
--- a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
+++ b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
index 49d86a2c4b..67be46dff4 100644
--- a/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
+++ b/tests/auto/gui/text/qtextodfwriter/tst_qtextodfwriter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp b/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
index b74bc3daf8..6fb376c72e 100644
--- a/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
+++ b/tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
index 5bb13232ca..974a15450a 100644
--- a/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/generate/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 638f13aea2..cf02d1af50 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -56,7 +56,7 @@
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
+#if defined(Q_WS_X11) || defined(Q_OS_MAC)
#define private public
#include <private/qtextengine_p.h>
#include <qtextlayout.h>
@@ -103,6 +103,8 @@ private slots:
void mirroredChars_data();
void mirroredChars();
+ void thaiIsolatedSaraAm();
+
private:
bool haveTestFonts;
};
@@ -1161,7 +1163,7 @@ void tst_QTextScriptEngine::controlInSyllable_qtbug14204()
void tst_QTextScriptEngine::combiningMarks_qtbug15675()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QString s;
s.append(QChar(0x0061));
s.append(QChar(0x0062));
@@ -1211,7 +1213,7 @@ void tst_QTextScriptEngine::mirroredChars_data()
void tst_QTextScriptEngine::mirroredChars()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
QSKIP("Not supported on Mac");
#endif
QFETCH(int, hintingPreference);
@@ -1256,5 +1258,27 @@ void tst_QTextScriptEngine::mirroredChars()
}
}
+void tst_QTextScriptEngine::thaiIsolatedSaraAm()
+{
+ if (QFontDatabase().families(QFontDatabase::Any).contains("Waree")) {
+ QString s;
+ s.append(QChar(0x0e33));
+
+ QTextLayout layout(s, QFont("Waree"));
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+
+ QTextEngine *e = layout.engine();
+ e->itemize();
+ e->shape(0);
+ QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(3));
+
+ unsigned short *logClusters = e->layoutData->logClustersPtr;
+ QCOMPARE(logClusters[0], ushort(0));
+ } else
+ QSKIP("Cannot find Waree.");
+}
+
QTEST_MAIN(tst_QTextScriptEngine)
#include "tst_qtextscriptengine.moc"
diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
index b4ecdf1f39..137b44a39a 100644
--- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/text/qzip/tst_qzip.cpp b/tests/auto/gui/text/qzip/tst_qzip.cpp
index d68cb2e2dc..eef517d15a 100644
--- a/tests/auto/gui/text/qzip/tst_qzip.cpp
+++ b/tests/auto/gui/text/qzip/tst_qzip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index cfaafb37f4..ad45d00520 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index bd3539c797..f2c12bc092 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
index 94de4704fb..788abc349a 100644
--- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
+++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index 35abd68415..fb898c4b89 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index aa8617740b..94346f726d 100644
--- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp b/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp
index fa215a5422..8eff61bc52 100644
--- a/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp
+++ b/tests/auto/network/access/qhttpnetworkreply/tst_qhttpnetworkreply.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp b/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
index 9fda95821e..0b90456ed3 100644
--- a/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
+++ b/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp b/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp
index b272c0b282..cf9093ae8f 100644
--- a/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp
+++ b/tests/auto/network/access/qnetworkcachemetadata/tst_qnetworkcachemetadata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
index abf8e726d2..7c27973b56 100644
--- a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 6ef08131a5..73d0a4a650 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index dbd5e64627..533108e76b 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -186,6 +186,9 @@ void tst_QNetworkDiskCache::initTestCase()
// It is only called once.
void tst_QNetworkDiskCache::cleanupTestCase()
{
+ QDir workingDir("foo");
+ if (workingDir.exists())
+ workingDir.removeRecursively();
}
// This will be called before each test function is executed.
diff --git a/tests/auto/network/access/qnetworkreply/echo/main.cpp b/tests/auto/network/access/qnetworkreply/echo/main.cpp
index 5162842081..8e6811d2ff 100644
--- a/tests/auto/network/access/qnetworkreply/echo/main.cpp
+++ b/tests/auto/network/access/qnetworkreply/echo/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 9d3c8a7f2f..959250acb4 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
index e106230dc4..928dc48125 100644
--- a/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
+++ b/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/bearer/qbearertestcommon.h b/tests/auto/network/bearer/qbearertestcommon.h
index 6279dbb1ef..f716573b6b 100644
--- a/tests/auto/network/bearer/qbearertestcommon.h
+++ b/tests/auto/network/bearer/qbearertestcommon.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
index 2a05f6132a..a8b7db4231 100644
--- a/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
+++ b/tests/auto/network/bearer/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index c801534a50..0874dbf5c0 100644
--- a/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/network/bearer/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/bearer/qnetworksession/lackey/main.cpp b/tests/auto/network/bearer/qnetworksession/lackey/main.cpp
index 1182454fda..c454ba3c80 100644
--- a/tests/auto/network/bearer/qnetworksession/lackey/main.cpp
+++ b/tests/auto/network/bearer/qnetworksession/lackey/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
index 26bdec5c9b..a51b4e5632 100644
--- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -273,17 +273,17 @@ void tst_QNetworkSession::sessionProperties()
<< QLatin1String("WiMAX");
if (!configuration.isValid()) {
- QVERIFY(configuration.bearerName().isEmpty());
+ QVERIFY(configuration.bearerTypeName().isEmpty());
} else {
switch (configuration.type())
{
case QNetworkConfiguration::ServiceNetwork:
case QNetworkConfiguration::UserChoice:
default:
- QVERIFY(configuration.bearerName().isEmpty());
+ QVERIFY(configuration.bearerTypeName().isEmpty());
break;
case QNetworkConfiguration::InternetAccessPoint:
- QVERIFY(validBearerNames.contains(configuration.bearerName()));
+ QVERIFY(validBearerNames.contains(configuration.bearerTypeName()));
break;
}
}
@@ -1016,15 +1016,15 @@ QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfigur
discoveredConfigs.removeOne(config);
} else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
bearerType == "cellular") { // 'cellular' bearertype is for convenience
- if (config.bearerName() != "2G" &&
- config.bearerName() != "CDMA2000" &&
- config.bearerName() != "WCDMA" &&
- config.bearerName() != "HSPA") {
+ if (config.bearerTypeName() != "2G" &&
+ config.bearerTypeName() != "CDMA2000" &&
+ config.bearerTypeName() != "WCDMA" &&
+ config.bearerTypeName() != "HSPA") {
// qDebug() << "Dumping config because bearer mismatches (cellular): " << config.name();
discoveredConfigs.removeOne(config);
}
} else if ((config.type() == QNetworkConfiguration::InternetAccessPoint) &&
- bearerType != config.bearerName()) {
+ bearerType != config.bearerTypeName()) {
// qDebug() << "Dumping config because bearer mismatches (WLAN): " << config.name();
discoveredConfigs.removeOne(config);
}
diff --git a/tests/auto/network/kernel/kernel.pro b/tests/auto/network/kernel/kernel.pro
index d1c901d529..32ba8b41b7 100644
--- a/tests/auto/network/kernel/kernel.pro
+++ b/tests/auto/network/kernel/kernel.pro
@@ -1,5 +1,7 @@
TEMPLATE=subdirs
SUBDIRS=\
+ qdnslookup \
+ qdnslookup_appless \
qhostinfo \
# qnetworkproxyfactory \ # Uses a hardcoded proxy configuration
qauthenticator \
diff --git a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
index 38aa684ec9..9c1b8c32f6 100644
--- a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
+++ b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/kernel/qdnslookup/qdnslookup.pro b/tests/auto/network/kernel/qdnslookup/qdnslookup.pro
new file mode 100644
index 0000000000..f14ffd003e
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup/qdnslookup.pro
@@ -0,0 +1,7 @@
+CONFIG += testcase
+
+TARGET = tst_qdnslookup
+
+SOURCES += tst_qdnslookup.cpp
+
+QT = core network testlib
diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp
new file mode 100644
index 0000000000..3baca3c50b
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp
@@ -0,0 +1,274 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Jeremy Lainé <jeremy.laine@m4x.org>
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+#include <QtNetwork/QDnsLookup>
+#include <QtNetwork/QHostAddress>
+
+static bool waitForDone(QDnsLookup *lookup)
+{
+ if (lookup->isFinished())
+ return true;
+
+ QObject::connect(lookup, SIGNAL(finished()),
+ &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ return !QTestEventLoop::instance().timeout();
+}
+
+class tst_QDnsLookup: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void lookup_data();
+ void lookup();
+ void lookupReuse();
+ void lookupAbortRetry();
+};
+
+void tst_QDnsLookup::lookup_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::addColumn<QString>("domain");
+ QTest::addColumn<int>("error");
+ QTest::addColumn<QString>("cname");
+ QTest::addColumn<QString>("host");
+ QTest::addColumn<QString>("mx");
+ QTest::addColumn<QString>("ns");
+ QTest::addColumn<QString>("ptr");
+ QTest::addColumn<QString>("srv");
+ QTest::addColumn<QByteArray>("txt");
+
+ QTest::newRow("a-empty") << int(QDnsLookup::A) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << ""<< "" << QByteArray();
+ QTest::newRow("a-notfound") << int(QDnsLookup::A) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("a-idn") << int(QDnsLookup::A) << QString::fromUtf8("alqualondë.troll.no") << int(QDnsLookup::NoError) << "alqualonde.troll.no" << "10.3.3.55" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("a-single") << int(QDnsLookup::A) << "lupinella.troll.no" << int(QDnsLookup::NoError) << "" << "10.3.4.6" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("a-multi") << int(QDnsLookup::A) << "multi.dev.troll.no" << int(QDnsLookup::NoError) << "" << "1.2.3.4 1.2.3.5 10.3.3.31" << "" << "" << "" << "" << QByteArray();
+
+ QTest::newRow("aaaa-empty") << int(QDnsLookup::AAAA) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("aaaa-notfound") << int(QDnsLookup::AAAA) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("aaaa-single") << int(QDnsLookup::AAAA) << "dns6-test-dev.troll.no" << int(QDnsLookup::NoError) << "" << "2001:470:1f01:115::10" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("aaaa-multi") << int(QDnsLookup::AAAA) << "multi-dns6-test-dev.troll.no" << int(QDnsLookup::NoError) << "" << "2001:470:1f01:115::11 2001:470:1f01:115::12" << "" << "" << "" << "" << QByteArray();
+
+ QTest::newRow("any-empty") << int(QDnsLookup::ANY) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("any-notfound") << int(QDnsLookup::ANY) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("any-ascii") << int(QDnsLookup::ANY) << "fluke.troll.no" << int(QDnsLookup::NoError) << "" << "10.3.3.31" << "" << "" << "" << "" << QByteArray();
+
+ QTest::newRow("mx-empty") << int(QDnsLookup::MX) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("mx-notfound") << int(QDnsLookup::MX) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("mx-ascii") << int(QDnsLookup::MX) << "troll.no" << int(QDnsLookup::NoError) << "" << "" << "10 smtp.trolltech.com" << "" << "" << "" << QByteArray();
+ // FIXME: we need an IDN MX record in the troll.no domain
+ QTest::newRow("mx-idn") << int(QDnsLookup::MX) << QString::fromUtf8("råkat.se") << int(QDnsLookup::NoError) << "" << "" << "10 mail.cdr.se" << "" << "" << "" << QByteArray();
+
+ QTest::newRow("ns-empty") << int(QDnsLookup::NS) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("ns-notfound") << int(QDnsLookup::NS) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("ns-ascii") << int(QDnsLookup::NS) << "troll.no" << int(QDnsLookup::NoError) << "" << "" << "" << "ns-0.trolltech.net ns-1.trolltech.net ns-i.trolltech.net" << "" << "" << QByteArray();
+
+ QTest::newRow("ptr-empty") << int(QDnsLookup::PTR) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("ptr-notfound") << int(QDnsLookup::PTR) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ // FIXME: we need PTR records in the troll.no domain
+ QTest::newRow("ptr-ascii") << int(QDnsLookup::PTR) << "168.52.238.87.in-addr.arpa" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "gitorious.org" << "" << QByteArray();
+
+ QTest::newRow("srv-empty") << int(QDnsLookup::SRV) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("srv-notfound") << int(QDnsLookup::SRV) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ // FIXME: we need SRV records in the troll.no domain
+ QTest::newRow("srv-idn") << int(QDnsLookup::SRV) << QString::fromUtf8("_xmpp-client._tcp.råkat.se") << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "5 0 5224 jabber.cdr.se" << QByteArray();
+
+ QTest::newRow("txt-empty") << int(QDnsLookup::TXT) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ QTest::newRow("txt-notfound") << int(QDnsLookup::TXT) << "invalid." << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray();
+ // FIXME: we need TXT records in the troll.no domain
+ QTest::newRow("txt-ascii") << int(QDnsLookup::TXT) << "gmail.com" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "" << QByteArray("v=spf1 redirect=_spf.google.com");
+}
+
+void tst_QDnsLookup::lookup()
+{
+ QFETCH(int, type);
+ QFETCH(QString, domain);
+ QFETCH(int, error);
+ QFETCH(QString, cname);
+ QFETCH(QString, host);
+ QFETCH(QString, mx);
+ QFETCH(QString, ns);
+ QFETCH(QString, ptr);
+ QFETCH(QString, srv);
+ QFETCH(QByteArray, txt);
+
+ QDnsLookup lookup;
+ lookup.setType(static_cast<QDnsLookup::Type>(type));
+ lookup.setName(domain);
+ lookup.lookup();
+ QVERIFY(waitForDone(&lookup));
+ QVERIFY(lookup.isFinished());
+ QCOMPARE(int(lookup.error()), error);
+ if (error == QDnsLookup::NoError)
+ QVERIFY(lookup.errorString().isEmpty());
+ QCOMPARE(int(lookup.type()), type);
+ QCOMPARE(lookup.name(), domain);
+
+ // canonical names
+ if (!cname.isEmpty()) {
+ QVERIFY(!lookup.canonicalNameRecords().isEmpty());
+ const QDnsDomainNameRecord cnameRecord = lookup.canonicalNameRecords().first();
+ QCOMPARE(cnameRecord.name(), domain);
+ QCOMPARE(cnameRecord.value(), cname);
+ } else {
+ QVERIFY(lookup.canonicalNameRecords().isEmpty());
+ }
+
+ // host addresses
+ const QString hostName = cname.isEmpty() ? domain : cname;
+ QStringList addresses;
+ foreach (const QDnsHostAddressRecord &record, lookup.hostAddressRecords()) {
+ QCOMPARE(record.name(), hostName);
+ addresses << record.value().toString().toLower();
+ }
+ addresses.sort();
+ QCOMPARE(addresses.join(" "), host);
+
+ // mail exchanges
+ QStringList mailExchanges;
+ foreach (const QDnsMailExchangeRecord &record, lookup.mailExchangeRecords()) {
+ QCOMPARE(record.name(), domain);
+ mailExchanges << QString("%1 %2").arg(QString::number(record.preference()), record.exchange());
+ }
+ QCOMPARE(mailExchanges.join(" "), mx);
+
+ // name servers
+ QStringList nameServers;
+ foreach (const QDnsDomainNameRecord &record, lookup.nameServerRecords()) {
+ QCOMPARE(record.name(), domain);
+ nameServers << record.value();
+ }
+ nameServers.sort();
+ QCOMPARE(nameServers.join(" "), ns);
+
+ // pointers
+ if (!ptr.isEmpty()) {
+ QVERIFY(!lookup.pointerRecords().isEmpty());
+ const QDnsDomainNameRecord ptrRecord = lookup.pointerRecords().first();
+ QCOMPARE(ptrRecord.name(), domain);
+ QCOMPARE(ptrRecord.value(), ptr);
+ } else {
+ QVERIFY(lookup.pointerRecords().isEmpty());
+ }
+
+ // services
+ QStringList services;
+ foreach (const QDnsServiceRecord &record, lookup.serviceRecords()) {
+ QCOMPARE(record.name(), domain);
+ services << QString("%1 %2 %3 %4").arg(
+ QString::number(record.priority()),
+ QString::number(record.weight()),
+ QString::number(record.port()),
+ record.target());
+ }
+ QCOMPARE(services.join(" "), srv);
+
+ // text
+ if (!txt.isEmpty()) {
+ QVERIFY(!lookup.textRecords().isEmpty());
+ const QDnsTextRecord firstRecord = lookup.textRecords().first();
+ QCOMPARE(firstRecord.name(), domain);
+ QCOMPARE(firstRecord.values().size(), 1);
+ QCOMPARE(firstRecord.values().first(), txt);
+ } else {
+ QVERIFY(lookup.textRecords().isEmpty());
+ }
+}
+
+void tst_QDnsLookup::lookupReuse()
+{
+ QDnsLookup lookup;
+
+ // first lookup
+ lookup.setType(QDnsLookup::A);
+ lookup.setName("lupinella.troll.no");
+ lookup.lookup();
+ QVERIFY(waitForDone(&lookup));
+ QVERIFY(lookup.isFinished());
+ QCOMPARE(int(lookup.error()), int(QDnsLookup::NoError));
+ QVERIFY(!lookup.hostAddressRecords().isEmpty());
+ QCOMPARE(lookup.hostAddressRecords().first().name(), QString("lupinella.troll.no"));
+ QCOMPARE(lookup.hostAddressRecords().first().value(), QHostAddress("10.3.4.6"));
+
+ // second lookup
+ lookup.setType(QDnsLookup::AAAA);
+ lookup.setName("dns6-test-dev.troll.no");
+ lookup.lookup();
+ QVERIFY(waitForDone(&lookup));
+ QVERIFY(lookup.isFinished());
+ QCOMPARE(int(lookup.error()), int(QDnsLookup::NoError));
+ QVERIFY(!lookup.hostAddressRecords().isEmpty());
+ QCOMPARE(lookup.hostAddressRecords().first().name(), QString("dns6-test-dev.troll.no"));
+ QCOMPARE(lookup.hostAddressRecords().first().value(), QHostAddress("2001:470:1f01:115::10"));
+}
+
+
+void tst_QDnsLookup::lookupAbortRetry()
+{
+ QDnsLookup lookup;
+
+ // try and abort the lookup
+ lookup.setType(QDnsLookup::A);
+ lookup.setName("lupinella.troll.no");
+ lookup.lookup();
+ lookup.abort();
+ QVERIFY(waitForDone(&lookup));
+ QVERIFY(lookup.isFinished());
+ QCOMPARE(int(lookup.error()), int(QDnsLookup::OperationCancelledError));
+ QVERIFY(lookup.hostAddressRecords().isEmpty());
+
+ // retry a different lookup
+ lookup.setType(QDnsLookup::AAAA);
+ lookup.setName("dns6-test-dev.troll.no");
+ lookup.lookup();
+ QVERIFY(waitForDone(&lookup));
+ QVERIFY(lookup.isFinished());
+ QCOMPARE(int(lookup.error()), int(QDnsLookup::NoError));
+ QVERIFY(!lookup.hostAddressRecords().isEmpty());
+ QCOMPARE(lookup.hostAddressRecords().first().name(), QString("dns6-test-dev.troll.no"));
+ QCOMPARE(lookup.hostAddressRecords().first().value(), QHostAddress("2001:470:1f01:115::10"));
+}
+
+QTEST_MAIN(tst_QDnsLookup)
+#include "tst_qdnslookup.moc"
diff --git a/tests/auto/network/kernel/qdnslookup_appless/qdnslookup_appless.pro b/tests/auto/network/kernel/qdnslookup_appless/qdnslookup_appless.pro
new file mode 100644
index 0000000000..25d76b5739
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup_appless/qdnslookup_appless.pro
@@ -0,0 +1,7 @@
+CONFIG += testcase
+
+TARGET = tst_qdnslookup_appless
+
+SOURCES += tst_qdnslookup_appless.cpp
+
+QT = core network testlib
diff --git a/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp b/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp
new file mode 100644
index 0000000000..a183cfdc8a
--- /dev/null
+++ b/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Jeremy Lainé <jeremy.laine@m4x.org>
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QCoreApplication>
+#include <QtNetwork/QDnsLookup>
+#include <QtTest/QtTest>
+
+class tst_QDnsLookup_Appless : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void noApplication();
+ void recreateApplication();
+ void destroyApplicationDuringLookup();
+};
+
+void tst_QDnsLookup_Appless::noApplication()
+{
+ QTest::ignoreMessage(QtWarningMsg, "QDnsLookup requires a QCoreApplication");
+ QDnsLookup dns(QDnsLookup::A, "troll.no");
+ dns.lookup();
+}
+
+void tst_QDnsLookup_Appless::recreateApplication()
+{
+ int argc = 0;
+ char **argv = 0;
+ for (int i = 0; i < 10; ++i) {
+ QCoreApplication app(argc, argv);
+ QDnsLookup dns(QDnsLookup::A, "lupinella.troll.no");
+ dns.lookup();
+ if (!dns.isFinished()) {
+ QObject::connect(&dns, SIGNAL(finished()),
+ &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ }
+ QVERIFY(dns.isFinished());
+ }
+}
+
+void tst_QDnsLookup_Appless::destroyApplicationDuringLookup()
+{
+ int argc = 0;
+ char **argv = 0;
+ for (int i = 0; i < 10; ++i) {
+ QCoreApplication app(argc, argv);
+ QDnsLookup dns(QDnsLookup::A, "lupinella.troll.no");
+ dns.lookup();
+ }
+}
+
+QTEST_APPLESS_MAIN(tst_QDnsLookup_Appless)
+#include "tst_qdnslookup_appless.moc"
diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
index 7869ab76fe..d74e1b1e89 100644
--- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
+++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +48,9 @@
#include <qhash.h>
#include <qbytearray.h>
#include <qdatastream.h>
+#ifdef Q_OS_WIN
+# include <qt_windows.h>
+#endif
class tst_QHostAddress : public QObject
{
diff --git a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
index aceedc1ee4..4ca59b5b70 100644
--- a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
+++ b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
@@ -10,3 +10,5 @@ wince*: {
} else {
win32:LIBS += -lws2_32
}
+
+linux-*:CONFIG+=insignificant_test # QTBUG-23837 - test is unstable
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index 6c89819094..fbcaa2ca53 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp b/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp
index cc46427653..ab8e12c3d9 100644
--- a/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp
+++ b/tests/auto/network/kernel/qnetworkaddressentry/tst_qnetworkaddressentry.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
index 9a82be67a7..299a11a06d 100644
--- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
+++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp b/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp
index 70a6eaa9df..7832840268 100644
--- a/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp
+++ b/tests/auto/network/kernel/qnetworkproxy/tst_qnetworkproxy.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
index 088a5361ab..8a1a391b51 100644
--- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
+++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index d315e1e76b..ffcc9cfc97 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp b/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp
index f39a9c66bf..d143b0dbd0 100644
--- a/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp
+++ b/tests/auto/network/socket/qabstractsocket/tst_qabstractsocket.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
index b411dd2651..9b8391d6be 100644
--- a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -212,7 +212,7 @@ void tst_QHttpSocketEngine::errorTest_data()
QTest::newRow("garbage2") << QString() << 0 << QString()
<< "This is not HTTP"
- << int(QAbstractSocket::ProxyConnectionClosedError);
+ << int(QAbstractSocket::ProxyProtocolError);
QTest::newRow("garbage3") << QString() << 0 << QString()
<< ""
diff --git a/tests/auto/network/socket/qlocalsocket/example/client/main.cpp b/tests/auto/network/socket/qlocalsocket/example/client/main.cpp
index 86b6b34cf3..17c5ba666e 100644
--- a/tests/auto/network/socket/qlocalsocket/example/client/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/example/client/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qlocalsocket/example/server/main.cpp b/tests/auto/network/socket/qlocalsocket/example/server/main.cpp
index 06c8b8501f..d066e4ef51 100644
--- a/tests/auto/network/socket/qlocalsocket/example/server/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/example/server/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qlocalsocket/lackey/main.cpp b/tests/auto/network/socket/qlocalsocket/lackey/main.cpp
index 014a6eb2f8..b899ecd2c4 100644
--- a/tests/auto/network/socket/qlocalsocket/lackey/main.cpp
+++ b/tests/auto/network/socket/qlocalsocket/lackey/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 87cfaeed6c..221ef602a1 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
index df677875e6..0c0690babe 100644
--- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
index f2e813497b..cf7ade6cd2 100644
--- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
+++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index 0f4e60e258..941e0b2142 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp b/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
index a112966b41..12b515a115 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/Test.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/Test.h b/tests/auto/network/socket/qtcpsocket/stressTest/Test.h
index 3adcbe4e5c..76981a15ad 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/Test.h
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/Test.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp b/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
index 57194a4948..f5ada2b925 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index c9c7054960..829ddd2054 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qudpsocket/clientserver/main.cpp b/tests/auto/network/socket/qudpsocket/clientserver/main.cpp
index a88c0f1335..83cd81762b 100644
--- a/tests/auto/network/socket/qudpsocket/clientserver/main.cpp
+++ b/tests/auto/network/socket/qudpsocket/clientserver/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index fb23483451..3dabe6741a 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/socket/qudpsocket/udpServer/main.cpp b/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
index 90ddcf1748..d212e55a0c 100644
--- a/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
+++ b/tests/auto/network/socket/qudpsocket/udpServer/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh b/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh
index 915bf796b1..3570471d73 100755
--- a/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh
+++ b/tests/auto/network/ssl/qsslcertificate/certificates/gencertificates.sh
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is the build configuration utility of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index a2fab2b479..8003ad1932 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -862,11 +862,11 @@ void tst_QSslCertificate::toText()
// Openssl's cert dump method changed slightly between 0.9.8 and 1.0.0 versions, so we want it to match any output
QFile fOld(SRCDIR "more-certificates/cert-large-expiration-date.txt.0.9.8");
- QVERIFY(fOld.open(QIODevice::ReadOnly));
+ QVERIFY(fOld.open(QIODevice::ReadOnly | QFile::Text));
QByteArray txtOld = fOld.readAll();
QFile fNew(SRCDIR "more-certificates/cert-large-expiration-date.txt.1.0.0");
- QVERIFY(fNew.open(QIODevice::ReadOnly));
+ QVERIFY(fNew.open(QIODevice::ReadOnly | QFile::Text));
QByteArray txtNew = fNew.readAll();
QVERIFY(txtOld == cert.toText() || txtNew == cert.toText());
}
diff --git a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
index 89b735aed3..25d5f00e95 100644
--- a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
+++ b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
index 481d73650b..e57c5fa7f4 100644
--- a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
+++ b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
index 087a3a64b9..e82dc57e28 100755
--- a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
+++ b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is the build configuration utility of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/auto/network/ssl/qsslkey/qsslkey.pro b/tests/auto/network/ssl/qsslkey/qsslkey.pro
index d882362290..4af35487cd 100644
--- a/tests/auto/network/ssl/qsslkey/qsslkey.pro
+++ b/tests/auto/network/ssl/qsslkey/qsslkey.pro
@@ -25,5 +25,4 @@ wince* {
DEFINES += SRCDIR=\\\".\\\"
} else {
DEFINES+= SRCDIR=\\\"$$PWD\\\"
- TARGET.CAPABILITY = NetworkServices
}
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index cf1489c76c..f59f0bb5a9 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
index 2739a7eb25..a8763d69af 100644
--- a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
+++ b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
@@ -17,7 +17,6 @@ win32 {
# OpenSSL support
contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
- include($$QT_SOURCE_TREE/config.tests/unix/openssl/openssl.pri)
# Add optional SSL libs
LIBS += $$OPENSSL_LIBS
}
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 96aea6a4e5..83060e27e4 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -192,10 +192,12 @@ private slots:
void readFromClosedSocket();
void writeBigChunk();
void blacklistedCertificates();
- void setEmptyDefaultConfiguration();
void versionAccessors();
void sslOptions();
void encryptWithoutConnecting();
+ void resume_data();
+ void resume();
+ void setEmptyDefaultConfiguration(); // this test should be last
static void exitLoop()
{
@@ -1320,8 +1322,8 @@ void tst_QSslSocket::wildcard()
QVERIFY2(socket->waitForEncrypted(3000), qPrintable(socket->errorString()));
QSslCertificate certificate = socket->peerCertificate();
- QCOMPARE(certificate.subjectInfo(QSslCertificate::CommonName), QString(QtNetworkSettings::serverLocalName() + ".*." + QtNetworkSettings::serverDomainName()));
- QCOMPARE(certificate.issuerInfo(QSslCertificate::CommonName), QtNetworkSettings::serverName());
+ QVERIFY(certificate.subjectInfo(QSslCertificate::CommonName).contains(QString(QtNetworkSettings::serverLocalName() + ".*." + QtNetworkSettings::serverDomainName())));
+ QVERIFY(certificate.issuerInfo(QSslCertificate::CommonName).contains(QtNetworkSettings::serverName()));
socket->close();
}
@@ -2058,22 +2060,6 @@ void tst_QSslSocket::blacklistedCertificates()
QCOMPARE(sslErrors.at(0).error(), QSslError::CertificateBlacklisted);
}
-void tst_QSslSocket::setEmptyDefaultConfiguration()
-{
- // used to produce a crash in QSslConfigurationPrivate::deepCopyDefaultConfiguration, QTBUG-13265
-
- if (!QSslSocket::supportsSsl())
- return;
-
- QSslConfiguration emptyConf;
- QSslConfiguration::setDefaultConfiguration(emptyConf);
-
- QSslSocketPtr socket = newSocket();
- connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
- socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
- QVERIFY2(!socket->waitForEncrypted(4000), qPrintable(socket->errorString()));
-}
-
void tst_QSslSocket::versionAccessors()
{
if (!QSslSocket::supportsSsl())
@@ -2141,7 +2127,97 @@ void tst_QSslSocket::encryptWithoutConnecting()
sock.startClientEncryption();
}
+void tst_QSslSocket::resume_data()
+{
+ QTest::addColumn<bool>("ignoreErrorsAfterPause");
+ QTest::addColumn<QList<QSslError> >("errorsToIgnore");
+ QTest::addColumn<bool>("expectSuccess");
+
+ QList<QSslError> errorsList;
+ QTest::newRow("DoNotIgnoreErrors") << false << QList<QSslError>() << false;
+ QTest::newRow("ignoreAllErrors") << true << QList<QSslError>() << true;
+
+ QList<QSslCertificate> certs = QSslCertificate::fromPath(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem"));
+ QSslError rightError(QSslError::SelfSignedCertificate, certs.at(0));
+ QSslError wrongError(QSslError::SelfSignedCertificate);
+ errorsList.append(wrongError);
+ QTest::newRow("ignoreSpecificErrors-Wrong") << true << errorsList << false;
+ errorsList.clear();
+ errorsList.append(rightError);
+ QTest::newRow("ignoreSpecificErrors-Right") << true << errorsList << true;
+}
+
+void tst_QSslSocket::resume()
+{
+ // make sure the server certificate is not in the list of accepted certificates,
+ // we want to trigger the sslErrors signal
+ QSslSocket::setDefaultCaCertificates(QSslSocket::systemCaCertificates());
+
+ QFETCH(bool, ignoreErrorsAfterPause);
+ QFETCH(QList<QSslError>, errorsToIgnore);
+ QFETCH(bool, expectSuccess);
+
+ QSslSocket socket;
+ socket.setPauseMode(QAbstractSocket::PauseOnNotify);
+
+ QSignalSpy sslErrorSpy(&socket, SIGNAL(sslErrors(QList<QSslError>)));
+ QSignalSpy encryptedSpy(&socket, SIGNAL(encrypted()));
+ QSignalSpy errorSpy(&socket, SIGNAL(error(QAbstractSocket::SocketError)));
+
+ connect(&socket, SIGNAL(sslErrors(QList<QSslError>)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ connect(&socket, SIGNAL(encrypted()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ connect(&socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
+ this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
+ connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ socket.connectToHostEncrypted(QtNetworkSettings::serverName(), 993);
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QCOMPARE(sslErrorSpy.count(), 1);
+ QCOMPARE(errorSpy.count(), 0);
+ QCOMPARE(encryptedSpy.count(), 0);
+ QVERIFY(!socket.isEncrypted());
+ if (ignoreErrorsAfterPause) {
+ if (errorsToIgnore.empty())
+ socket.ignoreSslErrors();
+ else
+ socket.ignoreSslErrors(errorsToIgnore);
+ }
+ socket.resume();
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout()); // quit by encrypted() or error() signal
+ if (expectSuccess) {
+ QCOMPARE(encryptedSpy.count(), 1);
+ QVERIFY(socket.isEncrypted());
+ QCOMPARE(errorSpy.count(), 0);
+ socket.disconnectFromHost();
+ QVERIFY(socket.waitForDisconnected(10000));
+ } else {
+ QCOMPARE(encryptedSpy.count(), 0);
+ QVERIFY(!socket.isEncrypted());
+ QCOMPARE(errorSpy.count(), 1);
+ QCOMPARE(socket.error(), QAbstractSocket::SslHandshakeFailedError);
+ }
+}
+
+void tst_QSslSocket::setEmptyDefaultConfiguration() // this test should be last, as it has some side effects
+{
+ // used to produce a crash in QSslConfigurationPrivate::deepCopyDefaultConfiguration, QTBUG-13265
+
+ if (!QSslSocket::supportsSsl())
+ return;
+
+ QSslConfiguration emptyConf;
+ QSslConfiguration::setDefaultConfiguration(emptyConf);
+
+ QSslSocketPtr socket = newSocket();
+ connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
+ QVERIFY2(!socket->waitForEncrypted(4000), qPrintable(socket->errorString()));
+}
+
#endif // QT_NO_OPENSSL
QTEST_MAIN(tst_QSslSocket)
+
#include "tst_qsslsocket.moc"
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
index d331658fc8..bc0e04a1f2 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/tst_qsslsocket_onDemandCertificates_member.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
index 4c76a44ac1..dd01733fbe 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/tst_qsslsocket_onDemandCertificates_static.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 0b8952f9ab..f741fb9248 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
index 865a31bfce..67194d2080 100644
--- a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
+++ b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
index 3ad39f754a..ba1cb1649f 100644
--- a/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
+++ b/tests/auto/opengl/qglfunctions/tst_qglfunctions.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
index 97718d136a..aa5547908c 100644
--- a/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
+++ b/tests/auto/opengl/qglthreads/tst_qglthreads.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/opengl/qglthreads/tst_qglthreads.h b/tests/auto/opengl/qglthreads/tst_qglthreads.h
index 54ada3bcce..20f4b67663 100644
--- a/tests/auto/opengl/qglthreads/tst_qglthreads.h
+++ b/tests/auto/opengl/qglthreads/tst_qglthreads.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/atwrapper/atWrapper.cpp b/tests/auto/other/atwrapper/atWrapper.cpp
index 5dc0cd599b..1c04023529 100644
--- a/tests/auto/other/atwrapper/atWrapper.cpp
+++ b/tests/auto/other/atwrapper/atWrapper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/atwrapper/atWrapper.h b/tests/auto/other/atwrapper/atWrapper.h
index 48fe202267..d5df692917 100644
--- a/tests/auto/other/atwrapper/atWrapper.h
+++ b/tests/auto/other/atwrapper/atWrapper.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/atwrapper/atWrapperAutotest.cpp b/tests/auto/other/atwrapper/atWrapperAutotest.cpp
index 2ff3327349..01dfc0a177 100644
--- a/tests/auto/other/atwrapper/atWrapperAutotest.cpp
+++ b/tests/auto/other/atwrapper/atWrapperAutotest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/baselineexample/tst_baselineexample.cpp b/tests/auto/other/baselineexample/tst_baselineexample.cpp
index 7253082974..be4d815244 100644
--- a/tests/auto/other/baselineexample/tst_baselineexample.cpp
+++ b/tests/auto/other/baselineexample/tst_baselineexample.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/collections/tst_collections.cpp b/tests/auto/other/collections/tst_collections.cpp
index 3c55897b46..9bfed15fc4 100644
--- a/tests/auto/other/collections/tst_collections.cpp
+++ b/tests/auto/other/collections/tst_collections.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1310,8 +1310,8 @@ void tst_Collections::byteArray()
QVERIFY(hello.mid(0, hello.size()+1) == hello);
QVERIFY(hello.mid(hello.size()-0) == "");
-
- QVERIFY(hello.mid(hello.size()-0).isNull()); // weird but valid 3.x semantics
+ 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");
@@ -2030,8 +2030,8 @@ void tst_Collections::qstring()
QVERIFY(hello.mid(0, hello.size()+1) == hello);
QVERIFY(hello.mid(hello.size()-0) == "");
-
- QVERIFY(hello.mid(hello.size()-0).isNull());
+ 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");
diff --git a/tests/auto/other/compiler/baseclass.cpp b/tests/auto/other/compiler/baseclass.cpp
index 5eea58d1dc..541ccfcf9e 100644
--- a/tests/auto/other/compiler/baseclass.cpp
+++ b/tests/auto/other/compiler/baseclass.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/compiler/baseclass.h b/tests/auto/other/compiler/baseclass.h
index 1cfa1079a4..b6bc60c46e 100644
--- a/tests/auto/other/compiler/baseclass.h
+++ b/tests/auto/other/compiler/baseclass.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/compiler/derivedclass.cpp b/tests/auto/other/compiler/derivedclass.cpp
index e43e2f9b5b..9d2cbe74da 100644
--- a/tests/auto/other/compiler/derivedclass.cpp
+++ b/tests/auto/other/compiler/derivedclass.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/compiler/derivedclass.h b/tests/auto/other/compiler/derivedclass.h
index 47227a95b5..5456bd726e 100644
--- a/tests/auto/other/compiler/derivedclass.h
+++ b/tests/auto/other/compiler/derivedclass.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp
index db57af63bb..43e3788098 100644
--- a/tests/auto/other/compiler/tst_compiler.cpp
+++ b/tests/auto/other/compiler/tst_compiler.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp b/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp
index 309f6b7d78..b7fcfe8953 100644
--- a/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp
+++ b/tests/auto/other/exceptionsafety/tst_exceptionsafety.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/exceptionsafety_objects/oomsimulator.h b/tests/auto/other/exceptionsafety_objects/oomsimulator.h
index 0727723d47..a6d046a52c 100644
--- a/tests/auto/other/exceptionsafety_objects/oomsimulator.h
+++ b/tests/auto/other/exceptionsafety_objects/oomsimulator.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index 7e569fe7f7..71a70384fc 100644
--- a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
+++ b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp
index daa1893807..01e26b6608 100644
--- a/tests/auto/other/gestures/tst_gestures.cpp
+++ b/tests/auto/other/gestures/tst_gestures.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/headersclean/tst_headersclean.cpp b/tests/auto/other/headersclean/tst_headersclean.cpp
index 807f97af69..41992b8d2a 100644
--- a/tests/auto/other/headersclean/tst_headersclean.cpp
+++ b/tests/auto/other/headersclean/tst_headersclean.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp
index 08c6918eb6..d810e6e41a 100644
--- a/tests/auto/other/lancelot/paintcommands.cpp
+++ b/tests/auto/other/lancelot/paintcommands.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/lancelot/paintcommands.h b/tests/auto/other/lancelot/paintcommands.h
index b22ab58b32..f11031a3b5 100644
--- a/tests/auto/other/lancelot/paintcommands.h
+++ b/tests/auto/other/lancelot/paintcommands.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index 50688ffa17..05623f9f5c 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 12b35795fe..b4bd766df7 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macgui/guitest.cpp b/tests/auto/other/macgui/guitest.cpp
index 6ab5a64a97..5578363fe9 100644
--- a/tests/auto/other/macgui/guitest.cpp
+++ b/tests/auto/other/macgui/guitest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,7 @@
#include <QtTest/QtTest>
#ifdef Q_OS_MAC
-# include <private/qt_mac_p.h>
+# include <ApplicationServices/ApplicationServices.h>
#endif
diff --git a/tests/auto/other/macgui/guitest.h b/tests/auto/other/macgui/guitest.h
index 39a63b0443..3a5382ebe7 100644
--- a/tests/auto/other/macgui/guitest.h
+++ b/tests/auto/other/macgui/guitest.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macgui/tst_macgui.cpp b/tests/auto/other/macgui/tst_macgui.cpp
index 8f66d54a2c..e1fddabf9f 100644
--- a/tests/auto/other/macgui/tst_macgui.cpp
+++ b/tests/auto/other/macgui/tst_macgui.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/expectedeventlist.cpp b/tests/auto/other/macnativeevents/expectedeventlist.cpp
index 9067a38ec6..de92611ce4 100644
--- a/tests/auto/other/macnativeevents/expectedeventlist.cpp
+++ b/tests/auto/other/macnativeevents/expectedeventlist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/expectedeventlist.h b/tests/auto/other/macnativeevents/expectedeventlist.h
index fb4c18d493..39191778c1 100644
--- a/tests/auto/other/macnativeevents/expectedeventlist.h
+++ b/tests/auto/other/macnativeevents/expectedeventlist.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/nativeeventlist.cpp b/tests/auto/other/macnativeevents/nativeeventlist.cpp
index 781c3f5374..d6e786fc91 100644
--- a/tests/auto/other/macnativeevents/nativeeventlist.cpp
+++ b/tests/auto/other/macnativeevents/nativeeventlist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/nativeeventlist.h b/tests/auto/other/macnativeevents/nativeeventlist.h
index f6493e56da..c4e0474a86 100644
--- a/tests/auto/other/macnativeevents/nativeeventlist.h
+++ b/tests/auto/other/macnativeevents/nativeeventlist.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/qnativeevents.cpp b/tests/auto/other/macnativeevents/qnativeevents.cpp
index 79667adcd0..5d31ba78fa 100644
--- a/tests/auto/other/macnativeevents/qnativeevents.cpp
+++ b/tests/auto/other/macnativeevents/qnativeevents.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/qnativeevents.h b/tests/auto/other/macnativeevents/qnativeevents.h
index 3a3e4f1590..b5b4dc0832 100644
--- a/tests/auto/other/macnativeevents/qnativeevents.h
+++ b/tests/auto/other/macnativeevents/qnativeevents.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/qnativeevents_mac.cpp b/tests/auto/other/macnativeevents/qnativeevents_mac.cpp
index 35028f9cf7..b635bccd17 100644
--- a/tests/auto/other/macnativeevents/qnativeevents_mac.cpp
+++ b/tests/auto/other/macnativeevents/qnativeevents_mac.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
index c5131e19fc..9ab1499c47 100644
--- a/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
+++ b/tests/auto/other/macnativeevents/tst_macnativeevents.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macplist/app/main.cpp b/tests/auto/other/macplist/app/main.cpp
index c28c372f08..51c82c88aa 100644
--- a/tests/auto/other/macplist/app/main.cpp
+++ b/tests/auto/other/macplist/app/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/macplist/tst_macplist.cpp b/tests/auto/other/macplist/tst_macplist.cpp
index f2b47c1d99..c527da8522 100644
--- a/tests/auto/other/macplist/tst_macplist.cpp
+++ b/tests/auto/other/macplist/tst_macplist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/modeltest/dynamictreemodel.cpp b/tests/auto/other/modeltest/dynamictreemodel.cpp
index 5ab37ab112..325fc19db2 100644
--- a/tests/auto/other/modeltest/dynamictreemodel.cpp
+++ b/tests/auto/other/modeltest/dynamictreemodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Stephen Kelly <steveire@gmail.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/modeltest/dynamictreemodel.h b/tests/auto/other/modeltest/dynamictreemodel.h
index 6f52d78588..04f7f19b1b 100644
--- a/tests/auto/other/modeltest/dynamictreemodel.h
+++ b/tests/auto/other/modeltest/dynamictreemodel.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Stephen Kelly <steveire@gmail.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/modeltest/modeltest.cpp b/tests/auto/other/modeltest/modeltest.cpp
index 118b4a8e1f..876b6a1365 100644
--- a/tests/auto/other/modeltest/modeltest.cpp
+++ b/tests/auto/other/modeltest/modeltest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/modeltest/modeltest.h b/tests/auto/other/modeltest/modeltest.h
index f70aebabde..1b254a4009 100644
--- a/tests/auto/other/modeltest/modeltest.h
+++ b/tests/auto/other/modeltest/modeltest.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/modeltest/tst_modeltest.cpp b/tests/auto/other/modeltest/tst_modeltest.cpp
index fa9b98acb6..33eb4115e6 100644
--- a/tests/auto/other/modeltest/tst_modeltest.cpp
+++ b/tests/auto/other/modeltest/tst_modeltest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index 3129fd965d..c1a3cd17d2 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index f0c9b11493..69fe00dc19 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -17,7 +17,6 @@ SUBDIRS=\
networkselftest \
qaccessibility \
qcomplextext \
- qdirectpainter \
qfocusevent \
qmultiscreen \
qnetworkaccessmanager_and_qprogressdialog \
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 90ab5b4c67..eca5814b8e 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -233,7 +233,6 @@ private slots:
void statesStructTest();
void navigateHierarchy();
void sliderTest();
- void navigateCovered();
void textAttributes();
void hideShowTest();
@@ -515,112 +514,6 @@ void tst_QAccessibility::sliderTest()
QTestAccessibility::clearEvents();
}
-void tst_QAccessibility::navigateCovered()
-{
- {
- QWidget *w = new QWidget(0);
- w->setObjectName(QString("Harry"));
- QWidget *w1 = new QWidget(w);
- w1->setObjectName(QString("1"));
- QWidget *w2 = new QWidget(w);
- w2->setObjectName(QString("2"));
- w->show();
-#if defined(Q_OS_UNIX)
- QCoreApplication::processEvents();
- QTest::qWait(100);
-#endif
-
- w->setFixedSize(6, 6);
- w1->setFixedSize(5, 5);
- w2->setFixedSize(5, 5);
- w2->move(0, 0);
- w1->raise();
-
- QAccessibleInterface *iface1 = QAccessible::queryAccessibleInterface(w1);
- QVERIFY(iface1 != 0);
- QVERIFY(iface1->isValid());
- QAccessibleInterface *iface2 = QAccessible::queryAccessibleInterface(w2);
- QVERIFY(iface2 != 0);
- QVERIFY(iface2->isValid());
- QAccessibleInterface *iface3 = 0;
-
- QCOMPARE(iface1->navigate(QAccessible::Covers, -42, &iface3), -1);
- QVERIFY(iface3 == 0);
- QCOMPARE(iface1->navigate(QAccessible::Covers, 0, &iface3), -1);
- QVERIFY(iface3 == 0);
- QCOMPARE(iface1->navigate(QAccessible::Covers, 2, &iface3), -1);
- QVERIFY(iface3 == 0);
-
- for (int loop = 0; loop < 2; ++loop) {
- for (int x = 0; x < w->width(); ++x) {
- for (int y = 0; y < w->height(); ++y) {
- w1->move(x, y);
- if (w1->geometry().intersects(w2->geometry())) {
- QVERIFY(iface1->relationTo(iface2) & QAccessible::Covers);
- QVERIFY(iface2->relationTo(iface1) & QAccessible::Covered);
- QCOMPARE(iface1->navigate(QAccessible::Covered, 1, &iface3), 0);
- QVERIFY(iface3 != 0);
- QVERIFY(iface3->isValid());
- QCOMPARE(iface3->object(), iface2->object());
- delete iface3; iface3 = 0;
- QCOMPARE(iface2->navigate(QAccessible::Covers, 1, &iface3), 0);
- QVERIFY(iface3 != 0);
- QVERIFY(iface3->isValid());
- QCOMPARE(iface3->object(), iface1->object());
- delete iface3; iface3 = 0;
- } else {
- QVERIFY(!(iface1->relationTo(iface2) & QAccessible::Covers));
- QVERIFY(!(iface2->relationTo(iface1) & QAccessible::Covered));
- QCOMPARE(iface1->navigate(QAccessible::Covered, 1, &iface3), -1);
- QVERIFY(iface3 == 0);
- QCOMPARE(iface1->navigate(QAccessible::Covers, 1, &iface3), -1);
- QVERIFY(iface3 == 0);
- QCOMPARE(iface2->navigate(QAccessible::Covered, 1, &iface3), -1);
- QVERIFY(iface3 == 0);
- QCOMPARE(iface2->navigate(QAccessible::Covers, 1, &iface3), -1);
- QVERIFY(iface3 == 0);
- }
- }
- }
- if (!loop) {
- // switch children for second loop
- w2->raise();
- QAccessibleInterface *temp = iface1;
- iface1 = iface2;
- iface2 = temp;
- }
- }
- delete iface1; iface1 = 0;
- delete iface2; iface2 = 0;
- iface1 = QAccessible::queryAccessibleInterface(w1);
- QVERIFY(iface1 != 0);
- QVERIFY(iface1->isValid());
- iface2 = QAccessible::queryAccessibleInterface(w2);
- QVERIFY(iface2 != 0);
- QVERIFY(iface2->isValid());
-
- w1->move(0,0);
- w2->move(0,0);
- w1->raise();
- QVERIFY(iface1->relationTo(iface2) & QAccessible::Covers);
- QVERIFY(iface2->relationTo(iface1) & QAccessible::Covered);
- QVERIFY(!iface1->state().invisible);
- w1->hide();
- QVERIFY(iface1->state().invisible);
- QVERIFY(!(iface1->relationTo(iface2) & QAccessible::Covers));
- QVERIFY(!(iface2->relationTo(iface1) & QAccessible::Covered));
- QCOMPARE(iface2->navigate(QAccessible::Covered, 1, &iface3), -1);
- QVERIFY(iface3 == 0);
- QCOMPARE(iface1->navigate(QAccessible::Covers, 1, &iface3), -1);
- QVERIFY(iface3 == 0);
-
- delete iface1; iface1 = 0;
- delete iface2; iface2 = 0;
- delete w;
- }
- QTestAccessibility::clearEvents();
-}
-
void tst_QAccessibility::navigateHierarchy()
{
{
@@ -1366,7 +1259,7 @@ void tst_QAccessibility::menuTest()
QCOMPARE(iSeparator->role(), QAccessible::Separator);
QCOMPARE(iHelp->role(), QAccessible::MenuItem);
QCOMPARE(iAction->role(), QAccessible::MenuItem);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
#ifdef Q_OS_WINCE
if (!IsValidCEPlatform())
QSKIP("Tests do not work on Mobile platforms due to native menus");
@@ -2794,7 +2687,7 @@ void tst_QAccessibility::accelerators()
label->setText(tr("Q &&A"));
QCOMPARE(accLineEdit->text(QAccessible::Accelerator), QString());
-#if !defined(QT_NO_DEBUG) && !defined(Q_WS_MAC)
+#if !defined(QT_NO_DEBUG) && !defined(Q_OS_MAC)
QTest::ignoreMessage(QtWarningMsg, "QKeySequence::mnemonic: \"Q &A&B\" contains multiple occurrences of '&'");
#endif
label->setText(tr("Q &A&B"));
diff --git a/tests/auto/other/qcomplextext/bidireorderstring.h b/tests/auto/other/qcomplextext/bidireorderstring.h
index 32f0c81e69..4289c868e5 100644
--- a/tests/auto/other/qcomplextext/bidireorderstring.h
+++ b/tests/auto/other/qcomplextext/bidireorderstring.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index c741a76a7e..6b418d7c46 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
// Horrible hack, but this get this out of the way for now
// Carlos Duclos, 2007-12-11
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
#include <QtTest/QtTest>
#include <QtGui/QtGui>
@@ -286,5 +286,5 @@ void tst_QComplexText::bidiCursor_PDF()
QTEST_MAIN(tst_QComplexText)
#include "tst_qcomplextext.moc"
-#endif // Q_WS_MAC
+#endif // Q_OS_MAC
diff --git a/tests/auto/other/qdirectpainter/.gitignore b/tests/auto/other/qdirectpainter/.gitignore
deleted file mode 100644
index 615dfa8ddc..0000000000
--- a/tests/auto/other/qdirectpainter/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-tst_qdirectpainter
-runDirectPainter/runDirectPainter
diff --git a/tests/auto/other/qdirectpainter/qdirectpainter.pro b/tests/auto/other/qdirectpainter/qdirectpainter.pro
deleted file mode 100644
index e86b3427eb..0000000000
--- a/tests/auto/other/qdirectpainter/qdirectpainter.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = test runDirectPainter
-
-requires(embedded)
-
diff --git a/tests/auto/other/qdirectpainter/runDirectPainter/runDirectPainter.pro b/tests/auto/other/qdirectpainter/runDirectPainter/runDirectPainter.pro
deleted file mode 100644
index 5b70dc6b7b..0000000000
--- a/tests/auto/other/qdirectpainter/runDirectPainter/runDirectPainter.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG += testcase
-QT += testlib
-SOURCES = main.cpp
-TARGET = runDirectPainter
-
-requires(embedded)
-
diff --git a/tests/auto/other/qdirectpainter/test/test.pro b/tests/auto/other/qdirectpainter/test/test.pro
deleted file mode 100644
index 1f6813670d..0000000000
--- a/tests/auto/other/qdirectpainter/test/test.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-CONFIG += testcase
-QT += widgets testlib
-SOURCES += ../tst_qdirectpainter.cpp
-TARGET = ../tst_qdirectpainter
-
-requires(embedded)
-
diff --git a/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp b/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp
deleted file mode 100644
index 352dd96dd9..0000000000
--- a/tests/auto/other/qdirectpainter/tst_qdirectpainter.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-
-#include <qwindowsystem_qws.h>
-#include <qpainter.h>
-#include <qdesktopwidget.h>
-#include <qdirectpainter_qws.h>
-#include <private/qwindowsurface_qws_p.h>
-#include <private/qdrawhelper_p.h>
-
-class tst_QDirectPainter : public QObject
-{
- Q_OBJECT
-
-public:
- tst_QDirectPainter() {}
- ~tst_QDirectPainter() {}
-
-private slots:
- void initTestCase();
- void setGeometry_data();
- void setGeometry();
-#ifndef QT_NO_PROCESS
- void regionSynchronization();
-#endif
- void reservedSynchronous();
-
-private:
- QWSWindow* getWindow(int windId);
- QColor bgColor;
-};
-
-class ColorPainter : public QDirectPainter
-{
-public:
- ColorPainter(SurfaceFlag flag = NonReserved,
- const QColor &color = QColor(Qt::red))
- : QDirectPainter(0, flag), c(color) {}
-
- QColor color() { return c; }
-
-protected:
- void regionChanged(const QRegion &region) {
- QScreen::instance()->solidFill(c, region);
- }
-
-private:
- QColor c;
- QRegion r;
-};
-
-Q_DECLARE_METATYPE(QDirectPainter::SurfaceFlag)
-
-void tst_QDirectPainter::initTestCase()
-{
- bgColor = QColor(Qt::green);
-
- QWSServer *server = QWSServer::instance();
- server->setBackground(bgColor);
-}
-
-QWSWindow* tst_QDirectPainter::getWindow(int winId)
-{
- QWSServer *server = QWSServer::instance();
- foreach (QWSWindow *w, server->clientWindows()) {
- if (w->winId() == winId)
- return w;
- }
- return 0;
-}
-
-class ColorWidget : public QWidget
-{
-public:
- ColorWidget(QWidget *parent = 0, const QColor &c = QColor(Qt::red))
- : QWidget(parent, Qt::FramelessWindowHint), color(c)
- {
- QPalette opaquePalette = palette();
- opaquePalette.setColor(backgroundRole(), color);
- setPalette(opaquePalette);
- setAutoFillBackground(true);
- }
-
- void paintEvent(QPaintEvent *e) {
- r += e->region();
- }
-
- void reset() {
- r = QRegion();
- }
-
- QColor color;
- QRegion r;
-};
-
-#define VERIFY_COLOR(rect, color) { \
- const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), \
- rect.left(), rect.top(), \
- rect.width(), rect.height()); \
- QCOMPARE(pixmap.size(), rect.size()); \
- QPixmap expectedPixmap(pixmap); /* ensure equal formats */ \
- expectedPixmap.fill(color); \
- QCOMPARE(pixmap, expectedPixmap); \
-}
-
-void tst_QDirectPainter::setGeometry_data()
-{
- QTest::addColumn<QDirectPainter::SurfaceFlag>("flag");
-
- QTest::newRow("NonReserved") << QDirectPainter::NonReserved;
- QTest::newRow("Reserved") << QDirectPainter::Reserved;
- QTest::newRow("ReservedSynchronous") << QDirectPainter::ReservedSynchronous;
-}
-
-void tst_QDirectPainter::setGeometry()
-{
- QFETCH(QDirectPainter::SurfaceFlag, flag);
-
- const QRect rect(100, 100, 100, 100);
- {
- ColorPainter w(flag);
-
- w.setGeometry(rect);
- QApplication::processEvents();
- QCOMPARE(w.geometry(), rect);
- VERIFY_COLOR(rect, w.color());
- }
- QApplication::processEvents();
- VERIFY_COLOR(rect, bgColor);
-}
-
-#ifndef QT_NO_PROCESS
-void tst_QDirectPainter::regionSynchronization()
-{
- QRect dpRect(10, 10, 50, 50);
-
- // Start the direct painter in a different process
- QProcess proc;
- QStringList args;
- args << QString::number(dpRect.x())
- << QString::number(dpRect.y())
- << QString::number(dpRect.width())
- << QString::number(dpRect.height());
-
- proc.start("runDirectPainter/runDirectPainter", args);
- QVERIFY(proc.waitForStarted(5 * 1000));
- QTest::qWait(1000);
- QApplication::processEvents();
- VERIFY_COLOR(dpRect, Qt::blue); // blue hardcoded in runDirectPainter
-
- QTime t;
- t.start();
- static int i = 0;
- while (t.elapsed() < 10 * 1000) {
- QApplication::processEvents();
-
- ColorWidget w;
- w.setGeometry(10, 10, 50, 50);
- const QRect wRect = dpRect.translated(10, 0);
- w.setGeometry(wRect);
- w.show();
-
- QApplication::processEvents();
- QApplication::processEvents(); //glib event loop workaround
- VERIFY_COLOR(wRect, w.color);
- ++i;
- }
- QVERIFY(i > 100); // sanity check
-
- proc.kill();
-}
-#endif
-
-class MyObject : public QObject
-{
-public:
- MyObject(QObject *p = 0) : QObject(p), lastEvent(0) {}
-
- bool event(QEvent *e) {
- lastEvent = e;
- return true;
- }
-
- QEvent *lastEvent;
-};
-
-void tst_QDirectPainter::reservedSynchronous()
-{
- MyObject o;
- QCoreApplication::postEvent(&o, new QEvent(QEvent::None));
- QDirectPainter p(0, QDirectPainter::ReservedSynchronous);
- p.setRegion(QRect(5, 5, 50, 50));
-
- // The event loop should not have been executed
- QVERIFY(o.lastEvent == 0);
- QCOMPARE(p.allocatedRegion(), QRegion(QRect(5, 5, 50, 50)));
-}
-
-QTEST_MAIN(tst_QDirectPainter)
-
-#include "tst_qdirectpainter.moc"
diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
index 9f82a72f65..946003fc72 100644
--- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -136,7 +136,7 @@ void tst_QFocusEvent::initTestCase()
testFocusWidget->resize( 200,100 );
testFocusWidget->show();
// Applications don't get focus when launched from the command line on Mac.
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
testFocusWidget->raise();
#endif
}
@@ -279,7 +279,7 @@ void tst_QFocusEvent::checkReason_Popup()
QVERIFY( !childFocusWidgetTwo->focusOutEventRecieved );
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QT_BEGIN_NAMESPACE
extern void qt_set_sequence_auto_mnemonic(bool);
QT_END_NAMESPACE
@@ -288,7 +288,7 @@ QT_END_NAMESPACE
void tst_QFocusEvent::checkReason_Shortcut()
{
initWidget();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
qt_set_sequence_auto_mnemonic(true);
#endif
QLabel* label = new QLabel( "&Test", testFocusWidget );
@@ -318,7 +318,7 @@ void tst_QFocusEvent::checkReason_Shortcut()
label->hide();
QVERIFY( childFocusWidgetTwo->hasFocus() );
QVERIFY( !childFocusWidgetOne->hasFocus() );
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
qt_set_sequence_auto_mnemonic(false);
#endif
}
diff --git a/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp b/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp
index e6f2432e64..9beb0666eb 100644
--- a/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp
+++ b/tests/auto/other/qmultiscreen/tst_qmultiscreen.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
index 6cf4147091..e6cf2b3d1f 100644
--- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
+++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/tst_qnetworkaccessmanager_and_qprogressdialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp b/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp
index 2533cfb55b..c1144739ed 100644
--- a/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp
+++ b/tests/auto/other/qobjectperformance/tst_qobjectperformance.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
index 41e3001415..5cec1db564 100644
--- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
index 3cda8ed1ee..6540ab596b 100644
--- a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
+++ b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/generateTokenizers.sh b/tests/auto/other/qtokenautomaton/generateTokenizers.sh
index 0a67a1dca0..bca523acfc 100755
--- a/tests/auto/other/qtokenautomaton/generateTokenizers.sh
+++ b/tests/auto/other/qtokenautomaton/generateTokenizers.sh
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is the build configuration utility of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
index 89e22719d1..52da03f9b0 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h
index 8ff67a5b23..54595062af 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
index 5eab3d972a..46823dca97 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h
index 147619604c..82e3b3ed2c 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
index ba7cdfac91..78a3da06ab 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h
index ec3631e272..453a5bc168 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml
index c6f37a218b..40b237817a 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.xml
@@ -24,8 +24,7 @@
<prolog>/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -58,6 +57,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
index 38f7ca90a3..a86631cb98 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h
index 086a9a0ce4..9f0e0d6ab9 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
index a62eab1da7..1b2e3ce181 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h
index f551b46f47..807400c60a 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
index fdff637450..7434affc9b 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h
index 627da4b93a..473dbc0a0c 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h
+++ b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp b/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp
index 789d2f6491..894e59856c 100644
--- a/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp
+++ b/tests/auto/other/qtokenautomaton/tst_qtokenautomaton.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.cpp b/tests/auto/other/windowsmobile/test/ddhelper.cpp
index 7a8c9ea94e..976a0e4e8a 100644
--- a/tests/auto/other/windowsmobile/test/ddhelper.cpp
+++ b/tests/auto/other/windowsmobile/test/ddhelper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.h b/tests/auto/other/windowsmobile/test/ddhelper.h
index de3f79afca..9c5b77c2f8 100644
--- a/tests/auto/other/windowsmobile/test/ddhelper.h
+++ b/tests/auto/other/windowsmobile/test/ddhelper.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
index b211f3e6e2..f201e67ba9 100644
--- a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
index 2c39605f54..f41059b8b0 100644
--- a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
+++ b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/platformquirks.h b/tests/auto/platformquirks.h
index 35ef232aa3..136e084270 100644
--- a/tests/auto/platformquirks.h
+++ b/tests/auto/platformquirks.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index 21459a0080..b02093adae 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index 767744a8a9..c435c22334 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index b018c7428b..7acbf816f1 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -965,7 +965,7 @@ void tst_QSqlDatabase::recordSQLite()
FieldDef("integer", QVariant::Int, QVariant(13)),
FieldDef("int", QVariant::Int, QVariant(12)),
- FieldDef("real", QVariant::String, QVariant(1.234567890123456)),
+ FieldDef("real", QVariant::Double, QVariant(1.234567890123456)),
FieldDef()
};
diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
index 410389e53a..68a347ebdb 100644
--- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
+++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
index 5a2b4b3f57..687be419b5 100644
--- a/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
+++ b/tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
index 75fb6e19ce..5a37cc4cdd 100644
--- a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
+++ b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index 76090fd947..b22e876c3c 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -219,6 +219,9 @@ private slots:
void sqlite_constraint_data() { generic_data("QSQLITE"); }
void sqlite_constraint();
+ void sqlite_real_data() { generic_data("QSQLITE"); }
+ void sqlite_real();
+
private:
// returns all database connections
void generic_data(const QString &engine=QString());
@@ -3309,5 +3312,32 @@ void tst_QSqlQuery::sqlite_constraint()
QCOMPARE(q.lastError().databaseText(), QLatin1String("Raised Abort successfully"));
}
+void tst_QSqlQuery::sqlite_real()
+{
+ QFETCH(QString, dbName);
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ CHECK_DATABASE(db);
+ const QString tableName(qTableName("sqliterealtype", __FILE__));
+ tst_Databases::safeDropTable( db, tableName );
+
+ QSqlQuery q(db);
+ QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id INTEGER, realVal REAL)"));
+ QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
+ QVERIFY_SQL(q, exec("SELECT realVal FROM " + tableName));
+ QVERIFY(q.next());
+ QCOMPARE(q.value(0).toDouble(), 2.3);
+ QCOMPARE(q.record().field(0).type(), QVariant::Double);
+
+ q.prepare("INSERT INTO " + tableName + " (id, realVal) VALUES (?, ?)");
+ QVariant var((double)5.6);
+ q.addBindValue(4);
+ q.addBindValue(var);
+ QVERIFY_SQL(q, exec());
+
+ QVERIFY_SQL(q, exec("SELECT realVal FROM " + tableName + " WHERE ID=4"));
+ QVERIFY(q.next());
+ QCOMPARE(q.value(0).toDouble(), 5.6);
+}
+
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp b/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
index 8dd130a543..28b6b0f859 100644
--- a/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
+++ b/tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
index db92696084..66f6cd2999 100644
--- a/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
+++ b/tests/auto/sql/kernel/qsqlthread/tst_qsqlthread.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
index 333b599c08..33793c013d 100644
--- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index 0414ee235f..45b9c26824 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index 067dd0f7b8..c8b5513a29 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/test.pl b/tests/auto/test.pl
index 8a9c54c7a2..3e1af479af 100755
--- a/tests/auto/test.pl
+++ b/tests/auto/test.pl
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the test suite of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp
index 0499c2e38b..e17fd6ac2e 100644
--- a/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp
+++ b/tests/auto/testlib/qsignalspy/tst_qsignalspy.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/alive/qtestalive.cpp b/tests/auto/testlib/selftests/alive/qtestalive.cpp
index 5220142456..c2e597ac18 100644
--- a/tests/auto/testlib/selftests/alive/qtestalive.cpp
+++ b/tests/auto/testlib/selftests/alive/qtestalive.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/alive/tst_alive.cpp b/tests/auto/testlib/selftests/alive/tst_alive.cpp
index 112ef493b7..12f4a418cb 100644
--- a/tests/auto/testlib/selftests/alive/tst_alive.cpp
+++ b/tests/auto/testlib/selftests/alive/tst_alive.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/assert/tst_assert.cpp b/tests/auto/testlib/selftests/assert/tst_assert.cpp
index c2ec453317..e68b077b69 100644
--- a/tests/auto/testlib/selftests/assert/tst_assert.cpp
+++ b/tests/auto/testlib/selftests/assert/tst_assert.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
index 0d10504020..1c9a0d9493 100644
--- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
+++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
index 7a7a190e7d..2b2d18082f 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
index 8a9a7e3f3a..bcd703b5d1 100644
--- a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
index 2431a1df78..cb1f7feead 100644
--- a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
+++ b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp b/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp
index 38a7029262..c716cb28f3 100644
--- a/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp
+++ b/tests/auto/testlib/selftests/benchlibtickcounter/tst_benchlibtickcounter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp b/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
index c079983e6c..b287ffecd8 100644
--- a/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
+++ b/tests/auto/testlib/selftests/benchlibwalltime/tst_benchlibwalltime.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index 72d3ac9665..b99fb902b1 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp b/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp
index d6d3db886b..5bcae25ab8 100644
--- a/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp
+++ b/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/counting/counting.pro b/tests/auto/testlib/selftests/counting/counting.pro
new file mode 100644
index 0000000000..8aa2fe5753
--- /dev/null
+++ b/tests/auto/testlib/selftests/counting/counting.pro
@@ -0,0 +1,7 @@
+SOURCES += tst_counting.cpp
+QT = core testlib
+
+mac:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = counting
diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp
new file mode 100644
index 0000000000..6758b533bb
--- /dev/null
+++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QCoreApplication>
+#include <QtTest/QtTest>
+
+class tst_Counting : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testPassPass_data();
+ void testPassPass();
+
+ void testPassSkip_data();
+ void testPassSkip();
+
+ void testPassFail_data();
+ void testPassFail();
+
+ void testSkipPass_data();
+ void testSkipPass();
+
+ void testSkipSkip_data();
+ void testSkipSkip();
+
+ void testSkipFail_data();
+ void testSkipFail();
+
+ void testFailPass_data();
+ void testFailPass();
+
+ void testFailSkip_data();
+ void testFailSkip();
+
+ void testFailFail_data();
+ void testFailFail();
+
+private:
+ void helper();
+};
+
+enum TestResult
+{
+ Pass,
+ Fail,
+ Skip
+};
+
+Q_DECLARE_METATYPE(TestResult);
+
+void tst_Counting::helper()
+{
+ QFETCH(TestResult, result);
+
+ switch (result) {
+ case Pass:
+ QVERIFY(true);
+ break;
+ case Fail:
+ QVERIFY(false);
+ break;
+ case Skip:
+ QSKIP("Skipping");
+ break;
+ }
+}
+
+void tst_Counting::testPassPass_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Pass;
+ QTest::newRow("row 2") << Pass;
+}
+
+void tst_Counting::testPassPass()
+{
+ helper();
+}
+
+void tst_Counting::testPassSkip_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Pass;
+ QTest::newRow("row 2") << Skip;
+}
+
+void tst_Counting::testPassSkip()
+{
+ helper();
+}
+
+void tst_Counting::testPassFail_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Pass;
+ QTest::newRow("row 2") << Fail;
+}
+
+void tst_Counting::testPassFail()
+{
+ helper();
+}
+
+void tst_Counting::testSkipPass_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Skip;
+ QTest::newRow("row 2") << Pass;
+}
+
+void tst_Counting::testSkipPass()
+{
+ helper();
+}
+
+void tst_Counting::testSkipSkip_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Skip;
+ QTest::newRow("row 2") << Skip;
+}
+
+void tst_Counting::testSkipSkip()
+{
+ helper();
+}
+
+void tst_Counting::testSkipFail_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Skip;
+ QTest::newRow("row 2") << Fail;
+}
+
+void tst_Counting::testSkipFail()
+{
+ helper();
+}
+
+void tst_Counting::testFailPass_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Fail;
+ QTest::newRow("row 2") << Pass;
+}
+
+void tst_Counting::testFailPass()
+{
+ helper();
+}
+
+void tst_Counting::testFailSkip_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Fail;
+ QTest::newRow("row 2") << Skip;
+}
+
+void tst_Counting::testFailSkip()
+{
+ helper();
+}
+
+void tst_Counting::testFailFail_data()
+{
+ QTest::addColumn<TestResult>("result");
+ QTest::newRow("row 1") << Fail;
+ QTest::newRow("row 2") << Fail;
+}
+
+void tst_Counting::testFailFail()
+{
+ helper();
+}
+
+QTEST_MAIN(tst_Counting)
+#include "tst_counting.moc"
diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
index 35a55a367a..b6298f5e63 100644
--- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
+++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/datatable/tst_datatable.cpp b/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
index de2495ce65..cc68733faa 100644
--- a/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
+++ b/tests/auto/testlib/selftests/datatable/tst_datatable.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
index ee6baacd5b..60ebbfc104 100644
--- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
+++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp b/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp
index 3a9e0eddf4..91b14e5051 100644
--- a/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp
+++ b/tests/auto/testlib/selftests/differentexec/tst_differentexec.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp b/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp
index 34dae53d0f..333f03e591 100644
--- a/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp
+++ b/tests/auto/testlib/selftests/exceptionthrow/tst_exceptionthrow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/expected_counting.lightxml b/tests/auto/testlib/selftests/expected_counting.lightxml
new file mode 100644
index 0000000000..f16abef128
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_counting.lightxml
@@ -0,0 +1,78 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="testPassPass">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="testPassSkip">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+</TestFunction>
+<TestFunction name="testPassFail">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="testSkipPass">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="testSkipSkip">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+</TestFunction>
+<TestFunction name="testSkipFail">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="testFailPass">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="testFailSkip">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+</TestFunction>
+<TestFunction name="testFailFail">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_counting.txt b/tests/auto/testlib/selftests/expected_counting.txt
new file mode 100644
index 0000000000..adf80012c7
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_counting.txt
@@ -0,0 +1,32 @@
+********* Start testing of tst_Counting *********
+Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
+PASS : tst_Counting::initTestCase()
+PASS : tst_Counting::testPassPass()
+SKIP : tst_Counting::testPassSkip(row 2) Skipping
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+SKIP : tst_Counting::testSkipPass(row 1) Skipping
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+PASS : tst_Counting::testSkipPass()
+SKIP : tst_Counting::testSkipSkip(row 1) Skipping
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+SKIP : tst_Counting::testSkipSkip(row 2) Skipping
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+SKIP : tst_Counting::testSkipFail(row 1) Skipping
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+SKIP : tst_Counting::testFailSkip(row 2) Skipping
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+PASS : tst_Counting::cleanupTestCase()
+Totals: 4 passed, 6 failed, 6 skipped
+********* Finished testing of tst_Counting *********
diff --git a/tests/auto/testlib/selftests/expected_counting.xml b/tests/auto/testlib/selftests/expected_counting.xml
new file mode 100644
index 0000000000..f5982d7052
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_counting.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<TestCase name="tst_Counting">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="testPassPass">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="testPassSkip">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+</TestFunction>
+<TestFunction name="testPassFail">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="testSkipPass">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+<TestFunction name="testSkipSkip">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+</TestFunction>
+<TestFunction name="testSkipFail">
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="testFailPass">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="testFailSkip">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+<Message type="skip" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="102">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA[Skipping]]></Description>
+</Message>
+</TestFunction>
+<TestFunction name="testFailFail">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 1]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="99">
+ <DataTag><![CDATA[row 2]]></DataTag>
+ <Description><![CDATA['false' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+</TestFunction>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_counting.xunitxml b/tests/auto/testlib/selftests/expected_counting.xunitxml
new file mode 100644
index 0000000000..c19a1612cb
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_counting.xunitxml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="6" failures="6" tests="11" name="tst_Counting">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="pass" name="testPassPass"/>
+ <testcase name="testPassSkip">
+ <!-- tag="row 2" message="Skipping" type="skip" -->
+ </testcase>
+ <testcase result="fail" name="testPassFail">
+ <failure tag="row 2" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
+ </testcase>
+ <testcase result="pass" name="testSkipPass">
+ <!-- tag="row 1" message="Skipping" type="skip" -->
+ </testcase>
+ <testcase name="testSkipSkip">
+ <!-- tag="row 1" message="Skipping" type="skip" -->
+ <!-- tag="row 2" message="Skipping" type="skip" -->
+ </testcase>
+ <testcase result="fail" name="testSkipFail">
+ <!-- tag="row 1" message="Skipping" type="skip" -->
+ <failure tag="row 2" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
+ </testcase>
+ <testcase result="fail" name="testFailPass">
+ <failure tag="row 1" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
+ </testcase>
+ <testcase result="fail" name="testFailSkip">
+ <failure tag="row 1" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
+ <!-- tag="row 2" message="Skipping" type="skip" -->
+ </testcase>
+ <testcase result="fail" name="testFailFail">
+ <failure tag="row 1" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
+ <failure tag="row 2" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
+ </testcase>
+ <testcase result="pass" name="cleanupTestCase"/>
+ <system-err>
+<![CDATA[Skipping]]>
+<![CDATA[Skipping]]>
+<![CDATA[Skipping]]>
+<![CDATA[Skipping]]>
+<![CDATA[Skipping]]>
+<![CDATA[Skipping]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml
index 79e5827caa..02e4dde7d8 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.lightxml
+++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml
@@ -5,11 +5,11 @@
<TestFunction name="initTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectAndContinue">
+<TestFunction name="xfailAndContinue">
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="70">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="72">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
@@ -17,59 +17,65 @@
</Message>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectAndAbort">
+<TestFunction name="xfailAndAbort">
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="80">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectTwice">
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="87">
+<TestFunction name="xfailTwice">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="90">
<Description><![CDATA[Already expecting a fail]]></Description>
</Incident>
</TestFunction>
<TestFunction name="xfailWithQString">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="97">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="99">
<Description><![CDATA[A string]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="102">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="104">
<Description><![CDATA[Bug 5 (The message)]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="xpass">
-<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="108">
- <Description><![CDATA['true' returned FALSE. ()]]></Description>
-</Incident>
-</TestFunction>
-<TestFunction name="dataDrivenTest">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+<TestFunction name="xfailDataDriven">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="133">
<DataTag><![CDATA[Abort]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="133">
<DataTag><![CDATA[Continue]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectOnWrongRow">
+<TestFunction name="xfailOnWrongRow">
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectOnAnyRow">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+<TestFunction name="xfailOnAnyRow">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="168">
<DataTag><![CDATA[first row]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="168">
<DataTag><![CDATA[second row]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
+<TestFunction name="xpass">
+<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="174">
+ <Description><![CDATA['true' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="xpassDataDriven">
+<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="196">
+ <DataTag><![CDATA[XPass]]></DataTag>
+ <Description><![CDATA['true' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt
index b31245151d..1b98b6b561 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.txt
+++ b/tests/auto/testlib/selftests/expected_expectfail.txt
@@ -1,35 +1,37 @@
********* Start testing of tst_ExpectFail *********
Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
PASS : tst_ExpectFail::initTestCase()
-QDEBUG : tst_ExpectFail::expectAndContinue() begin
-XFAIL : tst_ExpectFail::expectAndContinue() This should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(70)]
-QDEBUG : tst_ExpectFail::expectAndContinue() after
-PASS : tst_ExpectFail::expectAndContinue()
-QDEBUG : tst_ExpectFail::expectAndAbort() begin
-XFAIL : tst_ExpectFail::expectAndAbort() This should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(78)]
-PASS : tst_ExpectFail::expectAndAbort()
-FAIL! : tst_ExpectFail::expectTwice() Already expecting a fail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(87)]
+QDEBUG : tst_ExpectFail::xfailAndContinue() begin
+XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(72)]
+QDEBUG : tst_ExpectFail::xfailAndContinue() after
+PASS : tst_ExpectFail::xfailAndContinue()
+QDEBUG : tst_ExpectFail::xfailAndAbort() begin
+XFAIL : tst_ExpectFail::xfailAndAbort() This should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(80)]
+PASS : tst_ExpectFail::xfailAndAbort()
+FAIL! : tst_ExpectFail::xfailTwice() Already expecting a fail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(90)]
XFAIL : tst_ExpectFail::xfailWithQString() A string
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(97)]
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(99)]
XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message)
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(102)]
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(104)]
PASS : tst_ExpectFail::xfailWithQString()
+XFAIL : tst_ExpectFail::xfailDataDriven(Abort) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(133)]
+XFAIL : tst_ExpectFail::xfailDataDriven(Continue) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(133)]
+PASS : tst_ExpectFail::xfailDataDriven()
+PASS : tst_ExpectFail::xfailOnWrongRow()
+XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(168)]
+XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(168)]
+PASS : tst_ExpectFail::xfailOnAnyRow()
XPASS : tst_ExpectFail::xpass() 'true' returned FALSE. ()
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(108)]
-XFAIL : tst_ExpectFail::dataDrivenTest(Abort) This test should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(141)]
-XFAIL : tst_ExpectFail::dataDrivenTest(Continue) This test should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(141)]
-PASS : tst_ExpectFail::dataDrivenTest()
-PASS : tst_ExpectFail::expectOnWrongRow()
-XFAIL : tst_ExpectFail::expectOnAnyRow(first row) This test should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(176)]
-XFAIL : tst_ExpectFail::expectOnAnyRow(second row) This test should xfail
- Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(176)]
-PASS : tst_ExpectFail::expectOnAnyRow()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(172)]
+XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned FALSE. ()
+ Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(196)]
PASS : tst_ExpectFail::cleanupTestCase()
-Totals: 8 passed, 2 failed, 0 skipped
+Totals: 8 passed, 3 failed, 0 skipped
********* Finished testing of tst_ExpectFail *********
diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml
index 676a030b3f..74b11fb0e5 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.xml
+++ b/tests/auto/testlib/selftests/expected_expectfail.xml
@@ -7,11 +7,11 @@
<TestFunction name="initTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectAndContinue">
+<TestFunction name="xfailAndContinue">
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="70">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="72">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
@@ -19,59 +19,65 @@
</Message>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectAndAbort">
+<TestFunction name="xfailAndAbort">
<Message type="qdebug" file="" line="0">
<Description><![CDATA[begin]]></Description>
</Message>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="78">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="80">
<Description><![CDATA[This should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectTwice">
-<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="87">
+<TestFunction name="xfailTwice">
+<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="90">
<Description><![CDATA[Already expecting a fail]]></Description>
</Incident>
</TestFunction>
<TestFunction name="xfailWithQString">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="97">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="99">
<Description><![CDATA[A string]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="102">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="104">
<Description><![CDATA[Bug 5 (The message)]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="xpass">
-<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="108">
- <Description><![CDATA['true' returned FALSE. ()]]></Description>
-</Incident>
-</TestFunction>
-<TestFunction name="dataDrivenTest">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+<TestFunction name="xfailDataDriven">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="133">
<DataTag><![CDATA[Abort]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="141">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="133">
<DataTag><![CDATA[Continue]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectOnWrongRow">
+<TestFunction name="xfailOnWrongRow">
<Incident type="pass" file="" line="0" />
</TestFunction>
-<TestFunction name="expectOnAnyRow">
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+<TestFunction name="xfailOnAnyRow">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="168">
<DataTag><![CDATA[first row]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
-<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="176">
+<Incident type="xfail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="168">
<DataTag><![CDATA[second row]]></DataTag>
<Description><![CDATA[This test should xfail]]></Description>
</Incident>
<Incident type="pass" file="" line="0" />
</TestFunction>
+<TestFunction name="xpass">
+<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="174">
+ <Description><![CDATA['true' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
+<TestFunction name="xpassDataDriven">
+<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="196">
+ <DataTag><![CDATA[XPass]]></DataTag>
+ <Description><![CDATA['true' returned FALSE. ()]]></Description>
+</Incident>
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml
index 328bb6433b..017e4501c1 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml
+++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml
@@ -1,38 +1,41 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="11" failures="2" tests="10" name="tst_ExpectFail">
+<testsuite errors="11" failures="3" tests="11" name="tst_ExpectFail">
<properties>
- <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
- <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="5.0.0" name="QTestVersion"/>
+ <property value="5.0.0" name="QtVersion"/>
</properties>
<testcase result="pass" name="initTestCase"/>
- <testcase result="xfail" name="expectAndContinue">
+ <testcase result="xfail" name="xfailAndContinue">
<!-- message="begin" type="qdebug" -->
<!-- message="This should xfail" type="info" -->
<!-- message="after" type="qdebug" -->
</testcase>
- <testcase result="xfail" name="expectAndAbort">
+ <testcase result="xfail" name="xfailAndAbort">
<!-- message="begin" type="qdebug" -->
<!-- message="This should xfail" type="info" -->
</testcase>
- <testcase result="fail" name="expectTwice">
+ <testcase result="fail" name="xfailTwice">
<failure message="Already expecting a fail" result="fail"/>
</testcase>
<testcase result="xfail" name="xfailWithQString">
<!-- message="A string" type="info" -->
<!-- message="Bug 5 (The message)" type="info" -->
</testcase>
- <testcase result="xpass" name="xpass">
- <failure message="&apos;true&apos; returned FALSE. ()" result="xpass"/>
- </testcase>
- <testcase result="xfail" name="dataDrivenTest">
+ <testcase result="xfail" name="xfailDataDriven">
<!-- tag="Abort" message="This test should xfail" type="info" -->
<!-- tag="Continue" message="This test should xfail" type="info" -->
</testcase>
- <testcase result="pass" name="expectOnWrongRow"/>
- <testcase result="xfail" name="expectOnAnyRow">
+ <testcase result="pass" name="xfailOnWrongRow"/>
+ <testcase result="xfail" name="xfailOnAnyRow">
<!-- tag="first row" message="This test should xfail" type="info" -->
<!-- tag="second row" message="This test should xfail" type="info" -->
</testcase>
+ <testcase result="xpass" name="xpass">
+ <failure message="&apos;true&apos; returned FALSE. ()" result="xpass"/>
+ </testcase>
+ <testcase result="xpass" name="xpassDataDriven">
+ <failure tag="XPass" message="&apos;true&apos; returned FALSE. ()" result="xpass"/>
+ </testcase>
<testcase result="pass" name="cleanupTestCase"/>
<system-err>
<![CDATA[begin]]>
diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
index 79325a3bfc..3a000ba182 100644
--- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
+++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,20 +50,22 @@ class tst_ExpectFail: public QObject
Q_OBJECT
private slots:
- void expectAndContinue() const;
- void expectAndAbort() const;
- void expectTwice() const;
+ void xfailAndContinue() const;
+ void xfailAndAbort() const;
+ void xfailTwice() const;
void xfailWithQString() const;
+ void xfailDataDriven_data() const;
+ void xfailDataDriven() const;
+ void xfailOnWrongRow_data() const;
+ void xfailOnWrongRow() const;
+ void xfailOnAnyRow_data() const;
+ void xfailOnAnyRow() const;
void xpass() const;
- void dataDrivenTest_data() const;
- void dataDrivenTest() const;
- void expectOnWrongRow_data() const;
- void expectOnWrongRow() const;
- void expectOnAnyRow_data() const;
- void expectOnAnyRow() const;
+ void xpassDataDriven_data() const;
+ void xpassDataDriven() const;
};
-void tst_ExpectFail::expectAndContinue() const
+void tst_ExpectFail::xfailAndContinue() const
{
qDebug("begin");
QEXPECT_FAIL("", "This should xfail", Continue);
@@ -71,7 +73,7 @@ void tst_ExpectFail::expectAndContinue() const
qDebug("after");
}
-void tst_ExpectFail::expectAndAbort() const
+void tst_ExpectFail::xfailAndAbort() const
{
qDebug("begin");
QEXPECT_FAIL("", "This should xfail", Abort);
@@ -81,7 +83,7 @@ void tst_ExpectFail::expectAndAbort() const
QVERIFY2(false, "This should not be reached");
}
-void tst_ExpectFail::expectTwice() const
+void tst_ExpectFail::xfailTwice() const
{
QEXPECT_FAIL("", "Calling QEXPECT_FAIL once is fine", Abort);
QEXPECT_FAIL("", "Calling QEXPECT_FAIL when already expecting a failure is "
@@ -102,17 +104,7 @@ void tst_ExpectFail::xfailWithQString() const
QVERIFY(false);
}
-void tst_ExpectFail::xpass() const
-{
- QEXPECT_FAIL("", "This test should xpass", Abort);
- QVERIFY(true);
-
- // If we get here the test did not correctly abort on the previous
- // unexpected pass.
- QVERIFY2(false, "This should not be reached");
-}
-
-void tst_ExpectFail::dataDrivenTest_data() const
+void tst_ExpectFail::xfailDataDriven_data() const
{
QTest::addColumn<bool>("shouldPass");
QTest::addColumn<QTest::TestFailMode>("failMode");
@@ -123,7 +115,7 @@ void tst_ExpectFail::dataDrivenTest_data() const
QTest::newRow("Continue") << false << QTest::Continue;
}
-void tst_ExpectFail::dataDrivenTest() const
+void tst_ExpectFail::xfailDataDriven() const
{
QFETCH(bool, shouldPass);
QFETCH(QTest::TestFailMode, failMode);
@@ -146,21 +138,21 @@ void tst_ExpectFail::dataDrivenTest() const
QCOMPARE(failMode, QTest::Continue);
}
-void tst_ExpectFail::expectOnWrongRow_data() const
+void tst_ExpectFail::xfailOnWrongRow_data() const
{
QTest::addColumn<int>("dummy");
QTest::newRow("right row") << 0;
}
-void tst_ExpectFail::expectOnWrongRow() const
+void tst_ExpectFail::xfailOnWrongRow() const
{
// QEXPECT_FAIL for a row that is not the current row should be ignored.
QEXPECT_FAIL("wrong row", "This xfail should be ignored", Abort);
QVERIFY(true);
}
-void tst_ExpectFail::expectOnAnyRow_data() const
+void tst_ExpectFail::xfailOnAnyRow_data() const
{
QTest::addColumn<int>("dummy");
@@ -168,7 +160,7 @@ void tst_ExpectFail::expectOnAnyRow_data() const
QTest::newRow("second row") << 1;
}
-void tst_ExpectFail::expectOnAnyRow() const
+void tst_ExpectFail::xfailOnAnyRow() const
{
// In a data-driven test, passing an empty first parameter to QEXPECT_FAIL
// should mean that the failure is expected for all data rows.
@@ -176,5 +168,36 @@ void tst_ExpectFail::expectOnAnyRow() const
QVERIFY(false);
}
+void tst_ExpectFail::xpass() const
+{
+ QEXPECT_FAIL("", "This test should xpass", Abort);
+ QVERIFY(true);
+
+ // If we get here the test did not correctly abort on the previous
+ // unexpected pass.
+ QVERIFY2(false, "This should not be reached");
+}
+
+void tst_ExpectFail::xpassDataDriven_data() const
+{
+ QTest::addColumn<bool>("shouldXPass");
+
+ QTest::newRow("XPass") << true;
+ QTest::newRow("Pass") << false;
+}
+
+void tst_ExpectFail::xpassDataDriven() const
+{
+ QFETCH(bool, shouldXPass);
+
+ if (shouldXPass)
+ QEXPECT_FAIL(QTest::currentDataTag(), "This test should xpass", Abort);
+
+ QVERIFY(true);
+
+ // We should only get here if the test wasn't supposed to xpass.
+ QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS");
+}
+
QTEST_MAIN(tst_ExpectFail)
#include "tst_expectfail.moc"
diff --git a/tests/auto/testlib/selftests/failinit/tst_failinit.cpp b/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
index 8f217f1d0a..e366572c13 100644
--- a/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
+++ b/tests/auto/testlib/selftests/failinit/tst_failinit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp b/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
index b14242f129..97dc3f8e64 100644
--- a/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
+++ b/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp b/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp
index f6f4f0de99..d0c958c240 100644
--- a/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp
+++ b/tests/auto/testlib/selftests/fetchbogus/tst_fetchbogus.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp
index 09b8634334..c2e073d2ca 100644
--- a/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp
+++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -134,11 +134,17 @@ void FindTestData::paths()
// __FILE__ may be absolute or relative path; test both.
// absolute:
+#if defined(Q_OS_WIN)
+ QCOMPARE(QTest::qFindTestData(TESTFILE, qPrintable(app_path + "/fakesrc/fakefile.cpp"), __LINE__).toLower(), testfile_path3.toLower());
+#else
QCOMPARE(QTest::qFindTestData(TESTFILE, qPrintable(app_path + "/fakesrc/fakefile.cpp"), __LINE__), testfile_path3);
-
+#endif
// relative: (pretend that we were compiled within fakebuild directory, pointing at files in ../fakesrc)
+#if defined(Q_OS_WIN)
+ QCOMPARE(QTest::qFindTestData(TESTFILE, "../fakesrc/fakefile.cpp", __LINE__, qPrintable(app_path + "/fakebuild")).toLower(), testfile_path3.toLower());
+#else
QCOMPARE(QTest::qFindTestData(TESTFILE, "../fakesrc/fakefile.cpp", __LINE__, qPrintable(app_path + "/fakebuild")), testfile_path3);
-
+#endif
QVERIFY(QFile(testfile_path3).remove());
// Note, this is expected to generate a warning.
diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp
index 47fb253cd0..9b7865ed25 100644
--- a/tests/auto/testlib/selftests/float/tst_float.cpp
+++ b/tests/auto/testlib/selftests/float/tst_float.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp b/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp
index 5a7ffd328f..c30396d28b 100644
--- a/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp
+++ b/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/longstring/tst_longstring.cpp b/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
index d42e760483..4fa76c3f57 100644
--- a/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
+++ b/tests/auto/testlib/selftests/longstring/tst_longstring.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp
index fdfe00fc42..207914ebfb 100644
--- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp
+++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp b/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp
index d6a5e32f05..ce61142bf7 100644
--- a/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp
+++ b/tests/auto/testlib/selftests/multiexec/tst_multiexec.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
index 4fdd33268a..c8b4f6d0fa 100644
--- a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
+++ b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
index 23dbfa1ee4..dad7a41c6c 100644
--- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp b/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp
index 5df7e1e1d5..7ce1fcfdf2 100644
--- a/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp
+++ b/tests/auto/testlib/selftests/qexecstringlist/tst_qexecstringlist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri
index f506c8c08c..95664c3793 100644
--- a/tests/auto/testlib/selftests/selftests.pri
+++ b/tests/auto/testlib/selftests/selftests.pri
@@ -4,4 +4,4 @@ SUBPROGRAMS = subtest warnings maxwarnings cmptest globaldata skip \
exceptionthrow qexecstringlist datatable commandlinedata\
benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \
benchliboptions xunit badxml longstring float printdatatags \
- printdatatagswithglobaltags findtestdata
+ printdatatagswithglobaltags findtestdata counting
diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc
index fb303af2b5..d10aa56ceb 100644
--- a/tests/auto/testlib/selftests/selftests.qrc
+++ b/tests/auto/testlib/selftests/selftests.qrc
@@ -37,6 +37,10 @@
<file>expected_commandlinedata.txt</file>
<file>expected_commandlinedata.xml</file>
<file>expected_commandlinedata.xunitxml</file>
+ <file>expected_counting.lightxml</file>
+ <file>expected_counting.txt</file>
+ <file>expected_counting.xml</file>
+ <file>expected_counting.xunitxml</file>
<file>expected_crashes.lightxml</file>
<file>expected_crashes.xml</file>
<file>expected_crashes.xunitxml</file>
diff --git a/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp b/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp
index d36b9b52f9..a95cc2f8a6 100644
--- a/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp
+++ b/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/skip/tst_skip.cpp b/tests/auto/testlib/selftests/skip/tst_skip.cpp
index 76e9059f87..e7879c2e91 100644
--- a/tests/auto/testlib/selftests/skip/tst_skip.cpp
+++ b/tests/auto/testlib/selftests/skip/tst_skip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp b/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp
index 052dabb343..c7e0c00a06 100644
--- a/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp
+++ b/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp b/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp
index 96c9eb6aff..cd7b472221 100644
--- a/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp
+++ b/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/sleep/tst_sleep.cpp b/tests/auto/testlib/selftests/sleep/tst_sleep.cpp
index 349ecb1d1c..3bebca5e9a 100644
--- a/tests/auto/testlib/selftests/sleep/tst_sleep.cpp
+++ b/tests/auto/testlib/selftests/sleep/tst_sleep.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
index 2cd69a5873..20bfc2228a 100644
--- a/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
+++ b/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
index 385d43ab8d..5e54105a88 100644
--- a/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
+++ b/tests/auto/testlib/selftests/subtest/tst_subtest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 04696a1387..aaa58e092c 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -327,6 +327,7 @@ void tst_Selftests::runSubTest_data()
<< "benchliboptions"
<< "cmptest"
<< "commandlinedata"
+ << "counting"
<< "crashes"
<< "datatable"
<< "datetime"
diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
index 30fe15d354..933d0cc6ce 100644
--- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
+++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/testlib/selftests/xunit/tst_xunit.cpp b/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
index 4193387bc1..a69725639e 100644
--- a/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
+++ b/tests/auto/testlib/selftests/xunit/tst_xunit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/Test.framework/Headers/testinterface.h b/tests/auto/tools/moc/Test.framework/Headers/testinterface.h
index d9f9a2b0f5..690a8c5503 100644
--- a/tests/auto/tools/moc/Test.framework/Headers/testinterface.h
+++ b/tests/auto/tools/moc/Test.framework/Headers/testinterface.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/assign-namespace.h b/tests/auto/tools/moc/assign-namespace.h
index c73724918c..716bfbc9fe 100644
--- a/tests/auto/tools/moc/assign-namespace.h
+++ b/tests/auto/tools/moc/assign-namespace.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/backslash-newlines.h b/tests/auto/tools/moc/backslash-newlines.h
index e7edf4664b..4ba6883e15 100644
--- a/tests/auto/tools/moc/backslash-newlines.h
+++ b/tests/auto/tools/moc/backslash-newlines.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/c-comments.h b/tests/auto/tools/moc/c-comments.h
index fc58191e86..bc60747c4b 100644
--- a/tests/auto/tools/moc/c-comments.h
+++ b/tests/auto/tools/moc/c-comments.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/cstyle-enums.h b/tests/auto/tools/moc/cstyle-enums.h
index 21a883eb58..473f012928 100644
--- a/tests/auto/tools/moc/cstyle-enums.h
+++ b/tests/auto/tools/moc/cstyle-enums.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/cxx11-enums.h b/tests/auto/tools/moc/cxx11-enums.h
index ef98b6acfa..d3d06c398e 100644
--- a/tests/auto/tools/moc/cxx11-enums.h
+++ b/tests/auto/tools/moc/cxx11-enums.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Olivier Goffart.
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/dir-in-include-path.h b/tests/auto/tools/moc/dir-in-include-path.h
index cb530e20d9..d8b9b44794 100644
--- a/tests/auto/tools/moc/dir-in-include-path.h
+++ b/tests/auto/tools/moc/dir-in-include-path.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/error-on-wrong-notify.h b/tests/auto/tools/moc/error-on-wrong-notify.h
index 2f8de785a0..e7babfd9cb 100644
--- a/tests/auto/tools/moc/error-on-wrong-notify.h
+++ b/tests/auto/tools/moc/error-on-wrong-notify.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/escapes-in-string-literals.h b/tests/auto/tools/moc/escapes-in-string-literals.h
index 71e9759f36..033dca34eb 100644
--- a/tests/auto/tools/moc/escapes-in-string-literals.h
+++ b/tests/auto/tools/moc/escapes-in-string-literals.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/extraqualification.h b/tests/auto/tools/moc/extraqualification.h
index a54ed1770e..3cacf66381 100644
--- a/tests/auto/tools/moc/extraqualification.h
+++ b/tests/auto/tools/moc/extraqualification.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/forgotten-qinterface.h b/tests/auto/tools/moc/forgotten-qinterface.h
index 3be4422bdc..994d0378a7 100644
--- a/tests/auto/tools/moc/forgotten-qinterface.h
+++ b/tests/auto/tools/moc/forgotten-qinterface.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/gadgetwithnoenums.h b/tests/auto/tools/moc/gadgetwithnoenums.h
index 1ef0eeece9..560f95835a 100644
--- a/tests/auto/tools/moc/gadgetwithnoenums.h
+++ b/tests/auto/tools/moc/gadgetwithnoenums.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/interface-from-framework.h b/tests/auto/tools/moc/interface-from-framework.h
index e78b6ec51a..3b8c901cca 100644
--- a/tests/auto/tools/moc/interface-from-framework.h
+++ b/tests/auto/tools/moc/interface-from-framework.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/macro-on-cmdline.h b/tests/auto/tools/moc/macro-on-cmdline.h
index 78ca4778cc..0d14f02027 100644
--- a/tests/auto/tools/moc/macro-on-cmdline.h
+++ b/tests/auto/tools/moc/macro-on-cmdline.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/namespaced-flags.h b/tests/auto/tools/moc/namespaced-flags.h
index 86b9891028..b8e09cce1c 100644
--- a/tests/auto/tools/moc/namespaced-flags.h
+++ b/tests/auto/tools/moc/namespaced-flags.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/no-keywords.h b/tests/auto/tools/moc/no-keywords.h
index 4f15aa2ad0..3f3b06dd46 100644
--- a/tests/auto/tools/moc/no-keywords.h
+++ b/tests/auto/tools/moc/no-keywords.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/oldstyle-casts.h b/tests/auto/tools/moc/oldstyle-casts.h
index f26aeb5629..e6d5ddb1ff 100644
--- a/tests/auto/tools/moc/oldstyle-casts.h
+++ b/tests/auto/tools/moc/oldstyle-casts.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/os9-newlines.h b/tests/auto/tools/moc/os9-newlines.h
index a2bf57fbb4..3d16ae3b91 100644
--- a/tests/auto/tools/moc/os9-newlines.h
+++ b/tests/auto/tools/moc/os9-newlines.h
@@ -1 +1 @@
-/**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QObject> class Os9Newlines : public QObject { Q_OBJECT public Q_SLOTS: inline void testSlot() {} }; \ No newline at end of file
+/**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QObject> class Os9Newlines : public QObject { Q_OBJECT public Q_SLOTS: inline void testSlot() {} }; \ No newline at end of file
diff --git a/tests/auto/tools/moc/parse-boost.h b/tests/auto/tools/moc/parse-boost.h
index f475cb8778..181fbb5180 100644
--- a/tests/auto/tools/moc/parse-boost.h
+++ b/tests/auto/tools/moc/parse-boost.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/pure-virtual-signals.h b/tests/auto/tools/moc/pure-virtual-signals.h
index 4009de1e86..cd67413a5f 100644
--- a/tests/auto/tools/moc/pure-virtual-signals.h
+++ b/tests/auto/tools/moc/pure-virtual-signals.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/qinvokable.h b/tests/auto/tools/moc/qinvokable.h
index 17f1610ebe..0c1ec80b7f 100644
--- a/tests/auto/tools/moc/qinvokable.h
+++ b/tests/auto/tools/moc/qinvokable.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/qprivateslots.h b/tests/auto/tools/moc/qprivateslots.h
index 25c2ce2ba6..cf3a14df08 100644
--- a/tests/auto/tools/moc/qprivateslots.h
+++ b/tests/auto/tools/moc/qprivateslots.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/single_function_keyword.h b/tests/auto/tools/moc/single_function_keyword.h
index 62b91e2b38..2ba0a3a581 100644
--- a/tests/auto/tools/moc/single_function_keyword.h
+++ b/tests/auto/tools/moc/single_function_keyword.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/slots-with-void-template.h b/tests/auto/tools/moc/slots-with-void-template.h
index d182e752d9..081b03eb4a 100644
--- a/tests/auto/tools/moc/slots-with-void-template.h
+++ b/tests/auto/tools/moc/slots-with-void-template.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/task189996.h b/tests/auto/tools/moc/task189996.h
index 1f07266d18..abe5f2e21a 100644
--- a/tests/auto/tools/moc/task189996.h
+++ b/tests/auto/tools/moc/task189996.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/task192552.h b/tests/auto/tools/moc/task192552.h
index 843c19f11d..72be7549bf 100644
--- a/tests/auto/tools/moc/task192552.h
+++ b/tests/auto/tools/moc/task192552.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/task234909.h b/tests/auto/tools/moc/task234909.h
index ead7ce7791..a2c9598f1a 100644
--- a/tests/auto/tools/moc/task234909.h
+++ b/tests/auto/tools/moc/task234909.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/task240368.h b/tests/auto/tools/moc/task240368.h
index c019a5457d..95023af9d8 100644
--- a/tests/auto/tools/moc/task240368.h
+++ b/tests/auto/tools/moc/task240368.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/task87883.h b/tests/auto/tools/moc/task87883.h
index 3079809020..372c4c922c 100644
--- a/tests/auto/tools/moc/task87883.h
+++ b/tests/auto/tools/moc/task87883.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/template-gtgt.h b/tests/auto/tools/moc/template-gtgt.h
index 601c706c14..984fee5054 100644
--- a/tests/auto/tools/moc/template-gtgt.h
+++ b/tests/auto/tools/moc/template-gtgt.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/testproject/Plugin/Plugin.h b/tests/auto/tools/moc/testproject/Plugin/Plugin.h
index 90ed8e9be1..9da3fe018f 100644
--- a/tests/auto/tools/moc/testproject/Plugin/Plugin.h
+++ b/tests/auto/tools/moc/testproject/Plugin/Plugin.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/trigraphs.h b/tests/auto/tools/moc/trigraphs.h
index 9a76c933b1..e8cd6ff78a 100644
--- a/tests/auto/tools/moc/trigraphs.h
+++ b/tests/auto/tools/moc/trigraphs.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index bce1ad8d00..7c47d60e81 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/using-namespaces.h b/tests/auto/tools/moc/using-namespaces.h
index 52d15e7541..46595504e1 100644
--- a/tests/auto/tools/moc/using-namespaces.h
+++ b/tests/auto/tools/moc/using-namespaces.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h b/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h
index ae4ca10960..1d124419c1 100644
--- a/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h
+++ b/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/warn-on-property-without-read.h b/tests/auto/tools/moc/warn-on-property-without-read.h
index c631b9da52..830c0761f2 100644
--- a/tests/auto/tools/moc/warn-on-property-without-read.h
+++ b/tests/auto/tools/moc/warn-on-property-without-read.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/moc/win-newlines.h b/tests/auto/tools/moc/win-newlines.h
index 0dd7366bbc..15b80b364b 100644
--- a/tests/auto/tools/moc/win-newlines.h
+++ b/tests/auto/tools/moc/win-newlines.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp
index 098c8c6d7c..d2cb9f2435 100644
--- a/tests/auto/tools/qmake/testcompiler.cpp
+++ b/tests/auto/tools/qmake/testcompiler.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testcompiler.h b/tests/auto/tools/qmake/testcompiler.h
index 7e8d7ecbe6..116e424551 100644
--- a/tests/auto/tools/qmake/testcompiler.h
+++ b/tests/auto/tools/qmake/testcompiler.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/main.cpp b/tests/auto/tools/qmake/testdata/findDeps/main.cpp
index ab39567517..80514011a2 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/main.cpp
+++ b/tests/auto/tools/qmake/testdata/findDeps/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object1.h b/tests/auto/tools/qmake/testdata/findDeps/object1.h
index a2a9bc3978..f448fdffa0 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object1.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object1.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object2.h b/tests/auto/tools/qmake/testdata/findDeps/object2.h
index d055694a48..5837110e9a 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object2.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object2.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object3.h b/tests/auto/tools/qmake/testdata/findDeps/object3.h
index d3e6ae685e..8f82fdbc9f 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object3.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object3.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object4.h b/tests/auto/tools/qmake/testdata/findDeps/object4.h
index 8ef8458b50..7fd421ed43 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object4.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object4.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object5.h b/tests/auto/tools/qmake/testdata/findDeps/object5.h
index 508ac33832..97a806ca02 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object5.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object5.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object6.h b/tests/auto/tools/qmake/testdata/findDeps/object6.h
index 460f2ba6cd..bdad2e0c05 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object6.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object6.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object7.h b/tests/auto/tools/qmake/testdata/findDeps/object7.h
index 19837add87..f78f0c8a24 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object7.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object7.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object8.h b/tests/auto/tools/qmake/testdata/findDeps/object8.h
index 025e656a39..80ab50d867 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object8.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object8.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findDeps/object9.h b/tests/auto/tools/qmake/testdata/findDeps/object9.h
index 8b8c84478b..c9c2375159 100644
--- a/tests/auto/tools/qmake/testdata/findDeps/object9.h
+++ b/tests/auto/tools/qmake/testdata/findDeps/object9.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/main.cpp b/tests/auto/tools/qmake/testdata/findMocs/main.cpp
index ed2faacfba..53bdd037da 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/main.cpp
+++ b/tests/auto/tools/qmake/testdata/findMocs/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object1.h b/tests/auto/tools/qmake/testdata/findMocs/object1.h
index 1b3f3b6cba..d56484b34f 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object1.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object1.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object2.h b/tests/auto/tools/qmake/testdata/findMocs/object2.h
index a95a971d98..5a36dce672 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object2.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object2.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object3.h b/tests/auto/tools/qmake/testdata/findMocs/object3.h
index c347385688..2fb0921976 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object3.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object3.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object4.h b/tests/auto/tools/qmake/testdata/findMocs/object4.h
index 67814ee6eb..d1a41d20d9 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object4.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object4.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object5.h b/tests/auto/tools/qmake/testdata/findMocs/object5.h
index a17eaab6f4..5e70d75fc9 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object5.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object5.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object6.h b/tests/auto/tools/qmake/testdata/findMocs/object6.h
index 41b1d9635f..4fa2450c01 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object6.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object6.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/findMocs/object7.h b/tests/auto/tools/qmake/testdata/findMocs/object7.h
index a09faed78a..c60479a644 100644
--- a/tests/auto/tools/qmake/testdata/findMocs/object7.h
+++ b/tests/auto/tools/qmake/testdata/findMocs/object7.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/1.cpp b/tests/auto/tools/qmake/testdata/functions/1.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/1.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/1.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/2.cpp b/tests/auto/tools/qmake/testdata/functions/2.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/2.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/one/1.cpp b/tests/auto/tools/qmake/testdata/functions/one/1.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/one/1.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/one/1.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/one/2.cpp b/tests/auto/tools/qmake/testdata/functions/one/2.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/one/2.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/one/2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp b/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/three/wildcard21.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp b/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/three/wildcard22.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/two/1.cpp b/tests/auto/tools/qmake/testdata/functions/two/1.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/two/1.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/two/1.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/two/2.cpp b/tests/auto/tools/qmake/testdata/functions/two/2.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/two/2.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/two/2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp b/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/wildcard21.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp b/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp
index b7ac2c493e..7dd482ea7d 100644
--- a/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp
+++ b/tests/auto/tools/qmake/testdata/functions/wildcard22.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/include_dir/main.cpp b/tests/auto/tools/qmake/testdata/include_dir/main.cpp
index f88dbac4fc..fb5697e8a1 100644
--- a/tests/auto/tools/qmake/testdata/include_dir/main.cpp
+++ b/tests/auto/tools/qmake/testdata/include_dir/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp b/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
index 5c7dcc4825..07ffc4c26a 100644
--- a/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/include_dir/test_file.h b/tests/auto/tools/qmake/testdata/include_dir/test_file.h
index cf8236084d..48aa026029 100644
--- a/tests/auto/tools/qmake/testdata/include_dir/test_file.h
+++ b/tests/auto/tools/qmake/testdata/include_dir/test_file.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/include_function/main.cpp b/tests/auto/tools/qmake/testdata/include_function/main.cpp
index 980b3b2eef..dda7abd714 100644
--- a/tests/auto/tools/qmake/testdata/include_function/main.cpp
+++ b/tests/auto/tools/qmake/testdata/include_function/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/install_depends/main.cpp b/tests/auto/tools/qmake/testdata/install_depends/main.cpp
index 253be88814..1d0fd02b09 100644
--- a/tests/auto/tools/qmake/testdata/install_depends/main.cpp
+++ b/tests/auto/tools/qmake/testdata/install_depends/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp b/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
index 14b431f00d..ace80a987e 100644
--- a/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/install_depends/test_file.h b/tests/auto/tools/qmake/testdata/install_depends/test_file.h
index a00d395580..22690eefde 100644
--- a/tests/auto/tools/qmake/testdata/install_depends/test_file.h
+++ b/tests/auto/tools/qmake/testdata/install_depends/test_file.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/one_space/main.cpp b/tests/auto/tools/qmake/testdata/one_space/main.cpp
index d75a55df27..ef46cd28b7 100644
--- a/tests/auto/tools/qmake/testdata/one_space/main.cpp
+++ b/tests/auto/tools/qmake/testdata/one_space/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp b/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
index 5a64aad773..46b96dd0a6 100644
--- a/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
+++ b/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/shadow_files/main.cpp b/tests/auto/tools/qmake/testdata/shadow_files/main.cpp
index 253be88814..1d0fd02b09 100644
--- a/tests/auto/tools/qmake/testdata/shadow_files/main.cpp
+++ b/tests/auto/tools/qmake/testdata/shadow_files/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp b/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
index 14b431f00d..ace80a987e 100644
--- a/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/shadow_files/test_file.h b/tests/auto/tools/qmake/testdata/shadow_files/test_file.h
index a00d395580..22690eefde 100644
--- a/tests/auto/tools/qmake/testdata/shadow_files/test_file.h
+++ b/tests/auto/tools/qmake/testdata/shadow_files/test_file.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_app/main.cpp b/tests/auto/tools/qmake/testdata/simple_app/main.cpp
index ef011a10b0..789b3b9549 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/main.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_app/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp b/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
index 14b431f00d..ace80a987e 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_app/test_file.h b/tests/auto/tools/qmake/testdata/simple_app/test_file.h
index a00d395580..22690eefde 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/test_file.h
+++ b/tests/auto/tools/qmake/testdata/simple_app/test_file.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp b/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
index a0a8911644..d797bae34a 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple.h b/tests/auto/tools/qmake/testdata/simple_dll/simple.h
index 351b568923..5bebb42584 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple.h
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp b/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
index a0a8911644..d797bae34a 100644
--- a/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
+++ b/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple.h b/tests/auto/tools/qmake/testdata/simple_lib/simple.h
index ce9311e0a1..feaf8ec0b3 100644
--- a/tests/auto/tools/qmake/testdata/simple_lib/simple.h
+++ b/tests/auto/tools/qmake/testdata/simple_lib/simple.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp b/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
index 76e559325e..58b2b7cb43 100644
--- a/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
+++ b/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp
index ef011a10b0..789b3b9549 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp
index 14b431f00d..ace80a987e 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h
index a00d395580..22690eefde 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp
index a0a8911644..d797bae34a 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h
index 351b568923..5bebb42584 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp
index 03f7720c22..fcebd6b821 100644
--- a/tests/auto/tools/qmake/tst_qmake.cpp
+++ b/tests/auto/tools/qmake/tst_qmake.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp
index 963ec75d75..0124b580a8 100644
--- a/tests/auto/tools/rcc/tst_rcc.cpp
+++ b/tests/auto/tools/rcc/tst_rcc.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui b/tests/auto/tools/uic/baseline/batchtranslation.ui
index e3103cb358..c883087dba 100644
--- a/tests/auto/tools/uic/baseline/batchtranslation.ui
+++ b/tests/auto/tools/uic/baseline/batchtranslation.ui
@@ -3,8 +3,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -37,6 +36,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
index a2f65b58a9..302dbc2cb4 100644
--- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h
+++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/config.ui b/tests/auto/tools/uic/baseline/config.ui
index e509a5dcc9..4718ed152a 100644
--- a/tests/auto/tools/uic/baseline/config.ui
+++ b/tests/auto/tools/uic/baseline/config.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h
index cfaf7b7846..5606978f09 100644
--- a/tests/auto/tools/uic/baseline/config.ui.h
+++ b/tests/auto/tools/uic/baseline/config.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/finddialog.ui b/tests/auto/tools/uic/baseline/finddialog.ui
index b2d3c4097d..8789f4c2fa 100644
--- a/tests/auto/tools/uic/baseline/finddialog.ui
+++ b/tests/auto/tools/uic/baseline/finddialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h
index 3f544c999d..12f5514d41 100644
--- a/tests/auto/tools/uic/baseline/finddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/finddialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui b/tests/auto/tools/uic/baseline/formwindowsettings.ui
index bca70a7fe1..1b2e6e2cdf 100644
--- a/tests/auto/tools/uic/baseline/formwindowsettings.ui
+++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
index 9e9edc08a6..ffc1e1ad39 100644
--- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
+++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui b/tests/auto/tools/uic/baseline/helpdialog.ui
index 7da10cd4f7..d9338ba5a7 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui
@@ -3,8 +3,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -37,6 +36,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h
index fa7bbe3810..b16632fe00 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui b/tests/auto/tools/uic/baseline/listwidgeteditor.ui
index 0a38d8f65f..67eaaca287 100644
--- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui
+++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
index a95f2cb860..1cca34b1fa 100644
--- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui b/tests/auto/tools/uic/baseline/newactiondialog.ui
index ef326fe63e..dc692af0eb 100644
--- a/tests/auto/tools/uic/baseline/newactiondialog.ui
+++ b/tests/auto/tools/uic/baseline/newactiondialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
index d409ccb786..b69e1581f9 100644
--- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h
+++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/newform.ui b/tests/auto/tools/uic/baseline/newform.ui
index d83aef26a2..bd559e9f6e 100644
--- a/tests/auto/tools/uic/baseline/newform.ui
+++ b/tests/auto/tools/uic/baseline/newform.ui
@@ -3,8 +3,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -37,6 +36,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h
index b744dd6869..e985c3bf26 100644
--- a/tests/auto/tools/uic/baseline/newform.ui.h
+++ b/tests/auto/tools/uic/baseline/newform.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui b/tests/auto/tools/uic/baseline/orderdialog.ui
index e95ac2906f..e35c029896 100644
--- a/tests/auto/tools/uic/baseline/orderdialog.ui
+++ b/tests/auto/tools/uic/baseline/orderdialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h
index 16fa98b6de..017222da50 100644
--- a/tests/auto/tools/uic/baseline/orderdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui b/tests/auto/tools/uic/baseline/paletteeditor.ui
index 62b728267b..3498136d6e 100644
--- a/tests/auto/tools/uic/baseline/paletteeditor.ui
+++ b/tests/auto/tools/uic/baseline/paletteeditor.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
index 808295ddf6..de57468b9d 100644
--- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h
+++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui b/tests/auto/tools/uic/baseline/phrasebookbox.ui
index 95e92e4311..33989348e5 100644
--- a/tests/auto/tools/uic/baseline/phrasebookbox.ui
+++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
index 2b1c6222c1..ad7f916f56 100644
--- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
+++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui b/tests/auto/tools/uic/baseline/plugindialog.ui
index 924d506c2d..a4ea305188 100644
--- a/tests/auto/tools/uic/baseline/plugindialog.ui
+++ b/tests/auto/tools/uic/baseline/plugindialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h
index bbde5ab416..24453cb47c 100644
--- a/tests/auto/tools/uic/baseline/plugindialog.ui.h
+++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui b/tests/auto/tools/uic/baseline/previewwidget.ui
index 00bcfbe66c..7a238a37a0 100644
--- a/tests/auto/tools/uic/baseline/previewwidget.ui
+++ b/tests/auto/tools/uic/baseline/previewwidget.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h
index 84eba31b17..9fd79688f2 100644
--- a/tests/auto/tools/uic/baseline/previewwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui b/tests/auto/tools/uic/baseline/qfiledialog.ui
index 7994f104ac..3118fbdaec 100644
--- a/tests/auto/tools/uic/baseline/qfiledialog.ui
+++ b/tests/auto/tools/uic/baseline/qfiledialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
index 75b03ed518..62030018cb 100644
--- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui b/tests/auto/tools/uic/baseline/qtgradientdialog.ui
index 045806eb31..41217ab0c5 100644
--- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui
+++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
index f9721bad0a..d9c27a769e 100644
--- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui b/tests/auto/tools/uic/baseline/qtgradienteditor.ui
index 4754bc5899..60e9d29d9f 100644
--- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui
+++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
index ca9de7f2a8..c344d006b5 100644
--- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui
index 4b02db52de..8574135201 100644
--- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui
+++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
index 61c814964a..d93dfd605c 100644
--- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui b/tests/auto/tools/uic/baseline/saveformastemplate.ui
index 40ee76fbba..1d4cc2ecb4 100644
--- a/tests/auto/tools/uic/baseline/saveformastemplate.ui
+++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
index bf04e7b22c..32597cd6ff 100644
--- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
+++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/statistics.ui b/tests/auto/tools/uic/baseline/statistics.ui
index 359c6f7612..57ba6577f3 100644
--- a/tests/auto/tools/uic/baseline/statistics.ui
+++ b/tests/auto/tools/uic/baseline/statistics.ui
@@ -3,8 +3,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -37,6 +36,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h
index 76aadcce6d..b6e14b5dda 100644
--- a/tests/auto/tools/uic/baseline/statistics.ui.h
+++ b/tests/auto/tools/uic/baseline/statistics.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui b/tests/auto/tools/uic/baseline/stringlisteditor.ui
index c6223a5f83..929aae0e52 100644
--- a/tests/auto/tools/uic/baseline/stringlisteditor.ui
+++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
index 163e9a8613..7624eaec58 100644
--- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui b/tests/auto/tools/uic/baseline/tabbedbrowser.ui
index 5b28dd85a4..7164fb7271 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui
@@ -3,8 +3,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -37,6 +36,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
index 00b6c9cdd6..424871f688 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui
index 558e7e89ee..e088a41eba 100644
--- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui
+++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
index 3d69f59938..da5357d1fd 100644
--- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui b/tests/auto/tools/uic/baseline/translatedialog.ui
index 57a0a7a039..9377d1c434 100644
--- a/tests/auto/tools/uic/baseline/translatedialog.ui
+++ b/tests/auto/tools/uic/baseline/translatedialog.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h
index 3f66587f65..8ff12becc9 100644
--- a/tests/auto/tools/uic/baseline/translatedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui b/tests/auto/tools/uic/baseline/treewidgeteditor.ui
index 6fdcc54625..56b17f5b4a 100644
--- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui
+++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui
@@ -2,8 +2,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
index 2aa95b8f0a..843737fe59 100644
--- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui b/tests/auto/tools/uic/baseline/trpreviewtool.ui
index 520442b348..472d9d6332 100644
--- a/tests/auto/tools/uic/baseline/trpreviewtool.ui
+++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui
@@ -3,8 +3,7 @@
<comment>*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -37,6 +36,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************</comment>
diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
index 196a820c55..a26ff1c828 100644
--- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
+++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
@@ -2,8 +2,7 @@
*********************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the autotests of the Qt Toolkit.
**
@@ -36,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
*********************************************************************
diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp
index d298078487..0ea22968db 100644
--- a/tests/auto/tools/uic/tst_uic.cpp
+++ b/tests/auto/tools/uic/tst_uic.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp b/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp
index c3ede37e7f..b7c113ce42 100644
--- a/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp
+++ b/tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
index f972bb3054..31fab971a0 100644
--- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
+++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,7 @@ public:
tst_QColorDialog();
virtual ~tst_QColorDialog();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
public slots:
void postKeyReturn();
private slots:
@@ -125,7 +125,7 @@ void tst_QColorDialog::cleanup()
{
}
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
//copied from QFontDialogTest
void tst_QColorDialog::postKeyReturn() {
QWidgetList list = QApplication::topLevelWidgets();
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index 2a17cb4efc..b332fb40f8 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -440,7 +440,7 @@ public slots:
void tst_QDialog::throwInExec()
{
-#if defined(Q_WS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_))
+#if defined(Q_OS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_))
QSKIP("Throwing exceptions in exec() is not supported on this platform.");
#endif
#if defined(Q_OS_LINUX)
diff --git a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
index cdf53c361e..3df4514b37 100644
--- a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
+++ b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index c2d21c2cf1..14c2be5bd8 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -329,8 +329,8 @@ void tst_QFiledialog::filterSelectedSignal()
filterChoices << "Image files (*.png *.xpm *.jpg)"
<< "Text files (*.txt)"
<< "Any files (*.*)";
- fd.setFilters(filterChoices);
- QCOMPARE(fd.filters(), filterChoices);
+ fd.setNameFilters(filterChoices);
+ QCOMPARE(fd.nameFilters(), filterChoices);
QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo");
QVERIFY(filters);
@@ -354,7 +354,7 @@ void tst_QFiledialog::args()
#ifndef Q_OS_WIN
QCOMPARE(fd.directory(), QDir(directory));
#endif
- QCOMPARE(fd.filters(), QStringList(filter));
+ QCOMPARE(fd.nameFilters(), QStringList(filter));
}
void tst_QFiledialog::directory()
@@ -648,7 +648,7 @@ void tst_QFiledialog::filters()
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
- QCOMPARE(fd.filters(), QStringList("All Files (*)"));
+ QCOMPARE(fd.nameFilters(), QStringList("All Files (*)"));
// effects
QList<QComboBox*> views = qFindChildren<QComboBox*>(&fd, "fileTypeCombo");
@@ -659,14 +659,14 @@ void tst_QFiledialog::filters()
filters << "Image files (*.png *.xpm *.jpg)"
<< "Text files (*.txt)"
<< "Any files (*.*)";
- fd.setFilters(filters);
+ fd.setNameFilters(filters);
QCOMPARE(views.at(0)->isVisible(), false);
fd.show();
fd.setAcceptMode(QFileDialog::AcceptSave);
QCOMPARE(views.at(0)->isVisible(), true);
- QCOMPARE(fd.filters(), filters);
- fd.setFilter("Image files (*.png *.xpm *.jpg);;Text files (*.txt);;Any files (*.*)");
- QCOMPARE(fd.filters(), filters);
+ QCOMPARE(fd.nameFilters(), filters);
+ fd.setNameFilter("Image files (*.png *.xpm *.jpg);;Text files (*.txt);;Any files (*.*)");
+ QCOMPARE(fd.nameFilters(), filters);
QCOMPARE(spyCurrentChanged.count(), 0);
QCOMPARE(spyDirectoryEntered.count(), 0);
QCOMPARE(spyFilesSelected.count(), 0);
@@ -682,38 +682,38 @@ void tst_QFiledialog::filters()
QStringList expected;
expected << "C++ Source Files(*.cpp)";
expected << "Any(*.*)";
- fd2.setFilter("C++ Source Files(*.cpp);;Any(*.*)");
- QCOMPARE(expected, fd2.filters());
- fd2.setFilter("C++ Source Files(*.cpp) ;;Any(*.*)");
- QCOMPARE(expected, fd2.filters());
- fd2.setFilter("C++ Source Files(*.cpp);; Any(*.*)");
- QCOMPARE(expected, fd2.filters());
- fd2.setFilter(" C++ Source Files(*.cpp);; Any(*.*)");
- QCOMPARE(expected, fd2.filters());
- fd2.setFilter("C++ Source Files(*.cpp) ;; Any(*.*)");
- QCOMPARE(expected, fd2.filters());
+ fd2.setNameFilter("C++ Source Files(*.cpp);;Any(*.*)");
+ QCOMPARE(expected, fd2.nameFilters());
+ fd2.setNameFilter("C++ Source Files(*.cpp) ;;Any(*.*)");
+ QCOMPARE(expected, fd2.nameFilters());
+ fd2.setNameFilter("C++ Source Files(*.cpp);; Any(*.*)");
+ QCOMPARE(expected, fd2.nameFilters());
+ fd2.setNameFilter(" C++ Source Files(*.cpp);; Any(*.*)");
+ QCOMPARE(expected, fd2.nameFilters());
+ fd2.setNameFilter("C++ Source Files(*.cpp) ;; Any(*.*)");
+ QCOMPARE(expected, fd2.nameFilters());
}
void tst_QFiledialog::selectFilter()
{
QNonNativeFileDialog fd;
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
- QCOMPARE(fd.selectedFilter(), QString("All Files (*)"));
+ QCOMPARE(fd.selectedNameFilter(), QString("All Files (*)"));
QStringList filters;
filters << "Image files (*.png *.xpm *.jpg)"
<< "Text files (*.txt)"
<< "Any files (*.*)";
- fd.setFilters(filters);
- QCOMPARE(fd.selectedFilter(), filters.at(0));
- fd.selectFilter(filters.at(1));
- QCOMPARE(fd.selectedFilter(), filters.at(1));
- fd.selectFilter(filters.at(2));
- QCOMPARE(fd.selectedFilter(), filters.at(2));
-
- fd.selectFilter("bob");
- QCOMPARE(fd.selectedFilter(), filters.at(2));
- fd.selectFilter("");
- QCOMPARE(fd.selectedFilter(), filters.at(2));
+ fd.setNameFilters(filters);
+ QCOMPARE(fd.selectedNameFilter(), filters.at(0));
+ fd.selectNameFilter(filters.at(1));
+ QCOMPARE(fd.selectedNameFilter(), filters.at(1));
+ fd.selectNameFilter(filters.at(2));
+ QCOMPARE(fd.selectedNameFilter(), filters.at(2));
+
+ fd.selectNameFilter("bob");
+ QCOMPARE(fd.selectedNameFilter(), filters.at(2));
+ fd.selectNameFilter("");
+ QCOMPARE(fd.selectedNameFilter(), filters.at(2));
QCOMPARE(spyFilterSelected.count(), 0);
}
@@ -909,8 +909,8 @@ void tst_QFiledialog::selectFiles()
QVERIFY(listView);
for (int i = 0; i < list.count(); ++i) {
fd.selectFile(fd.directory().path() + "/" + list.at(i));
-#if defined(Q_WS_MAC) || defined(Q_WS_WIN)
- QEXPECT_FAIL("", "This test does not work on Mac or Windows", Abort);
+#if defined(Q_WS_WIN)
+ QEXPECT_FAIL("", "This test does not work on Windows", Abort);
#endif
QTRY_VERIFY(!listView->selectionModel()->selectedRows().isEmpty());
toSelect.append(listView->selectionModel()->selectedRows().last());
@@ -1004,8 +1004,8 @@ void tst_QFiledialog::proxymodel()
void tst_QFiledialog::setNameFilter()
{
QNonNativeFileDialog fd;
- fd.setFilter(QString());
- fd.setFilters(QStringList());
+ fd.setNameFilter(QString());
+ fd.setNameFilters(QStringList());
}
void tst_QFiledialog::focus()
@@ -1223,13 +1223,16 @@ void tst_QFiledialog::clearLineEdit()
list->setEditFocus(true);
#endif
QTest::keyClick(list, Qt::Key_Down);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::keyClick(list, Qt::Key_Return);
#else
QTest::keyClick(list, Qt::Key_O, Qt::ControlModifier);
#endif
QTest::qWait(2000);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23703", Abort);
+#endif
QVERIFY(fd.directory().absolutePath() != QDir::home().absolutePath());
QVERIFY(!lineEdit->text().isEmpty());
@@ -1240,7 +1243,7 @@ void tst_QFiledialog::clearLineEdit()
QTest::qWait(1000);
QTest::keyClick(list, Qt::Key_Down);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::keyClick(list, Qt::Key_Return);
#else
QTest::keyClick(list, Qt::Key_O, Qt::ControlModifier);
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 3ea66c5729..472469e797 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -266,7 +266,7 @@ void tst_QFileDialog2::showNameFilterDetails()
filterChoices << "Image files (*.png *.xpm *.jpg)"
<< "Text files (*.txt)"
<< "Any files (*.*)";
- fd.setFilters(filterChoices);
+ fd.setNameFilters(filterChoices);
fd.setNameFilterDetailsVisible(false);
QCOMPARE(filters->itemText(0), QString("Image files"));
@@ -515,6 +515,9 @@ void tst_QFileDialog2::task227930_correctNavigationKeyboardBehavior()
QTest::keyClick(list, Qt::Key_Down);
QTest::keyClick(list, Qt::Key_Return);
QTest::qWait(200);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "This test currently fails on Mac OS X, see QTBUG-23602", Continue);
+#endif
QCOMPARE(fd.isVisible(), true);
QTest::qWait(200);
file.close();
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index dbd1cfa016..ea4eed54d2 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index d97d32698c..f5c3e08217 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -102,7 +102,6 @@ void tst_QFontDialog::cleanup()
void tst_QFontDialog::postKeyReturn() {
-#ifndef Q_WS_MAC
QWidgetList list = QApplication::topLevelWidgets();
for (int i=0; i<list.count(); ++i) {
QFontDialog *dialog = qobject_cast<QFontDialog*>(list[i]);
@@ -111,10 +110,6 @@ void tst_QFontDialog::postKeyReturn() {
return;
}
}
-#else
- extern void click_cocoa_button();
- click_cocoa_button();
-#endif
}
void tst_QFontDialog::defaultOkButton()
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm
index d10c789aec..1b5cdc382c 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog_mac_helpers.mm
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
index 0a62ac3099..a38c2d070d 100644
--- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -55,14 +55,14 @@ class tst_QInputDialog : public QObject
QWidget *parent;
QDialog::DialogCode doneCode;
void (*testFunc)(QInputDialog *);
- static void testFuncGetInteger(QInputDialog *dialog);
+ static void testFuncGetInt(QInputDialog *dialog);
static void testFuncGetDouble(QInputDialog *dialog);
static void testFuncGetText(QInputDialog *dialog);
static void testFuncGetItem(QInputDialog *dialog);
void timerEvent(QTimerEvent *event);
private slots:
- void getInteger_data();
- void getInteger();
+ void getInt_data();
+ void getInt();
void getDouble_data();
void getDouble();
void task255502getDouble();
@@ -222,7 +222,7 @@ void testGetItem(QInputDialog *dialog)
QVERIFY(okButton->isEnabled());
}
-void tst_QInputDialog::testFuncGetInteger(QInputDialog *dialog)
+void tst_QInputDialog::testFuncGetInt(QInputDialog *dialog)
{
testGetNumeric<QSpinBox, int>(dialog);
}
@@ -252,29 +252,29 @@ void tst_QInputDialog::timerEvent(QTimerEvent *event)
dialog->done(doneCode); // cause static function call to return
}
-void tst_QInputDialog::getInteger_data()
+void tst_QInputDialog::getInt_data()
{
QTest::addColumn<int>("min");
QTest::addColumn<int>("max");
- QTest::newRow("getInteger() - -") << -20 << -10;
- QTest::newRow("getInteger() - 0") << -20 << 0;
- QTest::newRow("getInteger() - +") << -20 << 20;
- QTest::newRow("getInteger() 0 +") << 0 << 20;
- QTest::newRow("getInteger() + +") << 10 << 20;
+ QTest::newRow("getInt() - -") << -20 << -10;
+ QTest::newRow("getInt() - 0") << -20 << 0;
+ QTest::newRow("getInt() - +") << -20 << 20;
+ QTest::newRow("getInt() 0 +") << 0 << 20;
+ QTest::newRow("getInt() + +") << 10 << 20;
}
-void tst_QInputDialog::getInteger()
+void tst_QInputDialog::getInt()
{
QFETCH(int, min);
QFETCH(int, max);
QVERIFY(min < max);
parent = new QWidget;
doneCode = QDialog::Accepted;
- testFunc = &tst_QInputDialog::testFuncGetInteger;
+ testFunc = &tst_QInputDialog::testFuncGetInt;
startTimer(0);
bool ok = false;
const int value = min + (max - min) / 2;
- const int result = QInputDialog::getInteger(parent, "", "", value, min, max, 1, &ok);
+ const int result = QInputDialog::getInt(parent, "", "", value, min, max, 1, &ok);
QVERIFY(ok);
QCOMPARE(result, value);
delete parent;
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index b41a41124b..9e965ff235 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,7 @@
#include <QApplication>
#include <QPushButton>
#include <QDialogButtonBox>
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
#include <QMacStyle>
#endif
#if !defined(QT_NO_STYLE_CLEANLOOKS)
@@ -141,8 +141,6 @@ private:
tst_QMessageBox::tst_QMessageBox() : keyToSend(-1)
{
- int argc = qApp->argc();
- QT_REQUIRE_VERSION(argc, qApp->argv(), "4.6.2")
}
int tst_QMessageBox::exec(QMessageBox *msgBox, int key)
@@ -363,7 +361,7 @@ void tst_QMessageBox::statics()
void tst_QMessageBox::shortcut()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("shortcuts are not used on MAC OS X");
#endif
QMessageBox msgBox;
@@ -380,7 +378,7 @@ void tst_QMessageBox::about()
QMessageBox::about(0, "Caption", "This is an auto test");
// On Mac, about and aboutQt are not modal, so we need to
// explicitly run the event loop
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTRY_COMPARE(keyToSend, -1);
#else
QCOMPARE(keyToSend, -1);
@@ -393,7 +391,7 @@ void tst_QMessageBox::about()
#endif
sendKeySoon();
QMessageBox::aboutQt(0, "Caption");
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTRY_COMPARE(keyToSend, -1);
#else
QCOMPARE(keyToSend, -1);
@@ -409,7 +407,7 @@ void tst_QMessageBox::staticSourceCompat()
sendKeySoon();
ret = QMessageBox::information(0, "title", "text", QMessageBox::Yes, QMessageBox::No);
int expectedButton = int(QMessageBox::Yes);
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
if (qobject_cast<QMacStyle *>(qApp->style()))
expectedButton = int(QMessageBox::No);
#elif !defined(QT_NO_STYLE_CLEANLOOKS)
@@ -481,7 +479,7 @@ void tst_QMessageBox::instanceSourceCompat()
QCOMPARE(exec(&mb, Qt::Key_Enter), int(QMessageBox::Yes));
QCOMPARE(exec(&mb, Qt::Key_Escape), int(QMessageBox::Cancel));
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
// mnemonics are not used on Mac OS X
QCOMPARE(exec(&mb, Qt::ALT + Qt::Key_R), 0);
QCOMPARE(exec(&mb, Qt::ALT + Qt::Key_Z), 1);
diff --git a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
index 281a028835..8da5973d91 100644
--- a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
+++ b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
index 77a7baaf94..05cf571973 100644
--- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
+++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index c00d42bacd..872c13216f 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -441,11 +441,14 @@ void tst_QWizard::setPixmap()
QVERIFY(wizard.pixmap(QWizard::BannerPixmap).isNull());
QVERIFY(wizard.pixmap(QWizard::LogoPixmap).isNull());
QVERIFY(wizard.pixmap(QWizard::WatermarkPixmap).isNull());
-#ifdef Q_WS_MAC
- if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3)
+#ifdef Q_OS_MAC
+ if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3) {
+ QEXPECT_FAIL("", "QTBUG-23701", Continue);
QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull() == false);
- else // fall through since the image doesn't exist on a 10.3 system.
+ } else {
+ // fall through since the image doesn't exist on a 10.3 system.
QVERIFY(page->pixmap(QWizard::BackgroundPixmap).isNull());
+ }
#else
QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull());
#endif
@@ -453,11 +456,14 @@ void tst_QWizard::setPixmap()
QVERIFY(page->pixmap(QWizard::BannerPixmap).isNull());
QVERIFY(page->pixmap(QWizard::LogoPixmap).isNull());
QVERIFY(page->pixmap(QWizard::WatermarkPixmap).isNull());
-#ifdef Q_WS_MAC
- if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3)
+#ifdef Q_OS_MAC
+ if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_3) {
+ QEXPECT_FAIL("", "QTBUG-23701", Continue);
QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull() == false);
- else // fall through since the image doesn't exist on a 10.3 system.
+ } else {
+ // fall through since the image doesn't exist on a 10.3 system.
QVERIFY(page->pixmap(QWizard::BackgroundPixmap).isNull());
+ }
#else
QVERIFY(page->pixmap(QWizard::BackgroundPixmap).isNull());
#endif
diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
index 3ebc4dc5cb..a888a9f984 100644
--- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 54b9355777..555908c68c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1091,7 +1091,7 @@ void tst_QGraphicsAnchorLayout::setSpacing()
p->show();
QApplication::processEvents();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::qWait(200);
#endif
diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index 0fd19c417f..3a8e109d80 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -559,10 +559,9 @@ void tst_QGraphicsAnchorLayout1::testSpecialCases()
{
// One widget, setLayout before defining layouts
{
-#ifdef QT_DEBUG
- QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\""
- " in wrong parent; moved to correct parent");
-#endif
+ if (QLibraryInfo::isDebugBuild())
+ QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\""
+ " in wrong parent; moved to correct parent");
QGraphicsWidget *widget = new QGraphicsWidget;
TheAnchorLayout *layout = new TheAnchorLayout();
widget->setLayout(layout);
@@ -581,10 +580,9 @@ void tst_QGraphicsAnchorLayout1::testSpecialCases()
// One widget, layout inside layout, layout inside layout inside layout
{
-#ifdef QT_DEBUG
- QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\""
- " in wrong parent; moved to correct parent");
-#endif
+ if (QLibraryInfo::isDebugBuild())
+ QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\""
+ " in wrong parent; moved to correct parent");
QGraphicsWidget *widget = new QGraphicsWidget;
TheAnchorLayout *layout = new TheAnchorLayout();
widget->setLayout(layout);
diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
index 6b90404255..18bec1da89 100644
--- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 42e0caa6a6..bbe7062507 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -501,7 +501,7 @@ void tst_QGraphicsGridLayout::alignment_data()
// public Qt::Alignment alignment(QGraphicsLayoutItem* item) const
void tst_QGraphicsGridLayout::alignment()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac");
#endif
QFETCH(bool, hasHeightForWidth);
@@ -575,7 +575,7 @@ void tst_QGraphicsGridLayout::columnAlignment_data()
// public Qt::Alignment columnAlignment(int column) const
void tst_QGraphicsGridLayout::columnAlignment()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac");
#endif
QFETCH(bool, hasHeightForWidth);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index 28ee69a36c..5c99e48388 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -81,7 +81,7 @@ Q_DECLARE_METATYPE(QRectF)
#define Q_CHECK_PAINTEVENTS
#endif
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
// On mac (cocoa) we always get full update.
// So check that the expected region is contained inside the actual
#define COMPARE_REGIONS(ACTUAL, EXPECTED) QVERIFY((EXPECTED).subtracted(ACTUAL).isEmpty())
@@ -1069,6 +1069,9 @@ void tst_QGraphicsItem::toolTip()
foundTipLabel = true;
}
QVERIFY(foundView);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23707", Continue);
+#endif
QVERIFY(foundTipLabel);
}
@@ -4240,14 +4243,14 @@ void tst_QGraphicsItem::textControlGetterSetter()
{
QGraphicsTextItem *item = new QGraphicsTextItem;
QVERIFY(item->textControl()->parent() == item);
- QPointer<QTextControl> control = item->textControl();
+ QPointer<QWidgetTextControl> control = item->textControl();
delete item;
QVERIFY(!control);
item = new QGraphicsTextItem;
- QPointer<QTextControl> oldControl = control;
- control = new QTextControl;
+ QPointer<QWidgetTextControl> oldControl = control;
+ control = new QWidgetTextControl;
item->setTextControl(control);
QVERIFY(item->textControl() == control);
@@ -4266,7 +4269,7 @@ void tst_QGraphicsItem::textControlGetterSetter()
// test that on setting a control the item size
// is adjusted
oldControl = control;
- control = new QTextControl;
+ control = new QWidgetTextControl;
control->setPlainText("foo!");
item->setTextControl(control);
QCOMPARE(item->boundingRect().size(), control->document()->documentLayout()->documentSize());
@@ -6092,7 +6095,7 @@ void tst_QGraphicsItem::untransformable()
// Painting with the DiagCrossPattern is really slow on Mac
// when zoomed out. (The test times out). Task to fix is 155567.
-#if !defined(Q_WS_MAC) || 1
+#if !defined(Q_OS_MAC) || 1
view.setBackgroundBrush(QBrush(Qt::black, Qt::DiagCrossPattern));
#endif
@@ -8117,7 +8120,7 @@ void tst_QGraphicsItem::sorting()
_paintedItems.clear();
view.viewport()->repaint();
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
// There's no difference between repaint and update on the Mac,
// so we have to process events here to make sure we get the event.
QTest::qWait(100);
@@ -8152,7 +8155,7 @@ void tst_QGraphicsItem::itemHasNoContents()
_paintedItems.clear();
view.viewport()->repaint();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// There's no difference between update() and repaint() on the Mac,
// so we have to process events here to make sure we get the event.
QTest::qWait(10);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
index 0344755480..ff0db3c9dc 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/tst_qgraphicsitemanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index d640ce7bea..fdf4eada4d 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
index bdcb3c8ad9..acb9155ca8 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index c708ae7e27..c30701e0f9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp b/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
index 40581f28e9..2fb499f799 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsobject/tst_qgraphicsobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
index a76b5dfd56..691b46f3cb 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/tst_qgraphicspixmapitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
index 36e45fcddd..f1f5b6328a 100644
--- a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/tst_qgraphicspolygonitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 4cd32a9186..3ccc533086 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,7 +45,7 @@
#include <QtWidgets>
#include <private/qgraphicsproxywidget_p.h>
#include <private/qlayoutengine_p.h> // qSmartMin functions...
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
#include <QMacStyle>
#endif
#ifdef Q_WS_X11
@@ -2640,6 +2640,9 @@ void tst_QGraphicsProxyWidget::tooltip_basic()
foundTipLabel = true;
}
QVERIFY(foundView);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23707", Continue);
+#endif
QVERIFY(foundTipLabel);
}
}
@@ -2724,7 +2727,7 @@ void tst_QGraphicsProxyWidget::childPos()
QVERIFY(proxyChild);
QVERIFY(proxyChild->isVisible());
qreal expectedXPosition = 0.0;
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
// The Mac style wants the popup to show up at QPoint(4 - 11, 1).
// See QMacStyle::subControlRect SC_ComboBoxListBoxPopup.
if (qobject_cast<QMacStyle *>(QApplication::style()))
@@ -3377,6 +3380,9 @@ void tst_QGraphicsProxyWidget::updateAndDelete()
proxy->update();
proxy->hide();
QTRY_COMPARE(view.npaints, 1);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23700", Continue);
+#endif
QCOMPARE(view.paintEventRegion, expectedRegion);
proxy->show();
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index f1afb9ff69..f103d3d529 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,7 +52,7 @@
#include <math.h>
#include "../../../gui/painting/qpathclipper/pathcompare.h"
#include "../../shared/platforminputcontext.h"
-#include <private/qinputpanel_p.h>
+#include <private/qinputmethod_p.h>
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
#include <windows.h>
@@ -295,8 +295,8 @@ void tst_QGraphicsScene::initTestCase()
void tst_QGraphicsScene::cleanup()
{
// ensure not even skipped tests with custom input context leave it dangling
- QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
- inputPanelPrivate->testContext = 0;
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = 0;
}
void tst_QGraphicsScene::construction()
@@ -3766,8 +3766,8 @@ public:
void tst_QGraphicsScene::inputMethod()
{
PlatformInputContext inputContext;
- QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
- inputPanelPrivate->testContext = &inputContext;
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = &inputContext;
QFETCH(int, flags);
QFETCH(bool, callFocusItem);
diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
index a318141d07..dca93ae1a5 100644
--- a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
index 156adec6a7..5820598034 100644
--- a/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 9066ded329..7681b3c787 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -72,7 +72,7 @@
#include <private/qgraphicsview_p.h>
#include "../../../platformquirks.h"
#include "../../shared/platforminputcontext.h"
-#include <private/qinputpanel_p.h>
+#include <private/qinputmethod_p.h>
Q_DECLARE_METATYPE(QList<int>)
Q_DECLARE_METATYPE(QList<QRectF>)
@@ -83,7 +83,7 @@ Q_DECLARE_METATYPE(QPolygonF)
Q_DECLARE_METATYPE(QRectF)
Q_DECLARE_METATYPE(Qt::ScrollBarPolicy)
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
//On mac we get full update. So check that the expected region is contained inside the actual
#define COMPARE_REGIONS(ACTUAL, EXPECTED) QVERIFY((EXPECTED).subtracted(ACTUAL).isEmpty())
#else
@@ -264,8 +264,8 @@ void tst_QGraphicsView::initTestCase()
void tst_QGraphicsView::cleanup()
{
// ensure not even skipped tests with custom input context leave it dangling
- QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
- inputPanelPrivate->testContext = 0;
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = 0;
}
void tst_QGraphicsView::construction()
@@ -2515,7 +2515,7 @@ void tst_QGraphicsView::optimizationFlags_dontSavePainterState()
view.setOptimizationFlags(QGraphicsView::DontSavePainterState);
view.viewport()->repaint();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Repaint on Mac OS X actually does require spinning the event loop.
QTest::qWait(100);
#endif
@@ -3361,9 +3361,6 @@ void tst_QGraphicsView::moveItemWhileScrolling()
int a = adjustForAntialiasing ? 2 : 1;
expectedRegion += QRect(40, 50, 10, 10).adjusted(-a, -a, a, a);
expectedRegion += QRect(40, 60, 10, 10).adjusted(-a, -a, a, a);
-#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "This will fail with Cocoa because paint events are not send in the order expected by graphicsview", Continue);
-#endif
COMPARE_REGIONS(view.lastPaintedRegion, expectedRegion);
}
@@ -4112,8 +4109,8 @@ void tst_QGraphicsView::inputMethodSensitivity()
void tst_QGraphicsView::inputContextReset()
{
PlatformInputContext inputContext;
- QInputPanelPrivate *inputPanelPrivate = QInputPanelPrivate::get(qApp->inputPanel());
- inputPanelPrivate->testContext = &inputContext;
+ QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
+ inputMethodPrivate->testContext = &inputContext;
QGraphicsScene scene;
QGraphicsView view(&scene);
@@ -4319,7 +4316,9 @@ void tst_QGraphicsView::task259503_scrollingArtifacts()
{
// qDebug() << event->region();
// qDebug() << updateRegion;
+#ifndef Q_OS_MAC
QEXPECT_FAIL("", "The event region doesn't include the original item position region. See QTBUG-4416", Continue);
+#endif
QCOMPARE(event->region(), updateRegion);
}
}
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
index 7f056e6700..0218c6713f 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview_2.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
index af9ff4d42c..ca796647c1 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
@@ -8,4 +8,3 @@ SOURCES += tst_qgraphicswidget.cpp
# QTBUG-23616 - unstable test
linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
-mac*:CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 89cd63f482..0607d2ab30 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1157,7 +1157,7 @@ void tst_QGraphicsWidget::initStyleOption()
bool hasFocus = option.state & QStyle::State_HasFocus;
QCOMPARE(hasFocus, focus);
bool isUnderMouse = option.state & QStyle::State_MouseOver;
-#ifndef Q_OS_WINCE
+#if !defined(Q_OS_WINCE) && !defined(Q_OS_MAC)
QEXPECT_FAIL("all", "QTBUG-22457", Abort);
QCOMPARE(isUnderMouse, underMouse);
#endif
@@ -1806,6 +1806,9 @@ void tst_QGraphicsWidget::updateFocusChainWhenChildDie()
QVERIFY(w);
QTest::mouseMove(view.viewport());
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23699", Continue);
+#endif
QTRY_COMPARE(qApp->activeWindow(), static_cast<QWidget *>(&view));
QTRY_COMPARE(scene.focusItem(), static_cast<QGraphicsItem *>(w));
}
@@ -3192,7 +3195,9 @@ void tst_QGraphicsWidget::initialShow2()
view.show();
QTest::qWaitForWindowShown(&view);
+#ifndef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-20778", Abort);
+#endif
QTRY_COMPARE(widget->repaints, expectedRepaintCount);
}
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 764838fc96..be7c58f20b 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -224,16 +224,29 @@ private slots:
void ctrlRubberbandSelection();
void QTBUG6407_extendedSelection();
void QTBUG6753_selectOnSelection();
+ void testDelegateDestroyEditor();
};
class MyAbstractItemDelegate : public QAbstractItemDelegate
{
public:
- MyAbstractItemDelegate() : QAbstractItemDelegate() {};
+ MyAbstractItemDelegate() : QAbstractItemDelegate() { calledVirtualDtor = false; }
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const {}
QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const { return QSize(); }
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
- const QModelIndex &) const { return new QWidget(parent); }
+ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const
+ {
+ openedEditor = new QWidget(parent);
+ return openedEditor;
+ }
+ void destroyEditor(QWidget *editor, const QModelIndex &index) const
+ {
+ calledVirtualDtor = true;
+ // QAbstractItemDelegate::destroyEditor(editor,index);
+ editor->deleteLater();
+ }
+
+ mutable bool calledVirtualDtor;
+ mutable QWidget *openedEditor;
};
// Testing get/set functions
@@ -1497,5 +1510,18 @@ void tst_QAbstractItemView::QTBUG6753_selectOnSelection()
QCOMPARE(table.selectedItems().first(), table.item(item.row(), item.column()));
}
+void tst_QAbstractItemView::testDelegateDestroyEditor()
+{
+ QTableWidget table(5, 5);
+ MyAbstractItemDelegate delegate;
+ table.setItemDelegate(&delegate);
+ table.edit(table.model()->index(1, 1));
+ TestView *tv = reinterpret_cast<TestView*>(&table);
+ QVERIFY(!delegate.calledVirtualDtor);
+ tv->tst_closeEditor(delegate.openedEditor, QAbstractItemDelegate::NoHint);
+ QVERIFY(delegate.calledVirtualDtor);
+}
+
+
QTEST_MAIN(tst_QAbstractItemView)
#include "tst_qabstractitemview.moc"
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
index abf7929a94..74e4ca627f 100644
--- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -537,6 +537,9 @@ void tst_QColumnView::moveCursor()
idx = idx.sibling(idx.row() + 1, idx.column());
view.setCurrentIndex(idx);
mc = view.MoveCursor(action, Qt::NoModifier);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23697", Continue);
+#endif
QCOMPARE(mc, idx.sibling(idx.row() + 1, idx.column()));
}
diff --git a/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp b/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp
index 4ad8de1d3d..6d869cd3f0 100644
--- a/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp
+++ b/tests/auto/widgets/itemviews/qdatawidgetmapper/tst_qdatawidgetmapper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index ef183ed91c..04069a2011 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
index 286a352304..f01b3679b4 100644
--- a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
+++ b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index f1a7b4588e..75a72a754f 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -1,8 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Thorbjørn Lund Martsum - tmartsum[at]gmail.com
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +35,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -74,6 +75,26 @@ public:
friend class tst_QHeaderView;
};
+class XResetModel : public QStandardItemModel
+{
+ virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex())
+ {
+ blockSignals(true);
+ bool r = QStandardItemModel::removeRows(row, count, parent);
+ blockSignals(false);
+ emit reset();
+ return r;
+ }
+ virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex())
+ {
+ blockSignals(true);
+ bool r = QStandardItemModel::insertRows(row, count, parent);
+ blockSignals(false);
+ emit reset();
+ return r;
+ }
+};
+
class tst_QHeaderView : public QObject
{
Q_OBJECT
@@ -172,6 +193,7 @@ private slots:
void removeSection();
void preserveHiddenSectionWidth();
void invisibleStretchLastSection();
+ void noSectionsWithNegativeSize();
void emptySectionSpan();
void task236450_hidden_data();
@@ -181,13 +203,42 @@ private slots:
void QTBUG7833_sectionClicked();
void QTBUG8650_crashOnInsertSections();
void QTBUG12268_hiddenMovedSectionSorting();
+ void QTBUG14242_hideSectionAutoSize();
void initialSortOrderRole();
+ void logicalIndexAtTest_data() { setupTestData(); }
+ void visualIndexAtTest_data() { setupTestData(); }
+ void hideShowTest_data() { setupTestData(); }
+ void swapSectionsTest_data() { setupTestData(); }
+ void moveSectionTest_data() { setupTestData(); }
+ void defaultSizeTest_data() { setupTestData(); }
+ void removeTest_data() { setupTestData(true); }
+ void insertTest_data() { setupTestData(true); }
+ void mixedTests_data() { setupTestData(true); }
+ void resizeToContentTest_data() { setupTestData(); }
+ void logicalIndexAtTest();
+ void visualIndexAtTest();
+ void hideShowTest();
+ void swapSectionsTest();
+ void moveSectionTest();
+ void defaultSizeTest();
+ void removeTest();
+ void insertTest();
+ void mixedTests();
+ void resizeToContentTest();
+
protected:
+ void setupTestData(bool use_reset_model = false);
+ void additionalInit();
+ void calculateAndCheck(int cppline, const int precalced_comparedata[]);
+
QWidget *topLevel;
QHeaderView *view;
QStandardItemModel *model;
+ QTableView *m_tableview;
+ bool m_using_reset_model;
+ QElapsedTimer timer;
};
class QtTestModel: public QAbstractTableModel
@@ -327,10 +378,12 @@ void tst_QHeaderView::initTestCase()
#ifdef Q_OS_WINCE //disable magic for WindowsCE
qApp->setAutoMaximizeThreshold(-1);
#endif
+ m_tableview = new QTableView();
}
void tst_QHeaderView::cleanupTestCase()
{
+ delete m_tableview;
}
void tst_QHeaderView::init()
@@ -370,7 +423,9 @@ void tst_QHeaderView::init()
void tst_QHeaderView::cleanup()
{
- delete view;
+ m_tableview->setUpdatesEnabled(true);
+ if (view && view->parent() != m_tableview)
+ delete view;
view = 0;
delete model;
model = 0;
@@ -1852,6 +1907,15 @@ void tst_QHeaderView::invisibleStretchLastSection()
QCOMPARE(view.sectionSize(count - 1), view.defaultSectionSize() * 2);
}
+void tst_QHeaderView::noSectionsWithNegativeSize()
+{
+ QStandardItemModel m(4, 4);
+ QHeaderView h(Qt::Horizontal);
+ h.setModel(&m);
+ h.resizeSection(1, -5);
+ QVERIFY(h.sectionSize(1) >= 0); // Sections with negative sizes not well defined.
+}
+
void tst_QHeaderView::emptySectionSpan()
{
QHeaderViewPrivate::SectionSpan span;
@@ -2054,7 +2118,7 @@ void tst_QHeaderView::QTBUG8650_crashOnInsertSections()
void tst_QHeaderView::QTBUG12268_hiddenMovedSectionSorting()
{
- QTableView view;
+ QTableView view; // ### this test fails on QTableView &view = *m_tableview; !? + shadowing view member
QStandardItemModel *model = new QStandardItemModel(4,3, &view);
for (int i = 0; i< model->rowCount(); ++i)
for (int j = 0; j< model->columnCount(); ++j)
@@ -2072,9 +2136,29 @@ void tst_QHeaderView::QTBUG12268_hiddenMovedSectionSorting()
QCOMPARE(view.horizontalHeader()->hiddenSectionCount(), 1);
}
+void tst_QHeaderView::QTBUG14242_hideSectionAutoSize()
+{
+ QTableView qtv;
+ QStandardItemModel amodel(4, 4);
+ qtv.setModel(&amodel);
+ QHeaderView *hv = qtv.verticalHeader();
+ hv->setDefaultSectionSize(25);
+ hv->setResizeMode(QHeaderView::ResizeToContents);
+ qtv.show();
+
+ hv->hideSection(0);
+ int afterlength = hv->length();
+
+ int calced_length = 0;
+ for (int u = 0; u < hv->count(); ++u)
+ calced_length += hv->sectionSize(u);
+
+ QVERIFY(calced_length == afterlength);
+}
+
void tst_QHeaderView::initialSortOrderRole()
{
- QTableView view;
+ QTableView view; // ### Shadowing member view (of type QHeaderView)
QStandardItemModel *model = new QStandardItemModel(4, 3, &view);
for (int i = 0; i< model->rowCount(); ++i)
for (int j = 0; j< model->columnCount(); ++j)
@@ -2107,5 +2191,450 @@ void tst_QHeaderView::initialSortOrderRole()
QCOMPARE(view.horizontalHeader()->sortIndicatorOrder(), Qt::AscendingOrder);
}
+const bool block_some_signals = true; // The test should also work with this set to false
+const int rowcount = 500;
+const int colcount = 10;
+
+QString istr(int n, bool comma = true)
+{
+ QString s;
+ s.setNum(n);
+ if (comma)
+ s += ", ";
+ return s;
+}
+
+void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_comparedata[])
+{
+ qint64 endtimer = timer.elapsed();
+ const bool silentmode = true;
+ if (!silentmode)
+ qDebug().nospace() << "(Time:" << endtimer << ")";
+
+ QString sline;
+ sline.setNum(cppline - 1);
+
+ const int p1 = 3133777; // just a prime (maybe not that random ;) )
+ const int p2 = 135928393; // just a random large prime - a bit less than signed 32-bit
+
+ int sum_visual = 0;
+ int sum_logical = 0;
+ int sum_size = 0;
+ int sum_hidden_size = 0;
+ int sum_lookup_visual = 0;
+ int sum_lookup_logical = 0;
+
+ int chk_visual = 1;
+ int chk_logical = 1;
+ int chk_sizes = 1;
+ int chk_hidden_size = 1;
+ int chk_lookup_visual = 1;
+ int chk_lookup_logical = 1;
+
+ int header_lenght = 0;
+ int lastindex = view->count() - 1;
+
+ // calculate information based on index
+ for (int i = 0; i <= lastindex; ++i) {
+ int visual = view->visualIndex(i);
+ int logical = view->logicalIndex(i);
+ int ssize = view->sectionSize(i);
+
+ sum_visual += visual;
+ sum_logical += logical;
+ sum_size += ssize;
+
+ if (visual >= 0) {
+ chk_visual %= p2;
+ chk_visual *= (visual + 1) * (i + 1) * p1;
+ }
+
+ if (logical >= 0) {
+ chk_logical %= p2;
+ chk_logical *= (logical + 1) * (i + 1 + (logical != i) ) * p1;
+ }
+
+ if (ssize >= 0) {
+ chk_sizes %= p2;
+ chk_sizes *= ( (ssize + 2) * (i + 1) * p1);
+ }
+
+ if (view->isSectionHidden(i)) {
+ view->showSection(i);
+ int hiddensize = view->sectionSize(i);
+ sum_hidden_size += hiddensize;
+ chk_hidden_size %= p2;
+ chk_hidden_size += ( (hiddensize + 1) * (i + 1) * p1);
+ // (hiddensize + 1) in the above to differ between hidden and size 0
+ // Though it can be changed (why isn't sections with size 0 hidden?)
+
+ view->hideSection(i);
+ }
+ }
+
+ // lookup indexes by pixel position
+ const int max_lookup_count = 500;
+ int lookup_to = view->height() + 1;
+ if (lookup_to > max_lookup_count)
+ lookup_to = max_lookup_count; // We limit this lookup - not to spend years when testing.
+ // Notice that lookupTest also has its own extra test
+ for (int u = 0; u < max_lookup_count; ++u) {
+ int visu = view->visualIndexAt(u);
+ int logi = view->logicalIndexAt(u);
+ sum_lookup_visual += logi;
+ sum_lookup_logical += visu;
+ chk_lookup_visual %= p2;
+ chk_lookup_visual *= ( (u + 1) * p1 * (visu + 2));
+ chk_lookup_logical %= p2;
+ chk_lookup_logical *= ( (u + 1) * p1 * (logi + 2));
+ }
+ header_lenght = view->length();
+
+ // visual and logical indexes.
+ int sum_to_last_index = (lastindex * (lastindex + 1)) / 2; // == 0 + 1 + 2 + 3 + ... + lastindex
+
+ const bool write_calced_data = false; // Do not write calculated output (unless the test fails)
+ if (write_calced_data) {
+ qDebug().nospace() << "(" << cppline - 1 << ")" // << " const int precalced[] = "
+ << " {" << chk_visual << ", " << chk_logical << ", " << chk_sizes << ", " << chk_hidden_size
+ << ", " << chk_lookup_visual << ", " << chk_lookup_logical << ", " << header_lenght << "};";
+ }
+
+ const bool sanity_checks = true;
+ if (sanity_checks) {
+ QString msg = QString("sanity problem at ") + sline;
+ char *verifytext = QTest::toString(msg);
+
+ QVERIFY2(m_tableview->model()->rowCount() == view->count() , verifytext);
+ QVERIFY2(view->visualIndex(lastindex + 1) <= 0, verifytext); // there is no such index in model
+ QVERIFY2(view->logicalIndex(lastindex + 1) <= 0, verifytext); // there is no such index in model.
+ QVERIFY2(view->logicalIndex(lastindex + 1) <= 0, verifytext); // there is no such index in model.
+ QVERIFY2(lastindex < 0 || view->visualIndex(0) >= 0, verifytext); // no rows or legal index
+ QVERIFY2(lastindex < 0 || view->logicalIndex(0) >= 0, verifytext); // no rows or legal index
+ QVERIFY2(lastindex < 0 || view->visualIndex(lastindex) >= 0, verifytext); // no rows or legal index
+ QVERIFY2(lastindex < 0 || view->logicalIndex(lastindex) >= 0, verifytext); // no rows or legal index
+ QVERIFY2(view->visualIndexAt(-1) == -1, verifytext);
+ QVERIFY2(view->logicalIndexAt(-1) == -1, verifytext);
+ QVERIFY2(view->visualIndexAt(view->length()) == -1, verifytext);
+ QVERIFY2(view->logicalIndexAt(view->length()) == -1, verifytext);
+ QVERIFY2(sum_visual == sum_logical, verifytext);
+ QVERIFY2(sum_to_last_index == sum_logical, verifytext);
+ }
+
+ // Semantic test
+ const bool check_semantics = true; // Otherwise there is no 'real' test
+ if (!check_semantics)
+ return;
+
+ const int *x = precalced_comparedata;
+
+ QString msg = "semantic problem at " + QString(__FILE__) + " (" + sline + ")";
+ msg += "\nThe *expected* result was : {" + istr(x[0]) + istr(x[1]) + istr(x[2]) + istr(x[3])
+ + istr(x[4]) + istr(x[5]) + istr(x[6], false) + "}";
+ msg += "\nThe calculated result was : {";
+ msg += istr(chk_visual) + istr(chk_logical) + istr(chk_sizes) + istr(chk_hidden_size)
+ + istr(chk_lookup_visual) + istr(chk_lookup_logical) + istr(header_lenght, false) + "};";
+
+ char *verifytext = QTest::toString(msg);
+
+ QVERIFY2(chk_visual == x[0], verifytext);
+ QVERIFY2(chk_logical == x[1], verifytext);
+ QVERIFY2(chk_sizes == x[2], verifytext);
+ QVERIFY2(chk_hidden_size == x[3], verifytext);
+ QVERIFY2(chk_lookup_visual == x[4], verifytext); // Here the semantic can change. See final note (*).
+ QVERIFY2(chk_lookup_logical == x[5], verifytext); // Here the semantic can change. See final note (*).
+ QVERIFY2(header_lenght == x[6], verifytext);
+}
+
+void tst_QHeaderView::setupTestData(bool also_use_reset_model)
+{
+ QTest::addColumn<bool>("updates_enabled");
+ QTest::addColumn<bool>("special_prepare");
+ QTest::addColumn<bool>("reset_model");
+
+ if (also_use_reset_model) {
+ QTest::newRow("no_updates+normal") << false << false << true;
+ QTest::newRow("hasupdates+normal") << true << false << true;
+ QTest::newRow("no_updates+special") << false << true << true;
+ QTest::newRow("no_updates+special") << true << true << true;
+ }
+
+ QTest::newRow("no_updates+normal") << false << false << false;
+ QTest::newRow("hasupdates+normal") << true << false << false;
+ QTest::newRow("no_updates+special") << false << true << false;
+ QTest::newRow("no_updates+special") << true << true << false;
+}
+
+void tst_QHeaderView::additionalInit()
+{
+ m_tableview->setVerticalHeader(view);
+
+ QFETCH(bool, updates_enabled);
+ QFETCH(bool, special_prepare);
+ QFETCH(bool, reset_model);
+
+ m_using_reset_model = reset_model;
+
+ if (m_using_reset_model) {
+ XResetModel *m = new XResetModel();
+ m_tableview->setModel(m);
+ delete model;
+ model = m;
+ } else {
+ m_tableview->setModel(model);
+ }
+
+ const int default_section_size = 25;
+ view->setDefaultSectionSize(default_section_size); // Important - otherwise there will be semantic changes
+
+ model->clear();
+
+ if (special_prepare) {
+
+ for (int u = 0; u <= rowcount; ++u) // ensures fragmented spans in e.g Qt 4.7
+ model->setRowCount(u);
+
+ model->setColumnCount(colcount);
+ view->swapSections(0, rowcount - 1);
+ view->swapSections(0, rowcount - 1); // No real change - setup visual and log-indexes
+ view->hideSection(rowcount - 1);
+ view->showSection(rowcount - 1); // No real change - (maybe init hidden vector)
+ } else {
+ model->setColumnCount(colcount);
+ model->setRowCount(rowcount);
+ }
+
+ QString s;
+ for (int i = 0; i < model->rowCount(); ++i) {
+ model->setData(model->index(i, 0), QVariant(i));
+ s.setNum(i);
+ s += ".";
+ s += 'a' + (i % 25);
+ model->setData(model->index(i, 1), QVariant(s));
+ }
+ m_tableview->setUpdatesEnabled(updates_enabled);
+ view->blockSignals(block_some_signals);
+ timer.start();
+}
+
+void tst_QHeaderView::logicalIndexAtTest()
+{
+ additionalInit();
+
+ view->swapSections(4, 9); // Make sure that visual and logical Indexes are not just the same.
+
+ int check1 = 0;
+ int check2 = 0;
+ for (int u = 0; u < model->rowCount(); ++u) {
+ view->resizeSection(u, 10 + u % 30);
+ int v = view->visualIndexAt(u * 29);
+ view->visualIndexAt(u * 29);
+ check1 += v;
+ check2 += u * v;
+ }
+ view->resizeSection(0, 0); // Make sure that we have a 0 size section - before the result set
+ view->setSectionHidden(6, true); // Make sure we have a real hidden section before result set
+
+ //qDebug() << "logicalIndexAtTest" << check1 << check2;
+ const int precalced_check1 = 106327;
+ const int precalced_check2 = 29856418;
+ QVERIFY(precalced_check1 == check1); // Here the semantic can change. See final note (*)
+ QVERIFY(precalced_check2 == check2); // Here the semantic can change. See final note (*)
+
+ const int precalced_results[] = { 1145298384, -1710423344, -650981936, 372919464, 2139446944, 854793816, 12124 };
+ calculateAndCheck(__LINE__, precalced_results);
+}
+
+void tst_QHeaderView::visualIndexAtTest()
+{
+ additionalInit();
+
+ view->swapSections(4, 9); // Make sure that visual and logical Indexes are not just the same.
+ int check1 = 0;
+ int check2 = 0;
+
+ for (int u = 0; u < model->rowCount(); ++u) {
+ view->resizeSection(u, 3 + u % 17);
+ int v = view->visualIndexAt(u * 29);
+ check1 += v;
+ check2 += u * v;
+ }
+
+ view->resizeSection(1, 0); // Make sure that we have a 0 size section - before the result set
+ view->setSectionHidden(5, true); // Make sure we have a real hidden section before result set
+
+ //qDebug() << "visualIndexAtTest" << check1 << check2;
+ const int precalced_check1 = 72665;
+ const int precalced_check2 = 14015890;
+ QVERIFY(precalced_check1 == check1); // Here the semantic can change. See final note (*)
+ QVERIFY(precalced_check2 == check2); // Here the semantic can change. See final note (*)
+
+ const int precalced_results[] = { 1145298384, -1710423344, -1457520212, 169223959, 726651072, -2105938696, 5453 };
+ calculateAndCheck(__LINE__, precalced_results);
+}
+
+void tst_QHeaderView::hideShowTest()
+{
+ additionalInit();
+
+ for (int u = model->rowCount(); u >= 0; --u)
+ if (u % 8 != 0)
+ view->hideSection(u);
+
+ for (int u = model->rowCount(); u >= 0; --u)
+ if (u % 3 == 0)
+ view->showSection(u);
+
+ view->setSectionHidden(model->rowCount(), true); // invalid hide (should be ignored)
+ view->setSectionHidden(-1, true); // invalid hide (should be ignored)
+
+ const int precalced_results[] = { -1523279360, -1523279360, -1321506816, 2105322423, 1879611280, 1879611280, 5225 };
+ calculateAndCheck(__LINE__, precalced_results);
+}
+
+void tst_QHeaderView::swapSectionsTest()
+{
+ additionalInit();
+
+ for (int u = 0; u < rowcount / 2; ++u)
+ view->swapSections(u, rowcount - u - 1);
+
+ for (int u = 0; u < rowcount; u += 2)
+ view->swapSections(u, u + 1);
+
+ view->swapSections(0, model->rowCount()); // invalid swapsection (should be ignored)
+
+ const int precalced_results[] = { -1536450048, -1774641430, -1347156568, 1, 1719705216, -240077576, 12500 };
+ calculateAndCheck(__LINE__, precalced_results);
+}
+
+void tst_QHeaderView::moveSectionTest()
+{
+ additionalInit();
+
+ for (int u = 1; u < 5; ++u)
+ view->moveSection(u, model->rowCount() - u);
+
+ view->moveSection(2, model->rowCount() / 2);
+ view->moveSection(0, 10);
+ view->moveSection(0, model->rowCount() - 10);
+
+ view->moveSection(0, model->rowCount()); // invalid move (should be ignored)
+
+ const int precalced_results[] = { 645125952, 577086896, -1347156568, 1, 1719705216, 709383416, 12500 };
+ calculateAndCheck(__LINE__, precalced_results);
+}
+
+void tst_QHeaderView::defaultSizeTest()
+{
+ additionalInit();
+
+ view->hideSection(rowcount / 2);
+ int restore_to = view->defaultSectionSize();
+ view->setDefaultSectionSize(restore_to + 5);
+
+ const int precalced_results[] = { -1523279360, -1523279360, -1739688320, -1023807777, 997629696, 997629696, 14970 };
+ calculateAndCheck(__LINE__, precalced_results);
+
+ view->setDefaultSectionSize(restore_to);
+}
+
+void tst_QHeaderView::removeTest()
+{
+ additionalInit();
+
+ view->swapSections(0, 5);
+ model->removeRows(0, 1); // remove one row
+ model->removeRows(4, 10);
+ model->setRowCount(model->rowCount() / 2 - 1);
+
+ if (m_using_reset_model) {
+ const int precalced_results[] = { 1741224292, -135269187, -569519837, 1, 1719705216, -1184395000, 6075 };
+ calculateAndCheck(__LINE__, precalced_results);
+ } else {
+ const int precalced_results[] = { 289162397, 289162397, -569519837, 1, 1719705216, 1719705216, 6075 };
+ calculateAndCheck(__LINE__, precalced_results);
+ }
+}
+
+void tst_QHeaderView::insertTest()
+{
+ additionalInit();
+
+ view->swapSections(0, model->rowCount() - 1);
+ model->insertRows(0, 1); // insert one row
+ model->insertRows(4, 10);
+ model->setRowCount(model->rowCount() * 2 - 1);
+
+ if (m_using_reset_model) {
+ const int precalced_results[] = { 2040508069, -1280266538, -150350734, 1, 1719705216, 1331312784, 25525 };
+ calculateAndCheck(__LINE__, precalced_results);
+ } else {
+ const int precalced_results[] = { -1909447021, 339092083, -150350734, 1, 1719705216, -969712728, 25525 };
+ calculateAndCheck(__LINE__, precalced_results);
+ }
+}
+
+void tst_QHeaderView::mixedTests()
+{
+ additionalInit();
+
+ model->setRowCount(model->rowCount() + 10);
+
+ for (int u = 0; u < model->rowCount(); u += 2)
+ view->swapSections(u, u + 1);
+
+ view->moveSection(0, 5);
+
+ for (int u = model->rowCount(); u >= 0; --u) {
+ if (u % 5 != 0)
+ view->hideSection(u);
+ if (u % 3 != 0)
+ view->showSection(u);
+ }
+
+ model->insertRows(3, 7);
+ model->removeRows(8, 3);
+ model->setRowCount(model->rowCount() - 10);
+
+ if (m_using_reset_model) {
+ const int precalced_results[] = { 898296472, 337096378, -543340640, 1, 703951756, 250831536, 9250 };
+ calculateAndCheck(__LINE__, precalced_results);
+ } else {
+ const int precalced_results[] = { 1911338224, 1693514365, -613398968, -1912534953, 1582159424, -1851079000, 9300 };
+ calculateAndCheck(__LINE__, precalced_results);
+ }
+}
+
+void tst_QHeaderView::resizeToContentTest()
+{
+ additionalInit();
+
+ QModelIndex idx = model->index(2, 2);
+ model->setData(idx, QVariant("A normal string"));
+
+ idx = model->index(1, 3);
+ model->setData(idx, QVariant("A normal longer string to test resize"));
+
+ QHeaderView *hh = m_tableview->horizontalHeader();
+ hh->resizeSections(QHeaderView::ResizeToContents);
+ QVERIFY(hh->sectionSize(3) > hh->sectionSize(2));
+
+ for (int u = 0; u < 10; ++u)
+ view->resizeSection(u, 1);
+
+ view->resizeSections(QHeaderView::ResizeToContents);
+ QVERIFY(view->sectionSize(1) > 1);
+ QVERIFY(view->sectionSize(2) > 1);
+
+ view->setDefaultSectionSize(25); // To make sure our precalced data are correct. We do not know font height etc.
+
+ const int precalced_results[] = { -1523279360, -1523279360, -1347156568, 1, 1719705216, 1719705216, 12500 };
+ calculateAndCheck(__LINE__, precalced_results);
+}
+
+// (*) Currently qheaderview position lookup acts a bit strange. It can return sections with size 0.
+// This could be changed in the future.
+
QTEST_MAIN(tst_QHeaderView)
#include "tst_qheaderview.moc"
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index 30bf867249..2b52f5f234 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1033,6 +1033,9 @@ void tst_QItemDelegate::editorEvent()
QStyleOptionViewItem option;
option.rect = rect;
option.state |= QStyle::State_Enabled;
+ // mimic QStyledItemDelegate::initStyleOption logic
+ option.features |= QStyleOptionViewItem::HasCheckIndicator | QStyleOptionViewItem::HasDisplay;
+ option.checkState = Qt::CheckState(checkState);
const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
QPoint pos = inCheck ? qApp->style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &option, 0).center() + QPoint(checkMargin, 0) : QPoint(200,200);
@@ -1181,6 +1184,9 @@ void tst_QItemDelegate::QTBUG4435_keepSelectionOnCheck()
QTest::qWaitForWindowShown(&view);
QStyleOptionViewItem option;
option.rect = view.visualRect(model.index(0, 0));
+ // mimic QStyledItemDelegate::initStyleOption logic
+ option.features = QStyleOptionViewItem::HasDisplay | QStyleOptionViewItem::HasCheckIndicator;
+ option.checkState = Qt::CheckState(model.index(0, 0).data(Qt::CheckStateRole).toInt());
const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
QPoint pos = qApp->style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &option, 0).center()
+ QPoint(checkMargin, 0);
diff --git a/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp b/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
index 3945e65f80..3d5201494e 100644
--- a/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
+++ b/tests/auto/widgets/itemviews/qitemeditorfactory/tst_qitemeditorfactory.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
index 7f8337a5d8..04b32d1e56 100644
--- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp b/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
index 15f1a4d02f..33993de125 100644
--- a/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/viewstotest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index e56a8e1008..523516a4b4 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index 8849b3ae6d..35e13e2f0a 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -122,7 +122,7 @@ private slots:
void changeDataWithSorting();
void itemData();
void itemWidget();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
void fastScroll();
#endif
void insertUnchanged();
@@ -1489,7 +1489,7 @@ void tst_QListWidget::itemWidget()
QCOMPARE(list.itemWidget(item), static_cast<QWidget*>(0));
}
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
class MyListWidget : public QListWidget
{
public:
@@ -1537,7 +1537,7 @@ void tst_QListWidget::fastScroll()
// only one item should be repainted, the rest should be scrolled in memory
QCOMPARE(widget.painted.boundingRect().size(), itemSize);
}
-#endif // Q_WS_MAC
+#endif // Q_OS_MAC
void tst_QListWidget::insertUnchanged()
{
diff --git a/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp b/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp
index a0e485a8c3..8ababf0ac4 100644
--- a/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp
+++ b/tests/auto/widgets/itemviews/qstandarditem/tst_qstandarditem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp
index 78ac43f79a..1c661f9060 100644
--- a/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp
+++ b/tests/auto/widgets/itemviews/qstandarditemmodel/tst_qstandarditemmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -134,6 +134,8 @@ private slots:
void treeDragAndDrop();
void removeRowsAndColumns();
+ void itemRoleNames();
+
private:
QAbstractItemModel *m_model;
QPersistentModelIndex persistent;
@@ -1658,6 +1660,24 @@ void tst_QStandardItemModel::removeRowsAndColumns()
VERIFY_MODEL
}
+void tst_QStandardItemModel::itemRoleNames()
+{
+ QVector<QString> row_list = QString("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20").split(',').toVector();
+ QVector<QString> col_list = row_list;
+ QStandardItemModel model;
+ for (int c = 0; c < col_list.count(); c++)
+ for (int r = 0; r < row_list.count(); r++)
+ model.setItem(r, c, new QStandardItem(row_list[r] + "x" + col_list[c]));
+ VERIFY_MODEL
+
+ QHash<int, QByteArray> newRoleNames;
+ newRoleNames.insert(Qt::DisplayRole, "Name");
+ newRoleNames.insert(Qt::DecorationRole, "Avatar");
+ model.setItemRoleNames(newRoleNames);
+ QCOMPARE(model.roleNames(), newRoleNames);
+ VERIFY_MODEL
+}
+
QTEST_MAIN(tst_QStandardItemModel)
#include "tst_qstandarditemmodel.moc"
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 74917fbf9a..586c2efd8f 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
index 5e2658a47f..fe1d15a84d 100644
--- a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
index 5d0ef9d09b..e1f175ad1b 100644
--- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -841,6 +841,9 @@ void tst_QTreeView::editTriggers()
}
// Check if we got an editor
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("EditKeyPressed 4", "QTBUG-23696", Continue);
+#endif
QTRY_COMPARE(qFindChild<QLineEdit *>(&view, QString()) != 0, editorOpened);
}
diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
index 14f1f8736d..07e0e4f999 100644
--- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1838,7 +1838,7 @@ void tst_QTreeWidget::setData()
item->setBackground(j, backgroundColor);
QCOMPARE(itemChangedSpy.count(), 0);
- QColor textColor((i == i) ? Qt::green : Qt::cyan);
+ QColor textColor((i == 1) ? Qt::green : Qt::cyan);
item->setTextColor(j, textColor);
QCOMPARE(item->textColor(j), textColor);
QCOMPARE(itemChangedSpy.count(), 1);
@@ -2978,6 +2978,10 @@ void tst_QTreeWidget::task191552_rtl()
QStyleOptionViewItem opt;
opt.initFrom(&tw);
opt.rect = tw.visualItemRect(item);
+ // mimic QStyledItemDelegate::initStyleOption logic
+ opt.features = QStyleOptionViewItem::HasDisplay | QStyleOptionViewItem::HasCheckIndicator;
+ opt.checkState = Qt::Checked;
+ opt.widget = &tw;
const QRect checkRect = tw.style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, &tw);
QTest::mouseClick(tw.viewport(), Qt::LeftButton, Qt::NoModifier, checkRect.center());
QTest::qWait(200);
diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
index b747586548..0e518b3e16 100644
--- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/kernel.pro b/tests/auto/widgets/kernel/kernel.pro
index a68a9c2748..850863c112 100644
--- a/tests/auto/widgets/kernel/kernel.pro
+++ b/tests/auto/widgets/kernel/kernel.pro
@@ -15,3 +15,5 @@ SUBDIRS=\
qwidgetaction \
SUBDIRS -= qsound
+
+mac: qwidget.CONFIG += no_check_target # crashes, see QTBUG-23695
diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
index d00828e8b0..47aad21074 100644
--- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
+++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
index 3946423dec..ae8e785d12 100644
--- a/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
+++ b/tests/auto/widgets/kernel/qactiongroup/tst_qactiongroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro
index 3aa363d796..3b229e31cb 100644
--- a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro
+++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro
@@ -13,6 +13,3 @@ SOURCES += main.cpp
CONFIG += qt warn_on create_prl link_prl
CONFIG -= app_bundle
-# This app is testdata for tst_qapplication
-target.path = $$[QT_INSTALL_TESTS]/tst_qapplication/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp
index 154e9262a3..aaa418cb81 100644
--- a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qapplication/modal/base.cpp b/tests/auto/widgets/kernel/qapplication/modal/base.cpp
index c8e6c63c99..5408df146b 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/base.cpp
+++ b/tests/auto/widgets/kernel/qapplication/modal/base.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qapplication/modal/base.h b/tests/auto/widgets/kernel/qapplication/modal/base.h
index af520b916f..640040abff 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/base.h
+++ b/tests/auto/widgets/kernel/qapplication/modal/base.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qapplication/modal/main.cpp b/tests/auto/widgets/kernel/qapplication/modal/main.cpp
index 70cc8545d2..8a1ca3721a 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/modal/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qapplication/modal/modal.pro b/tests/auto/widgets/kernel/qapplication/modal/modal.pro
index b13165bcda..d9489928ba 100644
--- a/tests/auto/widgets/kernel/qapplication/modal/modal.pro
+++ b/tests/auto/widgets/kernel/qapplication/modal/modal.pro
@@ -8,6 +8,3 @@ DESTDIR = ./
CONFIG -= app_bundle
HEADERS += base.h
-# This app is testdata for tst_qapplication
-target.path = $$[QT_INSTALL_TESTS]/tst_qapplication/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/widgets/kernel/qapplication/qapplication.pro b/tests/auto/widgets/kernel/qapplication/qapplication.pro
index becc6c6f4b..5f369bf61a 100644
--- a/tests/auto/widgets/kernel/qapplication/qapplication.pro
+++ b/tests/auto/widgets/kernel/qapplication/qapplication.pro
@@ -1,7 +1,7 @@
TEMPLATE = subdirs
-SUBDIRS = test \
- desktopsettingsaware \
- modal \
- wincmdline
+SUBDIRS = desktopsettingsaware modal
+win32:!wince*:SUBDIRS += wincmdline
+test.depends += $$SUBDIRS
+SUBDIRS += test
diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro
index db9d59bdf6..9f6db3cd3e 100644
--- a/tests/auto/widgets/kernel/qapplication/test/test.pro
+++ b/tests/auto/widgets/kernel/qapplication/test/test.pro
@@ -6,14 +6,6 @@ QT += core-private gui-private
SOURCES += ../tst_qapplication.cpp
TARGET = ../tst_qapplication
-wince* {
- additional.files = ../desktopsettingsaware/desktopsettingsaware.exe
- additional.path = desktopsettingsaware
- someTest.files = test.pro
- someTest.path = test
- DEPLOYMENT += additional deploy someTest
-}
-
win32 {
CONFIG(debug, debug|release) {
TARGET = ../../debug/tst_qapplication
@@ -23,3 +15,13 @@ win32 {
}
mac*:CONFIG+=insignificant_test
+
+TESTDATA = ../test/test.pro ../tmp/README
+
+SUBPROGRAMS = desktopsettingsaware modal
+win32: !wince*: SUBPROGRAMS += wincmdline
+
+load(testcase) # for target.path and installTestHelperApp()
+for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file})
+
+
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 4cf15879cc..d9f4081ed3 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,13 +49,13 @@
#include <QtCore/QFileInfo>
#include <QtCore/QDir>
#include <QtCore/QProcess>
+#include <QtCore/private/qeventloop_p.h>
#include <QtGui/QFontDatabase>
#include <QtGui/QClipboard>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMessageBox>
-#include <QtWidgets/QInputContext>
#include <QtWidgets/QStyleFactory>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QPushButton>
@@ -138,6 +138,16 @@ private slots:
void qtbug_12673();
+ void testQuitLockRef();
+ void testQuitLock1();
+ void testQuitLock2();
+ void testQuitLock3();
+ void testQuitLock4();
+ void testQuitLock5();
+ void testQuitLock6();
+ void testQuitLock7();
+ void testQuitLock8();
+
void globalStaticObjectDestruction(); // run this last
};
@@ -189,7 +199,6 @@ public:
dialog.show();
dialog.close();
- hide();
event->ignore();
}
};
@@ -516,6 +525,7 @@ void tst_QApplication::lastWindowClosed()
QPointer<CloseWidget>widget = new CloseWidget;
QVERIFY(widget->testAttribute(Qt::WA_QuitOnClose));
+ widget->show();
QObject::connect(&app, SIGNAL(lastWindowClosed()), widget, SLOT(deleteLater()));
app.exec();
QVERIFY(!widget);
@@ -815,7 +825,7 @@ void tst_QApplication::libraryPaths()
{
{
#ifndef Q_OS_WINCE
- QString testDir = QDir::current().canonicalPath() + "/test";
+ QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
#else
// On Windows CE we need QApplication object to have valid
// current Path. Therefore we need to identify it ourselves
@@ -861,7 +871,7 @@ void tst_QApplication::libraryPaths()
"\nexpected:\n - " + expected.join("\n - ")));
// setting the library paths overrides everything
- QString testDir = QDir::currentPath() + "/test";
+ QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
QApplication::setLibraryPaths(QStringList() << testDir);
QVERIFY2(isPathListIncluded(QApplication::libraryPaths(), (QStringList() << testDir)),
qPrintable("actual:\n - " + QApplication::libraryPaths().join("\n - ") +
@@ -884,8 +894,8 @@ void tst_QApplication::libraryPaths()
qDebug() << "After adding plugins path:" << QApplication::libraryPaths();
#endif
QCOMPARE(QApplication::libraryPaths().count(), count);
-
- QApplication::addLibraryPath(QDir::currentPath() + "/test");
+ QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
+ QApplication::addLibraryPath(testDir);
QCOMPARE(QApplication::libraryPaths().count(), count + 1);
// creating QApplication adds the applicationDirPath to the libraryPath
@@ -1258,51 +1268,12 @@ public slots:
{
QApplication::processEvents();
}
- void processEventsWithDeferredDeletion()
- {
- QApplication::processEvents(QEventLoop::DeferredDeletion);
- }
void sendPostedEventsWithDeferredDelete()
{
QApplication::sendPostedEvents(0, QEvent::DeferredDelete);
}
- void deleteLaterAndProcessEvents1()
- {
- QEventLoop eventLoop;
-
- QPointer<QObject> p = this;
- deleteLater();
-
- // trying to delete this object in a deeper eventloop just won't work
- QMetaObject::invokeMethod(this,
- "processEventsOnly",
- Qt::QueuedConnection);
- QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
- eventLoop.exec();
- QVERIFY(p);
- QMetaObject::invokeMethod(this,
- "processEventsWithDeferredDeletion",
- Qt::QueuedConnection);
- QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
- eventLoop.exec();
- QVERIFY(p);
- QMetaObject::invokeMethod(this,
- "sendPostedEventsWithDeferredDelete",
- Qt::QueuedConnection);
- QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
- eventLoop.exec();
- QVERIFY(p);
-
- // trying to delete it from this eventloop still doesn't work
- QApplication::processEvents();
- QVERIFY(p);
-
- // however, it *will* work with this magic incantation
- QApplication::processEvents(QEventLoop::DeferredDeletion);
- QVERIFY(!p);
- }
- void deleteLaterAndProcessEvents2()
+ void deleteLaterAndProcessEvents()
{
QEventLoop eventLoop;
@@ -1317,12 +1288,6 @@ public slots:
eventLoop.exec();
QVERIFY(p);
QMetaObject::invokeMethod(this,
- "processEventsWithDeferredDeletion",
- Qt::QueuedConnection);
- QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
- eventLoop.exec();
- QVERIFY(p);
- QMetaObject::invokeMethod(this,
"sendPostedEventsWithDeferredDelete",
Qt::QueuedConnection);
QMetaObject::invokeMethod(&eventLoop, "quit", Qt::QueuedConnection);
@@ -1355,16 +1320,7 @@ void tst_QApplication::testDeleteLaterProcessEvents()
QApplication app(argc, 0, QApplication::GuiServer);
// If you call processEvents() with an event dispatcher present, but
// outside any event loops, deferred deletes are not processed unless
- // QEventLoop::DeferredDeletion is passed.
- object = new QObject;
- p = object;
- object->deleteLater();
- app.processEvents();
- QVERIFY(p);
- app.processEvents(QEventLoop::ProcessEventsFlag(0x10)); // 0x10 == QEventLoop::DeferredDeletion
- QVERIFY(!p);
-
- // sendPostedEvents(0, DeferredDelete); also works
+ // sendPostedEvents(0, DeferredDelete) is called.
object = new QObject;
p = object;
object->deleteLater();
@@ -1423,22 +1379,7 @@ void tst_QApplication::testDeleteLaterProcessEvents()
EventLoopNester *nester = new EventLoopNester();
p = nester;
QTimer::singleShot(3000, &loop, SLOT(quit()));
- QTimer::singleShot(0, nester, SLOT(deleteLaterAndProcessEvents1()));
-
- loop.exec();
- QVERIFY(!p);
- }
-
- {
- // when the event loop that calls deleteLater() also calls
- // processEvents() immediately afterwards, the object should
- // not die until the parent loop continues
- QApplication app(argc, 0, QApplication::GuiServer);
- QEventLoop loop;
- EventLoopNester *nester = new EventLoopNester();
- p = nester;
- QTimer::singleShot(3000, &loop, SLOT(quit()));
- QTimer::singleShot(0, nester, SLOT(deleteLaterAndProcessEvents2()));
+ QTimer::singleShot(0, nester, SLOT(deleteLaterAndProcessEvents()));
loop.exec();
QVERIFY(!p);
@@ -1575,7 +1516,7 @@ void tst_QApplication::focusChanged()
QTestMouseEvent click(QTest::MouseClick, Qt::LeftButton, 0, QPoint(5, 5), 0);
bool tabAllControls = true;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac has two modes, one where you tab to everything, one where you can
// only tab to input controls, here's what we get. Determine which ones we
// should get.
@@ -2117,6 +2058,509 @@ void tst_QApplication::qtbug_12673()
QCOMPARE(testProcess.exitStatus(), QProcess::NormalExit);
}
+class JobObject : public QObject
+{
+ Q_OBJECT
+public:
+ JobObject(int milliseconds, QObject *parent = 0)
+ : QObject(parent)
+ {
+ QTimer::singleShot(milliseconds, this, SLOT(timeout()));
+ }
+
+ JobObject(QObject *parent = 0)
+ : QObject(parent)
+ {
+ QTimer::singleShot(1000, this, SLOT(timeout()));
+ }
+
+private slots:
+ void timeout()
+ {
+ emit done();
+ deleteLater();
+ }
+
+signals:
+ void done();
+
+private:
+ QEventLoopLocker locker;
+};
+
+class QuitLockRefTester : public QObject
+{
+ Q_OBJECT
+public:
+ QuitLockRefTester(QObject *parent = 0)
+ : QObject(parent)
+ {
+ QTimer::singleShot(0, this, SLOT(doTest()));
+ }
+
+private slots:
+ void doTest()
+ {
+ QApplicationPrivate *privateClass = static_cast<QApplicationPrivate*>(QObjectPrivate::get(qApp));
+
+ {
+ QDialog *win1 = new QDialog;
+
+ // Test with a lock active so that the refcount doesn't drop to zero during these tests, causing a quit.
+ // (until we exit the scope)
+ QEventLoopLocker locker;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ win1->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QDialog *win2 = new QDialog;
+
+ win2->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ delete win1;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ delete win2;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ win1 = new QDialog;
+
+ win1->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ JobObject *job1 = new JobObject(this);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ delete win1;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ delete job1;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ QWidget *w1 = new QWidget;
+
+ w1->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QWidget *w2 = new QMainWindow;
+
+ w2->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ QWidget *w3 = new QWidget(0, Qt::Dialog);
+
+ w3->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 4);
+
+ delete w3;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ delete w2;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QWidget *subWidget1 = new QWidget(w1, Qt::Window);
+
+ // Even though We create a new widget and show it,
+ // the ref count does not go up because it is a child of
+ // w1, which is the top-level, and what we are actually
+ // refcounting.
+ subWidget1->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ // When we use setParent(0) and re-show, the
+ // ref count does increase:
+ QCOMPARE(subWidget1->isVisible(), true);
+ subWidget1->setParent(0);
+ QCOMPARE(subWidget1->isVisible(), false);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ subWidget1->show();
+ QCOMPARE(subWidget1->isVisible(), true);
+ QCOMPARE(privateClass->quitLockRef.load(), 3);
+
+ subWidget1->setParent(w1);
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QWidget *subWidget2 = new QWidget(w1);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ subWidget2->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ delete subWidget2;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QWidget *subWidget3 = new QWidget(w1);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ subWidget3->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ subWidget3->hide();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ delete subWidget3;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QWidget *subWidget4 = new QWidget(subWidget1);
+ QWidget *subWidget5 = new QWidget(subWidget1);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ QWidget *subWidget6 = new QWidget(subWidget4, Qt::Window);
+
+ subWidget6->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ delete w1;
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ w1 = new QWidget;
+ w2 = new QWidget;
+ w3 = new QWidget;
+
+ QHBoxLayout *layout = new QHBoxLayout(w1);
+
+ layout->addWidget(w2);
+ layout->addWidget(w3);
+
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ w1->show();
+
+ QCOMPARE(privateClass->quitLockRef.load(), 2);
+
+ w1->hide();
+ QCOMPARE(privateClass->quitLockRef.load(), 1);
+
+ delete w1;
+
+ }
+ QCOMPARE(privateClass->quitLockRef.load(), 0);
+ }
+};
+
+void tst_QApplication::testQuitLockRef()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qapplication" };
+ QApplication app(argc, argv);
+
+ QuitLockRefTester tester;
+
+ app.exec();
+}
+
+void tst_QApplication::testQuitLock1()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ QWidget *w = new QWidget;
+
+ w->show();
+
+ QMetaObject::invokeMethod(w, "close", Qt::QueuedConnection);
+
+ app.exec();
+
+ // No hang = pass.
+}
+
+void tst_QApplication::testQuitLock2()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ QWidget *w1 = new QWidget;
+
+ w1->show();
+
+ QWidget *w2 = new QWidget;
+
+ w2->show();
+
+ QMetaObject::invokeMethod(w1, "deleteLater", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(w2, "hide", Qt::QueuedConnection);
+
+ app.exec();
+
+ // No hang = pass.
+}
+
+class Result : public QObject
+{
+ Q_OBJECT
+public:
+ Result(QObject *parent = 0)
+ : QObject(parent), m_passes(false)
+ {
+
+ }
+
+ bool result() const
+ {
+ return m_passes;
+ }
+
+public slots:
+
+ void setPasses()
+ {
+ setResult(true);
+ }
+
+ void setFails()
+ {
+ setResult(false);
+ }
+
+ void setResult(bool result)
+ {
+ m_passes = result;
+ }
+
+private:
+ bool m_passes;
+};
+
+void tst_QApplication::testQuitLock3()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ Result *result = new Result(&app);
+
+ JobObject *job = new JobObject(&app);
+
+ QObject::connect(job, SIGNAL(done()), result, SLOT(setPasses()));
+
+ app.exec();
+
+ QVERIFY(result->result());
+}
+
+void tst_QApplication::testQuitLock4()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ QWidget *w = new QWidget;
+
+ w->show();
+
+ Result *result = new Result(&app);
+ JobObject *job = new JobObject(1000, &app);
+
+ QTimer::singleShot(500, w, SLOT(deleteLater()));
+
+ QObject::connect(w, SIGNAL(destroyed()), result, SLOT(setFails()));
+ QObject::connect(job, SIGNAL(done()), result, SLOT(setPasses()));
+
+ app.exec();
+
+ QVERIFY(result->result());
+}
+
+class JobBeforeWindowRunner : public QObject
+{
+ Q_OBJECT
+public:
+ JobBeforeWindowRunner(QObject *parent = 0)
+ : QObject(parent), m_result(new Result(this))
+ {
+
+ }
+
+ void start()
+ {
+ JobObject *job = new JobObject(this);
+ connect(job, SIGNAL(done()), m_result, SLOT(setFails()));
+ connect(job, SIGNAL(destroyed()), SLOT(showWindowDelayed()), Qt::QueuedConnection);
+ }
+
+ bool result() const { return m_result->result(); }
+
+private slots:
+ void showWindowDelayed()
+ {
+ qApp->setQuitLockEnabled(true);
+ QTimer::singleShot(500, this, SLOT(showWindow()));
+ }
+
+ void showWindow()
+ {
+ QWidget *w = new QWidget;
+ w->show();
+ w->deleteLater();
+ connect(w, SIGNAL(destroyed()), m_result, SLOT(setPasses()));
+ }
+
+private:
+ Result * const m_result;
+};
+
+void tst_QApplication::testQuitLock5()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+ app.setQuitLockEnabled(false);
+ // Run a job before showing a window, and only enable the refcounting
+ // after doing so.
+ // Although the job brings the refcount to zero, the app does not exit
+ // until setQuitLockEnabled is called and the feature re-enabled.
+
+ JobBeforeWindowRunner *eventRunner = new JobBeforeWindowRunner(&app);
+
+ eventRunner->start();
+
+ app.exec();
+
+ QVERIFY(eventRunner->result());
+}
+
+class JobDuringWindowRunner : public QObject
+{
+ Q_OBJECT
+public:
+ JobDuringWindowRunner(QObject *parent = 0)
+ : QObject(parent), m_result(new Result(this))
+ {
+
+ }
+
+ void start()
+ {
+ JobObject *job = new JobObject(this);
+
+ QWidget *w = new QWidget;
+ w->show();
+ w->deleteLater();
+
+ QObject::connect(w, SIGNAL(destroyed()), m_result, SLOT(setFails()));
+ QObject::connect(job, SIGNAL(done()), m_result, SLOT(setPasses()));
+ }
+
+ bool result() const { return m_result->result(); }
+
+private:
+ Result * const m_result;
+};
+
+void tst_QApplication::testQuitLock6()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ // A job runs, and while it is running, a window is shown and closed,
+ // then the job ends, which causes the quit.
+
+ JobDuringWindowRunner *eventRunner = new JobDuringWindowRunner(&app);
+
+ eventRunner->start();
+
+ app.exec();
+
+ QVERIFY(eventRunner->result());
+}
+class JobWindowJobWindowRunner : public QObject
+{
+ Q_OBJECT
+public:
+ JobWindowJobWindowRunner(QObject *parent = 0)
+ : QObject(parent), m_result(new Result(this))
+ {
+
+ }
+
+ void start()
+ {
+ JobObject *job = new JobObject(500, this);
+
+ QWidget *w = new QWidget;
+ w->show();
+ QTimer::singleShot(1000, w, SLOT(deleteLater()));
+
+ QObject::connect(w, SIGNAL(destroyed()), m_result, SLOT(setPasses()));
+ QObject::connect(job, SIGNAL(done()), m_result, SLOT(setFails()));
+ }
+
+ bool result() const { return m_result->result(); }
+private:
+ Result * const m_result;
+};
+
+void tst_QApplication::testQuitLock7()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ // A job runs, and while it is running, a window is shown
+ // then the job ends, then the window is closed, which causes the quit.
+
+ JobWindowJobWindowRunner *eventRunner = new JobWindowJobWindowRunner(&app);
+
+ eventRunner->start();
+
+ app.exec();
+
+ QVERIFY(eventRunner->result());
+}
+
+void tst_QApplication::testQuitLock8()
+{
+ int argc = 1;
+ char *argv[] = { "tst_qcoreapplication" };
+ QApplication app(argc, argv);
+
+ QMainWindow *mw1 = new QMainWindow;
+ mw1->show();
+ QMainWindow *mw2 = new QMainWindow;
+ mw2->show();
+
+ QMetaObject::invokeMethod(mw1, "close", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(mw2, "close", Qt::QueuedConnection);
+
+ app.exec();
+
+ // No hang = pass
+}
+
+
/*
This test is meant to ensure that certain objects (public & commonly used)
can safely be used in a Q_GLOBAL_STATIC such that their destructors are
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
index fc1f37047e..2e416a731b 100644
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
+++ b/tests/auto/widgets/kernel/qapplication/wincmdline/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
index 9abeb1cc83..8498d8b31d 100644
--- a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
+++ b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro
@@ -5,6 +5,3 @@ QT += widgets
SOURCES += main.cpp
DESTDIR = ./
-# This app is testdata for tst_qapplication
-target.path = $$[QT_INSTALL_TESTS]/tst_qapplication/$$TARGET
-INSTALLS += target
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
index 9da67183bc..bdcc46d72a 100644
--- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
+++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp
index 5595e03252..64aa571f19 100644
--- a/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/widgets/kernel/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index 4b4c843115..fc47e09d4f 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index 9df387b18b..c8e5591f8b 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index c0a8d9680b..764d777cea 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -56,8 +56,8 @@
#include <QRadioButton>
#include <private/qlayoutengine_p.h>
-#ifdef Q_WS_MAC
-# include <QtGui/QMacStyle>
+#ifdef Q_OS_MAC
+# include <QtWidgets/QMacStyle>
#endif
class tst_QLayout : public QObject
@@ -273,7 +273,7 @@ public:
void tst_QLayout::layoutItemRect()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (qobject_cast<QMacStyle*>(QApplication::style())) {
QWidget *window = new QWidget;
QRadioButton *radio = new QRadioButton(window);
diff --git a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
index 7939f12c0d..9c3be62a3a 100644
--- a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
+++ b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
index d8b0666880..b47ef659be 100644
--- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -90,7 +90,7 @@ void tst_QToolTip::task183679_data()
{
QTest::addColumn<Qt::Key>("key");
QTest::addColumn<bool>("visible");
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
const bool visibleAfterNonModifier = false;
#else
const bool visibleAfterNonModifier = true;
@@ -116,6 +116,9 @@ void tst_QToolTip::task183679()
widget.showDelayedToolTip(100);
QTest::qWait(300);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23707", Continue);
+#endif
QTRY_VERIFY(QToolTip::isVisible());
QTest::keyPress(&widget, key);
@@ -125,6 +128,12 @@ void tst_QToolTip::task183679()
// auto-close timeout (currently 10000 msecs)
QTest::qWait(1500);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("Shift", "QTBUG-23707", Continue);
+ QEXPECT_FAIL("Control", "QTBUG-23707", Continue);
+ QEXPECT_FAIL("Alt", "QTBUG-23707", Continue);
+ QEXPECT_FAIL("Meta", "QTBUG-23707", Continue);
+#endif
QCOMPARE(QToolTip::isVisible(), visible);
}
diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro
index 33b95d7d2b..23fd2459bf 100644
--- a/tests/auto/widgets/kernel/qwidget/qwidget.pro
+++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro
@@ -11,9 +11,8 @@ aix-g++*:QMAKE_CXXFLAGS+=-fpermissive
CONFIG += x11inc
mac {
-# ### fixme
-# LIBS += -framework Security -framework AppKit -framework Carbon
-# OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm
+ LIBS += -framework Security -framework AppKit -framework Carbon
+ OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm
}
x11 {
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 16bb5d345b..caf0f1f80d 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -56,7 +56,6 @@
#include <qstyle.h>
#include <qwidget.h>
#include <qwindowsstyle.h>
-#include <qinputcontext.h>
#include <qdesktopwidget.h>
#include <private/qwidget_p.h>
#include <private/qapplication_p.h>
@@ -77,10 +76,7 @@
# include <qscreen_qws.h>
#endif
-// I *MUST* have QtTest afterwards or this test won't work with newer headers
-#if defined(Q_WS_MAC)
-# include <private/qt_mac_p.h>
-#undef verify
+#if defined(Q_OS_MAC)
#include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile.
#endif
@@ -140,7 +136,7 @@ bool qt_wince_is_smartphone() {
}
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Security/AuthSession.h>
bool macHasAccessToWindowsServer()
{
@@ -225,8 +221,7 @@ private slots:
#endif
void widgetAt();
-#ifdef Q_WS_MAC
- void retainHIView();
+#ifdef Q_OS_MAC
void sheetOpacity();
void setMask();
#endif
@@ -257,7 +252,7 @@ private slots:
void update();
void isOpaque();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
void scroll();
#endif
@@ -342,10 +337,8 @@ private slots:
#ifndef Q_OS_IRIX
void doubleRepaint();
#endif
-#ifndef Q_WS_MAC
void resizeInPaintEvent();
void opaqueChildren();
-#endif
void setMaskInResizeEvent();
void moveInResizeEvent();
@@ -412,7 +405,7 @@ private slots:
void taskQTBUG_7532_tabOrderWithFocusProxy();
void movedAndResizedAttributes();
void childAt();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void childAt_unifiedToolBar();
void taskQTBUG_11373();
#endif
@@ -2238,12 +2231,12 @@ void tst_QWidget::showMinimizedKeepsFocus()
qApp->setActiveWindow(&window);
QTest::qWaitForWindowShown(&window);
QTest::qWait(30);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
#endif
QTRY_COMPARE(window.focusWidget(), firstchild);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
#endif
@@ -2629,7 +2622,7 @@ public:
void tst_QWidget::lostUpdatesOnHide()
{
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
UpdateWidget widget;
widget.setAttribute(Qt::WA_DontShowOnScreen);
widget.show();
@@ -2853,7 +2846,7 @@ void tst_QWidget::stackUnder()
foreach (UpdateWidget *child, allChildren) {
int expectedPaintEvents = child == child4 ? 1 : 0;
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
+#if defined(Q_WS_WIN) || defined(Q_OS_MAC)
if (expectedPaintEvents == 1 && child->numPaintEvents == 2)
QEXPECT_FAIL(0, "Mac and Windows issues double repaints for Z-Order change", Continue);
#endif
@@ -2892,7 +2885,7 @@ void tst_QWidget::stackUnder()
#ifdef Q_OS_WINCE
qApp->processEvents();
#endif
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QEXPECT_FAIL(0, "See QTBUG-493", Continue);
#endif
QCOMPARE(child->numPaintEvents, 0);
@@ -3464,99 +3457,7 @@ void tst_QWidget::testDeletionInEventHandlers()
delete w;
}
-#ifdef Q_WS_MAC
-
-/*
- Test that retaining and releasing the HIView returned by QWidget::winId()
- works even if the widget itself is deleted.
-*/
-void tst_QWidget::retainHIView()
-{
- // Single window
- {
- const WidgetViewPair window = createAndRetain();
- delete window.first;
- QVERIFY(testAndRelease(window.second));
- }
-
- // Child widget
- {
- const WidgetViewPair parent = createAndRetain();
- const WidgetViewPair child = createAndRetain(parent.first);
-
- delete parent.first;
- QVERIFY(testAndRelease(parent.second));
- QVERIFY(testAndRelease(child.second));
- }
-
- // Multiple children
- {
- const WidgetViewPair parent = createAndRetain();
- const WidgetViewPair child1 = createAndRetain(parent.first);
- const WidgetViewPair child2 = createAndRetain(parent.first);
-
- delete parent.first;
- QVERIFY(testAndRelease(parent.second));
- QVERIFY(testAndRelease(child1.second));
- QVERIFY(testAndRelease(child2.second));
- }
-
- // Grandchild widget
- {
- const WidgetViewPair parent = createAndRetain();
- const WidgetViewPair child = createAndRetain(parent.first);
- const WidgetViewPair grandchild = createAndRetain(child.first);
-
- delete parent.first;
- QVERIFY(testAndRelease(parent.second));
- QVERIFY(testAndRelease(child.second));
- QVERIFY(testAndRelease(grandchild.second));
- }
-
- // Reparent child widget
- {
- const WidgetViewPair parent1 = createAndRetain();
- const WidgetViewPair parent2 = createAndRetain();
- const WidgetViewPair child = createAndRetain(parent1.first);
-
- child.first->setParent(parent2.first);
-
- delete parent1.first;
- QVERIFY(testAndRelease(parent1.second));
- delete parent2.first;
- QVERIFY(testAndRelease(parent2.second));
- QVERIFY(testAndRelease(child.second));
- }
-
- // Reparent window
- {
- const WidgetViewPair window1 = createAndRetain();
- const WidgetViewPair window2 = createAndRetain();
- const WidgetViewPair child1 = createAndRetain(window1.first);
- const WidgetViewPair child2 = createAndRetain(window2.first);
-
- window2.first->setParent(window1.first);
-
- delete window2.first;
- QVERIFY(testAndRelease(window2.second));
- QVERIFY(testAndRelease(child2.second));
- delete window1.first;
- QVERIFY(testAndRelease(window1.second));
- QVERIFY(testAndRelease(child1.second));
- }
-
- // Delete child widget
- {
- const WidgetViewPair parent = createAndRetain();
- const WidgetViewPair child = createAndRetain(parent.first);
-
- delete child.first;
- QVERIFY(testAndRelease(child.second));
- delete parent.first;
- QVERIFY(testAndRelease(parent.second));
- }
-}
-
+#ifdef Q_OS_MAC
void tst_QWidget::sheetOpacity()
{
QWidget tmpWindow;
@@ -3744,7 +3645,7 @@ void tst_QWidget::optimizedResizeMove()
void tst_QWidget::optimizedResize_topLevel()
{
-#if defined(Q_WS_MAC) || defined(Q_WS_QWS)
+#if defined(Q_OS_MAC) || defined(Q_WS_QWS)
QSKIP("We do not yet have static contents support for *top-levels* on this platform");
#endif
@@ -4362,7 +4263,7 @@ static inline bool isOpaque(QWidget *widget)
void tst_QWidget::isOpaque()
{
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QWidget w;
QVERIFY(::isOpaque(&w));
@@ -4434,7 +4335,7 @@ void tst_QWidget::isOpaque()
#endif
}
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
/*
Test that scrolling of a widget invalidates the correct regions
*/
@@ -4821,7 +4722,7 @@ void tst_QWidget::windowMoveResize()
widget.move(r.topLeft());
widget.resize(r.size());
QApplication::processEvents();
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
if (r.width() == 0 && r.height() > 0) {
widget.move(r.topLeft());
widget.resize(r.size());
@@ -4890,7 +4791,7 @@ void tst_QWidget::windowMoveResize()
widget.move(r.topLeft());
widget.resize(r.size());
QApplication::processEvents();
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
if (r.width() == 0 && r.height() > 0) {
widget.move(r.topLeft());
widget.resize(r.size());
@@ -5019,7 +4920,7 @@ void tst_QWidget::moveChild()
QTRY_COMPARE(pos, child.pos());
QCOMPARE(parent.r, QRegion(oldGeometry) - child.geometry());
-#if !defined(Q_WS_MAC)
+#if !defined(Q_OS_MAC)
// should be scrolled in backingstore
QCOMPARE(child.r, QRegion());
#endif
@@ -6657,7 +6558,7 @@ void tst_QWidget::render_systemClip()
// rrrrrrrrrr
// ...
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
for (int i = 0; i < image.height(); ++i) {
for (int j = 0; j < image.width(); ++j) {
if (i < 50 && j < i)
@@ -7620,11 +7521,6 @@ void tst_QWidget::updateGeometry()
void tst_QWidget::sendUpdateRequestImmediately()
{
-#ifdef Q_WS_MAC
- if (!QApplicationPrivate::graphicsSystem())
- QSKIP("We only send update requests on the Mac when passing -graphicssystem");
-#endif
-
UpdateWidget updateWidget;
updateWidget.show();
#ifdef Q_WS_X11
@@ -7646,7 +7542,7 @@ void tst_QWidget::sendUpdateRequestImmediately()
#ifndef Q_OS_IRIX
void tst_QWidget::doubleRepaint()
{
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
if (!macHasAccessToWindowsServer())
QSKIP("Not having window server access causes the wrong number of repaints to be issues");
#endif
@@ -7677,8 +7573,6 @@ void tst_QWidget::doubleRepaint()
}
#endif
-#ifndef Q_WS_MAC
-// This test only makes sense on the Mac when passing -graphicssystem.
void tst_QWidget::resizeInPaintEvent()
{
QWidget window;
@@ -7742,7 +7636,6 @@ void tst_QWidget::opaqueChildren()
greatGrandChild.setAutoFillBackground(false);
QCOMPARE(qt_widget_private(&grandChild)->getOpaqueChildren(), QRegion());
}
-#endif
class MaskSetWidget : public QWidget
@@ -8344,7 +8237,7 @@ void tst_QWidget::setClearAndResizeMask()
QTRY_COMPARE(child.mask(), childMask);
QTest::qWait(50);
// and ensure that the child widget doesn't get any update.
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QCOMPARE(child.numPaintEvents, 1);
@@ -8367,7 +8260,7 @@ void tst_QWidget::setClearAndResizeMask()
// and ensure that that the child widget gets an update for the area outside the old mask.
QTRY_COMPARE(child.numPaintEvents, 1);
outsideOldMask = child.rect();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (!child.internalWinId())
#endif
@@ -8382,7 +8275,7 @@ void tst_QWidget::setClearAndResizeMask()
// Mask child widget with a mask that is bigger than the rect
child.setMask(QRegion(0, 0, 1000, 1000));
QTest::qWait(100);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_COMPARE(child.numPaintEvents, 1);
@@ -8395,7 +8288,7 @@ void tst_QWidget::setClearAndResizeMask()
// ...and the same applies when clearing the mask.
child.clearMask();
QTest::qWait(100);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_VERIFY(child.numPaintEvents > 0);
@@ -8425,7 +8318,7 @@ void tst_QWidget::setClearAndResizeMask()
QTimer::singleShot(100, &resizeChild, SLOT(shrinkMask()));
QTest::qWait(200);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
@@ -8437,7 +8330,7 @@ void tst_QWidget::setClearAndResizeMask()
const QRegion oldMask = resizeChild.mask();
QTimer::singleShot(0, &resizeChild, SLOT(enlargeMask()));
QTest::qWait(100);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
if (child.internalWinId())
QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
@@ -8994,15 +8887,13 @@ void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
void tst_QWidget::inputFocus_task257832()
{
QLineEdit *widget = new QLineEdit;
- QInputContext *context = widget->inputContext();
- if (!context)
- QSKIP("No input context");
widget->setFocus();
widget->winId(); // make sure, widget has been created
- context->setFocusWidget(widget);
- QCOMPARE(context->focusWidget(), static_cast<QWidget*>(widget));
+ widget->show();
+ QTRY_VERIFY(widget->hasFocus());
+ QCOMPARE(qApp->inputMethod()->inputItem(), static_cast<QWidget*>(widget));
widget->setReadOnly(true);
- QVERIFY(!context->focusWidget());
+ QVERIFY(!qApp->inputMethod()->inputItem());
delete widget;
}
@@ -9137,24 +9028,13 @@ void tst_QWidget::focusProxyAndInputMethods()
// and that the input method gets the focus proxy passed
// as the focus widget instead of the child widget.
// otherwise input method queries go to the wrong widget
- QInputContext *inputContext = qApp->inputContext();
- if (inputContext) {
- QCOMPARE(inputContext->focusWidget(), toplevel);
+ QCOMPARE(qApp->inputPanel()->inputItem(), toplevel);
- child->setAttribute(Qt::WA_InputMethodEnabled, false);
- QVERIFY(!inputContext->focusWidget());
+ toplevel->setAttribute(Qt::WA_InputMethodEnabled, false);
+ QVERIFY(!qApp->inputPanel()->inputItem());
- child->setAttribute(Qt::WA_InputMethodEnabled, true);
- QCOMPARE(inputContext->focusWidget(), toplevel);
-
- child->setEnabled(false);
- QVERIFY(!inputContext->focusWidget());
-
- child->setEnabled(true);
- QCOMPARE(inputContext->focusWidget(), toplevel);
- } else {
- qDebug() << "No input context set, skipping QInputContext::focusWidget() test";
- }
+ toplevel->setAttribute(Qt::WA_InputMethodEnabled, true);
+ QCOMPARE(qApp->inputPanel()->inputItem(), toplevel);
delete toplevel;
}
@@ -9321,7 +9201,7 @@ void tst_QWidget::childAt()
QCOMPARE(parent.childAt(120, 120), grandChild);
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
void tst_QWidget::childAt_unifiedToolBar()
{
QLabel *label = new QLabel(QLatin1String("foo"));
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h
index 5d07ebd381..0343185b21 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,18 +34,15 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtCore/QString>
#include <QtCore/QPair>
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#pragma once // Yeah, it's deprecated in general, but it's standard practive for Mac OS X.
QString nativeWindowTitle(QWidget *widget, Qt::WindowState state);
bool nativeWindowModified(QWidget *widget);
-
-typedef QPair<QWidget *, WId> WidgetViewPair;
-bool testAndRelease(const WId);
-WidgetViewPair createAndRetain(QWidget * const parent = 0);
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm
index 404a3e989f..50cad19bde 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.mm
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -35,49 +34,37 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
+// some versions of CALayer.h use 'slots' as an identifier
+#define QT_NO_KEYWORDS
+
#include "tst_qwidget_mac_helpers.h"
-#include <private/qt_mac_p.h>
-#include <private/qt_cocoa_helpers_mac_p.h>
+#include <QApplication>
+#include <QPlatformNativeInterface>
+#include <private/qcore_mac_p.h>
+#include <Cocoa/Cocoa.h>
QString nativeWindowTitle(QWidget *window, Qt::WindowState state)
{
- OSWindowRef windowRef = qt_mac_window_for(window);
+ QWindow *qwindow = window->windowHandle();
+ NSWindow *nswindow = (NSWindow *) qApp->platformNativeInterface()->nativeResourceForWindow("nswindow", qwindow);
QCFString macTitle;
if (state == Qt::WindowMinimized) {
- macTitle = reinterpret_cast<CFStringRef>([[windowRef miniwindowTitle] retain]);
+ macTitle = reinterpret_cast<CFStringRef>([[nswindow miniwindowTitle] retain]);
} else {
- macTitle = reinterpret_cast<CFStringRef>([[windowRef title] retain]);
+ macTitle = reinterpret_cast<CFStringRef>([[nswindow title] retain]);
}
return macTitle;
}
bool nativeWindowModified(QWidget *widget)
{
- return [qt_mac_window_for(widget) isDocumentEdited];
-}
-
-bool testAndRelease(const WId view)
-{
- if ([id(view) retainCount] != 2)
- return false;
- [id(view) release];
- [id(view) release];
- return true;
+ QWindow *qwindow = widget->windowHandle();
+ NSWindow *nswindow = (NSWindow *) qApp->platformNativeInterface()->nativeResourceForWindow("nswindow", qwindow);
+ return [nswindow isDocumentEdited];
}
-
-WidgetViewPair createAndRetain(QWidget * const parent)
-{
- QWidget * const widget = new QWidget(parent);
- const WId view = widget->winId();
- // Retain twice so we can safely call retainCount even if the retain count
- // is off by one because of a double release.
- [id(view) retain];
- [id(view) retain];
- return qMakePair(widget, view);
-}
-
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index b6f62379a6..78d9d36bc9 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -198,7 +198,7 @@ void tst_QWidget_window::tst_windowFilePathAndwindowTitle_data()
QTest::newRow("always set title, not appName") << true << true << validPath << QString() << windowTitle << windowTitle << windowTitle;
QString platString =
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
fileNameOnly;
#else
fileAndApp;
@@ -233,12 +233,19 @@ void tst_QWidget_window::tst_windowFilePathAndwindowTitle()
widget.setWindowTitle(indyWindowTitle);
}
widget.setWindowFilePath(filePath);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("never Set Title, yes AppName", "QTBUG-23682", Continue);
+ QEXPECT_FAIL("set title after only, yes AppName", "QTBUG-23682", Continue);
+#endif
QCOMPARE(finalTitleBefore, widget.windowTitle());
QCOMPARE(widget.windowFilePath(), filePath);
if (setWindowTitleAfter) {
widget.setWindowTitle(indyWindowTitle);
}
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("never Set Title, yes AppName", "QTBUG-23682", Continue);
+#endif
QCOMPARE(finalTitleAfter, widget.windowTitle());
QCOMPARE(widget.windowFilePath(), filePath);
}
diff --git a/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
index 7e2d3e3b9a..03e4fd9a0a 100644
--- a/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/widgets/kernel/qwidgetaction/tst_qwidgetaction.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -368,7 +368,7 @@ void tst_QWidgetAction::popup()
{
QMenu menu;
menu.addAction(&action);
- QTimer::singleShot(0, &menu, SLOT(close()));
+ QTimer::singleShot(100, &menu, SLOT(close()));
menu.exec();
}
diff --git a/tests/auto/widgets/shared/platforminputcontext.h b/tests/auto/widgets/shared/platforminputcontext.h
index a8b9a8c547..759123a4a6 100644
--- a/tests/auto/widgets/shared/platforminputcontext.h
+++ b/tests/auto/widgets/shared/platforminputcontext.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
index 551fc6612a..f732dfa18d 100644
--- a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
+++ b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index 1483189cd0..b96d3f7095 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -75,7 +75,7 @@
#include <QCleanlooksStyle>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <QMacStyle>
#endif
@@ -561,7 +561,7 @@ qDebug("TEST PAINTING");
void tst_QStyle::testMacStyle()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QMacStyle mstyle;
QVERIFY(testAllFunctions(&mstyle));
#endif
diff --git a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
index f1fac918bb..9ede072eb3 100644
--- a/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
+++ b/tests/auto/widgets/styles/qstyleoption/tst_qstyleoption.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index cf0e773905..2dc985439d 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -781,6 +781,10 @@ void tst_QStyleSheetStyle::focusColors()
+ " did not contain background color #e8ff66, using style "
+ QString::fromLatin1(qApp->style()->metaObject()->className()))
.toLocal8Bit().constData());
+#ifdef Q_OS_MAC
+ if (widget == widgets.first())
+ QEXPECT_FAIL("", "Failure only for first widget, the QPushButton, see QTBUG-23686", Continue);
+#endif
QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain text color #ff0084, using style "
@@ -832,14 +836,23 @@ void tst_QStyleSheetStyle::hoverColors()
QTest::mouseMove ( widget, QPoint(6,6));
QTest::qWait(60);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "Numerous failures related to Qt::WA_UnderMouse, see QTBUGT-23685", Continue);
+#endif
QVERIFY(widget->testAttribute(Qt::WA_UnderMouse));
QImage image(frame.width(), frame.height(), QImage::Format_ARGB32);
frame.render(&image);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "Numerous failures related to Qt::WA_UnderMouse, see QTBUGT-23685", Continue);
+#endif
QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain background color #e8ff66").toLocal8Bit().constData());
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "Numerous failures related to Qt::WA_UnderMouse, see QTBUGT-23685", Continue);
+#endif
QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain text color #ff0084").toLocal8Bit().constData());
@@ -1027,7 +1040,13 @@ void tst_QStyleSheetStyle::minmaxSizes()
QVERIFY(qAbs(page3->minimumSize().height() - 250 - 2) <= 2);
QTabBar *bar = qFindChild<QTabBar*>(&tabWidget);
QVERIFY(bar);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23686", Continue);
+#endif
QVERIFY(qAbs(bar->tabRect(index1).width() - 100 - 2) <= 2);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23686", Continue);
+#endif
QVERIFY(qAbs(bar->tabRect(index3).width() - 130 - 2) <= 2);
}
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 024e4ffa14..228ff40ee5 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
index 8bf82e588e..1eabbdf43f 100644
--- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
+++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the $MODULE$ of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
index 846f282528..cfafa9ea47 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
index a88b0168f2..2a8bb7aa0e 100644
--- a/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
+++ b/tests/auto/widgets/util/qundogroup/tst_qundogroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
index eb8ebfe21a..81b2ff022c 100644
--- a/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
+++ b/tests/auto/widgets/util/qundostack/tst_qundostack.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/util/util.pro b/tests/auto/widgets/util/util.pro
index b7fe35ce4c..33f2845001 100644
--- a/tests/auto/widgets/util/util.pro
+++ b/tests/auto/widgets/util/util.pro
@@ -5,7 +5,3 @@ SUBDIRS=\
qsystemtrayicon \
qundogroup \
qundostack \
-
-symbian:SUBDIRS -= \
- qsystemtrayicon \
-
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 1eb1a5abd3..5695834e61 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -125,7 +125,7 @@ public:
opt.palette = palette();
opt.state = QStyle::State_None;
style()->drawPrimitive(QStyle::PE_FrameFocusRect, &opt, &p, this);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
p.setPen(Qt::red);
p.drawRect(r);
#endif
@@ -361,17 +361,17 @@ void tst_QAbstractButton::setText()
QCOMPARE( testWidget->text(), QString("simple") );
testWidget->setText("&ampersand");
QCOMPARE( testWidget->text(), QString("&ampersand") );
-#ifndef Q_WS_MAC // no mneonics on Mac.
+#ifndef Q_OS_MAC // no mneonics on Mac.
QCOMPARE( testWidget->shortcut(), QKeySequence("ALT+A"));
#endif
testWidget->setText("te&st");
QCOMPARE( testWidget->text(), QString("te&st") );
-#ifndef Q_WS_MAC // no mneonics on Mac.
+#ifndef Q_OS_MAC // no mneonics on Mac.
QCOMPARE( testWidget->shortcut(), QKeySequence("ALT+S"));
#endif
testWidget->setText("foo");
QCOMPARE( testWidget->text(), QString("foo") );
-#ifndef Q_WS_MAC // no mneonics on Mac.
+#ifndef Q_OS_MAC // no mneonics on Mac.
QCOMPARE( testWidget->shortcut(), QKeySequence());
#endif
}
diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
index c64c16bf85..353a6f84e6 100644
--- a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 32e0fbfc5e..6ed5d59db0 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -732,7 +732,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< 1 // delta
<< int(Qt::Vertical) // orientation of slider
<< int(Qt::Vertical) // orientation of wheel
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
<< 1 // expected position after
#else
// We don't restrict scrolling to pageStep on Mac
@@ -750,7 +750,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< 1 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Vertical) // orientation of wheel
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
<< 1 // expected position after
#else
// We don't restrict scrolling to pageStep on Mac
@@ -769,7 +769,7 @@ void tst_QAbstractSlider::wheelEvent_data()
<< 1 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Vertical) // orientation of wheel
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
<< 1 // expected position after
#else
// We don't restrict scrolling to pageStep on Mac
@@ -868,6 +868,11 @@ void tst_QAbstractSlider::wheelEvent()
QWheelEvent event(slider->rect().bottomRight() + distanceFromBottomRight, WHEEL_DELTA * deltaMultiple,
Qt::NoButton, k, orientation);
QVERIFY(applicationInstance->sendEvent(slider,&event));
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("Normal data page", "QTBUG-23679", Continue);
+ QEXPECT_FAIL("Different orientation", "QTBUG-23679", Continue);
+ QEXPECT_FAIL("Different orientation2", "QTBUG-23679", Continue);
+#endif
QCOMPARE(slider->sliderPosition(),expectedSliderPosition);
slider->setSliderPosition(initialSliderPosition);
@@ -877,6 +882,11 @@ void tst_QAbstractSlider::wheelEvent()
QSignalSpy spy1(slider, SIGNAL(actionTriggered(int)));
QSignalSpy spy2(slider, SIGNAL(valueChanged(int)));
QVERIFY(applicationInstance->sendEvent(slider,&event));
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("Normal data page", "QTBUG-23679", Continue);
+ QEXPECT_FAIL("Different orientation", "QTBUG-23679", Continue);
+ QEXPECT_FAIL("Different orientation2", "QTBUG-23679", Continue);
+#endif
QCOMPARE(slider->sliderPosition(),expectedSliderPosition);
int expectedSignalCount = (initialSliderPosition == expectedSliderPosition) ? 0 : 1;
QCOMPARE(spy1.count(), expectedSignalCount);
@@ -972,8 +982,14 @@ void tst_QAbstractSlider::sliderPressedReleased()
QStyle::SubControl(subControl), slider);
QTest::mousePress(slider, Qt::LeftButton, 0, QPoint(rect.center().x() + 2, rect.center().y() + 2));
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("scrollbar on the groove", "QTBUG-23679", Continue);
+#endif
QCOMPARE(spy1.count(), expectedCount);
QTest::mouseRelease(slider, Qt::LeftButton, 0, rect.center());
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("scrollbar on the groove", "QTBUG-23679", Continue);
+#endif
QCOMPARE(spy2.count(), expectedCount);
delete slider;
diff --git a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
index 964fd27320..f77891ed7f 100644
--- a/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
+++ b/tests/auto/widgets/widgets/qabstractspinbox/tst_qabstractspinbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
index a554216300..c77358faf8 100644
--- a/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,7 @@
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qtoolbutton.h>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <qsettings.h>
#endif
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
index 468497f7ae..4f95f80525 100644
--- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
+++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
index 858586a20a..78eaa3ffb1 100644
--- a/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
+++ b/tests/auto/widgets/widgets/qcheckbox/tst_qcheckbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 95fee1f6c8..80285ded78 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -58,7 +58,7 @@
#include <qtablewidget.h>
#include <qscrollbar.h>
#include <qboxlayout.h>
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <qmacstyle_mac.h>
#elif defined Q_WS_X11
#include <private/qt_x11_p.h>
@@ -455,7 +455,7 @@ void tst_QComboBox::setEditable()
void tst_QComboBox::setPalette()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (qobject_cast<QMacStyle *>(testWidget->style())) {
QSKIP("This test doesn't make sense for pixmap-based styles");
}
@@ -907,6 +907,9 @@ void tst_QComboBox::hide()
QTRY_VERIFY(testWidget->view()->isVisible());
testWidget->hidePopup();
//allow combobox effect to complete
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "QTBUG-23678", Continue);
+#endif
QTRY_VERIFY(!testWidget->view()->isVisible());
testWidget->hide();
QVERIFY(!testWidget->isVisible());
diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
index 1a594138df..b18e095a93 100644
--- a/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
+++ b/tests/auto/widgets/widgets/qcommandlinkbutton/tst_qcommandlinkbutton.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
index fd579a14cd..41c90b499a 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
+++ b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
@@ -4,6 +4,4 @@ QT += widgets testlib
SOURCES += tst_qdatetimeedit.cpp
wincewm50smart-msvc2005: DEFINES += WINCE_NO_MODIFIER_KEYS
-
-
-
+mac:CONFIG += insignificant_test # numerous failures, see QTBUG-23674
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 6514ed589c..e66909e9eb 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -780,7 +780,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys()
testWidget->setDate(QDate(2004, 05, 11));
testWidget->setDisplayFormat("dd/MM/yyyy");
testWidget->show();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -819,7 +819,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys()
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("2004"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -846,7 +846,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys()
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11/05/2004"));
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ShiftModifier);
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11/05/2004"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -862,7 +862,7 @@ void tst_QDateTimeEdit::selectAndScrollWithKeys()
QCOMPARE(testWidget->currentSection(), QDateTimeEdit::DaySection);
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("11"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -882,7 +882,7 @@ void tst_QDateTimeEdit::backspaceKey()
testWidget->setDate(QDate(2004, 05, 11));
testWidget->setDisplayFormat("d/MM/yyyy");
testWidget->show();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -896,7 +896,7 @@ void tst_QDateTimeEdit::backspaceKey()
for (int i=0;i<3;i++)
QTest::keyClick(testWidget, Qt::Key_Left);
QCOMPARE(testWidget->text(), QString("11/05/2004"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -911,7 +911,7 @@ void tst_QDateTimeEdit::backspaceKey()
QTest::keyClick(testWidget, Qt::Key_Backspace);
QCOMPARE(testWidget->text(), QString("11/0/2004"));
testWidget->interpretText();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -945,7 +945,7 @@ void tst_QDateTimeEdit::deleteKey()
qApp->setActiveWindow(testWidget);
testWidget->setDate(QDate(2004, 05, 11));
testWidget->setDisplayFormat("d/MM/yyyy");
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -1019,21 +1019,21 @@ void tst_QDateTimeEdit::enterKey()
testWidget->setDisplayFormat("prefix d/MM/yyyy 'suffix'");
testWidget->lineEdit()->setFocus();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
#endif
QTest::keyClick(testWidget, Qt::Key_Enter);
QVERIFY(!testWidget->lineEdit()->hasSelectedText());
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
#endif
QTest::keyClick(testWidget, Qt::Key_Enter);
QVERIFY(!testWidget->lineEdit()->hasSelectedText());
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -1096,7 +1096,7 @@ void tst_QDateTimeEdit::specialValueText()
QCOMPARE(testWidget->date(), QDate(2000, 1, 1));
QCOMPARE(testWidget->text(), QString("fOo"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -1107,7 +1107,7 @@ void tst_QDateTimeEdit::specialValueText()
QTest::keyClick(testWidget, Qt::Key_Down);
QCOMPARE(testWidget->text(), QString("fOo"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -2538,7 +2538,7 @@ void tst_QDateTimeEdit::newCase()
testWidget->setDisplayFormat("MMMM'a'MbMMMcMM");
testWidget->setDate(QDate(2005, 6, 1));
QCOMPARE(testWidget->text(), QString("Junea6bJunc06"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -2546,7 +2546,7 @@ void tst_QDateTimeEdit::newCase()
QTest::keyClick(testWidget, Qt::Key_Up);
QCOMPARE(testWidget->text(), QString("Julya7bJulc07"));
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("July"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -2619,7 +2619,7 @@ void tst_QDateTimeEdit::cursorPos()
//l.exec();
QTest::keyClick(testWidget, Qt::Key_Y);
QCOMPARE(testWidget->lineEdit()->cursorPosition(), 11);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -2649,7 +2649,7 @@ void tst_QDateTimeEdit::newCase5()
testWidget->setDateTime(QDateTime(QDate(2005, 10, 7), QTime(17, 44, 13, 100)));
testWidget->show();
QCOMPARE(testWidget->lineEdit()->displayText(), QString("2005-10-07 17:44:13 100 ms"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -2672,7 +2672,7 @@ void tst_QDateTimeEdit::newCase6()
testWidget->setDate(QDate(2005, 10, 7));
testWidget->show();
QCOMPARE(testWidget->lineEdit()->displayText(), QString("7-2005-10-07"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -2745,7 +2745,7 @@ void tst_QDateTimeEdit::setCurrentSection()
QCOMPARE(setCurrentSections.size(), expectedCursorPositions.size());
testWidget->setDisplayFormat(format);
testWidget->setDateTime(dateTime);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -2765,7 +2765,7 @@ void tst_QDateTimeEdit::setSelectedSection()
testWidget->setDisplayFormat("mm.ss.zzz('ms') m");
testWidget->setTime(QTime(0, 0, 9));
testWidget->show();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_Home);
@@ -2882,7 +2882,7 @@ void tst_QDateTimeEdit::reverseTest()
testWidget->setDisplayFormat("dd/MM/yyyy");
testWidget->setDate(QDate(2001, 3, 30));
QCOMPARE(testWidget->lineEdit()->displayText(), QString("2001/03/30"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -3033,7 +3033,7 @@ void tst_QDateTimeEdit::ddMMMMyyyy()
testWidget->setCurrentSection(QDateTimeEdit::YearSection);
QTest::keyClick(testWidget, Qt::Key_Enter);
QCOMPARE(testWidget->lineEdit()->selectedText(), QString("2000"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(testWidget, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(testWidget, Qt::Key_End);
@@ -3322,7 +3322,7 @@ void tst_QDateTimeEdit::potentialYYValueBug()
edit.setDate(edit.minimumDate());
edit.lineEdit()->setFocus();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&edit, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(&edit, Qt::Key_End);
@@ -3337,7 +3337,7 @@ void tst_QDateTimeEdit::textSectionAtEnd()
edit.setDisplayFormat("MMMM");
edit.setDate(QDate(2000, 1, 1));
edit.lineEdit()->setFocus();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&edit, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(&edit, Qt::Key_End);
@@ -3363,7 +3363,7 @@ void tst_QDateTimeEdit::keypadAutoAdvance()
EditorDateEdit edit;
edit.setDate(QDate(2000, 2, 1));
edit.setDisplayFormat("dd/MM");
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&edit, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(&edit, Qt::Key_Home);
diff --git a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
index 1479ee768d..4c83d5777b 100644
--- a/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
+++ b/tests/auto/widgets/widgets/qdial/tst_qdial.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index 6a2517e0bb..03af773c2e 100644
--- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index ce86ea3dfc..43c0022c25 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index 51e91b40bd..f140e631f2 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -268,7 +268,7 @@ void tst_QDoubleSpinBox::setTracking_data()
QTestEventList keys;
QStringList texts1;
QStringList texts2;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier);
#else
keys.addKeyClick(Qt::Key_End);
@@ -343,7 +343,7 @@ void tst_QDoubleSpinBox::setWrapping_data()
keys.clear();
values.clear();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier);
#else
keys.addKeyClick(Qt::Key_End);
@@ -358,7 +358,7 @@ void tst_QDoubleSpinBox::setWrapping_data()
keys.clear();
values.clear();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keys.addKeyClick(Qt::Key_Left, Qt::ControlModifier);
#else
keys.addKeyClick(Qt::Key_Home);
@@ -625,7 +625,7 @@ void tst_QDoubleSpinBox::setDecimals()
QCOMPARE(spin.text(), expected);
if (spin.decimals() > 0) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(&spin, Qt::Key_End);
@@ -830,13 +830,13 @@ void tst_QDoubleSpinBox::removeAll()
spin.setValue(0.2);
spin.setDecimals(1);
spin.show();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(&spin, Qt::Key_Home);
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier|Qt::ShiftModifier);
#else
QTest::keyClick(&spin, Qt::Key_End, Qt::ShiftModifier);
@@ -883,7 +883,7 @@ void tst_QDoubleSpinBox::germanTest()
DoubleSpinBox spin;
spin.show();
spin.setValue(2.12);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier);
#else
QTest::keyClick(&spin, Qt::Key_End);
@@ -901,7 +901,7 @@ void tst_QDoubleSpinBox::doubleDot()
spin.setValue(2.12);
QTest::keyClick(&spin, Qt::Key_Backspace);
QCOMPARE(spin.text(), QString("2.12"));
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(&spin, Qt::Key_Home);
diff --git a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
index 77f3b15184..deb8a3bb6f 100644
--- a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -76,7 +76,7 @@ void tst_QDoubleValidator::validateThouSep_data()
QTest::newRow("1.000de") << "de" << QString("1.000") << ACC;
QTest::newRow(".C") << "C" << QString(".") << ITM;
- QTest::newRow(".de") << "de" << QString(".") << ITM;
+ QTest::newRow(".de") << "de" << QString(".") << INV;
QTest::newRow(",C") << "C" << QString(",") << INV;
QTest::newRow(",de") << "de" << QString(",") << ITM;
}
@@ -173,7 +173,7 @@ void tst_QDoubleValidator::validate_data()
QTest::newRow("data_de8") << "de" << -100.0 << 100.0 << 1 << QString("-100") << ACC << ACC;
QTest::newRow("data_de9") << "de" << -100.0 << -10.0 << 1 << QString("10") << ITM << ITM;
QTest::newRow("data_de10") << "de" << 0.3 << 0.5 << 5 << QString("0,34567") << ACC << ACC;
- QTest::newRow("data_de11") << "de" << -0.3 << -0.5 << 5 << QString("-0,345678") << ITM << INV;
+ QTest::newRow("data_de11") << "de" << -0.3 << -0.5 << 5 << QString("-0,345678") << INV << INV;
QTest::newRow("data_de12") << "de" << -0.32 << 0.32 << 1 << QString("0") << ACC << ACC;
QTest::newRow("data_de13") << "de" << 0.0 << 100.0 << 1 << QString("3456a") << INV << INV;
QTest::newRow("data_de14") << "de" << -100.0 << 100.0 << 1 << QString("-3456a") << INV << INV;
@@ -216,12 +216,9 @@ void tst_QDoubleValidator::validate_data()
arabicNum += QChar(1636);
QTest::newRow("arabic") << "ar" << 0.0 << 20.0 << 2 << arabicNum << ACC << ACC;
- QTest::newRow("data_QTBUG_14935-1") << "de" << 0.0 << 1.0 << 5 << QString("0.31") << ACC << ACC;
- QTest::newRow("data_QTBUG_14935-2") << "de" << 0.0 << 1000000.0 << 5 << QString("3.123") << ACC << ACC;
- QTest::newRow("data_QTBUG_14935-3") << "de" << 0.0 << 1000000.0 << 5 << QString("123,345.678") << ACC << ACC;
-
- QTest::newRow("data_de_problem-1") << "de" << 0.0 << 10.0 << 0 << QString("1.0") << ITM << ITM;
- QTest::newRow("data_de_problem-2") << "de" << 0.0 << 10.0 << 0 << QString("0.1") << INV << INV;
+ // Confim no fallback to C locale
+ QTest::newRow("data_C1") << "de" << 0.0 << 1000.0 << 2 << QString("1.000,00") << ACC << ACC;
+ QTest::newRow("data_C2") << "de" << 0.0 << 1000.0 << 2 << QString("1,000.00") << INV << INV;
}
void tst_QDoubleValidator::validate()
@@ -234,9 +231,6 @@ void tst_QDoubleValidator::validate()
QFETCH(QValidator::State, scientific_state);
QFETCH(QValidator::State, standard_state);
- QEXPECT_FAIL("data_de_problem-1", "To be fixed. See QTBUG-15210.", Abort);
- QEXPECT_FAIL("data_de_problem-2", "To be fixed. See QTBUG-15210.", Abort);
-
QLocale::setDefault(QLocale(localeName));
QDoubleValidator dv(minimum, maximum, decimals, 0);
@@ -247,25 +241,31 @@ void tst_QDoubleValidator::validate()
}
void tst_QDoubleValidator::notifySignals()
{
+ QLocale::setDefault(QLocale("C"));
+
QDoubleValidator dv(0.1, 0.9, 10, 0);
QSignalSpy topSpy(&dv, SIGNAL(topChanged(double)));
QSignalSpy bottomSpy(&dv, SIGNAL(bottomChanged(double)));
QSignalSpy decSpy(&dv, SIGNAL(decimalsChanged(int)));
+ QSignalSpy changedSpy(&dv, SIGNAL(changed()));
qRegisterMetaType<QDoubleValidator::Notation>("QDoubleValidator::Notation");
QSignalSpy notSpy(&dv, SIGNAL(notationChanged(QDoubleValidator::Notation)));
dv.setTop(0.8);
QCOMPARE(topSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 1);
QVERIFY(dv.top() == 0.8);
dv.setBottom(0.2);
QCOMPARE(bottomSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 2);
QVERIFY(dv.bottom() == 0.2);
dv.setRange(0.2, 0.7);
QCOMPARE(topSpy.count(), 2);
QCOMPARE(bottomSpy.count(), 1);
QCOMPARE(decSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 3);
QVERIFY(dv.bottom() == 0.2);
QVERIFY(dv.top() == 0.7);
QVERIFY(dv.decimals() == 0.);
@@ -273,6 +273,7 @@ void tst_QDoubleValidator::notifySignals()
dv.setRange(0.3, 0.7);
QCOMPARE(topSpy.count(), 2);
QCOMPARE(bottomSpy.count(), 2);
+ QCOMPARE(changedSpy.count(), 4);
QVERIFY(dv.bottom() == 0.3);
QVERIFY(dv.top() == 0.7);
QVERIFY(dv.decimals() == 0.);
@@ -280,12 +281,14 @@ void tst_QDoubleValidator::notifySignals()
dv.setRange(0.4, 0.6);
QCOMPARE(topSpy.count(), 3);
QCOMPARE(bottomSpy.count(), 3);
+ QCOMPARE(changedSpy.count(), 5);
QVERIFY(dv.bottom() == 0.4);
QVERIFY(dv.top() == 0.6);
QVERIFY(dv.decimals() == 0.);
dv.setDecimals(10);
QCOMPARE(decSpy.count(), 2);
+ QCOMPARE(changedSpy.count(), 6);
QVERIFY(dv.decimals() == 10.);
@@ -293,13 +296,31 @@ void tst_QDoubleValidator::notifySignals()
QCOMPARE(topSpy.count(), 3);
QCOMPARE(bottomSpy.count(), 3);
QCOMPARE(decSpy.count(), 3);
+ QCOMPARE(changedSpy.count(), 7);
QVERIFY(dv.bottom() == 0.4);
QVERIFY(dv.top() == 0.6);
QVERIFY(dv.decimals() == 100.);
dv.setNotation(QDoubleValidator::StandardNotation);
QCOMPARE(notSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 8);
QVERIFY(dv.notation() == QDoubleValidator::StandardNotation);
+
+ dv.setRange(dv.bottom(), dv.top(), dv.decimals());
+ QCOMPARE(topSpy.count(), 3);
+ QCOMPARE(bottomSpy.count(), 3);
+ QCOMPARE(decSpy.count(), 3);
+ QCOMPARE(changedSpy.count(), 8);
+
+ dv.setNotation(dv.notation());
+ QCOMPARE(notSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 8);
+
+ dv.setLocale(QLocale("C"));
+ QCOMPARE(changedSpy.count(), 8);
+
+ dv.setLocale(QLocale("en"));
+ QCOMPARE(changedSpy.count(), 9);
}
void tst_QDoubleValidator::validateIntEquiv_data()
diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
index 920e5401c4..ccedb63d1a 100644
--- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
+++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
index b80f50bc67..e773607164 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
index bd919d2c4a..730992da77 100644
--- a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
index bff3f59c50..6aec414ae6 100644
--- a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -214,6 +214,12 @@ void tst_QIntValidator::validateFrench()
QCOMPARE(validator.validate(s, i), QValidator::Intermediate);
validator.fixup(s);
QCOMPARE(s, validator.locale().toString(1000));
+
+ // Confim no fallback to C locale
+ s = QLatin1String("1,000");
+ QCOMPARE(validator.validate(s, i), QValidator::Invalid);
+ validator.setLocale(QLocale::C);
+ QCOMPARE(validator.validate(s, i), QValidator::Acceptable);
}
void tst_QIntValidator::validate()
@@ -231,33 +237,53 @@ void tst_QIntValidator::validate()
void tst_QIntValidator::notifySignals()
{
+ QLocale::setDefault(QLocale("C"));
+
QIntValidator iv(0, 10, 0);
QSignalSpy topSpy(&iv, SIGNAL(topChanged(int)));
QSignalSpy bottomSpy(&iv, SIGNAL(bottomChanged(int)));
+ QSignalSpy changedSpy(&iv, SIGNAL(changed()));
+
iv.setTop(9);
QCOMPARE(topSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 1);
QVERIFY(iv.top() == 9);
iv.setBottom(1);
QCOMPARE(bottomSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 2);
QVERIFY(iv.bottom() == 1);
iv.setRange(1, 8);
QCOMPARE(topSpy.count(), 2);
QCOMPARE(bottomSpy.count(), 1);
+ QCOMPARE(changedSpy.count(), 3);
QVERIFY(iv.top() == 8);
QVERIFY(iv.bottom() == 1);
iv.setRange(2, 8);
QCOMPARE(topSpy.count(), 2);
QCOMPARE(bottomSpy.count(), 2);
+ QCOMPARE(changedSpy.count(), 4);
QVERIFY(iv.top() == 8);
QVERIFY(iv.bottom() == 2);
iv.setRange(3, 7);
QCOMPARE(topSpy.count(), 3);
QCOMPARE(bottomSpy.count(), 3);
+ QCOMPARE(changedSpy.count(), 5);
QVERIFY(iv.top() == 7);
QVERIFY(iv.bottom() == 3);
+
+ iv.setRange(3, 7);
+ QCOMPARE(topSpy.count(), 3);
+ QCOMPARE(bottomSpy.count(), 3);
+ QCOMPARE(changedSpy.count(), 5);
+
+ iv.setLocale(QLocale("C"));
+ QCOMPARE(changedSpy.count(), 5);
+
+ iv.setLocale(QLocale("en"));
+ QCOMPARE(changedSpy.count(), 6);
}
QTEST_MAIN(tst_QIntValidator)
diff --git a/tests/auto/widgets/widgets/qlabel/qlabel.pro b/tests/auto/widgets/widgets/qlabel/qlabel.pro
index 3aacb60224..6a5757fb5c 100644
--- a/tests/auto/widgets/widgets/qlabel/qlabel.pro
+++ b/tests/auto/widgets/widgets/qlabel/qlabel.pro
@@ -5,12 +5,5 @@ QT += widgets widgets-private testlib
QT += core-private gui-private
SOURCES += tst_qlabel.cpp
-wince*::DEFINES += SRCDIR=\\\"\\\"
-else:DEFINES += SRCDIR=\\\"$$PWD/\\\"
-wince* {
- addFiles.files = *.png \
- testdata
- addFiles.path = .
- DEPLOYMENT += addFiles
-}
+TESTDATA += testdata/* *.png
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index f4775cae30..6d6b9384b9 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -407,12 +407,12 @@ void tst_QLabel::task226479_movieResize()
QMovie *movie = new QMovie( &label );
label.setMovie(movie);
QTest::qWaitForWindowShown(&label);
- movie->setFileName(SRCDIR "red.png");
+ movie->setFileName(QFINDTESTDATA("red.png"));
movie->start();
QTest::qWait(50);
movie->stop();
label.paintedRegion = QRegion();
- movie->setFileName(SRCDIR "green.png");
+ movie->setFileName(QFINDTESTDATA("green.png"));
movie->start();
QTest::qWait(50);
diff --git a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
index 5ce4ac3dba..455c8d19e4 100644
--- a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
+++ b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 1fabc45cac..b004efd07c 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,7 @@
#include "qclipboard.h"
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h> // For the random function.
#include <cstdlib> // For the random function.
#endif
@@ -273,6 +273,7 @@ private slots:
void bidiLogicalMovement();
void selectAndCursorPosition();
+ void inputMethod();
void inputMethodSelection();
void inputMethodTentativeCommit();
@@ -1407,7 +1408,7 @@ void tst_QLineEdit::undo_keypressevents()
#ifndef QT_NO_CLIPBOARD
static bool nativeClipboardWorking()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)
@@ -1810,7 +1811,7 @@ void tst_QLineEdit::isReadOnly()
static void figureOutProperKey(Qt::Key &key, Qt::KeyboardModifiers &pressState)
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static bool tst_lineedit_randomized = false;
// Mac has 3 different ways of accomplishing this (same for moving to the back)
// So I guess we should just randomly do this for now. Which may get people mad, but if
@@ -2014,14 +2015,14 @@ void tst_QLineEdit::cursorPositionChanged_data()
keys.addKeyClick(Qt::Key_Home);
keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier);
QTest::newRow("abc efg<home><ctrl-right>") << keys
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
<< 0 << 4;
#else
<< 6 << 7;
#endif
keys.clear();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keys.addKeyClick(Qt::Key_A);
keys.addKeyClick(Qt::Key_B);
keys.addKeyClick(Qt::Key_C);
@@ -2044,13 +2045,13 @@ void tst_QLineEdit::cursorPositionChanged_data()
keys.addKeyClick(Qt::Key_F);
keys.addKeyClick(Qt::Key_Left, Qt::ControlModifier);
QTest::newRow("abc efg<ctrl-left>") << keys << 7
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
<< 4;
#else
<< 0;
#endif
keys.clear();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keys.addKeyClick(Qt::Key_A);
keys.addKeyClick(Qt::Key_B);
keys.addKeyClick(Qt::Key_C);
@@ -2792,7 +2793,7 @@ void tst_QLineEdit::setSelection()
#ifndef QT_NO_CLIPBOARD
void tst_QLineEdit::cut()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
{
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
@@ -3122,7 +3123,7 @@ void tst_QLineEdit::inlineCompletion()
QCOMPARE(testWidget->selectedText(), QString("tem1"));
Qt::KeyboardModifiers keyboardModifiers = Qt::ControlModifier;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keyboardModifiers |= Qt::AltModifier;
#endif
QTest::keyClick(testWidget, Qt::Key_Down, keyboardModifiers);
@@ -3805,6 +3806,18 @@ void tst_QLineEdit::selectAndCursorPosition()
QCOMPARE(testWidget->cursorPosition(), 0);
}
+void tst_QLineEdit::inputMethod()
+{
+ // widget accepts input
+ QInputMethodQueryEvent queryEvent(Qt::ImEnabled);
+ QApplication::sendEvent(testWidget, &queryEvent);
+ QCOMPARE(queryEvent.value(Qt::ImEnabled).toBool(), true);
+
+ testWidget->setEnabled(false);
+ QApplication::sendEvent(testWidget, &queryEvent);
+ QCOMPARE(queryEvent.value(Qt::ImEnabled).toBool(), false);
+}
+
void tst_QLineEdit::inputMethodSelection()
{
testWidget->setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index c9c627dffa..33b7ade715 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index 6a6d29cb9a..82632a018c 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -101,7 +101,7 @@ static bool tabBetweenSubWindowsIn(QMdiArea *mdiArea, int tabCount = -1, bool re
Qt::KeyboardModifiers modifiers = reverse ? Qt::ShiftModifier : Qt::NoModifier;
Qt::Key key;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
key = Qt::Key_Meta;
modifiers |= Qt::MetaModifier;
#else
@@ -194,7 +194,7 @@ static bool verifyArrangement(QMdiArea *mdiArea, Arrangement arrangement, const
QStyleOptionTitleBar options;
options.initFrom(firstSubWindow);
int titleBarHeight = firstSubWindow->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
// ### Remove this after the mac style has been fixed
if (qobject_cast<QMacStyle *>(firstSubWindow->style()))
titleBarHeight -= 4;
@@ -444,7 +444,7 @@ void tst_QMdiArea::subWindowActivated()
}
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Security/AuthSession.h>
bool macHasAccessToWindowsServer()
{
@@ -519,7 +519,7 @@ void tst_QMdiArea::subWindowActivated2()
mdiArea.showMinimized();
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&mdiArea);
-#elif defined (Q_WS_MAC)
+#elif defined (Q_OS_MAC)
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort);
#endif
@@ -657,7 +657,7 @@ void tst_QMdiArea::changeWindowTitle()
#else
widget->setWindowState(Qt::WindowMaximized);
#endif
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
#endif
@@ -667,7 +667,7 @@ void tst_QMdiArea::changeWindowTitle()
qApp->processEvents();
QTest::qWaitForWindowShown(mw);
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
#endif
@@ -685,7 +685,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
qApp->processEvents();
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
widget->setWindowTitle( wc2 );
QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc2) );
@@ -703,7 +703,7 @@ void tst_QMdiArea::changeWindowTitle()
#endif
qApp->processEvents();
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) );
#endif
#ifdef USE_SHOW
@@ -712,7 +712,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowNoState);
#endif
qApp->processEvents();
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
QCOMPARE(mw->windowTitle(), mwc);
#else
QCOMPARE( mw->windowTitle(), mwc2 );
@@ -724,7 +724,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
qApp->processEvents();
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc2).arg(wc2) );
#endif
@@ -773,7 +773,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( mw->isWindowModified(), false);
QCOMPARE( widget->isWindowModified(), true);
widget->setWindowState(Qt::WindowMaximized);
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -783,7 +783,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( widget->isWindowModified(), true);
widget->setWindowState(Qt::WindowMaximized);
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -793,7 +793,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( widget->isWindowModified(), false);
widget->setWindowModified(true);
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -1029,7 +1029,7 @@ void tst_QMdiArea::activeSubWindow()
qApp->setActiveWindow(&mainWindow);
QCOMPARE(mdiArea->activeSubWindow(), subWindow);
-#if !defined(Q_WS_MAC) && !defined(Q_WS_WIN)
+#if !defined(Q_OS_MAC) && !defined(Q_WS_WIN)
qApp->setActiveWindow(0);
QVERIFY(!mdiArea->activeSubWindow());
#endif
@@ -1114,7 +1114,7 @@ void tst_QMdiArea::currentSubWindow()
QVERIFY(mdiArea.activeSubWindow());
QVERIFY(mdiArea.currentSubWindow());
-#if !defined(Q_WS_MAC) && !defined(Q_WS_WIN)
+#if !defined(Q_OS_MAC) && !defined(Q_WS_WIN)
qApp->setActiveWindow(0);
QVERIFY(!mdiArea.activeSubWindow());
QVERIFY(mdiArea.currentSubWindow());
@@ -2042,7 +2042,7 @@ void tst_QMdiArea::delayedPlacement()
void tst_QMdiArea::iconGeometryInMenuBar()
{
-#if !defined (Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined(Q_OS_WINCE)
QMainWindow mainWindow;
QMenuBar *menuBar = mainWindow.menuBar();
QMdiArea *mdiArea = new QMdiArea;
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index b66ffabfcd..53e0a5494a 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -59,7 +59,7 @@
#include <QStyleOptionTitleBar>
#include <QPushButton>
#include <QSizeGrip>
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
#include <QMacStyle>
#endif
@@ -189,7 +189,7 @@ private slots:
void setWindowTitle();
void resizeEvents_data();
void resizeEvents();
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
void defaultSizeGrip();
#endif
void hideAndShow();
@@ -197,7 +197,7 @@ private slots:
void explicitlyHiddenWidget();
void resizeTimer();
void fixedMinMaxSize();
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
void replaceMenuBarWhileMaximized();
void closeOnDoubleClick();
#endif
@@ -374,7 +374,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
qApp->setActiveWindow(&mainWindow);
// QMainWindow's window title is empty
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
{
QCOMPARE(mainWindow.windowTitle(), QString());
QMdiSubWindow *window = workspace->addSubWindow(new QPushButton(QLatin1String("Test")));
@@ -426,7 +426,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
window->showMaximized();
qApp->processEvents();
QVERIFY(window->isMaximized());
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QVERIFY(window->maximizedButtonsWidget());
QCOMPARE(window->maximizedButtonsWidget(), mainWindow.menuBar()->cornerWidget(Qt::TopRightCorner));
QVERIFY(window->maximizedSystemMenuIconWidget());
@@ -448,13 +448,13 @@ void tst_QMdiSubWindow::mainWindowSupport()
QVERIFY(!nestedWindow->maximizedButtonsWidget());
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
.arg(originalWindowTitle, window->widget()->windowTitle()));
#endif
}
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
return;
#endif
@@ -605,7 +605,7 @@ void tst_QMdiSubWindow::showShaded()
int offset = window->style()->pixelMetric(QStyle::PM_MDIFrameWidth) / 2;
QPoint mousePosition(window->width() - qMax(offset, 2), window->height() - qMax(offset, 2));
QWidget *mouseReceiver = 0;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (qobject_cast<QMacStyle*>(window->style()))
mouseReceiver = qFindChild<QSizeGrip *>(window);
else
@@ -789,7 +789,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove()
QStyleOptionTitleBar options;
options.initFrom(window);
int height = window->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options);
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
// ### Remove this after mac style has been fixed
height -= 4;
#endif
@@ -1039,7 +1039,7 @@ void tst_QMdiSubWindow::setSystemMenu()
systemMenu->hide();
QVERIFY(!qApp->activePopupWidget());
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
// System menu in menu bar.
subWindow->showMaximized();
QVERIFY(subWindow->isMaximized());
@@ -1072,7 +1072,7 @@ void tst_QMdiSubWindow::setSystemMenu()
systemMenu->hide();
QVERIFY(!qApp->activePopupWidget());
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
// System menu in menu bar in reverse mode.
subWindow->showMaximized();
QVERIFY(subWindow->isMaximized());
@@ -1422,7 +1422,7 @@ void tst_QMdiSubWindow::resizeEvents()
QCOMPARE(widgetResizeEventSpy.count(), expectedWidgetResizeEvents);
}
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
void tst_QMdiSubWindow::defaultSizeGrip()
{
if (!qApp->style()->inherits("QMacStyle"))
@@ -1463,7 +1463,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner));
QMdiSubWindow *subWindow = mdiArea->addSubWindow(new QTextEdit);
subWindow->showMaximized();
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
#endif
@@ -1478,7 +1478,7 @@ void tst_QMdiSubWindow::hideAndShow()
// Show QMdiArea.
tabWidget->setCurrentIndex(0);
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
@@ -1500,7 +1500,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(subWindow);
QCOMPARE(mdiArea->activeSubWindow(), subWindow);
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
@@ -1515,7 +1515,7 @@ void tst_QMdiSubWindow::hideAndShow()
QCOMPARE(window->size(), window->sizeHint());
subWindow->showMaximized();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
#endif
@@ -1525,7 +1525,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner));
subWindow->show();
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1539,7 +1539,7 @@ void tst_QMdiSubWindow::hideAndShow()
// Show QMainWindow.
mainWindow.show();
-#if !defined (Q_WS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1686,7 +1686,7 @@ void tst_QMdiSubWindow::fixedMinMaxSize()
QStyleOptionTitleBar options;
options.initFrom(subWindow);
int minimizedHeight = subWindow->style()->pixelMetric(QStyle::PM_TitleBarHeight, &options);
-#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
// ### Remove this after mac style has been fixed
if (qobject_cast<QMacStyle *>(subWindow->style()))
minimizedHeight -= 4;
@@ -1720,7 +1720,7 @@ void tst_QMdiSubWindow::fixedMinMaxSize()
QCOMPARE(subWindow->size(), minimumSize);
}
-#if !defined( Q_WS_MAC) && !defined( Q_OS_WINCE)
+#if !defined( Q_OS_MAC) && !defined( Q_OS_WINCE)
void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
{
@@ -1894,7 +1894,7 @@ void tst_QMdiSubWindow::mdiArea()
void tst_QMdiSubWindow::task_182852()
{
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QMdiArea *workspace = new QMdiArea;
QMainWindow mainWindow;
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index 924c134736..4fffd74491 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -352,8 +352,13 @@ void tst_QMenu::keyboardNavigation()
QTest::keyClick(lastMenu, key, modifiers);
if (expected_activated) {
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("shortcut0", "Shortcut navication fails, see QTBUG-23684", Continue);
+#endif
QCOMPARE(activated, builtins[expected_action]);
+#ifndef Q_OS_MAC
QEXPECT_FAIL("shortcut0", "QTBUG-22449: QMenu doesn't remove highlight if a menu item is activated by a shortcut", Abort);
+#endif
QCOMPARE(menus[expected_menu]->activeAction(), (QAction *)0);
} else {
QCOMPARE(menus[expected_menu]->activeAction(), builtins[expected_action]);
@@ -365,7 +370,7 @@ void tst_QMenu::keyboardNavigation()
QCOMPARE(highlighted, (QAction *)0);
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QT_BEGIN_NAMESPACE
extern bool qt_tab_all_widgets; // from qapplication.cpp
QT_END_NAMESPACE
@@ -378,7 +383,7 @@ void tst_QMenu::focus()
menu.addAction("Two");
menu.addAction("Three");
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (!qt_tab_all_widgets)
QSKIP("Computer is currently set up to NOT tab to all widgets,"
" this test assumes you can tab to all widgets");
@@ -418,7 +423,7 @@ void tst_QMenu::overrideMenuAction()
// On Mac and Windows CE, we need to create native key events to test menu
// action activation, so skip this part of the test.
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
QAction *aQuit = new QAction("Quit", &w);
aQuit->setShortcut(QKeySequence("Ctrl+X"));
m->addAction(aQuit);
@@ -557,7 +562,9 @@ void tst_QMenu::tearOff()
QTest::mouseClick(menu, Qt::LeftButton, 0, QPoint(3, 3), 10);
QTest::qWait(100);
+#ifndef Q_OS_MAC
QEXPECT_FAIL("", "QTBUG-22565", Abort);
+#endif
QVERIFY(menu->isTearOffMenuVisible());
QPointer<QMenu> torn = 0;
foreach (QWidget *w, QApplication::allWidgets()) {
@@ -935,6 +942,10 @@ private:
void tst_QMenu::QTBUG_10735_crashWithDialog()
{
+#ifdef Q_OS_MAC
+ QSKIP("Test currently hangs on Mac OS X, see QTBUG-23677");
+#endif
+
MyMenu menu;
QTimer::singleShot(1000, &menu, SLOT(activateLastAction()));
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 05ab9d014a..9989e5e7aa 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -330,7 +330,7 @@ void tst_QMenuBar::onActivated( QAction* action )
void tst_QMenuBar::accel()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("On Mac/WinCE, native key events are needed to test menu action activation");
#endif
@@ -348,7 +348,7 @@ void tst_QMenuBar::accel()
void tst_QMenuBar::activatedCount()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("On Mac/WinCE, native key events are needed to test menu action activation");
#endif
// create a popup menu with menu items set the accelerators later...
@@ -562,7 +562,7 @@ void tst_QMenuBar::insertItem_QString_QObject()
void tst_QMenuBar::check_accelKeys()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("On Mac/WinCE, native key events are needed to test menu action activation");
#endif
initComplexMenubar();
@@ -631,7 +631,7 @@ void tst_QMenuBar::check_accelKeys()
void tst_QMenuBar::check_cursorKeys1()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("Qt/Mac,WinCE does not use the native popups/menubar");
#endif
@@ -662,7 +662,7 @@ void tst_QMenuBar::check_cursorKeys1()
void tst_QMenuBar::check_cursorKeys2()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("Qt/Mac,WinCE does not use the native popups/menubar");
#endif
@@ -692,7 +692,7 @@ void tst_QMenuBar::check_cursorKeys2()
*/
void tst_QMenuBar::check_cursorKeys3()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("Qt/Mac,WinCE does not use the native popups/menubar");
#endif
@@ -796,7 +796,7 @@ void tst_QMenuBar::check_endKey()
void tst_QMenuBar::check_escKey()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("Qt/Mac,WinCE does not use the native popups/menubar");
#endif
@@ -939,7 +939,7 @@ void tst_QMenuBar::check_escKey()
void
tst_QMenuBar::allowActiveAndDisabled()
{
-#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE_WM)
+#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE_WM)
mb->hide();
mb->clear();
@@ -977,7 +977,7 @@ tst_QMenuBar::allowActiveAndDisabled()
QCOMPARE(mb->activeAction()->text(), fileMenu.title());
mb->hide();
-#endif //Q_WS_MAC
+#endif //Q_OS_MAC
}
void tst_QMenuBar::check_altPress()
@@ -999,7 +999,7 @@ void tst_QMenuBar::check_altPress()
void tst_QMenuBar::check_shortcutPress()
{
-#if defined(Q_WS_MAC) || defined(Q_OS_WINCE_WM)
+#if defined(Q_OS_MAC) || defined(Q_OS_WINCE_WM)
QSKIP("Qt/Mac,WinCE does not use the native popups/menubar");
#endif
@@ -1020,7 +1020,7 @@ void tst_QMenuBar::check_shortcutPress()
void tst_QMenuBar::check_menuPosition()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("Qt/Mac does not use the native popups/menubar");
#endif
#ifdef Q_OS_WINCE_WM
@@ -1234,7 +1234,7 @@ void tst_QMenuBar::menubarSizeHint()
void tst_QMenuBar::taskQTBUG4965_escapeEaten()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("On Mac, do not test the menubar with escape key");
#endif
QMenuBar menubar;
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index bfd7050df1..1b483512e3 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -66,7 +66,7 @@ Q_DECLARE_METATYPE(pairListType);
Q_DECLARE_METATYPE(keyPairType);
Q_DECLARE_METATYPE(QList<bool>);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
#endif
@@ -161,7 +161,7 @@ private:
bool tst_QPlainTextEdit::nativeClipboardWorking()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)
@@ -286,14 +286,14 @@ void tst_QPlainTextEdit::createSelection()
{
QTest::keyClicks(ed, "Hello World");
/* go to start */
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::keyClick(ed, Qt::Key_Home, Qt::ControlModifier);
#else
QTest::keyClick(ed, Qt::Key_Home);
#endif
QCOMPARE(ed->textCursor().position(), 0);
/* select until end of text */
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::keyClick(ed, Qt::Key_End, Qt::ControlModifier | Qt::ShiftModifier);
#else
QTest::keyClick(ed, Qt::Key_End, Qt::ShiftModifier);
@@ -1008,7 +1008,7 @@ void tst_QPlainTextEdit::copyAvailable()
QFETCH(QList<bool>, copyAvailable);
QFETCH(QString, function);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("QTBUG-22283: copyAvailable has never passed on Mac");
#endif
ed->clear();
diff --git a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
index 97ccf60d27..89f2508a05 100644
--- a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
+++ b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -176,7 +176,7 @@ void tst_QProgressBar::format()
bar.setFormat("%v of %m (%p%)");
qApp->processEvents();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
// Animated scroll bars get paint events all the time
#ifdef Q_OS_WIN
if (QSysInfo::WindowsVersion < QSysInfo::WV_VISTA)
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 2f290cb4f1..1c06197d11 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -599,6 +599,11 @@ void tst_QPushButton::sizeHint()
{
QFETCH(QString, stylename);
+#ifdef Q_OS_MAC
+ if (stylename == "mac")
+ QSKIP("QStyleFactory cannot create the Mac style, see QTBUG-23680");
+#endif
+
QStyle *style = QStyleFactory::create(stylename);
if (!style)
QFAIL(qPrintable(QString::fromLatin1("Cannot create style: %1").arg(stylename)));
diff --git a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
index 19a5b62277..a45b22c134 100644
--- a/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
+++ b/tests/auto/widgets/widgets/qradiobutton/tst_qradiobutton.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp b/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp
index 2bc04d74c0..fca8acd920 100644
--- a/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp
+++ b/tests/auto/widgets/widgets/qregexpvalidator/tst_qregexpvalidator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -113,11 +113,13 @@ void tst_QRegExpValidator::validate()
QRegExpValidator rv( 0 );
QSignalSpy spy(&rv, SIGNAL(regExpChanged(const QRegExp&)));
+ QSignalSpy changedSpy(&rv, SIGNAL(changed()));
rv.setRegExp( QRegExp( rx ) );
int dummy;
QCOMPARE( (int)rv.validate( value, dummy ), state );
QCOMPARE(spy.count(), 1);
+ QCOMPARE(changedSpy.count(), 1);
}
QTEST_MAIN(tst_QRegExpValidator)
diff --git a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
index dbf8c9052e..c56b39296e 100644
--- a/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
+++ b/tests/auto/widgets/widgets/qscrollarea/tst_qscrollarea.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 65b46c1c0c..688daf1f8a 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -136,7 +136,7 @@ void tst_QScrollBar::task_209492()
QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent);
// Check that the action was triggered once.
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QEXPECT_FAIL("", "Fix does does not work on Mac due to paint architechure differences.", Abort);
#endif
QCOMPARE(scrollArea.scrollCount, 1);
diff --git a/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro b/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro
index 995fb15af4..98cf169730 100644
--- a/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro
+++ b/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro
@@ -4,4 +4,4 @@ INCLUDEPATH += .
QT += widgets testlib
SOURCES += tst_qsizegrip.cpp
-
+mac: CONFIG += insignificant_test # failures on mac, QTBUG-23681
diff --git a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
index 5e37e21949..4c5df04188 100644
--- a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
+++ b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -137,7 +137,7 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange()
QVERIFY(sizeGrip->isVisible());
widget->showMaximized();
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QVERIFY(!sizeGrip->isVisible());
#else
QVERIFY(sizeGrip->isVisible());
diff --git a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
index 09cc51c113..adc34fb21c 100644
--- a/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
+++ b/tests/auto/widgets/widgets/qslider/tst_qslider.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index cc01642fc1..c3d982388d 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -378,7 +378,7 @@ void tst_QSpinBox::setTracking_data()
QStringList texts1;
QStringList texts2;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
keys.addKeyClick(Qt::Key_Right, Qt::ControlModifier);
#else
keys.addKeyClick(Qt::Key_End);
@@ -824,13 +824,13 @@ void tst_QSpinBox::removeAll()
spin.setSuffix("bar");
spin.setValue(2);
spin.show();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(&spin, Qt::Key_Home);
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Right, Qt::ControlModifier|Qt::ShiftModifier);
#else
QTest::keyClick(&spin, Qt::Key_End, Qt::ShiftModifier);
@@ -845,7 +845,7 @@ void tst_QSpinBox::startWithDash()
{
SpinBox spin(0);
spin.show();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QTest::keyClick(&spin, Qt::Key_Left, Qt::ControlModifier);
#else
QTest::keyClick(&spin, Qt::Key_Home);
diff --git a/tests/auto/widgets/widgets/qsplitter/qsplitter.pro b/tests/auto/widgets/widgets/qsplitter/qsplitter.pro
index 79015269ef..8ae745ea9d 100644
--- a/tests/auto/widgets/widgets/qsplitter/qsplitter.pro
+++ b/tests/auto/widgets/widgets/qsplitter/qsplitter.pro
@@ -3,11 +3,4 @@ TARGET = tst_qsplitter
QT += widgets testlib
SOURCES += tst_qsplitter.cpp
-wince* {
- addFiles.files = extradata.txt setSizes3.dat
- addFiles.path = .
- DEPLOYMENT += addFiles
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA += extradata.txt setSizes3.dat
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index 2af62ceea0..048f1441a2 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -198,7 +198,7 @@ void tst_QSplitter::setSizes_data()
QTest::addColumn<IntList>("collapsibleStates");
QTest::addColumn<bool>("childrenCollapse");
- QFile file(SRCDIR "setSizes3.dat");
+ QFile file(QFINDTESTDATA("setSizes3.dat"));
if (!file.open(QIODevice::ReadOnly)) {
qDebug() << "Can't open file, reason:" << file.errorString();
return;
diff --git a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
index 94ac78e038..6c967b48d0 100644
--- a/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
+++ b/tests/auto/widgets/widgets/qstackedwidget/tst_qstackedwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
index 86f97d18d3..081e817727 100644
--- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
+++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -261,7 +261,7 @@ void tst_QStatusBar::QTBUG4334_hiddenOnMaximizedWindow()
main.setStatusBar(&statusbar);
main.showMaximized();
QTest::qWaitForWindowShown(&main);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QVERIFY(!statusbar.findChild<QSizeGrip*>()->isVisible());
#endif
main.showNormal();
diff --git a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
index 2bea17f56f..0757dd9ba4 100644
--- a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index a4d2739186..ed644ea033 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -579,7 +579,7 @@ void tst_QTabWidget::paintEventCount()
4;
#elif defined(Q_WS_WIN)
2;
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
5;
#else
2;
diff --git a/tests/auto/widgets/widgets/qtextbrowser.html b/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.html
index 95593cc925..95593cc925 100644
--- a/tests/auto/widgets/widgets/qtextbrowser.html
+++ b/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.html
diff --git a/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro b/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro
index 24185b1136..5416c1c71f 100644
--- a/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro
+++ b/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro
@@ -1,14 +1,7 @@
CONFIG += testcase
TARGET = tst_qtextbrowser
SOURCES += tst_qtextbrowser.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
QT += widgets testlib
-wince* {
- addFiles.files = *.html
- addFiles.path = .
- addDir.files = subdir/*
- addDir.path = subdir
- DEPLOYMENT += addFiles addDir
-}
+TESTDATA += *.html subdir/*
diff --git a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
index 6370c1ce51..c78989ebcb 100644
--- a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
+++ b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -120,11 +120,13 @@ tst_QTextBrowser::tst_QTextBrowser()
tst_QTextBrowser::~tst_QTextBrowser()
{
}
+
void tst_QTextBrowser::init()
{
-#if !defined(Q_OS_IRIX) && !defined(Q_OS_WINCE)
- QDir::setCurrent(SRCDIR);
-#endif
+ QString prefix = QFileInfo(QFINDTESTDATA("subdir")).absolutePath();
+ QVERIFY2(!prefix.isEmpty(), "Test data directory not found");
+ QDir::setCurrent(prefix);
+
browser = new TestBrowser;
browser->show();
}
@@ -252,18 +254,18 @@ void tst_QTextBrowser::relativeLinks()
qRegisterMetaType<QUrl>("QUrl");
QSignalSpy sourceChangedSpy(browser, SIGNAL(sourceChanged(const QUrl &)));
- browser->setSource(QUrl("../qtextbrowser.html"));
+ browser->setSource(QUrl("subdir/../qtextbrowser.html"));
QVERIFY(!browser->document()->isEmpty());
QVERIFY(sourceChangedSpy.count() == 1);
- QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("../qtextbrowser.html"));
- browser->setSource(QUrl("qtextbrowser/subdir/index.html"));
+ QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("subdir/../qtextbrowser.html"));
+ browser->setSource(QUrl("subdir/index.html"));
QVERIFY(!browser->document()->isEmpty());
QVERIFY(sourceChangedSpy.count() == 1);
- QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("qtextbrowser/subdir/index.html"));
- browser->setSource(QUrl("../anchor.html"));
+ QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("subdir/index.html"));
+ browser->setSource(QUrl("anchor.html"));
QVERIFY(!browser->document()->isEmpty());
QVERIFY(sourceChangedSpy.count() == 1);
- QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("../anchor.html"));
+ QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("anchor.html"));
browser->setSource(QUrl("subdir/index.html"));
QVERIFY(!browser->document()->isEmpty());
QVERIFY(sourceChangedSpy.count() == 1);
@@ -274,10 +276,10 @@ void tst_QTextBrowser::relativeLinks()
QVERIFY(!browser->document()->isEmpty());
QVERIFY(sourceChangedSpy.count() == 1);
QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("file:anchor.html"));
- browser->setSource(QUrl("../qtextbrowser.html"));
+ browser->setSource(QUrl("subdir/../qtextbrowser.html"));
QVERIFY(!browser->document()->isEmpty());
QVERIFY(sourceChangedSpy.count() == 1);
- QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("../qtextbrowser.html"));
+ QCOMPARE(sourceChangedSpy.takeFirst()[0].toUrl(), QUrl("subdir/../qtextbrowser.html"));
}
void tst_QTextBrowser::anchors()
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index a350f4d862..47eb3a59a3 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -70,13 +70,13 @@ Q_DECLARE_METATYPE(keyPairType);
Q_DECLARE_METATYPE(QList<bool>);
Q_DECLARE_METATYPE(QList<int>);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
#include <Carbon/Carbon.h>
#endif
bool nativeClipboardWorking()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)
@@ -215,7 +215,7 @@ private:
bool tst_QTextEdit::nativeClipboardWorking()
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
PasteboardRef pasteboard;
OSStatus status = PasteboardCreate(0, &pasteboard);
if (status == noErr)
@@ -475,14 +475,14 @@ void tst_QTextEdit::createSelection()
{
QTest::keyClicks(ed, "Hello World");
/* go to start */
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::keyClick(ed, Qt::Key_Home, Qt::ControlModifier);
#else
QTest::keyClick(ed, Qt::Key_Home);
#endif
QCOMPARE(ed->textCursor().position(), 0);
/* select until end of text */
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QTest::keyClick(ed, Qt::Key_End, Qt::ControlModifier | Qt::ShiftModifier);
#else
QTest::keyClick(ed, Qt::Key_End, Qt::ShiftModifier);
@@ -1355,7 +1355,7 @@ void tst_QTextEdit::copyAvailable()
QFETCH(QList<bool>, copyAvailable);
QFETCH(QString, function);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QSKIP("QTBUG-22283: copyAvailable has never passed on Mac");
#endif
ed->clear();
@@ -2407,11 +2407,16 @@ void tst_QTextEdit::inputMethodQuery()
ed->setText(text);
ed->selectAll();
- QInputMethodQueryEvent event(Qt::ImQueryInput);
+ QInputMethodQueryEvent event(Qt::ImQueryInput | Qt::ImEnabled);
QGuiApplication::sendEvent(ed, &event);
int anchor = event.value(Qt::ImAnchorPosition).toInt();
int position = event.value(Qt::ImCursorPosition).toInt();
QCOMPARE(qAbs(position - anchor), text.length());
+ QCOMPARE(event.value(Qt::ImEnabled).toBool(), true);
+
+ ed->setEnabled(false);
+ QGuiApplication::sendEvent(ed, &event);
+ QCOMPARE(event.value(Qt::ImEnabled).toBool(), false);
}
QTEST_MAIN(tst_QTextEdit)
diff --git a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
index e029f66cf2..f4fb6a9bcd 100644
--- a/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1018,10 +1018,15 @@ void tst_QToolBar::widgetAction()
delete a;
}
+#ifdef Q_OS_MAC
+QT_BEGIN_NAMESPACE
+extern void qt_set_sequence_auto_mnemonic(bool b);
+QT_END_NAMESPACE
+#endif
+
void tst_QToolBar::accel()
{
-#ifdef Q_WS_MAC
- extern void qt_set_sequence_auto_mnemonic(bool b);
+#ifdef Q_OS_MAC
qt_set_sequence_auto_mnemonic(true);
#endif
QMainWindow mw;
@@ -1040,7 +1045,7 @@ void tst_QToolBar::accel()
QTest::qWait(300);
QTRY_COMPARE(spy.count(), 1);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
qt_set_sequence_auto_mnemonic(false);
#endif
}
diff --git a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
index 10d476f662..6fcb38fe50 100644
--- a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
+++ b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
index 8eef254837..48b68d1795 100644
--- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
+++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp b/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp
index 8410a183cb..582f56da17 100644
--- a/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp
+++ b/tests/auto/widgets/widgets/qworkspace/tst_qworkspace.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -230,7 +230,7 @@ void tst_QWorkspace::windowActivated()
workspace->addWindow(widget);
widget->showMaximized();
qApp->sendPostedEvents();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QEXPECT_FAIL("", "This test has never passed on Mac. QWorkspace is obsoleted -> won't fix", Abort);
#endif
QCOMPARE(spy.count(), 0);
diff --git a/tests/auto/xml/dom/qdom/qdom.pro b/tests/auto/xml/dom/qdom/qdom.pro
index 11f5f66152..db19a8ba89 100644
--- a/tests/auto/xml/dom/qdom/qdom.pro
+++ b/tests/auto/xml/dom/qdom/qdom.pro
@@ -6,15 +6,8 @@ QT = core xml testlib
QT -= gui
wince* {
- addFiles.files = testdata doubleNamespaces.xml umlaut.xml
- addFiles.path = .
- DEPLOYMENT += addFiles
-
wince*|qt_not_deployed {
DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
}
- DEFINES += SRCDIR=\\\"\\\"
-}
-else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+TESTDATA += testdata/* doubleNamespaces.xml umlaut.xml
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index b5dc2e6081..f9570f7631 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -290,18 +290,20 @@ void tst_QDom::setContent()
void tst_QDom::toString_01_data()
{
QTest::addColumn<QString>("fileName");
+ const QString prefix = QFINDTESTDATA("testdata/toString_01");
+ if (prefix.isEmpty())
+ QFAIL("Cannot find testdata directory!");
+ QTest::newRow( "01" ) << QString(prefix + "/doc01.xml");
+ QTest::newRow( "02" ) << QString(prefix + "/doc02.xml");
+ QTest::newRow( "03" ) << QString(prefix + "/doc03.xml");
+ QTest::newRow( "04" ) << QString(prefix + "/doc04.xml");
+ QTest::newRow( "05" ) << QString(prefix + "/doc05.xml");
- QTest::newRow( "01" ) << QString(SRCDIR "testdata/toString_01/doc01.xml");
- QTest::newRow( "02" ) << QString(SRCDIR "testdata/toString_01/doc02.xml");
- QTest::newRow( "03" ) << QString(SRCDIR "testdata/toString_01/doc03.xml");
- QTest::newRow( "04" ) << QString(SRCDIR "testdata/toString_01/doc04.xml");
- QTest::newRow( "05" ) << QString(SRCDIR "testdata/toString_01/doc05.xml");
-
- QTest::newRow( "euc-jp" ) << QString(SRCDIR "testdata/toString_01/doc_euc-jp.xml");
- QTest::newRow( "iso-2022-jp" ) << QString(SRCDIR "testdata/toString_01/doc_iso-2022-jp.xml");
- QTest::newRow( "little-endian" ) << QString(SRCDIR "testdata/toString_01/doc_little-endian.xml");
- QTest::newRow( "utf-16" ) << QString(SRCDIR "testdata/toString_01/doc_utf-16.xml");
- QTest::newRow( "utf-8" ) << QString(SRCDIR "testdata/toString_01/doc_utf-8.xml");
+ QTest::newRow( "euc-jp" ) << QString(prefix + "/doc_euc-jp.xml");
+ QTest::newRow( "iso-2022-jp" ) << QString(prefix + "/doc_iso-2022-jp.xml");
+ QTest::newRow( "little-endian" ) << QString(prefix + "/doc_little-endian.xml");
+ QTest::newRow( "utf-16" ) << QString(prefix + "/doc_utf-16.xml");
+ QTest::newRow( "utf-8" ) << QString(prefix + "/doc_utf-8.xml");
}
@@ -471,7 +473,10 @@ void tst_QDom::save()
void tst_QDom::initTestCase()
{
- QFile file(SRCDIR "testdata/excludedCodecs.txt");
+ QString testFile = QFINDTESTDATA("testdata/excludedCodecs.txt");
+ if (testFile.isEmpty())
+ QFAIL("Cannot find testdata/excludedCodecs.txt");
+ QFile file(testFile);
QVERIFY(file.open(QIODevice::ReadOnly|QIODevice::Text));
QByteArray codecName;
@@ -546,19 +551,21 @@ void tst_QDom::saveWithSerialization() const
void tst_QDom::saveWithSerialization_data() const
{
QTest::addColumn<QString>("fileName");
-
- QTest::newRow("doc01.xml") << QString(SRCDIR "testdata/toString_01/doc01.xml");
- QTest::newRow("doc01.xml") << QString(SRCDIR "testdata/toString_01/doc01.xml");
- QTest::newRow("doc02.xml") << QString(SRCDIR "testdata/toString_01/doc02.xml");
- QTest::newRow("doc03.xml") << QString(SRCDIR "testdata/toString_01/doc03.xml");
- QTest::newRow("doc04.xml") << QString(SRCDIR "testdata/toString_01/doc04.xml");
- QTest::newRow("doc05.xml") << QString(SRCDIR "testdata/toString_01/doc05.xml");
-
- QTest::newRow("doc_euc-jp.xml") << QString(SRCDIR "testdata/toString_01/doc_euc-jp.xml");
- QTest::newRow("doc_iso-2022-jp.xml") << QString(SRCDIR "testdata/toString_01/doc_iso-2022-jp.xml");
- QTest::newRow("doc_little-endian.xml") << QString(SRCDIR "testdata/toString_01/doc_little-endian.xml");
- QTest::newRow("doc_utf-16.xml") << QString(SRCDIR "testdata/toString_01/doc_utf-16.xml");
- QTest::newRow("doc_utf-8.xml") << QString(SRCDIR "testdata/toString_01/doc_utf-8.xml");
+ const QString prefix = QFINDTESTDATA("testdata/toString_01");
+ if (prefix.isEmpty())
+ QFAIL("Cannot find testdata!");
+ QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml");
+ QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml");
+ QTest::newRow("doc02.xml") << QString(prefix + "/doc02.xml");
+ QTest::newRow("doc03.xml") << QString(prefix + "/doc03.xml");
+ QTest::newRow("doc04.xml") << QString(prefix + "/doc04.xml");
+ QTest::newRow("doc05.xml") << QString(prefix + "/doc05.xml");
+
+ QTest::newRow("doc_euc-jp.xml") << QString(prefix + "/doc_euc-jp.xml");
+ QTest::newRow("doc_iso-2022-jp.xml") << QString(prefix + "/doc_iso-2022-jp.xml");
+ QTest::newRow("doc_little-endian.xml") << QString(prefix + "/doc_little-endian.xml");
+ QTest::newRow("doc_utf-16.xml") << QString(prefix + "/doc_utf-16.xml");
+ QTest::newRow("doc_utf-8.xml") << QString(prefix + "/doc_utf-8.xml");
}
void tst_QDom::cloneNode_data()
@@ -1775,7 +1782,10 @@ void tst_QDom::doubleNamespaceDeclarations() const
{
QDomDocument doc;
- QFile file(SRCDIR "doubleNamespaces.xml" );
+ QString testFile = QFINDTESTDATA("doubleNamespaces.xml");
+ if (testFile.isEmpty())
+ QFAIL("Cannot find test file doubleNamespaces.xml!");
+ QFile file(testFile);
QVERIFY(file.open(QIODevice::ReadOnly));
QXmlSimpleReader reader;
diff --git a/tests/auto/xml/sax/qxml/qxml.pro b/tests/auto/xml/sax/qxml/qxml.pro
index 4f2e427d14..e0b48ad9f5 100644
--- a/tests/auto/xml/sax/qxml/qxml.pro
+++ b/tests/auto/xml/sax/qxml/qxml.pro
@@ -4,8 +4,4 @@ TARGET = tst_qxml
SOURCES += tst_qxml.cpp
QT = core xml testlib
-wince* {
- addFiles.files = 0x010D.xml
- addFiles.path = .
- DEPLOYMENT += addFiles
-}
+TESTDATA += 0x010D.xml
diff --git a/tests/auto/xml/sax/qxml/tst_qxml.cpp b/tests/auto/xml/sax/qxml/tst_qxml.cpp
index afe219c635..01a4d2c003 100644
--- a/tests/auto/xml/sax/qxml/tst_qxml.cpp
+++ b/tests/auto/xml/sax/qxml/tst_qxml.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -196,7 +196,10 @@ void tst_QXml::interpretedAs0D() const
QChar(0x010D) +
QLatin1String("reated-by=\"an attr value\"/>"));
- QFile f("0x010D.xml");
+ QString testFile = QFINDTESTDATA("0x010D.xml");
+ if (testFile.isEmpty())
+ QFAIL("Cannot find test file 0x010D.xml!");
+ QFile f(testFile);
QVERIFY(f.open(QIODevice::ReadOnly));
QXmlInputSource data(&f);
diff --git a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
index 5bc3a09fc5..f93d979169 100644
--- a/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
+++ b/tests/auto/xml/sax/qxmlinputsource/tst_qxmlinputsource.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh b/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
index b9895f8598..edcb07f034 100755
--- a/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
+++ b/tests/auto/xml/sax/qxmlsimplereader/generate_ref_files.sh
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is the build configuration utility of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
index 840f237875..44eacefc2d 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
index 0089951d30..06a23c8654 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
index e91ec53d5a..58a08e1403 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
+++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
index ae924ca35f..cec33ded18 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
+++ b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro
@@ -12,8 +12,4 @@ CONFIG += no_batch
QT += network xml testlib
QT -= gui
-wince* {
- addFiles.files = encodings parser xmldocs
- addFiles.path = .
- DEPLOYMENT += addFiles
-}
+TESTDATA += encodings/* xmldocs/*
diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
index 1478ae7e23..7088fa3ac8 100644
--- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
+++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -141,7 +141,7 @@ class tst_QXmlSimpleReader : public QObject
~tst_QXmlSimpleReader();
private slots:
-
+ void initTestCase();
void testGoodXmlFile();
void testGoodXmlFile_data();
void testBadXmlFile();
@@ -164,6 +164,7 @@ class tst_QXmlSimpleReader : public QObject
private:
static QDomDocument fromByteArray(const QString &title, const QByteArray &ba, bool *ok);
XmlServer *server;
+ QString prefix;
};
tst_QXmlSimpleReader::tst_QXmlSimpleReader()
@@ -210,6 +211,14 @@ public:
};
+void tst_QXmlSimpleReader::initTestCase()
+{
+ prefix = QFileInfo(QFINDTESTDATA("xmldocs")).absolutePath();
+ if (prefix.isEmpty())
+ QFAIL("Cannot find xmldocs testdata!");
+ QDir::setCurrent(prefix);
+}
+
void tst_QXmlSimpleReader::idsInParseException1()
{
MyErrorHandler handler;
diff --git a/tests/baselineserver/shared/baselineprotocol.cpp b/tests/baselineserver/shared/baselineprotocol.cpp
index e9adfae691..0a74ed6614 100644
--- a/tests/baselineserver/shared/baselineprotocol.cpp
+++ b/tests/baselineserver/shared/baselineprotocol.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/shared/baselineprotocol.h b/tests/baselineserver/shared/baselineprotocol.h
index cd40a1241b..e1037c836c 100644
--- a/tests/baselineserver/shared/baselineprotocol.h
+++ b/tests/baselineserver/shared/baselineprotocol.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/shared/lookup3.cpp b/tests/baselineserver/shared/lookup3.cpp
index 4db5b3c622..da66182fa8 100644
--- a/tests/baselineserver/shared/lookup3.cpp
+++ b/tests/baselineserver/shared/lookup3.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/shared/qbaselinetest.cpp b/tests/baselineserver/shared/qbaselinetest.cpp
index 6e2491054c..a7af0abf5d 100644
--- a/tests/baselineserver/shared/qbaselinetest.cpp
+++ b/tests/baselineserver/shared/qbaselinetest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/shared/qbaselinetest.h b/tests/baselineserver/shared/qbaselinetest.h
index 84d40477b1..2efb06f913 100644
--- a/tests/baselineserver/shared/qbaselinetest.h
+++ b/tests/baselineserver/shared/qbaselinetest.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/src/baselineserver.cpp b/tests/baselineserver/src/baselineserver.cpp
index 7adc335fb2..e3b6b4aa8f 100644
--- a/tests/baselineserver/src/baselineserver.cpp
+++ b/tests/baselineserver/src/baselineserver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/src/baselineserver.h b/tests/baselineserver/src/baselineserver.h
index a6065cc099..0a202421ce 100644
--- a/tests/baselineserver/src/baselineserver.h
+++ b/tests/baselineserver/src/baselineserver.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/src/main.cpp b/tests/baselineserver/src/main.cpp
index 685e853575..f3a19f7fa8 100644
--- a/tests/baselineserver/src/main.cpp
+++ b/tests/baselineserver/src/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/src/report.cpp b/tests/baselineserver/src/report.cpp
index a726149d6a..d013941756 100644
--- a/tests/baselineserver/src/report.cpp
+++ b/tests/baselineserver/src/report.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/baselineserver/src/report.h b/tests/baselineserver/src/report.h
index b4488f1489..f8a869b594 100644
--- a/tests/baselineserver/src/report.h
+++ b/tests/baselineserver/src/report.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
index 1499eccd50..f75848556c 100644
--- a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
+++ b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/corelib.pro b/tests/benchmarks/corelib/corelib.pro
index a2efe91a61..da5247cc42 100644
--- a/tests/benchmarks/corelib/corelib.pro
+++ b/tests/benchmarks/corelib/corelib.pro
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
io \
+ json \
kernel \
thread \
tools \
@@ -14,4 +15,4 @@ TRUSTED_BENCHMARKS += \
thread/qthreadstorage \
io/qdir/tree
-include(../trusted-benchmarks.pri) \ No newline at end of file
+include(../trusted-benchmarks.pri)
diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
index 8f11dc792e..2de98eff0b 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
+++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
index 9d7d60ebe0..e93182d73c 100644
--- a/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
+++ b/tests/benchmarks/corelib/io/qdir/tree/bench_qdir_tree.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index 4e4b9cbf0b..758f390ec3 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 584eb32021..7b22f50d3c 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
index bef8115287..1322c5d1c6 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Core)
class QFileSystemIteratorPrivate;
class //Q_CORE_EXPORT
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index d291e3f412..92edd43060 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 479737a353..58a843f663 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qiodevice/main.cpp b/tests/benchmarks/corelib/io/qiodevice/main.cpp
index e4244a71ef..a1a008b937 100644
--- a/tests/benchmarks/corelib/io/qiodevice/main.cpp
+++ b/tests/benchmarks/corelib/io/qiodevice/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
index c0f16068d7..0bbe223912 100644
--- a/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qtemporaryfile/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/io/qurl/main.cpp b/tests/benchmarks/corelib/io/qurl/main.cpp
index c92c841cc8..dc236e7120 100644
--- a/tests/benchmarks/corelib/io/qurl/main.cpp
+++ b/tests/benchmarks/corelib/io/qurl/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/json/json.pro b/tests/benchmarks/corelib/json/json.pro
new file mode 100644
index 0000000000..1694d61d94
--- /dev/null
+++ b/tests/benchmarks/corelib/json/json.pro
@@ -0,0 +1,5 @@
+TARGET = tst_bench_qtbinaryjson
+QT = core testlib
+CONFIG -= app_bundle
+
+SOURCES += tst_bench_qtbinaryjson.cpp
diff --git a/tests/benchmarks/corelib/json/numbers.json b/tests/benchmarks/corelib/json/numbers.json
new file mode 100644
index 0000000000..469156a78a
--- /dev/null
+++ b/tests/benchmarks/corelib/json/numbers.json
@@ -0,0 +1,19 @@
+[
+ {
+ "integer": 1234567890,
+ "real": -9876.543210,
+ "e": 0.123456789e-12,
+ "E": 1.234567890E+34,
+ "": 23456789012E66,
+ "zero": 0,
+ "one": 1
+ },
+ [
+ -1234567890,
+ -1234567890,
+ -1234567890,
+ 1234567890,
+ 1234567890,
+ 1234567890
+ ]
+]
diff --git a/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp b/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp
new file mode 100644
index 0000000000..8f3e2cc8c6
--- /dev/null
+++ b/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest>
+#include <qjsondocument.h>
+#include <qjsonobject.h>
+
+class BenchmarkQtBinaryJson: public QObject
+{
+ Q_OBJECT
+public:
+ BenchmarkQtBinaryJson(QObject *parent = 0);
+
+private Q_SLOTS:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void parseNumbers();
+ void parseJson();
+ void parseJsonToVariant();
+};
+
+BenchmarkQtBinaryJson::BenchmarkQtBinaryJson(QObject *parent) : QObject(parent)
+{
+
+}
+
+void BenchmarkQtBinaryJson::initTestCase()
+{
+
+}
+
+void BenchmarkQtBinaryJson::cleanupTestCase()
+{
+
+}
+
+void BenchmarkQtBinaryJson::init()
+{
+
+}
+
+void BenchmarkQtBinaryJson::cleanup()
+{
+
+}
+
+void BenchmarkQtBinaryJson::parseNumbers()
+{
+ QFile file(QLatin1String("numbers.json"));
+ file.open(QFile::ReadOnly);
+ QByteArray testJson = file.readAll();
+
+ QBENCHMARK {
+ QJsonDocument doc = QJsonDocument::fromJson(testJson);
+ QJsonObject object = doc.object();
+ }
+}
+
+void BenchmarkQtBinaryJson::parseJson()
+{
+ QFile file(QLatin1String("../../../auto/corelib/json/test.json"));
+ file.open(QFile::ReadOnly);
+ QByteArray testJson = file.readAll();
+
+ QBENCHMARK {
+ QJsonDocument doc = QJsonDocument::fromJson(testJson);
+ QJsonObject object = doc.object();
+ }
+}
+
+void BenchmarkQtBinaryJson::parseJsonToVariant()
+{
+ QFile file(QLatin1String("../../../auto/corelib/json/test.json"));
+ file.open(QFile::ReadOnly);
+ QByteArray testJson = file.readAll();
+
+ QBENCHMARK {
+ QJsonDocument doc = QJsonDocument::fromJson(testJson);
+ QVariant v = doc.toVariant();
+ }
+}
+
+QTEST_MAIN(BenchmarkQtBinaryJson)
+#include "tst_bench_qtbinaryjson.moc"
+
diff --git a/tests/benchmarks/corelib/kernel/events/main.cpp b/tests/benchmarks/corelib/kernel/events/main.cpp
index 09f37616be..24fc6ab2b1 100644
--- a/tests/benchmarks/corelib/kernel/events/main.cpp
+++ b/tests/benchmarks/corelib/kernel/events/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp b/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp
index e1e4e2cc9a..7e0dba2149 100644
--- a/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qcoreapplication/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Robin Burchell <robin+qt@viroteck.net>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
index 8b68f032ea..ab26158f9a 100644
--- a/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qmetaobject/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
index cee747316f..14895863e4 100644
--- a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -242,8 +242,6 @@ void tst_QMetaType::constructCoreType_data()
QTest::addColumn<int>("typeId");
for (int i = 0; i <= QMetaType::LastCoreType; ++i)
QTest::newRow(QMetaType::typeName(i)) << i;
- for (int i = QMetaType::FirstCoreExtType; i <= QMetaType::LastCoreExtType; ++i)
- QTest::newRow(QMetaType::typeName(i)) << i;
// GUI types are tested in tst_QGuiMetaType.
}
diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp
index 905b21fca0..a5a26c1b2a 100644
--- a/tests/benchmarks/corelib/kernel/qobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qobject/object.cpp b/tests/benchmarks/corelib/kernel/qobject/object.cpp
index 0b036d0139..cdaa6b3bd2 100644
--- a/tests/benchmarks/corelib/kernel/qobject/object.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/object.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qobject/object.h b/tests/benchmarks/corelib/kernel/qobject/object.h
index c3cd23d6be..f52c7cf854 100644
--- a/tests/benchmarks/corelib/kernel/qobject/object.h
+++ b/tests/benchmarks/corelib/kernel/qobject/object.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
index 151e78e5ce..6232831e1f 100644
--- a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
+++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/tst_qtimer_vs_qmetaobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
index 00e2684066..0c4af17376 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -307,8 +307,6 @@ void tst_qvariant::createCoreType_data()
QTest::addColumn<int>("typeId");
for (int i = 0; i <= QMetaType::LastCoreType; ++i)
QTest::newRow(QMetaType::typeName(i)) << i;
- for (int i = QMetaType::FirstCoreExtType; i <= QMetaType::LastCoreExtType; ++i)
- QTest::newRow(QMetaType::typeName(i)) << i;
}
// Tests how fast a Qt core type can be default-constructed by a
diff --git a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
index 9e33655d18..68b739cc13 100644
--- a/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
+++ b/tests/benchmarks/corelib/plugin/quuid/tst_quuid.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
index 9310a3dec8..12420e25a1 100644
--- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,26 +44,7 @@
#include <math.h>
-#ifdef Q_OS_SYMBIAN
-# include <e32std.h>
-typedef RMutex NativeMutexType;
-void NativeMutexInitialize(NativeMutexType *mutex)
-{
- mutex->CreateLocal();
-}
-void NativeMutexDestroy(NativeMutexType *mutex)
-{
- mutex->Close();
-}
-void NativeMutexLock(NativeMutexType *mutex)
-{
- mutex->Wait();
-}
-void NativeMutexUnlock(NativeMutexType *mutex)
-{
- mutex->Signal();
-}
-#elif defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX)
# include <pthread.h>
# include <errno.h>
typedef pthread_mutex_t NativeMutexType;
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index 6372b7a830..67946602ba 100644
--- a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index 729b14067e..00d74ef9e7 100644
--- a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
index 3e9dfe3568..7f2e7b68ca 100644
--- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index ae05a164a2..ee13a63a57 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/.gitignore b/tests/benchmarks/corelib/tools/qalgorithms/.gitignore
new file mode 100644
index 0000000000..379c13eb9b
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/.gitignore
@@ -0,0 +1 @@
+tst_qalgorithms
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
new file mode 100644
index 0000000000..00b63f9863
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
@@ -0,0 +1,3 @@
+TARGET = tst_qalgorithms
+QT = core testlib
+SOURCES = tst_qalgorithms.cpp
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp
new file mode 100644
index 0000000000..d36f8e101c
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Robin Burchell <robin+qt@viroteck.net>
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <iostream>
+#include <iomanip>
+#include <sstream>
+#include <algorithm>
+#include <qalgorithms.h>
+#include <QStringList>
+#include <QString>
+#include <QVector>
+
+using namespace std;
+
+class tst_QAlgorithms : public QObject
+{
+ Q_OBJECT
+private slots:
+ void stableSort_data();
+ void stableSort();
+
+ void sort_data();
+ void sort();
+};
+
+template <typename DataType>
+QVector<DataType> generateData(QString dataSetType, const int length)
+{
+ QVector<DataType> container;
+ if (dataSetType == "Random") {
+ for (int i = 0; i < length; ++i)
+ container.append(rand());
+ } else if (dataSetType == "Ascending") {
+ for (int i = 0; i < length; ++i)
+ container.append(i);
+ } else if (dataSetType == "Descending") {
+ for (int i = 0; i < length; ++i)
+ container.append(length - i);
+ } else if (dataSetType == "Equal") {
+ for (int i = 0; i < length; ++i)
+ container.append(43);
+ } else if (dataSetType == "Duplicates") {
+ for (int i = 0; i < length; ++i)
+ container.append(i % 10);
+ } else if (dataSetType == "Almost Sorted") {
+ for (int i = 0; i < length; ++i)
+ container.append(i);
+ for (int i = 0; i<= length / 10; ++i) {
+ const int iswap = i * 9;
+ DataType tmp = container.at(iswap);
+ container[iswap] = container.at(iswap + 1);
+ container[iswap + 1] = tmp;
+ }
+ }
+
+ return container;
+}
+
+Q_DECLARE_METATYPE(QVector<int>)
+
+void tst_QAlgorithms::stableSort_data()
+{
+ const int dataSize = 5000;
+ QTest::addColumn<QVector<int> >("unsorted");
+ QTest::newRow("Equal") << (generateData<int>("Equal", dataSize));
+ QTest::newRow("Ascending") << (generateData<int>("Ascending", dataSize));
+ QTest::newRow("Descending") << (generateData<int>("Descending", dataSize));
+ QTest::newRow("Duplicates") << (generateData<int>("Duplicates", dataSize));
+ QTest::newRow("Almost Sorted") << (generateData<int>("Almost Sorted", dataSize));
+}
+
+void tst_QAlgorithms::stableSort()
+{
+ QFETCH(QVector<int>, unsorted);
+
+ QBENCHMARK {
+ QVector<int> sorted = unsorted;
+ qStableSort(sorted.begin(), sorted.end());
+ }
+}
+
+void tst_QAlgorithms::sort_data()
+{
+ stableSort_data();
+}
+
+void tst_QAlgorithms::sort()
+{
+ QFETCH(QVector<int>, unsorted);
+
+ QBENCHMARK {
+ QVector<int> sorted = unsorted;
+ qSort(sorted.begin(), sorted.end());
+ }
+}
+
+
+QTEST_MAIN(tst_QAlgorithms)
+#include "tst_qalgorithms.moc"
+
diff --git a/tests/benchmarks/corelib/tools/qbytearray/main.cpp b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
index 61a7855884..72e07ad445 100644
--- a/tests/benchmarks/corelib/tools/qbytearray/main.cpp
+++ b/tests/benchmarks/corelib/tools/qbytearray/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qchar/main.cpp b/tests/benchmarks/corelib/tools/qchar/main.cpp
index 3abf7584bb..80456453c9 100644
--- a/tests/benchmarks/corelib/tools/qchar/main.cpp
+++ b/tests/benchmarks/corelib/tools/qchar/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
index b6b064e012..db0c9f39b2 100644
--- a/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
+++ b/tests/benchmarks/corelib/tools/qcontiguouscache/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp b/tests/benchmarks/corelib/tools/qhash/main.cpp
index 874a0c543a..6f3228d0eb 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash_string.cpp
+++ b/tests/benchmarks/corelib/tools/qhash/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,38 +34,12 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-/*
-
-////////////////////////////////////////////////////////////////////
-
-This benchmark serves as reality check on the idea that hashing the complete
-string is a good idea.
-
- Executive summary: It is not a good idea.
-
-////////////////////////////////////////////////////////////////////
-
-********* Start testing of tst_QHash *********
-Config: Using QTest library 5.0.0, Qt 5.0.0
-PASS : tst_QHash::initTestCase()
-RESULT : tst_QHash::qhash_qt4():
- 0.041 msecs per iteration (total: 85, iterations: 2048)
-PASS : tst_QHash::qhash_qt4()
-RESULT : tst_QHash::qhash_faster():
- 0.0122 msecs per iteration (total: 100, iterations: 8192)
-PASS : tst_QHash::qhash_faster()
-PASS : tst_QHash::cleanupTestCase()
-Totals: 4 passed, 0 failed, 0 skipped
-
-////////////////////////////////////////////////////////////////////
-
-*/
-
-#include "qhash_string.h"
+#include "main.h"
#include <QFile>
#include <QHash>
@@ -81,51 +54,75 @@ class tst_QHash : public QObject
Q_OBJECT
private slots:
+ void qhash_qt4_data() { data(); }
void qhash_qt4();
+ void qhash_faster_data() { data(); }
void qhash_faster();
+ void javaString_data() { data(); }
+ void javaString();
private:
- QString data();
+ void data();
};
-const int N = 1000000;
-extern double s;
-
///////////////////// QHash /////////////////////
-QString tst_QHash::data()
+void tst_QHash::data()
{
- QFile file("data.txt");
- file.open(QIODevice::ReadOnly);
- return QString::fromLatin1(file.readAll());
+ QFile smallPathsData("paths_small_data.txt");
+ smallPathsData.open(QIODevice::ReadOnly);
+
+ QTest::addColumn<QStringList>("items");
+ QTest::newRow("paths-small")
+ << QString::fromLatin1(smallPathsData.readAll()).split(QLatin1Char('\n'));
}
void tst_QHash::qhash_qt4()
{
- QStringList items = data().split(QLatin1Char('\n'));
+ QFETCH(QStringList, items);
+ QStringList realitems = items; // for copy/paste ease between benchmarks
QHash<QString, int> hash;
-
+
QBENCHMARK {
- for (int i = 0, n = items.size(); i != n; ++i) {
- hash[items.at(i)] = i;
+ for (int i = 0, n = realitems.size(); i != n; ++i) {
+ hash[realitems.at(i)] = i;
}
}
}
void tst_QHash::qhash_faster()
{
- QList<String> items;
- foreach (const QString &s, data().split(QLatin1Char('\n')))
- items.append(s);
+ QFETCH(QStringList, items);
QHash<String, int> hash;
-
+
+ QList<String> realitems;
+ foreach (const QString &s, items)
+ realitems.append(s);
+
QBENCHMARK {
- for (int i = 0, n = items.size(); i != n; ++i) {
- hash[items.at(i)] = i;
+ for (int i = 0, n = realitems.size(); i != n; ++i) {
+ hash[realitems.at(i)] = i;
}
}
}
+void tst_QHash::javaString()
+{
+ QFETCH(QStringList, items);
+ QHash<JavaString, int> hash;
+
+ QList<JavaString> realitems;
+ foreach (const QString &s, items)
+ realitems.append(s);
+
+ QBENCHMARK {
+ for (int i = 0, n = realitems.size(); i != n; ++i) {
+ hash[realitems.at(i)] = i;
+ }
+ }
+}
+
+
QTEST_MAIN(tst_QHash)
-#include "qhash_string.moc"
+#include "main.moc"
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash_string.h b/tests/benchmarks/corelib/tools/qhash/main.h
index 94f142914b..c4cf94e190 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash_string.h
+++ b/tests/benchmarks/corelib/tools/qhash/main.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,3 +50,15 @@ struct String : QString
QT_BEGIN_NAMESPACE
uint qHash(const String &);
QT_END_NAMESPACE
+
+
+struct JavaString : QString
+{
+ JavaString() {}
+ JavaString(const QString &s) : QString(s) {}
+};
+
+QT_BEGIN_NAMESPACE
+uint qHash(const JavaString &);
+QT_END_NAMESPACE
+
diff --git a/tests/benchmarks/corelib/tools/qhash/outofline.cpp b/tests/benchmarks/corelib/tools/qhash/outofline.cpp
index 11a5f9e733..162c604a35 100644
--- a/tests/benchmarks/corelib/tools/qhash/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qhash/outofline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,11 +34,12 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qhash_string.h"
+#include "main.h"
static void doHash(const unsigned short *p, uint &h)
{
@@ -87,4 +87,28 @@ uint qHash(const String &str)
return h;
}
+// The Java's hashing algorithm for strings is a variation of D. J. Bernstein
+// hashing algorithm appeared here http://cr.yp.to/cdb/cdb.txt
+// and informally known as DJB33XX - DJB's 33 Times Xor.
+// Java uses DJB31XA, that is, 31 Times Add.
+// The original algorithm was a loop around "(h << 5) + h ^ c",
+// which is indeed "h * 33 ^ c"; it was then changed to
+// "(h << 5) - h ^ c", so "h * 31 ^ c", and the XOR changed to a sum:
+// "(h << 5) - h + c", which can save some assembly instructions.
+// Still, we can avoid writing the multiplication as "(h << 5) - h"
+// -- the compiler will turn it into a shift and an addition anyway
+// (for instance, gcc 4.4 does that even at -O0).
+uint qHash(const JavaString &str)
+{
+ const unsigned short *p = (unsigned short *)str.constData();
+ const int len = str.size();
+
+ uint h = 0;
+
+ for (int i = 0; i < len; ++i)
+ h = 31 * h + p[i];
+
+ return h;
+}
+
QT_END_NAMESPACE
diff --git a/tests/benchmarks/corelib/tools/qhash/data.txt b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt
index d5acd28820..d5acd28820 100644
--- a/tests/benchmarks/corelib/tools/qhash/data.txt
+++ b/tests/benchmarks/corelib/tools/qhash/paths_small_data.txt
diff --git a/tests/benchmarks/corelib/tools/qhash/qhash.pro b/tests/benchmarks/corelib/tools/qhash/qhash.pro
index 51d3e7f253..40f661c116 100644
--- a/tests/benchmarks/corelib/tools/qhash/qhash.pro
+++ b/tests/benchmarks/corelib/tools/qhash/qhash.pro
@@ -1,5 +1,5 @@
TARGET = tst_hash
QT = core testlib
INCLUDEPATH += .
-SOURCES += qhash_string.cpp outofline.cpp
+SOURCES += main.cpp outofline.cpp
CONFIG += release
diff --git a/tests/benchmarks/corelib/tools/qlist/main.cpp b/tests/benchmarks/corelib/tools/qlist/main.cpp
index d3380b188c..b5fcfea3e6 100644
--- a/tests/benchmarks/corelib/tools/qlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qlist/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qrect/main.cpp b/tests/benchmarks/corelib/tools/qrect/main.cpp
index 59174e4f08..ba81c7bb92 100644
--- a/tests/benchmarks/corelib/tools/qrect/main.cpp
+++ b/tests/benchmarks/corelib/tools/qrect/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp
index 32e8e72577..d26731edba 100644
--- a/tests/benchmarks/corelib/tools/qregexp/main.cpp
+++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstring/data.h b/tests/benchmarks/corelib/tools/qstring/data.h
index 925ce3663a..bf39284cb4 100644
--- a/tests/benchmarks/corelib/tools/qstring/data.h
+++ b/tests/benchmarks/corelib/tools/qstring/data.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist.pl b/tests/benchmarks/corelib/tools/qstring/generatelist.pl
index 1f10b638b2..0cb67fc737 100644
--- a/tests/benchmarks/corelib/tools/qstring/generatelist.pl
+++ b/tests/benchmarks/corelib/tools/qstring/generatelist.pl
@@ -1,7 +1,6 @@
#!/usr/bin/perl
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the QtCore module of the Qt Toolkit.
##
@@ -34,6 +33,7 @@
##
##
##
+##
## $QT_END_LICENSE$
#
# Parses a file (passed as argument) that contains a dump of pairs of
diff --git a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
index ad6595ab5c..9d980f9ed4 100644
--- a/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
+++ b/tests/benchmarks/corelib/tools/qstring/generatelist_char.pl
@@ -1,8 +1,7 @@
#!/usr/bin/perl
# -*- mode: utf-8; tabs: nil -*-
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the QtCore module of the Qt Toolkit.
##
@@ -35,6 +34,7 @@
##
##
##
+##
## $QT_END_LICENSE$
#
# Parses a file (passed as argument) that contains a dump of pairs of
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index ab23fa5f9b..9d5c43c290 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
index b1ec5dace8..cd82ca746f 100644
--- a/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringbuilder/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index 696f0fc6da..48bf7f1fc5 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp
index 38c1f4ac46..ee50935832 100644
--- a/tests/benchmarks/corelib/tools/qvector/main.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
index a30a7e786a..bf929780a5 100644
--- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp
+++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtTest module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
index 3bd75164d5..159dfbf8dc 100644
--- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h
+++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Core)
diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro
index d5bf8301f9..ea9059e759 100644
--- a/tests/benchmarks/corelib/tools/tools.pro
+++ b/tests/benchmarks/corelib/tools/tools.pro
@@ -10,6 +10,7 @@ SUBDIRS = \
qstring \
qstringbuilder \
qstringlist \
- qvector
+ qvector \
+ qalgorithms
!*g++*: SUBDIRS -= qstring
diff --git a/tests/benchmarks/dbus/qdbusperformance/server/server.cpp b/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
index d3c6f1f5ac..765852cfca 100644
--- a/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
+++ b/tests/benchmarks/dbus/qdbusperformance/server/server.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/dbus/qdbusperformance/serverobject.h b/tests/benchmarks/dbus/qdbusperformance/serverobject.h
index dd4d9f4735..bc173aa762 100644
--- a/tests/benchmarks/dbus/qdbusperformance/serverobject.h
+++ b/tests/benchmarks/dbus/qdbusperformance/serverobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp b/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp
index 116268835a..bd7f09d660 100644
--- a/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp
+++ b/tests/benchmarks/dbus/qdbusperformance/tst_qdbusperformance.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/dbus/qdbustype/main.cpp b/tests/benchmarks/dbus/qdbustype/main.cpp
index 476bdc81c7..0e0ce358bb 100644
--- a/tests/benchmarks/dbus/qdbustype/main.cpp
+++ b/tests/benchmarks/dbus/qdbustype/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
index f7d085f759..5313e85a8a 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
index caccebffc2..471fe97632 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyanimation.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
index c0c163214b..299701faaa 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/dummyobject.h b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
index 0da4aa60e1..85803efe60 100644
--- a/tests/benchmarks/gui/animation/qanimation/dummyobject.h
+++ b/tests/benchmarks/gui/animation/qanimation/dummyobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/main.cpp b/tests/benchmarks/gui/animation/qanimation/main.cpp
index 2ca58bd66b..51a861f828 100644
--- a/tests/benchmarks/gui/animation/qanimation/main.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
index aa64b19ca0..00d288352b 100644
--- a/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/animation/qanimation/rectanimation.h b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
index d8b20d5e6e..ee420ce828 100644
--- a/tests/benchmarks/gui/animation/qanimation/rectanimation.h
+++ b/tests/benchmarks/gui/animation/qanimation/rectanimation.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
index 8565e1bff1..a7e8256fa1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
index 864d2889c2..d632c693d8 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h
index f12bf84cbc..17e4444afb 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemcontainer.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
index 82e7954145..af1d2aa8ea 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h
index 97c2bd88e4..83bbd40f44 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractitemview.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
index b88ccb53f7..c27d15582a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
index 97269badf1..9c3282dc6a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractscrollarea.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
index 993a533b38..ab55460428 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h
index c1628845f5..0efe59b95c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/abstractviewitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
index ec3f4c0093..9cffd3e12c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
index c9b154313a..ddb98e431a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/backgrounditem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
index 34737266b3..a5c9f257b8 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
index cb4b1853c1..367359f8e7 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/button.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
index 622cb22d5a..86c5ce2850 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
index cbfc63937b..508fb45479 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/commandline.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
index 60bebefcf2..48ee70a719 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
index 75e75235bc..76951267f1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/dummydatagen.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
index cfa8ff63a8..9f2ef25ed3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
index d26641a4c3..a956e7bcf4 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/gvbwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
index 53a745ba6a..0bb3be9ef5 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
index 818b480849..f240a56cbe 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/iconitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
index 6f3417e7c8..06008fd84b 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
index 87ce134267..e99aea9f07 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglist.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp
index 96c1e8cb47..9ccbd13910 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h
index 119633b557..652b6f7f8c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/itemrecyclinglistview.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
index 8f6a42dbca..9ecf2cee19 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
index d203085cf7..802442ac88 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/label.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
index baeafaf6f3..1e3ba60192 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h
index 9bd6157710..20563a3548 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
index b94097b21c..484eca2329 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
index cee8f67870..4668084d0f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcache.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
index c7a088a730..becc3c4a9c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h
index 6e9aab4417..9af8343bbc 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listitemcontainer.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
index aead236e84..b365d35b5e 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h
index cd0a7a5228..b950fabb16 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listmodel.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
index 9d6bcc98d1..45b49b6517 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h
index 0e6593d6f3..f16eaf83cb 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/listwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
index d8f3445d36..87abc0aa0f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
index 17a3505b8e..2c7bd333a5 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/mainview.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
index 7757bcc616..a277508b94 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
index ea95a079cd..92510658f9 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/menu.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
index 9ee649438f..2b8dd0862a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h
index a70eb19303..d17f5bb887 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/recycledlistitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
index 04ab2fe229..a2fc445049 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/resourcemoninterface.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
index 54236325d1..57aae1c156 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
index 7d05f858f3..d9d1f1afe3 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scrollbar.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
index c45a880a8e..3ab387ee8f 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h
index fb7162265d..3640f160bc 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h
index bfb83757b0..9ab027f205 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/scroller_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp
index ba153180e6..d40b8bb3c1 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
index 0635231cb5..9000353010 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/settings.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
index be8c9d22ea..f634f98dab 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
index 9a84407aed..6bf857e32c 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelist.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
index 1dba139fd2..7f8576cb1a 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
index 5c7367991a..53b8d76f0d 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/simplelistview.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp
index 76fd265986..25ba0d5ec0 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h
index 1b9e6e047c..2b9c5080bc 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/theme.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
index 4cdd7f0123..1ebdf2e0bb 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
index 86e2f1b0e8..c98f90da55 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/themeevent.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
index 09ff5d1394..d3840ba1bc 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
index c9ab96fbe8..a24b2291f0 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/topbar.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
index cfff4903fd..4d790088cd 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h
index 9fad826363..a109bf4513 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
index 1a3a1613c1..c5a1c849f0 100644
--- a/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
+++ b/tests/benchmarks/gui/graphicsview/functional/GraphicsViewBenchmark/widgets/webview_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 5f826a0141..b1aab58a7f 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index f0cdbe29c5..2304147e80 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
index 83ab96e5c3..eb24a2ccce 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index b52336dcd6..b590fbd5f3 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index e713ecf03f..3881737a2f 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
index f82b66f4fa..00d2b01908 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
index 49fccb42e5..b13f4a11e1 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
index 04aaa8b54b..ed8b487657 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
index f755976d55..f69d76473a 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
index 7042cb5bb3..8134d69204 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/mainwindow.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
index 7ea4ffbe00..f35a3ffbb9 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
index 9e22a98c32..26f6555b67 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/view.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
index d02b034834..00f4e6855e 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/moveItems/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
index 0b2e87fcaf..efb7f3fce3 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/scrolltest/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
index 71e69fed9f..a585d7e38b 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
index 3ef2ef546f..ef3550e8d7 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
index f106cbe4e3..cae21fcfac 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
index debb78ffbf..bac2d46bc8 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index dd1d7a3934..cc549f835d 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 08e7c88a76..f9e0cb6399 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/image/blendbench/main.cpp b/tests/benchmarks/gui/image/blendbench/main.cpp
index 24cfba9012..82d7d4bd62 100644
--- a/tests/benchmarks/gui/image/blendbench/main.cpp
+++ b/tests/benchmarks/gui/image/blendbench/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
index 7b3ba93737..904ffa13d0 100644
--- a/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
+++ b/tests/benchmarks/gui/image/qimageconversion/qimageconversion.pro
@@ -5,5 +5,3 @@ SOURCES += tst_qimageconversion.cpp
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
-!contains(QT_CONFIG, no-mng):DEFINES += QTEST_HAVE_MNG
-!contains(QT_CONFIG, no-tiff):DEFINES += QTEST_HAVE_TIFF
diff --git a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
index 7be221a5ec..b9bd786e2b 100644
--- a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
+++ b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/image/qimagereader/images/ball.mng b/tests/benchmarks/gui/image/qimagereader/images/ball.mng
deleted file mode 100644
index 81544780fd..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/ball.mng
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif b/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif
deleted file mode 100644
index d63c688b27..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/corrupt-data.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng b/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng
deleted file mode 100644
index 17fd43a5ca..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/corrupt.mng
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/fire.mng b/tests/benchmarks/gui/image/qimagereader/images/fire.mng
deleted file mode 100644
index c6695c8369..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/fire.mng
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif
deleted file mode 100644
index 78868b0d48..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/rgba_adobedeflate_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif
deleted file mode 100644
index 107eab74e7..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/rgba_lzw_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif
deleted file mode 100644
index c314bae4c0..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_bigendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif
deleted file mode 100644
index 4f820f6649..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/rgba_nocompression_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif
deleted file mode 100644
index ddeec38fbc..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/rgba_packbits_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif b/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif
deleted file mode 100644
index 50a3024246..0000000000
--- a/tests/benchmarks/gui/image/qimagereader/images/rgba_zipdeflate_littleendian.tif
+++ /dev/null
Binary files differ
diff --git a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
index 311ffad009..cc2c8e0701 100644
--- a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
+++ b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
@@ -7,8 +7,6 @@ SOURCES += tst_qimagereader.cpp
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
-!contains(QT_CONFIG, no-mng):DEFINES += QTEST_HAVE_MNG
-!contains(QT_CONFIG, no-tiff):DEFINES += QTEST_HAVE_TIFF
QT += network
wince*: {
diff --git a/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp b/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
index 363e7df5ac..ca81b1f079 100644
--- a/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/benchmarks/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -117,10 +117,6 @@ tst_QImageReader::tst_QImageReader()
images << QPair<QString, QByteArray>(QLatin1String("earth.gif"), QByteArray("gif"));
images << QPair<QString, QByteArray>(QLatin1String("trolltech.gif"), QByteArray("gif"));
#endif
-#if defined QTEST_HAVE_MNG
- images << QPair<QString, QByteArray>(QLatin1String("ball.mng"), QByteArray("mng"));
- images << QPair<QString, QByteArray>(QLatin1String("fire.mng"), QByteArray("mng"));
-#endif
}
tst_QImageReader::~tst_QImageReader()
diff --git a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
index 110bcbbca4..41afffe556 100644
--- a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
index fa169cb0b1..3658579d00 100644
--- a/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/benchmarks/gui/image/qpixmapcache/tst_qpixmapcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/itemviews/itemviews.pro b/tests/benchmarks/gui/itemviews/itemviews.pro
index be0ee558dc..a23cdf7b97 100644
--- a/tests/benchmarks/gui/itemviews/itemviews.pro
+++ b/tests/benchmarks/gui/itemviews/itemviews.pro
@@ -1,3 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = \
- qtableview
+ qtableview \
+ qheaderview
diff --git a/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro b/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
new file mode 100644
index 0000000000..12cb5d5f03
--- /dev/null
+++ b/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
@@ -0,0 +1,7 @@
+QT += widgets testlib
+
+TEMPLATE = app
+TARGET = bench_qheaderview
+
+SOURCES += qheaderviewbench.cpp
+
diff --git a/tests/benchmarks/gui/itemviews/qheaderview/qheaderviewbench.cpp b/tests/benchmarks/gui/itemviews/qheaderview/qheaderviewbench.cpp
new file mode 100644
index 0000000000..ec3f076d67
--- /dev/null
+++ b/tests/benchmarks/gui/itemviews/qheaderview/qheaderviewbench.cpp
@@ -0,0 +1,264 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Thorbjørn Lund Martsum - tmartsum[at]gmail.com
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtWidgets/QtWidgets>
+
+class BenchQHeaderView : public QObject
+{
+ Q_OBJECT
+public:
+ BenchQHeaderView() : QObject() {m_tv = 0; m_hv = 0; m_model = 0;}
+
+protected:
+ QTableView *m_tv;
+ QHeaderView *m_hv;
+ QStandardItemModel *m_model;
+ QStandardItemModel m_normalmodel;
+ QElapsedTimer t;
+ bool m_worst_case;
+ void setupTestData();
+
+ bool m_blockSomeSignals;
+ bool m_updatesEnabled;
+ int m_rowcount;
+ int m_colcount;
+
+
+private slots:
+ void init();
+ void cleanupTestCase();
+ void initTestCase();
+ void cleanup();
+ void visualIndexAtSpecial_data() {setupTestData();}
+ void visualIndexAt_data() {setupTestData();}
+ void hideShowBench_data() {setupTestData();}
+ void swapSectionsBench_data() {setupTestData();}
+ void moveSectionBench_data() {setupTestData();}
+ void defaultSizeBench_data() {setupTestData();}
+ void removeBench_data() {setupTestData();}
+ void insertBench_data() {setupTestData();}
+ void truncBench_data() {setupTestData();}
+
+ void visualIndexAtSpecial();
+ void visualIndexAt();
+ void hideShowBench();
+ void swapSectionsBench();
+ void moveSectionBench();
+ void defaultSizeBench();
+ void removeBench();
+ void insertBench();
+ void truncBench();
+};
+
+void BenchQHeaderView::setupTestData()
+{
+ QTest::addColumn<bool>("worst_case");
+ QTest::newRow("Less relevant best case") << false;
+ QTest::newRow("__* More important worst case *__") << true;
+}
+
+void BenchQHeaderView::initTestCase()
+{
+ m_tv = new QTableView();
+ m_hv = m_tv->verticalHeader();
+ m_model = &m_normalmodel;
+ m_tv->setModel(m_model);
+ m_tv->show();
+}
+
+void BenchQHeaderView::cleanupTestCase()
+{
+ delete m_tv;
+ m_tv = 0;
+ m_hv = 0;
+}
+
+void BenchQHeaderView::init()
+{
+ QFETCH(bool, worst_case);
+
+ m_blockSomeSignals = true;
+ m_updatesEnabled = false;
+ m_rowcount = 2500;
+ m_colcount = 10;
+
+ m_worst_case = worst_case;
+ m_model->clear();
+ if (worst_case) {
+ for (int u = 0; u <= m_rowcount; ++u) // ensures fragment in Qt 4.x
+ m_model->setRowCount(u);
+ m_model->setColumnCount(m_colcount);
+ m_hv->swapSections(0, m_rowcount - 1);
+ m_hv->hideSection(m_rowcount / 2);
+ } else {
+ m_model->setColumnCount(m_colcount);
+ m_model->setRowCount(m_rowcount);
+ }
+
+ QString s;
+ for (int i = 0; i < m_model->rowCount(); ++i) {
+ m_model->setData(m_model->index(i, 0), QVariant(i));
+ s.setNum(i);
+ s += ".";
+ s += 'a' + (i % 25);
+ m_model->setData(m_model->index(i, 1), QVariant(s));
+ }
+ m_tv->setUpdatesEnabled(m_updatesEnabled);
+ m_hv->blockSignals(m_blockSomeSignals);
+
+ const int default_section_size = 25;
+ m_hv->setDefaultSectionSize(default_section_size);
+}
+
+void BenchQHeaderView::cleanup()
+{
+ m_tv->setUpdatesEnabled(true);
+ m_hv->blockSignals(false);
+}
+
+void BenchQHeaderView::visualIndexAtSpecial()
+{
+ int lookup_pos = m_hv->length() - 50;
+ int testnum = 0;
+
+ QBENCHMARK {
+ ++testnum;
+ m_hv->resizeSection(0, testnum % 47);
+ m_hv->visualIndexAt(lookup_pos);
+ }
+}
+
+void BenchQHeaderView::visualIndexAt()
+{
+ const int center_pos = m_hv->length() / 2;
+ const int maxpos = m_hv->length() - 1;
+
+ QBENCHMARK {
+ m_hv->visualIndexAt(0);
+ m_hv->visualIndexAt(center_pos);
+ m_hv->visualIndexAt(maxpos);
+ }
+}
+
+void BenchQHeaderView::hideShowBench()
+{
+ int n = 0;
+ bool hide_set = true;
+
+ QBENCHMARK {
+ m_hv->setSectionHidden(n, hide_set);
+ if (n >= m_hv->count()) {
+ n = -1;
+ hide_set = !hide_set;
+ }
+ ++n;
+ }
+}
+
+void BenchQHeaderView::swapSectionsBench()
+{
+ int n = 0;
+ QBENCHMARK {
+ m_hv->swapSections(n, n + 1);
+ if (++n >= m_hv->count())
+ n = 0;
+ }
+}
+
+void BenchQHeaderView::moveSectionBench()
+{
+ QBENCHMARK {
+ m_hv->moveSection(0, m_hv->count() - 2);
+ }
+}
+
+void BenchQHeaderView::defaultSizeBench()
+{
+ int n = 1;
+ QBENCHMARK {
+ m_hv->setDefaultSectionSize(n);
+ ++n;
+ }
+}
+
+void BenchQHeaderView::removeBench()
+{
+ QBENCHMARK {
+ m_model->removeRows(0, 1);
+ if (m_hv->count() == 0) { // setup a new hard model
+ m_model->setRowCount(m_rowcount);
+ if (m_worst_case) {
+ m_hv->swapSections(0, m_rowcount - 1);
+ m_hv->hideSection(m_rowcount / 2);
+ }
+ }
+ }
+}
+
+void BenchQHeaderView::insertBench()
+{
+ QBENCHMARK {
+ m_model->insertRows(1, 1);
+ if (m_hv->count() == 10000000) { // setup a new hard model
+ m_model->setRowCount(m_rowcount);
+ if (m_worst_case) {
+ m_hv->swapSections(0, m_rowcount - 1);
+ m_hv->hideSection(m_rowcount / 2);
+ }
+ }
+ }
+}
+
+void BenchQHeaderView::truncBench()
+{
+ QBENCHMARK {
+ m_model->setRowCount(1);
+ m_model->setRowCount(m_rowcount);
+ if (m_worst_case) {
+ m_hv->swapSections(0, m_rowcount - 1);
+ m_hv->hideSection(m_rowcount / 2);
+ }
+ }
+}
+
+QTEST_MAIN(BenchQHeaderView)
+#include "qheaderviewbench.moc"
diff --git a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
index 1b8d1f2327..2956d3773d 100644
--- a/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/benchmarks/gui/itemviews/qtableview/tst_qtableview.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/kernel/qapplication/main.cpp b/tests/benchmarks/gui/kernel/qapplication/main.cpp
index 6df3c5ac23..1960bdc41f 100644
--- a/tests/benchmarks/gui/kernel/qapplication/main.cpp
+++ b/tests/benchmarks/gui/kernel/qapplication/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 2d5164eda9..398bfb0e35 100644
--- a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
index 64e481ab7d..029c4300c0 100644
--- a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
index 8bd0cb8a03..7f65cdbd80 100644
--- a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
index 6173870c10..9d12d1b055 100644
--- a/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
+++ b/tests/benchmarks/gui/math3d/qmatrix4x4/tst_qmatrix4x4.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
index b691b99455..6ab473e1b4 100644
--- a/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
+++ b/tests/benchmarks/gui/math3d/qquaternion/tst_qquaternion.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index c659fa5af1..e5f09b9c04 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/painting/qregion/main.cpp b/tests/benchmarks/gui/painting/qregion/main.cpp
index 2a92387aa9..f444a4c6ad 100644
--- a/tests/benchmarks/gui/painting/qregion/main.cpp
+++ b/tests/benchmarks/gui/painting/qregion/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
index 53cac3d7b6..e751c89bbf 100644
--- a/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
+++ b/tests/benchmarks/gui/painting/qtbench/benchmarktests.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
index c58e53f267..519e77bf1d 100644
--- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
+++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp b/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
index 3d29482970..72e2248850 100644
--- a/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
+++ b/tests/benchmarks/gui/painting/qtracebench/tst_qtracebench.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
index 1ad44cca7a..4eea3ad5cb 100644
--- a/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
+++ b/tests/benchmarks/gui/painting/qtransform/tst_qtransform.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
index 3f10459615..fcddf5ed90 100644
--- a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
+++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/text/qfontmetrics/main.cpp b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
index ab1d2944a0..2d42f0d068 100644
--- a/tests/benchmarks/gui/text/qfontmetrics/main.cpp
+++ b/tests/benchmarks/gui/text/qfontmetrics/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index 753021419d..d4acfce821 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,7 +44,6 @@
#include <QTextDocumentWriter>
#include <QTextLayout>
#include <QTextCursor>
-#include <private/qtextcontrol_p.h>
#include <qmath.h>
#include <QFile>
#include <QPainter>
@@ -73,7 +72,6 @@ private slots:
void odfWriting_text();
void odfWriting_images();
- void constructControl();
void constructDocument();
void newLineReplacement();
@@ -90,10 +88,6 @@ private slots:
void paintDocToPixmap();
void paintDocToPixmap_painterFill();
- void control();
- void paintControlToPixmap();
- void paintControlToPixmap_painterFill();
-
private:
QSize setupTextLayout(QTextLayout *layout, bool wrap = true, int wrapWidth = 100);
@@ -255,17 +249,6 @@ QSize tst_QText::setupTextLayout(QTextLayout *layout, bool wrap, int wrapWidth)
return QSize(qCeil(widthUsed), height);
}
-void tst_QText::constructControl()
-{
- QTextControl *control = new QTextControl;
- delete control;
-
- QBENCHMARK {
- QTextControl *control = new QTextControl;
- delete control;
- }
-}
-
void tst_QText::constructDocument()
{
QTextDocument *doc = new QTextDocument;
@@ -441,52 +424,6 @@ void tst_QText::paintDocToPixmap_painterFill()
}
}
-void tst_QText::control()
-{
- QTextControl *control = new QTextControl(m_shortLorem);
- Q_UNUSED(control);
-
- QBENCHMARK {
- QTextControl *control = new QTextControl;
- QTextDocument *doc = control->document();
- doc->setHtml(m_shortLorem);
- }
-}
-
-void tst_QText::paintControlToPixmap()
-{
- QTextControl *control = new QTextControl;
- QTextDocument *doc = control->document();
- doc->setHtml(m_shortLorem);
- doc->setTextWidth(300);
- QSize size = doc->size().toSize();
-
- QBENCHMARK {
- QPixmap img(size);
- img.fill(Qt::transparent);
- QPainter p(&img);
- control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size)));
- }
-}
-
-void tst_QText::paintControlToPixmap_painterFill()
-{
- QTextControl *control = new QTextControl;
- QTextDocument *doc = control->document();
- doc->setHtml(m_shortLorem);
- doc->setTextWidth(300);
- QSize size = doc->size().toSize();
-
- QBENCHMARK {
- QPixmap img(size);
- QPainter p(&img);
- p.setCompositionMode(QPainter::CompositionMode_Source);
- p.fillRect(0, 0, img.width(), img.height(), Qt::transparent);
- p.setCompositionMode(QPainter::CompositionMode_SourceOver);
- control->drawContents(&p, QRectF(QPointF(0, 0), QSizeF(size)));
- }
-}
-
QTEST_MAIN(tst_QText)
#include "main.moc"
diff --git a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
index 96b959ed70..7e15e6e87a 100644
--- a/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
+++ b/tests/benchmarks/network/access/qfile_vs_qnetworkaccessmanager/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index a6b5082f39..d1077934ac 100644
--- a/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/benchmarks/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 81f9c1a3e8..e48172da89 100644
--- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/network/kernel/qhostinfo/main.cpp b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
index bcab4e3894..23b45f27e9 100644
--- a/tests/benchmarks/network/kernel/qhostinfo/main.cpp
+++ b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
index 7157a6c690..ea923a7fd0 100644
--- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 3210a109c4..124999d125 100644
--- a/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/benchmarks/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/opengl/main.cpp b/tests/benchmarks/opengl/main.cpp
index 9be7f17146..b92027ed7b 100644
--- a/tests/benchmarks/opengl/main.cpp
+++ b/tests/benchmarks/opengl/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
index d8b8fbc865..a3644efd53 100644
--- a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
+++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp
index b3ed0fa058..9ed78cbeea 100644
--- a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp
+++ b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index fd75c30438..190be6f6b4 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h
index 045d310f4a..7ab0177128 100644
--- a/tests/manual/bearerex/bearerex.h
+++ b/tests/manual/bearerex/bearerex.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/datatransferer.cpp b/tests/manual/bearerex/datatransferer.cpp
index 5184bccde9..1380607632 100644
--- a/tests/manual/bearerex/datatransferer.cpp
+++ b/tests/manual/bearerex/datatransferer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/datatransferer.h b/tests/manual/bearerex/datatransferer.h
index ddbd89be2a..e657b20b38 100644
--- a/tests/manual/bearerex/datatransferer.h
+++ b/tests/manual/bearerex/datatransferer.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/main.cpp b/tests/manual/bearerex/main.cpp
index e9bf03395f..f5eb612e3d 100644
--- a/tests/manual/bearerex/main.cpp
+++ b/tests/manual/bearerex/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/xqlistwidget.cpp b/tests/manual/bearerex/xqlistwidget.cpp
index b236c41bc6..637f27cfdb 100644
--- a/tests/manual/bearerex/xqlistwidget.cpp
+++ b/tests/manual/bearerex/xqlistwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/bearerex/xqlistwidget.h b/tests/manual/bearerex/xqlistwidget.h
index 1715bec3ec..118943c9b1 100644
--- a/tests/manual/bearerex/xqlistwidget.h
+++ b/tests/manual/bearerex/xqlistwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/fail4/myobject.cpp b/tests/manual/cmake/fail4/myobject.cpp
index 251239cde0..292a76e569 100644
--- a/tests/manual/cmake/fail4/myobject.cpp
+++ b/tests/manual/cmake/fail4/myobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/fail4/myobject.h b/tests/manual/cmake/fail4/myobject.h
index e2e908d32c..cd8765d03f 100644
--- a/tests/manual/cmake/fail4/myobject.h
+++ b/tests/manual/cmake/fail4/myobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/fail5/myobject.cpp b/tests/manual/cmake/fail5/myobject.cpp
index 251239cde0..292a76e569 100644
--- a/tests/manual/cmake/fail5/myobject.cpp
+++ b/tests/manual/cmake/fail5/myobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/fail5/myobject.h b/tests/manual/cmake/fail5/myobject.h
index e2e908d32c..cd8765d03f 100644
--- a/tests/manual/cmake/fail5/myobject.h
+++ b/tests/manual/cmake/fail5/myobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass(needsquoting)6/mywidget.cpp b/tests/manual/cmake/pass(needsquoting)6/mywidget.cpp
index 75804f9b3c..d1b2669980 100644
--- a/tests/manual/cmake/pass(needsquoting)6/mywidget.cpp
+++ b/tests/manual/cmake/pass(needsquoting)6/mywidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass(needsquoting)6/mywidget.h b/tests/manual/cmake/pass(needsquoting)6/mywidget.h
index 0f59d3835e..11968e6454 100644
--- a/tests/manual/cmake/pass(needsquoting)6/mywidget.h
+++ b/tests/manual/cmake/pass(needsquoting)6/mywidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass1/three.cpp b/tests/manual/cmake/pass1/three.cpp
index 41ba30b0ab..63bcbff480 100644
--- a/tests/manual/cmake/pass1/three.cpp
+++ b/tests/manual/cmake/pass1/three.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass1/two.cpp b/tests/manual/cmake/pass1/two.cpp
index 6f7d9bf17b..24fcd5dba4 100644
--- a/tests/manual/cmake/pass1/two.cpp
+++ b/tests/manual/cmake/pass1/two.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass2/myobject.cpp b/tests/manual/cmake/pass2/myobject.cpp
index 0f3d8b5b50..a237b00c50 100644
--- a/tests/manual/cmake/pass2/myobject.cpp
+++ b/tests/manual/cmake/pass2/myobject.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass2/myobject.h b/tests/manual/cmake/pass2/myobject.h
index e2e908d32c..cd8765d03f 100644
--- a/tests/manual/cmake/pass2/myobject.h
+++ b/tests/manual/cmake/pass2/myobject.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass3/mywidget.cpp b/tests/manual/cmake/pass3/mywidget.cpp
index 75804f9b3c..d1b2669980 100644
--- a/tests/manual/cmake/pass3/mywidget.cpp
+++ b/tests/manual/cmake/pass3/mywidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cmake/pass3/mywidget.h b/tests/manual/cmake/pass3/mywidget.h
index 0f59d3835e..11968e6454 100644
--- a/tests/manual/cmake/pass3/mywidget.h
+++ b/tests/manual/cmake/pass3/mywidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cocoa/qt_on_cocoa/main.mm b/tests/manual/cocoa/qt_on_cocoa/main.mm
index 18b5c78993..9471412601 100644
--- a/tests/manual/cocoa/qt_on_cocoa/main.mm
+++ b/tests/manual/cocoa/qt_on_cocoa/main.mm
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cocoa/qt_on_cocoa/window.cpp b/tests/manual/cocoa/qt_on_cocoa/window.cpp
index 5d24ceb51f..d68e08a9f8 100644
--- a/tests/manual/cocoa/qt_on_cocoa/window.cpp
+++ b/tests/manual/cocoa/qt_on_cocoa/window.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/cocoa/qt_on_cocoa/window.h b/tests/manual/cocoa/qt_on_cocoa/window.h
index 2fa2784427..6ba725ae13 100644
--- a/tests/manual/cocoa/qt_on_cocoa/window.h
+++ b/tests/manual/cocoa/qt_on_cocoa/window.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/gestures.cpp b/tests/manual/gestures/graphicsview/gestures.cpp
index 4dde0f5cb7..73db6c1787 100644
--- a/tests/manual/gestures/graphicsview/gestures.cpp
+++ b/tests/manual/gestures/graphicsview/gestures.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/gestures.h b/tests/manual/gestures/graphicsview/gestures.h
index 8104da640d..269f72712a 100644
--- a/tests/manual/gestures/graphicsview/gestures.h
+++ b/tests/manual/gestures/graphicsview/gestures.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/imageitem.cpp b/tests/manual/gestures/graphicsview/imageitem.cpp
index 03e9946cf4..6e3aa001a0 100644
--- a/tests/manual/gestures/graphicsview/imageitem.cpp
+++ b/tests/manual/gestures/graphicsview/imageitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/imageitem.h b/tests/manual/gestures/graphicsview/imageitem.h
index d789a3e914..67cd7df07b 100644
--- a/tests/manual/gestures/graphicsview/imageitem.h
+++ b/tests/manual/gestures/graphicsview/imageitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp
index f46d7139d8..ddda06ea22 100644
--- a/tests/manual/gestures/graphicsview/main.cpp
+++ b/tests/manual/gestures/graphicsview/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp
index 778ba78a10..0430d27c26 100644
--- a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp
+++ b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h
index 0e2684a285..720f0fe997 100644
--- a/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h
+++ b/tests/manual/gestures/graphicsview/mousepangesturerecognizer.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/scrollarea/main.cpp b/tests/manual/gestures/scrollarea/main.cpp
index ec5176600e..d77ce8e373 100644
--- a/tests/manual/gestures/scrollarea/main.cpp
+++ b/tests/manual/gestures/scrollarea/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp
index 8231fe0e74..c8c01325f6 100644
--- a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp
+++ b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h
index 0e2684a285..720f0fe997 100644
--- a/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h
+++ b/tests/manual/gestures/scrollarea/mousepangesturerecognizer.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/inputmethodhints/inputmethodhints.cpp b/tests/manual/inputmethodhints/inputmethodhints.cpp
index 1754a3cd26..6206877e44 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.cpp
+++ b/tests/manual/inputmethodhints/inputmethodhints.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h
index 6e2d934204..4746c9a11a 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.h
+++ b/tests/manual/inputmethodhints/inputmethodhints.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp
index a276cde1f2..af3286df73 100644
--- a/tests/manual/inputmethodhints/main.cpp
+++ b/tests/manual/inputmethodhints/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp
index 2edc67a426..4f7224d135 100644
--- a/tests/manual/keypadnavigation/main.cpp
+++ b/tests/manual/keypadnavigation/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/lance/interactivewidget.cpp b/tests/manual/lance/interactivewidget.cpp
index fb480b1d0b..55e60a8946 100644
--- a/tests/manual/lance/interactivewidget.cpp
+++ b/tests/manual/lance/interactivewidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/lance/interactivewidget.h b/tests/manual/lance/interactivewidget.h
index ac46a0ec36..e9e584512e 100644
--- a/tests/manual/lance/interactivewidget.h
+++ b/tests/manual/lance/interactivewidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp
index 7ff8b1cf36..c33cb49be9 100644
--- a/tests/manual/lance/main.cpp
+++ b/tests/manual/lance/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/lance/widgets.h b/tests/manual/lance/widgets.h
index 28ed34f653..d8a67a7554 100644
--- a/tests/manual/lance/widgets.h
+++ b/tests/manual/lance/widgets.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/mkspecs/test.sh b/tests/manual/mkspecs/test.sh
index d384df2098..12182e3cc9 100755
--- a/tests/manual/mkspecs/test.sh
+++ b/tests/manual/mkspecs/test.sh
@@ -2,8 +2,7 @@
#############################################################################
##
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-## All rights reserved.
-## Contact: Nokia Corporation (qt-info@nokia.com)
+## Contact: http://www.qt-project.org/
##
## This file is part of the manual tests of the Qt Toolkit.
##
@@ -36,6 +35,7 @@
##
##
##
+##
## $QT_END_LICENSE$
##
#############################################################################
diff --git a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
index 06e211738e..c2981c6df8 100644
--- a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
+++ b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/network_stresstest/minihttpserver.cpp b/tests/manual/network_stresstest/minihttpserver.cpp
index d024fe0f06..e3473a3141 100644
--- a/tests/manual/network_stresstest/minihttpserver.cpp
+++ b/tests/manual/network_stresstest/minihttpserver.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/network_stresstest/minihttpserver.h b/tests/manual/network_stresstest/minihttpserver.h
index a622159ce6..3df3f5982e 100644
--- a/tests/manual/network_stresstest/minihttpserver.h
+++ b/tests/manual/network_stresstest/minihttpserver.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp
index debae981ab..0f2673e23c 100644
--- a/tests/manual/network_stresstest/tst_network_stresstest.cpp
+++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qcursor/allcursors/main.cpp b/tests/manual/qcursor/allcursors/main.cpp
index 1b0d9a55bd..8872481e88 100644
--- a/tests/manual/qcursor/allcursors/main.cpp
+++ b/tests/manual/qcursor/allcursors/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qcursor/allcursors/mainwindow.cpp b/tests/manual/qcursor/allcursors/mainwindow.cpp
index 8807f6f1d0..cf1dd0b62e 100644
--- a/tests/manual/qcursor/allcursors/mainwindow.cpp
+++ b/tests/manual/qcursor/allcursors/mainwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qcursor/allcursors/mainwindow.h b/tests/manual/qcursor/allcursors/mainwindow.h
index d9dc3bcb78..938f744862 100644
--- a/tests/manual/qcursor/allcursors/mainwindow.h
+++ b/tests/manual/qcursor/allcursors/mainwindow.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qcursor/grab_override/main.cpp b/tests/manual/qcursor/grab_override/main.cpp
index 1b0d9a55bd..8872481e88 100644
--- a/tests/manual/qcursor/grab_override/main.cpp
+++ b/tests/manual/qcursor/grab_override/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qcursor/grab_override/mainwindow.cpp b/tests/manual/qcursor/grab_override/mainwindow.cpp
index d6c671a642..49c908627c 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.cpp
+++ b/tests/manual/qcursor/grab_override/mainwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qcursor/grab_override/mainwindow.h b/tests/manual/qcursor/grab_override/mainwindow.h
index e5a2042bb0..c231e9583d 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.h
+++ b/tests/manual/qcursor/grab_override/mainwindow.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qdesktopwidget/main.cpp b/tests/manual/qdesktopwidget/main.cpp
index 4982bd8321..d693d6b67d 100644
--- a/tests/manual/qdesktopwidget/main.cpp
+++ b/tests/manual/qdesktopwidget/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicsitemgroup/customitem.cpp b/tests/manual/qgraphicsitemgroup/customitem.cpp
index 2fb14d638a..6f3f1e0522 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.cpp
+++ b/tests/manual/qgraphicsitemgroup/customitem.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicsitemgroup/customitem.h b/tests/manual/qgraphicsitemgroup/customitem.h
index c8416cf952..ec5f9d2022 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.h
+++ b/tests/manual/qgraphicsitemgroup/customitem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicsitemgroup/main.cpp b/tests/manual/qgraphicsitemgroup/main.cpp
index c3310637b9..d60941da3a 100644
--- a/tests/manual/qgraphicsitemgroup/main.cpp
+++ b/tests/manual/qgraphicsitemgroup/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicsitemgroup/widget.cpp b/tests/manual/qgraphicsitemgroup/widget.cpp
index 1ff9e41c6a..5cfec8d2c4 100644
--- a/tests/manual/qgraphicsitemgroup/widget.cpp
+++ b/tests/manual/qgraphicsitemgroup/widget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicsitemgroup/widget.h b/tests/manual/qgraphicsitemgroup/widget.h
index 4e0489722f..8b4ba0a1b9 100644
--- a/tests/manual/qgraphicsitemgroup/widget.h
+++ b/tests/manual/qgraphicsitemgroup/widget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicslayout/flicker/main.cpp b/tests/manual/qgraphicslayout/flicker/main.cpp
index db9e53e302..e71915c22f 100644
--- a/tests/manual/qgraphicslayout/flicker/main.cpp
+++ b/tests/manual/qgraphicslayout/flicker/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicslayout/flicker/window.cpp b/tests/manual/qgraphicslayout/flicker/window.cpp
index 01a1182013..5b1e9412a4 100644
--- a/tests/manual/qgraphicslayout/flicker/window.cpp
+++ b/tests/manual/qgraphicslayout/flicker/window.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h
index 872a7469d8..4930381641 100644
--- a/tests/manual/qgraphicslayout/flicker/window.h
+++ b/tests/manual/qgraphicslayout/flicker/window.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qhttpnetworkconnection/main.cpp b/tests/manual/qhttpnetworkconnection/main.cpp
index 9998577997..2d861530d3 100644
--- a/tests/manual/qhttpnetworkconnection/main.cpp
+++ b/tests/manual/qhttpnetworkconnection/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp
index bc1772bbcc..44cdc6ad36 100644
--- a/tests/manual/qimagereader/main.cpp
+++ b/tests/manual/qimagereader/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp
index 8fadf68ea7..e23af4fa49 100644
--- a/tests/manual/qlocale/calendar.cpp
+++ b/tests/manual/qlocale/calendar.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h
index b03102f68d..bf0d5efac3 100644
--- a/tests/manual/qlocale/calendar.h
+++ b/tests/manual/qlocale/calendar.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/currency.cpp b/tests/manual/qlocale/currency.cpp
index f5d69de6c2..12d1ebe60b 100644
--- a/tests/manual/qlocale/currency.cpp
+++ b/tests/manual/qlocale/currency.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h
index fbee336da1..1d3d536578 100644
--- a/tests/manual/qlocale/currency.h
+++ b/tests/manual/qlocale/currency.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/dateformats.cpp b/tests/manual/qlocale/dateformats.cpp
index e23a2b8e52..e9291e0195 100644
--- a/tests/manual/qlocale/dateformats.cpp
+++ b/tests/manual/qlocale/dateformats.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h
index 67b2ed4a02..78ef62343a 100644
--- a/tests/manual/qlocale/dateformats.h
+++ b/tests/manual/qlocale/dateformats.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/info.cpp b/tests/manual/qlocale/info.cpp
index 2df46a22e3..5f8f20dc6e 100644
--- a/tests/manual/qlocale/info.cpp
+++ b/tests/manual/qlocale/info.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h
index 1fd2b753df..6cd7818feb 100644
--- a/tests/manual/qlocale/info.h
+++ b/tests/manual/qlocale/info.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/languages.cpp b/tests/manual/qlocale/languages.cpp
index 189e6976b1..1d8122e7b0 100644
--- a/tests/manual/qlocale/languages.cpp
+++ b/tests/manual/qlocale/languages.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h
index b365b7e4e3..6723e0ffa7 100644
--- a/tests/manual/qlocale/languages.h
+++ b/tests/manual/qlocale/languages.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp
index e37113fdc2..337dbb6ad3 100644
--- a/tests/manual/qlocale/main.cpp
+++ b/tests/manual/qlocale/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/miscellaneous.cpp b/tests/manual/qlocale/miscellaneous.cpp
index fdf4d27f8e..ba1b1ef027 100644
--- a/tests/manual/qlocale/miscellaneous.cpp
+++ b/tests/manual/qlocale/miscellaneous.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h
index 42e4e4f982..2548f0d8f4 100644
--- a/tests/manual/qlocale/miscellaneous.h
+++ b/tests/manual/qlocale/miscellaneous.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/numberformats.cpp b/tests/manual/qlocale/numberformats.cpp
index 99664f7e73..7807b3878e 100644
--- a/tests/manual/qlocale/numberformats.cpp
+++ b/tests/manual/qlocale/numberformats.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h
index 79dcac0dc9..8243d1177c 100644
--- a/tests/manual/qlocale/numberformats.h
+++ b/tests/manual/qlocale/numberformats.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/window.cpp b/tests/manual/qlocale/window.cpp
index bb6aea3114..96f6295881 100644
--- a/tests/manual/qlocale/window.cpp
+++ b/tests/manual/qlocale/window.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h
index 402cdd6259..1b2825aa5c 100644
--- a/tests/manual/qlocale/window.h
+++ b/tests/manual/qlocale/window.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -34,6 +33,7 @@
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.cpp b/tests/manual/qnetworkaccessmanager/qget/qget.cpp
index 4e1bc4a71a..86b05f8afe 100644
--- a/tests/manual/qnetworkaccessmanager/qget/qget.cpp
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.h b/tests/manual/qnetworkaccessmanager/qget/qget.h
index f66e3cd923..c8ab9e3a44 100644
--- a/tests/manual/qnetworkaccessmanager/qget/qget.h
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.pro b/tests/manual/qnetworkaccessmanager/qget/qget.pro
index 80af8a556f..341f772b51 100644
--- a/tests/manual/qnetworkaccessmanager/qget/qget.pro
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.pro
@@ -5,6 +5,3 @@ CONFIG += console
# Input
SOURCES += qget.cpp
HEADERS += qget.h
-
-symbian: TARGET.CAPABILITY += ReadUserData NetworkServices
-
diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp
index bade33712e..69bc0ef5be 100644
--- a/tests/manual/qnetworkreply/main.cpp
+++ b/tests/manual/qnetworkreply/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qssloptions/main.cpp b/tests/manual/qssloptions/main.cpp
index 0b7b6b57bc..37c86601ec 100644
--- a/tests/manual/qssloptions/main.cpp
+++ b/tests/manual/qssloptions/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/device_information/main.cpp b/tests/manual/qtabletevent/device_information/main.cpp
index a8f42ab0a7..b4eea7875b 100644
--- a/tests/manual/qtabletevent/device_information/main.cpp
+++ b/tests/manual/qtabletevent/device_information/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
index 33b9fb9b0a..d12da6c886 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.h b/tests/manual/qtabletevent/device_information/tabletwidget.h
index e1a9860f28..2c01ca3356 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.h
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/event_compression/main.cpp b/tests/manual/qtabletevent/event_compression/main.cpp
index d05f5cc55e..b7dd617d5d 100644
--- a/tests/manual/qtabletevent/event_compression/main.cpp
+++ b/tests/manual/qtabletevent/event_compression/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp b/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp
index d43bc50820..4d55afadb0 100644
--- a/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp
+++ b/tests/manual/qtabletevent/event_compression/mousestatwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/event_compression/mousestatwidget.h b/tests/manual/qtabletevent/event_compression/mousestatwidget.h
index 1a71ca44a4..c43fe86413 100644
--- a/tests/manual/qtabletevent/event_compression/mousestatwidget.h
+++ b/tests/manual/qtabletevent/event_compression/mousestatwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtabletevent/regular_widgets/main.cpp b/tests/manual/qtabletevent/regular_widgets/main.cpp
index 1ecef826ee..fda7872ec9 100644
--- a/tests/manual/qtabletevent/regular_widgets/main.cpp
+++ b/tests/manual/qtabletevent/regular_widgets/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the FOO module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtbug-8933/main.cpp b/tests/manual/qtbug-8933/main.cpp
index c3310637b9..d60941da3a 100644
--- a/tests/manual/qtbug-8933/main.cpp
+++ b/tests/manual/qtbug-8933/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtbug-8933/widget.cpp b/tests/manual/qtbug-8933/widget.cpp
index 6a87857f91..a77875c344 100644
--- a/tests/manual/qtbug-8933/widget.cpp
+++ b/tests/manual/qtbug-8933/widget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtbug-8933/widget.h b/tests/manual/qtbug-8933/widget.h
index 949cd2d11b..59b036bd44 100644
--- a/tests/manual/qtbug-8933/widget.h
+++ b/tests/manual/qtbug-8933/widget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtouchevent/main.cpp b/tests/manual/qtouchevent/main.cpp
index 6d5fbca6a6..206413bfa2 100644
--- a/tests/manual/qtouchevent/main.cpp
+++ b/tests/manual/qtouchevent/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtouchevent/touchwidget.cpp b/tests/manual/qtouchevent/touchwidget.cpp
index c26ab50f14..7e9afb9dbe 100644
--- a/tests/manual/qtouchevent/touchwidget.cpp
+++ b/tests/manual/qtouchevent/touchwidget.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qtouchevent/touchwidget.h b/tests/manual/qtouchevent/touchwidget.h
index 61ad0f9a68..46f512cbd9 100644
--- a/tests/manual/qtouchevent/touchwidget.h
+++ b/tests/manual/qtouchevent/touchwidget.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp
index 11e94bada3..dadc089ce4 100644
--- a/tests/manual/qwidget_zorder/main.cpp
+++ b/tests/manual/qwidget_zorder/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp
index 5f1020aec6..c6f0ac646f 100644
--- a/tests/manual/repaint/mainwindow/main.cpp
+++ b/tests/manual/repaint/mainwindow/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp
index e16866c4d6..63fb755510 100644
--- a/tests/manual/repaint/scrollarea/main.cpp
+++ b/tests/manual/repaint/scrollarea/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/shared/shared.h b/tests/manual/repaint/shared/shared.h
index 6cac04ee39..861d4178aa 100644
--- a/tests/manual/repaint/shared/shared.h
+++ b/tests/manual/repaint/shared/shared.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp
index a5c329ed82..2c4ca1d4f3 100644
--- a/tests/manual/repaint/splitter/main.cpp
+++ b/tests/manual/repaint/splitter/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp
index 25ccf5364e..dc25858681 100644
--- a/tests/manual/repaint/tableview/main.cpp
+++ b/tests/manual/repaint/tableview/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp
index ac30142ef4..b2f639d411 100644
--- a/tests/manual/repaint/task141091/main.cpp
+++ b/tests/manual/repaint/task141091/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/toplevel/main.cpp b/tests/manual/repaint/toplevel/main.cpp
index b5409a2fec..cd43fa699c 100644
--- a/tests/manual/repaint/toplevel/main.cpp
+++ b/tests/manual/repaint/toplevel/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp
index 1564bd2909..64b9cc8a18 100644
--- a/tests/manual/repaint/widget/main.cpp
+++ b/tests/manual/repaint/widget/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/socketengine/main.cpp b/tests/manual/socketengine/main.cpp
index c81e323df5..48893f062d 100644
--- a/tests/manual/socketengine/main.cpp
+++ b/tests/manual/socketengine/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp
index e3d061dd85..c41301f3fc 100644
--- a/tests/manual/textrendering/glyphshaping/main.cpp
+++ b/tests/manual/textrendering/glyphshaping/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/textrendering/textperformance/main.cpp b/tests/manual/textrendering/textperformance/main.cpp
index e4907e5ee1..c6a0c73849 100644
--- a/tests/manual/textrendering/textperformance/main.cpp
+++ b/tests/manual/textrendering/textperformance/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/auto/other/qdirectpainter/runDirectPainter/main.cpp b/tests/manual/widgets/itemviews/delegate/example.cpp
index 475cb9c035..20cff2663a 100644
--- a/tests/auto/other/qdirectpainter/runDirectPainter/main.cpp
+++ b/tests/manual/widgets/itemviews/delegate/example.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Thorbjørn Lund Martsum - tmartsum[at]gmail.com
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,47 +34,53 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QApplication>
-#include <QCopChannel>
-#include <QDirectPainter>
-#include <QImage>
-#include <QScreen>
-#include <QPainter>
-int main(int argc, char** argv)
+#include <QtWidgets/QtWidgets>
+
+class ExampleEditor : public QLineEdit
{
-#ifdef Q_WS_QWS
- QApplication app(argc, argv);
- QDirectPainter dp;
- QImage screenImage(dp.frameBuffer(), dp.screenWidth(), dp.screenHeight(),
- dp.linestep(), QScreen::instance()->pixelFormat());
- QPainter p;
+public:
+ ExampleEditor(QWidget *parent = 0):QLineEdit(parent) { qDebug() << "ctor"; }
+ ~ExampleEditor() { QApplication::instance()->quit(); }
+};
- QStringList args = app.arguments();
+class ExampleDelegate : public QItemDelegate
+{
+public:
+ ExampleDelegate():QItemDelegate() { m_editor = new ExampleEditor(0); }
+protected:
+ QWidget* createEditor(QWidget *p, const QStyleOptionViewItem &o, const QModelIndex &) const
+ {
+ m_editor->setParent(p);
+ m_editor->setGeometry(o.rect);
+ return m_editor;
+ }
+ void destroyEditor(QWidget *editor, const QModelIndex &) const
+ {
+ editor->setParent(0);
+ qDebug() << "intercepted destroy :)";
+ }
- dp.setRegion(QRect(args.at(1).toInt(),
- args.at(2).toInt(),
- args.at(3).toInt(),
- args.at(4).toInt()));
+ // Avoid setting data - and therefore show that the editor keeps its state.
+ void setEditorData(QWidget*, const QModelIndex &) const { }
- for (;;) {
- dp.startPainting();
- p.begin(&screenImage);
- p.setPen(Qt::NoPen);
- p.setBrush(Qt::blue);
- p.drawRects(dp.allocatedRegion().rects());
- p.end();
- dp.endPainting(dp.allocatedRegion());
- app.processEvents();
- }
-#else
- Q_UNUSED(argc);
- Q_UNUSED(argv);
-#endif
+ ~ExampleDelegate() { delete m_editor; }
+ mutable ExampleEditor *m_editor;
+};
- return 0;
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QTableView tv;
+ QStandardItemModel m;
+ m.setRowCount(4);
+ m.setColumnCount(2);
+ tv.setModel(&m);
+ tv.show();
+ tv.setItemDelegate(new ExampleDelegate());
+ app.exec();
}
-
diff --git a/tests/manual/widgets/itemviews/delegate/example.pro b/tests/manual/widgets/itemviews/delegate/example.pro
new file mode 100644
index 0000000000..e9f2189272
--- /dev/null
+++ b/tests/manual/widgets/itemviews/delegate/example.pro
@@ -0,0 +1,2 @@
+TEMPLATE = app
+SOURCES=example.cpp
diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp
index f22ec5ec87..69535b2856 100644
--- a/tests/manual/windowflags/controllerwindow.cpp
+++ b/tests/manual/windowflags/controllerwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/windowflags/controllerwindow.h b/tests/manual/windowflags/controllerwindow.h
index 84c39c9d2b..02827cffd8 100644
--- a/tests/manual/windowflags/controllerwindow.h
+++ b/tests/manual/windowflags/controllerwindow.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/windowflags/main.cpp b/tests/manual/windowflags/main.cpp
index 18d212b88c..09d5534a59 100644
--- a/tests/manual/windowflags/main.cpp
+++ b/tests/manual/windowflags/main.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp
index a3e6b49546..601cc50efa 100644
--- a/tests/manual/windowflags/previewwindow.cpp
+++ b/tests/manual/windowflags/previewwindow.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/manual/windowflags/previewwindow.h b/tests/manual/windowflags/previewwindow.h
index 91e68ea6b5..42189016e1 100644
--- a/tests/manual/windowflags/previewwindow.h
+++ b/tests/manual/windowflags/previewwindow.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index 8832574b54..c681dcfa05 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the test suite of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/