summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp4
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro4
-rw-r--r--tests/auto/corelib/global/qtendian/qtendian.pro4
-rw-r--r--tests/auto/corelib/io/io.pro2
-rw-r--r--tests/auto/corelib/io/largefile/largefile.pro2
-rw-r--r--tests/auto/corelib/io/largefile/tst_largefile.cpp16
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp45
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp43
-rw-r--r--tests/auto/corelib/io/qdiriterator/qdiriterator.pro2
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp27
-rw-r--r--tests/auto/corelib/io/qfile/qfile.pro7
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro1
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp93
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro2
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp95
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp11
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp6
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp8
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pri3
-rw-r--r--tests/auto/corelib/io/qprocess/qprocess.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp11
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp151
-rw-r--r--tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp14
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp2
-rw-r--r--tests/auto/corelib/io/qstorageinfo/BLACKLIST2
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp4
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp11
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp22
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp24
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp2
-rw-r--r--tests/auto/corelib/kernel/qeventloop/qeventloop.pro2
-rw-r--r--tests/auto/corelib/kernel/qmetatype/qmetatype.pro4
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro3
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp4
-rw-r--r--tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp7
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp3
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/lib.pro1
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro1
-rw-r--r--tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp13
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp5
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp6
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp20
-rw-r--r--tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp2
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp10
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp14
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp3
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp6
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp17
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp32
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp4
-rw-r--r--tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp30
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp18
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp20
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp4
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp123
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp55
-rw-r--r--tests/auto/corelib/tools/qstringapisymmetry/.gitignore1
-rw-r--r--tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro5
-rw-r--r--tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp176
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp13
-rw-r--r--tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp4
-rw-r--r--tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp13
-rw-r--r--tests/auto/corelib/tools/tools.pro1
-rw-r--r--tests/auto/dbus/qdbusmarshall/qdbusmarshall/qdbusmarshall.pro4
-rw-r--r--tests/auto/dbus/qdbustype/qdbustype.pro4
-rw-r--r--tests/auto/gui/image/qicoimageformat/qicoimageformat.pro9
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp8
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp84
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp6
-rw-r--r--tests/auto/gui/image/qmovie/qmovie.pro4
-rw-r--r--tests/auto/gui/image/qpixmap/qpixmap.pro4
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp33
-rw-r--r--tests/auto/gui/kernel/kernel.pro2
-rw-r--r--tests/auto/gui/kernel/noqteventloop/noqteventloop.pro2
-rw-r--r--tests/auto/gui/kernel/qclipboard/copier/main.cpp2
-rw-r--r--tests/auto/gui/kernel/qclipboard/paster/main.cpp4
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/test.pro4
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp4
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp12
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp16
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp4
-rw-r--r--tests/auto/gui/kernel/qwindow/qwindow.pro2
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp4
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp2
-rw-r--r--tests/auto/gui/painting/qregion/tst_qregion.cpp40
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp2
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp60
-rw-r--r--tests/auto/gui/text/qcssparser/qcssparser.pro8
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp34
-rw-r--r--tests/auto/gui/text/qfont/BLACKLIST2
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp10
-rw-r--r--tests/auto/gui/text/qfontdatabase/qfontdatabase.pro6
-rw-r--r--tests/auto/gui/text/qglyphrun/qglyphrun.pro11
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp21
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp2
-rw-r--r--tests/auto/gui/text/qzip/qzip.pro6
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp2
-rw-r--r--tests/auto/network/access/qftp/qftp.pro7
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp9
-rw-r--r--tests/auto/network/access/qnetworkreply/qnetworkreply.pro2
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp29
-rw-r--r--tests/auto/network/kernel/qhostaddress/qhostaddress.pro8
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp50
-rw-r--r--tests/auto/network/kernel/qhostinfo/qhostinfo.pro6
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp8
-rw-r--r--tests/auto/network/socket/platformsocketengine/platformsocketengine.pri8
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp5
-rw-r--r--tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp4
-rw-r--r--tests/auto/network/socket/qlocalsocket/test/test.pro8
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp2
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp4
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/main.cpp8
-rw-r--r--tests/auto/network/socket/qtcpserver/test/test.pro11
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp39
-rw-r--r--tests/auto/network/socket/qtcpsocket/qtcpsocket.pro2
-rw-r--r--tests/auto/network/socket/qtcpsocket/test/test.pro8
-rw-r--r--tests/auto/network/socket/qudpsocket/test/test.pro6
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp15
-rw-r--r--tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro2
-rw-r--r--tests/auto/network/ssl/qsslcipher/qsslcipher.pro2
-rw-r--r--tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro2
-rw-r--r--tests/auto/network/ssl/qsslerror/qsslerror.pro2
-rw-r--r--tests/auto/network/ssl/qsslkey/qsslkey.pro2
-rw-r--r--tests/auto/network/ssl/qsslsocket/qsslsocket.pro12
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp194
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro8
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro8
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp12
-rw-r--r--tests/auto/other/other.pro5
-rw-r--r--tests/auto/other/qaccessibility/qaccessibility.pro6
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp41
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp30
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp26
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp26
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp30
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp26
-rw-r--r--tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp30
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.cpp148
-rw-r--r--tests/auto/other/windowsmobile/test/ddhelper.h49
-rw-r--r--tests/auto/other/windowsmobile/test/test.pro23
-rw-r--r--tests/auto/other/windowsmobile/test/testQMenuBar_current.pngbin22964 -> 0 bytes
-rw-r--r--tests/auto/other/windowsmobile/test/testSimpleWidget_current.pngbin23841 -> 0 bytes
-rw-r--r--tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp195
-rw-r--r--tests/auto/other/windowsmobile/test/windowsmobile.qrc6
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/main.cpp98
-rw-r--r--tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro5
-rw-r--r--tests/auto/other/windowsmobile/windowsmobile.pro9
-rw-r--r--tests/auto/qtest-config.h40
-rw-r--r--tests/auto/sql/kernel/qsql/qsql.pro6
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro14
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h28
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp31
-rw-r--r--tests/auto/sql/kernel/qsqldriver/qsqldriver.pro13
-rw-r--r--tests/auto/sql/kernel/qsqlquery/qsqlquery.pro9
-rw-r--r--tests/auto/sql/kernel/qsqlthread/qsqlthread.pro11
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro8
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro13
-rw-r--r--tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro10
-rw-r--r--tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp36
-rw-r--r--tests/auto/testlib/selftests/crashes/tst_crashes.cpp2
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml64
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.teamcity60
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt60
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml64
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xunitxml4
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp7
-rw-r--r--tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro2
-rw-r--r--tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro2
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp8
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro14
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp3
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro15
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp52
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp46
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/BLACKLIST1
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp5
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp20
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp11
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp20
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp23
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro13
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp23
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp55
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp12
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp11
-rw-r--r--tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp3
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro2
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp23
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp45
-rw-r--r--tests/auto/widgets/itemviews/qlistview/qlistview.pro2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp48
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp13
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp9
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/test.pro2
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp46
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp237
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp43
-rw-r--r--tests/auto/widgets/kernel/qlayout/qlayout.pro8
-rw-r--r--tests/auto/widgets/kernel/qwidget/qwidget.pro2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp151
-rw-r--r--tests/auto/widgets/styles/qstyle/qstyle.pro6
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp54
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST2
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp6
-rw-r--r--tests/auto/widgets/styles/styles.pro2
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp10
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp4
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp12
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro2
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp28
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp6
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp9
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp40
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp38
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp15
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp30
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp22
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro2
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp17
-rw-r--r--tests/auto/xml/dom/qdom/qdom.pro5
229 files changed, 1764 insertions, 2921 deletions
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index 320e0095d3..a8d64f1cd9 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -62,8 +62,8 @@ private slots:
void tst_QParallelAnimationGroup::initTestCase()
{
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
-#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
- // give the mac/wince app start event queue time to clear
+#if defined(Q_OS_DARWIN)
+ // give the Darwin app start event queue time to clear
QTest::qWait(1000);
#endif
}
diff --git a/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro b/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro
index 9f2e4f9c92..302d887fc7 100644
--- a/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro
+++ b/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro
@@ -1,4 +1,2 @@
TEMPLATE = subdirs
-SUBDIRS = test
-
-!wince: SUBDIRS += echo
+SUBDIRS = test echo
diff --git a/tests/auto/corelib/global/qtendian/qtendian.pro b/tests/auto/corelib/global/qtendian/qtendian.pro
index 2b0af4fa4c..214c706ca5 100644
--- a/tests/auto/corelib/global/qtendian/qtendian.pro
+++ b/tests/auto/corelib/global/qtendian/qtendian.pro
@@ -2,7 +2,3 @@ CONFIG += testcase
TARGET = tst_qtendian
QT = core testlib
SOURCES = tst_qtendian.cpp
-wince* { # QTBUG-37194 , internal compiler errors with MSVC2008 for Windows CE
- QMAKE_CFLAGS_RELEASE -= -O2
- QMAKE_CXXFLAGS_RELEASE -= -O2
-}
diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro
index 29717b3a1c..24c762ed84 100644
--- a/tests/auto/corelib/io/io.pro
+++ b/tests/auto/corelib/io/io.pro
@@ -35,7 +35,7 @@ SUBDIRS=\
qurlquery \
qwinoverlappedionotifier \
-!win32|wince* {
+!win32 {
SUBDIRS -=\
qwinoverlappedionotifier
}
diff --git a/tests/auto/corelib/io/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro
index caef116684..6c1bb8d7ea 100644
--- a/tests/auto/corelib/io/largefile/largefile.pro
+++ b/tests/auto/corelib/io/largefile/largefile.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_largefile
QT = core testlib
SOURCES = tst_largefile.cpp
-
-wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp
index e448093062..a19a5ce58d 100644
--- a/tests/auto/corelib/io/largefile/tst_largefile.cpp
+++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp
@@ -39,18 +39,12 @@
#include <cstdio>
#ifdef Q_OS_WIN
-
-#include <windows.h>
-
-#ifndef Q_OS_WINCE
-#include <io.h>
-#endif
-
-#ifndef FSCTL_SET_SPARSE
+# include <qt_windows.h>
+# include <io.h>
+# ifndef FSCTL_SET_SPARSE
// MinGW doesn't define this.
-#define FSCTL_SET_SPARSE (0x900C4)
-#endif
-
+# define FSCTL_SET_SPARSE (0x900C4)
+# endif
#endif // Q_OS_WIN
class tst_LargeFile
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index f5a546ebf1..912d782ffa 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -35,8 +35,6 @@
#include <QtGui/QPainter>
#include <QtGui/QPen>
-#include "../../../qtest-config.h"
-
class tst_QDataStream : public QObject
{
Q_OBJECT
@@ -65,7 +63,7 @@ private slots:
void stream_QByteArray_data();
void stream_QByteArray();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void stream_QCursor_data();
void stream_QCursor();
#endif
@@ -88,10 +86,8 @@ private slots:
void stream_QPen_data();
void stream_QPen();
-#ifndef Q_OS_WINCE
void stream_QPixmap_data();
void stream_QPixmap();
-#endif
void stream_QPoint_data();
void stream_QPoint();
@@ -123,10 +119,8 @@ private slots:
void stream_qint64_data();
void stream_qint64();
-#ifndef Q_OS_WINCE
void stream_QIcon_data();
void stream_QIcon();
-#endif
void stream_QEasingCurve_data();
void stream_QEasingCurve();
@@ -193,7 +187,7 @@ private:
void writeQBrush(QDataStream *s);
void writeQColor(QDataStream *s);
void writeQByteArray(QDataStream *s);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void writeQCursor(QDataStream *s);
#endif
void writeQWaitCursor(QDataStream *s);
@@ -222,7 +216,7 @@ private:
void readQBrush(QDataStream *s);
void readQColor(QDataStream *s);
void readQByteArray(QDataStream *s);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void readQCursor(QDataStream *s);
#endif
void readQDate(QDataStream *s);
@@ -1023,7 +1017,7 @@ void tst_QDataStream::readQByteArray(QDataStream *s)
}
// ************************************
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
static QCursor qCursorData(int index)
{
switch (index) {
@@ -1042,21 +1036,21 @@ static QCursor qCursorData(int index)
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QDataStream::stream_QCursor_data()
{
stream_data(9);
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QDataStream::stream_QCursor()
{
STREAM_IMPL(QCursor);
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QDataStream::writeQCursor(QDataStream *s)
{
QCursor d5(qCursorData(dataIndex(QTest::currentDataTag())));
@@ -1064,7 +1058,7 @@ void tst_QDataStream::writeQCursor(QDataStream *s)
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QDataStream::readQCursor(QDataStream *s)
{
QCursor test(qCursorData(dataIndex(QTest::currentDataTag())));
@@ -1542,24 +1536,16 @@ void tst_QDataStream::readQPen(QDataStream *s)
// pixmap testing is currently limited to one pixmap only.
//
-#ifndef Q_OS_WINCE
-// Test depends on more memory than available on Qt/CE
void tst_QDataStream::stream_QPixmap_data()
{
stream_data(1);
}
-#endif
-#ifndef Q_OS_WINCE
-// Test depends on more memory than available on Qt/CE
void tst_QDataStream::stream_QPixmap()
{
STREAM_IMPL(QPixmap);
}
-#endif
-#ifndef Q_OS_WINCE
-// Test depends on more memory than available on Qt/CE
void tst_QDataStream::stream_QIcon_data()
{
stream_data(1);
@@ -1569,7 +1555,6 @@ void tst_QDataStream::stream_QIcon()
{
STREAM_IMPL(QIcon);
}
-#endif
void tst_QDataStream::writeQPixmap(QDataStream *s)
{
@@ -1844,7 +1829,7 @@ static QRegion qRegionData(int index)
case 4: return QRegion(100, -100, 2048, 4096, QRegion::Rectangle);
case 5: return QRegion(-100, 100, 4096, 2048, QRegion::Rectangle);
case 6: return QRegion(0, 0, 0, 0, QRegion::Ellipse);
-#if (!defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)) // all our Unix platforms use X regions.
+#if !defined(Q_OS_UNIX) // all our Unix platforms use X regions.
case 7: return QRegion(1, 2, 300, 400, QRegion::Ellipse);
case 8: return QRegion(100, 100, 1024, 768, QRegion::Ellipse);
case 9: return QRegion(-100, -100, 1024, 1024, QRegion::Ellipse);
@@ -2496,12 +2481,10 @@ void tst_QDataStream::status_charptr_QByteArray_data()
QTest::addColumn<int>("expectedStatus");
QTest::addColumn<QByteArray>("expectedString");
-#if !defined(Q_OS_WINCE)
QByteArray oneMbMinus1(1024 * 1024 - 1, '\0');
for (int i = 0; i < oneMbMinus1.size(); ++i)
oneMbMinus1[i] = 0x1 | (8 * ((uchar)i / 9));
QByteArray threeMbMinus1 = oneMbMinus1 + 'j' + oneMbMinus1 + 'k' + oneMbMinus1;
-#endif
// ok
QTest::newRow("size 0") << QByteArray("\x00\x00\x00\x00", 4) << (int) QDataStream::Ok << QByteArray();
@@ -2510,14 +2493,12 @@ void tst_QDataStream::status_charptr_QByteArray_data()
QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x03jkl", 7) << (int) QDataStream::Ok << QByteArray("jkl");
QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x04jklm", 8) << (int) QDataStream::Ok << QByteArray("jklm");
QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x04jklmj", 8) << (int) QDataStream::Ok << QByteArray("jklm");
-#if !defined(Q_OS_WINCE)
QTest::newRow("size 1MB-1") << QByteArray("\x00\x0f\xff\xff", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::Ok << oneMbMinus1;
QTest::newRow("size 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "j";
QTest::newRow("size 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "jk";
QTest::newRow("size 3MB-1") << QByteArray("\x00\x2f\xff\xff", 4) + threeMbMinus1 + QByteArray("j") << (int) QDataStream::Ok << threeMbMinus1;
QTest::newRow("size 3MB") << QByteArray("\x00\x30\x00\x00", 4) + threeMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << threeMbMinus1 + "j";
QTest::newRow("size 3MB+1") << QByteArray("\x00\x30\x00\x01", 4) + threeMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << threeMbMinus1 + "jk";
-#endif
// past end
QTest::newRow("empty") << QByteArray() << (int) QDataStream::ReadPastEnd << QByteArray();
@@ -2530,12 +2511,10 @@ void tst_QDataStream::status_charptr_QByteArray_data()
QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x02j", 5) << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x03jk", 6) << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x04jkl", 7) << (int) QDataStream::ReadPastEnd << QByteArray();
-#if !defined(Q_OS_WINCE)
QTest::newRow("badsize 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 3MB") << QByteArray("\x00\x30\x00\x00", 4) + threeMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("badsize 3MB+1") << QByteArray("\x00\x30\x00\x01", 4) + threeMbMinus1 + QByteArray("j") << (int) QDataStream::ReadPastEnd << QByteArray();
-#endif
QTest::newRow("size -1") << QByteArray("\xff\xff\xff\xff", 4) << (int) QDataStream::ReadPastEnd << QByteArray();
QTest::newRow("size -2") << QByteArray("\xff\xff\xff\xfe", 4) << (int) QDataStream::ReadPastEnd << QByteArray();
}
@@ -2600,7 +2579,6 @@ void tst_QDataStream::status_QString_data()
QTest::addColumn<int>("expectedStatus");
QTest::addColumn<QString>("expectedString");
-#if !defined(Q_OS_WINCE)
QString oneMbMinus1;
oneMbMinus1.resize(1024 * 1024 - 1);
for (int i = 0; i < oneMbMinus1.size(); ++i)
@@ -2609,7 +2587,6 @@ void tst_QDataStream::status_QString_data()
QByteArray threeMbMinus1Data = qstring2qbytearray(threeMbMinus1);
QByteArray oneMbMinus1Data = qstring2qbytearray(oneMbMinus1);
-#endif
// ok
QTest::newRow("size 0") << QByteArray("\x00\x00\x00\x00", 4) << (int) QDataStream::Ok << QString();
@@ -2618,14 +2595,12 @@ void tst_QDataStream::status_QString_data()
QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x06\x00j\x00k\x00l", 10) << (int) QDataStream::Ok << QString("jkl");
QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00m", 12) << (int) QDataStream::Ok << QString("jklm");
QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00mjj", 14) << (int) QDataStream::Ok << QString("jklm");
-#if !defined(Q_OS_WINCE)
QTest::newRow("size 1MB-1") << QByteArray("\x00\x1f\xff\xfe", 4) + oneMbMinus1Data + QByteArray("jj") << (int) QDataStream::Ok << oneMbMinus1;
QTest::newRow("size 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "j";
QTest::newRow("size 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "jk";
QTest::newRow("size 3MB-1") << QByteArray("\x00\x5f\xff\xfe", 4) + threeMbMinus1Data + QByteArray("jj") << (int) QDataStream::Ok << threeMbMinus1;
QTest::newRow("size 3MB") << QByteArray("\x00\x60\x00\x00", 4) + threeMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << threeMbMinus1 + "j";
QTest::newRow("size 3MB+1") << QByteArray("\x00\x60\x00\x02", 4) + threeMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << threeMbMinus1 + "jk";
-#endif
// past end
QTest::newRow("empty") << QByteArray() << (int) QDataStream::ReadPastEnd << QString();
@@ -2638,14 +2613,12 @@ void tst_QDataStream::status_QString_data()
QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x04jj", 6) << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x06jjkk", 8) << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x08jjkkll", 10) << (int) QDataStream::ReadPastEnd << QString();
-#if !defined(Q_OS_WINCE)
QTest::newRow("badsize 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("j") << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 3MB") << QByteArray("\x00\x60\x00\x00", 4) + threeMbMinus1Data << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("badsize 3MB+1") << QByteArray("\x00\x60\x00\x02", 4) + threeMbMinus1Data + QByteArray("j") << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("size -2") << QByteArray("\xff\xff\xff\xfe", 4) << (int) QDataStream::ReadPastEnd << QString();
QTest::newRow("size MAX") << QByteArray("\x7f\xff\xff\xfe", 4) << (int) QDataStream::ReadPastEnd << QString();
-#endif
// corrupt data
QTest::newRow("corrupt1") << QByteArray("yyyy") << (int) QDataStream::ReadCorruptData << QString();
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 703e9c5b07..3924716b55 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -35,7 +35,7 @@
#include <qregexp.h>
#include <qstringlist.h>
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
#include <QtCore/private/qfsfileengine_p.h>
#include "../../../network-settings.h"
#endif
@@ -163,9 +163,8 @@ private slots:
void operator_eq();
-#ifndef Q_OS_WINCE
void dotAndDotDot();
-#endif
+
void homePath();
void tempPath();
void rootPath();
@@ -316,7 +315,7 @@ void tst_QDir::setPath_data()
QTest::addColumn<QString>("dir2");
QTest::newRow("data0") << QString(".") << QString("..");
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("data1") << QString("c:/") << QDir::currentPath();
#endif
}
@@ -543,7 +542,7 @@ void tst_QDir::exists_data()
QTest::newRow("simple dir") << (m_dataPath + "/resources") << true;
QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << true;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -555,7 +554,7 @@ void tst_QDir::exists_data()
QTest::newRow("unc 8") << uncRoot + "/asharethatshouldnotexist" << false;
QTest::newRow("unc 9") << "//ahostthatshouldnotexist" << false;
#endif
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("This drive should exist") << "C:/" << true;
// find a non-existing drive and check if it does not exist
#ifdef QT_BUILD_INTERNAL
@@ -596,7 +595,7 @@ void tst_QDir::isRelativePath_data()
QTest::addColumn<bool>("relative");
QTest::newRow("data0") << "../somedir" << true;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("data1") << "C:/sOmedir" << false;
#endif
QTest::newRow("data2") << "somedir" << true;
@@ -802,12 +801,6 @@ void tst_QDir::entryList()
QFile::remove(entrylistPath + "brokenlink.lnk");
QFile::remove(entrylistPath + "brokenlink");
- // WinCE does not have . and .. in the directory listing
-#if defined(Q_OS_WINCE)
- expected.removeAll(".");
- expected.removeAll("..");
-#endif
-
#ifndef Q_NO_SYMLINKS
#if defined(Q_OS_WIN)
// ### Sadly, this is a platform difference right now.
@@ -900,15 +893,10 @@ void tst_QDir::entryListSimple_data()
QTest::addColumn<int>("countMin");
QTest::newRow("data2") << "do_not_expect_this_path_to_exist/" << 0;
-#if defined(Q_OS_WINCE)
- QTest::newRow("simple dir") << (m_dataPath + "/resources") << 0;
- QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << 0;
-#else
QTest::newRow("simple dir") << (m_dataPath + "/resources") << 2;
QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << 2;
-#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << 2;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << 2;
@@ -1170,7 +1158,6 @@ tst_QDir::cleanPath_data()
QTest::newRow("data2") << "/" << "/";
QTest::newRow("data3") << QDir::cleanPath("../.") << "..";
QTest::newRow("data4") << QDir::cleanPath("../..") << "../..";
-#if !defined(Q_OS_WINCE)
#if defined(Q_OS_WIN)
QTest::newRow("data5") << "d:\\a\\bc\\def\\.." << "d:/a/bc";
QTest::newRow("data6") << "d:\\a\\bc\\def\\../../.." << "d:/";
@@ -1178,17 +1165,14 @@ tst_QDir::cleanPath_data()
QTest::newRow("data5") << "d:\\a\\bc\\def\\.." << "d:\\a\\bc\\def\\..";
QTest::newRow("data6") << "d:\\a\\bc\\def\\../../.." << "..";
#endif
-#endif
QTest::newRow("data7") << ".//file1.txt" << "file1.txt";
QTest::newRow("data8") << "/foo/bar/..//file1.txt" << "/foo/file1.txt";
QTest::newRow("data9") << "//" << "/";
-#if !defined(Q_OS_WINCE)
#if defined Q_OS_WIN
QTest::newRow("data10") << "c:\\" << "c:/";
#else
QTest::newRow("data10") << "/:/" << "/:";
#endif
-#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QTest::newRow("data11") << "//foo//bar" << "//foo/bar";
#endif
@@ -1350,7 +1334,7 @@ void tst_QDir::absolutePath_data()
QTest::addColumn<QString>("expectedPath");
QTest::newRow("0") << "/machine/share/dir1" << "/machine/share/dir1";
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("1") << "\\machine\\share\\dir1" << "/machine/share/dir1";
QTest::newRow("2") << "//machine/share/dir1" << "//machine/share/dir1";
QTest::newRow("3") << "\\\\machine\\share\\dir1" << "//machine/share/dir1";
@@ -1399,7 +1383,7 @@ void tst_QDir::relativeFilePath_data()
QTest::newRow("same path 1") << "/tmp" << "/tmp" << ".";
QTest::newRow("same path 2") << "//tmp" << "/tmp/" << ".";
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("12") << "C:/foo/bar" << "ding" << "ding";
QTest::newRow("13") << "C:/foo/bar" << "C:/ding/dong" << "../../ding/dong";
QTest::newRow("14") << "C:/foo/bar" << "/ding/dong" << "../../ding/dong";
@@ -1575,7 +1559,6 @@ void tst_QDir::operator_eq()
dir1.setPath("..");
}
-#ifndef Q_OS_WINCE
// WinCE does not have . nor ..
void tst_QDir::dotAndDotDot()
{
@@ -1585,7 +1568,6 @@ void tst_QDir::dotAndDotDot()
entryList = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
QCOMPARE(entryList, QStringList() << QString("dir") << QString("spaces"));
}
-#endif
void tst_QDir::homePath()
{
@@ -1829,16 +1811,9 @@ void tst_QDir::updateFileLists()
QDir dir(fs.absoluteFilePath(dirName));
-#if defined(Q_OS_WINCE)
- //no . and .. on these OS.
- QCOMPARE(dir.count(), uint(4));
- QCOMPARE(dir.entryList().size(), 4);
- QCOMPARE(dir.entryInfoList().size(), 4);
-#else
QCOMPARE(dir.count(), uint(6));
QCOMPARE(dir.entryList().size(), 6);
QCOMPARE(dir.entryInfoList().size(), 6);
-#endif
dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot);
diff --git a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
index 2d8dfba996..b5ac614ad1 100644
--- a/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/auto/corelib/io/qdiriterator/qdiriterator.pro
@@ -7,6 +7,4 @@ RESOURCES += qdiriterator.qrc
TESTDATA += entrylist
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
-wince*mips*|wincewm50smart-msvc200*: DEFINES += WINCE_BROKEN_ITERATE=1
-
win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 0fbce74055..6450e9af7b 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -41,7 +41,7 @@
#define Q_NO_SYMLINKS
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
# include "../../../network-settings.h"
#endif
@@ -103,7 +103,7 @@ private slots:
void longPath();
void dirorder();
void relativePaths();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void uncPaths_data();
void uncPaths();
#endif
@@ -196,7 +196,7 @@ void tst_QDirIterator::initTestCase()
# endif
#endif
-#if !defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_WIN)
createDirectory("hiddenDirs_hiddenFiles");
createFile("hiddenDirs_hiddenFiles/normalFile");
createFile("hiddenDirs_hiddenFiles/.hiddenFile");
@@ -239,10 +239,8 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/.,"
"entrylist/..,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -257,9 +255,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::AllEntries | QDir::NoDot) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/..,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -274,9 +270,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::AllEntries | QDir::NoDotDot) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/.,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -305,12 +299,10 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
<< QString("entrylist") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories | QDirIterator::FollowSymlinks)
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
<< QString(
-#if !defined(Q_OS_WINCE)
"entrylist/.,"
"entrylist/..,"
"entrylist/directory/.,"
"entrylist/directory/..,"
-#endif
"entrylist/file,"
#ifndef Q_NO_SYMLINKS
"entrylist/linktofile.lnk,"
@@ -345,11 +337,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
QTest::newRow("empty, default")
<< QString("empty") << QDirIterator::IteratorFlags(0)
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
-#if defined(Q_OS_WINCE)
- << QStringList();
-#else
<< QString("empty/.,empty/..").split(',');
-#endif
QTest::newRow("empty, QDir::NoDotAndDotDot")
<< QString("empty") << QDirIterator::IteratorFlags(0)
@@ -562,13 +550,6 @@ void tst_QDirIterator::longPath()
while (dir.exists(dirName) || dir.mkdir(dirName)) {
++n;
dirName.append('x');
-#if defined(Q_OS_WINCE) && defined(WINCE_BROKEN_ITERATE)
- // Some Windows CE devices/emulators are broken.
- // though one can create directories of length <= 217,
- // FindNextFile only reports entries until ~ 214.
- if (n >= 210)
- break;
-#endif
}
QDirIterator it(dir.absolutePath(), QDir::NoDotAndDotDot|QDir::Dirs, QDirIterator::Subdirectories);
@@ -606,7 +587,7 @@ void tst_QDirIterator::relativePaths()
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void tst_QDirIterator::uncPaths_data()
{
QTest::addColumn<QString>("dirName");
diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro
index 10c8d918f7..0735daedb3 100644
--- a/tests/auto/corelib/io/qfile/qfile.pro
+++ b/tests/auto/corelib/io/qfile/qfile.pro
@@ -1,7 +1,2 @@
TEMPLATE = subdirs
-wince* {
- SUBDIRS = test
-} else {
- SUBDIRS = test stdinprocess
-}
-
+SUBDIRS = test stdinprocess
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index c9ba96cc1b..c0c4b9d5d2 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -6,7 +6,6 @@ else: DEFINES += QT_NO_NETWORK
TARGET = ../tst_qfile
SOURCES = ../tst_qfile.cpp
-wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
RESOURCES += ../qfile.qrc ../rename-fallback.qrc ../copy-fallback.qrc
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 411c73fb90..4c9986d50e 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -47,7 +47,7 @@ extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
QT_END_NAMESPACE
#endif
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_NETWORK)
+#if !defined(QT_NO_NETWORK)
#include <QHostInfo>
#endif
#include <QProcess>
@@ -66,8 +66,6 @@ QT_END_NAMESPACE
# include <sys/mount.h>
#elif defined(Q_OS_IRIX)
# include <sys/statfs.h>
-#elif defined(Q_OS_WINCE)
-# include <qplatformdefs.h>
#elif defined(Q_OS_VXWORKS)
# include <fcntl.h>
#if defined(_WRS_KERNEL)
@@ -85,7 +83,7 @@ QT_END_NAMESPACE
#include <stdio.h>
#include <errno.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
#include "../../../network-settings.h"
#endif
@@ -135,11 +133,9 @@ private slots:
void readAll_data();
void readAll();
void readAllBuffer();
-#if !defined(Q_OS_WINCE)
void readAllStdin();
void readLineStdin();
void readLineStdin_lineByLine();
-#endif
void text();
void missingEndOfLine();
void readBlock();
@@ -169,7 +165,7 @@ private slots:
void writeTextFile_data();
void writeTextFile();
/* void largeFileSupport(); */
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void largeUncFileSupport();
#endif
void flush();
@@ -225,10 +221,8 @@ private slots:
void mapWrittenFile_data();
void mapWrittenFile();
-#ifndef Q_OS_WINCE
void openStandardStreamsFileDescriptors();
void openStandardStreamsBufferedStreams();
-#endif
void resize_data();
void resize();
@@ -491,7 +485,7 @@ void tst_QFile::exists()
file.remove();
QVERIFY(!file.exists());
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncPath = "//" + QtNetworkSettings::winServerName() + "/testshare/readme.txt";
QFile unc(uncPath);
QVERIFY2(unc.exists(), msgFileDoesNotExist(uncPath).constData());
@@ -543,7 +537,7 @@ void tst_QFile::open_data()
<< int(QIODevice::ReadOnly)
<< false
<< QFile::OpenError;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
//opening devices requires administrative privileges (and elevation).
HANDLE hTest = CreateFile(_T("\\\\.\\PhysicalDrive0"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (hTest != INVALID_HANDLE_VALUE) {
@@ -574,7 +568,7 @@ void tst_QFile::open()
QSKIP("Running this test as root doesn't make sense");
#endif
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN32)
QEXPECT_FAIL("noreadfile", "Windows does not currently support non-readable files.", Abort);
#endif
if (filename.isEmpty())
@@ -626,7 +620,7 @@ void tst_QFile::size_data()
QTest::addColumn<qint64>("size");
QTest::newRow( "exist01" ) << m_testFile << (qint64)245;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// Only test UNC on Windows./
QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testshare/test.pri") << (qint64)34;
#endif
@@ -637,10 +631,6 @@ void tst_QFile::size()
QFETCH( QString, filename );
QFETCH( qint64, size );
-#ifdef Q_OS_WINCE
- filename = QFileInfo(filename).absoluteFilePath();
-#endif
-
{
QFile f( filename );
QCOMPARE( f.size(), size );
@@ -660,9 +650,6 @@ void tst_QFile::size()
fclose(stream);
}
- // Currently low level file I/O is not well supported on Windows CE, so
- // skip this part of the test.
-#ifndef Q_OS_WINCE
{
QFile f;
@@ -675,7 +662,6 @@ void tst_QFile::size()
f.close();
QT_CLOSE(fd);
}
-#endif
}
void tst_QFile::sizeNoExist()
@@ -920,7 +906,6 @@ private:
};
#endif // !QT_NO_PROCESS
-#if !defined(Q_OS_WINCE)
void tst_QFile::readAllStdin()
{
#ifdef QT_NO_PROCESS
@@ -1011,7 +996,6 @@ void tst_QFile::readLineStdin_lineByLine()
}
#endif
}
-#endif
void tst_QFile::text()
{
@@ -1112,7 +1096,7 @@ void tst_QFile::ungetChar()
QCOMPARE(buf[2], '4');
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QString driveLetters()
{
wchar_t volumeName[MAX_PATH];
@@ -1149,7 +1133,7 @@ void tst_QFile::invalidFile_data()
#if !defined(Q_OS_WIN)
QTest::newRow( "x11" ) << QString( "qwe//" );
#else
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
QTest::newRow( "colon2" ) << invalidDriveLetter() + QString::fromLatin1(":ail:invalid");
#endif
QTest::newRow( "colon3" ) << QString( ":failinvalid" );
@@ -1211,13 +1195,11 @@ void tst_QFile::permissions_data()
QTest::newRow("data0") << QCoreApplication::instance()->applicationFilePath() << uint(QFile::ExeUser) << true << false;
QTest::newRow("data1") << m_testSourceFile << uint(QFile::ReadUser) << true << false;
QTest::newRow("readonly") << QString::fromLatin1("readonlyfile") << uint(QFile::WriteUser) << false << false;
-#ifndef Q_OS_WINCE
QTest::newRow("longfile") << QString::fromLatin1("longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName"
"longFileNamelongFileNamelongFileNamelongFileName.txt") << uint(QFile::ReadUser) << true << true;
-#endif
QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::ReadUser) << true << false;
QTest::newRow("resource2") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::WriteUser) << false << false;
QTest::newRow("resource3") << ":/tst_qfileinfo/resources/file1.ext1" << uint(QFile::ExeUser) << false << false;
@@ -1369,15 +1351,9 @@ void tst_QFile::copyFallback()
QVERIFY(QFile::exists("file-copy-destination.txt"));
QVERIFY(!file.isOpen());
-#ifdef Q_OS_WINCE
- // Need to reset permissions on Windows to be able to delete
- QVERIFY(QFile::setPermissions("file-copy-destination.txt",
- QFile::WriteOther));
-#else
// Need to reset permissions on Windows to be able to delete
QVERIFY(QFile::setPermissions("file-copy-destination.txt",
QFile::ReadOwner | QFile::WriteOwner));
-#endif
QVERIFY(QFile::remove("file-copy-destination.txt"));
// Fallback copy of open file.
@@ -1398,7 +1374,7 @@ void tst_QFile::copyFallback()
#endif
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
static QString getWorkingDirectoryForLink(const QString &linkFileName)
{
bool neededCoInit = false;
@@ -1457,7 +1433,7 @@ void tst_QFile::link()
QCOMPARE(QFile::symLinkTarget("myLink.lnk"), referenceTarget);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QString wd = getWorkingDirectoryForLink(info2.absoluteFilePath());
QCOMPARE(QDir::fromNativeSeparators(wd), QDir::cleanPath(info1.absolutePath()));
#endif
@@ -1595,7 +1571,7 @@ void tst_QFile::writeTextFile()
QCOMPARE(file.readAll(), out);
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void tst_QFile::largeUncFileSupport()
{
qint64 size = Q_INT64_C(8589934592);
@@ -1674,11 +1650,7 @@ void tst_QFile::bufferedRead()
file.write("abcdef");
file.close();
-#if defined(Q_OS_WINCE)
- FILE *stdFile = fopen((QCoreApplication::applicationDirPath() + "/stdfile.txt").toLatin1() , "r");
-#else
FILE *stdFile = fopen("stdfile.txt", "r");
-#endif
QVERIFY(stdFile);
char c;
QCOMPARE(int(fread(&c, 1, 1, stdFile)), 1);
@@ -1823,11 +1795,7 @@ void tst_QFile::FILEReadWrite()
f.close();
}
-#ifdef Q_OS_WINCE
- FILE *fp = fopen(qPrintable(QCoreApplication::applicationDirPath() + "\\FILEReadWrite.txt"), "r+b");
-#else
FILE *fp = fopen("FILEReadWrite.txt", "r+b");
-#endif
QVERIFY(fp);
QFile file;
QVERIFY2(file.open(fp, QFile::ReadWrite), msgOpenFailed(file).constData());
@@ -2032,10 +2000,6 @@ void tst_QFile::longFileName()
}
{
QFile file(fileName);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("244 chars", "Full pathname must be less than 260 chars", Abort);
- QEXPECT_FAIL("244 chars to absolutepath", "Full pathname must be less than 260 chars", Abort);
-#endif
QVERIFY2(file.open(QFile::WriteOnly | QFile::Text), msgOpenFailed(file).constData());
QTextStream ts(&file);
ts << fileName << endl;
@@ -2303,7 +2267,7 @@ void tst_QFile::writeLargeDataBlock_data()
QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd;
QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && !defined(QT_NO_NETWORK)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(QT_NO_NETWORK)
// Some semi-randomness to avoid collisions.
QTest::newRow("unc file")
<< QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt")
@@ -2318,8 +2282,8 @@ static QByteArray getLargeDataBlock()
if (array.isNull())
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS)
- int resizeSize = 1024 * 1024; // WinCE does not have much space
+#if defined(Q_OS_VXWORKS)
+ int resizeSize = 1024 * 1024; // VxWorks does not have much space
#else
int resizeSize = 64 * 1024 * 1024;
#endif
@@ -2447,9 +2411,7 @@ void tst_QFile::virtualFile()
void tst_QFile::textFile()
{
-#if defined(Q_OS_WINCE)
- FILE *fs = ::fopen((QCoreApplication::applicationDirPath() + "/writeabletextfile").toLatin1() , "wt");
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
FILE *fs = ::fopen("writeabletextfile", "wt");
#else
FILE *fs = ::fopen("writeabletextfile", "w");
@@ -2662,7 +2624,7 @@ void tst_QFile::appendAndRead()
void tst_QFile::miscWithUncPathAsCurrentDir()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QString current = QDir::currentPath();
const QString path = QLatin1String("//") + QtNetworkSettings::winServerName()
+ QLatin1String("/testshare");
@@ -2686,7 +2648,6 @@ void tst_QFile::standarderror()
void tst_QFile::handle()
{
int fd;
-#if !defined(Q_OS_WINCE)
QFile file(m_testSourceFile);
QVERIFY2(file.open(QIODevice::ReadOnly), msgOpenFailed(file).constData());
fd = int(file.handle());
@@ -2714,7 +2675,6 @@ void tst_QFile::handle()
#endif
QCOMPARE(c, '*');
-#endif
//test round trip of adopted stdio file handle
QFile file2;
@@ -2957,10 +2917,6 @@ void tst_QFile::map()
QString fileName = QDir::currentPath() + '/' + "qfile_map_testfile";
-#ifdef Q_OS_WINCE
- fileName = QFileInfo(fileName).absoluteFilePath();
-#endif
-
if (QFile::exists(fileName)) {
QVERIFY(QFile::setPermissions(fileName,
QFile::WriteOwner | QFile::ReadOwner | QFile::WriteUser | QFile::ReadUser));
@@ -3002,7 +2958,7 @@ void tst_QFile::map()
QCOMPARE(file.error(), QFile::NoError);
// hpux won't let you map multiple times.
-#if !defined(Q_OS_HPUX) && !defined(Q_USE_DEPRECATED_MAP_API) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_HPUX) && !defined(Q_USE_DEPRECATED_MAP_API)
// exotic test to make sure that multiple maps work
// note: windows ce does not reference count mutliple maps
@@ -3125,10 +3081,6 @@ void tst_QFile::mapOpenMode()
QVERIFY2(file.open(om), msgOpenFailed(om, file).constData());
uchar *memory = file.map(0, fileSize, QFileDevice::MemoryMapFlags(flags));
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("ReadOnly + MapPrivate" , "Windows CE does not support MapPrivateOption.", Abort);
- QEXPECT_FAIL("ReadWrite + MapPrivate", "Windows CE does not support MapPrivateOption.", Abort);
-#endif
QVERIFY(memory);
QVERIFY(memcmp(memory, pattern, fileSize) == 0);
@@ -3161,10 +3113,6 @@ void tst_QFile::mapWrittenFile()
QString fileName = QDir::currentPath() + '/' + "qfile_map_testfile";
-#ifdef Q_OS_WINCE
- fileName = QFileInfo(fileName).absoluteFilePath();
-#endif
-
if (QFile::exists(fileName)) {
QVERIFY(QFile::setPermissions(fileName,
QFile::WriteOwner | QFile::ReadOwner | QFile::WriteUser | QFile::ReadUser));
@@ -3263,10 +3211,6 @@ protected:
bool MessageHandler::ok = true;
QtMessageHandler MessageHandler::oldMessageHandler = 0;
- //allthough Windows CE (not mobile!) has functions that allow redirecting
- //the standard file descriptors to a file (see SetStdioPathW/GetStdioPathW)
- //it does not have functions to simply open them like below .
-#ifndef Q_OS_WINCE
void tst_QFile::openStandardStreamsFileDescriptors()
{
@@ -3326,7 +3270,6 @@ void tst_QFile::openStandardStreamsBufferedStreams()
QVERIFY(msgHandler.testPassed());
}
-#endif
void tst_QFile::writeNothing()
{
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index 8aa81896cc..8d443c27ec 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -5,6 +5,6 @@ SOURCES = tst_qfileinfo.cpp
RESOURCES += qfileinfo.qrc \
testdata.qrc
-win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
+win32:!winrt:LIBS += -ladvapi32 -lnetapi32
win32: CONFIG += insignificant_test # Crashes on Windows in release builds
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 8d62a38e6b..eea79406c3 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -49,13 +49,13 @@
#ifdef Q_OS_WIN
#include <qt_windows.h>
#include <qlibrary.h>
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
#include <lm.h>
#endif
#endif
#include <qplatformdefs.h>
#include <qdebug.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
#include "../../../network-settings.h"
#endif
#include <private/qfileinfo_p.h>
@@ -256,7 +256,7 @@ private slots:
void refresh();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void ntfsJunctionPointsAndSymlinks_data();
void ntfsJunctionPointsAndSymlinks();
void brokenShortcut();
@@ -273,7 +273,7 @@ private slots:
void detachingOperations();
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
void owner();
#endif
void group();
@@ -354,17 +354,8 @@ void tst_QFileInfo::copy()
file.flush();
QTest::qWait(250);
-#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
- if (QSysInfo::windowsVersion() & QSysInfo::WV_VISTA ||
- QSysInfo::windowsVersion() & QSysInfo::WV_CE_based)
- file.close();
-#endif
-#if defined(Q_OS_WINCE)
- // On Windows CE we need to close the file.
- // Otherwise the content will be cached and not
- // flushed to the storage, although we flushed it
- // manually!!! CE has interim cache, we cannot influence.
- QTest::qWait(5000);
+#if defined(Q_OS_WIN)
+ file.close();
#endif
info3.refresh();
privateInfo3 = getPrivate(info3);
@@ -422,12 +413,12 @@ void tst_QFileInfo::isDir_data()
QTest::newRow("broken link") << "brokenlink.lnk" << false;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("drive 1") << "c:" << true;
QTest::newRow("drive 2") << "c:/" << true;
//QTest::newRow("drive 2") << "t:s" << false;
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -464,13 +455,13 @@ void tst_QFileInfo::isRoot_data()
QTest::newRow("simple dir") << m_resourcesDir << false;
QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << false;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
QTest::newRow("drive 1") << "c:" << false;
QTest::newRow("drive 2") << "c:/" << true;
QTest::newRow("drive 3") << "p:/" << false;
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -519,7 +510,7 @@ void tst_QFileInfo::exists_data()
QTest::newRow("simple dir") << m_resourcesDir << true;
QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << true;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName();
QTest::newRow("unc 1") << uncRoot << true;
QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true;
@@ -554,7 +545,7 @@ void tst_QFileInfo::absolutePath_data()
QTest::addColumn<QString>("filename");
QString drivePrefix;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT))
+#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT))
drivePrefix = QDir::currentPath().left(2);
QString nonCurrentDrivePrefix =
drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:");
@@ -573,7 +564,7 @@ void tst_QFileInfo::absolutePath_data()
QTest::newRow("3") << "/usr/local/bin/" << drivePrefix + "/usr/local/bin" << "";
QTest::newRow("/test") << "/test" << drivePrefix + "/" << "test";
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
QTest::newRow("c:\\autoexec.bat") << "c:\\autoexec.bat" << "C:/"
<< "autoexec.bat";
QTest::newRow("c:autoexec.bat") << QDir::currentPath().left(2) + "autoexec.bat" << QDir::currentPath()
@@ -606,7 +597,7 @@ void tst_QFileInfo::absFilePath_data()
QTest::newRow("relativeFile") << "tmp.txt" << QDir::currentPath() + "/tmp.txt";
QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << QDir::currentPath() + "/" + "temp/tmp.txt";
QString drivePrefix;
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QString curr = QDir::currentPath();
curr.remove(0, 2); // Make it a absolute path with no drive specifier: \depot\qt-4.2\tests\auto\qfileinfo
@@ -774,7 +765,7 @@ void tst_QFileInfo::fileName_data()
QTest::newRow("relativeFile") << "tmp.txt" << "tmp.txt";
QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << "tmp.txt";
-#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
+#if defined(Q_OS_WIN)
QTest::newRow("absFilePath") << "c:\\home\\andy\\tmp.txt" << "tmp.txt";
QTest::newRow("driveWithNoSlash") << "c:tmp.txt" << "tmp.txt";
#else
@@ -1024,7 +1015,7 @@ void tst_QFileInfo::size()
void tst_QFileInfo::systemFiles()
{
-#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
QSKIP("This is a Windows only test");
#endif
QFileInfo fi("c:\\pagefile.sys");
@@ -1121,11 +1112,7 @@ void tst_QFileInfo::fileTimes_data()
void tst_QFileInfo::fileTimes()
{
-#if defined(Q_OS_WINCE)
- int sleepTime = 3000;
-#else
int sleepTime = 2000;
-#endif
QFETCH(QString, fileName);
if (QFile::exists(fileName)) {
QVERIFY(QFile::remove(fileName));
@@ -1133,10 +1120,6 @@ void tst_QFileInfo::fileTimes()
QTest::qSleep(sleepTime);
{
QFile file(fileName);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("longfile", "No long filenames on WinCE", Abort);
- QEXPECT_FAIL("longfile absolutepath", "No long filenames on WinCE", Abort);
-#endif
QVERIFY(file.open(QFile::WriteOnly | QFile::Text));
#if defined(Q_OS_UNIX) && !defined(Q_OS_VXWORKS)
if (qIsLikelyToBeNfs(file.handle()))
@@ -1162,7 +1145,7 @@ void tst_QFileInfo::fileTimes()
{
QFileInfo fileInfo(fileName);
// On unix created() returns the same as lastModified().
-#if !defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_UNIX)
QVERIFY(fileInfo.created() < beforeWrite);
#endif
QVERIFY(fileInfo.lastModified() > beforeWrite);
@@ -1174,7 +1157,7 @@ void tst_QFileInfo::fileTimes()
}
QFileInfo fileInfo(fileName);
-#if !defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_UNIX)
QVERIFY(fileInfo.created() < beforeWrite);
#endif
//In Vista the last-access timestamp is not updated when the file is accessed/touched (by default).
@@ -1193,9 +1176,7 @@ void tst_QFileInfo::fileTimes()
RegCloseKey(key);
}
#endif
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("simple", "WinCE only stores date of access data, not the time", Continue);
-#elif defined(Q_OS_WINRT)
+#if defined(Q_OS_WINRT)
QEXPECT_FAIL("", "WinRT does not allow timestamp handling change in the filesystem due to sandboxing", Continue);
#elif defined(Q_OS_QNX)
QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue);
@@ -1211,8 +1192,8 @@ void tst_QFileInfo::fileTimes()
void tst_QFileInfo::fileTimes_oldFile()
{
- // This is not supported on WinCE or WinRT
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+ // This is not supported on WinRT
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// All files are opened in share mode (both read and write).
DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
@@ -1310,7 +1291,7 @@ void tst_QFileInfo::isHidden_data()
QTest::newRow(qPrintable("drive." + info.path())) << info.path() << false;
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
QVERIFY(QDir("./hidden-directory").exists() || QDir().mkdir("./hidden-directory"));
QVERIFY(SetFileAttributesW(reinterpret_cast<LPCWSTR>(QString("./hidden-directory").utf16()),FILE_ATTRIBUTE_HIDDEN));
QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true;
@@ -1413,7 +1394,7 @@ void tst_QFileInfo::isNativePath()
void tst_QFileInfo::refresh()
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
int sleepTime = 3000;
#else
int sleepTime = 2000;
@@ -1436,17 +1417,8 @@ void tst_QFileInfo::refresh()
QCOMPARE(info.lastModified(), lastModified);
QCOMPARE(info.size(), qint64(7));
-#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
- if (QSysInfo::windowsVersion() & QSysInfo::WV_VISTA ||
- QSysInfo::windowsVersion() & QSysInfo::WV_CE_based)
- file.close();
-#endif
-#if defined(Q_OS_WINCE)
- // On Windows CE we need to close the file.
- // Otherwise the content will be cached and not
- // flushed to the storage, although we flushed it
- // manually!!! CE has interim cache, we cannot influence.
- QTest::qWait(5000);
+#if defined(Q_OS_WIN)
+ file.close();
#endif
info.refresh();
QCOMPARE(info.size(), qint64(13));
@@ -1459,7 +1431,7 @@ void tst_QFileInfo::refresh()
QCOMPARE(info2.size(), info.size());
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
{
QTest::addColumn<QString>("path");
@@ -1633,11 +1605,7 @@ void tst_QFileInfo::isWritable()
tempfile.remove();
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
-#ifdef Q_OS_WINCE
- QFileInfo fi("\\Windows\\wince.nls");
-#else
QFileInfo fi("c:\\pagefile.sys");
-#endif
QVERIFY2(fi.exists(), msgDoesNotExist(fi.absoluteFilePath()).constData());
QVERIFY(!fi.isWritable());
#endif
@@ -1813,8 +1781,7 @@ void tst_QFileInfo::detachingOperations()
QVERIFY(!info1.caching());
}
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
-#if defined (Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
BOOL IsUserAdmin()
{
BOOL b;
@@ -1835,14 +1802,14 @@ BOOL IsUserAdmin()
return(b);
}
-#endif
-#if defined(Q_OS_WIN)
QT_BEGIN_NAMESPACE
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
QT_END_NAMESPACE
-#endif
+#endif // Q_OS_WIN && !Q_OS_WINRT
+
+#ifndef Q_OS_WINRT
void tst_QFileInfo::owner()
{
QString userName;
@@ -1904,7 +1871,7 @@ void tst_QFileInfo::owner()
qt_ntfs_permission_lookup = 0;
#endif
}
-#endif
+#endif // !Q_OS_WINRT
void tst_QFileInfo::group()
{
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 187f72d095..fe2a1a562d 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -146,12 +146,7 @@ void tst_QFileSystemWatcher::basicTest()
// resolution of the modification time is system dependent, but it's at most 1 second when using
// the polling engine. I've heard rumors that FAT32 has a 2 second resolution. So, we have to
// wait a bit before we can modify the file (hrmph)...
-#ifndef Q_OS_WINCE
QTest::qWait(2000);
-#else
- // WinCE is always a little bit slower. Give it a little bit more time
- QTest::qWait(5000);
-#endif
testFile.open(QIODevice::WriteOnly | QIODevice::Append);
testFile.write(QByteArray("world"));
@@ -309,9 +304,6 @@ void tst_QFileSystemWatcher::watchDirectory()
QVERIFY(temporaryDir.rmdir(testDirName));
// waiting max 5 seconds for notification for directory removal to trigger
-#ifdef Q_OS_WINCE
- QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
-#endif
QTRY_COMPARE(changedSpy.count(), 2);
QCOMPARE(changedSpy.at(0).count(), 1);
QCOMPARE(changedSpy.at(1).count(), 1);
@@ -553,9 +545,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
QEXPECT_FAIL("", "See QTBUG-30943", Continue);
#endif
QCOMPARE(fileChangedSpyCount, 0);
-#ifdef Q_OS_WINCE
- QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
-#endif
QCOMPARE(dirChangedSpy.count(), 1);
dirChangedSpy.clear();
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index 30eaa5aab9..5cb532f76b 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -100,9 +100,6 @@ void tst_QIODevice::getSetCheck()
//----------------------------------------------------------------------------------
void tst_QIODevice::constructing_QTcpSocket()
{
-#if defined(Q_OS_WINCE) && defined(WINCE_EMULATOR_TEST)
- QSKIP("Networking tests in a WinCE emulator are unstable");
-#endif
if (!QtNetworkSettings::verifyTestNetworkSettings())
QSKIP("No network test server available");
@@ -205,9 +202,6 @@ void tst_QIODevice::read_QByteArray()
//--------------------------------------------------------------------
void tst_QIODevice::unget()
{
-#if defined(Q_OS_WINCE) && defined(WINCE_EMULATOR_TEST)
- QSKIP("Networking tests in a WinCE emulator are unstable");
-#endif
#if defined(Q_OS_MAC)
QSKIP("The unget network test is unstable on Mac. See QTBUG-39983.");
#endif
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index 2e5cfb1053..afa3620b1a 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -34,7 +34,7 @@
#include <qsysinfo.h>
#if defined(Q_OS_UNIX) && !defined(Q_OS_VXWORKS)
#include <unistd.h>
-#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
# include <qt_windows.h>
#endif
@@ -281,7 +281,7 @@ void tst_QLockFile::staleLockFromCrashedProcessReusedPid()
{
#if defined(QT_NO_PROCESS)
QSKIP("This test requires QProcess support");
-#elif defined(Q_OS_WINRT) || defined(Q_OS_WINCE) || defined(Q_OS_IOS)
+#elif defined(Q_OS_WINRT) || defined(Q_OS_IOS)
QSKIP("We cannot retrieve information about other processes on this platform.");
#else
const QString fileName = dir.path() + "/staleLockFromCrashedProcessReusedPid";
@@ -455,7 +455,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(ProcessProperties)
static inline ProcessProperties processProperties()
{
ProcessProperties result;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
HANDLE processToken = NULL;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &processToken)) {
DWORD elevation; // struct containing a DWORD, not present in some MinGW headers.
@@ -484,7 +484,7 @@ void tst_QLockFile::noPermissionsWindows()
{
// Windows: Do the permissions test in a system directory in which
// files cannot be created.
-#if !defined(Q_OS_WIN) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT)
QSKIP("This test is for desktop Windows only");
#endif
#ifdef Q_OS_WIN
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro
index 6eb72343bc..7b83d5dbe8 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro
@@ -4,4 +4,4 @@ TARGET = tst_qlockfile
SOURCES += tst_qlockfile.cpp
QT = core testlib concurrent
-win32:!wince:!winrt:LIBS += -ladvapi32
+win32:!winrt:LIBS += -ladvapi32
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pri b/tests/auto/corelib/io/qprocess/qprocess.pri
index a43c823846..d5a7532ee1 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pri
+++ b/tests/auto/corelib/io/qprocess/qprocess.pri
@@ -10,13 +10,12 @@ SUBPROGRAMS = \
testProcessDeadWhileReading \
testProcessEOF \
testExitCodes \
+ testForwarding \
testGuiProcess \
testDetached \
fileWriterProcess \
testSetWorkingDirectory \
testSoftExit
-!contains(QMAKE_PLATFORM, wince): SUBPROGRAMS += testForwarding
-
!qtHaveModule(widgets): SUBPROGRAMS -= \
testGuiProcess
diff --git a/tests/auto/corelib/io/qprocess/qprocess.pro b/tests/auto/corelib/io/qprocess/qprocess.pro
index 6ba54b1e92..3867ac5741 100644
--- a/tests/auto/corelib/io/qprocess/qprocess.pro
+++ b/tests/auto/corelib/io/qprocess/qprocess.pro
@@ -8,7 +8,7 @@ SUBDIRS += testProcessSpacesArgs/nospace.pro \
testProcessSpacesArgs/twospaces.pro \
testSpaceInName
-win32:!wince* {
+win32 {
SUBDIRS += \
testProcessEchoGui \
testSetNamedPipeHandleState
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
index 494d8147a7..0d40a9b83c 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/main.cpp
@@ -31,21 +31,10 @@
int main(int argc, char ** argv)
{
-#if defined(WINCE) || defined(_WIN32_WCE)
- // No pipes on this "OS"
- FILE* file = fopen("\\temp\\qprocess_args_test.txt","w+");
- for (int i = 0; i < argc; ++i) {
- if (i)
- fprintf(file, "|");
- fprintf(file, argv[i]);
- }
- fclose(file);
-#else
for (int i = 0; i < argc; ++i) {
if (i)
printf("|");
printf("%s", argv[i]);
}
-#endif
return 0;
}
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index d19a631cae..80e8bcad98 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
@@ -1,6 +1,6 @@
win32 {
SOURCES = main_win.cpp
- !wince: LIBS += -luser32
+ LIBS += -luser32
}
unix {
SOURCES = main_unix.cpp
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 1f0ace0dd3..0bc1e77925 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -64,7 +64,6 @@ private slots:
void startDetached();
void crashTest();
void crashTest2();
-#ifndef Q_OS_WINCE
void echoTest_data();
void echoTest();
void echoTest2();
@@ -110,7 +109,6 @@ private slots:
void discardUnwantedOutput();
void setWorkingDirectory();
void setNonExistentWorkingDirectory();
-#endif // not Q_OS_WINCE
void exitStatus_data();
void exitStatus();
@@ -154,11 +152,9 @@ protected slots:
void readFromProcess();
void exitLoopSlot();
void processApplicationEvents();
-#ifndef Q_OS_WINCE
void restartProcess();
void waitForReadyReadInAReadyReadSlotSlot();
void waitForBytesWrittenInABytesWrittenSlotSlot();
-#endif
private:
qint64 bytesAvailable;
@@ -406,8 +402,6 @@ void tst_QProcess::crashTest2()
QCOMPARE(process.exitStatus(), QProcess::CrashExit);
}
-#ifndef Q_OS_WINCE
-//Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::echoTest_data()
{
QTest::addColumn<QByteArray>("input");
@@ -462,7 +456,6 @@ void tst_QProcess::echoTest()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
void tst_QProcess::exitLoopSlot()
{
@@ -474,8 +467,6 @@ void tst_QProcess::processApplicationEvents()
QCoreApplication::processEvents();
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::echoTest2()
{
@@ -523,10 +514,8 @@ void tst_QProcess::echoTest2()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-// Reading and writing to a process is not supported on Qt/CE
+#if defined(Q_OS_WIN)
void tst_QProcess::echoTestGui()
{
QProcess process;
@@ -555,10 +544,9 @@ void tst_QProcess::testSetNamedPipeHandleState()
QCOMPARE(process.exitCode(), 0);
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
}
-#endif // !Q_OS_WINCE && Q_OS_WIN
+#endif // Q_OS_WIN
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-// Batch files are not supported on Windows CE
+#if defined(Q_OS_WIN)
void tst_QProcess::batFiles_data()
{
QTest::addColumn<QString>("batFile");
@@ -585,7 +573,7 @@ void tst_QProcess::batFiles()
QVERIFY(proc.readAll().startsWith(output));
}
-#endif // !Q_OS_WINCE && Q_OS_WIN
+#endif // Q_OS_WIN
void tst_QProcess::exitStatus_data()
{
@@ -627,8 +615,6 @@ void tst_QProcess::exitStatus()
}
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::loopBackTest()
{
@@ -649,10 +635,7 @@ void tst_QProcess::loopBackTest()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::readTimeoutAndThenCrash()
{
@@ -683,7 +666,6 @@ void tst_QProcess::readTimeoutAndThenCrash()
QCOMPARE(spy2.count(), 1);
QCOMPARE(*static_cast<const QProcess::ProcessError *>(spy2.at(0).at(0).constData()), QProcess::Crashed);
}
-#endif
void tst_QProcess::waitForFinished()
{
@@ -694,9 +676,6 @@ void tst_QProcess::waitForFinished()
QVERIFY(process.waitForFinished());
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
-#if defined (Q_OS_WINCE)
- QEXPECT_FAIL("", "Reading and writing to a process is not supported on Qt/CE", Continue);
-#endif
QString output = process.readAll();
QCOMPARE(output.count("\n"), 10*1024);
@@ -705,8 +684,6 @@ void tst_QProcess::waitForFinished()
QCOMPARE(process.error(), QProcess::FailedToStart);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::deadWhileReading()
{
QProcess process;
@@ -724,10 +701,7 @@ void tst_QProcess::deadWhileReading()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::restartProcessDeadlock()
{
@@ -757,10 +731,7 @@ void tst_QProcess::restartProcess()
QVERIFY(process);
process->start("testProcessEcho/testProcessEcho");
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::closeWriteChannel()
{
QProcess more;
@@ -786,10 +757,7 @@ void tst_QProcess::closeWriteChannel()
QCOMPARE(more.exitStatus(), QProcess::NormalExit);
QCOMPARE(more.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE"
void tst_QProcess::closeReadChannel()
{
for (int i = 0; i < 10; ++i) {
@@ -819,10 +787,7 @@ void tst_QProcess::closeReadChannel()
QCOMPARE(proc.exitCode(), 0);
}
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::openModes()
{
QProcess proc;
@@ -863,10 +828,7 @@ void tst_QProcess::openModes()
QVERIFY(!proc.isWritable());
QCOMPARE(proc.state(), QProcess::NotRunning);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
{
@@ -900,17 +862,12 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);
}
-#endif
void tst_QProcess::hardExit()
{
QProcess proc;
-#if defined(Q_OS_WINCE)
- proc.start("testSoftExit/testSoftExit");
-#else
proc.start("testProcessEcho/testProcessEcho");
-#endif
QVERIFY2(proc.waitForStarted(), qPrintable(proc.errorString()));
@@ -937,9 +894,7 @@ void tst_QProcess::softExit()
proc.start("testSoftExit/testSoftExit");
QVERIFY(proc.waitForStarted(10000));
-#if !defined(Q_OS_WINCE)
QVERIFY(proc.waitForReadyRead(10000));
-#endif
QVERIFY(proc.processId() > 0);
@@ -950,8 +905,6 @@ void tst_QProcess::softExit()
QCOMPARE(int(proc.error()), int(QProcess::UnknownError));
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
class SoftExitProcess : public QProcess
{
Q_OBJECT
@@ -1073,10 +1026,7 @@ void tst_QProcess::softExitInSlots()
QTRY_VERIFY_WITH_TIMEOUT(proc.waitedForFinished, 10000);
QCOMPARE(proc.state(), QProcess::NotRunning);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::mergedChannels()
{
QProcess process;
@@ -1099,10 +1049,6 @@ void tst_QProcess::mergedChannels()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::forwardedChannels_data()
{
@@ -1155,10 +1101,7 @@ void tst_QProcess::forwardedChannels()
QCOMPARE(process.readAllStandardOutput(), outdata);
QCOMPARE(process.readAllStandardError(), errdata);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::atEnd()
{
QProcess process;
@@ -1180,7 +1123,6 @@ void tst_QProcess::atEnd()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
class TestThread : public QThread
{
@@ -1202,9 +1144,7 @@ protected:
process.start("testProcessEcho/testProcessEcho");
-#if !defined(Q_OS_WINCE)
QCOMPARE(process.write("abc\0", 4), qint64(4));
-#endif
exitCode = exec();
}
@@ -1253,8 +1193,6 @@ void tst_QProcess::processesInMultipleThreads()
}
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForFinishedWithTimeout()
{
QProcess process;
@@ -1268,10 +1206,7 @@ void tst_QProcess::waitForFinishedWithTimeout()
QVERIFY(process.waitForFinished());
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForReadyReadInAReadyReadSlot()
{
QProcess process;
@@ -1297,10 +1232,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
QCOMPARE(process.exitCode(), 0);
QVERIFY(process.bytesAvailable() > bytesAvailable);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
{
QProcess *process = qobject_cast<QProcess *>(sender());
@@ -1310,10 +1242,7 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
QVERIFY(process->waitForReadyRead(5000));
QTestEventLoop::instance().exitLoop();
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
{
QProcess process;
@@ -1336,10 +1265,7 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
{
QProcess *process = qobject_cast<QProcess *>(sender());
@@ -1348,7 +1274,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
QVERIFY(process->waitForBytesWritten(5000));
QTestEventLoop::instance().exitLoop();
}
-#endif
void tst_QProcess::spaceArgsTest_data()
{
@@ -1427,14 +1352,12 @@ void tst_QProcess::spaceArgsTest()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
-#if !defined(Q_OS_WINCE)
QStringList actual = QString::fromLatin1(process.readAll()).split("|");
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
actual.removeFirst();
QCOMPARE(actual, args);
-#endif
if (program.contains(QLatin1Char(' ')))
program = QLatin1Char('"') + program + QLatin1Char('"');
@@ -1451,14 +1374,12 @@ void tst_QProcess::spaceArgsTest()
QVERIFY2(started, errorMessage.constData());
QVERIFY(process.waitForFinished(5000));
-#if !defined(Q_OS_WINCE)
actual = QString::fromLatin1(process.readAll()).split("|");
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
actual.removeFirst();
QCOMPARE(actual, args);
-#endif
}
}
@@ -1479,26 +1400,12 @@ void tst_QProcess::nativeArguments()
QCOMPARE(proc.exitStatus(), QProcess::NormalExit);
QCOMPARE(proc.exitCode(), 0);
-#if defined(Q_OS_WINCE)
- // WinCE test outputs to a file, so check that
- FILE* file = fopen("\\temp\\qprocess_args_test.txt","r");
- QVERIFY(file);
- char buf[256];
- fgets(buf, 256, file);
- fclose(file);
- QStringList actual = QString::fromLatin1(buf).split(QLatin1Char('|'));
-#else
QStringList actual = QString::fromLatin1(proc.readAll()).split(QLatin1Char('|'));
-#endif
QVERIFY(!actual.isEmpty());
// not interested in the program name, it might be different.
actual.removeFirst();
QStringList expected;
-#if defined(Q_OS_WINCE)
- expected << "hello" << "kitty," << "\"*\"!"; // Weird, weird ...
-#else
expected << "hello" << "kitty," << "*!";
-#endif
QCOMPARE(actual, expected);
}
@@ -1703,8 +1610,6 @@ void tst_QProcess::failToStartEmptyArgs()
QCOMPARE(process.error(), QProcess::FailedToStart);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::removeFileWhileProcessIsRunning()
{
QFile file(m_temporaryDir.path() + QLatin1String("/removeFile.txt"));
@@ -1722,9 +1627,7 @@ void tst_QProcess::removeFileWhileProcessIsRunning()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// OS doesn't support environment variables
+
void tst_QProcess::setEnvironment_data()
{
QTest::addColumn<QString>("name");
@@ -1799,9 +1702,7 @@ void tst_QProcess::setEnvironment()
QCOMPARE(process.readAll(), value.toLocal8Bit());
}
}
-#endif
-#ifndef Q_OS_WINCE
-// OS doesn't support environment variables
+
void tst_QProcess::setProcessEnvironment_data()
{
setEnvironment_data();
@@ -1839,25 +1740,16 @@ void tst_QProcess::setProcessEnvironment()
QCOMPARE(process.readAll(), value.toLocal8Bit());
}
}
-#endif
void tst_QProcess::systemEnvironment()
{
-#if defined (Q_OS_WINCE)
- // there is no concept of system variables on Windows CE as there is no console
- QVERIFY(QProcess::systemEnvironment().isEmpty());
- QVERIFY(QProcessEnvironment::systemEnvironment().isEmpty());
-#else
QVERIFY(!QProcess::systemEnvironment().isEmpty());
QVERIFY(!QProcessEnvironment::systemEnvironment().isEmpty());
QVERIFY(QProcessEnvironment::systemEnvironment().contains("PATH"));
QVERIFY(!QProcess::systemEnvironment().filter(QRegExp("^PATH=", Qt::CaseInsensitive)).isEmpty());
-#endif
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::spaceInName()
{
QProcess process;
@@ -1868,7 +1760,6 @@ void tst_QProcess::spaceInName()
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
}
-#endif
void tst_QProcess::lockupsInStartDetached()
{
@@ -1883,8 +1774,6 @@ void tst_QProcess::lockupsInStartDetached()
QProcess::startDetached("yjhbrty");
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::atEnd2()
{
QProcess process;
@@ -1899,7 +1788,6 @@ void tst_QProcess::atEnd2()
}
QCOMPARE(lines.size(), 7);
}
-#endif
void tst_QProcess::waitForReadyReadForNonexistantProcess()
{
@@ -1929,8 +1817,6 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QCOMPARE(finishedSpy2.count(), 0);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardInputFile()
{
static const char data[] = "A bunch\1of\2data\3\4\5\6\7...";
@@ -1958,10 +1844,7 @@ void tst_QProcess::setStandardInputFile()
all = process2.readAll();
QCOMPARE(all.size(), 0);
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardOutputFile_data()
{
QTest::addColumn<int>("channelToTest");
@@ -2079,10 +1962,7 @@ void tst_QProcess::setStandardOutputFileAndWaitForBytesWritten()
QCOMPARE(all, QByteArray::fromRawData(testdata, sizeof testdata - 1));
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::setStandardOutputProcess_data()
{
QTest::addColumn<bool>("merged");
@@ -2123,10 +2003,7 @@ void tst_QProcess::setStandardOutputProcess()
else
QCOMPARE(all, QByteArray("HHeelllloo,, WWoorrlldd"));
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::fileWriterProcess()
{
const QByteArray line = QByteArrayLiteral(" -- testing testing 1 2 3\n");
@@ -2160,16 +2037,11 @@ void tst_QProcess::fileWriterProcess()
QCOMPARE(QFile(fileName).size(), qint64(stdinStr.size()));
} while (stopWatch.elapsed() < 3000);
}
-#endif
void tst_QProcess::detachedWorkingDirectoryAndPid()
{
qint64 pid;
-#ifdef Q_OS_WINCE
- QTest::qSleep(1000);
-#endif
-
QFile infoFile(m_temporaryDir.path() + QLatin1String("/detachedinfo.txt"));
if (infoFile.exists())
QVERIFY(infoFile.remove());
@@ -2206,8 +2078,6 @@ void tst_QProcess::detachedWorkingDirectoryAndPid()
QCOMPARE(actualPid, pid);
}
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::switchReadChannels()
{
const char data[] = "ABCD";
@@ -2236,10 +2106,7 @@ void tst_QProcess::switchReadChannels()
process.setReadChannel(QProcess::StandardOutput);
QCOMPARE(process.read(1), QByteArray("D"));
}
-#endif
-#ifndef Q_OS_WINCE
-// Reading and writing to a process is not supported on Qt/CE
void tst_QProcess::discardUnwantedOutput()
{
QProcess process;
@@ -2257,11 +2124,8 @@ void tst_QProcess::discardUnwantedOutput()
process.setReadChannel(QProcess::StandardError);
QCOMPARE(process.bytesAvailable(), Q_INT64_C(0));
}
-#endif
-#ifndef Q_OS_WINCE
// Q_OS_WIN - setWorkingDirectory will chdir before starting the process on unices
-// Windows CE does not support working directory logic
void tst_QProcess::setWorkingDirectory()
{
QProcess process;
@@ -2297,7 +2161,6 @@ void tst_QProcess::setNonExistentWorkingDirectory()
QVERIFY2(process.errorString().startsWith("chdir:"), process.errorString().toLocal8Bit());
#endif
}
-#endif
void tst_QProcess::startFinishStartFinish()
{
@@ -2307,11 +2170,9 @@ void tst_QProcess::startFinishStartFinish()
QCOMPARE(process.state(), QProcess::NotRunning);
process.start("testProcessOutput/testProcessOutput");
-#if !defined(Q_OS_WINCE)
QVERIFY(process.waitForReadyRead(10000));
QCOMPARE(QString::fromLatin1(process.readLine().trimmed()),
QString("0 -this is a number"));
-#endif
if (process.state() != QProcess::NotRunning) {
QVERIFY(process.waitForFinished(10000));
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
diff --git a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
index a4a5d5b0c7..af5078a3dc 100644
--- a/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/corelib/io/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -44,9 +44,7 @@ private slots:
void caseSensitivity();
void systemEnvironment();
-#ifndef Q_OS_WINCE
void putenv();
-#endif
};
void tst_QProcessEnvironment::operator_eq()
@@ -257,12 +255,6 @@ void tst_QProcessEnvironment::systemEnvironment()
QVERIFY(nonexistant.isNull());
-#ifdef Q_OS_WINCE
- // Windows CE has no environment
- QVERIFY(path.isEmpty());
- QVERIFY(!system.contains("PATH"));
- QVERIFY(system.isEmpty());
-#else
// all other system have environments
if (path.isEmpty())
QFAIL("Could not find the PATH environment variable -- please correct the test environment");
@@ -272,18 +264,15 @@ void tst_QProcessEnvironment::systemEnvironment()
QVERIFY(!system.contains(envname));
-# ifdef Q_OS_WIN
+#ifdef Q_OS_WIN
// check case-insensitive too
QVERIFY(system.contains("path"));
QCOMPARE(system.value("path"), QString::fromLocal8Bit(path));
QVERIFY(!system.contains(QString(envname).toLower()));
-# endif
#endif
}
-#ifndef Q_OS_WINCE
-//Windows CE has no environment
void tst_QProcessEnvironment::putenv()
{
static const char envname[] = "WE_RE_SETTING_THIS_ENVIRONMENT_VARIABLE";
@@ -317,7 +306,6 @@ void tst_QProcessEnvironment::putenv()
QCOMPARE(eAfter.value(lower), QString("Hello, World"));
# endif
}
-#endif
QTEST_MAIN(tst_QProcessEnvironment)
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index 87a801c9dd..60252a91de 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1521,7 +1521,7 @@ void tst_QSettings::sync()
// Now "some other app" will change other.software.org.ini
QString userConfDir = settingsPath("__user__") + QDir::separator();
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if !defined(Q_OS_WINRT)
unlink((userConfDir + "other.software.org.ini").toLatin1());
rename((userConfDir + "software.org.ini").toLatin1(),
(userConfDir + "other.software.org.ini").toLatin1());
diff --git a/tests/auto/corelib/io/qstorageinfo/BLACKLIST b/tests/auto/corelib/io/qstorageinfo/BLACKLIST
new file mode 100644
index 0000000000..ab4f888dd9
--- /dev/null
+++ b/tests/auto/corelib/io/qstorageinfo/BLACKLIST
@@ -0,0 +1,2 @@
+[storageList]
+opensuse-42.1
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 72a57c5905..f0b9c05810 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -266,7 +266,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
void tst_QTemporaryDir::openOnRootDrives()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
#endif
// If it's possible to create a file in the root directory, it
@@ -280,7 +280,7 @@ void tst_QTemporaryDir::openOnRootDrives()
QVERIFY(dir.isValid());
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
SetErrorMode(lastErrorMode);
#endif
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 9645ca9ba2..921136e79b 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -374,9 +374,7 @@ void tst_QTemporaryFile::size()
// On CE it takes more time for the filesystem to update
// the information. Usually you have to close it or seek
// to get latest information. flush() does not help either.
-#if !defined(Q_OS_WINCE)
QCOMPARE(file.size(), qint64(6));
-#endif
file.seek(0);
QCOMPARE(file.size(), qint64(6));
}
@@ -395,7 +393,7 @@ void tst_QTemporaryFile::resize()
void tst_QTemporaryFile::openOnRootDrives()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
#endif
// If it's possible to create a file in the root directory, it
@@ -409,19 +407,14 @@ void tst_QTemporaryFile::openOnRootDrives()
QVERIFY(file.open());
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
SetErrorMode(lastErrorMode);
#endif
}
void tst_QTemporaryFile::stressTest()
{
-#if defined(Q_OS_WINCE)
- // 200 is still ok, first colision happens after ~30
- const int iterations = 200;
-#else
const int iterations = 1000;
-#endif
QSet<QString> names;
for (int i = 0; i < iterations; ++i) {
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index 104873b85e..9533989b9d 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -175,20 +175,16 @@ private slots:
void octTest();
void zeroTermination();
void ws_manipulator();
-#ifndef Q_OS_WINCE
void stillOpenWhenAtEnd();
-#endif
void readNewlines_data();
void readNewlines();
void seek();
void pos();
void pos2();
void pos3LargeFile();
-#if !defined(Q_OS_WINCE)
void readStdin();
void readAllFromStdin();
void readLineFromStdin();
-#endif
void read();
void qbool();
void forcePoint();
@@ -1207,8 +1203,6 @@ void tst_QTextStream::ws_manipulator()
}
// ------------------------------------------------------------------------------
-#ifndef Q_OS_WINCE
-// Qt/CE: Cannot test network on emulator
void tst_QTextStream::stillOpenWhenAtEnd()
{
QFile file(QFINDTESTDATA("tst_qtextstream.cpp"));
@@ -1229,7 +1223,6 @@ void tst_QTextStream::stillOpenWhenAtEnd()
while (!stream2.readLine().isNull()) {}
QVERIFY(socket.isOpen());
}
-#endif
// ------------------------------------------------------------------------------
void tst_QTextStream::readNewlines_data()
@@ -1498,8 +1491,6 @@ void tst_QTextStream::pos3LargeFile()
}
// ------------------------------------------------------------------------------
-// Qt/CE has no stdin/out support for processes
-#if !defined(Q_OS_WINCE)
void tst_QTextStream::readStdin()
{
#ifdef QT_NO_PROCESS
@@ -1527,7 +1518,6 @@ void tst_QTextStream::readStdin()
}
// ------------------------------------------------------------------------------
-// Qt/CE has no stdin/out support for processes
void tst_QTextStream::readAllFromStdin()
{
#ifdef QT_NO_PROCESS
@@ -1549,7 +1539,6 @@ void tst_QTextStream::readAllFromStdin()
}
// ------------------------------------------------------------------------------
-// Qt/CE has no stdin/out support for processes
void tst_QTextStream::readLineFromStdin()
{
#ifdef QT_NO_PROCESS
@@ -1572,7 +1561,6 @@ void tst_QTextStream::readLineFromStdin()
QVERIFY(stdinProcess.waitForFinished(5000));
#endif
}
-#endif
// ------------------------------------------------------------------------------
void tst_QTextStream::read()
@@ -2799,12 +2787,7 @@ void tst_QTextStream::status_real_read()
void tst_QTextStream::status_integer_read()
{
-#ifdef Q_OS_WINCE
- QString text = QLatin1String("123 abc ");
- QTextStream s(&text);
-#else
QTextStream s("123 abc ");
-#endif
int i;
QString w;
s >> i;
@@ -2822,12 +2805,7 @@ void tst_QTextStream::status_integer_read()
void tst_QTextStream::status_word_read()
{
-#ifdef Q_OS_WINCE
- QString text = QLatin1String("abc ");
- QTextStream s(&text);
-#else
QTextStream s("abc ");
-#endif
QString w;
s >> w;
QCOMPARE(s.status(), QTextStream::Ok);
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
index 4b3f76a78e..6ea7a38137 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
@@ -239,18 +239,10 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
// Basic tree StandardItemModel
QModelIndex parent;
QVariant blue = QVariant(QColor(Qt::blue));
-#ifndef Q_OS_WINCE
for (int i = 0; i < 4; ++i) {
-#else
- for (int i = 0; i < 2; ++i) {
-#endif
parent = model->index(0, 0, parent);
model->insertRows(0, 26 + i, parent);
-#ifndef Q_OS_WINCE
- model->insertColumns(0, 26 + i, parent);
-#else
model->insertColumns(0, 4 + i, parent);
-#endif
// Fill in some values to make it easier to debug
/*
for (int x = 0; x < 26 + i; ++x) {
@@ -272,18 +264,10 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
// Basic tree StandardItemModel
QModelIndex parent;
QVariant blue = QVariant(QColor(Qt::blue));
-#ifndef Q_OS_WINCE
for (int i = 0; i < 4; ++i) {
-#else
- for (int i = 0; i < 2; ++i) {
-#endif
parent = realModel->index(0, 0, parent);
realModel->insertRows(0, 26+i, parent);
-#ifndef Q_OS_WINCE
- realModel->insertColumns(0, 26+i, parent);
-#else
realModel->insertColumns(0, 4, parent);
-#endif
// Fill in some values to make it easier to debug
/*
for (int x = 0; x < 26+i; ++x) {
@@ -324,11 +308,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
QSqlQuery q;
q.exec("CREATE TABLE test(id int primary key, name varchar(30))");
q.prepare("INSERT INTO test(id, name) values (?, ?)");
-#ifndef Q_OS_WINCE
for (int i = 0; i < 1024; ++i) {
-#else
- for (int i = 0; i < 512; ++i) {
-#endif
q.addBindValue(i);
q.addBindValue("Mr. Smith" + QString::number(i));
q.exec();
@@ -344,11 +324,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
}
if (QListWidget *listWidget = qobject_cast<QListWidget *>(model->parent())) {
-#ifndef Q_OS_WINCE
- int items = 100;
-#else
int items = 50;
-#endif
while (items--)
listWidget->addItem(QLatin1String("item ") + QString::number(items));
return QModelIndex();
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index a8de5b7a9a..0691297497 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -155,7 +155,7 @@ void tst_QCoreApplication::qAppName()
void tst_QCoreApplication::argc()
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+#if defined(Q_OS_WINRT)
QSKIP("QCoreApplication::arguments() parses arguments from actual command line on this platform.");
#endif
{
diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
index 5cd043b584..50072dc612 100644
--- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
+++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
@@ -3,6 +3,6 @@ TARGET = tst_qeventloop
QT = core network testlib core-private
SOURCES = $$PWD/tst_qeventloop.cpp
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
contains(QT_CONFIG, glib): DEFINES += HAVE_GLIB
diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
index 1d4e647a4b..b5f1d0fe00 100644
--- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
@@ -6,11 +6,11 @@ SOURCES = tst_qmetatype.cpp
TESTDATA=./typeFlags.bin
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-win32-msvc*|wince|winrt {
+win32-msvc*|winrt {
# Prevents "fatal error C1128: number of sections exceeded object file format limit".
QMAKE_CXXFLAGS += /bigobj
# Reduce compile time
- win32-msvc2012|wince|winrt {
+ win32-msvc2012|winrt {
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE -= -O2
}
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
index 125915047a..cc51b4c661 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
@@ -2,9 +2,6 @@ CONFIG -= app_bundle debug_and_release
CONFIG += console
DESTDIR = ./
QT = core
-wince {
- LIBS += coredll.lib
-}
HEADERS += signalbug.h
SOURCES += signalbug.cpp
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 1902687eef..d1d3738879 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -1573,11 +1573,7 @@ Q_DECLARE_METATYPE(PropertyObject::Priority)
void tst_QObject::threadSignalEmissionCrash()
{
-#if defined(Q_OS_WINCE)
- int loopCount = 100;
-#else
int loopCount = 1000;
-#endif
for (int i = 0; i < loopCount; ++i) {
QTcpSocket socket;
socket.connectToHost("localhost", 80);
diff --git a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
index b6f6d2a7f3..26caff4301 100644
--- a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
+++ b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp
@@ -90,7 +90,7 @@ private slots:
// extreme cases
void useTooMuchMemory();
-#if !defined(Q_OS_HPUX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_HPUX)
void attachTooMuch();
#endif
@@ -516,8 +516,7 @@ void tst_QSharedMemory::useTooMuchMemory()
attach before the system runs out of resources.
*/
// HPUX doesn't allow for multiple attaches per process.
-// For WinCE, this test nearly kills the system, so skip it.
-#if !defined(Q_OS_HPUX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_HPUX)
void tst_QSharedMemory::attachTooMuch()
{
QSKIP("disabled");
@@ -576,9 +575,7 @@ void tst_QSharedMemory::simpleProducerConsumer()
char *get = (char*)consumer.data();
// On Windows CE you always have ReadWrite access. Thus
// ViewMapOfFile returns the same pointer
-#if !defined(Q_OS_WINCE)
QVERIFY(put != get);
-#endif
for (int i = 0; i < size; ++i) {
put[i] = 'Q';
QCOMPARE(get[i], 'Q');
diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
index 6fd192c357..de7a3721d8 100644
--- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
+++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
@@ -295,9 +295,6 @@ void tst_QTimer::livelock()
QTRY_COMPARE(tester.timeoutsForFirst, 1);
QCOMPARE(tester.timeoutsForExtra, 0);
QTRY_COMPARE(tester.timeoutsForSecond, 1);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("non-zero timer", "Windows CE devices often too slow", Continue);
-#endif
QVERIFY(tester.postEventAtRightTime);
}
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/lib.pro b/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
index 44bd0be14e..3e15861021 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
@@ -6,7 +6,6 @@ TARGET = mylib
DESTDIR = ../
QT = core
-wince: DEFINES += WIN32_MSVC
win32-msvc: DEFINES += WIN32_MSVC
# This project is testdata for tst_qlibrary
diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
index d55747501c..bd73227b3d 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
@@ -7,7 +7,6 @@ DESTDIR = ../
VERSION = 2
QT = core
-wince: DEFINES += WIN32_MSVC
win32-msvc: DEFINES += WIN32_MSVC
# Force a copy of the library to have an extension that is non-standard.
diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
index ed41ab51e1..dec8448ce3 100644
--- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp
@@ -189,7 +189,7 @@ void tst_QLibrary::load_data()
QTest::newRow("ok (libmylib ver. 1)") << appDir + "/libmylib" <<true;
#endif
-# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+# if defined(Q_OS_WIN32)
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;
@@ -346,11 +346,7 @@ void tst_QLibrary::errorString_data()
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 << appDir + "/mylib" << false << QString("Cannot resolve symbol \"nosuchsymbol\" in .*: .*");
-#else
QTest::newRow("bad resolve") << (int)Resolve << appDir + "/mylib" << false << QString("Cannot resolve symbol \"nosuchsymbol\" in \\S+: .*");
-#endif
QTest::newRow("good resolve") << (int)Resolve << appDir + "/mylib" << true << QString("Unknown error");
#ifdef Q_OS_WIN
@@ -414,7 +410,7 @@ void tst_QLibrary::loadHints_data()
QString appDir = QCoreApplication::applicationDirPath();
lh |= QLibrary::ResolveAllSymbolsHint;
-# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+# if defined(Q_OS_WIN32) || defined(Q_OS_WINRT)
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;
@@ -467,13 +463,8 @@ void tst_QLibrary::fileName_data()
QTest::newRow( "ok02" ) << sys_qualifiedLibraryName(QLatin1String("mylib"))
<< sys_qualifiedLibraryName(QLatin1String("mylib"));
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
-#ifndef Q_OS_WINCE
QTest::newRow( "ok03" ) << "user32"
<< "USER32.dll";
-#else
- QTest::newRow( "ok03" ) << "coredll"
- << "coredll.dll";
-#endif
#endif
}
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index bc853de24e..499d276ef8 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -140,11 +140,6 @@ void tst_QPluginLoader::cleanup()
void tst_QPluginLoader::errorString()
{
-#if defined(Q_OS_WINCE)
- // On WinCE we need an QCoreApplication object for current dir
- int argc = 0;
- QCoreApplication app(argc,0);
-#endif
const QString unknown(QLatin1String("Unknown error"));
{
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index 341bd21e5a..8597bf1a6d 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -350,15 +350,9 @@ const int AlphabetSize = sizeof(alphabet) - 1;
const int BufferSize = 4096; // GCD of BufferSize and alphabet size must be 1
char buffer[BufferSize];
-#ifndef Q_OS_WINCE
const int ProducerChunkSize = 3;
const int ConsumerChunkSize = 7;
const int Multiplier = 10;
-#else
-const int ProducerChunkSize = 2;
-const int ConsumerChunkSize = 5;
-const int Multiplier = 3;
-#endif
// note: the code depends on the fact that DataSize is a multiple of
// ProducerChunkSize, ConsumerChunkSize, and BufferSize
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index b4d0866d01..06b27f79cd 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -95,9 +95,7 @@ private slots:
void requestTermination();
-#ifndef Q_OS_WINCE
void stressTest();
-#endif
void quitLock();
};
@@ -664,7 +662,7 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data)
#if defined Q_OS_UNIX
const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this);
Q_UNUSED(state);
-#elif defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
+#elif defined(Q_OS_WINRT)
nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL);
#elif defined Q_OS_WIN
unsigned thrdid = 0;
@@ -684,11 +682,7 @@ void NativeThreadWrapper::join()
#if defined Q_OS_UNIX
pthread_join(nativeThreadHandle, 0);
#elif defined Q_OS_WIN
-#ifndef Q_OS_WINCE
WaitForSingleObjectEx(nativeThreadHandle, INFINITE, FALSE);
-#else
- WaitForSingleObject(nativeThreadHandle, INFINITE);
-#endif
CloseHandle(nativeThreadHandle);
#endif
}
@@ -874,13 +868,8 @@ void tst_QThread::adoptedThreadExecFinished()
void tst_QThread::adoptMultipleThreads()
{
#if defined(Q_OS_WIN)
- // Windows CE is not capable of handling that many threads. On the emulator it is dead with 26 threads already.
-# if defined(Q_OS_WINCE)
- const int numThreads = 20;
-# else
// need to test lots of threads, so that we exceed MAXIMUM_WAIT_OBJECTS in qt_adopted_thread_watcher()
const int numThreads = 200;
-# endif
#else
const int numThreads = 5;
#endif
@@ -911,13 +900,8 @@ void tst_QThread::adoptMultipleThreads()
void tst_QThread::adoptMultipleThreadsOverlap()
{
#if defined(Q_OS_WIN)
- // Windows CE is not capable of handling that many threads. On the emulator it is dead with 26 threads already.
-# if defined(Q_OS_WINCE)
- const int numThreads = 20;
-# else
// need to test lots of threads, so that we exceed MAXIMUM_WAIT_OBJECTS in qt_adopted_thread_watcher()
const int numThreads = 200;
-# endif
#else
const int numThreads = 5;
#endif
@@ -950,7 +934,6 @@ void tst_QThread::adoptMultipleThreadsOverlap()
QCOMPARE(recorder.activationCount.load(), numThreads);
}
-#ifndef Q_OS_WINCE
// Disconnects on WinCE
void tst_QThread::stressTest()
{
@@ -962,7 +945,6 @@ void tst_QThread::stressTest()
t.wait(one_minute);
}
}
-#endif
class Syncronizer : public QObject
{ Q_OBJECT
diff --git a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
index ba64bf2963..a9af182ed8 100644
--- a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
+++ b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp
@@ -120,7 +120,7 @@ void tst_QThreadOnce::sameThread()
void tst_QThreadOnce::multipleThreads()
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS)
+#if defined(Q_OS_VXWORKS)
const int NumberOfThreads = 20;
#else
const int NumberOfThreads = 100;
diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
index f3eba5c823..4e582cc346 100644
--- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
@@ -40,10 +40,8 @@
#include <pthread.h>
#endif
#ifdef Q_OS_WIN
-#ifndef Q_OS_WINCE
-#include <process.h>
-#endif
-#include <windows.h>
+# include <process.h>
+# include <qt_windows.h>
#endif
class tst_QThreadStorage : public QObject
@@ -221,11 +219,7 @@ void tst_QThreadStorage::adoptedThreads()
pthread_join(thread, 0);
#elif defined Q_OS_WIN && !defined(Q_OS_WINRT)
HANDLE thread;
-#if defined(Q_OS_WINCE)
- thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)testAdoptedThreadStorageWin, &pointers, 0, NULL);
-#else
thread = (HANDLE)_beginthread(testAdoptedThreadStorageWin, 0, &pointers);
-#endif
QVERIFY(thread);
WaitForSingleObject(thread, INFINITE);
#endif
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 910d7abf51..586a4446b4 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -34,9 +34,6 @@
#include <qhash.h>
#include <limits.h>
#include <private/qtools_p.h>
-#if defined(Q_OS_WINCE)
-#include <qcoreapplication.h>
-#endif
class tst_QByteArray : public QObject
{
@@ -246,11 +243,7 @@ void tst_QByteArray::qCompress_data()
{
QTest::addColumn<QByteArray>("ba");
-#ifndef Q_OS_WINCE
const int size1 = 1024*1024;
-#else
- const int size1 = 1024;
-#endif
QByteArray ba1( size1, 0 );
QTest::newRow( "00" ) << QByteArray();
@@ -267,11 +260,6 @@ void tst_QByteArray::qCompress_data()
ba1.fill( 'A' );
QTest::newRow( "03" ) << ba1;
-#if defined(Q_OS_WINCE)
- int tmpArgc = 0;
- char** tmpArgv = 0;
- QCoreApplication app(tmpArgc, tmpArgv);
-#endif
QFile file( QFINDTESTDATA("rfc3252.txt") );
QVERIFY( file.open(QIODevice::ReadOnly) );
QTest::newRow( "04" ) << file.readAll();
@@ -728,7 +716,7 @@ void tst_QByteArray::qvsnprintf()
memset(buf, 42, sizeof(buf));
#ifdef Q_OS_WIN
// VS 2005 uses the Qt implementation of vsnprintf.
-# if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(Q_OS_WINCE)
+# if defined(_MSC_VER)
QCOMPARE(::qsnprintf(buf, 3, "%s", "bubu"), -1);
QCOMPARE(static_cast<const char*>(buf), "bu");
# else
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index e51f5d4694..92585fd471 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -31,9 +31,6 @@
#include <qfile.h>
#include <qstringlist.h>
#include <private/qunicodetables_p.h>
-#if defined(Q_OS_WINCE)
-#include <qcoreapplication.h>
-#endif
class tst_QChar : public QObject
{
diff --git a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
index 36bc8621d2..30c7b1bf69 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
@@ -71,8 +71,12 @@ int main(int argc, char *argv[])
// A hidden option
QCommandLineOption hiddenOption(QStringList() << QStringLiteral("hidden"));
hiddenOption.setDescription(QStringLiteral("THIS SHOULD NEVER APPEAR"));
- hiddenOption.setHidden(true);
+ hiddenOption.setFlags(QCommandLineOption::HiddenFromHelp);
parser.addOption(hiddenOption);
+ QCommandLineOption hiddenOption2(QStringList() << QStringLiteral("hidden2"));
+ hiddenOption2.setDescription(QStringLiteral("NEITHER SHOULD THIS"));
+ hiddenOption2.setHidden(true);
+ parser.addOption(hiddenOption2);
// This program supports different options depending on the "command" (first argument).
// Call parse() to find out the positional arguments.
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
index 9552152136..a54ad3d9c9 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
@@ -450,6 +450,13 @@ void tst_QCommandLineParser::testSingleDashWordOptionModes_data()
<< QStringList("abc") << QStringList("val");
QTest::newRow("implicitlylong_with_space") << QCommandLineParser::ParseAsCompactedShortOptions << (QStringList() << "-c" << "val")
<< QStringList("c") << QStringList("val");
+
+ QTest::newRow("forceshort_detached") << QCommandLineParser::ParseAsLongOptions << (QStringList() << "-I" << "45")
+ << QStringList("I") << QStringList("45");
+ QTest::newRow("forceshort_attached") << QCommandLineParser::ParseAsLongOptions << (QStringList() << "-I46")
+ << QStringList("I") << QStringList("46");
+ QTest::newRow("forceshort_mixed") << QCommandLineParser::ParseAsLongOptions << (QStringList() << "-I45" << "-nn")
+ << (QStringList() << "I" << "nn") << QStringList("45");
}
void tst_QCommandLineParser::testSingleDashWordOptionModes()
@@ -468,6 +475,10 @@ void tst_QCommandLineParser::testSingleDashWordOptionModes()
parser.addOption(QCommandLineOption("b", QStringLiteral("b option.")));
parser.addOption(QCommandLineOption(QStringList() << "c" << "abc", QStringLiteral("c option."), QStringLiteral("value")));
parser.addOption(QCommandLineOption("nn", QStringLiteral("nn option.")));
+ QCommandLineOption forceShort(QStringLiteral("I"), QStringLiteral("always short option"),
+ QStringLiteral("path"), QStringLiteral("default"));
+ forceShort.setFlags(QCommandLineOption::ShortOptionStyle);
+ parser.addOption(forceShort);
QVERIFY(parser.parse(commandLine));
QCOMPARE(parser.optionNames(), expectedOptionNames);
for (int i = 0; i < expectedOptionValues.count(); ++i)
@@ -501,9 +512,6 @@ void tst_QCommandLineParser::testVersionOption()
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#else
-#ifdef Q_OS_WINCE
- QSKIP("Reading and writing to a process is not supported on Qt/CE");
-#endif
#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -570,9 +578,6 @@ void tst_QCommandLineParser::testHelpOption()
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#else
-#ifdef Q_OS_WINCE
- QSKIP("Reading and writing to a process is not supported on Qt/CE");
-#endif
#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index cfec327319..3b791fec70 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -28,10 +28,7 @@
****************************************************************************/
#include <QtTest/QtTest>
-#ifndef Q_OS_WINCE
#include <time.h>
-#endif
-
#include <qdatetime.h>
#include <private/qdatetime_p.h>
@@ -108,10 +105,8 @@ private slots:
void msecsTo();
void operator_eqeq_data();
void operator_eqeq();
-#ifndef Q_OS_WINCE
void operator_insert_extract_data();
void operator_insert_extract();
-#endif
void currentDateTime();
void currentDateTimeUtc();
void currentDateTimeUtc2();
@@ -259,9 +254,7 @@ void tst_QDateTime::initTestCase()
void tst_QDateTime::init()
{
-#if defined(Q_OS_WINCE)
- SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
-#elif defined(Q_OS_WIN32)
+#if defined(Q_OS_WIN32)
SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
#endif
}
@@ -1429,13 +1422,8 @@ void tst_QDateTime::msecsTo()
void tst_QDateTime::currentDateTime()
{
-#if defined(Q_OS_WINCE)
- __time64_t buf1, buf2;
- ::_time64(&buf1);
-#else
time_t buf1, buf2;
::time(&buf1);
-#endif
QDateTime lowerBound;
lowerBound.setTime_t(buf1);
@@ -1443,11 +1431,8 @@ void tst_QDateTime::currentDateTime()
QDateTime dt2 = QDateTime::currentDateTime().toLocalTime();
QDateTime dt3 = QDateTime::currentDateTime().toUTC();
-#if defined(Q_OS_WINCE)
- ::_time64(&buf2);
-#else
::time(&buf2);
-#endif
+
QDateTime upperBound;
upperBound.setTime_t(buf2);
// Note we must add 2 seconds here because time() may return up to
@@ -1482,13 +1467,9 @@ void tst_QDateTime::currentDateTime()
void tst_QDateTime::currentDateTimeUtc()
{
-#if defined(Q_OS_WINCE)
- __time64_t buf1, buf2;
- ::_time64(&buf1);
-#else
time_t buf1, buf2;
::time(&buf1);
-#endif
+
QDateTime lowerBound;
lowerBound.setTime_t(buf1);
@@ -1496,11 +1477,8 @@ void tst_QDateTime::currentDateTimeUtc()
QDateTime dt2 = QDateTime::currentDateTimeUtc().toLocalTime();
QDateTime dt3 = QDateTime::currentDateTimeUtc().toUTC();
-#if defined(Q_OS_WINCE)
- ::_time64(&buf2);
-#else
::time(&buf2);
-#endif
+
QDateTime upperBound;
upperBound.setTime_t(buf2);
// Note we must add 2 seconds here because time() may return up to
@@ -1859,7 +1837,6 @@ void tst_QDateTime::operator_eqeq()
}
}
-#ifndef Q_OS_WINCE
Q_DECLARE_METATYPE(QDataStream::Version)
void tst_QDateTime::operator_insert_extract_data()
@@ -1988,7 +1965,6 @@ void tst_QDateTime::operator_insert_extract()
qputenv("TZ", previousTimeZone.constData());
tzset();
}
-#endif
void tst_QDateTime::toString_strformat()
{
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 4336d02b2c..1ec0924254 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -996,11 +996,7 @@ void tst_QHash::rehash_isnt_quadratic()
// this test should be incredibly slow if rehash() is quadratic
for (int j = 0; j < 5; ++j) {
QHash<int, int> testHash;
-#if defined(Q_OS_WINCE) // mobiles do not have infinite mem...
- for (int i = 0; i < 50000; ++i)
-#else
for (int i = 0; i < 500000; ++i)
-#endif
testHash.insertMulti(1, 1);
}
}
diff --git a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
index 1295a36c1a..3c22770fba 100644
--- a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
+++ b/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
@@ -35,10 +35,40 @@ class tst_QLatin1String : public QObject
Q_OBJECT
private Q_SLOTS:
+ void at();
+ void midLeftRight();
void nullString();
void emptyString();
};
+
+void tst_QLatin1String::at()
+{
+ const QLatin1String l1("Hello World");
+ QCOMPARE(l1.at(0), QLatin1Char('H'));
+ QCOMPARE(l1.at(l1.size() - 1), QLatin1Char('d'));
+ QCOMPARE(l1[0], QLatin1Char('H'));
+ QCOMPARE(l1[l1.size() - 1], QLatin1Char('d'));
+}
+
+void tst_QLatin1String::midLeftRight()
+{
+ const QLatin1String l1("Hello World");
+ QCOMPARE(l1.mid(0), l1);
+ QCOMPARE(l1.mid(0, l1.size()), l1);
+ QCOMPARE(l1.left(l1.size()), l1);
+ QCOMPARE(l1.right(l1.size()), l1);
+
+ QCOMPARE(l1.mid(6), QLatin1String("World"));
+ QCOMPARE(l1.mid(6, 5), QLatin1String("World"));
+ QCOMPARE(l1.right(5), QLatin1String("World"));
+
+ QCOMPARE(l1.mid(6, 1), QLatin1String("W"));
+ QCOMPARE(l1.right(5).left(1), QLatin1String("W"));
+
+ QCOMPARE(l1.left(5), QLatin1String("Hello"));
+}
+
void tst_QLatin1String::nullString()
{
// default ctor
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index ee706e9f3d..8c9dc16ce7 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -52,15 +52,6 @@
# include <fenv.h>
#endif
-#ifdef Q_OS_WINCE
-#include <windows.h> // needed for GetUserDefaultLCID
-#define _control87 _controlfp
-extern "C" DWORD GetThreadLocale(void) {
- return GetUserDefaultLCID();
-}
-
-#endif
-
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
# include <stdlib.h>
#endif
@@ -85,9 +76,7 @@ private slots:
#endif
void ctor();
-#if !defined(Q_OS_WINCE)
void emptyCtor();
-#endif
void legacyNames();
void unixLocaleName();
void matchingLocales();
@@ -394,10 +383,7 @@ void tst_QLocale::ctor()
#undef TEST_CTOR
}
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS)
-// Not when Q_OS_WINCE is defined because the test uses unsupported
-// Windows CE QProcess functionality (std streams, env)
-// Also Qt needs to be compiled without QT_NO_PROCESS
+#if !defined(QT_NO_PROCESS)
static inline bool runSysApp(const QString &binary,
const QStringList &env,
QString *output,
@@ -447,7 +433,6 @@ static inline bool runSysAppTest(const QString &binary,
}
#endif
-#if !defined(Q_OS_WINCE)
void tst_QLocale::emptyCtor()
{
#ifdef QT_NO_PROCESS
@@ -517,7 +502,6 @@ void tst_QLocale::emptyCtor()
#undef TEST_CTOR
#endif
}
-#endif
void tst_QLocale::legacyNames()
{
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index 2f285f3393..a98d37d733 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -927,11 +927,7 @@ void tst_QRegExp::rainersSlowRegExpCopyBug()
{
// this test should take an extreme amount of time if QRegExp is broken
QRegExp original(email);
-#if defined(Q_OS_WINCE)
- for (int i = 0; i < 100; ++i) {
-#else
for (int i = 0; i < 100000; ++i) {
-#endif
QRegExp copy = original;
(void)copy.exactMatch("~");
QRegExp copy2 = original;
@@ -980,13 +976,9 @@ void Thread::run()
str += "abbbdekcz";
int x;
-#if defined(Q_OS_WINCE)
- for (int j = 0; j < 100; ++j) {
-#else
- for (int j = 0; j < 10000; ++j) {
-#endif
+ for (int j = 0; j < 10000; ++j)
x = rx.indexIn(str);
- }
+
QCOMPARE(x, 3072);
}
@@ -1022,13 +1014,9 @@ void Thread2::run()
str += "abbbdekcz";
int x;
-#if defined(Q_OS_WINCE)
- for (int j = 0; j < 100; ++j) {
-#else
- for (int j = 0; j < 10000; ++j) {
-#endif
+ for (int j = 0; j < 10000; ++j)
x = rx.indexIn(str);
- }
+
QCOMPARE(x, 3072);
}
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 0cccdb8262..7bebe5e9e0 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -342,7 +342,7 @@ namespace QTest {
"\n"
"#ifdef Q_OS_WIN\n"
"#include <windows.h>\n"
- "#if defined(Q_CC_MSVC) && !defined(Q_OS_WINCE)\n"
+ "#if defined(Q_CC_MSVC)\n"
"#include <crtdbg.h>\n"
"#endif\n"
"static void q_test_setup()\n"
@@ -358,7 +358,7 @@ namespace QTest {
"#endif\n"
"int main(int argc, char **argv)\n"
"{\n"
- "#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) && !defined(Q_OS_WINCE)\n"
+ "#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)\n"
" _CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, CrtDbgHook);\n"
"#endif\n";
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index b5912badf2..7998f7b7fd 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -57,11 +57,13 @@ private slots:
void basics_data();
void basics();
void operators();
+ void nullptrOps();
void swap();
void moveSemantics();
void useOfForwardDeclared();
void memoryManagement();
void dropLastReferenceOfForwardDeclared();
+ void nonVirtualDestructors();
void lock();
void downCast();
void functionCallDownCast();
@@ -362,6 +364,30 @@ void tst_QSharedPointer::operators()
QCOMPARE(qHash(p2), qHash(p2.data()));
}
+void tst_QSharedPointer::nullptrOps()
+{
+ QSharedPointer<char> p1(nullptr);
+ QSharedPointer<char> p2 = nullptr;
+ QSharedPointer<char> null;
+
+ QVERIFY(p1 == null);
+ QVERIFY(p2 == null);
+ QVERIFY(!p1.data());
+ QVERIFY(!p2.data());
+
+ QSharedPointer<char> p3 = p1;
+ QVERIFY(p3 == null);
+ QVERIFY(!p3.data());
+
+ p3 = nullptr;
+
+ // check for non-ambiguity
+ QSharedPointer<char> p1_zero(0);
+ QSharedPointer<char> p2_zero = 0;
+
+ p3 = 0;
+}
+
void tst_QSharedPointer::swap()
{
QSharedPointer<int> p1, p2(new int(42)), control = p2;
@@ -578,6 +604,56 @@ void tst_QSharedPointer::dropLastReferenceOfForwardDeclared()
QCOMPARE(forwardDeclaredDestructorRunCount, 1);
}
+// NVD for "non-virtual destructor"
+struct NVDData
+{
+ static int destructorCounter;
+ ~NVDData() { ++destructorCounter; }
+
+ int dummy;
+};
+int NVDData::destructorCounter;
+
+struct NVDDerivedData : NVDData
+{
+ static int destructorCounter;
+ ~NVDDerivedData() { ++destructorCounter; }
+};
+int NVDDerivedData::destructorCounter;
+
+void tst_QSharedPointer::nonVirtualDestructors()
+{
+ NVDData::destructorCounter = NVDDerivedData::destructorCounter = 0;
+ {
+ QSharedPointer<NVDData> ptr(new NVDData);
+ }
+ QCOMPARE(NVDData::destructorCounter, 1);
+ QCOMPARE(NVDDerivedData::destructorCounter, 0);
+
+ NVDData::destructorCounter = NVDDerivedData::destructorCounter = 0;
+ {
+ QSharedPointer<NVDDerivedData> ptr(new NVDDerivedData);
+ }
+ QCOMPARE(NVDData::destructorCounter, 1);
+ QCOMPARE(NVDDerivedData::destructorCounter, 1);
+
+ NVDData::destructorCounter = NVDDerivedData::destructorCounter = 0;
+ {
+ QSharedPointer<NVDData> bptr;
+ QSharedPointer<NVDDerivedData> ptr(new NVDDerivedData);
+ bptr = ptr;
+ }
+ QCOMPARE(NVDData::destructorCounter, 1);
+ QCOMPARE(NVDDerivedData::destructorCounter, 1);
+
+ NVDData::destructorCounter = NVDDerivedData::destructorCounter = 0;
+ {
+ QSharedPointer<NVDData> ptr(new NVDDerivedData);
+ }
+ QCOMPARE(NVDData::destructorCounter, 1);
+ QCOMPARE(NVDDerivedData::destructorCounter, 1);
+}
+
void tst_QSharedPointer::lock()
{
QSharedPointer<int> sp = QSharedPointer<int>::create();
@@ -1310,6 +1386,18 @@ template<typename T> int CustomDeleter<T>::callCount = 0;
void tst_QSharedPointer::customDeleter()
{
{
+ QSharedPointer<Data> ptr(0, &Data::doDelete);
+ QSharedPointer<Data> ptr2(0, &Data::alsoDelete);
+ QSharedPointer<Data> ptr3(0, &Data::virtualDelete);
+ }
+ safetyCheck();
+ {
+ QSharedPointer<Data> ptr(nullptr, &Data::doDelete);
+ QSharedPointer<Data> ptr2(nullptr, &Data::alsoDelete);
+ QSharedPointer<Data> ptr3(nullptr, &Data::virtualDelete);
+ }
+ safetyCheck();
+ {
QSharedPointer<Data> ptr(new Data, &Data::doDelete);
QSharedPointer<Data> ptr2(new Data, &Data::alsoDelete);
QSharedPointer<Data> ptr3(new Data, &Data::virtualDelete);
@@ -1492,6 +1580,33 @@ void tst_QSharedPointer::customDeleter()
QCOMPARE(refcount, 2);
safetyCheck();
+ CustomDeleter<NVDData> nvdeleter;
+ nvdeleter.callCount = 0;
+ {
+ QSharedPointer<NVDData> ptr(new NVDData, nvdeleter);
+ }
+ QCOMPARE(nvdeleter.callCount, 1);
+ safetyCheck();
+
+ CustomDeleter<NVDDerivedData> nvderiveddeleter;
+ nvdeleter.callCount = 0;
+ nvderiveddeleter.callCount = 0;
+ {
+ QSharedPointer<NVDDerivedData> ptr(new NVDDerivedData, nvderiveddeleter);
+ }
+ QCOMPARE(nvdeleter.callCount, 0);
+ QCOMPARE(nvderiveddeleter.callCount, 1);
+ safetyCheck();
+
+ nvdeleter.callCount = 0;
+ nvderiveddeleter.callCount = 0;
+ {
+ QSharedPointer<NVDData> ptr(new NVDDerivedData, nvderiveddeleter);
+ }
+ QCOMPARE(nvdeleter.callCount, 0);
+ QCOMPARE(nvderiveddeleter.callCount, 1);
+ safetyCheck();
+
// a custom deleter with a different pointer parameter
{
QSharedPointer<char> ptr(static_cast<char *>(malloc(1)), free);
@@ -1771,13 +1886,11 @@ void tst_QSharedPointer::threadStressTest_data()
QTest::newRow("1+1") << 1 << 1;
QTest::newRow("2+10") << 2 << 10;
-#ifndef Q_OS_WINCE
- // Windows CE cannot run this many threads
+
QTest::newRow("5+10") << 5 << 10;
QTest::newRow("5+30") << 5 << 30;
QTest::newRow("100+100") << 100 << 100;
-#endif
}
void tst_QSharedPointer::threadStressTest()
@@ -1811,11 +1924,7 @@ void tst_QSharedPointer::threadStressTest()
base.clear();
-#ifdef Q_OS_WINCE
- srand(QDateTime::currentDateTime().toTime_t());
-#else
srand(time(NULL));
-#endif
// start threads
for (int i = 0; i < allThreads.count(); ++i)
if (allThreads[i]) allThreads[i]->start();
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 0a81e3f6bb..9dc564a361 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -37,10 +37,6 @@
# undef QT_ASCII_CAST_WARNINGS
#endif
-#if defined(Q_OS_WIN) && defined(Q_OS_WINCE)
-#define Q_OS_WIN_AND_WINCE
-#endif
-
#include <QtTest/QtTest>
#include <qregexp.h>
#include <qregularexpression.h>
@@ -527,7 +523,7 @@ private slots:
void integer_conversion();
void tortureSprintfDouble();
void toNum();
-#if !defined(Q_OS_WIN) || defined(Q_OS_WIN_AND_WINCE)
+#if !defined(Q_OS_WIN)
void localeAwareCompare_data();
void localeAwareCompare();
#endif
@@ -1053,10 +1049,6 @@ void tst_QString::acc_01()
QVERIFY(a.isNull());
QVERIFY(*a.toLatin1().constData() == '\0');
{
-#if defined(Q_OS_WINCE)
- int argc = 0;
- QCoreApplication app(argc, 0);
-#endif
QFile f("COMPARE.txt");
f.open(QIODevice::ReadOnly);
QTextStream ts( &f );
@@ -5309,15 +5301,11 @@ void tst_QString::tortureSprintfDouble()
#include <locale.h>
-#if !defined(Q_OS_WIN) || defined(Q_OS_WIN_AND_WINCE)
-// On Q_OS_WIN others than Win CE, we cannot set the system or user locale
+#if !defined(Q_OS_WIN)
+// On Q_OS_WIN, we cannot set the system or user locale
void tst_QString::localeAwareCompare_data()
{
-#ifdef Q_OS_WIN_AND_WINCE
- QTest::addColumn<ulong>("locale");
-#else
QTest::addColumn<QString>("locale");
-#endif
QTest::addColumn<QString>("s1");
QTest::addColumn<QString>("s2");
QTest::addColumn<int>("result");
@@ -5327,15 +5315,9 @@ void tst_QString::localeAwareCompare_data()
Latin-1-specific characters (I think). Compare with Swedish
below.
*/
-#ifdef Q_OS_WIN_AND_WINCE // assume c locale to be english
- QTest::newRow("c1") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << 1;
- QTest::newRow("c2") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("c3") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
-#else
QTest::newRow("c1") << QString("C") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << 1;
QTest::newRow("c2") << QString("C") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("c3") << QString("C") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
-#endif
/*
It's hard to test English, because it's treated differently
@@ -5345,15 +5327,9 @@ void tst_QString::localeAwareCompare_data()
comparison of Latin-1 values, although I'm not sure. So I
just test digits to make sure that it's not totally broken.
*/
-#ifdef Q_OS_WIN_AND_WINCE
- QTest::newRow("english1") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString("5") << QString("4") << 1;
- QTest::newRow("english2") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString("4") << QString("6") << -1;
- QTest::newRow("english3") << MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) << QString("5") << QString("6") << -1;
-#else
QTest::newRow("english1") << QString("en_US") << QString("5") << QString("4") << 1;
QTest::newRow("english2") << QString("en_US") << QString("4") << QString("6") << -1;
QTest::newRow("english3") << QString("en_US") << QString("5") << QString("6") << -1;
-#endif
/*
In Swedish, a with ring above (E5) comes before a with
diaresis (E4), which comes before o diaresis (F6), which
@@ -5364,11 +5340,6 @@ void tst_QString::localeAwareCompare_data()
QTest::newRow("swedish2") << QString("sv_SE.ISO8859-1") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("swedish3") << QString("sv_SE.ISO8859-1") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("swedish4") << QString("sv_SE.ISO8859-1") << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1;
-#elif defined(Q_OS_WIN_AND_WINCE)
- QTest::newRow("swedish1") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1;
- QTest::newRow("swedish2") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("swedish3") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("\xe5") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("swedish4") << MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) << QString::fromLatin1("z") << QString::fromLatin1("\xe5") << -1;
#else
QTest::newRow("swedish1") << QString("sv_SE") << QString::fromLatin1("\xe5") << QString::fromLatin1("\xe4") << -1;
QTest::newRow("swedish2") << QString("sv_SE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
@@ -5394,10 +5365,6 @@ void tst_QString::localeAwareCompare_data()
QTest::newRow("german1") << QString("de_DE.ISO8859-1") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1;
QTest::newRow("german2") << QString("de_DE.ISO8859-1") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
QTest::newRow("german3") << QString("de_DE.ISO8859-1") << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1;
-#elif defined(Q_OS_WIN_AND_WINCE)
- QTest::newRow("german1") << MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1;
- QTest::newRow("german2") << MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
- QTest::newRow("german3") << MAKELCID(MAKELANGID(LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT) << QString::fromLatin1("z") << QString::fromLatin1("\xf6") << 1;
#else
QTest::newRow("german1") << QString("de_DE") << QString::fromLatin1("z") << QString::fromLatin1("\xe4") << 1;
QTest::newRow("german2") << QString("de_DE") << QString::fromLatin1("\xe4") << QString::fromLatin1("\xf6") << -1;
@@ -5407,11 +5374,7 @@ void tst_QString::localeAwareCompare_data()
void tst_QString::localeAwareCompare()
{
-#ifdef Q_OS_WIN_AND_WINCE
- QFETCH(ulong, locale);
-#else
QFETCH(QString, locale);
-#endif
QFETCH(QString, s1);
QFETCH(QString, s2);
QFETCH(int, result);
@@ -5419,11 +5382,7 @@ void tst_QString::localeAwareCompare()
QStringRef r1(&s1, 0, s1.length());
QStringRef r2(&s2, 0, s2.length());
-#ifdef Q_OS_WIN_AND_WINCE
- DWORD oldLcid = GetUserDefaultLCID();
- SetUserDefaultLCID(locale);
- QCOMPARE(locale, GetUserDefaultLCID());
-#elif defined (Q_OS_MAC) || defined(QT_USE_ICU)
+#if defined (Q_OS_DARWIN) || defined(QT_USE_ICU)
QSKIP("Setting the locale is not supported on OS X or ICU (you can set the C locale, but that won't affect localeAwareCompare)");
#else
if (!locale.isEmpty()) {
@@ -5485,14 +5444,10 @@ void tst_QString::localeAwareCompare()
QVERIFY(testres == 0);
}
-#ifdef Q_OS_WIN_AND_WINCE
- SetUserDefaultLCID(oldLcid);
-#else
if (!locale.isEmpty())
setlocale(LC_ALL, "");
-#endif
}
-#endif //!defined(Q_OS_WIN) || defined(Q_OS_WIN_AND_WINCE)
+#endif //!defined(Q_OS_WIN)
void tst_QString::reverseIterators()
{
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/.gitignore b/tests/auto/corelib/tools/qstringapisymmetry/.gitignore
new file mode 100644
index 0000000000..d28de05438
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringapisymmetry/.gitignore
@@ -0,0 +1 @@
+tst_qstringapisymmetry
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro b/tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro
new file mode 100644
index 0000000000..76e89c9acd
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro
@@ -0,0 +1,5 @@
+CONFIG += testcase
+TARGET = tst_qstringapisymmetry
+QT = core testlib
+SOURCES = tst_qstringapisymmetry.cpp
+contains(QT_CONFIG,c++14): CONFIG += c++14
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
new file mode 100644
index 0000000000..f6d2579074
--- /dev/null
+++ b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#undef QT_NO_CAST_FROM_ASCII
+#undef QT_NO_CAST_TO_ASCII
+#undef QT_ASCII_CAST_WARNINGS
+
+#include <QString>
+#include <QChar>
+#include <QStringRef>
+#include <QLatin1String>
+
+#include <QTest>
+
+Q_DECLARE_METATYPE(QLatin1String)
+Q_DECLARE_METATYPE(QStringRef)
+
+template <typename T>
+QString toQString(const T &t) { return QString(t); }
+QString toQString(const QStringRef &ref) { return ref.toString(); }
+
+class tst_QStringApiSymmetry : public QObject
+{
+ Q_OBJECT
+
+ void compare_data(bool hasConceptOfNullAndEmpty=true);
+ template <typename LHS, typename RHS>
+ void compare_impl() const;
+
+private Q_SLOTS:
+ // test all combinations of {QChar, QStringRef, QString, QLatin1String}
+ void compare_QChar_QChar_data() { compare_data(false); }
+ void compare_QChar_QChar() { compare_impl<QChar, QChar>(); }
+ void compare_QChar_QStringRef_data() { compare_data(false); }
+ void compare_QChar_QStringRef() { compare_impl<QChar, QStringRef>(); }
+ void compare_QChar_QString_data() { compare_data(false); }
+ void compare_QChar_QString() { compare_impl<QChar, QString>(); }
+ void compare_QChar_QLatin1String_data() { compare_data(false); }
+ void compare_QChar_QLatin1String() { compare_impl<QChar, QLatin1String>(); }
+
+ void compare_QStringRef_QChar_data() { compare_data(false); }
+ void compare_QStringRef_QChar() { compare_impl<QStringRef, QChar>(); }
+ void compare_QStringRef_QStringRef_data() { compare_data(); }
+ void compare_QStringRef_QStringRef() { compare_impl<QStringRef, QStringRef>(); }
+ void compare_QStringRef_QString_data() { compare_data(); }
+ void compare_QStringRef_QString() { compare_impl<QStringRef, QString>(); }
+ void compare_QStringRef_QLatin1String_data() { compare_data(); }
+ void compare_QStringRef_QLatin1String() { compare_impl<QStringRef, QLatin1String>(); }
+
+ void compare_QString_QChar_data() { compare_data(false); }
+ void compare_QString_QChar() { compare_impl<QString, QChar>(); }
+ void compare_QString_QStringRef_data() { compare_data(); }
+ void compare_QString_QStringRef() { compare_impl<QString, QStringRef>(); }
+ void compare_QString_QString_data() { compare_data(); }
+ void compare_QString_QString() { compare_impl<QString, QString>(); }
+ void compare_QString_QLatin1String_data() { compare_data(); }
+ void compare_QString_QLatin1String() { compare_impl<QString, QLatin1String>(); }
+
+ void compare_QLatin1String_QChar_data() { compare_data(false); }
+ void compare_QLatin1String_QChar() { compare_impl<QLatin1String, QChar>(); }
+ void compare_QLatin1String_QStringRef_data() { compare_data(); }
+ void compare_QLatin1String_QStringRef() { compare_impl<QLatin1String, QStringRef>(); }
+ void compare_QLatin1String_QString_data() { compare_data(); }
+ void compare_QLatin1String_QString() { compare_impl<QLatin1String, QString>(); }
+ void compare_QLatin1String_QLatin1String_data() { compare_data(); }
+ void compare_QLatin1String_QLatin1String() { compare_impl<QLatin1String, QLatin1String>(); }
+
+};
+
+void tst_QStringApiSymmetry::compare_data(bool hasConceptOfNullAndEmpty)
+{
+ QTest::addColumn<QStringRef>("lhsUnicode");
+ QTest::addColumn<QLatin1String>("lhsLatin1");
+ QTest::addColumn<QStringRef>("rhsUnicode");
+ QTest::addColumn<QLatin1String>("rhsLatin1");
+ QTest::addColumn<int>("caseSensitiveCompareResult");
+ QTest::addColumn<int>("caseInsensitiveCompareResult");
+
+ if (hasConceptOfNullAndEmpty) {
+ QTest::newRow("null <> null") << QStringRef() << QLatin1String()
+ << QStringRef() << QLatin1String()
+ << 0 << 0;
+ static const QString empty("");
+ QTest::newRow("null <> empty") << QStringRef() << QLatin1String()
+ << QStringRef(&empty) << QLatin1String("")
+ << 0 << 0;
+ }
+
+#define ROW(lhs, rhs) \
+ do { \
+ static const QString pinned[] = { \
+ QString(QLatin1String(lhs)), \
+ QString(QLatin1String(rhs)), \
+ }; \
+ QTest::newRow("'" lhs "' <> '" rhs "'") \
+ << QStringRef(&pinned[0]) << QLatin1String(lhs) \
+ << QStringRef(&pinned[1]) << QLatin1String(rhs) \
+ << qstrcmp(lhs, rhs) << qstricmp(lhs, rhs); \
+ } while (false)
+ ROW("", "0");
+ ROW("0", "");
+ ROW("0", "1");
+ ROW("0", "0");
+#undef ROW
+}
+
+template <typename String> String make(const QStringRef &sf, QLatin1String l1);
+template <> QChar make(const QStringRef &sf, QLatin1String)
+{ return sf.isEmpty() ? QChar(QLatin1Char('\0')) : sf.at(0); }
+template <> QStringRef make(const QStringRef &sf, QLatin1String) { return sf; }
+template <> QString make(const QStringRef &sf, QLatin1String) { return sf.toString(); }
+template <> QLatin1String make(const QStringRef &, QLatin1String l1) { return l1; }
+
+template <typename LHS, typename RHS>
+void tst_QStringApiSymmetry::compare_impl() const
+{
+ QFETCH(QStringRef, lhsUnicode);
+ QFETCH(QLatin1String, lhsLatin1);
+ QFETCH(QStringRef, rhsUnicode);
+ QFETCH(QLatin1String, rhsLatin1);
+ QFETCH(int, caseSensitiveCompareResult);
+
+ const LHS lhs = make<LHS>(lhsUnicode, lhsLatin1);
+ const RHS rhs = make<RHS>(rhsUnicode, rhsLatin1);
+
+#ifdef Q_COMPILER_NOEXCEPT
+# define QVERIFY_NOEXCEPT(expr) QVERIFY(noexcept(expr))
+#else
+# define QVERIFY_NOEXCEPT(expr)
+#endif
+
+#define CHECK(op) \
+ QVERIFY_NOEXCEPT(lhs op rhs); \
+ do { if (caseSensitiveCompareResult op 0) { \
+ QVERIFY(lhs op rhs); \
+ } else { \
+ QVERIFY(!(lhs op rhs)); \
+ } } while (false)
+
+ CHECK(==);
+ CHECK(!=);
+ CHECK(<);
+ CHECK(>);
+ CHECK(<=);
+ CHECK(>=);
+#undef CHECK
+}
+
+QTEST_APPLESS_MAIN(tst_QStringApiSymmetry)
+
+#include "tst_qstringapisymmetry.moc"
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index dc3547f9ba..0fdafd9b01 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -32,9 +32,6 @@
#include <qstringlist.h>
#include <locale.h>
-#ifdef Q_OS_WINCE
-#include <windows.h> // needed for GetUserDefaultLCID
-#endif
class tst_QStringList : public QObject
{
@@ -205,13 +202,7 @@ void tst_QStringList::sort()
list2 << "BETA" << "Gamma" << "alpha" << "beta" << "epsilon" << "gAmma" << "gamma";
QCOMPARE( list1, list2 );
-#ifdef Q_OS_WINCE
- DWORD oldLcid = GetUserDefaultLCID();
- // Assume c locale to be english
- SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
-#else
char *current_locale = setlocale(LC_ALL, "C");
-#endif
QStringList list3, list4;
list3 << "alpha" << "beta" << "BETA" << "gamma" << "Gamma" << "gAmma" << "epsilon";
list3.sort(Qt::CaseInsensitive);
@@ -224,11 +215,7 @@ void tst_QStringList::sort()
QCOMPARE(list4.at(0), QString("alpha"));
QVERIFY(list4.indexOf("epsilon") > 0);
QVERIFY(list4.indexOf("epsilon") < (list4.count() - 1));
-#ifdef Q_OS_WINCE
- SetUserDefaultLCID(oldLcid);
-#else
setlocale(LC_ALL, current_locale);
-#endif
}
void tst_QStringList::replaceInStrings()
diff --git a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
index cf43e391b5..383f357206 100644
--- a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp
@@ -68,11 +68,7 @@ protected:
void tst_QTimeLine::range()
{
-#ifdef Q_OS_WINCE //On WinCE timer resolution is bad - using longer times instead
- QTimeLine timeLine(2000);
-#else
QTimeLine timeLine(200);
-#endif
QCOMPARE(timeLine.startFrame(), 0);
QCOMPARE(timeLine.endFrame(), 0);
timeLine.setFrameRange(0, 1);
diff --git a/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp b/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
index 34d9256244..c37a15089a 100644
--- a/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
+++ b/tests/auto/corelib/tools/qversionnumber/tst_qversionnumber.cpp
@@ -29,6 +29,7 @@
#include <QtTest/QtTest>
#include <QtCore/qversionnumber.h>
+#include <QtCore/qlibraryinfo.h>
class tst_QVersionNumber : public QObject
{
@@ -79,6 +80,7 @@ private slots:
void serialize_data();
void serialize();
void moveSemantics();
+ void qtVersion();
};
void tst_QVersionNumber::singleInstanceData()
@@ -636,6 +638,17 @@ void tst_QVersionNumber::moveSemantics()
#endif
}
+void tst_QVersionNumber::qtVersion()
+{
+ QVersionNumber v = QLibraryInfo::version();
+ QVERIFY(!v.isNull());
+ QCOMPARE(v.majorVersion(), QT_VERSION_MAJOR);
+ // we can't compare the minor and micro version:
+ // the library may change without the test being recompiled
+
+ QCOMPARE(v.toString(), QString(qVersion()));
+}
+
QTEST_APPLESS_MAIN(tst_QVersionNumber)
#include "tst_qversionnumber.moc"
diff --git a/tests/auto/corelib/tools/tools.pro b/tests/auto/corelib/tools/tools.pro
index f9e1c454e7..5fe8c13e25 100644
--- a/tests/auto/corelib/tools/tools.pro
+++ b/tests/auto/corelib/tools/tools.pro
@@ -51,6 +51,7 @@ SUBDIRS=\
qstl \
qstring \
qstring_no_cast_from_bytearray \
+ qstringapisymmetry \
qstringbuilder \
qstringiterator \
qstringlist \
diff --git a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/qdbusmarshall.pro b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/qdbusmarshall.pro
index b0442a0ee4..21e665fa37 100644
--- a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/qdbusmarshall.pro
+++ b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/qdbusmarshall.pro
@@ -7,8 +7,8 @@ QT = core-private dbus-private testlib
contains(QT_CONFIG, dbus-linked) {
DEFINES += QT_LINKED_LIBDBUS
- LIBS += $$QT_LIBS_DBUS
- QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
+ LIBS += $$QMAKE_LIBS_DBUS
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_DBUS
} else {
SOURCES += ../../../../../src/dbus/qdbus_symbols.cpp
}
diff --git a/tests/auto/dbus/qdbustype/qdbustype.pro b/tests/auto/dbus/qdbustype/qdbustype.pro
index 17ae349675..e65b9ec5b3 100644
--- a/tests/auto/dbus/qdbustype/qdbustype.pro
+++ b/tests/auto/dbus/qdbustype/qdbustype.pro
@@ -4,8 +4,8 @@ QT = core-private dbus-private testlib
SOURCES += tst_qdbustype.cpp
contains(QT_CONFIG, dbus-linked) {
DEFINES += QT_LINKED_LIBDBUS
- LIBS += $$QT_LIBS_DBUS
- QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
+ LIBS += $$QMAKE_LIBS_DBUS
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_DBUS
} else {
SOURCES += ../../../../src/dbus/qdbus_symbols.cpp
}
diff --git a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
index 485472c70c..46bfb2a586 100644
--- a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
+++ b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
@@ -3,14 +3,5 @@ TARGET = tst_qicoimageformat
SOURCES+= tst_qicoimageformat.cpp
QT += testlib
-wince {
- 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 += addPlugins
-}
TESTDATA += icons/*
android:RESOURCES+=qicoimageformat.qrc
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 3c4610a892..b728d095d7 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -393,7 +393,6 @@ void tst_QIcon::addFile()
icon.addFile(QLatin1String(":/styles/commonstyle/images/standardbutton-save-32.png"), QSize(), QIcon::Selected);
icon.addFile(QLatin1String(":/styles/commonstyle/images/standardbutton-save-128.png"), QSize(), QIcon::Selected);
-#ifndef Q_OS_WINCE
QVERIFY(icon.pixmap(16, QIcon::Normal).toImage() ==
QPixmap(QLatin1String(":/styles/commonstyle/images/standardbutton-open-16.png")).toImage());
QVERIFY(icon.pixmap(32, QIcon::Normal).toImage() ==
@@ -406,13 +405,6 @@ void tst_QIcon::addFile()
QPixmap(QLatin1String(":/styles/commonstyle/images/standardbutton-save-32.png")).toImage());
QVERIFY(icon.pixmap(128, QIcon::Selected).toImage() ==
QPixmap(QLatin1String(":/styles/commonstyle/images/standardbutton-save-128.png")).toImage());
-#else
- // WinCE only includes the 16x16 images for size reasons
- QVERIFY(icon.pixmap(16, QIcon::Normal).toImage() ==
- QPixmap(QLatin1String(":/styles/commonstyle/images/standardbutton-open-16.png")).toImage());
- QVERIFY(icon.pixmap(16, QIcon::Selected).toImage() ==
- QPixmap(QLatin1String(":/styles/commonstyle/images/standardbutton-save-16.png")).toImage());
-#endif
}
static bool sizeLess(const QSize &a, const QSize &b)
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 16cbebeed5..bc48869f7d 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -195,6 +195,9 @@ private slots:
void pixelColor();
void pixel();
+ void ditherGradient_data();
+ void ditherGradient();
+
private:
const QString m_prefix;
};
@@ -290,17 +293,13 @@ void tst_QImage::swap()
void tst_QImage::create()
{
bool cr = true;
-#if !defined(Q_OS_WINCE)
QT_TRY {
-#endif
//QImage image(7000000, 7000000, 8, 256, QImage::IgnoreEndian);
QImage image(7000000, 7000000, QImage::Format_Indexed8);
image.setColorCount(256);
cr = !image.isNull();
-#if !defined(Q_OS_WINCE)
} QT_CATCH (...) {
}
-#endif
QVERIFY( !cr );
}
@@ -1785,11 +1784,7 @@ void tst_QImage::smoothScale4()
void tst_QImage::smoothScaleBig()
{
-#if defined(Q_OS_WINCE)
- int bigValue = 2000;
-#else
int bigValue = 200000;
-#endif
QImage tall(4, bigValue, QImage::Format_ARGB32);
tall.fill(0x0);
@@ -3122,5 +3117,78 @@ void tst_QImage::pixel()
}
}
+void tst_QImage::ditherGradient_data()
+{
+ QTest::addColumn<QImage>("image");
+ QTest::addColumn<QImage::Format>("format");
+ QTest::addColumn<int>("flags");
+ QTest::addColumn<int>("minimumExpectedGradient");
+
+ QImage rgb32(256, 16, QImage::Format_RGB32);
+ QLinearGradient gradient(QRectF(rgb32.rect()).topLeft(), QRectF(rgb32.rect()).topRight());
+ gradient.setColorAt(0.0, QColor(0, 0, 0));
+ gradient.setColorAt(1.0, QColor(255, 255, 255));
+ QPainter p;
+ p.begin(&rgb32);
+ p.fillRect(rgb32.rect(), gradient);
+ p.end();
+
+ QTest::newRow("rgb32 -> rgb444 (no dither)") << rgb32 << QImage::Format_RGB444 << 0 << 16;
+ QTest::newRow("rgb32 -> rgb444 (dithering)") << rgb32 << QImage::Format_RGB444 << int(Qt::PreferDither | Qt::OrderedDither) << 33;
+ QTest::newRow("rgb32 -> argb4444pm (dithering)") << rgb32 << QImage::Format_ARGB4444_Premultiplied << int(Qt::PreferDither | Qt::OrderedDither) << 33;
+ QTest::newRow("rgb32 -> rgb16 (no dither)") << rgb32 << QImage::Format_RGB16 << 0 << 32;
+ QTest::newRow("rgb32 -> rgb16 (dithering)") << rgb32 << QImage::Format_RGB16 << int(Qt::PreferDither | Qt::OrderedDither) << 65;
+ QTest::newRow("rgb32 -> rgb666 (no dither)") << rgb32 << QImage::Format_RGB666 << 0 << 64;
+ QTest::newRow("rgb32 -> rgb666 (dithering)") << rgb32 << QImage::Format_RGB666 << int(Qt::PreferDither | Qt::OrderedDither) << 129;
+
+ // Test we get the same results for opaque input in the ARGBPM implementation.
+ rgb32 = qMove(rgb32).convertToFormat(QImage::Format_ARGB32_Premultiplied);
+ QTest::newRow("argb32pm -> argb4444pm (no dither)") << rgb32 << QImage::Format_ARGB4444_Premultiplied << 0 << 16;
+ QTest::newRow("argb32pm -> rgb444 (dithering)") << rgb32 << QImage::Format_RGB444 << int(Qt::PreferDither | Qt::OrderedDither) << 33;
+ QTest::newRow("argb32pm -> argb4444pm (dithering)") << rgb32 << QImage::Format_ARGB4444_Premultiplied << int(Qt::PreferDither | Qt::OrderedDither) << 33;
+ QTest::newRow("argb32pm -> argb8565pm (no dither)") << rgb32 << QImage::Format_ARGB8565_Premultiplied << 0 << 32;
+ QTest::newRow("argb32pm -> argb8565pm (dithering)") << rgb32 << QImage::Format_ARGB8565_Premultiplied << int(Qt::PreferDither | Qt::OrderedDither) << 65;
+ QTest::newRow("argb32pm -> argb6666pm (no dither)") << rgb32 << QImage::Format_ARGB6666_Premultiplied << 0 << 64;
+ QTest::newRow("argb32pm -> argb6666pm (dithering)") << rgb32 << QImage::Format_ARGB6666_Premultiplied << int(Qt::PreferDither | Qt::OrderedDither) << 129;
+
+ QImage rgb30(1024, 16, QImage::Format_RGB30);
+ QLinearGradient gradient30(QRectF(rgb30.rect()).topLeft(), QRectF(rgb30.rect()).topRight());
+ gradient30.setColorAt(0.0, QColor(0, 0, 0));
+ gradient30.setColorAt(1.0, QColor(255, 255, 255));
+ p.begin(&rgb30);
+ p.fillRect(rgb30.rect(), gradient30);
+ p.end();
+
+ QTest::newRow("rgb30 -> rgb32 (no dither)") << rgb30 << QImage::Format_RGB32 << 0 << 256;
+ QTest::newRow("rgb30 -> rgb32 (dithering)") << rgb30 << QImage::Format_RGB32 << int(Qt::PreferDither | Qt::OrderedDither) << 513;
+ QTest::newRow("rgb30 -> rgb888 (no dither)") << rgb30 << QImage::Format_RGB888 << 0 << 256;
+ QTest::newRow("rgb30 -> rgb888 (dithering)") << rgb30 << QImage::Format_RGB888 << int(Qt::PreferDither | Qt::OrderedDither) << 513;
+}
+
+void tst_QImage::ditherGradient()
+{
+ QFETCH(QImage, image);
+ QFETCH(QImage::Format, format);
+ QFETCH(int, flags);
+ QFETCH(int, minimumExpectedGradient);
+
+ QImage converted = image.convertToFormat(format, (Qt::ImageConversionFlags)flags);
+ int observedGradientSteps = 0;
+ int lastTotal = -1;
+ for (int i = 0; i < converted.width(); ++i) {
+ int total = 0;
+ for (int j = 0; j < converted.height(); ++j) {
+ uint c = converted.pixel(i, j);
+ QCOMPARE(qAlpha(c), 255);
+ total += qRed(c);
+ }
+ if (total > lastTotal) {
+ observedGradientSteps++;
+ lastTotal = total;
+ }
+ }
+ QVERIFY(observedGradientSteps >= minimumExpectedGradient);
+}
+
QTEST_GUILESS_MAIN(tst_QImage)
#include "tst_qimage.moc"
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index c12c8a9cf4..f48fab4f0a 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -508,9 +508,6 @@ void tst_QImageWriter::saveToTemporaryFile()
QVERIFY(writer.write(image));
else
qWarning() << file.errorString();
-#if defined(Q_OS_WINCE)
- file.reset();
-#endif
QCOMPARE(QImage(writer.fileName()), image);
}
{
@@ -529,9 +526,6 @@ void tst_QImageWriter::saveToTemporaryFile()
QVERIFY2(file.open(), qPrintable(file.errorString()));
QImageWriter writer(&file, "PNG");
QVERIFY(writer.write(image));
-#if defined(Q_OS_WINCE)
- file.reset();
-#endif
QCOMPARE(QImage(writer.fileName()), image);
}
{
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro
index a04ad73b80..4a741ec154 100644
--- a/tests/auto/gui/image/qmovie/qmovie.pro
+++ b/tests/auto/gui/image/qmovie/qmovie.pro
@@ -5,8 +5,8 @@ qtHaveModule(widgets): QT += widgets
SOURCES += tst_qmovie.cpp
MOC_DIR=tmp
-!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
-!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
+contains(QT_CONFIG, gif):DEFINES += QTEST_HAVE_GIF
+contains(QT_CONFIG, jpeg):DEFINES += QTEST_HAVE_JPEG
RESOURCES += resources.qrc
TESTDATA += animations/*
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro
index 5a4656998a..e6a020af1a 100644
--- a/tests/auto/gui/image/qpixmap/qpixmap.pro
+++ b/tests/auto/gui/image/qpixmap/qpixmap.pro
@@ -5,9 +5,7 @@ QT += core-private gui-private testlib
qtHaveModule(widgets): QT += widgets widgets-private
SOURCES += tst_qpixmap.cpp
-!wince:!winrt {
- win32:LIBS += -lgdi32 -luser32
-}
+win32:!winrt: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 6adfe05fb0..79d3a57d73 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -442,22 +442,16 @@ void tst_QPixmap::fill_data()
QTest::newRow(("syscolor_" + QByteArray::number(color)).constData())
<< uint(color) << true << false;
-#if defined (Q_OS_WINCE)
- QPixmap pixmap(1,1);
- if (QApplication::desktop()->grab().depth() >= 24) {
-#else
- QPixmap pixmap(1, 1); {
-#endif
- QTest::newRow("alpha_7f_red") << 0x7fff0000u << false << false;
- QTest::newRow("alpha_3f_blue") << 0x3f0000ffu << false << false;
- QTest::newRow("alpha_b7_green") << 0xbf00ff00u << false << false;
- QTest::newRow("alpha_7f_white") << 0x7fffffffu << false << false;
- QTest::newRow("alpha_3f_white") << 0x3fffffffu << false << false;
- QTest::newRow("alpha_b7_white") << 0xb7ffffffu << false << false;
- QTest::newRow("alpha_7f_black") << 0x7f000000u << false << false;
- QTest::newRow("alpha_3f_black") << 0x3f000000u << false << false;
- QTest::newRow("alpha_b7_black") << 0xbf000000u << false << false;
- }
+ QPixmap pixmap(1, 1);
+ QTest::newRow("alpha_7f_red") << 0x7fff0000u << false << false;
+ QTest::newRow("alpha_3f_blue") << 0x3f0000ffu << false << false;
+ QTest::newRow("alpha_b7_green") << 0xbf00ff00u << false << false;
+ QTest::newRow("alpha_7f_white") << 0x7fffffffu << false << false;
+ QTest::newRow("alpha_3f_white") << 0x3fffffffu << false << false;
+ QTest::newRow("alpha_b7_white") << 0xb7ffffffu << false << false;
+ QTest::newRow("alpha_7f_black") << 0x7f000000u << false << false;
+ QTest::newRow("alpha_3f_black") << 0x3f000000u << false << false;
+ QTest::newRow("alpha_b7_black") << 0xbf000000u << false << false;
QTest::newRow("bitmap_color0") << uint(Qt::color0) << true << true;
QTest::newRow("bitmap_color1") << uint(Qt::color1) << true << true;
@@ -891,9 +885,6 @@ void tst_QPixmap::fromWinHBITMAP()
HGDIOBJ old_brush = SelectObject(bitmap_dc, CreateSolidBrush(RGB(red, green, blue)));
Rectangle(bitmap_dc, 0, 0, 100, 100);
-#ifdef Q_OS_WINCE //the device context has to be deleted before QPixmap::fromWinHBITMAP()
- DeleteDC(bitmap_dc);
-#endif
QPixmap pixmap = qt_pixmapFromWinHBITMAP(bitmap);
QCOMPARE(pixmap.width(), 100);
QCOMPARE(pixmap.height(), 100);
@@ -906,9 +897,7 @@ void tst_QPixmap::fromWinHBITMAP()
DeleteObject(SelectObject(bitmap_dc, old_brush));
DeleteObject(SelectObject(bitmap_dc, bitmap));
-#ifndef Q_OS_WINCE
DeleteDC(bitmap_dc);
-#endif
ReleaseDC(0, display_dc);
}
@@ -1010,7 +999,6 @@ void tst_QPixmap::fromWinHICON_data()
void tst_QPixmap::fromWinHICON()
{
-#ifndef Q_OS_WINCE
QFETCH(int, width);
QFETCH(int, height);
QFETCH(QString, image);
@@ -1028,7 +1016,6 @@ void tst_QPixmap::fromWinHICON()
// between QImage::Format_ARGB32 and QImage::Format_ARGB32_Premultiplied, or elsewhere
QVERIFY(compareImages(imageFromHICON, imageFromFile));
-#endif // Q_OS_WINCE
}
#endif // Q_OS_WIN && !Q_OS_WINRT
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index 5000e1a926..317d8c1ff9 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -25,7 +25,7 @@ SUBDIRS=\
qopenglwindow \
qrasterwindow
-win32:!wince:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
+win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop
!qtHaveModule(widgets): SUBDIRS -= \
qmouseevent_modal \
diff --git a/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro b/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro
index a42b359f29..5e4875d1e7 100644
--- a/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro
+++ b/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro
@@ -5,4 +5,4 @@ QT += core-private network gui-private testlib
SOURCES += tst_noqteventloop.cpp
-contains(QT_CONFIG,dynamicgl):win32:!wince*:!winrt: LIBS += -luser32
+contains(QT_CONFIG,dynamicgl):win32:!winrt: LIBS += -luser32
diff --git a/tests/auto/gui/kernel/qclipboard/copier/main.cpp b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
index 22f2aa3bb8..32e91a9939 100644
--- a/tests/auto/gui/kernel/qclipboard/copier/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/copier/main.cpp
@@ -33,11 +33,9 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
QString paste = QStringLiteral("testString.!");
-#ifndef Q_OS_WINCE
const QStringList arguments = app.arguments();
if (arguments.size() > 1)
paste = arguments.at(1);
-#endif
#ifndef QT_NO_CLIPBOARD
QGuiApplication::clipboard()->setText(paste);
#endif
diff --git a/tests/auto/gui/kernel/qclipboard/paster/main.cpp b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
index c96d903fb7..7fca8af1cb 100644
--- a/tests/auto/gui/kernel/qclipboard/paster/main.cpp
+++ b/tests/auto/gui/kernel/qclipboard/paster/main.cpp
@@ -66,13 +66,9 @@ int main(int argc, char **argv)
return 0;
}
-#ifndef Q_OS_WINCE
QString expected;
if (parser.isSet(textOption))
expected = parser.value(textOption);
-#else // !Q_OS_WINCE
- const QString expected = QStringLiteral("testString.!");
-#endif // Q_OS_WINCE
if (!expected.isEmpty()) {
#ifndef QT_NO_CLIPBOARD
const QString actual = QGuiApplication::clipboard()->text();
diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro
index 40bf9c8d8e..59b77b11ba 100644
--- a/tests/auto/gui/kernel/qclipboard/test/test.pro
+++ b/tests/auto/gui/kernel/qclipboard/test/test.pro
@@ -13,10 +13,6 @@ win32 {
}
}
-wince* {
- DEPLOYMENT += rsc reg_resource
-}
-
!winrt: TEST_HELPER_INSTALLS = \
../copier/copier \
../paster/paster
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index 6bad45fefe..bfa15744c2 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -313,10 +313,6 @@ void tst_QClipboard::setMimeData()
QMimeData *mimeData = new QMimeData;
const QString TestName(QLatin1String("tst_QClipboard::setMimeData() mimeData"));
mimeData->setObjectName(TestName);
-#if defined(Q_OS_WINCE)
- // need to set text on CE
- mimeData->setText(QLatin1String("Qt/CE foo"));
-#endif
QGuiApplication::clipboard()->setMimeData(mimeData);
QCOMPARE(QGuiApplication::clipboard()->mimeData(), (const QMimeData *)mimeData);
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index 8002303723..cca0e95c29 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -31,8 +31,6 @@
#include <QtGui>
#include <QtTest/QtTest>
-#include "../../../qtest-config.h"
-
Q_DECLARE_METATYPE(QMetaType::Type)
class tst_QGuiMetaType: public QObject
@@ -75,14 +73,14 @@ private slots:
F(QVector4D, QVector4D) \
F(QQuaternion, QQuaternion)
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
# define FOR_EACH_GUI_METATYPE(F) \
FOR_EACH_GUI_METATYPE_BASE(F) \
F(QCursor, QCursor)
-#else // !QTEST_NO_CURSOR
+#else // !QT_NO_CURSOR
# define FOR_EACH_GUI_METATYPE(F) \
FOR_EACH_GUI_METATYPE_BASE(F)
-#endif // !QTEST_NO_CURSOR
+#endif // !QT_NO_CURSOR
namespace {
@@ -131,7 +129,7 @@ template<> struct TypeComparator<QMetaType::QBitmap>
{ return v1.size() == v2.size(); }
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
template<> struct TypeComparator<QMetaType::QCursor>
{
static bool equal(const QCursor &v1, const QCursor &v2)
@@ -176,7 +174,7 @@ template<> struct TestValueFactory<QMetaType::QRegion> {
template<> struct TestValueFactory<QMetaType::QBitmap> {
static QBitmap *create() { return new QBitmap(16, 32); }
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
template<> struct TestValueFactory<QMetaType::QCursor> {
static QCursor *create() { return new QCursor(Qt::WaitCursor); }
};
diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
index 8be7227c54..a057ec2207 100644
--- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
@@ -52,8 +52,6 @@
#include "tst_qvariant_common.h"
-#include "../../../../qtest-config.h"
-
class tst_QGuiVariant : public QObject
{
Q_OBJECT
@@ -172,7 +170,7 @@ void tst_QGuiVariant::canConvert_data()
var = QVariant::fromValue(QColor());
QTest::newRow("Color")
<< var << N << N << N << Y << Y << Y << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << Y << N << N << N << N;
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
var = QVariant::fromValue(QCursor());
QTest::newRow("Cursor")
<< var << N << N << N << N << N << N << Y << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N << N;
@@ -508,7 +506,7 @@ void tst_QGuiVariant::writeToReadFromDataStream_data()
QTest::newRow( "bitmap_valid" ) << QVariant::fromValue( bitmap ) << false;
QTest::newRow( "brush_valid" ) << QVariant::fromValue( QBrush( Qt::red ) ) << false;
QTest::newRow( "color_valid" ) << QVariant::fromValue( QColor( Qt::red ) ) << false;
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QTest::newRow( "cursor_valid" ) << QVariant::fromValue( QCursor( Qt::PointingHandCursor ) ) << false;
#endif
QTest::newRow( "font_valid" ) << QVariant::fromValue( QFont( "times", 12 ) ) << false;
@@ -716,14 +714,14 @@ void tst_QGuiVariant::implicitConstruction()
F(Quaternion) \
F(PolygonF)
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
# define FOR_EACH_GUI_CLASS(F) \
FOR_EACH_GUI_CLASS_BASE(F) \
F(Cursor)
-#else // !QTEST_NO_CURSOR
+#else // !QT_NO_CURSOR
# define FOR_EACH_GUI_CLASS(F) \
FOR_EACH_GUI_CLASS_BASE(F)
-#endif // QTEST_NO_CURSOR
+#endif // QT_NO_CURSOR
#define CONSTRUCT(TYPE) \
{ \
@@ -741,14 +739,14 @@ void tst_QGuiVariant::implicitConstruction()
void tst_QGuiVariant::guiVariantAtExit()
{
// crash test, it should not crash at QGuiApplication exit
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
static QVariant cursor = QCursor();
#endif
static QVariant point = QPoint();
static QVariant icon = QIcon();
static QVariant image = QImage();
static QVariant palette = QPalette();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
Q_UNUSED(cursor);
#endif
Q_UNUSED(point);
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 0d0b6ae81e..6394a956bd 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -725,7 +725,7 @@ void tst_QKeySequence::listFromString()
void tst_QKeySequence::translated_data()
{
-#if defined (Q_OS_MAC) || defined (Q_OS_WINCE)
+#if defined (Q_OS_DARWIN)
QSKIP("Test not applicable");
#endif
@@ -756,7 +756,7 @@ void tst_QKeySequence::translated_data()
void tst_QKeySequence::translated()
{
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QFETCH(QString, transKey);
QFETCH(QString, compKey);
diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro
index 08e1b1d3a0..f975e00ffa 100644
--- a/tests/auto/gui/kernel/qwindow/qwindow.pro
+++ b/tests/auto/gui/kernel/qwindow/qwindow.pro
@@ -5,4 +5,4 @@ QT += core-private gui-private testlib
SOURCES += tst_qwindow.cpp
-contains(QT_CONFIG,dynamicgl):win32:!wince:!winrt: LIBS += -luser32
+contains(QT_CONFIG,dynamicgl):win32:!winrt: LIBS += -luser32
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 892dc0899f..1756dab70a 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -40,7 +40,7 @@
#if defined(Q_OS_QNX)
#include <QOpenGLContext>
-#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
# include <QtCore/qt_windows.h>
#endif
@@ -2079,7 +2079,7 @@ void tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109()
static bool isNativeWindowVisible(const QWindow *window)
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
return IsWindowVisible(reinterpret_cast<HWND>(window->winId()));
#else
Q_UNIMPLEMENTED();
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 8a97a9261f..d2cc7ce072 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -39,9 +39,7 @@
#include <qimage.h>
#include <qthread.h>
#include <limits.h>
-#if !defined(Q_OS_WINCE)
#include <math.h>
-#endif
#include <qpaintengine.h>
#ifndef QT_NO_WIDGETS
#include <qdesktopwidget.h>
diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp
index d24435198e..6a297dbfc2 100644
--- a/tests/auto/gui/painting/qregion/tst_qregion.cpp
+++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp
@@ -47,6 +47,7 @@ public:
private slots:
void moveSemantics();
void boundingRect();
+ void rangeFor();
void rects();
void swap();
void setRects();
@@ -136,17 +137,34 @@ void tst_QRegion::boundingRect()
}
+void tst_QRegion::rangeFor()
+{
+ // compile-only test for range-for over QRegion, so really useless
+ // content otherwise:
+ QRect rect(10, -20, 30, 40);
+ QRegion region(rect);
+ int equal = 0;
+ for (const QRect &r : region) // check this compiles
+ equal += int(r == rect); // can't use QCOMPARE here b/c of the
+ // MSVC 201272013 parse bug re:
+ // do-while in range-for loops
+ QCOMPARE(equal, 1);
+}
+
void tst_QRegion::rects()
{
{
QRect rect;
QRegion region(rect);
QVERIFY(region.isEmpty());
+ QCOMPARE(region.begin(), region.end());
QVERIFY(region.rects().isEmpty());
}
{
QRect rect(10, -20, 30, 40);
QRegion region(rect);
+ QCOMPARE(region.end(), region.begin() + 1);
+ QCOMPARE(*region.begin(), rect);
QCOMPARE(region.rects().count(), 1);
QCOMPARE(region.rects()[0], rect);
}
@@ -192,6 +210,7 @@ void tst_QRegion::setRects()
region.setRects(&rect, 0);
QVERIFY(region.isEmpty());
QCOMPARE(region, QRegion());
+ QCOMPARE(region.begin(), region.end());
QVERIFY(!region.boundingRect().isValid());
QVERIFY(region.rects().isEmpty());
}
@@ -199,6 +218,7 @@ void tst_QRegion::setRects()
QRegion region;
QRect rect;
region.setRects(&rect, 1);
+ QCOMPARE(region.begin(), region.end());
QVERIFY(!region.boundingRect().isValid());
QVERIFY(region.rects().isEmpty());
}
@@ -206,8 +226,10 @@ void tst_QRegion::setRects()
QRegion region;
QRect rect(10, -20, 30, 40);
region.setRects(&rect, 1);
+ QCOMPARE(region.end(), region.begin() + 1);
QCOMPARE(region.rects().count(), 1);
QCOMPARE(region.rects()[0], rect);
+ QCOMPARE(*region.begin(), rect);
}
}
@@ -320,8 +342,12 @@ void tst_QRegion::emptyPolygonRegion()
QRegion r(pa);
QTEST(r.isEmpty(), "isEmpty");
+ QTEST(int(std::distance(r.begin(), r.end())), "numRects");
+ QVector<QRect> rects;
+ std::copy(r.begin(), r.end(), std::back_inserter(rects));
QTEST(r.rects().count(), "numRects");
QTEST(r.rects(), "rects");
+ QCOMPARE(r.rects(), rects);
}
@@ -860,6 +886,7 @@ void tst_QRegion::isEmpty()
QFETCH(QRegion, region);
QVERIFY(region.isEmpty());
+ QCOMPARE(region.begin(), region.end());
QCOMPARE(region, QRegion());
QCOMPARE(region.rectCount(), 0);
QCOMPARE(region.boundingRect(), QRect());
@@ -892,6 +919,11 @@ void tst_QRegion::regionFromPath()
path.addRect(0, 100, 100, 1000);
QRegion rgn(path.toFillPolygon().toPolygon());
+
+ QCOMPARE(rgn.end(), rgn.begin() + 2);
+ QCOMPARE(rgn.begin()[0], QRect(0, 0, 10, 10));
+ QCOMPARE(rgn.begin()[1], QRect(0, 100, 100, 1000));
+
QCOMPARE(rgn.rects().size(), 2);
QCOMPARE(rgn.rects().at(0), QRect(0, 0, 10, 10));
QCOMPARE(rgn.rects().at(1), QRect(0, 100, 100, 1000));
@@ -905,8 +937,14 @@ void tst_QRegion::regionFromPath()
path.addRect(10, 10, 80, 80);
QRegion rgn(path.toFillPolygon().toPolygon());
- QCOMPARE(rgn.rects().size(), 4);
+ QCOMPARE(rgn.end(), rgn.begin() + 4);
+ QCOMPARE(rgn.begin()[0], QRect(0, 0, 100, 10));
+ QCOMPARE(rgn.begin()[1], QRect(0, 10, 10, 80));
+ QCOMPARE(rgn.begin()[2], QRect(90, 10, 10, 80));
+ QCOMPARE(rgn.begin()[3], QRect(0, 90, 100, 10));
+
+ QCOMPARE(rgn.rects().size(), 4);
QCOMPARE(rgn.rects().at(0), QRect(0, 0, 100, 10));
QCOMPARE(rgn.rects().at(1), QRect(0, 10, 10, 80));
QCOMPARE(rgn.rects().at(2), QRect(90, 10, 10, 80));
diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
index e05d7dd022..a79526c434 100644
--- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
+++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
@@ -114,7 +114,7 @@ void tst_QWMatrix::mapping_data()
<< QRect( 0, 0, 30, 40 )
<< QPolygon( QRect( -300, -400, 300, 400 ) );
-#if (defined(Q_OS_WIN) || defined(Q_OS_WINCE)) && !defined(M_PI)
+#if defined(Q_OS_WIN) && !defined(M_PI)
#define M_PI 3.14159265897932384626433832795f
#endif
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
index d3404e335a..9542d306ba 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/tst_qabstracttextdocumentlayout.cpp
@@ -48,6 +48,8 @@ private slots:
void getSetCheck();
void maximumBlockCount();
void anchorAt();
+ void imageAt();
+ void formatAt();
};
tst_QAbstractTextDocumentLayout::tst_QAbstractTextDocumentLayout()
@@ -156,7 +158,7 @@ void tst_QAbstractTextDocumentLayout::anchorAt()
// anchorAt on start returns link
QRect linkBr = metrics.boundingRect("foo");
- QPointF linkPoint(linkBr.width() + blockStart.x(), (linkBr.height() / 2) + blockStart.y());
+ QPointF linkPoint((linkBr.width() / 2) + blockStart.x(), (linkBr.height() / 2) + blockStart.y());
QCOMPARE(documentLayout->anchorAt(linkPoint), QString("link"));
// anchorAt() on top of preedit at end should not assert
@@ -171,5 +173,61 @@ void tst_QAbstractTextDocumentLayout::anchorAt()
QCOMPARE(documentLayout->anchorAt(preeditPoint), QString());
}
+void tst_QAbstractTextDocumentLayout::imageAt()
+{
+ QTextDocument doc;
+ doc.setHtml("foo<a href=\"link\"><img src=\"image\" width=\"50\" height=\"50\"/></a>");
+ QAbstractTextDocumentLayout *documentLayout = doc.documentLayout();
+ QTextBlock firstBlock = doc.begin();
+ QTextLayout *layout = firstBlock.layout();
+ layout->setPreeditArea(doc.toPlainText().length(), "xxx");
+
+ doc.setPageSize(QSizeF(1000, 1000));
+ QFontMetrics metrics(layout->font());
+ QPointF blockStart = documentLayout->blockBoundingRect(firstBlock).topLeft();
+
+ QRect fooBr = metrics.boundingRect("foo");
+ QPointF imagePoint(fooBr.width() + blockStart.x() + 25, blockStart.y() + 25);
+ // imageAt on image returns source
+ QCOMPARE(documentLayout->imageAt(imagePoint), QString("image"));
+ // anchorAt on image returns link
+ QCOMPARE(documentLayout->anchorAt(imagePoint), QString("link"));
+
+ // imageAt on start returns nothing (there's the "foo" text)
+ QPointF fooPoint(fooBr.width() + blockStart.x(), (fooBr.height() / 2) + blockStart.y());
+ QCOMPARE(documentLayout->imageAt(fooPoint), QString());
+}
+
+void tst_QAbstractTextDocumentLayout::formatAt()
+{
+ QTextDocument doc;
+ doc.setHtml("foo<i><a href=\"link\"><img src=\"image\" width=\"50\" height=\"50\"/></a></i>");
+ QAbstractTextDocumentLayout *documentLayout = doc.documentLayout();
+ QTextBlock firstBlock = doc.begin();
+ QTextLayout *layout = firstBlock.layout();
+ layout->setPreeditArea(doc.toPlainText().length(), "xxx");
+
+ doc.setPageSize(QSizeF(1000, 1000));
+ QFontMetrics metrics(layout->font());
+ QPointF blockStart = documentLayout->blockBoundingRect(firstBlock).topLeft();
+
+ QRect fooBr = metrics.boundingRect("foo");
+ QPointF imagePoint(fooBr.width() + blockStart.x() + 25, blockStart.y() + 25);
+
+ QTextFormat format = documentLayout->formatAt(imagePoint);
+ QVERIFY(format.isCharFormat());
+ QVERIFY(format.toCharFormat().isAnchor());
+ QVERIFY(format.toCharFormat().fontItalic());
+ QVERIFY(format.isImageFormat());
+
+ // move over the unformatted "foo" text)
+ QPointF fooPoint(fooBr.width() + blockStart.x(), (fooBr.height() / 2) + blockStart.y());
+ format = documentLayout->formatAt(fooPoint);
+ QVERIFY(format.isCharFormat());
+ QVERIFY(!format.toCharFormat().isAnchor());
+ QVERIFY(!format.toCharFormat().fontItalic());
+ QVERIFY(!format.isImageFormat());
+}
+
QTEST_MAIN(tst_QAbstractTextDocumentLayout)
#include "tst_qabstracttextdocumentlayout.moc"
diff --git a/tests/auto/gui/text/qcssparser/qcssparser.pro b/tests/auto/gui/text/qcssparser/qcssparser.pro
index 88d1fcfd2d..b92859d4fb 100644
--- a/tests/auto/gui/text/qcssparser/qcssparser.pro
+++ b/tests/auto/gui/text/qcssparser/qcssparser.pro
@@ -6,14 +6,6 @@ QT += xml gui-private testlib
requires(contains(QT_CONFIG,private_tests))
DEFINES += SRCDIR=\\\"$$PWD\\\"
-wince* {
- addFiles.files = testdata
- addFiles.path = .
- timesFont.files = C:/Windows/Fonts/times.ttf
- timesFont.path = .
- DEPLOYMENT += addFiles timesFont
-}
-
android {
RESOURCES += \
testdata.qrc
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 847d6e2e2f..51e9bf646a 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -27,9 +27,6 @@
****************************************************************************/
#include <QtTest/QtTest>
#include <QtXml/QtXml>
-#if defined(Q_OS_WINCE)
-#include <QtGui/QFontDatabase>
-#endif
#include <QtGui/QFontInfo>
#include <QtGui/QFontMetrics>
@@ -39,10 +36,6 @@ class tst_QCssParser : public QObject
{
Q_OBJECT
-public slots:
- void initTestCase();
- void cleanupTestCase();
-
private slots:
void scanner_data();
void scanner();
@@ -85,33 +78,8 @@ private slots:
void extractBorder();
void noTextDecoration();
void quotedAndUnquotedIdentifiers();
-
-private:
-#if defined(Q_OS_WINCE)
- int m_timesFontId;
-#endif
};
-void tst_QCssParser::initTestCase()
-{
-#if defined(Q_OS_WINCE)
- QFontDatabase fontDB;
- m_timesFontId = -1;
- if (!fontDB.families().contains("Times New Roman")) {
- m_timesFontId = QFontDatabase::addApplicationFont("times.ttf");
- QVERIFY(m_timesFontId != -1);
- }
-#endif
-}
-
-void tst_QCssParser::cleanupTestCase()
-{
-#if defined(Q_OS_WINCE)
- if (m_timesFontId != -1)
- QFontDatabase::removeApplicationFont(m_timesFontId);
-#endif
-}
-
void tst_QCssParser::scanner_data()
{
QTest::addColumn<QString>("input");
@@ -119,7 +87,7 @@ void tst_QCssParser::scanner_data()
#if defined(Q_OS_ANDROID)
QDir d(":/");
-#elif !defined(Q_OS_IRIX) && !defined(Q_OS_WINCE)
+#elif !defined(Q_OS_IRIX)
QDir d(SRCDIR);
#else
QDir d(QDir::current());
diff --git a/tests/auto/gui/text/qfont/BLACKLIST b/tests/auto/gui/text/qfont/BLACKLIST
index d859dee03e..8890ec1ef3 100644
--- a/tests/auto/gui/text/qfont/BLACKLIST
+++ b/tests/auto/gui/text/qfont/BLACKLIST
@@ -1,2 +1,4 @@
[exactMatch]
+# QTBUG-46054
opensuse-13.1
+opensuse-42.1
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 57530653c1..188c35c14c 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -656,11 +656,11 @@ void tst_QFont::defaultFamily_data()
QTest::addColumn<QFont::StyleHint>("styleHint");
QTest::addColumn<QStringList>("acceptableFamilies");
- QTest::newRow("serif") << QFont::Serif << (QStringList() << "Times New Roman" << "Times" << "Droid Serif" << getPlatformGenericFont("serif"));
- QTest::newRow("monospace") << QFont::Monospace << (QStringList() << "Courier New" << "Monaco" << "Droid Sans Mono" << getPlatformGenericFont("monospace"));
- QTest::newRow("cursive") << QFont::Cursive << (QStringList() << "Comic Sans MS" << "Apple Chancery" << "Roboto" << "Droid Sans" << getPlatformGenericFont("cursive"));
- QTest::newRow("fantasy") << QFont::Fantasy << (QStringList() << "Impact" << "Zapfino" << "Roboto" << "Droid Sans" << getPlatformGenericFont("fantasy"));
- QTest::newRow("sans-serif") << QFont::SansSerif << (QStringList() << "Arial" << "Lucida Grande" << "Roboto" << "Droid Sans" << getPlatformGenericFont("sans-serif"));
+ QTest::newRow("serif") << QFont::Serif << (QStringList() << "Times New Roman" << "Times" << "Droid Serif" << getPlatformGenericFont("serif").split(","));
+ QTest::newRow("monospace") << QFont::Monospace << (QStringList() << "Courier New" << "Monaco" << "Droid Sans Mono" << getPlatformGenericFont("monospace").split(","));
+ QTest::newRow("cursive") << QFont::Cursive << (QStringList() << "Comic Sans MS" << "Apple Chancery" << "Roboto" << "Droid Sans" << getPlatformGenericFont("cursive").split(","));
+ QTest::newRow("fantasy") << QFont::Fantasy << (QStringList() << "Impact" << "Zapfino" << "Roboto" << "Droid Sans" << getPlatformGenericFont("fantasy").split(","));
+ QTest::newRow("sans-serif") << QFont::SansSerif << (QStringList() << "Arial" << "Lucida Grande" << "Roboto" << "Droid Sans" << getPlatformGenericFont("sans-serif").split(","));
}
void tst_QFont::defaultFamily()
diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro
index 5dba2fc06a..0aff8a3ac8 100644
--- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro
+++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro
@@ -3,12 +3,6 @@ TARGET = tst_qfontdatabase
SOURCES += tst_qfontdatabase.cpp
QT += testlib core-private gui-private
-wince* {
- additionalFiles.files = FreeMono.ttf
- additionalFiles.path = .
- DEPLOYMENT += additionalFiles
-}
-
android {
RESOURCES += testdata.qrc
}
diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
index 3abca8ce89..c08019a561 100644
--- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro
+++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
@@ -6,12 +6,5 @@ SOURCES += \
tst_qglyphrun.cpp
-wince* {
- additionalFiles.files = test.ttf
- additionalFiles.path = ../../../shared/resources/
- DEPLOYMENT += additionalFiles
-} else {
- RESOURCES += \
- testdata.qrc
-}
-
+RESOURCES += \
+ testdata.qrc
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index 1869139a98..b0f70d1a59 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -2901,15 +2901,28 @@ void tst_QTextDocument::testUndoBlocks()
doc->undo();
QCOMPARE(doc->toPlainText(), QString(""));
+ cursor.insertText("town");
+ cursor.beginEditBlock(); // Edit block 1 - Deletion/Insertion
+ cursor.setPosition(0, QTextCursor::KeepAnchor);
+ cursor.insertText("r");
+ cursor.endEditBlock();
+ cursor.insertText("est"); // Merged into edit block 1
+ QCOMPARE(doc->toPlainText(), QString("rest"));
+ doc->undo();
+ QCOMPARE(doc->toPlainText(), QString("town"));
+ doc->undo();
+ QCOMPARE(doc->toPlainText(), QString(""));
+
+ // This case would not happen in practice. If the user typed out this text, it would all be part of one
+ // edit block. This would cause the undo to clear all text. But for the purpose of testing the beginEditBlock
+ // and endEditBlock calls with respect to qtextdocument this is tested.
cursor.insertText("quod");
- cursor.beginEditBlock();
+ cursor.beginEditBlock(); // Edit block 1 - Insertion
cursor.insertText(" erat");
cursor.endEditBlock();
- cursor.insertText(" demonstrandum");
+ cursor.insertText(" demonstrandum"); // Merged into edit block 1
QCOMPARE(doc->toPlainText(), QString("quod erat demonstrandum"));
doc->undo();
- QCOMPARE(doc->toPlainText(), QString("quod erat"));
- doc->undo();
QCOMPARE(doc->toPlainText(), QString("quod"));
doc->undo();
QCOMPARE(doc->toPlainText(), QString(""));
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 0beea6528b..36907b9258 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -150,7 +150,7 @@ static void doShapingTests()
}
} else {
// decomposed shaping
- if (string.at(0) == 0x1fc1 || string.at(0) == 0x1fed)
+ if (string.at(0) == QChar(0x1fc1) || string.at(0) == QChar(0x1fed))
return;
if (string.normalized(QString::NormalizationForm_D).normalized(QString::NormalizationForm_C) != string)
return;
diff --git a/tests/auto/gui/text/qzip/qzip.pro b/tests/auto/gui/text/qzip/qzip.pro
index ebcd6ec022..eb3de04da6 100644
--- a/tests/auto/gui/text/qzip/qzip.pro
+++ b/tests/auto/gui/text/qzip/qzip.pro
@@ -3,12 +3,6 @@ TARGET = tst_qzip
QT += gui-private testlib
SOURCES += tst_qzip.cpp
-wince* {
- addFiles.files = testdata
- addFiles.path = .
- DEPLOYMENT += addFiles
-}
-
android {
RESOURCES += \
testdata.qrc
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index 58164f1fa1..f57ed12ed3 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -46,7 +46,7 @@ void tst_qdesktopservices::openUrl()
{
// At the bare minimum check that they return false for invalid url's
QCOMPARE(QDesktopServices::openUrl(QUrl()), false);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
// this test is only valid on windows on other systems it might mean open a new document in the application handling .file
const QRegularExpression messagePattern("ShellExecute 'file://invalid\\.file' failed \\(error \\d+\\)\\.");
QVERIFY(messagePattern.isValid());
diff --git a/tests/auto/network/access/qftp/qftp.pro b/tests/auto/network/access/qftp/qftp.pro
index 4294f27e74..6f1a4a7543 100644
--- a/tests/auto/network/access/qftp/qftp.pro
+++ b/tests/auto/network/access/qftp/qftp.pro
@@ -4,10 +4,3 @@ SOURCES += tst_qftp.cpp
requires(contains(QT_CONFIG,private_tests))
QT = core network network-private testlib
-
-wince {
- addFiles.files = rfc3252.txt
- addFiles.path = .
- DEPLOYMENT += addFiles
-}
-
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index edeb471401..a13fa86405 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -276,14 +276,9 @@ void tst_QFtp::init()
inFileDirExistsFunction = false;
-#if !defined(Q_OS_WINCE)
srand(time(0));
uniqueExtension = QString::number((quintptr)this) + QString::number(rand())
+ QString::number((qulonglong)time(0));
-#else
- srand(0);
- uniqueExtension = QString::number((quintptr)this) + QString::number(rand()) + QLatin1Char('0');
-#endif
}
void tst_QFtp::cleanup()
@@ -1353,11 +1348,7 @@ void tst_QFtp::abort_data()
QTest::newRow( "get_fluke02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/rfc3252") << QByteArray();
// Qt/CE test environment has too little memory for this test
-#if !defined(Q_OS_WINCE)
QByteArray bigData( 10*1024*1024, 0 );
-#else
- QByteArray bigData( 1*1024*1024, 0 );
-#endif
bigData.fill( 'B' );
QTest::newRow( "put_fluke01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/upload/abort_put") << bigData;
}
diff --git a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
index bd10c77252..d3a92436ac 100644
--- a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
+++ b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
@@ -1,5 +1,5 @@
TEMPLATE = subdirs
-!winrt:!wince: SUBDIRS += echo
+!winrt:SUBDIRS += echo
test.depends += $$SUBDIRS
SUBDIRS += test
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 21a84dfbb2..c679d1f108 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -205,6 +205,7 @@ private Q_SLOTS:
void invalidProtocol();
void getFromData_data();
void getFromData();
+ void getFromFile_data();
void getFromFile();
void getFromFileSpecial_data();
void getFromFileSpecial();
@@ -650,8 +651,10 @@ private slots:
#endif
void slotError(QAbstractSocket::SocketError err)
{
- Q_ASSERT(!client.isNull());
- qDebug() << "slotError" << err << client->errorString();
+ if (client.isNull())
+ qDebug() << "slotError" << err;
+ else
+ qDebug() << "slotError" << err << client->errorString();
}
public slots:
@@ -1674,14 +1677,26 @@ void tst_QNetworkReply::getFromData()
QCOMPARE(reply->readAll(), expected);
}
+void tst_QNetworkReply::getFromFile_data()
+{
+ QTest::addColumn<bool>("backgroundAttribute");
+
+ QTest::newRow("no-background-attribute") << false;
+ QTest::newRow("background-attribute") << true;
+}
+
void tst_QNetworkReply::getFromFile()
{
+ QFETCH(bool, backgroundAttribute);
+
// create the file:
QTemporaryFile file(QDir::currentPath() + "/temp-XXXXXX");
file.setAutoRemove(true);
QVERIFY2(file.open(), qPrintable(file.errorString()));
QNetworkRequest request(QUrl::fromLocalFile(file.fileName()));
+ if (backgroundAttribute)
+ request.setAttribute(QNetworkRequest::BackgroundRequestAttribute, QVariant::fromValue(true));
QNetworkReplyPtr reply;
static const char fileData[] = "This is some data that is in the file.\r\n";
@@ -1691,6 +1706,7 @@ void tst_QNetworkReply::getFromFile()
QCOMPARE(file.size(), qint64(data.size()));
RUN_REQUEST(runSimpleRequest(QNetworkAccessManager::GetOperation, request, reply));
+ QVERIFY(waitForFinish(reply) != Timeout);
QCOMPARE(reply->url(), request.url());
QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -4319,9 +4335,6 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
QSKIP("No qprocess support", SkipAll);
#else
-#if defined(Q_OS_WINCE)
- QSKIP("Currently no stdin/out supported for Windows CE");
-#else
#ifdef Q_OS_WIN
if (qstrcmp(QTest::currentDataTag(), "small") == 0)
QSKIP("When passing a CR-LF-LF sequence through Windows stdio, it gets converted, "
@@ -4355,7 +4368,6 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
QCOMPARE(file.size(), qint64(data.size()));
QByteArray contents = file.readAll();
QCOMPARE(contents, data);
-#endif
#endif // QT_NO_PROCESS
}
@@ -6561,12 +6573,7 @@ void tst_QNetworkReply::getFromHttpIntoBuffer2()
QFETCH(bool, useDownloadBuffer);
// On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results.
-#if defined(Q_OS_WINCE_WM)
- // Show some mercy to non-desktop platform/s
- enum {UploadSize = 4*1024*1024}; // 4 MB
-#else
enum {UploadSize = 32*1024*1024}; // 32 MB
-#endif
GetFromHttpIntoBuffer2Server server(UploadSize, true, false);
diff --git a/tests/auto/network/kernel/qhostaddress/qhostaddress.pro b/tests/auto/network/kernel/qhostaddress/qhostaddress.pro
index 19d74dfd9b..a79fa2f59d 100644
--- a/tests/auto/network/kernel/qhostaddress/qhostaddress.pro
+++ b/tests/auto/network/kernel/qhostaddress/qhostaddress.pro
@@ -5,10 +5,4 @@ SOURCES += tst_qhostaddress.cpp
QT = core network testlib
-win32: {
-wince {
- LIBS += -lws2
-} else {
- LIBS += -lws2_32
-}
-}
+win32:LIBS += -lws2_32
diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
index 4fb97fe1f2..419c781aab 100644
--- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
+++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp
@@ -62,6 +62,8 @@ private slots:
void specialAddresses();
void compare_data();
void compare();
+ void isEqual_data();
+ void isEqual();
void assignment();
void scopeId();
void hashKey();
@@ -291,6 +293,7 @@ void tst_QHostAddress::compare_data()
QTest::newRow("5") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::Broadcast) << false;
QTest::newRow("6") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::LocalHostIPv6) << false;
QTest::newRow("7") << QHostAddress() << QHostAddress(QHostAddress::LocalHostIPv6) << false;
+ QTest::newRow("any4-any6") << QHostAddress(QHostAddress::AnyIPv4) << QHostAddress(QHostAddress::AnyIPv6) << false;
Q_IPV6ADDR localhostv4mapped = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 1 } };
QTest::newRow("v4-v4mapped") << QHostAddress(QHostAddress::LocalHost) << QHostAddress("::ffff:127.0.0.1") << false;
@@ -309,6 +312,53 @@ void tst_QHostAddress::compare()
QCOMPARE(qHash(first), qHash(second));
}
+void tst_QHostAddress::isEqual_data()
+{
+ QTest::addColumn<QHostAddress>("first");
+ QTest::addColumn<QHostAddress>("second");
+ QTest::addColumn<int>("flags");
+ QTest::addColumn<bool>("result");
+
+ // QHostAddress::StrictConversion is already tested in compare()
+ QTest::newRow("localhost4to6-local") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertLocalHost << true;
+ QTest::newRow("localhost4to6-compat") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertV4CompatToIPv4 << false;
+ QTest::newRow("localhost4to6-mapped") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertV4MappedToIPv4 << false;
+ QTest::newRow("localhost4to6-unspec") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertUnspecifiedAddress << false;
+ QTest::newRow("0.0.0.1-::1-local") << QHostAddress("0.0.0.1") << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertLocalHost << false;
+ QTest::newRow("v4-v4compat-local") << QHostAddress("192.168.1.1") << QHostAddress("::192.168.1.1") << (int)QHostAddress::ConvertLocalHost << false;
+ QTest::newRow("v4-v4mapped-local") << QHostAddress("192.168.1.1") << QHostAddress("::ffff:192.168.1.1") << (int)QHostAddress::ConvertLocalHost << false;
+ QTest::newRow("0.0.0.1-::1-unspec") << QHostAddress("0.0.0.1") << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertUnspecifiedAddress << false;
+ QTest::newRow("v4-v4compat-unspec") << QHostAddress("192.168.1.1") << QHostAddress("::192.168.1.1") << (int)QHostAddress::ConvertUnspecifiedAddress << false;
+ QTest::newRow("v4-v4mapped-unspec") << QHostAddress("192.168.1.1") << QHostAddress("::ffff:192.168.1.1") << (int)QHostAddress::ConvertUnspecifiedAddress << false;
+ QTest::newRow("0.0.0.1-::1-compat") << QHostAddress("0.0.0.1") << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertV4CompatToIPv4 << false;
+ QTest::newRow("v4-v4compat-compat") << QHostAddress("192.168.1.1") << QHostAddress("::192.168.1.1") << (int)QHostAddress::ConvertV4CompatToIPv4 << true;
+ QTest::newRow("v4-v4mapped-compat") << QHostAddress("192.168.1.1") << QHostAddress("::ffff:192.168.1.1") << (int)QHostAddress::ConvertV4CompatToIPv4 << false;
+ QTest::newRow("0.0.0.1-::1-mapped") << QHostAddress("0.0.0.1") << QHostAddress(QHostAddress::LocalHostIPv6) << (int)QHostAddress::ConvertV4MappedToIPv4 << false;
+ QTest::newRow("v4-v4compat-mapped") << QHostAddress("192.168.1.1") << QHostAddress("::192.168.1.1") << (int)QHostAddress::ConvertV4MappedToIPv4 << false;
+ QTest::newRow("v4-v4mapped-mapped") << QHostAddress("192.168.1.1") << QHostAddress("::FFFF:192.168.1.1") << (int)QHostAddress::ConvertV4MappedToIPv4 << true;
+ QTest::newRow("undef-any-local") << QHostAddress() << QHostAddress(QHostAddress::Any) << (int)QHostAddress::ConvertLocalHost << false;
+ QTest::newRow("undef-any-unspec") << QHostAddress() << QHostAddress(QHostAddress::Any) << (int)QHostAddress::ConvertUnspecifiedAddress << false;
+ QTest::newRow("anyv6-anyv4-compat") << QHostAddress(QHostAddress::AnyIPv6) << QHostAddress(QHostAddress::AnyIPv4) << (int)QHostAddress::ConvertV4CompatToIPv4 << true;
+ QTest::newRow("anyv6-anyv4-mapped") << QHostAddress(QHostAddress::AnyIPv6) << QHostAddress(QHostAddress::AnyIPv4) << (int)QHostAddress::ConvertV4MappedToIPv4 << false;
+ QTest::newRow("anyv6-anyv4-unspec") << QHostAddress(QHostAddress::AnyIPv6) << QHostAddress(QHostAddress::AnyIPv4) << (int)QHostAddress::ConvertUnspecifiedAddress << true;
+ QTest::newRow("any-anyv4-unspec") << QHostAddress(QHostAddress::Any) << QHostAddress(QHostAddress::AnyIPv4) << (int)QHostAddress::ConvertUnspecifiedAddress << true;
+ QTest::newRow("any-anyv6-unspec") << QHostAddress(QHostAddress::Any) << QHostAddress(QHostAddress::AnyIPv6) << (int)QHostAddress::ConvertUnspecifiedAddress << true;
+ QTest::newRow("anyv6-anyv4-local") << QHostAddress(QHostAddress::AnyIPv6) << QHostAddress(QHostAddress::AnyIPv4) << (int)QHostAddress::ConvertLocalHost << false;
+ QTest::newRow("any-anyv4-local") << QHostAddress(QHostAddress::Any) << QHostAddress(QHostAddress::AnyIPv4) << (int)QHostAddress::ConvertLocalHost << false;
+ QTest::newRow("any-anyv6-local") << QHostAddress(QHostAddress::Any) << QHostAddress(QHostAddress::AnyIPv6) << (int)QHostAddress::ConvertLocalHost << false;
+}
+
+void tst_QHostAddress::isEqual()
+{
+ QFETCH(QHostAddress, first);
+ QFETCH(QHostAddress, second);
+ QFETCH(int, flags);
+ QFETCH(bool, result);
+
+ QCOMPARE(first.isEqual(second, QHostAddress::ConversionModeFlag(flags)), result);
+ QCOMPARE(second.isEqual(first, QHostAddress::ConversionModeFlag(flags)), result);
+}
+
void tst_QHostAddress::assignment()
{
QHostAddress address;
diff --git a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
index 12858c97ee..4ea415c529 100644
--- a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
+++ b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
@@ -6,11 +6,7 @@ SOURCES += tst_qhostinfo.cpp
requires(contains(QT_CONFIG,private_tests))
QT = core-private network-private testlib
-wince {
- LIBS += ws2.lib
-} else {
- win32:LIBS += -lws2_32
-}
+win32:LIBS += -lws2_32
# needed for getaddrinfo with official MinGW
mingw:DEFINES += _WIN32_WINNT=0x0501
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index 13d4442ada..f6d9b71aa2 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -66,11 +66,7 @@
#include "private/qhostinfo_p.h"
#if !defined(QT_NO_GETADDRINFO)
-# if !defined(Q_OS_WINCE)
# include <sys/types.h>
-# else
-# include <types.h>
-# endif
# if defined(Q_OS_UNIX)
# include <sys/socket.h>
# endif
@@ -399,11 +395,7 @@ protected:
void tst_QHostInfo::threadSafety()
{
const int nattempts = 5;
-#if defined(Q_OS_WINCE)
- const int runs = 10;
-#else
const int runs = 100;
-#endif
LookupThread thr[nattempts];
for (int j = 0; j < runs; ++j) {
for (int i = 0; i < nattempts; ++i)
diff --git a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
index a3b4e89450..6c7857ea1d 100644
--- a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
+++ b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
@@ -4,13 +4,7 @@ QNETWORK_SRC = $$QT_SOURCE_TREE/src/network
INCLUDEPATH += $$QNETWORK_SRC
-win32 {
- wince {
- LIBS += -lws2
- } else {
- LIBS += -lws2_32
- }
-}
+win32:LIBS += -lws2_32
unix:contains(QT_CONFIG, reduce_exports) {
SOURCES += $$QNETWORK_SRC/socket/qnativesocketengine_unix.cpp
diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
index 041a0ce16c..d159d6d683 100644
--- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
+++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
@@ -494,9 +494,6 @@ void tst_PlatformSocketEngine::readWriteBufferSize()
qint64 bufferSize = device.receiveBufferSize();
QVERIFY(bufferSize != -1);
device.setReceiveBufferSize(bufferSize + 1);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL(0, "Not supported by default on WinCE", Continue);
-#endif
QVERIFY(device.receiveBufferSize() > bufferSize);
bufferSize = device.sendBufferSize();
@@ -649,7 +646,7 @@ void tst_PlatformSocketEngine::receiveUrgentData()
QByteArray response;
// Native OOB data test doesn't work on HP-UX or WinCE
-#if !defined(Q_OS_HPUX) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_HPUX)
// The server sends an urgent message
msg = 'Q';
QCOMPARE(int(::send(socketDescriptor, &msg, sizeof(msg), MSG_OOB)), 1);
diff --git a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
index 7237542e5c..68f3ea059b 100644
--- a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -626,11 +626,7 @@ void tst_QHttpSocketEngine::downloadBigFile()
QTime stopWatch;
stopWatch.start();
-#if defined(Q_OS_WINCE)
- QTestEventLoop::instance().enterLoop(240);
-#else
QTestEventLoop::instance().enterLoop(60);
-#endif
if (QTestEventLoop::instance().timeout())
QFAIL("Network operation timed out");
diff --git a/tests/auto/network/socket/qlocalsocket/test/test.pro b/tests/auto/network/socket/qlocalsocket/test/test.pro
index 6a5df7f9b6..ab9ed90b1d 100644
--- a/tests/auto/network/socket/qlocalsocket/test/test.pro
+++ b/tests/auto/network/socket/qlocalsocket/test/test.pro
@@ -2,13 +2,7 @@ CONFIG += testcase
DEFINES += QLOCALSERVER_DEBUG
DEFINES += QLOCALSOCKET_DEBUG
-
-wince* {
- DEFINES += QT_LOCALSOCKET_TCP
- DEFINES += SRCDIR=\\\"../\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/../\\\"
-}
+DEFINES += SRCDIR=\\\"$$PWD/../\\\"
QT = core network testlib
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 4bea9b116c..00e01094a4 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -867,10 +867,8 @@ void tst_QLocalSocket::threadedConnection_data()
QTest::newRow("1 client") << 1;
QTest::newRow("2 clients") << 2;
QTest::newRow("5 clients") << 5;
-#ifndef Q_OS_WINCE
QTest::newRow("10 clients") << 10;
QTest::newRow("20 clients") << 20;
-#endif
}
void tst_QLocalSocket::threadedConnection()
diff --git a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
index b4955df107..c945d77cda 100644
--- a/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/network/socket/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -785,11 +785,7 @@ void tst_QSocks5SocketEngine::downloadBigFile()
QTime stopWatch;
stopWatch.start();
-#if !defined(Q_OS_WINCE)
QTestEventLoop::instance().enterLoop(60);
-#else
- QTestEventLoop::instance().enterLoop(180);
-#endif
if (QTestEventLoop::instance().timeout())
QFAIL("Network operation timed out");
diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
index fdf1c48adf..1a8e7920d3 100644
--- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
+++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp
@@ -47,16 +47,8 @@ int main(int argc, char *argv[])
return 1;
}
-#if defined(Q_OS_WINCE)
- QFile file(QLatin1String("/test_signal.txt"));
- file.open(QIODevice::WriteOnly);
- file.write("Listening\n");
- file.flush();
- file.close();
-#else
printf("Listening\n");
fflush(stdout);
-#endif
server.waitForNewConnection(5000);
qFatal("Crash");
diff --git a/tests/auto/network/socket/qtcpserver/test/test.pro b/tests/auto/network/socket/qtcpserver/test/test.pro
index f0abfbc085..4491523383 100644
--- a/tests/auto/network/socket/qtcpserver/test/test.pro
+++ b/tests/auto/network/socket/qtcpserver/test/test.pro
@@ -1,16 +1,7 @@
CONFIG += testcase
SOURCES += ../tst_qtcpserver.cpp
-win32: {
-wince {
- LIBS += -lws2
- crashApp.files = ../crashingServer/crashingServer.exe
- crashApp.path = crashingServer
- DEPLOYMENT += crashApp
-} else {
- LIBS += -lws2_32
-}
-}
+win32:LIBS += -lws2_32
TARGET = ../tst_qtcpserver
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index 30aab3bf34..5a0baf73b5 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -106,6 +106,8 @@ private slots:
void eagainBlockingAccept();
+ void canAccessPendingConnectionsWhileNotListening();
+
private:
#ifndef QT_NO_BEARERMANAGEMENT
QNetworkSession *networkSession;
@@ -467,11 +469,7 @@ void tst_QTcpServer::waitForConnectionTest()
ThreadConnector connector(findLocalIpSocket.localAddress(), server.serverPort());
connector.start();
-#if defined(Q_OS_WINCE)
- QVERIFY(server.waitForNewConnection(9000, &timeout));
-#else
QVERIFY(server.waitForNewConnection(3000, &timeout));
-#endif
QVERIFY(!timeout);
}
@@ -562,21 +560,6 @@ void tst_QTcpServer::addressReusable()
QSKIP("No proxy support");
#endif // QT_NO_NETWORKPROXY
}
-#if defined(Q_OS_WINCE)
- QString signalName = QString::fromLatin1("/test_signal.txt");
- QFile::remove(signalName);
- // The crashingServer process will crash once it gets a connection.
- QProcess process;
- QString processExe = crashingServerDir + "/crashingServer";
- process.start(processExe);
- QVERIFY2(process.waitForStarted(), qPrintable(
- QString::fromLatin1("Could not start %1: %2").arg(processExe, process.errorString())));
- int waitCount = 5;
- while (waitCount-- && !QFile::exists(signalName))
- QTest::qWait(1000);
- QVERIFY(QFile::exists(signalName));
- QFile::remove(signalName);
-#else
// The crashingServer process will crash once it gets a connection.
QProcess process;
QString processExe = crashingServerDir + "/crashingServer";
@@ -584,7 +567,6 @@ void tst_QTcpServer::addressReusable()
QVERIFY2(process.waitForStarted(), qPrintable(
QString::fromLatin1("Could not start %1: %2").arg(processExe, process.errorString())));
QVERIFY(process.waitForReadyRead(5000));
-#endif
QTcpSocket socket;
socket.connectToHost(QHostAddress::LocalHost, 49199);
@@ -990,5 +972,22 @@ void tst_QTcpServer::eagainBlockingAccept()
server.close();
}
+class NonListeningTcpServer : public QTcpServer
+{
+public:
+ void addSocketFromOutside(QTcpSocket* s)
+ {
+ addPendingConnection(s);
+ }
+};
+
+void tst_QTcpServer::canAccessPendingConnectionsWhileNotListening()
+{
+ NonListeningTcpServer server;
+ QTcpSocket socket;
+ server.addSocketFromOutside(&socket);
+ QCOMPARE(&socket, server.nextPendingConnection());
+}
+
QTEST_MAIN(tst_QTcpServer)
#include "tst_qtcpserver.moc"
diff --git a/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro b/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
index fe6042b8a7..5686f4a697 100644
--- a/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
+++ b/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = test
-!wince:!vxworks: SUBDIRS += stressTest
+!vxworks: SUBDIRS += stressTest
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/network/socket/qtcpsocket/test/test.pro b/tests/auto/network/socket/qtcpsocket/test/test.pro
index 325abcaab8..2dc1490256 100644
--- a/tests/auto/network/socket/qtcpsocket/test/test.pro
+++ b/tests/auto/network/socket/qtcpsocket/test/test.pro
@@ -2,13 +2,7 @@ CONFIG += testcase
QT = core-private network-private testlib
SOURCES += ../tst_qtcpsocket.cpp
-win32: {
-wince {
- LIBS += -lws2
-} else {
- LIBS += -lws2_32
-}
-}
+win32:LIBS += -lws2_32
TARGET = tst_qtcpsocket
diff --git a/tests/auto/network/socket/qudpsocket/test/test.pro b/tests/auto/network/socket/qudpsocket/test/test.pro
index 8ad16c652d..efa50b21b4 100644
--- a/tests/auto/network/socket/qudpsocket/test/test.pro
+++ b/tests/auto/network/socket/qudpsocket/test/test.pro
@@ -15,12 +15,6 @@ win32 {
DESTDIR = ../
}
-wince* {
- addApp.files = ../clientserver/clientserver.exe
- addApp.path = clientserver
- DEPLOYMENT += addApp
-}
-
TARGET = tst_qudpsocket
CONFIG+=insignificant_test # QTBUG-25367, QTBUG-25368
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index ba49e8b041..942a074c87 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -435,13 +435,8 @@ void tst_QUdpSocket::ipv6Loop()
char peterBuffer[16*1024];
char paulBuffer[16*1024];
-#if !defined(Q_OS_WINCE)
- QVERIFY2(peter.waitForReadyRead(5000), QtNetworkSettings::msgSocketError(peter).constData());
- QVERIFY2(paul.waitForReadyRead(5000), QtNetworkSettings::msgSocketError(paul).constData());
-#else
- QVERIFY(peter.waitForReadyRead(15000));
- QVERIFY(paul.waitForReadyRead(15000));
-#endif
+ QVERIFY(peter.waitForReadyRead(5000));
+ QVERIFY(paul.waitForReadyRead(5000));
if (success) {
QCOMPARE(peter.readDatagram(peterBuffer, sizeof(peterBuffer)), qint64(paulMessage.length()));
QCOMPARE(paul.readDatagram(paulBuffer, sizeof(peterBuffer)), qint64(peterMessage.length()));
@@ -938,9 +933,6 @@ void tst_QUdpSocket::outOfProcessConnectedClientServerTest()
#ifdef QT_NO_PROCESS
QSKIP("No qprocess support", SkipAll);
#else
-#if defined(Q_OS_WINCE)
- QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE).");
-#endif
QProcess serverProcess;
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
QIODevice::ReadWrite | QIODevice::Text);
@@ -1002,9 +994,6 @@ void tst_QUdpSocket::outOfProcessUnconnectedClientServerTest()
#ifdef QT_NO_PROCESS
QSKIP("No qprocess support", SkipAll);
#else
-#if defined(Q_OS_WINCE)
- QSKIP("This test depends on reading data from QProcess (not supported on Qt/WinCE).");
-#endif
QProcess serverProcess;
serverProcess.start(QLatin1String("clientserver/clientserver server 1 1"),
QIODevice::ReadWrite | QIODevice::Text);
diff --git a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
index 87a210c051..7c1cd5b66b 100644
--- a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
+++ b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslcertificate.cpp
-!wince:win32:LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core network testlib
TARGET = tst_qsslcertificate
diff --git a/tests/auto/network/ssl/qsslcipher/qsslcipher.pro b/tests/auto/network/ssl/qsslcipher/qsslcipher.pro
index 4cb2dfebab..81ef2d8d9a 100644
--- a/tests/auto/network/ssl/qsslcipher/qsslcipher.pro
+++ b/tests/auto/network/ssl/qsslcipher/qsslcipher.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslcipher.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core network testlib
TARGET = tst_qsslcipher
diff --git a/tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro b/tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro
index e67b64b2b7..a180086c5e 100644
--- a/tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro
+++ b/tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslellipticcurve.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core network testlib
TARGET = tst_qsslellipticcurve
diff --git a/tests/auto/network/ssl/qsslerror/qsslerror.pro b/tests/auto/network/ssl/qsslerror/qsslerror.pro
index 7737aae3f1..117fd4ac27 100644
--- a/tests/auto/network/ssl/qsslerror/qsslerror.pro
+++ b/tests/auto/network/ssl/qsslerror/qsslerror.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslerror.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core network testlib
TARGET = tst_qsslerror
diff --git a/tests/auto/network/ssl/qsslkey/qsslkey.pro b/tests/auto/network/ssl/qsslkey/qsslkey.pro
index 7eb04793f3..52377a9005 100644
--- a/tests/auto/network/ssl/qsslkey/qsslkey.pro
+++ b/tests/auto/network/ssl/qsslkey/qsslkey.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslkey.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core network testlib
contains(QT_CONFIG, private_tests) {
QT += core-private network-private
diff --git a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
index de2be8e126..9a525408fd 100644
--- a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
+++ b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslsocket.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core core-private network-private testlib
TARGET = tst_qsslsocket
@@ -20,14 +20,6 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
LIBS += $$OPENSSL_LIBS
}
-wince* {
- DEFINES += SRCDIR=\\\"./\\\"
-
- certFiles.files = certs ssl.tar.gz
- certFiles.path = .
- DEPLOYMENT += certFiles
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index f8c5b8b67b..f1d66be442 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -229,6 +229,8 @@ private slots:
void simplePskConnect();
void ephemeralServerKey_data();
void ephemeralServerKey();
+ void allowedProtocolNegotiation();
+ void pskServer();
#endif
static void exitLoop()
@@ -3035,8 +3037,12 @@ class PskProvider : public QObject
Q_OBJECT
public:
+ bool m_server;
+ QByteArray m_identity;
+ QByteArray m_psk;
+
explicit PskProvider(QObject *parent = 0)
- : QObject(parent)
+ : QObject(parent), m_server(false)
{
}
@@ -3055,7 +3061,11 @@ public slots:
{
QVERIFY(authenticator);
QCOMPARE(authenticator->identityHint(), PSK_SERVER_IDENTITY_HINT);
- QVERIFY(authenticator->maximumIdentityLength() > 0);
+ if (m_server)
+ QCOMPARE(authenticator->maximumIdentityLength(), 0);
+ else
+ QVERIFY(authenticator->maximumIdentityLength() > 0);
+
QVERIFY(authenticator->maximumPreSharedKeyLength() > 0);
if (!m_identity.isEmpty()) {
@@ -3068,12 +3078,61 @@ public slots:
QCOMPARE(authenticator->preSharedKey(), m_psk);
}
}
-
-private:
- QByteArray m_identity;
- QByteArray m_psk;
};
+class PskServer : public QTcpServer
+{
+ Q_OBJECT
+public:
+ PskServer()
+ : socket(0),
+ config(QSslConfiguration::defaultConfiguration()),
+ ignoreSslErrors(true),
+ peerVerifyMode(QSslSocket::AutoVerifyPeer),
+ protocol(QSsl::TlsV1_0),
+ m_pskProvider()
+ {
+ m_pskProvider.m_server = true;
+ }
+ QSslSocket *socket;
+ QSslConfiguration config;
+ bool ignoreSslErrors;
+ QSslSocket::PeerVerifyMode peerVerifyMode;
+ QSsl::SslProtocol protocol;
+ QString ciphers;
+ PskProvider m_pskProvider;
+
+protected:
+ void incomingConnection(qintptr socketDescriptor)
+ {
+ socket = new QSslSocket(this);
+ socket->setSslConfiguration(config);
+ socket->setPeerVerifyMode(peerVerifyMode);
+ socket->setProtocol(protocol);
+ if (ignoreSslErrors)
+ connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
+
+ if (!ciphers.isEmpty()) {
+ socket->setCiphers(ciphers);
+ }
+
+ QVERIFY(socket->setSocketDescriptor(socketDescriptor, QAbstractSocket::ConnectedState));
+ QVERIFY(!socket->peerAddress().isNull());
+ QVERIFY(socket->peerPort() != 0);
+ QVERIFY(!socket->localAddress().isNull());
+ QVERIFY(socket->localPort() != 0);
+
+ connect(socket, &QSslSocket::preSharedKeyAuthenticationRequired, &m_pskProvider, &PskProvider::providePsk);
+
+ socket->startServerEncryption();
+ }
+
+protected slots:
+ void ignoreErrorSlot()
+ {
+ socket->ignoreSslErrors();
+ }
+};
void tst_QSslSocket::simplePskConnect_data()
{
QTest::addColumn<PskConnectTestType>("pskTestType");
@@ -3375,6 +3434,129 @@ void tst_QSslSocket::ephemeralServerKey()
QCOMPARE(client->sslConfiguration().ephemeralServerKey().isNull(), emptyKey);
}
+void tst_QSslSocket::allowedProtocolNegotiation()
+{
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT)
+
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return;
+
+ const QByteArray expectedNegotiated("cool-protocol");
+ QList<QByteArray> serverProtos;
+ serverProtos << expectedNegotiated << "not-so-cool-protocol";
+ QList<QByteArray> clientProtos;
+ clientProtos << "uber-cool-protocol" << expectedNegotiated << "not-so-cool-protocol";
+
+
+ SslServer server;
+ server.config.setAllowedNextProtocols(serverProtos);
+ QVERIFY(server.listen());
+
+ QSslSocket clientSocket;
+ auto configuration = clientSocket.sslConfiguration();
+ configuration.setAllowedNextProtocols(clientProtos);
+ clientSocket.setSslConfiguration(configuration);
+
+ clientSocket.connectToHostEncrypted("127.0.0.1", server.serverPort());
+ clientSocket.ignoreSslErrors();
+
+ QEventLoop loop;
+ QTimer::singleShot(5000, &loop, SLOT(quit()));
+ connect(&clientSocket, SIGNAL(encrypted()), &loop, SLOT(quit()));
+ loop.exec();
+
+ QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() ==
+ clientSocket.sslConfiguration().nextNegotiatedProtocol());
+ QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() == expectedNegotiated);
+
+#endif // OPENSSL_VERSION_NUMBER
+}
+
+void tst_QSslSocket::pskServer()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (!QSslSocket::supportsSsl() || setProxy)
+ return;
+
+ QSslSocket socket;
+ this->socket = &socket;
+
+ QSignalSpy connectedSpy(&socket, SIGNAL(connected()));
+ QVERIFY(connectedSpy.isValid());
+
+ QSignalSpy disconnectedSpy(&socket, SIGNAL(disconnected()));
+ QVERIFY(disconnectedSpy.isValid());
+
+ QSignalSpy connectionEncryptedSpy(&socket, SIGNAL(encrypted()));
+ QVERIFY(connectionEncryptedSpy.isValid());
+
+ QSignalSpy pskAuthenticationRequiredSpy(&socket, SIGNAL(preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)));
+ QVERIFY(pskAuthenticationRequiredSpy.isValid());
+
+ connect(&socket, SIGNAL(connected()), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(disconnected()), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(modeChanged(QSslSocket::SslMode)), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(encrypted()), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(peerVerifyError(QSslError)), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(exitLoop()));
+
+ // force a PSK cipher w/o auth
+ socket.setCiphers(PSK_CIPHER_WITHOUT_AUTH);
+
+ PskProvider provider;
+ provider.setIdentity(PSK_CLIENT_IDENTITY);
+ provider.setPreSharedKey(PSK_CLIENT_PRESHAREDKEY);
+ connect(&socket, SIGNAL(preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator*)), &provider, SLOT(providePsk(QSslPreSharedKeyAuthenticator*)));
+ socket.setPeerVerifyMode(QSslSocket::VerifyNone);
+
+ PskServer server;
+ server.m_pskProvider.setIdentity(provider.m_identity);
+ server.m_pskProvider.setPreSharedKey(provider.m_psk);
+ server.config.setPreSharedKeyIdentityHint(PSK_SERVER_IDENTITY_HINT);
+ QVERIFY(server.listen());
+
+ // Start connecting
+ socket.connectToHost(QHostAddress(QHostAddress::LocalHost).toString(), server.serverPort());
+ enterLoop(5);
+
+ // Entered connected state
+ QCOMPARE(socket.state(), QAbstractSocket::ConnectedState);
+ QCOMPARE(socket.mode(), QSslSocket::UnencryptedMode);
+ QVERIFY(!socket.isEncrypted());
+ QCOMPARE(connectedSpy.count(), 1);
+ QCOMPARE(disconnectedSpy.count(), 0);
+
+ // Enter encrypted mode
+ socket.startClientEncryption();
+ QCOMPARE(socket.mode(), QSslSocket::SslClientMode);
+ QVERIFY(!socket.isEncrypted());
+ QCOMPARE(connectionEncryptedSpy.count(), 0);
+
+ // Start handshake.
+ enterLoop(10);
+
+ // We must get the PSK signal in all cases
+ QCOMPARE(pskAuthenticationRequiredSpy.count(), 1);
+
+ QCOMPARE(connectionEncryptedSpy.count(), 1);
+ QVERIFY(socket.isEncrypted());
+ QCOMPARE(socket.state(), QAbstractSocket::ConnectedState);
+
+ // check writing
+ socket.write("Hello from Qt TLS/PSK!");
+ QVERIFY(socket.waitForBytesWritten());
+
+ // disconnect
+ socket.disconnectFromHost();
+ enterLoop(10);
+
+ QCOMPARE(socket.state(), QAbstractSocket::UnconnectedState);
+ QCOMPARE(disconnectedSpy.count(), 1);
+}
+
#endif // QT_NO_OPENSSL
#endif // QT_NO_SSL
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
index ae911e43ed..4ea878f840 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
testcase.timeout = 300 # this test is slow
SOURCES += tst_qsslsocket_onDemandCertificates_member.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core core-private network-private testlib
TARGET = tst_qsslsocket_onDemandCertificates_member
@@ -15,10 +15,6 @@ win32 {
}
}
-wince* {
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
index 25e5a5d5c7..d69ea7fb3d 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
SOURCES += tst_qsslsocket_onDemandCertificates_static.cpp
-win32:!wince: LIBS += -lws2_32
+win32:LIBS += -lws2_32
QT = core core-private network-private testlib
TARGET = tst_qsslsocket_onDemandCertificates_static
@@ -14,10 +14,6 @@ win32 {
}
}
-wince* {
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 7380398071..22c2e1fbc7 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -281,9 +281,6 @@ void tst_languageChange::retranslatability()
fooFile.write("test");
fooFile.close();
dlg.setDirectory(temporaryDir.path());
-#ifdef Q_OS_WINCE
- dlg.setDirectory("\\Windows");
-#endif
dlg.setFileMode(QFileDialog::ExistingFiles);
dlg.setViewMode(QFileDialog::Detail);
stateMachine.start();
@@ -295,13 +292,8 @@ void tst_languageChange::retranslatability()
// In case we use a Color dialog, we do not want to test for
// strings non existing in the dialog and which do not get
// translated.
- if ((dialogType == ColorDialog) &&
-#ifndef Q_OS_WINCE
- (qApp->desktop()->width() < 480 || qApp->desktop()->height() < 350)
-#else
- true // On Qt/WinCE we always use compact mode
-#endif
- ) {
+ const QSize desktopSize = QApplication::desktop()->size();
+ if (dialogType == ColorDialog && (desktopSize.width() < 480 || desktopSize.height() < 350)) {
expected.remove("QColorDialog::&Basic colors");
expected.remove("QColorDialog::&Custom colors");
expected.remove("QColorDialog::&Define Custom Colors >>");
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index 0e9f054a01..3b264e6b72 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -21,7 +21,6 @@ SUBDIRS=\
qsharedpointer_and_qwidget \
qprocess_and_guieventloop \
qtokenautomaton \
- windowsmobile \
toolsupport \
!qtHaveModule(gui): SUBDIRS -= \
@@ -52,7 +51,7 @@ cross_compile: SUBDIRS -= \
atwrapper \
compiler
-wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
+!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
!contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
@@ -62,7 +61,7 @@ wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
macplist \
qaccessibilitymac
-!embedded|wince: SUBDIRS -= \
+!embedded: SUBDIRS -= \
qdirectpainter
winrt: SUBDIRS -= \
diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro
index 7b3173798d..f697aee38f 100644
--- a/tests/auto/other/qaccessibility/qaccessibility.pro
+++ b/tests/auto/other/qaccessibility/qaccessibility.pro
@@ -7,12 +7,6 @@ HEADERS += accessiblewidgets.h
unix:!darwin:!haiku:!integity: LIBS += -lm
-wince {
- accessneeded.files = $$QT_BUILD_TREE\\plugins\\accessible\\*.dll
- accessneeded.path = accessible
- DEPLOYMENT += accessneeded
-}
-
win32 {
!*g++:!winrt {
include(../../../../src/3rdparty/iaccessible2/iaccessible2.pri)
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 99e3fc5bf2..2f5936f1ad 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -68,20 +68,6 @@ static inline void setFrameless(QWidget *w)
w->setWindowFlags(flags);
}
-#if defined(Q_OS_WINCE)
-extern "C" bool SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
-#define SPI_GETPLATFORMTYPE 257
-inline bool IsValidCEPlatform() {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(tszPlatform) / sizeof(*tszPlatform), tszPlatform, 0)) {
- QString platform = QString::fromWCharArray(tszPlatform);
- if ((platform == QLatin1String("PocketPC")) || (platform == QLatin1String("Smartphone")))
- return false;
- }
- return true;
-}
-#endif
-
static inline bool verifyChild(QWidget *child, QAccessibleInterface *interface,
int index, const QRect &domain)
{
@@ -1315,6 +1301,16 @@ void tst_QAccessibility::tabTest()
child2->actionInterface()->doAction(QAccessibleActionInterface::pressAction());
QCOMPARE(tabBar->currentIndex(), 1);
+ // Test that setAccessibleTabName changes a tab's accessible name
+ tabBar->setAccessibleTabName(0, "AccFoo");
+ tabBar->setAccessibleTabName(1, "AccBar");
+ QCOMPARE(child1->text(QAccessible::Name), QLatin1String("AccFoo"));
+ QCOMPARE(child2->text(QAccessible::Name), QLatin1String("AccBar"));
+ tabBar->setCurrentIndex(0);
+ QCOMPARE(interface->text(QAccessible::Name), QLatin1String("AccFoo"));
+ tabBar->setCurrentIndex(1);
+ QCOMPARE(interface->text(QAccessible::Name), QLatin1String("AccBar"));
+
delete tabBar;
QTestAccessibility::clearEvents();
}
@@ -1352,10 +1348,17 @@ void tst_QAccessibility::tabWidgetTest()
QCOMPARE(tabButton1Interface->text(QAccessible::Name), QLatin1String("Tab 1"));
QAccessibleInterface* tabButton2Interface = tabBarInterface->child(1);
- QVERIFY(tabButton1Interface);
+ QVERIFY(tabButton2Interface);
QCOMPARE(tabButton2Interface->role(), QAccessible::PageTab);
QCOMPARE(tabButton2Interface->text(QAccessible::Name), QLatin1String("Tab 2"));
+ // Test that setAccessibleTabName changes a tab's accessible name
+ tabWidget->setCurrentIndex(0);
+ tabWidget->tabBar()->setAccessibleTabName(0, "Acc Tab");
+ QCOMPARE(tabButton1Interface->role(), QAccessible::PageTab);
+ QCOMPARE(tabButton1Interface->text(QAccessible::Name), QLatin1String("Acc Tab"));
+ QCOMPARE(tabBarInterface->text(QAccessible::Name), QLatin1String("Acc Tab"));
+
QAccessibleInterface* tabButtonLeft = tabBarInterface->child(2);
QVERIFY(tabButtonLeft);
QCOMPARE(tabButtonLeft->role(), QAccessible::PushButton);
@@ -1469,10 +1472,6 @@ void tst_QAccessibility::menuTest()
QCOMPARE(iHelp->role(), QAccessible::MenuItem);
QCOMPARE(iAction->role(), QAccessible::MenuItem);
#ifndef Q_OS_MAC
-#ifdef Q_OS_WINCE
- if (!IsValidCEPlatform())
- QSKIP("Tests do not work on Mobile platforms due to native menus");
-#endif
QCOMPARE(mw.mapFromGlobal(interface->rect().topLeft()), mw.menuBar()->geometry().topLeft());
QCOMPARE(interface->rect().size(), mw.menuBar()->size());
@@ -3561,10 +3560,6 @@ void tst_QAccessibility::dockWidgetTest()
void tst_QAccessibility::comboBoxTest()
{
-#if defined(Q_OS_WINCE)
- if (!IsValidCEPlatform())
- QSKIP("Test skipped on Windows Mobile test hardware");
-#endif
{ // not editable combobox
QComboBox combo;
combo.addItems(QStringList() << "one" << "two" << "three");
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
index cb69c80f37..b32b1226b2 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basic/basic.cpp
@@ -34,7 +34,7 @@ QT_BEGIN_NAMESPACE
Basic::Token Basic::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -50,7 +50,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -66,7 +66,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -89,19 +89,19 @@ Basic::Token Basic::classifier3(const QChar *data)
Basic::Token Basic::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -111,7 +111,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -124,11 +124,11 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -138,7 +138,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -151,12 +151,12 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
@@ -192,7 +192,7 @@ Basic::Token Basic::classifier3(const QChar *data)
Basic::Token Basic::classifier14(const QChar *data)
{
- if (data[0] == 119)
+ if (data[0].unicode() == 119)
{
@@ -208,7 +208,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 99)
+ else if (data[0].unicode() == 99)
{
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
index 59164ea3f4..dace6be146 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/basicNamespace/basicNamespace.cpp
@@ -36,7 +36,7 @@ using namespace BasicNamespace;
Basic::Token Basic::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ Basic::Token Basic::classifier3(const QChar *data)
Basic::Token Basic::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ Basic::Token Basic::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
index d005b64b8d..c24900eed0 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/boilerplate/boilerplate.cpp
@@ -36,7 +36,7 @@ QT_BEGIN_NAMESPACE
Boilerplate::Token Boilerplate::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
Boilerplate::Token Boilerplate::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ Boilerplate::Token Boilerplate::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
index 87632d83ff..879f55fa32 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noNamespace/noNamespace.cpp
@@ -34,7 +34,7 @@ QT_BEGIN_NAMESPACE
NoNamespace::Token NoNamespace::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -50,7 +50,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -66,7 +66,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -89,19 +89,19 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
NoNamespace::Token NoNamespace::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -111,7 +111,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -124,11 +124,11 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -138,7 +138,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -151,12 +151,12 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
@@ -176,7 +176,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
NoNamespace::Token NoNamespace::classifier14(const QChar *data)
{
- if (data[0] == 119)
+ if (data[0].unicode() == 119)
{
@@ -192,7 +192,7 @@ NoNamespace::Token NoNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 99)
+ else if (data[0].unicode() == 99)
{
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
index 68bd051afb..5be9b3879f 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/noToString/noToString.cpp
@@ -36,7 +36,7 @@ using namespace NoToStringNS;
NoToString::Token NoToString::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ NoToString::Token NoToString::classifier3(const QChar *data)
NoToString::Token NoToString::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ NoToString::Token NoToString::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
diff --git a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
index 0a452c5757..69c6de2f39 100644
--- a/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
+++ b/tests/auto/other/qtokenautomaton/tokenizers/withNamespace/withNamespace.cpp
@@ -36,7 +36,7 @@ using namespace TheNamespace;
WithNamespace::Token WithNamespace::classifier3(const QChar *data)
{
- if (data[0] == 100)
+ if (data[0].unicode() == 100)
{
@@ -52,7 +52,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 97)
+ else if (data[0].unicode() == 97)
{
@@ -68,7 +68,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 103)
+ else if (data[0].unicode() == 103)
{
@@ -91,19 +91,19 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
WithNamespace::Token WithNamespace::classifier4(const QChar *data)
{
- if (data[0] == 70)
+ if (data[0].unicode() == 70)
{
- if (data[1] == 70)
+ if (data[1].unicode() == 70)
{
- if (data[2] == 70)
+ if (data[2].unicode() == 70)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -113,7 +113,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -126,11 +126,11 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 71)
+ else if (data[2].unicode() == 71)
{
- if (data[3] == 70)
+ if (data[3].unicode() == 70)
{
@@ -140,7 +140,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[3] == 71)
+ else if (data[3].unicode() == 71)
{
@@ -153,12 +153,12 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[2] == 76)
+ else if (data[2].unicode() == 76)
{
- if(data[3] == 77)
+ if (data[3].unicode() == 77)
return FFLM;
@@ -178,7 +178,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
WithNamespace::Token WithNamespace::classifier14(const QChar *data)
{
- if (data[0] == 119)
+ if (data[0].unicode() == 119)
{
@@ -194,7 +194,7 @@ WithNamespace::Token WithNamespace::classifier3(const QChar *data)
}
- else if (data[0] == 99)
+ else if (data[0].unicode() == 99)
{
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.cpp b/tests/auto/other/windowsmobile/test/ddhelper.cpp
deleted file mode 100644
index 3ce99a0ded..0000000000
--- a/tests/auto/other/windowsmobile/test/ddhelper.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifdef Q_OS_WINCE_WM
-
-#include <Ddraw.h>
-#include <QDebug>
-
-static LPDIRECTDRAW g_pDD = NULL; // DirectDraw object
-static LPDIRECTDRAWSURFACE g_pDDSSurface = NULL; // DirectDraw primary surface
-
-static DDSCAPS ddsCaps;
-static DDSURFACEDESC ddsSurfaceDesc;
-static void *buffer = NULL;
-
-static int width = 0;
-static int height = 0;
-static int pitch = 0;
-static int bitCount = 0;
-static int windowId = 0;
-
-static bool initialized = false;
-static bool locked = false;
-
-void q_lock()
-{
- if (locked) {
- qWarning("Direct Painter already locked (QDirectPainter::lock())");
- return;
- }
- locked = true;
-
-
- memset(&ddsSurfaceDesc, 0, sizeof(ddsSurfaceDesc));
- ddsSurfaceDesc.dwSize = sizeof(ddsSurfaceDesc);
-
- HRESULT h = g_pDDSSurface->Lock(0, &ddsSurfaceDesc, DDLOCK_WRITEONLY, 0);
- if (h != DD_OK)
- qDebug() << "GetSurfaceDesc failed!";
-
- width = ddsSurfaceDesc.dwWidth;
- height = ddsSurfaceDesc.dwHeight;
- bitCount = ddsSurfaceDesc.ddpfPixelFormat.dwRGBBitCount;
- pitch = ddsSurfaceDesc.lPitch;
- buffer = ddsSurfaceDesc.lpSurface;
-}
-
-void q_unlock()
-{
- if( !locked) {
- qWarning("Direct Painter not locked (QDirectPainter::unlock()");
- return;
- }
- g_pDDSSurface->Unlock(0);
- locked = false;
-}
-
-void q_initDD()
-{
- if (initialized)
- return;
-
- DirectDrawCreate(NULL, &g_pDD, NULL);
-
- HRESULT h;
- h = g_pDD->SetCooperativeLevel(0, DDSCL_NORMAL);
-
- if (h != DD_OK)
- qDebug() << "cooperation level failed";
-
- h = g_pDD->TestCooperativeLevel();
- if (h != DD_OK)
- qDebug() << "cooperation level failed test";
-
- DDSURFACEDESC ddsd;
- memset(&ddsd, 0, sizeof(ddsd));
- ddsd.dwSize = sizeof(ddsd);
-
- ddsd.dwFlags = DDSD_CAPS;
-
- ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
-
- h = g_pDD->CreateSurface(&ddsd, &g_pDDSSurface, NULL);
-
- if (h != DD_OK)
- qDebug() << "CreateSurface failed!";
-
- if (g_pDDSSurface->GetCaps(&ddsCaps) != DD_OK)
- qDebug() << "GetCaps failed";
-
- q_lock();
- q_unlock();
- initialized = true;
-}
-
-uchar* q_frameBuffer()
-{
- return (uchar*) buffer;
-}
-
-int q_screenDepth()
-{
- return bitCount;
-}
-
-int q_screenWidth()
-{
- return width;
-}
-
-int q_screenHeight()
-{
- return height;
-}
-
-int q_linestep()
-{
- return pitch;
-}
-
-#endif //Q_OS_WINCE_WM
-
-
diff --git a/tests/auto/other/windowsmobile/test/ddhelper.h b/tests/auto/other/windowsmobile/test/ddhelper.h
deleted file mode 100644
index ce68654b76..0000000000
--- a/tests/auto/other/windowsmobile/test/ddhelper.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef __DDHELPER__
-#define __DDHELPER__
-
-extern uchar* q_frameBuffer();
-
-extern int q_screenDepth();
-
-extern int q_screenWidth();
-
-extern int q_screenHeight();
-
-extern int q_linestep();
-
-extern void q_initDD();
-
-extern void q_unlock();
-
-extern void q_lock();
-
-#endif //__DDHELPER__
-
diff --git a/tests/auto/other/windowsmobile/test/test.pro b/tests/auto/other/windowsmobile/test/test.pro
deleted file mode 100644
index 36dd15f60e..0000000000
--- a/tests/auto/other/windowsmobile/test/test.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-
-CONFIG += testcase
-QT += widgets testlib
-HEADERS += ddhelper.h
-SOURCES += tst_windowsmobile.cpp ddhelper.cpp
-RESOURCES += windowsmobile.qrc
-
-TARGET = ../tst_windowsmobile
-
-wincewm*: {
- addFiles.files = $$OUT_PWD/../testQMenuBar/*.exe
-
-
- addFiles.path = "\\Program Files\\tst_windowsmobile"
- DEPLOYMENT += addFiles
-}
-
-wincewm*: {
- LIBS += Ddraw.lib
-}
-
-
-
diff --git a/tests/auto/other/windowsmobile/test/testQMenuBar_current.png b/tests/auto/other/windowsmobile/test/testQMenuBar_current.png
deleted file mode 100644
index f0042b8fe0..0000000000
--- a/tests/auto/other/windowsmobile/test/testQMenuBar_current.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/other/windowsmobile/test/testSimpleWidget_current.png b/tests/auto/other/windowsmobile/test/testSimpleWidget_current.png
deleted file mode 100644
index 8086c41ce9..0000000000
--- a/tests/auto/other/windowsmobile/test/testSimpleWidget_current.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
deleted file mode 100644
index 8d0e468bd6..0000000000
--- a/tests/auto/other/windowsmobile/test/tst_windowsmobile.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QDate>
-#include <QtCore/QDebug>
-#include <QtCore/QObject>
-#include <QtGui>
-#ifdef Q_OS_WINCE_WM
-#include <windows.h>
-#include "ddhelper.h"
-#endif
-
-
-
-class tst_WindowsMobile : public QObject
-{
- Q_OBJECT
-public:
- tst_WindowsMobile()
- {
- qApp->setCursorFlashTime (24 * 3600 * 1000); // once a day
- // qApp->setCursorFlashTime (INT_MAX);
-#ifdef Q_OS_WINCE_WM
- q_initDD();
-#endif
- }
-
-#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
- private slots:
- void testMainWindowAndMenuBar();
- void testSimpleWidget();
-#endif
-};
-
-#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
-
-bool qt_wince_is_platform(const QString &platformString) {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
- return true;
- return false;
-}
-
-bool qt_wince_is_smartphone() {
- return qt_wince_is_platform(QString::fromLatin1("Smartphone"));
-}
-
-void openMenu()
-{
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,450,630,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,450,630,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,55535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,55535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,58535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,58535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,40535,55535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,40535,55535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,32535,55535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,32535,55535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,65535,65535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,50535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,50535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,55535,40535,0,0);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,55535,40535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE,48535,45535,0,0);
- QTest::qWait(2000);
- ::mouse_event(MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE,48535,45535,0,0);
-}
-
-void compareScreenshots(const QString &image1, const QString &image2)
-{
- QImage screenShot(image1);
- QImage original(image2);
-
- // cut away the title bar before comparing
- QDesktopWidget desktop;
- QRect desktopFrameRect = desktop.frameGeometry();
- QRect desktopClientRect = desktop.availableGeometry();
-
- QPainter p1(&screenShot);
- QPainter p2(&original);
-
- //screenShot.save("scr1.png", "PNG");
- p1.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
- p2.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
-
- //screenShot.save("scr2.png", "PNG");
- //original.save("orig1.png", "PNG");
-
- QCOMPARE(original, screenShot);
-}
-
-void takeScreenShot(const QString filename)
-{
- q_lock();
- QImage image = QImage(( uchar *) q_frameBuffer(), q_screenWidth(),
- q_screenHeight(), q_screenWidth() * q_screenDepth() / 8, QImage::Format_RGB16);
- image.save(filename, "PNG");
- q_unlock();
-}
-
-void tst_WindowsMobile::testMainWindowAndMenuBar()
-{
- if (qt_wince_is_smartphone())
- QSKIP("This test is only for Windows Mobile");
-
- QProcess process;
- process.start("testQMenuBar.exe");
- QCOMPARE(process.state(), QProcess::Running);
- QTest::qWait(6000);
- openMenu();
- QTest::qWait(1000);
- takeScreenShot("testQMenuBar_current.png");
- process.close();
- compareScreenshots("testQMenuBar_current.png", ":/testQMenuBar_current.png");
-}
-
-void tst_WindowsMobile::testSimpleWidget()
-{
- if (qt_wince_is_smartphone())
- QSKIP("This test is only for Windows Mobile");
-
- QMenuBar menubar;
- menubar.show();
- QWidget maximized;
- QPalette pal = maximized.palette();
- pal.setColor(QPalette::Background, Qt::red);
- maximized.setPalette(pal);
- maximized.showMaximized();
- QWidget widget;
- widget.setGeometry(100, 100, 200, 200);
- widget.setWindowTitle("Widget");
- widget.show();
- qApp->processEvents();
- QTest::qWait(1000);
-
- QWidget widget2;
- widget2.setGeometry(100, 380, 300, 200);
- widget2.setWindowTitle("Widget 2");
- widget2.setWindowFlags(Qt::Popup);
- widget2.show();
-
- qApp->processEvents();
- QTest::qWait(1000);
- takeScreenShot("testSimpleWidget_current.png");
- compareScreenshots("testSimpleWidget_current.png", ":/testSimpleWidget_current.png");
-}
-
-
-#endif //Q_OS_WINCE_WM
-
-
-QTEST_MAIN(tst_WindowsMobile)
-#include "tst_windowsmobile.moc"
-
diff --git a/tests/auto/other/windowsmobile/test/windowsmobile.qrc b/tests/auto/other/windowsmobile/test/windowsmobile.qrc
deleted file mode 100644
index 5d6f61459e..0000000000
--- a/tests/auto/other/windowsmobile/test/windowsmobile.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>testQMenuBar_current.png</file>
- <file>testSimpleWidget_current.png</file>
-</qresource>
-</RCC>
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp b/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
deleted file mode 100644
index 8d9071ff72..0000000000
--- a/tests/auto/other/windowsmobile/testQMenuBar/main.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QtTest>
-#include <QtCore/QDate>
-#include <QtCore/QDebug>
-#include <QtCore/QObject>
-#include <QtGui>
-#include <windows.h>
-
-int main(int argc, char * argv[])
-{
- QList<QWidget*> widgets;
- QApplication app(argc, argv);
-
- QMainWindow mainWindow;
- mainWindow.setWindowTitle("Test");
- QMenu *fileMenu = mainWindow.menuBar()->addMenu("File");
- QMenu *editMenu = mainWindow.menuBar()->addMenu("Edit");
- QMenu *viewMenu = mainWindow.menuBar()->addMenu("View");
- QMenu *toolsMenu = mainWindow.menuBar()->addMenu("Tools");
- QMenu *optionsMenu = mainWindow.menuBar()->addMenu("Options");
- QMenu *helpMenu = mainWindow.menuBar()->addMenu("Help");
-
- qApp->processEvents();
-
- fileMenu->addAction("Open");
- QAction *close = fileMenu->addAction("Close");
- fileMenu->addSeparator();
- fileMenu->addAction("Exit");
-
- close->setEnabled(false);
-
- editMenu->addAction("Cut");
- editMenu->addAction("Pase");
- editMenu->addAction("Copy");
- editMenu->addSeparator();
- editMenu->addAction("Find");
-
- viewMenu->addAction("Hide");
- viewMenu->addAction("Show");
- viewMenu->addAction("Explore");
- QAction *visible = viewMenu->addAction("Visible");
- visible->setCheckable(true);
- visible->setChecked(true);
-
- toolsMenu->addMenu("Hammer");
- toolsMenu->addMenu("Caliper");
- toolsMenu->addMenu("Helm");
-
- optionsMenu->addMenu("Settings");
- optionsMenu->addMenu("Standard");
- optionsMenu->addMenu("Extended");
-
- QMenu *subMenu = helpMenu->addMenu("Help");
- subMenu->addAction("Index");
- subMenu->addSeparator();
- subMenu->addAction("Vodoo Help");
- helpMenu->addAction("Contens");
- helpMenu->addSeparator();
- helpMenu->addAction("About");
-
- QToolBar toolbar;
- mainWindow.addToolBar(&toolbar);
- toolbar.addAction(QIcon(qApp->style()->standardPixmap(QStyle::SP_FileIcon)), QString("textAction"));
-
- QTextEdit textEdit;
- mainWindow.setCentralWidget(&textEdit);
-
- mainWindow.showMaximized();
-
- app.exec();
-}
diff --git a/tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro b/tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro
deleted file mode 100644
index 12ef683c11..0000000000
--- a/tests/auto/other/windowsmobile/testQMenuBar/testQMenuBar.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-SOURCES += main.cpp
-QT += widgets
-TARGET = ../testQMenuBar
-
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/windowsmobile/windowsmobile.pro b/tests/auto/other/windowsmobile/windowsmobile.pro
deleted file mode 100644
index 2e6b444d7b..0000000000
--- a/tests/auto/other/windowsmobile/windowsmobile.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-
-TEMPLATE = subdirs
-
-wincewm* {
- SUBDIRS = testQMenuBar
-}
- SUBDIRS += test
-
-
diff --git a/tests/auto/qtest-config.h b/tests/auto/qtest-config.h
deleted file mode 100644
index b3696a1456..0000000000
--- a/tests/auto/qtest-config.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTEST_CONFIG_H
-#define QTEST_CONFIG_H
-
-#include <qglobal.h>
-
-#ifndef QTEST_NO_CURSOR
-# if defined(QT_NO_CURSOR) || defined(Q_OS_WINCE) || defined(MEEGO_EDITION_HARMATTAN)
-# define QTEST_NO_CURSOR
-# endif
-#endif // QTEST_NO_CURSOR
-
-#endif // QTEST_CONFIG_H
diff --git a/tests/auto/sql/kernel/qsql/qsql.pro b/tests/auto/sql/kernel/qsql/qsql.pro
index 71e2989572..1c7452cd73 100644
--- a/tests/auto/sql/kernel/qsql/qsql.pro
+++ b/tests/auto/sql/kernel/qsql/qsql.pro
@@ -3,9 +3,3 @@ TARGET = tst_qsql
SOURCES += tst_qsql.cpp
QT = core-private sql-private testlib
-
-wince {
- DEPLOYMENT_PLUGIN += qsqlite
-}
-mingw: LIBS += -lws2_32
-
diff --git a/tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro b/tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro
index 7da5b8bc8e..9ee414bf34 100644
--- a/tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro
+++ b/tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro
@@ -3,17 +3,3 @@ TARGET = tst_qsqldatabase
SOURCES += tst_qsqldatabase.cpp
QT = core sql testlib core-private sql-private
-
-win32: {
- !wince: LIBS += -lws2_32
- else: LIBS += -lws2
-}
-
-wince {
- DEPLOYMENT_PLUGIN += qsqlite
-
- testData.files = testdata
- testData.path = .
-
- DEPLOYMENT += testData
-}
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index 389d3abf85..701da7d346 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -43,20 +43,6 @@
#include <QtSql/private/qsqldriver_p.h>
#include <QtTest/QtTest>
-#if defined(Q_OS_WIN)
-# include <qt_windows.h>
-# if defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
-# include <winsock2.h>
-# endif
-#else
-#include <unistd.h>
-#endif
-#if defined(Q_OS_WINRT)
- static inline int qgethostname(char *name, int) { qstrcpy(name, "localhost"); return 9; }
-#else
-# define qgethostname gethostname
-#endif
-
#define CHECK_DATABASE( db ) \
if ( !db.isValid() ) { qFatal( "db is Invalid" ); }
@@ -71,16 +57,10 @@ static QString qGetHostName()
{
static QString hostname;
- if ( !hostname.isEmpty() )
- return hostname;
-
- char hn[257];
-
- if ( qgethostname( hn, 255 ) == 0 ) {
- hn[256] = '\0';
- hostname = QString::fromLatin1( hn );
- hostname.replace( QLatin1Char( '.' ), QLatin1Char( '_' ) );
- hostname.replace( QLatin1Char( '-' ), QLatin1Char( '_' ) );
+ if (hostname.isEmpty()) {
+ hostname = QSysInfo::machineHostName();
+ hostname.replace(QLatin1Char( '.' ), QLatin1Char( '_' ));
+ hostname.replace(QLatin1Char( '-' ), QLatin1Char( '_' ));
}
return hostname;
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index bd8fbcca0e..8126e72ad2 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -100,6 +100,8 @@ private slots:
void eventNotificationIBase();
void eventNotificationPSQL_data() { generic_data("QPSQL"); }
void eventNotificationPSQL();
+ void eventNotificationSQLite_data() { generic_data("QSQLITE"); }
+ void eventNotificationSQLite();
//database specific 64 bit integer test
void bigIntField_data() { generic_data(); }
@@ -2109,6 +2111,35 @@ void tst_QSqlDatabase::eventNotificationPSQL()
QVERIFY_SQL(driver, unsubscribeFromNotification(procedureName));
}
+void tst_QSqlDatabase::eventNotificationSQLite()
+{
+ QFETCH(QString, dbName);
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ CHECK_DATABASE(db);
+ if (db.driverName().compare(QLatin1String("QSQLITE"), Qt::CaseInsensitive)) {
+ QSKIP("QSQLITE specific test");
+ }
+ const QString tableName(qTableName("sqlitnotifytest", __FILE__, db));
+ tst_Databases::safeDropTable(db, tableName);
+
+ QSignalSpy notificationSpy(db.driver(), SIGNAL(notification(QString)));
+ QSignalSpy notificationSpyExt(db.driver(), SIGNAL(notification(QString,QSqlDriver::NotificationSource,QVariant)));
+ QSqlQuery q(db);
+ QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id INTEGER, realVal REAL)"));
+ db.driver()->subscribeToNotification(tableName);
+ QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
+ QTRY_COMPARE(notificationSpy.count(), 1);
+ QTRY_COMPARE(notificationSpyExt.count(), 1);
+ QList<QVariant> arguments = notificationSpy.takeFirst();
+ QCOMPARE(arguments.at(0).toString(), tableName);
+ arguments = notificationSpyExt.takeFirst();
+ QCOMPARE(arguments.at(0).toString(), tableName);
+ db.driver()->unsubscribeFromNotification(tableName);
+ QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
+ QTRY_COMPARE(notificationSpy.count(), 0);
+ QTRY_COMPARE(notificationSpyExt.count(), 0);
+}
+
void tst_QSqlDatabase::sqlite_bindAndFetchUInt()
{
QFETCH(QString, dbName);
diff --git a/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro b/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
index 8bfe1da1ce..772dc89177 100644
--- a/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
+++ b/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
@@ -3,16 +3,3 @@ TARGET = tst_qsqldriver
SOURCES += tst_qsqldriver.cpp
QT = core sql testlib core-private sql-private
-
-wince {
- plugFiles.files = ../../../plugins/sqldrivers
- plugFiles.path = .
- DEPLOYMENT += plugFiles
- LIBS += -lws2
-} else {
- mingw {
- LIBS += -lws2_32
- } else:win32 {
- LIBS += ws2_32.lib
- }
-}
diff --git a/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro b/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro
index a6be23892d..c7638f9c0b 100644
--- a/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro
+++ b/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro
@@ -4,12 +4,3 @@ CONFIG += testcase
SOURCES += tst_qsqlquery.cpp
QT = core sql testlib core-private sql-private
-
-win32:!wince: LIBS += -lws2_32
-
-wince {
- plugFiles.files = ../../../plugins/sqldrivers
- plugFiles.path = .
- DEPLOYMENT += plugFiles
- LIBS += -lws2
-}
diff --git a/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro b/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro
index 64d8c5ccfb..32e0f2228f 100644
--- a/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro
+++ b/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro
@@ -3,14 +3,3 @@ TARGET = tst_qsqlthread
SOURCES += tst_qsqlthread.cpp
QT = core sql testlib core-private sql-private
-
-
-wince {
- plugFiles.files = ../../../plugins/sqldrivers
- plugFiles.path = .
- DEPLOYMENT += plugFiles
- LIBS += -lws2
-} else {
- win32:LIBS += -lws2_32
-}
-
diff --git a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
index 2576fbad71..05eb871694 100644
--- a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
+++ b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
@@ -3,11 +3,3 @@ TARGET = tst_qsqlquerymodel
SOURCES += tst_qsqlquerymodel.cpp
QT += widgets sql testlib core-private sql-private
-
-wince {
- DEPLOYMENT_PLUGIN += qsqlite
- LIBS += -lws2
-} else {
- win32:LIBS += -lws2_32
-}
-
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index cade7c171d..5695c06b29 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -3,16 +3,3 @@ TARGET = tst_qsqlrelationaltablemodel
SOURCES += tst_qsqlrelationaltablemodel.cpp
QT = core sql testlib core-private sql-private
-
-wince {
- plugFiles.files = ../../../plugins/sqldrivers
- plugFiles.path = .
- DEPLOYMENT += plugFiles
- LIBS += -lws2
-} else {
- mingw {
- LIBS += -lws2_32
- } else:win32 {
- LIBS += ws2_32.lib
- }
-}
diff --git a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
index 2af39b341f..958f0507bf 100644
--- a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
+++ b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
@@ -3,13 +3,3 @@ TARGET = tst_qsqltablemodel
SOURCES += tst_qsqltablemodel.cpp
QT = core core-private sql sql-private testlib
-
-wince {
- plugFiles.files = ../../../plugins/sqldrivers
- plugFiles.path = .
- DEPLOYMENT += plugFiles
- LIBS += -lws2
-} else {
- win32:LIBS += -lws2_32
-}
-
diff --git a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
index 204758f68a..3a8d27631e 100644
--- a/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
+++ b/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp
@@ -128,6 +128,7 @@ private slots:
void compare_registered_enums();
void compare_class_enums();
void compare_boolfuncs();
+ void compare_to_nullptr();
void compare_pointerfuncs();
void compare_tostring();
void compare_tostring_data();
@@ -146,6 +147,7 @@ private slots:
void verify2();
void tryVerify();
void tryVerify2();
+ void verifyExplicitOperatorBool();
};
enum MyUnregisteredEnum { MyUnregisteredEnumValue1, MyUnregisteredEnumValue2 };
@@ -180,6 +182,24 @@ void tst_Cmptest::compare_boolfuncs()
QCOMPARE(!boolfunc(), false);
}
+namespace {
+template <typename T>
+T *null() Q_DECL_NOTHROW { return nullptr; }
+}
+
+void tst_Cmptest::compare_to_nullptr()
+{
+ QCOMPARE(null<int>(), nullptr);
+ QCOMPARE(null<const int>(), nullptr);
+ QCOMPARE(null<volatile int>(), nullptr);
+ QCOMPARE(null<const volatile int>(), nullptr);
+
+ QCOMPARE(nullptr, null<int>());
+ QCOMPARE(nullptr, null<const int>());
+ QCOMPARE(nullptr, null<volatile int>());
+ QCOMPARE(nullptr, null<const volatile int>());
+}
+
static int i = 0;
static int *intptr() { return &i; }
@@ -439,5 +459,21 @@ void tst_Cmptest::tryVerify2()
QTRY_VERIFY2_WITH_TIMEOUT(opaqueFunc() < 2, QByteArray::number(opaqueFunc()).constData(), 1);
}
+void tst_Cmptest::verifyExplicitOperatorBool()
+{
+ struct ExplicitOperatorBool {
+ int m_i;
+ explicit ExplicitOperatorBool(int i) : m_i(i) {}
+ explicit operator bool() const { return m_i > 0; }
+ bool operator !() const { return !bool(*this); }
+ };
+
+ ExplicitOperatorBool val1(42);
+ QVERIFY(val1);
+
+ ExplicitOperatorBool val2(-273);
+ QVERIFY(!val2);
+}
+
QTEST_MAIN(tst_Cmptest)
#include "tst_cmptest.moc"
diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
index 6cfa023b7e..87b241f5e5 100644
--- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
+++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
@@ -44,7 +44,7 @@ private slots:
void tst_Crashes::crash()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
//we avoid the error dialogbox to appear on windows
SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
#endif
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index 440429e430..73ef7be9f7 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -8,13 +8,13 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_unregistered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="156">
+<Incident type="fail" file="tst_cmptest.cpp" line="158">
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_registered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="162">
+<Incident type="fail" file="tst_cmptest.cpp" line="164">
<Description><![CDATA[Compared values are not the same
Actual (Qt::ArrowCursor): ArrowCursor
Expected (Qt::BusyCursor) : BusyCursor]]></Description>
@@ -22,7 +22,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_class_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="168">
+<Incident type="fail" file="tst_cmptest.cpp" line="170">
<Description><![CDATA[Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2]]></Description>
@@ -33,12 +33,16 @@
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="compare_to_nullptr">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compare_pointerfuncs">
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(int,123)
@@ -47,19 +51,19 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both invalid]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(PhonyClass,<value not representable as string>)
@@ -74,31 +78,31 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal lists]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 2
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 12
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 1
@@ -107,7 +111,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListInt">
-<Incident type="fail" file="tst_cmptest.cpp" line="340">
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
<Description><![CDATA[Compared lists differ at index 2.
Actual (int1): 3
Expected (int2): 4]]></Description>
@@ -115,7 +119,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListDouble">
-<Incident type="fail" file="tst_cmptest.cpp" line="347">
+<Incident type="fail" file="tst_cmptest.cpp" line="367">
<Description><![CDATA[Compared lists differ at index 0.
Actual (double1): 1.5
Expected (double2): 1]]></Description>
@@ -123,7 +127,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQColor">
-<Incident type="fail" file="tst_cmptest.cpp" line="357">
+<Incident type="fail" file="tst_cmptest.cpp" line="377">
<Description><![CDATA[Compared values are not the same
Actual (yellow): #ffff00
Expected (green) : #00ff00]]></Description>
@@ -134,13 +138,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull(): 0
@@ -149,13 +153,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ in size.
Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
@@ -165,13 +169,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull(): 0
@@ -180,48 +184,52 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QImages differ in size.
Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[different format]]></DataTag>
<Description><![CDATA[Compared QImages differ in format.
Actual (opA): 6
Expected (opB): 3]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="verify">
-<Incident type="fail" file="tst_cmptest.cpp" line="421">
+<Incident type="fail" file="tst_cmptest.cpp" line="441">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="verify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="427">
+<Incident type="fail" file="tst_cmptest.cpp" line="447">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify">
-<Incident type="fail" file="tst_cmptest.cpp" line="433">
+<Incident type="fail" file="tst_cmptest.cpp" line="453">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="439">
+<Incident type="fail" file="tst_cmptest.cpp" line="459">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="verifyExplicitOperatorBool">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.teamcity b/tests/auto/testlib/selftests/expected_cmptest.teamcity
index dea19b60b4..cfef152f0b 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.teamcity
+++ b/tests/auto/testlib/selftests/expected_cmptest.teamcity
@@ -2,107 +2,111 @@
##teamcity[testStarted name='initTestCase()']
##teamcity[testFinished name='initTestCase()']
##teamcity[testStarted name='compare_unregistered_enums()']
-##teamcity[testFailed name='compare_unregistered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(156)|]' details='Compared values are not the same']
+##teamcity[testFailed name='compare_unregistered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(158)|]' details='Compared values are not the same']
##teamcity[testFinished name='compare_unregistered_enums()']
##teamcity[testStarted name='compare_registered_enums()']
-##teamcity[testFailed name='compare_registered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(162)|]' details='Compared values are not the same|n Actual (Qt::ArrowCursor): ArrowCursor|n Expected (Qt::BusyCursor) : BusyCursor']
+##teamcity[testFailed name='compare_registered_enums()' message='Failure! |[Loc: tst_cmptest.cpp(164)|]' details='Compared values are not the same|n Actual (Qt::ArrowCursor): ArrowCursor|n Expected (Qt::BusyCursor) : BusyCursor']
##teamcity[testFinished name='compare_registered_enums()']
##teamcity[testStarted name='compare_class_enums()']
-##teamcity[testFailed name='compare_class_enums()' message='Failure! |[Loc: tst_cmptest.cpp(168)|]' details='Compared values are not the same|n Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1|n Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2']
+##teamcity[testFailed name='compare_class_enums()' message='Failure! |[Loc: tst_cmptest.cpp(170)|]' details='Compared values are not the same|n Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1|n Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2']
##teamcity[testFinished name='compare_class_enums()']
##teamcity[testStarted name='compare_boolfuncs()']
##teamcity[testFinished name='compare_boolfuncs()']
+##teamcity[testStarted name='compare_to_nullptr()']
+##teamcity[testFinished name='compare_to_nullptr()']
##teamcity[testStarted name='compare_pointerfuncs()']
##teamcity[testFinished name='compare_pointerfuncs()']
##teamcity[testStarted name='compare_tostring(int, string)']
-##teamcity[testFailed name='compare_tostring(int, string)' message='Failure! |[Loc: tst_cmptest.cpp(239)|]' details='Compared values are not the same|n Actual (actual) : QVariant(int,123)|n Expected (expected): QVariant(QString,hi)']
+##teamcity[testFailed name='compare_tostring(int, string)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(int,123)|n Expected (expected): QVariant(QString,hi)']
##teamcity[testFinished name='compare_tostring(int, string)']
##teamcity[testStarted name='compare_tostring(both invalid)']
##teamcity[testFinished name='compare_tostring(both invalid)']
##teamcity[testStarted name='compare_tostring(null hash, invalid)']
-##teamcity[testFailed name='compare_tostring(null hash, invalid)' message='Failure! |[Loc: tst_cmptest.cpp(239)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QVariantHash)|n Expected (expected): QVariant()']
+##teamcity[testFailed name='compare_tostring(null hash, invalid)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QVariantHash)|n Expected (expected): QVariant()']
##teamcity[testFinished name='compare_tostring(null hash, invalid)']
##teamcity[testStarted name='compare_tostring(string, null user type)']
-##teamcity[testFailed name='compare_tostring(string, null user type)' message='Failure! |[Loc: tst_cmptest.cpp(239)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QString,A simple string)|n Expected (expected): QVariant(PhonyClass)']
+##teamcity[testFailed name='compare_tostring(string, null user type)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(QString,A simple string)|n Expected (expected): QVariant(PhonyClass)']
##teamcity[testFinished name='compare_tostring(string, null user type)']
##teamcity[testStarted name='compare_tostring(both non-null user type)']
-##teamcity[testFailed name='compare_tostring(both non-null user type)' message='Failure! |[Loc: tst_cmptest.cpp(239)|]' details='Compared values are not the same|n Actual (actual) : QVariant(PhonyClass,<value not representable as string>)|n Expected (expected): QVariant(PhonyClass,<value not representable as string>)']
+##teamcity[testFailed name='compare_tostring(both non-null user type)' message='Failure! |[Loc: tst_cmptest.cpp(259)|]' details='Compared values are not the same|n Actual (actual) : QVariant(PhonyClass,<value not representable as string>)|n Expected (expected): QVariant(PhonyClass,<value not representable as string>)']
##teamcity[testFinished name='compare_tostring(both non-null user type)']
##teamcity[testStarted name='compareQStringLists(empty lists)']
##teamcity[testFinished name='compareQStringLists(empty lists)']
##teamcity[testStarted name='compareQStringLists(equal lists)']
##teamcity[testFinished name='compareQStringLists(equal lists)']
##teamcity[testStarted name='compareQStringLists(last item different)']
-##teamcity[testFailed name='compareQStringLists(last item different)' message='Failure! |[Loc: tst_cmptest.cpp(333)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
+##teamcity[testFailed name='compareQStringLists(last item different)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
##teamcity[testFinished name='compareQStringLists(last item different)']
##teamcity[testStarted name='compareQStringLists(second-last item different)']
-##teamcity[testFailed name='compareQStringLists(second-last item different)' message='Failure! |[Loc: tst_cmptest.cpp(333)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
+##teamcity[testFailed name='compareQStringLists(second-last item different)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists differ at index 2.|n Actual (opA): "string3"|n Expected (opB): "DIFFERS"']
##teamcity[testFinished name='compareQStringLists(second-last item different)']
##teamcity[testStarted name='compareQStringLists(prefix)']
-##teamcity[testFailed name='compareQStringLists(prefix)' message='Failure! |[Loc: tst_cmptest.cpp(333)|]' details='Compared lists have different sizes.|n Actual (opA) size: 2|n Expected (opB) size: 1']
+##teamcity[testFailed name='compareQStringLists(prefix)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists have different sizes.|n Actual (opA) size: 2|n Expected (opB) size: 1']
##teamcity[testFinished name='compareQStringLists(prefix)']
##teamcity[testStarted name='compareQStringLists(short list second)']
-##teamcity[testFailed name='compareQStringLists(short list second)' message='Failure! |[Loc: tst_cmptest.cpp(333)|]' details='Compared lists have different sizes.|n Actual (opA) size: 12|n Expected (opB) size: 1']
+##teamcity[testFailed name='compareQStringLists(short list second)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists have different sizes.|n Actual (opA) size: 12|n Expected (opB) size: 1']
##teamcity[testFinished name='compareQStringLists(short list second)']
##teamcity[testStarted name='compareQStringLists(short list first)']
-##teamcity[testFailed name='compareQStringLists(short list first)' message='Failure! |[Loc: tst_cmptest.cpp(333)|]' details='Compared lists have different sizes.|n Actual (opA) size: 1|n Expected (opB) size: 12']
+##teamcity[testFailed name='compareQStringLists(short list first)' message='Failure! |[Loc: tst_cmptest.cpp(353)|]' details='Compared lists have different sizes.|n Actual (opA) size: 1|n Expected (opB) size: 12']
##teamcity[testFinished name='compareQStringLists(short list first)']
##teamcity[testStarted name='compareQListInt()']
-##teamcity[testFailed name='compareQListInt()' message='Failure! |[Loc: tst_cmptest.cpp(340)|]' details='Compared lists differ at index 2.|n Actual (int1): 3|n Expected (int2): 4']
+##teamcity[testFailed name='compareQListInt()' message='Failure! |[Loc: tst_cmptest.cpp(360)|]' details='Compared lists differ at index 2.|n Actual (int1): 3|n Expected (int2): 4']
##teamcity[testFinished name='compareQListInt()']
##teamcity[testStarted name='compareQListDouble()']
-##teamcity[testFailed name='compareQListDouble()' message='Failure! |[Loc: tst_cmptest.cpp(347)|]' details='Compared lists differ at index 0.|n Actual (double1): 1.5|n Expected (double2): 1']
+##teamcity[testFailed name='compareQListDouble()' message='Failure! |[Loc: tst_cmptest.cpp(367)|]' details='Compared lists differ at index 0.|n Actual (double1): 1.5|n Expected (double2): 1']
##teamcity[testFinished name='compareQListDouble()']
##teamcity[testStarted name='compareQColor()']
-##teamcity[testFailed name='compareQColor()' message='Failure! |[Loc: tst_cmptest.cpp(357)|]' details='Compared values are not the same|n Actual (yellow): #ffff00|n Expected (green) : #00ff00']
+##teamcity[testFailed name='compareQColor()' message='Failure! |[Loc: tst_cmptest.cpp(377)|]' details='Compared values are not the same|n Actual (yellow): #ffff00|n Expected (green) : #00ff00']
##teamcity[testFinished name='compareQColor()']
##teamcity[testStarted name='compareQPixmaps(both null)']
##teamcity[testFinished name='compareQPixmaps(both null)']
##teamcity[testStarted name='compareQPixmaps(one null)']
-##teamcity[testFailed name='compareQPixmaps(one null)' message='Failure! |[Loc: tst_cmptest.cpp(382)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
+##teamcity[testFailed name='compareQPixmaps(one null)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
##teamcity[testFinished name='compareQPixmaps(one null)']
##teamcity[testStarted name='compareQPixmaps(other null)']
-##teamcity[testFailed name='compareQPixmaps(other null)' message='Failure! |[Loc: tst_cmptest.cpp(382)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
+##teamcity[testFailed name='compareQPixmaps(other null)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared QPixmaps differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
##teamcity[testFinished name='compareQPixmaps(other null)']
##teamcity[testStarted name='compareQPixmaps(equal)']
##teamcity[testFinished name='compareQPixmaps(equal)']
##teamcity[testStarted name='compareQPixmaps(different size)']
-##teamcity[testFailed name='compareQPixmaps(different size)' message='Failure! |[Loc: tst_cmptest.cpp(382)|]' details='Compared QPixmaps differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
+##teamcity[testFailed name='compareQPixmaps(different size)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared QPixmaps differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
##teamcity[testFinished name='compareQPixmaps(different size)']
##teamcity[testStarted name='compareQPixmaps(different pixels)']
-##teamcity[testFailed name='compareQPixmaps(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(382)|]' details='Compared values are not the same']
+##teamcity[testFailed name='compareQPixmaps(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(402)|]' details='Compared values are not the same']
##teamcity[testFinished name='compareQPixmaps(different pixels)']
##teamcity[testStarted name='compareQImages(both null)']
##teamcity[testFinished name='compareQImages(both null)']
##teamcity[testStarted name='compareQImages(one null)']
-##teamcity[testFailed name='compareQImages(one null)' message='Failure! |[Loc: tst_cmptest.cpp(409)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
+##teamcity[testFailed name='compareQImages(one null)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 1|n Expected (opB).isNull(): 0']
##teamcity[testFinished name='compareQImages(one null)']
##teamcity[testStarted name='compareQImages(other null)']
-##teamcity[testFailed name='compareQImages(other null)' message='Failure! |[Loc: tst_cmptest.cpp(409)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
+##teamcity[testFailed name='compareQImages(other null)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ.|n Actual (opA).isNull(): 0|n Expected (opB).isNull(): 1']
##teamcity[testFinished name='compareQImages(other null)']
##teamcity[testStarted name='compareQImages(equal)']
##teamcity[testFinished name='compareQImages(equal)']
##teamcity[testStarted name='compareQImages(different size)']
-##teamcity[testFailed name='compareQImages(different size)' message='Failure! |[Loc: tst_cmptest.cpp(409)|]' details='Compared QImages differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
+##teamcity[testFailed name='compareQImages(different size)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ in size.|n Actual (opA): 11x20|n Expected (opB): 20x20']
##teamcity[testFinished name='compareQImages(different size)']
##teamcity[testStarted name='compareQImages(different format)']
-##teamcity[testFailed name='compareQImages(different format)' message='Failure! |[Loc: tst_cmptest.cpp(409)|]' details='Compared QImages differ in format.|n Actual (opA): 6|n Expected (opB): 3']
+##teamcity[testFailed name='compareQImages(different format)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared QImages differ in format.|n Actual (opA): 6|n Expected (opB): 3']
##teamcity[testFinished name='compareQImages(different format)']
##teamcity[testStarted name='compareQImages(different pixels)']
-##teamcity[testFailed name='compareQImages(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(409)|]' details='Compared values are not the same']
+##teamcity[testFailed name='compareQImages(different pixels)' message='Failure! |[Loc: tst_cmptest.cpp(429)|]' details='Compared values are not the same']
##teamcity[testFinished name='compareQImages(different pixels)']
##teamcity[testStarted name='verify()']
-##teamcity[testFailed name='verify()' message='Failure! |[Loc: tst_cmptest.cpp(421)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
+##teamcity[testFailed name='verify()' message='Failure! |[Loc: tst_cmptest.cpp(441)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
##teamcity[testFinished name='verify()']
##teamcity[testStarted name='verify2()']
-##teamcity[testFailed name='verify2()' message='Failure! |[Loc: tst_cmptest.cpp(427)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
+##teamcity[testFailed name='verify2()' message='Failure! |[Loc: tst_cmptest.cpp(447)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
##teamcity[testFinished name='verify2()']
##teamcity[testStarted name='tryVerify()']
-##teamcity[testFailed name='tryVerify()' message='Failure! |[Loc: tst_cmptest.cpp(433)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
+##teamcity[testFailed name='tryVerify()' message='Failure! |[Loc: tst_cmptest.cpp(453)|]' details='|'opaqueFunc() < 2|' returned FALSE. ()']
##teamcity[testFinished name='tryVerify()']
##teamcity[testStarted name='tryVerify2()']
-##teamcity[testFailed name='tryVerify2()' message='Failure! |[Loc: tst_cmptest.cpp(439)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
+##teamcity[testFailed name='tryVerify2()' message='Failure! |[Loc: tst_cmptest.cpp(459)|]' details='|'opaqueFunc() < 2|' returned FALSE. (42)']
##teamcity[testFinished name='tryVerify2()']
+##teamcity[testStarted name='verifyExplicitOperatorBool()']
+##teamcity[testFinished name='verifyExplicitOperatorBool()']
##teamcity[testStarted name='cleanupTestCase()']
##teamcity[testFinished name='cleanupTestCase()']
##teamcity[testSuiteFinished name='tst_Cmptest']
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index 100fd5e8ef..8d403f4a8d 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -2,112 +2,114 @@
Config: Using QtTest library
PASS : tst_Cmptest::initTestCase()
FAIL! : tst_Cmptest::compare_unregistered_enums() Compared values are not the same
- Loc: [tst_cmptest.cpp(156)]
+ Loc: [tst_cmptest.cpp(158)]
FAIL! : tst_Cmptest::compare_registered_enums() Compared values are not the same
Actual (Qt::ArrowCursor): ArrowCursor
Expected (Qt::BusyCursor) : BusyCursor
- Loc: [tst_cmptest.cpp(162)]
+ Loc: [tst_cmptest.cpp(164)]
FAIL! : tst_Cmptest::compare_class_enums() Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2
- Loc: [tst_cmptest.cpp(168)]
+ Loc: [tst_cmptest.cpp(170)]
PASS : tst_Cmptest::compare_boolfuncs()
+PASS : tst_Cmptest::compare_to_nullptr()
PASS : tst_Cmptest::compare_pointerfuncs()
FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same
Actual (actual) : QVariant(int,123)
Expected (expected): QVariant(QString,hi)
- Loc: [tst_cmptest.cpp(239)]
+ Loc: [tst_cmptest.cpp(259)]
PASS : tst_Cmptest::compare_tostring(both invalid)
FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same
Actual (actual) : QVariant(QVariantHash)
Expected (expected): QVariant()
- Loc: [tst_cmptest.cpp(239)]
+ Loc: [tst_cmptest.cpp(259)]
FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same
Actual (actual) : QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)
- Loc: [tst_cmptest.cpp(239)]
+ Loc: [tst_cmptest.cpp(259)]
FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same
Actual (actual) : QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)
- Loc: [tst_cmptest.cpp(239)]
+ Loc: [tst_cmptest.cpp(259)]
PASS : tst_Cmptest::compareQStringLists(empty lists)
PASS : tst_Cmptest::compareQStringLists(equal lists)
FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"
- Loc: [tst_cmptest.cpp(333)]
+ Loc: [tst_cmptest.cpp(353)]
FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"
- Loc: [tst_cmptest.cpp(333)]
+ Loc: [tst_cmptest.cpp(353)]
FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared lists have different sizes.
Actual (opA) size: 2
Expected (opB) size: 1
- Loc: [tst_cmptest.cpp(333)]
+ Loc: [tst_cmptest.cpp(353)]
FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared lists have different sizes.
Actual (opA) size: 12
Expected (opB) size: 1
- Loc: [tst_cmptest.cpp(333)]
+ Loc: [tst_cmptest.cpp(353)]
FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared lists have different sizes.
Actual (opA) size: 1
Expected (opB) size: 12
- Loc: [tst_cmptest.cpp(333)]
+ Loc: [tst_cmptest.cpp(353)]
FAIL! : tst_Cmptest::compareQListInt() Compared lists differ at index 2.
Actual (int1): 3
Expected (int2): 4
- Loc: [tst_cmptest.cpp(340)]
+ Loc: [tst_cmptest.cpp(360)]
FAIL! : tst_Cmptest::compareQListDouble() Compared lists differ at index 0.
Actual (double1): 1.5
Expected (double2): 1
- Loc: [tst_cmptest.cpp(347)]
+ Loc: [tst_cmptest.cpp(367)]
FAIL! : tst_Cmptest::compareQColor() Compared values are not the same
Actual (yellow): #ffff00
Expected (green) : #00ff00
- Loc: [tst_cmptest.cpp(357)]
+ Loc: [tst_cmptest.cpp(377)]
PASS : tst_Cmptest::compareQPixmaps(both null)
FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0
- Loc: [tst_cmptest.cpp(382)]
+ Loc: [tst_cmptest.cpp(402)]
FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ.
Actual (opA).isNull(): 0
Expected (opB).isNull(): 1
- Loc: [tst_cmptest.cpp(382)]
+ Loc: [tst_cmptest.cpp(402)]
PASS : tst_Cmptest::compareQPixmaps(equal)
FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size.
Actual (opA): 11x20
Expected (opB): 20x20
- Loc: [tst_cmptest.cpp(382)]
+ Loc: [tst_cmptest.cpp(402)]
FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same
- Loc: [tst_cmptest.cpp(382)]
+ Loc: [tst_cmptest.cpp(402)]
PASS : tst_Cmptest::compareQImages(both null)
FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0
- Loc: [tst_cmptest.cpp(409)]
+ Loc: [tst_cmptest.cpp(429)]
FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ.
Actual (opA).isNull(): 0
Expected (opB).isNull(): 1
- Loc: [tst_cmptest.cpp(409)]
+ Loc: [tst_cmptest.cpp(429)]
PASS : tst_Cmptest::compareQImages(equal)
FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size.
Actual (opA): 11x20
Expected (opB): 20x20
- Loc: [tst_cmptest.cpp(409)]
+ Loc: [tst_cmptest.cpp(429)]
FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format.
Actual (opA): 6
Expected (opB): 3
- Loc: [tst_cmptest.cpp(409)]
+ Loc: [tst_cmptest.cpp(429)]
FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same
- Loc: [tst_cmptest.cpp(409)]
+ Loc: [tst_cmptest.cpp(429)]
FAIL! : tst_Cmptest::verify() 'opaqueFunc() < 2' returned FALSE. ()
- Loc: [tst_cmptest.cpp(421)]
+ Loc: [tst_cmptest.cpp(441)]
FAIL! : tst_Cmptest::verify2() 'opaqueFunc() < 2' returned FALSE. (42)
- Loc: [tst_cmptest.cpp(427)]
+ Loc: [tst_cmptest.cpp(447)]
FAIL! : tst_Cmptest::tryVerify() 'opaqueFunc() < 2' returned FALSE. ()
- Loc: [tst_cmptest.cpp(433)]
+ Loc: [tst_cmptest.cpp(453)]
FAIL! : tst_Cmptest::tryVerify2() 'opaqueFunc() < 2' returned FALSE. (42)
- Loc: [tst_cmptest.cpp(439)]
+ Loc: [tst_cmptest.cpp(459)]
+PASS : tst_Cmptest::verifyExplicitOperatorBool()
PASS : tst_Cmptest::cleanupTestCase()
-Totals: 11 passed, 28 failed, 0 skipped, 0 blacklisted, 247ms
+Totals: 13 passed, 28 failed, 0 skipped, 0 blacklisted, 246ms
********* Finished testing of tst_Cmptest *********
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml
index f45d9ba1da..18807008d7 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -10,13 +10,13 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_unregistered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="156">
+<Incident type="fail" file="tst_cmptest.cpp" line="158">
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_registered_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="162">
+<Incident type="fail" file="tst_cmptest.cpp" line="164">
<Description><![CDATA[Compared values are not the same
Actual (Qt::ArrowCursor): ArrowCursor
Expected (Qt::BusyCursor) : BusyCursor]]></Description>
@@ -24,7 +24,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_class_enums">
-<Incident type="fail" file="tst_cmptest.cpp" line="168">
+<Incident type="fail" file="tst_cmptest.cpp" line="170">
<Description><![CDATA[Compared values are not the same
Actual (MyClassEnum::MyClassEnumValue1): MyClassEnumValue1
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2]]></Description>
@@ -35,12 +35,16 @@
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="compare_to_nullptr">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compare_pointerfuncs">
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compare_tostring">
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(int,123)
@@ -49,19 +53,19 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both invalid]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="239">
+<Incident type="fail" file="tst_cmptest.cpp" line="259">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
Actual (actual) : QVariant(PhonyClass,<value not representable as string>)
@@ -76,31 +80,31 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal lists]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared lists differ at index 2.
Actual (opA): "string3"
Expected (opB): "DIFFERS"]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 2
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 12
Expected (opB) size: 1]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="333">
+<Incident type="fail" file="tst_cmptest.cpp" line="353">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared lists have different sizes.
Actual (opA) size: 1
@@ -109,7 +113,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListInt">
-<Incident type="fail" file="tst_cmptest.cpp" line="340">
+<Incident type="fail" file="tst_cmptest.cpp" line="360">
<Description><![CDATA[Compared lists differ at index 2.
Actual (int1): 3
Expected (int2): 4]]></Description>
@@ -117,7 +121,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQListDouble">
-<Incident type="fail" file="tst_cmptest.cpp" line="347">
+<Incident type="fail" file="tst_cmptest.cpp" line="367">
<Description><![CDATA[Compared lists differ at index 0.
Actual (double1): 1.5
Expected (double2): 1]]></Description>
@@ -125,7 +129,7 @@
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="compareQColor">
-<Incident type="fail" file="tst_cmptest.cpp" line="357">
+<Incident type="fail" file="tst_cmptest.cpp" line="377">
<Description><![CDATA[Compared values are not the same
Actual (yellow): #ffff00
Expected (green) : #00ff00]]></Description>
@@ -136,13 +140,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
Actual (opA).isNull(): 0
@@ -151,13 +155,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ in size.
Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="382">
+<Incident type="fail" file="tst_cmptest.cpp" line="402">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
@@ -167,13 +171,13 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[both null]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
Actual (opA).isNull(): 0
@@ -182,48 +186,52 @@
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[equal]]></DataTag>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QImages differ in size.
Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[different format]]></DataTag>
<Description><![CDATA[Compared QImages differ in format.
Actual (opA): 6
Expected (opB): 3]]></Description>
</Incident>
-<Incident type="fail" file="tst_cmptest.cpp" line="409">
+<Incident type="fail" file="tst_cmptest.cpp" line="429">
<DataTag><![CDATA[different pixels]]></DataTag>
<Description><![CDATA[Compared values are not the same]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="verify">
-<Incident type="fail" file="tst_cmptest.cpp" line="421">
+<Incident type="fail" file="tst_cmptest.cpp" line="441">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="verify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="427">
+<Incident type="fail" file="tst_cmptest.cpp" line="447">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify">
-<Incident type="fail" file="tst_cmptest.cpp" line="433">
+<Incident type="fail" file="tst_cmptest.cpp" line="453">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. ()]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
<TestFunction name="tryVerify2">
-<Incident type="fail" file="tst_cmptest.cpp" line="439">
+<Incident type="fail" file="tst_cmptest.cpp" line="459">
<Description><![CDATA['opaqueFunc() < 2' returned FALSE. (42)]]></Description>
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="verifyExplicitOperatorBool">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="cleanupTestCase">
<Incident type="pass" file="" line="0" />
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
index ec2c3f023c..925c725924 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="28" tests="18" name="tst_Cmptest">
+<testsuite errors="0" failures="28" tests="20" name="tst_Cmptest">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -20,6 +20,7 @@
Expected (MyClassEnum::MyClassEnumValue2): MyClassEnumValue2" result="fail"/>
</testcase>
<testcase result="pass" name="compare_boolfuncs"/>
+ <testcase result="pass" name="compare_to_nullptr"/>
<testcase result="pass" name="compare_pointerfuncs"/>
<testcase result="fail" name="compare_tostring">
<failure tag="int, string" message="Compared values are not the same
@@ -106,6 +107,7 @@
<testcase result="fail" name="tryVerify2">
<failure message="&apos;opaqueFunc() &lt; 2&apos; returned FALSE. (42)" result="fail"/>
</testcase>
+ <testcase result="pass" name="verifyExplicitOperatorBool"/>
<testcase result="pass" name="cleanupTestCase"/>
<system-err/>
</testsuite>
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 4a423b036c..2989ac4485 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -489,13 +489,6 @@ public:
Q_ENUMS(EnumSourceClass::TestEnum)
};
-#if defined(Q_MOC_RUN)
-// Task #119503
-#define _TASK_119503
-#if !_TASK_119503
-#endif
-#endif
-
class CtorTestClass : public QObject
{
Q_OBJECT
diff --git a/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro b/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro
index 4bfa89a44e..fa232b323b 100644
--- a/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro
+++ b/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
QT = core testlib dbus
TARGET = tst_qdbuscpp2xml
-QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_DBUS
SOURCES += tst_qdbuscpp2xml.cpp \
diff --git a/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro b/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro
index 8c29ff47c4..02910b0267 100644
--- a/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro
+++ b/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro
@@ -2,4 +2,4 @@ CONFIG += testcase
QT = core testlib
TARGET = tst_qdbusxml2cpp
SOURCES += tst_qdbusxml2cpp.cpp
-QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_DBUS
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index e6a0c5e86b..ac7ba02700 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -69,10 +69,8 @@ private slots:
void showMaximized();
void showMinimized();
void showFullScreen();
-#ifndef Q_OS_WINCE
void showAsTool();
void toolDialogPosition();
-#endif
void deleteMainDefault();
void deleteInExec();
#ifndef QT_NO_SIZEGRIP
@@ -358,8 +356,6 @@ void tst_QDialog::showFullScreen()
QVERIFY(!dialog.isVisible());
}
-// No real support for Qt::Tool on WinCE
-#ifndef Q_OS_WINCE
void tst_QDialog::showAsTool()
{
#if defined(Q_OS_UNIX)
@@ -379,10 +375,7 @@ void tst_QDialog::showAsTool()
QCOMPARE(dialog.wasActive(), false);
}
}
-#endif
-// No real support for Qt::Tool on WinCE
-#ifndef Q_OS_WINCE
// Verify that pos() returns the same before and after show()
// for a dialog with the Tool window type.
void tst_QDialog::toolDialogPosition()
@@ -394,7 +387,6 @@ void tst_QDialog::toolDialogPosition()
const QPoint afterShowPosition = dialog.pos();
QCOMPARE(afterShowPosition, beforeShowPosition);
}
-#endif
class Dialog : public QDialog
{
diff --git a/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro b/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro
index 2a11a29420..4ea23a896f 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro
+++ b/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro
@@ -8,18 +8,6 @@ QT += widgets widgets-private testlib
QT += core-private gui-private
SOURCES += tst_qfiledialog.cpp
-wince* {
- addFiles.files = *.cpp
- addFiles.path = .
- filesInDir.files = *.pro
- filesInDir.path = someDir
- DEPLOYMENT += addFiles filesInDir
-}
-
-wince* {
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
linux*: CONFIG += insignificant_test # Crashes on different Linux distros
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index ef549d252b..b836cdf00b 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -183,9 +183,6 @@ void tst_QFiledialog::init()
QFileDialogPrivate::setLastVisitedDirectory(QUrl());
// populate the sidebar with some default settings
QNonNativeFileDialog fd;
-#if defined(Q_OS_WINCE)
- QTest::qWait(1000);
-#endif
}
void tst_QFiledialog::cleanup()
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro b/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro
index fb432a7d21..1b35b2e4ac 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro
+++ b/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro
@@ -6,17 +6,4 @@ QT += core-private gui-private
SOURCES += tst_qfiledialog2.cpp
-wince* {
- addFiles.files = *.cpp
- addFiles.path = .
- filesInDir.files = *.pro
- filesInDir.path = someDir
- DEPLOYMENT += addFiles filesInDir
-}
-
-wince* {
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 0648f8364c..f08d78acf7 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -54,7 +54,7 @@
#include <qpa/qplatformdialoghelper.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
#include "../../../network-settings.h"
#endif
@@ -118,7 +118,7 @@ private slots:
#ifndef Q_OS_MAC
void task227930_correctNavigationKeyboardBehavior();
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void task226366_lowerCaseHardDriveWindows();
#endif
void completionOnLevelAfterRoot();
@@ -148,9 +148,6 @@ private:
tst_QFileDialog2::tst_QFileDialog2()
: tempDir(QDir::tempPath() + "/tst_qfiledialog2.XXXXXX")
{
-#if defined(Q_OS_WINCE)
- qApp->setAutoMaximizeThreshold(-1);
-#endif
}
void tst_QFileDialog2::cleanupSettingsFile()
@@ -177,9 +174,6 @@ void tst_QFileDialog2::init()
QFileDialogPrivate::setLastVisitedDirectory(QUrl());
// populate the sidebar with some default settings
QNonNativeFileDialog fd;
-#if defined(Q_OS_WINCE)
- QTest::qWait(1000);
-#endif
}
void tst_QFileDialog2::cleanup()
@@ -199,11 +193,7 @@ void tst_QFileDialog2::listRoot()
fd.show();
QCOMPARE(qt_test_isFetchedRoot(),false);
fd.setDirectory("");
-#ifdef Q_OS_WINCE
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QCOMPARE(qt_test_isFetchedRoot(),true);
}
#endif
@@ -297,7 +287,7 @@ void tst_QFileDialog2::showNameFilterDetails()
void tst_QFileDialog2::unc()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// Only test UNC on Windows./
QString dir("\\\\" + QtNetworkSettings::winServerName() + "\\testsharewritable");
#else
@@ -645,7 +635,7 @@ void tst_QFileDialog2::task227930_correctNavigationKeyboardBehavior()
}
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void tst_QFileDialog2::task226366_lowerCaseHardDriveWindows()
{
QNonNativeFileDialog fd;
@@ -675,7 +665,7 @@ void tst_QFileDialog2::task226366_lowerCaseHardDriveWindows()
void tst_QFileDialog2::completionOnLevelAfterRoot()
{
QNonNativeFileDialog fd;
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
fd.setDirectory("C:/");
QDir current = fd.directory();
QStringList entryList = current.entryList(QStringList(), QDir::Dirs);
@@ -719,7 +709,7 @@ void tst_QFileDialog2::completionOnLevelAfterRoot()
fd.show();
QLineEdit *edit = fd.findChild<QLineEdit*>("fileNameEdit");
QTest::qWait(2000);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
//I love testlib :D
for (int i = 0; i < 5; i++)
QTest::keyClick(edit, testDir.at(i).toLower().toLatin1() - 'a' + Qt::Key_A);
@@ -730,7 +720,7 @@ void tst_QFileDialog2::completionOnLevelAfterRoot()
QTest::qWait(200);
QTest::keyClick(edit->completer()->popup(), Qt::Key_Down);
QTest::qWait(200);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
QCOMPARE(edit->text(), testDir);
#else
QTRY_COMPARE(edit->text(), QString("etc"));
@@ -864,33 +854,21 @@ void tst_QFileDialog2::task228844_ensurePreviousSorting()
fd.setDirectory(current.absolutePath());
fd.setViewMode(QFileDialog::Detail);
fd.show();
-#if defined(Q_OS_WINCE)
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QTreeView *tree = fd.findChild<QTreeView*>("treeView");
tree->header()->setSortIndicator(3,Qt::DescendingOrder);
QTest::qWait(200);
QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox");
QPushButton *button = buttonBox->button(QDialogButtonBox::Open);
QTest::mouseClick(button, Qt::LeftButton);
-#if defined(Q_OS_WINCE)
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QNonNativeFileDialog fd2;
fd2.setFileMode(QFileDialog::Directory);
fd2.restoreState(fd.saveState());
current.cd("aaaaaaaaaaaaaaaaaa");
fd2.setDirectory(current.absolutePath());
fd2.show();
-#if defined(Q_OS_WINCE)
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QTreeView *tree2 = fd2.findChild<QTreeView*>("treeView");
tree2->setFocus();
@@ -900,22 +878,14 @@ void tst_QFileDialog2::task228844_ensurePreviousSorting()
QPushButton *button2 = buttonBox2->button(QDialogButtonBox::Open);
fd2.selectFile("g");
QTest::mouseClick(button2, Qt::LeftButton);
-#if defined(Q_OS_WINCE)
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QCOMPARE(fd2.selectedFiles().first(), current.absolutePath() + QLatin1String("/g"));
QNonNativeFileDialog fd3(0, "This is a third file dialog", tempFile->fileName());
fd3.restoreState(fd.saveState());
fd3.setFileMode(QFileDialog::Directory);
fd3.show();
-#if defined(Q_OS_WINCE)
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QTreeView *tree3 = fd3.findChild<QTreeView*>("treeView");
tree3->setFocus();
@@ -924,11 +894,7 @@ void tst_QFileDialog2::task228844_ensurePreviousSorting()
QDialogButtonBox *buttonBox3 = fd3.findChild<QDialogButtonBox*>("buttonBox");
QPushButton *button3 = buttonBox3->button(QDialogButtonBox::Open);
QTest::mouseClick(button3, Qt::LeftButton);
-#if defined(Q_OS_WINCE)
- QTest::qWait(1500);
-#else
QTest::qWait(500);
-#endif
QCOMPARE(fd3.selectedFiles().first(), tempFile->fileName());
current.cd("aaaaaaaaaaaaaaaaaa");
@@ -1010,11 +976,7 @@ void tst_QFileDialog2::task251321_sideBarHiddenEntries()
sidebar->selectUrl(QUrl::fromLocalFile(hiddenSubDir.absolutePath()));
QTest::mouseClick(sidebar->viewport(), Qt::LeftButton, 0, sidebar->visualRect(sidebar->model()->index(0, 0)).center());
// give the background processes more time on windows mobile
-#ifdef Q_OS_WINCE
- QTest::qWait(1000);
-#else
QTest::qWait(250);
-#endif
QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model");
QCOMPARE(model->rowCount(model->index(hiddenSubDir.absolutePath())), 2);
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 7939d88c73..53d7cae837 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -40,7 +40,7 @@
#include <QStyle>
#include <QtGlobal>
#include <QTemporaryDir>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
# include <qt_windows.h> // for SetFileAttributes
#endif
@@ -104,7 +104,7 @@ private slots:
void caseSensitivity();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void Win32LongFileName();
#endif
@@ -334,7 +334,7 @@ bool tst_QFileSystemModel::createFiles(const QString &test_path, const QStringLi
return false;
}
file.close();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
if (initial_files.at(i)[0] == '.') {
QString hiddenFile = QDir::toNativeSeparators(file.fileName());
wchar_t nativeHiddenFile[MAX_PATH];
@@ -371,14 +371,9 @@ void tst_QFileSystemModel::rowCount()
QSignalSpy spy2(model, SIGNAL(rowsInserted(QModelIndex,int,int)));
QSignalSpy spy3(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
-#if !defined(Q_OS_WINCE)
QStringList files = QStringList() << "b" << "d" << "f" << "h" << "j" << ".a" << ".c" << ".e" << ".g";
QString l = "b,d,f,h,j,.a,.c,.e,.g";
-#else
- // Cannot hide them on CE
- QStringList files = QStringList() << "b" << "d" << "f" << "h" << "j";
- QString l = "b,d,f,h,j";
-#endif
+
QVERIFY(createFiles(tmp, files));
QModelIndex root = model->setRootPath(tmp);
@@ -406,9 +401,6 @@ static inline QString lastEntry(const QModelIndex &root)
void tst_QFileSystemModel::rowsInserted()
{
-#if defined(Q_OS_WINCE)
- QSKIP("Watching directories does not work on CE(see #137910)");
-#endif
QString tmp = flatDirTestPath;
rowCount();
QModelIndex root = model->index(model->rootPath());
@@ -463,9 +455,6 @@ void tst_QFileSystemModel::rowsRemoved_data()
void tst_QFileSystemModel::rowsRemoved()
{
-#if defined(Q_OS_WINCE)
- QSKIP("Watching directories does not work on CE(see #137910)");
-#endif
QString tmp = flatDirTestPath;
rowCount();
QModelIndex root = model->index(model->rootPath());
@@ -554,7 +543,6 @@ void tst_QFileSystemModel::filters_data()
QTest::addColumn<int>("dirFilters");
QTest::addColumn<QStringList>("nameFilters");
QTest::addColumn<int>("rowCount");
-#if !defined(Q_OS_WINCE)
QTest::newRow("no dirs") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs) << QStringList() << 2;
QTest::newRow("no dirs - dot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDot) << QStringList() << 1;
QTest::newRow("no dirs - dotdot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDotDot) << QStringList() << 1;
@@ -576,30 +564,6 @@ void tst_QFileSystemModel::filters_data()
(int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot | QDir::CaseSensitive) << (QStringList() << "a") << 1;
QTest::newRow("dir+files+hid+dot+cas+alldir") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") <<
(int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot | QDir::CaseSensitive | QDir::AllDirs) << (QStringList() << "Z") << 1;
-#else
- QTest::qWait(3000); // We need to calm down a bit...
- QTest::newRow("no dirs") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs) << QStringList() << 0;
- QTest::newRow("no dirs - dot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDot) << QStringList() << 1;
- QTest::newRow("no dirs - dotdot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDotDot) << QStringList() << 1;
- QTest::newRow("no dirs - dotanddotdot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDotAndDotDot) << QStringList() << 0;
- QTest::newRow("one dir - dot") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") << (int)(QDir::Dirs | QDir::NoDot) << QStringList() << 2;
- QTest::newRow("one dir - dotdot") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") << (int)(QDir::Dirs | QDir::NoDotDot) << QStringList() << 2;
- QTest::newRow("one dir - dotanddotdot") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") << (int)(QDir::Dirs | QDir::NoDotAndDotDot) << QStringList() << 1;
- QTest::newRow("one dir") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") << (int)(QDir::Dirs) << QStringList() << 1;
- QTest::newRow("no dir + hidden") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::Hidden) << QStringList() << 0;
- QTest::newRow("dir+hid+files") << (QStringList() << "a" << "b" << "c") << QStringList() <<
- (int)(QDir::Dirs | QDir::Files | QDir::Hidden) << QStringList() << 3;
- QTest::newRow("dir+file+hid-dot .A") << (QStringList() << "a" << "b" << "c") << (QStringList() << ".A") <<
- (int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot) << QStringList() << 4;
- QTest::newRow("dir+files+hid+dot A") << (QStringList() << "a" << "b" << "c") << (QStringList() << "AFolder") <<
- (int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot) << (QStringList() << "A*") << 2;
- QTest::newRow("dir+files+hid+dot+cas1") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") <<
- (int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot | QDir::CaseSensitive) << (QStringList() << "Z") << 1;
- QTest::newRow("dir+files+hid+dot+cas2") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") <<
- (int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot | QDir::CaseSensitive) << (QStringList() << "a") << 1;
- QTest::newRow("dir+files+hid+dot+cas+alldir") << (QStringList() << "a" << "b" << "c") << (QStringList() << "Z") <<
- (int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot | QDir::CaseSensitive | QDir::AllDirs) << (QStringList() << "Z") << 1;
-#endif
QTest::newRow("case sensitive") << (QStringList() << "Antiguagdb" << "Antiguamtd"
<< "Antiguamtp" << "afghanistangdb" << "afghanistanmtd")
@@ -926,7 +890,7 @@ void tst_QFileSystemModel::caseSensitivity()
}
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
void tst_QFileSystemModel::Win32LongFileName()
{
QString tmp = flatDirTestPath;
diff --git a/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST b/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST
index b62f3e3344..07f3a41df3 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST
+++ b/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST
@@ -1,4 +1,5 @@
[task256466_wrongStyle]
opensuse-13.1
+opensuse-42.1
rhel-7.1
rhel-7.2
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index d6b3ce07e8..d6c4841b22 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -395,11 +395,8 @@ void tst_QMessageBox::about()
QVERIFY(closeHelper.done());
#endif
-#if !defined(Q_OS_WINCE)
const int keyToSend = Qt::Key_Enter;
-#else
- const keyToSend = Qt::Key_Escape;
-#endif
+
closeHelper.start(keyToSend);
QMessageBox::aboutQt(0, "Caption");
#ifdef Q_OS_MAC
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index 2635a2ed82..016835f142 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -51,9 +51,6 @@ class tst_QWizard : public QObject
{
Q_OBJECT
-public:
- tst_QWizard();
-
private slots:
void cleanup();
void buttonText();
@@ -128,13 +125,6 @@ private slots:
*/
};
-tst_QWizard::tst_QWizard()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QWizard::cleanup()
{
QVERIFY(QApplication::topLevelWidgets().isEmpty());
@@ -962,9 +952,6 @@ void tst_QWizard::setOption_IndependentPages()
void tst_QWizard::setOption_IgnoreSubTitles()
{
-#if defined(Q_OS_WINCE)
- QSKIP("Skipped because of limited resources and potential crash. (Task: 166824)");
-#endif
const QRect availableGeometry = QGuiApplication::primaryScreen()->availableGeometry();
const int kPixels = (availableGeometry.width() + 500) / 1000;
const int frame = 50 * kPixels;
@@ -1073,9 +1060,6 @@ void tst_QWizard::setOption_IgnoreSubTitles()
void tst_QWizard::setOption_ExtendedWatermarkPixmap()
{
-#if defined(Q_OS_WINCE)
- QSKIP("Skipped because of limited resources and potential crash. (Task: 166824)");
-#endif
QPixmap watermarkPixmap(200, 400);
watermarkPixmap.fill(Qt::black);
@@ -2062,10 +2046,6 @@ void tst_QWizard::combinations_data()
void tst_QWizard::combinations()
{
-#ifdef Q_OS_WINCE
- QSKIP("Too much memory usage for testing on CE emulator");
-#endif
-
QFETCH(bool, ref);
QFETCH(bool, testEquality);
QFETCH(QList<Operation *>, operations);
diff --git a/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
index bf0f99598b..4fbe13cce7 100644
--- a/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
+++ b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
@@ -5,10 +5,3 @@ QT += widgets widgets-private testlib
QT += gui-private
SOURCES += tst_qpixmapfilter.cpp
-
-wince {
- addFiles.files = noise.png
- addFiles.path = .
- DEPLOYMENT += addFiles
-}
-
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 90ea2cb58b..f5b2269297 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -38,7 +38,6 @@ class tst_QGraphicsGridLayout : public QObject
Q_OBJECT
private slots:
- void initTestCase();
void qgraphicsgridlayout_data();
void qgraphicsgridlayout();
void addItem_data();
@@ -294,16 +293,6 @@ Q_DECLARE_METATYPE(ItemList);
typedef QList<QSizeF> SizeList;
-
-// This will be called before the first test function is executed.
-// It is only called once.
-void tst_QGraphicsGridLayout::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QGraphicsGridLayout::qgraphicsgridlayout_data()
{
}
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro
index 5bfa15db16..88526144fc 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro
@@ -5,4 +5,4 @@ QT += core-private gui-private
SOURCES += tst_qgraphicsitem.cpp
DEFINES += QT_NO_CAST_TO_ASCII
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index fc192560b4..56c2b6583e 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -57,9 +57,7 @@
Q_DECLARE_METATYPE(QPainterPath)
-#include "../../../qtest-config.h"
-
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
#include <windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
@@ -279,9 +277,6 @@ class tst_QGraphicsItem : public QObject
{
Q_OBJECT
-public slots:
- void init();
-
private slots:
void construction();
void constructionWithParent();
@@ -355,7 +350,7 @@ private slots:
void filtersChildEvents();
void filtersChildEvents2();
void ensureVisible();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void cursor();
#endif
//void textControlGetterSetter();
@@ -481,13 +476,6 @@ private:
QList<QGraphicsItem *> paintedItems;
};
-void tst_QGraphicsItem::init()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QGraphicsItem::construction()
{
for (int i = 0; i < 7; ++i) {
@@ -4187,7 +4175,7 @@ void tst_QGraphicsItem::ensureVisible()
QTest::qWait(25);
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsItem::cursor()
{
QGraphicsScene scene;
@@ -4535,7 +4523,7 @@ protected:
case QGraphicsItem::ItemSceneHasChanged:
break;
case QGraphicsItem::ItemCursorChange:
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
oldValues << cursor();
#endif
break;
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index c93fc1288f..4cf602a548 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -33,8 +33,6 @@
#include <private/qgraphicsproxywidget_p.h>
#include <private/qlayoutengine_p.h> // qSmartMin functions...
-#include "../../../qtest-config.h"
-
static void sendMouseMove(QWidget *widget, const QPoint &point, Qt::MouseButton button = Qt::NoButton)
{
QMouseEvent event(QEvent::MouseMove, point, widget->mapToGlobal(point), button, button, 0);
@@ -97,7 +95,7 @@ private slots:
void focusNextPrevChild();
void focusOutEvent_data();
void focusOutEvent();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void hoverEnterLeaveEvent_data();
void hoverEnterLeaveEvent();
#endif
@@ -140,7 +138,7 @@ private slots:
void setFocus_complexTwoWidgets();
void popup_basic();
void popup_subwidget();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void changingCursor_basic();
#endif
void tooltip_basic();
@@ -272,9 +270,6 @@ public:
// It is only called once.
void tst_QGraphicsProxyWidget::initTestCase()
{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
// Disable menu animations to prevent the alpha widget from getting in the way
// in actionsContextMenu().
QApplication::setEffectEnabled(Qt::UI_AnimateMenu, false);
@@ -414,7 +409,7 @@ void tst_QGraphicsProxyWidget::setWidget()
}
QWidget *widget = new QWidget;
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
widget->setCursor(Qt::IBeamCursor);
#endif
widget->setPalette(QPalette(Qt::magenta));
@@ -451,7 +446,7 @@ void tst_QGraphicsProxyWidget::setWidget()
QVERIFY(subWidget->testAttribute(Qt::WA_DontShowOnScreen));
QVERIFY(!subWidget->testAttribute(Qt::WA_QuitOnClose));
QCOMPARE(proxy->acceptHoverEvents(), true);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QVERIFY(proxy->hasCursor());
// These should match
@@ -934,7 +929,7 @@ protected:
}
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent_data()
{
QTest::addColumn<bool>("hasWidget");
@@ -1522,7 +1517,7 @@ void tst_QGraphicsProxyWidget::setWidget_simple()
// Properties
// QCOMPARE(proxy.focusPolicy(), lineEdit->focusPolicy());
// QCOMPARE(proxy.palette(), lineEdit->palette());
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(proxy.cursor().shape(), lineEdit->cursor().shape());
#endif
QCOMPARE(proxy.layoutDirection(), lineEdit->layoutDirection());
@@ -1571,7 +1566,7 @@ void tst_QGraphicsProxyWidget::resize_simple_data()
QTest::addColumn<QSizeF>("size");
QTest::newRow("200, 200") << QSizeF(200, 200);
-#if !defined(Q_PROCESSOR_ARM) && !defined(Q_OS_WINCE)
+#if !defined(Q_PROCESSOR_ARM)
QTest::newRow("1000, 1000") << QSizeF(1000, 1000);
// Since 4.5, 10000x10000 runs out of memory.
// QTest::newRow("10000, 10000") << QSizeF(10000, 10000);
@@ -2539,7 +2534,7 @@ void tst_QGraphicsProxyWidget::popup_subwidget()
QCOMPARE(popup->size(), child->size().toSize());
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsProxyWidget::changingCursor_basic()
{
// Confirm that mouse events are working properly by checking that
@@ -3645,7 +3640,7 @@ public slots:
void tst_QGraphicsProxyWidget::QTBUG_6986_sendMouseEventToAlienWidget()
{
-#if defined(Q_OS_MAC) || defined(Q_OS_WIN) || defined(QTEST_NO_CURSOR)
+#if defined(Q_OS_DARWIN) || defined(Q_OS_WIN) || defined(QT_NO_CURSOR)
QSKIP("Test case unstable on this platform");
#endif
QGraphicsView view;
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro
index 986ba019b4..351cecd92e 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro
@@ -4,18 +4,9 @@ QT += widgets widgets-private testlib
QT += core-private gui-private
SOURCES += tst_qgraphicsscene.cpp
RESOURCES += images.qrc
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
-!wince: DEFINES += SRCDIR=\\\"$$PWD\\\"
+DEFINES += SRCDIR=\\\"$$PWD\\\"
DEFINES += QT_NO_CAST_TO_ASCII
-wince* {
- rootFiles.files = Ash_European.jpg graphicsScene_selection.data
- rootFiles.path = .
- renderFiles.files = testData\\render\\*
- renderFiles.path = testData\\render
- DEPLOYMENT += rootFiles renderFiles
- DEFINES += SRCDIR=\\\".\\\"
-}
-
RESOURCES += testdata.qrc
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index a346bb9d1f..38b4230409 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -28,9 +28,6 @@
#include <QtTest/QtTest>
-#if defined(Q_OS_WINCE)
-#include <ceconfig.h>
-#endif
#include <QtGui>
#include <QtWidgets>
@@ -41,7 +38,7 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
#include <windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
@@ -170,7 +167,6 @@ class tst_QGraphicsScene : public QObject
{
Q_OBJECT
public slots:
- void initTestCase();
void cleanup();
private slots:
@@ -273,13 +269,6 @@ private slots:
void taskQTBUG_16401_focusItem();
};
-void tst_QGraphicsScene::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QGraphicsScene::cleanup()
{
// ensure not even skipped tests with custom input context leave it dangling
@@ -1250,7 +1239,7 @@ void tst_QGraphicsScene::addText()
void tst_QGraphicsScene::removeItem()
{
-#if (defined(Q_OS_WINCE) && !defined(GWES_ICONCURS)) || defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID)
QSKIP("No mouse cursor support");
#endif
QGraphicsScene scene;
@@ -1587,11 +1576,7 @@ void tst_QGraphicsScene::hoverEvents_siblings()
QGraphicsView view(&scene);
view.setRenderHint(QPainter::Antialiasing, true);
-#if defined(Q_OS_WINCE)
- view.setMinimumSize(230, 200);
-#else
view.setMinimumSize(400, 300);
-#endif
view.rotate(10);
view.scale(1.7, 1.7);
view.show();
@@ -1660,11 +1645,7 @@ void tst_QGraphicsScene::hoverEvents_parentChild()
QGraphicsView view(&scene);
view.setRenderHint(QPainter::Antialiasing, true);
-#if defined(Q_OS_WINCE)
- view.setMinimumSize(230, 200);
-#else
view.setMinimumSize(400, 300);
-#endif
view.rotate(10);
view.scale(1.7, 1.7);
view.show();
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 10f5a9161e..2329db55e9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -54,7 +54,6 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#include "../../../qtest-config.h"
#include "tst_qgraphicsview.h"
Q_DECLARE_METATYPE(ExpectedValueDescription)
@@ -143,7 +142,6 @@ public:
: platformName(QGuiApplication::platformName().toLower())
{ }
private slots:
- void initTestCase();
void cleanup();
void construction();
void renderHints();
@@ -196,7 +194,7 @@ private slots:
#ifndef QT_NO_WHEELEVENT
void wheelEvent();
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void cursor();
void cursor2();
#endif
@@ -260,7 +258,7 @@ private slots:
void QTBUG_4151_clipAndIgnore_data();
void QTBUG_4151_clipAndIgnore();
void QTBUG_5859_exposedRect();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void QTBUG_7438_cursor();
#endif
void hoverLeave();
@@ -273,13 +271,6 @@ private:
QString platformName;
};
-void tst_QGraphicsView::initTestCase()
-{
-#ifdef Q_OS_WINCE_WM
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QGraphicsView::cleanup()
{
// ensure not even skipped tests with custom input context leave it dangling
@@ -694,7 +685,7 @@ void tst_QGraphicsView::dragMode_scrollHand()
for (int i = 0; i < 2; ++i) {
// ScrollHandDrag
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
Qt::CursorShape cursorShape = view.viewport()->cursor().shape();
#endif
int horizontalScrollBarValue = view.horizontalScrollBar()->value();
@@ -713,7 +704,7 @@ void tst_QGraphicsView::dragMode_scrollHand()
QTRY_VERIFY(item->isSelected());
for (int k = 0; k < 4; ++k) {
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), Qt::ClosedHandCursor);
#endif
{
@@ -756,7 +747,7 @@ void tst_QGraphicsView::dragMode_scrollHand()
QTRY_VERIFY(item->isSelected());
QCOMPARE(view.horizontalScrollBar()->value(), horizontalScrollBarValue - 10);
QCOMPARE(view.verticalScrollBar()->value(), verticalScrollBarValue - 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), cursorShape);
#endif
@@ -816,7 +807,7 @@ void tst_QGraphicsView::dragMode_rubberBand()
for (int i = 0; i < 2; ++i) {
// RubberBandDrag
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
Qt::CursorShape cursorShape = view.viewport()->cursor().shape();
#endif
int horizontalScrollBarValue = view.horizontalScrollBar()->value();
@@ -830,7 +821,7 @@ void tst_QGraphicsView::dragMode_rubberBand()
QApplication::sendEvent(view.viewport(), &event);
QVERIFY(event.isAccepted());
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), cursorShape);
#endif
@@ -878,7 +869,7 @@ void tst_QGraphicsView::dragMode_rubberBand()
}
QCOMPARE(view.horizontalScrollBar()->value(), horizontalScrollBarValue);
QCOMPARE(view.verticalScrollBar()->value(), verticalScrollBarValue);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), cursorShape);
#endif
@@ -1383,20 +1374,9 @@ void tst_QGraphicsView::fitInView()
items[0]->setTransform(QTransform().rotate(30), true);
items[1]->setTransform(QTransform().rotate(-30), true);
-#if defined(Q_OS_WINCE)
- //Is the standard scrollbar size
- int scrollbarSize = qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent) - 13;
-#endif
-
QGraphicsView view(&scene);
view.setSceneRect(-400, -400, 800, 800);
-
-#if defined(Q_OS_WINCE)
- //We need to take in account the scrollbar size for the WindowsMobilStyle
- view.setFixedSize(400 + scrollbarSize, 200 + scrollbarSize);
-#else
view.setFixedSize(400, 200);
-#endif
view.showNormal();
view.fitInView(scene.itemsBoundingRect(), Qt::IgnoreAspectRatio);
@@ -1810,11 +1790,7 @@ void tst_QGraphicsView::mapToScene()
QGraphicsView view(&topLevel);
view.setScene(&scene);
view.setSceneRect(-500, -500, 1000, 1000);
-#if defined(Q_OS_WINCE)
- QSize viewSize(200,200);
-#else
QSize viewSize(300,300);
-#endif
view.setFixedSize(viewSize);
topLevel.show();
@@ -2221,7 +2197,7 @@ void tst_QGraphicsView::wheelEvent()
}
#endif // !QT_NO_WHEELEVENT
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsView::cursor()
{
QGraphicsScene scene;
@@ -2245,7 +2221,7 @@ void tst_QGraphicsView::cursor()
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsView::cursor2()
{
QGraphicsScene scene;
@@ -3740,7 +3716,7 @@ void tst_QGraphicsView::mouseTracking()
QGraphicsView view(&scene);
QGraphicsRectItem *item = new QGraphicsRectItem(10, 10, 10, 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
item->setCursor(Qt::CrossCursor);
#endif
scene.addItem(item);
@@ -3750,7 +3726,7 @@ void tst_QGraphicsView::mouseTracking()
// Adding an item to the scene before the scene is set on the view.
QGraphicsScene scene(-10000, -10000, 20000, 20000);
QGraphicsRectItem *item = new QGraphicsRectItem(10, 10, 10, 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
item->setCursor(Qt::CrossCursor);
#endif
scene.addItem(item);
@@ -3767,7 +3743,7 @@ void tst_QGraphicsView::mouseTracking()
QGraphicsView view3(&scene);
QGraphicsRectItem *item = new QGraphicsRectItem(10, 10, 10, 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
item->setCursor(Qt::CrossCursor);
#endif
scene.addItem(item);
@@ -4528,9 +4504,6 @@ void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins()
{
-#if defined(Q_OS_WINCE)
- QSKIP("Qt/CE does not implement mouse tracking at this point");
-#endif
QGraphicsScene scene(-100, -100, 200, 200);
scene.addRect(QRectF(-50, -50, 100, 100), QPen(Qt::black), QBrush(Qt::blue));
@@ -4722,7 +4695,7 @@ void tst_QGraphicsView::QTBUG_5859_exposedRect()
QCOMPARE(item.lastExposedRect, scene.lastBackgroundExposedRect);
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsView::QTBUG_7438_cursor()
{
QGraphicsScene scene;
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index ca9f866e81..9e390e45a6 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -42,8 +42,6 @@
#include <qstylefactory.h>
#include <qscreen.h>
-#include "../../../qtest-config.h"
-
typedef QList<QGraphicsItem *> QGraphicsItemList;
class EventSpy : public QObject
@@ -1112,9 +1110,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
QCOMPARE(isUnderMouse, underMouse);
-#endif
// if (layoutDirection != Qt::LeftToRight)
//QEXPECT_FAIL("", "QApplicaiton::layoutDirection doesn't propagate to QGraphicsWidget", Continue);
//QCOMPARE(option.direction, layoutDirection);
@@ -2938,8 +2934,8 @@ protected:
void tst_QGraphicsWidget::respectHFW()
{
-#if defined(Q_OS_WINCE) || defined(Q_OS_MAC)
- QSKIP("This test is platform dependent, it fails on wince and mac. Please fix.");
+#if defined(Q_OS_DARWIN)
+ QSKIP("This test is platform dependent, it fails on Apple platforms. Please fix.");
#else
QGraphicsScene scene;
HFWWidget *window = new HFWWidget;
@@ -3184,7 +3180,7 @@ void tst_QGraphicsWidget::itemChangeEvents()
valueDuringEvents.insert(QEvent::ParentChange, QVariant::fromValue(parentItem()));
break;
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
case QEvent::CursorChange: {
valueDuringEvents.insert(QEvent::CursorChange, int(cursor().shape()));
break;
@@ -3235,7 +3231,7 @@ void tst_QGraphicsWidget::itemChangeEvents()
QVERIFY(!item->isVisible());
QTRY_VERIFY(!item->valueDuringEvents.value(QEvent::Hide).toBool());
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
// CursorChange should be triggered after the cursor has changed
item->setCursor(Qt::PointingHandCursor);
QTRY_COMPARE(item->valueDuringEvents.value(QEvent::CursorChange).toInt(), int(item->cursor().shape()));
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 89fb30557b..1050fa2561 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -197,7 +197,6 @@ public:
void basic_tests(TestView *view);
private slots:
- void initTestCase();
void cleanup();
void getSetCheck();
void emptyModels_data();
@@ -356,13 +355,6 @@ void tst_QAbstractItemView::getSetCheck()
QCOMPARE(16, obj1->autoScrollMargin());
}
-void tst_QAbstractItemView::initTestCase()
-{
-#ifdef Q_OS_WINCE_WM
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QAbstractItemView::cleanup()
{
QVERIFY(QApplication::topLevelWidgets().isEmpty());
@@ -1307,9 +1299,6 @@ void tst_QAbstractItemView::task250754_fontChange()
void tst_QAbstractItemView::task200665_itemEntered()
{
-#ifdef Q_OS_WINCE_WM
- QSKIP("On Windows Mobile the mouse tracking is unavailable at the moment");
-#endif
//we test that view will emit entered
//when the scrollbar move but not the mouse itself
QStandardItemModel model(1000,1);
diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
index d717278be9..e6c4ab44f8 100644
--- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
@@ -183,9 +183,6 @@ void tst_QColumnView::initTestCase()
void tst_QColumnView::init()
{
qApp->setLayoutDirection(Qt::LeftToRight);
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
}
void tst_QColumnView::rootIndex()
diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
index 5190598701..ea4e9d4620 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
+++ b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
@@ -13,7 +13,7 @@ wince* {
DEPLOYMENT += addit tests sourceFile
}
-android|wince {
+android {
DEFINES += SRCDIR=\\\"./\\\"
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index 06019d4555..30109952c7 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -575,7 +575,7 @@ void tst_QDirModel::filePath()
model.setResolveSymlinks(false);
QModelIndex index = model.index(SRCDIR "test.lnk");
QVERIFY(index.isValid());
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_ANDROID)
+#if !defined(Q_OS_ANDROID)
QString path = SRCDIR;
#else
QString path = QFileInfo(SRCDIR).absoluteFilePath();
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index 47ec93ce16..bc8b08997f 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -381,9 +381,6 @@ tst_QHeaderView::tst_QHeaderView()
void tst_QHeaderView::initTestCase()
{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
m_tableview = new QTableView();
}
@@ -554,11 +551,7 @@ void tst_QHeaderView::hidden()
void tst_QHeaderView::stretch()
{
// Show before resize and setStretchLastSection
-#if defined(Q_OS_WINCE)
- QSize viewSize(200,300);
-#else
QSize viewSize(500, 500);
-#endif
view->resize(viewSize);
view->setStretchLastSection(true);
QCOMPARE(view->stretchLastSection(), true);
@@ -618,12 +611,6 @@ void tst_QHeaderView::sectionSize()
QFETCH(int, lastVisibleSectionSize);
QFETCH(int, persistentSectionSize);
-#ifdef Q_OS_WINCE
- // We test on a device with doubled pixels. Therefore we need to specify
- // different boundaries.
- initialDefaultSize = qMax(view->minimumSectionSize(), 30);
-#endif
-
// bounds check
foreach (int val, boundsCheck)
view->sectionSize(val);
@@ -693,13 +680,7 @@ void tst_QHeaderView::visualIndexAt_data()
QTest::addColumn<QList<int> >("visual");
QList<int> coordinateList;
-#ifndef Q_OS_WINCE
coordinateList << -1 << 0 << 31 << 91 << 99999;
-#else
- // We test on a device with doubled pixels. Therefore we need to specify
- // different boundaries.
- coordinateList << -1 << 0 << 33 << 97 << 99999;
-#endif
QTest::newRow("no hidden, no moved sections")
<< QList<int>()
@@ -752,10 +733,6 @@ void tst_QHeaderView::visualIndexAt()
void tst_QHeaderView::length()
{
-#if defined(Q_OS_WINCE)
- QFont font(QLatin1String("Tahoma"), 7);
- view->setFont(font);
-#endif
view->setStretchLastSection(true);
topLevel->show();
QVERIFY(QTest::qWaitForWindowExposed(topLevel));
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
index f7fb41e60c..9405c33a48 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
+++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
@@ -3,4 +3,4 @@ TARGET = tst_qitemdelegate
QT += widgets testlib
SOURCES += tst_qitemdelegate.cpp
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index 34713bdff9..e67edfcccb 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -53,7 +53,7 @@
Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint)
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
#include <windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
index d3211eada8..1fd7b31e22 100644
--- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
@@ -32,42 +32,13 @@
#include "viewstotest.cpp"
#include <stdlib.h>
-#if defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX) || defined(Q_OS_WIN)
#include <time.h>
#endif
-#if defined(Q_OS_WIN)
-#include <time.h>
-#if defined(Q_OS_WINCE)
-#include <aygshell.h>
-#endif
-#define random rand
-#define srandom srand
-
-#if defined(Q_OS_WINCE)
-#ifndef SPI_GETPLATFORMTYPE
-#define SPI_GETPLATFORMTYPE 257
-#endif
-
-bool qt_wince_is_platform(const QString &platformString) {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
- return true;
- return false;
-}
-
-bool qt_wince_is_pocket_pc() {
- return qt_wince_is_platform(QString::fromLatin1("PocketPC"));
-}
-bool qt_wince_is_smartphone() {
- return qt_wince_is_platform(QString::fromLatin1("Smartphone"));
-}
-bool qt_wince_is_mobile() {
- return (qt_wince_is_smartphone() || qt_wince_is_pocket_pc());
-}
-#endif
+#if defined(Q_OS_WIN)
+# define random rand
+# define srandom srand
#endif
/*!
@@ -305,10 +276,6 @@ void tst_QItemView::nonDestructiveBasicTest_data()
*/
void tst_QItemView::nonDestructiveBasicTest()
{
-#ifdef Q_OS_WINCE
- QTest::qWait(400);
-#endif
-
QFETCH(QString, viewType);
QFETCH(int, vscroll);
QFETCH(int, hscroll);
@@ -476,11 +443,7 @@ void tst_QItemView::spider()
view->setModel(treeModel);
view->show();
QVERIFY(QTest::qWaitForWindowActive(view));
-#if defined(Q_OS_WINCE)
- srandom(0);
-#else
srandom(time(0));
-#endif
touch(view->viewport(), Qt::NoModifier, Qt::Key_Left);
touch(view->viewport(), Qt::ShiftModifier, Qt::Key_Enter);
touch(view->viewport(), Qt::ControlModifier, Qt::Key_Backspace);
diff --git a/tests/auto/widgets/itemviews/qlistview/qlistview.pro b/tests/auto/widgets/itemviews/qlistview/qlistview.pro
index 509303b62e..44e25ded66 100644
--- a/tests/auto/widgets/itemviews/qlistview/qlistview.pro
+++ b/tests/auto/widgets/itemviews/qlistview/qlistview.pro
@@ -2,5 +2,5 @@ CONFIG += testcase
TARGET = tst_qlistview
QT += widgets gui-private widgets-private core-private testlib
SOURCES += tst_qlistview.cpp
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
linux*: CONFIG += insignificant_test # Crashes
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 651172e79f..8cefad37fc 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -45,13 +45,13 @@
#include <QtWidgets/QStyledItemDelegate>
#include <QtWidgets/QStyleFactory>
-#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
# include <windows.h>
# include <QtGui/QGuiApplication>
#include <qpa/qplatformnativeinterface.h>
#endif // Q_OS_WIN
-#if defined(Q_OS_WIN) || defined(Q_OS_WINCE)
+#if defined(Q_OS_WIN)
static inline HWND getHWNDForWidget(const QWidget *widget)
{
QWindow *window = widget->windowHandle();
@@ -83,7 +83,6 @@ class tst_QListView : public QObject
Q_OBJECT
private slots:
- void initTestCase();
void cleanup();
void getSetCheck();
void noDelegate();
@@ -111,7 +110,7 @@ private slots:
void scrollBarAsNeeded();
void moveItems();
void wordWrap();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && WINVER >= 0x0500
+#if defined(Q_OS_WIN) && WINVER >= 0x0500
void setCurrentIndexAfterAppendRowCrash();
#endif
void emptyItemSize();
@@ -292,13 +291,6 @@ public:
}
};
-void tst_QListView::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QListView::cleanup()
{
QVERIFY(QApplication::topLevelWidgets().isEmpty());
@@ -983,25 +975,6 @@ void tst_QListView::selection_data()
<< QRect(300, 0, 1, 300) // selection rectangle
<< IntList(); // expected items
-#if defined(Q_OS_WINCE)
- // depending on whether the display is double-pixeld, we need
- // to click at a different position
- bool doubledSize = false;
- int dpi = GetDeviceCaps(GetDC(0), LOGPIXELSX);
- if ((dpi < 1000) && (dpi > 0)) {
- doubledSize = true;
- }
- QTest::newRow("select inside contents, (on viewport)")
- << 35 // itemCount
- << int(QListView::ListMode)
- << int(QListView::TopToBottom)
- << true // wrapping
- << 0 // spacing
- << QSize() // gridSize
- << IntList() // hiddenRows
- << QRect(doubledSize?350:175,doubledSize?550:275, 1, 1)// selection rectangle
- << IntList(); // expected items
-#else
QTest::newRow("select inside contents, (on viewport)")
<< 35 // itemCount
<< int(QListView::ListMode)
@@ -1012,7 +985,6 @@ void tst_QListView::selection_data()
<< IntList() // hiddenRows
<< QRect(175, 275, 1, 1) // selection rectangle
<< IntList(); // expected items
-#endif
QTest::newRow("select a tall rect in LeftToRight flow, wrap items")
<< 70 // itemCount
@@ -1137,17 +1109,7 @@ void tst_QListView::selection()
v.setRowHidden(hiddenRows.at(j), true);
}
-#if defined(Q_OS_WINCE)
- // If the device is double-pixeled then the scrollbars become
- // 10 pixels wider than normal (Windows Style: 16, Windows Mobile Style: 26).
- // So we have to make the window slightly bigger to have the same count of
- // items in each row of the list view like in the other styles.
- static const int dpi = ::GetDeviceCaps(GetDC(0), LOGPIXELSX);
- if ((dpi < 1000) && (dpi > 0))
- v.resize(535,535);
-#else
v.resize(525,525);
-#endif
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
@@ -1449,7 +1411,7 @@ void tst_QListView::wordWrap()
QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true);
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
class SetCurrentIndexAfterAppendRowCrashDialog : public QDialog
{
Q_OBJECT
@@ -1490,7 +1452,7 @@ private:
};
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) && WINVER >= 0x0500
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && WINVER >= 0x0500
// This test only makes sense on windows 2000 and higher.
void tst_QListView::setCurrentIndexAfterAppendRowCrash()
{
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index f935d6eecf..445e5e7ac7 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -61,8 +61,6 @@ class tst_QTableView : public QObject
Q_OBJECT
private slots:
- void initTestCase();
-
void getSetCheck();
void noDelegate();
@@ -519,13 +517,6 @@ public:
QSize hint;
};
-void tst_QTableView::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QTableView::noDelegate()
{
QtTestTableModel model(3, 3);
@@ -3995,10 +3986,6 @@ void tst_QTableView::mouseWheel_data()
void tst_QTableView::mouseWheel()
{
-#ifdef Q_OS_WINCE
- QSKIP("Since different Windows CE versions sport different taskbars, we skip this test");
-#endif
-
QFETCH(int, scrollMode);
QFETCH(int, delta);
QFETCH(int, horizontalPositon);
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
index 938c8a47ac..81ce1deca4 100644
--- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
@@ -118,8 +118,6 @@ public slots:
void selectionOrderTest();
private slots:
- void initTestCase();
-
void getSetCheck();
// one test per QTreeView property
@@ -390,13 +388,6 @@ public:
mutable QMap<QModelIndex,QModelIndex> parentHash;
};
-void tst_QTreeView::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
// Testing get/set functions
void tst_QTreeView::getSetCheck()
{
diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro
index 908aa846c0..92409e4bfe 100644
--- a/tests/auto/widgets/kernel/qapplication/test/test.pro
+++ b/tests/auto/widgets/kernel/qapplication/test/test.pro
@@ -11,7 +11,7 @@ TESTDATA = ../test/test.pro ../tmp/README
!winrt {
SUBPROGRAMS = desktopsettingsaware modal
- win32:!wince: SUBPROGRAMS += wincmdline
+ win32:SUBPROGRAMS += wincmdline
for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"
}
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index b7e8cded7a..f942f78b1d 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -52,15 +52,9 @@
#include <QtWidgets/private/qapplication_p.h>
#include <QtWidgets/QStyle>
-#ifdef Q_OS_WINCE
-#include <windows.h>
-#endif
-
#include <qpa/qwindowsysteminterface.h>
#include <private/qhighdpiscaling_p.h>
-#include "../../../qtest-config.h"
-
QT_BEGIN_NAMESPACE
static QWindowSystemInterface::TouchPoint touchPoint(const QTouchEvent::TouchPoint& pt)
{
@@ -235,10 +229,6 @@ static char *argv0;
tst_QApplication::tst_QApplication()
: quitApplicationTriggered(false)
{
-#ifdef Q_OS_WINCE
- // Clean up environment previously to launching test
- qputenv("QT_PLUGIN_PATH", QByteArray());
-#endif
}
void tst_QApplication::cleanup()
@@ -897,19 +887,8 @@ bool isPathListIncluded(const QStringList &l, const QStringList &r)
#define QT_TST_QAPP_DEBUG
void tst_QApplication::libraryPaths()
{
-#ifndef Q_OS_WINCE
const QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
QVERIFY(!testDir.isEmpty());
-#else // !Q_OS_WINCE
- // On Windows CE we need QApplication object to have valid
- // current Path. Therefore we need to identify it ourselves
- // here for the test.
- QFileInfo filePath;
- wchar_t module_name[MAX_PATH];
- GetModuleFileName(0, module_name, MAX_PATH);
- filePath = QString::fromWCharArray(module_name);
- const QString testDir = filePath.path() + "/test";
-#endif // Q_OS_WINCE
{
QApplication::setLibraryPaths(QStringList() << testDir);
QCOMPARE(QApplication::libraryPaths(), (QStringList() << testDir));
@@ -1000,11 +979,7 @@ void tst_QApplication::libraryPaths()
QString appDirPath = app.applicationDirPath();
app.addLibraryPath(appDirPath);
-#ifdef Q_OS_WINCE
- app.addLibraryPath(appDirPath + "/../..");
-#else
app.addLibraryPath(appDirPath + "/..");
-#endif
#ifdef QT_TST_QAPP_DEBUG
qDebug() << "appDirPath" << appDirPath;
qDebug() << "After adding appDirPath && appDirPath + /..:" << app.libraryPaths();
@@ -1044,15 +1019,9 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2()
QByteArray nonExistentPath = "/nonexistent";
QByteArray pluginPath = validPath + ':' + nonExistentPath;
#elif defined(Q_OS_WIN)
-# ifdef Q_OS_WINCE
- QByteArray validPath = "/Temp";
- QByteArray nonExistentPath = "/nonexistent";
- QByteArray pluginPath = validPath + ';' + nonExistentPath;
-# else
QByteArray validPath = "C:\\windows";
QByteArray nonExistentPath = "Z:\\nonexistent";
QByteArray pluginPath = validPath + ';' + nonExistentPath;
-# endif
#endif
{
@@ -1069,9 +1038,7 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2()
<< QLibraryInfo::location(QLibraryInfo::PluginsPath)
<< QDir(app.applicationDirPath()).canonicalPath()
<< QDir(QDir::fromNativeSeparators(QString::fromLatin1(validPath))).canonicalPath();
-# ifdef Q_OS_WINCE
- expected = QSet<QString>::fromList(expected).toList();
-# endif
+
QVERIFY2(isPathListIncluded(app.libraryPaths(), expected),
qPrintable("actual:\n - " + app.libraryPaths().join("\n - ") +
"\nexpected:\n - " + expected.join("\n - ")));
@@ -1091,9 +1058,6 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2()
QStringList()
<< QLibraryInfo::location(QLibraryInfo::PluginsPath)
<< app.applicationDirPath();
-# ifdef Q_OS_WINCE
- expected = QSet<QString>::fromList(expected).toList();
-# endif
QVERIFY(isPathListIncluded(app.libraryPaths(), expected));
qputenv("QT_PLUGIN_PATH", QByteArray());
@@ -1479,10 +1443,6 @@ void tst_QApplication::desktopSettingsAware()
}
QVERIFY2(!path.isEmpty(), "Cannot locate desktopsettingsaware helper application");
path += "desktopsettingsaware";
-#ifdef Q_OS_WINCE
- int argc = 0;
- QApplication tmpApp(argc, 0);
-#endif
QProcess testProcess;
testProcess.start(path);
QVERIFY2(testProcess.waitForStarted(),
@@ -2331,7 +2291,7 @@ Q_GLOBAL_STATIC(QPixmap, tst_qapp_pixmap);
Q_GLOBAL_STATIC(QFont, tst_qapp_font);
Q_GLOBAL_STATIC(QRegion, tst_qapp_region);
Q_GLOBAL_STATIC(QFontDatabase, tst_qapp_fontDatabase);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
Q_GLOBAL_STATIC(QCursor, tst_qapp_cursor);
#endif
@@ -2356,7 +2316,7 @@ void tst_QApplication::globalStaticObjectDestruction()
QVERIFY(tst_qapp_font());
QVERIFY(tst_qapp_region());
QVERIFY(tst_qapp_fontDatabase());
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QVERIFY(tst_qapp_cursor());
#endif
}
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index a19f4aea56..b7ca5d21c7 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -84,6 +84,12 @@ private slots:
void insertRow_QString_QLayout();
void insertRow_QWidget();
void insertRow_QLayout();
+ void removeRow();
+ void removeRow_QWidget();
+ void removeRow_QLayout();
+ void takeRow();
+ void takeRow_QWidget();
+ void takeRow_QLayout();
void setWidget();
void setLayout();
@@ -687,6 +693,237 @@ void tst_QFormLayout::insertRow_QLayout()
// ### come back to this later
}
+void tst_QFormLayout::removeRow()
+{
+ QWidget topLevel;
+ QFormLayout *layout = new QFormLayout(&topLevel);
+
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QPointer<QWidget> w1 = new QWidget;
+ QPointer<QWidget> w2 = new QWidget;
+
+ layout->addRow("test1", w1);
+ layout->addRow(w2);
+
+ QCOMPARE(layout->count(), 3);
+ QCOMPARE(layout->rowCount(), 2);
+
+ layout->removeRow(1);
+
+ QVERIFY(!w1);
+ QCOMPARE(layout->count(), 1);
+ QCOMPARE(layout->rowCount(), 1);
+
+ layout->removeRow(0);
+
+ QVERIFY(!w2);
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+}
+
+void tst_QFormLayout::removeRow_QWidget()
+{
+ QWidget topLevel;
+ QFormLayout *layout = new QFormLayout(&topLevel);
+
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QPointer<QWidget> w1 = new QWidget;
+ QPointer<QWidget> w2 = new QWidget;
+
+ layout->addRow("test1", w1);
+ layout->addRow(w2);
+
+ QCOMPARE(layout->count(), 3);
+ QCOMPARE(layout->rowCount(), 2);
+
+ layout->removeRow(w1);
+
+ QVERIFY(!w1);
+ QCOMPARE(layout->count(), 1);
+ QCOMPARE(layout->rowCount(), 1);
+
+ layout->removeRow(w2);
+
+ QVERIFY(!w2);
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QWidget *w3 = new QWidget;
+ layout->removeRow(w3);
+ delete w3;
+}
+
+void tst_QFormLayout::removeRow_QLayout()
+{
+ QWidget topLevel;
+ QFormLayout *layout = new QFormLayout(&topLevel);
+
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QPointer<QHBoxLayout> l1 = new QHBoxLayout;
+ QPointer<QWidget> w1 = new QWidget;
+ l1->addWidget(w1);
+ QPointer<QHBoxLayout> l2 = new QHBoxLayout;
+ QPointer<QWidget> w2 = new QWidget;
+ l2->addWidget(w2);
+
+ layout->addRow("test1", l1);
+ layout->addRow(l2);
+
+ QCOMPARE(layout->count(), 3);
+ QCOMPARE(layout->rowCount(), 2);
+
+ layout->removeRow(l1);
+
+ QVERIFY(!l1);
+ QVERIFY(!w1);
+ QCOMPARE(layout->count(), 1);
+ QCOMPARE(layout->rowCount(), 1);
+
+ layout->removeRow(l2);
+
+ QVERIFY(!l2);
+ QVERIFY(!w2);
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QHBoxLayout *l3 = new QHBoxLayout;
+ layout->removeRow(l3);
+ delete l3;
+}
+
+void tst_QFormLayout::takeRow()
+{
+ QWidget topLevel;
+ QFormLayout *layout = new QFormLayout(&topLevel);
+
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QPointer<QWidget> w1 = new QWidget;
+ QPointer<QWidget> w2 = new QWidget;
+
+ layout->addRow("test1", w1);
+ layout->addRow(w2);
+
+ QCOMPARE(layout->count(), 3);
+ QCOMPARE(layout->rowCount(), 2);
+
+ QFormLayout::TakeRowResult result = layout->takeRow(1);
+
+ QVERIFY(w2);
+ QVERIFY(result.fieldItem);
+ QVERIFY(result.labelItem);
+ QCOMPARE(layout->count(), 1);
+ QCOMPARE(layout->rowCount(), 1);
+
+ result = layout->takeRow(0);
+
+ QVERIFY(w1);
+ QVERIFY(result.fieldItem);
+ QVERIFY(!result.labelItem);
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ result = layout->takeRow(0);
+
+ QVERIFY(!result.fieldItem);
+ QVERIFY(!result.labelItem);
+}
+
+void tst_QFormLayout::takeRow_QWidget()
+{
+ QWidget topLevel;
+ QFormLayout *layout = new QFormLayout(&topLevel);
+
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QPointer<QWidget> w1 = new QWidget;
+ QPointer<QWidget> w2 = new QWidget;
+
+ layout->addRow("test1", w1);
+ layout->addRow(w2);
+
+ QCOMPARE(layout->count(), 3);
+ QCOMPARE(layout->rowCount(), 2);
+
+ QFormLayout::TakeRowResult result = layout->takeRow(w1);
+
+ QVERIFY(w1);
+ QVERIFY(result.fieldItem);
+ QVERIFY(result.labelItem);
+ QCOMPARE(layout->count(), 1);
+ QCOMPARE(layout->rowCount(), 1);
+
+ result = layout->takeRow(w2);
+
+ QVERIFY(w2);
+ QVERIFY(result.fieldItem);
+ QVERIFY(!result.labelItem);
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QWidget *w3 = new QWidget;
+ result = layout->takeRow(w3);
+ delete w3;
+
+ QVERIFY(!result.fieldItem);
+ QVERIFY(!result.labelItem);
+}
+
+void tst_QFormLayout::takeRow_QLayout()
+{
+ QWidget topLevel;
+ QFormLayout *layout = new QFormLayout(&topLevel);
+
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QPointer<QHBoxLayout> l1 = new QHBoxLayout;
+ QPointer<QWidget> w1 = new QWidget;
+ l1->addWidget(w1);
+ QPointer<QHBoxLayout> l2 = new QHBoxLayout;
+ QPointer<QWidget> w2 = new QWidget;
+ l2->addWidget(w2);
+
+ layout->addRow("test1", l1);
+ layout->addRow(l2);
+
+ QCOMPARE(layout->count(), 3);
+ QCOMPARE(layout->rowCount(), 2);
+
+ QFormLayout::TakeRowResult result = layout->takeRow(l1);
+
+ QVERIFY(l1);
+ QVERIFY(w1);
+ QVERIFY(result.fieldItem);
+ QVERIFY(result.labelItem);
+ QCOMPARE(layout->count(), 1);
+ QCOMPARE(layout->rowCount(), 1);
+
+ result = layout->takeRow(l2);
+
+ QVERIFY(l2);
+ QVERIFY(w2);
+ QVERIFY(result.fieldItem);
+ QVERIFY(!result.labelItem);
+ QCOMPARE(layout->count(), 0);
+ QCOMPARE(layout->rowCount(), 0);
+
+ QHBoxLayout *l3 = new QHBoxLayout;
+ result = layout->takeRow(l3);
+ delete l3;
+
+ QVERIFY(!result.fieldItem);
+ QVERIFY(!result.labelItem);
+}
+
void tst_QFormLayout::setWidget()
{
QFormLayout layout;
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index 07dcfca28f..3c4c1a1d41 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -56,7 +56,6 @@ class tst_QGridLayout : public QObject
Q_OBJECT
private slots:
- void initTestCase();
void cleanup();
void getItemPosition();
void itemAtPosition();
@@ -81,17 +80,11 @@ private slots:
void taskQTBUG_27420_takeAtShouldUnparentLayout();
void taskQTBUG_40609_addingWidgetToItsOwnLayout();
void taskQTBUG_40609_addingLayoutToItself();
+ void taskQTBUG_52357_spacingWhenItemIsHidden();
void replaceWidget();
void dontCrashWhenExtendsToEnd();
};
-void tst_QGridLayout::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
static inline int visibleTopLevelWidgetCount()
{
int result= 0;
@@ -603,19 +596,6 @@ void tst_QGridLayout::spacingsAndMargins_data()
<< QPoint( 20, child_offset_y)
<< QPoint( 20, child_offset_y + 100 + 6)
);
-#if defined (Q_OS_WINCE) //There is not enough screenspace to run the test in original size on Windows CE. We use smaller widgets.
- child_offset_y = 11 + 9 + 50 + 6 + 50 + 6 + 50 + 6;
- QTest::newRow("1x3 grid") << 1 << 3 << QSize(50, 50)
- << (PointList() // toplevel
- << QPoint( 11, 11)
- << QPoint( 11, 11 + 50 + 6)
- << QPoint( 11, 11 + 50 + 6 + 50 + 6)
- // children
- << QPoint( 20, child_offset_y)
- << QPoint( 20, child_offset_y + 50 + 6)
- << QPoint( 20, child_offset_y + 50 + 6 + 50 + 6)
- );
-#else
child_offset_y = 11 + 9 + 100 + 6 + 100 + 6 + 100 + 6;
QTest::newRow("1x3 grid") << 1 << 3 << QSize(100, 100)
<< (PointList() // toplevel
@@ -627,7 +607,6 @@ void tst_QGridLayout::spacingsAndMargins_data()
<< QPoint( 20, child_offset_y + 100 + 6)
<< QPoint( 20, child_offset_y + 100 + 6 + 100 + 6)
);
-#endif
child_offset_y = 11 + 9 + 100 + 6 + 100 + 6;
QTest::newRow("2x2 grid") << 2 << 2 << QSize(100, 100)
@@ -1672,6 +1651,26 @@ void tst_QGridLayout::taskQTBUG_40609_addingLayoutToItself(){
QCOMPARE(layout.count(), 0);
}
+void tst_QGridLayout::taskQTBUG_52357_spacingWhenItemIsHidden()
+{
+ QWidget widget;
+ setFrameless(&widget);
+ QGridLayout layout(&widget);
+ layout.setMargin(0);
+ layout.setSpacing(5);
+ QPushButton button1;
+ layout.addWidget(&button1, 0, 0);
+ QPushButton button2;
+ layout.addWidget(&button2, 0, 1);
+ QPushButton button3;
+ layout.addWidget(&button3, 0, 2);
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ int tempWidth = button1.width() + button2.width() + button3.width() + 2 * layout.spacing();
+ button2.hide();
+ QTRY_COMPARE_WITH_TIMEOUT(tempWidth, button1.width() + button3.width() + layout.spacing(), 1000);
+}
+
void tst_QGridLayout::replaceWidget()
{
QWidget wdg;
diff --git a/tests/auto/widgets/kernel/qlayout/qlayout.pro b/tests/auto/widgets/kernel/qlayout/qlayout.pro
index 2213767950..d460785158 100644
--- a/tests/auto/widgets/kernel/qlayout/qlayout.pro
+++ b/tests/auto/widgets/kernel/qlayout/qlayout.pro
@@ -4,13 +4,7 @@ TARGET = tst_qlayout
QT += widgets widgets-private testlib
SOURCES += tst_qlayout.cpp
-wince* {
- addFiles.files = baseline
- addFiles.path = .
- DEPLOYMENT += addFiles
-} else {
- TESTDATA += baseline/*
-}
+TESTDATA += baseline/*
android {
RESOURCES += \
diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro
index a3fd622896..ba4e51a416 100644
--- a/tests/auto/widgets/kernel/qwidget/qwidget.pro
+++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro
@@ -20,4 +20,4 @@ x11 {
LIBS += $$QMAKE_LIBS_X11
}
-win32:!wince:!winrt: LIBS += -luser32 -lgdi32
+win32:!winrt: LIBS += -luser32 -lgdi32
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index f2eaf6174e..701dbd9f1f 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -67,15 +67,13 @@
#include <QtGui/qwindow.h>
#include <qtimer.h>
-#include "../../../qtest-config.h"
-
#if defined(Q_OS_OSX)
#include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile.
#endif
#include <QtTest/QTest>
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) && !Q_OS_WINRT
# include <QtCore/qt_windows.h>
# include <QtGui/private/qguiapplication_p.h>
#include <qpa/qplatformnativeinterface.h>
@@ -91,49 +89,12 @@ static HWND winHandleOf(const QWidget *w)
return 0;
}
-# ifdef Q_OS_WINCE
-# define Q_CHECK_PAINTEVENTS
-# ifdef Q_OS_WINCE_WM
-# include <qguifunctions_wince.h>
-// taken from qguifunctions_wce.cpp
-# define SPI_GETPLATFORMTYPE 257
-static bool qt_wince_is_platform(const QString &platformString) {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
- return true;
- return false;
-}
-static inline bool qt_wince_is_smartphone() { return qt_wince_is_platform(QString::fromLatin1("Smartphone")); }
-# endif // Q_OS_WINCE_WM
-# elif !defined(Q_OS_WINRT) // Q_OS_WINCE
-# define Q_CHECK_PAINTEVENTS \
+# define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
QSKIP("desktop is not visible, this test would fail");
-# else // !Q_OS_WINCE && !Q_OS_WINRT
-# define Q_CHECK_PAINTEVENTS
-# endif // Q_OS_WINRT
-#else // Q_OS_WIN
+
+#else // Q_OS_WIN && !Q_OS_WINRT
# define Q_CHECK_PAINTEVENTS
-#endif // else Q_OS_WIN
-
-
-#if defined(Q_OS_WINCE_WM)
-#include <qguifunctions_wince.h>
-// taken from qguifunctions_wce.cpp
-#define SPI_GETPLATFORMTYPE 257
-bool qt_wince_is_platform(const QString &platformString) {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
- return true;
- return false;
-}
-bool qt_wince_is_smartphone() {
- return qt_wince_is_platform(QString::fromLatin1("Smartphone"));
-}
#endif
#ifdef Q_OS_OSX
@@ -163,7 +124,7 @@ static inline void centerOnScreen(QWidget *w)
w->move(QGuiApplication::primaryScreen()->availableGeometry().center() - offset);
}
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
static inline void setWindowsAnimationsEnabled(bool enabled)
{
ANIMATIONINFO animation = { sizeof(ANIMATIONINFO), enabled };
@@ -176,10 +137,10 @@ static inline bool windowsAnimationsEnabled()
SystemParametersInfo(SPI_GETANIMATION, 0, &animation, 0);
return animation.iMinAnimate;
}
-#else // Q_OS_WIN && !Q_OS_WINCE && !Q_OS_WINRT
+#else // Q_OS_WIN && !Q_OS_WINRT
inline void setWindowsAnimationsEnabled(bool) {}
static inline bool windowsAnimationsEnabled() { return false; }
-#endif // !Q_OS_WIN || Q_OS_WINCE || Q_OS_WINRT
+#endif // !Q_OS_WIN || Q_OS_WINRT
template <class T>
static QByteArray msgComparisonFailed(T v1, const char *op, T v2)
@@ -251,9 +212,7 @@ private slots:
void hideWhenFocusWidgetIsChild();
void normalGeometry();
void setGeometry();
-#ifndef Q_OS_WINCE
void windowOpacity();
-#endif
void raise();
void lower();
void stackUnder();
@@ -315,7 +274,7 @@ private slots:
void subtractOpaqueSiblings();
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
void setGeometry_win();
#endif
@@ -323,7 +282,7 @@ private slots:
void deleteStyle();
void multipleToplevelFocusCheck();
void setFocus();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void setCursor();
#endif
void setToolTip();
@@ -340,9 +299,7 @@ private slots:
void render_task188133();
void render_task211796();
void render_task217815();
-#ifndef Q_OS_WINCE
void render_windowOpacity();
-#endif
void render_systemClip();
void render_systemClip2_data();
void render_systemClip2();
@@ -358,9 +315,7 @@ private slots:
void repaintWhenChildDeleted();
void hideOpaqueChildWhileHidden();
-#if !defined(Q_OS_WINCE)
void updateWhileMinimized();
-#endif
void alienWidgets();
void adjustSize();
void adjustSize_data();
@@ -396,7 +351,7 @@ private slots:
void setClearAndResizeMask();
void maskedUpdate();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void syntheticEnterLeave();
void taskQTBUG_4055_sendSyntheticEnterLeave();
void underMouse();
@@ -408,9 +363,7 @@ private slots:
void toplevelLineEditFocus();
void focusWidget_task254563();
-#ifndef Q_OS_WINCE_WM
void rectOutsideCoordinatesLimit_task144779();
-#endif
void setGraphicsEffect();
#ifdef QT_BUILD_INTERNAL
@@ -614,7 +567,7 @@ void tst_QWidget::getSetCheck()
QCOMPARE(true, obj1.autoFillBackground());
var1.reset();
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
obj1.setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
const HWND handle = reinterpret_cast<HWND>(obj1.winId()); // explicitly create window handle
QVERIFY(GetWindowLong(handle, GWL_STYLE) & WS_POPUP);
@@ -659,9 +612,6 @@ private:
void tst_QWidget::initTestCase()
{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
// Size of reference widget, 200 for < 2000, scale up for larger screens
// to avoid Windows warnings about minimum size for decorated windows.
int width = 200;
@@ -1515,7 +1465,7 @@ void tst_QWidget::mapFromAndTo()
subWindow2->setGeometry(75, 75, 100, 100);
subSubWindow->setGeometry(10, 10, 10, 10);
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_QNX)
+#if !defined(Q_OS_QNX)
//update visibility
if (windowMinimized) {
if (!windowHidden) {
@@ -1828,15 +1778,8 @@ void tst_QWidget::activation()
{
Q_CHECK_PAINTEVENTS
-#if defined(Q_OS_WINCE)
- int waitTime = 1000;
-#else
int waitTime = 100;
-#endif
-#ifdef Q_OS_WINCE
- qApp->processEvents();
-#endif
QWidget widget1;
widget1.setObjectName("activation-Widget1");
widget1.setWindowTitle(widget1.objectName());
@@ -1884,10 +1827,6 @@ void tst_QWidget::windowState()
size = QGuiApplication::primaryScreen()->size();
} else {
pos = QPoint(10, 10);
-#ifdef Q_OS_WINCE_WM
- if (qt_wince_is_smartphone()) { //small screen
- size = QSize(100,100);
-#endif
}
QWidget widget1;
@@ -2415,11 +2354,7 @@ void tst_QWidget::reparent()
childTLW.show();
QVERIFY(QTest::qWaitForWindowExposed(&parent));
-#ifdef Q_OS_WINCE
- parent.move(50, 50);
-#else
parent.move(parentPosition);
-#endif
QPoint childPos = parent.mapToGlobal(child.pos());
QPoint tlwPos = childTLW.pos();
@@ -2626,8 +2561,6 @@ void tst_QWidget::setGeometry()
QCOMPARE(tlw.geometry(), tr);
}
-// Windows CE does not support windowOpacity.
-#ifndef Q_OS_WINCE
void tst_QWidget::windowOpacity()
{
QWidget widget;
@@ -2658,7 +2591,6 @@ void tst_QWidget::windowOpacity()
child.setWindowOpacity(-1.0);
QCOMPARE(child.windowOpacity(), 1.0);
}
-#endif
class UpdateWidget : public QWidget
{
@@ -2978,9 +2910,6 @@ void tst_QWidget::stackUnder()
foreach (UpdateWidget *child, allChildren) {
int expectedZOrderChangeEvents = child == child1 ? 1 : 0;
if (child == child3) {
-#ifdef Q_OS_WINCE
- qApp->processEvents();
-#endif
#ifndef Q_OS_OSX
QEXPECT_FAIL(0, "See QTBUG-493", Continue);
#endif
@@ -3365,9 +3294,6 @@ void tst_QWidget::widgetAt()
w2->setMask(rgn);
qApp->processEvents();
QTest::qWait(10);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("", "Windows CE does only support rectangular regions", Continue); //See also task 147191
-#endif
QTRY_VERIFY((wr = QApplication::widgetAt(testPos)));
QTRY_COMPARE(wr->objectName(), w1->objectName());
@@ -3383,9 +3309,6 @@ void tst_QWidget::widgetAt()
w2->setMask(bitmap);
qApp->processEvents();
QTest::qWait(10);
-#if defined(Q_OS_WINCE)
- QEXPECT_FAIL("", "Windows CE does only support rectangular regions", Continue); //See also task 147191
-#endif
QTRY_COMPARE(QApplication::widgetAt(testPos), w1.data());
QTRY_VERIFY(QApplication::widgetAt(testPos + QPoint(1, 1)) == w2.data());
}
@@ -3721,7 +3644,7 @@ void tst_QWidget::optimizedResize_topLevel()
topLevel.partial = false;
topLevel.paintedRegion = QRegion();
-#if !defined(Q_OS_WIN32) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_WIN32)
topLevel.resize(topLevel.size() + QSize(10, 10));
#else
// Static contents does not work when programmatically resizing
@@ -3792,7 +3715,6 @@ void tst_QWidget::setMinimumSize()
// Setting a minimum size larger than the desktop does not work on WinCE,
// so skip this part of the test.
-#ifndef Q_OS_WINCE
QSize nonDefaultSize = defaultSize + QSize(5,5);
w.setMinimumSize(nonDefaultSize);
w.showNormal();
@@ -3801,7 +3723,6 @@ void tst_QWidget::setMinimumSize()
msgComparisonFailed(w.height(), ">=", nonDefaultSize.height()));
QVERIFY2(w.width() >= nonDefaultSize.width(),
msgComparisonFailed(w.width(), ">=", nonDefaultSize.width()));
-#endif
}
void tst_QWidget::setMaximumSize()
@@ -4737,7 +4658,7 @@ void tst_QWidget::setWindowGeometry()
}
}
-#if defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
void tst_QWidget::setGeometry_win()
{
QWidget widget;
@@ -4758,7 +4679,7 @@ void tst_QWidget::setGeometry_win()
QVERIFY2(rt.top <= m_availableTopLeft.y(),
msgComparisonFailed(int(rt.top), "<=", m_availableTopLeft.y()));
}
-#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINRT)
// Since X11 WindowManager operation are all async, and we have no way to know if the window
// manager has finished playing with the window geometry, this test can't be reliable on X11.
@@ -5083,12 +5004,8 @@ void tst_QWidget::moveChild()
parent.setStyle(QStyleFactory::create(QLatin1String("Windows")));
ColorWidget child(&parent, Qt::Widget, Qt::blue);
-#ifndef Q_OS_WINCE
parent.setGeometry(QRect(QPoint(QApplication::desktop()->availableGeometry(&parent).topLeft()) + QPoint(50, 50),
QSize(200, 200)));
-#else
- parent.setGeometry(60, 60, 150, 150);
-#endif
child.setGeometry(25, 25, 50, 50);
#ifndef QT_NO_CURSOR // Try to make sure the cursor is not in a taskbar area to prevent tooltips or window highlighting
QCursor::setPos(parent.geometry().topRight() + QPoint(50 , 50));
@@ -5526,7 +5443,7 @@ private:
int m_count;
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QWidget::setCursor()
{
{
@@ -5669,8 +5586,6 @@ void tst_QWidget::setToolTip()
QCOMPARE(widget.toolTip(), QString());
QCOMPARE(spy.count(), 2);
- // Mouse over doesn't work on Windows mobile, so skip the rest of the test for that platform.
-#ifndef Q_OS_WINCE_WM
for (int pass = 0; pass < 2; ++pass) {
QCursor::setPos(m_safeCursorPos);
QScopedPointer<QWidget> popup(new QWidget(0, Qt::Popup));
@@ -5698,7 +5613,6 @@ void tst_QWidget::setToolTip()
QTest::qWait(2200); // delay is 2000
QTest::mouseMove(popupWindow);
}
-#endif
}
void tst_QWidget::testWindowIconChangeEventPropagation()
@@ -6777,7 +6691,6 @@ void tst_QWidget::render_task217815()
}
// Window Opacity is not supported on Windows CE.
-#ifndef Q_OS_WINCE
void tst_QWidget::render_windowOpacity()
{
const qreal opacity = 0.5;
@@ -6850,7 +6763,6 @@ void tst_QWidget::render_windowOpacity()
QCOMPARE(result, expected);
}
}
-#endif
void tst_QWidget::render_systemClip()
{
@@ -7308,14 +7220,10 @@ void tst_QWidget::repaintWhenChildDeleted()
}
#endif
ColorWidget w(0, Qt::FramelessWindowHint, Qt::red);
-#if !defined(Q_OS_WINCE)
QPoint startPoint = QApplication::desktop()->availableGeometry(&w).topLeft();
startPoint.rx() += 50;
startPoint.ry() += 50;
w.setGeometry(QRect(startPoint, QSize(100, 100)));
-#else
- w.setGeometry(60, 60, 110, 110);
-#endif
w.show();
QVERIFY(QTest::qWaitForWindowExposed(&w));
QTest::qWait(10);
@@ -7339,14 +7247,10 @@ void tst_QWidget::repaintWhenChildDeleted()
void tst_QWidget::hideOpaqueChildWhileHidden()
{
ColorWidget w(0, Qt::FramelessWindowHint, Qt::red);
-#if !defined(Q_OS_WINCE)
QPoint startPoint = QApplication::desktop()->availableGeometry(&w).topLeft();
startPoint.rx() += 50;
startPoint.ry() += 50;
w.setGeometry(QRect(startPoint, QSize(100, 100)));
-#else
- w.setGeometry(60, 60, 110, 110);
-#endif
ColorWidget child(&w, Qt::Widget, Qt::blue);
child.setGeometry(10, 10, 80, 80);
@@ -7375,7 +7279,6 @@ void tst_QWidget::hideOpaqueChildWhileHidden()
}
// This test doesn't make sense without support for showMinimized().
-#if !defined(Q_OS_WINCE)
void tst_QWidget::updateWhileMinimized()
{
if (m_platform == QStringLiteral("wayland"))
@@ -7413,7 +7316,6 @@ void tst_QWidget::updateWhileMinimized()
QTRY_COMPARE(widget.numPaintEvents, 1);
QCOMPARE(widget.paintedRegion, QRegion(0, 0, 50, 50));
}
-#endif
class PaintOnScreenWidget: public QWidget
{
@@ -7780,13 +7682,6 @@ void tst_QWidget::adjustSize()
QVERIFY2(child->size().height() < sizeHint.height(),
msgComparisonFailed(child->size().height(), "<", sizeHint.height()));
} else {
-#if defined (Q_OS_WINCE)
- if (!haveParent) {
- const QRect& desktopRect = qApp->desktop()->availableGeometry();
- expectedSize.setWidth(qMin(expectedSize.width(), desktopRect.width()));
- expectedSize.setHeight(qMin(expectedSize.height(), desktopRect.height()));
- }
-#endif
QCOMPARE(child->size(), expectedSize);
}
if (!haveParent)
@@ -8871,7 +8766,7 @@ void tst_QWidget::maskedUpdate()
QTRY_COMPARE(grandChild.paintedRegion, QRegion(grandChild.rect())); // Full update.
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QWidget::syntheticEnterLeave()
{
if (m_platform == QStringLiteral("wayland"))
@@ -8977,7 +8872,7 @@ void tst_QWidget::syntheticEnterLeave()
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
{
if (m_platform == QStringLiteral("wayland"))
@@ -9192,10 +9087,9 @@ QWidgetBackingStore* backingStore(QWidget &widget)
}
// Tables of 5000 elements do not make sense on Windows Mobile.
-#ifndef Q_OS_WINCE_WM
void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
{
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::BlankCursor); //keep the cursor out of screen grabs
#endif
QWidget main(0,Qt::FramelessWindowHint); //don't get confused by the size of the window frame
@@ -9230,11 +9124,10 @@ void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
QTRY_COMPARE(mainPixmap.toImage().convertToFormat(QImage::Format_RGB32),
correct.toImage().convertToFormat(QImage::Format_RGB32));
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif
}
-#endif
void tst_QWidget::setGraphicsEffect()
{
@@ -10178,7 +10071,7 @@ void tst_QWidget::destroyedSignal()
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QWidget::underMouse()
{
// Move the mouse cursor to a safe location
@@ -10462,7 +10355,7 @@ void tst_QWidget::taskQTBUG_27643_enterEvents()
// Must only register only single enter on modal dialog's button after all said and done
QCOMPARE(dialog.enters, 1);
}
-#endif // QTEST_NO_CURSOR
+#endif // QT_NO_CURSOR
class KeyboardWidget : public QWidget
{
diff --git a/tests/auto/widgets/styles/qstyle/qstyle.pro b/tests/auto/widgets/styles/qstyle/qstyle.pro
index 50445b9a45..a1e5a70a08 100644
--- a/tests/auto/widgets/styles/qstyle/qstyle.pro
+++ b/tests/auto/widgets/styles/qstyle/qstyle.pro
@@ -3,12 +3,6 @@ TARGET = tst_qstyle
QT += widgets testlib
SOURCES += tst_qstyle.cpp
-wince* {
- addPixmap.files = task_25863.png
- addPixmap.path = .
- DEPLOYMENT += addPixmap
-}
-
android {
RESOURCES += \
testdata.qrc
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index d4f398a61c..bafebc0dc6 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -56,20 +56,6 @@
#include <qlineedit.h>
#include <qmdiarea.h>
#include <qscrollarea.h>
-
-#ifdef Q_OS_WINCE_WM
-#include <windows.h>
-
-static bool qt_wince_is_smartphone() {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (QString::fromLatin1("Smartphone").utf16()), tszPlatform))
- return true;
- return false;
-}
-#endif
-
#include <qwidget.h>
// Make a widget frameless to prevent size constraints of title bars
@@ -90,7 +76,7 @@ public:
private:
bool testAllFunctions(QStyle *);
- bool testScrollBarSubControls(QStyle *);
+ bool testScrollBarSubControls();
void testPainting(QStyle *style, const QString &platform);
private slots:
void drawItemPixmap();
@@ -109,12 +95,6 @@ private slots:
#ifdef Q_OS_MAC
void testMacStyle();
#endif
-#ifdef Q_OS_WINCE
- void testWindowsCEStyle();
-#endif
-#ifdef Q_OS_WINCE_WM
- void testWindowsMobileStyle();
-#endif
void testStyleFactory();
void testProxyStyle();
void pixelMetric();
@@ -315,19 +295,11 @@ bool tst_QStyle::testAllFunctions(QStyle *style)
style->itemPixmapRect(QRect(0, 0, 100, 100), Qt::AlignHCenter, QPixmap(200, 200));
style->itemTextRect(QFontMetrics(qApp->font()), QRect(0, 0, 100, 100), Qt::AlignHCenter, true, QString("Test"));
- return testScrollBarSubControls(style);
+ return testScrollBarSubControls();
}
-bool tst_QStyle::testScrollBarSubControls(QStyle* style)
+bool tst_QStyle::testScrollBarSubControls()
{
- // WinCE SmartPhone doesn't have scrollbar subcontrols, so skip the rest of the test.
-#ifdef Q_OS_WINCE_WM
- if (style->inherits("QWindowsMobileStyle") && qt_wince_is_smartphone())
- return true;
-#else
- Q_UNUSED(style);
-#endif
-
QScrollBar scrollBar;
setFrameless(&scrollBar);
scrollBar.show();
@@ -522,26 +494,6 @@ void tst_QStyle::testMacStyle()
}
#endif
-#ifdef Q_OS_WINCE
-// WindowsCEStyle style
-void tst_QStyle::testWindowsCEStyle()
-{
- QStyle *cstyle = QStyleFactory::create("WindowsCE");
- QVERIFY(testAllFunctions(cstyle));
- delete cstyle;
-}
-#endif
-
-#ifdef Q_OS_WINCE_WM
-// WindowsMobileStyle style
-void tst_QStyle::testWindowsMobileStyle()
-{
- QStyle *cstyle = QStyleFactory::create("WindowsMobile");
- QVERIFY(testAllFunctions(cstyle));
- delete cstyle;
-}
-#endif
-
// Helper class...
MyWidget::MyWidget( QWidget* parent, const char* name )
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST b/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST
index cf78fb47c2..61966e684f 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST
+++ b/tests/auto/widgets/styles/qstylesheetstyle/BLACKLIST
@@ -1,2 +1,4 @@
[hoverColors]
ubuntu-14.04
+opensuse-13.1
+opensuse-42.1
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index a107260d23..8d84addedb 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -34,8 +34,6 @@
#include <private/qstylesheetstyle_p.h>
-#include "../../../qtest-config.h"
-
static inline void centerOnScreen(QWidget *w)
{
const QPoint offset = QPoint(w->width() / 2, w->height() / 2);
@@ -76,7 +74,7 @@ private slots:
void onWidgetDestroyed();
void fontPrecedence();
void focusColors();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void hoverColors();
#endif
void background();
@@ -887,7 +885,7 @@ void tst_QStyleSheetStyle::focusColors()
}
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QStyleSheetStyle::hoverColors()
{
#ifdef Q_OS_OSX
diff --git a/tests/auto/widgets/styles/styles.pro b/tests/auto/widgets/styles/styles.pro
index 0de9dfcdab..b679b70537 100644
--- a/tests/auto/widgets/styles/styles.pro
+++ b/tests/auto/widgets/styles/styles.pro
@@ -12,5 +12,5 @@ SUBDIRS=\
!mac:SUBDIRS -= \
qmacstyle \
-ios|android|qnx|wince: SUBDIRS -= \
+ios|android|qnx: SUBDIRS -= \
qstylesheetstyle \
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index b2824c00ee..3a3e38ba75 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -585,10 +585,7 @@ void tst_QCompleter::directoryModel_data()
if (i == 1)
QTest::newRow("FILTERING_OFF") << "FILTERING_OFF" << "" << "" << "";
-#if defined(Q_OS_WINCE)
- QTest::newRow("()") << "" << "" << "/" << "/";
- QTest::newRow("()") << "\\Program" << "" << "Program Files" << "\\Program Files";
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
QTest::newRow("()") << "C" << "" << "C:" << "C:";
QTest::newRow("()") << "C:\\Program" << "" << "Program Files" << "C:\\Program Files";
#elif defined (Q_OS_MAC)
@@ -634,10 +631,7 @@ void tst_QCompleter::fileSystemModel_data()
if (i == 1)
QTest::newRow("FILTERING_OFF") << "FILTERING_OFF" << "" << "" << "";
-#if defined(Q_OS_WINCE)
- QTest::newRow("()") << "" << "" << "/" << "/";
- QTest::newRow("()") << "\\Program" << "" << "Program Files" << "\\Program Files";
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
QTest::newRow("()") << "C" << "" << "C:" << "C:";
QTest::newRow("()") << "C:\\Program" << "" << "Program Files" << "C:\\Program Files";
#elif defined (Q_OS_MAC)
diff --git a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
index a932cf5984..616898c4c5 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -107,9 +107,6 @@ void tst_QSystemTrayIcon::getSetCheck()
void tst_QSystemTrayIcon::supportsMessages()
{
// ### fixme: Check platforms.
-#if defined(Q_OS_WINCE)
- QCOMPARE(QSystemTrayIcon::supportsMessages(), false);
-#else
const QString platform = QGuiApplication::platformName();
if (platform.compare(QStringLiteral("xcb"), Qt::CaseInsensitive)
&& platform.compare(QStringLiteral("windows"), Qt::CaseInsensitive)
@@ -117,7 +114,6 @@ void tst_QSystemTrayIcon::supportsMessages()
QEXPECT_FAIL("", "QTBUG-20978 QSystemTrayIcon is unimplemented for this platform", Abort);
}
QCOMPARE(QSystemTrayIcon::supportsMessages(), true);
-#endif
}
void tst_QSystemTrayIcon::lastWindowClosed()
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 2a356f574c..1ae33ef7a1 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -78,9 +78,6 @@ class tst_QComboBox : public QObject
public:
tst_QComboBox() {}
-public slots:
- void init();
-
private slots:
void getSetCheck();
void ensureReturnIsIgnored();
@@ -395,13 +392,6 @@ private:
};
-void tst_QComboBox::init()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QComboBox::setEditable()
{
TestWidget topLevel;
@@ -2752,7 +2742,7 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
QCOMPARE(combo.currentText(), QLatin1String("0"));
// When calling cursor function, Windows CE responds with: This function is not supported on this system.
-#if !defined Q_OS_WINCE && !defined Q_OS_QNX
+#if !defined Q_OS_QNX
// Force cursor movement to prevent QCursor::setPos() from returning prematurely on QPA:
centerCursor(combo.view());
QTest::qWait(200);
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
index 411185ae2a..c4bc1cab21 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
+++ b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_qdatetimeedit
QT += widgets testlib core-private widgets-private
SOURCES += tst_qdatetimeedit.cpp
-
-wincewm50smart-msvc2005: DEFINES += WINCE_NO_MODIFIER_KEYS
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 831d7257ba..28c2e92f78 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -84,30 +84,6 @@ Q_DECLARE_METATYPE(Qt::Key);
Q_DECLARE_METATYPE(Qt::KeyboardModifiers);
Q_DECLARE_METATYPE(Qt::KeyboardModifier);
-#if defined(Q_OS_WINCE)
-#ifndef SPI_GETPLATFORMTYPE
-#define SPI_GETPLATFORMTYPE 257
-#endif
-
-bool qt_wince_is_platform(const QString &platformString) {
- wchar_t tszPlatform[64];
- if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
- sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
- if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
- return true;
- return false;
-}
-bool qt_wince_is_pocket_pc() {
- return qt_wince_is_platform(QString::fromLatin1("PocketPC"));
-}
-bool qt_wince_is_smartphone() {
- return qt_wince_is_platform(QString::fromLatin1("Smartphone"));
-}
-bool qt_wince_is_mobile() {
- return (qt_wince_is_smartphone() || qt_wince_is_pocket_pc());
-}
-#endif
-
class EditorDateEdit : public QDateTimeEdit
{
Q_OBJECT
@@ -331,7 +307,7 @@ void tst_QDateTimeEdit::cleanupTestCase()
void tst_QDateTimeEdit::init()
{
QLocale::setDefault(QLocale(QLocale::C));
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
#endif
testWidget->setDisplayFormat("dd/MM/yyyy"); // Nice default to have
@@ -3107,7 +3083,7 @@ void tst_QDateTimeEdit::nextPrevSection_data()
// 1. mac doesn't do these,
// 2. some WinCE devices do not have modifiers
-#if !defined(Q_OS_MAC) && !defined(WINCE_NO_MODIFIER_KEYS)
+#if !defined(Q_OS_DARWIN)
QTest::newRow("ctrl-right") << Qt::Key_Right << (Qt::KeyboardModifiers)Qt::ControlModifier << QString("56");
QTest::newRow("ctrl-left") << Qt::Key_Left << (Qt::KeyboardModifiers)Qt::ControlModifier << QString("12");
#endif
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 598b518810..a4614d0a9d 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -70,8 +70,6 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#include "../../../qtest-config.h"
-
QT_BEGIN_NAMESPACE
class QPainter;
QT_END_NAMESPACE
@@ -252,7 +250,7 @@ private slots:
void noTextEditedOnClear();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void cursor();
#endif
@@ -3484,7 +3482,7 @@ void tst_QLineEdit::textMargin()
QTRY_COMPARE(testWidget.cursorPosition(), cursorPosition);
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QLineEdit::cursor()
{
QLineEdit *testWidget = ensureTestWidget();
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 5bd26c632c..9f8d4e4588 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -45,8 +45,6 @@
#include <private/qmainwindowlayout_p.h>
#include <private/qdockarealayout_p.h>
-#include "../../../qtest-config.h"
-
static uchar restoreData41[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x0, 0x8d, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x1, 0x19, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x0, 0x8d, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0xd4, 0x0, 0x0, 0x0, 0x45, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0x89, 0x0, 0x0, 0x0, 0xe, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x0, 0x63, 0x0, 0x0, 0x0, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x1, 0x2a, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0x89, 0x0, 0x0, 0x0, 0xe, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x0, 0x63, 0x0, 0x0, 0x0, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0xc8, 0x0, 0x0, 0x0, 0x5e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x1, 0x2a, 0x0, 0x0, 0x0, 0x5f, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xc1, 0x0, 0x0, 0x1, 0x19};
static uchar restoreData42[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x2, 0x2b, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0xb6, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x87, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x1, 0xcd, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x98, 0x0, 0x0, 0x2, 0x2b, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0xb6, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x87, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x1, 0xcd, 0x0, 0x0, 0x0, 0x88, 0x0, 0x0, 0x0, 0x21, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x4, 0x4e, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x12, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x1, 0x16, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x2, 0x28, 0x0, 0x0, 0x1, 0x14, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x3, 0x40, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x4, 0x4e, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x12, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x1, 0x16, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x2, 0x28, 0x0, 0x0, 0x1, 0x14, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x3, 0x40, 0x0, 0x0, 0x1, 0xe, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x3, 0x8a, 0x0, 0x0, 0x2, 0x2b, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8};
static uchar restoreData43[] = { 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0xfd, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0xa0, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x34, 0x1, 0x0, 0x0, 0x0, 0x53, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x38, 0x1, 0x0, 0x0, 0x0, 0x7c, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0xa5, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x98, 0x0, 0x0, 0x0, 0xa0, 0xfc, 0x2, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0x2a, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x35, 0x1, 0x0, 0x0, 0x0, 0x53, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x39, 0x1, 0x0, 0x0, 0x0, 0x7c, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0xa5, 0x0, 0x0, 0x0, 0x25, 0x0, 0x0, 0x0, 0x16, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x1, 0xa8, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x32, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x36, 0x1, 0x0, 0x0, 0x0, 0x6c, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x30, 0x1, 0x0, 0x0, 0x0, 0xd6, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x34, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x1, 0xa8, 0x0, 0x0, 0x0, 0x26, 0xfc, 0x1, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x33, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xc, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x37, 0x1, 0x0, 0x0, 0x0, 0x6c, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x31, 0x1, 0x0, 0x0, 0x0, 0xd6, 0x0, 0x0, 0x0, 0x68, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0xe, 0x0, 0x64, 0x0, 0x6f, 0x0, 0x63, 0x0, 0x6b, 0x0, 0x20, 0x0, 0x31, 0x0, 0x35, 0x1, 0x0, 0x0, 0x1, 0x42, 0x0, 0x0, 0x0, 0x66, 0x0, 0x0, 0x0, 0x50, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xb8, 0x0, 0x0, 0x0, 0xa0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x8, 0xfc, 0x0, 0x0, 0x0, 0x0};
@@ -131,7 +129,7 @@ private slots:
void contentsMargins_data();
void contentsMargins();
void isSeparator();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void setCursor();
#endif
void addToolbarAfterShow();
@@ -595,9 +593,6 @@ void tst_QMainWindow::menuBar()
mw.setMenuBar(mb1);
QVERIFY(mw.menuBar() != 0);
QCOMPARE(mw.menuBar(), (QMenuBar *)mb1);
-#ifdef Q_OS_WINCE_WM
- QSKIP("With native menubar integration the menubar is not a child");
-#endif
QCOMPARE(mb1->parentWidget(), (QWidget *)&mw);
mw.setMenuBar(0);
@@ -1728,7 +1723,7 @@ class MainWindow : public QMainWindow {
using QMainWindow::event;
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QMainWindow::setCursor()
{
MainWindow mw;
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index d568cf63d4..a5a94f109a 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -228,7 +228,6 @@ class tst_QMdiArea : public QObject
public:
tst_QMdiArea();
public slots:
- void initTestCase();
void cleanup();
protected slots:
@@ -293,13 +292,6 @@ tst_QMdiArea::tst_QMdiArea()
qRegisterMetaType<QMdiSubWindow *>();
}
-void tst_QMdiArea::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QMdiArea::cleanup()
{
QVERIFY(QApplication::topLevelWidgets().isEmpty());
@@ -509,9 +501,6 @@ void tst_QMdiArea::subWindowActivated2()
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "showMinimized doesn't really minimize if you don't have access to the server", Abort);
#endif
-#ifdef Q_OS_WINCE
- QSKIP("Not fixed yet. See Task 197453");
-#endif
#ifdef Q_OS_MAC
QSKIP("QTBUG-25298: This test is unstable on Mac.");
#endif
@@ -649,7 +638,7 @@ void tst_QMdiArea::changeWindowTitle()
#else
widget->setWindowState(Qt::WindowMaximized);
#endif
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
#endif
@@ -658,7 +647,7 @@ void tst_QMdiArea::changeWindowTitle()
mw->show();
QVERIFY(QTest::qWaitForWindowExposed(mw));
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
#endif
@@ -676,7 +665,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
qApp->processEvents();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QTRY_COMPARE( mw->windowTitle(), windowTitle(mwc, wc) );
widget->setWindowTitle( wc2 );
QCOMPARE( mw->windowTitle(), windowTitle(mwc, wc2) );
@@ -694,7 +683,7 @@ void tst_QMdiArea::changeWindowTitle()
#endif
qApp->processEvents();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
#ifdef USE_SHOW
@@ -703,7 +692,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowNoState);
#endif
qApp->processEvents();
-#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
+#if defined(Q_OS_DARWIN)
QCOMPARE(mw->windowTitle(), mwc);
#else
QCOMPARE( mw->windowTitle(), mwc2 );
@@ -715,7 +704,7 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
qApp->processEvents();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->windowTitle(), windowTitle(mwc2, wc2) );
#endif
@@ -764,7 +753,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( mw->isWindowModified(), false);
QCOMPARE( widget->isWindowModified(), true);
widget->setWindowState(Qt::WindowMaximized);
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -774,7 +763,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( widget->isWindowModified(), true);
widget->setWindowState(Qt::WindowMaximized);
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -784,7 +773,7 @@ void tst_QMdiArea::changeModified()
QCOMPARE( widget->isWindowModified(), false);
widget->setWindowModified(true);
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QCOMPARE( mw->isWindowModified(), true);
#endif
QCOMPARE( widget->isWindowModified(), true);
@@ -1598,9 +1587,7 @@ void tst_QMdiArea::tileSubWindows()
qApp->processEvents();
}
workspace.setActiveSubWindow(0);
-#ifndef Q_OS_WINCE //See Task 197453 ToDo
QCOMPARE(workspace.viewport()->childrenRect(), workspace.viewport()->rect());
-#endif
QMdiSubWindow *window = windows.at(0);
@@ -1724,9 +1711,6 @@ void tst_QMdiArea::tileSubWindows()
frameWidth = workspace.style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
const int spacing = 2 * frameWidth + 2;
const QSize expectedViewportSize(3 * minSize.width() + spacing, 3 * minSize.height() + spacing);
-#ifdef Q_OS_WINCE
- QSKIP("Not fixed yet! See task 197453");
-#endif
QTRY_COMPARE(workspace.viewport()->rect().size(), expectedViewportSize);
// Restore original scrollbar behavior for test below
@@ -2005,7 +1989,7 @@ void tst_QMdiArea::delayedPlacement()
void tst_QMdiArea::iconGeometryInMenuBar()
{
-#if !defined (Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QMainWindow mainWindow;
QMenuBar *menuBar = mainWindow.menuBar();
menuBar->setNativeMenuBar(false);
@@ -2063,11 +2047,7 @@ void tst_QMdiArea::resizeTimer()
mdiArea.show();
QVERIFY(QTest::qWaitForWindowActive(&mdiArea));
-#ifndef Q_OS_WINCE
int time = 250;
-#else
- int time = 1000;
-#endif
EventSpy timerEventSpy(subWindow, QEvent::Timer);
QCOMPARE(timerEventSpy.count(), 0);
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index fe5c3a14a0..086c1049ab 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -48,8 +48,6 @@
#include <QScreen>
#include <QSizeGrip>
-#include "../../../qtest-config.h"
-
QT_BEGIN_NAMESPACE
#if !defined(Q_DEAD_CODE_FROM_QT4_WIN)
extern bool qt_tab_all_widgets();
@@ -161,7 +159,7 @@ private slots:
void showShaded();
void showNormal_data();
void showNormal();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void setOpaqueResizeAndMove_data();
void setOpaqueResizeAndMove();
#endif
@@ -184,7 +182,7 @@ private slots:
void explicitlyHiddenWidget();
void resizeTimer();
void fixedMinMaxSize();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
void replaceMenuBarWhileMaximized();
void closeOnDoubleClick_data();
void closeOnDoubleClick();
@@ -361,7 +359,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
qApp->setActiveWindow(&mainWindow);
// QMainWindow's window title is empty
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
{
QCOMPARE(mainWindow.windowTitle(), QString());
QMdiSubWindow *window = workspace->addSubWindow(new QPushButton(QLatin1String("Test")));
@@ -413,7 +411,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
window->showMaximized();
qApp->processEvents();
QVERIFY(window->isMaximized());
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QVERIFY(window->maximizedButtonsWidget());
QCOMPARE(window->maximizedButtonsWidget(), mainWindow.menuBar()->cornerWidget(Qt::TopRightCorner));
QVERIFY(window->maximizedSystemMenuIconWidget());
@@ -436,13 +434,13 @@ void tst_QMdiSubWindow::mainWindowSupport()
QVERIFY(!nestedWindow->maximizedButtonsWidget());
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) && !defined(Q_OS_QNX)
+#if !defined(Q_OS_DARWIN) && !defined(Q_OS_QNX)
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
.arg(originalWindowTitle, window->widget()->windowTitle()));
#endif
}
-#if defined(Q_OS_MAC) || defined(Q_OS_WINCE)
+#if defined(Q_OS_DARWIN)
return;
#endif
@@ -576,10 +574,6 @@ void tst_QMdiSubWindow::showShaded()
window->showNormal();
QTest::qWait(250);
-#ifdef Q_OS_WINCE
- QSKIP("Until we have a QEvent::WindowFlagsChange event, this will skip");
-#endif
-
const QSize minimumSizeHint = window->minimumSizeHint();
QVERIFY(minimumSizeHint.height() < 300);
const int maxHeightDiff = 300 - minimumSizeHint.height();
@@ -670,7 +664,7 @@ private:
int _count;
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QMdiSubWindow::setOpaqueResizeAndMove_data()
{
QTest::addColumn<bool>("opaqueMode");
@@ -1011,7 +1005,7 @@ void tst_QMdiSubWindow::setSystemMenu()
systemMenu->hide();
QVERIFY(!qApp->activePopupWidget());
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
// System menu in menu bar.
subWindow->showMaximized();
QVERIFY(subWindow->isMaximized());
@@ -1044,7 +1038,7 @@ void tst_QMdiSubWindow::setSystemMenu()
systemMenu->hide();
QVERIFY(!qApp->activePopupWidget());
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
// System menu in menu bar in reverse mode.
subWindow->showMaximized();
QVERIFY(subWindow->isMaximized());
@@ -1475,7 +1469,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner));
QMdiSubWindow *subWindow = mdiArea->addSubWindow(new QTextEdit);
subWindow->showMaximized();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
#endif
@@ -1490,7 +1484,7 @@ void tst_QMdiSubWindow::hideAndShow()
// Show QMdiArea.
tabWidget->setCurrentIndex(0);
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
@@ -1512,7 +1506,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(subWindow);
QCOMPARE(mdiArea->activeSubWindow(), subWindow);
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
#if defined Q_OS_QNX
QEXPECT_FAIL("", "QTBUG-38231", Abort);
@@ -1540,7 +1534,7 @@ void tst_QMdiSubWindow::hideAndShow()
QVERIFY(!menuBar->cornerWidget(Qt::TopRightCorner));
subWindow->show();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1554,7 +1548,7 @@ void tst_QMdiSubWindow::hideAndShow()
// Show QMainWindow.
mainWindow.show();
-#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_DARWIN)
QVERIFY(subWindow->maximizedButtonsWidget());
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
@@ -1724,7 +1718,7 @@ void tst_QMdiSubWindow::fixedMinMaxSize()
QCOMPARE(subWindow->size(), minimumSize);
}
-#if !defined( Q_OS_MAC) && !defined( Q_OS_WINCE)
+#if !defined( Q_OS_DARWIN)
void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
{
@@ -1911,7 +1905,7 @@ void tst_QMdiSubWindow::mdiArea()
void tst_QMdiSubWindow::task_182852()
{
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
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 c3b432788b..654e1899f0 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -81,9 +81,7 @@ private slots:
void overrideMenuAction();
void statusTip();
void widgetActionFocus();
-#ifndef Q_OS_WINCE
void mouseActivation();
-#endif
void tearOff();
void layoutDirection();
@@ -95,9 +93,7 @@ private slots:
void task250673_activeMultiColumnSubMenuPosition();
void task256918_setFont();
void menuSizeHint();
-#ifndef Q_OS_WINCE
void task258920_mouseBorder();
-#endif
void setFixedWidth();
void deleteActionInTriggered();
void pushButtonPopulateOnAboutToShow();
@@ -292,8 +288,6 @@ void tst_QMenu::addActionsConnect()
#endif // !QT_NO_SHORTCUT
}
-// We have a separate mouseActivation test for Windows mobile
-#ifndef Q_OS_WINCE
void tst_QMenu::mouseActivation()
{
QWidget topLevel;
@@ -333,7 +327,6 @@ void tst_QMenu::mouseActivation()
QVERIFY(submenu.isVisible());
#endif
}
-#endif
void tst_QMenu::keyboardNavigation_data()
{
@@ -464,7 +457,7 @@ void tst_QMenu::overrideMenuAction()
// On Mac and Windows CE, we need to create native key events to test menu
// action activation, so skip this part of the test.
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
QAction *aQuit = new QAction("Quit", &w);
aQuit->setShortcut(QKeySequence("Ctrl+X"));
m->addAction(aQuit);
@@ -716,10 +709,8 @@ void tst_QMenu::activeSubMenuPosition()
QVERIFY(sub->pos() != QPoint(0,0));
// well, it's enough to check the pos is not (0,0) but it's more safe
// to check that submenu is to the right of the main menu too.
-#ifndef Q_OS_WINCE_WM
QVERIFY(sub->pos().x() > main->pos().x());
QCOMPARE(sub->activeAction(), subAction);
-#endif
}
// QTBUG-49588, QTBUG-48396: activeSubMenuPositionExec() is the same as
@@ -771,10 +762,8 @@ private:
void tst_QMenu::activeSubMenuPositionExec()
{
-#ifndef Q_OS_WINCE
SubMenuPositionExecMenu menu;
menu.exec(QGuiApplication::primaryScreen()->availableGeometry().center());
-#endif // !Q_OS_WINCE
}
void tst_QMenu::task242454_sizeHint()
@@ -908,7 +897,6 @@ public:
};
// Mouse move related signals for Windows Mobile unavailable
-#ifndef Q_OS_WINCE
void tst_QMenu::task258920_mouseBorder()
{
Menu258920 menu;
@@ -937,7 +925,6 @@ void tst_QMenu::task258920_mouseBorder()
QTRY_COMPARE(static_cast<QAction*>(0), menu.activeAction());
QTRY_VERIFY(menu.painted);
}
-#endif
void tst_QMenu::setFixedWidth()
{
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 3bcdea3137..436a8331f0 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -90,7 +90,7 @@ private slots:
void count();
void insertItem_QString_QObject();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void accel();
void activatedCount();
void allowActiveAndDisabled();
@@ -113,7 +113,7 @@ private slots:
void check_altPress();
void check_altClosePress();
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void check_shortcutPress();
void check_menuPosition();
#endif
@@ -308,7 +308,7 @@ inline TestMenu tst_QMenuBar::initWindowWithComplexMenuBar(QMainWindow &w)
}
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::accel()
{
// create a popup menu with menu items set the accelerators later...
@@ -326,7 +326,7 @@ void tst_QMenuBar::accel()
#endif
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::activatedCount()
{
// create a popup menu with menu items set the accelerators later...
@@ -517,7 +517,7 @@ void tst_QMenuBar::insertItem_QString_QObject()
}
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_accelKeys()
{
QMainWindow w;
@@ -590,7 +590,7 @@ void tst_QMenuBar::check_accelKeys()
#endif
// On Mac/WinCE, native key events are needed to test menu action activation
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_cursorKeys1()
{
QMainWindow w;
@@ -624,7 +624,7 @@ void tst_QMenuBar::check_cursorKeys1()
#endif
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_cursorKeys2()
{
QMainWindow w;
@@ -657,7 +657,7 @@ void tst_QMenuBar::check_cursorKeys2()
If a popupmenu is active you can use Left to move to the menu to the left of it.
*/
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_cursorKeys3()
{
QMainWindow w;
@@ -772,7 +772,7 @@ void tst_QMenuBar::check_endKey()
*/
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_escKey()
{
QMainWindow w;
@@ -917,7 +917,7 @@ void tst_QMenuBar::check_escKey()
// QCOMPARE(m_complexActionTriggerCount['h'], (uint)itemH_count);
// }
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::allowActiveAndDisabled()
{
QMenuBar menuBar;
@@ -1007,7 +1007,7 @@ void tst_QMenuBar::check_altClosePress()
}
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_shortcutPress()
{
QMainWindow w;
@@ -1050,7 +1050,7 @@ private:
};
// Qt/Mac,WinCE does not use the native popups/menubar
-#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
+#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_menuPosition()
{
QMainWindow w;
@@ -1119,7 +1119,7 @@ void tst_QMenuBar::check_menuPosition()
menu.close();
}
-# ifndef QTEST_NO_CURSOR
+# ifndef QT_NO_CURSOR
// QTBUG-28031: Click at bottom-right corner.
{
w.move(400, 200);
@@ -1133,7 +1133,7 @@ void tst_QMenuBar::check_menuPosition()
QCOMPARE(menu.geometry().right() - 1, globalPos.x());
menu.close();
}
-# endif // QTEST_NO_CURSOR
+# endif // QT_NO_CURSOR
}
#endif
@@ -1389,7 +1389,7 @@ void tst_QMenuBar::cornerWidgets()
QFETCH(Qt::Corner, corner);
-#if defined(Q_OS_OSX) || defined(Q_OS_WINCE)
+#if defined(Q_OS_OSX)
QSKIP("Test interferes with native menu bars on this platform");
#endif
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 6ad13cd781..a6d3a84495 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -48,8 +48,6 @@
#include "qplaintextedit.h"
#include "../../../shared/platformclipboard.h"
-#include "../../../qtest-config.h"
-
//Used in copyAvailable
typedef QPair<Qt::Key, Qt::KeyboardModifier> keyPairType;
typedef QList<keyPairType> pairListType;
@@ -64,7 +62,6 @@ public:
tst_QPlainTextEdit();
public slots:
- void initTestCase();
void init();
void cleanup();
private slots:
@@ -104,7 +101,7 @@ private slots:
void shiftDownInLineLastShouldSelectToEnd();
void undoRedoShouldRepositionTextEditCursor();
void lineWrapModes();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void mouseCursorShape();
#endif
void implicitClear();
@@ -208,16 +205,8 @@ void tst_QPlainTextEdit::getSetCheck()
QCOMPARE(0, obj1.tabStopWidth());
obj1.setTabStopWidth(INT_MIN);
QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value
-#if defined(Q_OS_WINCE)
- // due to rounding error in qRound when qreal==float
- // we cannot use INT_MAX for this check
- obj1.setTabStopWidth(SHRT_MAX*2);
- QCOMPARE(SHRT_MAX*2, obj1.tabStopWidth());
-#else
obj1.setTabStopWidth(INT_MAX);
QCOMPARE(INT_MAX, obj1.tabStopWidth());
-#endif
-
}
class QtTestDocumentLayout : public QAbstractTextDocumentLayout
@@ -251,13 +240,6 @@ public:
tst_QPlainTextEdit::tst_QPlainTextEdit()
{}
-void tst_QPlainTextEdit::initTestCase()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QPlainTextEdit::init()
{
ed = new QPlainTextEdit(0);
@@ -896,7 +878,7 @@ void tst_QPlainTextEdit::lineWrapModes()
delete window;
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QPlainTextEdit::mouseCursorShape()
{
// always show an IBeamCursor, see change 170146
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 302d290c72..7bbbc46b5a 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -526,12 +526,6 @@ void tst_QPushButton::sizeHint_data()
#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA)
QTest::newRow("windowsvista") << QString::fromLatin1("windowsvista");
#endif
-#if defined(Q_OS_WINCE) && !defined(QT_NO_STYLE_WINDOWSCE)
- QTest::newRow("windowsce") << QString::fromLatin1("windowsce");
-#endif
-#if defined(Q_OS_WINCE_WM) && !defined(QT_NO_STYLE_WINDOWSCE)
- QTest::newRow("windowsmobile") << QString::fromLatin1("windowsmobile");
-#endif
}
void tst_QPushButton::sizeHint()
diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
index 92c2f6cb7e..6523209c32 100644
--- a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
+++ b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
@@ -8,4 +8,4 @@ INCLUDEPATH += ../
HEADERS +=
SOURCES += tst_qtabwidget.cpp
-win32:!wince:!winrt: LIBS += -luser32
+win32:!winrt: LIBS += -luser32
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
index f8125bf749..2a2331c3bf 100644
--- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
+++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp
@@ -35,7 +35,7 @@
#include <qlabel.h>
#include <QtWidgets/qboxlayout.h>
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
# include <qt_windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
@@ -553,9 +553,7 @@ void tst_QTabWidget::paintEventCount()
// Mac, Windows and Windows CE get multiple repaints on the first show, so use those as a starting point.
static const int MaxInitialPaintCount =
-#if defined(Q_OS_WINCE)
- 4;
-#elif defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
2;
#elif defined(Q_OS_MAC)
5;
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index f1ebfda88b..7b26489b39 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -55,8 +55,6 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#include "../../../qtest-config.h"
-
//Used in copyAvailable
typedef QPair<Qt::Key, Qt::KeyboardModifier> keyPairType;
typedef QList<keyPairType> pairListType;
@@ -125,7 +123,7 @@ private slots:
void shiftDownInLineLastShouldSelectToEnd();
void undoRedoShouldRepositionTextEditCursor();
void lineWrapModes();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void mouseCursorShape();
#endif
void implicitClear();
@@ -276,15 +274,8 @@ void tst_QTextEdit::getSetCheck()
QCOMPARE(0, obj1.tabStopWidth());
obj1.setTabStopWidth(INT_MIN);
QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value
-#if defined(Q_OS_WINCE)
- // due to rounding error in qRound when qreal==float
- // we cannot use INT_MAX for this check
- obj1.setTabStopWidth(SHRT_MAX*2);
- QCOMPARE(SHRT_MAX*2, obj1.tabStopWidth());
-#else
obj1.setTabStopWidth(INT_MAX);
QCOMPARE(INT_MAX, obj1.tabStopWidth());
-#endif
// bool QTextEdit::acceptRichText()
// void QTextEdit::setAcceptRichText(bool)
@@ -378,10 +369,6 @@ void tst_QTextEdit::cleanupTestCase()
void tst_QTextEdit::init()
{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-
ed = new QTextEdit(0);
rootFrameMargin = ed->document()->documentMargin();
}
@@ -1230,7 +1217,7 @@ void tst_QTextEdit::lineWrapModes()
QCOMPARE(ed->document()->pageSize().width(), qreal(1000));
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QTextEdit::mouseCursorShape()
{
// always show an IBeamCursor, see change 170146
diff --git a/tests/auto/xml/dom/qdom/qdom.pro b/tests/auto/xml/dom/qdom/qdom.pro
index 3248b8e0e2..dd1fa1a75b 100644
--- a/tests/auto/xml/dom/qdom/qdom.pro
+++ b/tests/auto/xml/dom/qdom/qdom.pro
@@ -4,9 +4,4 @@ SOURCES += tst_qdom.cpp
QT = core xml testlib
-wince* {
- wince*|qt_not_deployed {
- DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
- }
-}
TESTDATA += testdata/* doubleNamespaces.xml umlaut.xml