summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-07 01:46:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-07 01:46:24 (GMT)
commite56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924 (patch)
treef130e76140457cf8071193278acd783d898c54fb /tests
parentb20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff)
parent66733e95351f0088fd206a9215bde9d14510bc1e (diff)
downloadQt-e56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924.zip
Qt-e56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924.tar.gz
Qt-e56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (123 commits) Added missing tests to tests/auto/*.pro Compile with DirectFB version >= 1.2.0 && < 1.2.9 QDirectFBPaintEngine optimization Add some warnings when using DISABLE/WARN in DFB Fix build with Mesa 7.8's EGL implementatioon Reset the byte order in the iconv codec after using it. fix "using namespace" recursion crash Fix for QTBUG-6659 Parent window accepts pointer events wrongly If no IAP defined force IAP dialog Fixed key mappings on X11 QDom: prevent infinite loop when cloning a DTD Compile fix for Windows Mobile and OpenGLES2 QPrintPreviewDialog number of pages is partially blocked from view in OSX QS60Style ignores widget palette when drawing highlighted widget text Fix for QTBUG-8762 QApplication::setGraphicsSystem("raster") crashes. Fixed crash at application exit when QProcess was used in Symbian QMessageBox is not stretched to screen width if the content is narrow Wrong dirty region after row selection in right-to-left mode in QTableView Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( f3110d2f94c825477afac054ed448e45d47f5670 ) Tab to space fixes to qdilaog.cpp ...
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro624
-rw-r--r--tests/auto/corelib.pro102
-rw-r--r--tests/auto/dbus.pro20
-rw-r--r--tests/auto/gui.pro223
-rw-r--r--tests/auto/host.pro19
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp60
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result24
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp33
-rw-r--r--tests/auto/multimedia.pro25
-rw-r--r--tests/auto/network.pro43
-rw-r--r--tests/auto/opengl.pro6
-rw-r--r--tests/auto/other.pro58
-rw-r--r--tests/auto/phonon.pro5
-rw-r--r--tests/auto/qdialog/tst_qdialog.cpp4
-rw-r--r--tests/auto/qdom/tst_qdom.cpp25
-rw-r--r--tests/auto/qftp/tst_qftp.cpp2
-rw-r--r--tests/auto/qgl/qgl.pro2
-rw-r--r--tests/auto/qgl/tst_qgl.cpp11
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp23
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp68
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp34
-rw-r--r--tests/auto/qhostinfo/tst_qhostinfo.cpp56
-rw-r--r--tests/auto/qicon/tst_qicon.cpp6
-rw-r--r--tests/auto/qobject/tst_qobject.cpp20
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp101
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro2
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp6
-rw-r--r--tests/auto/qstring/tst_qstring.cpp5
-rw-r--r--tests/auto/qstringmatcher/qstringmatcher.pro2
-rw-r--r--tests/auto/qt3support.pro54
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp72
-rw-r--r--tests/auto/qtcpsocket/qtcpsocket.pro3
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp13
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp4
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp10
-rw-r--r--tests/auto/script.pro16
-rw-r--r--tests/auto/sql.pro14
-rw-r--r--tests/auto/svg.pro6
-rw-r--r--tests/auto/webkit.pro8
-rw-r--r--tests/auto/xml.pro8
-rw-r--r--tests/auto/xmlpatterns.pro47
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp17
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qstringlist/main.cpp4
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp3
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp4
-rw-r--r--tests/benchmarks/network/kernel/qhostinfo/main.cpp24
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp3
49 files changed, 1266 insertions, 657 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 2ea9ca7..497e720 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,611 +1,23 @@
-QT = core
TEMPLATE = subdirs
-# These tests use host tools and therefore can't work for cross-compiled Qt.
-!cross_compile:SUBDIRS += \
- headers \
- bic \
- compiler \
- compilerwarnings \
- linguist \
- maketestselftest \
- moc \
- uic \
- guiapplauncher \
- #atwrapper \ # These tests need significant updating,
- #uiloader \ # they have hardcoded machine names etc.
-
-Q3SUBDIRS += \
- q3accel \
- q3action \
- q3actiongroup \
- q3buttongroup \
- q3canvas \
- q3checklistitem \
- q3cstring \
- q3databrowser \
- q3dateedit \
- q3datetimeedit \
- q3deepcopy \
- q3dict \
- q3dns \
- q3dockwindow \
- q3filedialog \
- q3groupbox \
- q3hbox \
- q3header \
- q3iconview \
- q3listbox \
- q3listview \
- q3listviewitemiterator \
- q3mainwindow \
- q3popupmenu \
- q3process \
- q3progressbar \
- q3progressdialog \
- q3ptrlist \
- q3richtext \
- q3scrollview \
- q3semaphore \
- q3serversocket \
- q3socket \
- q3socketdevice \
- q3sqlcursor \
- q3sqlselectcursor \
- q3stylesheet \
- q3tabdialog \
- q3table \
- q3textbrowser \
- q3textedit \
- q3textstream \
- q3timeedit \
- q3toolbar \
- q3urloperator \
- q3valuelist \
- q3valuevector \
- q3combobox \
- q3frame \
- q3uridrag \
- q3widgetstack
-
-!cross_compile:Q3SUBDIRS += \
- uic3
-
SUBDIRS += \
-# exceptionsafety_objects \ shouldn't enable it
- languagechange \
- collections \
- exceptionsafety \
- mediaobject \
-# mediaobject_wince_ds9 \ This is Windows CE only (we test the second phonon backend ds9 here)
- modeltest \
- networkselftest \
- qabstractbutton \
- qabstractitemmodel \
- qabstractitemview \
- qabstractprintdialog \
- qabstractscrollarea \
- qabstractslider \
- qabstractsocket \
- qabstractspinbox \
- qabstracttextdocumentlayout \
- qabstractvideobuffer \
- qabstractvideosurface \
- qaccessibility \
- qaction \
- qactiongroup \
- qalgorithms \
- qanimationgroup \
- qapplication \
- qatomicint \
- qatomicpointer \
- qbitarray \
- qboxlayout \
- qbrush \
- qbuffer \
- qbuttongroup \
- qbytearray \
- qcache \
- qchar \
- qcheckbox \
- qclipboard \
- qcolor \
- qcolordialog \
- qcombobox \
- qcompleter \
- qcomplextext \
- qcoreapplication \
- qcryptographichash \
- qcssparser \
- qdatastream \
- qdatawidgetmapper \
- qdate \
- qdatetime \
- qdatetimeedit \
- qdebug \
- qdesktopservices \
- qdesktopwidget \
- qdial \
- qdialog \
- qdialogbuttonbox \
- qdir \
- qdirmodel \
- qdockwidget \
- qdom \
- qdoublespinbox \
- qdoublevalidator \
- qdrag \
- qerrormessage \
- qevent \
- qeventloop \
- qexplicitlyshareddatapointer \
- qfile \
- qfiledialog \
- qfiledialog2 \
- qfileinfo \
- qfilesystemwatcher \
- qfilesystemmodel \
- qflags \
- qfocusevent \
- qfocusframe \
- qfont \
- qfontcombobox \
- qfontdatabase \
- qfontdialog \
- qfontmetrics \
- qftp \
- qgetputenv \
- qglobal \
- qgraphicseffect \
- qgraphicseffectsource \
- qgraphicsgridlayout \
- qgraphicsitem \
- qgraphicsitemanimation \
- qgraphicsanchorlayout \
- qgraphicsanchorlayout1 \
- qgraphicslayout \
- qgraphicslayoutitem \
- qgraphicslinearlayout \
- qgraphicsobject \
- qgraphicspixmapitem \
- qgraphicspolygonitem \
- qgraphicsproxywidget \
- qgraphicsscene \
- qgraphicssceneindex \
- qgraphicstransform \
- qgraphicsvideoitem \
- qgraphicsview \
- qgraphicswidget \
- qgridlayout \
- qgroupbox \
- qguivariant \
- qhash \
- qheaderview \
- qhelpcontentmodel \
- qhelpenginecore \
- qhelpgenerator \
- qhelpindexmodel \
- qhelpprojectdata \
- qhostaddress \
- qhostinfo \
- qhttp \
- qhttpnetworkreply \
- qhttpnetworkconnection \
- qicon \
- qicoimageformat \
- qimage \
- qimageiohandler \
- qimagereader \
- qimagewriter \
- qinputdialog \
- qintvalidator \
- qiodevice \
- qitemdelegate \
- qitemeditorfactory \
- qitemmodel \
- qitemselectionmodel \
- qitemview \
- qkeysequence \
- qlabel \
- qlayout \
- qlcdnumber \
- qlibrary \
- qline \
- qlineedit \
- qlist \
- qlistview \
- qlistwidget \
- qlocale \
- qmainwindow \
- qmake \
- qmap \
- qmath \
- qmatrixnxn \
- qmdiarea \
- qmdisubwindow \
- qmenu \
- qmenubar \
- qmessagebox \
- qmetaobject \
- qmetatype \
- qmouseevent \
- qmouseevent_modal \
- qmovie \
- qmutex \
- qmutexlocker \
- qnativesocketengine \
- qnetworkcookie \
- qnetworkcookiejar \
- qnetworkinterface \
- qnetworkproxy \
- qnetworkrequest \
- qnetworkreply \
- qnetworkaccessmanager_and_qprogressdialog \
- qnumeric \
- qobject \
- qobjectrace \
- qcontiguouscache \
- qpaintengine \
- qpainter \
- qpainterpath \
- qpalette \
- qparallelanimationgroup \
- qpauseanimation \
- qpathclipper \
- qpen \
- qpicture \
- qpixmap \
- qpixmapcache \
- qpixmapfilter \
- qplaintextedit \
- qpoint \
- qpointer \
- qpolygon \
- qprinter \
- qprinterinfo \
- qprocess \
- qprocessenvironment \
- qprogressbar \
- qprogressdialog \
- qpropertyanimation \
- qpushbutton \
- qquaternion \
- qqueue \
- qradiobutton \
- qreadlocker \
- qreadwritelock \
- qrect \
- qregexp \
- qregexpvalidator \
- qregion \
- qresourceengine \
- qringbuffer \
- qscopedpointer \
- qscrollarea \
- qsemaphore \
- qsharedpointer \
- qsharedpointer_and_qwidget \
- qsequentialanimationgroup \
- qset \
- qsettings \
- qshortcut \
- qsignalmapper \
- qsignalspy \
- qsize \
- qsizef \
- qslider \
- qsocketnotifier \
- qsocks5socketengine \
- qsortfilterproxymodel \
- qsound \
- qaudiodeviceinfo \
- qaudioformat \
- qaudiooutput \
- qaudioinput \
- qmediacontent \
- qmediaobject \
- qmediaplayer \
- qmediaplaylist \
- qmediaplaylistnavigator \
- qmediapluginloader \
- qmediaresource \
- qmediaservice \
- qmediaserviceprovider \
- qmediatimerange \
- qvideowidget \
- qspinbox \
- qsplitter \
- qsql \
- qsqldatabase \
- qsqlerror \
- qsqlfield \
- qsqlquery \
- qsqlquerymodel \
- qsqlrecord \
- qsqlrelationaltablemodel \
- qsqltablemodel \
- qsqlthread \
- qsslcertificate \
- qsslcipher \
- qsslerror \
- qsslkey \
- qsslsocket \
- qstackedlayout \
- qstackedwidget \
- qstandarditem \
- qstandarditemmodel \
- qstate \
- qstatemachine \
- qstatictext \
- qstatusbar \
- qstl \
- qstring \
- qstringbuilder1 \
- qstringbuilder2 \
- qstringbuilder3 \
- qstringbuilder4 \
- qstringmatcher \
- qstringlist \
- qstringlistmodel \
- qstyle \
- qstyleoption \
- qstylesheetstyle \
- qsvgdevice \
- qsvggenerator \
- qsvgrenderer \
- qsyntaxhighlighter \
- qsystemtrayicon \
- qtabbar \
- qtableview \
- qtablewidget \
- qtabwidget \
- qtcpserver \
- qtcpsocket \
- qtemporaryfile \
- qtessellator \
- qtextblock \
- qtextboundaryfinder \
- qtextbrowser \
- qtextcodec \
- qtextcursor \
- qtextdocument \
- qtextdocumentfragment \
- qtextdocumentlayout \
- qtextedit \
- qtextformat \
- qtextlayout \
- qtextlist \
- qtextobject \
- qtextscriptengine \
- qtextstream \
- qtexttable \
- qthread \
- qthreadonce \
- qthreadstorage \
- qtime \
- qtimeline \
- qtimer \
- qtmd5 \
- qtoolbar \
- qtoolbox \
- qtoolbutton \
- qtooltip \
- qtranslator \
- qtransform \
- qtransformedscreen \
- qtreeview \
- qtreewidget \
- qtreewidgetitemiterator \
- qtwidgets \
- qudpsocket \
- qundogroup \
- qundostack \
- qurl \
- quuid \
- qvariant \
- qvarlengtharray \
- qvector \
- qvideoframe \
- qvideosurfaceformat \
- qvectornd \
- qwaitcondition \
- qwidget \
- qwidgetaction \
- qwindowsurface \
- qwineventnotifier \
- qwizard \
- qwmatrix \
- qworkspace \
- qwritelocker \
- qwsembedwidget \
- qwsinputmethod \
- qwswindowsystem \
- qx11info \
- qxml \
- qxmlinputsource \
- qxmlsimplereader \
- qxmlstream \
- selftests \
- symbols \
- qrand \
- utf8 \
- gestures \
- qabstractnetworkcache \
- qabstractproxymodel \
- qbytearraymatcher \
- qcalendarwidget \
- qcolumnview \
- qcommandlinkbutton \
- qdbuscontext \
- qdbusserver \
- qdbusservicewatcher \
- qdiriterator \
- qeasingcurve \
- qfileiconprovider \
- qformlayout \
- q_func_info \
- qfuture \
- qfuturewatcher \
- qguard \
- qhttpsocketengine \
- qinputcontext \
- qlocalsocket \
- qmacstyle \
- qmargins \
- qnetworkaddressentry \
- qnetworkcachemetadata \
- qnetworkconfigmanager \
- qnetworkconfiguration \
- qnetworkdiskcache \
- qnetworksession \
- qobjectperformance \
- qpainterpathstroker \
- qplugin \
- qpluginloader \
- qscrollbar \
- qsidebar \
- qsizegrip \
- qsqldriver \
- qtconcurrentfilter \
- qtconcurrentiteratekernel \
- qtconcurrentmap \
- qtconcurrentrun \
- qtconcurrentthreadengine \
- qthreadpool \
- qtipc \
- qtokenautomaton \
- qtouchevent \
- qwidget_window \
- rcc \
- windowsmobile
-
-contains(QT_CONFIG,opengl):SUBDIRS += qgl qglbuffer qgl_threads
-
-contains(QT_CONFIG,qt3support):!wince*:SUBDIRS += $$Q3SUBDIRS
-
-contains(QT_CONFIG,multimedia):contains(QT_CONFIG,declarative):SUBDIRS += qdeclarativeaudio \
- qdeclarativevideo
-
-contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter
-mac: {
- SUBDIRS += macgui \
- macplist \
- qaccessibility_mac
-}
-
-embedded:!wince* {
- SUBDIRS += qcopchannel \
- qdirectpainter \
- qmultiscreen
-}
-!win32: {
- SUBDIRS += qtextpiecetable
-}
-
-symbian {
- SUBDIRS += qsoftkeymanager \
- qs60mainapplication
-}
-
-# Enable the tests specific to QtXmlPatterns. If you add a test, remember to
-# update runQtXmlPatternsTests.sh too. Remember that this file, auto.pro, is
-# not respected by some test system, they just have a script which loop over
-# the folders.
-contains(QT_CONFIG, xmlpatterns) {
-SUBDIRS += checkxmlfiles \
- patternistexamplefiletree \
- patternistexamples \
- patternistheaders \
- qabstractmessagehandler \
- qabstracturiresolver \
- qabstractxmlforwarditerator \
- qabstractxmlnodemodel \
- qabstractxmlreceiver \
- qapplicationargumentparser \
- qautoptr \
- qsimplexmlnodemodel \
- qsourcelocation \
- qxmlformatter \
- qxmlitem \
- qxmlname \
- qxmlnamepool \
- qxmlnodemodelindex \
- qxmlquery \
- qxmlresultitems \
- qxmlschema \
- qxmlschemavalidator \
- qxmlserializer \
- xmlpatterns \
- xmlpatternsdiagnosticsts \
- xmlpatternsschema \
- xmlpatternsschemats \
- xmlpatternssdk \
- xmlpatternsvalidator \
- xmlpatternsview \
- xmlpatternsxqts \
- xmlpatternsxslts
-
-xmlpatternsdiagnosticsts.depends = xmlpatternssdk
-xmlpatternsview.depends = xmlpatternssdk
-xmlpatternsxslts.depends = xmlpatternssdk
-xmlpatternsschemats.depends = xmlpatternssdk
-}
-
-unix:!embedded:contains(QT_CONFIG, dbus):SUBDIRS += \
- qdbusabstractadaptor \
- qdbusabstractinterface \
- qdbusconnection \
- qdbusinterface \
- qdbuslocalcalls \
- qdbusmarshall \
- qdbusmetaobject \
- qdbusmetatype \
- qdbuspendingcall \
- qdbuspendingreply \
- qdbusperformance \
- qdbusreply \
- qdbusthreading \
- qdbusxmlparser
-
-contains(QT_CONFIG, script): SUBDIRS += \
- qscriptable \
- qscriptclass \
- qscriptcontext \
- qscriptcontextinfo \
- qscriptengine \
- qscriptengineagent \
- qscriptextqobject \
- qscriptjstestsuite \
- qscriptv8testsuite \
- qscriptstring \
- qscriptvalue \
- qscriptvalueiterator \
- qscriptenginedebugger
-
-contains(QT_CONFIG, webkit): SUBDIRS += \
- qwebframe \
- qwebpage \
- qwebhistoryinterface \
- qwebelement \
- qwebhistory
-
-contains(QT_CONFIG, declarative): SUBDIRS += declarative
+ corelib.pro \
+ gui.pro \
+ network.pro \
+ sql.pro \
+ xml.pro \
+ other.pro
+
+!cross_compile: SUBDIRS += host.pro
+contains(QT_CONFIG, qt3support):!wince*: SUBDIRS += qt3support.pro
+contains(QT_CONFIG, opengl): SUBDIRS += opengl.pro
+contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns.pro
+unix:!embedded:contains(QT_CONFIG, dbus): SUBDIRS += dbus.pro
+contains(QT_CONFIG, script): SUBDIRS += script.pro
+contains(QT_CONFIG, webkit): SUBDIRS += webkit.pro
+contains(QT_CONFIG, multimedia): SUBDIRS += multimedia.pro
+contains(QT_CONFIG, phonon): SUBDIRS += phonon.pro
+contains(QT_CONFIG, svg): SUBDIRS += svg.pro
+contains(QT_CONFIG, declarative): SUBDIRS += declarative
-# Following tests depends on private API
-!contains(QT_CONFIG, private_tests): SUBDIRS -= \
- qcssparser \
- qgraphicssceneindex \
- qhttpnetworkconnection \
- qhttpnetworkreply \
- qnativesocketengine \
- qnetworkreply \
- qpathclipper \
- qsocketnotifier \
- qsocks5socketengine \
- qstylesheetstyle \
- qtextpiecetable \
- xmlpatternsdiagnosticsts \
- xmlpatternsview \
- xmlpatternsxqts \
- xmlpatternsxslts
diff --git a/tests/auto/corelib.pro b/tests/auto/corelib.pro
new file mode 100644
index 0000000..c08e372
--- /dev/null
+++ b/tests/auto/corelib.pro
@@ -0,0 +1,102 @@
+# The tests in this .pro file _MUST_ use QtCore only (i.e. QT=core).
+# The test system is allowed to run these tests before the test of Qt has
+# been compiled.
+
+TEMPLATE=subdirs
+SUBDIRS=\
+ collections \
+ exceptionsafety \
+ q_func_info \
+ qanimationgroup \
+ qatomicint \
+ qatomicpointer \
+ qbitarray \
+ qbuffer \
+ qbytearray \
+ qbytearraymatcher \
+ qcache \
+ qchar \
+ qcontiguouscache \
+ qcoreapplication \
+ qcryptographichash \
+ qdate \
+ qdatetime \
+ qdebug \
+ qdiriterator \
+ qeasingcurve \
+ qevent \
+ qexplicitlyshareddatapointer \
+ qfileinfo \
+ qfilesystemwatcher \
+ qflags \
+ qfuture \
+ qfuturewatcher \
+ qgetputenv \
+ qglobal \
+ qhash \
+ qlibrary \
+ qline \
+ qmap \
+ qmargins \
+ qmath \
+ qmetatype \
+ qmutex \
+ qmutexlocker \
+ qnumeric \
+ qobject \
+ qobjectrace \
+ qplugin \
+ qpluginloader \
+ qpoint \
+ qprocessenvironment \
+ qqueue \
+ qrand \
+ qreadlocker \
+ qreadwritelock \
+ qrect \
+ qregexp \
+ qresourceengine \
+ qringbuffer \
+ qscopedpointer \
+ qsemaphore \
+ qsequentialanimationgroup \
+ qset \
+ qsharedpointer \
+ qsignalspy \
+ qsize \
+ qsizef \
+ qstate \
+ qstl \
+ qstring \
+ qstringbuilder1 \
+ qstringbuilder2 \
+ qstringbuilder3 \
+ qstringbuilder4 \
+ qstringlist \
+ qstringmatcher \
+ qtconcurrentfilter \
+ qtconcurrentiteratekernel \
+ qtconcurrentmap \
+ qtconcurrentrun \
+ qtconcurrentthreadengine \
+ qtemporaryfile \
+ qtextboundaryfinder \
+ qthread \
+ qthreadonce \
+ qthreadpool \
+ qthreadstorage \
+ qtime \
+ qtimeline \
+ qtimer \
+ qtmd5 \
+ qtokenautomaton \
+ qurl \
+ quuid \
+ qvarlengtharray \
+ qvector \
+ qwaitcondition \
+ qwineventnotifier \
+ qwritelocker \
+ selftests \
+ utf8 \
+
diff --git a/tests/auto/dbus.pro b/tests/auto/dbus.pro
new file mode 100644
index 0000000..1c808df
--- /dev/null
+++ b/tests/auto/dbus.pro
@@ -0,0 +1,20 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qdbusabstractadaptor \
+ qdbusabstractinterface \
+ qdbusconnection \
+ qdbuscontext \
+ qdbusinterface \
+ qdbuslocalcalls \
+ qdbusmarshall \
+ qdbusmetaobject \
+ qdbusmetatype \
+ qdbuspendingcall \
+ qdbuspendingreply \
+ qdbusperformance \
+ qdbusreply \
+ qdbusserver \
+ qdbusservicewatcher \
+ qdbusthreading \
+ qdbusxmlparser \
+
diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro
new file mode 100644
index 0000000..10a760c
--- /dev/null
+++ b/tests/auto/gui.pro
@@ -0,0 +1,223 @@
+# The tests in this .pro file _MUST_ use QtCore, QtNetwork and QtGui only
+# (i.e. QT=core gui network).
+# The test system is allowed to run these tests before the rest of Qt has
+# been compiled.
+#
+TEMPLATE=subdirs
+SUBDIRS=\
+ gestures \
+ languagechange \
+ modeltest \
+ qabstractbutton \
+ qabstractitemmodel \
+ qabstractitemview \
+ qabstractprintdialog \
+ qabstractproxymodel \
+ qabstractscrollarea \
+ qabstractslider \
+ qabstractspinbox \
+ qabstracttextdocumentlayout \
+ qaction \
+ qactiongroup \
+ qapplication \
+ qboxlayout \
+ qbrush \
+ qbuttongroup \
+ qcalendarwidget \
+ qcheckbox \
+ qclipboard \
+ qcolor \
+ qcolordialog \
+ qcolumnview \
+ qcommandlinkbutton \
+ qcompleter \
+ qcomplextext \
+ qdatawidgetmapper \
+ qdatetimeedit \
+ qdesktopservices \
+ qdesktopwidget \
+ qdial \
+ qdialog \
+ qdialogbuttonbox \
+ qdirmodel \
+ qdockwidget \
+ qdoublespinbox \
+ qdoublevalidator \
+ qdrag \
+ qerrormessage \
+ qfile \
+ qfiledialog \
+ qfiledialog2 \
+ qfileiconprovider \
+ qfilesystemmodel \
+ qfocusframe \
+ qfont \
+ qfontcombobox \
+ qfontdatabase \
+ qfontdialog \
+ qfontmetrics \
+ qformlayout \
+ qgraphicsanchorlayout \
+ qgraphicsanchorlayout1 \
+ qgraphicseffect \
+ qgraphicseffectsource \
+ qgraphicsgridlayout \
+ qgraphicsitem \
+ qgraphicsitemanimation \
+ qgraphicslayout \
+ qgraphicslayoutitem \
+ qgraphicslinearlayout \
+ qgraphicsobject \
+ qgraphicspixmapitem \
+ qgraphicspolygonitem \
+ qgraphicsproxywidget \
+ qgraphicsscene \
+ qgraphicssceneindex \
+ qgraphicstransform \
+ qgraphicsview \
+ qgraphicswidget \
+ qgridlayout \
+ qgroupbox \
+ qguard \
+ qguivariant \
+ qheaderview \
+ qhelpcontentmodel \
+ qhelpenginecore \
+ qhelpgenerator \
+ qhelpindexmodel \
+ qhelpprojectdata \
+ qicoimageformat \
+ qicon \
+ qimageiohandler \
+ qimagereader \
+ qimagewriter \
+ qinputcontext \
+ qinputdialog \
+ qintvalidator \
+ qitemdelegate \
+ qitemeditorfactory \
+ qitemselectionmodel \
+ qitemview \
+ qkeysequence \
+ qlabel \
+ qlcdnumber \
+ qlineedit \
+ qlist \
+ qlistview \
+ qlistwidget \
+ qlocale \
+ qlocalsocket \
+ qmacstyle \
+ qmainwindow \
+ qmatrixnxn \
+ qmdisubwindow \
+ qmessagebox \
+ qmetaobject \
+ qmouseevent_modal \
+ qmovie \
+ qnetworkaccessmanager_and_qprogressdialog \
+ qnetworkcachemetadata \
+ qnetworkdiskcache \
+ qnetworkreply \
+ qpaintengine \
+ qpainterpath \
+ qpainterpathstroker \
+ qpalette \
+ qparallelanimationgroup \
+ qpathclipper \
+ qpauseanimation \
+ qpen \
+ qpicture \
+ qpixmapcache \
+ qpixmapfilter \
+ qplaintextedit \
+ qpointer \
+ qpolygon \
+ qprinterinfo \
+ qprocess \
+ qprogressbar \
+ qprogressdialog \
+ qpropertyanimation \
+ qpushbutton \
+ qquaternion \
+ qradiobutton \
+ qregexpvalidator \
+ qregion \
+ qscrollarea \
+ qscrollbar \
+ qsharedpointer_and_qwidget \
+ qshortcut \
+ qsidebar \
+ qsignalmapper \
+ qsizegrip \
+ qslider \
+ qsortfilterproxymodel \
+ qsound \
+ qspinbox \
+ qstackedlayout \
+ qstackedwidget \
+ qstandarditem \
+ qstandarditemmodel \
+ qstatemachine \
+ qstatictext \
+ qstatusbar \
+ qstringlistmodel \
+ qstyle \
+ qstyleoption \
+ qstylesheetstyle \
+ qsyntaxhighlighter \
+ qsystemtrayicon \
+ qtabbar \
+ qtableview \
+ qtablewidget \
+ qtcpserver \
+ qtcpsocket \
+ qtessellator \
+ qtextblock \
+ qtextcodec \
+ qtextcursor \
+ qtextdocumentfragment \
+ qtextdocumentlayout \
+ qtextformat \
+ qtextlayout \
+ qtextlist \
+ qtextobject \
+ qtextpiecetable \
+ qtextscriptengine \
+ qtextstream \
+ qtexttable \
+ qtipc \
+ qtoolbar \
+ qtoolbox \
+ qtooltip \
+ qtouchevent \
+ qtransform \
+ qtransformedscreen \
+ qtranslator \
+ qtreeview \
+ qtreewidget \
+ qtreewidgetitemiterator \
+ qtwidgets \
+ qudpsocket \
+ qundogroup \
+ qundostack \
+ qvectornd \
+ qwidget_window \
+ qwidgetaction \
+ qwindowsurface \
+ qwizard \
+ qwmatrix \
+ qwsembedwidget \
+ qwsinputmethod \
+ qwswindowsystem \
+ qx11info \
+
+win32:SUBDIRS -= qtextpiecetable
+
+!contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ qgraphicssceneindex \
+ qnetworkreply \
+ qpathclipper \
+ qstylesheetstyle \
+ qtextpiecetable \
+
diff --git a/tests/auto/host.pro b/tests/auto/host.pro
new file mode 100644
index 0000000..9852d91
--- /dev/null
+++ b/tests/auto/host.pro
@@ -0,0 +1,19 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ headers \
+ bic \
+ compiler \
+ compilerwarnings \
+ linguist \
+ maketestselftest \
+ moc \
+ uic \
+ guiapplauncher \
+ qmake \
+ rcc \
+ symbols \
+ #atwrapper \ # These tests need significant updating,
+ #uiloader \ # they have hardcoded machine names etc.
+
+contains(QT_CONFIG,qt3support):SUBDIRS+=uic3
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
index 42cc55b..a5b36ca 100644
--- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp
@@ -135,4 +135,64 @@ Q_OBJECT
}
};
+// QTBUG-8360
+namespace A {
+
+void foo()
+{
+ using namespace A;
+}
+
+void goo()
+{
+ return QObject::tr("Bla");
+}
+
+}
+
+
+namespace AA {
+namespace B {
+
+using namespace AA;
+
+namespace C {
+
+class Test : public QObject {
+ Q_OBJECT
+};
+
+}
+
+}
+
+using namespace B;
+using namespace C;
+
+void goo()
+{
+ AA::Test::tr("howdy?");
+}
+
+}
+
+
+namespace A1 {
+namespace B {
+
+class Test : public QObject {
+ Q_OBJECT
+};
+
+using namespace A1;
+
+void foo()
+{
+ B::B::B::Test::tr("yeeee-ha!");
+}
+
+}
+}
+
+
#include "main.moc"
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
index c1a34bd..94df9d3 100644
--- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result
@@ -2,6 +2,22 @@
<!DOCTYPE TS>
<TS version="2.0">
<context>
+ <name>A1::B::Test</name>
+ <message>
+ <location filename="main.cpp" line="191"/>
+ <source>yeeee-ha!</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>AA::B::C::Test</name>
+ <message>
+ <location filename="main.cpp" line="174"/>
+ <source>howdy?</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Class</name>
<message>
<location filename="main.cpp" line="52"/>
@@ -79,4 +95,12 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="148"/>
+ <source>Bla</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
index 1dde44b..8264e27 100644
--- a/tests/auto/maketestselftest/tst_maketestselftest.cpp
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -50,23 +50,27 @@ class tst_MakeTestSelfTest: public QObject
Q_OBJECT
private slots:
- void auto_dot_pro();
- void auto_dot_pro_data();
+ void tests_pro_files();
+ void tests_pro_files_data();
};
-/* Verify that all tests are listed somewhere in auto.pro */
-void tst_MakeTestSelfTest::auto_dot_pro()
+/* Verify that all tests are listed somewhere in one of the autotest .pro files */
+void tst_MakeTestSelfTest::tests_pro_files()
{
static QStringList lines;
if (lines.isEmpty()) {
- QString filename = QString::fromLatin1(SRCDIR "/../auto.pro");
- QFile file(filename);
- if (!file.open(QIODevice::ReadOnly)) {
- QFAIL(qPrintable(QString("open %1: %2").arg(filename).arg(file.errorString())));
- }
- while (!file.atEnd()) {
- lines << file.readLine().trimmed();
+ QDir dir(SRCDIR "/..");
+ QStringList proFiles = dir.entryList(QStringList() << "*.pro");
+ foreach (QString const& proFile, proFiles) {
+ QString filename = QString("%1/../%2").arg(SRCDIR).arg(proFile);
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly)) {
+ QFAIL(qPrintable(QString("open %1: %2").arg(filename).arg(file.errorString())));
+ }
+ while (!file.atEnd()) {
+ lines << file.readLine().trimmed();
+ }
}
}
@@ -79,13 +83,14 @@ void tst_MakeTestSelfTest::auto_dot_pro()
}
QFAIL(qPrintable(QString(
- "Subdir `%1' is missing from tests/auto/auto.pro\n"
+ "Subdir `%1' is missing from tests/auto/*.pro\n"
"This means the test won't be compiled or run on any platform.\n"
- "If this is intentional, please put the test name in a comment in auto.pro.").arg(subdir))
+ "If this is intentional, please put the test name in a comment in one of the .pro files.").arg(subdir))
);
+
}
-void tst_MakeTestSelfTest::auto_dot_pro_data()
+void tst_MakeTestSelfTest::tests_pro_files_data()
{
QTest::addColumn<QString>("subdir");
QDir dir(SRCDIR "/..");
diff --git a/tests/auto/multimedia.pro b/tests/auto/multimedia.pro
new file mode 100644
index 0000000..9cfae84
--- /dev/null
+++ b/tests/auto/multimedia.pro
@@ -0,0 +1,25 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qabstractvideobuffer \
+ qabstractvideosurface \
+ qaudiodeviceinfo \
+ qaudioformat \
+ qaudioinput \
+ qaudiooutput \
+ qdeclarativeaudio \
+ qdeclarativevideo \
+ qgraphicsvideoitem \
+ qmediacontent \
+ qmediaobject \
+ qmediaplayer \
+ qmediaplaylist \
+ qmediaplaylistnavigator \
+ qmediapluginloader \
+ qmediaresource \
+ qmediaservice \
+ qmediaserviceprovider \
+ qmediatimerange \
+ qvideoframe \
+ qvideosurfaceformat \
+ qvideowidget \
+
diff --git a/tests/auto/network.pro b/tests/auto/network.pro
new file mode 100644
index 0000000..6b24850
--- /dev/null
+++ b/tests/auto/network.pro
@@ -0,0 +1,43 @@
+# The tests in this .pro file _MUST_ use QtCore and QtNetwork only
+# (i.e. QT=core network).
+# The test system is allowed to run these tests before the rest of Qt has
+# been compiled.
+TEMPLATE=subdirs
+SUBDIRS=\
+ networkselftest \
+ qabstractnetworkcache \
+ qabstractsocket \
+ qeventloop \
+ qftp \
+ qhostaddress \
+ qhostinfo \
+ qhttp \
+ qhttpnetworkconnection \
+ qhttpnetworkreply \
+ qhttpsocketengine \
+ qnativesocketengine \
+ qnetworkaddressentry \
+ qnetworkconfigmanager \
+ qnetworkconfiguration \
+ qnetworkcookie \
+ qnetworkcookiejar \
+ qnetworkinterface \
+ qnetworkproxy \
+ qnetworkrequest \
+ qnetworksession \
+ qobjectperformance \
+ qsocketnotifier \
+ qsocks5socketengine \
+ qsslcertificate \
+ qsslcipher \
+ qsslerror \
+ qsslkey \
+ qsslsocket \
+
+contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ qhttpnetworkconnection \
+ qhttpnetworkreply \
+ qnativesocketengine \
+ qsocketnotifier \
+ qsocks5socketengine \
+
diff --git a/tests/auto/opengl.pro b/tests/auto/opengl.pro
new file mode 100644
index 0000000..7220c45
--- /dev/null
+++ b/tests/auto/opengl.pro
@@ -0,0 +1,6 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qgl \
+ qgl_threads \
+ qglbuffer \
+
diff --git a/tests/auto/other.pro b/tests/auto/other.pro
new file mode 100644
index 0000000..e220d1a
--- /dev/null
+++ b/tests/auto/other.pro
@@ -0,0 +1,58 @@
+# These tests don't nicely fit into one of the other .pro files.
+# They are testing too many Qt modules at the same time.
+
+TEMPLATE=subdirs
+SUBDIRS=\
+# exceptionsafety_objects \ shouldn't enable it
+ qaccessibility \
+ qalgorithms \
+ qcombobox \
+ qcssparser \
+ qdatastream \
+ qdir \
+ qfocusevent \
+ qimage \
+ qiodevice \
+ qitemmodel \
+ qlayout \
+ qmdiarea \
+ qmenu \
+ qmenubar \
+ qmouseevent \
+ qpainter \
+ qpixmap \
+ qprinter \
+ qsettings \
+ qsplitter \
+ qtabwidget \
+ qtextbrowser \
+ qtextdocument \
+ qtextedit \
+ qtoolbutton \
+ qvariant \
+ qwidget \
+ qworkspace \
+ windowsmobile
+
+contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter
+mac: {
+ SUBDIRS += macgui \
+ macplist \
+ qaccessibility_mac
+}
+
+embedded:!wince* {
+ SUBDIRS += qcopchannel \
+ qdirectpainter \
+ qmultiscreen
+}
+
+symbian {
+ SUBDIRS += qsoftkeymanager \
+ qs60mainapplication
+}
+
+# Following tests depends on private API
+!contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ qcssparser \
+
diff --git a/tests/auto/phonon.pro b/tests/auto/phonon.pro
new file mode 100644
index 0000000..7549428
--- /dev/null
+++ b/tests/auto/phonon.pro
@@ -0,0 +1,5 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ mediaobject \
+# mediaobject_wince_ds9 \ This is Windows CE only (we test the second phonon backend ds9 here)
+
diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp
index 7b8213d..86f87b8 100644
--- a/tests/auto/qdialog/tst_qdialog.cpp
+++ b/tests/auto/qdialog/tst_qdialog.cpp
@@ -464,8 +464,8 @@ public slots:
void tst_QDialog::throwInExec()
{
-#ifdef Q_WS_MAC
- QSKIP("Qt/Mac: Throwing exceptions in exec() is not supported.", SkipAll);
+#if defined(Q_WS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_))
+ QSKIP("Throwing exceptions in exec() is not supported on this platform.", SkipAll);
#endif
int caughtExceptions = 0;
try {
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp
index 76903e5..0f6cdaa 100644
--- a/tests/auto/qdom/tst_qdom.cpp
+++ b/tests/auto/qdom/tst_qdom.cpp
@@ -131,6 +131,7 @@ private slots:
void setContentWhitespace_data() const;
void taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const;
+ void cloneDTD_QTBUG8398() const;
void cleanupTestCase() const;
@@ -1908,5 +1909,29 @@ void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() co
QVERIFY(true);
}
+void tst_QDom::cloneDTD_QTBUG8398() const
+{
+ QString dtd("<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<!DOCTYPE first [\n"
+ "<!ENTITY secondFile SYSTEM 'second.xml'>\n"
+ "<!ENTITY thirdFile SYSTEM 'third.xml'>\n"
+ "]>\n"
+ "<first/>\n");
+ QDomDocument domDocument;
+ QVERIFY(domDocument.setContent(dtd));
+ QDomDocument domDocument2 = domDocument.cloneNode(true).toDocument();
+
+ // for some reason, our DOM implementation reverts the order of entities
+ QString expected("<?xml version='1.0' encoding='UTF-8'?>\n"
+ "<!DOCTYPE first [\n"
+ "<!ENTITY thirdFile SYSTEM 'third.xml'>\n"
+ "<!ENTITY secondFile SYSTEM 'second.xml'>\n"
+ "]>\n"
+ "<first/>\n");
+ QString output;
+ QTextStream stream(&output);
+ domDocument2.save(stream, 0);
+ QCOMPARE(output, expected);
+}
QTEST_MAIN(tst_QDom)
#include "tst_qdom.moc"
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 240885d..638c810 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -308,7 +308,7 @@ void tst_QFtp::connectToUnresponsiveHost()
if (setProxy)
QSKIP( "This test takes too long if we test with proxies too", SkipSingle );
- QString host = "1.2.3.4";
+ QString host = "192.0.2.42"; // IP out of TEST-NET, should be unreachable
uint port = 21;
ftp = newFtp();
diff --git a/tests/auto/qgl/qgl.pro b/tests/auto/qgl/qgl.pro
index 9116f39..5f058f9 100644
--- a/tests/auto/qgl/qgl.pro
+++ b/tests/auto/qgl/qgl.pro
@@ -6,6 +6,8 @@ load(qttest_p4)
requires(contains(QT_CONFIG,opengl))
QT += opengl
+contains(QT_CONFIG,egl):DEFINES += QGL_EGL
+
SOURCES += tst_qgl.cpp
RESOURCES = qgl.qrc
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 6ffe2a7..d89e463 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1073,8 +1073,7 @@ void tst_QGL::glFBOSimpleRendering()
QGLFramebufferObjectFormat fboFormat;
fboFormat.setAttachment(QGLFramebufferObject::NoAttachment);
- // Don't complicate things by using NPOT:
- QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat);
+ QGLFramebufferObject *fbo = new QGLFramebufferObject(200, 100, fboFormat);
fbo->bind();
@@ -1266,7 +1265,7 @@ protected:
widgetPainterBeginOk = widgetPainter.begin(this);
QGLFramebufferObjectFormat fboFormat;
fboFormat.setAttachment(QGLFramebufferObject::NoAttachment);
- QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat);
+ QGLFramebufferObject *fbo = new QGLFramebufferObject(100, 100, fboFormat);
QPainter fboPainter;
fboPainterBeginOk = fboPainter.begin(fbo);
@@ -1290,7 +1289,7 @@ void tst_QGL::glFBOUseInGLWidget()
#ifdef Q_WS_QWS
w.setWindowFlags(Qt::FramelessWindowHint);
#endif
- w.resize(128, 128);
+ w.resize(100, 100);
w.show();
#ifdef Q_WS_X11
@@ -1402,6 +1401,10 @@ void tst_QGL::glWidgetRenderPixmap()
QImage reference(fb.size(), QImage::Format_RGB32);
reference.fill(0xffff0000);
+#ifdef QGL_EGL
+ QSKIP("renderPixmap() not yet supported under EGL", SkipAll);
+#endif
+
QFUZZY_COMPARE_IMAGES(fb, reference);
}
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 795431b..1007d61 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -72,6 +72,7 @@ private slots:
void drawPixmapItem();
void deviceCoordinateTranslateCaching();
void inheritOpacity();
+ void dropShadowClipping();
};
void tst_QGraphicsEffect::initTestCase()
@@ -590,6 +591,28 @@ void tst_QGraphicsEffect::inheritOpacity()
QTRY_VERIFY(item->numRepaints > numRepaints);
}
+void tst_QGraphicsEffect::dropShadowClipping()
+{
+ QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
+ img.fill(0xffffffff);
+
+ QGraphicsScene scene;
+ QGraphicsRectItem *item = new QGraphicsRectItem(-5, -500, 10, 1000);
+ item->setGraphicsEffect(new QGraphicsDropShadowEffect);
+ item->setPen(Qt::NoPen);
+ item->setBrush(Qt::red);
+
+ scene.addItem(item);
+
+ QPainter p(&img);
+ scene.render(&p, img.rect(), QRect(-64, -64, 128, 128));
+ p.end();
+
+ for (int y = 1; y < img.height(); ++y)
+ for (int x = 0; x < img.width(); ++x)
+ QCOMPARE(img.pixel(x, y), img.pixel(x, y-1));
+}
+
QTEST_MAIN(tst_QGraphicsEffect)
#include "tst_qgraphicseffect.moc"
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 7c1b97e..4d9f23f 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -438,6 +438,7 @@ private slots:
void QTBUG_6738_missingUpdateWithSetParent();
void QTBUG_7714_fullUpdateDiscardingOpacityUpdate2();
void QT_2653_fullUpdateDiscardingOpacityUpdate();
+ void QT_2649_focusScope();
private:
QList<QGraphicsItem *> paintedItems;
@@ -10002,5 +10003,72 @@ void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2()
QTRY_COMPARE(view.repaints, 1);
}
+void tst_QGraphicsItem::QT_2649_focusScope()
+{
+ QGraphicsScene *scene = new QGraphicsScene;
+
+ QGraphicsRectItem *subFocusItem = new QGraphicsRectItem;
+ subFocusItem->setFlags(QGraphicsItem::ItemIsFocusable);
+ subFocusItem->setFocus();
+ QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+
+ QGraphicsRectItem *scope = new QGraphicsRectItem;
+ scope->setFlags(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsFocusScope);
+ scope->setFocus();
+ subFocusItem->setParentItem(scope);
+ QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0);
+ QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+
+ QGraphicsRectItem *rootItem = new QGraphicsRectItem;
+ rootItem->setFlags(QGraphicsItem::ItemIsFocusable);
+ scope->setParentItem(rootItem);
+ QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0);
+ QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0);
+ QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+
+ scene->addItem(rootItem);
+
+ QEvent windowActivate(QEvent::WindowActivate);
+ qApp->sendEvent(scene, &windowActivate);
+ scene->setFocus();
+
+ QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0);
+ QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0);
+ QVERIFY(subFocusItem->hasFocus());
+
+ scope->hide();
+
+ QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)0);
+ QCOMPARE(scope->focusItem(), (QGraphicsItem *)0);
+ QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)0);
+ QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0);
+ QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0);
+ QVERIFY(!subFocusItem->hasFocus());
+
+ scope->show();
+
+ QCOMPARE(rootItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(scope->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(rootItem->focusScopeItem(), (QGraphicsItem *)0);
+ QCOMPARE(scope->focusScopeItem(), (QGraphicsItem *)subFocusItem);
+ QCOMPARE(subFocusItem->focusScopeItem(), (QGraphicsItem *)0);
+ QVERIFY(subFocusItem->hasFocus());
+
+ // This should not crash
+ scope->hide();
+ delete scene;
+}
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index c77f76d..1c19fab 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -219,6 +219,7 @@ private slots:
void inputMethodSensitivity();
void inputContextReset();
void indirectPainting();
+ void compositionModeInDrawBackground();
// task specific tests below me
void task172231_untransformableItems();
@@ -3825,6 +3826,39 @@ void tst_QGraphicsView::indirectPainting()
QTRY_VERIFY(scene.drawCount > 0);
}
+void tst_QGraphicsView::compositionModeInDrawBackground()
+{
+ class MyView : public QGraphicsView
+ { public:
+ MyView(QGraphicsScene *scene) : QGraphicsView(scene),
+ painted(false), compositionMode(QPainter::CompositionMode_SourceOver) {}
+ bool painted;
+ QPainter::CompositionMode compositionMode;
+ void drawBackground(QPainter *painter, const QRectF &)
+ {
+ compositionMode = painter->compositionMode();
+ painted = true;
+ }
+ };
+
+ QGraphicsScene dummy;
+ MyView view(&dummy);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ // Make sure the painter's composition mode is SourceOver in drawBackground.
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.compositionMode, QPainter::CompositionMode_SourceOver);
+
+ view.painted = false;
+ view.setCacheMode(QGraphicsView::CacheBackground);
+ view.viewport()->update();
+
+ // Make sure the painter's composition mode is SourceOver in drawBackground
+ // with background cache enabled.
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.compositionMode, QPainter::CompositionMode_SourceOver);
+}
void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
{
QGraphicsView view;
diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp
index d5411d0..4282062 100644
--- a/tests/auto/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp
@@ -72,6 +72,7 @@
#endif
#include <qhostinfo.h>
+#include "private/qhostinfo_p.h"
#if !defined(QT_NO_GETADDRINFO)
# if !defined(Q_OS_WINCE)
@@ -108,10 +109,11 @@ public:
public slots:
void init();
void cleanup();
+ void initTestCase();
+
private slots:
void getSetCheck();
void staticInformation();
- void initTestCase();
void lookupIPv4_data();
void lookupIPv4();
void lookupIPv6_data();
@@ -128,6 +130,8 @@ private slots:
void multipleSameLookups();
void multipleDifferentLookups();
+ void cache();
+
protected slots:
void resultsReady(const QHostInfo &);
@@ -205,10 +209,21 @@ void tst_QHostInfo::initTestCase()
// We have IPv6 support
ipv6Available = true;
}
+
+
+ // run each testcase with and without test enabled
+ QTest::addColumn<bool>("cache");
+ QTest::newRow("WithCache") << true;
+ QTest::newRow("WithoutCache") << false;
}
void tst_QHostInfo::init()
{
+ // delete the cache so inidividual testcase results are independant from each other
+ qt_qhostinfo_clear_cache();
+
+ QFETCH_GLOBAL(bool, cache);
+ qt_qhostinfo_enable_cache(cache);
}
void tst_QHostInfo::cleanup()
@@ -458,6 +473,45 @@ void tst_QHostInfo::multipleDifferentLookups()
QTRY_VERIFY(lookupsDoneCounter == COUNT);
}
+void tst_QHostInfo::cache()
+{
+ QFETCH_GLOBAL(bool, cache);
+ if (!cache)
+ return; // test makes only sense when cache enabled
+
+ // reset slot counter
+ lookupsDoneCounter = 0;
+
+ // lookup once, wait in event loop, result should not come directly.
+ bool valid = true;
+ int id = -1;
+ QHostInfo result = qt_qhostinfo_lookup("localhost", this, SLOT(resultsReady(QHostInfo)), &valid, &id);
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(valid == false);
+ QVERIFY(result.addresses().isEmpty());
+
+ // loopkup second time, result should come directly
+ valid = false;
+ result = qt_qhostinfo_lookup("localhost", this, SLOT(resultsReady(QHostInfo)), &valid, &id);
+ QVERIFY(valid == true);
+ QVERIFY(!result.addresses().isEmpty());
+
+ // clear the cache
+ qt_qhostinfo_clear_cache();
+
+ // lookup third time, result should not come directly.
+ valid = true;
+ result = qt_qhostinfo_lookup("localhost", this, SLOT(resultsReady(QHostInfo)), &valid, &id);
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(valid == false);
+ QVERIFY(result.addresses().isEmpty());
+
+ // the slot should have been called 2 times.
+ QVERIFY(lookupsDoneCounter == 2);
+}
+
void tst_QHostInfo::resultsReady(const QHostInfo &hi)
{
lookupDone = true;
diff --git a/tests/auto/qicon/tst_qicon.cpp b/tests/auto/qicon/tst_qicon.cpp
index f861e40..fae9cc0 100644
--- a/tests/auto/qicon/tst_qicon.cpp
+++ b/tests/auto/qicon/tst_qicon.cpp
@@ -86,8 +86,14 @@ private slots:
private:
QString oldCurrentDir;
+
+ const static QIcon staticIcon;
};
+// Creating an icon statically should not cause a crash.
+// 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));
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index c8f846e..0161a68 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -2835,6 +2835,16 @@ void tst_QObject::installEventFilter()
QVERIFY(spy.eventList().isEmpty());
}
+class EmitThread : public QThread
+{ Q_OBJECT
+public:
+ void run(void) {
+ emit work();
+ }
+signals:
+ void work();
+};
+
class DeleteObject : public QObject
{
Q_OBJECT
@@ -2900,6 +2910,16 @@ void tst_QObject::deleteSelfInSlot()
QVERIFY(thread.wait(10000));
}
+
+ {
+ EmitThread sender;
+ DeleteObject *receiver = new DeleteObject();
+ connect(&sender, SIGNAL(work()), receiver, SLOT(deleteSelf()), Qt::DirectConnection);
+ QPointer<DeleteObject> p = receiver;
+ sender.start();
+ QVERIFY(sender.wait(10000));
+ QVERIFY(p.isNull());
+ }
}
class DisconnectObject : public QObject
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 41b9734..5339132 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -205,6 +205,13 @@ private slots:
void QTBUG_6618();
void QTBUG_6852_data() { generic_data("QMYSQL"); }
void QTBUG_6852();
+ void QTBUG_5765_data() { generic_data("QMYSQL"); }
+ void QTBUG_5765();
+
+#if 0
+ void benchmark_data() { generic_data(); }
+ void benchmark();
+#endif
private:
// returns all database connections
@@ -309,7 +316,14 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db )
<< qTableName( "blobstest" )
<< qTableName( "oraRowId" )
<< qTableName( "qtest_batch" )
- << qTableName(QLatin1String("bug6421")).toUpper();
+ << qTableName("bug6421").toUpper()
+ << qTableName("bug5765")
+ << qTableName("bug6852")
+ << qTableName( "qtest_lockedtable" )
+ << qTableName( "Planet" )
+ << qTableName( "task_250026" )
+ << qTableName( "task_234422" )
+ << qTableName("test141895");
if ( db.driverName().startsWith("QPSQL") )
tablenames << qTableName("task_233829");
@@ -320,19 +334,11 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db )
if ( tst_Databases::isSqlServer( db ) || db.driverName().startsWith( "QOCI" ) )
tablenames << qTableName( "qtest_longstr" );
- tablenames << qTableName( "qtest_lockedtable" );
-
- tablenames << qTableName( "Planet" );
+ if (tst_Databases::isSqlServer( db ))
+ db.exec("DROP PROCEDURE " + qTableName("test141895_proc"));
- tablenames << qTableName( "task_250026" );
- tablenames << qTableName( "task_234422" );
-
- if (tst_Databases::isSqlServer( db )) {
- QSqlQuery q( db );
- q.exec("DROP PROCEDURE " + qTableName("test141895_proc"));
- }
-
- tablenames << qTableName("test141895");
+ if (tst_Databases::isMySQL( db ))
+ db.exec("DROP PROCEDURE IF EXISTS "+qTableName("bug6852_proc"));
tst_Databases::safeDropTables( db, tablenames );
@@ -2996,10 +3002,9 @@ void tst_QSqlQuery::QTBUG_6852()
QSKIP( "Test requires MySQL >= 5.0", SkipSingle );
QSqlQuery q(db);
- QString tableName(qTableName(QLatin1String("bug6421"))), procName(qTableName(QLatin1String("bug6421_proc")));
+ QString tableName(qTableName(QLatin1String("bug6852"))), procName(qTableName(QLatin1String("bug6852_proc")));
QVERIFY_SQL(q, exec("DROP PROCEDURE IF EXISTS "+procName));
- tst_Databases::safeDropTable(db, tableName);
QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(\n"
"MainKey INT NOT NULL,\n"
"OtherTextCol VARCHAR(45) NOT NULL,\n"
@@ -3022,6 +3027,72 @@ void tst_QSqlQuery::QTBUG_6852()
QCOMPARE(q.value(1).toString(), QLatin1String("Disabled"));
}
+void tst_QSqlQuery::QTBUG_5765()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+ if ( tst_Databases::getMySqlVersion( db ).section( QChar('.'), 0, 1 ).toFloat()<4.1 )
+ QSKIP( "Test requires MySQL >= 4.1", SkipSingle );
+
+ QSqlQuery q(db);
+ QString tableName(qTableName(QLatin1String("bug5765")));
+
+ QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(testval TINYINT(1) DEFAULT 0)"));
+ q.prepare("INSERT INTO "+tableName+" SET testval = :VALUE");
+ q.bindValue(":VALUE", 1);
+ QVERIFY_SQL(q, exec());
+ q.bindValue(":VALUE", 12);
+ QVERIFY_SQL(q, exec());
+ q.bindValue(":VALUE", 123);
+ QVERIFY_SQL(q, exec());
+ QString sql="select testval from "+tableName;
+ QVERIFY_SQL(q, exec(sql));
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 1);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 12);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 123);
+ QVERIFY_SQL(q, prepare(sql));
+ QVERIFY_SQL(q, exec());
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 1);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 12);
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toInt(), 123);
+}
+
+#if 0
+void tst_QSqlQuery::benchmark()
+{
+ QFETCH( QString, dbName );
+ QSqlDatabase db = QSqlDatabase::database( dbName );
+ CHECK_DATABASE( db );
+ if ( tst_Databases::getMySqlVersion( db ).section( QChar('.'), 0, 0 ).toInt()<5 )
+ QSKIP( "Test requires MySQL >= 5.0", SkipSingle );
+
+ QSqlQuery q(db);
+ QString tableName(qTableName(QLatin1String("benchmark")));
+
+ tst_Databases::safeDropTable( db, tableName );
+
+ QVERIFY_SQL(q, exec("CREATE TABLE "+tableName+"(\n"
+ "MainKey INT NOT NULL,\n"
+ "OtherTextCol VARCHAR(45) NOT NULL,\n"
+ "PRIMARY KEY(`MainKey`))"));
+
+ int i=1;
+
+ QBENCHMARK {
+ QVERIFY_SQL(q, exec("INSERT INTO "+tableName+" VALUES("+QString::number(i)+", \"Value"+QString::number(i)+"\")"));
+ i++;
+ }
+
+ tst_Databases::safeDropTable( db, tableName );
+}
+#endif
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro
index 147175e..541b2d9 100644
--- a/tests/auto/qsslsocket/qsslsocket.pro
+++ b/tests/auto/qsslsocket/qsslsocket.pro
@@ -32,3 +32,5 @@ wince* {
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
+
+requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index abd3237..ad2b50d 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -54,6 +54,8 @@
#include <QNetworkProxy>
#include <QAuthenticator>
+#include "private/qhostinfo_p.h"
+
#include "../network-settings.h"
Q_DECLARE_METATYPE(QAbstractSocket::SocketState)
@@ -288,6 +290,8 @@ void tst_QSslSocket::init()
}
QNetworkProxy::setApplicationProxy(proxy);
}
+
+ qt_qhostinfo_clear_cache();
}
void tst_QSslSocket::cleanup()
@@ -477,7 +481,7 @@ void tst_QSslSocket::simpleConnectWithIgnore()
// Start connecting
socket.connectToHost(QtNetworkSettings::serverName(), 993);
- QCOMPARE(socket.state(), QAbstractSocket::HostLookupState);
+ QVERIFY(socket.state() != QAbstractSocket::UnconnectedState); // something must be in progress
enterLoop(10);
// Start handshake
diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
index dc37c42..d79ebb9 100644
--- a/tests/auto/qstring/tst_qstring.cpp
+++ b/tests/auto/qstring/tst_qstring.cpp
@@ -3646,7 +3646,10 @@ void tst_QString::section_data()
<< QString("\\b") << 3 << 3
<< int(QString::SectionDefault)
<< QString("is") << true;
-
+ QTest::newRow( "task257941-rx" ) << QString("99.0 42.3")
+ << QString("\\s*[AaBb]\\s*") << 1 << 1
+ << int(QString::SectionIncludeLeadingSep)
+ << QString() << true;
}
void tst_QString::section()
diff --git a/tests/auto/qstringmatcher/qstringmatcher.pro b/tests/auto/qstringmatcher/qstringmatcher.pro
index e478d4e..2c15097 100644
--- a/tests/auto/qstringmatcher/qstringmatcher.pro
+++ b/tests/auto/qstringmatcher/qstringmatcher.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
SOURCES += tst_qstringmatcher.cpp
-
+QT = core
DEFINES += QT_NO_CAST_TO_ASCII
diff --git a/tests/auto/qt3support.pro b/tests/auto/qt3support.pro
new file mode 100644
index 0000000..3657cfe
--- /dev/null
+++ b/tests/auto/qt3support.pro
@@ -0,0 +1,54 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ q3accel \
+ q3action \
+ q3actiongroup \
+ q3buttongroup \
+ q3canvas \
+ q3checklistitem \
+ q3cstring \
+ q3databrowser \
+ q3dateedit \
+ q3datetimeedit \
+ q3deepcopy \
+ q3dict \
+ q3dns \
+ q3dockwindow \
+ q3filedialog \
+ q3groupbox \
+ q3hbox \
+ q3header \
+ q3iconview \
+ q3listbox \
+ q3listview \
+ q3listviewitemiterator \
+ q3mainwindow \
+ q3popupmenu \
+ q3process \
+ q3progressbar \
+ q3progressdialog \
+ q3ptrlist \
+ q3richtext \
+ q3scrollview \
+ q3semaphore \
+ q3serversocket \
+ q3socket \
+ q3socketdevice \
+ q3sqlcursor \
+ q3sqlselectcursor \
+ q3stylesheet \
+ q3tabdialog \
+ q3table \
+ q3textbrowser \
+ q3textedit \
+ q3textstream \
+ q3timeedit \
+ q3toolbar \
+ q3urloperator \
+ q3valuelist \
+ q3valuevector \
+ q3combobox \
+ q3frame \
+ q3uridrag \
+ q3widgetstack
+
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 430712c..35fba52 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -199,6 +199,8 @@ private slots:
void taskQTBUG_5062_spansInconsistency();
void taskQTBUG_4516_clickOnRichTextLabel();
void taskQTBUG_5237_wheelEventOnHeader();
+ void taskQTBUG_8585_crashForNoGoodReason();
+ void taskQTBUG_7774_RtoLVisualRegionForSelection();
void mouseWheel_data();
void mouseWheel();
@@ -3948,5 +3950,75 @@ void tst_QTableView::taskQTBUG_5237_wheelEventOnHeader()
QVERIFY(sbValueBefore != sbValueAfter);
}
+class TestTableView : public QTableView {
+Q_OBJECT
+public:
+ TestTableView(QWidget *parent = 0) : QTableView(parent)
+ {
+ connect(this, SIGNAL(entered(const QModelIndex&)), this, SLOT(openEditor(const QModelIndex&)));
+ }
+ ~TestTableView(){}
+public slots:
+ void onDataChanged()
+ {
+ for (int i = 0; i < model()->rowCount(); i++) {
+ setRowHidden(i, model()->data(model()->index(i, 0)).toBool());
+ }
+ }
+
+ void openEditor(const QModelIndex& index)
+ { openPersistentEditor(index); }
+};
+
+
+void tst_QTableView::taskQTBUG_8585_crashForNoGoodReason()
+{
+ QStandardItemModel model;
+ model.insertColumn(0, QModelIndex());
+ for(int i = 0; i < 20; i++)
+ {
+ model.insertRow(i);
+ }
+
+ TestTableView w;
+ w.setMouseTracking(true);
+ w.setModel(&model);
+ connect(&model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), &w, SLOT(onDataChanged()));
+ w.show();
+ QTest::qWaitForWindowShown(&w);
+ for (int i = 0; i < 10; i++)
+ {
+ QTest::mouseMove(w.viewport(), QPoint(50, 20));
+ w.model()->setData(w.indexAt(QPoint(50, 20)), true);
+ QTest::mouseMove(w.viewport(), QPoint(50, 25));
+ }
+}
+
+
+class TableView7774 : public QTableView
+{
+public:
+ QRegion visualRegionForSelection(const QItemSelection &selection) const
+ {
+ return QTableView::visualRegionForSelection(selection);
+ }
+};
+
+void tst_QTableView::taskQTBUG_7774_RtoLVisualRegionForSelection()
+{
+ TableView7774 view;
+ QStandardItemModel model(5,5);
+ view.setModel(&model);
+ view.setLayoutDirection(Qt::RightToLeft);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ QItemSelectionRange range(model.index(2, 0), model.index(2, model.columnCount() - 1));
+ QItemSelection selection;
+ selection << range;
+ QRegion region = view.visualRegionForSelection(selection);
+ QCOMPARE(region.rects().at(0), view.visualRect(range.topLeft()) | view.visualRect(range.bottomRight()));
+}
+
QTEST_MAIN(tst_QTableView)
#include "tst_qtableview.moc"
diff --git a/tests/auto/qtcpsocket/qtcpsocket.pro b/tests/auto/qtcpsocket/qtcpsocket.pro
index 4bbec23..3d4eba3 100644
--- a/tests/auto/qtcpsocket/qtcpsocket.pro
+++ b/tests/auto/qtcpsocket/qtcpsocket.pro
@@ -3,3 +3,6 @@ TEMPLATE = subdirs
!wince*: SUBDIRS = test stressTest
wince*|symbian*|vxworks* : SUBDIRS = test
+
+
+requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 12686bb..5a209c2 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -92,6 +92,8 @@
#include <unistd.h>
#endif
+#include "private/qhostinfo_p.h"
+
#include "../network-settings.h"
Q_DECLARE_METATYPE(QAbstractSocket::SocketError)
@@ -316,6 +318,8 @@ void tst_QTcpSocket::init()
}
QNetworkProxy::setApplicationProxy(proxy);
}
+
+ qt_qhostinfo_clear_cache();
}
QTcpSocket *tst_QTcpSocket::newSocket() const
@@ -1060,7 +1064,9 @@ void tst_QTcpSocket::disconnectWhileLookingUp()
// just connect and disconnect, then make sure nothing weird happened
QTcpSocket *socket = newSocket();
socket->connectToHost(QtNetworkSettings::serverName(), 21);
- QVERIFY(socket->state() == QAbstractSocket::HostLookupState);
+
+ // check that connect is in progress
+ QVERIFY(socket->state() != QAbstractSocket::UnconnectedState);
QFETCH(bool, doClose);
if (doClose) {
@@ -1666,7 +1672,10 @@ void tst_QTcpSocket::waitForConnectedInHostLookupSlot()
connect(tmpSocket, SIGNAL(hostFound()), this, SLOT(hostLookupSlot()));
tmpSocket->connectToHost(QtNetworkSettings::serverName(), 143);
- loop.exec();
+ // only execute the loop if not already connected
+ if (tmpSocket->state() != QAbstractSocket::ConnectedState)
+ loop.exec();
+
QCOMPARE(timerSpy.count(), 0);
delete tmpSocket;
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index 1a4182f..98d7436 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -1968,6 +1968,10 @@ void tst_QVariant::operator_eq_eq_data()
QTest::newRow("HashSecondLarger") << QVariant(hash1) << QVariant(hash2) << false;
}
+
+ QTest::newRow( "UserType" ) << QVariant(QVariant::UserType) << QVariant(QVariant::UserType) << true;
+ QVariant mUserType(QVariant::UserType);
+ QTest::newRow( "Shared UserType" ) << mUserType << mUserType << true;
}
void tst_QVariant::operator_eq_eq()
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index b59017b..abd9604 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -8829,7 +8829,15 @@ void tst_QWidget::translucentWidget()
#endif
QTest::qWait(200);
- QPixmap widgetSnapshot = QPixmap::grabWindow(label.winId());
+ QPixmap widgetSnapshot;
+
+#ifdef Q_WS_WIN
+ QWidget *desktopWidget = QApplication::desktop()->screen(0);
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
+ widgetSnapshot = QPixmap::grabWindow(desktopWidget->winId(), 0,0, label.width(), label.height());
+ else
+#endif
+ widgetSnapshot = QPixmap::grabWindow(label.winId());
QImage actual = widgetSnapshot.toImage().convertToFormat(QImage::Format_RGB32);
QImage expected = pm.toImage().convertToFormat(QImage::Format_RGB32);
QCOMPARE(actual.size(),expected.size());
diff --git a/tests/auto/script.pro b/tests/auto/script.pro
new file mode 100644
index 0000000..06f51b5
--- /dev/null
+++ b/tests/auto/script.pro
@@ -0,0 +1,16 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qscriptable \
+ qscriptclass \
+ qscriptcontext \
+ qscriptcontextinfo \
+ qscriptengine \
+ qscriptengineagent \
+ qscriptenginedebugger \
+ qscriptextqobject \
+ qscriptjstestsuite \
+ qscriptstring \
+ qscriptv8testsuite \
+ qscriptvalue \
+ qscriptvalueiterator \
+
diff --git a/tests/auto/sql.pro b/tests/auto/sql.pro
new file mode 100644
index 0000000..7cfd137
--- /dev/null
+++ b/tests/auto/sql.pro
@@ -0,0 +1,14 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qsql \
+ qsqldatabase \
+ qsqldriver \
+ qsqlerror \
+ qsqlfield \
+ qsqlquery \
+ qsqlquerymodel \
+ qsqlrecord \
+ qsqlrelationaltablemodel \
+ qsqltablemodel \
+ qsqlthread \
+
diff --git a/tests/auto/svg.pro b/tests/auto/svg.pro
new file mode 100644
index 0000000..cb3cccb
--- /dev/null
+++ b/tests/auto/svg.pro
@@ -0,0 +1,6 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qsvgdevice \
+ qsvggenerator \
+ qsvgrenderer \
+
diff --git a/tests/auto/webkit.pro b/tests/auto/webkit.pro
new file mode 100644
index 0000000..8c7ccba
--- /dev/null
+++ b/tests/auto/webkit.pro
@@ -0,0 +1,8 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qwebelement \
+ qwebframe \
+ qwebhistory \
+ qwebhistoryinterface \
+ qwebpage \
+
diff --git a/tests/auto/xml.pro b/tests/auto/xml.pro
new file mode 100644
index 0000000..76afec8
--- /dev/null
+++ b/tests/auto/xml.pro
@@ -0,0 +1,8 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qdom \
+ qxml \
+ qxmlinputsource \
+ qxmlsimplereader \
+ qxmlstream \
+
diff --git a/tests/auto/xmlpatterns.pro b/tests/auto/xmlpatterns.pro
new file mode 100644
index 0000000..f670266
--- /dev/null
+++ b/tests/auto/xmlpatterns.pro
@@ -0,0 +1,47 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ checkxmlfiles \
+ patternistexamplefiletree \
+ patternistexamples \
+ patternistheaders \
+ qabstractmessagehandler \
+ qabstracturiresolver \
+ qabstractxmlforwarditerator \
+ qabstractxmlnodemodel \
+ qabstractxmlreceiver \
+ qapplicationargumentparser \
+ qautoptr \
+ qsimplexmlnodemodel \
+ qsourcelocation \
+ qxmlformatter \
+ qxmlitem \
+ qxmlname \
+ qxmlnamepool \
+ qxmlnodemodelindex \
+ qxmlquery \
+ qxmlresultitems \
+ qxmlschema \
+ qxmlschemavalidator \
+ qxmlserializer \
+ xmlpatterns \
+ xmlpatternsdiagnosticsts \
+ xmlpatternsschema \
+ xmlpatternsschemats \
+ xmlpatternssdk \
+ xmlpatternsvalidator \
+ xmlpatternsview \
+ xmlpatternsxqts \
+ xmlpatternsxslts \
+
+xmlpatternsdiagnosticsts.depends = xmlpatternssdk
+xmlpatternsview.depends = xmlpatternssdk
+xmlpatternsxslts.depends = xmlpatternssdk
+xmlpatternsschemats.depends = xmlpatternssdk
+
+!contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ xmlpatternsdiagnosticsts \
+ xmlpatternsview \
+ xmlpatternssdk \
+ xmlpatternsxqts \
+ xmlpatternsxslts \
+
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 1238804..4fe4723 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
+++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp
@@ -165,7 +165,7 @@ private slots:
WIN32_FIND_DATA fd;
HANDLE hSearch = FindFirstFileW(appendedPath, &fd);
- QVERIFY(hSearch == INVALID_HANDLE_VALUE);
+ QVERIFY(hSearch != INVALID_HANDLE_VALUE);
QBENCHMARK {
do {
diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp
index 103b77c..2dc0e86 100644
--- a/tests/benchmarks/corelib/io/qfile/main.cpp
+++ b/tests/benchmarks/corelib/io/qfile/main.cpp
@@ -175,7 +175,10 @@ void tst_qfile::cleanupTestCase()
void tst_qfile::readBigFile_QFile() { readBigFile(); }
void tst_qfile::readBigFile_QFSFileEngine() { readBigFile(); }
-void tst_qfile::readBigFile_posix() { readBigFile(); }
+void tst_qfile::readBigFile_posix()
+{
+ readBigFile();
+}
void tst_qfile::readBigFile_Win32() { readBigFile(); }
void tst_qfile::readBigFile_QFile_data()
@@ -476,8 +479,14 @@ void tst_qfile::open()
void tst_qfile::readSmallFiles_QFile() { readSmallFiles(); }
void tst_qfile::readSmallFiles_QFSFileEngine() { readSmallFiles(); }
-void tst_qfile::readSmallFiles_posix() { readSmallFiles(); }
-void tst_qfile::readSmallFiles_Win32() { readSmallFiles(); }
+void tst_qfile::readSmallFiles_posix()
+{
+ readSmallFiles();
+}
+void tst_qfile::readSmallFiles_Win32()
+{
+ readSmallFiles();
+}
void tst_qfile::readSmallFiles_QFile_data()
{
@@ -534,7 +543,7 @@ void tst_qfile::createSmallFiles()
dir.cd("tst");
tmpDirName = dir.absolutePath();
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE)
for (int i = 0; i < 100; ++i)
#else
for (int i = 0; i < 1000; ++i)
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index a6e405c..edf0eff 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -133,7 +133,7 @@ struct Large { // A "large" item type
};
// Symbian devices typically have limited memory
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE)
# define LARGE_MAX_SIZE 2000
#else
# define LARGE_MAX_SIZE 20000
diff --git a/tests/benchmarks/corelib/tools/qstringlist/main.cpp b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
index 1717b88..a4969bf 100644
--- a/tests/benchmarks/corelib/tools/qstringlist/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstringlist/main.cpp
@@ -163,6 +163,7 @@ void tst_QStringList::split_qlist_qstring() const
void tst_QStringList::split_stdvector_stdstring() const
{
+#ifndef QT_NO_STL
QFETCH(QString, input);
const char split_char = ':';
std::string stdinput = input.toStdString();
@@ -175,10 +176,12 @@ void tst_QStringList::split_stdvector_stdstring() const
token.push_back(each))
;
}
+#endif
}
void tst_QStringList::split_stdvector_stdwstring() const
{
+#ifndef QT_NO_STL
QFETCH(QString, input);
const wchar_t split_char = ':';
std::wstring stdinput = input.toStdWString();
@@ -191,6 +194,7 @@ void tst_QStringList::split_stdvector_stdwstring() const
token.push_back(each))
;
}
+#endif
}
void tst_QStringList::split_stdlist_stdstring() const
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 3c0ae71..ba56d58 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -414,6 +414,9 @@ void tst_QGraphicsView::chipTester_data()
void tst_QGraphicsView::chipTester()
{
+#ifdef Q_WS_WINCE_WM
+QSKIP("WinCE WM: Fails on Windows Mobile w/o OpenGL", SkipAll);
+#endif
QFETCH(bool, antialias);
QFETCH(bool, opengl);
QFETCH(int, operation);
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index f173ed1..90ae153 100644
--- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -555,7 +555,7 @@ void tst_qnetworkreply::uploadPerformance()
void tst_qnetworkreply::httpUploadPerformance()
{
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE_WM)
// SHow some mercy for non-desktop platform/s
enum {UploadSize = 4*1024*1024}; // 4 MB
#else
@@ -626,7 +626,7 @@ void tst_qnetworkreply::httpDownloadPerformance()
{
QFETCH(bool, serverSendsContentLength);
QFETCH(bool, chunkedEncoding);
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_WINCE_WM)
// Show some mercy to non-desktop platform/s
enum {UploadSize = 4*1024*1024}; // 4 MB
#else
diff --git a/tests/benchmarks/network/kernel/qhostinfo/main.cpp b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
index 0ae1b7f..f4648d6 100644
--- a/tests/benchmarks/network/kernel/qhostinfo/main.cpp
+++ b/tests/benchmarks/network/kernel/qhostinfo/main.cpp
@@ -48,10 +48,15 @@
#include <qtest.h>
#include <qtesteventloop.h>
+#include "private/qhostinfo_p.h"
+
class tst_qhostinfo : public QObject
{
Q_OBJECT
+public slots:
+ void init();
private slots:
+ void lookupSpeed_data();
void lookupSpeed();
};
@@ -70,14 +75,33 @@ public slots:
}
};
+void tst_qhostinfo::init()
+{
+ // delete the cache so inidividual testcase results are independant from each other
+ qt_qhostinfo_clear_cache();
+}
+
+void tst_qhostinfo::lookupSpeed_data()
+{
+ QTest::addColumn<bool>("cache");
+ QTest::newRow("WithCache") << true;
+ QTest::newRow("WithoutCache") << false;
+}
+
void tst_qhostinfo::lookupSpeed()
{
+ QFETCH(bool, cache);
+ qt_qhostinfo_enable_cache(cache);
+
QStringList hostnameList;
hostnameList << "www.ovi.com" << "www.nokia.com" << "qt.nokia.com" << "www.trolltech.com" << "troll.no"
<< "www.qtcentre.org" << "forum.nokia.com" << "www.forum.nokia.com" << "wiki.forum.nokia.com"
<< "www.nokia.no" << "nokia.de" << "127.0.0.1" << "----";
// also add some duplicates:
hostnameList << "www.nokia.com" << "127.0.0.1" << "www.trolltech.com";
+ // and some more
+ hostnameList << hostnameList;
+
const int COUNT = hostnameList.size();
SignalReceiver receiver(COUNT);
diff --git a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
index 022bf3d..c77c619 100644
--- a/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -175,6 +175,9 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest()
QFETCH_GLOBAL(bool, setProxy);
if (setProxy)
return;
+#if defined(Q_WS_WINCE_WM)
+ QSKIP("WinCE WM: Not yet supported", SkipAll);
+#endif
#if defined(Q_OS_SYMBIAN)
QSKIP("Symbian: IPv6 is not yet supported", SkipAll);