summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/cmake/CMakeLists.txt7
-rw-r--r--tests/auto/cmake/test_testlib_definitions/CMakeLists.txt4
-rw-r--r--tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp16
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp11
-rw-r--r--tests/auto/corelib/io/qdatastream/qdatastream.pro2
-rw-r--r--tests/auto/corelib/io/qdir/qdir.pro2
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp6
-rw-r--r--tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp2
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp4
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp2
-rw-r--r--tests/auto/corelib/io/qiodevice/qiodevice.pro2
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp2
-rw-r--r--tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp2
-rw-r--r--tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro2
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp38
-rw-r--r--tests/auto/corelib/io/qresourceengine/qresourceengine.pro2
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp6
-rw-r--r--tests/auto/corelib/io/qstandardpaths/BLACKLIST2
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp8
-rw-r--r--tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp16
-rw-r--r--tests/auto/corelib/kernel/qtranslator/qtranslator.pro2
-rw-r--r--tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp2
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp27
-rw-r--r--tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp93
-rw-r--r--tests/auto/corelib/tools/qbytearray/qbytearray.pro2
-rw-r--r--tests/auto/corelib/tools/qchar/qchar.pro2
-rw-r--r--tests/auto/corelib/tools/qcollator/tst_qcollator.cpp2
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp6
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro2
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro2
-rw-r--r--tests/auto/gui/image/qimage/qimage.pro2
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp29
-rw-r--r--tests/auto/gui/image/qimagereader/qimagereader.pro2
-rw-r--r--tests/auto/gui/image/qimagewriter/qimagewriter.pro2
-rw-r--r--tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_16x16.pngbin1454 -> 1335 bytes
-rw-r--r--tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_32x32.pngbin1721 -> 1577 bytes
-rw-r--r--tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_48x48.pngbin1967 -> 1778 bytes
-rw-r--r--tests/auto/gui/image/qpixmap/loadFromData/designer_argb32.pngbin4189 -> 2874 bytes
-rw-r--r--tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_no_alpha.pngbin2431 -> 2365 bytes
-rw-r--r--tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_with_alpha.pngbin1405 -> 1339 bytes
-rw-r--r--tests/auto/gui/kernel/qwindow/BLACKLIST2
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro2
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp22
-rw-r--r--tests/auto/opengl/qgl/BLACKLIST2
-rw-r--r--tests/auto/other/lancelot/images/alpha2x2.pngbin169 -> 78 bytes
-rw-r--r--tests/auto/other/lancelot/images/solid2x2.pngbin169 -> 75 bytes
-rw-r--r--tests/auto/other/lancelot/scripts/statictext.qps20
-rw-r--r--tests/auto/other/lancelot/scripts/text.qps8
-rw-r--r--tests/auto/other/other.pro4
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp2
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp27
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/BLACKLIST4
-rw-r--r--tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp2
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/noise.pngbin7517 -> 6305 bytes
-rw-r--r--tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST6
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp6
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp108
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro2
-rw-r--r--tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp4
-rw-r--r--tests/auto/widgets/kernel/qlayout/qlayout.pro2
-rw-r--r--tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/BLACKLIST3
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp66
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp45
-rw-r--r--tests/auto/widgets/styles/qstyle/qstyle.pro2
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp48
-rw-r--r--tests/auto/widgets/widgets/qcombobox/qtlogoinverted.pngbin2827 -> 2297 bytes
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST2
-rw-r--r--tests/auto/widgets/widgets/qmenu/BLACKLIST3
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp13
-rw-r--r--tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp11
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp13
-rw-r--r--tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro2
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/qvariant.pro1
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp8
-rw-r--r--tests/benchmarks/network/access/qnetworkdiskcache/qnetworkdiskcache.pro3
-rw-r--r--tests/benchmarks/network/access/qnetworkreply_from_cache/qnetworkreply_from_cache.pro2
-rw-r--r--tests/manual/qlocale/calendar.cpp16
-rw-r--r--tests/manual/qlocale/calendar.h16
-rw-r--r--tests/manual/qlocale/currency.cpp16
-rw-r--r--tests/manual/qlocale/currency.h16
-rw-r--r--tests/manual/qlocale/dateformats.cpp16
-rw-r--r--tests/manual/qlocale/dateformats.h16
-rw-r--r--tests/manual/qlocale/info.cpp16
-rw-r--r--tests/manual/qlocale/info.h16
-rw-r--r--tests/manual/qlocale/languages.cpp16
-rw-r--r--tests/manual/qlocale/languages.h16
-rw-r--r--tests/manual/qlocale/main.cpp16
-rw-r--r--tests/manual/qlocale/miscellaneous.cpp16
-rw-r--r--tests/manual/qlocale/miscellaneous.h16
-rw-r--r--tests/manual/qlocale/numberformats.cpp16
-rw-r--r--tests/manual/qlocale/numberformats.h16
-rw-r--r--tests/manual/qlocale/window.cpp16
-rw-r--r--tests/manual/qlocale/window.h16
-rw-r--r--tests/manual/windowtransparency/windowtransparency.cpp16
-rw-r--r--tests/manual/xembed-raster/main.cpp16
-rw-r--r--tests/manual/xembed-raster/rasterwindow.cpp16
-rw-r--r--tests/manual/xembed-raster/rasterwindow.h16
-rw-r--r--tests/manual/xembed-widgets/main.cpp16
-rw-r--r--tests/manual/xembed-widgets/window.cpp16
-rw-r--r--tests/manual/xembed-widgets/window.h16
105 files changed, 855 insertions, 295 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index ad7998a198..c40e3d1140 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -24,7 +24,7 @@ ios: SUBDIRS = corelib gui
wince: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools cmake installed_cmake
!qtHaveModule(opengl): SUBDIRS -= opengl
-!qtHaveModule(gui): SUBDIRS -= gui cmake
+!qtHaveModule(gui): SUBDIRS -= gui
!qtHaveModule(widgets): SUBDIRS -= widgets
!qtHaveModule(printsupport): SUBDIRS -= printsupport
!qtHaveModule(concurrent): SUBDIRS -= concurrent
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 1abbef0d68..c780096854 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -116,13 +116,18 @@ endif()
set(qt_module_includes
Core QObject
- Gui QImage
Network QHostInfo
Sql QSqlError
Test QTestEventList
Xml QDomDocument
)
+if (NOT NO_GUI)
+ list(APPEND qt_module_includes
+ Gui QImage
+ )
+endif()
+
if (NOT NO_WIDGETS)
list(APPEND qt_module_includes
Widgets QWidget
diff --git a/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt b/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
index cc54bf5bc3..6fe7e56d24 100644
--- a/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
+++ b/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt
@@ -34,7 +34,9 @@ macro(test_testlib_project _module)
endmacro()
add_subdirectory(core_only)
-add_subdirectory(gui)
+if(NOT NO_GUI)
+ add_subdirectory(gui)
+endif()
if(NOT NO_WIDGETS)
add_subdirectory(widgets)
endif()
diff --git a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp
index d4b9c3f1f0..1253a32f97 100644
--- a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp
+++ b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp
@@ -1,13 +1,23 @@
/****************************************************************************
**
-** Copyright (C) 2011 Thiago Macieira <thiago@kde.org>
+** Copyright (C) 2016 Thiago Macieira <thiago@kde.org>
** Copyright (C) 2016 Intel Corporation.
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index f608a36214..ce227a6c8b 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -774,6 +774,17 @@ void tst_qmessagehandler::qMessagePattern_data()
<< true << (QList<QByteArray>()
<< ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toUtf8() + "/qDebug"));
+ QTest::newRow("time-time") << "/%{time yyyy - MM - d}/%{time dd-MM-yy}/%{message}"
+ << true << (QList<QByteArray>()
+ << ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toUtf8()
+ + '/' + QDateTime::currentDateTime().toString("dd-MM-yy").toUtf8()
+ + "/qDebug"));
+
+ QTest::newRow("skipped-time-shown-time")
+ << "/%{if-warning}%{time yyyy - MM - d}%{endif}%{if-debug}%{time dd-MM-yy}%{endif}/%{message}"
+ << true << (QList<QByteArray>()
+ << ('/' + QDateTime::currentDateTime().toString("dd-MM-yy").toUtf8() + "/qDebug"));
+
// %{time} should have a padding of 6 so if it takes less than 10 seconds to show
// the first message, there should be 5 spaces
QTest::newRow("time-process") << "<%{time process}>%{message}" << true << (QList<QByteArray>()
diff --git a/tests/auto/corelib/io/qdatastream/qdatastream.pro b/tests/auto/corelib/io/qdatastream/qdatastream.pro
index 961e1933de..291b3eb611 100644
--- a/tests/auto/corelib/io/qdatastream/qdatastream.pro
+++ b/tests/auto/corelib/io/qdatastream/qdatastream.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qdatastream.cpp
TESTDATA += datastream.q42
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdir/qdir.pro b/tests/auto/corelib/io/qdir/qdir.pro
index e8f5d1079a..e5739f7e0a 100644
--- a/tests/auto/corelib/io/qdir/qdir.pro
+++ b/tests/auto/corelib/io/qdir/qdir.pro
@@ -8,7 +8,7 @@ TESTDATA += testdir testData searchdir resources entrylist types tst_qdir.cpp
contains(CONFIG, builtin_testdata): DEFINES += BUILTIN_TESTDATA
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 5780f2508c..3924716b55 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -221,13 +221,13 @@ private:
Q_DECLARE_METATYPE(tst_QDir::UncHandling)
tst_QDir::tst_QDir()
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
: m_dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
#elif !defined(BUILTIN_TESTDATA)
: m_dataPath(QFileInfo(QFINDTESTDATA("testData")).absolutePath())
#endif
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString resourceSourcePath = QStringLiteral(":/android_testdata/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -2115,7 +2115,7 @@ void tst_QDir::equalityOperator_data()
QString pathinroot(QDir::rootPath() + QLatin1String("assets/.."));
#elif defined (Q_OS_WIN)
QString pathinroot("c:/windows/..");
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
QString pathinroot("/system/..");
#elif defined(Q_OS_HAIKU)
QString pathinroot("/boot/..");
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
index 9bba9615ef..6450e9af7b 100644
--- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
+++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp
@@ -118,7 +118,7 @@ private:
void tst_QDirIterator::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString testdata_dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
QString resourceSourcePath = QStringLiteral(":/");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index f10c746618..eea79406c3 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -1180,7 +1180,7 @@ void tst_QFileInfo::fileTimes()
QEXPECT_FAIL("", "WinRT does not allow timestamp handling change in the filesystem due to sandboxing", Continue);
#elif defined(Q_OS_QNX)
QEXPECT_FAIL("", "QNX uses the noatime filesystem option", Continue);
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
if (fileInfo.lastRead() <= beforeRead)
QEXPECT_FAIL("", "Android may use relatime or noatime on mounts", Continue);
#endif
@@ -1622,7 +1622,7 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
QString appPath = QCoreApplication::applicationDirPath();
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
appPath += "/libtst_qfileinfo.so";
#else
appPath += "/tst_qfileinfo";
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 7060cf46ac..fe2a1a562d 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -87,7 +87,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#endif // QT_NO_FILESYSTEMWATCHER
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}
diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro
index 78f5b5e75d..945022a289 100644
--- a/tests/auto/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro
@@ -6,7 +6,7 @@ SOURCES = tst_qiodevice.cpp
TESTDATA += tst_qiodevice.cpp
MOC_DIR=tmp
-android:!android-no-sdk: {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index 2a5d593d9a..5cb532f76b 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -66,7 +66,7 @@ private:
void tst_QIODevice::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QVERIFY(QFileInfo(QStringLiteral("./tst_qiodevice.cpp")).exists()
|| QFile::copy(QStringLiteral(":/tst_qiodevice.cpp"), QStringLiteral("./tst_qiodevice.cpp")));
#endif
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
index 6814302a1f..b7dc3e9ac0 100644
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
@@ -70,7 +70,7 @@ public:
void tst_QLockFile::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("This test requires deploying and running external console applications");
#elif defined(QT_NO_PROCESS)
QSKIP("This test requires QProcess support");
diff --git a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
index a311173c0e..321420c2df 100644
--- a/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
+++ b/tests/auto/corelib/io/qloggingregistry/qloggingregistry.pro
@@ -8,7 +8,7 @@ SOURCES += tst_qloggingregistry.cpp
OTHER_FILES += qtlogging.ini
TESTDATA += qtlogging.ini
-android:!android-no-sdk: {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index 1da9cf38a1..0bc1e77925 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -40,8 +40,6 @@
#include <QtNetwork/QHostInfo>
#include <stdlib.h>
-# include <private/qprocess_p.h> // only so we get QPROCESS_USE_SPAWN
-
typedef void (QProcess::*QProcessFinishedSignal1)(int);
typedef void (QProcess::*QProcessFinishedSignal2)(int, QProcess::ExitStatus);
typedef void (QProcess::*QProcessErrorSignal)(QProcess::ProcessError);
@@ -317,9 +315,6 @@ void tst_QProcess::startDetached()
{
QVERIFY(QProcess::startDetached("testProcessNormal/testProcessNormal",
QStringList() << "arg1" << "arg2"));
-#ifdef QPROCESS_USE_SPAWN
- QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Continue);
-#endif
QCOMPARE(QProcess::startDetached("nonexistingexe"), false);
}
@@ -685,9 +680,6 @@ void tst_QProcess::waitForFinished()
QCOMPARE(output.count("\n"), 10*1024);
process.start("blurdybloop");
-#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
- QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Abort);
-#endif
QVERIFY(!process.waitForFinished());
QCOMPARE(process.error(), QProcess::FailedToStart);
}
@@ -878,6 +870,16 @@ void tst_QProcess::hardExit()
proc.start("testProcessEcho/testProcessEcho");
QVERIFY2(proc.waitForStarted(), qPrintable(proc.errorString()));
+
+#if defined(Q_OS_QNX)
+ // QNX may lose the kill if it's delivered while the forked process
+ // is doing the exec that morphs it into testProcessEcho. It's very
+ // unlikely that a normal application would do such a thing. Make
+ // sure the test doesn't accidentally try to do it.
+ proc.write("A");
+ QVERIFY(proc.waitForReadyRead(5000));
+#endif
+
proc.kill();
QVERIFY(proc.waitForFinished(5000));
@@ -1431,11 +1433,6 @@ void tst_QProcess::createProcessArgumentsModifier()
void tst_QProcess::exitCodeTest()
{
for (int i = 0; i < 255; ++i) {
-#ifdef QPROCESS_USE_SPAWN
- // POSIX reserves exit code 127 when using posix_spawn
- if (i == 127)
- continue;
-#endif
QProcess process;
process.start("testExitCodes/testExitCodes " + QString::number(i));
QVERIFY(process.waitForFinished(5000));
@@ -1446,9 +1443,6 @@ void tst_QProcess::exitCodeTest()
void tst_QProcess::failToStart()
{
-#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
- QSKIP("QProcess cannot detect failure to start when using posix_spawn()");
-#endif
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
qRegisterMetaType<QProcess::ProcessState>("QProcess::ProcessState");
@@ -1519,9 +1513,6 @@ void tst_QProcess::failToStart()
void tst_QProcess::failToStartWithWait()
{
-#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
- QSKIP("QProcess cannot detect failure to start when using posix_spawn()");
-#endif
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
@@ -1551,9 +1542,6 @@ void tst_QProcess::failToStartWithWait()
void tst_QProcess::failToStartWithEventLoop()
{
-#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
- QSKIP("QProcess cannot detect failure to start when using posix_spawn()");
-#endif
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
@@ -1821,9 +1809,6 @@ void tst_QProcess::waitForReadyReadForNonexistantProcess()
QVERIFY(!process.waitForReadyRead()); // used to crash
process.start("doesntexist");
QVERIFY(!process.waitForReadyRead());
-#if defined(QPROCESS_USE_SPAWN) && !defined(Q_OS_QNX)
- QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Abort);
-#endif
QCOMPARE(errorSpy.count(), 1);
QCOMPARE(errorSpy.at(0).at(0).toInt(), 0);
QCOMPARE(errorSpy2.count(), 1);
@@ -2167,9 +2152,6 @@ void tst_QProcess::setNonExistentWorkingDirectory()
// while on Unix with fork it's relative to the child's (with posix_spawn, it could be either).
process.start(QFileInfo("testSetWorkingDirectory/testSetWorkingDirectory").absoluteFilePath());
QVERIFY(!process.waitForFinished());
-#ifdef QPROCESS_USE_SPAWN
- QEXPECT_FAIL("", "QProcess cannot detect failure to start when using posix_spawn()", Continue);
-#endif
QCOMPARE(int(process.error()), int(QProcess::FailedToStart));
#ifdef Q_OS_UNIX
diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
index e8b82b4df7..a39de3c4d5 100644
--- a/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
+++ b/tests/auto/corelib/io/qresourceengine/qresourceengine.pro
@@ -17,6 +17,6 @@ TESTDATA += \
testqrc/*
GENERATED_TESTDATA = $${runtime_resource.target}
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 5c51e69add..561ab193c6 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -36,7 +36,7 @@ class tst_QResourceEngine: public QObject
public:
tst_QResourceEngine()
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
: m_runtimeResourceRcc(QFileInfo(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/runtime_resource.rcc")).absoluteFilePath())
#else
: m_runtimeResourceRcc(QFINDTESTDATA("runtime_resource.rcc"))
@@ -63,7 +63,7 @@ private:
void tst_QResourceEngine::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourcePath(QStringLiteral(":/android_testdata/"));
QString dataPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
@@ -120,7 +120,7 @@ void tst_QResourceEngine::checkStructure_data()
<< QLatin1String("test")
<< QLatin1String("withoutslashes");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
rootContents.insert(1, QLatin1String("android_testdata"));
#endif
diff --git a/tests/auto/corelib/io/qstandardpaths/BLACKLIST b/tests/auto/corelib/io/qstandardpaths/BLACKLIST
deleted file mode 100644
index 8496a620b3..0000000000
--- a/tests/auto/corelib/io/qstandardpaths/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[testRuntimeDirectory]
-rhel-7.1
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 9380b7d73c..f0b9c05810 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -230,7 +230,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+# if defined(Q_OS_ANDROID)
const char nonWritableDir[] = "/data";
# else
const char nonWritableDir[] = "/home";
diff --git a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
index 8f250e4568..a89e5c66ff 100644
--- a/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/auto/corelib/io/qtemporaryfile/qtemporaryfile.pro
@@ -5,6 +5,6 @@ SOURCES = tst_qtemporaryfile.cpp
TESTDATA += tst_qtemporaryfile.cpp
RESOURCES += qtemporaryfile.qrc
-android:!android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index 93a3bc895c..921136e79b 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -93,7 +93,7 @@ void tst_QTemporaryFile::initTestCase()
QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX"));
QCoreApplication::setApplicationName("tst_qtemporaryfile");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
@@ -290,7 +290,7 @@ void tst_QTemporaryFile::nonWritableCurrentDir()
ChdirOnReturn cor(QDir::currentPath());
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QDir::setCurrent("/data");
#else
QDir::setCurrent("/home");
@@ -459,7 +459,7 @@ void tst_QTemporaryFile::renameFdLeak()
{
#ifdef Q_OS_UNIX
-# if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+# if defined(Q_OS_ANDROID)
ChdirOnReturn cor(QDir::currentPath());
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
# endif
@@ -668,7 +668,7 @@ void tst_QTemporaryFile::createNativeFile_data()
QTest::addColumn<bool>("valid");
QTest::addColumn<QByteArray>("content");
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
const QString nativeFilePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/resources/test.txt");
#else
const QString nativeFilePath = QFINDTESTDATA("resources/test.txt");
diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
index 838120bb68..914f9e2b9b 100644
--- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
+++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp
@@ -54,6 +54,7 @@ private slots:
void qvariantCast();
void constPointer();
+ void constQPointer();
};
void tst_QPointer::constructors()
@@ -397,6 +398,21 @@ void tst_QPointer::constPointer()
delete fp.data();
}
+void tst_QPointer::constQPointer()
+{
+ // Check that const QPointers work. It's a bit weird to mark a pointer
+ // const if its value can change, but the shallow-const principle in C/C++
+ // allows this, and people use it, so document it with a test.
+ //
+ // It's unlikely that this test will fail in and out of itself, but it
+ // presents the use-case to static and dynamic checkers that can raise
+ // a warning (hopefully) should this become an issue.
+ QObject *o = new QObject(this);
+ const QPointer<QObject> p = o;
+ delete o;
+ QVERIFY(!p);
+}
+
QTEST_MAIN(tst_QPointer)
#include "tst_qpointer.moc"
diff --git a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
index 63189e5562..e673278920 100644
--- a/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
+++ b/tests/auto/corelib/kernel/qtranslator/qtranslator.pro
@@ -4,6 +4,6 @@ QT = core testlib
SOURCES = tst_qtranslator.cpp
RESOURCES += qtranslator.qrc
-android:!android-no-sdk: RESOURCES += android_testdata.qrc
+android: RESOURCES += android_testdata.qrc
else: TESTDATA += dependencies_la.qm hellotr_la.qm msgfmt_from_po.qm
diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
index 59ea484355..66971af7b4 100644
--- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
+++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp
@@ -64,7 +64,7 @@ tst_QTranslator::tst_QTranslator()
void tst_QTranslator::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString sourceDir(":/android_testdata/");
QDirIterator it(sourceDir, QDirIterator::Subdirectories);
while (it.hasNext()) {
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 32c2154da6..7f6e26eecb 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -276,6 +276,8 @@ private slots:
void compareSanity_data();
void compareSanity();
+ void accessSequentialContainerKey();
+
private:
void dataStream_data(QDataStream::Version version);
void loadQVariantFromDataStream(QDataStream::Version version);
@@ -4763,5 +4765,30 @@ void tst_QVariant::compareSanity()
}
}
+void tst_QVariant::accessSequentialContainerKey()
+{
+ QString nameResult;
+
+ {
+ QMap<QString, QObject*> mapping;
+ QString name = QString::fromLatin1("Seven");
+ mapping.insert(name, Q_NULLPTR);
+
+ QVariant variant = QVariant::fromValue(mapping);
+
+ QAssociativeIterable iterable = variant.value<QAssociativeIterable>();
+ QAssociativeIterable::const_iterator iit = iterable.begin();
+ const QAssociativeIterable::const_iterator end = iterable.end();
+ for ( ; iit != end; ++iit) {
+ nameResult += iit.key().toString();
+ }
+ } // Destroy mapping
+ // Regression test for QTBUG-52246 - no memory corruption/double deletion
+ // of the string key.
+
+ QCOMPARE(nameResult, QStringLiteral("Seven"));
+}
+
+
QTEST_MAIN(tst_QVariant)
#include "tst_qvariant.moc"
diff --git a/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp b/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp
index fe465df395..5f5252aa96 100644
--- a/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp
+++ b/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp
@@ -174,9 +174,6 @@ private Q_SLOTS:
void fetchAndSub_data() { addData(); }
void fetchAndSub();
- void addSub_data() { addData(); }
- void addSub();
-
void fetchAndOr_data() { addData(); }
void fetchAndOr();
@@ -656,96 +653,6 @@ void tst_QAtomicIntegerXX::fetchAndSub()
}
}
-void tst_QAtomicIntegerXX::addSub()
-{
- QFETCH(LargeInt, value);
- QAtomicInteger<T> atomic(value);
-
- // note: this test has undefined behavior for signed max and min
- T parcel1 = 42;
- T parcel2 = T(0-parcel1);
- T newValue1 = T(value) + parcel1;
- T newValue2 = T(value) - parcel1;
-
- QCOMPARE(atomic.fetchAndAddRelaxed(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndSubRelaxed(parcel1), newValue1);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubRelaxed(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndAddRelaxed(parcel1), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndAddRelaxed(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndSubRelaxed(parcel2), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubRelaxed(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndAddRelaxed(parcel2), newValue1);
- QCOMPARE(atomic.load(), T(value));
-
- QCOMPARE(atomic.fetchAndAddAcquire(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndSubAcquire(parcel1), newValue1);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubAcquire(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndAddAcquire(parcel1), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndAddAcquire(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndSubAcquire(parcel2), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubAcquire(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndAddAcquire(parcel2), newValue1);
- QCOMPARE(atomic.load(), T(value));
-
- QCOMPARE(atomic.fetchAndAddRelease(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndSubRelease(parcel1), newValue1);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubRelease(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndAddRelease(parcel1), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndAddRelease(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndSubRelease(parcel2), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubRelease(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndAddRelease(parcel2), newValue1);
- QCOMPARE(atomic.load(), T(value));
-
- QCOMPARE(atomic.fetchAndAddOrdered(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndSubOrdered(parcel1), newValue1);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubOrdered(parcel1), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndAddOrdered(parcel1), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndAddOrdered(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue2);
- QCOMPARE(atomic.fetchAndSubOrdered(parcel2), newValue2);
- QCOMPARE(atomic.load(), T(value));
- QCOMPARE(atomic.fetchAndSubOrdered(parcel2), T(value));
- QCOMPARE(atomic.load(), newValue1);
- QCOMPARE(atomic.fetchAndAddOrdered(parcel2), newValue1);
- QCOMPARE(atomic.load(), T(value));
-
- // operator+= and operator-=
- QCOMPARE(atomic += parcel1, newValue1);
- QCOMPARE(atomic -= parcel1, T(value));
- QCOMPARE(atomic -= parcel1, newValue2);
- QCOMPARE(atomic += parcel1, T(value));
- QCOMPARE(atomic += parcel2, newValue2);
- QCOMPARE(atomic -= parcel2, T(value));
- QCOMPARE(atomic -= parcel2, newValue1);
- QCOMPARE(atomic += parcel2, T(value));
-}
-
void tst_QAtomicIntegerXX::fetchAndOr()
{
QFETCH(LargeInt, value);
diff --git a/tests/auto/corelib/tools/qbytearray/qbytearray.pro b/tests/auto/corelib/tools/qbytearray/qbytearray.pro
index a4501611d6..f59cdf3524 100644
--- a/tests/auto/corelib/tools/qbytearray/qbytearray.pro
+++ b/tests/auto/corelib/tools/qbytearray/qbytearray.pro
@@ -10,7 +10,7 @@ mac {
LIBS += -framework Foundation
}
-android: !android-no-sdk {
+android {
RESOURCES += \
android_testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qchar/qchar.pro b/tests/auto/corelib/tools/qchar/qchar.pro
index 771e4290b8..012e591298 100644
--- a/tests/auto/corelib/tools/qchar/qchar.pro
+++ b/tests/auto/corelib/tools/qchar/qchar.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qchar.cpp
TESTDATA += data/NormalizationTest.txt
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
index f2f1038dc2..d09910fd5c 100644
--- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
+++ b/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
@@ -165,7 +165,7 @@ void tst_QCollator::compare()
QCollator collator(locale);
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
if (collator.locale() != QLocale())
QSKIP("Posix implementation of collation only supports default locale");
#endif
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
index 319b04fa1a..a54ad3d9c9 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
@@ -512,7 +512,7 @@ void tst_QCommandLineParser::testVersionOption()
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#else
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -578,7 +578,7 @@ void tst_QCommandLineParser::testHelpOption()
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
#else
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#endif
@@ -625,7 +625,7 @@ void tst_QCommandLineParser::testQuoteEscaping()
{
#ifdef QT_NO_PROCESS
QSKIP("This test requires QProcess support");
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
QSKIP("Deploying executable applications to file system on Android not supported.");
#else
QCoreApplication app(empty_argc, empty_argv);
diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
index 15a57c692e..7fead5938b 100644
--- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qcryptographichash.cpp
TESTDATA += data/*
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
index 9d26ec1fd5..8e0216b175 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
@@ -5,7 +5,7 @@ SOURCES = tst_qtextboundaryfinder.cpp
TESTDATA += data
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro
index d32e84c0d7..36d64a275f 100644
--- a/tests/auto/gui/image/qimage/qimage.pro
+++ b/tests/auto/gui/image/qimage/qimage.pro
@@ -5,6 +5,6 @@ SOURCES += tst_qimage.cpp
QT += core-private gui-private testlib
contains(QT_CONFIG, c++11): CONFIG += c++11
-android:!android-no-sdk:RESOURCES+=qimage.qrc
+android: RESOURCES+=qimage.qrc
TESTDATA += images/*
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index dd10ba2e82..cc75846fdd 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -193,6 +193,7 @@ private slots:
void metadataPassthrough();
void pixelColor();
+ void pixel();
private:
const QString m_prefix;
@@ -3077,5 +3078,33 @@ void tst_QImage::pixelColor()
QCOMPARE(t.pixel(0,0), argb32pm.pixel(0,0));
}
+void tst_QImage::pixel()
+{
+ {
+ QImage mono(1, 1, QImage::Format_Mono);
+ QImage monolsb(1, 1, QImage::Format_MonoLSB);
+ QImage indexed(1, 1, QImage::Format_Indexed8);
+
+ mono.fill(0);
+ monolsb.fill(0);
+ indexed.fill(0);
+
+ QCOMPARE(QColor(mono.pixel(0, 0)), QColor(Qt::black));
+ QCOMPARE(QColor(monolsb.pixel(0, 0)), QColor(Qt::black));
+ indexed.pixel(0, 0); // Don't crash
+ }
+
+ {
+ uchar a = 0;
+ QImage mono(&a, 1, 1, QImage::Format_Mono);
+ QImage monolsb(&a, 1, 1, QImage::Format_MonoLSB);
+ QImage indexed(&a, 1, 1, QImage::Format_Indexed8);
+
+ QCOMPARE(QColor(mono.pixel(0, 0)), QColor(Qt::black));
+ QCOMPARE(QColor(monolsb.pixel(0, 0)), QColor(Qt::black));
+ indexed.pixel(0, 0); // Don't crash
+ }
+}
+
QTEST_GUILESS_MAIN(tst_QImage)
#include "tst_qimage.moc"
diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro
index 2ab06abe83..3d35bf59da 100644
--- a/tests/auto/gui/image/qimagereader/qimagereader.pro
+++ b/tests/auto/gui/image/qimagereader/qimagereader.pro
@@ -5,7 +5,7 @@ MOC_DIR=tmp
QT += core-private gui-private network testlib
RESOURCES += qimagereader.qrc
-android: !android-no-sdk {
+android {
RESOURCES += android_testdata.qrc
}
diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
index 31184bffdb..34adedd187 100644
--- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro
+++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
@@ -3,5 +3,5 @@ TARGET = tst_qimagewriter
QT += testlib
SOURCES += tst_qimagewriter.cpp
MOC_DIR=tmp
-android:!android-no-sdk:RESOURCES+= qimagewriter.qrc
+android: RESOURCES+= qimagewriter.qrc
TESTDATA += images/*
diff --git a/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_16x16.png b/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_16x16.png
index e9a995e19e..03b1a65f70 100644
--- a/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_16x16.png
+++ b/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_16x16.png
Binary files differ
diff --git a/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_32x32.png b/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_32x32.png
index 41ef57f94d..0ef47c556d 100644
--- a/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_32x32.png
+++ b/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_32x32.png
Binary files differ
diff --git a/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_48x48.png b/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_48x48.png
index 35d60d138b..2060854802 100644
--- a/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_48x48.png
+++ b/tests/auto/gui/image/qpixmap/convertFromToHICON/icon_8bpp_48x48.png
Binary files differ
diff --git a/tests/auto/gui/image/qpixmap/loadFromData/designer_argb32.png b/tests/auto/gui/image/qpixmap/loadFromData/designer_argb32.png
index 55d8247cfc..a35316b9c9 100644
--- a/tests/auto/gui/image/qpixmap/loadFromData/designer_argb32.png
+++ b/tests/auto/gui/image/qpixmap/loadFromData/designer_argb32.png
Binary files differ
diff --git a/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_no_alpha.png b/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_no_alpha.png
index 28cd2f06d1..3dd2115df1 100644
--- a/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_no_alpha.png
+++ b/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_no_alpha.png
Binary files differ
diff --git a/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_with_alpha.png b/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_with_alpha.png
index 09735a9752..99cbf4f13a 100644
--- a/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_with_alpha.png
+++ b/tests/auto/gui/image/qpixmap/loadFromData/designer_indexed8_with_alpha.png
Binary files differ
diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST
index 0622ba30b7..0cf16b043e 100644
--- a/tests/auto/gui/kernel/qwindow/BLACKLIST
+++ b/tests/auto/gui/kernel/qwindow/BLACKLIST
@@ -1,5 +1,3 @@
-[testInputEvents]
-rhel-7.1
[positioning:default]
ubuntu-14.04
[modalWindowPosition]
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index d4f1d43a74..0d3899ee92 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -9,7 +9,7 @@ SOURCES += tst_qpainter.cpp
TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
task217400.png
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index bbf0c7f0d7..48fa4f7bcc 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -97,7 +97,10 @@ private slots:
void multiConnect();
void writeOnlySocket();
+
+ void writeToClientAndDisconnect_data();
void writeToClientAndDisconnect();
+
void debug();
void bytesWrittenSignal();
void syncDisconnectNotify();
@@ -600,7 +603,7 @@ void tst_QLocalSocket::readBufferOverflow()
serverSocket->write(buffer, dataBufferSize);
#ifndef Q_OS_WIN
// The data is not immediately sent, but buffered.
- // On Windows, the flushing is done asynchronously by a separate thread.
+ // On Windows, the flushing is done by an asynchronous write operation.
// However, this operation will never complete as long as the data is not
// read by the other end, so the call below always times out.
// On Unix, the flushing is synchronous and thus needs to be done before
@@ -1024,8 +1027,16 @@ void tst_QLocalSocket::writeOnlySocket()
QCOMPARE(client.state(), QLocalSocket::ConnectedState);
}
+void tst_QLocalSocket::writeToClientAndDisconnect_data()
+{
+ QTest::addColumn<int>("chunks");
+ QTest::newRow("one chunk") << 1;
+ QTest::newRow("several chunks") << 20;
+}
+
void tst_QLocalSocket::writeToClientAndDisconnect()
{
+ QFETCH(int, chunks);
QLocalServer server;
QLocalSocket client;
QSignalSpy readChannelFinishedSpy(&client, SIGNAL(readChannelFinished()));
@@ -1039,14 +1050,17 @@ void tst_QLocalSocket::writeToClientAndDisconnect()
char buffer[100];
memset(buffer, 0, sizeof(buffer));
- QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer));
- clientSocket->waitForBytesWritten();
+ for (int i = 0; i < chunks; ++i)
+ QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), qint64(sizeof(buffer)));
+ while (clientSocket->bytesToWrite())
+ QVERIFY(clientSocket->waitForBytesWritten());
clientSocket->close();
server.close();
client.waitForDisconnected();
QCOMPARE(readChannelFinishedSpy.count(), 1);
- QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer));
+ const QByteArray received = client.readAll();
+ QCOMPARE(received.size(), qint64(sizeof(buffer) * chunks));
QCOMPARE(client.state(), QLocalSocket::UnconnectedState);
}
diff --git a/tests/auto/opengl/qgl/BLACKLIST b/tests/auto/opengl/qgl/BLACKLIST
index 547a9a2a73..fa7c829b30 100644
--- a/tests/auto/opengl/qgl/BLACKLIST
+++ b/tests/auto/opengl/qgl/BLACKLIST
@@ -1,5 +1,3 @@
-[]
-rhel-7.1
[glWidgetRendering]
windows
[glFBORendering]
diff --git a/tests/auto/other/lancelot/images/alpha2x2.png b/tests/auto/other/lancelot/images/alpha2x2.png
index 67ecc04286..8e99feb4cc 100644
--- a/tests/auto/other/lancelot/images/alpha2x2.png
+++ b/tests/auto/other/lancelot/images/alpha2x2.png
Binary files differ
diff --git a/tests/auto/other/lancelot/images/solid2x2.png b/tests/auto/other/lancelot/images/solid2x2.png
index ad67cd3e12..f34562f964 100644
--- a/tests/auto/other/lancelot/images/solid2x2.png
+++ b/tests/auto/other/lancelot/images/solid2x2.png
Binary files differ
diff --git a/tests/auto/other/lancelot/scripts/statictext.qps b/tests/auto/other/lancelot/scripts/statictext.qps
index c5ddda197f..6b7b97d8fa 100644
--- a/tests/auto/other/lancelot/scripts/statictext.qps
+++ b/tests/auto/other/lancelot/scripts/statictext.qps
@@ -9,7 +9,7 @@ save
setFont "sansserif" 12 normal
drawStaticText 0 40 "sansserif 12pt, normal"
- setFont "sansserif" 10 bold
+ setFont "sansserif" 12 bold
drawStaticText 0 60 "sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
@@ -25,7 +25,7 @@ save
setFont "sansserif" 12 normal
drawStaticText 0 40 "alpha sansserif 12pt, normal"
- setFont "sansserif" 10 bold
+ setFont "sansserif" 12 bold
drawStaticText 0 60 "alpha sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
@@ -43,7 +43,7 @@ save
setFont "sansserif" 12 normal
drawStaticText 0 40 "scaled sansserif 12pt, normal"
- setFont "sansserif" 10 bold
+ setFont "sansserif" 12 bold
drawStaticText 0 60 "scaled sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
@@ -61,7 +61,7 @@ save
setFont "sansserif" 12 normal
drawStaticText 0 40 "flipped sansserif 12pt, normal"
- setFont "sansserif" 10 bold
+ setFont "sansserif" 12 bold
drawStaticText 0 60 "flipped sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
@@ -75,16 +75,16 @@ save
rotate 185
setFont "sansserif" 10 normal
- drawStaticText 0 20 "scaled sansserif 10pt, normal"
+ drawStaticText 0 20 "rotated sansserif 10pt, normal"
setFont "sansserif" 12 normal
- drawStaticText 0 40 "scaled sansserif 12pt, normal"
+ drawStaticText 0 40 "rotated sansserif 12pt, normal"
- setFont "sansserif" 10 bold
- drawStaticText 0 60 "scaled sansserif 12pt, bold"
+ setFont "sansserif" 12 bold
+ drawStaticText 0 60 "rotated sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
- drawStaticText 0 80 "scaled sansserif 10pt, bold italic"
+ drawStaticText 0 80 "rotated sansserif 10pt, bold italic"
restore
translate 0 100
@@ -100,7 +100,7 @@ save
setFont "sansserif" 12 normal
drawStaticText 0 20 "gradient sansserif 12pt, normal"
- setFont "sansserif" 10 bold
+ setFont "sansserif" 12 bold
drawStaticText 0 40 "gradient sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
diff --git a/tests/auto/other/lancelot/scripts/text.qps b/tests/auto/other/lancelot/scripts/text.qps
index 169549a5bd..1b4fe4f064 100644
--- a/tests/auto/other/lancelot/scripts/text.qps
+++ b/tests/auto/other/lancelot/scripts/text.qps
@@ -77,16 +77,16 @@ save
rotate 185
setFont "sansserif" 10 normal
- drawText 0 20 "scaled sansserif 10pt, normal"
+ drawText 0 20 "rotated sansserif 10pt, normal"
setFont "sansserif" 12 normal
- drawText 0 40 "scaled sansserif 12pt, normal"
+ drawText 0 40 "rotated sansserif 12pt, normal"
setFont "sansserif" 12 bold
- drawText 0 60 "scaled sansserif 12pt, bold"
+ drawText 0 60 "rotated sansserif 12pt, bold"
setFont "sansserif" 10 bold italic
- drawText 0 80 "scaled sansserif 10pt, bold italic"
+ drawText 0 80 "rotated sansserif 10pt, bold italic"
restore
translate 0 100
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index c229e7053b..3b264e6b72 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -23,6 +23,10 @@ SUBDIRS=\
qtokenautomaton \
toolsupport \
+!qtHaveModule(gui): SUBDIRS -= \
+ qcomplextext \
+ qprocess_and_guieventloop \
+
!qtHaveModule(widgets): SUBDIRS -= \
gestures \
lancelot \
diff --git a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
index 4b4e456882..1fcb77c51b 100644
--- a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
+++ b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
@@ -42,7 +42,7 @@ void tst_QProcess_and_GuiEventLoop::waitForAndEventLoop()
{
#if defined(QT_NO_PROCESS)
QSKIP("QProcess not supported");
-#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#elif defined(Q_OS_ANDROID)
QSKIP("Not supported on Android");
#else
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 5154351bb1..4a423b036c 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -622,6 +622,8 @@ private slots:
void unnamedNamespaceObjectsAndGadgets();
void veryLongStringData();
void gadgetHierarchy();
+ void optionsFileError_data();
+ void optionsFileError();
signals:
void sigWithUnsignedArg(unsigned foo);
@@ -3497,6 +3499,31 @@ void tst_Moc::gadgetHierarchy()
QCOMPARE(GrandParentGadget::DerivedGadget::staticMetaObject.superClass(), &GrandParentGadget::BaseGadget::staticMetaObject);
}
+void tst_Moc::optionsFileError_data()
+{
+ QTest::addColumn<QString>("optionsArgument");
+ QTest::newRow("no filename") << QStringLiteral("@");
+ QTest::newRow("nonexistent file") << QStringLiteral("@letshuntasnark");
+}
+
+void tst_Moc::optionsFileError()
+{
+#ifdef MOC_CROSS_COMPILED
+ QSKIP("Not tested when cross-compiled");
+#endif
+#if !defined(QT_NO_PROCESS)
+ QFETCH(QString, optionsArgument);
+ QProcess p;
+ p.start(m_moc, QStringList(optionsArgument));
+ QVERIFY(p.waitForFinished());
+ QCOMPARE(p.exitCode(), 1);
+ QVERIFY(p.readAllStandardOutput().isEmpty());
+ const QByteArray err = p.readAllStandardError();
+ QVERIFY(err.contains("moc: "));
+ QVERIFY(!err.contains("QCommandLineParser"));
+#endif
+}
+
QTEST_MAIN(tst_Moc)
// the generated code must compile with QT_NO_KEYWORDS
diff --git a/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST b/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST
index 349fe28aa7..194ce3f556 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST
+++ b/tests/auto/widgets/dialogs/qfontdialog/BLACKLIST
@@ -2,7 +2,3 @@
opensuse-13.1
opensuse-42.1
rhel-7.1
-[setFont]
-ubuntu-14.04
-redhatenterpriselinuxworkstation-6.6
-rhel-7.1
diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
index 5ee015ac64..78d0372ac0 100644
--- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
+++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
@@ -84,7 +84,7 @@ void tst_QSidebar::addUrls()
QAbstractItemModel *model = qsidebar.model();
QDir testDir = QDir::home();
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
// temp and home is the same directory on Android
testDir.mkdir(QStringLiteral("test"));
QVERIFY(testDir.cd(QStringLiteral("test")));
diff --git a/tests/auto/widgets/effects/qpixmapfilter/noise.png b/tests/auto/widgets/effects/qpixmapfilter/noise.png
index 1bebaf528e..c8433602b2 100644
--- a/tests/auto/widgets/effects/qpixmapfilter/noise.png
+++ b/tests/auto/widgets/effects/qpixmapfilter/noise.png
Binary files differ
diff --git a/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST b/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST
index 14c41711ac..7f55c2dae0 100644
--- a/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST
+++ b/tests/auto/widgets/gestures/qgesturerecognizer/BLACKLIST
@@ -1,8 +1,2 @@
[panGesture:Two finger]
xcb
-[swipeGesture:SmallDirectionChange]
-rhel-7.1
-[swipeGesture:Line]
-rhel-7.1
-[pinchGesture:Standard]
-rhel-7.1
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index ac671743f4..c93fc1288f 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1296,7 +1296,7 @@ void tst_QGraphicsProxyWidget::paintEvent()
proxy.paintCount = 0;
w->update();
- QTRY_COMPARE(proxy.paintCount, 1); //the widget should have been painted now
+ QTRY_VERIFY(proxy.paintCount >= 1); //the widget should have been painted now
}
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 0ae69ea59f..a346bb9d1f 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -2675,7 +2675,7 @@ void tst_QGraphicsScene::render()
void tst_QGraphicsScene::renderItemsWithNegativeWidthOrHeight()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Test only works on platforms with resizable windows");
#endif
@@ -2754,7 +2754,7 @@ protected:
void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Test fails on some Android devices (QTBUG-44430)");
#endif
@@ -4027,7 +4027,7 @@ void tst_QGraphicsScene::polishItems2()
void tst_QGraphicsScene::isActive()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Fails on Android (QTBUG-44430)");
#endif
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 2dd0337117..89fb30557b 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -32,6 +32,7 @@
#include <qabstractitemview.h>
#include <qstandarditemmodel.h>
#include <qapplication.h>
+#include <qevent.h>
#include <qlistview.h>
#include <qlistwidget.h>
#include <qtableview.h>
@@ -248,6 +249,8 @@ private slots:
void shiftSelectionAfterChangingModelContents();
void QTBUG48968_reentrant_updateEditorGeometries();
void QTBUG50102_SH_ItemView_ScrollMode();
+ void QTBUG50535_update_on_new_selection_model();
+ void testSelectionModelInSyncWithView();
};
class MyAbstractItemDelegate : public QAbstractItemDelegate
@@ -2067,6 +2070,111 @@ void tst_QAbstractItemView::QTBUG50102_SH_ItemView_ScrollMode()
QCOMPARE(view.horizontalScrollMode(), styleScrollMode);
}
+void tst_QAbstractItemView::QTBUG50535_update_on_new_selection_model()
+{
+ QStandardItemModel model;
+ for (int i = 0; i < 10; ++i)
+ model.appendRow(new QStandardItem(QStringLiteral("%1").arg(i)));
+
+ class ListView : public QListView
+ {
+ public:
+ ListView()
+ : m_paintEventsCount(0)
+ {
+ }
+
+ int m_paintEventsCount;
+
+ protected:
+ bool viewportEvent(QEvent *event) Q_DECL_OVERRIDE
+ {
+ if (event->type() == QEvent::Paint)
+ ++m_paintEventsCount;
+ return QListView::viewportEvent(event);
+ }
+ };
+
+ // keep the current/selected row in the "low range", i.e. be sure it's visible, otherwise we
+ // don't get updates and the test fails.
+
+ ListView view;
+ view.setModel(&model);
+ view.selectionModel()->setCurrentIndex(model.index(1, 0), QItemSelectionModel::SelectCurrent);
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+
+ QItemSelectionModel selectionModel(&model);
+ selectionModel.setCurrentIndex(model.index(2, 0), QItemSelectionModel::Current);
+
+ int oldPaintEventsCount = view.m_paintEventsCount;
+ view.setSelectionModel(&selectionModel);
+ QTRY_VERIFY(view.m_paintEventsCount > oldPaintEventsCount);
+
+
+ QItemSelectionModel selectionModel2(&model);
+ selectionModel2.select(model.index(0, 0), QItemSelectionModel::ClearAndSelect);
+ selectionModel2.setCurrentIndex(model.index(1, 0), QItemSelectionModel::Current);
+
+ oldPaintEventsCount = view.m_paintEventsCount;
+ view.setSelectionModel(&selectionModel2);
+ QTRY_VERIFY(view.m_paintEventsCount > oldPaintEventsCount);
+}
+
+void tst_QAbstractItemView::testSelectionModelInSyncWithView()
+{
+ QStandardItemModel model;
+ for (int i = 0; i < 10; ++i)
+ model.appendRow(new QStandardItem(QStringLiteral("%1").arg(i)));
+
+ class ListView : public QListView
+ {
+ public:
+ using QListView::selectedIndexes;
+ };
+
+ ListView view;
+ QVERIFY(!view.selectionModel());
+
+ view.setModel(&model);
+ QVERIFY(view.selectionModel());
+ QVERIFY(view.selectedIndexes().isEmpty());
+ QVERIFY(view.selectionModel()->selection().isEmpty());
+
+ view.setCurrentIndex(model.index(0, 0));
+ QCOMPARE(view.currentIndex(), model.index(0, 0));
+ QCOMPARE(view.selectionModel()->currentIndex(), model.index(0, 0));
+
+ view.selectionModel()->setCurrentIndex(model.index(1, 0), QItemSelectionModel::SelectCurrent);
+ QCOMPARE(view.currentIndex(), model.index(1, 0));
+ QCOMPARE(view.selectedIndexes(), QModelIndexList() << model.index(1, 0));
+ QCOMPARE(view.selectionModel()->currentIndex(), model.index(1, 0));
+ QCOMPARE(view.selectionModel()->selection().indexes(), QModelIndexList() << model.index(1, 0));
+
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ QItemSelectionModel selectionModel(&model);
+ selectionModel.setCurrentIndex(model.index(2, 0), QItemSelectionModel::Current);
+
+ view.setSelectionModel(&selectionModel);
+ QCOMPARE(view.currentIndex(), model.index(2, 0));
+ QCOMPARE(view.selectedIndexes(), QModelIndexList());
+ QCOMPARE(view.selectionModel()->currentIndex(), model.index(2, 0));
+ QCOMPARE(view.selectionModel()->selection().indexes(), QModelIndexList());
+
+
+ QItemSelectionModel selectionModel2(&model);
+ selectionModel2.select(model.index(0, 0), QItemSelectionModel::ClearAndSelect);
+ selectionModel2.setCurrentIndex(model.index(1, 0), QItemSelectionModel::Current);
+
+ view.setSelectionModel(&selectionModel2);
+ QCOMPARE(view.currentIndex(), model.index(1, 0));
+ QCOMPARE(view.selectedIndexes(), QModelIndexList() << model.index(0, 0));
+ QCOMPARE(view.selectionModel()->currentIndex(), model.index(1, 0));
+ QCOMPARE(view.selectionModel()->selection().indexes(), QModelIndexList() << model.index(0, 0));
+}
QTEST_MAIN(tst_QAbstractItemView)
#include "tst_qabstractitemview.moc"
diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
index f1bc968b88..5190598701 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
+++ b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro
@@ -19,7 +19,7 @@ android|wince {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
index e3a2d3cc99..06019d4555 100644
--- a/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/widgets/itemviews/qdirmodel/tst_qdirmodel.cpp
@@ -111,7 +111,7 @@ void tst_QDirModel::getSetCheck()
void tst_QDirModel::initTestCase()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QString dataPath = SRCDIR;
QString resourceSourcePath = QStringLiteral(":/android_testdata");
QDirIterator it(resourceSourcePath, QDirIterator::Subdirectories);
@@ -613,7 +613,7 @@ void tst_QDirModel::task196768_sorting()
view.setSortingEnabled(true);
index2 = model.index(path);
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QEXPECT_FAIL("", "QTBUG-43818", Continue);
#endif
diff --git a/tests/auto/widgets/kernel/qlayout/qlayout.pro b/tests/auto/widgets/kernel/qlayout/qlayout.pro
index 8bdbde9282..2213767950 100644
--- a/tests/auto/widgets/kernel/qlayout/qlayout.pro
+++ b/tests/auto/widgets/kernel/qlayout/qlayout.pro
@@ -12,7 +12,7 @@ wince* {
TESTDATA += baseline/*
}
-android: !android-no-sdk {
+android {
RESOURCES += \
testdata.qrc
}
diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
index d687c646ff..47fc002196 100644
--- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
+++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp
@@ -341,7 +341,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden()
{
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
+#if defined(Q_OS_ANDROID)
QSKIP("Test does not work on platforms which default to showMaximized()");
#endif
diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST
index 8d18d40e05..4563da8d48 100644
--- a/tests/auto/widgets/kernel/qwidget/BLACKLIST
+++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST
@@ -32,7 +32,6 @@ osx
osx
[widgetAt]
osx
-rhel-7.1
[sheetOpacity]
osx
[resizeEvent]
@@ -65,10 +64,8 @@ osx
osx
[taskQTBUG_4055_sendSyntheticEnterLeave]
osx
-rhel-7.1
[syntheticEnterLeave]
osx
-rhel-7.1
[maskedUpdate]
osx
[hideWhenFocusWidgetIsChild]
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index ae48445363..1a9d7ec4d2 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -456,6 +456,8 @@ private slots:
void qmlSetParentHelper();
+ void testForOutsideWSRangeFlag();
+
private:
bool ensureScreenSize(int width, int height);
QWidget *testWidget;
@@ -10544,5 +10546,69 @@ void tst_QWidget::qmlSetParentHelper()
#endif
}
+void tst_QWidget::testForOutsideWSRangeFlag()
+{
+ // QTBUG-49445
+ {
+ QWidget widget;
+ widget.resize(0, 0);
+ widget.show();
+ QTest::qWait(100); // Wait for a while...
+ QVERIFY(!widget.windowHandle()->isExposed()); // The window should not be visible
+ QVERIFY(widget.isVisible()); // The widget should be in visible state
+ }
+ {
+ QWidget widget;
+
+ QWidget native(&widget);
+ native.setAttribute(Qt::WA_NativeWindow);
+ native.resize(0, 0);
+
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ QVERIFY(!native.windowHandle()->isExposed());
+ }
+ {
+ QWidget widget;
+ QWidget native(&widget);
+
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ QVERIFY(native.isVisible());
+
+ native.resize(0, 0);
+ native.setAttribute(Qt::WA_NativeWindow);
+ QTest::qWait(100); // Wait for a while...
+ QVERIFY(!native.windowHandle()->isExposed());
+ }
+
+ // QTBUG-48321
+ {
+ QWidget widget;
+
+ QWidget native(&widget);
+ native.setAttribute(Qt::WA_NativeWindow);
+
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ QVERIFY(native.windowHandle()->isExposed());
+
+ native.resize(0, 0);
+ QTest::qWait(100); // Wait for a while...
+ QVERIFY(!native.windowHandle()->isExposed());
+ }
+
+ // QTBUG-51788
+ {
+ QWidget widget;
+ widget.setLayout(new QGridLayout);
+ widget.layout()->addWidget(new QLineEdit);
+ widget.resize(0, 0);
+ widget.show();
+ // The layout should change the size, so the widget must be visible!
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ }
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index cd8bce173b..200c8a6ced 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -41,6 +41,8 @@
#include <qboxlayout.h>
#include <qtabwidget.h>
#include <qlabel.h>
+#include <qmainwindow.h>
+#include <qtoolbar.h>
#include <private/qwindow_p.h>
static inline void setFrameless(QWidget *w)
@@ -94,6 +96,8 @@ private slots:
void tst_move_count();
void tst_eventfilter_on_toplevel();
+
+ void QTBUG_50561_QCocoaBackingStore_paintDevice_crash();
};
void tst_QWidget_window::initTestCase()
@@ -790,5 +794,46 @@ void tst_QWidget_window::tst_eventfilter_on_toplevel()
QTRY_COMPARE(filter.eventCount, 1);
}
+class ApplicationStateSaver
+{
+public:
+ ApplicationStateSaver()
+ {
+ QApplication::setAttribute(Qt::AA_NativeWindows, true);
+ QApplication::setQuitOnLastWindowClosed(false);
+ }
+
+ ~ApplicationStateSaver()
+ {
+ QApplication::setAttribute(Qt::AA_NativeWindows, false);
+ QApplication::setQuitOnLastWindowClosed(true);
+ }
+};
+
+void tst_QWidget_window::QTBUG_50561_QCocoaBackingStore_paintDevice_crash()
+{
+ // Keep application state clean if testcase fails
+ ApplicationStateSaver as;
+
+ QMainWindow w;
+ w.addToolBar(new QToolBar(&w));
+ w.show();
+ QTest::qWaitForWindowExposed(&w);
+
+ // Simulate window system close
+ QCloseEvent *e = new QCloseEvent;
+ e->accept();
+ qApp->postEvent(w.windowHandle(), e);
+ qApp->processEvents();
+
+ // Show again
+ w.show();
+ qApp->processEvents();
+
+ // No crash, all good.
+ // Wrap up and leave
+ w.close();
+}
+
QTEST_MAIN(tst_QWidget_window)
#include "tst_qwidget_window.moc"
diff --git a/tests/auto/widgets/styles/qstyle/qstyle.pro b/tests/auto/widgets/styles/qstyle/qstyle.pro
index 4d7473f068..50445b9a45 100644
--- a/tests/auto/widgets/styles/qstyle/qstyle.pro
+++ b/tests/auto/widgets/styles/qstyle/qstyle.pro
@@ -9,7 +9,7 @@ wince* {
DEPLOYMENT += addPixmap
}
-android: !android-no-sdk {
+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 f667d6f8fb..37b72cc99c 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -124,6 +124,8 @@ private slots:
void defaultFont();
void testDrawingShortcuts();
void testFrameOnlyAroundContents();
+
+ void testProxyCalled();
private:
void lineUpLayoutTest(QStyle *);
QWidget *testWidget;
@@ -789,5 +791,51 @@ void tst_QStyle::testFrameOnlyAroundContents()
}
+class ProxyTest: public QProxyStyle
+{
+ Q_OBJECT
+public:
+ ProxyTest(QStyle *style = 0)
+ :QProxyStyle(style)
+ , called(false)
+ {}
+
+ void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const Q_DECL_OVERRIDE {
+ called = true;
+ return QProxyStyle::drawPrimitive(pe, opt, p, w);
+ }
+ mutable bool called;
+};
+
+
+void tst_QStyle::testProxyCalled()
+{
+ QToolButton b;
+ b.setArrowType(Qt::DownArrow);
+ QStyleOptionToolButton opt;
+ opt.init(&b);
+ opt.features |= QStyleOptionToolButton::Arrow;
+ QPixmap surface(QSize(200, 200));
+ QPainter painter(&surface);
+
+ QStringList keys = QStyleFactory::keys();
+ QVector<QStyle*> styles;
+ styles.reserve(keys.size() + 1);
+
+ styles << new QCommonStyle();
+
+ Q_FOREACH (const QString &key, keys) {
+ styles << QStyleFactory::create(key);
+ }
+
+ Q_FOREACH (QStyle *style, styles) {
+ ProxyTest testStyle;
+ testStyle.setBaseStyle(style);
+ style->drawControl(QStyle::CE_ToolButtonLabel, &opt, &painter, &b);
+ QVERIFY(testStyle.called);
+ delete style;
+ }
+}
+
QTEST_MAIN(tst_QStyle)
#include "tst_qstyle.moc"
diff --git a/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png b/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png
index 61efb2f001..af150a697b 100644
--- a/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png
+++ b/tests/auto/widgets/widgets/qcombobox/qtlogoinverted.png
Binary files differ
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST b/tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST
deleted file mode 100644
index a10cf663d0..0000000000
--- a/tests/auto/widgets/widgets/qmdisubwindow/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[setSystemMenu]
-rhel-7.1
diff --git a/tests/auto/widgets/widgets/qmenu/BLACKLIST b/tests/auto/widgets/widgets/qmenu/BLACKLIST
index dbc3e26837..de49d5ff45 100644
--- a/tests/auto/widgets/widgets/qmenu/BLACKLIST
+++ b/tests/auto/widgets/widgets/qmenu/BLACKLIST
@@ -1,5 +1,2 @@
[task258920_mouseBorder]
osx
-rhel-7.1
-[pushButtonPopulateOnAboutToShow]
-rhel-7.1
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 63f3522214..6ad13cd781 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -149,6 +149,7 @@ private slots:
#ifndef QT_NO_CONTEXTMENU
void contextMenu();
#endif
+ void inputMethodCursorRect();
private:
void createSelection();
@@ -1722,5 +1723,17 @@ void tst_QPlainTextEdit::contextMenu()
}
#endif // QT_NO_CONTEXTMENU
+// QTBUG-51923: Verify that the cursor rectangle returned by the input
+// method query correctly reflects the viewport offset.
+void tst_QPlainTextEdit::inputMethodCursorRect()
+{
+ ed->setPlainText("Line1\nLine2Line3\nLine3");
+ ed->moveCursor(QTextCursor::End);
+ const QRectF cursorRect = ed->cursorRect();
+ const QVariant cursorRectV = ed->inputMethodQuery(Qt::ImCursorRectangle);
+ QCOMPARE(cursorRectV.type(), QVariant::RectF);
+ QCOMPARE(cursorRectV.toRect(), cursorRect.toRect());
+}
+
QTEST_MAIN(tst_QPlainTextEdit)
#include "tst_qplaintextedit.moc"
diff --git a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
index a8b0d45ffa..700fa505c1 100644
--- a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
+++ b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
@@ -83,6 +83,7 @@ private slots:
void clearHistory();
void sourceInsideLoadResource();
void textInteractionFlags_vs_readOnly();
+ void inputMethodAttribute_vs_readOnly();
void anchorsWithSelfBuiltHtml();
void relativeNonLocalUrls();
void adjacentAnchors();
@@ -438,6 +439,16 @@ void tst_QTextBrowser::textInteractionFlags_vs_readOnly()
QCOMPARE(browser->textInteractionFlags(), Qt::TextBrowserInteraction);
}
+void tst_QTextBrowser::inputMethodAttribute_vs_readOnly()
+{
+ QVERIFY(browser->isReadOnly());
+ QVERIFY(!browser->testAttribute(Qt::WA_InputMethodEnabled));
+ browser->setReadOnly(false);
+ QVERIFY(browser->testAttribute(Qt::WA_InputMethodEnabled));
+ browser->setReadOnly(true);
+ QVERIFY(!browser->testAttribute(Qt::WA_InputMethodEnabled));
+}
+
void tst_QTextBrowser::anchorsWithSelfBuiltHtml()
{
browser->setHtml("<p>Hello <a href=\"#anchor\">Link</a>"
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 26ccc08f9b..f1ebfda88b 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -186,6 +186,7 @@ private slots:
void inputMethodQuery();
void inputMethodQueryImHints_data();
void inputMethodQueryImHints();
+ void inputMethodCursorRect();
void highlightLongLine();
@@ -2468,6 +2469,18 @@ void tst_QTextEdit::inputMethodQueryImHints()
QCOMPARE(static_cast<Qt::InputMethodHints>(value.toInt()), hints);
}
+// QTBUG-51923: Verify that the cursor rectangle returned by the input
+// method query correctly reflects the viewport offset.
+void tst_QTextEdit::inputMethodCursorRect()
+{
+ ed->setPlainText("Line1\nLine2Line3\nLine3");
+ ed->moveCursor(QTextCursor::End);
+ const QRectF cursorRect = ed->cursorRect();
+ const QVariant cursorRectV = ed->inputMethodQuery(Qt::ImCursorRectangle);
+ QCOMPARE(cursorRectV.type(), QVariant::RectF);
+ QCOMPARE(cursorRectV.toRect(), cursorRect.toRect());
+}
+
void tst_QTextEdit::highlightLongLine()
{
QTextEdit edit;
diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
index 6896b3ff55..8bf8487a5f 100644
--- a/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
+++ b/tests/benchmarks/corelib/kernel/qcoreapplication/qcoreapplication.pro
@@ -1,4 +1,4 @@
-QT += testlib
+QT = core testlib
TEMPLATE = app
TARGET = tst_bench_qcoreapplication
diff --git a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
index 8ea7200d53..8a8e9f25d3 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/benchmarks/corelib/kernel/qvariant/qvariant.pro
@@ -1,5 +1,6 @@
TARGET = tst_bench_qvariant
QT += testlib
+!qtHaveModule(gui): QT -= gui
CONFIG += release
#CONFIG += debug
diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
index 1d4d840ec1..9abb9466df 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -27,7 +27,9 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui/QPixmap>
+#ifdef QT_GUI_LIB
+# include <QtGui/QPixmap>
+#endif
#include <qtest.h>
#define ITERATION_COUNT 1e5
@@ -42,7 +44,9 @@ private slots:
void floatVariantCreation();
void rectVariantCreation();
void stringVariantCreation();
+#ifdef QT_GUI_LIB
void pixmapVariantCreation();
+#endif
void stringListVariantCreation();
void bigClassVariantCreation();
void smallClassVariantCreation();
@@ -153,10 +157,12 @@ void tst_qvariant::stringVariantCreation()
variantCreation<QString>(QString());
}
+#ifdef QT_GUI_LIB
void tst_qvariant::pixmapVariantCreation()
{
variantCreation<QPixmap>(QPixmap());
}
+#endif
void tst_qvariant::stringListVariantCreation()
{
diff --git a/tests/benchmarks/network/access/qnetworkdiskcache/qnetworkdiskcache.pro b/tests/benchmarks/network/access/qnetworkdiskcache/qnetworkdiskcache.pro
index 9de05b5e65..a9e040bf1e 100644
--- a/tests/benchmarks/network/access/qnetworkdiskcache/qnetworkdiskcache.pro
+++ b/tests/benchmarks/network/access/qnetworkdiskcache/qnetworkdiskcache.pro
@@ -1,8 +1,7 @@
TEMPLATE = app
TARGET = tst_bench_qnetworkdiskcache
-QT += gui # for QDesktopServices
-QT += network testlib
+QT = core network testlib
CONFIG += release
diff --git a/tests/benchmarks/network/access/qnetworkreply_from_cache/qnetworkreply_from_cache.pro b/tests/benchmarks/network/access/qnetworkreply_from_cache/qnetworkreply_from_cache.pro
index bd3b34473f..e1fabffe4d 100644
--- a/tests/benchmarks/network/access/qnetworkreply_from_cache/qnetworkreply_from_cache.pro
+++ b/tests/benchmarks/network/access/qnetworkreply_from_cache/qnetworkreply_from_cache.pro
@@ -1,3 +1,3 @@
TARGET = tst_bench_qnetworkreply_from_cache
-QT += network testlib
+QT = core network testlib
SOURCES += tst_qnetworkreply_from_cache.cpp
diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp
index bb0b8fc178..8405660f84 100644
--- a/tests/manual/qlocale/calendar.cpp
+++ b/tests/manual/qlocale/calendar.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h
index b9b623a067..02f9f48886 100644
--- a/tests/manual/qlocale/calendar.h
+++ b/tests/manual/qlocale/calendar.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/currency.cpp b/tests/manual/qlocale/currency.cpp
index bd0d9861de..35f6a70d3e 100644
--- a/tests/manual/qlocale/currency.cpp
+++ b/tests/manual/qlocale/currency.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h
index af433f37a1..cbb5e7ee44 100644
--- a/tests/manual/qlocale/currency.h
+++ b/tests/manual/qlocale/currency.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/dateformats.cpp b/tests/manual/qlocale/dateformats.cpp
index ab9ddb462b..9e70fd4e26 100644
--- a/tests/manual/qlocale/dateformats.cpp
+++ b/tests/manual/qlocale/dateformats.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h
index c9331e1470..228e0e4848 100644
--- a/tests/manual/qlocale/dateformats.h
+++ b/tests/manual/qlocale/dateformats.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/info.cpp b/tests/manual/qlocale/info.cpp
index b60d806ef4..c2a2b12dbe 100644
--- a/tests/manual/qlocale/info.cpp
+++ b/tests/manual/qlocale/info.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h
index 08ad210989..a6a4a6f34c 100644
--- a/tests/manual/qlocale/info.h
+++ b/tests/manual/qlocale/info.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/languages.cpp b/tests/manual/qlocale/languages.cpp
index 64cafcf128..0c4a699b41 100644
--- a/tests/manual/qlocale/languages.cpp
+++ b/tests/manual/qlocale/languages.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h
index 356421e957..ccf6e5face 100644
--- a/tests/manual/qlocale/languages.h
+++ b/tests/manual/qlocale/languages.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp
index 902becce21..36d84d6a48 100644
--- a/tests/manual/qlocale/main.cpp
+++ b/tests/manual/qlocale/main.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/miscellaneous.cpp b/tests/manual/qlocale/miscellaneous.cpp
index 5b77445884..1cf33b3a68 100644
--- a/tests/manual/qlocale/miscellaneous.cpp
+++ b/tests/manual/qlocale/miscellaneous.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h
index 2df5ffad76..8b42c3d37d 100644
--- a/tests/manual/qlocale/miscellaneous.h
+++ b/tests/manual/qlocale/miscellaneous.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/numberformats.cpp b/tests/manual/qlocale/numberformats.cpp
index a6b8a98d20..61ff38427d 100644
--- a/tests/manual/qlocale/numberformats.cpp
+++ b/tests/manual/qlocale/numberformats.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h
index d072ac097c..a28d2f244a 100644
--- a/tests/manual/qlocale/numberformats.h
+++ b/tests/manual/qlocale/numberformats.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/window.cpp b/tests/manual/qlocale/window.cpp
index ac86955f8b..49919523e8 100644
--- a/tests/manual/qlocale/window.cpp
+++ b/tests/manual/qlocale/window.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h
index 0e0a5cbfa3..ea8e9d94aa 100644
--- a/tests/manual/qlocale/window.h
+++ b/tests/manual/qlocale/window.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/windowtransparency/windowtransparency.cpp b/tests/manual/windowtransparency/windowtransparency.cpp
index b23298c430..79b855d3e5 100644
--- a/tests/manual/windowtransparency/windowtransparency.cpp
+++ b/tests/manual/windowtransparency/windowtransparency.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/xembed-raster/main.cpp b/tests/manual/xembed-raster/main.cpp
index 55037a3f25..995b1f0bdb 100644
--- a/tests/manual/xembed-raster/main.cpp
+++ b/tests/manual/xembed-raster/main.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/xembed-raster/rasterwindow.cpp b/tests/manual/xembed-raster/rasterwindow.cpp
index f9bcd60adc..a3a39d5810 100644
--- a/tests/manual/xembed-raster/rasterwindow.cpp
+++ b/tests/manual/xembed-raster/rasterwindow.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/xembed-raster/rasterwindow.h b/tests/manual/xembed-raster/rasterwindow.h
index f58386a896..ee5bbfa82c 100644
--- a/tests/manual/xembed-raster/rasterwindow.h
+++ b/tests/manual/xembed-raster/rasterwindow.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/xembed-widgets/main.cpp b/tests/manual/xembed-widgets/main.cpp
index 56a1406871..1813a11b18 100644
--- a/tests/manual/xembed-widgets/main.cpp
+++ b/tests/manual/xembed-widgets/main.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/xembed-widgets/window.cpp b/tests/manual/xembed-widgets/window.cpp
index 1c1c5061db..6bec696d9d 100644
--- a/tests/manual/xembed-widgets/window.cpp
+++ b/tests/manual/xembed-widgets/window.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
diff --git a/tests/manual/xembed-widgets/window.h b/tests/manual/xembed-widgets/window.h
index 88d8f6cc45..ced50666e8 100644
--- a/tests/manual/xembed-widgets/window.h
+++ b/tests/manual/xembed-widgets/window.h
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are