summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro2
-rw-r--r--tests/auto/corelib/global/qnumeric/qnumeric.pro2
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp6
-rw-r--r--tests/auto/corelib/io/largefile/largefile.pro2
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp2
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp11
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp2
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro2
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp43
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp26
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp2
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp2
-rw-r--r--tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp18
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp18
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp12
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp55
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h3
-rw-r--r--tests/auto/corelib/kernel/qeventloop/qeventloop.pro2
-rw-r--r--tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro2
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp7
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib/lib.pro2
-rw-r--r--tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro2
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp46
-rw-r--r--tests/auto/corelib/tools/qcollator/tst_qcollator.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.pri2
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp2
-rw-r--r--tests/auto/gui/image/qicoimageformat/qicoimageformat.pro2
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp27
-rw-r--r--tests/auto/gui/image/qpicture/tst_qpicture.cpp4
-rw-r--r--tests/auto/gui/image/qpixmap/qpixmap.pro2
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp15
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp2
-rw-r--r--tests/auto/gui/kernel/qwindow/qwindow.pro2
-rw-r--r--tests/auto/network/access/qftp/qftp.pro2
-rw-r--r--tests/auto/network/access/qnetworkreply/qnetworkreply.pro2
-rw-r--r--tests/auto/network/kernel/qhostaddress/qhostaddress.pro2
-rw-r--r--tests/auto/network/kernel/qhostinfo/qhostinfo.pro2
-rw-r--r--tests/auto/network/socket/platformsocketengine/platformsocketengine.pri2
-rw-r--r--tests/auto/network/socket/qtcpserver/test/test.pro2
-rw-r--r--tests/auto/network/socket/qtcpsocket/qtcpsocket.pro5
-rw-r--r--tests/auto/network/socket/qtcpsocket/test/test.pro2
-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/qsslellipticcurve/tst_qsslellipticcurve.cpp6
-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.pro2
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro2
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro2
-rw-r--r--tests/auto/other/lancelot/paintcommands.cpp3
-rw-r--r--tests/auto/other/lancelot/scripts/arcs2.qps7
-rw-r--r--tests/auto/other/lancelot/scripts/text.qps9
-rw-r--r--tests/auto/other/other.pro2
-rw-r--r--tests/auto/other/qaccessibility/qaccessibility.pro2
-rw-r--r--tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm2
-rw-r--r--tests/auto/sql/kernel/qsql/qsql.pro2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro4
-rw-r--r--tests/auto/sql/kernel/qsqldriver/qsqldriver.pro2
-rw-r--r--tests/auto/sql/kernel/qsqlquery/qsqlquery.pro4
-rw-r--r--tests/auto/sql/kernel/qsqlthread/qsqlthread.pro2
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro2
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro2
-rw-r--r--tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro2
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp4
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro2
-rw-r--r--tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp15
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp25
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp23
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro2
-rw-r--r--tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp17
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/qlistview.pro2
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp2
-rw-r--r--tests/auto/widgets/kernel/qapplication/qapplication.pro2
-rw-r--r--tests/auto/widgets/kernel/qapplication/test/test.pro2
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp2
-rw-r--r--tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp4
-rw-r--r--tests/auto/widgets/kernel/qwidget/qwidget.pro2
-rw-r--r--tests/auto/widgets/styles/styles.pro2
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp2
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro2
-rw-r--r--tests/benchmarks/gui/image/qimagereader/qimagereader.pro2
-rw-r--r--tests/manual/diaglib/qwidgetdump.cpp2
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp2
-rw-r--r--tests/manual/manual.pro2
-rw-r--r--tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp4
96 files changed, 364 insertions, 197 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index a46b8af4ff..6f06ba591f 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -21,7 +21,7 @@ installed_cmake.depends = cmake
ios: SUBDIRS = corelib gui
-wince*: SUBDIRS -= printsupport
+wince: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools
!qtHaveModule(opengl): SUBDIRS -= opengl
!qtHaveModule(gui): SUBDIRS -= gui cmake
diff --git a/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro b/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro
index 0bcf067c4f..9f2e4f9c92 100644
--- a/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro
+++ b/tests/auto/corelib/codecs/qtextcodec/qtextcodec.pro
@@ -1,4 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = test
-!wince*:SUBDIRS += echo
+!wince: SUBDIRS += echo
diff --git a/tests/auto/corelib/global/qnumeric/qnumeric.pro b/tests/auto/corelib/global/qnumeric/qnumeric.pro
index 4cfb3fa7ac..00f3635be9 100644
--- a/tests/auto/corelib/global/qnumeric/qnumeric.pro
+++ b/tests/auto/corelib/global/qnumeric/qnumeric.pro
@@ -3,3 +3,5 @@ TARGET = tst_qnumeric
QT = core testlib
SOURCES = tst_qnumeric.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+intel_icc: QMAKE_CXXFLAGS += -fp-model strict
+intel_icl: QMAKE_CXXFLAGS += /fp:strict
diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
index 9a50df379c..fdc8bc6aab 100644
--- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
+++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp
@@ -107,13 +107,7 @@ void tst_QNumeric::qNan()
QVERIFY(qIsInf(-inf));
QVERIFY(qIsInf(2*inf));
QCOMPARE(1/inf, 0.0);
-#ifdef Q_CC_INTEL
- QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue);
-#endif
QVERIFY(qIsNaN(0*nan));
-#ifdef Q_CC_INTEL
- QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue);
-#endif
QVERIFY(qIsNaN(0*inf));
QVERIFY(qFuzzyCompare(1/inf, 0.0));
}
diff --git a/tests/auto/corelib/io/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro
index 55878196cd..d9938d07d5 100644
--- a/tests/auto/corelib/io/largefile/largefile.pro
+++ b/tests/auto/corelib/io/largefile/largefile.pro
@@ -3,5 +3,5 @@ TARGET = tst_largefile
QT = core testlib
SOURCES = tst_largefile.cpp
-wince*: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
+wince: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index 9d29b5401f..2cf93e1c45 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -1837,7 +1837,7 @@ static QRegion qRegionData(int index)
case 12: return QRegion(0, 0, 3, 3, QRegion::Ellipse);
#else
case 7:
- qWarning("Skipping streaming of elliptical regions on embedded, Mac OS X, and X11;"
+ qWarning("Skipping streaming of elliptical regions on embedded, OS X, and X11;"
" our pointarray stuff is not that great at approximating.");
#endif
}
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index e8a7105f6e..45289df398 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1366,6 +1366,9 @@ void tst_QDir::relativeFilePath_data()
QTest::newRow("11") << "" << "" << "";
+ QTest::newRow("same path 1") << "/tmp" << "/tmp" << ".";
+ QTest::newRow("same path 2") << "//tmp" << "/tmp/" << ".";
+
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
QTest::newRow("12") << "C:/foo/bar" << "ding" << "ding";
QTest::newRow("13") << "C:/foo/bar" << "C:/ding/dong" << "../../ding/dong";
@@ -1373,10 +1376,10 @@ void tst_QDir::relativeFilePath_data()
QTest::newRow("15") << "C:/foo/bar" << "D:/ding/dong" << "D:/ding/dong";
QTest::newRow("16") << "C:" << "C:/ding/dong" << "ding/dong";
QTest::newRow("17") << "C:/" << "C:/ding/dong" << "ding/dong";
- QTest::newRow("18") << "C:" << "C:" << "";
- QTest::newRow("19") << "C:/" << "C:" << "";
- QTest::newRow("20") << "C:" << "C:/" << "";
- QTest::newRow("21") << "C:/" << "C:/" << "";
+ QTest::newRow("18") << "C:" << "C:" << ".";
+ QTest::newRow("19") << "C:/" << "C:" << ".";
+ QTest::newRow("20") << "C:" << "C:/" << ".";
+ QTest::newRow("21") << "C:/" << "C:/" << ".";
QTest::newRow("22") << "C:" << "C:file.txt" << "file.txt";
QTest::newRow("23") << "C:/" << "C:file.txt" << "file.txt";
QTest::newRow("24") << "C:" << "C:/file.txt" << "file.txt";
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index 03863e9943..9aa4119795 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -7,7 +7,7 @@ else: DEFINES += QT_NO_NETWORK
TARGET = ../tst_qfile
SOURCES = ../tst_qfile.cpp
-wince*: SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.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 5025dd38db..b423e857d0 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -2192,7 +2192,7 @@ void tst_QFile::removeOpenFile()
bool opened = f.open(QIODevice::ReadOnly);
QVERIFY(opened);
f.readAll();
- // this used to only fail on FreeBSD (and Mac OS X)
+ // this used to only fail on FreeBSD (and OS X)
QVERIFY(f.flush());
bool removed = f.remove(); // remove should both close and remove the file
QVERIFY(removed);
diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
index 0ac7b30abd..571637be37 100644
--- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
+++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qfileinfo.cpp
RESOURCES += qfileinfo.qrc \
testdata.qrc
-win32*:!wince*:!winrt:LIBS += -ladvapi32 -lnetapi32
+win32:!wince:!winrt:LIBS += -ladvapi32 -lnetapi32
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
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 62e183f619..2b01cfd7a9 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -263,21 +263,23 @@ private slots:
private:
const QString m_currentDir;
- QString m_dataPath;
QString m_sourceFile;
QString m_proFile;
QString m_resourcesDir;
QTemporaryDir m_dir;
+ QSharedPointer<QTemporaryDir> m_dataDir;
};
void tst_QFileInfo::initTestCase()
{
- m_dataPath = QEXTRACTTESTDATA("/testdata");
- QVERIFY(!m_dataPath.isEmpty());
+ m_dataDir = QEXTRACTTESTDATA("/testdata");
+ QVERIFY(m_dataDir);
+ const QString dataPath = m_dataDir->path();
+ QVERIFY(!dataPath.isEmpty());
- m_sourceFile = m_dataPath + QStringLiteral("/tst_qfileinfo.cpp");
- m_resourcesDir = m_dataPath + QStringLiteral("/resources");
- m_proFile = m_dataPath + QStringLiteral("/tst_qfileinfo.pro");
+ m_sourceFile = dataPath + QLatin1String("/tst_qfileinfo.cpp");
+ m_resourcesDir = dataPath + QLatin1String("/resources");
+ m_proFile = dataPath + QLatin1String("/tst_qfileinfo.pro");
QVERIFY(m_dir.isValid());
QVERIFY(QDir::setCurrent(m_dir.path()));
@@ -286,7 +288,6 @@ void tst_QFileInfo::initTestCase()
void tst_QFileInfo::cleanupTestCase()
{
QDir::setCurrent(m_currentDir); // Release temporary directory so that it can be deleted on Windows
- QDir(m_dataPath).removeRecursively();
}
// Testing get/set functions
@@ -609,6 +610,16 @@ void tst_QFileInfo::canonicalPath()
QCOMPARE(fi.canonicalPath(), QFileInfo(QDir::tempPath()).canonicalFilePath());
}
+class FileDeleter {
+ Q_DISABLE_COPY(FileDeleter)
+public:
+ explicit FileDeleter(const QString fileName) : m_fileName(fileName) {}
+ ~FileDeleter() { QFile::remove(m_fileName); }
+
+private:
+ const QString m_fileName;
+};
+
void tst_QFileInfo::canonicalFilePath()
{
const QString fileName("tmp.canon");
@@ -639,9 +650,13 @@ void tst_QFileInfo::canonicalFilePath()
QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath());
}
}
+
+ const QString dirSymLinkName = QLatin1String("tst_qfileinfo")
+ + QDateTime::currentDateTime().toString(QLatin1String("yyMMddhhmmss"));
+ const QString link(QDir::tempPath() + QLatin1Char('/') + dirSymLinkName);
+ FileDeleter dirSymLinkDeleter(link);
+
{
- const QString link(QDir::tempPath() + QDir::separator() + "tst_qfileinfo");
- QFile::remove(link);
QFile file(QDir::currentPath());
if (file.link(link)) {
QFile tempfile("tempfile.txt");
@@ -666,12 +681,12 @@ void tst_QFileInfo::canonicalFilePath()
}
}
{
- QString link(QDir::tempPath() + QDir::separator() + "tst_qfileinfo"
- + QDir::separator() + "link_to_tst_qfileinfo");
+ QString link(QDir::tempPath() + QLatin1Char('/') + dirSymLinkName
+ + "/link_to_tst_qfileinfo");
QFile::remove(link);
- QFile file(QDir::tempPath() + QDir::separator() + "tst_qfileinfo"
- + QDir::separator() + "tst_qfileinfo.cpp");
+ QFile file(QDir::tempPath() + QLatin1Char('/') + dirSymLinkName
+ + "tst_qfileinfo.cpp");
if (file.link(link))
{
QFileInfo info1("tst_qfileinfo.cpp");
@@ -1266,7 +1281,7 @@ void tst_QFileInfo::isHidden_data()
#endif
#if defined(Q_OS_MAC)
- // /bin has the hidden attribute on Mac OS X
+ // /bin has the hidden attribute on OS X
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true;
#elif !defined(Q_OS_WIN)
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << false;
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index b78ff7ed80..a0434aa8ee 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -62,6 +62,7 @@ private slots:
void removePath();
void addPaths();
void removePaths();
+ void removePathsFilesInSameDirectory();
void watchFileAndItsDirectory_data() { basicTest_data(); }
void watchFileAndItsDirectory();
@@ -460,6 +461,31 @@ void tst_QFileSystemWatcher::removePaths()
watcher.removePaths(paths);
}
+void tst_QFileSystemWatcher::removePathsFilesInSameDirectory()
+{
+ // QTBUG-46449/Windows: Check the return values of removePaths().
+ // When adding the 1st file, a thread is started to watch the temp path.
+ // After adding and removing the 2nd file, the thread is still running and
+ // success should be reported.
+ QTemporaryFile file1(m_tempDirPattern);
+ QTemporaryFile file2(m_tempDirPattern);
+ QVERIFY2(file1.open(), qPrintable(file1.errorString()));
+ QVERIFY2(file2.open(), qPrintable(file1.errorString()));
+ const QString path1 = file1.fileName();
+ const QString path2 = file2.fileName();
+ file1.close();
+ file2.close();
+ QFileSystemWatcher watcher;
+ QVERIFY(watcher.addPath(path1));
+ QCOMPARE(watcher.files().size(), 1);
+ QVERIFY(watcher.addPath(path2));
+ QCOMPARE(watcher.files().size(), 2);
+ QVERIFY(watcher.removePath(path1));
+ QCOMPARE(watcher.files().size(), 1);
+ QVERIFY(watcher.removePath(path2));
+ QCOMPARE(watcher.files().size(), 0);
+}
+
static QByteArray msgFileOperationFailed(const char *what, const QFile &f)
{
return what + QByteArrayLiteral(" failed on \"")
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index 7f3b8ade3e..b59241851f 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
+ !wince: 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 399e9b9222..0c65ceb0eb 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -1558,7 +1558,7 @@ void tst_QProcess::failToStart()
QVERIFY(finishedSpy.isValid());
QVERIFY(finishedSpy2.isValid());
-// Mac OS X and HP-UX have a really low default process limit (~100), so spawning
+// OS X and HP-UX have a really low default process limit (~100), so spawning
// to many processes here will cause test failures later on.
#if defined Q_OS_HPUX
const int attempts = 15;
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index bc33d5991b..e2e1d99657 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1476,7 +1476,7 @@ void tst_QSettings::remove()
void tst_QSettings::contains()
{
QSettings settings1(QSettings::UserScope, "software.org", "KillerAPP");
- int initialNumKeys = settings1.allKeys().size(); // 0 on all platforms but Mac OS X.
+ int initialNumKeys = settings1.allKeys().size(); // 0 on all platforms but OS X.
settings1.setValue("alpha/beta/geometry", -7);
settings1.setValue("alpha/beta/geometry/x", 1);
settings1.setValue("alpha/beta/geometry/y", 2);
diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
index 2190c32c01..a7a0cf4ddb 100644
--- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
+++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
@@ -61,9 +61,9 @@ void tst_QStorageInfo::defaultValues()
QVERIFY(!storage.isRoot());
QVERIFY(storage.device().isEmpty());
QVERIFY(storage.fileSystemType().isEmpty());
- QVERIFY(storage.bytesTotal() == 0);
- QVERIFY(storage.bytesFree() == 0);
- QVERIFY(storage.bytesAvailable() == 0);
+ QVERIFY(storage.bytesTotal() == -1);
+ QVERIFY(storage.bytesFree() == -1);
+ QVERIFY(storage.bytesAvailable() == -1);
}
void tst_QStorageInfo::operatorEqual()
@@ -106,9 +106,9 @@ void tst_QStorageInfo::root()
QVERIFY(!storage.device().isEmpty());
QVERIFY(!storage.fileSystemType().isEmpty());
#ifndef Q_OS_HAIKU
- QVERIFY(storage.bytesTotal() > 0);
- QVERIFY(storage.bytesFree() > 0);
- QVERIFY(storage.bytesAvailable() > 0);
+ QVERIFY(storage.bytesTotal() >= 0);
+ QVERIFY(storage.bytesFree() >= 0);
+ QVERIFY(storage.bytesAvailable() >= 0);
#endif
}
@@ -121,9 +121,9 @@ void tst_QStorageInfo::currentStorage()
QVERIFY(appPath.startsWith(storage.rootPath(), Qt::CaseInsensitive));
QVERIFY(!storage.device().isEmpty());
QVERIFY(!storage.fileSystemType().isEmpty());
- QVERIFY(storage.bytesTotal() > 0);
- QVERIFY(storage.bytesFree() > 0);
- QVERIFY(storage.bytesAvailable() > 0);
+ QVERIFY(storage.bytesTotal() >= 0);
+ QVERIFY(storage.bytesFree() >= 0);
+ QVERIFY(storage.bytesAvailable() >= 0);
}
void tst_QStorageInfo::storageList()
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index aa7a3762ce..36da3b8770 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -81,7 +81,7 @@ private slots:
void readLineMaxlen_data();
void readLineMaxlen();
void readLinesFromBufferCRCR();
- void readLineOverload();
+ void readLineInto();
// all
void readAllFromDevice_data();
@@ -612,22 +612,22 @@ protected:
}
};
-void tst_QTextStream::readLineOverload()
+void tst_QTextStream::readLineInto()
{
QByteArray data = "1\n2\n3";
QTextStream ts(&data);
QString line;
- ts.readLine(&line);
+ ts.readLineInto(&line);
QCOMPARE(line, QStringLiteral("1"));
- ts.readLine(Q_NULLPTR, 0); // read the second line, but don't store it
+ ts.readLineInto(Q_NULLPTR, 0); // read the second line, but don't store it
- ts.readLine(&line);
+ ts.readLineInto(&line);
QCOMPARE(line, QStringLiteral("3"));
- QVERIFY(!ts.readLine(&line));
+ QVERIFY(!ts.readLineInto(&line));
QVERIFY(line.isEmpty());
QFile file(m_rfc3261FilePath);
@@ -637,7 +637,7 @@ void tst_QTextStream::readLineOverload()
line.reserve(1);
int maxLineCapacity = line.capacity();
- while (ts.readLine(&line)) {
+ while (ts.readLineInto(&line)) {
QVERIFY(line.capacity() >= maxLineCapacity);
maxLineCapacity = line.capacity();
}
@@ -647,7 +647,7 @@ void tst_QTextStream::readLineOverload()
QVERIFY(errorDevice.open(QIODevice::ReadOnly));
ts.setDevice(&errorDevice);
- QVERIFY(!ts.readLine(&line));
+ QVERIFY(!ts.readLineInto(&line));
QVERIFY(line.isEmpty());
}
@@ -1025,7 +1025,7 @@ void tst_QTextStream::performance()
QTextStream stream2(&file3);
QString line;
- while (stream2.readLine(&line))
+ while (stream2.readLineInto(&line))
++nlines3;
elapsed[2] = stopWatch.elapsed();
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index bd9e858091..0302ae5cbf 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -2529,16 +2529,16 @@ void tst_QSortFilterProxyModel::sortColumnTracking2()
proxyModel.sort(0);
QCOMPARE(proxyModel.sortColumn(), 0);
- QList<QStandardItem *> items;
- QStringList strings;
- strings << "foo" << "bar" << "some" << "others" << "item" << "aa" << "zz";
- foreach (QString s, strings)
- items << new QStandardItem(s);
+ QList<QStandardItem *> items; // Stable sorting: Items with invalid data should move to the end
+ items << new QStandardItem << new QStandardItem("foo") << new QStandardItem("bar")
+ << new QStandardItem("some") << new QStandardItem("others") << new QStandardItem("item")
+ << new QStandardItem("aa") << new QStandardItem("zz") << new QStandardItem;
model.insertColumn(0,items);
QCOMPARE(proxyModel.sortColumn(), 0);
QCOMPARE(proxyModel.data(proxyModel.index(0,0)).toString(),QString::fromLatin1("aa"));
- QCOMPARE(proxyModel.data(proxyModel.index(strings.count()-1,0)).toString(),QString::fromLatin1("zz"));
+ const int zzIndex = items.count() - 3; // 2 invalid at end.
+ QCOMPARE(proxyModel.data(proxyModel.index(zzIndex,0)).toString(),QString::fromLatin1("zz"));
}
void tst_QSortFilterProxyModel::sortStable()
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index 924db17c04..efecf31d66 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2015 Intel Corporation.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -60,6 +61,23 @@ public:
}
};
+class ThreadedEventReceiver : public QObject
+{
+ Q_OBJECT
+public:
+ QList<int> recordedEvents;
+ bool event(QEvent *event) Q_DECL_OVERRIDE
+ {
+ if (event->type() != QEvent::Type(QEvent::User + 1))
+ return QObject::event(event);
+ recordedEvents.append(event->type());
+ QThread::currentThread()->quit();
+ QCoreApplication::quit();
+ moveToThread(0);
+ return true;
+ }
+};
+
void tst_QCoreApplication::sendEventsOnProcessEvents()
{
int argc = 1;
@@ -797,6 +815,43 @@ void tst_QCoreApplication::QTBUG31606_QEventDestructorDeadLock()
QVERIFY(spy.recordedEvents.contains(QEvent::User + 2));
}
+// this is almost identical to sendEventsOnProcessEvents
+void tst_QCoreApplication::applicationEventFilters_mainThread()
+{
+ int argc = 1;
+ char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
+ TestApplication app(argc, argv);
+
+ EventSpy spy;
+ app.installEventFilter(&spy);
+
+ QCoreApplication::postEvent(&app, new QEvent(QEvent::Type(QEvent::User + 1)));
+ QTimer::singleShot(10, &app, SLOT(quit()));
+ app.exec();
+ QVERIFY(spy.recordedEvents.contains(QEvent::User + 1));
+}
+
+void tst_QCoreApplication::applicationEventFilters_auxThread()
+{
+ int argc = 1;
+ char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
+ TestApplication app(argc, argv);
+ QThread thread;
+ ThreadedEventReceiver receiver;
+ receiver.moveToThread(&thread);
+
+ EventSpy spy;
+ app.installEventFilter(&spy);
+
+ // this is very similar to sendEventsOnProcessEvents
+ QCoreApplication::postEvent(&receiver, new QEvent(QEvent::Type(QEvent::User + 1)));
+ QTimer::singleShot(1000, &app, SLOT(quit()));
+ thread.start();
+ app.exec();
+ QVERIFY(thread.wait(1000));
+ QVERIFY(receiver.recordedEvents.contains(QEvent::User + 1));
+ QVERIFY(!spy.recordedEvents.contains(QEvent::User + 1));
+}
static void createQObjectOnDestruction()
{
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h
index 3dd84482d7..09e15723ac 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2015 Intel Corporation.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -58,6 +59,8 @@ private slots:
void customEventDispatcher();
void testQuitLock();
void QTBUG31606_QEventDestructorDeadLock();
+ void applicationEventFilters_mainThread();
+ void applicationEventFilters_auxThread();
};
#endif // TST_QCOREAPPLICATION_H
diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
index 5593aa2430..ea4792fc1c 100644
--- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
+++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro
@@ -4,7 +4,7 @@ TARGET = tst_qeventloop
QT = core network testlib core-private
SOURCES = $$PWD/tst_qeventloop.cpp
-win32:!wince*:!winrt:LIBS += -luser32
+win32:!wince:!winrt: LIBS += -luser32
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
contains(QT_CONFIG, glib): DEFINES += HAVE_GLIB
diff --git a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
index 8823d54590..b08dfb1838 100644
--- a/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
+++ b/tests/auto/corelib/kernel/qobject/signalbug/signalbug.pro
@@ -2,7 +2,7 @@ CONFIG -= app_bundle debug_and_release
CONFIG += console
DESTDIR = ./
QT = core
-wince*: {
+wince {
LIBS += coredll.lib
}
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 3ec84b5198..4617ce5e74 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -918,6 +918,8 @@ void tst_QObject::connectDisconnectNotifyPMF()
QMetaObject::Connection conn = connect((SenderObject*)s, &SenderObject::signal1,
(ReceiverObject*)r, &ReceiverObject::slot1);
+ QVERIFY(conn);
+
// Test disconnectNotify when disconnecting by QMetaObject::Connection
QVERIFY(QObject::disconnect(conn));
// disconnectNotify() is not called, but it probably should be.
@@ -5751,7 +5753,6 @@ void tst_QObject::connectFunctorWithContext()
{
int status = 1;
SenderObject obj;
- QMetaObject::Connection handle;
ContextObject *context = new ContextObject;
QEventLoop e;
@@ -6058,8 +6059,12 @@ void tst_QObject::disconnectDoesNotLeakFunctor()
QVERIFY(c2);
QCOMPARE(countedStructObjectsCount, 2);
QVERIFY(QObject::disconnect(c1));
+ QVERIFY(!c1);
+ QVERIFY(!c2);
// functor object has been destroyed
QCOMPARE(countedStructObjectsCount, 1);
+ QVERIFY(!QObject::disconnect(c2));
+ QCOMPARE(countedStructObjectsCount, 1);
}
QCOMPARE(countedStructObjectsCount, 0);
}
diff --git a/tests/auto/corelib/plugin/qlibrary/lib/lib.pro b/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
index a92b4faca5..195e48da93 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib/lib.pro
@@ -6,7 +6,7 @@ TARGET = mylib
DESTDIR = ../
QT = core
-wince*: DEFINES += WIN32_MSVC
+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 dc6a660c0a..52dd8b9679 100644
--- a/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
+++ b/tests/auto/corelib/plugin/qlibrary/lib2/lib2.pro
@@ -7,7 +7,7 @@ DESTDIR = ../
VERSION = 2
QT = core
-wince*: DEFINES += WIN32_MSVC
+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/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index 3bc4bb80b8..3230472d5b 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -669,9 +669,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_WINRT)
- // creating a new worker from within the GUI thread is not supported
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL);
#elif defined Q_OS_WIN
unsigned thrdid = 0;
@@ -690,10 +688,12 @@ void NativeThreadWrapper::join()
{
#if defined Q_OS_UNIX
pthread_join(nativeThreadHandle, 0);
-#elif defined Q_OS_WINRT
- // not supported
#elif defined Q_OS_WIN
+#ifndef Q_OS_WINCE
+ WaitForSingleObjectEx(nativeThreadHandle, INFINITE, FALSE);
+#else
WaitForSingleObject(nativeThreadHandle, INFINITE);
+#endif
CloseHandle(nativeThreadHandle);
#endif
}
@@ -747,9 +747,6 @@ void testNativeThreadAdoption(void *)
}
void tst_QThread::nativeThreadAdoption()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
threadAdoptedOk = false;
mainThread = QThread::currentThread();
NativeThreadWrapper nativeThread;
@@ -773,9 +770,6 @@ void adoptedThreadAffinityFunction(void *arg)
void tst_QThread::adoptedThreadAffinity()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
QThread *affinity[2] = { 0, 0 };
NativeThreadWrapper thread;
@@ -788,9 +782,6 @@ void tst_QThread::adoptedThreadAffinity()
void tst_QThread::adoptedThreadSetPriority()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
NativeThreadWrapper nativeThread;
nativeThread.setWaitForStop();
nativeThread.startAndWait();
@@ -818,9 +809,6 @@ void tst_QThread::adoptedThreadSetPriority()
void tst_QThread::adoptedThreadExit()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
NativeThreadWrapper nativeThread;
nativeThread.setWaitForStop();
@@ -850,9 +838,6 @@ void adoptedThreadExecFunction(void *)
void tst_QThread::adoptedThreadExec()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
NativeThreadWrapper nativeThread;
nativeThread.start(adoptedThreadExecFunction);
nativeThread.join();
@@ -863,9 +848,6 @@ void tst_QThread::adoptedThreadExec()
*/
void tst_QThread::adoptedThreadFinished()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
NativeThreadWrapper nativeThread;
nativeThread.setWaitForStop();
nativeThread.startAndWait();
@@ -876,17 +858,11 @@ void tst_QThread::adoptedThreadFinished()
nativeThread.join();
QTestEventLoop::instance().enterLoop(5);
-#if defined(Q_OS_WINRT)
- QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort);
-#endif
QVERIFY(!QTestEventLoop::instance().timeout());
}
void tst_QThread::adoptedThreadExecFinished()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
NativeThreadWrapper nativeThread;
nativeThread.setWaitForStop();
nativeThread.startAndWait(adoptedThreadExecFunction);
@@ -902,9 +878,6 @@ void tst_QThread::adoptedThreadExecFinished()
void tst_QThread::adoptMultipleThreads()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
#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)
@@ -936,18 +909,12 @@ void tst_QThread::adoptMultipleThreads()
}
QTestEventLoop::instance().enterLoop(5);
-#if defined(Q_OS_WINRT)
- QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort);
-#endif
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(recorder.activationCount.load(), numThreads);
}
void tst_QThread::adoptMultipleThreadsOverlap()
{
-#ifdef Q_OS_WINRT
- QSKIP("Native thread adoption is not supported on WinRT.");
-#endif
#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)
@@ -984,9 +951,6 @@ void tst_QThread::adoptMultipleThreadsOverlap()
}
QTestEventLoop::instance().enterLoop(5);
-#if defined(Q_OS_WINRT)
- QEXPECT_FAIL("", "QTBUG-31397: Known not to work on WinRT", Abort);
-#endif
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(recorder.activationCount.load(), numThreads);
}
diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
index e5675397f5..b0135ab6af 100644
--- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
+++ b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
@@ -103,7 +103,7 @@ void tst_QCollator::compare_data()
It's hard to test English, because it's treated differently
on different platforms. For example, on Linux, it uses the
iso14651_t1 template file, which happens to provide good
- defaults for Swedish. Mac OS X seems to do a pure bytewise
+ defaults for Swedish. OS X seems to do a pure bytewise
comparison of Latin-1 values, although I'm not sure. So I
just test digits to make sure that it's not totally broken.
*/
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri
index b3a01f7990..cac94bb522 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri
@@ -4,4 +4,4 @@ cleanedQMAKESPEC = $$replace(QMAKESPEC, \\\\, /)
DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\"
cross_compile:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED
-wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI
+wince: DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index d4b3ba7f15..f8b9d02e1e 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -5246,7 +5246,7 @@ void tst_QString::localeAwareCompare_data()
It's hard to test English, because it's treated differently
on different platforms. For example, on Linux, it uses the
iso14651_t1 template file, which happens to provide good
- defaults for Swedish. Mac OS X seems to do a pure bytewise
+ defaults for Swedish. OS X seems to do a pure bytewise
comparison of Latin-1 values, although I'm not sure. So I
just test digits to make sure that it's not totally broken.
*/
diff --git a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
index a58336e511..7ed69ce1d1 100644
--- a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
+++ b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro
@@ -4,7 +4,7 @@ TARGET = tst_qicoimageformat
SOURCES+= tst_qicoimageformat.cpp
QT += testlib
-wince*: {
+wince {
CONFIG(debug, debug|release):{
addPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/qico4d.dll
} else {
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index da29a57f98..f7c71f05bd 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -190,6 +190,8 @@ private slots:
void devicePixelRatio();
void rgb30Unpremul();
+ void rgb30Repremul_data();
+ void rgb30Repremul();
void metadataPassthrough();
@@ -2946,6 +2948,31 @@ void tst_QImage::rgb30Unpremul()
QCOMPARE(bbits[2], (3U << 30) | (201 << 20) | (393 << 10) | 777);
}
+void tst_QImage::rgb30Repremul_data()
+{
+ QTest::addColumn<uint>("color");
+ for (int i = 255; i > 0; i -= 15) {
+ QTest::newRow(qPrintable(QStringLiteral("100% red=") + QString::number(i))) << qRgba(i, 0, 0, 0xff);
+ QTest::newRow(qPrintable(QStringLiteral("75% red=") + QString::number(i))) << qRgba(i, 0, 0, 0xc0);
+ QTest::newRow(qPrintable(QStringLiteral("50% red=") + QString::number(i))) << qRgba(i, 0, 0, 0x80);
+ QTest::newRow(qPrintable(QStringLiteral("37.5% red=") + QString::number(i))) << qRgba(i, 0, 0, 0x60);
+ }
+}
+
+void tst_QImage::rgb30Repremul()
+{
+ QFETCH(uint, color);
+
+ QImage a(1, 1, QImage::Format_ARGB32);
+ a.setPixel(0, 0, color);
+
+ QImage b = a.convertToFormat(QImage::Format_A2BGR30_Premultiplied);
+ b = b.convertToFormat(QImage::Format_ARGB32);
+ uint expectedColor = qUnpremultiply(qPremultiply(color));
+ uint newColor = b.pixel(0, 0);
+ QVERIFY(qAbs(qRed(newColor) - qRed(expectedColor)) <= 1);
+}
+
void tst_QImage::metadataPassthrough()
{
QImage a(64, 64, QImage::Format_ARGB32);
diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
index 3cf848b08d..5406284c05 100644
--- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp
+++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp
@@ -133,10 +133,10 @@ void tst_QPicture::boundingRect()
QRect r2( 10, 20, 100, 60 );
QCOMPARE( p1.boundingRect(), r2 );
QPicture p2( p1 );
- QCOMPARE( p1.boundingRect(), r2 );
+ QCOMPARE( p2.boundingRect(), r2 );
QPicture p3;
p3 = p1;
- QCOMPARE( p1.boundingRect(), r2 );
+ QCOMPARE( p3.boundingRect(), r2 );
{
QPicture p4;
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro
index 33c301a500..5a4656998a 100644
--- a/tests/auto/gui/image/qpixmap/qpixmap.pro
+++ b/tests/auto/gui/image/qpixmap/qpixmap.pro
@@ -5,7 +5,7 @@ QT += core-private gui-private testlib
qtHaveModule(widgets): QT += widgets widgets-private
SOURCES += tst_qpixmap.cpp
-!wince*:!winrt {
+!wince:!winrt {
win32:LIBS += -lgdi32 -luser32
}
diff --git a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
index 70daa244e7..ff263c166a 100644
--- a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
+++ b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
@@ -81,6 +81,7 @@ private slots:
void clone();
void sortChildren();
void subclassing();
+ void lessThan();
};
tst_QStandardItem::tst_QStandardItem()
@@ -1107,5 +1108,19 @@ void tst_QStandardItem::subclassing()
QCOMPARE(item->child(2), (QStandardItem*)child1);
}
+void tst_QStandardItem::lessThan()
+{
+ QStandardItem stringA("A");
+ QStandardItem stringB("B");
+ QStandardItem invalid1;
+ QStandardItem invalid2;
+ QVERIFY(stringA < stringB);
+ QVERIFY(!(stringB < stringA));
+ // Items with invalid data go to the end.
+ QVERIFY(stringA < invalid1);
+ QVERIFY(!(invalid1 < stringA));
+ QVERIFY(!(invalid1 < invalid2));
+}
+
QTEST_MAIN(tst_QStandardItem)
#include "tst_qstandarditem.moc"
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 2edfddf6dd..3fcbd0a16f 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -400,7 +400,7 @@ void tst_QKeySequence::keyBindings()
void tst_QKeySequence::mnemonic_data()
{
#ifdef Q_OS_MAC
- QSKIP("Test not applicable to Mac OS X");
+ QSKIP("Test not applicable to OS X");
#endif
QTest::addColumn<QString>("string");
QTest::addColumn<QString>("key");
diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro
index 5210585796..08e1b1d3a0 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:!wince:!winrt: LIBS += -luser32
diff --git a/tests/auto/network/access/qftp/qftp.pro b/tests/auto/network/access/qftp/qftp.pro
index 44161f4e1e..850e1a9417 100644
--- a/tests/auto/network/access/qftp/qftp.pro
+++ b/tests/auto/network/access/qftp/qftp.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qftp.cpp
requires(contains(QT_CONFIG,private_tests))
QT = core network network-private testlib
-wince*: {
+wince {
addFiles.files = rfc3252.txt
addFiles.path = .
DEPLOYMENT += addFiles
diff --git a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
index 885e7f15b6..7cb6fddbaf 100644
--- a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
+++ b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro
@@ -1,5 +1,5 @@
TEMPLATE = subdirs
-!wince*:SUBDIRS += echo
+!wince: SUBDIRS += echo
test.depends += $$SUBDIRS
SUBDIRS += test
diff --git a/tests/auto/network/kernel/qhostaddress/qhostaddress.pro b/tests/auto/network/kernel/qhostaddress/qhostaddress.pro
index 421685d855..f349cab976 100644
--- a/tests/auto/network/kernel/qhostaddress/qhostaddress.pro
+++ b/tests/auto/network/kernel/qhostaddress/qhostaddress.pro
@@ -7,7 +7,7 @@ SOURCES += tst_qhostaddress.cpp
QT = core network testlib
win32: {
-wince*: {
+wince {
LIBS += -lws2
} else {
LIBS += -lws2_32
diff --git a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
index 4fca7950dd..c9b795d098 100644
--- a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
+++ b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro
@@ -6,7 +6,7 @@ SOURCES += tst_qhostinfo.cpp
requires(contains(QT_CONFIG,private_tests))
QT = core-private network-private testlib
-wince*: {
+wince {
LIBS += ws2.lib
} else {
win32:LIBS += -lws2_32
diff --git a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
index 15f31fdbb5..a3b4e89450 100644
--- a/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
+++ b/tests/auto/network/socket/platformsocketengine/platformsocketengine.pri
@@ -5,7 +5,7 @@ QNETWORK_SRC = $$QT_SOURCE_TREE/src/network
INCLUDEPATH += $$QNETWORK_SRC
win32 {
- wince*: {
+ wince {
LIBS += -lws2
} else {
LIBS += -lws2_32
diff --git a/tests/auto/network/socket/qtcpserver/test/test.pro b/tests/auto/network/socket/qtcpserver/test/test.pro
index 4daa9963ce..f0abfbc085 100644
--- a/tests/auto/network/socket/qtcpserver/test/test.pro
+++ b/tests/auto/network/socket/qtcpserver/test/test.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
SOURCES += ../tst_qtcpserver.cpp
win32: {
-wince*: {
+wince {
LIBS += -lws2
crashApp.files = ../crashingServer/crashingServer.exe
crashApp.path = crashingServer
diff --git a/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro b/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
index 347359f508..fe6042b8a7 100644
--- a/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
+++ b/tests/auto/network/socket/qtcpsocket/qtcpsocket.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
-
-!wince*: SUBDIRS = test stressTest
-wince*|vxworks* : SUBDIRS = test
+SUBDIRS = test
+!wince:!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 5dde109824..325abcaab8 100644
--- a/tests/auto/network/socket/qtcpsocket/test/test.pro
+++ b/tests/auto/network/socket/qtcpsocket/test/test.pro
@@ -3,7 +3,7 @@ CONFIG += testcase
QT = core-private network-private testlib
SOURCES += ../tst_qtcpsocket.cpp
win32: {
-wince*: {
+wince {
LIBS += -lws2
} else {
LIBS += -lws2_32
diff --git a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
index f2d6589410..26d6424a97 100644
--- a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
+++ b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qsslcertificate.cpp
-!wince*:win32:LIBS += -lws2_32
+!wince: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 a091bd0184..36e3c29b31 100644
--- a/tests/auto/network/ssl/qsslcipher/qsslcipher.pro
+++ b/tests/auto/network/ssl/qsslcipher/qsslcipher.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qsslcipher.cpp
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: 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 d9a771a080..747bb55ade 100644
--- a/tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro
+++ b/tests/auto/network/ssl/qsslellipticcurve/qsslellipticcurve.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qsslellipticcurve.cpp
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: LIBS += -lws2_32
QT = core network testlib
TARGET = tst_qsslellipticcurve
diff --git a/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp b/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp
index c97b46a512..685d354cc9 100644
--- a/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp
+++ b/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp
@@ -34,7 +34,7 @@
#include <QtTest/QtTest>
#include <QSslEllipticCurve>
-#include <QSslSocket>
+#include <QSslConfiguration>
class tst_QSslEllipticCurve : public QObject
{
@@ -84,7 +84,7 @@ void tst_QSslEllipticCurve::fromShortName_data()
QTest::newRow("QString()") << QString() << QSslEllipticCurve() << false;
QTest::newRow("\"\"") << QString("") << QSslEllipticCurve() << false;
QTest::newRow("does-not-exist") << QStringLiteral("does-not-exist") << QSslEllipticCurve() << false;
- Q_FOREACH (QSslEllipticCurve ec, QSslSocket::supportedEllipticCurves()) {
+ Q_FOREACH (QSslEllipticCurve ec, QSslConfiguration::supportedEllipticCurves()) {
const QString sN = ec.shortName();
QTest::newRow(qPrintable("supported EC \"" + sN + '"')) << sN << ec << true;
// At least in the OpenSSL impl, the short name is case-sensitive. That feels odd.
@@ -117,7 +117,7 @@ void tst_QSslEllipticCurve::fromLongName_data()
QTest::newRow("QString()") << QString() << QSslEllipticCurve() << false;
QTest::newRow("\"\"") << QString("") << QSslEllipticCurve() << false;
QTest::newRow("does-not-exist") << QStringLiteral("does-not-exist") << QSslEllipticCurve() << false;
- Q_FOREACH (QSslEllipticCurve ec, QSslSocket::supportedEllipticCurves()) {
+ Q_FOREACH (QSslEllipticCurve ec, QSslConfiguration::supportedEllipticCurves()) {
const QString lN = ec.longName();
QTest::newRow(qPrintable("supported EC \"" + lN + '"')) << lN << ec << true;
}
diff --git a/tests/auto/network/ssl/qsslerror/qsslerror.pro b/tests/auto/network/ssl/qsslerror/qsslerror.pro
index 85a5046923..6b7090db99 100644
--- a/tests/auto/network/ssl/qsslerror/qsslerror.pro
+++ b/tests/auto/network/ssl/qsslerror/qsslerror.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qsslerror.cpp
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: 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 4ec4f27e6f..a74f432890 100644
--- a/tests/auto/network/ssl/qsslkey/qsslkey.pro
+++ b/tests/auto/network/ssl/qsslkey/qsslkey.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qsslkey.cpp
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: 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 07774d1847..de2be8e126 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
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: LIBS += -lws2_32
QT = core core-private network-private testlib
TARGET = tst_qsslsocket
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 9b12785081..4f216ebb37 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
@@ -3,7 +3,7 @@ CONFIG += parallel_test
testcase.timeout = 300 # this test is slow
SOURCES += tst_qsslsocket_onDemandCertificates_member.cpp
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: LIBS += -lws2_32
QT = core core-private network-private testlib
TARGET = tst_qsslsocket_onDemandCertificates_member
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 c4d56436d0..96a6162ce6 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
@@ -2,7 +2,7 @@ CONFIG += testcase
CONFIG += parallel_test
SOURCES += tst_qsslsocket_onDemandCertificates_static.cpp
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: LIBS += -lws2_32
QT = core core-private network-private testlib
TARGET = tst_qsslsocket_onDemandCertificates_static
diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp
index caca0f2ebd..4fc41fd649 100644
--- a/tests/auto/other/lancelot/paintcommands.cpp
+++ b/tests/auto/other/lancelot/paintcommands.cpp
@@ -2383,7 +2383,10 @@ void PaintCommands::command_surface_begin(QRegExp re)
m_surface_glbuffer->bind();
m_surface_glpaintdevice = new QOpenGLPaintDevice(qRound(w), qRound(h));
m_painter = new QPainter(m_surface_glpaintdevice);
+ m_painter->save();
+ m_painter->setCompositionMode(QPainter::CompositionMode_Clear);
m_painter->fillRect(QRect(0, 0, qRound(w), qRound(h)), Qt::transparent);
+ m_painter->restore();
#endif
#ifdef Q_DEAD_CODE_FROM_QT4_X11
} else if (m_type == WidgetType) {
diff --git a/tests/auto/other/lancelot/scripts/arcs2.qps b/tests/auto/other/lancelot/scripts/arcs2.qps
index 411ff08014..a2739a8c97 100644
--- a/tests/auto/other/lancelot/scripts/arcs2.qps
+++ b/tests/auto/other/lancelot/scripts/arcs2.qps
@@ -45,3 +45,10 @@ drawArc 100 350 300 300 5440 5760
drawArc 100 350 300 300 5600 5760
setPen white
drawArc 100 350 300 300 0 5760
+
+translate 400 300
+setRenderHint Antialiasing true
+setPen blue 40
+drawArc 100 100 200 200 0 4320
+setPen red 40
+drawArc 60 60 280 280 0 4320
diff --git a/tests/auto/other/lancelot/scripts/text.qps b/tests/auto/other/lancelot/scripts/text.qps
index 344c7a813d..169549a5bd 100644
--- a/tests/auto/other/lancelot/scripts/text.qps
+++ b/tests/auto/other/lancelot/scripts/text.qps
@@ -159,4 +159,11 @@ save
setPen black
drawText 0 70 "testing glyph cache textures"
-restore \ No newline at end of file
+restore
+
+translate 0 75
+save
+ setPen black
+ setFont "sansserif" 16 normal
+ drawText 0 40 "e😃m😇o😍j😜i😸!"
+restore
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index 8c911da2e0..673e922fdd 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -58,7 +58,7 @@ wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
macplist \
qaccessibilitymac
-!embedded|wince*: SUBDIRS -= \
+!embedded|wince: SUBDIRS -= \
qdirectpainter
winrt: SUBDIRS -= \
diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro
index 70cced1dac..1d6fc6bcd1 100644
--- a/tests/auto/other/qaccessibility/qaccessibility.pro
+++ b/tests/auto/other/qaccessibility/qaccessibility.pro
@@ -7,7 +7,7 @@ HEADERS += accessiblewidgets.h
unix:!mac:!haiku:LIBS+=-lm
-wince*: {
+wince {
accessneeded.files = $$QT_BUILD_TREE\\plugins\\accessible\\*.dll
accessneeded.path = accessible
DEPLOYMENT += accessneeded
diff --git a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
index d0ff6af640..3056904dcf 100644
--- a/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
+++ b/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm
@@ -129,7 +129,7 @@ QDebug operator<<(QDebug dbg, AXErrorTag err)
- (AXUIElementRef) ref { return reference; }
- (void) print {
- NSLog(@"Accessible Object role: '%@', title: '%@', description: '%@', value: '%@', rect: '%@'", self.role, self.title, self.description, self.value, NSStringFromRect(self.rect));
+ NSLog(@"Accessible Object role: '%@', title: '%@', description: '%@', value: '%@', rect: '%@'", self.role, self.title, self.description, self.value, NSStringFromRect(NSRectFromCGRect(self.rect)));
NSLog(@" Children: %ld", [[self childList] count]);
}
diff --git a/tests/auto/sql/kernel/qsql/qsql.pro b/tests/auto/sql/kernel/qsql/qsql.pro
index 6bef8d4601..03918f5d3d 100644
--- a/tests/auto/sql/kernel/qsql/qsql.pro
+++ b/tests/auto/sql/kernel/qsql/qsql.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qsql.cpp
QT = core-private sql-private testlib
-wince*: {
+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 d562e47c55..7da5b8bc8e 100644
--- a/tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro
+++ b/tests/auto/sql/kernel/qsqldatabase/qsqldatabase.pro
@@ -5,11 +5,11 @@ SOURCES += tst_qsqldatabase.cpp
QT = core sql testlib core-private sql-private
win32: {
- !wince*: LIBS += -lws2_32
+ !wince: LIBS += -lws2_32
else: LIBS += -lws2
}
-wince*: {
+wince {
DEPLOYMENT_PLUGIN += qsqlite
testData.files = testdata
diff --git a/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro b/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
index 13674f7c9e..5633840635 100644
--- a/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
+++ b/tests/auto/sql/kernel/qsqldriver/qsqldriver.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qsqldriver.cpp
QT = core sql testlib core-private sql-private
-wince*: {
+wince {
plugFiles.files = ../../../plugins/sqldrivers
plugFiles.path = .
DEPLOYMENT += plugFiles
diff --git a/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro b/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro
index 360d874f1a..a6be23892d 100644
--- a/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro
+++ b/tests/auto/sql/kernel/qsqlquery/qsqlquery.pro
@@ -5,9 +5,9 @@ SOURCES += tst_qsqlquery.cpp
QT = core sql testlib core-private sql-private
-!wince*:win32:LIBS += -lws2_32
+win32:!wince: LIBS += -lws2_32
-wince*: {
+wince {
plugFiles.files = ../../../plugins/sqldrivers
plugFiles.path = .
DEPLOYMENT += plugFiles
diff --git a/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro b/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro
index 3249309bf4..64d8c5ccfb 100644
--- a/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro
+++ b/tests/auto/sql/kernel/qsqlthread/qsqlthread.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qsqlthread.cpp
QT = core sql testlib core-private sql-private
-wince*: {
+wince {
plugFiles.files = ../../../plugins/sqldrivers
plugFiles.path = .
DEPLOYMENT += plugFiles
diff --git a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
index 7bcde08469..bc627e0724 100644
--- a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
+++ b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qsqlquerymodel.cpp
QT += widgets sql testlib core-private sql-private
-wince*: {
+wince {
DEPLOYMENT_PLUGIN += qsqlite
LIBS += -lws2
} else {
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index 6bcc3a1870..5ce1b5694c 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qsqlrelationaltablemodel.cpp
QT = core sql testlib core-private sql-private
-wince*: {
+wince {
plugFiles.files = ../../../plugins/sqldrivers
plugFiles.path = .
DEPLOYMENT += plugFiles
diff --git a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
index 211c2f2c2e..fedb41ba1d 100644
--- a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
+++ b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
@@ -5,7 +5,7 @@ SOURCES += tst_qsqltablemodel.cpp
QT = core core-private sql sql-private testlib
-wince*: {
+wince {
plugFiles.files = ../../../plugins/sqldrivers
plugFiles.path = .
DEPLOYMENT += plugFiles
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index fab2cdce17..bed4c792a1 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -1356,7 +1356,7 @@ void tst_qmakelib::addReplaceFunctions(const QString &qindir)
QTest::newRow("$$relative_path(): relative file to empty")
<< "VAR = $$relative_path(dir/..)"
- << "VAR ="
+ << "VAR = ."
<< ""
<< true;
@@ -1368,7 +1368,7 @@ void tst_qmakelib::addReplaceFunctions(const QString &qindir)
QTest::newRow("$$relative_path(): empty file & path")
<< "VAR = $$relative_path('', /root/sub)"
- << "VAR ="
+ << "VAR = ."
<< ""
<< true;
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index bac72f0365..796b4b9fdb 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -225,6 +225,8 @@ void tst_QFontDialog::qtbug_41513_stylesheetStyle()
QFontDialog::DontUseNativeDialog);
QVERIFY(accepted);
+ // The fontdialog sets the styleName, when the fontdatabase knows the style name.
+ resultFont.setStyleName(testFont.styleName());
QCOMPARE(resultFont, testFont);
// reset stylesheet
diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
index bef51bd73d..cb816a7e85 100644
--- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp
@@ -363,7 +363,7 @@ void tst_QMessageBox::statics()
}
}
-// shortcuts are not used on MAC OS X
+// shortcuts are not used on OS X
#ifndef Q_OS_MAC
void tst_QMessageBox::shortcut()
{
@@ -483,7 +483,7 @@ void tst_QMessageBox::instanceSourceCompat()
QCOMPARE(exec(&mb, Qt::Key_Enter), int(QMessageBox::Yes));
QCOMPARE(exec(&mb, Qt::Key_Escape), int(QMessageBox::Cancel));
#ifndef Q_OS_MAC
- // mnemonics are not used on Mac OS X
+ // mnemonics are not used on OS X
QCOMPARE(exec(&mb, Qt::ALT + Qt::Key_R), 0);
QCOMPARE(exec(&mb, Qt::ALT + Qt::Key_Z), 1);
#endif
diff --git a/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
index 879d31604b..b6693eeb5f 100644
--- a/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
+++ b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
@@ -7,7 +7,7 @@ QT += gui-private
SOURCES += tst_qpixmapfilter.cpp
-wince*: {
+wince {
addFiles.files = noise.png
addFiles.path = .
DEPLOYMENT += addFiles
diff --git a/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp b/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp
index 67c431d16e..dc2adad5da 100644
--- a/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp
+++ b/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp
@@ -269,7 +269,8 @@ void tst_QGestureRecognizer::pinchGesture()
enum SwipeSubTest {
SwipeLineSubTest,
- SwipeChangeDirectionSubTest,
+ SwipeDirectionChangeSubTest,
+ SwipeSmallDirectionChangeSubTest
};
void tst_QGestureRecognizer::swipeGesture_data()
@@ -277,7 +278,8 @@ void tst_QGestureRecognizer::swipeGesture_data()
QTest::addColumn<int>("swipeSubTest");
QTest::addColumn<bool>("gestureExpected");
QTest::newRow("Line") << int(SwipeLineSubTest) << true;
- QTest::newRow("ChangeDirection") << int(SwipeChangeDirectionSubTest) << false;
+ QTest::newRow("DirectionChange") << int(SwipeDirectionChangeSubTest) << false;
+ QTest::newRow("SmallDirectionChange") << int(SwipeSmallDirectionChangeSubTest) << true;
}
void tst_QGestureRecognizer::swipeGesture()
@@ -314,10 +316,17 @@ void tst_QGestureRecognizer::swipeGesture()
case SwipeLineSubTest:
linearSequence(5, moveDelta, swipeSequence, points, &widget);
break;
- case SwipeChangeDirectionSubTest:
+ case SwipeDirectionChangeSubTest:
linearSequence(5, moveDelta, swipeSequence, points, &widget);
linearSequence(3, QPoint(-moveDelta.x(), moveDelta.y()), swipeSequence, points, &widget);
break;
+ case SwipeSmallDirectionChangeSubTest: { // QTBUG-46195, small changes in direction should not cause the gesture to be canceled.
+ const QPoint smallChangeMoveDelta(50, 1);
+ linearSequence(5, smallChangeMoveDelta, swipeSequence, points, &widget);
+ linearSequence(1, QPoint(smallChangeMoveDelta.x(), -3), swipeSequence, points, &widget);
+ linearSequence(5, smallChangeMoveDelta, swipeSequence, points, &widget);
+ }
+ break;
}
releaseSequence(swipeSequence, points, &widget);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro
index 527f62b22d..66e39869bb 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro
@@ -5,5 +5,5 @@ QT += core-private gui-private
SOURCES += tst_qgraphicsitem.cpp
DEFINES += QT_NO_CAST_TO_ASCII
-win32:!wince*:!winrt: LIBS += -luser32
+win32:!wince:!winrt: LIBS += -luser32
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 05a97dc2f3..9d55852c2f 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -3670,6 +3670,14 @@ void tst_QGraphicsProxyWidget::QTBUG_6986_sendMouseEventToAlienWidget()
QTRY_COMPARE(scene.hoverButton->hoverLeaveReceived, true);
}
+static QByteArray msgPointMismatch(const QPoint &actual, const QPoint &expected)
+{
+ QString result;
+ QDebug(&result) << actual << " != " << expected << " manhattanLength="
+ << (expected - actual).manhattanLength();
+ return result.toLocal8Bit();
+}
+
void tst_QGraphicsProxyWidget::mapToGlobal() // QTBUG-41135
{
const QRect availableGeometry = QGuiApplication::primaryScreen()->availableGeometry();
@@ -3681,20 +3689,29 @@ void tst_QGraphicsProxyWidget::mapToGlobal() // QTBUG-41135
view.move(availableGeometry.bottomRight() - QPoint(size.width(), size.height()) - QPoint(100, 100));
QWidget *embeddedWidget = new QWidget;
embeddedWidget->setFixedSize(size / 2);
+ QWidget *childWidget = new QWidget(embeddedWidget);
+ childWidget->setStyleSheet(QLatin1String("background-color: \"red\"; "));
+ childWidget->resize(embeddedWidget->size() / 2);
+ childWidget->move(embeddedWidget->width() / 4, embeddedWidget->height() / 4); // center in embeddedWidget
scene.addWidget(embeddedWidget);
QApplication::setActiveWindow(&view);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- const QPoint embeddedCenter = embeddedWidget->geometry().center();
+ const QPoint embeddedCenter = embeddedWidget->rect().center();
const QPoint embeddedCenterGlobal = embeddedWidget->mapToGlobal(embeddedCenter);
QCOMPARE(embeddedWidget->mapFromGlobal(embeddedCenterGlobal), embeddedCenter);
// This should be equivalent to the view center give or take rounding
// errors due to odd window margins
const QPoint viewCenter = view.geometry().center();
QVERIFY2((viewCenter - embeddedCenterGlobal).manhattanLength() <= 2,
- qPrintable(QStringLiteral("%1, %2 != %3, %4")
- .arg(viewCenter.x()).arg(viewCenter.y())
- .arg(embeddedCenterGlobal.x()).arg(embeddedCenterGlobal.y())));
+ msgPointMismatch(embeddedCenterGlobal, viewCenter).constData());
+
+ // Same test with child centered on embeddedWidget
+ const QPoint childCenter = childWidget->rect().center();
+ const QPoint childCenterGlobal = childWidget->mapToGlobal(childCenter);
+ QCOMPARE(childWidget->mapFromGlobal(childCenterGlobal), childCenter);
+ QVERIFY2((viewCenter - childCenterGlobal).manhattanLength() <= 4,
+ msgPointMismatch(childCenterGlobal, viewCenter).constData());
}
void tst_QGraphicsProxyWidget::mapToGlobalWithoutScene() // QTBUG-44509
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro
index a6022e0d7d..25a43d6821 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro
@@ -4,9 +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:!wince:!winrt: LIBS += -luser32
-!wince*:DEFINES += SRCDIR=\\\"$$PWD\\\"
+!wince: DEFINES += SRCDIR=\\\"$$PWD\\\"
DEFINES += QT_NO_CAST_TO_ASCII
wince* {
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 119e9dfecb..d1d4c1ab86 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -2683,7 +2683,7 @@ void tst_QGraphicsView::optimizationFlags_dontSavePainterState()
view.viewport()->repaint();
#ifdef Q_OS_MAC
- // Repaint on Mac OS X actually does require spinning the event loop.
+ // Repaint on OS X actually does require spinning the event loop.
QTest::qWait(100);
#endif
QVERIFY(!parent->dirtyPainter);
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 90580aea05..eed38752d9 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -197,16 +197,11 @@ class tst_QAbstractItemView : public QObject
Q_OBJECT
public:
-
- tst_QAbstractItemView();
- virtual ~tst_QAbstractItemView();
void basic_tests(TestView *view);
-public slots:
- void initTestCase();
- void cleanupTestCase();
-
private slots:
+ void initTestCase();
+ void cleanup();
void getSetCheck();
void emptyModels_data();
void emptyModels();
@@ -360,14 +355,6 @@ void tst_QAbstractItemView::getSetCheck()
QCOMPARE(16, obj1->autoScrollMargin());
}
-tst_QAbstractItemView::tst_QAbstractItemView()
-{
-}
-
-tst_QAbstractItemView::~tst_QAbstractItemView()
-{
-}
-
void tst_QAbstractItemView::initTestCase()
{
#ifdef Q_OS_WINCE_WM
@@ -375,8 +362,9 @@ void tst_QAbstractItemView::initTestCase()
#endif
}
-void tst_QAbstractItemView::cleanupTestCase()
+void tst_QAbstractItemView::cleanup()
{
+ QVERIFY(QApplication::topLevelWidgets().isEmpty());
}
void tst_QAbstractItemView::emptyModels_data()
@@ -1330,8 +1318,7 @@ void tst_QAbstractItemView::task200665_itemEntered()
moveCursorAway(&view);
view.show();
QVERIFY(QTest::qWaitForWindowExposed(&view));
- QRect rect = view.visualRect(model.index(0,0));
- QCursor::setPos( view.viewport()->mapToGlobal(rect.center()) );
+ QCursor::setPos( view.geometry().center() );
QCoreApplication::processEvents();
QSignalSpy spy(&view, SIGNAL(entered(QModelIndex)));
view.verticalScrollBar()->setValue(view.verticalScrollBar()->maximum());
diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
index 79848ac22c..f1bc968b88 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|wince {
DEFINES += SRCDIR=\\\"./\\\"
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
index 0bc972d0cb..fba83a24c7 100644
--- a/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
+++ b/tests/auto/widgets/itemviews/qfileiconprovider/tst_qfileiconprovider.cpp
@@ -58,6 +58,8 @@ private slots:
void type_data();
void type();
+
+ void taskQTBUG_46755_QFileIconEngine_crash();
};
// Subclass that exposes the protected functions.
@@ -167,6 +169,21 @@ void tst_QFileIconProvider::type()
QVERIFY(!provider.type(info).isEmpty());
}
+static QIcon getIcon()
+{
+ QFileIconProvider fip;
+ return fip.icon(QDir::currentPath());
+}
+
+void tst_QFileIconProvider::taskQTBUG_46755_QFileIconEngine_crash()
+{
+ const QIcon &icon = getIcon();
+ foreach (const QSize &size, icon.availableSizes())
+ icon.pixmap(size);
+
+ // No crash, all good.
+}
+
QTEST_MAIN(tst_QFileIconProvider)
#include "tst_qfileiconprovider.moc"
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
index 313cadd6a1..f7fb41e60c 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:!wince:!winrt: LIBS += -luser32
diff --git a/tests/auto/widgets/itemviews/qlistview/qlistview.pro b/tests/auto/widgets/itemviews/qlistview/qlistview.pro
index b65d0ac7d6..509303b62e 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:!wince:!winrt: LIBS += -luser32
linux*: CONFIG += insignificant_test # Crashes
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
index 1324027af6..340637513c 100644
--- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
@@ -850,7 +850,7 @@ void tst_QTreeView::editTriggers()
case QAbstractItemView::EditKeyPressed:
view.setFocus();
#ifdef Q_OS_MAC
- // Mac OS X uses Enter for editing
+ // OS X uses Enter for editing
QTest::keyPress(&view, Qt::Key_Enter);
#else
// All other platforms use F2
diff --git a/tests/auto/widgets/kernel/qapplication/qapplication.pro b/tests/auto/widgets/kernel/qapplication/qapplication.pro
index 5f369bf61a..3d167827a3 100644
--- a/tests/auto/widgets/kernel/qapplication/qapplication.pro
+++ b/tests/auto/widgets/kernel/qapplication/qapplication.pro
@@ -2,6 +2,6 @@ TEMPLATE = subdirs
SUBDIRS = desktopsettingsaware modal
-win32:!wince*:SUBDIRS += wincmdline
+win32:!wince: SUBDIRS += wincmdline
test.depends += $$SUBDIRS
SUBDIRS += test
diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro
index 7b00ba5293..b617c228ac 100644
--- a/tests/auto/widgets/kernel/qapplication/test/test.pro
+++ b/tests/auto/widgets/kernel/qapplication/test/test.pro
@@ -10,6 +10,6 @@ TARGET = ../tst_qapplication
TESTDATA = ../test/test.pro ../tmp/README
SUBPROGRAMS = desktopsettingsaware modal
-win32: !wince*: SUBPROGRAMS += wincmdline
+win32:!wince: 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 c33fd5a951..15532bf4fd 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1302,7 +1302,7 @@ void DeleteLaterWidget::checkDeleteLater()
void tst_QApplication::testDeleteLater()
{
#ifdef Q_OS_MAC
- QSKIP("This test fails and then hangs on Mac OS X, see QTBUG-24318");
+ QSKIP("This test fails and then hangs on OS X, see QTBUG-24318");
#endif
int argc = 0;
QApplication app(argc, 0);
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
index 0de9e188a0..d7746a2ee1 100644
--- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
+++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp
@@ -103,6 +103,10 @@ void tst_QToolTip::task183679()
Widget_task183679 widget;
widget.move(QGuiApplication::primaryScreen()->availableGeometry().topLeft() + QPoint(50, 50));
+ // Ensure cursor is not over tooltip, which causes it to hide
+#ifndef QT_NO_CURSOR
+ QCursor::setPos(widget.geometry().topRight() + QPoint(-50, 50));
+#endif
widget.setWindowTitle(QLatin1String(QTest::currentTestFunction())
+ QLatin1Char(' ') + QLatin1String(QTest::currentDataTag()));
widget.show();
diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro
index aae083d45e..a3fd622896 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
}
-!wince*:win32:!winrt: LIBS += -luser32 -lgdi32
+win32:!wince:!winrt: LIBS += -luser32 -lgdi32
diff --git a/tests/auto/widgets/styles/styles.pro b/tests/auto/widgets/styles/styles.pro
index 508b6ecd41..0de9dfcdab 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|wince: SUBDIRS -= \
qstylesheetstyle \
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index 619c62d7c0..1d995b5eea 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -187,7 +187,7 @@ void tst_QLabel::cleanup()
}
}
-// Set buddy doesn't make much sense on Mac OS X
+// Set buddy doesn't make much sense on OS X
#ifndef Q_OS_MAC
void tst_QLabel::setBuddy()
{
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 1037d94734..0b7189179d 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -100,7 +100,7 @@ void tst_QScrollBar::scrollSingleStep()
QTest::qWait(510); // initial delay is 500 for setRepeatAction
disconnect(&testWidget, &QAbstractSlider::actionTriggered, &testWidget, &SingleStepTestScrollBar::hideAndShow);
#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "This test fails on Mac OS X, see QTBUG-25272", Abort);
+ QEXPECT_FAIL("", "This test fails on OS X, see QTBUG-25272", Abort);
#endif
QCOMPARE(testWidget.value(), testWidget.singleStep());
}
diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro
index c367959cbc..92c2f6cb7e 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:!wince:!winrt: LIBS += -luser32
diff --git a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
index 4f82123596..5f1c72153d 100644
--- a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
+++ b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
@@ -9,7 +9,7 @@ SOURCES += tst_qimagereader.cpp
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
QT += network
-wince*: {
+wince {
addFiles.files = images
addFiles.path = .
diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp
index 432e651678..f057a58ff0 100644
--- a/tests/manual/diaglib/qwidgetdump.cpp
+++ b/tests/manual/diaglib/qwidgetdump.cpp
@@ -58,6 +58,8 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w,
str << (w->testAttribute(Qt::WA_Mapped) ? "[mapped] " : "[not mapped] ");
if (w->testAttribute(Qt::WA_DontCreateNativeAncestors))
str << "[NoNativeAncestors] ";
+ if (const int states = w->windowState())
+ str << "windowState=" << hex << showbase << states << dec << noshowbase << ' ';
formatRect(str, w->geometry());
if (!(options & DontPrintWindowFlags)) {
str << ' ';
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp
index ca76d7b80d..a77bae22e9 100644
--- a/tests/manual/diaglib/qwindowdump.cpp
+++ b/tests/manual/diaglib/qwindowdump.cpp
@@ -131,6 +131,8 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option
str << "[top] ";
if (w->isExposed())
str << "[exposed] ";
+ if (const Qt::WindowState state = w->windowState())
+ str << "windowState=" << state << ' ';
formatRect(str, w->geometry());
if (!(options & DontPrintWindowFlags)) {
str << ' ';
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
index 0a1987d647..cffe76b2b4 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -58,7 +58,7 @@ contains(QT_CONFIG, opengl) {
win32 {
SUBDIRS -= network_remote_stresstest network_stresstest
# disable some tests on wince because of missing dependencies
- wince*:SUBDIRS -= lance windowmodality
+ wince: SUBDIRS -= lance windowmodality
}
lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qmimedatabase qnetworkreply \
diff --git a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
index 1e26af8f57..af11e2a098 100644
--- a/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
+++ b/tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp
@@ -140,10 +140,12 @@ private:
QTableView *setupTableView()
{
tableView = new QTableView;
- m.setRowCount(500);
+ const int rowCount = 200;
+ m.setRowCount(rowCount);
m.setColumnCount(250);
tableView->setSelectionMode(QAbstractItemView::SingleSelection);
tableView->setModel(&m);
+ tableView->verticalHeader()->swapSections(rowCount - 1, 5);
return tableView;
}