summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2012-04-17 10:38:24 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-17 10:38:24 +0200
commit16b53b2f0e3f8f64a59c465493a6209eb7f9ab47 (patch)
treebbb63401eb3c56c32ad9bd9be66bae8d3590de6b /tests
parent2c13dc7482690756280cfefe8515eb809b069721 (diff)
parent9bd032355163d92cda5e7e59ecd21214b131f187 (diff)
Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/codecs/utf8/tst_utf8.cpp32
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro2
-rw-r--r--tests/auto/corelib/io/qiodevice/qiodevice.pro2
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp6
-rw-r--r--tests/auto/corelib/io/qtextstream/test/test.pro2
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp48
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp14
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp42
-rw-r--r--tests/auto/corelib/tools/qlocale/test/test.pro1
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp111
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp179
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp60
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro1
-rw-r--r--tests/auto/network/access/qftp/qftp.pro2
-rw-r--r--tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro3
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp17
-rw-r--r--tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp4
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp7
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro3
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro3
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/qtreeview.pro3
-rw-r--r--tests/auto/widgets/widgets/qcombobox/qcombobox.pro3
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro3
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp25
-rw-r--r--tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp7
-rw-r--r--tests/auto/widgets/widgets/qmenubar/qmenubar.pro3
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro2
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtextedit/qtextedit.pro15
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp35
-rw-r--r--tests/auto/xml/dom/qdom/tst_qdom.cpp2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp8
-rw-r--r--tests/manual/bearerex/bearerex.cpp9
-rw-r--r--tests/manual/bearerex/bearerex.h2
-rw-r--r--tests/manual/bearerex/bearerex.pro1
-rw-r--r--tests/manual/bearerex/datatransferer.cpp41
-rw-r--r--tests/manual/bearerex/datatransferer.h17
-rw-r--r--tests/manual/cocoa/qt_on_cocoa/window.cpp2
-rw-r--r--tests/manual/cocoa/wheelevent/main.cpp2
-rw-r--r--tests/manual/cocoa/wheelevent/window.cpp2
-rw-r--r--tests/manual/gestures/gestures.pro4
-rw-r--r--tests/manual/gestures/graphicsview/graphicsview.pro2
-rw-r--r--tests/manual/gestures/graphicsview/main.cpp2
-rw-r--r--tests/manual/gestures/scrollarea/main.cpp2
-rw-r--r--tests/manual/gestures/scrollarea/scrollarea.pro2
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.h4
-rw-r--r--tests/manual/inputmethodhints/inputmethodhints.pro3
-rw-r--r--tests/manual/inputmethodhints/main.cpp2
-rw-r--r--tests/manual/keypadnavigation/keypadnavigation.pro1
-rw-r--r--tests/manual/keypadnavigation/main.cpp2
-rw-r--r--tests/manual/lance/interactivewidget.cpp2
-rw-r--r--tests/manual/lance/interactivewidget.h2
-rw-r--r--tests/manual/lance/lance.pro4
-rw-r--r--tests/manual/lance/main.cpp12
-rw-r--r--tests/manual/lance/widgets.h10
-rw-r--r--tests/manual/manual.pro32
-rw-r--r--tests/manual/network_remote_stresstest/network_remote_stresstest.pro3
-rw-r--r--tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp38
-rw-r--r--tests/manual/network_stresstest/minihttpserver.cpp2
-rw-r--r--tests/manual/network_stresstest/network_stresstest.pro3
-rw-r--r--tests/manual/network_stresstest/tst_network_stresstest.cpp6
-rw-r--r--tests/manual/qdesktopwidget/main.cpp2
-rw-r--r--tests/manual/qdesktopwidget/qdesktopwidget.pro1
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/main.cpp2
-rw-r--r--tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro1
-rw-r--r--tests/manual/qgraphicslayout/flicker/flicker.pro1
-rw-r--r--tests/manual/qgraphicslayout/flicker/main.cpp3
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.h6
-rw-r--r--tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro2
-rw-r--r--tests/manual/qimagereader/main.cpp2
-rw-r--r--tests/manual/qimagereader/qimagereader.pro1
-rw-r--r--tests/manual/qlocale/calendar.cpp2
-rw-r--r--tests/manual/qlocale/calendar.h2
-rw-r--r--tests/manual/qlocale/currency.h2
-rw-r--r--tests/manual/qlocale/dateformats.h2
-rw-r--r--tests/manual/qlocale/info.h2
-rw-r--r--tests/manual/qlocale/languages.h2
-rw-r--r--tests/manual/qlocale/main.cpp2
-rw-r--r--tests/manual/qlocale/miscellaneous.h2
-rw-r--r--tests/manual/qlocale/numberformats.h2
-rw-r--r--tests/manual/qlocale/qlocale.pro1
-rw-r--r--tests/manual/qlocale/window.h2
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp6
-rw-r--r--tests/manual/qnetworkaccessmanager/qget/qget.h2
-rw-r--r--tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro2
-rw-r--r--tests/manual/qnetworkreply/qnetworkreply.pro2
-rw-r--r--tests/manual/qtabletevent/device_information/device_information.pro (renamed from tests/manual/qtabletevent/device_information/qtabletevent.pro)1
-rw-r--r--tests/manual/qtabletevent/device_information/main.cpp2
-rw-r--r--tests/manual/qtabletevent/device_information/tabletwidget.cpp2
-rw-r--r--tests/manual/qtabletevent/event_compression/event_compression.pro2
-rw-r--r--tests/manual/qtabletevent/qtabletevent.pro5
-rw-r--r--tests/manual/qtabletevent/regular_widgets/regular_widgets.pro1
-rw-r--r--tests/manual/qtbug-8933/main.cpp2
-rw-r--r--tests/manual/qtbug-8933/qtbug-8933.pro2
-rw-r--r--tests/manual/qtouchevent/main.cpp2
-rw-r--r--tests/manual/qtouchevent/qtouchevent.pro2
-rw-r--r--tests/manual/qwidget_zorder/main.cpp2
-rw-r--r--tests/manual/qwidget_zorder/qwidget_zorder.pro1
-rw-r--r--tests/manual/repaint/mainwindow/main.cpp2
-rw-r--r--tests/manual/repaint/mainwindow/mainwindow.pro1
-rw-r--r--tests/manual/repaint/repaint.pro9
-rw-r--r--tests/manual/repaint/scrollarea/main.cpp2
-rw-r--r--tests/manual/repaint/scrollarea/scrollarea.pro1
-rw-r--r--tests/manual/repaint/shared/shared.h2
-rw-r--r--tests/manual/repaint/splitter/main.cpp2
-rw-r--r--tests/manual/repaint/splitter/splitter.pro1
-rw-r--r--tests/manual/repaint/tableview/main.cpp2
-rw-r--r--tests/manual/repaint/tableview/tableview.pro1
-rw-r--r--tests/manual/repaint/task141091/main.cpp2
-rw-r--r--tests/manual/repaint/task141091/task141091.pro2
-rw-r--r--tests/manual/repaint/toplevel/main.cpp2
-rw-r--r--tests/manual/repaint/toplevel/toplevel.pro1
-rw-r--r--tests/manual/repaint/widget/main.cpp2
-rw-r--r--tests/manual/repaint/widget/widget.pro1
-rw-r--r--tests/manual/socketengine/main.cpp3
-rw-r--r--tests/manual/socketengine/socketengine.pro4
-rw-r--r--tests/manual/textrendering/glyphshaping/glyphshaping.pro1
-rw-r--r--tests/manual/textrendering/glyphshaping/main.cpp2
-rw-r--r--tests/manual/textrendering/textperformance/main.cpp2
-rw-r--r--tests/manual/textrendering/textperformance/textperformance.pro1
-rw-r--r--tests/manual/textrendering/textrendering.pro4
-rw-r--r--tests/manual/widgets/itemviews/delegate/delegate.pro (renamed from tests/manual/widgets/itemviews/delegate/example.pro)1
-rw-r--r--tests/manual/windowflags/controllerwindow.cpp12
-rw-r--r--tests/manual/windowflags/previewwindow.cpp4
-rw-r--r--tests/manual/windowflags/windowflags.pro2
-rw-r--r--tests/manual/windowmodality/windowmodality.pro (renamed from tests/manual/windowmodality/modality.pro)0
130 files changed, 762 insertions, 260 deletions
diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
index 07ea4c4545..e513b2cea2 100644
--- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
+++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
@@ -233,6 +233,38 @@ void tst_Utf8::nonCharacters_data()
QTest::addColumn<QByteArray>("utf8");
QTest::addColumn<QString>("utf16");
+ // Unicode has a couple of "non-characters" that one can use internally,
+ // but are not allowed to be used for text interchange.
+ //
+ // Those are the last two entries each Unicode Plane (U+FFFE, U+FFFF,
+ // U+1FFFE, U+1FFFF, etc.) as well as the entries between U+FDD0 and
+ // U+FDEF (inclusive)
+
+ // U+FDD0 through U+FDEF
+ for (int i = 0; i < 32; ++i) {
+ char utf8[] = { char(0357), char(0267), char(0220 + i), 0 };
+ QString utf16 = QChar(0xfdd0 + i);
+ QTest::newRow(qPrintable(QString::number(0xfdd0 + i, 16))) << QByteArray(utf8) << utf16;
+ }
+
+ // the last two in Planes 1 through 16
+ for (uint plane = 1; plane <= 16; ++plane) {
+ for (uint lower = 0xfffe; lower < 0x10000; ++lower) {
+ uint ucs4 = (plane << 16) | lower;
+ char utf8[] = { char(0xf0 | uchar(ucs4 >> 18)),
+ char(0x80 | (uchar(ucs4 >> 12) & 0x3f)),
+ char(0x80 | (uchar(ucs4 >> 6) & 0x3f)),
+ char(0x80 | (uchar(ucs4) & 0x3f)),
+ 0 };
+ ushort utf16[] = { QChar::highSurrogate(ucs4), QChar::lowSurrogate(ucs4), 0 };
+
+ QTest::newRow(qPrintable(QString::number(ucs4, 16))) << QByteArray(utf8) << QString::fromUtf16(utf16);
+ }
+ }
+
+ QTest::newRow("fffe") << QByteArray("\xEF\xBF\xBE") << QString(QChar(0xfffe));
+ QTest::newRow("ffff") << QByteArray("\xEF\xBF\xBF") << QString(QChar(0xffff));
+
extern void loadNonCharactersRows();
loadNonCharactersRows();
}
diff --git a/tests/auto/corelib/io/qfile/test/test.pro b/tests/auto/corelib/io/qfile/test/test.pro
index dab5e4a3a5..676762da81 100644
--- a/tests/auto/corelib/io/qfile/test/test.pro
+++ b/tests/auto/corelib/io/qfile/test/test.pro
@@ -10,5 +10,3 @@ TESTDATA += ../dosfile.txt ../noendofline.txt ../testfile.txt \
../resources/file1.ext1
win32: LIBS+=-lole32 -luuid
-
-mac*:CONFIG+=insignificant_test
diff --git a/tests/auto/corelib/io/qiodevice/qiodevice.pro b/tests/auto/corelib/io/qiodevice/qiodevice.pro
index a8295ec79b..c98e3fb8c3 100644
--- a/tests/auto/corelib/io/qiodevice/qiodevice.pro
+++ b/tests/auto/corelib/io/qiodevice/qiodevice.pro
@@ -5,5 +5,3 @@ SOURCES = tst_qiodevice.cpp
TESTDATA += tst_qiodevice.cpp
MOC_DIR=tmp
-
-mac: CONFIG += insignificant_test # QTBUG-22766
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 9b1d5c0b68..29f6fe9da4 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -49,7 +49,7 @@
#include <sys/types.h>
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_BLACKBERRY)
#define Q_XDG_PLATFORM
#endif
@@ -239,12 +239,16 @@ void tst_qstandardpaths::testDataLocation()
{
// On all platforms, DataLocation should be GenericDataLocation / organization name / app name
// This allows one app to access the data of another app.
+ // Blackberry OS is an exception to this case, owing to the fact that
+ // applications are sandboxed.
+#ifndef Q_OS_BLACKBERRY
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/tst_qstandardpaths");
QCoreApplication::instance()->setOrganizationName("Qt");
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/tst_qstandardpaths");
QCoreApplication::instance()->setApplicationName("QtTest");
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/QtTest");
+#endif
#ifdef Q_XDG_PLATFORM
setDefaultLocations();
diff --git a/tests/auto/corelib/io/qtextstream/test/test.pro b/tests/auto/corelib/io/qtextstream/test/test.pro
index 577f52972d..93fb6d232f 100644
--- a/tests/auto/corelib/io/qtextstream/test/test.pro
+++ b/tests/auto/corelib/io/qtextstream/test/test.pro
@@ -19,5 +19,3 @@ TESTDATA += \
../qtextstream.qrc \
../tst_qtextstream.cpp \
../resources
-
-mac: CONFIG += insignificant_test # QTBUG-22767
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
index 4ab4b78da1..bf6a58a24b 100644
--- a/tests/auto/corelib/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -123,6 +123,8 @@ private Q_SLOTS:
void testTrailingComma();
void testDetachBug();
+
+ void valueEquals();
private:
QString testDataDir;
};
@@ -1845,5 +1847,51 @@ void TestQtJson::testDetachBug()
QCOMPARE(local.keys().size(), 1);
}
+void TestQtJson::valueEquals()
+{
+ QVERIFY(QJsonValue() == QJsonValue());
+ QVERIFY(QJsonValue() != QJsonValue(QJsonValue::Undefined));
+ QVERIFY(QJsonValue() != QJsonValue(true));
+ QVERIFY(QJsonValue() != QJsonValue(1.));
+ QVERIFY(QJsonValue() != QJsonValue(QJsonArray()));
+ QVERIFY(QJsonValue() != QJsonValue(QJsonObject()));
+
+ QVERIFY(QJsonValue(true) == QJsonValue(true));
+ QVERIFY(QJsonValue(true) != QJsonValue(false));
+ QVERIFY(QJsonValue(true) != QJsonValue(QJsonValue::Undefined));
+ QVERIFY(QJsonValue(true) != QJsonValue());
+ QVERIFY(QJsonValue(true) != QJsonValue(1.));
+ QVERIFY(QJsonValue(true) != QJsonValue(QJsonArray()));
+ QVERIFY(QJsonValue(true) != QJsonValue(QJsonObject()));
+
+ QVERIFY(QJsonValue(1.) == QJsonValue(1.));
+ QVERIFY(QJsonValue(1.) != QJsonValue(2.));
+ QVERIFY(QJsonValue(1.) != QJsonValue(QJsonValue::Undefined));
+ QVERIFY(QJsonValue(1.) != QJsonValue());
+ QVERIFY(QJsonValue(1.) != QJsonValue(true));
+ QVERIFY(QJsonValue(1.) != QJsonValue(QJsonArray()));
+ QVERIFY(QJsonValue(1.) != QJsonValue(QJsonObject()));
+
+ QVERIFY(QJsonValue(QJsonArray()) == QJsonValue(QJsonArray()));
+ QJsonArray nonEmptyArray;
+ nonEmptyArray.append(true);
+ QVERIFY(QJsonValue(QJsonArray()) != nonEmptyArray);
+ QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonValue::Undefined));
+ QVERIFY(QJsonValue(QJsonArray()) != QJsonValue());
+ QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(true));
+ QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(1.));
+ QVERIFY(QJsonValue(QJsonArray()) != QJsonValue(QJsonObject()));
+
+ QVERIFY(QJsonValue(QJsonObject()) == QJsonValue(QJsonObject()));
+ QJsonObject nonEmptyObject;
+ nonEmptyObject.insert("Key", true);
+ QVERIFY(QJsonValue(QJsonObject()) != nonEmptyObject);
+ QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonValue::Undefined));
+ QVERIFY(QJsonValue(QJsonObject()) != QJsonValue());
+ QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(true));
+ QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(1.));
+ QVERIFY(QJsonValue(QJsonObject()) != QJsonValue(QJsonArray()));
+}
+
QTEST_MAIN(TestQtJson)
#include "tst_qtjson.moc"
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 90d20843e3..f429af7ce2 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -4850,6 +4850,8 @@ signals:
int returnInt(int);
void returnVoid(int);
CustomType returnCustomType(int);
+
+ QObject *returnPointer();
public slots:
QVariant returnVariantSlot(int i) { return i; }
QString returnStringSlot(int i) { return QString::number(i); }
@@ -4858,6 +4860,8 @@ public slots:
void returnVoidSlot() {}
int return23() { return 23; }
QString returnHello() { return QStringLiteral("hello"); }
+ QObject *returnThisSlot1() { return this; }
+ ReturnValue *returnThisSlot2() { return this; }
public:
struct VariantFunctor {
QVariant operator()(int i) { return i; }
@@ -4910,6 +4914,7 @@ void tst_QObject::returnValue()
QCOMPARE(emit r.returnInt(45), int());
emit r.returnVoid(45);
QCOMPARE((emit r.returnCustomType(45)).value(), CustomType().value());
+ QCOMPARE((emit r.returnPointer()), static_cast<QObject *>(0));
}
{ // connected to a slot returning the same type
CheckInstanceCount checker;
@@ -4922,6 +4927,8 @@ void tst_QObject::returnValue()
QCOMPARE(emit r.returnInt(45), int(45));
QVERIFY(connect(&r, &ReturnValue::returnCustomType, &receiver, &ReturnValue::returnCustomTypeSlot, type));
QCOMPARE((emit r.returnCustomType(45)).value(), CustomType(45).value());
+ QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnThisSlot1, type));
+ QCOMPARE((emit r.returnPointer()), static_cast<QObject *>(&receiver));
}
if (!isBlockingQueued) { // connected to simple functions or functor
CheckInstanceCount checker;
@@ -4950,6 +4957,8 @@ void tst_QObject::returnValue()
QCOMPARE((emit r.returnCustomType(48)).value(), CustomType(48).value());
QVERIFY(connect(&r, &ReturnValue::returnVoid, &receiver, &ReturnValue::returnCustomTypeSlot, type));
emit r.returnVoid(48);
+ QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnThisSlot2, type));
+ QCOMPARE((emit r.returnPointer()), static_cast<QObject *>(&receiver));
}
if (!isBlockingQueued) { // connected to functor with different type
CheckInstanceCount checker;
@@ -4974,6 +4983,8 @@ void tst_QObject::returnValue()
QCOMPARE(emit r.returnInt(45), int());
QVERIFY(connect(&r, &ReturnValue::returnCustomType, &receiver, &ReturnValue::returnVoidSlot, type));
QCOMPARE((emit r.returnCustomType(45)).value(), CustomType().value());
+ QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnVoidSlot, type));
+ QCOMPARE((emit r.returnPointer()), static_cast<QObject *>(0));
}
if (!isBlockingQueued) {
// queued connection should not forward the return value
@@ -4987,6 +4998,9 @@ void tst_QObject::returnValue()
QCOMPARE(emit r.returnInt(45), int());
QVERIFY(connect(&r, &ReturnValue::returnCustomType, &receiver, &ReturnValue::returnCustomTypeSlot, Qt::QueuedConnection));
QCOMPARE((emit r.returnCustomType(45)).value(), CustomType().value());
+ QVERIFY(connect(&r, &ReturnValue::returnPointer, &receiver, &ReturnValue::returnThisSlot1, Qt::QueuedConnection));
+ QCOMPARE((emit r.returnPointer()), static_cast<QObject *>(0));
+
QCoreApplication::processEvents();
QVERIFY(connect(&r, &ReturnValue::returnVariant, &receiver, &ReturnValue::returnStringSlot, Qt::QueuedConnection));
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index e72af11fbb..14c43d0088 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -77,6 +77,7 @@ private slots:
void joining();
void combiningClass();
void digitValue();
+ void mirroredChar();
void decomposition();
void lineBreakClass();
void normalization_data();
@@ -523,6 +524,29 @@ void tst_QChar::digitValue()
QVERIFY(QChar::digitValue((ushort)0x1040) == 0);
QVERIFY(QChar::digitValue((uint)0x1049) == 9);
QVERIFY(QChar::digitValue((uint)0x1040) == 0);
+
+ QVERIFY(QChar::digitValue((ushort)0xd800) == -1);
+ QVERIFY(QChar::digitValue((uint)UNICODE_LAST_CODEPOINT + 1) == -1);
+}
+
+void tst_QChar::mirroredChar()
+{
+ QVERIFY(QChar(0x169B).hasMirrored());
+ QVERIFY(QChar(0x169B).mirroredChar() == QChar(0x169C));
+ QVERIFY(QChar(0x169C).hasMirrored());
+ QVERIFY(QChar(0x169C).mirroredChar() == QChar(0x169B));
+
+ QVERIFY(QChar(0x301A).hasMirrored());
+ QVERIFY(QChar(0x301A).mirroredChar() == QChar(0x301B));
+ QVERIFY(QChar(0x301B).hasMirrored());
+ QVERIFY(QChar(0x301B).mirroredChar() == QChar(0x301A));
+
+ if (QChar::currentUnicodeVersion() <= QChar::Unicode_5_0) {
+ QVERIFY(!QChar(0x201C).hasMirrored());
+ QVERIFY(QChar(0x201C).mirroredChar() != QChar(0x201D));
+ QVERIFY(!QChar(0x201D).hasMirrored());
+ QVERIFY(QChar(0x201D).mirroredChar() != QChar(0x201C));
+ }
}
void tst_QChar::decomposition()
@@ -540,10 +564,10 @@ void tst_QChar::decomposition()
{
QString str;
- str += QChar( (0x1D157 - 0x10000) / 0x400 + 0xd800 );
- str += QChar( ((0x1D157 - 0x10000) % 0x400) + 0xdc00 );
- str += QChar( (0x1D165 - 0x10000) / 0x400 + 0xd800 );
- str += QChar( ((0x1D165 - 0x10000) % 0x400) + 0xdc00 );
+ str += QChar(QChar::highSurrogate(0x1D157));
+ str += QChar(QChar::lowSurrogate(0x1D157));
+ str += QChar(QChar::highSurrogate(0x1D165));
+ str += QChar(QChar::lowSurrogate(0x1D165));
QVERIFY(QChar::decomposition(0x1D15e) == str);
}
@@ -626,14 +650,12 @@ void tst_QChar::normalization_data()
for (int j = 0; j < c.size(); ++j) {
bool ok;
uint uc = c.at(j).toInt(&ok, 16);
- if (uc < 0x10000)
+ if (!QChar::requiresSurrogates(uc)) {
columns[i].append(QChar(uc));
- else {
+ } else {
// convert to utf16
- ushort high = QChar::highSurrogate(uc);
- ushort low = QChar::lowSurrogate(uc);
- columns[i].append(QChar(high));
- columns[i].append(QChar(low));
+ columns[i].append(QChar(QChar::highSurrogate(uc)));
+ columns[i].append(QChar(QChar::lowSurrogate(uc)));
}
}
}
diff --git a/tests/auto/corelib/tools/qlocale/test/test.pro b/tests/auto/corelib/tools/qlocale/test/test.pro
index 24dcc0638a..28e127e307 100644
--- a/tests/auto/corelib/tools/qlocale/test/test.pro
+++ b/tests/auto/corelib/tools/qlocale/test/test.pro
@@ -17,3 +17,4 @@ load(testcase) # for target.path and installTestHelperApp()
installTestHelperApp("../syslocaleapp/syslocaleapp",syslocaleapp,syslocaleapp)
mac: CONFIG += insignificant_test # QTBUG-22769
+win32:CONFIG+= insignificant_test # QTBUG-25284
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
index a4c04d6207..f1de1722e2 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
@@ -637,6 +637,52 @@ void tst_QRegularExpression::normalMatch_data()
<< 0
<< QRegularExpression::MatchOptions(QRegularExpression::AnchoredMatchOption)
<< m;
+
+ // ***
+
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured << "678";
+ QTest::newRow("negativeoffset01") << QRegularExpression("\\d+")
+ << "abc123def678ghi"
+ << -6
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
+
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured << "678";
+ QTest::newRow("negativeoffset02") << QRegularExpression("\\d+")
+ << "abc123def678ghi"
+ << -8
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
+
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured << "678ghi" << "678" << "ghi";
+ QTest::newRow("negativeoffset03") << QRegularExpression("(\\d+)(\\w+)")
+ << "abc123def678ghi"
+ << -8
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
+
+ m.clear();
+ m.isValid = true;
+ QTest::newRow("negativeoffset04") << QRegularExpression("\\d+")
+ << "abc123def678ghi"
+ << -3
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
+
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured << "678";
+ QTest::newRow("negativeoffset05") << QRegularExpression("^\\d+", QRegularExpression::MultilineOption)
+ << "a\nbc123\ndef\n678gh\ni"
+ << -10
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
}
@@ -959,6 +1005,31 @@ void tst_QRegularExpression::globalMatch_data()
matchList.clear();
m.clear();
m.isValid = true; m.hasMatch = true;
+ m.captured = QStringList() << "ACA""GTG""CGA""AAA";
+ matchList << m;
+ m.captured = QStringList() << "AAA";
+ matchList << m;
+ m.captured = QStringList() << "AAG""GAA""AAG""AAA";
+ matchList << m;
+ m.captured = QStringList() << "AAA";
+ matchList << m;
+ QTest::newRow("globalmatch03") << QRegularExpression("\\G(?:\\w\\w\\w)*?AAA")
+ << "ACA""GTG""CGA""AAA""AAA""AAG""GAA""AAG""AAA""AAA"
+ << 0
+ << QRegularExpression::NormalMatch
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << matchList;
+
+ QTest::newRow("globalmatch04") << QRegularExpression("(?:\\w\\w\\w)*?AAA")
+ << "ACA""GTG""CGA""AAA""AAA""AAG""GAA""AAG""AAA""AAA"
+ << 0
+ << QRegularExpression::NormalMatch
+ << QRegularExpression::MatchOptions(QRegularExpression::AnchoredMatchOption)
+ << matchList;
+
+ matchList.clear();
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
m.captured = QStringList() << "";
matchList << m;
m.captured = QStringList() << "c";
@@ -1103,6 +1174,46 @@ void tst_QRegularExpression::globalMatch_data()
<< QRegularExpression::NormalMatch
<< QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
<< matchList;
+
+ matchList.clear();
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured = QStringList() << "ABC";
+ matchList << m;
+ m.captured = QStringList() << "";
+ matchList << m;
+ m.captured = QStringList() << "DEF";
+ matchList << m;
+ m.captured = QStringList() << "";
+ matchList << m;
+ m.captured = QStringList() << "GHI";
+ matchList << m;
+ m.captured = QStringList() << "";
+ matchList << m;
+ QTest::newRow("globalmatch_emptycaptures07") << QRegularExpression("[\\x{0000}-\\x{FFFF}]*")
+ << QString::fromUtf8("ABC""\xf0\x9d\x85\x9d""DEF""\xf0\x9d\x85\x9e""GHI")
+ << 0
+ << QRegularExpression::NormalMatch
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << matchList;
+
+ matchList.clear();
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured = QStringList() << QString::fromUtf8("ABC""\xc3\x80");
+ matchList << m;
+ m.captured = QStringList() << "";
+ matchList << m;
+ m.captured = QStringList() << QString::fromUtf8("\xc3\x80""DEF""\xc3\x80");
+ matchList << m;
+ m.captured = QStringList() << "";
+ matchList << m;
+ QTest::newRow("globalmatch_emptycaptures08") << QRegularExpression("[\\x{0000}-\\x{FFFF}]*")
+ << QString::fromUtf8("ABC""\xc3\x80""\xf0\x9d\x85\x9d""\xc3\x80""DEF""\xc3\x80")
+ << 0
+ << QRegularExpression::NormalMatch
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << matchList;
}
void tst_QRegularExpression::globalMatch()
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index 1dc2e551b4..c0242d95c5 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -56,6 +56,7 @@ private slots:
void abortQuitOnShow();
void changeFocusWindow();
void keyboardModifiers();
+ void modalWindow();
};
class DummyWindow : public QWindow
@@ -315,5 +316,183 @@ void tst_QGuiApplication::keyboardModifiers()
delete window;
}
+class BlockableWindow : public QWindow
+{
+ Q_OBJECT
+public:
+ int blocked;
+
+ inline BlockableWindow()
+ : QWindow()
+ {
+ blocked = false;
+ }
+
+ bool event(QEvent *e)
+ {
+ switch (e->type()) {
+ case QEvent::WindowBlocked:
+ ++blocked;
+ break;
+ case QEvent::WindowUnblocked:
+ --blocked;
+ break;
+ default:
+ break;
+ }
+ return QWindow::event(e);
+ }
+};
+
+void tst_QGuiApplication::modalWindow()
+{
+ int argc = 0;
+ QGuiApplication app(argc, 0);
+
+ BlockableWindow *window1 = new BlockableWindow;
+
+ BlockableWindow *window2 = new BlockableWindow;
+
+ BlockableWindow *windowModalWindow1 = new BlockableWindow;
+ windowModalWindow1->setTransientParent(window1);
+ windowModalWindow1->setWindowModality(Qt::WindowModal);
+
+ BlockableWindow *windowModalWindow2 = new BlockableWindow;
+ windowModalWindow2->setTransientParent(windowModalWindow1);
+ windowModalWindow2->setWindowModality(Qt::WindowModal);
+
+ BlockableWindow *applicationModalWindow1 = new BlockableWindow;
+ applicationModalWindow1->setWindowModality(Qt::ApplicationModal);
+
+ // show the 2 windows, nothing is blocked
+ window1->show();
+ window2->show();
+ QTest::qWaitForWindowShown(window1);
+ QTest::qWaitForWindowShown(window2);
+ QCOMPARE(app.modalWindow(), static_cast<QWindow *>(0));
+ QCOMPARE(window1->blocked, 0);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // show applicationModalWindow1, everything is blocked
+ applicationModalWindow1->show();
+ QCOMPARE(app.modalWindow(), applicationModalWindow1);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 1);
+ QCOMPARE(windowModalWindow1->blocked, 1);
+ QCOMPARE(windowModalWindow2->blocked, 1);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // everything is unblocked when applicationModalWindow1 is hidden
+ applicationModalWindow1->hide();
+ QCOMPARE(app.modalWindow(), static_cast<QWindow *>(0));
+ QCOMPARE(window1->blocked, 0);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // show the windowModalWindow1, only window1 is blocked
+ windowModalWindow1->show();
+ QCOMPARE(app.modalWindow(), windowModalWindow1);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // show the windowModalWindow2, windowModalWindow1 is blocked as well
+ windowModalWindow2->show();
+ QCOMPARE(app.modalWindow(), windowModalWindow2);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 1);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // hide windowModalWindow1, nothing is unblocked
+ windowModalWindow1->hide();
+ QCOMPARE(app.modalWindow(), windowModalWindow2);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 1);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // hide windowModalWindow2, windowModalWindow1 and window1 are unblocked
+ windowModalWindow2->hide();
+ QCOMPARE(app.modalWindow(), static_cast<QWindow *>(0));
+ QCOMPARE(window1->blocked, 0);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // show windowModalWindow1 again, window1 is blocked
+ windowModalWindow1->show();
+ QCOMPARE(app.modalWindow(), windowModalWindow1);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // show windowModalWindow2 again, windowModalWindow1 is also blocked
+ windowModalWindow2->show();
+ QCOMPARE(app.modalWindow(), windowModalWindow2);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 1);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // show applicationModalWindow1, everything is blocked
+ applicationModalWindow1->show();
+ QCOMPARE(app.modalWindow(), applicationModalWindow1);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 1);
+ QCOMPARE(windowModalWindow1->blocked, 1);
+ QCOMPARE(windowModalWindow2->blocked, 1);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // hide applicationModalWindow1, windowModalWindow1 and window1 are blocked
+ applicationModalWindow1->hide();
+ QCOMPARE(app.modalWindow(), windowModalWindow2);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 1);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // hide windowModalWindow2, window1 is blocked
+ windowModalWindow2->hide();
+ QCOMPARE(app.modalWindow(), windowModalWindow1);
+ QCOMPARE(window1->blocked, 1);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ // hide windowModalWindow1, everything is unblocked
+ windowModalWindow1->hide();
+ QCOMPARE(app.modalWindow(), static_cast<QWindow *>(0));
+ QCOMPARE(window1->blocked, 0);
+ QCOMPARE(window2->blocked, 0);
+ QCOMPARE(windowModalWindow1->blocked, 0);
+ QCOMPARE(windowModalWindow2->blocked, 0);
+ QCOMPARE(applicationModalWindow1->blocked, 0);
+
+ window2->hide();
+ window1->hide();
+
+ delete applicationModalWindow1;
+ delete windowModalWindow2;
+ delete windowModalWindow1;
+ delete window2;
+ delete window1;
+}
+
QTEST_APPLESS_MAIN(tst_QGuiApplication)
#include "tst_qguiapplication.moc"
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 1cedfa5c01..ea26b9262b 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -75,10 +75,8 @@ private slots:
void serializeSpacing();
void lastResortFont();
void styleName();
-#ifdef QT_BUILD_INTERNAL
void defaultFamily_data();
void defaultFamily();
-#endif
};
// Testing get/set functions
@@ -623,36 +621,62 @@ void tst_QFont::styleName()
#endif
}
-#ifdef QT_BUILD_INTERNAL
+QString getPlatformGenericFont(const char* genericName)
+{
+#if defined(Q_OS_UNIX) && !defined(QT_NO_FONTCONFIG)
+ QProcess p;
+ p.start(QLatin1String("fc-match"), (QStringList() << "-f%{family}" << genericName));
+ if (!p.waitForStarted())
+ qWarning("fc-match cannot be started: %s", qPrintable(p.errorString()));
+ if (p.waitForFinished())
+ return QString::fromLatin1(p.readAllStandardOutput());
+#endif
+ return QLatin1String(genericName);
+}
+
+static inline QByteArray msgNotAcceptableFont(const QString &defaultFamily, const QStringList &acceptableFamilies)
+{
+ QString res = QString::fromLatin1("Font family '%1' is not one of the following accaptable results: ").arg(defaultFamily);
+ Q_FOREACH (const QString &family, acceptableFamilies)
+ res += QString::fromLatin1("\n %1").arg(family);
+ return res.toLocal8Bit();
+}
+
Q_DECLARE_METATYPE(QFont::StyleHint)
void tst_QFont::defaultFamily_data()
{
QTest::addColumn<QFont::StyleHint>("styleHint");
- QTest::addColumn<QString>("defaultFamily");
-
- QTest::newRow("serif") << QFont::Times << "serif";
- QTest::newRow("monospace") << QFont::Monospace << "monospace";
- QTest::newRow("sans-serif") << QFont::SansSerif << "sans-serif";
- QTest::newRow("cursive") << QFont::Cursive << "cursive";
- QTest::newRow("fantasy") << QFont::Fantasy << "fantasy";
- QTest::newRow("old english") << QFont::OldEnglish << "Old English";
+ QTest::addColumn<QStringList>("acceptableFamilies");
+
+ QTest::newRow("serif") << QFont::Serif << (QStringList() << "Times New Roman" << "Times" << getPlatformGenericFont("serif"));
+ QTest::newRow("monospace") << QFont::Monospace << (QStringList() << "Courier New" << "Monaco" << getPlatformGenericFont("monospace"));
+ QTest::newRow("cursive") << QFont::Cursive << (QStringList() << "Comic Sans MS" << "Apple Chancery" << getPlatformGenericFont("cursive"));
+ QTest::newRow("fantasy") << QFont::Fantasy << (QStringList() << "Impact" << "Zapfino" << getPlatformGenericFont("fantasy"));
+ QTest::newRow("sans-serif") << QFont::SansSerif << (QStringList() << "Arial" << "Lucida Grande" << getPlatformGenericFont("sans-serif"));
}
void tst_QFont::defaultFamily()
{
QFETCH(QFont::StyleHint, styleHint);
- QFETCH(QString, defaultFamily);
-
- QFontDatabase db;
- if (!db.hasFamily(defaultFamily))
- QSKIP("Font family is not available on the system");
+ QFETCH(QStringList, acceptableFamilies);
QFont f;
+ QFontDatabase db;
f.setStyleHint(styleHint);
- QCOMPARE(QFontDatabase::resolveFontFamilyAlias(f.defaultFamily()), QFontDatabase::resolveFontFamilyAlias(defaultFamily));
+ const QString familyForHint(f.defaultFamily());
+ // it should at least return a family that is available.
+ QVERIFY(db.hasFamily(familyForHint));
+
+ bool isAcceptable = false;
+ Q_FOREACH (const QString& family, acceptableFamilies) {
+ if (!familyForHint.compare(family, Qt::CaseInsensitive)) {
+ isAcceptable = true;
+ break;
+ }
+ }
+ QVERIFY2(isAcceptable, msgNotAcceptableFont(familyForHint, acceptableFamilies));
}
-#endif // QT_BUILD_INTERNAL
QTEST_MAIN(tst_QFont)
#include "tst_qfont.moc"
diff --git a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
index ef47a4b458..69062bc0c9 100644
--- a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
+++ b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro
@@ -6,4 +6,3 @@ SOURCES += tst_qabstractnetworkcache.cpp
TESTDATA += tests/*
-CONFIG += insignificant_test # QTBUG-20686; note, assumed unstable on all platforms
diff --git a/tests/auto/network/access/qftp/qftp.pro b/tests/auto/network/access/qftp/qftp.pro
index 0f5bd5fe17..7fdf3a46f0 100644
--- a/tests/auto/network/access/qftp/qftp.pro
+++ b/tests/auto/network/access/qftp/qftp.pro
@@ -14,4 +14,4 @@ wince*: {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
-CONFIG+=insignificant_test # uses live qt-test-server, inherently unstable
+CONFIG+=insignificant_test # QTBUG-15111: uses live qt-test-server, inherently unstable
diff --git a/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro b/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro
index 389c8ca4dc..9e37aec5ce 100644
--- a/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro
+++ b/tests/auto/network/socket/qsocks5socketengine/qsocks5socketengine.pro
@@ -10,7 +10,6 @@ MOC_DIR=tmp
QT = core-private network-private testlib
-# QTBUG-23380 - udpTest failing on Ubuntu 11.10 x64
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23380
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index ee49d679f0..977013ab8c 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -1589,6 +1589,22 @@ void tst_QAccessibility::textEditTest()
iface->editableTextInterface()->cutText(12, 16);
QCOMPARE(QApplication::clipboard()->text(), QLatin1String("how "));
QCOMPARE(iface->textInterface()->text(12, 15), QLatin1String("are"));
+
+ QTestAccessibility::clearEvents();
+
+ // select text
+ QTextCursor c = edit.textCursor();
+ c.setPosition(2);
+ c.setPosition(4, QTextCursor::KeepAnchor);
+ edit.setTextCursor(c);
+ QAccessibleTextSelectionEvent sel(&edit, 2, 4);
+ QVERIFY_EVENT(&sel);
+
+ edit.selectAll();
+ int end = edit.textCursor().position();
+ sel.setCursorPosition(end);
+ sel.setSelection(0, end);
+ QVERIFY_EVENT(&sel);
}
QTestAccessibility::clearEvents();
}
@@ -1922,7 +1938,6 @@ void tst_QAccessibility::lineEditTest()
QVERIFY_EVENT(&cursor);
lineEdit->setText("foo");
- qDebug() << QTestAccessibility::events();
cursorEvent.setCursorPosition(3);
QVERIFY_EVENT(&cursorEvent);
diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
index 68a347ebdb..7d34981a73 100644
--- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
+++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp
@@ -129,6 +129,10 @@ void tst_QSqlDriver::record()
QSqlRecord rec = db.driver()->record(tablename);
QCOMPARE(rec.count(), 4);
+ // QTBUG-1363: QSqlField::length() always return -1 when using QODBC3 driver and QSqlDatabase::record()
+ if (db.driverName().startsWith("QODBC") && tst_Databases::isSqlServer(db))
+ QCOMPARE(rec.field(1).length(), 20);
+
if (db.driverName().startsWith("QIBASE")|| db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"))
for(int i = 0; i < fields.count(); ++i)
fields[i] = fields[i].toUpper();
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index f7ce54959e..78e18f9229 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -368,6 +368,13 @@ signals:
void signalInIf3();
#endif
+# //QTBUG-22717
+ # /* */
+#
+
+ # \
+
+//
public slots:
void const slotWithSillyConst() {}
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro
index b32c638948..5796cbfd73 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro
@@ -4,5 +4,3 @@ TARGET = tst_qgraphicsgridlayout
QT += widgets testlib
SOURCES += tst_qgraphicsgridlayout.cpp
CONFIG += parallel_test
-# ### fixme: QTBUG-20756 crashes on xcb
-contains(QT_CONFIG,xcb):CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
index 2f479151dc..59ad89ed1f 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
@@ -7,6 +7,6 @@ QT += core-private gui-private
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
DEFINES += QT_NO_CAST_TO_ASCII
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test # QTBUG-16063
win32|mac:CONFIG += insignificant_test # QTBUG-24296
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
index ca796647c1..2fc45b48de 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/qgraphicswidget.pro
@@ -6,5 +6,4 @@ QT += core-private gui-private
SOURCES += tst_qgraphicswidget.cpp
-# QTBUG-23616 - unstable test
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23616
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index 1158a9f06b..1518403a64 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -1947,8 +1947,8 @@ void tst_QHeaderView::noSectionsWithNegativeSize()
void tst_QHeaderView::emptySectionSpan()
{
- QHeaderViewPrivate::SectionSpan span;
- QCOMPARE(span.sectionSize(), 0);
+ QHeaderViewPrivate::SectionItem section;
+ QCOMPARE(section.sectionSize(), 0);
}
void tst_QHeaderView::task236450_hidden_data()
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
index d47b3bfa31..d1a7686637 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
+++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro
@@ -5,5 +5,4 @@ SOURCES += tst_qitemdelegate.cpp
win32:!wince*: LIBS += -lUser32
-# QTBUG-23637
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test # QTBUG-23637
diff --git a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro
index 95d1ba1c2f..8102b6b95d 100644
--- a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro
+++ b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro
@@ -4,5 +4,4 @@ QT += widgets testlib
QT += widgets-private gui-private core-private
SOURCES += tst_qtreeview.cpp
-# QTBUG-23638
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG+=insignificant_test # QTBUG-23638
diff --git a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
index 03bb91f4c0..e0545630c5 100644
--- a/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
+++ b/tests/auto/widgets/widgets/qcombobox/qcombobox.pro
@@ -3,5 +3,4 @@ TARGET = tst_qcombobox
QT += widgets widgets-private gui-private core-private testlib
SOURCES += tst_qcombobox.cpp
-# QTBUG-23639 - unstable test (related QTBUG-1071)
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23639, (related QTBUG-1071)
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
index 4dd0890fc0..183210b597 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
+++ b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
@@ -3,5 +3,4 @@ TARGET = tst_qdoublespinbox
QT += widgets testlib
SOURCES += tst_qdoublespinbox.cpp
-# QTBUG-23641 - unstable test
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-23641
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index 06bf929e4b..22e05a8871 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -271,6 +271,7 @@ private slots:
void taskQTBUG_7395_readOnlyShortcut();
void QTBUG697_paletteCurrentColorGroup();
void QTBUG13520_textNotVisible();
+ void QTBUG7174_inputMaskCursorBlink();
void bidiVisualMovement_data();
void bidiVisualMovement();
@@ -3693,6 +3694,30 @@ void tst_QLineEdit::QTBUG13520_textNotVisible()
}
+class UpdateRegionLineEdit : public QLineEdit
+{
+public:
+ QRegion updateRegion;
+protected:
+ void paintEvent(QPaintEvent *event)
+ {
+ updateRegion = event->region();
+ }
+};
+
+void tst_QLineEdit::QTBUG7174_inputMaskCursorBlink()
+{
+ UpdateRegionLineEdit edit;
+ edit.setInputMask(QLatin1String("AAAA"));
+ edit.setFocus();
+ edit.setText(QLatin1String("AAAA"));
+ edit.show();
+ QRect cursorRect = edit.inputMethodQuery(Qt::ImMicroFocus).toRect();
+ QTest::qWaitForWindowShown(&edit);
+ edit.updateRegion = QRegion();
+ QTest::qWait(QApplication::cursorFlashTime());
+ QVERIFY(edit.updateRegion.contains(cursorRect));
+}
void tst_QLineEdit::bidiVisualMovement_data()
{
diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
index 70823d92f0..bc5100f118 100644
--- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -98,10 +98,9 @@ static inline void triggerSignal(QMdiSubWindow *window, QMdiArea *workspace,
window->showMaximized();
qApp->processEvents();
window->showNormal();
- qApp->processEvents();
- QVERIFY(!window->isMinimized());
- QVERIFY(!window->isMaximized());
- QVERIFY(!window->isShaded());
+ QTRY_VERIFY(!window->isMinimized());
+ QTRY_VERIFY(!window->isMaximized());
+ QTRY_VERIFY(!window->isShaded());
} else if (signal == SIGNAL(aboutToActivate())) {
if (window->parent()) {
workspace->setActiveSubWindow(window);
diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
index 6bacaa0d37..c74c9e84c1 100644
--- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
+++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
@@ -3,5 +3,4 @@ TARGET = tst_qmenubar
QT += widgets testlib
SOURCES += tst_qmenubar.cpp
-# QTBUG-4965, QTBUG-11823 - unstable tests
-linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
+linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test # QTBUG-4965, QTBUG-11823
diff --git a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro
index e9436eccdc..2863dd2034 100644
--- a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro
+++ b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro
@@ -2,5 +2,3 @@ CONFIG += testcase
TARGET = tst_qscrollbar
QT += widgets testlib
SOURCES += tst_qscrollbar.cpp
-
-mac*:CONFIG+=insignificant_test
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 688daf1f8a..f568322ab7 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -99,6 +99,9 @@ void tst_QScrollBar::scrollSingleStep()
QTest::mouseClick(testWidget, Qt::LeftButton, Qt::NoModifier, QPoint(sr.x(), sr.y()));
QTest::qWait(510); // initial delay is 500 for setRepeatAction
disconnect(testWidget, SIGNAL(actionTriggered(int)), 0, 0);
+#ifdef Q_OS_MAC
+ QEXPECT_FAIL("", "This test fails on Mac OS X, see QTBUG-25272", Abort);
+#endif
QCOMPARE(testWidget->value(), testWidget->singleStep());
}
@@ -136,9 +139,6 @@ void tst_QScrollBar::task_209492()
QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent);
// Check that the action was triggered once.
-#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "Fix does does not work on Mac due to paint architechure differences.", Abort);
-#endif
QCOMPARE(scrollArea.scrollCount, 1);
QCOMPARE(spy.count(), 1);
}
diff --git a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro
index 1c2821b289..6e0fff17d5 100644
--- a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro
+++ b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro
@@ -2,18 +2,5 @@ CONFIG += testcase
TARGET = tst_qtextedit
QT += widgets widgets-private gui-private core-private testlib
-INCLUDEPATH += ../
-HEADERS +=
-SOURCES += tst_qtextedit.cpp
-
-wince* {
- addImages.files = fullWidthSelection/*
- addImages.path = fullWidthSelection
- DEPLOYMENT += addImages
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
-contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20756 crashes on xcb
+SOURCES += tst_qtextedit.cpp
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 9c5a3dbed7..a3f58c4c0d 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -58,6 +58,7 @@
#include <qimagewriter.h>
#include <qcommonstyle.h>
#include <qlayout.h>
+#include <qdir.h>
#include <qabstracttextdocumentlayout.h>
#include <qtextdocumentfragment.h>
@@ -218,6 +219,7 @@ private:
QTextEdit *ed;
qreal rootFrameMargin;
PlatformInputContext m_platformInputContext;
+ const QString m_fullWidthSelectionImagesFolder;
};
bool tst_QTextEdit::nativeClipboardWorking()
@@ -376,13 +378,17 @@ public:
int &iterationCounter;
};
-tst_QTextEdit::tst_QTextEdit()
-{}
+tst_QTextEdit::tst_QTextEdit() :
+ m_fullWidthSelectionImagesFolder(QFINDTESTDATA("fullWidthSelection"))
+{
+
+}
void tst_QTextEdit::initTestCase()
{
QInputMethodPrivate *inputMethodPrivate = QInputMethodPrivate::get(qApp->inputMethod());
inputMethodPrivate->testContext = &m_platformInputContext;
+ QVERIFY2(!m_fullWidthSelectionImagesFolder.isEmpty(), qPrintable(QString::fromLatin1("Cannot locate 'fullWidthSelection' starting from %1").arg(QDir::currentPath())));
}
void tst_QTextEdit::cleanupTestCase()
@@ -1934,12 +1940,18 @@ void tst_QTextEdit::fullWidthSelection_data()
QTest::addColumn<int>("cursorTo");
QTest::addColumn<QString>("imageFileName");
- QTest::newRow("centered fully selected") << 0 << 15 << QString("fullWidthSelection/centered-fully-selected.png");
- QTest::newRow("centered partly selected") << 2 << 15 << QString("fullWidthSelection/centered-partly-selected.png");
- QTest::newRow("last char on line") << 42 << 44 << QString("fullWidthSelection/last-char-on-line.png");
- QTest::newRow("last char on parag") << 545 << 548 << QString("fullWidthSelection/last-char-on-parag.png");
- QTest::newRow("multiple full width lines") << 20 << 60 << QString("fullWidthSelection/multiple-full-width-lines.png");
- QTest::newRow("single full width line") << 20 << 30 << QString("fullWidthSelection/single-full-width-line.png");
+ QTest::newRow("centered fully selected")
+ << 0 << 15 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/centered-fully-selected.png"));
+ QTest::newRow("centered partly selected")
+ << 2 << 15 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/centered-partly-selected.png"));
+ QTest::newRow("last char on line")
+ << 42 << 44 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/last-char-on-line.png"));
+ QTest::newRow("last char on parag")
+ << 545 << 548 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/last-char-on-parag.png"));
+ QTest::newRow("multiple full width lines")
+ << 20 << 60 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/multiple-full-width-lines.png"));
+ QTest::newRow("single full width line")
+ << 20 << 30 << (m_fullWidthSelectionImagesFolder + QStringLiteral("/single-full-width-line.png"));
}
void tst_QTextEdit::fullWidthSelection()
@@ -2053,11 +2065,12 @@ void tst_QTextEdit::compareWidgetAndImage(QTextEdit &widget, const QString &imag
QPainter painter(&image);
widget.viewport()->render(&painter);
painter.end();
- // qDebug() << "file: " << QString(SRCDIR) + imageFileName;
- QImageReader reader(QString(SRCDIR) + imageFileName, "PNG");
+ QImageReader reader(imageFileName, "PNG");
+
QImage original = reader.read();
- QCOMPARE(original.isNull(), false);
+ QVERIFY2(!original.isNull(),
+ qPrintable(QString::fromLatin1("Unable to read image %1: %2").arg(imageFileName, reader.errorString())));
QCOMPARE(original.size(), image.size());
QCOMPARE(image.depth(), 32);
QCOMPARE(original.depth(), image.depth());
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index 1155cd0547..bfd6ff0810 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -1405,7 +1405,7 @@ void tst_QDom::normalizeEndOfLine() const
const QString expected(QLatin1String("<a>\nc\nc\na\na</a>"));
- // ### Qt 5: fix this, if we keep QDom at all
+ // ### Qt 6: fix this, if we keep QDom at all
QEXPECT_FAIL("", "The parser doesn't perform newline normalization. Fixing that would change behavior.", Continue);
QCOMPARE(doc.documentElement().text(), expected);
}
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index 9b10e97f2b..9f9e7e41d5 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1944,7 +1944,7 @@ static inline bool isUnicodeNonCharacter(uint ucs4)
// U+FDEF (inclusive)
return (ucs4 & 0xfffe) == 0xfffe
- || (ucs4 - 0xfdd0U) < 16;
+ || (ucs4 - 0xfdd0U) < 32;
}
int fromUtf8_qt47(ushort *dst, const char *chars, int len)
@@ -1996,7 +1996,7 @@ int fromUtf8_qt47(ushort *dst, const char *chars, int len)
bool nonCharacter;
if (!headerdone && uc == 0xfeff) {
// don't do anything, just skip the BOM
- } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && uc > 0xffff && uc < 0x110000) {
+ } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && QChar::requiresSurrogates(uc) && uc < 0x110000) {
// surrogate pair
//Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length());
*qch++ = QChar::highSurrogate(uc);
@@ -2102,7 +2102,7 @@ int fromUtf8_qt47_stateless(ushort *dst, const char *chars, int len)
bool nonCharacter;
if (!headerdone && uc == 0xfeff) {
// don't do anything, just skip the BOM
- } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && uc > 0xffff && uc < 0x110000) {
+ } else if (!(nonCharacter = isUnicodeNonCharacter(uc)) && QChar::requiresSurrogates(uc) && uc < 0x110000) {
// surrogate pair
//Q_ASSERT((qch - (ushort*)result.unicode()) + 2 < result.length());
*qch++ = QChar::highSurrogate(uc);
@@ -2258,7 +2258,7 @@ static inline void extract_utf8_multibyte(ushort *&dst, const char *&chars, qptr
// dst[counter] will correspond to chars[counter..counter+2], so adjust
chars += 3;
len -= 3;
- if (trusted || (ucs >= 0x10000 && ucs < 0x110000 && !isUnicodeNonCharacter(ucs))) {
+ if (trusted || (QChar::requiresSurrogates(ucs) && ucs < 0x110000 && !isUnicodeNonCharacter(ucs))) {
dst[counter + 0] = QChar::highSurrogate(ucs);
dst[counter + 1] = QChar::lowSurrogate(ucs);
counter += 2;
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index 190be6f6b4..6826312880 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -43,6 +43,7 @@
#include "datatransferer.h"
#include <QtNetwork>
+#include <QtWidgets>
Q_DECLARE_METATYPE(QNetworkConfiguration)
@@ -284,7 +285,7 @@ SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
} else if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
snapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
}
- bearerLineEdit->setText(apNetworkConfiguration->bearerName());
+ bearerLineEdit->setText(apNetworkConfiguration->bearerTypeName());
sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
QString(" / ")+
QString::number(m_NetworkSession->bytesReceived()));
@@ -314,8 +315,6 @@ void SessionTab::on_createQNetworkAccessManagerButton_clicked()
m_dataTransferer = new DataTransfererQNam(this);
} else if (type == "QTcpSocket") {
m_dataTransferer = new DataTransfererQTcp(this);
- } else if (type == "QHttp") {
- m_dataTransferer = new DataTransfererQHttp(this);
} else {
qDebug("BearerEx Warning, unknown data transfer object requested, not creating anything.");
return;
@@ -512,10 +511,10 @@ void SessionTab::newState(QNetworkSession::State state)
QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
if (config.isValid()) {
iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
- bearerLineEdit->setText(config.bearerName());
+ bearerLineEdit->setText(config.bearerTypeName());
}
} else {
- bearerLineEdit->setText(m_NetworkSession->configuration().bearerName());
+ bearerLineEdit->setText(m_NetworkSession->configuration().bearerTypeName());
}
QString active;
diff --git a/tests/manual/bearerex/bearerex.h b/tests/manual/bearerex/bearerex.h
index 7ab0177128..60963e8fd2 100644
--- a/tests/manual/bearerex/bearerex.h
+++ b/tests/manual/bearerex/bearerex.h
@@ -42,7 +42,7 @@
#ifndef ACCESSPOINTMANAGEREX_H
#define ACCESSPOINTMANAGEREX_H
-#include <QtGui>
+#include <QtWidgets>
#include "ui_detailedinfodialog.h"
diff --git a/tests/manual/bearerex/bearerex.pro b/tests/manual/bearerex/bearerex.pro
index 123038dba4..a49c644e2e 100644
--- a/tests/manual/bearerex/bearerex.pro
+++ b/tests/manual/bearerex/bearerex.pro
@@ -3,6 +3,7 @@ TARGET = BearerEx
QT += core \
gui \
+ widgets \
network
FORMS += detailedinfodialog.ui
diff --git a/tests/manual/bearerex/datatransferer.cpp b/tests/manual/bearerex/datatransferer.cpp
index 1380607632..648a466a30 100644
--- a/tests/manual/bearerex/datatransferer.cpp
+++ b/tests/manual/bearerex/datatransferer.cpp
@@ -134,47 +134,6 @@ void DataTransfererQTcp::error(QAbstractSocket::SocketError socketError)
emit finished(socketError, 0, "QAbstractSocket::SocketError");
}
-// -------- Based on QHttp
-
-DataTransfererQHttp::DataTransfererQHttp(QObject* parent)
-: DataTransferer(parent)
-{
- connect(&m_qhttp, SIGNAL(done(bool)), this, SLOT(done(bool)));
- qDebug("BearerEx DataTransferer QHttp created.");
-}
-
-DataTransfererQHttp::~DataTransfererQHttp()
-{
- qDebug("BearerEx DataTransferer QHttp destroyed.");
-}
-
-bool DataTransfererQHttp::transferData()
-{
- qDebug("BearerEx datatransfer for QHttp requested.");
- if (m_dataTransferOngoing) {
- return false;
- }
- QString urlstring("http://www.google.com");
- QUrl url(urlstring);
- m_qhttp.setHost(url.host(), QHttp::ConnectionModeHttp, url.port() == -1 ? 0 : url.port());
- m_qhttp.get(urlstring);
- m_dataTransferOngoing = true;
- return true;
-}
-
-void DataTransfererQHttp::done(bool /*error*/ )
-{
- qDebug("BearerEx DatatransfererQHttp reply was finished (error code is type QHttp::Error).");
- qint64 dataReceived = 0;
- quint32 errorCode = m_qhttp.error();
- if (m_qhttp.error() == QHttp::NoError) {
- QString result(m_qhttp.readAll());
- dataReceived = result.length();
- }
- m_dataTransferOngoing = false;
- emit finished(errorCode, dataReceived, "QHttp::Error");
-}
-
// -------- Based on QNetworkAccessManager
DataTransfererQNam::DataTransfererQNam(QObject* parent)
diff --git a/tests/manual/bearerex/datatransferer.h b/tests/manual/bearerex/datatransferer.h
index e657b20b38..4be8572a7c 100644
--- a/tests/manual/bearerex/datatransferer.h
+++ b/tests/manual/bearerex/datatransferer.h
@@ -47,7 +47,6 @@
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <QTcpSocket>
-#include <QHttp>
#include <QDebug>
// Interface-class for data transferring object
@@ -111,20 +110,4 @@ private:
QNetworkAccessManager m_qnam;
};
-class DataTransfererQHttp : public DataTransferer
-{
- Q_OBJECT
-public:
- DataTransfererQHttp(QObject* parent = 0);
- ~DataTransfererQHttp();
-
- virtual bool transferData();
-
-public slots:
- void done(bool error);
-
-private:
- QHttp m_qhttp;
-};
-
#endif // DATATRANSFERER_H
diff --git a/tests/manual/cocoa/qt_on_cocoa/window.cpp b/tests/manual/cocoa/qt_on_cocoa/window.cpp
index d68e08a9f8..c1d4401eae 100644
--- a/tests/manual/cocoa/qt_on_cocoa/window.cpp
+++ b/tests/manual/cocoa/qt_on_cocoa/window.cpp
@@ -45,7 +45,7 @@
#include <QBackingStore>
#include <QPainter>
-#include <QtGui>
+#include <QtWidgets>
static int colorIndexId = 0;
diff --git a/tests/manual/cocoa/wheelevent/main.cpp b/tests/manual/cocoa/wheelevent/main.cpp
index 979498991d..69c0960419 100644
--- a/tests/manual/cocoa/wheelevent/main.cpp
+++ b/tests/manual/cocoa/wheelevent/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/tests/manual/cocoa/wheelevent/window.cpp b/tests/manual/cocoa/wheelevent/window.cpp
index b305b057bf..66c8af0ad1 100644
--- a/tests/manual/cocoa/wheelevent/window.cpp
+++ b/tests/manual/cocoa/wheelevent/window.cpp
@@ -45,7 +45,7 @@
#include <QBackingStore>
#include <QPainter>
-#include <QtGui>
+#include <QtWidgets>
static int colorIndexId = 0;
diff --git a/tests/manual/gestures/gestures.pro b/tests/manual/gestures/gestures.pro
new file mode 100644
index 0000000000..6ff914f542
--- /dev/null
+++ b/tests/manual/gestures/gestures.pro
@@ -0,0 +1,4 @@
+TEMPLATE=subdirs
+
+SUBDIRS = graphicsview \
+ scrollarea
diff --git a/tests/manual/gestures/graphicsview/graphicsview.pro b/tests/manual/gestures/graphicsview/graphicsview.pro
index c5f6fe0764..9ecd0b372f 100644
--- a/tests/manual/gestures/graphicsview/graphicsview.pro
+++ b/tests/manual/gestures/graphicsview/graphicsview.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES += main.cpp \
imageitem.cpp \
gestures.cpp \
diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp
index ddda06ea22..465c3a2d65 100644
--- a/tests/manual/gestures/graphicsview/main.cpp
+++ b/tests/manual/gestures/graphicsview/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "imageitem.h"
#include "gestures.h"
diff --git a/tests/manual/gestures/scrollarea/main.cpp b/tests/manual/gestures/scrollarea/main.cpp
index d77ce8e373..190441989e 100644
--- a/tests/manual/gestures/scrollarea/main.cpp
+++ b/tests/manual/gestures/scrollarea/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mousepangesturerecognizer.h"
diff --git a/tests/manual/gestures/scrollarea/scrollarea.pro b/tests/manual/gestures/scrollarea/scrollarea.pro
index 554810e0c3..84e2af3f49 100644
--- a/tests/manual/gestures/scrollarea/scrollarea.pro
+++ b/tests/manual/gestures/scrollarea/scrollarea.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
SOURCES = main.cpp \
mousepangesturerecognizer.cpp
HEADERS += mousepangesturerecognizer.h
diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h
index 4746c9a11a..82d3e7290e 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.h
+++ b/tests/manual/inputmethodhints/inputmethodhints.h
@@ -42,8 +42,8 @@
#ifndef INPUTMETHODHINTS_H
#define INPUTMETHODHINTS_H
-#include <QtGui/QMainWindow>
-#include "ui_tst_inputmethodhints.h"
+#include <QtWidgets/QMainWindow>
+#include "ui_inputmethodhints.h"
class inputmethodhints : public QMainWindow
{
diff --git a/tests/manual/inputmethodhints/inputmethodhints.pro b/tests/manual/inputmethodhints/inputmethodhints.pro
index 171c5f1772..f253f72332 100644
--- a/tests/manual/inputmethodhints/inputmethodhints.pro
+++ b/tests/manual/inputmethodhints/inputmethodhints.pro
@@ -1,8 +1,7 @@
TEMPLATE = app
TARGET = tst_inputmethodhints
-QT += core \
- gui
+QT += widgets
HEADERS += inputmethodhints.h
SOURCES += main.cpp \
diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp
index af3286df73..fcd6d16892 100644
--- a/tests/manual/inputmethodhints/main.cpp
+++ b/tests/manual/inputmethodhints/main.cpp
@@ -41,7 +41,7 @@
#include "inputmethodhints.h"
-#include <QtGui>
+#include <QtWidgets>
#include <QApplication>
int main(int argc, char *argv[])
diff --git a/tests/manual/keypadnavigation/keypadnavigation.pro b/tests/manual/keypadnavigation/keypadnavigation.pro
index 6d12606c78..a45d38af21 100644
--- a/tests/manual/keypadnavigation/keypadnavigation.pro
+++ b/tests/manual/keypadnavigation/keypadnavigation.pro
@@ -1,2 +1,3 @@
+QT += widgets
SOURCES += main.cpp
FORMS += keypadnavigation.ui
diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp
index 4f7224d135..964d46faf6 100644
--- a/tests/manual/keypadnavigation/main.cpp
+++ b/tests/manual/keypadnavigation/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "ui_keypadnavigation.h"
class KeypadNavigation : public QMainWindow
diff --git a/tests/manual/lance/interactivewidget.cpp b/tests/manual/lance/interactivewidget.cpp
index 55e60a8946..0b9d8ee0a4 100644
--- a/tests/manual/lance/interactivewidget.cpp
+++ b/tests/manual/lance/interactivewidget.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
#include "interactivewidget.h"
-#include <QtGui/QToolBox>
+#include <QtWidgets>
InteractiveWidget::InteractiveWidget()
{
diff --git a/tests/manual/lance/interactivewidget.h b/tests/manual/lance/interactivewidget.h
index e9e584512e..879facac42 100644
--- a/tests/manual/lance/interactivewidget.h
+++ b/tests/manual/lance/interactivewidget.h
@@ -44,7 +44,7 @@
#include "widgets.h"
#include "paintcommands.h"
-#include <QtGui>
+#include <QMainWindow>
#include <private/qmath_p.h>
diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro
index e24d3f2fa3..4b319369e6 100644
--- a/tests/manual/lance/lance.pro
+++ b/tests/manual/lance/lance.pro
@@ -1,8 +1,8 @@
-LANCELOT_DIR = $$PWD/../../auto/lancelot
+LANCELOT_DIR = $$PWD/../../auto/other/lancelot
CONFIG+=console moc
TEMPLATE = app
INCLUDEPATH += . $$LANCELOT_DIR
-QT += core-private gui-private
+QT += core-private gui-private widgets printsupport
HEADERS += widgets.h \
interactivewidget.h \
diff --git a/tests/manual/lance/main.cpp b/tests/manual/lance/main.cpp
index c33cb49be9..e8bb44a221 100644
--- a/tests/manual/lance/main.cpp
+++ b/tests/manual/lance/main.cpp
@@ -43,7 +43,8 @@
#include "paintcommands.h"
#include <QtCore>
-#include <QtGui>
+#include <QtWidgets>
+#include <QtPrintSupport>
#include <qimage.h>
#include <QPicture>
@@ -612,14 +613,11 @@ int main(int argc, char **argv)
pcmd.setType(type);
pcmd.setCheckersBackground(checkers_background);
pcmd.setContents(content);
- bool ps = type == PsType;
QPrinter p(highres ? QPrinter::HighResolution : QPrinter::ScreenResolution);
QFileInfo input(files.at(j));
- QString file = QString("%1_%2.%3")
- .arg(input.baseName())
- .arg(input.suffix())
- .arg(ps ? "ps" : "pdf");
- p.setOutputFormat(ps ? QPrinter::PdfFormat : QPrinter::PostScriptFormat);
+ const QString file = input.baseName() + QLatin1Char('_')
+ + input.suffix() + QStringLiteral(".pdf");
+ p.setOutputFormat(QPrinter::PdfFormat);
p.setOutputFileName(file);
p.setPageSize(QPrinter::A4);
QPainter pt(&p);
diff --git a/tests/manual/lance/widgets.h b/tests/manual/lance/widgets.h
index d8a67a7554..33115ad7b3 100644
--- a/tests/manual/lance/widgets.h
+++ b/tests/manual/lance/widgets.h
@@ -59,9 +59,6 @@
#include <QSignalMapper>
#include <QAction>
-
-#include <private/qwindowsurface_p.h>
-
#include <qmath.h>
const int CP_RADIUS = 10;
@@ -236,12 +233,7 @@ public:
}
if (m_render_view.isNull()) {
-
- if (T::window()->windowSurface())
- m_render_view = T::window()->windowSurface()->grabWidget(this);
- else
- m_render_view = QPixmap::grabWidget(this);
-
+ m_render_view = QPixmap::grabWidget(this);
m_render_view.save("renderView.png");
}
}
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
new file mode 100644
index 0000000000..9df151eee1
--- /dev/null
+++ b/tests/manual/manual.pro
@@ -0,0 +1,32 @@
+TEMPLATE=subdirs
+
+SUBDIRS = bearerex \
+gestures \
+inputmethodhints \
+keypadnavigation \
+lance \
+network_remote_stresstest \
+network_stresstest \
+qcursor \
+qdesktopwidget \
+qgraphicsitemgroup \
+qgraphicslayout/flicker \
+qhttpnetworkconnection \
+qimagereader \
+qlocale \
+qnetworkaccessmanager/qget \
+qnetworkconfigurationmanager \
+qnetworkreply \
+qssloptions \
+qtabletevent \
+qtbug-8933 \
+qtouchevent \
+qwidget_zorder \
+repaint \
+socketengine \
+textrendering \
+widgets/itemviews/delegate \
+windowflags \
+windowmodality
+
+!contains(QT_CONFIG, openssl):!contains(QT_CONFIG, openssl-linked):SUBDIRS -= qssloptions
diff --git a/tests/manual/network_remote_stresstest/network_remote_stresstest.pro b/tests/manual/network_remote_stresstest/network_remote_stresstest.pro
index 3a581e12ad..8b52240509 100644
--- a/tests/manual/network_remote_stresstest/network_remote_stresstest.pro
+++ b/tests/manual/network_remote_stresstest/network_remote_stresstest.pro
@@ -1,9 +1,10 @@
CONFIG += testcase
TARGET = tst_network_remote_stresstest
-QT = core network testlib
+QT = core core-private network network-private testlib
SOURCES += tst_network_remote_stresstest.cpp
RESOURCES += url-list.qrc
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
index c2981c6df8..109ecbe2aa 100644
--- a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
+++ b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
@@ -235,6 +235,10 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts()
QElapsedTimer outerTimer;
outerTimer.start();
+#ifdef QT_NO_SSL
+ QVERIFY(!useSslSocket);
+#endif // QT_NO_SSL
+
for (int i = 0; i < urlList.size(); ++i) {
const QUrl &url = urlList.at(i);
bool isHttps = url.scheme() == "https";
@@ -243,21 +247,24 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts()
timeout.start();
QSharedPointer<QTcpSocket> socket;
- if (useSslSocket || isHttps) {
+#ifndef QT_NO_SSL
+ if (useSslSocket || isHttps)
socket = QSharedPointer<QTcpSocket>(new QSslSocket);
- } else {
+#endif // QT_NO_SSL
+ if (socket.isNull())
socket = QSharedPointer<QTcpSocket>(new QTcpSocket);
- }
socket->connectToHost(url.host(), url.port(isHttps ? 443 : 80));
QVERIFY2(socket->waitForConnected(10000), "Timeout connecting to " + url.encodedHost());
+#ifndef QT_NO_SSL
if (isHttps) {
static_cast<QSslSocket *>(socket.data())->setProtocol(QSsl::TlsV1_0);
static_cast<QSslSocket *>(socket.data())->startClientEncryption();
static_cast<QSslSocket *>(socket.data())->ignoreSslErrors();
QVERIFY2(static_cast<QSslSocket *>(socket.data())->waitForEncrypted(10000), "Timeout starting TLS with " + url.encodedHost());
}
+#endif // QT_NO_SSL
socket->write("GET " + url.toEncoded(QUrl::RemoveScheme | QUrl::RemoveAuthority | QUrl::RemoveFragment) + " HTTP/1.0\r\n"
"Connection: close\r\n"
@@ -288,6 +295,10 @@ void tst_NetworkRemoteStressTest::sequentialRemoteHosts()
QFETCH_GLOBAL(QVector<QUrl>, urlList);
QFETCH_GLOBAL(bool, useSslSocket);
+#ifdef QT_NO_SSL
+ QVERIFY(!useSslSocket);
+#endif // QT_NO_SSL
+
qint64 totalBytes = 0;
QElapsedTimer outerTimer;
outerTimer.start();
@@ -300,15 +311,18 @@ void tst_NetworkRemoteStressTest::sequentialRemoteHosts()
timeout.start();
QSharedPointer<QTcpSocket> socket;
- if (useSslSocket || isHttps) {
+#ifndef QT_NO_SSL
+ if (useSslSocket || isHttps)
socket = QSharedPointer<QTcpSocket>(new QSslSocket);
- } else {
+#endif // QT_NO_SSL
+ if (socket.isNull())
socket = QSharedPointer<QTcpSocket>(new QTcpSocket);
- }
if (isHttps) {
+#ifndef QT_NO_SSL
static_cast<QSslSocket *>(socket.data())->setProtocol(QSsl::TlsV1_0);
static_cast<QSslSocket *>(socket.data())->connectToHostEncrypted(url.host(), url.port(443));
static_cast<QSslSocket *>(socket.data())->ignoreSslErrors();
+#endif // QT_NO_SSL
} else {
socket->connectToHost(url.host(), url.port(80));
}
@@ -356,6 +370,10 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts()
QFETCH(int, parallelAttempts);
+#ifdef QT_NO_SSL
+ QVERIFY(!useSslSocket);
+#endif // QT_NO_SSL
+
qint64 totalBytes = 0;
QElapsedTimer outerTimer;
outerTimer.start();
@@ -371,15 +389,19 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts()
for (int j = 0; j < parallelAttempts && it != urlList.constEnd(); ++j, ++it) {
const QUrl &url = *it;
bool isHttps = url.scheme() == "https";
- QTcpSocket *socket;
+ QTcpSocket *socket = 0;
+#ifndef QT_NO_SSL
if (useSslSocket || isHttps)
socket = new QSslSocket;
- else
+#endif // QT_NO_SSL
+ if (!socket)
socket = new QTcpSocket;
if (isHttps) {
+#ifndef QT_NO_SSL
static_cast<QSslSocket *>(socket)->setProtocol(QSsl::TlsV1_0);
static_cast<QSslSocket *>(socket)->connectToHostEncrypted(url.host(), url.port(443));
static_cast<QSslSocket *>(socket)->ignoreSslErrors();
+#endif // QT_NO_SSL
} else {
socket->connectToHost(url.host(), url.port(isHttps ? 443 : 80));
}
diff --git a/tests/manual/network_stresstest/minihttpserver.cpp b/tests/manual/network_stresstest/minihttpserver.cpp
index e3473a3141..1bafe9363d 100644
--- a/tests/manual/network_stresstest/minihttpserver.cpp
+++ b/tests/manual/network_stresstest/minihttpserver.cpp
@@ -148,7 +148,7 @@ void MiniHttpServerConnection::handlePendingRequest()
return;
}
- QUrl uri = QUrl::fromEncoded(request.mid(4, eol - strlen(http11) - 4));
+ QUrl uri = QUrl::fromEncoded(request.mid(4, eol - int(strlen(http11)) - 4));
source.setFileName(":" + uri.path());
// connection-close?
diff --git a/tests/manual/network_stresstest/network_stresstest.pro b/tests/manual/network_stresstest/network_stresstest.pro
index caa8436cef..ebddf12961 100644
--- a/tests/manual/network_stresstest/network_stresstest.pro
+++ b/tests/manual/network_stresstest/network_stresstest.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
TARGET = tst_network_stresstest
-QT = core network testlib
+QT = core-private network-private testlib
SOURCES += tst_network_stresstest.cpp \
minihttpserver.cpp
@@ -11,3 +11,4 @@ HEADERS += \
RESOURCES += wwwfiles.qrc
QMAKE_RESOURCE_FLAGS += -no-compress
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp
index 0f2673e23c..74237ea9cc 100644
--- a/tests/manual/network_stresstest/tst_network_stresstest.cpp
+++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp
@@ -338,13 +338,13 @@ void tst_NetworkStressTest::nativeNonBlockingConnectDisconnect()
QVERIFY(fd != INVALID_SOCKET);
// set the socket to non-blocking and start connecting
- unsigned long buf = v;
+ unsigned long buf = 0;
unsigned long outBuf;
DWORD sizeWritten = 0;
QVERIFY(::WSAIoctl(fd, FIONBIO, &buf, sizeof(unsigned long), &outBuf, sizeof(unsigned long), &sizeWritten, 0,0) != SOCKET_ERROR);
while (true) {
- int connectResult = ::WSAConnect(fd, sockAddrPtr, sockAddrSize, 0,0,0,0);
+ int connectResult = ::WSAConnect(fd, (sockaddr *)addr.data(), addr.size(), 0,0,0,0);
if (connectResult == 0 || WSAGetLastError() == WSAEISCONN) {
break; // connected
} else {
@@ -537,7 +537,7 @@ void tst_NetworkStressTest::blockingMultipleRequests()
qWarning() << "no content-length:" << QString(buffer);
break;
}
- pos += strlen("\r\ncontent-length: ");
+ pos += int(strlen("\r\ncontent-length: "));
int eol = buffer.indexOf("\r\n", pos + 2);
if (eol == -1) {
diff --git a/tests/manual/qdesktopwidget/main.cpp b/tests/manual/qdesktopwidget/main.cpp
index d693d6b67d..32137d78e3 100644
--- a/tests/manual/qdesktopwidget/main.cpp
+++ b/tests/manual/qdesktopwidget/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class DesktopView : public QGraphicsView
{
diff --git a/tests/manual/qdesktopwidget/qdesktopwidget.pro b/tests/manual/qdesktopwidget/qdesktopwidget.pro
index 93d56eb137..8979e7ef35 100644
--- a/tests/manual/qdesktopwidget/qdesktopwidget.pro
+++ b/tests/manual/qdesktopwidget/qdesktopwidget.pro
@@ -1,2 +1,3 @@
TEMPLATE = app
+QT += widgets
SOURCES += main.cpp
diff --git a/tests/manual/qgraphicsitemgroup/customitem.cpp b/tests/manual/qgraphicsitemgroup/customitem.cpp
index 6f3f1e0522..eab218e9a0 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.cpp
+++ b/tests/manual/qgraphicsitemgroup/customitem.cpp
@@ -80,7 +80,7 @@ CustomGroup::CustomGroup() :
setFlag(QGraphicsItem::ItemIsSelectable);
}
-void CustomGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void CustomGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
{
if (option->state & QStyle::State_Selected)
painter->setOpacity(1.);
diff --git a/tests/manual/qgraphicsitemgroup/main.cpp b/tests/manual/qgraphicsitemgroup/main.cpp
index d60941da3a..d76a3a6334 100644
--- a/tests/manual/qgraphicsitemgroup/main.cpp
+++ b/tests/manual/qgraphicsitemgroup/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "widget.h"
int main(int argc, char *argv[])
diff --git a/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro b/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro
index 6676a2e7c1..6135f74b8b 100644
--- a/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro
+++ b/tests/manual/qgraphicsitemgroup/qgraphicsitemgroup.pro
@@ -1,4 +1,5 @@
TARGET = qgraphicsitemgroup
+QT += widgets
TEMPLATE = app
SOURCES += main.cpp \
widget.cpp \
diff --git a/tests/manual/qgraphicslayout/flicker/flicker.pro b/tests/manual/qgraphicslayout/flicker/flicker.pro
index 2e09826022..d800418f85 100644
--- a/tests/manual/qgraphicslayout/flicker/flicker.pro
+++ b/tests/manual/qgraphicslayout/flicker/flicker.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS += window.h
SOURCES += main.cpp window.cpp
diff --git a/tests/manual/qgraphicslayout/flicker/main.cpp b/tests/manual/qgraphicslayout/flicker/main.cpp
index e71915c22f..2947930895 100644
--- a/tests/manual/qgraphicslayout/flicker/main.cpp
+++ b/tests/manual/qgraphicslayout/flicker/main.cpp
@@ -39,8 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
-#include <windows.h>
+#include <QtWidgets>
#include "window.h"
int main(int argc, char **argv)
diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h
index 4930381641..51bf0e0733 100644
--- a/tests/manual/qgraphicslayout/flicker/window.h
+++ b/tests/manual/qgraphicslayout/flicker/window.h
@@ -43,11 +43,11 @@
#define WINDOW_H
-#include <QtGui>
+#include <QtWidgets>
struct Statistics {
- Statistics() : output(0),
- setGeometryCount(0), currentBenchmarkIteration(0), relayoutClicked(false), sleepMsecs(0)
+ Statistics() : setGeometryCount(0), sleepMsecs(0), output(0),
+ currentBenchmarkIteration(0), relayoutClicked(false)
{
}
QMap<QGraphicsWidget*, int> setGeometryTracker;
diff --git a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
index fd21007793..8e73add252 100644
--- a/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/manual/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -5,6 +5,4 @@ TARGET = tst_qhttpnetworkconnection
QT -= gui
QT += network testlib
-CONFIG += release
-
SOURCES += main.cpp
diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp
index 44cdc6ad36..e225c1bc0b 100644
--- a/tests/manual/qimagereader/main.cpp
+++ b/tests/manual/qimagereader/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class MyWidget : public QWidget
{
diff --git a/tests/manual/qimagereader/qimagereader.pro b/tests/manual/qimagereader/qimagereader.pro
index 28dcadcbfa..3523257f3e 100644
--- a/tests/manual/qimagereader/qimagereader.pro
+++ b/tests/manual/qimagereader/qimagereader.pro
@@ -1 +1,2 @@
+QT += widgets
SOURCES += main.cpp
diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp
index e23af4fa49..122f57fa64 100644
--- a/tests/manual/qlocale/calendar.cpp
+++ b/tests/manual/qlocale/calendar.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "calendar.h"
diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h
index bf0d5efac3..7780e82bbf 100644
--- a/tests/manual/qlocale/calendar.h
+++ b/tests/manual/qlocale/calendar.h
@@ -41,7 +41,7 @@
#ifndef CALENDAR_H
#define CALENDAR_H
-#include <QtGui>
+#include <QtWidgets>
class CalendarWidget : public QWidget
{
diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h
index 1d3d536578..f722889600 100644
--- a/tests/manual/qlocale/currency.h
+++ b/tests/manual/qlocale/currency.h
@@ -41,7 +41,7 @@
#ifndef CURRENCY_H
#define CURRENCY_H
-#include <QtGui>
+#include <QtWidgets>
class CurrencyWidget : public QWidget
{
diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h
index 78ef62343a..9355475820 100644
--- a/tests/manual/qlocale/dateformats.h
+++ b/tests/manual/qlocale/dateformats.h
@@ -41,7 +41,7 @@
#ifndef DATEFORMATS_H
#define DATEFORMATS_H
-#include <QtGui>
+#include <QtWidgets>
class DateFormatsWidget : public QWidget
{
diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h
index 6cd7818feb..0c74dfb8ca 100644
--- a/tests/manual/qlocale/info.h
+++ b/tests/manual/qlocale/info.h
@@ -41,7 +41,7 @@
#ifndef INFO_H
#define INFO_H
-#include <QtGui>
+#include <QtWidgets>
class InfoWidget : public QWidget
{
diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h
index 6723e0ffa7..07a86f6898 100644
--- a/tests/manual/qlocale/languages.h
+++ b/tests/manual/qlocale/languages.h
@@ -41,7 +41,7 @@
#ifndef LANGUAGES_H
#define LANGUAGES_H
-#include <QtGui>
+#include <QtWidgets>
class LanguagesWidget : public QWidget
{
diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp
index 337dbb6ad3..8c4e2573d5 100644
--- a/tests/manual/qlocale/main.cpp
+++ b/tests/manual/qlocale/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "window.h"
diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h
index 2548f0d8f4..61ada8a00f 100644
--- a/tests/manual/qlocale/miscellaneous.h
+++ b/tests/manual/qlocale/miscellaneous.h
@@ -41,7 +41,7 @@
#ifndef MISCELLANEOUS_H
#define MISCELLANEOUS_H
-#include <QtGui>
+#include <QtWidgets>
class MiscWidget : public QWidget
{
diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h
index 8243d1177c..bcc352a818 100644
--- a/tests/manual/qlocale/numberformats.h
+++ b/tests/manual/qlocale/numberformats.h
@@ -41,7 +41,7 @@
#ifndef NUMBERFORMATS_H
#define NUMBERFORMATS_H
-#include <QtGui>
+#include <QtWidgets>
class NumberFormatsWidget : public QWidget
{
diff --git a/tests/manual/qlocale/qlocale.pro b/tests/manual/qlocale/qlocale.pro
index 4eaddedcf0..a5a2766e65 100644
--- a/tests/manual/qlocale/qlocale.pro
+++ b/tests/manual/qlocale/qlocale.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS += currency.h calendar.h dateformats.h numberformats.h languages.h window.h miscellaneous.h info.h
SOURCES += currency.cpp main.cpp calendar.cpp dateformats.cpp numberformats.cpp languages.cpp window.cpp miscellaneous.cpp info.cpp
diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h
index 1b2825aa5c..524ed97845 100644
--- a/tests/manual/qlocale/window.h
+++ b/tests/manual/qlocale/window.h
@@ -41,7 +41,7 @@
#ifndef WINDOW_H
#define WINDOW_H
-#include <QtGui>
+#include <QtWidgets>
#include "calendar.h"
#include "currency.h"
diff --git a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
index e3ba3ca88f..5eab6d43bd 100644
--- a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
+++ b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp
@@ -83,7 +83,7 @@ void DownloadManager::upload(const QUrl &url, const QString &user, const QString
connect(ul, SIGNAL(downloadFinished(TransferItem*)), SLOT(downloadFinished(TransferItem*)));
}
-void DownloadManager::finished(QNetworkReply *reply)
+void DownloadManager::finished(QNetworkReply *)
{
}
@@ -121,7 +121,7 @@ void DownloadManager::authenticationRequired(QNetworkReply *reply, QAuthenticato
qDebug() << "authenticationRequired" << reply;
TransferItem *transfer = findTransfer(reply);
//provide the credentials exactly once, so that it fails if credentials are incorrect.
- if (transfer && !transfer->user.isEmpty() || !transfer->password.isEmpty()) {
+ if ((transfer && !transfer->user.isEmpty()) || !transfer->password.isEmpty()) {
auth->setUser(transfer->user);
auth->setPassword(transfer->password);
transfer->user.clear();
@@ -129,7 +129,7 @@ void DownloadManager::authenticationRequired(QNetworkReply *reply, QAuthenticato
}
}
-void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth)
+void DownloadManager::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
{
//provide the credentials exactly once, so that it fails if credentials are incorrect.
if (!proxyUser.isEmpty() || !proxyPassword.isEmpty()) {
diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.h b/tests/manual/qnetworkaccessmanager/qget/qget.h
index bad4f5e4d2..978212dfa8 100644
--- a/tests/manual/qnetworkaccessmanager/qget/qget.h
+++ b/tests/manual/qnetworkaccessmanager/qget/qget.h
@@ -113,7 +113,9 @@ private slots:
void finished(QNetworkReply *reply);
void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator);
+#ifndef QT_NO_SSL
void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
+#endif
void downloadFinished(TransferItem *item);
private:
TransferItem *findTransfer(QNetworkReply *reply);
diff --git a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
index 7ad271ce46..9e78f91621 100644
--- a/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
+++ b/tests/manual/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro
@@ -5,6 +5,4 @@ TARGET = tst_qnetworkconfigurationmanager
QT -= gui
QT += network testlib
-CONFIG += release
-
SOURCES += main.cpp
diff --git a/tests/manual/qnetworkreply/qnetworkreply.pro b/tests/manual/qnetworkreply/qnetworkreply.pro
index 17f48c6544..e29ea7856c 100644
--- a/tests/manual/qnetworkreply/qnetworkreply.pro
+++ b/tests/manual/qnetworkreply/qnetworkreply.pro
@@ -5,6 +5,4 @@ TARGET = tst_qnetworkreply
QT -= gui
QT += network testlib
-CONFIG += release
-
SOURCES += main.cpp
diff --git a/tests/manual/qtabletevent/device_information/qtabletevent.pro b/tests/manual/qtabletevent/device_information/device_information.pro
index 8251d73094..727ad34bc1 100644
--- a/tests/manual/qtabletevent/device_information/qtabletevent.pro
+++ b/tests/manual/qtabletevent/device_information/device_information.pro
@@ -1,3 +1,4 @@
+QT += widgets
SOURCES += \
main.cpp \
tabletwidget.cpp
diff --git a/tests/manual/qtabletevent/device_information/main.cpp b/tests/manual/qtabletevent/device_information/main.cpp
index b4eea7875b..e551ae7d8a 100644
--- a/tests/manual/qtabletevent/device_information/main.cpp
+++ b/tests/manual/qtabletevent/device_information/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QApplication>
#include "tabletwidget.h"
int main(int argc, char **argv) {
diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.cpp b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
index d12da6c886..bc0c63bbb1 100644
--- a/tests/manual/qtabletevent/device_information/tabletwidget.cpp
+++ b/tests/manual/qtabletevent/device_information/tabletwidget.cpp
@@ -94,7 +94,7 @@ bool TabletWidget::eventFilter(QObject *, QEvent *ev)
return false;
}
-void TabletWidget::paintEvent(QPaintEvent *event)
+void TabletWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
diff --git a/tests/manual/qtabletevent/event_compression/event_compression.pro b/tests/manual/qtabletevent/event_compression/event_compression.pro
index fd2521e44f..15650d6190 100644
--- a/tests/manual/qtabletevent/event_compression/event_compression.pro
+++ b/tests/manual/qtabletevent/event_compression/event_compression.pro
@@ -1,4 +1,4 @@
-QT += testlib
+QT += widgets testlib
SOURCES += main.cpp \
mousestatwidget.cpp
diff --git a/tests/manual/qtabletevent/qtabletevent.pro b/tests/manual/qtabletevent/qtabletevent.pro
new file mode 100644
index 0000000000..9e9fc39654
--- /dev/null
+++ b/tests/manual/qtabletevent/qtabletevent.pro
@@ -0,0 +1,5 @@
+TEMPLATE=subdirs
+
+SUBDIRS = device_information \
+ event_compression \
+ regular_widgets
diff --git a/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro b/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro
index 9f0da76c11..8f1f4342ee 100644
--- a/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro
+++ b/tests/manual/qtabletevent/regular_widgets/regular_widgets.pro
@@ -1,3 +1,4 @@
TEMPLATE = app
+QT += widgets
SOURCES += main.cpp
diff --git a/tests/manual/qtbug-8933/main.cpp b/tests/manual/qtbug-8933/main.cpp
index d60941da3a..d76a3a6334 100644
--- a/tests/manual/qtbug-8933/main.cpp
+++ b/tests/manual/qtbug-8933/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "widget.h"
int main(int argc, char *argv[])
diff --git a/tests/manual/qtbug-8933/qtbug-8933.pro b/tests/manual/qtbug-8933/qtbug-8933.pro
index 8b87c8346d..4600d47cac 100644
--- a/tests/manual/qtbug-8933/qtbug-8933.pro
+++ b/tests/manual/qtbug-8933/qtbug-8933.pro
@@ -6,7 +6,7 @@
TARGET = qtbug-8933
TEMPLATE = app
-
+QT += widgets
SOURCES += main.cpp\
widget.cpp
diff --git a/tests/manual/qtouchevent/main.cpp b/tests/manual/qtouchevent/main.cpp
index 206413bfa2..80598e477b 100644
--- a/tests/manual/qtouchevent/main.cpp
+++ b/tests/manual/qtouchevent/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QtTest>
#include "ui_form.h"
diff --git a/tests/manual/qtouchevent/qtouchevent.pro b/tests/manual/qtouchevent/qtouchevent.pro
index de1ee06f9e..6339bceb42 100644
--- a/tests/manual/qtouchevent/qtouchevent.pro
+++ b/tests/manual/qtouchevent/qtouchevent.pro
@@ -1,4 +1,4 @@
-QT += testlib
+QT += widgets testlib
SOURCES = main.cpp \
touchwidget.cpp
FORMS += form.ui
diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp
index dadc089ce4..8c92ac86d7 100644
--- a/tests/manual/qwidget_zorder/main.cpp
+++ b/tests/manual/qwidget_zorder/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class Widget : public QWidget
{
diff --git a/tests/manual/qwidget_zorder/qwidget_zorder.pro b/tests/manual/qwidget_zorder/qwidget_zorder.pro
index 28dcadcbfa..3523257f3e 100644
--- a/tests/manual/qwidget_zorder/qwidget_zorder.pro
+++ b/tests/manual/qwidget_zorder/qwidget_zorder.pro
@@ -1 +1,2 @@
+QT += widgets
SOURCES += main.cpp
diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp
index c6f0ac646f..08b600280a 100644
--- a/tests/manual/repaint/mainwindow/main.cpp
+++ b/tests/manual/repaint/mainwindow/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../shared/shared.h"
int main(int argc, char **argv)
diff --git a/tests/manual/repaint/mainwindow/mainwindow.pro b/tests/manual/repaint/mainwindow/mainwindow.pro
index db6b2d280c..f20e5fe402 100644
--- a/tests/manual/repaint/mainwindow/mainwindow.pro
+++ b/tests/manual/repaint/mainwindow/mainwindow.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/repaint.pro b/tests/manual/repaint/repaint.pro
new file mode 100644
index 0000000000..7ad9d68260
--- /dev/null
+++ b/tests/manual/repaint/repaint.pro
@@ -0,0 +1,9 @@
+TEMPLATE=subdirs
+
+SUBDIRS = mainwindow \
+ scrollarea \
+ splitter \
+ tableview \
+ task141091 \
+ toplevel \
+ widget
diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp
index 63fb755510..06d598d46b 100644
--- a/tests/manual/repaint/scrollarea/main.cpp
+++ b/tests/manual/repaint/scrollarea/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../shared/shared.h"
diff --git a/tests/manual/repaint/scrollarea/scrollarea.pro b/tests/manual/repaint/scrollarea/scrollarea.pro
index db6b2d280c..f20e5fe402 100644
--- a/tests/manual/repaint/scrollarea/scrollarea.pro
+++ b/tests/manual/repaint/scrollarea/scrollarea.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/shared/shared.h b/tests/manual/repaint/shared/shared.h
index 861d4178aa..3489c30cd8 100644
--- a/tests/manual/repaint/shared/shared.h
+++ b/tests/manual/repaint/shared/shared.h
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
class StaticWidget : public QWidget
{
Q_OBJECT
diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp
index 2c4ca1d4f3..d260f00bf1 100644
--- a/tests/manual/repaint/splitter/main.cpp
+++ b/tests/manual/repaint/splitter/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../shared/shared.h"
int main(int argc, char **argv)
diff --git a/tests/manual/repaint/splitter/splitter.pro b/tests/manual/repaint/splitter/splitter.pro
index db6b2d280c..f20e5fe402 100644
--- a/tests/manual/repaint/splitter/splitter.pro
+++ b/tests/manual/repaint/splitter/splitter.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp
index dc25858681..227237a5e7 100644
--- a/tests/manual/repaint/tableview/main.cpp
+++ b/tests/manual/repaint/tableview/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../shared/shared.h"
class CellWidget : public QWidget
diff --git a/tests/manual/repaint/tableview/tableview.pro b/tests/manual/repaint/tableview/tableview.pro
index 4097c95739..6a5aaad251 100644
--- a/tests/manual/repaint/tableview/tableview.pro
+++ b/tests/manual/repaint/tableview/tableview.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS +=../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp
index b2f639d411..9090a2a29d 100644
--- a/tests/manual/repaint/task141091/main.cpp
+++ b/tests/manual/repaint/task141091/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <QDebug>
class MyWidget : public QWidget
diff --git a/tests/manual/repaint/task141091/task141091.pro b/tests/manual/repaint/task141091/task141091.pro
index 82ead4b6c2..b54299e540 100644
--- a/tests/manual/repaint/task141091/task141091.pro
+++ b/tests/manual/repaint/task141091/task141091.pro
@@ -1,3 +1,3 @@
CONFIG += console
-
+QT += widgets
SOURCES += main.cpp
diff --git a/tests/manual/repaint/toplevel/main.cpp b/tests/manual/repaint/toplevel/main.cpp
index cd43fa699c..6466fe80b2 100644
--- a/tests/manual/repaint/toplevel/main.cpp
+++ b/tests/manual/repaint/toplevel/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../shared/shared.h"
int main(int argc, char **argv)
diff --git a/tests/manual/repaint/toplevel/toplevel.pro b/tests/manual/repaint/toplevel/toplevel.pro
index c2cc19f67d..a881c24f56 100644
--- a/tests/manual/repaint/toplevel/toplevel.pro
+++ b/tests/manual/repaint/toplevel/toplevel.pro
@@ -1,4 +1,5 @@
CONFIG += console
+QT += widgets
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp
index 64b9cc8a18..3ea557a642 100644
--- a/tests/manual/repaint/widget/main.cpp
+++ b/tests/manual/repaint/widget/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "../shared/shared.h"
class Child : public StaticWidget
diff --git a/tests/manual/repaint/widget/widget.pro b/tests/manual/repaint/widget/widget.pro
index db6b2d280c..f20e5fe402 100644
--- a/tests/manual/repaint/widget/widget.pro
+++ b/tests/manual/repaint/widget/widget.pro
@@ -1,2 +1,3 @@
+QT += widgets
HEADERS += ../shared/shared.h
SOURCES += main.cpp
diff --git a/tests/manual/socketengine/main.cpp b/tests/manual/socketengine/main.cpp
index 48893f062d..349004a7d0 100644
--- a/tests/manual/socketengine/main.cpp
+++ b/tests/manual/socketengine/main.cpp
@@ -49,7 +49,6 @@
#include <QDebug>
#include <private/qabstractsocketengine_p.h>
#include <cstdio>
-#include <strings.h>
#include <QNetworkConfigurationManager>
#include <QNetworkConfiguration>
#include <QNetworkSession>
@@ -97,7 +96,7 @@ int main(int argc, char**argv)
// disconnected
exit(0);
}
- bzero(buf, bufsize);
+ qFill(buf, buf + bufsize, 0);
ret = socketEngine->read(buf, available);
if (ret > 0) {
printf("%s", buf);
diff --git a/tests/manual/socketengine/socketengine.pro b/tests/manual/socketengine/socketengine.pro
index 808502c22a..96831383ec 100644
--- a/tests/manual/socketengine/socketengine.pro
+++ b/tests/manual/socketengine/socketengine.pro
@@ -3,8 +3,6 @@ TEMPLATE = app
TARGET = tst_socketengine
QT -= gui
-QT += network testlib
-
-CONFIG += release
+QT += network-private core-private testlib
SOURCES += main.cpp
diff --git a/tests/manual/textrendering/glyphshaping/glyphshaping.pro b/tests/manual/textrendering/glyphshaping/glyphshaping.pro
index 1d78aa3351..6500814423 100644
--- a/tests/manual/textrendering/glyphshaping/glyphshaping.pro
+++ b/tests/manual/textrendering/glyphshaping/glyphshaping.pro
@@ -1,3 +1,4 @@
+QT += widgets
SOURCES = main.cpp
OTHER_FILES = glyphshaping_data.xml
glyphshaping_data.path = .
diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp
index c41301f3fc..5a8cc4f12b 100644
--- a/tests/manual/textrendering/glyphshaping/main.cpp
+++ b/tests/manual/textrendering/glyphshaping/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
static const int fontPixelSize = 25;
static const QLatin1String fontFamily("Series 60 Sans");
diff --git a/tests/manual/textrendering/textperformance/main.cpp b/tests/manual/textrendering/textperformance/main.cpp
index c6a0c73849..cff0c1afad 100644
--- a/tests/manual/textrendering/textperformance/main.cpp
+++ b/tests/manual/textrendering/textperformance/main.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
static const int lastMeasurementsCount = 50;
diff --git a/tests/manual/textrendering/textperformance/textperformance.pro b/tests/manual/textrendering/textperformance/textperformance.pro
index bba41b9c12..f07a4f0294 100644
--- a/tests/manual/textrendering/textperformance/textperformance.pro
+++ b/tests/manual/textrendering/textperformance/textperformance.pro
@@ -1 +1,2 @@
+QT += widgets
SOURCES = main.cpp
diff --git a/tests/manual/textrendering/textrendering.pro b/tests/manual/textrendering/textrendering.pro
new file mode 100644
index 0000000000..92f0741bf3
--- /dev/null
+++ b/tests/manual/textrendering/textrendering.pro
@@ -0,0 +1,4 @@
+TEMPLATE=subdirs
+
+SUBDIRS = glyphshaping \
+ textperformance
diff --git a/tests/manual/widgets/itemviews/delegate/example.pro b/tests/manual/widgets/itemviews/delegate/delegate.pro
index e9f2189272..e5c90f18ec 100644
--- a/tests/manual/widgets/itemviews/delegate/example.pro
+++ b/tests/manual/widgets/itemviews/delegate/delegate.pro
@@ -1,2 +1,3 @@
TEMPLATE = app
+QT += widgets
SOURCES=example.cpp
diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp
index 69535b2856..586691a37d 100644
--- a/tests/manual/windowflags/controllerwindow.cpp
+++ b/tests/manual/windowflags/controllerwindow.cpp
@@ -39,7 +39,14 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets/QMainWindow>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QRadioButton>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QGroupBox>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QHBoxLayout>
#include "controllerwindow.h"
@@ -72,7 +79,8 @@ ControllerWindow::ControllerWindow()
mainLayout->addLayout(bottomLayout);
setLayout(mainLayout);
- setWindowTitle(tr("Window Flags"));
+ setWindowTitle(tr("Window Flags (Qt version %1, %2)")
+ .arg(QLatin1String(qVersion()), qApp->platformName()));
updatePreview();
}
diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp
index 601cc50efa..684d1ee1fe 100644
--- a/tests/manual/windowflags/previewwindow.cpp
+++ b/tests/manual/windowflags/previewwindow.cpp
@@ -39,7 +39,9 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets/QTextEdit>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QVBoxLayout>
#include "previewwindow.h"
diff --git a/tests/manual/windowflags/windowflags.pro b/tests/manual/windowflags/windowflags.pro
index 1b45d0d867..06def212b3 100644
--- a/tests/manual/windowflags/windowflags.pro
+++ b/tests/manual/windowflags/windowflags.pro
@@ -1,3 +1,5 @@
+QT += widgets
+
HEADERS = controllerwindow.h \
previewwindow.h
SOURCES = controllerwindow.cpp \
diff --git a/tests/manual/windowmodality/modality.pro b/tests/manual/windowmodality/windowmodality.pro
index 973579c508..973579c508 100644
--- a/tests/manual/windowmodality/modality.pro
+++ b/tests/manual/windowmodality/windowmodality.pro