From 8cb26f85119e6f11da613c95790c1b2c19f01dbd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 6 Feb 2012 13:45:03 +0100 Subject: Complete split of QtConcurrent. - Fix exports. - Fix tests. Acked-by: Thiago Macieira Change-Id: I2df923ba74b468f5ee09b3a48ae3d09920751365 Reviewed-by: Friedemann Kleint --- tests/auto/concurrent/qfuture/qfuture.pro | 2 +- tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/concurrent/qfuture/qfuture.pro b/tests/auto/concurrent/qfuture/qfuture.pro index a4c706129d..c0fe7ec5a3 100644 --- a/tests/auto/concurrent/qfuture/qfuture.pro +++ b/tests/auto/concurrent/qfuture/qfuture.pro @@ -1,5 +1,5 @@ CONFIG += testcase parallel_test TARGET = tst_qfuture -QT = concurrent-private testlib concurrent +QT = core concurrent-private testlib concurrent SOURCES = tst_qfuture.cpp DEFINES += QT_STRICT_ITERATORS diff --git a/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro index 3b8ebda4a4..e9caf5494a 100644 --- a/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro +++ b/tests/auto/concurrent/qfuturewatcher/qfuturewatcher.pro @@ -1,4 +1,4 @@ CONFIG += testcase parallel_test TARGET = tst_qfuturewatcher -QT = concurrent-private testlib concurrent +QT = core concurrent-private testlib concurrent SOURCES = tst_qfuturewatcher.cpp -- cgit v1.2.3 From cfd8a9a4486cf5ca4bf8e0a87459ad5d2c3ca3dd Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 7 Feb 2012 14:16:21 +1000 Subject: Fix error in qcssparser autotest. QTest::ignoreMessage() cannot be called when creating test data rows, but rather must be called when executing a row. Change-Id: Ifceaff4c5a7f1b6408ec57196298e3f3038910c9 Reviewed-by: Rohan McGovern --- tests/auto/gui/text/qcssparser/tst_qcssparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index 7eda35efb8..7e0a60c859 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -344,7 +344,6 @@ void tst_QCssParser::term_data() val.variant = QVariant(QColor("#ffbb00")); QTest::newRow("hexcolor2") << true << "#fb0" << val; - QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'"); QTest::newRow("hexcolor_failure") << false << "#cafebabe" << val; val.type = QCss::Value::Uri; @@ -368,6 +367,9 @@ void tst_QCssParser::term() QFETCH(QString, css); QFETCH(QCss::Value, expectedValue); + if (strcmp(QTest::currentDataTag(), "hexcolor_failure") == 0) + QTest::ignoreMessage(QtWarningMsg, "QCssParser::parseHexColor: Unknown color name '#cafebabe'"); + QCss::Parser parser(css); QCss::Value val; QVERIFY(parser.testTerm()); -- cgit v1.2.3 From 9221757cde0bbfa2f45c43c8686a8b954027fdbf Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 7 Feb 2012 14:09:10 +1000 Subject: Fix error in qgraphicsanchorlayout1 autotest. QTest::ignoreMessage() cannot be called when creating test data rows, but rather must be called when executing a row. Change-Id: Ic958c4e5c15dd53a48479099b6b07803af6cb789 Reviewed-by: Rohan McGovern --- .../tst_qgraphicsanchorlayout1.cpp | 44 ++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 3a8e109d80..97feb642dc 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -1835,15 +1835,6 @@ void tst_QGraphicsAnchorLayout1::testCenterAnchors_data() theResult << BasicResult(0, QRectF(5, 5, 10, 10) ); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); QTest::newRow("center, basic with invalid") << QSizeF(20, 20) << theData << theResult; } @@ -1975,9 +1966,6 @@ void tst_QGraphicsAnchorLayout1::testCenterAnchors_data() << BasicResult(1, QRectF(20, 0, 30, 10)) << BasicResult(2, QRectF(60, 15, 40, 10)); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::newRow("center, three") << QSizeF(100, 50) << theData << theResult; } @@ -2062,6 +2050,21 @@ void tst_QGraphicsAnchorLayout1::testCenterAnchors_data() void tst_QGraphicsAnchorLayout1::testCenterAnchors() { + if (strcmp(QTest::currentDataTag(), "center, basic with invalid") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } else if (strcmp(QTest::currentDataTag(), "center, three") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } + // use the same frame testBasicLayout(); } @@ -2144,11 +2147,6 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor_data() << BasicResult(1, QRectF(20, 0, 30, 10)) << BasicResult(2, QRectF(60, 15, 40, 10)); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::newRow("remove, center, three") << QSizeF(100, 50) << theData << theRemoveData << theResult; } @@ -2183,8 +2181,6 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor_data() theResult << BasicResult(0, QRectF(5, 5, 10, 10) ); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); - QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); QTest::newRow("remove, center, basic 2") << QSizeF(20, 20) << theData << theRemoveData << theResult; } @@ -2193,6 +2189,16 @@ void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor_data() void tst_QGraphicsAnchorLayout1::testRemoveCenterAnchor() { + if (strcmp(QTest::currentDataTag(), "remove, center, three") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } else if (strcmp(QTest::currentDataTag(), "remove, center, basic 2") == 0) { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + } + QFETCH(QSizeF, size); QFETCH(BasicLayoutTestDataList, data); QFETCH(BasicLayoutTestDataList, removeData); -- cgit v1.2.3 From a6505007295c7363ef1b0ee4aa81d15a2b470a7e Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Mon, 6 Feb 2012 15:42:19 +0100 Subject: tst_qnetworkreply: remove no such signal warnings The QNetworkReply finished signal does not have a bool parameter. Change-Id: I87bd0410545f7a2fc2ab63cca90548f0585bf7a0 Reviewed-by: Shane Kearns Reviewed-by: Jonas Gastal --- tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 959250acb4..44cafe4de9 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -1860,7 +1860,7 @@ void tst_QNetworkReply::putToFtp() QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(10); - QObject::disconnect(r, SIGNAL(finished(bool)), &QTestEventLoop::instance(), SLOT(exitLoop())); + QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QByteArray uploaded = r->readAll(); QCOMPARE(uploaded.size(), data.size()); @@ -3911,7 +3911,7 @@ void tst_QNetworkReply::ioPutToFtpFromFile() QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(3); - QObject::disconnect(r, SIGNAL(finished(bool)), &QTestEventLoop::instance(), SLOT(exitLoop())); + QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QByteArray uploaded = r->readAll(); QCOMPARE(qint64(uploaded.size()), sourceFile.size()); -- cgit v1.2.3 From 56265031b763736163f1a229a7e7e6b7aaec8a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Mon, 30 Jan 2012 12:21:43 +0100 Subject: Align QVariant::UserType and QMetaType::User MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no point in keeping separate values which should mean the same. QVariant::UserType was used also to construct a valid, null QVariant, containing an instance of unknown custom type. The concept was strange and useless as there was no operation that could be done on such QVariant. Therefore it was dropped. Please note that the patch slightly changes behavior of different functions accepting a type id as parameter. Before QVariant::UserType was an invalid type from QMetaType perspective (id 127 was not assigned to any built-in type), but QMetaType::User points to the first registered custom type. Change-Id: I5c7d541a9affdcdacf53a4eda2272bdafaa87b71 Reviewed-by: Kent Hansen Reviewed-by: Lars Knoll Reviewed-by: João Abecasis Reviewed-by: Andrew Stanley-Jones Reviewed-by: Aaron Kennedy --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 2 ++ tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 12 ++++-------- tests/auto/dbus/qdbusmarshall/common.h | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 7f95f68075..4e7935be31 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -1704,6 +1704,7 @@ void tst_QObject::property() QVERIFY(!property.isEnumType()); QCOMPARE(property.typeName(), "CustomType*"); QCOMPARE(property.type(), QVariant::UserType); + QCOMPARE(property.userType(), qMetaTypeId()); CustomType *customPointer = 0; QVariant customVariant = object.property("custom"); @@ -1718,6 +1719,7 @@ void tst_QObject::property() QVERIFY(property.isWritable()); QCOMPARE(property.typeName(), "CustomType*"); QCOMPARE(property.type(), QVariant::UserType); + QCOMPARE(property.userType(), qMetaTypeId()); QVERIFY(object.setProperty("custom", customVariant)); QCOMPARE(object.custom(), customPointer); diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 2bf554dd78..f7bdfd800a 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -1842,10 +1842,6 @@ void tst_QVariant::operator_eq_eq_data() QTest::newRow("HashSecondLarger") << QVariant(hash1) << QVariant(hash2) << false; } - - QTest::newRow( "UserType" ) << QVariant(QVariant::UserType) << QVariant(QVariant::UserType) << true; - QVariant mUserType(QVariant::UserType); - QTest::newRow( "Shared UserType" ) << mUserType << mUserType << true; } void tst_QVariant::operator_eq_eq() @@ -1919,7 +1915,6 @@ void tst_QVariant::typeName_data() QTest::newRow("39") << int(QVariant::RectF) << QByteArray("QRectF"); QTest::newRow("40") << int(QVariant::PointF) << QByteArray("QPointF"); QTest::newRow("41") << int(QVariant::RegExp) << QByteArray("QRegExp"); - QTest::newRow("42") << int(QVariant::UserType) << QByteArray(); QTest::newRow("43") << int(QVariant::Matrix) << QByteArray("QMatrix"); QTest::newRow("44") << int(QVariant::Transform) << QByteArray("QTransform"); QTest::newRow("45") << int(QVariant::Hash) << QByteArray("QVariantHash"); @@ -2031,10 +2026,10 @@ void tst_QVariant::userType() qVariantSetValue(userVar, data); QCOMPARE(userVar.type(), QVariant::UserType); + QCOMPARE(userVar.userType(), qMetaTypeId()); QCOMPARE(userVar.typeName(), "MyType"); QVERIFY(!userVar.isNull()); QVERIFY(!userVar.canConvert(QVariant::String)); - QVERIFY(!userVar.canConvert(QVariant::UserType)); QVariant userVar2(userVar); QVERIFY(userVar == userVar2); @@ -2060,10 +2055,10 @@ void tst_QVariant::userType() qVariantSetValue(userVar, &data); QCOMPARE(userVar.type(), QVariant::UserType); + QCOMPARE(userVar.userType(), qMetaTypeId()); QCOMPARE(userVar.typeName(), "MyType*"); QVERIFY(!userVar.isNull()); QVERIFY(!userVar.canConvert(QVariant::String)); - QVERIFY(!userVar.canConvert(QVariant::UserType)); QVariant userVar2(userVar); QVERIFY(userVar == userVar2); @@ -2696,7 +2691,7 @@ Q_DECLARE_METATYPE( MyClass ) void tst_QVariant::loadUnknownUserType() { qRegisterMetaType("MyClass"); - char data[] = {0, 0, 0, 127, 0, 0, 0, 0, 8, 77, 121, 67, 108, 97, 115, 115, 0}; + char data[] = {0, 0, 1, 0, 0, 0, 0, 0, 8, 77, 121, 67, 108, 97, 115, 115, 0}; QByteArray ba(data, sizeof(data)); QDataStream ds(&ba, QIODevice::ReadOnly); @@ -3306,6 +3301,7 @@ void tst_QVariant::movabilityTest() memcpy(buffer, &variant, sizeof(QVariant)); QCOMPARE(buffer[0].type(), QVariant::UserType); + QCOMPARE(buffer[0].userType(), qMetaTypeId()); MyNotMovable tmp(buffer[0].value()); new (&variant) QVariant(); diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h index d49f4eff30..87c434b71e 100644 --- a/tests/auto/dbus/qdbusmarshall/common.h +++ b/tests/auto/dbus/qdbusmarshall/common.h @@ -610,10 +610,6 @@ template<> bool compare(const QVariant &v1, const QVariant &v2) else if (id == QVariant::ByteArray) return compare(v1.toByteArray(), v2.toByteArray()); - else if (id < int(QVariant::UserType)) // yes, v1.type() - // QVariant can compare - return v1 == v2; - else if (id == QMetaType::UChar) return qvariant_cast(v1) == qvariant_cast(v2); @@ -716,6 +712,10 @@ template<> bool compare(const QVariant &v1, const QVariant &v2) else if (id == qMetaTypeId()) // (is) return qvariant_cast(v1) == qvariant_cast(v2); + else if (id < int(QVariant::UserType)) // yes, v1.type() + // QVariant can compare + return v1 == v2; + else { qWarning() << "Please write a comparison case for type" << v1.typeName(); return false; // unknown type -- cgit v1.2.3 From b8cf1d6bdcaefaa610014a742808af3ab2c6fe06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Fri, 3 Feb 2012 12:54:25 +0100 Subject: Remove QMetaType::unregisterType(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function hasn't been working properly. It was not well tested, for example it is undefined how QVariant should behave if it contains an instance of an unregistered type. Concept of unregistering types was inspired by plug-in system, but in most supported platforms we do not unload plug-ins. Idea of type unregistering may block optimizations in meta object system, because it would be not possible to cache a type id. QMetaType::type() could return different ids for the same name. Currently QMetaType::unregisterType() is not used in Qt. Change-Id: I878b6e8d91de99f9bcefeab73af2e2ba0bd0cba0 Reviewed-by: Prasanth Ullattil Reviewed-by: Bradley T. Hughes Reviewed-by: João Abecasis Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira Reviewed-by: Kent Hansen --- .../corelib/kernel/qmetatype/tst_qmetatype.cpp | 23 ---------------------- 1 file changed, 23 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index be13b39e7e..ca2964d3e2 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -87,7 +87,6 @@ private slots: void typedefs(); void isRegistered_data(); void isRegistered(); - void unregisterType(); void registerStreamBuiltin(); void automaticTemplateRegistration(); }; @@ -857,28 +856,6 @@ void tst_QMetaType::isRegistered() QCOMPARE(QMetaType::isRegistered(typeId), registered); } -class RegUnreg -{ -public: - RegUnreg() {}; - RegUnreg(const RegUnreg &) {}; - ~RegUnreg() {}; -}; - -void tst_QMetaType::unregisterType() -{ - // cannot unregister standard types - int typeId = qRegisterMetaType >("QList"); - QCOMPARE(QMetaType::isRegistered(typeId), true); - QMetaType::unregisterType("QList"); - QCOMPARE(QMetaType::isRegistered(typeId), true); - // allow unregister user types - typeId = qRegisterMetaType("RegUnreg"); - QCOMPARE(QMetaType::isRegistered(typeId), true); - QMetaType::unregisterType("RegUnreg"); - QCOMPARE(QMetaType::isRegistered(typeId), false); -} - void tst_QMetaType::registerStreamBuiltin() { //should not crash; -- cgit v1.2.3 From 5a92dd612472378ec329d380fdc8fe609478b06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Mon, 30 Jan 2012 14:50:04 +0100 Subject: Detect incompatibilities in repeated type registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QMetaType used to register a typeName and factory functions for creation/destruction of objects. While it would be possible for a single type name to be registered matching different actual types and memory layouts, there was little that could be done about it. Now that QMetaType is tracking type information with a direct impact on data layout and ABI (size and type flags) it is important that we check and detect binary incompatibilities as early as possible. [Such incompatibilities could arise from type name re-use (technically, ODR violations) or, more commonly, as version mismatch between different shared libraries or plugins.] Only type size and flags are checked as function pointers to inline and template or otherwise non-exported functions could trivially differ across translation units and shared libraries. When registering typedef types, a check is made to ensure the same name doesn't get registered as different types. Change-Id: I8211c3de75d4854ce8fafdb620d3a931c206e0c3 Reviewed-by: Olivier Goffart Reviewed-by: Jędrzej Nowacki Reviewed-by: Kent Hansen --- .../corelib/kernel/qmetatype/tst_qmetatype.cpp | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index ca2964d3e2..f90e7f463f 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -85,6 +85,7 @@ private slots: void constructCopy_data(); void constructCopy(); void typedefs(); + void registerType(); void isRegistered_data(); void isRegistered(); void registerStreamBuiltin(); @@ -828,6 +829,44 @@ void tst_QMetaType::typedefs() QCOMPARE(QMetaType::type("WhityDouble"), ::qMetaTypeId()); } +void tst_QMetaType::registerType() +{ + // Built-in + QCOMPARE(qRegisterMetaType("QString"), int(QMetaType::QString)); + QCOMPARE(qRegisterMetaType("QString"), int(QMetaType::QString)); + + // Custom + int fooId = qRegisterMetaType("TestSpace::Foo"); + QVERIFY(fooId >= int(QMetaType::User)); + QCOMPARE(qRegisterMetaType("TestSpace::Foo"), fooId); + + int movableId = qRegisterMetaType("CustomMovable"); + QVERIFY(movableId >= int(QMetaType::User)); + QCOMPARE(qRegisterMetaType("CustomMovable"), movableId); + + // Alias to built-in + typedef QString MyString; + + QCOMPARE(qRegisterMetaType("MyString"), int(QMetaType::QString)); + QCOMPARE(qRegisterMetaType("MyString"), int(QMetaType::QString)); + + QCOMPARE(QMetaType::type("MyString"), int(QMetaType::QString)); + + // Alias to custom type + typedef CustomMovable MyMovable; + typedef TestSpace::Foo MyFoo; + + QCOMPARE(qRegisterMetaType("MyMovable"), movableId); + QCOMPARE(qRegisterMetaType("MyMovable"), movableId); + + QCOMPARE(QMetaType::type("MyMovable"), movableId); + + QCOMPARE(qRegisterMetaType("MyFoo"), fooId); + QCOMPARE(qRegisterMetaType("MyFoo"), fooId); + + QCOMPARE(QMetaType::type("MyFoo"), fooId); +} + class IsRegisteredDummyType { }; void tst_QMetaType::isRegistered_data() -- cgit v1.2.3 From ba1cf5dae397031730fb77321db1807937e81617 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Fri, 13 Jan 2012 12:07:11 +0100 Subject: Removed image format specific template functions in raster engine. Simplified the raster engine by treating image formats in a more generic way and removed some unused code. Change-Id: Ib3979a1a6e3e6f17c5002248545779ec36fff7c9 Reviewed-by: Gunnar Sletta --- tests/auto/gui/image/qimage/tst_qimage.cpp | 67 +++++++----------------------- 1 file changed, 14 insertions(+), 53 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index cda887d8e1..c5c2b13b3e 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -1025,17 +1025,17 @@ void tst_QImage::setPixel_data() QTest::newRow("RGB16 blue") << int(QImage::Format_RGB16) << 0xff0000ff << 0x001fu; QTest::newRow("ARGB8565_Premultiplied red") << int(QImage::Format_ARGB8565_Premultiplied) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0xf800ffu; QTest::newRow("ARGB8565_Premultiplied green") << int(QImage::Format_ARGB8565_Premultiplied) - << 0xff00ff00 << 0xff00ff00; + << 0xff00ff00 << 0x07e0ffu; QTest::newRow("ARGB8565_Premultiplied blue") << int(QImage::Format_ARGB8565_Premultiplied) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0x001fffu; QTest::newRow("RGB666 red") << int(QImage::Format_RGB666) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0x03f000u; QTest::newRow("RGB666 green") << int(QImage::Format_RGB666) - << 0xff00ff00 << 0xff00ff00;; + << 0xff00ff00 << 0x000fc0u; QTest::newRow("RGB666 blue") << int(QImage::Format_RGB666) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0x00003fu; QTest::newRow("RGB555 red") << int(QImage::Format_RGB555) << 0xffff0000 << 0x7c00u; QTest::newRow("RGB555 green") << int(QImage::Format_RGB555) @@ -1043,17 +1043,17 @@ void tst_QImage::setPixel_data() QTest::newRow("RGB555 blue") << int(QImage::Format_RGB555) << 0xff0000ff << 0x001fu; QTest::newRow("ARGB8555_Premultiplied red") << int(QImage::Format_ARGB8555_Premultiplied) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0x7c00ffu; QTest::newRow("ARGB8555_Premultiplied green") << int(QImage::Format_ARGB8555_Premultiplied) - << 0xff00ff00 << 0xff00ff00; + << 0xff00ff00 << 0x03e0ffu; QTest::newRow("ARGB8555_Premultiplied blue") << int(QImage::Format_ARGB8555_Premultiplied) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0x001fffu; QTest::newRow("RGB888 red") << int(QImage::Format_RGB888) - << 0xffff0000 << 0xffff0000; + << 0xffff0000 << 0x0000ffu; QTest::newRow("RGB888 green") << int(QImage::Format_RGB888) - << 0xff00ff00 << 0xff00ff00; + << 0xff00ff00 << 0x00ff00u; QTest::newRow("RGB888 blue") << int(QImage::Format_RGB888) - << 0xff0000ff << 0xff0000ff; + << 0xff0000ff << 0xff0000u; } void tst_QImage::setPixel() @@ -1106,37 +1106,12 @@ void tst_QImage::setPixel() break; } case int(QImage::Format_RGB666): - { - for (int y = 0; y < h; ++y) { - const qrgb666 *row = (const qrgb666*)(img.scanLine(y)); - for (int x = 0; x < w; ++x) { - quint32 result = row[x]; - if (result != expected) - printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, result); - QCOMPARE(result, expected); - } - } - break; - } case int(QImage::Format_ARGB8565_Premultiplied): - { - for (int y = 0; y < h; ++y) { - const qargb8565 *row = (const qargb8565*)(img.scanLine(y)); - for (int x = 0; x < w; ++x) { - quint32 result = row[x]; - if (result != expected) - printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, result); - QCOMPARE(result, expected); - } - } - break; - } case int(QImage::Format_ARGB8555_Premultiplied): + case int(QImage::Format_RGB888): { for (int y = 0; y < h; ++y) { - const qargb8555 *row = (const qargb8555*)(img.scanLine(y)); + const quint24 *row = (const quint24*)(img.scanLine(y)); for (int x = 0; x < w; ++x) { quint32 result = row[x]; if (result != expected) @@ -1147,20 +1122,6 @@ void tst_QImage::setPixel() } break; } - case int(QImage::Format_RGB888): - { - for (int y = 0; y < h; ++y) { - const qrgb888 *row = (const qrgb888*)(img.scanLine(y)); - for (int x = 0; x < w; ++x) { - qrgb888 result = row[x]; - if (result != expected) - printf("[x,y]: %d,%d, expected=%04x, result=%04x\n", - x, y, expected, quint32(result)); - QCOMPARE(uint(result), expected); - } - } - break; - } default: qFatal("Test not implemented for format %d", format); } -- cgit v1.2.3 From deea48ef6a545ba0c198efcc8db3c5ba7b0b432b Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 1 Feb 2012 13:57:24 +0000 Subject: Fix QFile autotest not to require elevated privilege to pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The open test case tests opening a device path on windows. As this requires privilege elevation, the test fails when running nmake check from a console. As the CI machines appear to run tests with admin privileges, first check opening the device using the windows API. If that succeeds, then opening using QFile should succeed. If that fails, the opening using QFile should fail. (Since Windows vista, members of the "administrators" group do not run at elevated privilege all the time. The user needs to opt in via a UAC prompt or "run as administrator". This is similar to using the sudo command on unix) Ran the test as administrator and normally. Now passes in both cases. Change-Id: Ibd7682eceb61e35d4912fa0392df536f4331f6ed Reviewed-by: João Abecasis --- tests/auto/corelib/io/qfile/tst_qfile.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 00e45354ba..67a4f71f54 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -53,7 +53,9 @@ #include #endif #include -#ifndef Q_OS_WIN +#ifdef Q_OS_WIN +# include +#else # include # include #endif @@ -476,8 +478,16 @@ void tst_QFile::open_data() QTest::newRow("noreadfile") << QString("noreadfile") << int(QIODevice::ReadOnly) << false << QFile::OpenError; #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) - QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) - << true << QFile::NoError; + //opening devices requires administrative privileges (and elevation). + HANDLE hTest = CreateFile(_T("\\\\.\\PhysicalDrive0"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); + if (hTest != INVALID_HANDLE_VALUE) { + CloseHandle(hTest); + QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) + << true << QFile::NoError; + } else { + QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) + << false << QFile::OpenError; + } QTest::newRow("uncFile") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" << int(QIODevice::ReadOnly) << true << QFile::NoError; #endif -- cgit v1.2.3 From 63f634322b2c0f795bd424be9e51953a10c701de Mon Sep 17 00:00:00 2001 From: Jonas Gastal Date: Sun, 29 Jan 2012 22:57:56 -0200 Subject: Don't allow cd'ing to above root. Task-number: QTBUG-23893 Change-Id: Ifc6e22f135a1f6bff7c0fa8bef3ea7e1042ae819 Reviewed-by: Oswald Buddenhagen Reviewed-by: David Faure --- tests/auto/corelib/io/qdir/tst_qdir.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index f1c9015092..539bea5e8d 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -190,6 +190,8 @@ private slots: void isReadable(); + void cdBelowRoot(); + private: QString m_dataPath; }; @@ -1942,6 +1944,33 @@ void tst_QDir::isReadable() #endif } +void tst_QDir::cdBelowRoot() +{ +#if defined (Q_OS_UNIX) +#define ROOT QString("/") +#define DIR QString("/tmp") +#define CD_INTO "tmp" +#else +#define ROOT QString::fromLocal8Bit(qgetenv("SystemDrive"))+"/" +#define DIR QString::fromLocal8Bit(qgetenv("SystemRoot")).replace('\\', '/') +#define CD_INTO QString::fromLocal8Bit(qgetenv("SystemRoot")).mid(3) +#endif + + QDir root(ROOT); + QVERIFY(!root.cd("..")); + QCOMPARE(root.path(), ROOT); + QVERIFY(root.cd(CD_INTO)); + QCOMPARE(root.path(), DIR); + + QDir dir(DIR); + QVERIFY(!dir.cd("../..")); + QCOMPARE(dir.path(), DIR); + QVERIFY(!dir.cd("../abs/../..")); + QCOMPARE(dir.path(), DIR); + QVERIFY(dir.cd("..")); + QCOMPARE(dir.path(), ROOT); +} + QTEST_MAIN(tst_QDir) #include "tst_qdir.moc" -- cgit v1.2.3 From f5e1da12f0e7bdeee4db74acc52dfabeb12a4e31 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 6 Feb 2012 17:02:32 +0100 Subject: QSqlTableModel::removeRows(): don't emit extra beforeDelete Qt 5 seems like a welcome opportunity to stop emitting this spurious beforeDelete signal. Change-Id: Ib8628343ca9b8fdd85c154a206c7e2bf2c4c9dc1 Reviewed-by: Yunqiao Yin --- tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index c8b5513a29..6a827e65c5 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -703,10 +703,9 @@ void tst_QSqlTableModel::removeRows() QVERIFY(!model.removeRows(1, 0, model.index(2, 0))); // can't pass a valid modelindex QVERIFY_SQL(model, removeRows(0, 2)); - QCOMPARE(beforeDeleteSpy.count(), 3); - QVERIFY(beforeDeleteSpy.at(0).at(0).toInt() == 5); - QVERIFY(beforeDeleteSpy.at(1).at(0).toInt() == 0); - QVERIFY(beforeDeleteSpy.at(2).at(0).toInt() == 1); + QCOMPARE(beforeDeleteSpy.count(), 2); + QVERIFY(beforeDeleteSpy.at(0).at(0).toInt() == 0); + QVERIFY(beforeDeleteSpy.at(1).at(0).toInt() == 1); QCOMPARE(model.rowCount(), 1); QCOMPARE(model.data(model.index(0, 1)).toString(), QString("vohi")); model.clear(); -- cgit v1.2.3 From f50a84008eb24d164df4e375084df457e9c85ce7 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 8 Feb 2012 10:59:38 +1000 Subject: Improved stability of tst_qhttpsocketengine This autotest assumed that various network operations could always be completed within 5 seconds. Notably, it assumed that an attempt to resolve a nonexistent hostname would always result in an error within 5 seconds. In my testing, it usually takes 4-6 seconds to complete, but occasionally takes as much as 13 seconds. (cherry picked from qt4 commit c85faef67b6a7e8fcedb4ce800282d41f5b79ec1) Change-Id: I982ecf6ebc1bb8ee2184cf5592cb2684474c870b Reviewed-by: Jason McDonald --- .../socket/qhttpsocketengine/tst_qhttpsocketengine.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp index 9b8391d6be..43b1f225c4 100644 --- a/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/network/socket/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -294,7 +294,7 @@ void tst_QHttpSocketEngine::errorTest() connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(5); + QTestEventLoop::instance().enterLoop(30); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(int(socket.error()), expectedError); @@ -371,7 +371,7 @@ void tst_QHttpSocketEngine::simpleErrorsAndStates() QVERIFY(socketDevice.state() == QAbstractSocket::UnconnectedState); QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverName()), 8088)); QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState); - if (socketDevice.waitForWrite(15000)) { + if (socketDevice.waitForWrite(30000)) { QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState || socketDevice.state() == QAbstractSocket::UnconnectedState); } else { @@ -425,7 +425,7 @@ void tst_QHttpSocketEngine::tcpLoopbackPerformance() QTime timer; timer.start(); qlonglong readBytes = 0; - while (timer.elapsed() < 5000) { + while (timer.elapsed() < 30000) { qlonglong written = serverSocket.write(message1.data(), message1.size()); while (written > 0) { client.waitForRead(); @@ -458,7 +458,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() QCOMPARE(socket.state(), QTcpSocket::ConnectedState); // Read greeting - QVERIFY(socket.waitForReadyRead(5000)); + QVERIFY(socket.waitForReadyRead(30000)); QString s = socket.readLine(); QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), qPrintable(s)); @@ -466,7 +466,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); if (!socket.canReadLine()) - QVERIFY(socket.waitForReadyRead(5000)); + QVERIFY(socket.waitForReadyRead(30000)); // Read response s = socket.readLine(); @@ -476,14 +476,14 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() QCOMPARE((int) socket.write("2 LOGOUT\r\n", 10), 10); if (!socket.canReadLine()) - QVERIFY(socket.waitForReadyRead(5000)); + QVERIFY(socket.waitForReadyRead(30000)); // Read two lines of respose s = socket.readLine(); QCOMPARE(s.toLatin1().constData(), "* BYE LOGOUT received\r\n"); if (!socket.canReadLine()) - QVERIFY(socket.waitForReadyRead(5000)); + QVERIFY(socket.waitForReadyRead(30000)); s = socket.readLine(); QCOMPARE(s.toLatin1().constData(), "2 OK Completed\r\n"); -- cgit v1.2.3 From 3ae3aa0e51711ea4051c82ed7911ccc744f44268 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 6 Feb 2012 14:17:08 +1000 Subject: Improved stability of tst_qsemaphore (especially on mac) Timers are not entirely precise; if we ask for a timeout of 10000 milliseconds, we might time out in 9999 instead. Also, we know the expected elapsed time in each case, so do a fuzzy comparison against that time. Previously the test was verifying that the elapsed time was greater than or equal to the timeout in the case where a timeout was expected, which means the test would not detect bugs which incorrectly caused the timeout to occur later than it should. (cherry picked from qt4 commit 9a2573dc13b3e8df6cd15bef64370ea407480fc7) Change-Id: I91d0c81f989ab43a3c48f6abbb4c5b28e2b35402 Reviewed-by: Jason McDonald --- .../auto/corelib/thread/qsemaphore/qsemaphore.pro | 2 -- .../corelib/thread/qsemaphore/tst_qsemaphore.cpp | 41 +++++++++++++--------- 2 files changed, 25 insertions(+), 18 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro b/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro index cd87e68848..0ad311de99 100644 --- a/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro +++ b/tests/auto/corelib/thread/qsemaphore/qsemaphore.pro @@ -2,5 +2,3 @@ CONFIG += testcase parallel_test TARGET = tst_qsemaphore QT = core testlib SOURCES = tst_qsemaphore.cpp - -mac*:CONFIG+=insignificant_test diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp index 1d54c8e036..884e8718cb 100644 --- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp +++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp @@ -223,11 +223,21 @@ void tst_QSemaphore::tryAcquireWithTimeout() { QFETCH(int, timeout); + // timers are not guaranteed to be accurate down to the last millisecond, + // so we permit the elapsed times to be up to this far from the expected value. + int fuzz = 10; + QSemaphore semaphore; QTime time; -#define QVERIFYGE(a,b) QVERIFY2(a >= b, qPrintable(QString("%1 = %2 !>= %3 = %4").arg(#a).arg(a).arg(#b).arg(b))); -#define QVERIFYLE(a,b) QVERIFY2(a <= b, qPrintable(QString("%1 = %2 !<= %3 = %4").arg(#a).arg(a).arg(#b).arg(b))); +#define FUZZYCOMPARE(a,e) \ + do { \ + int a1 = a; \ + int e1 = e; \ + QVERIFY2(qAbs(a1-e1) < fuzz, \ + qPrintable(QString("(%1=%2) is more than %3 milliseconds different from (%4=%5)") \ + .arg(#a).arg(a1).arg(fuzz).arg(#e).arg(e1))); \ + } while (0) QCOMPARE(semaphore.available(), 0); @@ -235,73 +245,72 @@ void tst_QSemaphore::tryAcquireWithTimeout() QCOMPARE(semaphore.available(), 1); time.start(); QVERIFY(!semaphore.tryAcquire(2, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 1); semaphore.release(); QCOMPARE(semaphore.available(), 2); time.start(); QVERIFY(!semaphore.tryAcquire(3, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 2); semaphore.release(10); QCOMPARE(semaphore.available(), 12); time.start(); QVERIFY(!semaphore.tryAcquire(100, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 12); semaphore.release(10); QCOMPARE(semaphore.available(), 22); time.start(); QVERIFY(!semaphore.tryAcquire(100, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 22); time.start(); QVERIFY(semaphore.tryAcquire(1, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 21); time.start(); QVERIFY(semaphore.tryAcquire(1, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 20); time.start(); QVERIFY(semaphore.tryAcquire(10, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 10); time.start(); QVERIFY(semaphore.tryAcquire(10, timeout)); - QVERIFYLE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), 0); QCOMPARE(semaphore.available(), 0); // should not be able to acquire more time.start(); QVERIFY(!semaphore.tryAcquire(1, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); time.start(); QVERIFY(!semaphore.tryAcquire(1, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); time.start(); QVERIFY(!semaphore.tryAcquire(10, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); time.start(); QVERIFY(!semaphore.tryAcquire(10, timeout)); - QVERIFYGE(time.elapsed(), timeout); + FUZZYCOMPARE(time.elapsed(), timeout); QCOMPARE(semaphore.available(), 0); -#undef QVERIFYGE -#undef QVERIFYLE +#undef FUZZYCOMPARE } void tst_QSemaphore::tryAcquireWithTimeoutStarvation() -- cgit v1.2.3 From 009cd671ec5a51ab360bce39262482ee1b86dc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Mill=C3=A1n=20Soto?= Date: Wed, 18 Jan 2012 18:23:43 +0100 Subject: Do not check isActiveWindow in QAccessibleWidget::state QWidget::isActiveWindow() was being checked in QAccessibleWidget::state to determine if a widget is focusable. As a result, focusable widgets were reported to be not focusable when the window was not active. Change-Id: I73c47181ed132a84f0251cb67d0e20912e29a1a6 Reviewed-by: Frederik Gladhorn --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index eca5814b8e..eb76202e35 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -1685,7 +1685,7 @@ void tst_QAccessibility::lineEditTest() QCOMPARE(iface->childCount(), 0); QVERIFY(iface->state().sizeable); QVERIFY(iface->state().movable); - QCOMPARE(bool(iface->state().focusable), le->isActiveWindow()); + QVERIFY(iface->state().focusable); QVERIFY(iface->state().selectable); QVERIFY(iface->state().hasPopup); QCOMPARE(bool(iface->state().focused), le->hasFocus()); @@ -1714,7 +1714,7 @@ void tst_QAccessibility::lineEditTest() QApplication::processEvents(); QVERIFY(!(iface->state().sizeable)); QVERIFY(!(iface->state().movable)); - QCOMPARE(bool(iface->state().focusable), le->isActiveWindow()); + QVERIFY(iface->state().focusable); QVERIFY(iface->state().selectable); QVERIFY(iface->state().hasPopup); QCOMPARE(bool(iface->state().focused), le->hasFocus()); -- cgit v1.2.3 From da18ada6bf60e0a6724ee55abb619d367f8c4633 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 1 Feb 2012 15:42:00 +1000 Subject: testlib: Clear expected failures after every data row. Previously, expected failures were only cleared at the end of each test function, i.e. after all data rows were finished. This meant that if a data-driven test function called QEXPECT_FAIL and then didn't perform any further verification steps to trigger the expected failure, the expected failure would be carried over to the next data row, probably causing the first verification step in the test function to XPASS (with a seemingly irrelevant error message) for the next data row. This commit adds the new function QTestResult::finishedCurrentTestData() to cleanup after each data row is executed. This function treats calls to QEXPECT_FAIL without subsequent verification steps as a test failure. This commit also adds a regression test to demonstrate that expected failures can no longer be carried over from one data row to another. If run against the previous version of testlib, the new test would report a pass instead of an error. Change-Id: Ida5c7f080815b0dca9531131fed582b0918334cb Reviewed-by: Rohan McGovern --- .../testlib/selftests/expected_expectfail.lightxml | 32 ++++++++++++++-------- .../auto/testlib/selftests/expected_expectfail.txt | 26 ++++++++++-------- .../auto/testlib/selftests/expected_expectfail.xml | 32 ++++++++++++++-------- .../testlib/selftests/expected_expectfail.xunitxml | 6 +++- .../selftests/expectfail/tst_expectfail.cpp | 16 +++++++++++ 5 files changed, 77 insertions(+), 35 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index 02e4dde7d8..eab0bbbaa3 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -9,7 +9,7 @@ - + @@ -21,31 +21,31 @@ - + - + - + - + - + - + @@ -55,23 +55,33 @@ - + - + + + + + + + + + + + - + - + diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index 1b98b6b561..0286490372 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -3,35 +3,37 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE PASS : tst_ExpectFail::initTestCase() QDEBUG : tst_ExpectFail::xfailAndContinue() begin XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(72)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(74)] QDEBUG : tst_ExpectFail::xfailAndContinue() after PASS : tst_ExpectFail::xfailAndContinue() QDEBUG : tst_ExpectFail::xfailAndAbort() begin XFAIL : tst_ExpectFail::xfailAndAbort() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(80)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(82)] PASS : tst_ExpectFail::xfailAndAbort() FAIL! : tst_ExpectFail::xfailTwice() Already expecting a fail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(90)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(92)] XFAIL : tst_ExpectFail::xfailWithQString() A string - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(99)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(101)] XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(104)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(106)] PASS : tst_ExpectFail::xfailWithQString() XFAIL : tst_ExpectFail::xfailDataDriven(Abort) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(133)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)] XFAIL : tst_ExpectFail::xfailDataDriven(Continue) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(133)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)] PASS : tst_ExpectFail::xfailDataDriven() PASS : tst_ExpectFail::xfailOnWrongRow() XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(168)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(170)] XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(168)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(170)] PASS : tst_ExpectFail::xfailOnAnyRow() +FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements +FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements XPASS : tst_ExpectFail::xpass() 'true' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(172)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(190)] XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(196)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(212)] PASS : tst_ExpectFail::cleanupTestCase() -Totals: 8 passed, 3 failed, 0 skipped +Totals: 8 passed, 5 failed, 0 skipped ********* Finished testing of tst_ExpectFail ********* diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 74b11fb0e5..3c8baf9271 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -11,7 +11,7 @@ - + @@ -23,31 +23,31 @@ - + - + - + - + - + - + @@ -57,23 +57,33 @@ - + - + + + + + + + + + + + - + - + diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml index 017e4501c1..d13cf6687f 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml +++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml @@ -1,5 +1,5 @@ - + @@ -30,6 +30,10 @@ + + + + diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp index 3a000ba182..56895b3801 100644 --- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp +++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp @@ -60,6 +60,8 @@ private slots: void xfailOnWrongRow() const; void xfailOnAnyRow_data() const; void xfailOnAnyRow() const; + void xfailWithoutVerify_data() const; + void xfailWithoutVerify() const; void xpass() const; void xpassDataDriven_data() const; void xpassDataDriven() const; @@ -168,6 +170,20 @@ void tst_ExpectFail::xfailOnAnyRow() const QVERIFY(false); } +void tst_ExpectFail::xfailWithoutVerify_data() const +{ + QTest::addColumn("dummy"); + + QTest::newRow("first row") << 0; + QTest::newRow("second row") << 1; +} + +void tst_ExpectFail::xfailWithoutVerify() const +{ + QVERIFY(true); + QEXPECT_FAIL("", "This expected failure should be ignored", Abort); +} + void tst_ExpectFail::xpass() const { QEXPECT_FAIL("", "This test should xpass", Abort); -- cgit v1.2.3 From 26c41ed918142a6fadac142b4f7e63426bebc4a1 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 1 Feb 2012 16:39:14 +1000 Subject: testlib: Clear ignored messages after every data row Previously, ignored messages were only cleared at the end of each test function, i.e. after all data rows were finished. This meant that if a data row in a data-driven test function didn't cause all of the expected messages to be generated, the remaining messages would be carried over to the next data row. This would result in errors about missing messages being associated with the last data row rather than with the correct data row. This commit makes testlib check for missing ignored messages after running each data row rather than only doing so after the last data row. This commit also adds a regression test to demonstrate that ignored messages can no longer be carried over from one data row to another. Change-Id: Ibee51aa6e96866fbcbcb4acee1a8340a86a6a4ba Reviewed-by: Rohan McGovern --- .../testlib/selftests/expected_warnings.lightxml | 26 ++++++++++++++++++++++ tests/auto/testlib/selftests/expected_warnings.txt | 8 ++++++- tests/auto/testlib/selftests/expected_warnings.xml | 26 ++++++++++++++++++++++ .../testlib/selftests/expected_warnings.xunitxml | 14 +++++++++++- .../testlib/selftests/warnings/tst_warnings.cpp | 19 ++++++++++++++++ 5 files changed, 91 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_warnings.lightxml b/tests/auto/testlib/selftests/expected_warnings.lightxml index 116156ed8a..ad786832ca 100644 --- a/tests/auto/testlib/selftests/expected_warnings.lightxml +++ b/tests/auto/testlib/selftests/expected_warnings.lightxml @@ -37,6 +37,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_warnings.txt b/tests/auto/testlib/selftests/expected_warnings.txt index 6f7d0f491b..6196ec0261 100644 --- a/tests/auto/testlib/selftests/expected_warnings.txt +++ b/tests/auto/testlib/selftests/expected_warnings.txt @@ -11,6 +11,12 @@ PASS : tst_Warnings::testWarnings() INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarnings() Not all expected messages were received +INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning0" +INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning1" +FAIL! : tst_Warnings::testMissingWarningsWithData(first row) Not all expected messages were received +INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning0" +INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning1" +FAIL! : tst_Warnings::testMissingWarningsWithData(second row) Not all expected messages were received PASS : tst_Warnings::cleanupTestCase() -Totals: 3 passed, 1 failed, 0 skipped +Totals: 3 passed, 3 failed, 0 skipped ********* Finished testing of tst_Warnings ********* diff --git a/tests/auto/testlib/selftests/expected_warnings.xml b/tests/auto/testlib/selftests/expected_warnings.xml index 13e6c1df79..12cff7c13d 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xml +++ b/tests/auto/testlib/selftests/expected_warnings.xml @@ -39,6 +39,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_warnings.xunitxml b/tests/auto/testlib/selftests/expected_warnings.xunitxml index a96393d648..3e3b9ce18e 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xunitxml +++ b/tests/auto/testlib/selftests/expected_warnings.xunitxml @@ -1,5 +1,5 @@ - + @@ -18,6 +18,14 @@ + + + + + + + + @@ -27,6 +35,10 @@ + + + + diff --git a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp index 933d0cc6ce..e53869e18e 100644 --- a/tests/auto/testlib/selftests/warnings/tst_warnings.cpp +++ b/tests/auto/testlib/selftests/warnings/tst_warnings.cpp @@ -49,6 +49,8 @@ class tst_Warnings: public QObject private slots: void testWarnings(); void testMissingWarnings(); + void testMissingWarningsWithData_data(); + void testMissingWarningsWithData(); }; void tst_Warnings::testWarnings() @@ -82,6 +84,23 @@ void tst_Warnings::testMissingWarnings() qWarning("Warning2"); } +void tst_Warnings::testMissingWarningsWithData_data() +{ + QTest::addColumn("dummy"); + + QTest::newRow("first row") << 0; + QTest::newRow("second row") << 1; +} + +void tst_Warnings::testMissingWarningsWithData() +{ + QTest::ignoreMessage(QtWarningMsg, "Warning0"); + QTest::ignoreMessage(QtWarningMsg, "Warning1"); + QTest::ignoreMessage(QtWarningMsg, "Warning2"); + + qWarning("Warning2"); +} + QTEST_MAIN(tst_Warnings) #include "tst_warnings.moc" -- cgit v1.2.3 From 4c9266fd16304f78e8759dc4c10e60b782f13f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Mill=C3=A1n=20Soto?= Date: Tue, 7 Feb 2012 11:53:31 +0100 Subject: Make copy and cut methods work in QAccessibleTextEdit Correct the implementation of cutText and copyText in QAccessibleTextEdit so they use cut() and copy() methods of QTextEdit Cherry picked from Qt 4 - 36202cf8fca822492615d418bd563a40bee4af08 Change-Id: I86a531ed7059b1a928cb8515c2743d4d8b596b36 Reviewed-by: Frederik Gladhorn --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index eb76202e35..63770f14cb 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -1516,6 +1516,12 @@ void tst_QAccessibility::textEditTest() QCOMPARE(iface->textInterface()->characterRect(0, QAccessible2::RelativeToParent).size(), QSize(fm.width("h"), fm.height())); QCOMPARE(iface->textInterface()->characterRect(5, QAccessible2::RelativeToParent).size(), QSize(fm.width(" "), fm.height())); QCOMPARE(iface->textInterface()->characterRect(6, QAccessible2::RelativeToParent).size(), QSize(fm.width("w"), fm.height())); + + iface->editableTextInterface()->copyText(6, 11); + QCOMPARE(QApplication::clipboard()->text(), QLatin1String("world")); + iface->editableTextInterface()->cutText(12, 16); + QCOMPARE(QApplication::clipboard()->text(), QLatin1String("how ")); + QCOMPARE(iface->textInterface()->text(12, 15), QLatin1String("are")); } QTestAccessibility::clearEvents(); } -- cgit v1.2.3 From 979cb5a09e3c2c438eb7f122325d66ed6bf80aba Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Wed, 8 Feb 2012 15:13:22 +1000 Subject: Initialize dynamic meta object extradata. QMetaObject::invokeMethod attempts to deference the extradata for meta objects versions 6 and greater which is causing a crash in some of the qtquick1 tests. Change-Id: If5b2ca83b15de2cd558976c6b681dd5457c404d1 Reviewed-by: Chris Adams Reviewed-by: Kent Hansen --- .../qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index def1b74ea4..966ac021ac 100644 --- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -64,6 +64,7 @@ private slots: void staticMetacall(); void copyMetaObject(); void serialize(); + void relocatableData(); void removeNotifySignal(); void usage_signal(); @@ -1028,6 +1029,39 @@ void tst_QMetaObjectBuilder::serialize() } } +void tst_QMetaObjectBuilder::relocatableData() +{ + QMetaObjectBuilder builder; + builder.setClassName("TestObject"); + + QMetaMethodBuilder intPropChanged = builder.addSignal("intPropChanged(int)"); + intPropChanged.setParameterNames(QList() << "newIntPropValue"); + + QMetaPropertyBuilder prop = builder.addProperty("intProp", "int"); + prop.setNotifySignal(intPropChanged); + + QMetaMethodBuilder voidSlotInt = builder.addSlot("voidSlotInt(int)"); + voidSlotInt.setParameterNames(QList() << "slotIntArg"); + + QMetaMethodBuilder listInvokableQRealQString = builder.addMethod("listInvokableQRealQString(qreal,QString)"); + listInvokableQRealQString.setReturnType("QVariantList"); + listInvokableQRealQString.setParameterNames(QList() << "qrealArg" << "qstringArg"); + + bool ok = false; + QByteArray data = builder.toRelocatableData(&ok); + QVERIFY(ok); + + QMetaObjectBuilder builder2; + QMetaObject meta2; + builder2.fromRelocatableData(&meta2, &QObject::staticMetaObject, data); + + QMetaObject *meta = builder.toMetaObject(); + + QVERIFY(sameMetaObject(meta, &meta2)); + free(meta); +} + + // Check that removing a method updates notify signals appropriately void tst_QMetaObjectBuilder::removeNotifySignal() { -- cgit v1.2.3 From a2bea730c2047b2fc22bcc129b3dcfeef89a379d Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Tue, 7 Feb 2012 09:55:01 +0100 Subject: Fix qlocalsocket autotest Lackey is currently not built due to a qscript dependency. Mark the test as an expected failure, so we can resume testing QLocalSocket again. See QTBUG-24142 Change-Id: I2642ed30cf7a2068f30f63801c632fea7dae7691 Reviewed-by: Andrew Stanley-Jones --- .../socket/qlocalsocket/tst_qlocalsocket.cpp | 30 ++++++++-------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index 221ef602a1..5d3cb6eaae 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -53,10 +53,6 @@ class tst_QLocalSocket : public QObject { Q_OBJECT -public: - tst_QLocalSocket(); - virtual ~tst_QLocalSocket(); - public Q_SLOTS: void init(); void cleanup(); @@ -110,20 +106,6 @@ private slots: void asyncDisconnectNotify(); }; -tst_QLocalSocket::tst_QLocalSocket() -{ - if (!QFile::exists("lackey/lackey" -#ifdef Q_OS_WIN - ".exe" -#endif - )) - qWarning() << "lackey executable doesn't exists!"; -} - -tst_QLocalSocket::~tst_QLocalSocket() -{ -} - void tst_QLocalSocket::init() { qRegisterMetaType("QLocalSocket::LocalSocketState"); @@ -749,6 +731,16 @@ void tst_QLocalSocket::processConnection_data() */ void tst_QLocalSocket::processConnection() { +#ifdef Q_OS_WIN +# define EXE_SUFFIX ".exe" +#else +# define EXE_SUFFIX +#endif + +// ### lackey is currently not build + QEXPECT_FAIL("", "lackey is currently not built due to qscript dependency, QTBUG-24142", Abort); + QVERIFY(QFile::exists("lackey/lackey" EXE_SUFFIX)); + QFETCH(int, processes); QStringList serverArguments = QStringList() << SRCDIR "lackey/scripts/server.js" << QString::number(processes); QProcess producer; @@ -758,7 +750,7 @@ void tst_QLocalSocket::processConnection() #endif QList consumers; producer.start("lackey/lackey", serverArguments); - QVERIFY(producer.waitForStarted(-1)); + QVERIFY2(producer.waitForStarted(-1), qPrintable(producer.errorString())); QTest::qWait(2000); for (int i = 0; i < processes; ++i) { QStringList arguments = QStringList() << SRCDIR "lackey/scripts/client.js"; -- cgit v1.2.3 From 6dc85408cdf2341f8b7c0911abfb3bb6a37021a8 Mon Sep 17 00:00:00 2001 From: Pasi Matilainen Date: Mon, 16 Jan 2012 09:10:18 +0200 Subject: QTextEdit cursor position fix when moving left/right with selection When text has been selected in a QTextEdit and the left or right arrow key is pressed, the cursor moves one character beyond the start or end of the selection, when it shouldn't move past the selection. Fixed by moving the cursor to the right place when a selection is active. Task-number: QTBUG-22853 Change-Id: I9ea1863436db98627a6fd041ce554cf10be26493 Reviewed-by: Jiang Jiang (cherry picked from commit 1b031759ddfdab9703dfecac13f1ed318da3dafe) --- tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp | 4 ++-- tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index 1b483512e3..615e4453bc 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -1474,11 +1474,11 @@ void tst_QPlainTextEdit::selectionChanged() QCOMPARE(selectionChangedSpy.count(), 3); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 5); + QCOMPARE(ed->textCursor().position(), 4); QCOMPARE(selectionChangedSpy.count(), 4); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 6); + QCOMPARE(ed->textCursor().position(), 5); QCOMPARE(selectionChangedSpy.count(), 4); } diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index 47eb3a59a3..6253ef89e4 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -1840,11 +1840,11 @@ void tst_QTextEdit::selectionChanged() QCOMPARE(selectionChangedSpy.count(), 3); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 5); + QCOMPARE(ed->textCursor().position(), 4); QCOMPARE(selectionChangedSpy.count(), 4); QTest::keyClick(ed, Qt::Key_Right); - QCOMPARE(ed->textCursor().position(), 6); + QCOMPARE(ed->textCursor().position(), 5); QCOMPARE(selectionChangedSpy.count(), 4); } -- cgit v1.2.3 From 5953304bc5f50eca77f78fd0623479de6bebacbe Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 6 Feb 2012 15:03:25 +0100 Subject: QSqlTableModel::setRecord(): do not try to detect value changes In an apparent attempt to be economical with emitting dataChanged() and submitting SQL to the databse, setRecord() compares each field value of the record with the old value, taking action only when a difference is detected. Several complaints against this code are: -The comparision does not work on float type. -It is really up to the application and database to decide this. The model should make few assumptions. The application has the option to omit fields from the record that should be ignored. -The current behavior seems to assume that the "old" values are the current state of the database, but the database may have changed since the model was last refreshed. -The code compares the value from record(), which probably corresponds to the EditRole, with the DisplayRole value from data(). Change-Id: I11477c185eb411d442144dc682893d0df12d03d5 Reviewed-by: Oswald Buddenhagen --- tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index 6a827e65c5..518c6b6d25 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -412,10 +412,10 @@ void tst_QSqlTableModel::setRecord() model.submit(); else { // dataChanged() is not emitted when submitAll() is called - QCOMPARE(spy.count(), 2); + QCOMPARE(spy.count(), model.columnCount()); QCOMPARE(spy.at(0).count(), 2); - QCOMPARE(qvariant_cast(spy.at(0).at(0)), model.index(i, 1)); - QCOMPARE(qvariant_cast(spy.at(0).at(1)), model.index(i, 1)); + QCOMPARE(qvariant_cast(spy.at(1).at(0)), model.index(i, 1)); + QCOMPARE(qvariant_cast(spy.at(1).at(1)), model.index(i, 1)); } } -- cgit v1.2.3 From 7b726900ecdd1d4d5e9b8f7c34f00dd27524b1c6 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 6 Feb 2012 16:05:53 +0100 Subject: QSqlTableModel::setRecord(): emit dataChanged() consistently Previously, if any fields in the supplied record could not be matched with a column in the target table, dataChanged() was supressed for all columns for OnManualSubmit. This is not good because it prevents other views from noticing the fields that *do* change. It's simplest and probably more efficient just to emit dataChanged() once for the whole row. Fewer signals need to be processed and in typical cases much or all of the row is likely to be changed anyway. Change-Id: Ib56bf9a18e51b9cb85771acefcb2bf26e295a54e Reviewed-by: Oswald Buddenhagen --- tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index 518c6b6d25..a819cb720c 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -412,10 +412,10 @@ void tst_QSqlTableModel::setRecord() model.submit(); else { // dataChanged() is not emitted when submitAll() is called - QCOMPARE(spy.count(), model.columnCount()); + QCOMPARE(spy.count(), 1); QCOMPARE(spy.at(0).count(), 2); - QCOMPARE(qvariant_cast(spy.at(1).at(0)), model.index(i, 1)); - QCOMPARE(qvariant_cast(spy.at(1).at(1)), model.index(i, 1)); + QCOMPARE(qvariant_cast(spy.at(0).at(0)), model.index(i, 0)); + QCOMPARE(qvariant_cast(spy.at(0).at(1)), model.index(i, rec.count() - 1)); } } -- cgit v1.2.3 From ae85d7c965e7d50404c056a77c73bfe00267fa12 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 30 Dec 2011 13:18:24 +0100 Subject: Treat pointers to QObject derived types in QVariant specially. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is possible to do this for example: QVariant v = QVariant::fromValue(); QObject *object = v.value(); This means that if a QVariant contains a pointer to a QObject derived type, third parties can extract a QObject* and use its properties without knowing the concrete type. This is a source compatible change. Change-Id: Iee9a9437e99cc2f40d1a4bfea47275482ef7161f Reviewed-by: Jędrzej Nowacki --- .../auto/corelib/kernel/qvariant/tst_qvariant.cpp | 102 +++++++++++++++++++-- 1 file changed, 96 insertions(+), 6 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index f7bdfd800a..6991134938 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -83,11 +83,22 @@ Q_DECLARE_METATYPE(QFont) Q_DECLARE_METATYPE(QColor) Q_DECLARE_METATYPE(QKeySequence) +class CustomNonQObject; + class tst_QVariant : public QObject { Q_OBJECT +public: + tst_QVariant(QObject *parent = 0) + : QObject(parent), customNonQObjectPointer(0) + { + + } + private slots: + void cleanupTestCase(); + void constructor(); void copy_constructor(); void isNull(); @@ -176,6 +187,7 @@ private slots: void qvariant_cast_QObject_data(); void qvariant_cast_QObject(); + void qvariant_cast_QObject_derived(); void toLocale(); @@ -275,6 +287,9 @@ private: void dataStream_data(QDataStream::Version version); void loadQVariantFromDataStream(QDataStream::Version version); void saveQVariantFromDataStream(QDataStream::Version version); + + CustomNonQObject *customNonQObjectPointer; + QVector objectPointerTestData; }; Q_DECLARE_METATYPE(QDate) @@ -2452,20 +2467,63 @@ void tst_QVariant::invalidQColor() const QVERIFY(!qvariant_cast(va).isValid()); } -void tst_QVariant::qvariant_cast_QObject_data() { +class CustomQObject : public QObject { + Q_OBJECT +public: + CustomQObject(QObject *parent = 0) : QObject(parent) {} +}; +class CustomQWidget : public QWidget { + Q_OBJECT +public: + CustomQWidget(QWidget *parent = 0) : QWidget(parent) {} +}; +Q_DECLARE_METATYPE(CustomQObject*) +Q_DECLARE_METATYPE(CustomQWidget*) + +class CustomNonQObject { }; +Q_DECLARE_METATYPE(CustomNonQObject) +Q_DECLARE_METATYPE(CustomNonQObject*) + +void tst_QVariant::cleanupTestCase() +{ + delete customNonQObjectPointer; + qDeleteAll(objectPointerTestData); +} +void tst_QVariant::qvariant_cast_QObject_data() +{ QTest::addColumn("data"); QTest::addColumn("success"); - QObject *obj = new QObject(this); + QObject *obj = new QObject; obj->setObjectName(QString::fromLatin1("Hello")); QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, &obj) << true; QTest::newRow("from QObject2") << QVariant::fromValue(obj) << true; QTest::newRow("from String") << QVariant(QLatin1String("1, 2, 3")) << false; QTest::newRow("from int") << QVariant((int) 123) << false; -} - - -void tst_QVariant::qvariant_cast_QObject() { + QWidget *widget = new QWidget; + widget->setObjectName(QString::fromLatin1("Hello")); + QTest::newRow("from QWidget") << QVariant::fromValue(widget) << true; + CustomQObject *customObject = new CustomQObject(this); + customObject->setObjectName(QString::fromLatin1("Hello")); + QTest::newRow("from Derived QObject") << QVariant::fromValue(customObject) << true; + CustomQWidget *customWidget = new CustomQWidget; + customWidget->setObjectName(QString::fromLatin1("Hello")); + QTest::newRow("from Derived QWidget") << QVariant::fromValue(customWidget) << true; + QTest::newRow("from custom Object") << QVariant::fromValue(CustomNonQObject()) << false; + + // Deleted in cleanupTestCase. + customNonQObjectPointer = new CustomNonQObject; + QTest::newRow("from custom ObjectStar") << QVariant::fromValue(customNonQObjectPointer) << false; + + // Deleted in cleanupTestCase. + objectPointerTestData.push_back(obj); + objectPointerTestData.push_back(widget); + objectPointerTestData.push_back(customObject); + objectPointerTestData.push_back(customWidget); +} + +void tst_QVariant::qvariant_cast_QObject() +{ QFETCH(QVariant, data); QFETCH(bool, success); @@ -2476,6 +2534,38 @@ void tst_QVariant::qvariant_cast_QObject() { } } +class CustomQObjectDerived : public CustomQObject { + Q_OBJECT +public: + CustomQObjectDerived(QObject *parent = 0) : CustomQObject(parent) {} +}; +Q_DECLARE_METATYPE(CustomQObjectDerived*) + +void tst_QVariant::qvariant_cast_QObject_derived() +{ + { + CustomQObjectDerived *object = new CustomQObjectDerived(this); + QVariant data = QVariant::fromValue(object); + + QVERIFY(data.userType() == qMetaTypeId()); + + QCOMPARE(data.value(), object); + QCOMPARE(data.value(), object); + QCOMPARE(data.value(), object); + QVERIFY(data.value() == 0); + } + { + CustomQWidget customWidget; + QWidget *widget = &customWidget; + QVariant data = QVariant::fromValue(widget); + QVERIFY(data.userType() == QMetaType::QWidgetStar); + + QCOMPARE(data.value(), widget); + QCOMPARE(data.value(), widget); + QCOMPARE(data.value(), widget); + } +} + Q_DECLARE_METATYPE(qint8); void tst_QVariant::convertToQUint8() const -- cgit v1.2.3 From 0c978407088fdbd15dc185aef7506087a88e1443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Tue, 31 Jan 2012 17:35:00 +0100 Subject: Introduce Q_DECLARE_OPAQUE_POINTER To hide the IsPointerToTypeDerivedFromQObject monstruosity :-) Documentation for Q_DECLARE_METATYPE and qRegisterMetaType was updated to mention requirements on registered types and how they can be circumvented for pointer types with the new macro. Change-Id: If83b037a8e2f28761eb903525e87008107298801 Reviewed-by: Harald Fernengel Reviewed-by: Stephen Kelly --- tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 6991134938..001749e88e 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3451,12 +3451,8 @@ void tst_QVariant::colorInteger() } class Forward; -QT_BEGIN_NAMESPACE namespace QtPrivate { -template <> struct IsPointerToTypeDerivedFromQObject { - enum { Value = false }; -}; -} QT_END_NAMESPACE -Q_DECLARE_METATYPE(Forward*); +Q_DECLARE_OPAQUE_POINTER(Forward*) +Q_DECLARE_METATYPE(Forward*) void tst_QVariant::forwardDeclare() { -- cgit v1.2.3 From 931f4501a6f5fb77c9bd9f48b63a8ee88cba4355 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 8 Feb 2012 14:06:18 +1000 Subject: Fixed tst_selftests on OSX 10.7 Our OSX 10.7 test machines send a SIGILL rather than a SIGSEGV to a process which attempts to dereference a null pointer. Change the "crashes" test to dereference an invalid pointer with a value slightly greater than 0 so that we get the same crash behavior on all (unix) platforms. Change-Id: I700a2c7d654a9468af5e5996010a258695ed2ae5 Reviewed-by: Jason McDonald --- tests/auto/testlib/selftests/crashes/tst_crashes.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index b6298f5e63..c2174e90e8 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -61,8 +61,14 @@ void tst_Crashes::crash() //we avoid the error dialogbox to appear on windows SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); #endif + /* + We deliberately dereference an invalid but non-zero address; + it should be non-zero because a few platforms may have special crash behavior + when dereferencing exactly 0 (e.g. some macs have been observed to generate SIGILL + rather than SIGSEGV). + */ int *i = 0; - *i = 1; + i[1] = 1; } QTEST_MAIN(tst_Crashes) -- cgit v1.2.3 From 95d0b27711c2f75af233c9a083c9818400db0957 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 3 Feb 2012 10:22:13 +1000 Subject: testlib: Add selftests for skip and fail inside cleanupTestCase(). Change-Id: I9bbe774c3259338d452cd1eb1a6f37a85db15921 Reviewed-by: Rohan McGovern --- .../selftests/expected_failcleanup.lightxml | 15 ++++++ .../testlib/selftests/expected_failcleanup.txt | 8 +++ .../testlib/selftests/expected_failcleanup.xml | 18 +++++++ .../selftests/expected_failcleanup.xunitxml | 13 +++++ .../selftests/expected_skipcleanup.lightxml | 15 ++++++ .../testlib/selftests/expected_skipcleanup.txt | 8 +++ .../testlib/selftests/expected_skipcleanup.xml | 18 +++++++ .../selftests/expected_skipcleanup.xunitxml | 15 ++++++ .../testlib/selftests/failcleanup/failcleanup.pro | 7 +++ .../selftests/failcleanup/tst_failcleanup.cpp | 63 ++++++++++++++++++++++ tests/auto/testlib/selftests/selftests.pri | 2 +- tests/auto/testlib/selftests/selftests.qrc | 8 +++ .../testlib/selftests/skipcleanup/skipcleanup.pro | 7 +++ .../selftests/skipcleanup/tst_skipcleanup.cpp | 63 ++++++++++++++++++++++ tests/auto/testlib/selftests/tst_selftests.cpp | 2 + 15 files changed, 261 insertions(+), 1 deletion(-) create mode 100644 tests/auto/testlib/selftests/expected_failcleanup.lightxml create mode 100644 tests/auto/testlib/selftests/expected_failcleanup.txt create mode 100644 tests/auto/testlib/selftests/expected_failcleanup.xml create mode 100644 tests/auto/testlib/selftests/expected_failcleanup.xunitxml create mode 100644 tests/auto/testlib/selftests/expected_skipcleanup.lightxml create mode 100644 tests/auto/testlib/selftests/expected_skipcleanup.txt create mode 100644 tests/auto/testlib/selftests/expected_skipcleanup.xml create mode 100644 tests/auto/testlib/selftests/expected_skipcleanup.xunitxml create mode 100644 tests/auto/testlib/selftests/failcleanup/failcleanup.pro create mode 100644 tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp create mode 100644 tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro create mode 100644 tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_failcleanup.lightxml b/tests/auto/testlib/selftests/expected_failcleanup.lightxml new file mode 100644 index 0000000000..83ce7a7b15 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanup.lightxml @@ -0,0 +1,15 @@ + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_failcleanup.txt b/tests/auto/testlib/selftests/expected_failcleanup.txt new file mode 100644 index 0000000000..08c10b1823 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanup.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_FailCleanup ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_FailCleanup::initTestCase() +PASS : tst_FailCleanup::aTestFunction() +FAIL! : tst_FailCleanup::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase) + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp(59)] +Totals: 2 passed, 1 failed, 0 skipped +********* Finished testing of tst_FailCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xml b/tests/auto/testlib/selftests/expected_failcleanup.xml new file mode 100644 index 0000000000..5d0d2c5751 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanup.xml @@ -0,0 +1,18 @@ + + + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_failcleanup.xunitxml b/tests/auto/testlib/selftests/expected_failcleanup.xunitxml new file mode 100644 index 0000000000..6e35566be8 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_failcleanup.xunitxml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.lightxml b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml new file mode 100644 index 0000000000..d2bc3b766e --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanup.lightxml @@ -0,0 +1,15 @@ + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.txt b/tests/auto/testlib/selftests/expected_skipcleanup.txt new file mode 100644 index 0000000000..c97f31c2a9 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanup.txt @@ -0,0 +1,8 @@ +********* Start testing of tst_SkipCleanup ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_SkipCleanup::initTestCase() +PASS : tst_SkipCleanup::aTestFunction() +SKIP : tst_SkipCleanup::cleanupTestCase() Skip inside cleanupTestCase. + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp(59)] +Totals: 2 passed, 0 failed, 1 skipped +********* Finished testing of tst_SkipCleanup ********* diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xml b/tests/auto/testlib/selftests/expected_skipcleanup.xml new file mode 100644 index 0000000000..8fbfc7711c --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xml @@ -0,0 +1,18 @@ + + + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml b/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml new file mode 100644 index 0000000000..b8f67e2d07 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_skipcleanup.xunitxml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro new file mode 100644 index 0000000000..426d7cc45b --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro @@ -0,0 +1,7 @@ +SOURCES += tst_failcleanup.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + +TARGET = failcleanup diff --git a/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp new file mode 100644 index 0000000000..a1b3b2d15a --- /dev/null +++ b/tests/auto/testlib/selftests/failcleanup/tst_failcleanup.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +class tst_FailCleanup: public QObject +{ +Q_OBJECT +private slots: + void aTestFunction() const; + void cleanupTestCase() const; +}; + +void tst_FailCleanup::aTestFunction() const +{ + QVERIFY(true); +} + +void tst_FailCleanup::cleanupTestCase() const +{ + QVERIFY2(false, "Fail inside cleanupTestCase"); +} + +QTEST_APPLESS_MAIN(tst_FailCleanup) +#include "tst_failcleanup.moc" diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri index 95664c3793..9d4b2bd600 100644 --- a/tests/auto/testlib/selftests/selftests.pri +++ b/tests/auto/testlib/selftests/selftests.pri @@ -4,4 +4,4 @@ SUBPROGRAMS = subtest warnings maxwarnings cmptest globaldata skip \ exceptionthrow qexecstringlist datatable commandlinedata\ benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \ benchliboptions xunit badxml longstring float printdatatags \ - printdatatagswithglobaltags findtestdata counting + printdatatagswithglobaltags findtestdata counting skipcleanup failcleanup diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc index d10aa56ceb..f882068f6d 100644 --- a/tests/auto/testlib/selftests/selftests.qrc +++ b/tests/auto/testlib/selftests/selftests.qrc @@ -64,6 +64,10 @@ expected_expectfail.txt expected_expectfail.xml expected_expectfail.xunitxml + expected_failcleanup.lightxml + expected_failcleanup.txt + expected_failcleanup.xml + expected_failcleanup.xunitxml expected_failinit.lightxml expected_failinit.txt expected_failinit.xml @@ -108,6 +112,10 @@ expected_skip.txt expected_skip.xml expected_skip.xunitxml + expected_skipcleanup.lightxml + expected_skipcleanup.txt + expected_skipcleanup.xml + expected_skipcleanup.xunitxml expected_skipinit.lightxml expected_skipinit.txt expected_skipinit.xml diff --git a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro new file mode 100644 index 0000000000..f98cda7596 --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro @@ -0,0 +1,7 @@ +SOURCES += tst_skipcleanup.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + +TARGET = skipcleanup diff --git a/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp new file mode 100644 index 0000000000..262aefa982 --- /dev/null +++ b/tests/auto/testlib/selftests/skipcleanup/tst_skipcleanup.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +class tst_SkipCleanup: public QObject +{ +Q_OBJECT +private slots: + void aTestFunction() const; + void cleanupTestCase() const; +}; + +void tst_SkipCleanup::aTestFunction() const +{ + QVERIFY(true); +} + +void tst_SkipCleanup::cleanupTestCase() const +{ + QSKIP("Skip inside cleanupTestCase."); +} + +QTEST_APPLESS_MAIN(tst_SkipCleanup) +#include "tst_skipcleanup.moc" diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index aaa58e092c..dc7966b82b 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -338,6 +338,7 @@ void tst_Selftests::runSubTest_data() << "exceptionthrow" #endif << "expectfail" + << "failcleanup" << "failinit" << "failinitdata" #if !defined(Q_OS_WIN) @@ -354,6 +355,7 @@ void tst_Selftests::runSubTest_data() << "qexecstringlist" << "singleskip" << "skip" + << "skipcleanup" << "skipinit" << "skipinitdata" << "sleep" -- cgit v1.2.3 From 7aa5a89eeff40b70b8318171f71bc222dc23179d Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 3 Feb 2012 13:03:10 +1000 Subject: Add data tag names to datetime selftest. Change-Id: I73a0faab06df99521a48f106d93dd7b9a620148d Reviewed-by: Rohan McGovern --- tests/auto/testlib/selftests/datetime/tst_datetime.cpp | 8 ++++---- tests/auto/testlib/selftests/expected_datetime.lightxml | 2 ++ tests/auto/testlib/selftests/expected_datetime.txt | 4 ++-- tests/auto/testlib/selftests/expected_datetime.xml | 2 ++ tests/auto/testlib/selftests/expected_datetime.xunitxml | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp index 60ebbfc104..c98f119f75 100644 --- a/tests/auto/testlib/selftests/datetime/tst_datetime.cpp +++ b/tests/auto/testlib/selftests/datetime/tst_datetime.cpp @@ -78,10 +78,10 @@ void tst_DateTime::qurl_data() const QTest::addColumn("operandA"); QTest::addColumn("operandB"); - QTest::newRow("") << QUrl() << QUrl(); - QTest::newRow("") << QUrl(QLatin1String("http://example.com")) << QUrl(); - QTest::newRow("") << QUrl() << QUrl(QLatin1String("http://example.com")); - QTest::newRow("") << QUrl(QLatin1String("http://example.com")) << QUrl(QLatin1String("http://example.com")); + QTest::newRow("empty urls") << QUrl() << QUrl(); + QTest::newRow("empty rhs") << QUrl(QLatin1String("http://example.com")) << QUrl(); + QTest::newRow("empty lhs") << QUrl() << QUrl(QLatin1String("http://example.com")); + QTest::newRow("same urls") << QUrl(QLatin1String("http://example.com")) << QUrl(QLatin1String("http://example.com")); } QTEST_MAIN(tst_DateTime) diff --git a/tests/auto/testlib/selftests/expected_datetime.lightxml b/tests/auto/testlib/selftests/expected_datetime.lightxml index 1b7e601585..0024b101aa 100644 --- a/tests/auto/testlib/selftests/expected_datetime.lightxml +++ b/tests/auto/testlib/selftests/expected_datetime.lightxml @@ -14,11 +14,13 @@ + + diff --git a/tests/auto/testlib/selftests/expected_datetime.txt b/tests/auto/testlib/selftests/expected_datetime.txt index 70d5c5a70c..e2966b9168 100644 --- a/tests/auto/testlib/selftests/expected_datetime.txt +++ b/tests/auto/testlib/selftests/expected_datetime.txt @@ -5,11 +5,11 @@ FAIL! : tst_DateTime::dateTime() Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] Expected (utc): 2000/05/03 04:03:04.000[UTC] Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(33)] -FAIL! : tst_DateTime::qurl() Compared values are not the same +FAIL! : tst_DateTime::qurl(empty rhs) Compared values are not the same Actual (operandA): http://example.com Expected (operandB): Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] -FAIL! : tst_DateTime::qurl() Compared values are not the same +FAIL! : tst_DateTime::qurl(empty lhs) Compared values are not the same Actual (operandA): Expected (operandB): http://example.com Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] diff --git a/tests/auto/testlib/selftests/expected_datetime.xml b/tests/auto/testlib/selftests/expected_datetime.xml index d848e73c82..f1b5a6aafd 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xml +++ b/tests/auto/testlib/selftests/expected_datetime.xml @@ -16,11 +16,13 @@ + + diff --git a/tests/auto/testlib/selftests/expected_datetime.xunitxml b/tests/auto/testlib/selftests/expected_datetime.xunitxml index b30d1c441f..f25e20674b 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xunitxml +++ b/tests/auto/testlib/selftests/expected_datetime.xunitxml @@ -11,10 +11,10 @@ Expected (utc): 2000/05/03 04:03:04.000[UTC]" result="fail"/> - - -- cgit v1.2.3 From 7b7b58ae095e1f098a401f584aeefeb6e2a2fd43 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 3 Feb 2012 15:02:08 +1000 Subject: Remove unused test results from testlib selftests. Some of the subtests are only run with plain-text output format. For those subtests, the other output formats were unused and gradually becoming out-of-date. Change-Id: I4c10f7f5bab2d2cc7d2d2ad641fbf5d4df02b798 Reviewed-by: Rohan McGovern --- .../selftests/expected_benchlibcallgrind.lightxml | 14 ------- .../selftests/expected_benchlibcallgrind.xml | 17 -------- .../selftests/expected_benchlibcallgrind.xunitxml | 12 ------ .../selftests/expected_benchliboptions.lightxml | 15 ------- .../testlib/selftests/expected_benchliboptions.xml | 17 -------- .../selftests/expected_benchliboptions.xunitxml | 12 ------ .../testlib/selftests/expected_crashes.lightxml | 15 ------- tests/auto/testlib/selftests/expected_crashes.xml | 18 --------- .../testlib/selftests/expected_crashes.xunitxml | 15 ------- .../auto/testlib/selftests/expected_float.lightxml | 44 -------------------- tests/auto/testlib/selftests/expected_float.xml | 47 ---------------------- .../auto/testlib/selftests/expected_float.xunitxml | 29 ------------- .../testlib/selftests/expected_multiexec.lightxml | 13 ------ .../auto/testlib/selftests/expected_multiexec.xml | 16 -------- .../testlib/selftests/expected_multiexec.xunitxml | 11 ----- .../auto/testlib/selftests/expected_sleep.lightxml | 13 ------ tests/auto/testlib/selftests/expected_sleep.xml | 16 -------- .../auto/testlib/selftests/expected_sleep.xunitxml | 11 ----- tests/auto/testlib/selftests/selftests.qrc | 18 --------- 19 files changed, 353 deletions(-) delete mode 100644 tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_benchlibcallgrind.xml delete mode 100644 tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml delete mode 100644 tests/auto/testlib/selftests/expected_benchliboptions.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_benchliboptions.xml delete mode 100644 tests/auto/testlib/selftests/expected_benchliboptions.xunitxml delete mode 100644 tests/auto/testlib/selftests/expected_crashes.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_crashes.xml delete mode 100644 tests/auto/testlib/selftests/expected_crashes.xunitxml delete mode 100644 tests/auto/testlib/selftests/expected_float.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_float.xml delete mode 100644 tests/auto/testlib/selftests/expected_float.xunitxml delete mode 100644 tests/auto/testlib/selftests/expected_multiexec.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_multiexec.xml delete mode 100644 tests/auto/testlib/selftests/expected_multiexec.xunitxml delete mode 100644 tests/auto/testlib/selftests/expected_sleep.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_sleep.xml delete mode 100644 tests/auto/testlib/selftests/expected_sleep.xunitxml (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml b/tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml deleted file mode 100644 index c2394e545e..0000000000 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.lightxml +++ /dev/null @@ -1,14 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xml b/tests/auto/testlib/selftests/expected_benchlibcallgrind.xml deleted file mode 100644 index b29b9c569e..0000000000 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml b/tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml deleted file mode 100644 index cc58f7fdd4..0000000000 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.xunitxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.lightxml b/tests/auto/testlib/selftests/expected_benchliboptions.lightxml deleted file mode 100644 index 63d0218b2c..0000000000 --- a/tests/auto/testlib/selftests/expected_benchliboptions.lightxml +++ /dev/null @@ -1,15 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.xml b/tests/auto/testlib/selftests/expected_benchliboptions.xml deleted file mode 100644 index 40bff95f79..0000000000 --- a/tests/auto/testlib/selftests/expected_benchliboptions.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.xunitxml b/tests/auto/testlib/selftests/expected_benchliboptions.xunitxml deleted file mode 100644 index 7317e90470..0000000000 --- a/tests/auto/testlib/selftests/expected_benchliboptions.xunitxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_crashes.lightxml b/tests/auto/testlib/selftests/expected_crashes.lightxml deleted file mode 100644 index 76890deb75..0000000000 --- a/tests/auto/testlib/selftests/expected_crashes.lightxml +++ /dev/null @@ -1,15 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_crashes.xml b/tests/auto/testlib/selftests/expected_crashes.xml deleted file mode 100644 index be01e633e9..0000000000 --- a/tests/auto/testlib/selftests/expected_crashes.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_crashes.xunitxml b/tests/auto/testlib/selftests/expected_crashes.xunitxml deleted file mode 100644 index 558491c598..0000000000 --- a/tests/auto/testlib/selftests/expected_crashes.xunitxml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml deleted file mode 100644 index a34618cf02..0000000000 --- a/tests/auto/testlib/selftests/expected_float.lightxml +++ /dev/null @@ -1,44 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_float.xml b/tests/auto/testlib/selftests/expected_float.xml deleted file mode 100644 index a9c7428250..0000000000 --- a/tests/auto/testlib/selftests/expected_float.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_float.xunitxml b/tests/auto/testlib/selftests/expected_float.xunitxml deleted file mode 100644 index f88e5e410e..0000000000 --- a/tests/auto/testlib/selftests/expected_float.xunitxml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_multiexec.lightxml b/tests/auto/testlib/selftests/expected_multiexec.lightxml deleted file mode 100644 index 1a66e92f8f..0000000000 --- a/tests/auto/testlib/selftests/expected_multiexec.lightxml +++ /dev/null @@ -1,13 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_multiexec.xml b/tests/auto/testlib/selftests/expected_multiexec.xml deleted file mode 100644 index 7f71f6edac..0000000000 --- a/tests/auto/testlib/selftests/expected_multiexec.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_multiexec.xunitxml b/tests/auto/testlib/selftests/expected_multiexec.xunitxml deleted file mode 100644 index 6bc04c3ddd..0000000000 --- a/tests/auto/testlib/selftests/expected_multiexec.xunitxml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_sleep.lightxml b/tests/auto/testlib/selftests/expected_sleep.lightxml deleted file mode 100644 index 1a056c8562..0000000000 --- a/tests/auto/testlib/selftests/expected_sleep.lightxml +++ /dev/null @@ -1,13 +0,0 @@ - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_sleep.xml b/tests/auto/testlib/selftests/expected_sleep.xml deleted file mode 100644 index cbc4d14004..0000000000 --- a/tests/auto/testlib/selftests/expected_sleep.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - @INSERT_QT_VERSION_HERE@ - @INSERT_QT_VERSION_HERE@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/expected_sleep.xunitxml b/tests/auto/testlib/selftests/expected_sleep.xunitxml deleted file mode 100644 index 409621e6bc..0000000000 --- a/tests/auto/testlib/selftests/expected_sleep.xunitxml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc index f882068f6d..d2f0a50824 100644 --- a/tests/auto/testlib/selftests/selftests.qrc +++ b/tests/auto/testlib/selftests/selftests.qrc @@ -9,18 +9,12 @@ expected_badxml.txt expected_badxml.xml expected_badxml.xunitxml - expected_benchlibcallgrind.lightxml expected_benchlibcallgrind.txt - expected_benchlibcallgrind.xml - expected_benchlibcallgrind.xunitxml expected_benchlibeventcounter.lightxml expected_benchlibeventcounter.txt expected_benchlibeventcounter.xml expected_benchlibeventcounter.xunitxml - expected_benchliboptions.lightxml expected_benchliboptions.txt - expected_benchliboptions.xml - expected_benchliboptions.xunitxml expected_benchlibtickcounter.lightxml expected_benchlibtickcounter.txt expected_benchlibtickcounter.xml @@ -41,9 +35,6 @@ expected_counting.txt expected_counting.xml expected_counting.xunitxml - expected_crashes.lightxml - expected_crashes.xml - expected_crashes.xunitxml expected_crashes_1.txt expected_crashes_2.txt expected_crashes_3.txt @@ -81,10 +72,7 @@ expected_fetchbogus.txt expected_fetchbogus.xml expected_fetchbogus.xunitxml - expected_float.lightxml expected_float.txt - expected_float.xml - expected_float.xunitxml expected_globaldata.lightxml expected_globaldata.txt expected_globaldata.xml @@ -97,10 +85,7 @@ expected_maxwarnings.txt expected_maxwarnings.xml expected_maxwarnings.xunitxml - expected_multiexec.lightxml expected_multiexec.txt - expected_multiexec.xml - expected_multiexec.xunitxml expected_printdatatags.txt expected_printdatatagswithglobaltags.txt expected_qexecstringlist.txt @@ -124,10 +109,7 @@ expected_skipinitdata.txt expected_skipinitdata.xml expected_skipinitdata.xunitxml - expected_sleep.lightxml expected_sleep.txt - expected_sleep.xml - expected_sleep.xunitxml expected_strcmp.lightxml expected_strcmp.txt expected_strcmp.xml -- cgit v1.2.3 From 52744f505381c2840efbe1dc4858d422d32d9f32 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 3 Feb 2012 15:43:28 +1000 Subject: Improve float selftest Correct a bug in the test and use unique names for data rows. The bug was that the test assumed that QCOMPARE for float values 100001 and 100002 would fail, but it actually succeeds. QCOMPARE for floats uses qFuzzyCompare(), which succeeds if the numbers differ by no more than 1/100,000th of the smaller value. Thus QCOMPARE(100001, 100002) passes, while QCOMPARE(99998, 99999) fails. Change-Id: Ia35d3126c2e3ebe91d64daa309048514a365d9fb Reviewed-by: Rohan McGovern --- tests/auto/testlib/selftests/expected_float.txt | 16 ++++++++++------ tests/auto/testlib/selftests/float/tst_float.cpp | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt index acd0aaa54a..81e4d7b067 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -1,26 +1,30 @@ ********* Start testing of tst_float ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_float::initTestCase() -FAIL! : tst_float::floatComparisons(should FAIL) Compared floats are not the same (fuzzy compare) +FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare) Actual (operandLeft): 1 Expected (operandRight): 3 Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] -FAIL! : tst_float::floatComparisons(should FAIL) Compared floats are not the same (fuzzy compare) +FAIL! : tst_float::floatComparisons(should FAIL 2) Compared floats are not the same (fuzzy compare) Actual (operandLeft): 1e-07 Expected (operandRight): 3e-07 Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] +FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the same (fuzzy compare) + Actual (operandLeft): 99998 + Expected (operandRight): 99999 + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(100)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] FAIL! : tst_float::compareFloatTests(1e-7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e-07 Expected (t3): 3e-07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(100)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fuzzy compare) Actual (t1): 1e+07 Expected (t3): 3e+07 - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(100)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] PASS : tst_float::cleanupTestCase() -Totals: 2 passed, 5 failed, 0 skipped +Totals: 2 passed, 6 failed, 0 skipped ********* Finished testing of tst_float ********* diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp index 9b7865ed25..fb10521604 100644 --- a/tests/auto/testlib/selftests/float/tst_float.cpp +++ b/tests/auto/testlib/selftests/float/tst_float.cpp @@ -66,19 +66,28 @@ void tst_float::floatComparisons_data() const QTest::addColumn("operandLeft"); QTest::addColumn("operandRight"); - QTest::newRow("should SUCCEED") + QTest::newRow("should SUCCEED 1") << float(0) << float(0); - QTest::newRow("should FAIL") + QTest::newRow("should FAIL 1") << float(1.00000) << float(3.00000); - QTest::newRow("should FAIL") + QTest::newRow("should FAIL 2") << float(1.00000e-7f) << float(3.00000e-7f); - QTest::newRow("should FAIL") + // QCOMPARE for floats uses qFuzzyCompare(), which succeeds if the numbers + // differ by no more than 1/100,000th of the smaller value. Thus + // QCOMPARE(99998, 99999) should fail, while QCOMPARE(100001, 100002) + // should pass. + + QTest::newRow("should FAIL 3") + << float(99998) + << float(99999); + + QTest::newRow("should SUCCEED 2") << float(100001) << float(100002); } -- cgit v1.2.3 From 1fe0a4cc68e5e199961cf3a5d920b6bf8004940c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 3 Feb 2012 15:56:26 +1000 Subject: Make selftest.pri more readable/maintainable. Change-Id: Ic5a74beebb718df4cce5a9b02cdfd6f6d4cec97d Reviewed-by: Rohan McGovern --- tests/auto/testlib/selftests/selftests.pri | 48 +++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 7 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri index 9d4b2bd600..2297186f62 100644 --- a/tests/auto/testlib/selftests/selftests.pri +++ b/tests/auto/testlib/selftests/selftests.pri @@ -1,7 +1,41 @@ -SUBPROGRAMS = subtest warnings maxwarnings cmptest globaldata skip \ - strcmp expectfail sleep fetchbogus crashes multiexec failinit failinitdata \ - skipinit skipinitdata datetime singleskip assert differentexec \ - exceptionthrow qexecstringlist datatable commandlinedata\ - benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \ - benchliboptions xunit badxml longstring float printdatatags \ - printdatatagswithglobaltags findtestdata counting skipcleanup failcleanup +SUBPROGRAMS = \ + #alive \ + assert \ + badxml \ + benchlibcallgrind \ + benchlibeventcounter \ + benchliboptions \ + benchlibtickcounter \ + benchlibwalltime \ + cmptest \ + commandlinedata \ + counting \ + crashes \ + datatable \ + datetime \ + differentexec \ + exceptionthrow \ + expectfail \ + failcleanup \ + failinit \ + failinitdata \ + fetchbogus \ + findtestdata \ + float \ + globaldata \ + longstring \ + maxwarnings \ + multiexec \ + printdatatags \ + printdatatagswithglobaltags \ + qexecstringlist \ + singleskip \ + skip \ + skipcleanup \ + skipinit \ + skipinitdata \ + sleep \ + strcmp \ + subtest \ + warnings \ + xunit -- cgit v1.2.3 From 7f403f368eac8a0ebba83a1c30e83ff0a3963acb Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 9 Feb 2012 10:36:08 +1000 Subject: Fixed qfile unittest rename() failing as root When run as root was able to move file to /etc directory but was expecting a failure. Change-Id: Ic2ac5506253f2a3395ed56e88a856542bf82ad6d Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qfile/tst_qfile.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 67a4f71f54..0ed1b8ed5a 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -2349,6 +2349,13 @@ void tst_QFile::rename() QFETCH(QString, destination); QFETCH(bool, result); +#if defined(Q_OS_UNIX) + if (strcmp(QTest::currentDataTag(), "renamefile -> /etc/renamefile") == 0) { + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); + } +#endif + QFile::remove("renamedfile"); QFile f("renamefile"); f.open(QFile::WriteOnly); -- cgit v1.2.3 From 951c0b7afa2538037795644bf9759d0574ef99fd Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 9 Feb 2012 11:15:32 +1000 Subject: Fixed qdir unittest to handle being run as root - Added checks to see if running as root and skip as needed Change-Id: I4f94d5bfe511c6dfda315854b7cd1f64efe6e4f4 Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qdir/tst_qdir.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index 539bea5e8d..6a48d7e60f 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -385,6 +385,10 @@ void tst_QDir::removeRecursively() void tst_QDir::removeRecursivelyFailure() { +#ifdef Q_OS_UNIX + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif const QString tmpdir = QDir::currentPath() + "/tmpdir/"; const QString path = tmpdir + "undeletable"; QDir().mkpath(path); @@ -1932,6 +1936,10 @@ void tst_QDir::isRelative() void tst_QDir::isReadable() { +#ifdef Q_OS_UNIX + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif QDir dir; QVERIFY(dir.isReadable()); @@ -1961,7 +1969,10 @@ void tst_QDir::cdBelowRoot() QCOMPARE(root.path(), ROOT); QVERIFY(root.cd(CD_INTO)); QCOMPARE(root.path(), DIR); - +#ifdef Q_OS_UNIX + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif QDir dir(DIR); QVERIFY(!dir.cd("../..")); QCOMPARE(dir.path(), DIR); -- cgit v1.2.3 From 805d8959787ba03a35436e1235648d01bdfd91c7 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 9 Feb 2012 11:27:15 +1000 Subject: Fixed qstandardpaths unittest to handle being run as root - testCustomRuntimeDirectory test skips if run as root Change-Id: Idcc2a1db5d8a96b2ec0248b8b1c392fffc0b2e11 Reviewed-by: Jason McDonald --- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 1e288e2418..ebfd640dfb 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -229,6 +229,11 @@ void tst_qstandardpaths::testRuntimeDirectory() void tst_qstandardpaths::testCustomRuntimeDirectory() { +#if defined(Q_OS_UNIX) + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); +#endif + #ifdef Q_XDG_PLATFORM qputenv("XDG_RUNTIME_DIR", QFile::encodeName("/tmp")); // It's very unlikely that /tmp is 0600 or that we can chmod it -- cgit v1.2.3 From adfca27ac09cfd87121bb3611d74a75136ea6498 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 8 Feb 2012 16:56:38 +1000 Subject: Fixed tst_qobject::property for clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test was failing at: QCOMPARE(property.userType(), qMetaTypeId()); The CustomType* metatype was not registered before this part of the test. qMetaTypeId will register the metatype for T before returning it if it is not yet registered, while QMetaProperty::userType() returns 0 if the metatype is not yet registered. However, the order of evaluation of these two expressions in the above statement is technically undefined. Apparently, gcc evaluates the arguments in order from right to left, allowing the test to pass, while clang evaluates the arguments in order from left to right, causing the test to fail. Change-Id: I5059556e860cec29b57c31e4e26f46cf9e6055da Reviewed-by: Jędrzej Nowacki --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 4e7935be31..91b93e4ccd 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -1703,6 +1703,7 @@ void tst_QObject::property() QVERIFY(property.isWritable()); QVERIFY(!property.isEnumType()); QCOMPARE(property.typeName(), "CustomType*"); + qRegisterMetaType(); QCOMPARE(property.type(), QVariant::UserType); QCOMPARE(property.userType(), qMetaTypeId()); -- cgit v1.2.3 From ef7fd678457496abc0b2d204c816b10a57816907 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Thu, 9 Feb 2012 09:55:09 +0100 Subject: Replace Q_WS_WINCE against Q_OS_WINCE. Window system Macros where deprecated so use Q_OS_WINCE for now. This code will need some refactoring, but this is the first step to it. Change-Id: I5876b80ee45d4b38ac63fc7d51e775dc70bbd485 Reviewed-by: Friedemann Kleint --- tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 2 +- tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp | 2 +- .../graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp | 2 +- tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 44cafe4de9..0e9136dbc7 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -5850,7 +5850,7 @@ void tst_QNetworkReply::getFromHttpIntoBuffer2() QFETCH(bool, useDownloadBuffer); // On my Linux Desktop the results are already visible with 128 kB, however we use this to have good results. -#if defined(Q_WS_WINCE_WM) +#if defined(Q_OS_WINCE_WM) // Show some mercy to non-desktop platform/s enum {UploadSize = 4*1024*1024}; // 4 MB #else diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index b332fb40f8..e46d905022 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -440,7 +440,7 @@ public slots: void tst_QDialog::throwInExec() { -#if defined(Q_OS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_)) +#if defined(Q_OS_MAC) || (defined(Q_OS_WINCE) && defined(_ARM_)) QSKIP("Throwing exceptions in exec() is not supported on this platform."); #endif #if defined(Q_OS_LINUX) diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index c30701e0f9..35b67d4451 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -152,7 +152,7 @@ void tst_QGraphicsLinearLayout::initTestCase() { // since the style will influence the results, we have to ensure // that the tests are run using the same style on all platforms -#if defined (Q_WS_WINCE) +#if defined (Q_OS_WINCE) QApplication::setStyle(new QWindowsStyle); #else QApplication::setStyle(new QPlastiqueStyle); diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 33b7ade715..13540355c7 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -538,7 +538,7 @@ void tst_QMainWindow::menuBar() mw.setMenuBar(mb1); QVERIFY(mw.menuBar() != 0); QCOMPARE(mw.menuBar(), (QMenuBar *)mb1); -#ifdef Q_WS_WINCE_WM +#ifdef Q_OS_WINCE_WM QSKIP("With native menubar integration the menubar is not a child"); #endif QCOMPARE(mb1->parentWidget(), (QWidget *)&mw); -- cgit v1.2.3 From 5cd73e508886c38ce52e883294484f1ab58a519e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 8 Feb 2012 15:03:34 +1000 Subject: Fixed tst_qfileinfo::group crash if getgrgid fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QVERIFY2 and gracefully fail with an error message, rather than crashing, if getgrgid() fails. Change-Id: I82a7290f83208486577988cc831d5d3cba20f98e Reviewed-by: João Abecasis --- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 7b80152b62..a3d80cb66f 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1722,7 +1722,13 @@ void tst_QFileInfo::group() #if defined(Q_OS_UNIX) struct group *gr; gid_t gid = getegid(); + + errno = 0; gr = getgrgid(gid); + + QVERIFY2(gr, qPrintable( + QString("getgrgid returned 0: %1, cannot determine my own group") + .arg(QString::fromLocal8Bit(strerror(errno))))); expected = QString::fromLocal8Bit(gr->gr_name); #endif -- cgit v1.2.3 From 581f079b04d4c1901d820304b3e9195e096e34e2 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 9 Feb 2012 11:31:01 +0200 Subject: Make "nmake check" pass for corelib tests in Windows. - Marked four tests insignificant due to failures, these need to be fixed later and then re-enabled: - tst_qfilesystemwatcher - tst_qsettings - tst_qlibrary - tst_qsharedpointer - Skipped one invalid case (tst_QCoreApplication::argc()) - Ifdeffed around vsprintf issue in MSVC (tst_QByteArray::qvsnprintf()) Task-number: QTBUG-24157 Task-number: QTBUG-24146 Task-number: QTBUG-24128 Change-Id: I4db957a65fbf0093f5ae3dc1a04d792492818104 Reviewed-by: Friedemann Kleint Reviewed-by: Sergio Ahumada --- tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro | 1 + tests/auto/corelib/io/qsettings/qsettings.pro | 1 + tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp | 3 +++ tests/auto/corelib/plugin/qlibrary/tst/tst.pro | 2 ++ tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp | 3 +++ tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro | 2 ++ 6 files changed, 12 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro index e712a6ad5f..043b2b5d1d 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro +++ b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro @@ -4,3 +4,4 @@ QT = core testlib SOURCES = tst_qfilesystemwatcher.cpp mac: CONFIG += insignificant_test # QTBUG-22744 +win32:CONFIG += insignificant_test # QTBUG-24029 diff --git a/tests/auto/corelib/io/qsettings/qsettings.pro b/tests/auto/corelib/io/qsettings/qsettings.pro index ed3be0f23f..a5483bf585 100644 --- a/tests/auto/corelib/io/qsettings/qsettings.pro +++ b/tests/auto/corelib/io/qsettings/qsettings.pro @@ -7,3 +7,4 @@ RESOURCES += qsettings.qrc win32-msvc*:LIBS += advapi32.lib mac: CONFIG += insignificant_test # QTBUG-22745 +win32: CONFIG += insignificant_test # QTBUG-24145 diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp index 97c9757107..572c2fdfd1 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp @@ -126,6 +126,9 @@ void tst_QCoreApplication::qAppName() void tst_QCoreApplication::argc() { +#ifdef Q_OS_WIN + QSKIP("QCoreApplication::arguments() always parses arguments from actual command line in Windows, making this test invalid."); +#endif { int argc = 1; char *argv[] = { "tst_qcoreapplication" }; diff --git a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro index 6e71ec8ff9..0992ad89f3 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro +++ b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro @@ -12,3 +12,5 @@ win32 { } TESTDATA += ../library_path/invalid.so + +win32:CONFIG += insignificant_test # QTBUG-24151 diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index c1598c452d..40e4cc398f 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -521,7 +521,10 @@ void tst_QByteArray::qvsnprintf() QCOMPARE(::qsnprintf(buf, 10, "%s", "bubu"), 4); QCOMPARE(static_cast(buf), "bubu"); +#ifndef Q_CC_MSVC + // MSVC implementation of vsnprintf overwrites bytes after null terminator so this would fail. QCOMPARE(buf[5], char(42)); +#endif qMemSet(buf, 42, sizeof(buf)); QCOMPARE(::qsnprintf(buf, 5, "%s", "bubu"), 4); diff --git a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro index b1cd309293..1b227109b3 100644 --- a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro +++ b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro @@ -13,3 +13,5 @@ HEADERS = forwarddeclared.h \ TESTDATA += forwarddeclared.cpp forwarddeclared.h include(externaltests.pri) + +win32:CONFIG += insignificant_test # QTBUG-24160 -- cgit v1.2.3 From be98fa32c7d56ea91359b647a329356fa44eca04 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 3 Feb 2012 09:35:22 +0100 Subject: Allow customization of qDebug output at runtime Check the QT_OUTPUT_PATTERN environment variable in the default message handler to customize the output of messages. Following place holders are right now supported: %{message}, %{type}, %{file}, %{line}, %{function} The original cleanupFuncinfo was written by Thiago Macieira. Change-Id: I6ad25baaa0e6a1c9f886105d2a93ef3310e512a9 Reviewed-by: Olivier Goffart Reviewed-by: David Faure --- tests/auto/corelib/global/global.pro | 2 +- tests/auto/corelib/global/qlogging/app/app.pro | 9 + tests/auto/corelib/global/qlogging/app/main.cpp | 55 ++ tests/auto/corelib/global/qlogging/qlogging.pro | 5 + .../auto/corelib/global/qlogging/tst_qlogging.cpp | 645 +++++++++++++++++++++ .../auto/corelib/global/qlogging/tst_qlogging.pro | 4 + .../global/qmessagehandler/qmessagehandler.pro | 4 - .../global/qmessagehandler/tst_qmessagehandler.cpp | 147 ----- 8 files changed, 719 insertions(+), 152 deletions(-) create mode 100644 tests/auto/corelib/global/qlogging/app/app.pro create mode 100644 tests/auto/corelib/global/qlogging/app/main.cpp create mode 100644 tests/auto/corelib/global/qlogging/qlogging.pro create mode 100644 tests/auto/corelib/global/qlogging/tst_qlogging.cpp create mode 100644 tests/auto/corelib/global/qlogging/tst_qlogging.pro delete mode 100644 tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro delete mode 100644 tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp (limited to 'tests/auto') diff --git a/tests/auto/corelib/global/global.pro b/tests/auto/corelib/global/global.pro index a6c638f530..d4293a896c 100644 --- a/tests/auto/corelib/global/global.pro +++ b/tests/auto/corelib/global/global.pro @@ -6,4 +6,4 @@ SUBDIRS=\ qglobal \ qnumeric \ qrand \ - qmessagehandler + qlogging diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro new file mode 100644 index 0000000000..a167cc45cd --- /dev/null +++ b/tests/auto/corelib/global/qlogging/app/app.pro @@ -0,0 +1,9 @@ +TEMPLATE = app + +TARGET = app +QT = core + +CONFIG -= debug_and_release app_bundle +CONFIG += debug console + +SOURCES += main.cpp diff --git a/tests/auto/corelib/global/qlogging/app/main.cpp b/tests/auto/corelib/global/qlogging/app/main.cpp new file mode 100644 index 0000000000..c26b29ea56 --- /dev/null +++ b/tests/auto/corelib/global/qlogging/app/main.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +struct T { + T() { qDebug("static constructor"); } + ~T() { qDebug("static destructor"); } +} t; + +int main(int, char **) +{ + qDebug("qDebug"); + qWarning("qWarning"); + qCritical("qCritical"); + return 0; +} diff --git a/tests/auto/corelib/global/qlogging/qlogging.pro b/tests/auto/corelib/global/qlogging/qlogging.pro new file mode 100644 index 0000000000..449b7dfa5e --- /dev/null +++ b/tests/auto/corelib/global/qlogging/qlogging.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs + +SUBDIRS += \ + tst_qlogging.pro \ + app \ No newline at end of file diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp new file mode 100644 index 0000000000..742a858961 --- /dev/null +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -0,0 +1,645 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +class tst_qmessagehandler : public QObject +{ + Q_OBJECT +private slots: + void cleanup(); + + void defaultHandler(); + void installMessageHandler(); + void installMsgHandler(); + void installBothHandler(); + + void cleanupFuncinfo_data(); + void cleanupFuncinfo(); + + void qMessagePattern(); +}; + +static QtMsgType s_type; +const char *s_file; +int s_line; +const char *s_function; +static QString s_message; + +void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const char *msg) +{ + s_type = type; + s_file = context.file; + s_line = context.line; + s_function = context.function; + s_message = QString::fromLocal8Bit(msg); +} + +void customMsgHandler(QtMsgType type, const char *msg) +{ + s_type = type; + s_file = 0; + s_line = 0; + s_function = 0; + s_message = QString::fromLocal8Bit(msg); +} + +void tst_qmessagehandler::cleanup() +{ + qInstallMsgHandler(0); + qInstallMessageHandler(0); + s_type = QtFatalMsg; + s_file = 0; + s_line = 0; + s_function = 0; +} + +void tst_qmessagehandler::defaultHandler() +{ + // check that the default works + QTest::ignoreMessage(QtDebugMsg, "defaultHandler"); + qDebug("defaultHandler"); +} + +void tst_qmessagehandler::installMessageHandler() +{ + QMessageHandler oldHandler = qInstallMessageHandler(customMessageHandler); + + qDebug("installMessageHandler"); int line = __LINE__; + + QCOMPARE(s_type, QtDebugMsg); + QCOMPARE(s_message, QString::fromLocal8Bit("installMessageHandler")); + QCOMPARE(s_file, __FILE__); + QCOMPARE(s_function, Q_FUNC_INFO); + QCOMPARE(s_line, line); + + QMessageHandler myHandler = qInstallMessageHandler(oldHandler); + QCOMPARE((void*)myHandler, (void*)customMessageHandler); +} + +void tst_qmessagehandler::installMsgHandler() +{ + QtMsgHandler oldHandler = qInstallMsgHandler(customMsgHandler); + + qDebug("installMsgHandler"); + + QCOMPARE(s_type, QtDebugMsg); + QCOMPARE(s_message, QString::fromLocal8Bit("installMsgHandler")); + QCOMPARE(s_file, (const char*)0); + QCOMPARE(s_function, (const char*)0); + QCOMPARE(s_line, 0); + + QtMsgHandler myHandler = qInstallMsgHandler(oldHandler); + QCOMPARE((void*)myHandler, (void*)customMsgHandler); +} + +void tst_qmessagehandler::installBothHandler() +{ + qInstallMessageHandler(customMessageHandler); + qInstallMsgHandler(customMsgHandler); + + qDebug("installBothHandler"); int line = __LINE__; + + QCOMPARE(s_type, QtDebugMsg); + QCOMPARE(s_message, QString::fromLocal8Bit("installBothHandler")); + QCOMPARE(s_file, __FILE__); + QCOMPARE(s_function, Q_FUNC_INFO); + QCOMPARE(s_line, line); +} + +# define ADD(x) QTest::newRow(x) << Q_FUNC_INFO << x; + +class TestClass1 +{ +public: + enum Something { foo }; + + void func_void() { ADD("TestClass1::func_void"); } + int func_int() { ADD("TestClass1::func_int"); return 0; } + unsigned func_unsigned() { ADD("TestClass1::func_unsigned"); return 0; } + long func_long() { ADD("TestClass1::func_long"); return 0; } + long long func_ll() { ADD("TestClass1::func_ll"); return 0; } + unsigned long long func_ull() { ADD("TestClass1::func_ull"); return 0; } + char func_char() { ADD("TestClass1::func_char"); return 0; } + signed char func_schar() { ADD("TestClass1::func_schar"); return 0; } + unsigned char func_uchar() { ADD("TestClass1::func_uchar"); return 0; } + char *func_Pchar() { ADD("TestClass1::func_Pchar"); return 0; } + const char *func_KPchar() { ADD("TestClass1::func_KPchar"); return 0; } + const volatile char *func_VKPchar() { ADD("TestClass1::func_VKPchar"); return 0; } + const volatile unsigned long long * const volatile func_KVPKVull() { ADD("TestClass1::func_KVPKVull"); return 0; } + const void * const volatile *func_KPKVvoid() { ADD("TestClass1::func_KPKVvoid"); return 0; } + + QList func_ai() { ADD("TestClass1::func_ai"); return QList(); } + QList func_aptr() { ADD("TestClass1::func_aptr"); return QList(); } + + QList func_aenum() { ADD("TestClass1::func_aenum"); return QList(); } + QList > func_aaptr() { ADD("TestClass1::func_aaptr"); return QList >(); } + + QMap func_ienummap() { ADD("TestClass1::func_ienummap"); return QMap(); } + + template + T* func_template1() { ADD("TestClass1::func_template1"); return 0; } + template + long func_template2() { ADD("TestClass1::func_template2"); return long(val); } + + typedef unsigned long long * ( *fptr)(); + typedef unsigned long long * (TestClass1::* pmf)(); + typedef fptr (TestClass1::* uglypmf)(); + fptr func_fptr() { ADD("TestClass1::func_fptr"); return 0; } + pmf func_pmf() { ADD("TestClass1::func_pmf"); return 0; } + uglypmf func_uglypmf(uglypmf = 0) { ADD("TestClass1::func_uglypmf"); return 0; } + QMap func_uglypmf2() { ADD("TestClass1::func_uglypmf2"); return QMap(); } + + void operator()() { ADD("TestClass1::operator()"); } + int operator<(int) { ADD("TestClass1::operator<"); return 0; } + int operator>(int) { ADD("TestClass1::operator>"); return 0; } + int operator<=(int) { ADD("TestClass1::operator<="); return 0; } + int operator>=(int) { ADD("TestClass1::operator>="); return 0; } + int operator=(int) { ADD("TestClass1::operator="); return 0; } + int operator+(int) { ADD("TestClass1::operator+"); return 0; } + int operator-(int) { ADD("TestClass1::operator-"); return 0; } + int operator*(int) { ADD("TestClass1::operator*"); return 0; } + int operator/(int) { ADD("TestClass1::operator/"); return 0; } + int operator%(int) { ADD("TestClass1::operator%"); return 0; } + int x; + int &operator++() { ADD("TestClass1::operator++"); return x; } + int operator++(int) { ADD("TestClass1::operator++"); return 0; } + int &operator--() { ADD("TestClass1::operator--"); return x; } + int operator--(int) { ADD("TestClass1::operator--"); return 0; } + +public: + TestClass1() + { + // instantiate + func_void(); + func_int(); + func_unsigned(); + func_long(); + func_ll(); + func_ull(); + func_char(); + func_schar(); + func_uchar(); + func_Pchar(); + func_KPchar(); + func_VKPchar(); + func_KVPKVull(); + func_KPKVvoid(); + func_ai(); + func_aptr(); + func_aenum(); + func_aaptr(); + func_ienummap(); + func_template1(); + func_template2(); + func_fptr(); + func_pmf(); + func_uglypmf(); + func_uglypmf2(); + operator()(); + operator<(0); + operator>(0); + operator<=(0); + operator>=(0); + operator=(0); + operator+(0); + operator-(0); + operator*(0); + operator/(0); + operator%(0); + operator++(); + operator++(0); + operator--(); + operator--(0); + } +}; + +template class TestClass2 +{ + long func_long() { ADD("TestClass2::func_long"); return 0; } + template + T* func_template1() { ADD("TestClass2::func_template1"); return 0; } + template + long func_template2() { ADD("TestClass2::func_template2"); return long(val); } +public: + TestClass2() + { + func_long(); + func_template1(); + func_template2(); + } +}; + +template class TestClass3 +{ + long func_long() { ADD("TestClass3::func_long"); return 0; } + template + S* func_template1() { ADD("TestClass3::func_template1"); return 0; } + template + long func_template2() { ADD("TestClass3::func_template2"); return long(val); } +public: + struct Foo { TestClass3 foo; }; + TestClass3() + { + func_long(); + func_template1 >(); + func_template2(); + } +}; + +class TestClass4 +{ + TestClass1 c1; + + TestClass2 > func2() + { ADD("TestClass4::func2"); return TestClass2 >(); } + TestClass3, const void *>, TestClass1::foo>::Foo func3() + { ADD("TestClass4::func3"); return TestClass3, const void *>, TestClass1::foo>::Foo(); } +public: + TestClass4() + { + func2(); + func3(); + ADD("TestClass4::TestClass4"); + } + ~TestClass4() + { + ADD("TestClass4::~TestClass4"); + } +}; + + +void tst_qmessagehandler::cleanupFuncinfo_data() +{ +#ifndef QT_BUILD_INTERNAL + QSKIP("Requires -developer-build"); +#endif + QTest::addColumn("funcinfo"); + QTest::addColumn("expected"); + + TestClass4 c4; + + QTest::newRow("msvc_01") + << "void __thiscall TestClass1::func_void(void)" + << "TestClass1::func_void"; + QTest::newRow("gcc_01") + << "void TestClass1::func_void()" + << "TestClass1::func_void"; + + QTest::newRow("msvc_02") + << "int __thiscall TestClass1::func_int(void)" + << "TestClass1::func_int"; + QTest::newRow("gcc_02") + << "int TestClass1::func_int()" + << "TestClass1::func_int"; + + QTest::newRow("msvc_03") + << "unsigned int __thiscall TestClass1::func_unsigned(void)" + << "TestClass1::func_unsigned"; + QTest::newRow("gcc_03") + << "unsigned int TestClass1::func_unsigned()" + << "TestClass1::func_unsigned"; + + QTest::newRow("msvc_04") + << "long __thiscall TestClass1::func_long(void)" + << "TestClass1::func_long"; + QTest::newRow("gcc_04") + << "long int TestClass1::func_long()" + << "TestClass1::func_long"; + + QTest::newRow("msvc_05") + << "__int64 __thiscall TestClass1::func_ll(void)" + << "TestClass1::func_ll"; + QTest::newRow("gcc_05") + << "long long int TestClass1::func_ll()" + << "TestClass1::func_ll"; + + QTest::newRow("msvc_06") + << "unsigned __int64 __thiscall TestClass1::func_ull(void)" + << "TestClass1::func_ull"; + QTest::newRow("gcc_06") + << "long long unsigned int TestClass1::func_ull()" + << "TestClass1::func_ull"; + + QTest::newRow("msvc_07") + << "char __thiscall TestClass1::func_char(void)" + << "TestClass1::func_char"; + QTest::newRow("gcc_07") + << "char TestClass1::func_char()" + << "TestClass1::func_char"; + + QTest::newRow("msvc_08") + << "signed char __thiscall TestClass1::func_schar(void)" + << "TestClass1::func_schar"; + QTest::newRow("gcc_08") + << "signed char TestClass1::func_schar()" + << "TestClass1::func_schar"; + + QTest::newRow("msvc_09") + << "unsigned char __thiscall TestClass1::func_uchar(void)" + << "TestClass1::func_uchar"; + QTest::newRow("gcc_09") + << "unsigned char TestClass1::func_uchar()" + << "TestClass1::func_uchar"; + + QTest::newRow("msvc_10") + << "char *__thiscall TestClass1::func_Pchar(void)" + << "TestClass1::func_Pchar"; + QTest::newRow("gcc_10") + << "char* TestClass1::func_Pchar()" + << "TestClass1::func_Pchar"; + + QTest::newRow("msvc_11") + << "const char *__thiscall TestClass1::func_KPchar(void)" + << "TestClass1::func_KPchar"; + QTest::newRow("gcc_11") + << "const char* TestClass1::func_KPchar()" + << "TestClass1::func_KPchar"; + + QTest::newRow("msvc_12") + << "volatile const char *__thiscall TestClass1::func_VKPchar(void)" + << "TestClass1::func_VKPchar"; + QTest::newRow("gcc_12") + << "const volatile char* TestClass1::func_VKPchar()" + << "TestClass1::func_VKPchar"; + + QTest::newRow("msvc_13") + << "volatile const unsigned __int64 *volatile const __thiscall TestClass1::func_KVPKVull(void)" + << "TestClass1::func_KVPKVull"; + QTest::newRow("gcc_13") + << "const volatile long long unsigned int* const volatile TestClass1::func_KVPKVull()" + << "TestClass1::func_KVPKVull"; + + QTest::newRow("msvc_14") + << "const void *volatile const *__thiscall TestClass1::func_KPKVvoid(void)" + << "TestClass1::func_KPKVvoid"; + QTest::newRow("gcc_14") + << "const void* const volatile* TestClass1::func_KPKVvoid()" + << "TestClass1::func_KPKVvoid"; + + QTest::newRow("msvc_15") + << "class QList __thiscall TestClass1::func_ai(void)" + << "TestClass1::func_ai"; + QTest::newRow("gcc_15") + << "QList TestClass1::func_ai()" + << "TestClass1::func_ai"; + + QTest::newRow("msvc_16") + << "class QList __thiscall TestClass1::func_aptr(void)" + << "TestClass1::func_aptr"; + QTest::newRow("gcc_16") + << "QList TestClass1::func_aptr()" + << "TestClass1::func_aptr"; + + QTest::newRow("msvc_17") + << "class QList __thiscall TestClass1::func_aenum(void)" + << "TestClass1::func_aenum"; + QTest::newRow("gcc_17") + << "QList TestClass1::func_aenum()" + << "TestClass1::func_aenum"; + + QTest::newRow("msvc_18") + << "class QList > __thiscall TestClass1::func_aaptr(void)" + << "TestClass1::func_aaptr"; + QTest::newRow("gcc_18") + << "QList > TestClass1::func_aaptr()" + << "TestClass1::func_aaptr"; + + QTest::newRow("msvc_19") + << "class QMap __thiscall TestClass1::func_ienummap(void)" + << "TestClass1::func_ienummap"; + QTest::newRow("gcc_19") + << "QMap TestClass1::func_ienummap()" + << "TestClass1::func_ienummap"; + + QTest::newRow("msvc_20") + << "class TestClass1 *__thiscall TestClass1::func_template1(void)" + << "TestClass1::func_template1"; + QTest::newRow("gcc_20") + << "T* TestClass1::func_template1() [with T = TestClass1]" + << "TestClass1::func_template1"; + + QTest::newRow("msvc_21") + << "long __thiscall TestClass1::func_template2(void)" + << "TestClass1::func_template2"; + QTest::newRow("gcc_21") + << "long int TestClass1::func_template2() [with TestClass1::Something val = foo]" + << "TestClass1::func_template2"; + + QTest::newRow("msvc_22") + << "unsigned __int64 *(__cdecl *__thiscall TestClass1::func_fptr(void))(void)" + << "TestClass1::func_fptr"; + QTest::newRow("gcc_22") + << "long long unsigned int* (* TestClass1::func_fptr())()" + << "TestClass1::func_fptr"; + + QTest::newRow("msvc_23") + << "unsigned __int64 *(__thiscall TestClass1::* __thiscall TestClass1::func_pmf(void))(void)" + << "TestClass1::func_pmf"; + QTest::newRow("gcc_23") + << "long long unsigned int* (TestClass1::* TestClass1::func_pmf())()" + << "TestClass1::func_pmf"; + + QTest::newRow("msvc_24") + << "unsigned __int64 *(__cdecl *(__thiscall TestClass1::* __thiscall TestClass1::func_uglypmf(unsigned __int64 *(__cdecl *(__thiscall TestClass1::* )(void))(void)))(void))(void)" + << "TestClass1::func_uglypmf"; + QTest::newRow("gcc_24") + << "long long unsigned int* (* (TestClass1::* TestClass1::func_uglypmf(long long unsigned int* (* (TestClass1::*)())()))())()" + << "TestClass1::func_uglypmf"; + + QTest::newRow("msvc_25") + << "class QMap __thiscall TestClass1::func_uglypmf2(void)" + << "TestClass1::func_uglypmf2"; + QTest::newRow("gcc_25") + << "QMap TestClass1::func_uglypmf2()" + << "TestClass1::func_uglypmf2"; + + QTest::newRow("msvc_26") + << "class TestClass2,class std::allocator > > > __thiscall TestClass4::func2(void)" + << "TestClass4::func2"; + QTest::newRow("gcc_26") + << "TestClass2, std::allocator > > > TestClass4::func2()" + << "TestClass4::func2"; + + QTest::newRow("msvc_27") + << "long __thiscall TestClass2,class std::allocator > > >::func_long(void)" + << "TestClass2::func_long"; + QTest::newRow("gcc_27") + << "long int TestClass2::func_long() [with T = std::map, std::allocator > >]" + << "TestClass2::func_long"; + + QTest::newRow("msvc_28") + << "class std::map,class std::allocator > > *__thiscall TestClass2,class std::allocator > > >::func_template1,class std::allocator > > >>(void)" + << "TestClass2::func_template1"; + QTest::newRow("gcc_21") + << "T* TestClass2::func_template1() [with S = TestClass2, std::allocator > > >, T = std::map, std::allocator > >]" + << "TestClass2::func_template1"; + + QTest::newRow("msvc_29") + << "long __thiscall TestClass2,class std::allocator > > >::func_template2(void)" + << "TestClass2::func_template2"; + QTest::newRow("gcc_29") + << "long int TestClass2::func_template2() [with TestClass1::Something val = foo, T = std::map, std::allocator > >]" + << "TestClass2::func_template2"; + + QTest::newRow("msvc_30") + << "struct TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::Foo __thiscall TestClass4::func3(void)" + << "TestClass4::func3"; + QTest::newRow("gcc_30") + << "TestClass3 >, const void*, std::less > >, std::allocator >, const void*> > >, foo>::Foo TestClass4::func3()" + << "TestClass4::func3"; + + QTest::newRow("msvc_31") + << "long __thiscall TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::func_long(void)" + << "TestClass3::func_long"; + QTest::newRow("gcc_31") + << "long int TestClass3::func_long() [with T = std::map >, const void*, std::less > >, std::allocator >, const void*> > >, TestClass1::Something v = foo]" + << "TestClass3::func_long"; + + QTest::newRow("msvc_32") + << "class TestClass2 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > > > *__thiscall TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::func_template1 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > > >>(void)" + << "TestClass3::func_template1"; + QTest::newRow("gcc_32") + << "S* TestClass3::func_template1() [with S = TestClass2 >, const void*, std::less > >, std::allocator >, const void*> > > >, T = std::map >, const void*, std::less > >, std::allocator >, const void*> > >, TestClass1::Something v = foo]" + << "TestClass3::func_template1"; + + QTest::newRow("msvc_33") + << "long __thiscall TestClass3 >,void const *,struct std::less > >,class std::allocator > const ,void const *> > >,0>::func_template2(void)" + << "TestClass3::func_template2"; + QTest::newRow("gcc_33") + << "long int TestClass3::func_template2() [with TestClass1::Something val = foo, T = std::map >, const void*, std::less > >, std::allocator >, const void*> > >, TestClass1::Something v = foo]" + << "TestClass3::func_template2"; + + QTest::newRow("msvc_34") + << "__thiscall TestClass4::TestClass4(void)" + << "TestClass4::TestClass4"; + QTest::newRow("gcc_34") + << "TestClass4::TestClass4()" + << "TestClass4::TestClass4"; + + QTest::newRow("msvc_35") + << "__thiscall TestClass4::~TestClass4(void)" + << "TestClass4::~TestClass4"; + QTest::newRow("gcc_35") + << "TestClass4::~TestClass4()" + << "TestClass4::~TestClass4"; + + QTest::newRow("gcc_36") + << "void TestClass1::operator()()" + << "TestClass1::operator()"; + + QTest::newRow("gcc_37") + << "long int TestClass1::func_template2() [with TestClass1::Something val = (TestClass1::Something)0u]" + << "TestClass1::func_template2"; + + QTest::newRow("gcc_38") + << "int TestClass1::operator<(int)" + << "TestClass1::operator<"; + + QTest::newRow("gcc_39") + << "int TestClass1::operator>(int)" + << "TestClass1::operator>";} + +#ifdef QT_BUILD_INTERNAL +QT_BEGIN_NAMESPACE +extern QByteArray qCleanupFuncinfo(QByteArray); +QT_END_NAMESPACE +#endif + +void tst_qmessagehandler::cleanupFuncinfo() +{ +#ifdef QT_BUILD_INTERNAL + QFETCH(QString, funcinfo); + + QByteArray result = qCleanupFuncinfo(funcinfo.toLatin1()); + QTEST(QString::fromLatin1(result), "expected"); +#endif +} + +void tst_qmessagehandler::qMessagePattern() +{ + QProcess process; + + QStringList environment = QProcess::systemEnvironment(); + // %{file} is tricky because of shadow builds + environment.prepend("QT_MESSAGE_PATTERN=\"%{type} %{line} %{function} %{message}\""); + process.setEnvironment(environment); +#ifdef Q_OS_WIN + process.start("app/app.exe"); +#else + process.start("app/app"); +#endif + process.waitForFinished(); + + QByteArray output = process.readAllStandardError(); +// qDebug() << output; + QVERIFY(!output.isEmpty()); + + QVERIFY(output.contains("debug 45 T::T static constructor")); + // we can't be sure whether the QT_MESSAGE_PATTERN is already destructed + QVERIFY(output.contains("static destructor")); + QVERIFY(output.contains("debug 51 main qDebug")); + QVERIFY(output.contains("warning 52 main qWarning")); + QVERIFY(output.contains("critical 53 main qCritical")); + + environment = QProcess::systemEnvironment(); + environment.prepend("QT_MESSAGE_PATTERN=\"PREFIX: %{unknown} %{message}\""); + process.setEnvironment(environment); +#ifdef Q_OS_WIN + process.start("app/app.exe"); +#else + process.start("app/app"); +#endif + process.waitForFinished(); + + output = process.readAllStandardError(); +// qDebug() << output; + QVERIFY(!output.isEmpty()); + + QVERIFY(output.contains("QT_MESSAGE_PATTERN: Unknown placeholder %{unknown}")); + QVERIFY(output.contains("PREFIX: qDebug")); +} + +QTEST_MAIN(tst_qmessagehandler) +#include "tst_qlogging.moc" diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.pro b/tests/auto/corelib/global/qlogging/tst_qlogging.pro new file mode 100644 index 0000000000..60377e0fdc --- /dev/null +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.pro @@ -0,0 +1,4 @@ +CONFIG += testcase parallel_test +TARGET = tst_qlogging +QT = core testlib +SOURCES = tst_qlogging.cpp diff --git a/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro b/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro deleted file mode 100644 index 8bdba4bfc4..0000000000 --- a/tests/auto/corelib/global/qmessagehandler/qmessagehandler.pro +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG += testcase parallel_test -TARGET = tst_qmessagehandler -QT = core testlib -SOURCES = tst_qmessagehandler.cpp diff --git a/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp b/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp deleted file mode 100644 index 39bd0986a5..0000000000 --- a/tests/auto/corelib/global/qmessagehandler/tst_qmessagehandler.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -#include - -class tst_qmessagehandler : public QObject -{ - Q_OBJECT -private slots: - void cleanup(); - - void defaultHandler(); - void installMessageHandler(); - void installMsgHandler(); - void installBothHandler(); -}; - -static QtMsgType s_type; -const char *s_file; -int s_line; -const char *s_function; -static QString s_message; - -void customMessageHandler(QtMsgType type, const QMessageLogContext &context, const char *msg) -{ - s_type = type; - s_file = context.file; - s_line = context.line; - s_function = context.function; - s_message = QString::fromLocal8Bit(msg); -} - -void customMsgHandler(QtMsgType type, const char *msg) -{ - s_type = type; - s_file = 0; - s_line = 0; - s_function = 0; - s_message = QString::fromLocal8Bit(msg); -} - -void tst_qmessagehandler::cleanup() -{ - qInstallMsgHandler(0); - qInstallMessageHandler(0); - s_type = QtFatalMsg; - s_file = 0; - s_line = 0; - s_function = 0; -} - -void tst_qmessagehandler::defaultHandler() -{ - // check that the default works - QTest::ignoreMessage(QtDebugMsg, "defaultHandler"); - qDebug("defaultHandler"); -} - -void tst_qmessagehandler::installMessageHandler() -{ - QMessageHandler oldHandler = qInstallMessageHandler(customMessageHandler); - - qDebug("installMessageHandler"); int line = __LINE__; - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installMessageHandler")); - QCOMPARE(s_file, __FILE__); - QCOMPARE(s_function, Q_FUNC_INFO); - QCOMPARE(s_line, line); - - QMessageHandler myHandler = qInstallMessageHandler(oldHandler); - QCOMPARE((void*)myHandler, (void*)customMessageHandler); -} - -void tst_qmessagehandler::installMsgHandler() -{ - QtMsgHandler oldHandler = qInstallMsgHandler(customMsgHandler); - - qDebug("installMsgHandler"); - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installMsgHandler")); - QCOMPARE(s_file, (const char*)0); - QCOMPARE(s_function, (const char*)0); - QCOMPARE(s_line, 0); - - QtMsgHandler myHandler = qInstallMsgHandler(oldHandler); - QCOMPARE((void*)myHandler, (void*)customMsgHandler); -} - -void tst_qmessagehandler::installBothHandler() -{ - qInstallMessageHandler(customMessageHandler); - qInstallMsgHandler(customMsgHandler); - - qDebug("installBothHandler"); int line = __LINE__; - - QCOMPARE(s_type, QtDebugMsg); - QCOMPARE(s_message, QString::fromLocal8Bit("installBothHandler")); - QCOMPARE(s_file, __FILE__); - QCOMPARE(s_function, Q_FUNC_INFO); - QCOMPARE(s_line, line); -} - -QTEST_MAIN(tst_qmessagehandler) -#include "tst_qmessagehandler.moc" -- cgit v1.2.3 From 73a5bc2aac7638438dfde260a4246359a06e89ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Fri, 3 Feb 2012 20:02:46 +0100 Subject: QHeaderView - minor bug in visualIndexAt This fixes a minor bug in VisualIndex triggered when calling resizeSection with size 0 (but not hideSection). It is mostly cosmetics - however hopefully there will soon be a minor refactoring and there is really no need to make strange code to keep a semantic bug. However it is also doubtful to make a semantic change while refactoring. Change-Id: Ide153e421fd7a634062cb74867f4a49da4bf9cd6 Reviewed-by: Stephen Kelly --- .../itemviews/qheaderview/tst_qheaderview.cpp | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp index 75a72a754f..4089768e7a 100644 --- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp +++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp @@ -204,6 +204,7 @@ private slots: void QTBUG8650_crashOnInsertSections(); void QTBUG12268_hiddenMovedSectionSorting(); void QTBUG14242_hideSectionAutoSize(); + void ensureNoIndexAtLength(); void initialSortOrderRole(); @@ -2156,6 +2157,17 @@ void tst_QHeaderView::QTBUG14242_hideSectionAutoSize() QVERIFY(calced_length == afterlength); } +void tst_QHeaderView::ensureNoIndexAtLength() +{ + QTableView qtv; + QStandardItemModel amodel(4, 4); + qtv.setModel(&amodel); + QHeaderView *hv = qtv.verticalHeader(); + QVERIFY(hv->visualIndexAt(hv->length()) == -1); + hv->resizeSection(hv->count() - 1, 0); + QVERIFY(hv->visualIndexAt(hv->length()) == -1); +} + void tst_QHeaderView::initialSortOrderRole() { QTableView view; // ### Shadowing member view (of type QHeaderView) @@ -2341,8 +2353,8 @@ void tst_QHeaderView::calculateAndCheck(int cppline, const int precalced_compare QVERIFY2(chk_logical == x[1], verifytext); QVERIFY2(chk_sizes == x[2], verifytext); QVERIFY2(chk_hidden_size == x[3], verifytext); - QVERIFY2(chk_lookup_visual == x[4], verifytext); // Here the semantic can change. See final note (*). - QVERIFY2(chk_lookup_logical == x[5], verifytext); // Here the semantic can change. See final note (*). + QVERIFY2(chk_lookup_visual == x[4], verifytext); + QVERIFY2(chk_lookup_logical == x[5], verifytext); QVERIFY2(header_lenght == x[6], verifytext); } @@ -2438,10 +2450,10 @@ void tst_QHeaderView::logicalIndexAtTest() //qDebug() << "logicalIndexAtTest" << check1 << check2; const int precalced_check1 = 106327; const int precalced_check2 = 29856418; - QVERIFY(precalced_check1 == check1); // Here the semantic can change. See final note (*) - QVERIFY(precalced_check2 == check2); // Here the semantic can change. See final note (*) + QVERIFY(precalced_check1 == check1); + QVERIFY(precalced_check2 == check2); - const int precalced_results[] = { 1145298384, -1710423344, -650981936, 372919464, 2139446944, 854793816, 12124 }; + const int precalced_results[] = { 1145298384, -1710423344, -650981936, 372919464, -1544372176, -426463328, 12124 }; calculateAndCheck(__LINE__, precalced_results); } @@ -2466,10 +2478,10 @@ void tst_QHeaderView::visualIndexAtTest() //qDebug() << "visualIndexAtTest" << check1 << check2; const int precalced_check1 = 72665; const int precalced_check2 = 14015890; - QVERIFY(precalced_check1 == check1); // Here the semantic can change. See final note (*) - QVERIFY(precalced_check2 == check2); // Here the semantic can change. See final note (*) + QVERIFY(precalced_check1 == check1); + QVERIFY(precalced_check2 == check2); - const int precalced_results[] = { 1145298384, -1710423344, -1457520212, 169223959, 726651072, -2105938696, 5453 }; + const int precalced_results[] = { 1145298384, -1710423344, -1457520212, 169223959, 557466160, -324939600, 5453 }; calculateAndCheck(__LINE__, precalced_results); } @@ -2598,7 +2610,7 @@ void tst_QHeaderView::mixedTests() model->setRowCount(model->rowCount() - 10); if (m_using_reset_model) { - const int precalced_results[] = { 898296472, 337096378, -543340640, 1, 703951756, 250831536, 9250 }; + const int precalced_results[] = { 898296472, 337096378, -543340640, 1, -1251526424, -568618976, 9250 }; calculateAndCheck(__LINE__, precalced_results); } else { const int precalced_results[] = { 1911338224, 1693514365, -613398968, -1912534953, 1582159424, -1851079000, 9300 }; @@ -2633,8 +2645,5 @@ void tst_QHeaderView::resizeToContentTest() calculateAndCheck(__LINE__, precalced_results); } -// (*) Currently qheaderview position lookup acts a bit strange. It can return sections with size 0. -// This could be changed in the future. - QTEST_MAIN(tst_QHeaderView) #include "tst_qheaderview.moc" -- cgit v1.2.3 From 49b53061550c15ce3b9cc38ee5e82e970f75d5ea Mon Sep 17 00:00:00 2001 From: Andrew Stanley-Jones Date: Mon, 6 Feb 2012 18:36:06 +0100 Subject: Add socketOptions flags to QLocalServer QLocalServer had no way to set socket options that more complicated servers require. The first set of options allow setting of access control on the sockets. Change-Id: If4268c66462fc2e6cf1e70b1d5f56c76d2c69228 Reviewed-by: Harald Fernengel --- .../socket/qlocalsocket/tst_qlocalsocket.cpp | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp index 5d3cb6eaae..03b95bfa2f 100644 --- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp @@ -48,6 +48,8 @@ Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError) Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState) +Q_DECLARE_METATYPE(QLocalServer::SocketOption) +Q_DECLARE_METATYPE(QFile::Permissions) class tst_QLocalSocket : public QObject { @@ -104,12 +106,17 @@ private slots: void bytesWrittenSignal(); void syncDisconnectNotify(); void asyncDisconnectNotify(); + + void verifySocketOptions(); + void verifySocketOptions_data(); }; void tst_QLocalSocket::init() { qRegisterMetaType("QLocalSocket::LocalSocketState"); qRegisterMetaType("QLocalSocket::LocalSocketError"); + qRegisterMetaType("QLocalServer::SocketOption"); + qRegisterMetaType("QFile::Permissions"); } void tst_QLocalSocket::cleanup() @@ -1010,6 +1017,54 @@ void tst_QLocalSocket::asyncDisconnectNotify() QTRY_VERIFY(!disconnectedSpy.isEmpty()); } +void tst_QLocalSocket::verifySocketOptions_data() +{ +#ifdef Q_OS_LINUX + QTest::addColumn("service"); + QTest::addColumn("opts"); + QTest::addColumn("perms"); + + QFile::Permissions p = QFile::ExeOwner|QFile::WriteOwner|QFile::ReadOwner | + QFile::ExeUser|QFile::WriteUser|QFile::ReadUser; + QTest::newRow("user") << "userPerms" << QLocalServer::UserAccess << p; + + p = QFile::ExeGroup|QFile::WriteGroup|QFile::ReadGroup; + QTest::newRow("group") << "groupPerms" << QLocalServer::GroupAccess << p; + + p = QFile::ExeOther|QFile::WriteOther|QFile::ReadOther; + QTest::newRow("other") << "otherPerms" << QLocalServer::OtherAccess << p; + + p = QFile::ExeOwner|QFile::WriteOwner|QFile::ReadOwner| + QFile::ExeUser|QFile::WriteUser|QFile::ReadUser | + QFile::ExeGroup|QFile::WriteGroup|QFile::ReadGroup| + QFile::ExeOther|QFile::WriteOther|QFile::ReadOther; + QTest::newRow("all") << "worldPerms" << QLocalServer::WorldAccess << p; +#endif +} + +void tst_QLocalSocket::verifySocketOptions() +{ + // These are only guaranteed to be useful on linux at this time +#ifdef Q_OS_LINUX + QFETCH(QString, service); + QFETCH(QLocalServer::SocketOption, opts); + QFETCH(QFile::Permissions, perms); + + + QLocalServer::removeServer(service); + QLocalServer server; + server.setSocketOptions(opts); + QVERIFY2(server.listen(service), "service failed to start listening"); + + // find the socket + QString fullServerPath = QDir::cleanPath(QDir::tempPath()); + fullServerPath += QLatin1Char('/') + service; + + QFile socketFile(fullServerPath); + QVERIFY2(perms == socketFile.permissions(), "permissions on the socket don't match"); +#endif +} + QTEST_MAIN(tst_QLocalSocket) #include "tst_qlocalsocket.moc" -- cgit v1.2.3 From c5618fd880801b36e31cd876170cfde7427878fe Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 9 Feb 2012 11:51:44 +1000 Subject: Fixed qsharedpointer unittest to run from installation directory - Only run invalidConstructs() tests if not cross compiled Change-Id: If99fccdf9bca339507ca60c49aa89dc35c535d3d Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/corelib/tools/qsharedpointer/externaltests.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri index e12bb914c0..10d30e3c76 100644 --- a/tests/auto/corelib/tools/qsharedpointer/externaltests.pri +++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.pri @@ -3,5 +3,5 @@ HEADERS += $$PWD/externaltests.h cleanedQMAKESPEC = $$replace(QMAKESPEC, \\\\, /) DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\" -embedded:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED +cross_compile:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI -- cgit v1.2.3 From 6e3c4de94f394bfdb07035fe7e71237779c45971 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 9 Feb 2012 12:55:30 +1000 Subject: Fixed qlibrary unittest to work on mac - Changed unload_after_implicit_load() to use full path - Turned off app_bundle Change-Id: Ibdf3ae0dc833d97eba64298715eb88c70408fff6 Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/corelib/plugin/qlibrary/tst/tst.pro | 1 + tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro index 0992ad89f3..ae6cf97891 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro +++ b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro @@ -1,4 +1,5 @@ CONFIG += testcase +CONFIG -= app_bundle TARGET = ../tst_qlibrary QT = core testlib SOURCES = ../tst_qlibrary.cpp diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp index cff98de54f..efbc89880f 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp +++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp @@ -258,7 +258,7 @@ void tst_QLibrary::unload() void tst_QLibrary::unload_after_implicit_load() { - QLibrary library( "./mylib" ); + QLibrary library( QCoreApplication::applicationDirPath() + "/mylib" ); QFunctionPointer p = library.resolve("mylibversion"); QVERIFY(p); // Check if it was loaded QVERIFY(library.isLoaded()); -- cgit v1.2.3 From b942106bb661736264aec69961caecc35c814c09 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Tue, 7 Feb 2012 14:08:53 +1000 Subject: Remove SVG specific tests and testdata from QIcon. SVG support is now handled in QtSvg. Previously this test code would normally be skipped when testing qtbase. This code is only executed when testing qt5 with QtSvg enabled. This code will be moved to QtSvg. Task-number: QTBUG-22360 Change-Id: I7372012469f9c0f9b7d3851a0ae696f8f935ba10 Reviewed-by: Jason McDonald Reviewed-by: Rohan McGovern --- tests/auto/gui/image/qicon/heart.svg | 55 ------------------- tests/auto/gui/image/qicon/heart.svgz | Bin 1506 -> 0 bytes tests/auto/gui/image/qicon/rect.svg | 76 -------------------------- tests/auto/gui/image/qicon/trash.svg | 58 -------------------- tests/auto/gui/image/qicon/tst_qicon.cpp | 88 ------------------------------- 5 files changed, 277 deletions(-) delete mode 100644 tests/auto/gui/image/qicon/heart.svg delete mode 100644 tests/auto/gui/image/qicon/heart.svgz delete mode 100644 tests/auto/gui/image/qicon/rect.svg delete mode 100644 tests/auto/gui/image/qicon/trash.svg (limited to 'tests/auto') diff --git a/tests/auto/gui/image/qicon/heart.svg b/tests/auto/gui/image/qicon/heart.svg deleted file mode 100644 index 8c982cd93c..0000000000 --- a/tests/auto/gui/image/qicon/heart.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - -Heart Left-Highlight -This is a normal valentines day heart. - - -holiday -valentines - -valentine -hash(0x8a091c0) -hash(0x8a0916c) -signs_and_symbols -hash(0x8a091f0) -day - - - - -Jon Phillips - - - - -Jon Phillips - - - - -Jon Phillips - - - -image/svg+xml - - -en - - - - - - - - - - - - - - - diff --git a/tests/auto/gui/image/qicon/heart.svgz b/tests/auto/gui/image/qicon/heart.svgz deleted file mode 100644 index 0f0913ffa7..0000000000 Binary files a/tests/auto/gui/image/qicon/heart.svgz and /dev/null differ diff --git a/tests/auto/gui/image/qicon/rect.svg b/tests/auto/gui/image/qicon/rect.svg deleted file mode 100644 index 8eb24727be..0000000000 --- a/tests/auto/gui/image/qicon/rect.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/tests/auto/gui/image/qicon/trash.svg b/tests/auto/gui/image/qicon/trash.svg deleted file mode 100644 index c44e4c75a2..0000000000 --- a/tests/auto/gui/image/qicon/trash.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -Keep Tidy Inside - - - - -symbol -bin -signs_and_symbols -clean -rubish -trash -inside -garbage -sign - - - - -Martin Owens - - - - -Martin Owens - - - - -Martin Owens - - - -image/svg+xml - - -en - - - - - - - - - - - - - - - - - diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index 7d455f1010..4a9ab93921 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -58,13 +58,11 @@ private slots: void actualSize(); void actualSize2_data(); // test with 2 pixmaps with different aspect ratio void actualSize2(); - void svgActualSize(); void isNull(); void swap(); void bestMatch(); void cacheKey(); void detach(); - void svg(); void addFile(); void availableSizes(); void name(); @@ -181,28 +179,6 @@ void tst_QIcon::actualSize2() QCOMPARE(icon.pixmap(argument).size(), result); } -void tst_QIcon::svgActualSize() -{ - if (!haveImageFormat("svg")) { - QSKIP("SVG support is not available"); - } - - const QString prefix = QFileInfo(QFINDTESTDATA("icons")).absolutePath() + "/"; - QIcon icon(prefix + "rect.svg"); - QCOMPARE(icon.actualSize(QSize(16, 16)), QSize(16, 2)); - QCOMPARE(icon.pixmap(QSize(16, 16)).size(), QSize(16, 2)); - - QPixmap p(16, 16); - p.fill(Qt::cyan); - icon.addPixmap(p); - - QCOMPARE(icon.actualSize(QSize(16, 16)), QSize(16, 16)); - QCOMPARE(icon.pixmap(QSize(16, 16)).size(), QSize(16, 16)); - - QCOMPARE(icon.actualSize(QSize(16, 14)), QSize(16, 2)); - QCOMPARE(icon.pixmap(QSize(16, 14)).size(), QSize(16, 2)); -} - void tst_QIcon::isNull() { // test default constructor QIcon defaultConstructor; @@ -395,54 +371,6 @@ void tst_QIcon::detach() QVERIFY(img1 == img2); } -void tst_QIcon::svg() -{ - if (!haveImageFormat("svg")) { - QSKIP("SVG support is not available"); - } - QIcon icon1("heart.svg"); - - QVERIFY(!icon1.pixmap(32).isNull()); - QImage img1 = icon1.pixmap(32).toImage(); - QVERIFY(!icon1.pixmap(32, QIcon::Disabled).isNull()); - QImage img2 = icon1.pixmap(32, QIcon::Disabled).toImage(); - - icon1.addFile("trash.svg", QSize(), QIcon::Disabled); - QVERIFY(!icon1.pixmap(32, QIcon::Disabled).isNull()); - QImage img3 = icon1.pixmap(32, QIcon::Disabled).toImage(); - QVERIFY(img3 != img2); - QVERIFY(img3 != img1); - - QPixmap pm("image.png"); - icon1.addPixmap(pm, QIcon::Normal, QIcon::On); - QVERIFY(!icon1.pixmap(128, QIcon::Normal, QIcon::On).isNull()); - QImage img4 = icon1.pixmap(128, QIcon::Normal, QIcon::On).toImage(); - QVERIFY(img4 != img3); - QVERIFY(img4 != img2); - QVERIFY(img4 != img1); - - QIcon icon2; - icon2.addFile("heart.svg"); - QVERIFY(icon2.pixmap(57).toImage() == icon1.pixmap(57).toImage()); - - QIcon icon3("trash.svg"); - icon3.addFile("heart.svg"); - QVERIFY(icon3.pixmap(57).toImage() == icon1.pixmap(57).toImage()); - - QIcon icon4("heart.svg"); - icon4.addFile("image.png", QSize(), QIcon::Active); - QVERIFY(!icon4.pixmap(32).isNull()); - QVERIFY(!icon4.pixmap(32, QIcon::Active).isNull()); - QVERIFY(icon4.pixmap(32).toImage() == img1); - QIcon pmIcon(pm); - QVERIFY(icon4.pixmap(pm.size(), QIcon::Active).toImage() == pmIcon.pixmap(pm.size(), QIcon::Active).toImage()); - -#ifndef QT_NO_COMPRESS - QIcon icon5("heart.svgz"); - QVERIFY(!icon5.pixmap(32).isNull()); -#endif -} - void tst_QIcon::addFile() { QIcon icon; @@ -506,22 +434,6 @@ void tst_QIcon::availableSizes() QCOMPARE(availableSizes.at(0), QSize(16,16)); } - if (haveImageFormat("svg")) { - // checks that there are no availableSizes for scalable images. - QIcon icon("heart.svg"); - QList availableSizes = icon.availableSizes(); - QVERIFY(availableSizes.isEmpty()); - } - - if (haveImageFormat("svg")) { - // even if an a scalable image contain added pixmaps, - // availableSizes still should be empty. - QIcon icon("heart.svg"); - icon.addFile("image.png", QSize(32,32)); - QList availableSizes = icon.availableSizes(); - QVERIFY(availableSizes.isEmpty()); - } - { // we try to load an icon from resources QIcon icon(QLatin1String(":/trolltech/styles/commonstyle/images/standardbutton-open-16.png")); -- cgit v1.2.3 From 09e2e77be25e02ff1c3ba432d739fbc5fe860ec7 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 9 Feb 2012 14:39:40 +0200 Subject: Handle TouchCancel in gui and widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I31739840348d88ae408ac1aae2399f6328ccdd43 Reviewed-by: Samuel Rødal --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 116 +++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index d7c153dca1..8c4c53cc5c 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -57,6 +57,8 @@ private slots: void touchToMouseTranslation(); void mouseToTouchTranslation(); void mouseToTouchLoop(); + void touchCancel(); + void touchCancelWithTouchToMouse(); void orientation(); void close(); void initTestCase() @@ -274,6 +276,7 @@ public: event->ignore(); return; } + touchEventType = event->type(); QList points = event->touchPoints(); for (int i = 0; i < points.count(); ++i) { switch (points.at(i).state()) { @@ -283,6 +286,9 @@ public: case Qt::TouchPointReleased: ++touchReleasedCount; break; + case Qt::TouchPointMoved: + ++touchMovedCount; + break; default: break; } @@ -292,14 +298,15 @@ public: InputTestWindow() { keyPressCode = keyReleaseCode = 0; mousePressButton = mouseReleaseButton = 0; - touchPressedCount = touchReleasedCount = 0; - ignoreMouse = ignoreTouch = 0; + touchPressedCount = touchReleasedCount = touchMovedCount = 0; + ignoreMouse = ignoreTouch = false; } int keyPressCode, keyReleaseCode; int mousePressButton, mouseReleaseButton, mouseMoveButton; QPointF mousePressScreenPos, mouseMoveScreenPos; - int touchPressedCount, touchReleasedCount; + int touchPressedCount, touchReleasedCount, touchMovedCount; + QEvent::Type touchEventType; bool ignoreMouse, ignoreTouch; }; @@ -480,7 +487,108 @@ void tst_QWindow::mouseToTouchLoop() QCoreApplication::processEvents(); qApp->setAttribute(Qt::AA_SynthesizeTouchForUnhandledMouseEvents, false); - qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, false); + qApp->setAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents, true); +} + +void tst_QWindow::touchCancel() +{ + InputTestWindow window; + window.setGeometry(80, 80, 40, 40); + window.show(); + QTest::qWaitForWindowShown(&window); + + QList points; + QWindowSystemInterface::TouchPoint tp1; + tp1.id = 1; + + // Start a touch. + tp1.state = Qt::TouchPointPressed; + tp1.area = QRect(10, 10, 4, 4); + points << tp1; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchEventType, QEvent::TouchBegin); + QTRY_COMPARE(window.touchPressedCount, 1); + + // Cancel the active touch sequence. + QWindowSystemInterface::handleTouchCancelEvent(&window, touchDevice); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchEventType, QEvent::TouchCancel); + + // Send a move -> will not be delivered due to the cancellation. + QTRY_COMPARE(window.touchMovedCount, 0); + points[0].state = Qt::TouchPointMoved; + tp1.area.adjust(2, 2, 2, 2); + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchMovedCount, 0); + + // Likewise. The only allowed transition is TouchCancel -> TouchBegin. + QTRY_COMPARE(window.touchReleasedCount, 0); + points[0].state = Qt::TouchPointReleased; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchReleasedCount, 0); + + // Start a new sequence -> from this point on everything should go through normally. + points[0].state = Qt::TouchPointPressed; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchEventType, QEvent::TouchBegin); + QTRY_COMPARE(window.touchPressedCount, 2); + + points[0].state = Qt::TouchPointMoved; + tp1.area.adjust(2, 2, 2, 2); + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchMovedCount, 1); + + points[0].state = Qt::TouchPointReleased; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.touchReleasedCount, 1); +} + +void tst_QWindow::touchCancelWithTouchToMouse() +{ + InputTestWindow window; + window.ignoreTouch = true; + window.setGeometry(80, 80, 40, 40); + window.show(); + QTest::qWaitForWindowShown(&window); + + QList points; + QWindowSystemInterface::TouchPoint tp1; + tp1.id = 1; + + tp1.state = Qt::TouchPointPressed; + tp1.area = QRect(100, 100, 4, 4); + points << tp1; + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.mousePressButton, int(Qt::LeftButton)); + QTRY_COMPARE(window.mousePressScreenPos, points[0].area.center()); + + // Cancel the touch. Should result in a mouse release for windows that have + // have an active touch-to-mouse sequence. + QWindowSystemInterface::handleTouchCancelEvent(0, touchDevice); + QCoreApplication::processEvents(); + + QTRY_COMPARE(window.mouseReleaseButton, int(Qt::LeftButton)); + + // Now change the window to accept touches. + window.mousePressButton = window.mouseReleaseButton = 0; + window.ignoreTouch = false; + + // Send a touch, there will be no mouse event generated. + QWindowSystemInterface::handleTouchEvent(&window, touchDevice, points); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.mousePressButton, 0); + + // Cancel the touch. It should not result in a mouse release with this window. + QWindowSystemInterface::handleTouchCancelEvent(0, touchDevice); + QCoreApplication::processEvents(); + QTRY_COMPARE(window.mouseReleaseButton, 0); } void tst_QWindow::orientation() -- cgit v1.2.3 From 482d96a0c5d523ace63f56bda6851926b4469dd0 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sun, 29 Jan 2012 13:54:19 +0100 Subject: Force -fPIE on ELF if Qt is built with reduced relocations Put in qconfig.h whether qt is compiled with reduced relocations. When using -Bsymbolic-functions (enabled by default on Qt) but not -fPIE, the comparison of the function pointers fail because the addresses are different in Qt, and in the executable. Hence we now enable -fPIE by default on qmake, and force a compilation error when it is not enabled and built with reduced relocations. Done-with: Sune Vuorela Change-Id: Ib3fdba06fab6e8a93b75b4c6cf16cc973ab335db Reviewed-by: Bradley T. Hughes Reviewed-by: Thiago Macieira --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 3 --- tests/auto/tools/moc/tst_moc.cpp | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 91b93e4ccd..8f4203a216 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -4152,9 +4152,6 @@ void tst_QObject::pointerConnect() QVERIFY( connect( s, &SenderObject::signal1 , r2, &ReceiverObject::slot1 ) ); QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot3 ) ); QVERIFY( connect( s, &SenderObject::signal3 , r1, &ReceiverObject::slot3 ) ); -#if defined(Q_CC_GNU) && defined(Q_OS_UNIX) - QEXPECT_FAIL("", "Test may fail due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.", Continue); -#endif QVERIFY2( connect( &timer, &QTimer::timeout, r1, &ReceiverObject::deleteLater ), "Signal connection failed most likely due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform."); diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 7c47d60e81..0aa1a68a64 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -614,7 +614,7 @@ void tst_Moc::oldStyleCasts() QStringList args; args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); @@ -683,7 +683,7 @@ void tst_Moc::inputFileNameWithDotsButNoExtension() QStringList args; args << "-c" << "-x" << "c++" << "-I" << ".." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); -- cgit v1.2.3 From ff2886db6a3308c1f4ee0879af497a5d43c33133 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Thu, 9 Feb 2012 11:20:34 +0100 Subject: Move all usages of Relation enum values to QAccessible::relations() Next step is to remove navigate(), but that has to be done in qtdeclarative first. Change-Id: I01ea1386c092446be04cc19d0f70adf53f094adc Reviewed-by: Frederik Gladhorn --- .../other/qaccessibility/tst_qaccessibility.cpp | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 63770f14cb..b2a4b1cca2 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -846,6 +846,17 @@ public Q_SLOTS: } }; +static QAccessibleInterface *relatedInterface(QAccessibleInterface *iface, QAccessible::RelationFlag flag) +{ + typedef QPair RelationPair; + QVector rels = iface->relations(flag); + + for (int i = 1; i < rels.count(); ++i) + delete rels.at(i).first; + + return rels.value(0).first; +} + void tst_QAccessibility::buttonTest() { QWidget window; @@ -879,6 +890,30 @@ void tst_QAccessibility::buttonTest() toggletool.setText("Toggle"); toggletool.setMinimumSize(20,20); + // test Controller/Controlled relations + { + QCheckBox toggler("Toggle me!", &window); + bool ok = connect(&pushButton, SIGNAL(clicked()), &toggler, SLOT(toggle())); + QCOMPARE(ok, true); + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&toggler); + QVERIFY(iface); + QCOMPARE(iface->role(), QAccessible::CheckBox); + QAccessibleInterface *buttonIFace = relatedInterface(iface, QAccessible::Controller); + QVERIFY(buttonIFace); + QCOMPARE(buttonIFace->role(), QAccessible::Button); + QCOMPARE(buttonIFace->object(), &pushButton); + delete buttonIFace; + delete iface; + + buttonIFace = QAccessible::queryAccessibleInterface(&pushButton); + QVERIFY(buttonIFace); + QCOMPARE(buttonIFace->role(), QAccessible::Button); + iface = relatedInterface(buttonIFace, QAccessible::Controlled); + QVERIFY(iface); + QCOMPARE(iface->object(), &toggler); + + } + // test push button QAccessibleInterface* interface = QAccessible::queryAccessibleInterface(&pushButton); QAccessibleActionInterface* actionInterface = interface->actionInterface(); -- cgit v1.2.3 From c50f026a22b675bdebe61c2d185913926fdf8f1c Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 23 Jan 2012 07:49:04 +0100 Subject: Add tst_QEventDispatcher to tests/auto/corelib/kernel This will test the event dispatcher in corelib for proper timer and posted event handling. The test makes sure all of the necessary virtual functions are implemented and working as expected. This test doesn't test socket notifiers or Win32 event notifiers, as these are already covered in existing tests. Change-Id: I5540ffc4e6d7f97bcd6c3725d7e74c0ab9c97015 Reviewed-by: Robin Burchell --- tests/auto/corelib/kernel/kernel.pro | 1 + .../kernel/qeventdispatcher/qeventdispatcher.pro | 4 + .../qeventdispatcher/tst_qeventdispatcher.cpp | 186 +++++++++++++++++++++ 3 files changed, 191 insertions(+) create mode 100644 tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro create mode 100644 tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro index 3c697f4149..1020899d94 100644 --- a/tests/auto/corelib/kernel/kernel.pro +++ b/tests/auto/corelib/kernel/kernel.pro @@ -1,6 +1,7 @@ TEMPLATE=subdirs SUBDIRS=\ qcoreapplication \ + qeventdispatcher \ qeventloop \ qmath \ qmetaobject \ diff --git a/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro b/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro new file mode 100644 index 0000000000..ff048d0429 --- /dev/null +++ b/tests/auto/corelib/kernel/qeventdispatcher/qeventdispatcher.pro @@ -0,0 +1,4 @@ +CONFIG += testcase +TARGET = tst_qeventdispatcher +QT = core testlib +SOURCES += tst_qeventdispatcher.cpp diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp new file mode 100644 index 0000000000..07bd73f0d7 --- /dev/null +++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +enum { + PreciseTimerInterval = 10, + CoarseTimerInterval = 200, + VeryCoarseTimerInterval = 1000 +}; + +class tst_QEventDispatcher : public QObject +{ + Q_OBJECT + + QAbstractEventDispatcher *eventDispatcher; + int receivedEventType; + int timerIdFromEvent; + +protected: + bool event(QEvent *e); + +public: + inline tst_QEventDispatcher() + : QObject(), + eventDispatcher(QAbstractEventDispatcher::instance(thread())), + receivedEventType(-1), + timerIdFromEvent(-1) + { } + +private slots: + void registerTimer(); + /* void registerSocketNotifier(); */ // Not implemented here, see tst_QSocketNotifier instead + /* void registerEventNotifiier(); */ // Not implemented here, see tst_QWinEventNotifier instead + void sendPostedEvents(); +}; + +bool tst_QEventDispatcher::event(QEvent *e) +{ + switch (receivedEventType = e->type()) { + case QEvent::Timer: + { + timerIdFromEvent = static_cast(e)->timerId(); + return true; + } + default: + break; + } + return QObject::event(e); +} + +// test that the eventDispatcher's timer implementation is complete and working +void tst_QEventDispatcher::registerTimer() +{ +#define FIND_TIMERS() \ + do { \ + foundPrecise = false; \ + foundCoarse = false; \ + foundVeryCoarse = false; \ + for (int i = 0; i < registeredTimers.count(); ++i) { \ + const QAbstractEventDispatcher::TimerInfo &timerInfo = registeredTimers.at(i); \ + if (timerInfo.timerId == preciseTimerId) { \ + QCOMPARE(timerInfo.interval, int(PreciseTimerInterval)); \ + QCOMPARE(timerInfo.timerType, Qt::PreciseTimer); \ + foundPrecise = true; \ + } else if (timerInfo.timerId == coarseTimerId) { \ + QCOMPARE(timerInfo.interval, int(CoarseTimerInterval)); \ + QCOMPARE(timerInfo.timerType, Qt::CoarseTimer); \ + foundCoarse = true; \ + } else if (timerInfo.timerId == veryCoarseTimerId) { \ + QCOMPARE(timerInfo.interval, int(VeryCoarseTimerInterval)); \ + QCOMPARE(timerInfo.timerType, Qt::VeryCoarseTimer); \ + foundVeryCoarse = true; \ + } \ + } \ + } while (0) + + // start 3 timers, each with the different timer types and different intervals + int preciseTimerId = eventDispatcher->registerTimer(PreciseTimerInterval, Qt::PreciseTimer, this); + int coarseTimerId = eventDispatcher->registerTimer(CoarseTimerInterval, Qt::CoarseTimer, this); + int veryCoarseTimerId = eventDispatcher->registerTimer(VeryCoarseTimerInterval, Qt::VeryCoarseTimer, this); + QVERIFY(preciseTimerId > 0); + QVERIFY(coarseTimerId > 0); + QVERIFY(veryCoarseTimerId > 0); + + // check that all 3 are present in the eventDispatcher's registeredTimer() list + QList registeredTimers = eventDispatcher->registeredTimers(this); + QCOMPARE(registeredTimers.count(), 3); + bool foundPrecise, foundCoarse, foundVeryCoarse; + FIND_TIMERS(); + QVERIFY(foundPrecise && foundCoarse && foundVeryCoarse); + + // process events, waiting for the next event... this should only fire the precise timer + receivedEventType = -1; + timerIdFromEvent = -1; + QVERIFY(eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents)); + QCOMPARE(receivedEventType, int(QEvent::Timer)); + QCOMPARE(timerIdFromEvent, preciseTimerId); + // now unregister it and make sure it's gone + eventDispatcher->unregisterTimer(preciseTimerId); + registeredTimers = eventDispatcher->registeredTimers(this); + QCOMPARE(registeredTimers.count(), 2); + FIND_TIMERS(); + QVERIFY(!foundPrecise && foundCoarse && foundVeryCoarse); + + // do the same again for the coarse timer + receivedEventType = -1; + timerIdFromEvent = -1; + QVERIFY(eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents)); + QCOMPARE(receivedEventType, int(QEvent::Timer)); + QCOMPARE(timerIdFromEvent, coarseTimerId); + // now unregister it and make sure it's gone + eventDispatcher->unregisterTimer(coarseTimerId); + registeredTimers = eventDispatcher->registeredTimers(this); + QCOMPARE(registeredTimers.count(), 1); + FIND_TIMERS(); + QVERIFY(!foundPrecise && !foundCoarse && foundVeryCoarse); + + // not going to wait for the VeryCoarseTimer, would take too long, just unregister it + eventDispatcher->unregisterTimers(this); + registeredTimers = eventDispatcher->registeredTimers(this); + QVERIFY(registeredTimers.isEmpty()); + +#undef FIND_TIMERS +} + +// test that the eventDispatcher sends posted events correctly +void tst_QEventDispatcher::sendPostedEvents() +{ + QElapsedTimer elapsedTimer; + elapsedTimer.start(); + while (!elapsedTimer.hasExpired(200)) { + receivedEventType = -1; + QCoreApplication::postEvent(this, new QEvent(QEvent::User)); + + // event shouldn't be delivered as a result of posting + QCOMPARE(receivedEventType, -1); + + // since there is a pending posted event, this should not actually block, it should send the posted event and return + QVERIFY(eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents)); + // event shouldn't be delivered as a result of posting + QCOMPARE(receivedEventType, int(QEvent::User)); + } +} + +QTEST_MAIN(tst_QEventDispatcher) +#include "tst_qeventdispatcher.moc" -- cgit v1.2.3 From 358c14821bf907025c1b3db6ff3f8e3bd3cdbb0f Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 23 Jan 2012 08:52:13 +0100 Subject: Run tst_QEventDispatcher with the GUI event dispatchers as well Since some GUI event dispatchers are complete reimplementations and do not build on the corelib ones, we want to run the same tests with the other dispatcher. Since this is a GUI test now, we need to make sure to drain system events queued during application startup to make sure we can reliably run the test functions. Change-Id: I4905db70bc8f8584c4ef1f4d767824040281452c Reviewed-by: Robin Burchell --- .../kernel/qeventdispatcher/tst_qeventdispatcher.cpp | 17 ++++++++++++++++- tests/auto/gui/kernel/kernel.pro | 1 + .../kernel/qguieventdispatcher/qguieventdispatcher.pro | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp index 07bd73f0d7..d06912ee91 100644 --- a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp +++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp @@ -39,7 +39,11 @@ ** ****************************************************************************/ -#include +#ifdef QT_GUI_LIB +# include +#else +# include +#endif #include enum { @@ -68,6 +72,7 @@ public: { } private slots: + void initTestCase(); void registerTimer(); /* void registerSocketNotifier(); */ // Not implemented here, see tst_QSocketNotifier instead /* void registerEventNotifiier(); */ // Not implemented here, see tst_QWinEventNotifier instead @@ -88,6 +93,16 @@ bool tst_QEventDispatcher::event(QEvent *e) return QObject::event(e); } +// drain the system event queue after the test starts to avoid destabilizing the test functions +void tst_QEventDispatcher::initTestCase() +{ + QElapsedTimer elapsedTimer; + elapsedTimer.start(); + while (!elapsedTimer.hasExpired(CoarseTimerInterval) && eventDispatcher->processEvents(QEventLoop::AllEvents)) { + ; + } +} + // test that the eventDispatcher's timer implementation is complete and working void tst_QEventDispatcher::registerTimer() { diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro index 1adae128cf..116e9dd1f1 100644 --- a/tests/auto/gui/kernel/kernel.pro +++ b/tests/auto/gui/kernel/kernel.pro @@ -4,6 +4,7 @@ SUBDIRS=\ qdrag \ qevent \ qfileopenevent \ + qguieventdispatcher \ qguimetatype \ qguivariant \ qinputmethod \ diff --git a/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro b/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro new file mode 100644 index 0000000000..3057037e74 --- /dev/null +++ b/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro @@ -0,0 +1,4 @@ +CONFIG += testcase +TARGET = tst_qguieventdispatcher +QT = core gui testlib +SOURCES += ../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp -- cgit v1.2.3 From 8f8e3db6ae1328bb03e46dbbdea0d787b656bb97 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Mon, 6 Feb 2012 16:09:18 +0100 Subject: Test posted events in tst_QEventDispatcher with various flags Add QEventLoop::ProcessEventsFlags test data for tst_QEventDispatcher::sendPostedEvents() to test that posted events are sent when waiting for events and when not waiting. Change-Id: I99f9eb121d0b1ded725e19c5233922fc0a6b81e4 Reviewed-by: Robin Burchell --- .../kernel/qeventdispatcher/tst_qeventdispatcher.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp index d06912ee91..bc6d6bfadd 100644 --- a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp +++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp @@ -76,6 +76,7 @@ private slots: void registerTimer(); /* void registerSocketNotifier(); */ // Not implemented here, see tst_QSocketNotifier instead /* void registerEventNotifiier(); */ // Not implemented here, see tst_QWinEventNotifier instead + void sendPostedEvents_data(); void sendPostedEvents(); }; @@ -178,9 +179,20 @@ void tst_QEventDispatcher::registerTimer() #undef FIND_TIMERS } +void tst_QEventDispatcher::sendPostedEvents_data() +{ + QTest::addColumn("processEventsFlagsInt"); + + QTest::newRow("WaitForMoreEvents") << int(QEventLoop::WaitForMoreEvents); + QTest::newRow("AllEvents") << int(QEventLoop::AllEvents); +} + // test that the eventDispatcher sends posted events correctly void tst_QEventDispatcher::sendPostedEvents() { + QFETCH(int, processEventsFlagsInt); + QEventLoop::ProcessEventsFlags processEventsFlags = QEventLoop::ProcessEventsFlags(processEventsFlagsInt); + QElapsedTimer elapsedTimer; elapsedTimer.start(); while (!elapsedTimer.hasExpired(200)) { @@ -191,7 +203,7 @@ void tst_QEventDispatcher::sendPostedEvents() QCOMPARE(receivedEventType, -1); // since there is a pending posted event, this should not actually block, it should send the posted event and return - QVERIFY(eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents)); + QVERIFY(eventDispatcher->processEvents(processEventsFlags)); // event shouldn't be delivered as a result of posting QCOMPARE(receivedEventType, int(QEvent::User)); } -- cgit v1.2.3 From dd119e14d0b53491d6b1578f913ad3edfe35c9a5 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 10 Feb 2012 09:41:50 +0100 Subject: Fix qlogging autotest for clang Change-Id: Iac82c4847554534174b5419ec78319c9ac381628 Reviewed-by: Bradley T. Hughes Reviewed-by: Olivier Goffart --- tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 742a858961..b2935ea6f2 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -154,6 +154,7 @@ class TestClass1 { public: enum Something { foo }; + char c; void func_void() { ADD("TestClass1::func_void"); } int func_int() { ADD("TestClass1::func_int"); return 0; } @@ -164,6 +165,7 @@ public: char func_char() { ADD("TestClass1::func_char"); return 0; } signed char func_schar() { ADD("TestClass1::func_schar"); return 0; } unsigned char func_uchar() { ADD("TestClass1::func_uchar"); return 0; } + char &func_Rchar() { ADD("TestClass1::func_Rchar"); return c; } char *func_Pchar() { ADD("TestClass1::func_Pchar"); return 0; } const char *func_KPchar() { ADD("TestClass1::func_KPchar"); return 0; } const volatile char *func_VKPchar() { ADD("TestClass1::func_VKPchar"); return 0; } @@ -221,6 +223,7 @@ public: func_char(); func_schar(); func_uchar(); + func_Rchar(); func_Pchar(); func_KPchar(); func_VKPchar(); @@ -383,12 +386,25 @@ void tst_qmessagehandler::cleanupFuncinfo_data() << "unsigned char TestClass1::func_uchar()" << "TestClass1::func_uchar"; + QTest::newRow("msvc_09a") + << "char &__thiscall TestClass1::func_Rchar(void)" + << "TestClass1::func_Rchar"; + QTest::newRow("gcc_09a") + << "char& TestClass1::func_Rchar()" + << "TestClass1::func_Rchar"; + QTest::newRow("clang_09a") + << "char &TestClass1::func_Rchar()" + << "TestClass1::func_Rchar"; + QTest::newRow("msvc_10") << "char *__thiscall TestClass1::func_Pchar(void)" << "TestClass1::func_Pchar"; QTest::newRow("gcc_10") << "char* TestClass1::func_Pchar()" << "TestClass1::func_Pchar"; + QTest::newRow("clang_10") + << "char *TestClass1::func_Pchar()" + << "TestClass1::func_Pchar"; QTest::newRow("msvc_11") << "const char *__thiscall TestClass1::func_KPchar(void)" @@ -592,6 +608,7 @@ void tst_qmessagehandler::cleanupFuncinfo() #ifdef QT_BUILD_INTERNAL QFETCH(QString, funcinfo); +// qDebug() << funcinfo.toLatin1(); QByteArray result = qCleanupFuncinfo(funcinfo.toLatin1()); QTEST(QString::fromLatin1(result), "expected"); #endif -- cgit v1.2.3 From 497622cafe235eadb5dd5056b196d8451ee89071 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 23 Dec 2011 17:13:05 +0100 Subject: Make it possible to put QObject tracked with QWeakPointer inside QSharedPointer Do that by keeping the QWeakPointer that track QObject independent of the ones that track QSharedPointer. QSharedPointer do not touch the sharedRefCount in QObjectPrivate anymore When converting a QWeakPointer constructed from a QObject to a QSharedPointer, it will display a warning saying one should not do that. Task-number: QTBUG-22622 Change-Id: I3595e3e7401702410776c458687ab357ad9366ab Reviewed-by: Bradley T. Hughes Reviewed-by: Stephen Kelly Reviewed-by: Olivier Goffart --- .../tools/qsharedpointer/tst_qsharedpointer.cpp | 33 ++++++++++++++++------ 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 2bae52a622..6dae58a006 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -76,6 +76,7 @@ private slots: void upCast(); void qobjectWeakManagement(); void noSharedPointerFromWeakQObject(); + void sharedPointerFromQObjectWithWeak(); void weakQObjectFromSharedPointer(); void objectCast(); void differentPointers(); @@ -692,12 +693,34 @@ void tst_QSharedPointer::noSharedPointerFromWeakQObject() QObject obj; QWeakPointer weak(&obj); - QSharedPointer strong = weak.toStrongRef(); - QVERIFY(strong.isNull()); + { + QTest::ignoreMessage(QtWarningMsg , "QSharedPointer: cannot create a QSharedPointer from a QObject-tracking QWeakPointer"); + QSharedPointer strong = weak.toStrongRef(); + QVERIFY(strong.isNull()); + } + { + QTest::ignoreMessage(QtWarningMsg , "QSharedPointer: cannot create a QSharedPointer from a QObject-tracking QWeakPointer"); + QSharedPointer strong = weak; + QVERIFY(strong.isNull()); + } + QCOMPARE(weak.data(), &obj); // if something went wrong, we'll probably crash here } +void tst_QSharedPointer::sharedPointerFromQObjectWithWeak() +{ + QObject *ptr = new QObject; + QWeakPointer weak = ptr; + { + QSharedPointer shared(ptr); + QVERIFY(!weak.isNull()); + QCOMPARE(shared.data(), ptr); + QCOMPARE(weak.data(), ptr); + } + QVERIFY(weak.isNull()); +} + void tst_QSharedPointer::weakQObjectFromSharedPointer() { // this is the inverse of the above: you're allowed to create a QWeakPointer @@ -1767,12 +1790,6 @@ void tst_QSharedPointer::invalidConstructs_data() << "Data *ptr = 0;\n" "QWeakPointer weakptr(ptr);\n"; - QTest::newRow("shared-pointer-from-unmanaged-qobject") - << &QTest::QExternalTest::tryRunFail - << "QObject *ptr = new QObject;\n" - "QWeakPointer weak = ptr;\n" // this makes the object unmanaged - "QSharedPointer shared(ptr);\n"; - QTest::newRow("shared-pointer-implicit-from-uninitialized") << &QTest::QExternalTest::tryCompileFail << "Data *ptr = 0;\n" -- cgit v1.2.3 From 38dbb45e79acecf9e98cb283d234a5d7e8b1b470 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 9 Feb 2012 15:02:42 +0200 Subject: Make "nmake check" pass for gui tests in Windows. Marked the following tests insignificant due to failures, these need to be fixed later and then re-enabled: tst_QPixmap tst_QClipboard tst_QWindow tst_QGuiApplication tst_QPainter tst_QPrinterInfo tst_QPrinter tst_QOpenGL tst_QFontDatabse tst_QFontMetrics tst_QGlyphRun tst_QRawFont Task-number: QTBUG-24128 Change-Id: I39ade8a693c4580b5cd618624e892cdcac21d78c Reviewed-by: Friedemann Kleint Reviewed-by: Sergio Ahumada --- tests/auto/gui/image/qpixmap/qpixmap.pro | 2 ++ tests/auto/gui/kernel/qclipboard/test/test.pro | 1 + tests/auto/gui/kernel/qguiapplication/qguiapplication.pro | 2 ++ tests/auto/gui/kernel/qwindow/qwindow.pro | 1 + tests/auto/gui/painting/qpainter/qpainter.pro | 1 + tests/auto/gui/painting/qprinter/qprinter.pro | 1 + tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro | 1 + tests/auto/gui/qopengl/qopengl.pro | 1 + tests/auto/gui/text/qfontdatabase/qfontdatabase.pro | 1 + tests/auto/gui/text/qfontmetrics/qfontmetrics.pro | 1 + tests/auto/gui/text/qglyphrun/qglyphrun.pro | 2 ++ tests/auto/gui/text/qrawfont/qrawfont.pro | 2 ++ 12 files changed, 16 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index 15098770c6..91d93a781d 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -10,3 +10,5 @@ SOURCES += tst_qpixmap.cpp RESOURCES += qpixmap.qrc TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/* + +win32:CONFIG += insignificant_test # QTBUG-24183 diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro index 4be6769592..ffab4dec4f 100644 --- a/tests/auto/gui/kernel/qclipboard/test/test.pro +++ b/tests/auto/gui/kernel/qclipboard/test/test.pro @@ -16,6 +16,7 @@ wince* { } mac: CONFIG += insignificant_test # QTBUG-23057 +win32:CONFIG += insignificant_test # QTBUG-24184 load(testcase) # for target.path and installTestHelperApp() installTestHelperApp("../copier/copier",copier,copier) diff --git a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro index fffa097d73..777e2c6b1a 100644 --- a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro +++ b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro @@ -2,3 +2,5 @@ CONFIG += testcase TARGET = tst_qguiapplication QT += core gui testlib SOURCES = tst_qguiapplication.cpp + +win32:CONFIG += insignificant_test # QTBUG-24186 diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro index 0115d96c56..d191b9fb8e 100644 --- a/tests/auto/gui/kernel/qwindow/qwindow.pro +++ b/tests/auto/gui/kernel/qwindow/qwindow.pro @@ -6,3 +6,4 @@ QT += core-private gui-private testlib SOURCES += tst_qwindow.cpp mac: CONFIG += insignificant_test # QTBUG-23059 +win32:CONFIG += insignificant_test # QTBUG-24185 diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro index 0209043d20..2cbd5b7e1c 100644 --- a/tests/auto/gui/painting/qpainter/qpainter.pro +++ b/tests/auto/gui/painting/qpainter/qpainter.pro @@ -5,6 +5,7 @@ QT += widgets widgets-private printsupport testlib SOURCES += tst_qpainter.cpp mac*:CONFIG+=insignificant_test +win32:CONFIG += insignificant_test # QTBUG-24188 TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \ task217400.png diff --git a/tests/auto/gui/painting/qprinter/qprinter.pro b/tests/auto/gui/painting/qprinter/qprinter.pro index ebf8edea32..7543e91f8c 100644 --- a/tests/auto/gui/painting/qprinter/qprinter.pro +++ b/tests/auto/gui/painting/qprinter/qprinter.pro @@ -4,3 +4,4 @@ QT += printsupport widgets testlib SOURCES += tst_qprinter.cpp mac*:CONFIG+=insignificant_test +win32:CONFIG += insignificant_test # QTBUG-24191 diff --git a/tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro b/tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro index b0e69dca2e..88cb07f338 100644 --- a/tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro +++ b/tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro @@ -7,3 +7,4 @@ QT += printsupport network testlib DEFINES += QT_USE_USING_NAMESPACE mac: CONFIG += insignificant_test # QTBUG-23060 +win32:CONFIG += insignificant_test # QTBUG-24190 diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro index f3c020dde2..d0af96df37 100644 --- a/tests/auto/gui/qopengl/qopengl.pro +++ b/tests/auto/gui/qopengl/qopengl.pro @@ -9,3 +9,4 @@ QT += gui gui-private core-private testlib SOURCES += tst_qopengl.cpp mac: CONFIG += insignificant_test # QTBUG-23061 +win32:CONFIG += insignificant_test # QTBUG-24192 diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro index c853aaa100..034d08fc8f 100644 --- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro +++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro @@ -11,3 +11,4 @@ wince* { } mac: CONFIG += insignificant_test # QTBUG-23062 +win32:CONFIG += insignificant_test # QTBUG-24193 diff --git a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro index a636651724..bb0d8e3c4a 100644 --- a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro +++ b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro @@ -4,3 +4,4 @@ QT += testlib SOURCES += tst_qfontmetrics.cpp RESOURCES += testfont.qrc +win32:CONFIG += insignificant_test # QTBUG-24195 diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro index acdff0584f..97b9806c11 100644 --- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro +++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro @@ -10,3 +10,5 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } + +win32:CONFIG += insignificant_test # QTBUG-24196 diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro index 149ad6442e..8cac4abc57 100644 --- a/tests/auto/gui/text/qrawfont/qrawfont.pro +++ b/tests/auto/gui/text/qrawfont/qrawfont.pro @@ -9,3 +9,5 @@ SOURCES += \ INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src TESTDATA += testfont_bold_italic.ttf testfont.ttf + +win32:CONFIG += insignificant_test # QTBUG-24197 -- cgit v1.2.3 From 3791d3b0c2dab448b53720979b2375998d06e209 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 8 Feb 2012 22:17:03 +0100 Subject: Add QUrl::toDisplayString(), which is toString() without password. And fix documentation of toString() which said this was the method to use for displaying to humans, while this has never been true. Change-Id: Iff6df92e32b2517e1481d4992d80cae2d58da427 Reviewed-by: Oswald Buddenhagen Reviewed-by: Jonas Gastal Reviewed-by: Giuseppe D'Angelo Reviewed-by: Stephen Kelly --- tests/auto/corelib/io/qurl/tst_qurl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 611847852f..e2831036df 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -350,6 +350,8 @@ void tst_QUrl::setUrl() QVERIFY(url.authority().isEmpty()); QVERIFY(url.fragment().isEmpty()); QCOMPARE(url.port(), -1); + QCOMPARE(url.toString(), QString::fromLatin1("file:///")); + QCOMPARE(url.toDisplayString(), QString::fromLatin1("file:///")); } { @@ -363,6 +365,8 @@ void tst_QUrl::setUrl() QCOMPARE(url.host(), QString::fromLatin1("www.foo.bar")); QCOMPARE(url.authority(), QString::fromLatin1("www.foo.bar:80")); QCOMPARE(url.port(), 80); + QCOMPARE(url.toString(), QString::fromLatin1("http://www.foo.bar:80")); + QCOMPARE(url.toDisplayString(), QString::fromLatin1("http://www.foo.bar:80")); QUrl url2("//www1.foo.bar"); QCOMPARE(url.resolved(url2).toString(), QString::fromLatin1("http://www1.foo.bar")); @@ -379,6 +383,8 @@ void tst_QUrl::setUrl() QCOMPARE(url.host(), QString::fromLatin1("56::56:56:56:127.0.0.1")); QCOMPARE(url.authority(), QString::fromLatin1("user:pass@[56::56:56:56:127.0.0.1]:99")); QCOMPARE(url.port(), 99); + QCOMPARE(url.url(), QString::fromLatin1("http://user:pass@[56::56:56:56:127.0.0.1]:99")); + QCOMPARE(url.toDisplayString(), QString::fromLatin1("http://user@[56::56:56:56:127.0.0.1]:99")); } { -- cgit v1.2.3 From 7a7d82ffd9fac842fb573aad4fe28e27bc879f91 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 11 Feb 2012 10:42:03 +0100 Subject: Implement QMAKE_SUBSTITUTES.config = verbatim. Change-Id: Ie0b333fa7fae2283e99e42f9cd7bab4e84991f40 Reviewed-by: Oswald Buddenhagen --- tests/auto/tools/qmake/testdata/substitutes/copy.txt | 3 +++ tests/auto/tools/qmake/testdata/substitutes/test.pro | 5 ++++- tests/auto/tools/qmake/tst_qmake.cpp | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/auto/tools/qmake/testdata/substitutes/copy.txt (limited to 'tests/auto') diff --git a/tests/auto/tools/qmake/testdata/substitutes/copy.txt b/tests/auto/tools/qmake/testdata/substitutes/copy.txt new file mode 100644 index 0000000000..65e5840739 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/substitutes/copy.txt @@ -0,0 +1,3 @@ +This file is $processed verbatim. It's not going to "warn about + +anything that is usually substituted in qmake such as $${PWD}. diff --git a/tests/auto/tools/qmake/testdata/substitutes/test.pro b/tests/auto/tools/qmake/testdata/substitutes/test.pro index 26b02722e8..65bb2d85bf 100644 --- a/tests/auto/tools/qmake/testdata/substitutes/test.pro +++ b/tests/auto/tools/qmake/testdata/substitutes/test.pro @@ -1,5 +1,8 @@ -QMAKE_SUBSTITUTES += test.in sub/test2.in indirect +QMAKE_SUBSTITUTES += test.in sub/test2.in indirect copy indirect.input = $$PWD/test3.txt indirect.output = $$OUT_PWD/sub/indirect_test.txt +copy.input = $$PWD/copy.txt +copy.output = $$OUT_PWD/copy_test.txt +copy.config = verbatim diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index fcebd6b821..4da781f763 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -510,6 +510,14 @@ void tst_qmake::substitutes() QVERIFY( test_compiler.exists( buildDir, "test", Plain, "" )); QVERIFY( test_compiler.exists( buildDir, "sub/test2", Plain, "" )); QVERIFY( test_compiler.exists( buildDir, "sub/indirect_test.txt", Plain, "" )); + + QFile copySource(workDir + "/copy.txt"); + QFile copyDestination(buildDir + "/copy_test.txt"); + + QVERIFY(copySource.open(QFile::ReadOnly)); + QVERIFY(copyDestination.open(QFile::ReadOnly)); + QCOMPARE(copySource.readAll(), copyDestination.readAll()); + QVERIFY( test_compiler.makeDistClean( buildDir )); } -- cgit v1.2.3 From a6d3983ef6b7affef1d2aa48ed8bf8000a6e4267 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Thu, 2 Feb 2012 10:12:21 +0100 Subject: CodeCoverage: Handle QTest based subtests. Set QT_TESTCOCOON_ACTIVE environment variable when the coverage is installed for a test and unset it when the coverage data is saved. Tests that run when QT_TESTCOCOON_ACTIVE is set are subtests and will not be considered as stand-alone tests for the coverage. When a test is run as a subtest its coverage data will not be saved for itself but for the main test it is merged with. Also its status will not be reported since only the status of the main test is expected in the test report, e.g. the test tests/auto/testlib/selftests. Change-Id: Icfdf99300aae18040e1a3441a8af21f68df4c0db Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/testlib/selftests/tst_selftests.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index dc7966b82b..7e671a50f2 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -456,23 +456,26 @@ void tst_Selftests::runSubTest_data() } } +static void insertEnvironmentVariable(QString const& name, QProcessEnvironment &result) +{ + const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment(); + const QString value = systemEnvironment.value(name); + if (!value.isEmpty()) + result.insert(name, value); +} + static inline QProcessEnvironment processEnvironment() { QProcessEnvironment result; - const QString path = QStringLiteral("PATH"); - const QProcessEnvironment systemEnvironment = QProcessEnvironment::systemEnvironment(); - result.insert(path, systemEnvironment.value(path)); + insertEnvironmentVariable(QStringLiteral("PATH"), result); // Preserve DISPLAY for X11 as some tests use QtGui. #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - const QString display = QStringLiteral("DISPLAY"); - const QString displayValue = systemEnvironment.value(display); - if (!displayValue.isEmpty()) - result.insert(display, displayValue); + insertEnvironmentVariable(QStringLiteral("DISPLAY"), result); +#endif + insertEnvironmentVariable(QStringLiteral("QT_QPA_PLATFORM"), result); +#ifdef __COVERAGESCANNER__ + insertEnvironmentVariable(QStringLiteral("QT_TESTCOCOON_ACTIVE"), result); #endif - const QString platform = QStringLiteral("QT_QPA_PLATFORM"); - const QString platformValue = systemEnvironment.value(platform); - if (!platformValue.isEmpty()) - result.insert(platform, platformValue); return result; } -- cgit v1.2.3 From 9b2971cbb4ebf102198c2320a575e2fd718c182e Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 2 Feb 2012 17:08:44 +1000 Subject: testlib: Count passes, fails and skips consistently. For data-driven tests, testlib previously counted one fail or skip for each data row that failed or skipped, while it counted only one pass for a test function where all rows passed and counted no passes for a test function where some rows passed and some rows failed. A similar problem also existed for benchmark tests, which could run multiple iterations of the same test, with each fail and skip being counted but only a single pass being counted for the entire series of iterations. This commit makes testlib count one pass, fail or skip for each data row. Test functions that are not data-driven count one result for the test function, as before. Benchmark tests count one pass, fail or skip per iteration. A side-effect of this change is that the test output in plain text, xml and light xml formats now shows a result for every data row and benchmark iteration executed, allowing post-processors to correctly calculate the total number of tests executed. Previously, individual rows were not shown in the test output if they passed, making such calculations impossible. The only change to the xunitxml output format is to correct a bug where no test result was recorded for a test function if the last data row was skipped and all other rows passed -- in which case the overall result should be a pass. Note that there is also a pre-existing bug in the xunit logger, where no result is reported if all rows are skipped; that bug is unaffected by this commit. Task-number: QTBUG-21848 Task-number: QTBUG-22124 Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b Reviewed-by: Ed Baak --- .../testlib/selftests/expected_badxml.lightxml | 13 ++++- tests/auto/testlib/selftests/expected_badxml.txt | 7 ++- tests/auto/testlib/selftests/expected_badxml.xml | 13 ++++- .../selftests/expected_benchlibcallgrind.txt | 7 +-- .../expected_benchlibeventcounter.lightxml | 22 ++++++++- .../selftests/expected_benchlibeventcounter.txt | 14 ++++-- .../selftests/expected_benchlibeventcounter.xml | 22 ++++++++- .../testlib/selftests/expected_benchliboptions.txt | 14 ++++-- .../testlib/selftests/expected_cmptest.lightxml | 57 +++++++++++++++------- tests/auto/testlib/selftests/expected_cmptest.txt | 45 +++++++++-------- tests/auto/testlib/selftests/expected_cmptest.xml | 57 +++++++++++++++------- .../selftests/expected_commandlinedata.lightxml | 20 +++++++- .../testlib/selftests/expected_commandlinedata.txt | 22 +++++---- .../testlib/selftests/expected_commandlinedata.xml | 20 +++++++- .../testlib/selftests/expected_counting.lightxml | 20 +++++++- tests/auto/testlib/selftests/expected_counting.txt | 10 ++-- tests/auto/testlib/selftests/expected_counting.xml | 20 +++++++- .../testlib/selftests/expected_counting.xunitxml | 2 +- .../testlib/selftests/expected_datatable.lightxml | 52 +++++++++++++++++++- .../auto/testlib/selftests/expected_datatable.txt | 46 +++++++++++------ .../auto/testlib/selftests/expected_datatable.xml | 52 +++++++++++++++++++- .../testlib/selftests/expected_datetime.lightxml | 6 +++ tests/auto/testlib/selftests/expected_datetime.txt | 4 +- tests/auto/testlib/selftests/expected_datetime.xml | 6 +++ .../testlib/selftests/expected_expectfail.lightxml | 27 ++++++++-- .../auto/testlib/selftests/expected_expectfail.txt | 13 +++-- .../auto/testlib/selftests/expected_expectfail.xml | 27 ++++++++-- tests/auto/testlib/selftests/expected_float.txt | 4 +- .../testlib/selftests/expected_globaldata.lightxml | 23 ++++++++- .../auto/testlib/selftests/expected_globaldata.txt | 11 +++-- .../auto/testlib/selftests/expected_globaldata.xml | 23 ++++++++- .../testlib/selftests/expected_qexecstringlist.txt | 20 +++++--- .../auto/testlib/selftests/expected_skip.lightxml | 4 +- tests/auto/testlib/selftests/expected_skip.txt | 2 +- tests/auto/testlib/selftests/expected_skip.xml | 4 +- .../testlib/selftests/expected_subtest.lightxml | 13 ++++- tests/auto/testlib/selftests/expected_subtest.txt | 7 ++- tests/auto/testlib/selftests/expected_subtest.xml | 13 ++++- 38 files changed, 599 insertions(+), 143 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_badxml.lightxml b/tests/auto/testlib/selftests/expected_badxml.lightxml index 43446c3169..a8cdf56dc1 100644 --- a/tests/auto/testlib/selftests/expected_badxml.lightxml +++ b/tests/auto/testlib/selftests/expected_badxml.lightxml @@ -48,19 +48,30 @@ text ]]]> more text]]> + + + + + + open < tags < text]]> + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> - + + + diff --git a/tests/auto/testlib/selftests/expected_badxml.txt b/tests/auto/testlib/selftests/expected_badxml.txt index 0db292e269..d4f4432066 100644 --- a/tests/auto/testlib/selftests/expected_badxml.txt +++ b/tests/auto/testlib/selftests/expected_badxml.txt @@ -22,11 +22,14 @@ FAIL! : tst_BadXml::badDataTag(all > " mixed ]]> up > " in < the ]]> hopes < of RESULT : tst_BadXml::badDataTag():"all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs": 0 events per iteration (total: 0, iterations: 1) QDEBUG : tst_BadXml::badMessage(string 0) end cdata ]]> text ]]> more text +PASS : tst_BadXml::badMessage(string 0) QDEBUG : tst_BadXml::badMessage(string 1) quotes " text" more text +PASS : tst_BadXml::badMessage(string 1) QDEBUG : tst_BadXml::badMessage(string 2) xml close > open < tags < text +PASS : tst_BadXml::badMessage(string 2) QDEBUG : tst_BadXml::badMessage(string 3) all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs -PASS : tst_BadXml::badMessage() +PASS : tst_BadXml::badMessage(string 3) FAIL! : tst_BadXml::failWithNoFile() failure message PASS : tst_BadXml::cleanupTestCase() -Totals: 3 passed, 5 failed, 0 skipped +Totals: 6 passed, 5 failed, 0 skipped ********* Finished testing of tst_BadXml ********* diff --git a/tests/auto/testlib/selftests/expected_badxml.xml b/tests/auto/testlib/selftests/expected_badxml.xml index fbb584d5e5..9f083d3917 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xml +++ b/tests/auto/testlib/selftests/expected_badxml.xml @@ -50,19 +50,30 @@ text ]]]> more text]]> + + + + + + open < tags < text]]> + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> - + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt index 2498c81138..714b67fa77 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt +++ b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt @@ -1,9 +1,10 @@ ********* Start testing of tst_BenchlibCallgrind ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibCallgrind::initTestCase() -RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions(): - 200,000,000 instruction reads per iteration (total: 200000000, iterations: 1) PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions() +PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions() +RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions(): + 200,000,158 instruction reads per iteration (total: 200,000,158, iterations: 1) PASS : tst_BenchlibCallgrind::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped +Totals: 4 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibCallgrind ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml index 3bede6de83..3cb59d209b 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml @@ -6,14 +6,34 @@ + + + + + + + + + + + + + + + + + + + + + - diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt b/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt index e3dc6c0411..7be4bcccc4 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt @@ -1,21 +1,27 @@ ********* Start testing of tst_BenchlibEventCounter ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibEventCounter::initTestCase() +PASS : tst_BenchlibEventCounter::events(0) RESULT : tst_BenchlibEventCounter::events():"0": 0 events per iteration (total: 0, iterations: 1) +PASS : tst_BenchlibEventCounter::events(1) RESULT : tst_BenchlibEventCounter::events():"1": 1 events per iteration (total: 1, iterations: 1) +PASS : tst_BenchlibEventCounter::events(10) RESULT : tst_BenchlibEventCounter::events():"10": 10 events per iteration (total: 10, iterations: 1) +PASS : tst_BenchlibEventCounter::events(100) RESULT : tst_BenchlibEventCounter::events():"100": 100 events per iteration (total: 100, iterations: 1) +PASS : tst_BenchlibEventCounter::events(500) RESULT : tst_BenchlibEventCounter::events():"500": 500 events per iteration (total: 500, iterations: 1) +PASS : tst_BenchlibEventCounter::events(5000) RESULT : tst_BenchlibEventCounter::events():"5000": - 5,000 events per iteration (total: 5000, iterations: 1) + 5,000 events per iteration (total: 5,000, iterations: 1) +PASS : tst_BenchlibEventCounter::events(100000) RESULT : tst_BenchlibEventCounter::events():"100000": - 100,000 events per iteration (total: 100000, iterations: 1) -PASS : tst_BenchlibEventCounter::events() + 100,000 events per iteration (total: 100,000, iterations: 1) PASS : tst_BenchlibEventCounter::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped +Totals: 9 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibEventCounter ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml index 646cf22b80..47b497881a 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.xml @@ -8,14 +8,34 @@ + + + + + + + + + + + + + + + + + + + + + - diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.txt b/tests/auto/testlib/selftests/expected_benchliboptions.txt index 3e75d209d0..6d6d91c25e 100644 --- a/tests/auto/testlib/selftests/expected_benchliboptions.txt +++ b/tests/auto/testlib/selftests/expected_benchliboptions.txt @@ -1,27 +1,33 @@ ********* Start testing of tst_BenchlibOptions ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOptions::initTestCase() +PASS : tst_BenchlibOptions::threeEvents() RESULT : tst_BenchlibOptions::threeEvents(): 3 events per iteration (total: 3, iterations: 1) -PASS : tst_BenchlibOptions::threeEvents() PASS : tst_BenchlibOptions::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibOptions ********* ********* Start testing of tst_BenchlibFifteenIterations ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibFifteenIterations::initTestCase() +PASS : tst_BenchlibFifteenIterations::threeEvents() RESULT : tst_BenchlibFifteenIterations::threeEvents(): 3.0 events per iteration (total: 45, iterations: 15) -PASS : tst_BenchlibFifteenIterations::threeEvents() PASS : tst_BenchlibFifteenIterations::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibFifteenIterations ********* ********* Start testing of tst_BenchlibOneHundredMinimum ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOneHundredMinimum::initTestCase() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() +PASS : tst_BenchlibOneHundredMinimum::threeEvents() RESULT : tst_BenchlibOneHundredMinimum::threeEvents(): 3.00 events per iteration (total: 192, iterations: 64) -PASS : tst_BenchlibOneHundredMinimum::threeEvents() PASS : tst_BenchlibOneHundredMinimum::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped +Totals: 9 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibOneHundredMinimum ********* diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml index 17f3e6ec3a..d1cccd4bd2 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.lightxml +++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml @@ -12,25 +12,28 @@ - + - + + + + - + - + ) @@ -38,31 +41,37 @@ - + + + + + + + - + - + - + - + - + + + + - + - + + + + - + - + + + + - + - + + + + - + - + diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index 36a4995d91..fce635ae5a 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -6,71 +6,78 @@ PASS : tst_Cmptest::compare_pointerfuncs() FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same Actual (actual): QVariant(int,123) Expected (expected): QVariant(QString,hi) - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] +PASS : tst_Cmptest::compare_tostring(both invalid) FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same Actual (actual): QVariant(QVariantHash) Expected (expected): QVariant() - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same Actual (actual): QVariant(QString,A simple string) Expected (expected): QVariant(PhonyClass) - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same Actual (actual): QVariant(PhonyClass,) Expected (expected): QVariant(PhonyClass,) - Loc: [tst_cmptest.cpp(214)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)] +PASS : tst_Cmptest::compareQStringLists(empty lists) +PASS : tst_Cmptest::compareQStringLists(equal lists) FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared QStringLists differ at index 2. Actual (opA) : 'string3' Expected (opB) : 'DIFFERS' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared QStringLists differ at index 2. Actual (opA) : 'string3' Expected (opB) : 'DIFFERS' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared QStringLists have different sizes. Actual (opA) size : '2' Expected (opB) size: '1' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared QStringLists have different sizes. Actual (opA) size : '12' Expected (opB) size: '1' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared QStringLists have different sizes. Actual (opA) size : '1' Expected (opB) size: '12' - Loc: [tst_cmptest.cpp(308)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)] +PASS : tst_Cmptest::compareQPixmaps(both null) FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ. Actual (opA).isNull() : 1 Expected (opB).isNull(): 0 - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ. Actual (opA).isNull() : 0 Expected (opB).isNull(): 1 - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] +PASS : tst_Cmptest::compareQPixmaps(equal) FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size. Actual (opA) : 11x20 Expected (opB): 20x20 - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same - Loc: [tst_cmptest.cpp(333)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)] +PASS : tst_Cmptest::compareQImages(both null) FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ. Actual (opA).isNull() : 1 Expected (opB).isNull(): 0 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ. Actual (opA).isNull() : 0 Expected (opB).isNull(): 1 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] +PASS : tst_Cmptest::compareQImages(equal) FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size. Actual (opA) : 11x20 Expected (opB): 20x20 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format. Actual (opA) : 6 Expected (opB): 3 - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same - Loc: [tst_cmptest.cpp(360)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)] PASS : tst_Cmptest::cleanupTestCase() -Totals: 4 passed, 18 failed, 0 skipped +Totals: 11 passed, 18 failed, 0 skipped ********* Finished testing of tst_Cmptest ********* diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml index aba1ce5edd..90bb313518 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.xml +++ b/tests/auto/testlib/selftests/expected_cmptest.xml @@ -14,25 +14,28 @@ - + - + + + + - + - + ) @@ -40,31 +43,37 @@ - + + + + + + + - + - + - + - + - + + + + - + - + + + + - + - + + + + - + - + + + + - + - + diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml index 8de90f05d8..37eb5f5a2b 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.lightxml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.lightxml @@ -10,30 +10,46 @@ + + + + + + + + + + + + - + + + - + + + diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.txt b/tests/auto/testlib/selftests/expected_commandlinedata.txt index c1b97e2a30..10e4916b54 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.txt +++ b/tests/auto/testlib/selftests/expected_commandlinedata.txt @@ -4,21 +4,25 @@ INFO : tst_DataTable::initTestCase() entering PASS : tst_DataTable::initTestCase() INFO : tst_DataTable::fiveTablePasses() entering INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data2) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data2) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data3) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data3) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data4) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data4) INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data5) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] -PASS : tst_DataTable::fiveTablePasses() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data5) INFO : tst_DataTable::fiveTablePasses() entering INFO : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) QVERIFY(test) - Loc: [tst_commandlinedata.cpp(30)] -PASS : tst_DataTable::fiveTablePasses() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/commandlinedata/tst_commandlinedata.cpp(65)] +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data1) INFO : tst_DataTable::cleanupTestCase() entering PASS : tst_DataTable::cleanupTestCase() -Totals: 4 passed, 0 failed, 0 skipped +Totals: 8 passed, 0 failed, 0 skipped ********* Finished testing of tst_DataTable ********* diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.xml b/tests/auto/testlib/selftests/expected_commandlinedata.xml index bfaf623330..2296ae8e74 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.xml +++ b/tests/auto/testlib/selftests/expected_commandlinedata.xml @@ -12,30 +12,46 @@ + + + + + + + + + + + + - + + + - + + + diff --git a/tests/auto/testlib/selftests/expected_counting.lightxml b/tests/auto/testlib/selftests/expected_counting.lightxml index f16abef128..fd80292b90 100644 --- a/tests/auto/testlib/selftests/expected_counting.lightxml +++ b/tests/auto/testlib/selftests/expected_counting.lightxml @@ -6,15 +6,26 @@ - + + + + + + + + + + + + @@ -25,7 +36,9 @@ - + + + @@ -52,6 +65,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_counting.txt b/tests/auto/testlib/selftests/expected_counting.txt index adf80012c7..bd70a44b2e 100644 --- a/tests/auto/testlib/selftests/expected_counting.txt +++ b/tests/auto/testlib/selftests/expected_counting.txt @@ -1,14 +1,17 @@ ********* Start testing of tst_Counting ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Counting::initTestCase() -PASS : tst_Counting::testPassPass() +PASS : tst_Counting::testPassPass(row 1) +PASS : tst_Counting::testPassPass(row 2) +PASS : tst_Counting::testPassSkip(row 1) SKIP : tst_Counting::testPassSkip(row 2) Skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] +PASS : tst_Counting::testPassFail(row 1) FAIL! : tst_Counting::testPassFail(row 2) 'false' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] SKIP : tst_Counting::testSkipPass(row 1) Skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] -PASS : tst_Counting::testSkipPass() +PASS : tst_Counting::testSkipPass(row 2) SKIP : tst_Counting::testSkipSkip(row 1) Skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)] SKIP : tst_Counting::testSkipSkip(row 2) Skipping @@ -19,6 +22,7 @@ FAIL! : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] +PASS : tst_Counting::testFailPass(row 2) FAIL! : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] SKIP : tst_Counting::testFailSkip(row 2) Skipping @@ -28,5 +32,5 @@ FAIL! : tst_Counting::testFailFail(row 1) 'false' returned FALSE. () FAIL! : tst_Counting::testFailFail(row 2) 'false' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)] PASS : tst_Counting::cleanupTestCase() -Totals: 4 passed, 6 failed, 6 skipped +Totals: 8 passed, 6 failed, 6 skipped ********* Finished testing of tst_Counting ********* diff --git a/tests/auto/testlib/selftests/expected_counting.xml b/tests/auto/testlib/selftests/expected_counting.xml index f5982d7052..c5460a7346 100644 --- a/tests/auto/testlib/selftests/expected_counting.xml +++ b/tests/auto/testlib/selftests/expected_counting.xml @@ -8,15 +8,26 @@ - + + + + + + + + + + + + @@ -27,7 +38,9 @@ - + + + @@ -54,6 +67,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_counting.xunitxml b/tests/auto/testlib/selftests/expected_counting.xunitxml index c19a1612cb..496546700e 100644 --- a/tests/auto/testlib/selftests/expected_counting.xunitxml +++ b/tests/auto/testlib/selftests/expected_counting.xunitxml @@ -6,7 +6,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_datatable.lightxml b/tests/auto/testlib/selftests/expected_datatable.lightxml index 1741b6f1e3..83ac0c0b5d 100644 --- a/tests/auto/testlib/selftests/expected_datatable.lightxml +++ b/tests/auto/testlib/selftests/expected_datatable.lightxml @@ -12,7 +12,21 @@ - + + + + + + + + + + + + + + + @@ -41,18 +55,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datatable.txt b/tests/auto/testlib/selftests/expected_datatable.txt index 4031ca22dd..68c33e6efd 100644 --- a/tests/auto/testlib/selftests/expected_datatable.txt +++ b/tests/auto/testlib/selftests/expected_datatable.txt @@ -3,33 +3,49 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE PASS : tst_DataTable::initTestCase() PASS : tst_DataTable::singleTestFunction1() PASS : tst_DataTable::singleTestFunction2() -PASS : tst_DataTable::fiveTablePasses() +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 1) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 2) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 3) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 4) +PASS : tst_DataTable::fiveTablePasses(fiveTablePasses_data 5) FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 1) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 2) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 3) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 4) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::fiveTableFailures(fiveTableFailures_data 5) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] FAIL! : tst_DataTable::startsWithFailure(startsWithFailure_data 1) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 2) +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 3) +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 4) +PASS : tst_DataTable::startsWithFailure(startsWithFailure_data 5) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 1) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 2) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 3) +PASS : tst_DataTable::endsWithFailure(endsWithFailure 4) FAIL! : tst_DataTable::endsWithFailure(endsWithFailure 5) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 1) +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 2) FAIL! : tst_DataTable::failureInMiddle(failureInMiddle_data 3) 'test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(58)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(91)] +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 4) +PASS : tst_DataTable::failureInMiddle(failureInMiddle_data 5) FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 1) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 2) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 3) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 4) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] FAIL! : tst_DataTable::fiveIsolatedFailures(fiveIsolatedFailures_data 5) '!test' returned FALSE. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(140)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datatable/tst_datatable.cpp(173)] PASS : tst_DataTable::cleanupTestCase() -Totals: 5 passed, 13 failed, 0 skipped +Totals: 21 passed, 13 failed, 0 skipped ********* Finished testing of tst_DataTable ********* diff --git a/tests/auto/testlib/selftests/expected_datatable.xml b/tests/auto/testlib/selftests/expected_datatable.xml index ce123d836c..132b34ec4a 100644 --- a/tests/auto/testlib/selftests/expected_datatable.xml +++ b/tests/auto/testlib/selftests/expected_datatable.xml @@ -14,7 +14,21 @@ - + + + + + + + + + + + + + + + @@ -43,18 +57,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datetime.lightxml b/tests/auto/testlib/selftests/expected_datetime.lightxml index 0024b101aa..17fd48a196 100644 --- a/tests/auto/testlib/selftests/expected_datetime.lightxml +++ b/tests/auto/testlib/selftests/expected_datetime.lightxml @@ -13,6 +13,9 @@ + + + + + + diff --git a/tests/auto/testlib/selftests/expected_datetime.txt b/tests/auto/testlib/selftests/expected_datetime.txt index e2966b9168..239886ca8e 100644 --- a/tests/auto/testlib/selftests/expected_datetime.txt +++ b/tests/auto/testlib/selftests/expected_datetime.txt @@ -5,6 +5,7 @@ FAIL! : tst_DateTime::dateTime() Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] Expected (utc): 2000/05/03 04:03:04.000[UTC] Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(33)] +PASS : tst_DateTime::qurl(empty urls) FAIL! : tst_DateTime::qurl(empty rhs) Compared values are not the same Actual (operandA): http://example.com Expected (operandB): @@ -13,6 +14,7 @@ FAIL! : tst_DateTime::qurl(empty lhs) Compared values are not the same Actual (operandA): Expected (operandB): http://example.com Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)] +PASS : tst_DateTime::qurl(same urls) PASS : tst_DateTime::cleanupTestCase() -Totals: 2 passed, 3 failed, 0 skipped +Totals: 4 passed, 3 failed, 0 skipped ********* Finished testing of tst_DateTime ********* diff --git a/tests/auto/testlib/selftests/expected_datetime.xml b/tests/auto/testlib/selftests/expected_datetime.xml index f1b5a6aafd..747ff13730 100644 --- a/tests/auto/testlib/selftests/expected_datetime.xml +++ b/tests/auto/testlib/selftests/expected_datetime.xml @@ -15,6 +15,9 @@ + + + + + + diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index eab0bbbaa3..8fdac12d21 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -41,29 +41,47 @@ + + + + + + + + + - + + + - + + + + + + - + + + @@ -85,6 +103,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index 0286490372..f1ad4061b9 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -17,23 +17,28 @@ XFAIL : tst_ExpectFail::xfailWithQString() A string XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message) Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(106)] PASS : tst_ExpectFail::xfailWithQString() +PASS : tst_ExpectFail::xfailDataDriven(Pass 1) +PASS : tst_ExpectFail::xfailDataDriven(Pass 2) XFAIL : tst_ExpectFail::xfailDataDriven(Abort) This test should xfail Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)] +PASS : tst_ExpectFail::xfailDataDriven(Abort) XFAIL : tst_ExpectFail::xfailDataDriven(Continue) This test should xfail Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)] -PASS : tst_ExpectFail::xfailDataDriven() -PASS : tst_ExpectFail::xfailOnWrongRow() +PASS : tst_ExpectFail::xfailDataDriven(Continue) +PASS : tst_ExpectFail::xfailOnWrongRow(right row) XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(170)] +PASS : tst_ExpectFail::xfailOnAnyRow(first row) XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(170)] -PASS : tst_ExpectFail::xfailOnAnyRow() +PASS : tst_ExpectFail::xfailOnAnyRow(second row) FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements XPASS : tst_ExpectFail::xpass() 'true' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(190)] XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(212)] +PASS : tst_ExpectFail::xpassDataDriven(Pass) PASS : tst_ExpectFail::cleanupTestCase() -Totals: 8 passed, 5 failed, 0 skipped +Totals: 13 passed, 5 failed, 0 skipped ********* Finished testing of tst_ExpectFail ********* diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 3c8baf9271..cb061f55bf 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -43,29 +43,47 @@ + + + + + + + + + - + + + - + + + + + + - + + + @@ -87,6 +105,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt index 81e4d7b067..6ebbeffde5 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -1,6 +1,7 @@ ********* Start testing of tst_float ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_float::initTestCase() +PASS : tst_float::floatComparisons(should SUCCEED 1) FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare) Actual (operandLeft): 1 Expected (operandRight): 3 @@ -13,6 +14,7 @@ FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the Actual (operandLeft): 99998 Expected (operandRight): 99999 Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)] +PASS : tst_float::floatComparisons(should SUCCEED 2) FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare) Actual (t1): 1 Expected (t3): 3 @@ -26,5 +28,5 @@ FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fu Expected (t3): 3e+07 Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)] PASS : tst_float::cleanupTestCase() -Totals: 2 passed, 6 failed, 0 skipped +Totals: 4 passed, 6 failed, 0 skipped ********* Finished testing of tst_float ********* diff --git a/tests/auto/testlib/selftests/expected_globaldata.lightxml b/tests/auto/testlib/selftests/expected_globaldata.lightxml index 7a50f01cb8..6d68bfbdb5 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.lightxml +++ b/tests/auto/testlib/selftests/expected_globaldata.lightxml @@ -25,6 +25,9 @@ + + + @@ -41,6 +44,9 @@ + + + @@ -57,6 +63,9 @@ + + + @@ -73,7 +82,9 @@ - + + + @@ -120,6 +131,9 @@ + + + @@ -132,6 +146,9 @@ + + + @@ -156,7 +173,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_globaldata.txt b/tests/auto/testlib/selftests/expected_globaldata.txt index e3905e2fa3..59b95fa253 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.txt +++ b/tests/auto/testlib/selftests/expected_globaldata.txt @@ -6,19 +6,22 @@ QDEBUG : tst_globaldata::testGlobal(1:local 1) init testGlobal local 1 QDEBUG : tst_globaldata::testGlobal(1:local 1) global: false QDEBUG : tst_globaldata::testGlobal(1:local 1) local: false QDEBUG : tst_globaldata::testGlobal(1:local 1) cleanup testGlobal local 1 +PASS : tst_globaldata::testGlobal(1:local 1) QDEBUG : tst_globaldata::testGlobal(1:local 2) init testGlobal local 2 QDEBUG : tst_globaldata::testGlobal(1:local 2) global: false QDEBUG : tst_globaldata::testGlobal(1:local 2) local: true QDEBUG : tst_globaldata::testGlobal(1:local 2) cleanup testGlobal local 2 +PASS : tst_globaldata::testGlobal(1:local 2) QDEBUG : tst_globaldata::testGlobal(2:local 1) init testGlobal local 1 QDEBUG : tst_globaldata::testGlobal(2:local 1) global: true QDEBUG : tst_globaldata::testGlobal(2:local 1) local: false QDEBUG : tst_globaldata::testGlobal(2:local 1) cleanup testGlobal local 1 +PASS : tst_globaldata::testGlobal(2:local 1) QDEBUG : tst_globaldata::testGlobal(2:local 2) init testGlobal local 2 QDEBUG : tst_globaldata::testGlobal(2:local 2) global: true QDEBUG : tst_globaldata::testGlobal(2:local 2) local: true QDEBUG : tst_globaldata::testGlobal(2:local 2) cleanup testGlobal local 2 -PASS : tst_globaldata::testGlobal() +PASS : tst_globaldata::testGlobal(2:local 2) SKIP : tst_globaldata::skip(1) skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(129)] QDEBUG : tst_globaldata::skipLocal(1:local 1) init skipLocal local 1 @@ -32,9 +35,11 @@ QDEBUG : tst_globaldata::skipLocal(1:local 2) cleanup skipLocal local 2 QDEBUG : tst_globaldata::skipSingle(1:local 1) init skipSingle local 1 QDEBUG : tst_globaldata::skipSingle(1:local 1) global: false local: false QDEBUG : tst_globaldata::skipSingle(1:local 1) cleanup skipSingle local 1 +PASS : tst_globaldata::skipSingle(1:local 1) QDEBUG : tst_globaldata::skipSingle(1:local 2) init skipSingle local 2 QDEBUG : tst_globaldata::skipSingle(1:local 2) global: false local: true QDEBUG : tst_globaldata::skipSingle(1:local 2) cleanup skipSingle local 2 +PASS : tst_globaldata::skipSingle(1:local 2) QDEBUG : tst_globaldata::skipSingle(2:local 1) init skipSingle local 1 SKIP : tst_globaldata::skipSingle(2:local 1) skipping Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/globaldata/tst_globaldata.cpp(143)] @@ -42,8 +47,8 @@ QDEBUG : tst_globaldata::skipSingle(2:local 1) cleanup skipSingle local 1 QDEBUG : tst_globaldata::skipSingle(2:local 2) init skipSingle local 2 QDEBUG : tst_globaldata::skipSingle(2:local 2) global: true local: true QDEBUG : tst_globaldata::skipSingle(2:local 2) cleanup skipSingle local 2 -PASS : tst_globaldata::skipSingle() +PASS : tst_globaldata::skipSingle(2:local 2) QDEBUG : tst_globaldata::cleanupTestCase() cleanupTestCase cleanupTestCase (null) PASS : tst_globaldata::cleanupTestCase() -Totals: 4 passed, 0 failed, 4 skipped +Totals: 9 passed, 0 failed, 4 skipped ********* Finished testing of tst_globaldata ********* diff --git a/tests/auto/testlib/selftests/expected_globaldata.xml b/tests/auto/testlib/selftests/expected_globaldata.xml index 9abbeeef35..09edaacd43 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.xml +++ b/tests/auto/testlib/selftests/expected_globaldata.xml @@ -27,6 +27,9 @@ + + + @@ -43,6 +46,9 @@ + + + @@ -59,6 +65,9 @@ + + + @@ -75,7 +84,9 @@ - + + + @@ -122,6 +133,9 @@ + + + @@ -134,6 +148,9 @@ + + + @@ -158,7 +175,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_qexecstringlist.txt b/tests/auto/testlib/selftests/expected_qexecstringlist.txt index 87df97af48..da283e106f 100644 --- a/tests/auto/testlib/selftests/expected_qexecstringlist.txt +++ b/tests/auto/testlib/selftests/expected_qexecstringlist.txt @@ -2,19 +2,23 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testA() -PASS : tst_QExecStringList::testB() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) PASS : tst_QExecStringList::testC() PASS : tst_QExecStringList::cleanupTestCase() -Totals: 5 passed, 0 failed, 0 skipped +Totals: 7 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testA() -PASS : tst_QExecStringList::testB() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) PASS : tst_QExecStringList::testC() PASS : tst_QExecStringList::cleanupTestCase() -Totals: 5 passed, 0 failed, 0 skipped +Totals: 7 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ @@ -26,14 +30,16 @@ Totals: 3 passed, 0 failed, 0 skipped ********* Start testing of tst_QExecStringList ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() -PASS : tst_QExecStringList::testB() +PASS : tst_QExecStringList::testB(Data1) +PASS : tst_QExecStringList::testB(Data2) +PASS : tst_QExecStringList::testB(Data3) PASS : tst_QExecStringList::cleanupTestCase() -Totals: 3 passed, 0 failed, 0 skipped +Totals: 5 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() -PASS : tst_QExecStringList::testB() +PASS : tst_QExecStringList::testB(Data2) PASS : tst_QExecStringList::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* diff --git a/tests/auto/testlib/selftests/expected_skip.lightxml b/tests/auto/testlib/selftests/expected_skip.lightxml index 8399a76fa2..b01570e275 100644 --- a/tests/auto/testlib/selftests/expected_skip.lightxml +++ b/tests/auto/testlib/selftests/expected_skip.lightxml @@ -24,7 +24,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_skip.txt b/tests/auto/testlib/selftests/expected_skip.txt index e18386e109..fadbc966f0 100644 --- a/tests/auto/testlib/selftests/expected_skip.txt +++ b/tests/auto/testlib/selftests/expected_skip.txt @@ -8,7 +8,7 @@ SKIP : tst_Skip::emptytest() skipping all SKIP : tst_Skip::singleSkip(local 1) skipping one Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp(97)] QDEBUG : tst_Skip::singleSkip(local 2) this line should only be reached once (true) -PASS : tst_Skip::singleSkip() +PASS : tst_Skip::singleSkip(local 2) PASS : tst_Skip::cleanupTestCase() Totals: 3 passed, 0 failed, 3 skipped ********* Finished testing of tst_Skip ********* diff --git a/tests/auto/testlib/selftests/expected_skip.xml b/tests/auto/testlib/selftests/expected_skip.xml index d0e45d0ff8..6609c0464a 100644 --- a/tests/auto/testlib/selftests/expected_skip.xml +++ b/tests/auto/testlib/selftests/expected_skip.xml @@ -26,7 +26,9 @@ - + + + diff --git a/tests/auto/testlib/selftests/expected_subtest.lightxml b/tests/auto/testlib/selftests/expected_subtest.lightxml index d76ec131de..e7d8d53efc 100644 --- a/tests/auto/testlib/selftests/expected_subtest.lightxml +++ b/tests/auto/testlib/selftests/expected_subtest.lightxml @@ -43,6 +43,9 @@ + + + @@ -59,6 +62,9 @@ + + + @@ -75,7 +81,9 @@ - + + + @@ -100,6 +108,9 @@ + + + diff --git a/tests/auto/testlib/selftests/expected_subtest.txt b/tests/auto/testlib/selftests/expected_subtest.txt index e35fb805e0..7b29bfc8c3 100644 --- a/tests/auto/testlib/selftests/expected_subtest.txt +++ b/tests/auto/testlib/selftests/expected_subtest.txt @@ -12,21 +12,24 @@ QDEBUG : tst_Subtest::test2(data0) init test2 data0 QDEBUG : tst_Subtest::test2(data0) test2 test2 data0 QDEBUG : tst_Subtest::test2(data0) test2 end QDEBUG : tst_Subtest::test2(data0) cleanup test2 data0 +PASS : tst_Subtest::test2(data0) QDEBUG : tst_Subtest::test2(data1) init test2 data1 QDEBUG : tst_Subtest::test2(data1) test2 test2 data1 QDEBUG : tst_Subtest::test2(data1) test2 end QDEBUG : tst_Subtest::test2(data1) cleanup test2 data1 +PASS : tst_Subtest::test2(data1) QDEBUG : tst_Subtest::test2(data2) init test2 data2 QDEBUG : tst_Subtest::test2(data2) test2 test2 data2 QDEBUG : tst_Subtest::test2(data2) test2 end QDEBUG : tst_Subtest::test2(data2) cleanup test2 data2 -PASS : tst_Subtest::test2() +PASS : tst_Subtest::test2(data2) QDEBUG : tst_Subtest::test3() test3_data test3 (null) QDEBUG : tst_Subtest::test3() test3_data end QDEBUG : tst_Subtest::test3(data0) init test3 data0 QDEBUG : tst_Subtest::test3(data0) test2 test3 data0 QDEBUG : tst_Subtest::test3(data0) test2 end QDEBUG : tst_Subtest::test3(data0) cleanup test3 data0 +PASS : tst_Subtest::test3(data0) QDEBUG : tst_Subtest::test3(data1) init test3 data1 QDEBUG : tst_Subtest::test3(data1) test2 test3 data1 FAIL! : tst_Subtest::test3(data1) Compared values are not the same @@ -43,5 +46,5 @@ FAIL! : tst_Subtest::test3(data2) Compared values are not the same QDEBUG : tst_Subtest::test3(data2) cleanup test3 data2 QDEBUG : tst_Subtest::cleanupTestCase() cleanupTestCase cleanupTestCase (null) PASS : tst_Subtest::cleanupTestCase() -Totals: 4 passed, 2 failed, 0 skipped +Totals: 7 passed, 2 failed, 0 skipped ********* Finished testing of tst_Subtest ********* diff --git a/tests/auto/testlib/selftests/expected_subtest.xml b/tests/auto/testlib/selftests/expected_subtest.xml index d79242f061..8a3846599c 100644 --- a/tests/auto/testlib/selftests/expected_subtest.xml +++ b/tests/auto/testlib/selftests/expected_subtest.xml @@ -45,6 +45,9 @@ + + + @@ -61,6 +64,9 @@ + + + @@ -77,7 +83,9 @@ - + + + @@ -102,6 +110,9 @@ + + + -- cgit v1.2.3 From 771a3f29f96d2004d6d39740180a80ef93567cb8 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 10 Feb 2012 11:16:41 +0100 Subject: Remove HP PA-RISC atomic implementation. This architecture is obsolete and discontinued. Support for PA-RISC can be re-added if needed, but it would be preferred to use the GCC intrinsic support from qatomic_gcc.h (on Linux/HPPA, for example). Change-Id: I952e521a2c8c68840df0d44843b5487d5c20b135 Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 6dae58a006..5b697a3509 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -1093,10 +1093,6 @@ void tst_QSharedPointer::constCorrectness() ptr = cptr.constCast(); ptr = vptr.constCast(); -#if !defined(Q_CC_HPACC) && !defined(QT_ARCH_PARISC) - // the aCC series 3 compiler we have on the PA-RISC - // machine crashes compiling this code - QSharedPointer cvptr(ptr); QSharedPointer cvptr2(cptr); QSharedPointer cvptr3(vptr); @@ -1105,7 +1101,6 @@ void tst_QSharedPointer::constCorrectness() cvptr3 = vptr; ptr = qSharedPointerConstCast(cvptr); ptr = cvptr.constCast(); -#endif } safetyCheck(); -- cgit v1.2.3 From 3f74aea9bb67bcd2ec463792ee111402f10825d5 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 8 Feb 2012 12:26:09 +0100 Subject: Fix tst_QSocketNotifier on Mac OS X Socket notifier behavior is very OS-dependent. QtNetwork uses non- immediately (it will return -1 w/ errno=EINPROGRESS). We have to wait with select(2) to indicate that the connection is ready, then call connect(2) again. When this happens, we need another call to select(2) to get notification on the listening socket so that we can call accept(2) to complete the connection. The mixingWithTimers() failure happens due to the test expecting a single processEvents() call to be able to completely connect a TCP socket. But as described above, this may not happen. The test should QTRY_COMPARE() to give the test a chance to let all this happen. The posixSockets() test can fail due to the same connect() behavior. The test already has a comment about the write notifier behavior being very OS dependent. This caused the first enterLoop() to return too early, before the read notifier fired (which is what the test is checking for, that the read notifier fired). Move creation of the write notifier to where we expect it to fire, just before writing to the posix socket. In the same test, the read notifier inside QTcpSocket may not fire after the write notifier on the posix socket. Use the waitForReadyRead() function to give the socket a chance to read the data written to the posix socket. Change-Id: I541e6ee9a39a92ce3acf6b9ffee51079febe43e4 Reviewed-by: Jonas Gastal Reviewed-by: Shane Kearns --- .../kernel/qsocketnotifier/qsocketnotifier.pro | 2 -- .../kernel/qsocketnotifier/tst_qsocketnotifier.cpp | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro b/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro index 55f6934fc9..58e4b98af7 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro +++ b/tests/auto/corelib/kernel/qsocketnotifier/qsocketnotifier.pro @@ -6,5 +6,3 @@ SOURCES = tst_qsocketnotifier.cpp requires(contains(QT_CONFIG,private_tests)) include(../../../network/socket/platformsocketengine/platformsocketengine.pri) - -mac: CONFIG += insignificant_test # QTBUG-22746 diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index e3bfe3bc6d..5442303e7e 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -237,7 +237,7 @@ void tst_QSocketNotifier::mixingWithTimers() QCoreApplication::processEvents(); QCOMPARE(helper.timerActivated, true); - QCOMPARE(helper.socketActivated, true); + QTRY_COMPARE(helper.socketActivated, true); } void tst_QSocketNotifier::posixSockets() @@ -264,10 +264,7 @@ void tst_QSocketNotifier::posixSockets() connect(&rn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); QSignalSpy readSpy(&rn, SIGNAL(activated(int))); QVERIFY(readSpy.isValid()); - QSocketNotifier wn(posixSocket, QSocketNotifier::Write); - connect(&wn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); - QSignalSpy writeSpy(&wn, SIGNAL(activated(int))); - QVERIFY(writeSpy.isValid()); + // No write notifier, some systems trigger write notification on socket creation, but not all QSocketNotifier en(posixSocket, QSocketNotifier::Exception); connect(&en, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); QSignalSpy errorSpy(&en, SIGNAL(activated(int))); @@ -278,19 +275,27 @@ void tst_QSocketNotifier::posixSockets() QTestEventLoop::instance().enterLoop(3); QCOMPARE(readSpy.count(), 1); - writeSpy.clear(); //depending on OS, write notifier triggers on creation or not. QCOMPARE(errorSpy.count(), 0); char buffer[100]; - qt_safe_read(posixSocket, buffer, 100); + int r = qt_safe_read(posixSocket, buffer, 100); + QCOMPARE(r, 6); QCOMPARE(buffer, "hello"); + QSocketNotifier wn(posixSocket, QSocketNotifier::Write); + connect(&wn, SIGNAL(activated(int)), &QTestEventLoop::instance(), SLOT(exitLoop())); + QSignalSpy writeSpy(&wn, SIGNAL(activated(int))); + QVERIFY(writeSpy.isValid()); qt_safe_write(posixSocket, "goodbye", 8); QTestEventLoop::instance().enterLoop(3); QCOMPARE(readSpy.count(), 1); QCOMPARE(writeSpy.count(), 1); QCOMPARE(errorSpy.count(), 0); + + // Write notifier may have fired before the read notifier inside + // QTcpSocket, give QTcpSocket a chance to see the incoming data + passive->waitForReadyRead(100); QCOMPARE(passive->readAll(), QByteArray("goodbye",8)); } qt_safe_close(posixSocket); -- cgit v1.2.3 From 5c637e9171975a86ec1a3982579cd6f371b1d5ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Wed, 8 Feb 2012 11:28:30 +0100 Subject: Add QFileInfo::isNativePath This function returns true if the file path can be used directly with native APIs, modulo encoding and path separator conversions. This is important for applications that interface with other libraries or simply need to use native APIs together with Qt. Traditionally, this information was available in QAbstractFileEngine and forced users to explicitly create an engine or use internal API such as QFile::fileEngine to access the underlying engine and this piece of information. Given its usefulness, exposing the information in a more visible place is more appropriate. This reduces the need for people to know or care about implementation details, like file engines... The existing isLocalFs test was updated and repurposed to use the new API, instead of relying on file engines and internal implementation details of QFileInfo. Change-Id: I65f497bb25741f6f7ea4d2c3b3562c8c4aab8bea Reviewed-by: Oswald Buddenhagen Reviewed-by: David Faure Reviewed-by: Lars Knoll --- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index a3d80cb66f..797d5ff5e3 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -159,8 +159,8 @@ private slots: void isBundle_data(); void isBundle(); - void isLocalFs_data(); - void isLocalFs(); + void isNativePath_data(); + void isNativePath(); void refresh(); @@ -1222,10 +1222,13 @@ void tst_QFileInfo::isBundle() QCOMPARE(fi.isBundle(), isBundle); } -void tst_QFileInfo::isLocalFs_data() +void tst_QFileInfo::isNativePath_data() { QTest::addColumn("path"); - QTest::addColumn("isLocalFs"); + QTest::addColumn("isNativePath"); + + QTest::newRow("default-constructed") << QString() << false; + QTest::newRow("empty") << QString("") << true; QTest::newRow("local root") << QString::fromLatin1("/") << true; QTest::newRow("local non-existent file") << QString::fromLatin1("/abrakadabra.boo") << true; @@ -1233,17 +1236,15 @@ void tst_QFileInfo::isLocalFs_data() QTest::newRow("qresource root") << QString::fromLatin1(":/") << false; } -void tst_QFileInfo::isLocalFs() +void tst_QFileInfo::isNativePath() { QFETCH(QString, path); - QFETCH(bool, isLocalFs); + QFETCH(bool, isNativePath); QFileInfo info(path); - QFileInfoPrivate *privateInfo = getPrivate(info); - QCOMPARE((privateInfo->fileEngine == 0), isLocalFs); - if (privateInfo->fileEngine) - QCOMPARE(bool(privateInfo->fileEngine->fileFlags(QAbstractFileEngine::LocalDiskFlag) - & QAbstractFileEngine::LocalDiskFlag), isLocalFs); + if (path.isNull()) + info = QFileInfo(); + QCOMPARE(info.isNativePath(), isNativePath); } void tst_QFileInfo::refresh() -- cgit v1.2.3 From e0fd9b5b06dd8f8c00d67621656b0f591b1f14bc Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 13 Feb 2012 16:53:24 +0200 Subject: Make "nmake check" pass for network tests in Windows. Marked two tests insignificant due to failures, these need to be fixed later and then re-enabled: - tst_qnetworkreply - tst_qsslsocket Task-number: QTBUG-24203 Change-Id: I9647833bf15fe5a340d7ef59e1dcb007a92677dc Reviewed-by: Sergio Ahumada Reviewed-by: Friedemann Kleint --- tests/auto/network/access/qnetworkreply/test/test.pro | 2 ++ tests/auto/network/ssl/qsslsocket/qsslsocket.pro | 2 ++ 2 files changed, 4 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro index 1dfd67a1c8..56b8acc6e5 100644 --- a/tests/auto/network/access/qnetworkreply/test/test.pro +++ b/tests/auto/network/access/qnetworkreply/test/test.pro @@ -28,3 +28,5 @@ wince* { certFiles.path = . DEPLOYMENT += certFiles } + +win32:CONFIG += insignificant_test # QTBUG-24226 diff --git a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro index a8763d69af..bb04e0b9c4 100644 --- a/tests/auto/network/ssl/qsslsocket/qsslsocket.pro +++ b/tests/auto/network/ssl/qsslsocket/qsslsocket.pro @@ -35,3 +35,5 @@ wince* { linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):DEFINES+=UBUNTU_ONEIRIC requires(contains(QT_CONFIG,private_tests)) + +win32:CONFIG += insignificant_test # QTBUG-24234 -- cgit v1.2.3 From b904576b37854ede07c8c671a07c735364dd2736 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 13 Feb 2012 16:07:18 +1000 Subject: Use meaningful data row names in tst_QTextCodec::fromUnicode test. Use the codec name instead of just numbering the rows. This eliminates some duplicate row names. Two duplicate rows have also been removed -- for the WINSAMI2 row, the last value in the row is different, making one copy do a subset of the testing done by the other, so the row that did less testing was removed. Change-Id: I859f681a627e8d3839ca8a4ba09d541bec43d9fb Reviewed-by: Rohan McGovern --- .../corelib/codecs/qtextcodec/tst_qtextcodec.cpp | 125 ++++++++++----------- 1 file changed, 61 insertions(+), 64 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp index 7daed397d5..69e38d167e 100644 --- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp @@ -172,75 +172,72 @@ void tst_QTextCodec::fromUnicode_data() QTest::addColumn("codecName"); QTest::addColumn("eightBit"); - QTest::newRow("data1") << "ISO-8859-1" << true; - QTest::newRow("data2") << "ISO-8859-2" << true; - QTest::newRow("data3") << "ISO-8859-3" << true; - QTest::newRow("data4") << "ISO-8859-4" << true; - QTest::newRow("data5") << "ISO-8859-5" << true; - QTest::newRow("data6") << "ISO-8859-6" << true; - QTest::newRow("data7") << "ISO-8859-7" << true; - QTest::newRow("data8") << "ISO-8859-8" << true; - QTest::newRow("data9") << "ISO-8859-9" << true; - QTest::newRow("data10") << "ISO-8859-10" << true; - QTest::newRow("data13") << "ISO-8859-13" << true; - QTest::newRow("data14") << "ISO-8859-14" << true; - QTest::newRow("data15") << "ISO-8859-15" << true; - QTest::newRow("data16") << "ISO-8859-16" << true; - - QTest::newRow("data18") << "IBM850" << true; - QTest::newRow("data19") << "IBM874" << true; - QTest::newRow("data20") << "IBM866" << true; - - QTest::newRow("data21") << "windows-1250" << true; - QTest::newRow("data22") << "windows-1251" << true; - QTest::newRow("data23") << "windows-1252" << true; - QTest::newRow("data24") << "windows-1253" << true; - QTest::newRow("data25") << "windows-1254" << true; - QTest::newRow("data26") << "windows-1255" << true; - QTest::newRow("data27") << "windows-1256" << true; - QTest::newRow("data28") << "windows-1257" << true; - QTest::newRow("data28") << "windows-1258" << true; - - QTest::newRow("data29") << "Apple Roman" << true; - QTest::newRow("data29") << "WINSAMI2" << true; - QTest::newRow("data30") << "TIS-620" << true; - QTest::newRow("data31") << "roman8" << true; - - QTest::newRow("data32") << "SJIS" << false; - QTest::newRow("data33") << "EUC-KR" << false; + QTest::newRow("ISO-8859-1") << "ISO-8859-1" << true; + QTest::newRow("ISO-8859-2") << "ISO-8859-2" << true; + QTest::newRow("ISO-8859-3") << "ISO-8859-3" << true; + QTest::newRow("ISO-8859-4") << "ISO-8859-4" << true; + QTest::newRow("ISO-8859-5") << "ISO-8859-5" << true; + QTest::newRow("ISO-8859-6") << "ISO-8859-6" << true; + QTest::newRow("ISO-8859-7") << "ISO-8859-7" << true; + QTest::newRow("ISO-8859-8") << "ISO-8859-8" << true; + QTest::newRow("ISO-8859-9") << "ISO-8859-9" << true; + QTest::newRow("ISO-8859-10") << "ISO-8859-10" << true; + QTest::newRow("ISO-8859-13") << "ISO-8859-13" << true; + QTest::newRow("ISO-8859-14") << "ISO-8859-14" << true; + QTest::newRow("ISO-8859-15") << "ISO-8859-15" << true; + QTest::newRow("ISO-8859-16") << "ISO-8859-16" << true; + + QTest::newRow("IBM850") << "IBM850" << true; + QTest::newRow("IBM874") << "IBM874" << true; + QTest::newRow("IBM866") << "IBM866" << true; + + QTest::newRow("windows-1250") << "windows-1250" << true; + QTest::newRow("windows-1251") << "windows-1251" << true; + QTest::newRow("windows-1252") << "windows-1252" << true; + QTest::newRow("windows-1253") << "windows-1253" << true; + QTest::newRow("windows-1254") << "windows-1254" << true; + QTest::newRow("windows-1255") << "windows-1255" << true; + QTest::newRow("windows-1256") << "windows-1256" << true; + QTest::newRow("windows-1257") << "windows-1257" << true; + QTest::newRow("windows-1258") << "windows-1258" << true; + + QTest::newRow("Apple Roman") << "Apple Roman" << true; + QTest::newRow("WINSAMI2") << "WINSAMI2" << true; + QTest::newRow("TIS-620") << "TIS-620" << true; + QTest::newRow("roman8") << "roman8" << true; + QTest::newRow("SJIS") << "SJIS" << false; // all codecs from documentation - QTest::newRow("doc2") << "Big5" << false; - QTest::newRow("doc3") << "Big5-HKSCS" << false; - QTest::newRow("doc4") << "CP949" << false; - QTest::newRow("doc5") << "EUC-JP" << false; - QTest::newRow("doc6") << "EUC-KR" << false; - //QTest::newRow("doc7") << "GB18030-0" << false; // only GB18030 works - QTest::newRow("doc7-bis") << "GB18030" << false; - QTest::newRow("doc8") << "IBM 850" << false; - QTest::newRow("doc9") << "IBM 866" << false; - QTest::newRow("doc10") << "IBM 874" << false; - QTest::newRow("doc11") << "ISO 2022-JP" << false; + QTest::newRow("Big5") << "Big5" << false; + QTest::newRow("Big5-HKSCS") << "Big5-HKSCS" << false; + QTest::newRow("CP949") << "CP949" << false; + QTest::newRow("EUC-JP") << "EUC-JP" << false; + QTest::newRow("EUC-KR") << "EUC-KR" << false; + //QTest::newRow("GB18030-0") << "GB18030-0" << false; // only GB18030 works + QTest::newRow("GB18030") << "GB18030" << false; + QTest::newRow("IBM 850") << "IBM 850" << false; + QTest::newRow("IBM 866") << "IBM 866" << false; + QTest::newRow("IBM 874") << "IBM 874" << false; + QTest::newRow("ISO 2022-JP") << "ISO 2022-JP" << false; //ISO 8859-1 to 10 and ISO 8859-13 to 16 tested previously // Iscii-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, and Tml tested in Iscii test - //QTest::newRow("doc12") << "JIS X 0201" << false; //actually not there - //QTest::newRow("doc13") << "JIS X 0208" << false; // actually not there - QTest::newRow("doc14") << "KOI8-R" << false; - QTest::newRow("doc15") << "KOI8-U" << false; - //QTest::newRow("doc16") << "MuleLao-1" << false; //only on x11 - QTest::newRow("doc17") << "ROMAN8" << false; - QTest::newRow("doc18") << "Shift-JIS" << false; - QTest::newRow("doc19") << "TIS-620" << false; - QTest::newRow("doc20") << "TSCII" << false; - QTest::newRow("doc21") << "UTF-8" << false; - QTest::newRow("doc22") << "UTF-16" << false; - QTest::newRow("doc23") << "UTF-16BE" << false; - QTest::newRow("doc24") << "UTF-16LE" << false; - QTest::newRow("doc25") << "UTF-32" << false; - QTest::newRow("doc26") << "UTF-32BE" << false; - QTest::newRow("doc27") << "UTF-32LE" << false; + //QTest::newRow("JIS X 0201") << "JIS X 0201" << false; // actually not there + //QTest::newRow("JIS X 0208") << "JIS X 0208" << false; // actually not there + QTest::newRow("KOI8-R") << "KOI8-R" << false; + QTest::newRow("KOI8-U") << "KOI8-U" << false; + //QTest::newRow("MuleLao-1") << "MuleLao-1" << false; //only on x11 + QTest::newRow("ROMAN8") << "ROMAN8" << false; + QTest::newRow("Shift-JIS") << "Shift-JIS" << false; + QTest::newRow("TIS-620") << "TIS-620" << false; + QTest::newRow("TSCII") << "TSCII" << false; + QTest::newRow("UTF-8") << "UTF-8" << false; + QTest::newRow("UTF-16") << "UTF-16" << false; + QTest::newRow("UTF-16BE") << "UTF-16BE" << false; + QTest::newRow("UTF-16LE") << "UTF-16LE" << false; + QTest::newRow("UTF-32") << "UTF-32" << false; + QTest::newRow("UTF-32BE") << "UTF-32BE" << false; + QTest::newRow("UTF-32LE") << "UTF-32LE" << false; //Windows-1250 to 1258 tested previously - QTest::newRow("doc3") << "WINSAMI2" << false; } void tst_QTextCodec::fromUnicode() -- cgit v1.2.3 From db0eacaa740a4e6af00da9e2619b6fd46377c3e2 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 13 Feb 2012 16:17:17 +1000 Subject: Fix duplicate data row name in tst_QTextCodec::utf8Codec test. Rename rows using naming convention used elsewhere in this test. Change-Id: I8e669cedcc2058cf84cee976c8a0a478bc1cea0a Reviewed-by: Rohan McGovern --- tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp index 69e38d167e..4144e82a29 100644 --- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp @@ -1219,7 +1219,7 @@ void tst_QTextCodec::utf8Codec_data() utf8.clear(); utf8 += char(0xff); str = fromInvalidUtf8Sequence(utf8); - QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.1") << utf8 << str << -1; + QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.2") << utf8 << str << -1; // 3.5.2 utf8.clear(); @@ -1227,7 +1227,7 @@ void tst_QTextCodec::utf8Codec_data() utf8 += char(0xfe); utf8 += char(0xff); str = fromInvalidUtf8Sequence(utf8); - QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.1") << utf8 << str << -1; + QTest::newRow("http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html 3.5.2-1") << utf8 << str << -1; // 4.1.1 utf8.clear(); -- cgit v1.2.3 From 1cda7678a61cb5807d73a06e96fdc3068001d9fb Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 13 Feb 2012 16:27:10 +1000 Subject: Eliminate duplicate data row names in utf8 autotest. Change-Id: I30dfd4b93ab1e5430b5bc7fc25fe6aea0e0cc551 Reviewed-by: Rohan McGovern --- tests/auto/corelib/codecs/utf8/tst_utf8.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp index 69b91683d4..e07b7cb239 100644 --- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp +++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp @@ -239,7 +239,7 @@ void tst_Utf8::invalidUtf8_data() QTest::newRow("non-unicode-3") << QByteArray("\xFC\x84\x80\x80\x80\x80"); // 0x7fffffff: 1 11 1111 11 1111 11 1111 11 1111 11 1111 // encoding: xxxx:xxz0 xz00:0100 xz00:0000 xz00:0000 xz00:0001 xz00:0001 - QTest::newRow("non-unicode-3") << QByteArray("\xFD\xBF\xBF\xBF\xBF\xBF"); + QTest::newRow("non-unicode-4") << QByteArray("\xFD\xBF\xBF\xBF\xBF\xBF"); // As seen above, 0xFE and 0xFF never appear: QTest::newRow("fe") << QByteArray("\xFE"); @@ -269,9 +269,9 @@ void tst_Utf8::invalidUtf8_data() // overlong 4: xxxx:z000 xz00:0000 xz00:0010 xz00:0000 QTest::newRow("overlong-2-4") << QByteArray("\xF0\x80\x82\x80"); // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0010 xz00:0000 - QTest::newRow("overlong-2-4") << QByteArray("\xF8\x80\x80\x82\x80"); + QTest::newRow("overlong-2-5") << QByteArray("\xF8\x80\x80\x82\x80"); // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0010 xz00:0000 - QTest::newRow("overlong-2-4") << QByteArray("\xFC\x80\x80\x80\x82\x80"); + QTest::newRow("overlong-2-6") << QByteArray("\xFC\x80\x80\x80\x82\x80"); // U+0800: 10 0000 00 0000 // proper encoding: xxxz:0000 xz10:0000 xz00:0000 -- cgit v1.2.3 From ab9be7cc23e52c2b5a43c66ec53bcb961188f924 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 14 Feb 2012 11:52:40 +1000 Subject: Eliminate duplicate data row names from corelib autotests. Change-Id: I57a37f19746b76c6c9c3534f5c66c5a5478dae24 Reviewed-by: Rohan McGovern --- .../auto/corelib/global/qnumeric/tst_qnumeric.cpp | 2 +- .../corelib/io/qdatastream/tst_qdatastream.cpp | 4 +- .../io/qfilesystementry/tst_qfilesystementry.cpp | 18 +++---- .../corelib/io/qtextstream/tst_qtextstream.cpp | 2 +- tests/auto/corelib/io/qurl/tst_qurl.cpp | 4 +- .../qabstractitemmodel/tst_qabstractitemmodel.cpp | 58 +++++++++++----------- .../itemmodels/qitemmodel/tst_qitemmodel.cpp | 44 ++++++++-------- .../corelib/thread/qthreadpool/tst_qthreadpool.cpp | 22 ++++---- .../corelib/tools/qbytearray/tst_qbytearray.cpp | 36 +++++++------- .../qcryptographichash/tst_qcryptographichash.cpp | 4 +- tests/auto/corelib/tools/qdate/tst_qdate.cpp | 26 +++++----- .../auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 26 +++++----- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 4 +- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 58 +++++++++++----------- .../corelib/tools/qstringlist/tst_qstringlist.cpp | 16 +++--- .../tools/qstringmatcher/tst_qstringmatcher.cpp | 20 ++++---- .../corelib/tools/qstringref/tst_qstringref.cpp | 24 ++++----- .../tst_qtextboundaryfinder.cpp | 16 +++--- .../auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp | 2 +- 19 files changed, 193 insertions(+), 193 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp index 064724e888..899efc11d9 100644 --- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp @@ -72,7 +72,7 @@ void tst_QNumeric::fuzzyCompare_data() QTest::newRow("mis2") << 0.0 << 10000000.0 << false; QTest::newRow("mis3") << 0.0 << 0.000000001 << false; QTest::newRow("mis4") << 100000000.0 << 0.000000001 << false; - QTest::newRow("mis4") << 0.0000000001 << 0.000000001 << false; + QTest::newRow("mis5") << 0.0000000001 << 0.000000001 << false; } void tst_QNumeric::fuzzyCompare() diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp index eb227625a7..79c96fbdc9 100644 --- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp @@ -2680,8 +2680,8 @@ void tst_QDataStream::status_QBitArray_data() // past end QTest::newRow("empty") << QByteArray() << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 0a") << QByteArray("\x00", 1) << (int) QDataStream::ReadPastEnd << QBitArray(); - QTest::newRow("badsize 0a") << QByteArray("\x00\x00", 2) << (int) QDataStream::ReadPastEnd << QBitArray(); - QTest::newRow("badsize 0a") << QByteArray("\x00\x00\x00", 3) << (int) QDataStream::ReadPastEnd << QBitArray(); + QTest::newRow("badsize 0b") << QByteArray("\x00\x00", 2) << (int) QDataStream::ReadPastEnd << QBitArray(); + QTest::newRow("badsize 0c") << QByteArray("\x00\x00\x00", 3) << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 1") << QByteArray("\x00\x00\x00\x01", 4) << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x02", 4) << (int) QDataStream::ReadPastEnd << QBitArray(); QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x03", 4) << (int) QDataStream::ReadPastEnd << QBitArray(); diff --git a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp index fe2e30a95c..b083d3b1c3 100644 --- a/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp +++ b/tests/auto/corelib/io/qfilesystementry/tst_qfilesystementry.cpp @@ -241,15 +241,15 @@ void tst_QFileSystemEntry::suffix_data() QTest::newRow("data1") << "file.tar.gz" << "gz"; QTest::newRow("data2") << "/path/file/file.tar.gz" << "gz"; QTest::newRow("data3") << "/path/file.tar" << "tar"; - QTest::newRow("hidden1") << ".ext1" << "ext1"; - QTest::newRow("hidden1") << ".ext" << "ext"; - QTest::newRow("hidden1") << ".ex" << "ex"; - QTest::newRow("hidden1") << ".e" << "e"; - QTest::newRow("hidden2") << ".ext1.ext2" << "ext2"; - QTest::newRow("hidden2") << ".ext.ext2" << "ext2"; - QTest::newRow("hidden2") << ".ex.ext2" << "ext2"; - QTest::newRow("hidden2") << ".e.ext2" << "ext2"; - QTest::newRow("hidden2") << "..ext2" << "ext2"; + QTest::newRow("hidden1-1") << ".ext1" << "ext1"; + QTest::newRow("hidden1-2") << ".ext" << "ext"; + QTest::newRow("hidden1-3") << ".ex" << "ex"; + QTest::newRow("hidden1-4") << ".e" << "e"; + QTest::newRow("hidden2-1") << ".ext1.ext2" << "ext2"; + QTest::newRow("hidden2-2") << ".ext.ext2" << "ext2"; + QTest::newRow("hidden2-3") << ".ex.ext2" << "ext2"; + QTest::newRow("hidden2-4") << ".e.ext2" << "ext2"; + QTest::newRow("hidden2-5") << "..ext2" << "ext2"; QTest::newRow("dots") << "/path/file.with.dots/file..ext2" << "ext2"; QTest::newRow("dots2") << "/path/file.with.dots/.file..ext2" << "ext2"; } diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp index 01aecc2a21..37a1556cf9 100644 --- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp @@ -2755,7 +2755,7 @@ void tst_QTextStream::double_write_with_flags_data() QTest::newRow("inf uppercase") << qInf() << QString("INF") << (int)QTextStream::UppercaseDigits << 0; QTest::newRow("-inf uppercase") << -qInf() << QString("-INF") << (int)QTextStream::UppercaseDigits << 0; QTest::newRow("nan") << qQNaN() << QString("nan") << 0 << 0; - QTest::newRow("nan") << qQNaN() << QString("NAN") << (int)QTextStream::UppercaseDigits << 0; + QTest::newRow("NAN") << qQNaN() << QString("NAN") << (int)QTextStream::UppercaseDigits << 0; QTest::newRow("scientific") << 1.234567e+02 << QString("1.234567e+02") << 0 << (int)QTextStream::ScientificNotation; QTest::newRow("scientific2") << 1.234567e+02 << QString("1.234567e+02") << (int)QTextStream::UppercaseBase << (int)QTextStream::ScientificNotation; QTest::newRow("scientific uppercase") << 1.234567e+02 << QString("1.234567E+02") << (int)QTextStream::UppercaseDigits << (int)QTextStream::ScientificNotation; diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index e2831036df..a74d817b8a 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3120,8 +3120,8 @@ void tst_QUrl::fromUserInput_data() QTest::newRow("port-0") << "example.org:80" << portUrl; QTest::newRow("port-1") << "http://example.org:80" << portUrl; portUrl.setPath("path"); - QTest::newRow("port-1") << "example.org:80/path" << portUrl; - QTest::newRow("port-1") << "http://example.org:80/path" << portUrl; + QTest::newRow("port-2") << "example.org:80/path" << portUrl; + QTest::newRow("port-3") << "http://example.org:80/path" << portUrl; // mailto doesn't have a ://, but is valid QUrl mailto("ben@example.net"); diff --git a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp index 2ca5df477b..8d451dbff9 100644 --- a/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -1257,13 +1257,13 @@ void tst_QAbstractItemModel::testMoveToGrandParent_data() QTest::newRow("move09") << 8 << 8 << 8; // Moving to the row of my parent and its neighbours doesn't confuse things - QTest::newRow("move09") << 8 << 8 << 4; - QTest::newRow("move10") << 8 << 8 << 5; - QTest::newRow("move11") << 8 << 8 << 6; + QTest::newRow("move10") << 8 << 8 << 4; + QTest::newRow("move11") << 8 << 8 << 5; + QTest::newRow("move12") << 8 << 8 << 6; // Moving everything from one parent to another - QTest::newRow("move12") << 0 << 9 << 10; - QTest::newRow("move13") << 0 << 9 << 0; + QTest::newRow("move13") << 0 << 9 << 10; + QTest::newRow("move14") << 0 << 9 << 0; } void tst_QAbstractItemModel::testMoveToGrandParent() @@ -1397,14 +1397,14 @@ void tst_QAbstractItemModel::testMoveToSibling_data() QTest::newRow("move09") << 8 << 8 << 8; // Moving to the row of my target and its neighbours doesn't confuse things - QTest::newRow("move09") << 8 << 8 << 4; - QTest::newRow("move10") << 8 << 8 << 5; - QTest::newRow("move11") << 8 << 8 << 6; + QTest::newRow("move10") << 8 << 8 << 4; + QTest::newRow("move11") << 8 << 8 << 5; + QTest::newRow("move12") << 8 << 8 << 6; // Move such that the destination parent no longer valid after the move. // The destination parent is always QMI(5, 0), but after this move the // row count is 5, so (5, 0) (used internally in QAIM) no longer refers to a valid index. - QTest::newRow("move12") << 0 << 4 << 0; + QTest::newRow("move13") << 0 << 4 << 0; } void tst_QAbstractItemModel::testMoveToSibling() @@ -1541,12 +1541,12 @@ void tst_QAbstractItemModel::testMoveToUncle_data() QTest::newRow("move09") << 8 << 8 << 8; // Moving to the row of my parent and its neighbours doesn't confuse things - QTest::newRow("move09") << 8 << 8 << 4; - QTest::newRow("move10") << 8 << 8 << 5; - QTest::newRow("move11") << 8 << 8 << 6; + QTest::newRow("move10") << 8 << 8 << 4; + QTest::newRow("move11") << 8 << 8 << 5; + QTest::newRow("move12") << 8 << 8 << 6; // Moving everything from one parent to another - QTest::newRow("move12") << 0 << 9 << 10; + QTest::newRow("move13") << 0 << 9 << 10; } void tst_QAbstractItemModel::testMoveToUncle() @@ -1734,22 +1734,22 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange_data() QTest::newRow("move07") << 0 << 5 << 4; QTest::newRow("move08") << 0 << 5 << 5; QTest::newRow("move09") << 0 << 5 << 6; - QTest::newRow("move08") << 3 << 5 << 5; - QTest::newRow("move08") << 3 << 5 << 6; - QTest::newRow("move09") << 4 << 5 << 5; - QTest::newRow("move10") << 4 << 5 << 6; - QTest::newRow("move11") << 5 << 5 << 5; - QTest::newRow("move12") << 5 << 5 << 6; - QTest::newRow("move13") << 5 << 9 << 9; - QTest::newRow("move14") << 5 << 9 << 10; - QTest::newRow("move15") << 6 << 9 << 9; - QTest::newRow("move16") << 6 << 9 << 10; - QTest::newRow("move17") << 7 << 9 << 9; - QTest::newRow("move18") << 7 << 9 << 10; - QTest::newRow("move19") << 8 << 9 << 9; - QTest::newRow("move20") << 8 << 9 << 10; - QTest::newRow("move21") << 9 << 9 << 9; - QTest::newRow("move22") << 0 << 9 << 10; + QTest::newRow("move10") << 3 << 5 << 5; + QTest::newRow("move11") << 3 << 5 << 6; + QTest::newRow("move12") << 4 << 5 << 5; + QTest::newRow("move13") << 4 << 5 << 6; + QTest::newRow("move14") << 5 << 5 << 5; + QTest::newRow("move15") << 5 << 5 << 6; + QTest::newRow("move16") << 5 << 9 << 9; + QTest::newRow("move17") << 5 << 9 << 10; + QTest::newRow("move18") << 6 << 9 << 9; + QTest::newRow("move19") << 6 << 9 << 10; + QTest::newRow("move20") << 7 << 9 << 9; + QTest::newRow("move21") << 7 << 9 << 10; + QTest::newRow("move22") << 8 << 9 << 9; + QTest::newRow("move23") << 8 << 9 << 10; + QTest::newRow("move24") << 9 << 9 << 9; + QTest::newRow("move25") << 0 << 9 << 10; } void tst_QAbstractItemModel::testMoveWithinOwnRange() diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp index cbe7da11ad..d27d685f37 100644 --- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp @@ -779,19 +779,19 @@ void tst_QItemModel::remove_data() makeTestRow(":none at the middle", MIDDLE, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); makeTestRow(":none at the end", END, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - - makeTestRow(":valid start, invalid count", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", START, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", MIDDLE, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", END, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 1", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 2", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 3", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 4", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 5", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 6", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + + makeTestRow(":valid start, invalid count 1", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 2", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 3", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 4", START, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 5", MIDDLE, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 6", END, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); // Recursive remove's might assert, haven't decided yet... //makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL); @@ -1126,16 +1126,16 @@ void tst_QItemModel::insert_data() makeTestRow(":none at the middle", MIDDLE, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); makeTestRow(":none at the end", END, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":invalid start, valid count", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 1", -99, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 2", 9999, 0, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 3", -99, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 4", 9999, 1, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 5", -99, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":invalid start, valid count 6", 9999, MANY, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); - makeTestRow(":valid start, invalid count", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 1", START, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 2", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); + makeTestRow(":valid start, invalid count 3", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL); // Recursive insert's might assert, haven't decided yet... //makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL); diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp index 1dd0410f41..aa4d163fc4 100644 --- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp +++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp @@ -367,17 +367,17 @@ void tst_QThreadPool::setMaxThreadCount_data() { QTest::addColumn("limit"); - QTest::newRow("") << 1; - QTest::newRow("") << -1; - QTest::newRow("") << 2; - QTest::newRow("") << -2; - QTest::newRow("") << 4; - QTest::newRow("") << -4; - QTest::newRow("") << 0; - QTest::newRow("") << 12345; - QTest::newRow("") << -6789; - QTest::newRow("") << 42; - QTest::newRow("") << -666; + QTest::newRow("1") << 1; + QTest::newRow("-1") << -1; + QTest::newRow("2") << 2; + QTest::newRow("-2") << -2; + QTest::newRow("4") << 4; + QTest::newRow("-4") << -4; + QTest::newRow("0") << 0; + QTest::newRow("12345") << 12345; + QTest::newRow("-6789") << -6789; + QTest::newRow("42") << 42; + QTest::newRow("-666") << -666; } void tst_QThreadPool::setMaxThreadCount() diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index 40e4cc398f..5e53683abd 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -865,7 +865,7 @@ void tst_QByteArray::indexOf_data() QTest::newRow("BoyerMooreStressTest4") << QByteArray(veryBigHaystack) << QByteArray(veryBigHaystack + 'c') << 0 << -1; QTest::newRow("BoyerMooreStressTest5") << QByteArray(veryBigHaystack) << QByteArray('c' + veryBigHaystack) << 0 << -1; QTest::newRow("BoyerMooreStressTest6") << QByteArray('d' + veryBigHaystack) << QByteArray('c' + veryBigHaystack) << 0 << -1; - QTest::newRow("BoyerMooreStressTest6") << QByteArray(veryBigHaystack + 'c') << QByteArray('c' + veryBigHaystack) << 0 << -1; + QTest::newRow("BoyerMooreStressTest7") << QByteArray(veryBigHaystack + 'c') << QByteArray('c' + veryBigHaystack) << 0 << -1; } void tst_QByteArray::indexOf() @@ -988,13 +988,13 @@ void tst_QByteArray::toInt_data() QTest::addColumn("expectedok"); QTest::newRow("base 10") << QByteArray("100") << 10 << int(100) << true; - QTest::newRow("base 16") << QByteArray("100") << 16 << int(256) << true; - QTest::newRow("base 16") << QByteArray("0400") << 16 << int(1024) << true; + QTest::newRow("base 16-1") << QByteArray("100") << 16 << int(256) << true; + QTest::newRow("base 16-2") << QByteArray("0400") << 16 << int(1024) << true; QTest::newRow("base 2") << QByteArray("1111") << 2 << int(15) << true; QTest::newRow("base 8") << QByteArray("100") << 8 << int(64) << true; - QTest::newRow("base 0") << QByteArray("0x10") << 0 << int(16) << true; - QTest::newRow("base 0") << QByteArray("10") << 0 << int(10) << true; - QTest::newRow("base 0") << QByteArray("010") << 0 << int(8) << true; + QTest::newRow("base 0-1") << QByteArray("0x10") << 0 << int(16) << true; + QTest::newRow("base 0-2") << QByteArray("10") << 0 << int(10) << true; + QTest::newRow("base 0-3") << QByteArray("010") << 0 << int(8) << true; QTest::newRow("empty") << QByteArray() << 0 << int(0) << false; // using fromRawData @@ -1002,7 +1002,7 @@ void tst_QByteArray::toInt_data() QTest::newRow("raw2") << QByteArray::fromRawData("1foo", 1) << 10 << 1 << true; QTest::newRow("raw3") << QByteArray::fromRawData("12", 1) << 10 << 1 << true; QTest::newRow("raw4") << QByteArray::fromRawData("123456789", 1) << 10 << 1 << true; - QTest::newRow("raw4") << QByteArray::fromRawData("123456789", 2) << 10 << 12 << true; + QTest::newRow("raw5") << QByteArray::fromRawData("123456789", 2) << 10 << 12 << true; QTest::newRow("raw-static") << QByteArray::fromRawData(&globalChar, 1) << 10 << 1 << true; } @@ -1394,58 +1394,58 @@ void tst_QByteArray::repeated_data() const QTest::addColumn("count" ); /* Empty strings. */ - QTest::newRow("") + QTest::newRow("data1") << QByteArray() << QByteArray() << 0; - QTest::newRow("") + QTest::newRow("data2") << QByteArray() << QByteArray() << -1004; - QTest::newRow("") + QTest::newRow("data3") << QByteArray() << QByteArray() << 1; - QTest::newRow("") + QTest::newRow("data4") << QByteArray() << QByteArray() << 5; /* On simple string. */ - QTest::newRow("") + QTest::newRow("data5") << QByteArray("abc") << QByteArray() << -1004; - QTest::newRow("") + QTest::newRow("data6") << QByteArray("abc") << QByteArray() << -1; - QTest::newRow("") + QTest::newRow("data7") << QByteArray("abc") << QByteArray() << 0; - QTest::newRow("") + QTest::newRow("data8") << QByteArray("abc") << QByteArray("abc") << 1; - QTest::newRow("") + QTest::newRow("data9") << QByteArray(("abc")) << QByteArray(("abcabc")) << 2; - QTest::newRow("") + QTest::newRow("data10") << QByteArray(("abc")) << QByteArray(("abcabcabc")) << 3; - QTest::newRow("") + QTest::newRow("data11") << QByteArray(("abc")) << QByteArray(("abcabcabcabc")) << 4; diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp index 3a257c2f11..0f35089ff7 100644 --- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp +++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp @@ -158,8 +158,8 @@ void tst_QCryptographicHash::files_data() { QTest::addColumn("filename"); QTest::addColumn("algorithm"); QTest::addColumn("md5sum"); - QTest::newRow("Line") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5"); - QTest::newRow("Line") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e"); + QTest::newRow("data1") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5"); + QTest::newRow("data2") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e"); } diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp index 4921a7e734..258dbf8625 100644 --- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp +++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp @@ -147,14 +147,14 @@ void tst_QDate::isValid_data() QTest::newRow("month 13") << 2000 << 13 << 1 << nullJd << false; // test leap years - QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false; - QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true; - QTest::newRow("century leap") << 1900 << 2 << 29 << nullJd << false; - QTest::newRow("century leap") << 2100 << 2 << 29 << nullJd << false; - QTest::newRow("400-years leap") << 2000 << 2 << 29 << qint64(2451604) << true; - QTest::newRow("400-years leap 2") << 2400 << 2 << 29 << qint64(2597701) << true; - QTest::newRow("400-years leap 3") << 1600 << 2 << 29 << qint64(2305507) << true; - QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false; + QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false; + QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true; + QTest::newRow("century leap 1900") << 1900 << 2 << 29 << nullJd << false; + QTest::newRow("century leap 2100") << 2100 << 2 << 29 << nullJd << false; + QTest::newRow("400-years leap 2000") << 2000 << 2 << 29 << qint64(2451604) << true; + QTest::newRow("400-years leap 2400") << 2400 << 2 << 29 << qint64(2597701) << true; + QTest::newRow("400-years leap 1600") << 1600 << 2 << 29 << qint64(2305507) << true; + QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false; // test the number of days in months: QTest::newRow("jan") << 2000 << 1 << 31 << qint64(2451575) << true; @@ -262,7 +262,7 @@ void tst_QDate::dayOfWeek_data() QTest::newRow("data8") << -4800 << 1 << 1 << 1; QTest::newRow("data9") << -4800 << 1 << 2 << 2; QTest::newRow("data10") << -4800 << 1 << 3 << 3; - QTest::newRow("data12") << -4800 << 1 << 4 << 4; + QTest::newRow("data11") << -4800 << 1 << 4 << 4; QTest::newRow("data12") << -4800 << 1 << 5 << 5; QTest::newRow("data13") << -4800 << 1 << 6 << 6; QTest::newRow("data14") << -4800 << 1 << 7 << 7; @@ -580,10 +580,10 @@ void tst_QDate::addMonths_data() QTest::newRow( "data14" ) << 2000 << 2 << 29 << -12 << 1999 << 2 << 28; // year sign change: - QTest::newRow( "data14" ) << 1 << 1 << 1 << -1 << -1 << 12 << 1; - QTest::newRow( "data15" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1; - QTest::newRow( "data16" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1; - QTest::newRow( "data17" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1; + QTest::newRow( "data15" ) << 1 << 1 << 1 << -1 << -1 << 12 << 1; + QTest::newRow( "data16" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1; + QTest::newRow( "data17" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1; + QTest::newRow( "data18" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1; } void tst_QDate::addYears() diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index af8deefa4c..eb6af23ba5 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -1363,19 +1363,19 @@ void tst_QDateTime::dateFromStringFormat_data() QTest::newRow("data24") << tuesday << QString("dddd") << QDate(1900, 1, 2); QTest::newRow("data25") << wednesday << QString("dddd") << QDate(1900, 1, 3); QTest::newRow("data26") << thursday << QString("dddd") << QDate(1900, 1, 4); - QTest::newRow("data26") << friday << QString("dddd") << QDate(1900, 1, 5); - QTest::newRow("data27") << saturday << QString("dddd") << QDate(1900, 1, 6); - QTest::newRow("data28") << sunday << QString("dddd") << QDate(1900, 1, 7); - - QTest::newRow("data29") << monday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 2); - QTest::newRow("data30") << tuesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 3); - QTest::newRow("data31") << wednesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 4); - QTest::newRow("data32") << thursday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 5); - QTest::newRow("data33") << friday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 6); - QTest::newRow("data34") << saturday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 7); - QTest::newRow("data35") << sunday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 1); - - QTest::newRow("data36 ") << tuesday + " 2007 " + march << QString("dddd yyyy MMMM") << QDate(2007, 3, 6); + QTest::newRow("data27") << friday << QString("dddd") << QDate(1900, 1, 5); + QTest::newRow("data28") << saturday << QString("dddd") << QDate(1900, 1, 6); + QTest::newRow("data29") << sunday << QString("dddd") << QDate(1900, 1, 7); + + QTest::newRow("data30") << monday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 2); + QTest::newRow("data31") << tuesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 3); + QTest::newRow("data32") << wednesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 4); + QTest::newRow("data33") << thursday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 5); + QTest::newRow("data34") << friday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 6); + QTest::newRow("data35") << saturday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 7); + QTest::newRow("data36") << sunday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 1); + + QTest::newRow("data37") << tuesday + " 2007 " + march << QString("dddd yyyy MMMM") << QDate(2007, 3, 6); } diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 5544c0fd71..e23448c056 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -934,7 +934,7 @@ void tst_QLocale::formatDateTime_data() << "\"yymm\"" << "\"7414\""; QTest::newRow("27C") << "C" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13)) << "'\"yymm\"'" << "\"yymm\""; - QTest::newRow("27C") << "C" << QDateTime() + QTest::newRow("28C") << "C" << QDateTime() << "'\"yymm\"'" << ""; QTest::newRow("1no_NO") << "no_NO" << QDateTime(QDate(1974, 12, 1), QTime(5, 14, 13)) @@ -976,7 +976,7 @@ void tst_QLocale::formatDateTime_data() << "\"yymm\"" << "\"7414\""; QTest::newRow("27no_NO") << "no_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13)) << "'\"yymm\"'" << "\"yymm\""; - QTest::newRow("27no_NO") << "no_NO" << QDateTime() + QTest::newRow("28no_NO") << "no_NO" << QDateTime() << "'\"yymm\"'" << ""; } diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 3be7302223..3fb253c646 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -447,7 +447,7 @@ void tst_QString::replace_uint_uint_data() QTest::newRow( "rep08" ) << QString("ACABCAB") << 3 << 2 << QString("XX") << QString("ACAXXAB"); QTest::newRow( "rep09" ) << QString("ACABCAB") << 4 << 2 << QString("XX") << QString("ACABXXB"); QTest::newRow( "rep10" ) << QString("ACABCAB") << 5 << 2 << QString("XX") << QString("ACABCXX"); - QTest::newRow( "rep10" ) << QString("ACABCAB") << 6 << 2 << QString("XX") << QString("ACABCAXX"); + QTest::newRow( "rep11" ) << QString("ACABCAB") << 6 << 2 << QString("XX") << QString("ACABCAXX"); QTest::newRow( "rep12" ) << QString() << 0 << 10 << QString("X") << QString("X"); QTest::newRow( "rep13" ) << QString("short") << 0 << 10 << QString("X") << QString("X"); QTest::newRow( "rep14" ) << QString() << 0 << 10 << QString("XX") << QString("XX"); @@ -1042,7 +1042,7 @@ void tst_QString::indexOf_data() QTest::newRow("BoyerMooreStressTest4") << veryBigHaystack << QString(veryBigHaystack + 'c') << 0 << true << -1; QTest::newRow("BoyerMooreStressTest5") << veryBigHaystack << QString('c' + veryBigHaystack) << 0 << true << -1; QTest::newRow("BoyerMooreStressTest6") << QString('d' + veryBigHaystack) << QString('c' + veryBigHaystack) << 0 << true << -1; - QTest::newRow("BoyerMooreStressTest6") << QString(veryBigHaystack + 'c') << QString('c' + veryBigHaystack) << 0 << true << -1; + QTest::newRow("BoyerMooreStressTest7") << QString(veryBigHaystack + 'c') << QString('c' + veryBigHaystack) << 0 << true << -1; QTest::newRow("BoyerMooreInsensitiveStressTest") << veryBigHaystack << veryBigHaystack << 0 << false << 0; @@ -1211,15 +1211,15 @@ void tst_QString::lastIndexOf_data() QTest::newRow("4") << a << "G" << 14 << 14 << true; QTest::newRow("5") << a << "G" << 13 << 11 << true; QTest::newRow("6") << a << "B" << a.size() - 1 << 1 << true; - QTest::newRow("6") << a << "B" << - 1 << 1 << true; - QTest::newRow("7") << a << "B" << 1 << 1 << true; - QTest::newRow("8") << a << "B" << 0 << -1 << true; + QTest::newRow("7") << a << "B" << - 1 << 1 << true; + QTest::newRow("8") << a << "B" << 1 << 1 << true; + QTest::newRow("9") << a << "B" << 0 << -1 << true; - QTest::newRow("9") << a << "G" << -1 << a.size()-1 << true; - QTest::newRow("10") << a << "G" << a.size()-1 << a.size()-1 << true; - QTest::newRow("11") << a << "G" << a.size() << -1 << true; - QTest::newRow("12") << a << "A" << 0 << 0 << true; - QTest::newRow("13") << a << "A" << -1*a.size() << 0 << true; + QTest::newRow("10") << a << "G" << -1 << a.size()-1 << true; + QTest::newRow("11") << a << "G" << a.size()-1 << a.size()-1 << true; + QTest::newRow("12") << a << "G" << a.size() << -1 << true; + QTest::newRow("13") << a << "A" << 0 << 0 << true; + QTest::newRow("14") << a << "A" << -1*a.size() << 0 << true; QTest::newRow("15") << a << "efg" << 0 << -1 << false; QTest::newRow("16") << a << "efg" << a.size() << -1 << false; @@ -4672,8 +4672,8 @@ void tst_QString::compare_data() // different length QTest::newRow("data6") << QString("abcdef") << QString("abc") << 1 << 1; - QTest::newRow("data6") << QString("abCdef") << QString("abc") << -1 << 1; - QTest::newRow("data7") << QString("abc") << QString("abcdef") << -1 << -1; + QTest::newRow("data7") << QString("abCdef") << QString("abc") << -1 << 1; + QTest::newRow("data8") << QString("abc") << QString("abcdef") << -1 << -1; QString upper; upper += QChar(QChar::highSurrogate(0x10400)); @@ -4685,12 +4685,12 @@ void tst_QString::compare_data() // embedded nulls // These don't work as of now. It's OK that these don't work since \0 is not a valid unicode - /*QTest::newRow("data9") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0; - QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString("") << 1 << 1; - QTest::newRow("data11") << QString("") << QString(QByteArray("\0", 1)) << -1 << -1; - QTest::newRow("data12") << QString("ab\0c") << QString(QByteArray("ab\0c", 4)) << 0 << 0; - QTest::newRow("data13") << QString(QByteArray("ab\0c", 4)) << QString("abc") << -1 << -1; - QTest::newRow("data14") << QString("abc") << QString(QByteArray("ab\0c", 4)) << 1 << 1;*/ + /*QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0; + QTest::newRow("data11") << QString(QByteArray("\0", 1)) << QString("") << 1 << 1; + QTest::newRow("data12") << QString("") << QString(QByteArray("\0", 1)) << -1 << -1; + QTest::newRow("data13") << QString("ab\0c") << QString(QByteArray("ab\0c", 4)) << 0 << 0; + QTest::newRow("data14") << QString(QByteArray("ab\0c", 4)) << QString("abc") << -1 << -1; + QTest::newRow("data15") << QString("abc") << QString(QByteArray("ab\0c", 4)) << 1 << 1;*/ } static bool isLatin(const QString &s) @@ -4934,58 +4934,58 @@ void tst_QString::repeated_data() const QTest::addColumn("count" ); /* Empty strings. */ - QTest::newRow("") + QTest::newRow("data1") << QString() << QString() << 0; - QTest::newRow("") + QTest::newRow("data2") << QString() << QString() << -1004; - QTest::newRow("") + QTest::newRow("data3") << QString() << QString() << 1; - QTest::newRow("") + QTest::newRow("data4") << QString() << QString() << 5; /* On simple string. */ - QTest::newRow("") + QTest::newRow("data5") << QString(QLatin1String("abc")) << QString() << -1004; - QTest::newRow("") + QTest::newRow("data6") << QString(QLatin1String("abc")) << QString() << -1; - QTest::newRow("") + QTest::newRow("data7") << QString(QLatin1String("abc")) << QString() << 0; - QTest::newRow("") + QTest::newRow("data8") << QString(QLatin1String("abc")) << QString(QLatin1String("abc")) << 1; - QTest::newRow("") + QTest::newRow("data9") << QString(QLatin1String("abc")) << QString(QLatin1String("abcabc")) << 2; - QTest::newRow("") + QTest::newRow("data10") << QString(QLatin1String("abc")) << QString(QLatin1String("abcabcabc")) << 3; - QTest::newRow("") + QTest::newRow("data11") << QString(QLatin1String("abc")) << QString(QLatin1String("abcabcabcabc")) << 4; diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp index e3eb1a21ac..6066f7c8e0 100644 --- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp +++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp @@ -193,8 +193,8 @@ void tst_QStringList::removeDuplicates_data() QTest::addColumn("after"); QTest::addColumn("count"); - QTest::newRow("empty") << "Hello,Hello" << "Hello" << 1; - QTest::newRow("empty") << "Hello,World" << "Hello,World" << 0; + QTest::newRow("empty-1") << "Hello,Hello" << "Hello" << 1; + QTest::newRow("empty-2") << "Hello,World" << "Hello,World" << 0; } void tst_QStringList::removeDuplicates() @@ -245,35 +245,35 @@ void tst_QStringList::join_data() const QTest::addColumn("separator"); QTest::addColumn("expectedResult"); - QTest::newRow("") + QTest::newRow("data1") << QStringList() << QString() << QString(); - QTest::newRow("") + QTest::newRow("data2") << QStringList() << QString(QLatin1String("separator")) << QString(); - QTest::newRow("") + QTest::newRow("data3") << QStringList("one") << QString(QLatin1String("separator")) << QString("one"); - QTest::newRow("") + QTest::newRow("data4") << QStringList("one") << QString(QLatin1String("separator")) << QString("one"); - QTest::newRow("") + QTest::newRow("data5") << (QStringList() << QLatin1String("a") << QLatin1String("b")) << QString(QLatin1String(" ")) << QString("a b"); - QTest::newRow("") + QTest::newRow("data6") << (QStringList() << QLatin1String("a") << QLatin1String("b") diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp index ebbad86c81..5829c0e917 100644 --- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp +++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp @@ -81,16 +81,16 @@ void tst_QStringMatcher::indexIn_data() QTest::addColumn("haystack"); QTest::addColumn("from"); QTest::addColumn("indexIn"); - QTest::newRow("empty") << QString() << QString("foo") << 0 << 0; - QTest::newRow("empty") << QString() << QString("foo") << 10 << -1; - QTest::newRow("empty") << QString() << QString("foo") << -10 << 0; - - QTest::newRow("simple") << QString("a") << QString("foo") << 0 << -1; - QTest::newRow("simple") << QString("a") << QString("bar") << 0 << 1; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 0 << 26; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 20 << 26; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 26 << 26; - QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 27 << -1; + QTest::newRow("empty-1") << QString() << QString("foo") << 0 << 0; + QTest::newRow("empty-2") << QString() << QString("foo") << 10 << -1; + QTest::newRow("empty-3") << QString() << QString("foo") << -10 << 0; + + QTest::newRow("simple-1") << QString("a") << QString("foo") << 0 << -1; + QTest::newRow("simple-2") << QString("a") << QString("bar") << 0 << 1; + QTest::newRow("harder-1") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 0 << 26; + QTest::newRow("harder-2") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 20 << 26; + QTest::newRow("harder-3") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 26 << 26; + QTest::newRow("harder-4") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 27 << -1; } void tst_QStringMatcher::indexIn() diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp index 77d2101320..de01df2001 100644 --- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp +++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp @@ -288,7 +288,7 @@ void tst_QStringRef::indexOf_data() QTest::newRow("BoyerMooreStressTest4") << veryBigHaystack << veryBigHaystack + 'c' << 0 << true << -1; QTest::newRow("BoyerMooreStressTest5") << veryBigHaystack << 'c' + veryBigHaystack << 0 << true << -1; QTest::newRow("BoyerMooreStressTest6") << 'd' + veryBigHaystack << 'c' + veryBigHaystack << 0 << true << -1; - QTest::newRow("BoyerMooreStressTest6") << veryBigHaystack + 'c' << 'c' + veryBigHaystack << 0 << true << -1; + QTest::newRow("BoyerMooreStressTest7") << veryBigHaystack + 'c' << 'c' + veryBigHaystack << 0 << true << -1; QTest::newRow("BoyerMooreInsensitiveStressTest") << veryBigHaystack << veryBigHaystack << 0 << false << 0; @@ -441,15 +441,15 @@ void tst_QStringRef::lastIndexOf_data() QTest::newRow("4") << a << "G" << 14 << 14 << true; QTest::newRow("5") << a << "G" << 13 << 11 << true; QTest::newRow("6") << a << "B" << a.size() - 1 << 1 << true; - QTest::newRow("6") << a << "B" << - 1 << 1 << true; - QTest::newRow("7") << a << "B" << 1 << 1 << true; - QTest::newRow("8") << a << "B" << 0 << -1 << true; + QTest::newRow("7") << a << "B" << - 1 << 1 << true; + QTest::newRow("8") << a << "B" << 1 << 1 << true; + QTest::newRow("9") << a << "B" << 0 << -1 << true; - QTest::newRow("9") << a << "G" << -1 << a.size()-1 << true; - QTest::newRow("10") << a << "G" << a.size()-1 << a.size()-1 << true; - QTest::newRow("11") << a << "G" << a.size() << -1 << true; - QTest::newRow("12") << a << "A" << 0 << 0 << true; - QTest::newRow("13") << a << "A" << -1*a.size() << 0 << true; + QTest::newRow("10") << a << "G" << -1 << a.size()-1 << true; + QTest::newRow("11") << a << "G" << a.size()-1 << a.size()-1 << true; + QTest::newRow("12") << a << "G" << a.size() << -1 << true; + QTest::newRow("13") << a << "A" << 0 << 0 << true; + QTest::newRow("14") << a << "A" << -1*a.size() << 0 << true; QTest::newRow("15") << a << "efg" << 0 << -1 << false; QTest::newRow("16") << a << "efg" << a.size() << -1 << false; @@ -777,8 +777,8 @@ void tst_QStringRef::compare_data() // different length QTest::newRow("data6") << QString("abcdef") << QString("abc") << 1 << 1; - QTest::newRow("data6") << QString("abCdef") << QString("abc") << -1 << 1; - QTest::newRow("data7") << QString("abc") << QString("abcdef") << -1 << -1; + QTest::newRow("data7") << QString("abCdef") << QString("abc") << -1 << 1; + QTest::newRow("data8") << QString("abc") << QString("abcdef") << -1 << -1; QString upper; upper += QChar(QChar::highSurrogate(0x10400)); @@ -786,7 +786,7 @@ void tst_QStringRef::compare_data() QString lower; lower += QChar(QChar::highSurrogate(0x10428)); lower += QChar(QChar::lowSurrogate(0x10428)); - QTest::newRow("data8") << upper << lower << -1 << 0; + QTest::newRow("data9") << upper << lower << -1 << 0; } static bool isLatin(const QString &s) diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp index 89dd01ac3a..b8ae709fd0 100644 --- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp +++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp @@ -302,22 +302,22 @@ void tst_QTextBoundaryFinder::toNextBoundary_data() QList boundaries; boundaries << 0 << 3 << 4 << 7 << 8 << 11 << 12 << 13 << 16 << 17 << 20 << 21 << 24 << 25; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \ + QTest::newRow("data1") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \ << boundaries; boundaries.clear(); boundaries << 0 << 13 << 25; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \ + QTest::newRow("data2") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \ << boundaries; boundaries.clear(); boundaries << 0 << 4 << 8 << 13 << 17 << 21 << 25; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \ + QTest::newRow("data3") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \ << boundaries; boundaries.clear(); boundaries << 0 << 5 << 9 << 15 << 17 << 21 << 28; - QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) + QTest::newRow("data4") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) << boundaries; } @@ -344,22 +344,22 @@ void tst_QTextBoundaryFinder::toPreviousBoundary_data() QList boundaries; boundaries << 25 << 24 << 21 << 20 << 17 << 16 << 13 << 12 << 11 << 8 << 7 << 4 << 3 << 0; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) + QTest::newRow("data1") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) << boundaries; boundaries.clear(); boundaries << 25 << 13 << 0; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) + QTest::newRow("data2") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) << boundaries; boundaries.clear(); boundaries << 25 << 21 << 17 << 13 << 8 << 4 << 0; - QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) + QTest::newRow("data3") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) << boundaries; boundaries.clear(); boundaries << 28 << 21 << 17 << 15 << 9 << 5 << 0; - QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) + QTest::newRow("data4") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) << boundaries; } diff --git a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp index 0ce0da06aa..bd9fa2a8db 100644 --- a/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp +++ b/tests/auto/corelib/xml/qxmlstream/tst_qxmlstream.cpp @@ -674,7 +674,7 @@ void tst_QXmlStream::reportSuccess_data() const const int len = m_handler.successes.count(); for(int i = 0; i < len; ++i) - QTest::newRow(m_handler.successes.at(i).toLatin1().constData()) << false; + QTest::newRow(qPrintable(QString("%1. %2").arg(i).arg(m_handler.successes.at(i)))) << false; if(len == 0) QTest::newRow("No test cases succeeded.") << true; -- cgit v1.2.3 From 2cb41b3da66167d612d72744205d0aeb696cf241 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 14 Feb 2012 12:20:56 +1000 Subject: Eliminate duplicate data row names in gui autotests. Change-Id: I1b39a7d13399ea8d47369203e9617810a34c0097 Reviewed-by: Rohan McGovern --- .../gui/image/qicoimageformat/tst_qicoimageformat.cpp | 16 ++++++++-------- tests/auto/gui/image/qimagereader/tst_qimagereader.cpp | 1 - tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 2 +- .../auto/gui/painting/qpainterpath/tst_qpainterpath.cpp | 10 +++++----- tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp | 4 ++-- .../qtextdocumentfragment/tst_qtextdocumentfragment.cpp | 2 +- 6 files changed, 17 insertions(+), 18 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp index 25c6c81b2a..74eec26c52 100644 --- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp +++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp @@ -127,8 +127,8 @@ void tst_QIcoImageFormat::canRead_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 1; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 1; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 1; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 1; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 1; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 1; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 1; QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << 0; QTest::newRow("103x16px, 24BPP") << "valid/trolltechlogo_tiny.ico" << 1; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 1; @@ -198,8 +198,8 @@ void tst_QIcoImageFormat::imageCount_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 9; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 3; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 2; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 3; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 3; QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << 0; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; QTest::newRow("PNG compression") << "valid/Qt.ico" << 4; @@ -227,8 +227,8 @@ void tst_QIcoImageFormat::jumpToNextImage_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 9; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 3; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 2; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 3; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 3; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; QTest::newRow("PNG compression") << "valid/Qt.ico" << 4; } @@ -276,8 +276,8 @@ void tst_QIcoImageFormat::nextImageDelay_data() QTest::newRow("16px,32px,48px - 16,256,16M colors") << "valid/Obj_N2_Internal_Mem.ico" << 9; QTest::newRow("16px - 16,256,16M colors") << "valid/Status_Play.ico" << 3; QTest::newRow("16px,32px - 16 colors") << "valid/TIMER01.ICO" << 2; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLD.ico" << 3; - QTest::newRow("16px16c, 32px32c, 32px256c") << "valid/WORLDH.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 1") << "valid/WORLD.ico" << 3; + QTest::newRow("16px16c, 32px32c, 32px256c 2") << "valid/WORLDH.ico" << 3; QTest::newRow("invalid floppy (first 8 bytes = 0xff)") << "invalid/35floppy.ico" << -1; QTest::newRow("includes 32BPP w/alpha") << "valid/semitransparent.ico" << 9; QTest::newRow("PNG compression") << "valid/Qt.ico" << 4; diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp index 8a18bee83f..96171740e2 100644 --- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp @@ -623,7 +623,6 @@ void tst_QImageReader::supportsAnimation_data() QTest::newRow("XPM: marble") << QString("marble.xpm") << false; QTest::newRow("PNG: kollada") << QString("kollada.png") << false; QTest::newRow("PPM: teapot") << QString("teapot.ppm") << false; - QTest::newRow("PPM: teapot") << QString("teapot.ppm") << false; QTest::newRow("PPM: runners") << QString("runners.ppm") << false; QTest::newRow("XBM: gnus") << QString("gnus.xbm") << false; diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 527dcce916..c1643ea355 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -1342,7 +1342,7 @@ void tst_QPixmap::fromImageReader_data() QTest::newRow("designer_indexed8_with_alpha.gif") << prefix + "/designer_indexed8_with_alpha.gif"; QTest::newRow("designer_rgb32.jpg") << prefix + "/designer_rgb32.jpg"; QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_with_alpha_animated.gif"; - QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_no_alpha_animated.gif"; + QTest::newRow("designer_indexed8_no_alpha_animated") << prefix + "/designer_indexed8_no_alpha_animated.gif"; } void tst_QPixmap::fromImageReader() diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index bcd009dfb4..44006d4571 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -282,13 +282,13 @@ void tst_QPainterPath::contains_QPointF_data() inside.addEllipse(base_rect.adjusted(5, 5, -5, -5)); QPolygonF inside_poly = inside.toFillPolygon(); for (int i=0; i

"); } @@ -1183,7 +1183,7 @@ void tst_QTextDocument::toHtml_data() fmt.setVerticalAlignment(QTextCharFormat::AlignTop); cursor.insertImage(fmt); - QTest::newRow("image-malign") << QTextDocumentFragment(&doc) + QTest::newRow("image-align-top") << QTextDocumentFragment(&doc) << QString("

"); } diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp index 33293400c2..50ae22c530 100644 --- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp +++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp @@ -3078,7 +3078,7 @@ void tst_QTextDocumentFragment::html_preNewlineHandling_data() << QString("Foo\nBar"); QTest::newRow("pre2") << QString("Foo
\nBar")
                           << QString("Foo\nBar");
-    QTest::newRow("pre2") << QString("Foo
\n\nBar")
+    QTest::newRow("pre3") << QString("Foo
\n\nBar")
                           << QString("Foo\n\nBar");
     QTest::newRow("pre4") << QString("Foo
\nBar")
                           << QString("Foo\nBar");
-- 
cgit v1.2.3


From bfec6b9a7d7ae7bc6772633de1808771d9e6e70b Mon Sep 17 00:00:00 2001
From: Mark Brand 
Date: Mon, 13 Feb 2012 14:16:01 +0100
Subject: update comment on test

Fix up for f5e1da12f0e7bdeee4db74acc52dfabeb12a4e31.

Change-Id: I3a730ce7e47d71551a46cc105ba2d1fe4e33b65b
Reviewed-by: Robin Burchell 
Reviewed-by: Yunqiao Yin 
---
 tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'tests/auto')

diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index a819cb720c..c0bdfae8b7 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -699,7 +699,7 @@ void tst_QSqlTableModel::removeRows()
     QVERIFY(!model.removeRows(-1,1)); // negative start
     QVERIFY(!model.removeRows(-1, 0)); // negative start, and zero count
     QVERIFY(!model.removeRows(1, 0)); // zero count
-    QVERIFY(!model.removeRows(5, 1)); // past end (causes a beforeDelete to be emitted)
+    QVERIFY(!model.removeRows(5, 1)); // past end (DOESN'T causes a beforeDelete to be emitted)
     QVERIFY(!model.removeRows(1, 0, model.index(2, 0))); // can't pass a valid modelindex
 
     QVERIFY_SQL(model, removeRows(0, 2));
-- 
cgit v1.2.3


From 78a6447e311e55320ab3acd5f1035f3c295bf5f8 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen 
Date: Mon, 13 Feb 2012 16:45:13 +0200
Subject: Windows: Fixed helper process finding in network tests

Helper processes were not found properly on all network tests
when the test was run with "nmake check":

- tst_qtcpsocket
- tst_qtcpserver
- tst_qnetworksession
- tst_qnetworkreply

Task-number: QTBUG-24199
Task-number: QTBUG-24203
Task-number: QTBUG-24226
Task-number: QTBUG-24231
Task-number: QTBUG-24232

Change-Id: Ia4451b5a5e3fe9f81aba3837baf8292411f995d8
Reviewed-by: Friedemann Kleint 
Reviewed-by: Shane Kearns 
---
 .../network/access/qnetworkreply/tst_qnetworkreply.cpp  | 10 +++++++++-
 .../bearer/qnetworksession/test/tst_qnetworksession.cpp | 13 +++++++++----
 tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp | 15 +++++++++++++--
 tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp | 17 +++++++++++++----
 4 files changed, 44 insertions(+), 11 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 0e9136dbc7..866afbf0a5 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -135,6 +135,7 @@ class tst_QNetworkReply: public QObject
     enum RunSimpleRequestReturn { Timeout = 0, Success, Failure };
     int returnCode;
     QString testFileName;
+    QString echoProcessDir;
 #if !defined Q_OS_WIN
     QString wronlyFileName;
 #endif
@@ -1308,6 +1309,10 @@ void tst_QNetworkReply::initTestCase()
         QVERIFY(networkSession->waitForOpened(30000));
     }
 #endif
+
+    echoProcessDir = QFINDTESTDATA("echo");
+    QVERIFY2(!echoProcessDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find echo dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QNetworkReply::cleanupTestCase()
@@ -3849,7 +3854,10 @@ void tst_QNetworkReply::ioPutToFileFromProcess()
 
     QFETCH(QByteArray, data);
     QProcess process;
-    process.start("echo/echo all");
+    QString echoExe = echoProcessDir + "/echo";
+    process.start(echoExe, QStringList("all"));
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(echoExe, process.errorString())));
     process.write(data);
     process.closeWriteChannel();
 
diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
index a51b4e5632..27e1e7f013 100644
--- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp
@@ -96,6 +96,7 @@ private slots:
 private:
     QNetworkConfigurationManager manager;
     int inProcessSessionManagementCount;
+    QString lackeyDir;
 #endif
 };
 
@@ -117,6 +118,10 @@ void tst_QNetworkSession::initTestCase()
     QSignalSpy spy(&manager, SIGNAL(updateCompleted()));
     manager.updateConfigurations();
     QTRY_VERIFY_WITH_TIMEOUT(spy.count() == 1, TestTimeOut);
+
+    lackeyDir = QFINDTESTDATA("lackey");
+    QVERIFY2(!lackeyDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find lackey dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QNetworkSession::cleanupTestCase()
@@ -916,10 +921,10 @@ void tst_QNetworkSession::outOfProcessSession()
     oopServer.listen("tst_qnetworksession");
 
     QProcess lackey;
-    lackey.start("lackey/lackey");
-    qDebug() << lackey.error() << lackey.errorString();
-    QVERIFY(lackey.waitForStarted());
-
+    QString lackeyExe = lackeyDir + "/lackey";
+    lackey.start(lackeyExe);
+    QVERIFY2(lackey.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(lackeyExe, lackey.errorString())));
 
     QVERIFY(oopServer.waitForNewConnection(-1));
     QLocalSocket *oopSocket = oopServer.nextPendingConnection();
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index 941e0b2142..ac27a621bb 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -119,6 +119,7 @@ private:
 #ifndef QT_NO_BEARERMANAGEMENT
     QNetworkSession *networkSession;
 #endif
+    QString crashingServerDir;
 };
 
 // Testing get/set functions
@@ -150,6 +151,10 @@ void tst_QTcpServer::initTestCase_data()
 
     QTest::newRow("WithoutProxy") << false << 0;
     QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
+
+    crashingServerDir = QFINDTESTDATA("crashingServer");
+    QVERIFY2(!crashingServerDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find crashingServer dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QTcpServer::initTestCase()
@@ -538,7 +543,10 @@ void tst_QTcpServer::addressReusable()
     QFile::remove(signalName);
     // The crashingServer process will crash once it gets a connection.
     QProcess process;
-    process.start("crashingServer/crashingServer");
+    QString processExe = crashingServerDir + "/crashingServer";
+    process.start(processExe);
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, process.errorString())));
     int waitCount = 5;
     while (waitCount-- && !QFile::exists(signalName))
         QTest::qWait(1000);
@@ -547,7 +555,10 @@ void tst_QTcpServer::addressReusable()
 #else
     // The crashingServer process will crash once it gets a connection.
     QProcess process;
-    process.start("crashingServer/crashingServer");
+    QString processExe = crashingServerDir + "/crashingServer";
+    process.start(processExe);
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, process.errorString())));
     QVERIFY(process.waitForReadyRead(5000));
 #endif
 
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 829ddd2054..abeb1ed06d 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -246,6 +246,7 @@ private:
     SocketPair *earlyConstructedSockets;
     int earlyBytesWrittenCount;
     int earlyReadyReadCount;
+    QString stressTestDir;
 };
 
 enum ProxyTests {
@@ -340,6 +341,10 @@ void tst_QTcpSocket::initTestCase_data()
     QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
 //    QTest::newRow("WithHttpProxyNtlmAuth SSL") << true << int(HttpProxy | AuthNtlm) << true;
 #endif
+
+    stressTestDir = QFINDTESTDATA("stressTest");
+    QVERIFY2(!stressTestDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find stressTest dir starting from %1.").arg(QDir::currentPath())));
 }
 
 void tst_QTcpSocket::initTestCase()
@@ -2225,11 +2230,14 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
     if (ssl)
         return;
 
+    QString processExe = stressTestDir + "/stressTest";
+
     // Start server
     QProcess serverProcess;
     serverProcess.setReadChannel(QProcess::StandardError);
-    serverProcess.start(QString::fromLatin1("stressTest/stressTest %1").arg(server),
-                        QIODevice::ReadWrite | QIODevice::Text);
+    serverProcess.start(processExe, QStringList(server), QIODevice::ReadWrite | QIODevice::Text);
+    QVERIFY2(serverProcess.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, serverProcess.errorString())));
     while (!serverProcess.canReadLine())
         QVERIFY(serverProcess.waitForReadyRead(10000));
     QCOMPARE(serverProcess.readLine().data(), (server.toLatin1() + "\n").data());
@@ -2237,8 +2245,9 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
     // Start client
     QProcess clientProcess;
     clientProcess.setReadChannel(QProcess::StandardError);
-    clientProcess.start(QString::fromLatin1("stressTest/stressTest %1").arg(client),
-                        QIODevice::ReadWrite | QIODevice::Text);
+    clientProcess.start(processExe, QStringList(client), QIODevice::ReadWrite | QIODevice::Text);
+    QVERIFY2(clientProcess.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(processExe, clientProcess.errorString())));
     while (!clientProcess.canReadLine())
         QVERIFY(clientProcess.waitForReadyRead(10000));
     QCOMPARE(clientProcess.readLine().data(), (client.toLatin1() + "\n").data());
-- 
cgit v1.2.3


From a28c433b290dae1b3509ddf1eee616ba91ce221b Mon Sep 17 00:00:00 2001
From: Shane Kearns 
Date: Tue, 14 Feb 2012 20:12:42 +0000
Subject: Abort FTP download, not the whole application

An old coding error meant that the C runtime abort() function was
being called instead of QFtp::abort() when cancelling an FTP download
using QNetworkReply::close()

Task-number: QTBUG-22820
Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1
Reviewed-by: Thiago Macieira 
---
 .../access/qnetworkreply/tst_qnetworkreply.cpp     | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(limited to 'tests/auto')

diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 866afbf0a5..61f44c5c09 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -392,6 +392,9 @@ private Q_SLOTS:
     void synchronousAuthenticationCache();
     void pipelining();
 
+    void closeDuringDownload_data();
+    void closeDuringDownload();
+
     // NOTE: This test must be last!
     void parentingRepliesToTheApp();
 };
@@ -6736,6 +6739,27 @@ void tst_QNetworkReply::pipeliningHelperSlot() {
     }
 }
 
+void tst_QNetworkReply::closeDuringDownload_data()
+{
+    QTest::addColumn("url");
+    QTest::newRow("http") << QUrl("http://" + QtNetworkSettings::serverName() + "/bigfile");
+    QTest::newRow("ftp") << QUrl("ftp://" + QtNetworkSettings::serverName() + "/qtest/bigfile");
+}
+
+void tst_QNetworkReply::closeDuringDownload()
+{
+    QFETCH(QUrl, url);
+    QNetworkRequest request(url);
+    QNetworkReply* reply = manager.get(request);
+    connect(reply, SIGNAL(readyRead()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+    QTestEventLoop::instance().enterLoop(10);
+    QVERIFY(!QTestEventLoop::instance().timeout());
+    connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+    reply->close();
+    reply->deleteLater();
+    QTest::qWait(1000); //cancelling ftp takes some time, this avoids a warning caused by test's cleanup() destroying the connection cache before the abort is finished
+}
+
 // NOTE: This test must be last testcase in tst_qnetworkreply!
 void tst_QNetworkReply::parentingRepliesToTheApp()
 {
-- 
cgit v1.2.3


From fc8f92106d6743d4165de7d8a440b7e5dbd14391 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen 
Date: Tue, 14 Feb 2012 15:47:27 +0200
Subject: Remove fileLineEndingTest from networkselftest.

The fileLineEndingTest case doesn't test network in any way and it is
conceptually wrong, too, as any tests where line endings are an issue
should be handled with .gitattributes rather than forcing user to
check out the repo with unix line endings.

Task-number: QTBUG-24271
Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989
Reviewed-by: Shane Kearns 
---
 .../other/networkselftest/tst_networkselftest.cpp  | 26 ----------------------
 1 file changed, 26 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index c1a3cd17d2..99d4ac9522 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -70,7 +70,6 @@ private slots:
     void serverReachability();
     void remotePortsOpen_data();
     void remotePortsOpen();
-    void fileLineEndingTest();
 
     // specific protocol tests
     void ftpServer();
@@ -458,31 +457,6 @@ void tst_NetworkSelfTest::remotePortsOpen()
     QVERIFY(socket.state() == QAbstractSocket::ConnectedState);
 }
 
-
-void tst_NetworkSelfTest::fileLineEndingTest()
-{
-    QString referenceName = SRCDIR "/rfc3252.txt";
-    long long expectedReferenceSize = 25962;
-
-    QString lineEndingType("LF");
-
-    QFile reference(referenceName);
-    QVERIFY(reference.open(QIODevice::ReadOnly));
-    QByteArray byteLine = reference.readLine();
-    if(byteLine.endsWith("\r\n"))
-        lineEndingType = "CRLF";
-    else if(byteLine.endsWith("\r"))
-        lineEndingType = "CR";
-
-    QString referenceAsTextData;
-    QFile referenceAsText(referenceName);
-    QVERIFY(referenceAsText.open(QIODevice::ReadOnly));
-    referenceAsTextData = referenceAsText.readAll();
-
-    QVERIFY2(expectedReferenceSize == referenceAsTextData.length(), QString("Reference file %1 has %2 as line ending and file size not matching - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
-    QVERIFY2(!lineEndingType.compare("LF"), QString("Reference file %1 has %2 as line ending - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
-}
-
 static QList ftpChat(const QByteArray &userSuffix = QByteArray())
 {
     QList rv;
-- 
cgit v1.2.3


From 980947122307797e1d8da03f768d8f14a360d20b Mon Sep 17 00:00:00 2001
From: Andrew Stanley-Jones 
Date: Thu, 9 Feb 2012 15:51:22 +0100
Subject: Allow the QLocalServer to listen to a native descriptor

QLocalServer could only listen to sockets it created.
Thi is not always possible as sockets may be passed
by socketpair() or have to be created locally by
other means.  This adds a similar feature to QLocalSocket
where a native descriptor maybe used.

Change-Id: I43b0af179b3b868dd164d4e1fd312ff4546cf9ff
Reviewed-by: Michalina Ziemba 
Reviewed-by: Tapani Mikola 
Reviewed-by: Harald Fernengel 
---
 .../socket/qlocalsocket/tst_qlocalsocket.cpp       | 104 ++++++++++++++++++++-
 1 file changed, 100 insertions(+), 4 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 03b95bfa2f..72fa9f74a4 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -46,6 +46,12 @@
 #include 
 #include 
 
+#ifdef Q_OS_UNIX
+#include 
+#include 
+#include 
+#endif
+
 Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError)
 Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState)
 Q_DECLARE_METATYPE(QLocalServer::SocketOption)
@@ -109,6 +115,10 @@ private slots:
 
     void verifySocketOptions();
     void verifySocketOptions_data();
+
+    void verifyListenWithDescriptor();
+    void verifyListenWithDescriptor_data();
+
 };
 
 void tst_QLocalSocket::init()
@@ -1026,19 +1036,19 @@ void tst_QLocalSocket::verifySocketOptions_data()
 
     QFile::Permissions p = QFile::ExeOwner|QFile::WriteOwner|QFile::ReadOwner |
                            QFile::ExeUser|QFile::WriteUser|QFile::ReadUser;
-    QTest::newRow("user")  << "userPerms"  << QLocalServer::UserAccess << p;
+    QTest::newRow("user")  << "userPerms"  << QLocalServer::UserAccessOption << p;
 
     p = QFile::ExeGroup|QFile::WriteGroup|QFile::ReadGroup;
-    QTest::newRow("group") << "groupPerms" << QLocalServer::GroupAccess << p;
+    QTest::newRow("group") << "groupPerms" << QLocalServer::GroupAccessOption << p;
 
     p = QFile::ExeOther|QFile::WriteOther|QFile::ReadOther;
-    QTest::newRow("other") << "otherPerms" << QLocalServer::OtherAccess << p;
+    QTest::newRow("other") << "otherPerms" << QLocalServer::OtherAccessOption << p;
 
     p = QFile::ExeOwner|QFile::WriteOwner|QFile::ReadOwner|
         QFile::ExeUser|QFile::WriteUser|QFile::ReadUser |
         QFile::ExeGroup|QFile::WriteGroup|QFile::ReadGroup|
         QFile::ExeOther|QFile::WriteOther|QFile::ReadOther;
-    QTest::newRow("all")   << "worldPerms" << QLocalServer::WorldAccess << p;
+    QTest::newRow("all")   << "worldPerms" << QLocalServer::WorldAccessOption << p;
 #endif
 }
 
@@ -1065,6 +1075,92 @@ void tst_QLocalSocket::verifySocketOptions()
 #endif
 }
 
+void tst_QLocalSocket::verifyListenWithDescriptor()
+{
+#ifdef Q_OS_UNIX
+    QFETCH(QString, path);
+    QFETCH(bool, abstract);
+    QFETCH(bool, bound);
+
+    qDebug() << "socket" << path << abstract;
+
+    int listenSocket;
+
+    if (bound) {
+        // create the unix socket
+        listenSocket = ::socket(PF_UNIX, SOCK_STREAM, 0);
+        QVERIFY2(listenSocket != -1, "failed to create test socket");
+
+        // Construct the unix address
+        struct ::sockaddr_un addr;
+        addr.sun_family = PF_UNIX;
+
+        QVERIFY2(sizeof(addr.sun_path) > ((uint)path.size() + 1), "path to large to create socket");
+
+        ::memset(addr.sun_path, 0, sizeof(addr.sun_path));
+        if (abstract)
+            ::memcpy(addr.sun_path+1, path.toLatin1().data(), path.toLatin1().size());
+        else
+            ::memcpy(addr.sun_path, path.toLatin1().data(), path.toLatin1().size());
+
+        if (path.startsWith(QLatin1Char('/'))) {
+            ::unlink(path.toLatin1());
+        }
+
+        QVERIFY2(-1 != ::bind(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un)), "failed to bind test socket to address");
+
+        // listen for connections
+        QVERIFY2(-1 != ::listen(listenSocket, 50), "failed to call listen on test socket");
+    } else {
+        int fds[2];
+        QVERIFY2(-1 != ::socketpair(PF_UNIX, SOCK_STREAM, 0, fds), "failed to create socket pair");
+
+        listenSocket = fds[0];
+        close(fds[1]);
+    }
+
+    QLocalServer server;
+    QVERIFY2(server.listen(listenSocket), "failed to start create QLocalServer with local socket");
+
+#ifdef Q_OS_LINUX
+    if (!bound) {
+        QVERIFY(server.serverName().at(0) == QLatin1Char('@'));
+        QVERIFY(server.fullServerName().at(0) == QLatin1Char('@'));
+    } else if (abstract) {
+        QVERIFY2(server.fullServerName().at(0) == QLatin1Char('@'), "abstract sockets should start with a '@'");
+    } else {
+        QVERIFY2(server.fullServerName() == path, "full server path doesn't match patch provided");
+        if (path.contains(QLatin1String("/"))) {
+            QVERIFY2(server.serverName() == path.mid(path.lastIndexOf(QLatin1Char('/'))+1), "server name invalid short name");
+        } else {
+            QVERIFY2(server.serverName() == path, "servier name doesn't match the path provided");
+        }
+    }
+#else
+    QVERIFY(server.serverName().isEmpty());
+    QVERIFY(server.fullServerName().isEmpty());
+#endif
+
+
+#endif
+}
+
+void tst_QLocalSocket::verifyListenWithDescriptor_data()
+{
+#ifdef Q_OS_UNIX
+    QTest::addColumn("path");
+    QTest::addColumn("abstract");
+    QTest::addColumn("bound");
+
+    QTest::newRow("normal") << QDir::tempPath() + QLatin1Literal("/testsocket") << false << true;
+    QTest::newRow("absrtact") << QString::fromLatin1("abstractsocketname") << true << true;
+    QTest::newRow("abstractwithslash") << QString::fromLatin1("abstractsocketwitha/inthename") << true << true;
+    QTest::newRow("no path") << QString::fromLatin1("/invalid/no path name speficied") << true << false;
+
+#endif
+
+}
+
 QTEST_MAIN(tst_QLocalSocket)
 #include "tst_qlocalsocket.moc"
 
-- 
cgit v1.2.3


From 555aa4439b3a4a2c5fd12b6ac155b87fe69e749f Mon Sep 17 00:00:00 2001
From: Mark Brand 
Date: Fri, 10 Feb 2012 00:47:33 +0100
Subject: QSqlTableModel::commitAll(): replace row removal hack

The purpose of the hack was to fool QSqlQueryModel into signaling the
removal of extra rows via rowsRemoved(). The extra rows are the
inserted rows generated by QSqlTableModel.

While it is important to signal the removal of all the rows before
requerying after committing changes, there is a cleaner way. The
table model should remove its rows before the query model removes its
rows.

Iterating backwards avoids having to decrement row numbers above ones
being removed.

Expected test results have been adjusted for these changes.

Change-Id: I0e8aa81f5e7b8fea5922f5ffd1cfb4a932313a10
Reviewed-by: Yunqiao Yin 
---
 tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index c0bdfae8b7..270de8292b 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -1199,9 +1199,13 @@ void tst_QSqlTableModel::insertRecordsInLoop()
     model.submitAll(); // submitAll() calls select() which clears and repopulates the table
 
     int firstRowIndex = 0, lastRowIndex = 12;
-    QCOMPARE(spyRowsRemoved.count(), 1);
-    QCOMPARE(spyRowsRemoved.at(0).at(1).toInt(), firstRowIndex);
-    QCOMPARE(spyRowsRemoved.at(0).at(2).toInt(), lastRowIndex);
+    QCOMPARE(spyRowsRemoved.count(), 11);
+    // QSqlTableModel emits 10 signals for its 10 inserted rows
+    QCOMPARE(spyRowsRemoved.at(0).at(1).toInt(), lastRowIndex);
+    QCOMPARE(spyRowsRemoved.at(9).at(1).toInt(), firstRowIndex + 3);
+    // QSqlQueryModel emits 1 signal for its 3 rows
+    QCOMPARE(spyRowsRemoved.at(10).at(1).toInt(), firstRowIndex);
+    QCOMPARE(spyRowsRemoved.at(10).at(2).toInt(), firstRowIndex + 2);
 
     QCOMPARE(spyRowsInserted.at(10).at(1).toInt(), firstRowIndex);
     QCOMPARE(spyRowsInserted.at(10).at(2).toInt(), lastRowIndex);
-- 
cgit v1.2.3


From 1acc490248655d7a2db5835f6f9ac0c68d6df454 Mon Sep 17 00:00:00 2001
From: Jason McDonald 
Date: Tue, 14 Feb 2012 13:03:16 +1000
Subject: Eliminate duplicate data row names in widgets autotests.

Change-Id: I82bab3cc39320014fac6732c7b60233b262cb30d
Reviewed-by: Rohan McGovern 
---
 .../qfilesystemmodel/tst_qfilesystemmodel.cpp      | 46 ++++++++-------
 .../tst_qgraphicsgridlayout.cpp                    |  3 +-
 .../itemviews/qheaderview/tst_qheaderview.cpp      | 10 ++--
 .../widgets/itemviews/qlistview/tst_qlistview.cpp  |  2 +-
 .../itemviews/qtableview/tst_qtableview.cpp        |  2 +-
 .../tst_qtreewidgetitemiterator.cpp                | 14 ++---
 .../kernel/qapplication/tst_qapplication.cpp       | 12 ++--
 .../widgets/kernel/qgridlayout/tst_qgridlayout.cpp | 21 ++++---
 .../widgets/util/qcompleter/tst_qcompleter.cpp     | 54 +++++++++--------
 .../qabstractbutton/tst_qabstractbutton.cpp        | 14 ++---
 .../qabstractslider/tst_qabstractslider.cpp        |  4 +-
 .../qdoublevalidator/tst_qdoublevalidator.cpp      |  8 +--
 .../widgets/qfontcombobox/tst_qfontcombobox.cpp    |  2 +-
 .../widgets/qintvalidator/tst_qintvalidator.cpp    |  4 +-
 tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp   |  2 +-
 .../widgets/widgets/qlineedit/tst_qlineedit.cpp    | 69 +++++++++++-----------
 .../auto/widgets/widgets/qspinbox/tst_qspinbox.cpp | 32 +++++-----
 .../widgets/widgets/qsplitter/tst_qsplitter.cpp    |  2 +-
 18 files changed, 152 insertions(+), 149 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index ea4eed54d2..8724bf63c8 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -240,6 +240,9 @@ void tst_QFileSystemModel::naturalCompare_data()
     QTest::addColumn("caseSensitive");
     QTest::addColumn("result");
     QTest::addColumn("swap");
+
+#define ROWNAME(name) (qPrintable(QString("prefix=%1, postfix=%2, num=%3, i=%4, test=%5").arg(prefix).arg(postfix).arg(num).arg(i).arg(name)))
+
     for (int j = 0; j < 4; ++j) { // <- set a prefix and a postfix string (not numbers)
         QString prefix = (j == 0 || j == 1) ? "b" : "";
         QString postfix = (j == 1 || j == 2) ? "y" : "";
@@ -248,32 +251,33 @@ void tst_QFileSystemModel::naturalCompare_data()
             QString num = QString("%1").arg(k);
             QString nump = QString("%1").arg(k + 1);
             for (int i = 10; i < 12; ++i) { // <- swap s1 and s2 and reverse the result
-                QTest::newRow("basic") << prefix + "0" + postfix << prefix + "0" + postfix << int(Qt::CaseInsensitive) << 0;
+                QTest::newRow(ROWNAME("basic"))          << prefix + "0" + postfix << prefix + "0" + postfix << int(Qt::CaseInsensitive) << 0;
 
                 // s1 should always be less then s2
-                QTest::newRow("just text")    << prefix + "fred" + postfix     << prefix + "jane" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("just numbers") << prefix + num + postfix        << prefix + "9" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("zero")         << prefix + num + postfix        << prefix + "0" + nump + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("space b")      << prefix + num + postfix        << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("space a")      << prefix + num + postfix        << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("tab b")        << prefix + num + postfix        << prefix + "    " + nump + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("tab a")        << prefix + num + postfix        << prefix + nump + "   " + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("10 vs 2")      << prefix + num + postfix        << prefix + "10" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("diff len")     << prefix + num + postfix        << prefix + nump + postfix + "x" << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("01 before 1")  << prefix + "0" + num + postfix  << prefix + nump + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums 2nd") << prefix + "1-" + num + postfix << prefix + "1-" + nump + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums 2nd") << prefix + "10-" + num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums 2nd") << prefix + "10-0"+ num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums 2nd") << prefix + "10-" + num + postfix<< prefix + "10-010" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums big") << prefix + "10-" + num + postfix<< prefix + "20-0" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums big") << prefix + "2-" + num + postfix << prefix + "10-0" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul alphabet") << prefix + num + "-a" + postfix << prefix + num + "-c" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul alphabet2")<< prefix + num + "-a9" + postfix<< prefix + num + "-c0" + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("mul nums w\\0")<< prefix + num + "-"+ num + postfix<< prefix + num+"-0"+nump + postfix << int(Qt::CaseInsensitive) << i;
-                QTest::newRow("num first")    << prefix + num + postfix  << prefix + "a" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("just text"))      << prefix + "fred" + postfix     << prefix + "jane" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("just numbers"))   << prefix + num + postfix        << prefix + "9" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("zero"))           << prefix + num + postfix        << prefix + "0" + nump + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("space b"))        << prefix + num + postfix        << prefix + " " + nump + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("space a"))        << prefix + num + postfix        << prefix + nump + " " + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("tab b"))          << prefix + num + postfix        << prefix + "    " + nump + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("tab a"))          << prefix + num + postfix        << prefix + nump + "   " + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("10 vs 2"))        << prefix + num + postfix        << prefix + "10" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("diff len"))       << prefix + num + postfix        << prefix + nump + postfix + "x" << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("01 before 1"))    << prefix + "0" + num + postfix  << prefix + nump + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums 2nd 1")) << prefix + "1-" + num + postfix << prefix + "1-" + nump + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums 2nd 2")) << prefix + "10-" + num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums 2nd 3")) << prefix + "10-0"+ num + postfix<< prefix + "10-10" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums 2nd 4")) << prefix + "10-" + num + postfix<< prefix + "10-010" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums big 1")) << prefix + "10-" + num + postfix<< prefix + "20-0" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums big 2")) << prefix + "2-" + num + postfix << prefix + "10-0" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul alphabet 1")) << prefix + num + "-a" + postfix << prefix + num + "-c" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul alphabet 2")) << prefix + num + "-a9" + postfix<< prefix + num + "-c0" + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("mul nums w\\0"))  << prefix + num + "-"+ num + postfix<< prefix + num+"-0"+nump + postfix << int(Qt::CaseInsensitive) << i;
+                QTest::newRow(ROWNAME("num first"))      << prefix + num + postfix  << prefix + "a" + postfix << int(Qt::CaseInsensitive) << i;
             }
         }
     }
+#undef ROWNAME
 }
 
 void tst_QFileSystemModel::naturalCompare()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index bbe7062507..51ce7f909c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -454,7 +454,6 @@ void tst_QGraphicsGridLayout::addItem_data()
     for (int b = -1; b < 2; ++b) {
     for (int c = -1; c < 2; ++c) {
     for (int d = -1; d < 2; ++d) {
-    for (int e = 0; e < 9; ++e) {
         int row = a;
         int column = b;
         int rowSpan = c;
@@ -462,7 +461,7 @@ void tst_QGraphicsGridLayout::addItem_data()
         QString name = QString::fromAscii("(%1,%2,%3,%4").arg(a).arg(b).arg(c).arg(d);
         Qt::Alignment alignment = Qt::AlignLeft;
         QTest::newRow(name.toLatin1()) << row << column << rowSpan << columnSpan << alignment;
-    }}}}}
+    }}}}
 }
 
 // public void addItem(QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = 0)
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index 4089768e7a..4dd57e1b90 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -2365,16 +2365,16 @@ void tst_QHeaderView::setupTestData(bool also_use_reset_model)
     QTest::addColumn("reset_model");
 
     if (also_use_reset_model) {
-        QTest::newRow("no_updates+normal")  << false << false << true;
-        QTest::newRow("hasupdates+normal")  << true << false << true;
-        QTest::newRow("no_updates+special") << false << true << true;
-        QTest::newRow("no_updates+special") << true << true << true;
+        QTest::newRow("no_updates+normal+reset")  << false << false << true;
+        QTest::newRow("hasupdates+normal+reset")  << true << false << true;
+        QTest::newRow("no_updates+special+reset") << false << true << true;
+        QTest::newRow("hasupdates+special+reset") << true << true << true;
     }
 
     QTest::newRow("no_updates+normal")  << false << false << false;
     QTest::newRow("hasupdates+normal")  << true << false << false;
     QTest::newRow("no_updates+special") << false << true << false;
-    QTest::newRow("no_updates+special") << true << true << false;
+    QTest::newRow("hasupdates+special") << true << true << false;
 }
 
 void tst_QHeaderView::additionalInit()
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 523516a4b4..f139eac275 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -970,7 +970,7 @@ void tst_QListView::selection_data()
         << QRect(300, 10, 1, 1)                 // selection rectangle
         << IntList();                           // expected items
 
-    QTest::newRow("select to the right, (on viewport)")
+    QTest::newRow("select to the right 2, (on viewport)")
         << 40                                   // itemCount
         << int(QListView::ListMode)
         << int(QListView::TopToBottom)
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 586c2efd8f..9144a023d7 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -1204,7 +1204,7 @@ void tst_QTableView::moveCursorStrikesBack_data()
             << 0 << 5 << (IntList() << int(QtTestTableView::MoveNext))
             << 1 << 0;
 
-    QTest::newRow("Last column disabled. Task QTBUG-3878") << -1 << -1
+    QTest::newRow("Last column disabled 2. Task QTBUG-3878") << -1 << -1
             << IntList()
             << (IntList() << 6)
             << QRect()
diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
index 0e518b3e16..14c61c7932 100644
--- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
@@ -1014,13 +1014,13 @@ void tst_QTreeWidgetItemIterator::minus_eq_data()
     QTest::addColumn("iteratorflags");
     QTest::addColumn("expecteditem");
 
-    QTest::newRow("-=0") << 0 << 0 << (int)QTreeWidgetItemIterator::All << QString("top0");
-    QTest::newRow("-=1") << 2 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
-    QTest::newRow("-=2") << 4 << 2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
-    QTest::newRow("-=(-1)") << 0 << -1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
-    QTest::newRow("-=(-2)") << 0 << -2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
-    QTest::newRow("-=1)") << 18 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child16");
-    QTest::newRow("-=1)") << 1 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0");
+    QTest::newRow("0-=0") << 0 << 0 << (int)QTreeWidgetItemIterator::All << QString("top0");
+    QTest::newRow("2-=1") << 2 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
+    QTest::newRow("4-=2") << 4 << 2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
+    QTest::newRow("0-=(-1)") << 0 << -1 << (int)QTreeWidgetItemIterator::All << QString("top0,child0");
+    QTest::newRow("0-=(-2)") << 0 << -2 << (int)QTreeWidgetItemIterator::All << QString("top0,child1");
+    QTest::newRow("18-=1") << 18 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0,child16");
+    QTest::newRow("1-=1") << 1 << 1 << (int)QTreeWidgetItemIterator::All << QString("top0");
 }
 
 void tst_QTreeWidgetItemIterator::minus_eq()
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index d9f4081ed3..7017c6157e 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -380,16 +380,16 @@ void tst_QApplication::setFont_data()
 	++cnt;
     }
 
-    QTest::newRow("nonexistingfont") << "nosuchfont_probably_quiteunlikely"
+    QTest::newRow("nonexistingfont after") << "nosuchfont_probably_quiteunlikely"
         << 0 << false;
-    QTest::newRow("nonexistingfont") << "nosuchfont_probably_quiteunlikely"
+    QTest::newRow("nonexistingfont before") << "nosuchfont_probably_quiteunlikely"
         << 0 << true;
 
-    QTest::newRow("largescaleable") << "smoothtimes" << 100 << false;
-    QTest::newRow("largescaleable") << "smoothtimes" << 100 << true;
+    QTest::newRow("largescaleable after") << "smoothtimes" << 100 << false;
+    QTest::newRow("largescaleable before") << "smoothtimes" << 100 << true;
 
-    QTest::newRow("largeunscaleale") << "helvetica" << 100 << false;
-    QTest::newRow("largeunscaleale") << "helvetica" << 100 << true;
+    QTest::newRow("largeunscaleale after") << "helvetica" << 100 << false;
+    QTest::newRow("largeunscaleale before") << "helvetica" << 100 << true;
 }
 
 void tst_QApplication::setFont()
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index c8e5591f8b..c43ea065f3 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -797,6 +797,16 @@ void tst_QGridLayout::minMaxSize_data()
                 << SizeInfo(QPoint(10, 10), QSize( 90, 90), QSize(100,100))
                 << SizeInfo(QPoint(10 + 100 + 1, 10), QSize( 90, 90))
                 );
+    QTest::newRow("2x1 grid, extend to minimumSize, motif") << QString::fromAscii("motif") << 2 << 1
+                << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
+                << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
+                << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
+                );
+    QTest::newRow("2x1 grid, extend to minimumSize, windows") << QString::fromAscii("windows") << 2 << 1
+                << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
+                << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
+                << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
+                );
     QTest::newRow("1x2 grid, extend to minimumSize") << QString() << 1 << 2
                 << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
                 << SizeInfo(QPoint(10, 10), QSize( 90, 90), QSize(100,100))
@@ -818,17 +828,6 @@ void tst_QGridLayout::minMaxSize_data()
             << SizeInfo(QPoint(10, 10 + 100 + 1), QSize(100,100), QSize(), QSize(), 100*100)
             << SizeInfo(QPoint(10, 10 + 100 + 1 + 50 + 1), QSize(100,100), QSize(), QSize(100, 100))
             );
-    QTest::newRow("2x1 grid, extend to minimumSize") << QString::fromAscii("motif") << 2 << 1
-                << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
-                << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
-                << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
-                );
-    QTest::newRow("2x1 grid, extend to minimumSize") << QString::fromAscii("windows") << 2 << 1
-                << int(QSizePolicy::Preferred) << QSize() << (SizeInfoList()
-                << SizeInfo(QPoint(11, 11), QSize( 90, 90), QSize(100,100))
-                << SizeInfo(QPoint(11 + 100 + 6, 11), QSize( 90, 90))
-                );
-
 }
 
 void tst_QGridLayout::minMaxSize()
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index 228ff40ee5..a257eb1798 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -367,40 +367,42 @@ void tst_QCompleter::csMatchingOnCsSortedModel_data()
     QTest::addColumn("completion");
     QTest::addColumn("completionText");
 
+#define ROWNAME(name) (qPrintable(QString("%1 %2").arg(name).arg(i)))
+
     for (int i = 0; i < 2; i++) {
          if (i == 1)
              QTest::newRow("FILTERING_OFF") << "FILTERING_OFF" << "" << "" << "";
 
          // Plain text filter
-         QTest::newRow("()") << "" << "" << "P0" << "P0";
-         QTest::newRow("()F") << "" << "F" << "P0" << "P0";
-         QTest::newRow("()L") << "" << "L" << "p4" << "p4";
-         QTest::newRow("()L") << "" << "L" << "p4" << "p4";
-         QTest::newRow("()N") << "" << "N" << "P1" << "P1";
-         QTest::newRow("(P)") << "P" << "" << "P0" << "P0";
-         QTest::newRow("(P)F") << "P" << "" << "P0" << "P0";
-         QTest::newRow("(P)L") << "P" << "L" << "P4" << "P4";
-         QTest::newRow("(p)") << "p" << "" << "p0" << "p0";
-         QTest::newRow("(p)N") << "p" << "N" << "p1" << "p1";
-         QTest::newRow("(p)NN") << "p" << "NN" << "p2" << "p2";
-         QTest::newRow("(p)NNN") << "p" << "NNN" << "p3" << "p3";
-         QTest::newRow("(p)NNNN") << "p" << "NNNN" << "p4" << "p4";
-         QTest::newRow("(p1)") << "p1" << "" << "p1" << "p1";
-         QTest::newRow("(p11)") << "p11" << "" << "" << "";
+         QTest::newRow(ROWNAME("()")) << "" << "" << "P0" << "P0";
+         QTest::newRow(ROWNAME("()F")) << "" << "F" << "P0" << "P0";
+         QTest::newRow(ROWNAME("()L")) << "" << "L" << "p4" << "p4";
+         QTest::newRow(ROWNAME("()N")) << "" << "N" << "P1" << "P1";
+         QTest::newRow(ROWNAME("(P)")) << "P" << "" << "P0" << "P0";
+         QTest::newRow(ROWNAME("(P)F")) << "P" << "" << "P0" << "P0";
+         QTest::newRow(ROWNAME("(P)L")) << "P" << "L" << "P4" << "P4";
+         QTest::newRow(ROWNAME("(p)")) << "p" << "" << "p0" << "p0";
+         QTest::newRow(ROWNAME("(p)N")) << "p" << "N" << "p1" << "p1";
+         QTest::newRow(ROWNAME("(p)NN")) << "p" << "NN" << "p2" << "p2";
+         QTest::newRow(ROWNAME("(p)NNN")) << "p" << "NNN" << "p3" << "p3";
+         QTest::newRow(ROWNAME("(p)NNNN")) << "p" << "NNNN" << "p4" << "p4";
+         QTest::newRow(ROWNAME("(p1)")) << "p1" << "" << "p1" << "p1";
+         QTest::newRow(ROWNAME("(p11)")) << "p11" << "" << "" << "";
 
          // Tree filter
-         QTest::newRow("(P0,)") << "P0," << "" << "c0P0" << "P0,c0P0";
-         QTest::newRow("(P0,c)") << "P0,c" << "" << "c0P0" << "P0,c0P0";
-         QTest::newRow("(P0,c1)") << "P0,c1" << "" << "c1P0" << "P0,c1P0";
-         QTest::newRow("(P0,c3P0)") << "P0,c3P0" << "" << "c3P0" << "P0,c3P0";
-         QTest::newRow("(P3,c)F") << "P3,c" << "F" << "c0P3" << "P3,c0P3";
-         QTest::newRow("(P3,c)L") << "P3,c" << "L" << "c4P3" << "P3,c4P3";
-         QTest::newRow("(P3,c)N") << "P3,c" << "N" << "c1P3" << "P3,c1P3";
-         QTest::newRow("(P3,c)NN") << "P3,c" << "NN" << "c2P3" << "P3,c2P3";
-         QTest::newRow("(P3,,c)") << "P3,,c" << "" << "" << "";
-         QTest::newRow("(P3,c0P3,)") << "P3,c0P3," << "" << "" << "";
-         QTest::newRow("(P,)") << "P," << "" << "" << "";
+         QTest::newRow(ROWNAME("(P0,)")) << "P0," << "" << "c0P0" << "P0,c0P0";
+         QTest::newRow(ROWNAME("(P0,c)")) << "P0,c" << "" << "c0P0" << "P0,c0P0";
+         QTest::newRow(ROWNAME("(P0,c1)")) << "P0,c1" << "" << "c1P0" << "P0,c1P0";
+         QTest::newRow(ROWNAME("(P0,c3P0)")) << "P0,c3P0" << "" << "c3P0" << "P0,c3P0";
+         QTest::newRow(ROWNAME("(P3,c)F")) << "P3,c" << "F" << "c0P3" << "P3,c0P3";
+         QTest::newRow(ROWNAME("(P3,c)L")) << "P3,c" << "L" << "c4P3" << "P3,c4P3";
+         QTest::newRow(ROWNAME("(P3,c)N")) << "P3,c" << "N" << "c1P3" << "P3,c1P3";
+         QTest::newRow(ROWNAME("(P3,c)NN")) << "P3,c" << "NN" << "c2P3" << "P3,c2P3";
+         QTest::newRow(ROWNAME("(P3,,c)")) << "P3,,c" << "" << "" << "";
+         QTest::newRow(ROWNAME("(P3,c0P3,)")) << "P3,c0P3," << "" << "" << "";
+         QTest::newRow(ROWNAME("(P,)")) << "P," << "" << "" << "";
      }
+#undef ROWNAME
 }
 
 void tst_QCompleter::csMatchingOnCsSortedModel()
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 5695834e61..85cd2a8d92 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -229,13 +229,13 @@ void tst_QAbstractButton::onReleased()
 void tst_QAbstractButton::setAutoRepeat_data()
 {
     QTest::addColumn("mode");
-    QTest::newRow( "" ) << 0;
-    QTest::newRow( "" ) << 1;
-    QTest::newRow( "" ) << 2;
-    QTest::newRow( "" ) << 3;
-    QTest::newRow( "" ) << 4;
-    QTest::newRow( "" ) << 5;
-    QTest::newRow( "" ) << 6;
+    QTest::newRow("mode 0") << 0;
+    QTest::newRow("mode 1") << 1;
+    QTest::newRow("mode 2") << 2;
+    QTest::newRow("mode 3") << 3;
+    QTest::newRow("mode 4") << 4;
+    QTest::newRow("mode 5") << 5;
+    QTest::newRow("mode 6") << 6;
 }
 
 #define REPEAT_DELAY 1000
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 6ed5d59db0..6021f90ed4 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -482,7 +482,7 @@ void tst_QAbstractSlider::keyPressed_data()
     QList list;
 
     list << Qt::Key_Down;
-    QTest::newRow("Step down once") << 10   // initial position
+    QTest::newRow("Step down once 1") << 10   // initial position
                                  << 0    // minimum
                                  << 100  // maximum
                                  << 3    // single step size
@@ -495,7 +495,7 @@ void tst_QAbstractSlider::keyPressed_data()
 
     list = QList();
     list << Qt::Key_Up;
-    QTest::newRow("Step down once") << 10   // initial position
+    QTest::newRow("Step down once 2") << 10   // initial position
                                  << 0    // minimum
                                  << 100  // maximum
                                  << 3    // single step size
diff --git a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
index deb8a3bb6f..474acc0a78 100644
--- a/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
+++ b/tests/auto/widgets/widgets/qdoublevalidator/tst_qdoublevalidator.cpp
@@ -360,11 +360,11 @@ void tst_QDoubleValidator::validateIntEquiv_data()
     QTest::newRow("4.6") << 0.0 << 10.0 << QString(".1") << INV;
     QTest::newRow("4.7") << 0.0 << 10.0 << QString("-1.0") << INV;
 
-    QTest::newRow("5.1") << 6.0 << 8.0 << QString("5") << ITM;
-    QTest::newRow("5.1") << 6.0 << 8.0 << QString("56") << INV;
+    QTest::newRow("5.1a") << 6.0 << 8.0 << QString("5") << ITM;
+    QTest::newRow("5.1b") << 6.0 << 8.0 << QString("56") << INV;
     QTest::newRow("5.2") << 6.0 << 8.0 << QString("7") << ACC;
-    QTest::newRow("5.3") << 6.0 << 8.0 << QString("9") << ITM;
-    QTest::newRow("5.3") << 6.0 << 8.0 << QString("-") << INV;
+    QTest::newRow("5.3a") << 6.0 << 8.0 << QString("9") << ITM;
+    QTest::newRow("5.3b") << 6.0 << 8.0 << QString("-") << INV;
     QTest::newRow("5.4a") << -8.0 << -6.0 << QString("+") << INV;
     QTest::newRow("5.4b") << -8.0 << -6.0 << QString("+5") << INV;
     QTest::newRow("5.4c") << -8.0 << -6.0 << QString("-5") << ITM;
diff --git a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
index e773607164..3832d39d6f 100644
--- a/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
+++ b/tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
@@ -256,7 +256,7 @@ void tst_QFontComboBox::writingSystem_data()
     QTest::newRow("Runic") << QFontDatabase::Runic;
 
     for (int i = 0; i < 31; ++i)
-        QTest::newRow("enum") << (QFontDatabase::WritingSystem)i;
+        QTest::newRow(qPrintable(QString("enum %1").arg(i))) << (QFontDatabase::WritingSystem)i;
 }
 
 // public QFontDatabase::WritingSystem writingSystem() const
diff --git a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
index 6aec414ae6..99d8ded15c 100644
--- a/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/widgets/widgets/qintvalidator/tst_qintvalidator.cpp
@@ -70,8 +70,8 @@ void tst_QIntValidator::validate_data()
     QTest::newRow("data1") << 0 << 100 << QString("500") << INV;
     QTest::newRow("data1a") << 0 << 100 << QString("5000") << INV;
     QTest::newRow("data1b") << -100 << 0 << QString("50") << INT;
-    QTest::newRow("data1b") << -100 << 0 << QString("500") << INV;
-    QTest::newRow("data1c") << -100 << 0 << QString("5000") << INV;
+    QTest::newRow("data1c") << -100 << 0 << QString("500") << INV;
+    QTest::newRow("data1d") << -100 << 0 << QString("5000") << INV;
     QTest::newRow("data2") << 0 << 100 << QString("-35") << INV;
     QTest::newRow("data3") << 0 << 100 << QString("a") << INV;
     QTest::newRow("data4") << 0 << 100 << QString("-") << INV;
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index 6d6b9384b9..d8b2a800b9 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -312,7 +312,7 @@ void tst_QLabel::eventPropagation_data()
     QTest::newRow("rich text2") << QString("rich text") << (int)Qt::TextSelectableByKeyboard << (int)Qt::ClickFocus << true;
     QTest::newRow("rich text3") << QString("rich text") << (int)Qt::TextSelectableByMouse << (int)Qt::ClickFocus << false;
     QTest::newRow("rich text4") << QString("rich text") << (int)Qt::NoTextInteraction << (int)Qt::NoFocus << true;
-    QTest::newRow("rich text4") << QString("rich text") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true;
+    QTest::newRow("rich text5") << QString("rich text") << (int)Qt::LinksAccessibleByKeyboard << (int)Qt::StrongFocus << true;
 
     if (!test_box)
         test_box = new Widget;
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index b004efd07c..645f47fc72 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -647,22 +647,21 @@ void tst_QLineEdit::inputMask_data()
     QTest::addColumn("expectedMask");
 
     // if no mask is set a nul string should be returned
-    QTest::newRow("") << QString("") << QString();
-    QTest::newRow("") << QString() << QString();
+    QTest::newRow("nul 1") << QString("") << QString();
+    QTest::newRow("nul 2") << QString() << QString();
 
     // try different masks
-    QTest::newRow("") << QString("000.000.000.000") << QString("000.000.000.000; ");
-    QTest::newRow("") << QString("000.000.000.000;#") << QString("000.000.000.000;#");
-    QTest::newRow("") << QString("AAA.aa.999.###;") << QString("AAA.aa.999.###; ");
-    QTest::newRow("") << QString(">abcdefabcdefabcdefabcdef("replacementLength");
     QTest::addColumn("commitString");
 
-    QTest::newRow("") << 4 << 4 << 0 << 0 << QString("");
-    QTest::newRow("") << 4 << 4 << 0 << 0 << QString("x");
-    QTest::newRow("") << 4 << 4 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
-    QTest::newRow("") << 4 << 3 << 0 << 0 << QString("");
-    QTest::newRow("") << 4 << 3 << 0 << 0 << QString("x");
-    QTest::newRow("") << 4 << 3 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
-    QTest::newRow("") << 4 << 0 << 0 << 0 << QString("");
-    QTest::newRow("") << 4 << 0 << 0 << 0 << QString("x");
-    QTest::newRow("") << 4 << 0 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
-
-    QTest::newRow("") << 4 << 4 << -4 << 4 << QString("");
-    QTest::newRow("") << 4 << 4 << -4 << 4 << QString("x");
-    QTest::newRow("") << 4 << 4 << -4 << 4 << QString("xxxxxxxxxxxxxxxx");
-    QTest::newRow("") << 4 << 3 << -3 << 4 << QString("");
-    QTest::newRow("") << 4 << 3 << -3 << 4 << QString("x");
-    QTest::newRow("") << 4 << 3 << -3 << 4 << QString("xxxxxxxxxxxxxxxx");
-    QTest::newRow("") << 4 << 0 << 0 << 4 << QString("");
-    QTest::newRow("") << 4 << 0 << 0 << 4 << QString("x");
-    QTest::newRow("") << 4 << 0 << 0 << 4 << QString("xxxxxxxxxxxxxxxx");
-
-    QTest::newRow("") << 4 << 4 << -4 << 0 << QString("");
-    QTest::newRow("") << 4 << 4 << -4 << 0 << QString("x");
-    QTest::newRow("") << 4 << 4 << -4 << 0 << QString("xxxxxxxxxxxxxxxx");
-    QTest::newRow("") << 4 << 3 << -3 << 0 << QString("");
-    QTest::newRow("") << 4 << 3 << -3 << 0 << QString("x");
-    QTest::newRow("") << 4 << 3 << -3 << 0 << QString("xxxxxxxxxxxxxxxx");
+    QTest::newRow("data1")  << 4 << 4 << 0 << 0 << QString("");
+    QTest::newRow("data2")  << 4 << 4 << 0 << 0 << QString("x");
+    QTest::newRow("data3")  << 4 << 4 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
+    QTest::newRow("data4")  << 4 << 3 << 0 << 0 << QString("");
+    QTest::newRow("data5")  << 4 << 3 << 0 << 0 << QString("x");
+    QTest::newRow("data6")  << 4 << 3 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
+    QTest::newRow("data7")  << 4 << 0 << 0 << 0 << QString("");
+    QTest::newRow("data8")  << 4 << 0 << 0 << 0 << QString("x");
+    QTest::newRow("data9")  << 4 << 0 << 0 << 0 << QString("xxxxxxxxxxxxxxxx");
+
+    QTest::newRow("data10") << 4 << 4 << -4 << 4 << QString("");
+    QTest::newRow("data11") << 4 << 4 << -4 << 4 << QString("x");
+    QTest::newRow("data12") << 4 << 4 << -4 << 4 << QString("xxxxxxxxxxxxxxxx");
+    QTest::newRow("data13") << 4 << 3 << -3 << 4 << QString("");
+    QTest::newRow("data14") << 4 << 3 << -3 << 4 << QString("x");
+    QTest::newRow("data15") << 4 << 3 << -3 << 4 << QString("xxxxxxxxxxxxxxxx");
+    QTest::newRow("data16") << 4 << 0 << 0 << 4 << QString("");
+    QTest::newRow("data17") << 4 << 0 << 0 << 4 << QString("x");
+    QTest::newRow("data18") << 4 << 0 << 0 << 4 << QString("xxxxxxxxxxxxxxxx");
+
+    QTest::newRow("data19") << 4 << 4 << -4 << 0 << QString("");
+    QTest::newRow("data20") << 4 << 4 << -4 << 0 << QString("x");
+    QTest::newRow("data21") << 4 << 4 << -4 << 0 << QString("xxxxxxxxxxxxxxxx");
+    QTest::newRow("data22") << 4 << 3 << -3 << 0 << QString("");
+    QTest::newRow("data23") << 4 << 3 << -3 << 0 << QString("x");
+    QTest::newRow("data24") << 4 << 3 << -3 << 0 << QString("xxxxxxxxxxxxxxxx");
 }
 
 void tst_QLineEdit::task233101_cursorPosAfterInputMethod()
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index c3d982388d..07efb60b49 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -657,22 +657,22 @@ void tst_QSpinBox::valueFromTextAndValidate_data()
     QTest::newRow("data3") << QString("2") << Acceptable << 0 << 100 << QString();
     QTest::newRow("data4") << QString() << Intermediate << 0 << 1 << QString();
     QTest::newRow("data5") << QString() << Invalid << 0 << 0 << QString();
-    QTest::newRow("data5") << QString("5") << Intermediate << 2004 << 2005 << QString();
-    QTest::newRow("data6") << QString("50") << Intermediate << 2004 << 2005 << QString();
-    QTest::newRow("data7") << QString("205") << Intermediate << 2004 << 2005 << QString();
-    QTest::newRow("data8") << QString("2005") << Acceptable << 2004 << 2005 << QString();
-    QTest::newRow("data9") << QString("3") << Intermediate << 2004 << 2005 << QString();
-    QTest::newRow("data10") << QString("-") << Intermediate << -20 << -10 << QString();
-    QTest::newRow("data11") << QString("-1") << Intermediate << -20 << -10 << QString();
-    QTest::newRow("data12") << QString("-5") << Intermediate << -20 << -10 << QString();
-    QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -16 << QString();
-    QTest::newRow("data14") << QString("-2") << Intermediate << -20 << -16 << QString();
-    QTest::newRow("data15") << QString("2") << Invalid << -20 << -16 << QString();
-    QTest::newRow("data16") << QString() << Intermediate << -20 << -16 << QString();
-    QTest::newRow("data17") << QString("  22") << Acceptable << 0 << 1000 << QString("22");
-    QTest::newRow("data18") << QString("22  ") << Acceptable << 0 << 1000 << QString("22");
-    QTest::newRow("data19") << QString("  22  ") << Acceptable << 0 << 1000 << QString("22");
-    QTest::newRow("data20") << QString("2 2") << Invalid << 0 << 1000 << QString();
+    QTest::newRow("data6") << QString("5") << Intermediate << 2004 << 2005 << QString();
+    QTest::newRow("data7") << QString("50") << Intermediate << 2004 << 2005 << QString();
+    QTest::newRow("data8") << QString("205") << Intermediate << 2004 << 2005 << QString();
+    QTest::newRow("data9") << QString("2005") << Acceptable << 2004 << 2005 << QString();
+    QTest::newRow("data10") << QString("3") << Intermediate << 2004 << 2005 << QString();
+    QTest::newRow("data11") << QString("-") << Intermediate << -20 << -10 << QString();
+    QTest::newRow("data12") << QString("-1") << Intermediate << -20 << -10 << QString();
+    QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -10 << QString();
+    QTest::newRow("data14") << QString("-5") << Intermediate << -20 << -16 << QString();
+    QTest::newRow("data15") << QString("-2") << Intermediate << -20 << -16 << QString();
+    QTest::newRow("data16") << QString("2") << Invalid << -20 << -16 << QString();
+    QTest::newRow("data17") << QString() << Intermediate << -20 << -16 << QString();
+    QTest::newRow("data18") << QString("  22") << Acceptable << 0 << 1000 << QString("22");
+    QTest::newRow("data19") << QString("22  ") << Acceptable << 0 << 1000 << QString("22");
+    QTest::newRow("data20") << QString("  22  ") << Acceptable << 0 << 1000 << QString("22");
+    QTest::newRow("data21") << QString("2 2") << Invalid << 0 << 1000 << QString();
 }
 
 static QString stateName(int state)
diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
index 048f1441a2..294a656482 100644
--- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp
@@ -507,7 +507,7 @@ void tst_QSplitter::setStretchFactor_data()
     QTest::newRow("ok06") << int(Qt::Vertical) << 1 << 1 << 1 << 1;
     QTest::newRow("ok07") << int(Qt::Vertical) << 2 << 2 << 2 << 2;
     QTest::newRow("ok08") << int(Qt::Vertical) << 3 << 5 << 5 << 5;
-    QTest::newRow("ok08") << int(Qt::Vertical) << -1 << 5 << 0 << 0;
+    QTest::newRow("ok09") << int(Qt::Vertical) << -1 << 5 << 0 << 0;
 }
 
 void tst_QSplitter::setStretchFactor()
-- 
cgit v1.2.3


From 58d6c856ece204be11bc4f53a0967d317468d558 Mon Sep 17 00:00:00 2001
From: Kent Hansen 
Date: Sat, 4 Feb 2012 21:39:38 +0100
Subject: qmetaobjectbuilder: Add support for revisioned methods and properties
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

moc supports it, so qmetaobjectbuilder should too.

Change-Id: I01475794e928b5a1b659f0dab044933948186971
Reviewed-by: Bradley T. Hughes 
Reviewed-by: Jędrzej Nowacki 
Reviewed-by: Kent Hansen 
---
 .../qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp  | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 966ac021ac..02c69b9b1b 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -91,6 +91,7 @@ class SomethingOfEverything : public QObject
     Q_CLASSINFO("ci_bar", "DEF")
     Q_PROPERTY(QString prop READ prop WRITE setProp NOTIFY propChanged)
     Q_PROPERTY(QString prop2 READ prop WRITE setProp)
+    Q_PROPERTY(QString revisionProp READ prop WRITE setProp REVISION 42)
     Q_PROPERTY(SomethingEnum eprop READ eprop)
     Q_PROPERTY(SomethingFlagEnum fprop READ fprop)
     Q_PROPERTY(QLocale::Language language READ language)
@@ -124,6 +125,7 @@ public:
 public slots:
     void slot1(const QString&) {}
     void slot2(int, const QString&) {}
+    Q_REVISION(24) void revisionSlot() {}
 
 private slots:
     void slot3() {}
@@ -219,6 +221,7 @@ void tst_QMetaObjectBuilder::method()
     QVERIFY(nullMethod.tag().isEmpty());
     QVERIFY(nullMethod.access() == QMetaMethod::Public);
     QCOMPARE(nullMethod.attributes(), 0);
+    QCOMPARE(nullMethod.revision(), 0);
     QCOMPARE(nullMethod.index(), 0);
 
     // Add a method and check its attributes.
@@ -230,6 +233,7 @@ void tst_QMetaObjectBuilder::method()
     QVERIFY(method1.tag().isEmpty());
     QVERIFY(method1.access() == QMetaMethod::Public);
     QCOMPARE(method1.attributes(), 0);
+    QCOMPARE(method1.revision(), 0);
     QCOMPARE(method1.index(), 0);
     QCOMPARE(builder.methodCount(), 1);
 
@@ -242,6 +246,7 @@ void tst_QMetaObjectBuilder::method()
     QVERIFY(method2.tag().isEmpty());
     QVERIFY(method2.access() == QMetaMethod::Public);
     QCOMPARE(method2.attributes(), 0);
+    QCOMPARE(method2.revision(), 0);
     QCOMPARE(method2.index(), 1);
     QCOMPARE(builder.methodCount(), 2);
 
@@ -256,6 +261,7 @@ void tst_QMetaObjectBuilder::method()
     method1.setTag("tag");
     method1.setAccess(QMetaMethod::Private);
     method1.setAttributes(42);
+    method1.setRevision(123);
 
     // Check that method1 is changed, but method2 is not.
     QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
@@ -265,6 +271,7 @@ void tst_QMetaObjectBuilder::method()
     QCOMPARE(method1.tag(), QByteArray("tag"));
     QVERIFY(method1.access() == QMetaMethod::Private);
     QCOMPARE(method1.attributes(), 42);
+    QCOMPARE(method1.revision(), 123);
     QCOMPARE(method1.index(), 0);
     QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
     QVERIFY(method2.methodType() == QMetaMethod::Method);
@@ -273,6 +280,7 @@ void tst_QMetaObjectBuilder::method()
     QVERIFY(method2.tag().isEmpty());
     QVERIFY(method2.access() == QMetaMethod::Public);
     QCOMPARE(method2.attributes(), 0);
+    QCOMPARE(method2.revision(), 0);
     QCOMPARE(method2.index(), 1);
     QCOMPARE(builder.methodCount(), 2);
 
@@ -282,6 +290,7 @@ void tst_QMetaObjectBuilder::method()
     method2.setTag("Q_FOO");
     method2.setAccess(QMetaMethod::Protected);
     method2.setAttributes(24);
+    method2.setRevision(321);
 
     // This time check that only method2 changed.
     QCOMPARE(method1.signature(), QByteArray("foo(QString,int)"));
@@ -291,6 +300,7 @@ void tst_QMetaObjectBuilder::method()
     QCOMPARE(method1.tag(), QByteArray("tag"));
     QVERIFY(method1.access() == QMetaMethod::Private);
     QCOMPARE(method1.attributes(), 42);
+    QCOMPARE(method1.revision(), 123);
     QCOMPARE(method1.index(), 0);
     QCOMPARE(method2.signature(), QByteArray("bar(QString)"));
     QVERIFY(method2.methodType() == QMetaMethod::Method);
@@ -299,6 +309,7 @@ void tst_QMetaObjectBuilder::method()
     QCOMPARE(method2.tag(), QByteArray("Q_FOO"));
     QVERIFY(method2.access() == QMetaMethod::Protected);
     QCOMPARE(method2.attributes(), 24);
+    QCOMPARE(method2.revision(), 321);
     QCOMPARE(method2.index(), 1);
     QCOMPARE(builder.methodCount(), 2);
 
@@ -313,6 +324,7 @@ void tst_QMetaObjectBuilder::method()
     QCOMPARE(method2.tag(), QByteArray("Q_FOO"));
     QVERIFY(method2.access() == QMetaMethod::Protected);
     QCOMPARE(method2.attributes(), 24);
+    QCOMPARE(method2.revision(), 321);
     QCOMPARE(method2.index(), 0);
 
     // Perform index-based lookup again.
@@ -542,6 +554,7 @@ void tst_QMetaObjectBuilder::property()
     QVERIFY(!nullProp.isConstant());
     QVERIFY(!nullProp.isFinal());
     QCOMPARE(nullProp.index(), 0);
+    QCOMPARE(nullProp.revision(), 0);
 
     // Add a property and check its attributes.
     QMetaPropertyBuilder prop1 = builder.addProperty("foo", "const QString &");
@@ -560,6 +573,7 @@ void tst_QMetaObjectBuilder::property()
     QVERIFY(!prop1.isEnumOrFlag());
     QVERIFY(!prop1.isConstant());
     QVERIFY(!prop1.isFinal());
+    QCOMPARE(prop1.revision(), 0);
     QCOMPARE(prop1.index(), 0);
     QCOMPARE(builder.propertyCount(), 1);
 
@@ -580,6 +594,7 @@ void tst_QMetaObjectBuilder::property()
     QVERIFY(!prop2.isEnumOrFlag());
     QVERIFY(!prop2.isConstant());
     QVERIFY(!prop2.isFinal());
+    QCOMPARE(prop2.revision(), 0);
     QCOMPARE(prop2.index(), 1);
     QCOMPARE(builder.propertyCount(), 2);
 
@@ -603,6 +618,7 @@ void tst_QMetaObjectBuilder::property()
     prop1.setEnumOrFlag(true);
     prop1.setConstant(true);
     prop1.setFinal(true);
+    prop1.setRevision(123);
 
     // Check that prop1 is changed, but prop2 is not.
     QCOMPARE(prop1.name(), QByteArray("foo"));
@@ -619,6 +635,7 @@ void tst_QMetaObjectBuilder::property()
     QVERIFY(prop1.isEnumOrFlag());
     QVERIFY(prop1.isConstant());
     QVERIFY(prop1.isFinal());
+    QCOMPARE(prop1.revision(), 123);
     QVERIFY(prop2.isReadable());
     QVERIFY(prop2.isWritable());
     QCOMPARE(prop2.name(), QByteArray("bar"));
@@ -633,6 +650,7 @@ void tst_QMetaObjectBuilder::property()
     QVERIFY(!prop2.isEnumOrFlag());
     QVERIFY(!prop2.isConstant());
     QVERIFY(!prop2.isFinal());
+    QCOMPARE(prop2.revision(), 0);
 
     // Remove prop1 and check that prop2 becomes index 0.
     builder.removeProperty(0);
@@ -650,6 +668,7 @@ void tst_QMetaObjectBuilder::property()
     QVERIFY(!prop2.isEnumOrFlag());
     QVERIFY(!prop2.isConstant());
     QVERIFY(!prop2.isFinal());
+    QCOMPARE(prop2.revision(), 0);
     QCOMPARE(prop2.index(), 0);
 
     // Perform index-based lookup again.
@@ -1163,6 +1182,9 @@ static bool sameMethod(const QMetaMethod& method1, const QMetaMethod& method2)
     if (method1.attributes() != method2.attributes())
         return false;
 
+    if (method1.revision() != method2.revision())
+        return false;
+
     return true;
 }
 
@@ -1193,6 +1215,9 @@ static bool sameProperty(const QMetaProperty& prop1, const QMetaProperty& prop2)
             return false;
     }
 
+    if (prop1.revision() != prop2.revision())
+        return false;
+
     return true;
 }
 
-- 
cgit v1.2.3


From e121d6d7e82067c557bcd2f5f3aed1e6ebc9d3fc Mon Sep 17 00:00:00 2001
From: Kent Hansen 
Date: Sat, 4 Feb 2012 22:51:41 +0100
Subject: Test template-based connect() with qmetaobjectbuilder

For template-based connect(), the meta-object is resolved at
compile-time (the virtual metaObject() function isn't called).
But we can make it work by copying the members of the dynamically
constructed meta-object to the statically defined one.

Change-Id: Ia4d3263a89008e36e187c584db6d25d9042f32b3
Reviewed-by: Olivier Goffart 
Reviewed-by: Bradley T. Hughes 
---
 .../qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp  | 26 ++++++++++++++--------
 1 file changed, 17 insertions(+), 9 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 02c69b9b1b..97b14a374e 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -1341,11 +1341,11 @@ class TestObject : public QObject
     // Manually expanded from Q_OBJECT macro
 public:
     Q_OBJECT_CHECK
+    static QMetaObject staticMetaObject;
     virtual const QMetaObject *metaObject() const;
     virtual void *qt_metacast(const char *);
     virtual int qt_metacall(QMetaObject::Call, int, void **);
 private:
-    Q_DECL_HIDDEN static const QMetaObjectExtraData staticMetaObjectExtraData;
     Q_DECL_HIDDEN static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
 
     //Q_PROPERTY(int intProp READ intProp WRITE setIntProp NOTIFY intPropChanged)
@@ -1378,14 +1378,15 @@ private:
     int m_voidSlotIntArg;
 };
 
-const QMetaObjectExtraData TestObject::staticMetaObjectExtraData = {
-    0,  qt_static_metacall
+QMetaObject TestObject::staticMetaObject = {
+    { 0, 0, 0, 0 }
 };
 
 TestObject::TestObject(QObject *parent)
     : QObject(parent), m_metaObject(buildMetaObject()),
       m_intProp(-1), m_voidSlotIntArg(-1)
 {
+    staticMetaObject = *m_metaObject;
 }
 
 TestObject::~TestObject()
@@ -1481,9 +1482,6 @@ void TestObject::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
           }
         }
     } else if (_c == QMetaObject::IndexOfMethod) {
-        // This code is currently unreachable because it's only used by the
-        // template-based versions of connect() and disconnect(), which don't
-        // work with dynamically generated meta-objects (see test).
         int *result = reinterpret_cast(_a[0]);
         void **func = reinterpret_cast(_a[1]);
         {
@@ -1504,7 +1502,6 @@ void TestObject::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
                 *result = 2;
             }
         }
-        qFatal("You forgot to add one or more IndexOfMethod cases");
     }
 }
 
@@ -1668,11 +1665,22 @@ void tst_QMetaObjectBuilder::usage_templateConnect()
 {
     QScopedPointer testObject(new TestObject);
 
-    QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in QObject");
     QMetaObject::Connection con = QObject::connect(testObject.data(), &TestObject::intPropChanged,
                                                    testObject.data(), &TestObject::voidSlotInt);
-    QEXPECT_FAIL("", "template-based connect() fails because meta-object is deduced at compile-time", Abort);
     QVERIFY(con);
+
+    QVERIFY(testObject->voidSlotIntArgument() == -1);
+    testObject->setProperty("intProp", 123);
+    QCOMPARE(testObject->voidSlotIntArgument(), 123);
+
+    QVERIFY(QObject::disconnect(testObject.data(), &TestObject::intPropChanged,
+                                testObject.data(), &TestObject::voidSlotInt));
+
+    // Something that isn't a signal
+    QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in TestObject");
+    con = QObject::connect(testObject.data(), &TestObject::setIntProp,
+                           testObject.data(), &TestObject::intPropChanged);
+    QVERIFY(!con);
 }
 
 QTEST_MAIN(tst_QMetaObjectBuilder)
-- 
cgit v1.2.3


From b9cf3dec9042bc0527e405da2b7f78ebfc561804 Mon Sep 17 00:00:00 2001
From: "Bradley T. Hughes" 
Date: Tue, 14 Feb 2012 11:31:37 +0100
Subject: tst_QVariant passes on Mac OS X

Do not mark with insignificant_test anymore.

Task-number: QTBUG-22747
Change-Id: I4ef6d5d7e1189b03fd1ab812a0839e3709686e1b
Reviewed-by: Jason McDonald 
---
 tests/auto/corelib/kernel/qvariant/qvariant.pro | 2 --
 1 file changed, 2 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.pro b/tests/auto/corelib/kernel/qvariant/qvariant.pro
index 48229ee140..9b4b346d35 100644
--- a/tests/auto/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/auto/corelib/kernel/qvariant/qvariant.pro
@@ -3,5 +3,3 @@ TARGET = tst_qvariant
 QT += widgets network testlib
 SOURCES = tst_qvariant.cpp
 RESOURCES += qvariant.qrc
-
-mac: CONFIG += insignificant_test # QTBUG-QTBUG-22747
-- 
cgit v1.2.3


From 0f0d8a5a8fecf545cdf58ab50d05253ffd20e90b Mon Sep 17 00:00:00 2001
From: Friedemann Kleint 
Date: Tue, 14 Feb 2012 15:52:49 +0100
Subject: Stabilize QFileSystemWatcher test.

- Run each test in a temporary directory, avoid writing test
  files in source/build tree and prevents tests being influenced
  by left-overs from previous runs and locks of the application
  on the current directory.
- Modify test to be able to use absolute paths to the temporary
  directory.
- Skip parts of test removeFileAndUnWatch if a race condition
  occurs.

Task-number: QTBUG-24029
Change-Id: I215cc2e0fe6f92d2ffe597b01cdc9c9a39e3c5b4
Reviewed-by: Robin Burchell 
---
 .../io/qfilesystemwatcher/qfilesystemwatcher.pro   |   1 -
 .../qfilesystemwatcher/tst_qfilesystemwatcher.cpp  | 103 ++++++++++++++-------
 2 files changed, 69 insertions(+), 35 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
index 043b2b5d1d..e712a6ad5f 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
+++ b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
@@ -4,4 +4,3 @@ QT = core testlib
 SOURCES = tst_qfilesystemwatcher.cpp
 
 mac: CONFIG += insignificant_test # QTBUG-22744
-win32:CONFIG += insignificant_test # QTBUG-24029
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 5e5a99f937..2635565c2b 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -42,6 +42,7 @@
 
 #include 
 
+#include 
 #include 
 
 #ifdef Q_OS_LINUX
@@ -52,9 +53,15 @@
 # endif
 #endif
 
+/* All tests need to run in temporary directories not used
+ * by the application to avoid non-deterministic failures on Windows
+ * due to locked directories and left-overs from previous tests. */
+
 class tst_QFileSystemWatcher : public QObject
 {
     Q_OBJECT
+public:
+    tst_QFileSystemWatcher();
 
 private slots:
     void basicTest_data();
@@ -75,11 +82,20 @@ private slots:
 
     void removeFileAndUnWatch();
 
-    void cleanup();
-
     void destroyAfterQCoreApplication();
+
+private:
+    QString m_tempDirPattern;
 };
 
+tst_QFileSystemWatcher::tst_QFileSystemWatcher()
+{
+    m_tempDirPattern = QDir::tempPath();
+    if (!m_tempDirPattern.endsWith(QLatin1Char('/')))
+        m_tempDirPattern += QLatin1Char('/');
+    m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
+}
+
 void tst_QFileSystemWatcher::basicTest_data()
 {
     QTest::addColumn("backend");
@@ -92,7 +108,9 @@ void tst_QFileSystemWatcher::basicTest()
     QFETCH(QString, backend);
 
     // create test file
-    QFile testFile("testfile.txt");
+    QTemporaryDir temporaryDirectory(m_tempDirPattern);
+    QVERIFY(temporaryDirectory.isValid());
+    QFile testFile(temporaryDirectory.path() + QStringLiteral("/testfile.txt"));
     testFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner);
     testFile.remove();
     QVERIFY(testFile.open(QIODevice::WriteOnly | QIODevice::Truncate));
@@ -151,14 +169,16 @@ void tst_QFileSystemWatcher::basicTest()
     QCOMPARE(changedSpy.count(), 0);
 
     // readd the file watch with a relative path
-    QVERIFY(watcher.addPath(testFile.fileName().prepend("./")));
+    const QString relativeTestFileName = QDir::current().relativeFilePath(testFile.fileName());
+    QVERIFY(!relativeTestFileName.isEmpty());
+    QVERIFY(watcher.addPath(relativeTestFileName));
     testFile.open(QIODevice::WriteOnly | QIODevice::Truncate);
     testFile.write(QByteArray("hello multiverse!"));
     testFile.close();
 
     QTRY_VERIFY(changedSpy.count() > 0);
 
-    QVERIFY(watcher.removePath(testFile.fileName().prepend("./")));
+    QVERIFY(watcher.removePath(relativeTestFileName));
 
     changedSpy.clear();
 
@@ -222,15 +242,21 @@ void tst_QFileSystemWatcher::watchDirectory()
 {
     QFETCH(QString, backend);
 
-    QDir().mkdir("testDir");
-    QDir testDir("testDir");
+    QTemporaryDir temporaryDirectory(m_tempDirPattern);
+    QVERIFY(temporaryDirectory.isValid());
+
+    QDir temporaryDir(temporaryDirectory.path());
+    const QString testDirName = QStringLiteral("testDir");
+    QVERIFY(temporaryDir.mkdir(testDirName));
+    QDir testDir = temporaryDir;
+    QVERIFY(testDir.cd(testDirName));
 
     QString testFileName = testDir.filePath("testFile.txt");
     QFile::remove(testFileName);
 
     QFileSystemWatcher watcher;
     watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
-    QVERIFY(watcher.addPath(testDir.dirName()));
+    QVERIFY(watcher.addPath(testDir.absolutePath()));
 
     QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(const QString &)));
     QVERIFY(changedSpy.isValid());
@@ -246,7 +272,7 @@ void tst_QFileSystemWatcher::watchDirectory()
     QString fileName;
 
     // remove the watch, should not get notification of a new file
-    QVERIFY(watcher.removePath(testDir.dirName()));
+    QVERIFY(watcher.removePath(testDir.absolutePath()));
     QVERIFY(testFile.open(QIODevice::WriteOnly | QIODevice::Truncate));
     testFile.close();
 
@@ -256,7 +282,7 @@ void tst_QFileSystemWatcher::watchDirectory()
 
     QCOMPARE(changedSpy.count(), 0);
 
-    QVERIFY(watcher.addPath(testDir.dirName()));
+    QVERIFY(watcher.addPath(testDir.absolutePath()));
 
     // remove the file again, should get a signal from the watcher
     QVERIFY(testFile.remove());
@@ -265,7 +291,7 @@ void tst_QFileSystemWatcher::watchDirectory()
     eventLoop.exec();
 
     // remove the directory, should get a signal from the watcher
-    QVERIFY(QDir().rmdir("testDir"));
+    QVERIFY(temporaryDir.rmdir(testDirName));
 
     // waiting max 5 seconds for notification for directory removal to trigger
 #ifdef Q_OS_WINCE
@@ -276,15 +302,16 @@ void tst_QFileSystemWatcher::watchDirectory()
     QCOMPARE(changedSpy.at(1).count(), 1);
 
     fileName = changedSpy.at(0).at(0).toString();
-    QCOMPARE(fileName, testDir.dirName());
+    QCOMPARE(fileName, testDir.absolutePath());
     fileName = changedSpy.at(1).at(0).toString();
-    QCOMPARE(fileName, testDir.dirName());
+    QCOMPARE(fileName, testDir.absolutePath());
 
     changedSpy.clear();
 
     // recreate the file, we should not get any notification
-    if (!QDir().mkdir("testDir"))
-        QSKIP("Failed to recreate directory, skipping final test.");
+    if (!temporaryDir.mkdir(testDirName))
+        QSKIP(qPrintable(QString::fromLatin1("Failed to recreate directory '%1' under '%2', skipping final test.").
+                         arg(testDirName, temporaryDir.absolutePath())));
 
     // waiting max 5 seconds for notification for dir recreation to trigger
     timer.start(5000);
@@ -292,7 +319,7 @@ void tst_QFileSystemWatcher::watchDirectory()
 
     QCOMPARE(changedSpy.count(), 0);
 
-    QVERIFY(QDir().rmdir("testDir"));
+    QVERIFY(temporaryDir.rmdir(testDirName));
 }
 
 void tst_QFileSystemWatcher::addPath()
@@ -360,8 +387,15 @@ void tst_QFileSystemWatcher::removePaths()
 void tst_QFileSystemWatcher::watchFileAndItsDirectory()
 {
     QFETCH(QString, backend);
-    QDir().mkdir("testDir");
-    QDir testDir("testDir");
+
+    QTemporaryDir temporaryDirectory(m_tempDirPattern);
+    QVERIFY(temporaryDirectory.isValid());
+
+    QDir temporaryDir(temporaryDirectory.path());
+    const QString testDirName = QStringLiteral("testDir");
+    QVERIFY(temporaryDir.mkdir(testDirName));
+    QDir testDir = temporaryDir;
+    QVERIFY(testDir.cd(testDirName));
 
     QString testFileName = testDir.filePath("testFile.txt");
     QString secondFileName = testDir.filePath("testFile2.txt");
@@ -378,7 +412,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
     QFileSystemWatcher watcher;
     watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
 
-    QVERIFY(watcher.addPath(testDir.dirName()));
+    QVERIFY(watcher.addPath(testDir.absolutePath()));
     QVERIFY(watcher.addPath(testFileName));
 
     QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(const QString &)));
@@ -443,17 +477,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
     QCOMPARE(fileChangedSpy.count(), 0);
     QCOMPARE(dirChangedSpy.count(), 1);
 
-    QVERIFY(QDir().rmdir("testDir"));
-}
-
-void tst_QFileSystemWatcher::cleanup()
-{
-    QDir testDir("testDir");
-    QString testFileName = testDir.filePath("testFile.txt");
-    QString secondFileName = testDir.filePath("testFile2.txt");
-    QFile::remove(testFileName);
-    QFile::remove(secondFileName);
-    QDir().rmdir("testDir");
+    QVERIFY(temporaryDir.rmdir(testDirName));
 }
 
 void tst_QFileSystemWatcher::nonExistingFile()
@@ -475,22 +499,33 @@ void tst_QFileSystemWatcher::nonExistingFile()
 
 void tst_QFileSystemWatcher::removeFileAndUnWatch()
 {
-    static const char * const filename = "foo.txt";
+    QTemporaryDir temporaryDirectory(m_tempDirPattern);
+    QVERIFY(temporaryDirectory.isValid());
+
+    const QString filename = temporaryDirectory.path() + QStringLiteral("/foo.txt");
+
     QFileSystemWatcher watcher;
 
     {
         QFile testFile(filename);
-        testFile.open(QIODevice::WriteOnly);
+        QVERIFY2(testFile.open(QIODevice::WriteOnly),
+                 qPrintable(QString::fromLatin1("Cannot open %1 for writing: %2").arg(filename, testFile.errorString())));
         testFile.close();
     }
     QVERIFY(watcher.addPath(filename));
 
     QFile::remove(filename);
-    QVERIFY(watcher.removePath(filename));
+    /* There are potential race conditions here; the watcher thread might remove the file from its list
+     * before the call to watcher.removePath(), which then fails. When that happens, the auto-signal
+     * notification to remove the file from the watcher's main list will not be delivered before the next
+     * event loop such that the call to watcher.addPath() fails since the file is still in the main list. */
+    if (!watcher.removePath(filename))
+        QSKIP("Skipping remaining test due to race condition.");
 
     {
         QFile testFile(filename);
-        testFile.open(QIODevice::WriteOnly);
+        QVERIFY2(testFile.open(QIODevice::WriteOnly),
+                 qPrintable(QString::fromLatin1("Cannot open %1 for writing: %2").arg(filename, testFile.errorString())));
         testFile.close();
     }
     QVERIFY(watcher.addPath(filename));
-- 
cgit v1.2.3


From ded417b75a95cb5e3622f95d41f81c024aa532fb Mon Sep 17 00:00:00 2001
From: Kent Hansen 
Date: Mon, 13 Feb 2012 11:48:03 +0100
Subject: Add autotest for QMetaMethod introspection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This autotest checks that meta-methods can be properly inspected
(signature, return type, parameter types, etc.).

Change-Id: I13dc75ec5123280e94ec738dade3f54e427fdbaa
Reviewed-by: Olivier Goffart 
Reviewed-by: João Abecasis 
Reviewed-by: Bradley T. Hughes 
---
 tests/auto/corelib/kernel/kernel.pro               |   1 +
 .../corelib/kernel/qmetamethod/qmetamethod.pro     |   5 +
 .../corelib/kernel/qmetamethod/tst_qmetamethod.cpp | 615 +++++++++++++++++++++
 3 files changed, 621 insertions(+)
 create mode 100644 tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro
 create mode 100644 tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro
index 1020899d94..7ec01d4a36 100644
--- a/tests/auto/corelib/kernel/kernel.pro
+++ b/tests/auto/corelib/kernel/kernel.pro
@@ -6,6 +6,7 @@ SUBDIRS=\
     qmath \
     qmetaobject \
     qmetaobjectbuilder \
+    qmetamethod \
     qmetaproperty \
     qmetatype \
     qmimedata \
diff --git a/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro b/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro
new file mode 100644
index 0000000000..f909742748
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetamethod/qmetamethod.pro
@@ -0,0 +1,5 @@
+CONFIG += testcase
+TARGET = tst_qmetamethod
+QT = core testlib
+SOURCES = tst_qmetamethod.cpp
+macx:CONFIG -= app_bundle
diff --git a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
new file mode 100644
index 0000000000..cb34d411fd
--- /dev/null
+++ b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
@@ -0,0 +1,615 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include 
+
+#include 
+#include 
+
+class tst_QMetaMethod : public QObject
+{
+    Q_OBJECT
+
+private slots:
+    void method_data();
+    void method();
+};
+
+struct CustomType { };
+Q_DECLARE_METATYPE(CustomType)
+
+struct CustomUnregisteredType { };
+
+Q_DECLARE_METATYPE(QMetaMethod::Access)
+Q_DECLARE_METATYPE(QMetaMethod::MethodType)
+
+class MethodTestObject : public QObject
+{
+    Q_OBJECT
+public:
+    Q_INVOKABLE MethodTestObject();
+    Q_INVOKABLE MethodTestObject(int constructorIntArg);
+    Q_INVOKABLE MethodTestObject(qreal constructorQRealArg);
+    Q_INVOKABLE MethodTestObject(const QString &constructorQStringArg);
+    Q_INVOKABLE MethodTestObject(CustomType constructorCustomTypeArg);
+    Q_INVOKABLE MethodTestObject(CustomUnregisteredType constructorCustomUnregisteredTypeArg);
+    Q_INVOKABLE MethodTestObject(bool boolArg, int intArg, uint uintArg,
+                                 qlonglong longlongArg, qulonglong ulonglongArg,
+                                 double doubleArg, long longArg, short shortArg,
+                                 char charArg, ulong ulongArg, ushort ushortArg,
+                                 uchar ucharArg, float floatArg);
+    Q_INVOKABLE MethodTestObject(bool, int);
+
+    Q_INVOKABLE void voidInvokable();
+    Q_INVOKABLE void voidInvokableInt(int voidInvokableIntArg);
+    Q_INVOKABLE void voidInvokableQReal(qreal voidInvokableQRealArg);
+    Q_INVOKABLE void voidInvokableQString(const QString &voidInvokableQStringArg);
+    Q_INVOKABLE void voidInvokableCustomType(CustomType voidInvokableCustomTypeArg);
+    Q_INVOKABLE void voidInvokableCustomUnregisteredType(CustomUnregisteredType voidInvokableCustomUnregisteredTypeArg);
+    Q_INVOKABLE bool boolInvokable();
+    Q_INVOKABLE qreal qrealInvokable();
+    Q_INVOKABLE QString qstringInvokable();
+    Q_INVOKABLE CustomType customTypeInvokable();
+    Q_INVOKABLE CustomUnregisteredType customUnregisteredTypeInvokable();
+    Q_INVOKABLE QVariant qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(
+        bool boolArg, int intArg, uint uintArg, qlonglong longlongArg, qulonglong ulonglongArg, double doubleArg,
+        long longArg, short shortArg, char charArg, ulong ulongArg, ushort ushortArg, uchar ucharArg, float floatArg);
+    Q_INVOKABLE void voidInvokableNoParameterNames(bool, int);
+public slots:
+    void voidSlot();
+    void voidSlotInt(int voidSlotIntArg);
+    void voidSlotQReal(qreal voidSlotQRealArg);
+    void voidSlotQString(const QString &voidSlotQStringArg);
+    void voidSlotCustomType(CustomType voidSlotCustomTypeArg);
+    void voidSlotCustomUnregisteredType(CustomUnregisteredType voidSlotCustomUnregisteredTypeArg);
+    bool boolSlot();
+    qreal qrealSlot();
+    QString qstringSlot();
+    CustomType customTypeSlot();
+    CustomUnregisteredType customUnregisteredTypeSlot();
+    QVariant qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(
+        bool boolArg, int intArg, uint uintArg, qlonglong longlongArg, qulonglong ulonglongArg, double doubleArg,
+        long longArg, short shortArg, char charArg, ulong ulongArg, ushort ushortArg, uchar ucharArg, float floatArg);
+    void voidSlotNoParameterNames(bool, int);
+signals:
+    void voidSignal();
+    void voidSignalInt(int voidSignalIntArg);
+    void voidSignalQReal(qreal voidSignalQRealArg);
+    void voidSignalQString(const QString &voidSignalQStringArg);
+    void voidSignalCustomType(CustomType voidSignalCustomTypeArg);
+    void voidSignalCustomUnregisteredType(CustomUnregisteredType voidSignalCustomUnregisteredTypeArg);
+    bool boolSignal();
+    qreal qrealSignal();
+    QString qstringSignal();
+    CustomType customTypeSignal();
+    CustomUnregisteredType customUnregisteredTypeSignal();
+    QVariant qvariantSignalBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(
+        bool boolArg, int intArg, uint uintArg, qlonglong longlongArg, qulonglong ulonglongArg, double doubleArg,
+        long longArg, short shortArg, char charArg, ulong ulongArg, ushort ushortArg, uchar ucharArg, float floatArg);
+    void voidSignalNoParameterNames(bool, int);
+};
+
+MethodTestObject::MethodTestObject() {}
+MethodTestObject::MethodTestObject(int) {}
+MethodTestObject::MethodTestObject(qreal) {}
+MethodTestObject::MethodTestObject(const QString &) {}
+MethodTestObject::MethodTestObject(CustomType) {}
+MethodTestObject::MethodTestObject(CustomUnregisteredType) {}
+MethodTestObject::MethodTestObject(bool, int, uint, qlonglong, qulonglong,
+                                   double, long, short, char, ulong, ushort,
+                                   uchar, float) {}
+MethodTestObject::MethodTestObject(bool, int) {}
+
+void MethodTestObject::voidInvokable() {}
+void MethodTestObject::voidInvokableInt(int) {}
+void MethodTestObject::voidInvokableQReal(qreal) {}
+void MethodTestObject::voidInvokableQString(const QString &) {}
+void MethodTestObject::voidInvokableCustomType(CustomType) {}
+void MethodTestObject::voidInvokableCustomUnregisteredType(CustomUnregisteredType) {}
+bool MethodTestObject::boolInvokable() { return true; }
+qreal MethodTestObject::qrealInvokable() { return 1.0; }
+QString MethodTestObject::qstringInvokable() { return QString(); }
+CustomType MethodTestObject::customTypeInvokable() { return CustomType(); }
+CustomUnregisteredType MethodTestObject::customUnregisteredTypeInvokable()
+{
+    return CustomUnregisteredType();
+}
+QVariant MethodTestObject::qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(
+    bool, int, uint, qlonglong, qulonglong, double, long, short, char, ulong, ushort, uchar, float)
+{
+    return QVariant();
+}
+void MethodTestObject::voidInvokableNoParameterNames(bool, int) {}
+
+void MethodTestObject::voidSlot() {}
+void MethodTestObject::voidSlotInt(int) {}
+void MethodTestObject::voidSlotQReal(qreal) {}
+void MethodTestObject::voidSlotQString(const QString &) {}
+void MethodTestObject::voidSlotCustomType(CustomType) {}
+void MethodTestObject::voidSlotCustomUnregisteredType(CustomUnregisteredType) {}
+bool MethodTestObject::boolSlot() { return true; }
+qreal MethodTestObject::qrealSlot() { return 1.0; }
+QString MethodTestObject::qstringSlot() { return QString(); }
+CustomType MethodTestObject::customTypeSlot() { return CustomType(); }
+CustomUnregisteredType MethodTestObject::customUnregisteredTypeSlot()
+{
+    return CustomUnregisteredType();
+}
+QVariant MethodTestObject::qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat(
+    bool, int, uint, qlonglong, qulonglong, double, long, short, char, ulong, ushort, uchar, float)
+{
+    return QVariant();
+}
+void MethodTestObject::voidSlotNoParameterNames(bool, int) {}
+
+void tst_QMetaMethod::method_data()
+{
+    QTest::addColumn("signature");
+    QTest::addColumn("returnType");
+    QTest::addColumn("returnTypeName");
+    QTest::addColumn >("parameterTypes");
+    QTest::addColumn >("parameterTypeNames");
+    QTest::addColumn >("parameterNames");
+    QTest::addColumn("access");
+    QTest::addColumn("methodType");
+
+    QTest::newRow("voidSignal")
+            << QByteArray("voidSignal()")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokable")
+            << QByteArray("voidInvokable()")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlot")
+            << QByteArray("voidSlot()")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject()")
+            << QByteArray("MethodTestObject()")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+
+    QTest::newRow("voidSignalInt")
+            << QByteArray("voidSignalInt(int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Int))
+            << (QList() << QByteArray("int"))
+            << (QList() << QByteArray("voidSignalIntArg"))
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokableInt")
+            << QByteArray("voidInvokableInt(int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Int))
+            << (QList() << QByteArray("int"))
+            << (QList() << QByteArray("voidInvokableIntArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlotInt")
+            << QByteArray("voidSlotInt(int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Int))
+            << (QList() << QByteArray("int"))
+            << (QList() << QByteArray("voidSlotIntArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject(int)")
+            << QByteArray("MethodTestObject(int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Int))
+            << (QList() << QByteArray("int"))
+            << (QList() << QByteArray("constructorIntArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+
+    QTest::newRow("voidSignalQReal")
+            << QByteArray("voidSignalQReal(qreal)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("qreal"))
+            << (QList() << QByteArray("voidSignalQRealArg"))
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokableQReal")
+            << QByteArray("voidInvokableQReal(qreal)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("qreal"))
+            << (QList() << QByteArray("voidInvokableQRealArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlotQReal")
+            << QByteArray("voidSlotQReal(qreal)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("qreal"))
+            << (QList() << QByteArray("voidSlotQRealArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject(qreal)")
+            << QByteArray("MethodTestObject(qreal)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("qreal"))
+            << (QList() << QByteArray("constructorQRealArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+
+    QTest::newRow("voidSignalQString")
+            << QByteArray("voidSignalQString(QString)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::QString))
+            << (QList() << QByteArray("QString"))
+            << (QList() << QByteArray("voidSignalQStringArg"))
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokableQString")
+            << QByteArray("voidInvokableQString(QString)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::QString))
+            << (QList() << QByteArray("QString"))
+            << (QList() << QByteArray("voidInvokableQStringArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlotQString")
+            << QByteArray("voidSlotQString(QString)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::QString))
+            << (QList() << QByteArray("QString"))
+            << (QList() << QByteArray("voidSlotQStringArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject(QString)")
+            << QByteArray("MethodTestObject(QString)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::QString))
+            << (QList() << QByteArray("QString"))
+            << (QList() << QByteArray("constructorQStringArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+
+    QTest::newRow("voidSignalCustomType")
+            << QByteArray("voidSignalCustomType(CustomType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("CustomType"))
+            << (QList() << QByteArray("voidSignalCustomTypeArg"))
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokableCustomType")
+            << QByteArray("voidInvokableCustomType(CustomType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("CustomType"))
+            << (QList() << QByteArray("voidInvokableCustomTypeArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlotCustomType")
+            << QByteArray("voidSlotCustomType(CustomType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("CustomType"))
+            << (QList() << QByteArray("voidSlotCustomTypeArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject(CustomType)")
+            << QByteArray("MethodTestObject(CustomType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << qMetaTypeId())
+            << (QList() << QByteArray("CustomType"))
+            << (QList() << QByteArray("constructorCustomTypeArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+
+    QTest::newRow("voidSignalCustomUnregisteredType")
+            << QByteArray("voidSignalCustomUnregisteredType(CustomUnregisteredType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << 0)
+            << (QList() << QByteArray("CustomUnregisteredType"))
+            << (QList() << QByteArray("voidSignalCustomUnregisteredTypeArg"))
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokableCustomUnregisteredType")
+            << QByteArray("voidInvokableCustomUnregisteredType(CustomUnregisteredType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << 0)
+            << (QList() << QByteArray("CustomUnregisteredType"))
+            << (QList() << QByteArray("voidInvokableCustomUnregisteredTypeArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlotCustomUnregisteredType")
+            << QByteArray("voidSlotCustomUnregisteredType(CustomUnregisteredType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << 0)
+            << (QList() << QByteArray("CustomUnregisteredType"))
+            << (QList() << QByteArray("voidSlotCustomUnregisteredTypeArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject(CustomUnregisteredType)")
+            << QByteArray("MethodTestObject(CustomUnregisteredType)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << 0)
+            << (QList() << QByteArray("CustomUnregisteredType"))
+            << (QList() << QByteArray("constructorCustomUnregisteredTypeArg"))
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+
+    QTest::newRow("boolSignal")
+            << QByteArray("boolSignal()")
+            << int(QMetaType::Bool) << QByteArray("bool")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("boolInvokable")
+            << QByteArray("boolInvokable()")
+            << int(QMetaType::Bool) << QByteArray("bool")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("boolSlot")
+            << QByteArray("boolSlot()")
+            << int(QMetaType::Bool) << QByteArray("bool")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("qrealSignal")
+            << QByteArray("qrealSignal()")
+            << int(QMetaType::QReal) << QByteArray("qreal")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("qrealInvokable")
+            << QByteArray("qrealInvokable()")
+            << int(QMetaType::QReal) << QByteArray("qreal")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("qrealSlot")
+            << QByteArray("qrealSlot()")
+            << int(QMetaType::QReal) << QByteArray("qreal")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("qstringSignal")
+            << QByteArray("qstringSignal()")
+            << int(QMetaType::QString) << QByteArray("QString")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("qstringInvokable")
+            << QByteArray("qstringInvokable()")
+            << int(QMetaType::QString) << QByteArray("QString")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("qstringSlot")
+            << QByteArray("qstringSlot()")
+            << int(QMetaType::QString) << QByteArray("QString")
+            << (QList())
+            << (QList())
+            << (QList())
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    {
+        QList parameterTypes = QList()
+                << int(QMetaType::Bool) << int(QMetaType::Int) << int(QMetaType::UInt)
+                << int(QMetaType::LongLong) << int(QMetaType::ULongLong) << int(QMetaType::Double)
+                << int(QMetaType::Long) << int(QMetaType::Short) << int(QMetaType::Char)
+                << int(QMetaType::ULong) << int(QMetaType::UShort) << int(QMetaType::UChar)
+                << int(QMetaType::Float);
+        QList parameterTypeNames = QList()
+                << QByteArray("bool") << QByteArray("int") << QByteArray("uint")
+                << QByteArray("qlonglong") << QByteArray("qulonglong") << QByteArray("double")
+                << QByteArray("long") << QByteArray("short") << QByteArray("char") << QByteArray("ulong")
+                << QByteArray("ushort") << QByteArray("uchar") << QByteArray("float");
+        QList parameterNames = QList()
+                << QByteArray("boolArg") << QByteArray("intArg") << QByteArray("uintArg")
+                << QByteArray("longlongArg") << QByteArray("ulonglongArg") << QByteArray("doubleArg")
+                << QByteArray("longArg") << QByteArray("shortArg") << QByteArray("charArg")
+                << QByteArray("ulongArg") << QByteArray("ushortArg") << QByteArray("ucharArg")
+                << QByteArray("floatArg");
+
+        QTest::newRow("qvariantSignalBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat")
+                << QByteArray("qvariantSignalBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat("
+                              "bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)")
+                << int(QMetaType::QVariant) << QByteArray("QVariant")
+                << parameterTypes << parameterTypeNames << parameterNames
+                << QMetaMethod::Protected
+                << QMetaMethod::Signal;
+
+        QTest::newRow("qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat")
+                << QByteArray("qvariantInvokableBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat("
+                              "bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)")
+                << int(QMetaType::QVariant) << QByteArray("QVariant")
+                << parameterTypes << parameterTypeNames << parameterNames
+                << QMetaMethod::Public
+                << QMetaMethod::Method;
+
+        QTest::newRow("qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat")
+                << QByteArray("qvariantSlotBoolIntUIntLonglongULonglongDoubleLongShortCharUlongUshortUcharFloat("
+                              "bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)")
+                << int(QMetaType::QVariant) << QByteArray("QVariant")
+                << parameterTypes << parameterTypeNames << parameterNames
+                << QMetaMethod::Public
+                << QMetaMethod::Slot;
+
+        QTest::newRow("MethodTestObject(bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)")
+                << QByteArray("MethodTestObject(bool,int,uint,qlonglong,qulonglong,double,long,short,char,ulong,ushort,uchar,float)")
+                << int(QMetaType::Void) << QByteArray("")
+                << parameterTypes << parameterTypeNames << parameterNames
+                << QMetaMethod::Public
+                << QMetaMethod::Constructor;
+    }
+
+    QTest::newRow("voidSignalNoParameterNames")
+            << QByteArray("voidSignalNoParameterNames(bool,int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Bool) << int(QMetaType::Int))
+            << (QList() << QByteArray("bool") << QByteArray("int"))
+            << (QList() << QByteArray("") << QByteArray(""))
+            << QMetaMethod::Protected
+            << QMetaMethod::Signal;
+
+    QTest::newRow("voidInvokableNoParameterNames")
+            << QByteArray("voidInvokableNoParameterNames(bool,int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Bool) << int(QMetaType::Int))
+            << (QList() << QByteArray("bool") << QByteArray("int"))
+            << (QList() << QByteArray("") << QByteArray(""))
+            << QMetaMethod::Public
+            << QMetaMethod::Method;
+
+    QTest::newRow("voidSlotNoParameterNames")
+            << QByteArray("voidSlotNoParameterNames(bool,int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Bool) << int(QMetaType::Int))
+            << (QList() << QByteArray("bool") << QByteArray("int"))
+            << (QList() << QByteArray("") << QByteArray(""))
+            << QMetaMethod::Public
+            << QMetaMethod::Slot;
+
+    QTest::newRow("MethodTestObject(bool,int)")
+            << QByteArray("MethodTestObject(bool,int)")
+            << int(QMetaType::Void) << QByteArray("")
+            << (QList() << int(QMetaType::Bool) << int(QMetaType::Int))
+            << (QList() << QByteArray("bool") << QByteArray("int"))
+            << (QList() << QByteArray("") << QByteArray(""))
+            << QMetaMethod::Public
+            << QMetaMethod::Constructor;
+}
+
+void tst_QMetaMethod::method()
+{
+    QFETCH(QByteArray, signature);
+    QFETCH(int, returnType);
+    QFETCH(QByteArray, returnTypeName);
+    QFETCH(QList, parameterTypes);
+    QFETCH(QList, parameterTypeNames);
+    QFETCH(QList, parameterNames);
+    QFETCH(QMetaMethod::MethodType, methodType);
+    QFETCH(QMetaMethod::Access, access);
+
+    QVERIFY(parameterTypes.size() == parameterTypeNames.size());
+    QVERIFY(parameterTypes.size() == parameterNames.size());
+
+    const QMetaObject *mo = &MethodTestObject::staticMetaObject;
+    int index = (methodType == QMetaMethod::Constructor)
+                ? mo->indexOfConstructor(signature) : mo->indexOfMethod(signature);
+    QVERIFY(index != -1);
+    QMetaMethod method = (methodType == QMetaMethod::Constructor)
+                         ? mo->constructor(index) : mo->method(index);
+    QCOMPARE(method.methodType(), methodType);
+    QCOMPARE(method.access(), access);
+
+    QCOMPARE(method.signature(), signature.constData());
+
+    QCOMPARE(method.tag(), "");
+
+    QCOMPARE(method.typeName(), returnTypeName.constData());
+    QCOMPARE(QMetaType::type(method.typeName()), returnType);
+
+    QCOMPARE(method.parameterTypes(), parameterTypeNames);
+    QCOMPARE(method.parameterNames(), parameterNames);
+}
+
+QTEST_MAIN(tst_QMetaMethod)
+#include "tst_qmetamethod.moc"
-- 
cgit v1.2.3


From 79e90762748865af9ed3d9260aceaaf69c34d252 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen 
Date: Wed, 15 Feb 2012 15:22:35 +0200
Subject: Remove XFAIL in QGraphicsWidget test for Windows

The XFAILed initStyleOption() case passes on Windows, so do not XFAIL
it there.

Task-number: QTBUG-24297
Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7
Reviewed-by: Friedemann Kleint 
---
 .../auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'tests/auto')

diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 0607d2ab30..0a2d0cd2f8 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -1157,8 +1157,10 @@ void tst_QGraphicsWidget::initStyleOption()
     bool hasFocus = option.state & QStyle::State_HasFocus;
     QCOMPARE(hasFocus, focus);
     bool isUnderMouse = option.state & QStyle::State_MouseOver;
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_MAC)
+#ifndef Q_OS_WINCE
+# if !defined(Q_OS_MAC) && !defined(Q_OS_WIN)
     QEXPECT_FAIL("all", "QTBUG-22457", Abort);
+# endif
     QCOMPARE(isUnderMouse, underMouse);
 #endif
     // if (layoutDirection != Qt::LeftToRight)
-- 
cgit v1.2.3


From 656dff47a6f2c5e53c1bb2e54bf21e053c82c32a Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen 
Date: Wed, 15 Feb 2012 13:23:22 +0200
Subject: Fix tst_QFileDialog2 for Windows 7.

There are no rights for typical user or even administrator to write
directly under c:\ root in windows without rights elevation, so
completionOnLevelAfterRoot() test case failed. Changed the test case
to use an existing directory.

Task-number: QTBUG-24289
Change-Id: I6a8dfc9d1d6ae798b3b9049c542b45fdbdbd9a8c
Reviewed-by: Friedemann Kleint 
---
 .../dialogs/qfiledialog2/tst_qfiledialog2.cpp      | 44 +++++++++++++++++-----
 1 file changed, 35 insertions(+), 9 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 472469e797..7ab3100cab 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -559,9 +559,39 @@ void tst_QFileDialog2::completionOnLevelAfterRoot()
 {
     QNonNativeFileDialog fd;
 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-    fd.setDirectory("C:");
+    fd.setDirectory("C:/");
     QDir current = fd.directory();
-    current.mkdir("completionOnLevelAfterRootTest");
+    QStringList entryList = current.entryList(QStringList(), QDir::Dirs);
+    // Find a suitable test dir under c:-root:
+    // - At least 6 characters long
+    // - Ascii, letters only
+    // - No another dir with same start
+    QString testDir;
+    foreach (const QString &entry, entryList) {
+        if (entry.size() > 5 && QString(entry.toAscii()).compare(entry) == 0) {
+            bool invalid = false;
+            for (int i = 0; i < 5; i++) {
+                if (!entry.at(i).isLetter()) {
+                    invalid = true;
+                    break;
+                }
+            }
+            if (!invalid) {
+                foreach (const QString &check, entryList) {
+                    if (check.startsWith(entry.left(5)) && check != entry) {
+                        invalid = true;
+                        break;
+                    }
+                }
+            }
+            if (!invalid) {
+                testDir = entry;
+                break;
+            }
+        }
+    }
+    if (testDir.isEmpty())
+        QSKIP("This test requires to have an unique directory of at least six ascii characters under c:/");
 #else
     fd.setFilter(QDir::Hidden | QDir::AllDirs | QDir::Files | QDir::System);
     fd.setDirectory("/");
@@ -574,11 +604,8 @@ void tst_QFileDialog2::completionOnLevelAfterRoot()
     QTest::qWait(2000);
 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
     //I love testlib :D
-    QTest::keyClick(edit, Qt::Key_C);
-    QTest::keyClick(edit, Qt::Key_O);
-    QTest::keyClick(edit, Qt::Key_M);
-    QTest::keyClick(edit, Qt::Key_P);
-    QTest::keyClick(edit, Qt::Key_L);
+    for (int i = 0; i < 5; i++)
+        QTest::keyClick(edit, testDir.at(i).toLower().toAscii() - 'a' + Qt::Key_A);
 #else
     QTest::keyClick(edit, Qt::Key_E);
     QTest::keyClick(edit, Qt::Key_T);
@@ -587,8 +614,7 @@ void tst_QFileDialog2::completionOnLevelAfterRoot()
     QTest::keyClick(edit->completer()->popup(), Qt::Key_Down);
     QTest::qWait(200);
 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-    QCOMPARE(edit->text(), QString("completionOnLevelAfterRootTest"));
-    current.rmdir("completionOnLevelAfterRootTest");
+    QCOMPARE(edit->text(), testDir);
 #else
     QTRY_COMPARE(edit->text(), QString("etc"));
 #endif
-- 
cgit v1.2.3


From 394315d902d9068a53439737906c00d48023d182 Mon Sep 17 00:00:00 2001
From: Stephen Kelly 
Date: Sat, 11 Feb 2012 01:10:07 +0100
Subject: Move the removal of the Quit event to QWindow.

Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b
Reviewed-by: Bradley T. Hughes 
---
 .../kernel/qguiapplication/tst_qguiapplication.cpp | 40 ++++++++++++++++++++++
 .../kernel/qapplication/tst_qapplication.cpp       | 40 ++++++++++++++++++++++
 2 files changed, 80 insertions(+)

(limited to 'tests/auto')

diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index 2fd875b7f4..8d0836e7c3 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -53,6 +53,7 @@ private slots:
     void focusObject();
     void allWindows();
     void topLevelWindows();
+    void abortQuitOnShow();
 };
 
 class DummyWindow : public QWindow
@@ -152,5 +153,44 @@ void tst_QGuiApplication::topLevelWindows()
     QCOMPARE(app.topLevelWindows().count(), 0);
 }
 
+class ShowCloseShowWindow : public QWindow
+{
+    Q_OBJECT
+public:
+    ShowCloseShowWindow(bool showAgain, QWindow *parent = 0)
+      : QWindow(parent), showAgain(showAgain)
+    {
+        QTimer::singleShot(0, this, SLOT(doClose()));
+        QTimer::singleShot(500, this, SLOT(exitApp()));
+    }
+
+private slots:
+    void doClose() {
+        close();
+        if (showAgain)
+            show();
+    }
+
+    void exitApp() {
+      qApp->exit(1);
+    }
+
+private:
+    bool showAgain;
+};
+
+void tst_QGuiApplication::abortQuitOnShow()
+{
+    int argc = 0;
+    QGuiApplication app(argc, 0);
+    QWindow *window1 = new ShowCloseShowWindow(false);
+    window1->show();
+    QCOMPARE(app.exec(), 0);
+
+    QWindow *window2 = new ShowCloseShowWindow(true);
+    window2->show();
+    QCOMPARE(app.exec(), 1);
+}
+
 QTEST_APPLESS_MAIN(tst_QGuiApplication)
 #include "tst_qguiapplication.moc"
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 7017c6157e..c600956912 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -149,6 +149,8 @@ private slots:
     void testQuitLock8();
 
     void globalStaticObjectDestruction(); // run this last
+
+    void abortQuitOnShow();
 };
 
 class EventSpy : public QObject
@@ -2560,6 +2562,44 @@ void tst_QApplication::testQuitLock8()
     // No hang = pass
 }
 
+class ShowCloseShowWidget : public QWidget
+{
+    Q_OBJECT
+public:
+    ShowCloseShowWidget(bool showAgain, QWidget *parent = 0)
+      : QWidget(parent), showAgain(showAgain)
+    {
+        QTimer::singleShot(0, this, SLOT(doClose()));
+        QTimer::singleShot(500, this, SLOT(exitApp()));
+    }
+
+private slots:
+    void doClose() {
+        close();
+        if (showAgain)
+            show();
+    }
+
+    void exitApp() {
+      qApp->exit(1);
+    }
+
+private:
+    bool showAgain;
+};
+
+void tst_QApplication::abortQuitOnShow()
+{
+    int argc = 0;
+    QApplication app(argc, 0);
+    QWidget *window1 = new ShowCloseShowWidget(false);
+    window1->show();
+    QCOMPARE(app.exec(), 0);
+
+    QWidget *window2 = new ShowCloseShowWidget(true);
+    window2->show();
+    QCOMPARE(app.exec(), 1);
+}
 
 /*
     This test is meant to ensure that certain objects (public & commonly used)
-- 
cgit v1.2.3


From 18965b1384cb3f85dc9e2d9c961c343331e8bd47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= 
Date: Mon, 13 Feb 2012 13:01:59 +0100
Subject: Add QMetaType::FirstCoreType enum value.

We should not assume that the first type id is 0.

Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5
Reviewed-by: Kent Hansen 
---
 tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 001749e88e..ccdab17668 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -3542,6 +3542,7 @@ void tst_QVariant::loadQVariantFromDataStream(QDataStream::Version version)
     stream >> typeName >> loadedVariant;
 
     const int id = QMetaType::type(typeName.toLatin1());
+
     QVariant constructedVariant(static_cast(id));
     QCOMPARE(constructedVariant.userType(), id);
     QCOMPARE(QMetaType::typeName(loadedVariant.userType()), typeName.toLatin1().constData());
@@ -3616,7 +3617,7 @@ void tst_QVariant::debugStream_data()
 {
     QTest::addColumn("variant");
     QTest::addColumn("typeId");
-    for (int id = QMetaType::Void; id < QMetaType::User; ++id) {
+    for (int id = 0; id < QMetaType::User; ++id) {
         const char *tagName = QMetaType::typeName(id);
         if (!tagName)
             continue;
-- 
cgit v1.2.3


From 66603985f2de74ac5f3bd5d259f0e65f710f62d7 Mon Sep 17 00:00:00 2001
From: Stephen Kelly 
Date: Sat, 11 Feb 2012 01:33:55 +0100
Subject: Fix ref counted window close handling.

Instead of refcounting QWindow visibility, we ask the Application
subclass whether quitting is appropriate.

Task-Id: QTBUG-24120
Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d
Reviewed-by: Bradley T. Hughes 
Reviewed-by: Robin Burchell 
---
 .../kernel/qapplication/tst_qapplication.cpp       | 513 +--------------------
 1 file changed, 14 insertions(+), 499 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index c600956912..fcb6b93e99 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -137,16 +137,7 @@ private slots:
     void touchEventPropagation();
 
     void qtbug_12673();
-
-    void testQuitLockRef();
-    void testQuitLock1();
-    void testQuitLock2();
-    void testQuitLock3();
-    void testQuitLock4();
-    void testQuitLock5();
-    void testQuitLock6();
-    void testQuitLock7();
-    void testQuitLock8();
+    void noQuitOnHide();
 
     void globalStaticObjectDestruction(); // run this last
 
@@ -2060,506 +2051,30 @@ void tst_QApplication::qtbug_12673()
     QCOMPARE(testProcess.exitStatus(), QProcess::NormalExit);
 }
 
-class JobObject : public QObject
-{
-    Q_OBJECT
-public:
-    JobObject(int milliseconds, QObject *parent = 0)
-        : QObject(parent)
-    {
-        QTimer::singleShot(milliseconds, this, SLOT(timeout()));
-    }
-
-    JobObject(QObject *parent = 0)
-        : QObject(parent)
-    {
-        QTimer::singleShot(1000, this, SLOT(timeout()));
-    }
-
-private slots:
-    void timeout()
-    {
-        emit done();
-        deleteLater();
-    }
-
-signals:
-    void done();
-
-private:
-    QEventLoopLocker locker;
-};
-
-class QuitLockRefTester : public QObject
-{
-    Q_OBJECT
-public:
-    QuitLockRefTester(QObject *parent = 0)
-      : QObject(parent)
-    {
-        QTimer::singleShot(0, this, SLOT(doTest()));
-    }
-
-private slots:
-    void doTest()
-    {
-        QApplicationPrivate *privateClass = static_cast(QObjectPrivate::get(qApp));
-
-        {
-            QDialog *win1 = new QDialog;
-
-            // Test with a lock active so that the refcount doesn't drop to zero during these tests, causing a quit.
-            // (until we exit the scope)
-            QEventLoopLocker locker;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 1);
-
-            win1->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QDialog *win2 = new QDialog;
-
-            win2->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 3);
-
-            delete win1;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            delete win2;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 1);
-
-            win1 = new QDialog;
-
-            win1->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            JobObject *job1 = new JobObject(this);
-
-            QCOMPARE(privateClass->quitLockRef.load(), 3);
-
-            delete win1;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            delete job1;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 1);
-
-            QWidget *w1 = new QWidget;
-
-            w1->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QWidget *w2 = new QMainWindow;
-
-            w2->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 3);
-
-            QWidget *w3 = new QWidget(0, Qt::Dialog);
-
-            w3->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 4);
-
-            delete w3;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 3);
-
-            delete w2;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QWidget *subWidget1 = new QWidget(w1, Qt::Window);
-
-            // Even though We create a new widget and show it,
-            // the ref count does not go up because it is a child of
-            // w1, which is the top-level, and what we are actually
-            // refcounting.
-            subWidget1->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            // When we use setParent(0) and re-show, the
-            // ref count does increase:
-            QCOMPARE(subWidget1->isVisible(), true);
-            subWidget1->setParent(0);
-            QCOMPARE(subWidget1->isVisible(), false);
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            subWidget1->show();
-            QCOMPARE(subWidget1->isVisible(), true);
-            QCOMPARE(privateClass->quitLockRef.load(), 3);
-
-            subWidget1->setParent(w1);
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QWidget *subWidget2 = new QWidget(w1);
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            subWidget2->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            delete subWidget2;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QWidget *subWidget3 = new QWidget(w1);
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            subWidget3->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            subWidget3->hide();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            delete subWidget3;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QWidget *subWidget4 = new QWidget(subWidget1);
-            QWidget *subWidget5 = new QWidget(subWidget1);
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            QWidget *subWidget6 = new QWidget(subWidget4, Qt::Window);
-
-            subWidget6->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            delete w1;
-
-            QCOMPARE(privateClass->quitLockRef.load(), 1);
-
-            w1 = new QWidget;
-            w2 = new QWidget;
-            w3 = new QWidget;
-
-            QHBoxLayout *layout = new QHBoxLayout(w1);
-
-            layout->addWidget(w2);
-            layout->addWidget(w3);
-
-            QCOMPARE(privateClass->quitLockRef.load(), 1);
-
-            w1->show();
-
-            QCOMPARE(privateClass->quitLockRef.load(), 2);
-
-            w1->hide();
-            QCOMPARE(privateClass->quitLockRef.load(), 1);
-
-            delete w1;
-
-        }
-        QCOMPARE(privateClass->quitLockRef.load(), 0);
-    }
-};
-
-void tst_QApplication::testQuitLockRef()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qapplication" };
-    QApplication app(argc, argv);
-
-    QuitLockRefTester tester;
-
-    app.exec();
-}
-
-void tst_QApplication::testQuitLock1()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    QWidget *w = new QWidget;
-
-    w->show();
-
-    QMetaObject::invokeMethod(w, "close", Qt::QueuedConnection);
-
-    app.exec();
-
-    // No hang = pass.
-}
-
-void tst_QApplication::testQuitLock2()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    QWidget *w1 = new QWidget;
-
-    w1->show();
-
-    QWidget *w2 = new QWidget;
-
-    w2->show();
-
-    QMetaObject::invokeMethod(w1, "deleteLater", Qt::QueuedConnection);
-    QMetaObject::invokeMethod(w2, "hide", Qt::QueuedConnection);
-
-    app.exec();
-
-    // No hang = pass.
-}
-
-class Result : public QObject
+class NoQuitOnHideWidget : public QWidget
 {
     Q_OBJECT
 public:
-    Result(QObject *parent = 0)
-        : QObject(parent), m_passes(false)
+    NoQuitOnHideWidget(QWidget *parent = 0)
+      : QWidget(parent)
     {
-
-    }
-
-    bool result() const
-    {
-        return m_passes;
-    }
-
-public slots:
-
-    void setPasses()
-    {
-        setResult(true);
-    }
-
-    void setFails()
-    {
-        setResult(false);
-    }
-
-    void setResult(bool result)
-    {
-        m_passes = result;
-    }
-
-private:
-    bool m_passes;
-};
-
-void tst_QApplication::testQuitLock3()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    Result *result = new Result(&app);
-
-    JobObject *job = new JobObject(&app);
-
-    QObject::connect(job, SIGNAL(done()), result, SLOT(setPasses()));
-
-    app.exec();
-
-    QVERIFY(result->result());
-}
-
-void tst_QApplication::testQuitLock4()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    QWidget *w = new QWidget;
-
-    w->show();
-
-    Result *result = new Result(&app);
-    JobObject *job = new JobObject(1000, &app);
-
-    QTimer::singleShot(500, w, SLOT(deleteLater()));
-
-    QObject::connect(w, SIGNAL(destroyed()), result, SLOT(setFails()));
-    QObject::connect(job, SIGNAL(done()), result, SLOT(setPasses()));
-
-    app.exec();
-
-    QVERIFY(result->result());
-}
-
-class JobBeforeWindowRunner : public QObject
-{
-    Q_OBJECT
-public:
-    JobBeforeWindowRunner(QObject *parent = 0)
-    : QObject(parent), m_result(new Result(this))
-    {
-
-    }
-
-    void start()
-    {
-        JobObject *job = new JobObject(this);
-        connect(job, SIGNAL(done()), m_result, SLOT(setFails()));
-        connect(job, SIGNAL(destroyed()), SLOT(showWindowDelayed()), Qt::QueuedConnection);
+        QTimer::singleShot(0, this, SLOT(hide()));
+        QTimer::singleShot(500, this, SLOT(exitApp()));
     }
 
-    bool result() const { return m_result->result(); }
-
 private slots:
-    void showWindowDelayed()
-    {
-        qApp->setQuitLockEnabled(true);
-        QTimer::singleShot(500, this, SLOT(showWindow()));
-    }
-
-    void showWindow()
-    {
-        QWidget *w = new QWidget;
-        w->show();
-        w->deleteLater();
-        connect(w, SIGNAL(destroyed()), m_result, SLOT(setPasses()));
-    }
-
-private:
-    Result * const m_result;
-};
-
-void tst_QApplication::testQuitLock5()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-    app.setQuitLockEnabled(false);
-    // Run a job before showing a window, and only enable the refcounting
-    // after doing so.
-    // Although the job brings the refcount to zero, the app does not exit
-    // until setQuitLockEnabled is called and the feature re-enabled.
-
-    JobBeforeWindowRunner *eventRunner = new JobBeforeWindowRunner(&app);
-
-    eventRunner->start();
-
-    app.exec();
-
-    QVERIFY(eventRunner->result());
-}
-
-class JobDuringWindowRunner : public QObject
-{
-    Q_OBJECT
-public:
-    JobDuringWindowRunner(QObject *parent = 0)
-        : QObject(parent), m_result(new Result(this))
-    {
-
-    }
-
-    void start()
-    {
-        JobObject *job = new JobObject(this);
-
-        QWidget *w = new QWidget;
-        w->show();
-        w->deleteLater();
-
-        QObject::connect(w, SIGNAL(destroyed()), m_result, SLOT(setFails()));
-        QObject::connect(job, SIGNAL(done()), m_result, SLOT(setPasses()));
-    }
-
-    bool result() const { return m_result->result(); }
-
-private:
-    Result * const m_result;
-};
-
-void tst_QApplication::testQuitLock6()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    // A job runs, and while it is running, a window is shown and closed,
-    // then the job ends, which causes the quit.
-
-    JobDuringWindowRunner *eventRunner = new JobDuringWindowRunner(&app);
-
-    eventRunner->start();
-
-    app.exec();
-
-    QVERIFY(eventRunner->result());
-}
-class JobWindowJobWindowRunner : public QObject
-{
-    Q_OBJECT
-public:
-    JobWindowJobWindowRunner(QObject *parent = 0)
-        : QObject(parent), m_result(new Result(this))
-    {
-
-    }
-
-    void start()
-    {
-        JobObject *job = new JobObject(500, this);
-
-        QWidget *w = new QWidget;
-        w->show();
-        QTimer::singleShot(1000, w, SLOT(deleteLater()));
-
-        QObject::connect(w, SIGNAL(destroyed()), m_result, SLOT(setPasses()));
-        QObject::connect(job, SIGNAL(done()), m_result, SLOT(setFails()));
+    void exitApp() {
+      qApp->exit(1);
     }
-
-    bool result() const { return m_result->result(); }
-private:
-    Result * const m_result;
 };
 
-void tst_QApplication::testQuitLock7()
+void tst_QApplication::noQuitOnHide()
 {
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    // A job runs, and while it is running, a window is shown
-    // then the job ends, then the window is closed, which causes the quit.
-
-    JobWindowJobWindowRunner *eventRunner = new JobWindowJobWindowRunner(&app);
-
-    eventRunner->start();
-
-    app.exec();
-
-    QVERIFY(eventRunner->result());
-}
-
-void tst_QApplication::testQuitLock8()
-{
-    int argc = 1;
-    char *argv[] = { "tst_qcoreapplication" };
-    QApplication app(argc, argv);
-
-    QMainWindow *mw1 = new QMainWindow;
-    mw1->show();
-    QMainWindow *mw2 = new QMainWindow;
-    mw2->show();
-
-    QMetaObject::invokeMethod(mw1, "close", Qt::QueuedConnection);
-    QMetaObject::invokeMethod(mw2, "close", Qt::QueuedConnection);
-
-    app.exec();
-
-    // No hang = pass
+    int argc = 0;
+    QApplication app(argc, 0);
+    QWidget *window1 = new NoQuitOnHideWidget(false);
+    window1->show();
+    QCOMPARE(app.exec(), 1);
 }
 
 class ShowCloseShowWidget : public QWidget
-- 
cgit v1.2.3


From 7a5bb18dc68326537ff0dc81932e715f1d129a83 Mon Sep 17 00:00:00 2001
From: Rohan McGovern 
Date: Wed, 15 Feb 2012 17:56:30 +1000
Subject: Fixed tst_QFile when redirecting stdin/stdout/stderr to/from files.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

openStandardStreamsBufferedStreams would fail if standard streams were
redirected to a file (e.g. ./tst_qfile > testlog.txt).

openStandardStreamsFileDescriptors already has a workaround, so apply it
here too.

Change-Id: Iffe9d7864909e489e77c1114e80c4e3bc70a8722
Reviewed-by: João Abecasis 
---
 tests/auto/corelib/io/qfile/tst_qfile.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 0ed1b8ed5a..d1a0debf4d 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -3028,25 +3028,28 @@ void tst_QFile::openStandardStreamsBufferedStreams()
     {
         QFile in;
         in.open(stdin, QIODevice::ReadOnly);
+        if (!in.isSequential())
+            QSKIP("Standard input redirected.");
         QCOMPARE( in.pos(), (qint64)0 );
         QCOMPARE( in.size(), (qint64)0 );
-        QVERIFY( in.isSequential() );
     }
 
     {
         QFile out;
         out.open(stdout, QIODevice::WriteOnly);
+        if (!out.isSequential())
+            QSKIP("Standard output redirected.");
         QCOMPARE( out.pos(), (qint64)0 );
         QCOMPARE( out.size(), (qint64)0 );
-        QVERIFY( out.isSequential() );
     }
 
     {
         QFile err;
         err.open(stderr, QIODevice::WriteOnly);
+        if (!err.isSequential())
+            QSKIP("Standard error redirected.");
         QCOMPARE( err.pos(), (qint64)0 );
         QCOMPARE( err.size(), (qint64)0 );
-        QVERIFY( err.isSequential() );
     }
 }
 
-- 
cgit v1.2.3


From 214e031d56714ba69ef929f1e763e243b393e460 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= 
Date: Tue, 20 Dec 2011 17:11:46 +0100
Subject: Implement new static less API for QMetaType.

Currently QMetaType API contains almost only static methods. This works
nice until someone needs more information or needs to do more operations
on a type. In this case every function call has to do type dispatch.

This API allows to avoid redundant type dispatching, by caching a
type information in a QMetaType instance. It gives significant
performance boost especially for custom types (up to 9x).

Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f
Reviewed-by: Stephen Kelly 
Reviewed-by: Bradley T. Hughes 
---
 .../corelib/kernel/qmetatype/tst_qmetatype.cpp     | 156 ++++++++++++++++++---
 1 file changed, 133 insertions(+), 23 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index f90e7f463f..72913d10f2 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -78,8 +78,12 @@ private slots:
     void createCopy();
     void sizeOf_data();
     void sizeOf();
+    void sizeOfStaticLess_data();
+    void sizeOfStaticLess();
     void flags_data();
     void flags();
+    void flagsStaticLess_data();
+    void flagsStaticLess();
     void construct_data();
     void construct();
     void constructCopy_data();
@@ -88,6 +92,8 @@ private slots:
     void registerType();
     void isRegistered_data();
     void isRegistered();
+    void isRegisteredStaticLess_data();
+    void isRegisteredStaticLess();
     void registerStreamBuiltin();
     void automaticTemplateRegistration();
 };
@@ -125,6 +131,9 @@ class MetaTypeTorturer: public QThread
 protected:
     void run()
     {
+        Bar space[1];
+        space[0].~Bar();
+
         for (int i = 0; i < 1000; ++i) {
             const QByteArray name = QString("Bar%1_%2").arg(i).arg((size_t)QThread::currentThreadId()).toLatin1();
             const char *nm = name.constData();
@@ -132,6 +141,15 @@ protected:
 #ifdef Q_OS_LINUX
             pthread_yield();
 #endif
+            QMetaType info(tp);
+            if (!info.isValid()) {
+                ++failureCount;
+                qWarning() << "Wrong typeInfo returned for" << tp;
+            }
+            if (!info.isRegistered()) {
+                ++failureCount;
+                qWarning() << name << "is not a registered metatype";
+            }
             if (QMetaType::typeFlags(tp) != (QMetaType::NeedsConstruction | QMetaType::NeedsDestruction)) {
                 ++failureCount;
                 qWarning() << "Wrong typeInfo returned for" << tp;
@@ -148,9 +166,22 @@ protected:
                 ++failureCount;
                 qWarning() << "Wrong typeName returned for" << tp;
             }
-            void *buf = QMetaType::create(tp, 0);
-            void *buf2 = QMetaType::create(tp, buf);
-            if (!buf) {
+            void *buf1 = QMetaType::create(tp, 0);
+            void *buf2 = QMetaType::create(tp, buf1);
+            void *buf3 = info.create(tp, 0);
+            void *buf4 = info.create(tp, buf1);
+
+            QMetaType::construct(tp, space, 0);
+            QMetaType::destruct(tp, space);
+            QMetaType::construct(tp, space, buf1);
+            QMetaType::destruct(tp, space);
+
+            info.construct(space, 0);
+            info.destruct(space);
+            info.construct(space, buf1);
+            info.destruct(space);
+
+            if (!buf1) {
                 ++failureCount;
                 qWarning() << "Null buffer returned by QMetaType::create(tp, 0)";
             }
@@ -158,9 +189,20 @@ protected:
                 ++failureCount;
                 qWarning() << "Null buffer returned by QMetaType::create(tp, buf)";
             }
-            QMetaType::destroy(tp, buf);
+            if (!buf3) {
+                ++failureCount;
+                qWarning() << "Null buffer returned by info.create(tp, 0)";
+            }
+            if (!buf4) {
+                ++failureCount;
+                qWarning() << "Null buffer returned by infocreate(tp, buf)";
+            }
+            QMetaType::destroy(tp, buf1);
             QMetaType::destroy(tp, buf2);
+            info.destroy(buf3);
+            info.destroy(buf4);
         }
+        new (space) Bar;
     }
 public:
     MetaTypeTorturer() : failureCount(0) { }
@@ -480,13 +522,17 @@ template
 static void testCreateHelper()
 {
     typedef typename MetaEnumToType::Type Type;
-    void *actual = QMetaType::create(ID);
+    QMetaType info(ID);
+    void *actual1 = QMetaType::create(ID);
+    void *actual2 = info.create();
     if (DefaultValueTraits::IsInitialized) {
         Type *expected = DefaultValueFactory::create();
-        QCOMPARE(*static_cast(actual), *expected);
+        QCOMPARE(*static_cast(actual1), *expected);
+        QCOMPARE(*static_cast(actual2), *expected);
         delete expected;
     }
-    QMetaType::destroy(ID, actual);
+    QMetaType::destroy(ID, actual1);
+    info.destroy(actual2);
 }
 
 template<>
@@ -529,9 +575,13 @@ static void testCreateCopyHelper()
 {
     typedef typename MetaEnumToType::Type Type;
     Type *expected = TestValueFactory::create();
-    void *actual = QMetaType::create(ID, expected);
-    QCOMPARE(*static_cast(actual), *expected);
-    QMetaType::destroy(ID, actual);
+    QMetaType info(ID);
+    void *actual1 = QMetaType::create(ID, expected);
+    void *actual2 = info.create(expected);
+    QCOMPARE(*static_cast(actual1), *expected);
+    QCOMPARE(*static_cast(actual2), *expected);
+    QMetaType::destroy(ID, actual1);
+    info.destroy(actual2);
     delete expected;
 }
 
@@ -588,6 +638,18 @@ void tst_QMetaType::sizeOf()
     QCOMPARE(QMetaType::sizeOf(type), size);
 }
 
+void tst_QMetaType::sizeOfStaticLess_data()
+{
+    sizeOf_data();
+}
+
+void tst_QMetaType::sizeOfStaticLess()
+{
+    QFETCH(QMetaType::Type, type);
+    QFETCH(int, size);
+    QCOMPARE(QMetaType(type).sizeOf(), size);
+}
+
 struct CustomMovable {};
 QT_BEGIN_NAMESPACE
 Q_DECLARE_TYPEINFO(CustomMovable, Q_MOVABLE_TYPE);
@@ -653,6 +715,23 @@ void tst_QMetaType::flags()
     QCOMPARE(bool(QMetaType::typeFlags(type) & QMetaType::PointerToQObject), isPointerToQObject);
 }
 
+void tst_QMetaType::flagsStaticLess_data()
+{
+    flags_data();
+}
+
+void tst_QMetaType::flagsStaticLess()
+{
+    QFETCH(int, type);
+    QFETCH(bool, isMovable);
+    QFETCH(bool, isComplex);
+
+    int flags = QMetaType(type).flags();
+    QCOMPARE(bool(flags & QMetaType::NeedsConstruction), isComplex);
+    QCOMPARE(bool(flags & QMetaType::NeedsDestruction), isComplex);
+    QCOMPARE(bool(flags & QMetaType::MovableType), isMovable);
+}
+
 void tst_QMetaType::construct_data()
 {
     create_data();
@@ -688,20 +767,30 @@ template
 static void testConstructHelper()
 {
     typedef typename MetaEnumToType::Type Type;
-    int size = QMetaType::sizeOf(ID);
-    void *storage = qMallocAligned(size, TypeAlignment::Value);
-    void *actual = QMetaType::construct(ID, storage, /*copy=*/0);
-    QCOMPARE(actual, storage);
+    QMetaType info(ID);
+    int size = info.sizeOf();
+    void *storage1 = qMallocAligned(size, TypeAlignment::Value);
+    void *actual1 = QMetaType::construct(ID, storage1, /*copy=*/0);
+    void *storage2 = qMallocAligned(size, TypeAlignment::Value);
+    void *actual2 = info.construct(storage2, /*copy=*/0);
+    QCOMPARE(actual1, storage1);
+    QCOMPARE(actual2, storage2);
     if (DefaultValueTraits::IsInitialized) {
         Type *expected = DefaultValueFactory::create();
-        QCOMPARE(*static_cast(actual), *expected);
+        QCOMPARE(*static_cast(actual1), *expected);
+        QCOMPARE(*static_cast(actual2), *expected);
         delete expected;
     }
-    QMetaType::destruct(ID, actual);
-    qFreeAligned(storage);
+    QMetaType::destruct(ID, actual1);
+    qFreeAligned(storage1);
+    info.destruct(actual2);
+    qFreeAligned(storage2);
 
     QVERIFY(QMetaType::construct(ID, 0, /*copy=*/0) == 0);
     QMetaType::destruct(ID, 0);
+
+    QVERIFY(info.construct(0, /*copy=*/0) == 0);
+    info.destruct(0);
 }
 
 template<>
@@ -748,15 +837,24 @@ static void testConstructCopyHelper()
 {
     typedef typename MetaEnumToType::Type Type;
     Type *expected = TestValueFactory::create();
+    QMetaType info(ID);
     int size = QMetaType::sizeOf(ID);
-    void *storage = qMallocAligned(size, TypeAlignment::Value);
-    void *actual = QMetaType::construct(ID, storage, expected);
-    QCOMPARE(actual, storage);
-    QCOMPARE(*static_cast(actual), *expected);
-    QMetaType::destruct(ID, actual);
-    qFreeAligned(storage);
+    QCOMPARE(info.sizeOf(), size);
+    void *storage1 = qMallocAligned(size, TypeAlignment::Value);
+    void *actual1 = QMetaType::construct(ID, storage1, expected);
+    void *storage2 = qMallocAligned(size, TypeAlignment::Value);
+    void *actual2 = info.construct(storage2, expected);
+    QCOMPARE(actual1, storage1);
+    QCOMPARE(actual2, storage2);
+    QCOMPARE(*static_cast(actual1), *expected);
+    QCOMPARE(*static_cast(actual2), *expected);
+    QMetaType::destruct(ID, actual1);
+    qFreeAligned(storage1);
+    info.destruct(actual2);
+    qFreeAligned(storage2);
 
     QVERIFY(QMetaType::construct(ID, 0, expected) == 0);
+    QVERIFY(info.construct(0, expected) == 0);
 
     delete expected;
 }
@@ -895,6 +993,18 @@ void tst_QMetaType::isRegistered()
     QCOMPARE(QMetaType::isRegistered(typeId), registered);
 }
 
+void tst_QMetaType::isRegisteredStaticLess_data()
+{
+    isRegistered_data();
+}
+
+void tst_QMetaType::isRegisteredStaticLess()
+{
+    QFETCH(int, typeId);
+    QFETCH(bool, registered);
+    QCOMPARE(QMetaType(typeId).isRegistered(), registered);
+}
+
 void tst_QMetaType::registerStreamBuiltin()
 {
     //should not crash;
-- 
cgit v1.2.3


From 6dfb1de099158bb640f830647d09499934209b53 Mon Sep 17 00:00:00 2001
From: Jason McDonald 
Date: Tue, 14 Feb 2012 13:10:02 +1000
Subject: Eliminate duplicate data row names in network autotests

Change-Id: Icbfc24309a182f37268232fc3c299d35d6d6a0ea
Reviewed-by: Rohan McGovern 
---
 .../access/qnetworkcookie/tst_qnetworkcookie.cpp   | 34 +++++++++++-----------
 .../qnetworkcookiejar/tst_qnetworkcookiejar.cpp    |  6 ++--
 .../qnetworkdiskcache/tst_qnetworkdiskcache.cpp    |  2 +-
 tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp     |  5 ++--
 4 files changed, 24 insertions(+), 23 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
index 7c27973b56..bcd9cbdff7 100644
--- a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -165,11 +165,11 @@ void tst_QNetworkCookie::parseSingleCookie_data()
     QTest::newRow("with-value2") << " a=b" << cookie;
     QTest::newRow("with-value3") << "a=b " << cookie;
     QTest::newRow("with-value4") << " a=b " << cookie;
-    QTest::newRow("with-value4") << " a=b ;" << cookie;
-    QTest::newRow("with-value5") << "a =b" << cookie;
-    QTest::newRow("with-value6") << "a= b" << cookie;
-    QTest::newRow("with-value7") << "a = b" << cookie;
-    QTest::newRow("with-value8") << "a = b " << cookie;
+    QTest::newRow("with-value5") << " a=b ;" << cookie;
+    QTest::newRow("with-value6") << "a =b" << cookie;
+    QTest::newRow("with-value7") << "a= b" << cookie;
+    QTest::newRow("with-value8") << "a = b" << cookie;
+    QTest::newRow("with-value9") << "a = b " << cookie;
 
     cookie.setValue("\",\"");
     QTest::newRow("with-value-with-special1") << "a = \",\" " << cookie;
@@ -376,31 +376,31 @@ void tst_QNetworkCookie::parseSingleCookie_data()
 
     // extra offsets
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 2), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-14") << "a=b;expires=Jan 1 89 15:0 JST+1" << cookie;
+    QTest::newRow("zoneoffset-15") << "a=b;expires=Jan 1 89 15:0 JST+1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-15") << "a=b;expires=Jan 1 89 0:0 GMT+1" << cookie;
+    QTest::newRow("zoneoffset-16") << "a=b;expires=Jan 1 89 0:0 GMT+1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-15b") << "a=b;expires=Jan 1 89 1:0 GMT-1" << cookie;
+    QTest::newRow("zoneoffset-17") << "a=b;expires=Jan 1 89 1:0 GMT-1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-16") << "a=b;expires=Jan 1 89 0:0 GMT+01" << cookie;
+    QTest::newRow("zoneoffset-18") << "a=b;expires=Jan 1 89 0:0 GMT+01" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 5), Qt::UTC));
-    QTest::newRow("zoneoffset-17") << "a=b;expires=Jan 1 89 0:0 GMT+0105" << cookie;
+    QTest::newRow("zoneoffset-19") << "a=b;expires=Jan 1 89 0:0 GMT+0105" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-18") << "a=b;expires=Jan 1 89 0:0 GMT+015" << cookie;
+    QTest::newRow("zoneoffset-20") << "a=b;expires=Jan 1 89 0:0 GMT+015" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-19") << "a=b;expires=Jan 1 89 0:0 GM" << cookie;
+    QTest::newRow("zoneoffset-21") << "a=b;expires=Jan 1 89 0:0 GM" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-19b") << "a=b;expires=Jan 1 89 0:0 GMT" << cookie;
+    QTest::newRow("zoneoffset-22") << "a=b;expires=Jan 1 89 0:0 GMT" << cookie;
 
     // offsets from gmt
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-20") << "a=b;expires=Jan 1 89 0:0 +1" << cookie;
+    QTest::newRow("zoneoffset-23") << "a=b;expires=Jan 1 89 0:0 +1" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-21") << "a=b;expires=Jan 1 89 0:0 +01" << cookie;
+    QTest::newRow("zoneoffset-24") << "a=b;expires=Jan 1 89 0:0 +01" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(1, 1), Qt::UTC));
-    QTest::newRow("zoneoffset-22") << "a=b;expires=Jan 1 89 0:0 +0101" << cookie;
+    QTest::newRow("zoneoffset-25") << "a=b;expires=Jan 1 89 0:0 +0101" << cookie;
     cookie.setExpirationDate(QDateTime(QDate(1989, 1, 1), QTime(0, 0), Qt::UTC));
-    QTest::newRow("zoneoffset-23") << "a=b;expires=Jan 1 89 1:0 -1" << cookie;
+    QTest::newRow("zoneoffset-26") << "a=b;expires=Jan 1 89 1:0 -1" << cookie;
 
     // Y2k
     cookie.setExpirationDate(QDateTime(QDate(2000, 1, 1), QTime(0, 0), Qt::UTC));
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 73d0a4a650..0e046ad6f9 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -284,7 +284,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
     QTest::newRow("match-2") << allCookies << "http://nokia.com/web/" << result;
     QTest::newRow("match-3") << allCookies << "http://nokia.com/web/content" << result;
     QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web" << result;
-    QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web/" << result;
+    QTest::newRow("match-5") << allCookies << "http://qt.nokia.com/web/" << result;
     QTest::newRow("match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
 
     cookie.setPath("/web/wiki");
@@ -295,7 +295,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
     QTest::newRow("one-match-2") << allCookies << "http://nokia.com/web/" << result;
     QTest::newRow("one-match-3") << allCookies << "http://nokia.com/web/content" << result;
     QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web" << result;
-    QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web/" << result;
+    QTest::newRow("one-match-5") << allCookies << "http://qt.nokia.com/web/" << result;
     QTest::newRow("one-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
 
     result.prepend(cookie);     // longer path, it must match first
@@ -317,7 +317,7 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
     QTest::newRow("exp-match-2") << allCookies << "http://nokia.com/web/" << result;
     QTest::newRow("exp-match-3") << allCookies << "http://nokia.com/web/content" << result;
     QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web" << result;
-    QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web/" << result;
+    QTest::newRow("exp-match-5") << allCookies << "http://qt.nokia.com/web/" << result;
     QTest::newRow("exp-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
 
     // path matching
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 533108e76b..8a3c52cf72 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -306,7 +306,7 @@ void tst_QNetworkDiskCache::data_data()
     QNetworkCacheMetaData::RawHeaderList headers;
     headers.append(QNetworkCacheMetaData::RawHeader("type", "bin"));
     metaData.setRawHeaders(headers);
-    QTest::newRow("null") << metaData;
+    QTest::newRow("non-null") << metaData;
 }
 
 // public QIODevice* data(QUrl const& url)
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index f59f0bb5a9..657b91152f 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -295,10 +295,11 @@ void tst_QSslKey::toEncryptedPemOrDer_data()
               << "aAzZ`1234567890-=~!@#$%^&*()_+[]{}\\|;:'\",.<>/?"; // ### add more (?)
     foreach (KeyInfo keyInfo, keyInfoList) {
         foreach (QString password, passwords) {
-            QString testName = QString("%1-%2-%3-%4").arg(keyInfo.fileInfo.fileName())
+            QString testName = QString("%1-%2-%3-%4-%5").arg(keyInfo.fileInfo.fileName())
                 .arg(keyInfo.algorithm == QSsl::Rsa ? "RSA" : "DSA")
                 .arg(keyInfo.type == QSsl::PrivateKey ? "PrivateKey" : "PublicKey")
-                .arg(keyInfo.format == QSsl::Pem ? "PEM" : "DER");
+                .arg(keyInfo.format == QSsl::Pem ? "PEM" : "DER")
+                .arg(password);
             QTest::newRow(testName.toLatin1())
                 << keyInfo.fileInfo.absoluteFilePath() << keyInfo.algorithm << keyInfo.type
                 << keyInfo.format << password;
-- 
cgit v1.2.3


From eb64bb89cf6b7aa892c44723e3d14b845cc178bd Mon Sep 17 00:00:00 2001
From: Jason McDonald 
Date: Tue, 14 Feb 2012 13:13:05 +1000
Subject: Eliminate duplicate data row names in dbus, tools and xml autotests.

Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99
Reviewed-by: Rohan McGovern 
---
 .../dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp     |  4 +-
 tests/auto/tools/moc/tst_moc.cpp                   |  6 +--
 tests/auto/xml/dom/qdom/tst_qdom.cpp               | 53 +++++++++++-----------
 3 files changed, 31 insertions(+), 32 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
index 7eb31ffb41..25e3fdeabd 100644
--- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
+++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp
@@ -470,12 +470,12 @@ void tst_QDBusXmlParser::properties_data()
     prop.type = "i";
     prop.access = QDBusIntrospection::Property::Read;
     map << prop;
-    QTest::newRow("two") <<
+    QTest::newRow("two-1") <<
         ""
         "" << map;
 
     // invert the order of the declaration
-    QTest::newRow("two") <<
+    QTest::newRow("two-2") <<
         ""
         "" << map;
 
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 0aa1a68a64..27db6cc59c 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -1623,7 +1623,7 @@ void tst_Moc::warnings_data()
         << QString("standard input:1: Warning: Property declaration x has no READ accessor function. The property will be invalid.");
 
     // Passing "-nn" should NOT suppress the warning
-    QTest::newRow("Invalid property warning")
+    QTest::newRow("Invalid property warning with -nn")
         << QByteArray("class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };")
         << (QStringList() << "-nn")
         << 0
@@ -1631,7 +1631,7 @@ void tst_Moc::warnings_data()
         << QString("standard input:1: Warning: Property declaration x has no READ accessor function. The property will be invalid.");
 
     // Passing "-nw" should suppress the warning
-    QTest::newRow("Invalid property warning")
+    QTest::newRow("Invalid property warning with -nw")
         << QByteArray("class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };")
         << (QStringList() << "-nw")
         << 0
@@ -1655,7 +1655,7 @@ void tst_Moc::warnings_data()
         << QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject");
 
     // "-nw" should not suppress the error
-    QTest::newRow("Does not inherit QObject with -nn")
+    QTest::newRow("Does not inherit QObject with -nw")
         << QByteArray("class X { Q_OBJECT };")
         << (QStringList() << "-nw")
         << 1
diff --git a/tests/auto/xml/dom/qdom/tst_qdom.cpp b/tests/auto/xml/dom/qdom/tst_qdom.cpp
index f9570f7631..d79044157a 100644
--- a/tests/auto/xml/dom/qdom/tst_qdom.cpp
+++ b/tests/auto/xml/dom/qdom/tst_qdom.cpp
@@ -555,7 +555,6 @@ void tst_QDom::saveWithSerialization_data() const
     if (prefix.isEmpty())
         QFAIL("Cannot find testdata!");
     QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml");
-    QTest::newRow("doc01.xml") << QString(prefix + "/doc01.xml");
     QTest::newRow("doc02.xml") << QString(prefix + "/doc02.xml");
     QTest::newRow("doc03.xml") << QString(prefix + "/doc03.xml");
     QTest::newRow("doc04.xml") << QString(prefix + "/doc04.xml");
@@ -1868,34 +1867,34 @@ void tst_QDom::setContentWhitespace_data() const
     QTest::addColumn("doc");
     QTest::addColumn("expectedValidity");
 
-    QTest::newRow("") << QString::fromLatin1(" ")           << true;
-    QTest::newRow("") << QString::fromLatin1("  ")          << true;
-    QTest::newRow("") << QString::fromLatin1("   ")         << true;
-    QTest::newRow("") << QString::fromLatin1("    ")        << true;
-    QTest::newRow("") << QString::fromLatin1("\n")          << true;
-    QTest::newRow("") << QString::fromLatin1("\n\n")        << true;
-    QTest::newRow("") << QString::fromLatin1("\n\n\n")      << true;
-    QTest::newRow("") << QString::fromLatin1("\n\n\n\n")    << true;
-    QTest::newRow("") << QString::fromLatin1("\t")          << true;
-    QTest::newRow("") << QString::fromLatin1("\t\t")        << true;
-    QTest::newRow("") << QString::fromLatin1("\t\t\t")      << true;
-    QTest::newRow("") << QString::fromLatin1("\t\t\t\t")    << true;
+    QTest::newRow("data1") << QString::fromLatin1(" ")           << true;
+    QTest::newRow("data2") << QString::fromLatin1("  ")          << true;
+    QTest::newRow("data3") << QString::fromLatin1("   ")         << true;
+    QTest::newRow("data4") << QString::fromLatin1("    ")        << true;
+    QTest::newRow("data5") << QString::fromLatin1("\n")          << true;
+    QTest::newRow("data6") << QString::fromLatin1("\n\n")        << true;
+    QTest::newRow("data7") << QString::fromLatin1("\n\n\n")      << true;
+    QTest::newRow("data8") << QString::fromLatin1("\n\n\n\n")    << true;
+    QTest::newRow("data9") << QString::fromLatin1("\t")          << true;
+    QTest::newRow("data10") << QString::fromLatin1("\t\t")        << true;
+    QTest::newRow("data11") << QString::fromLatin1("\t\t\t")      << true;
+    QTest::newRow("data12") << QString::fromLatin1("\t\t\t\t")    << true;
 
     /* With XML prolog. */
-    QTest::newRow("") << QString::fromLatin1("")          << true;
-
-    QTest::newRow("") << QString::fromLatin1(" ")         << false;
-    QTest::newRow("") << QString::fromLatin1("  ")        << false;
-    QTest::newRow("") << QString::fromLatin1("   ")       << false;
-    QTest::newRow("") << QString::fromLatin1("    ")      << false;
-    QTest::newRow("") << QString::fromLatin1("\n")        << false;
-    QTest::newRow("") << QString::fromLatin1("\n\n")      << false;
-    QTest::newRow("") << QString::fromLatin1("\n\n\n")    << false;
-    QTest::newRow("") << QString::fromLatin1("\n\n\n\n")  << false;
-    QTest::newRow("") << QString::fromLatin1("\t")        << false;
-    QTest::newRow("") << QString::fromLatin1("\t\t")      << false;
-    QTest::newRow("") << QString::fromLatin1("\t\t\t")    << false;
-    QTest::newRow("") << QString::fromLatin1("\t\t\t\t")  << false;
+    QTest::newRow("data13") << QString::fromLatin1("")          << true;
+
+    QTest::newRow("data14") << QString::fromLatin1(" ")         << false;
+    QTest::newRow("data15") << QString::fromLatin1("  ")        << false;
+    QTest::newRow("data16") << QString::fromLatin1("   ")       << false;
+    QTest::newRow("data17") << QString::fromLatin1("    ")      << false;
+    QTest::newRow("data18") << QString::fromLatin1("\n")        << false;
+    QTest::newRow("data19") << QString::fromLatin1("\n\n")      << false;
+    QTest::newRow("data20") << QString::fromLatin1("\n\n\n")    << false;
+    QTest::newRow("data21") << QString::fromLatin1("\n\n\n\n")  << false;
+    QTest::newRow("data22") << QString::fromLatin1("\t")        << false;
+    QTest::newRow("data23") << QString::fromLatin1("\t\t")      << false;
+    QTest::newRow("data24") << QString::fromLatin1("\t\t\t")    << false;
+    QTest::newRow("data25") << QString::fromLatin1("\t\t\t\t")  << false;
 }
 
 void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const
-- 
cgit v1.2.3


From 32060c2115308e2e480a5b1787dbb2ebb1ed7936 Mon Sep 17 00:00:00 2001
From: Kurt Korbatits 
Date: Wed, 15 Feb 2012 14:22:48 +1000
Subject: Changed json unittest to work from installation directory

- Changed json unittest to use TESTDATA and QFINDTESTDATA

Change-Id: Id29f8257565f409fa184ba465f25bc8454e2b7fb
Reviewed-by: Rohan McGovern 
Reviewed-by: Jason McDonald 
---
 tests/auto/corelib/json/json.pro       |  2 +-
 tests/auto/corelib/json/tst_qtjson.cpp | 19 ++++++++++++-------
 2 files changed, 13 insertions(+), 8 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/json/json.pro b/tests/auto/corelib/json/json.pro
index 5158b7337a..7978a74278 100644
--- a/tests/auto/corelib/json/json.pro
+++ b/tests/auto/corelib/json/json.pro
@@ -3,6 +3,6 @@ QT = core testlib
 CONFIG -= app_bundle
 CONFIG += testcase
 
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+TESTDATA += test.json test.bjson test3.json test2.json
 
 SOURCES += tst_qtjson.cpp
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
index e35f645ef6..323546b8ea 100644
--- a/tests/auto/corelib/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -111,6 +111,8 @@ private Q_SLOTS:
     void testCompaction();
     void testDebugStream();
     void testCompactionError();
+private:
+    QString testDataDir;
 };
 
 TestQtJson::TestQtJson(QObject *parent) : QObject(parent)
@@ -119,6 +121,9 @@ TestQtJson::TestQtJson(QObject *parent) : QObject(parent)
 
 void TestQtJson::initTestCase()
 {
+    testDataDir = QFileInfo(QFINDTESTDATA("test.json")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
 }
 
 void TestQtJson::cleanupTestCase()
@@ -1077,7 +1082,7 @@ void TestQtJson::fromJson()
 
 void TestQtJson::fromBinary()
 {
-    QFile file(QLatin1String(SRCDIR "test.json"));
+    QFile file(testDataDir + "/test.json");
     file.open(QFile::ReadOnly);
     QByteArray testJson = file.readAll();
 
@@ -1086,7 +1091,7 @@ void TestQtJson::fromBinary()
     QVERIFY(!outdoc.isNull());
     QVERIFY(doc == outdoc);
 
-    QFile bfile(QLatin1String(SRCDIR "test.bjson"));
+    QFile bfile(testDataDir + "/test.bjson");
     bfile.open(QFile::ReadOnly);
     QByteArray binary = bfile.readAll();
 
@@ -1099,8 +1104,8 @@ void TestQtJson::fromBinary()
 void TestQtJson::toAndFromBinary_data()
 {
     QTest::addColumn("filename");
-    QTest::newRow("test.json") << QString::fromLatin1(SRCDIR "test.json");
-    QTest::newRow("test2.json") << QString::fromLatin1(SRCDIR "test2.json");
+    QTest::newRow("test.json") << (testDataDir + "/test.json");
+    QTest::newRow("test2.json") << (testDataDir + "/test2.json");
 }
 
 void TestQtJson::toAndFromBinary()
@@ -1279,7 +1284,7 @@ void TestQtJson::parseDuplicateKeys()
 
 void TestQtJson::testParser()
 {
-    QFile file(QLatin1String(SRCDIR "test.json"));
+    QFile file(testDataDir + "/test.json");
     file.open(QFile::ReadOnly);
     QByteArray testJson = file.readAll();
 
@@ -1364,7 +1369,7 @@ void TestQtJson::compactObject()
 void TestQtJson::validation()
 {
     // this basically tests that we don't crash on corrupt data
-    QFile file(QLatin1String(SRCDIR "test.json"));
+    QFile file(testDataDir + "/test.json");
     QVERIFY(file.open(QFile::ReadOnly));
     QByteArray testJson = file.readAll();
     QVERIFY(!testJson.isEmpty());
@@ -1385,7 +1390,7 @@ void TestQtJson::validation()
     }
 
 
-    QFile file2(QLatin1String(SRCDIR "test3.json"));
+    QFile file2(testDataDir + "/test3.json");
     file2.open(QFile::ReadOnly);
     testJson = file2.readAll();
     QVERIFY(!testJson.isEmpty());
-- 
cgit v1.2.3


From 857775f701cf3e1418e9cdc123a67ed3dde1c439 Mon Sep 17 00:00:00 2001
From: Kurt Korbatits 
Date: Wed, 15 Feb 2012 14:30:16 +1000
Subject: Changed qcryptographichash unittest to work from installation
 directory

- Changed qcryptographichash to use TESTDATA and QFINDTESTDATA

Change-Id: Ic3a1bdccc9f81605c648dab2a642421d17f7fe80
Reviewed-by: Jason McDonald 
Reviewed-by: Rohan McGovern 
---
 .../corelib/tools/qcryptographichash/qcryptographichash.pro  | 12 +-----------
 .../tools/qcryptographichash/tst_qcryptographichash.cpp      |  4 +++-
 2 files changed, 4 insertions(+), 12 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
index fddd67fbd6..1c4b74e16d 100644
--- a/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/auto/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -3,14 +3,4 @@ TARGET = tst_qcryptographichash
 QT = core testlib
 SOURCES = tst_qcryptographichash.cpp
 
-
-wince* {
-   addFiles.files = data/*
-   addFiles.path = data/
-   DEPLOYMENT += addFiles
-
-   DEFINES += SRCDIR=\\\".\\\"
-}
-else {
-    DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
\ No newline at end of file
+TESTDATA += data/*
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index 0f35089ff7..81cc66f045 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -169,7 +169,9 @@ void tst_QCryptographicHash::files()
     QFETCH(QCryptographicHash::Algorithm, algorithm);
     QFETCH(QByteArray, md5sum);
     {
-        QFile f(QString::fromLocal8Bit(SRCDIR) + filename);
+        QString testData = QFINDTESTDATA(filename);
+        QVERIFY2(!testData.isEmpty(), qPrintable(QString("Cannot find test data: %1").arg(filename)));
+        QFile f(testData);
         QCryptographicHash hash(algorithm);
         QVERIFY(! hash.addData(&f)); // file is not open for reading;
         if (f.open(QIODevice::ReadOnly)) {
-- 
cgit v1.2.3


From 20f6dc615ac6dfe97681eb1652a10e6d29affbce Mon Sep 17 00:00:00 2001
From: Kurt Korbatits 
Date: Thu, 16 Feb 2012 08:13:13 +1000
Subject: Changed qsslcertificate unittest to work from install directory

- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I1957ef287ba2f337b5e0b2c6245d872eacb6316f
Reviewed-by: Jason McDonald 
Reviewed-by: Rohan McGovern 
---
 .../ssl/qsslcertificate/qsslcertificate.pro        | 17 +----
 .../ssl/qsslcertificate/tst_qsslcertificate.cpp    | 84 ++++++++++------------
 2 files changed, 38 insertions(+), 63 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
index 7e2abac3f8..60ad3cbfd1 100644
--- a/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
+++ b/tests/auto/network/ssl/qsslcertificate/qsslcertificate.pro
@@ -6,19 +6,4 @@ QT = core network testlib
 
 TARGET = tst_qsslcertificate
 
-win32 {
-  CONFIG(debug, debug|release) {
-    DESTDIR = debug
-} else {
-    DESTDIR = release
-  }
-}
-
-wince* {
-    certFiles.files = certificates more-certificates
-    certFiles.path    = .
-    DEPLOYMENT += certFiles
-    DEFINES += SRCDIR=\\\".\\\"
-} else {
-    DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA += certificates/* more-certificates/* verify-certs/*
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index 8003ad1932..da2dd989c7 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -71,14 +71,10 @@ class tst_QSslCertificate : public QObject
 #endif
 
     QString oldCurrentDir;
-public:
-    tst_QSslCertificate();
-    virtual ~tst_QSslCertificate();
 
 public slots:
-    void initTestCase_data();
-    void init();
-    void cleanup();
+    void initTestCase();
+    void cleanupTestCase();
 
 #ifndef QT_NO_OPENSSL
 private slots:
@@ -120,11 +116,23 @@ private slots:
 // ### add tests for certificate bundles (multiple certificates concatenated into a single
 //     structure); both PEM and DER formatted
 #endif
+private:
+    QString testDataDir;
 };
 
-tst_QSslCertificate::tst_QSslCertificate()
+void tst_QSslCertificate::initTestCase()
 {
-    QDir dir(SRCDIR + QLatin1String("/certificates"));
+    testDataDir = QFileInfo(QFINDTESTDATA("certificates")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
+
+    if (QDir::current().absolutePath() != testDataDir) {
+        oldCurrentDir = QDir::current().absolutePath();
+        QVERIFY2(QDir::setCurrent(testDataDir),
+                 qPrintable(QString("Cannot change directory to %1").arg(testDataDir)));
+    }
+
+    QDir dir(testDataDir + "/certificates");
     QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::Readable);
     QRegExp rxCert(QLatin1String("^.+\\.(pem|der)$"));
     QRegExp rxSan(QLatin1String("^(.+\\.(?:pem|der))\\.san$"));
@@ -148,29 +156,11 @@ tst_QSslCertificate::tst_QSslCertificate()
     }
 }
 
-tst_QSslCertificate::~tst_QSslCertificate()
-{
-}
-
-void tst_QSslCertificate::initTestCase_data()
-{
-}
-
-void tst_QSslCertificate::init()
-{
-    QString srcdir(QLatin1String(SRCDIR));
-    if (!srcdir.isEmpty()) {
-        oldCurrentDir = QDir::current().absolutePath();
-        QDir::setCurrent(srcdir);
-    }
-}
-
-void tst_QSslCertificate::cleanup()
+void tst_QSslCertificate::cleanupTestCase()
 {
     if (!oldCurrentDir.isEmpty()) {
         QDir::setCurrent(oldCurrentDir);
     }
-
 }
 
 static QByteArray readFile(const QString &absFilePath)
@@ -569,7 +559,7 @@ void tst_QSslCertificate::fromPath_data()
     QTest::newRow("\"d.*/c.*.pem\" wildcard pem") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << true << 0;
     QTest::newRow("\"d.*/c.*.pem\" wildcard der") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << false << 0;
 #ifdef Q_OS_LINUX
-    QTest::newRow("absolute path wildcard pem") << QString(QDir::currentPath() + "/certificates/*.pem") << int(QRegExp::Wildcard) << true << 5;
+    QTest::newRow("absolute path wildcard pem") << (testDataDir + "/certificates/*.pem") << int(QRegExp::Wildcard) << true << 5;
 #endif
 
     QTest::newRow("trailing-whitespace") << QString("more-certificates/trailing-whitespace.pem") << int(QRegExp::FixedString) << true << 1;
@@ -783,7 +773,7 @@ void tst_QSslCertificate::task256066toPem()
 void tst_QSslCertificate::nulInCN()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/badguy-nul-cn.crt");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/badguy-nul-cn.crt");
     QCOMPARE(certList.size(), 1);
 
     const QSslCertificate &cert = certList.at(0);
@@ -799,7 +789,7 @@ void tst_QSslCertificate::nulInCN()
 void tst_QSslCertificate::nulInSan()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/badguy-nul-san.crt");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/badguy-nul-san.crt");
     QCOMPARE(certList.size(), 1);
 
     const QSslCertificate &cert = certList.at(0);
@@ -819,7 +809,7 @@ void tst_QSslCertificate::nulInSan()
 void tst_QSslCertificate::largeSerialNumber()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-serial-number.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-serial-number.pem");
 
     QCOMPARE(certList.size(), 1);
 
@@ -831,7 +821,7 @@ void tst_QSslCertificate::largeSerialNumber()
 void tst_QSslCertificate::largeExpirationDate() // QTBUG-12489
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-expiration-date.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-expiration-date.pem");
 
     QCOMPARE(certList.size(), 1);
 
@@ -854,18 +844,18 @@ void tst_QSslCertificate::blacklistedCertificates()
 void tst_QSslCertificate::toText()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-expiration-date.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-expiration-date.pem");
 
     QCOMPARE(certList.size(), 1);
     const QSslCertificate &cert = certList.at(0);
 
     // Openssl's cert dump method changed slightly between 0.9.8 and 1.0.0 versions, so we want it to match any output
 
-    QFile fOld(SRCDIR "more-certificates/cert-large-expiration-date.txt.0.9.8");
+    QFile fOld(testDataDir + "/more-certificates/cert-large-expiration-date.txt.0.9.8");
     QVERIFY(fOld.open(QIODevice::ReadOnly | QFile::Text));
     QByteArray txtOld = fOld.readAll();
 
-    QFile fNew(SRCDIR "more-certificates/cert-large-expiration-date.txt.1.0.0");
+    QFile fNew(testDataDir + "/more-certificates/cert-large-expiration-date.txt.1.0.0");
     QVERIFY(fNew.open(QIODevice::ReadOnly | QFile::Text));
     QByteArray txtNew = fNew.readAll();
     QVERIFY(txtOld == cert.toText() || txtNew == cert.toText());
@@ -874,7 +864,7 @@ void tst_QSslCertificate::toText()
 void tst_QSslCertificate::multipleCommonNames()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/test-cn-two-cns-cert.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/test-cn-two-cns-cert.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     QStringList commonNames = certList[0].subjectInfo(QSslCertificate::CommonName);
@@ -885,14 +875,14 @@ void tst_QSslCertificate::multipleCommonNames()
 void tst_QSslCertificate::subjectAndIssuerAttributes()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/test-cn-with-drink-cert.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/test-cn-with-drink-cert.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     QList attributes = certList[0].subjectInfoAttributes();
     QVERIFY(attributes.contains(QByteArray("favouriteDrink")));
     attributes.clear();
 
-    certList = QSslCertificate::fromPath(SRCDIR "more-certificates/natwest-banking.pem");
+    certList = QSslCertificate::fromPath(testDataDir + "/more-certificates/natwest-banking.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     attributes = certList[0].subjectInfoAttributes();
@@ -917,17 +907,17 @@ void tst_QSslCertificate::verify()
     errors.clear();
 
     // Verify a valid cert signed by a CA
-    QList caCerts = QSslCertificate::fromPath(SRCDIR "verify-certs/cacert.pem");
+    QList caCerts = QSslCertificate::fromPath(testDataDir + "/verify-certs/cacert.pem");
     QSslSocket::addDefaultCaCertificate(caCerts.first());
 
-    toVerify = QSslCertificate::fromPath(SRCDIR "verify-certs/test-ocsp-good-cert.pem");
+    toVerify = QSslCertificate::fromPath(testDataDir + "/verify-certs/test-ocsp-good-cert.pem");
 
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.count() == 0);
     errors.clear();
 
     // Test a blacklisted certificate
-    toVerify = QSslCertificate::fromPath(SRCDIR "verify-certs/test-addons-mozilla-org-cert.pem");
+    toVerify = QSslCertificate::fromPath(testDataDir + "/verify-certs/test-addons-mozilla-org-cert.pem");
     errors = QSslCertificate::verify(toVerify);
     bool foundBlack = false;
     foreach (const QSslError &error, errors) {
@@ -940,7 +930,7 @@ void tst_QSslCertificate::verify()
     errors.clear();
 
     // This one is expired and untrusted
-    toVerify = QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-serial-number.pem");
+    toVerify = QSslCertificate::fromPath(testDataDir + "/more-certificates/cert-large-serial-number.pem");
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.contains(QSslError(QSslError::SelfSignedCertificate, toVerify[0])));
     VERIFY_VERBOSE(errors.contains(QSslError(QSslError::CertificateExpired, toVerify[0])));
@@ -948,15 +938,15 @@ void tst_QSslCertificate::verify()
     toVerify.clear();
 
     // This one is signed by a valid cert, but the signer is not a valid CA
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-not-ca-cert.pem").first();
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-ocsp-good-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-intermediate-not-ca-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-ocsp-good-cert.pem").first();
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.contains(QSslError(QSslError::InvalidCaCertificate, toVerify[1])));
     toVerify.clear();
 
     // This one is signed by a valid cert, and the signer is a valid CA
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-is-ca-cert.pem").first();
-    toVerify << QSslCertificate::fromPath(SRCDIR "verify-certs/test-intermediate-ca-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-intermediate-is-ca-cert.pem").first();
+    toVerify << QSslCertificate::fromPath(testDataDir + "/verify-certs/test-intermediate-ca-cert.pem").first();
     errors = QSslCertificate::verify(toVerify);
     VERIFY_VERBOSE(errors.count() == 0);
 
@@ -986,7 +976,7 @@ QString tst_QSslCertificate::toString(const QList& errors)
 void tst_QSslCertificate::extensions()
 {
     QList certList =
-        QSslCertificate::fromPath(SRCDIR "more-certificates/natwest-banking.pem");
+        QSslCertificate::fromPath(testDataDir + "/more-certificates/natwest-banking.pem");
     QVERIFY2(certList.count() > 0, "Please run this test from the source directory");
 
     QSslCertificate cert = certList[0];
-- 
cgit v1.2.3


From 4121f9df29c85d45e0fe128d237c0009cded7574 Mon Sep 17 00:00:00 2001
From: Kurt Korbatits 
Date: Thu, 16 Feb 2012 08:25:31 +1000
Subject: Changed qsslkey to work from installation directory

- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I30bf175c2c9044e1f8556260a032467ca0dfc09f
Reviewed-by: Rohan McGovern 
Reviewed-by: Jason McDonald 
---
 tests/auto/network/ssl/qsslkey/qsslkey.pro     | 21 +------------
 tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp | 43 +++++++-------------------
 2 files changed, 12 insertions(+), 52 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/network/ssl/qsslkey/qsslkey.pro b/tests/auto/network/ssl/qsslkey/qsslkey.pro
index 4af35487cd..d794c0faf0 100644
--- a/tests/auto/network/ssl/qsslkey/qsslkey.pro
+++ b/tests/auto/network/ssl/qsslkey/qsslkey.pro
@@ -6,23 +6,4 @@ QT = core network testlib
 
 TARGET = tst_qsslkey
 
-win32 {
-  CONFIG(debug, debug|release) {
-    DESTDIR = debug
-} else {
-    DESTDIR = release
-  }
-}
-
-wince* {
-    keyFiles.files = keys
-    keyFiles.path    = .
-
-    passphraseFiles.files = rsa-without-passphrase.pem rsa-with-passphrase.pem
-    passphraseFiles.path    = .
-
-    DEPLOYMENT += keyFiles passphraseFiles
-    DEFINES += SRCDIR=\\\".\\\"
-} else {
-    DEFINES+= SRCDIR=\\\"$$PWD\\\"
-}
+TESTDATA += keys/* rsa-without-passphrase.pem rsa-with-passphrase.pem
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index 657b91152f..e8941a2642 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -68,14 +68,8 @@ class tst_QSslKey : public QObject
 
     void createPlainTestRows();
 
-public:
-    tst_QSslKey();
-    virtual ~tst_QSslKey();
-
 public slots:
-    void initTestCase_data();
-    void init();
-    void cleanup();
+    void initTestCase();
 
 #ifndef QT_NO_OPENSSL
 
@@ -95,16 +89,17 @@ private slots:
 
     void passphraseChecks();
 #endif
+private:
+    QString testDataDir;
 };
 
-tst_QSslKey::tst_QSslKey()
+void tst_QSslKey::initTestCase()
 {
-#ifdef Q_OS_MAC
-    // applicationDirPath() points to a path inside the app bundle on Mac.
-    QDir dir(qApp->applicationDirPath() + QLatin1String("/../../../keys"));
-#else
-    QDir dir(SRCDIR + QLatin1String("/keys"));  // prefer this way to avoid ifdeffery and support shadow builds?
-#endif
+    testDataDir = QFileInfo(QFINDTESTDATA("rsa-without-passphrase.pem")).absolutePath();
+    if (testDataDir.isEmpty())
+        testDataDir = QCoreApplication::applicationDirPath();
+
+    QDir dir(testDataDir + "/keys");
     QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::Readable);
     QRegExp rx(QLatin1String("^(rsa|dsa)-(pub|pri)-(\\d+)\\.(pem|der)$"));
     foreach (QFileInfo fileInfo, fileInfoList) {
@@ -118,22 +113,6 @@ tst_QSslKey::tst_QSslKey()
     }
 }
 
-tst_QSslKey::~tst_QSslKey()
-{
-}
-
-void tst_QSslKey::initTestCase_data()
-{
-}
-
-void tst_QSslKey::init()
-{
-}
-
-void tst_QSslKey::cleanup()
-{
-}
-
 static QByteArray readFile(const QString &absFilePath)
 {
     QFile file(absFilePath);
@@ -368,7 +347,7 @@ void tst_QSslKey::toEncryptedPemOrDer()
 void tst_QSslKey::passphraseChecks()
 {
     {
-        QString fileName(SRCDIR "/rsa-with-passphrase.pem");
+        QString fileName(testDataDir + "/rsa-with-passphrase.pem");
         QFile keyFile(fileName);
         QVERIFY(keyFile.exists());
         {
@@ -407,7 +386,7 @@ void tst_QSslKey::passphraseChecks()
 
     {
         // be sure and check a key without passphrase too
-        QString fileName(SRCDIR "/rsa-without-passphrase.pem");
+        QString fileName(testDataDir + "/rsa-without-passphrase.pem");
         QFile keyFile(fileName);
         {
             if (!keyFile.isOpen())
-- 
cgit v1.2.3


From 64642a4d9768b767c51c7f92dec94f655ba60195 Mon Sep 17 00:00:00 2001
From: Jason McDonald 
Date: Thu, 16 Feb 2012 16:00:41 +1000
Subject: testlib: Skip test function if init() fails.

Prior to this commit, the following statement in the qtestlib
documentation was untrue: "If init() fails, the following testfunction
will not be executed, the test will proceed to the next testfunction."
If init() called QSKIP, the test function would be skipped, but if
init() reported a failure, the test function would still be executed
(even though doing so could be unsafe).

This commit makes testlib skip a test function if init() reports a
failure and enhances the selftests to cover skips and fails in both
init() and cleanup().

Task-number: QTBUG-20371
Change-Id: Id1cc8464ae0b8c257ae1b74dbe9189a501f5366b
Reviewed-by: Rohan McGovern 
---
 .../testlib/selftests/counting/tst_counting.cpp    | 87 ++++++++++++++++++++++
 .../testlib/selftests/expected_counting.lightxml   | 80 +++++++++++++++++---
 tests/auto/testlib/selftests/expected_counting.txt | 44 +++++++----
 tests/auto/testlib/selftests/expected_counting.xml | 80 +++++++++++++++++---
 .../testlib/selftests/expected_counting.xunitxml   | 20 ++++-
 5 files changed, 273 insertions(+), 38 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp
index 6758b533bb..fa61fce173 100644
--- a/tests/auto/testlib/selftests/counting/tst_counting.cpp
+++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp
@@ -47,6 +47,8 @@ class tst_Counting : public QObject
     Q_OBJECT
 
 private slots:
+    // The following test functions exercise each possible combination of test
+    // results for two data rows.
     void testPassPass_data();
     void testPassPass();
 
@@ -74,6 +76,19 @@ private slots:
     void testFailFail_data();
     void testFailFail();
 
+    // The following test functions test skips and fails in the special
+    // init() and cleanup() slots.
+    void init();
+    void cleanup();
+    void testFailInInit_data();
+    void testFailInInit();
+    void testFailInCleanup_data();
+    void testFailInCleanup();
+    void testSkipInInit_data();
+    void testSkipInInit();
+    void testSkipInCleanup_data();
+    void testSkipInCleanup();
+
 private:
     void helper();
 };
@@ -212,5 +227,77 @@ void tst_Counting::testFailFail()
     helper();
 }
 
+void tst_Counting::init()
+{
+    if (strcmp(QTest::currentTestFunction(), "testFailInInit") == 0 && strcmp(QTest::currentDataTag(), "fail") == 0)
+        QFAIL("Fail in init()");
+    else if (strcmp(QTest::currentTestFunction(), "testSkipInInit") == 0 && strcmp(QTest::currentDataTag(), "skip") == 0)
+        QSKIP("Skip in init()");
+}
+
+void tst_Counting::cleanup()
+{
+    if (strcmp(QTest::currentTestFunction(), "testFailInCleanup") == 0 && strcmp(QTest::currentDataTag(), "fail") == 0)
+        QFAIL("Fail in cleanup()");
+    else if (strcmp(QTest::currentTestFunction(), "testSkipInCleanup") == 0 && strcmp(QTest::currentDataTag(), "skip") == 0)
+        QSKIP("Skip in cleanup()");
+}
+
+void tst_Counting::testFailInInit_data()
+{
+    QTest::addColumn("dummy");
+    QTest::newRow("before") << true;
+    QTest::newRow("fail") << true;
+    QTest::newRow("after") << true;
+}
+
+void tst_Counting::testFailInInit()
+{
+    if (strcmp(QTest::currentDataTag(), "fail") == 0)
+        QFAIL("This test function should have been skipped due to QFAIL in init()");
+}
+
+void tst_Counting::testFailInCleanup_data()
+{
+    QTest::addColumn("dummy");
+    QTest::newRow("before") << true;
+    QTest::newRow("fail") << true;
+    QTest::newRow("after") << true;
+}
+
+void tst_Counting::testFailInCleanup()
+{
+    if (strcmp(QTest::currentDataTag(), "fail") == 0)
+        qDebug() << "This test function should execute and then QFAIL in cleanup()";
+}
+
+void tst_Counting::testSkipInInit_data()
+{
+    QTest::addColumn("dummy");
+    QTest::newRow("before") << true;
+    QTest::newRow("skip") << true;
+    QTest::newRow("after") << true;
+}
+
+void tst_Counting::testSkipInInit()
+{
+    if (strcmp(QTest::currentDataTag(), "skip") == 0)
+        QFAIL("This test function should have been skipped due to QSKIP in init()");
+}
+
+void tst_Counting::testSkipInCleanup_data()
+{
+    QTest::addColumn("dummy");
+    QTest::newRow("before") << true;
+    QTest::newRow("skip") << true;
+    QTest::newRow("after") << true;
+}
+
+void tst_Counting::testSkipInCleanup()
+{
+    if (strcmp(QTest::currentDataTag(), "skip") == 0)
+        qDebug() << "This test function should execute and then QSKIP in cleanup()";
+}
+
 QTEST_MAIN(tst_Counting)
 #include "tst_counting.moc"
diff --git a/tests/auto/testlib/selftests/expected_counting.lightxml b/tests/auto/testlib/selftests/expected_counting.lightxml
index fd80292b90..e7b1136417 100644
--- a/tests/auto/testlib/selftests/expected_counting.lightxml
+++ b/tests/auto/testlib/selftests/expected_counting.lightxml
@@ -17,7 +17,7 @@
 
     
 
-
+
     
     
 
@@ -26,13 +26,13 @@
 
     
 
-
+
     
     
 
 
 
-
+
     
     
 
@@ -41,27 +41,27 @@
 
 
 
-
+
     
     
 
-
+
     
     
 
 
 
-
+
     
     
 
-
+
     
     
 
 
 
-
+
     
     
 
@@ -70,25 +70,81 @@
 
 
 
-
+
     
     
 
-
+
     
     
 
 
 
-
+
     
     
 
-
+
     
     
 
 
+
+
+    
+
+
+    
+    
+
+
+    
+
+
+
+
+    
+
+
+    
+    
+
+
+    
+    
+
+
+    
+
+
+
+
+    
+
+
+    
+    
+
+
+    
+
+
+
+
+    
+
+
+    
+    
+
+
+    
+    
+
+
+    
+
+
 
 
 
diff --git a/tests/auto/testlib/selftests/expected_counting.txt b/tests/auto/testlib/selftests/expected_counting.txt
index bd70a44b2e..5c17e3c257 100644
--- a/tests/auto/testlib/selftests/expected_counting.txt
+++ b/tests/auto/testlib/selftests/expected_counting.txt
@@ -5,32 +5,50 @@ PASS   : tst_Counting::testPassPass(row 1)
 PASS   : tst_Counting::testPassPass(row 2)
 PASS   : tst_Counting::testPassSkip(row 1)
 SKIP   : tst_Counting::testPassSkip(row 2) Skipping
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
 PASS   : tst_Counting::testPassFail(row 1)
 FAIL!  : tst_Counting::testPassFail(row 2) 'false' returned FALSE. ()
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
 SKIP   : tst_Counting::testSkipPass(row 1) Skipping
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
 PASS   : tst_Counting::testSkipPass(row 2)
 SKIP   : tst_Counting::testSkipSkip(row 1) Skipping
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
 SKIP   : tst_Counting::testSkipSkip(row 2) Skipping
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
 SKIP   : tst_Counting::testSkipFail(row 1) Skipping
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
 FAIL!  : tst_Counting::testSkipFail(row 2) 'false' returned FALSE. ()
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
 FAIL!  : tst_Counting::testFailPass(row 1) 'false' returned FALSE. ()
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
 PASS   : tst_Counting::testFailPass(row 2)
 FAIL!  : tst_Counting::testFailSkip(row 1) 'false' returned FALSE. ()
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
 SKIP   : tst_Counting::testFailSkip(row 2) Skipping
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(102)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(117)]
 FAIL!  : tst_Counting::testFailFail(row 1) 'false' returned FALSE. ()
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
 FAIL!  : tst_Counting::testFailFail(row 2) 'false' returned FALSE. ()
-   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(99)]
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(114)]
+PASS   : tst_Counting::testFailInInit(before)
+FAIL!  : tst_Counting::testFailInInit(fail) Fail in init()
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(233)]
+PASS   : tst_Counting::testFailInInit(after)
+PASS   : tst_Counting::testFailInCleanup(before)
+QDEBUG : tst_Counting::testFailInCleanup(fail) This test function should execute and then QFAIL in cleanup() 
+FAIL!  : tst_Counting::testFailInCleanup(fail) Fail in cleanup()
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(241)]
+PASS   : tst_Counting::testFailInCleanup(after)
+PASS   : tst_Counting::testSkipInInit(before)
+SKIP   : tst_Counting::testSkipInInit(skip) Skip in init()
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(235)]
+PASS   : tst_Counting::testSkipInInit(after)
+PASS   : tst_Counting::testSkipInCleanup(before)
+QDEBUG : tst_Counting::testSkipInCleanup(skip) This test function should execute and then QSKIP in cleanup() 
+SKIP   : tst_Counting::testSkipInCleanup(skip) Skip in cleanup()
+   Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(243)]
+PASS   : tst_Counting::testSkipInCleanup(after)
 PASS   : tst_Counting::cleanupTestCase()
-Totals: 8 passed, 6 failed, 6 skipped
+Totals: 16 passed, 8 failed, 8 skipped
 ********* Finished testing of tst_Counting *********
diff --git a/tests/auto/testlib/selftests/expected_counting.xml b/tests/auto/testlib/selftests/expected_counting.xml
index c5460a7346..a97296807d 100644
--- a/tests/auto/testlib/selftests/expected_counting.xml
+++ b/tests/auto/testlib/selftests/expected_counting.xml
@@ -19,7 +19,7 @@
 
     
 
-
+
     
     
 
@@ -28,13 +28,13 @@
 
     
 
-
+
     
     
 
 
 
-
+
     
     
 
@@ -43,27 +43,27 @@
 
 
 
-
+
     
     
 
-
+
     
     
 
 
 
-
+
     
     
 
-
+
     
     
 
 
 
-
+
     
     
 
@@ -72,25 +72,81 @@
 
 
 
-
+
     
     
 
-
+
     
     
 
 
 
-
+
     
     
 
-
+
     
     
 
 
+
+
+    
+
+
+    
+    
+
+
+    
+
+
+
+
+    
+
+
+    
+    
+
+
+    
+    
+
+
+    
+
+
+
+
+    
+
+
+    
+    
+
+
+    
+
+
+
+
+    
+
+
+    
+    
+
+
+    
+    
+
+
+    
+
+
 
 
 
diff --git a/tests/auto/testlib/selftests/expected_counting.xunitxml b/tests/auto/testlib/selftests/expected_counting.xunitxml
index 496546700e..f317ed5923 100644
--- a/tests/auto/testlib/selftests/expected_counting.xunitxml
+++ b/tests/auto/testlib/selftests/expected_counting.xunitxml
@@ -1,5 +1,5 @@
 
-
+
   
     
     
@@ -34,6 +34,20 @@
     
     
   
+  
+    
+  
+  
+    
+    
+  
+  
+    
+  
+  
+    
+    
+  
   
   
 
@@ -42,5 +56,9 @@
 
 
 
+
+
+
+
   
 
-- 
cgit v1.2.3


From 2193df65a380e27b839bae3dc63ad7496af575e8 Mon Sep 17 00:00:00 2001
From: "Bradley T. Hughes" 
Date: Tue, 14 Feb 2012 07:03:18 +0100
Subject: Fix tst_QFileSystemWatcher failure on Mac OS X

The watchFileAndItsDirectory() test would fail due to atime updates for
the first watched file coming up to 2 seconds after the file was closed.
Observation shows that the atime has a 2 second resolution on Mac OS X
using HFS+, so add an appropriate delay to make sure that the atime
update from the kqueue based file system watcher can dispatch all
updates.

Task-number: QTBUG-22744
Change-Id: Ie79af20d6b4c154021307c8a8f6d336369720337
Reviewed-by: Robin Burchell 
---
 tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro     | 2 --
 tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 5 +++++
 2 files changed, 5 insertions(+), 2 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
index e712a6ad5f..8ada44fdf7 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
+++ b/tests/auto/corelib/io/qfilesystemwatcher/qfilesystemwatcher.pro
@@ -2,5 +2,3 @@ CONFIG += testcase parallel_test
 TARGET = tst_qfilesystemwatcher
 QT = core testlib
 SOURCES = tst_qfilesystemwatcher.cpp
-
-mac: CONFIG += insignificant_test # QTBUG-22744
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 2635565c2b..8caccb6da9 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -432,6 +432,11 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
     testFile.write(QByteArray("hello again"));
     testFile.close();
 
+#ifdef Q_OS_MAC
+    // wait again for the file's atime to be updated
+    QTest::qWait(2000);
+#endif
+
     QTRY_VERIFY(fileChangedSpy.count() > 0);
 
     //according to Qt 4 documentation:
-- 
cgit v1.2.3


From b838170cebc8d1adefc6c8de34e6a39494ffd75e Mon Sep 17 00:00:00 2001
From: David Faure 
Date: Sun, 12 Feb 2012 01:39:47 +0100
Subject: QDebug: Add support for %{pid}, %{appname} and %{threadid}

Change-Id: I4add0a374e6524b615c6dc0ecfb010a90075b04f
Reviewed-by: Kai Koehne 
Reviewed-by: Thiago Macieira 
---
 tests/auto/corelib/global/qlogging/app/main.cpp     |  7 +++++--
 tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 10 +++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/global/qlogging/app/main.cpp b/tests/auto/corelib/global/qlogging/app/main.cpp
index c26b29ea56..dfa52315c7 100644
--- a/tests/auto/corelib/global/qlogging/app/main.cpp
+++ b/tests/auto/corelib/global/qlogging/app/main.cpp
@@ -39,15 +39,18 @@
 **
 ****************************************************************************/
 
-#include 
+#include 
 
 struct T {
     T() { qDebug("static constructor"); }
     ~T() { qDebug("static destructor"); }
 } t;
 
-int main(int, char **)
+int main(int argc, char **argv)
 {
+    QCoreApplication app(argc, argv);
+    app.setApplicationName("tst_qlogging");
+
     qDebug("qDebug");
     qWarning("qWarning");
     qCritical("qCritical");
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index b2935ea6f2..11949cf1db 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -620,7 +620,7 @@ void tst_qmessagehandler::qMessagePattern()
 
     QStringList environment = QProcess::systemEnvironment();
     // %{file} is tricky because of shadow builds
-    environment.prepend("QT_MESSAGE_PATTERN=\"%{type} %{line} %{function} %{message}\"");
+    environment.prepend("QT_MESSAGE_PATTERN=\"%{type} %{appname} %{line} %{function} %{message}\"");
     process.setEnvironment(environment);
 #ifdef Q_OS_WIN
     process.start("app/app.exe");
@@ -633,12 +633,12 @@ void tst_qmessagehandler::qMessagePattern()
 //    qDebug() << output;
     QVERIFY(!output.isEmpty());
 
-    QVERIFY(output.contains("debug 45 T::T static constructor"));
+    QVERIFY(output.contains("debug  45 T::T static constructor"));
     //  we can't be sure whether the QT_MESSAGE_PATTERN is already destructed
     QVERIFY(output.contains("static destructor"));
-    QVERIFY(output.contains("debug 51 main qDebug"));
-    QVERIFY(output.contains("warning 52 main qWarning"));
-    QVERIFY(output.contains("critical 53 main qCritical"));
+    QVERIFY(output.contains("debug tst_qlogging 54 main qDebug"));
+    QVERIFY(output.contains("warning tst_qlogging 55 main qWarning"));
+    QVERIFY(output.contains("critical tst_qlogging 56 main qCritical"));
 
     environment = QProcess::systemEnvironment();
     environment.prepend("QT_MESSAGE_PATTERN=\"PREFIX: %{unknown} %{message}\"");
-- 
cgit v1.2.3


From cb8445f0323b0eefbb04f1d8adad81a00b53abd8 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt 
Date: Fri, 3 Feb 2012 14:28:16 +0100
Subject: Remove historical +1 from font height calculation

Historically, we've calculated font height as ascent+descent+1.
In Qt 4, a patch was added to work around this by subtracting
1 from the descent of the font engines. We now remove the +1 and
the work arounds.

Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f
Reviewed-by: Friedemann Kleint 
Reviewed-by: Lars Knoll 
---
 tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp |  4 ++--
 tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp   | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
index 0b5486dd5a..4dbdf9a4f1 100644
--- a/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp
@@ -140,7 +140,7 @@ void tst_QFontMetrics::metrics()
                 font = fdb.font(family, style, 12);
 
                 QFontMetrics fontmetrics(font);
-                QCOMPARE(fontmetrics.ascent() + fontmetrics.descent() + 1,
+                QCOMPARE(fontmetrics.ascent() + fontmetrics.descent(),
                         fontmetrics.height());
 
                 QCOMPARE(fontmetrics.height() + fontmetrics.leading(),
@@ -156,7 +156,7 @@ void tst_QFontMetrics::metrics()
                     font = fdb.font(family, style, size);
 
                     QFontMetrics fontmetrics(font);
-                    QCOMPARE(fontmetrics.ascent() + fontmetrics.descent() + 1,
+                    QCOMPARE(fontmetrics.ascent() + fontmetrics.descent(),
                             fontmetrics.height());
                     QCOMPARE(fontmetrics.height() + fontmetrics.leading(),
                             fontmetrics.lineSpacing());
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index e7435743e5..8920e63957 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -352,7 +352,7 @@ void tst_QTextLayout::threeLineBoundingRect()
     QCOMPARE(qRound(line.naturalTextWidth()), thirdLineWidth);
     y += qRound(line.ascent() + line.descent());
 
-    QCOMPARE(layout.boundingRect(), QRectF(0, 0, longestLine, y + 1));
+    QCOMPARE(layout.boundingRect(), QRectF(0, 0, longestLine, y));
 }
 
 void tst_QTextLayout::boundingRectWithLongLineAndNoWrap()
@@ -386,7 +386,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(), pos);
     QCOMPARE(line.textLength(),2);
     QCOMPARE(qRound(line.naturalTextWidth()),testFont.pixelSize());
-    QCOMPARE((int) line.height(), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE((int) line.height(), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
     pos += line.textLength();
 
@@ -395,7 +395,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(),pos);
     QCOMPARE(line.textLength(),1);
     QCOMPARE(qRound(line.naturalTextWidth()), 0);
-    QCOMPARE((int) line.height(), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE((int) line.height(), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
     pos += line.textLength();
 
@@ -404,7 +404,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(),pos);
     QCOMPARE(line.textLength(),2);
     QCOMPARE(qRound(line.naturalTextWidth()),testFont.pixelSize());
-    QCOMPARE(qRound(line.height()), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE(qRound(line.height()), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
     pos += line.textLength();
 
@@ -413,7 +413,7 @@ void tst_QTextLayout::forcedBreaks()
     QCOMPARE(line.textStart(),pos);
     QCOMPARE(line.textLength(),1);
     QCOMPARE(qRound(line.naturalTextWidth()), testFont.pixelSize());
-    QCOMPARE((int) line.height(), testFont.pixelSize() + 1); // + 1 baseline
+    QCOMPARE((int) line.height(), testFont.pixelSize());
     QCOMPARE(line.xToCursor(0), line.textStart());
 }
 
-- 
cgit v1.2.3


From 1209fccaf7c78f46f7d30cf729ed34e12e295e62 Mon Sep 17 00:00:00 2001
From: David Faure 
Date: Sat, 11 Feb 2012 02:13:22 +0100
Subject: QMimeData: export URLs as text too

This allows to drop or paste them into lineedits and text widgets
(including such widgets in non-Qt applications)

Implementation note: this is done on-demand rather than in setUrls
so that it's still possible to setText explicitely; the new code
is only a fallback for when no text/plain data is available.

Change-Id: Ie90c43a30bfa64a6047b627e7351d20bf5ec8e03
Reviewed-by: Lars Knoll 
---
 tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
index 09f17602b3..f9a6bae087 100644
--- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
+++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
@@ -317,19 +317,22 @@ void tst_QMimeData::setUrls() const
     longUrlList += QUrl("http://www.google.com");
 
     // verify initial state
-    QVERIFY(mimeData.hasUrls() == false);
+    QCOMPARE(mimeData.hasUrls(), false);
 
     // set a few, verify
     mimeData.setUrls(shortUrlList);
     QCOMPARE(mimeData.urls(), shortUrlList);
+    QCOMPARE(mimeData.text(), QString("http://qt.nokia.com"));
 
     // change them, verify
     mimeData.setUrls(longUrlList);
     QCOMPARE(mimeData.urls(), longUrlList);
+    QCOMPARE(mimeData.text(), QString("http://qt.nokia.com\nhttp://www.google.com\n"));
 
     // clear, verify
     mimeData.clear();
-    QVERIFY(mimeData.hasUrls() == false);
+    QCOMPARE(mimeData.hasUrls(), false);
+    QCOMPARE(mimeData.hasText(), false);
 }
 
 QTEST_MAIN(tst_QMimeData)
-- 
cgit v1.2.3


From 3b5f6f76471118e60ee9c9b8536d6b4fba1e785d Mon Sep 17 00:00:00 2001
From: Friedemann Kleint 
Date: Thu, 16 Feb 2012 12:50:22 +0100
Subject: QWindow-test: Fix QSignalSpy warning about Qt::ScreenOrientation.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: I5954445057c1a597b5062ee8e472d684832812e5
Reviewed-by: Samuel Rødal 
---
 tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'tests/auto')

diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 8c4c53cc5c..a860793ce4 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -45,6 +45,9 @@
 
 #include 
 
+// For QSignalSpy slot connections.
+Q_DECLARE_METATYPE(Qt::ScreenOrientation)
+
 class tst_QWindow: public QObject
 {
     Q_OBJECT
-- 
cgit v1.2.3


From 7c081ba94239e26f4e5c8b8c8a8c3486d1a8c76e Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen 
Date: Thu, 16 Feb 2012 14:20:57 +0200
Subject: Fix qlogging test for release configuration

The helper process 'app' wasn't built in release configuration.

Also improved finding the helper executable to utilize
QFINDTESTDATA and print out a proper errors if it could not be
found or started.

Note that adding ".exe" to process name in Windows is unnecessary
as QProcess already does that for you, so removed the ifdeffing.

Task-number: QTBUG-24330
Change-Id: Ibe75e0ecd24181ab623d0a60f17ecaf92052b0dd
Reviewed-by: Friedemann Kleint 
---
 tests/auto/corelib/global/qlogging/app/app.pro     |  6 ++--
 .../auto/corelib/global/qlogging/tst_qlogging.cpp  | 32 +++++++++++++++-------
 2 files changed, 26 insertions(+), 12 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro
index a167cc45cd..1088d08a58 100644
--- a/tests/auto/corelib/global/qlogging/app/app.pro
+++ b/tests/auto/corelib/global/qlogging/app/app.pro
@@ -3,7 +3,9 @@ TEMPLATE = app
 TARGET = app
 QT = core
 
-CONFIG -= debug_and_release app_bundle
-CONFIG += debug console
+DESTDIR = ./
+
+CONFIG -= app_bundle
+CONFIG += console
 
 SOURCES += main.cpp
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 11949cf1db..aaec46fe64 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -47,6 +47,9 @@
 class tst_qmessagehandler : public QObject
 {
     Q_OBJECT
+public slots:
+    void initTestCase();
+
 private slots:
     void cleanup();
 
@@ -59,6 +62,9 @@ private slots:
     void cleanupFuncinfo();
 
     void qMessagePattern();
+
+private:
+    QString m_appDir;
 };
 
 static QtMsgType s_type;
@@ -85,6 +91,13 @@ void customMsgHandler(QtMsgType type, const char *msg)
     s_message = QString::fromLocal8Bit(msg);
 }
 
+void tst_qmessagehandler::initTestCase()
+{
+    m_appDir = QFINDTESTDATA("app");
+    QVERIFY2(!m_appDir.isEmpty(), qPrintable(
+        QString::fromLatin1("Couldn't find helper app dir starting from %1.").arg(QDir::currentPath())));
+}
+
 void tst_qmessagehandler::cleanup()
 {
     qInstallMsgHandler(0);
@@ -622,11 +635,11 @@ void tst_qmessagehandler::qMessagePattern()
     // %{file} is tricky because of shadow builds
     environment.prepend("QT_MESSAGE_PATTERN=\"%{type} %{appname} %{line} %{function} %{message}\"");
     process.setEnvironment(environment);
-#ifdef Q_OS_WIN
-    process.start("app/app.exe");
-#else
-    process.start("app/app");
-#endif
+
+    QString appExe = m_appDir + "/app";
+    process.start(appExe);
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(appExe, process.errorString())));
     process.waitForFinished();
 
     QByteArray output = process.readAllStandardError();
@@ -643,11 +656,10 @@ void tst_qmessagehandler::qMessagePattern()
     environment = QProcess::systemEnvironment();
     environment.prepend("QT_MESSAGE_PATTERN=\"PREFIX: %{unknown} %{message}\"");
     process.setEnvironment(environment);
-#ifdef Q_OS_WIN
-    process.start("app/app.exe");
-#else
-    process.start("app/app");
-#endif
+
+    process.start(appExe);
+    QVERIFY2(process.waitForStarted(), qPrintable(
+        QString::fromLatin1("Could not start %1: %2").arg(appExe, process.errorString())));
     process.waitForFinished();
 
     output = process.readAllStandardError();
-- 
cgit v1.2.3


From b1004b6f8380a46c379b819ef4a5c7ba555f6666 Mon Sep 17 00:00:00 2001
From: Marc Mutz 
Date: Thu, 16 Feb 2012 14:37:04 +0100
Subject: Compilation fix: missing includes for geteuid()

Change-Id: I054b8c9a398b5e192c2e005a39cba19bb4930966
Reviewed-by: David Faure 
Reviewed-by: Thiago Macieira 
---
 tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 4 ++++
 tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp    | 5 +++++
 2 files changed, 9 insertions(+)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index 46d2fa2bde..0b2e1e1902 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -50,6 +50,10 @@
 #ifdef Q_OS_WIN
 # include 
 #endif
+#ifdef Q_OS_UNIX // for geteuid()
+# include 
+# include 
+#endif
 
 class tst_QTemporaryDir : public QObject
 {
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index 8473597dac..ad9da27c7e 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -52,6 +52,11 @@
 #include 
 #include 
 
+#ifdef Q_OS_UNIX // for geteuid()
+# include 
+# include 
+#endif
+
 typedef QMap QStringMap;
 typedef QList QIntList;
 Q_DECLARE_METATYPE(QImage)
-- 
cgit v1.2.3


From f0f78eb0a9cc5d5898937201baa0e543ce4cac22 Mon Sep 17 00:00:00 2001
From: "Bradley T. Hughes" 
Date: Fri, 10 Feb 2012 15:50:47 +0100
Subject: Remove usages of QT_ARCH and QT_ARCH_* from qtbase

The architecture is detected at compile time based on the predefined
macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf
files.  The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present
in the current copy of src/3rdparty/libpng, so no change in
functionality is expected.

The conditional for the SUPPORT_JIT define in pcre.pri is moved to
src/3rdparty/pcre/config.h, again so that we can use the compiler's
predefined macros to detect the architecture at compile time.

Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their
Q_PROCESSOR_* equivalents.

Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with
their Q_OS_* equivalents.

Note that this commit also effectively disables the SPARC atomic
implementation. An inline implementation for SPARC needs to be added,
or we remove the current code and instead rely on the GCC intrinsic or
C++11 std::atomic support on SPARC.

Note also that this commit does not remove QT_ARCH from configure or
qconfig.h. This will continue to be set until all Qt 5 projects can be
moved away from using QT_ARCH.

Change-Id: I5de747cc4436d21941329974cff3016970f497b8
Reviewed-by: Thiago Macieira 
Reviewed-by: Lars Knoll 
---
 tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp       | 2 +-
 .../graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp    | 2 +-
 tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp | 4 ++--
 tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp   | 2 +-
 tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp              | 2 +-
 tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp                | 4 ++--
 tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp      | 2 +-
 tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp                | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

(limited to 'tests/auto')

diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index 578f867032..73cb8e9cd6 100644
--- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -62,7 +62,7 @@ private slots:
 static const int iterations = 10;
 
 // Note: some tests rely on ThreadCount being multiple of 2
-#if defined(Q_OS_SOLARIS) || ( defined(Q_OS_LINUX) && defined(QT_ARCH_ARMV6) )
+#if defined(Q_OS_SOLARIS) || ( defined(Q_OS_LINUX) && defined(Q_PROCESSOR_ARM) )
 static const int ThreadCount = 4;
 #else
 static const int ThreadCount = 10;
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 3ccc533086..ca5b992012 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1574,7 +1574,7 @@ void tst_QGraphicsProxyWidget::resize_simple_data()
     QTest::addColumn("size");
 
     QTest::newRow("200, 200") << QSizeF(200, 200);
-#if !defined(QT_ARCH_ARM) && !defined(Q_OS_WINCE)
+#if !defined(Q_PROCESSOR_ARM) && !defined(Q_OS_WINCE)
     QTest::newRow("1000, 1000") << QSizeF(1000, 1000);
     // Since 4.5, 10000x10000 runs out of memory.
     // QTest::newRow("10000, 10000") << QSizeF(10000, 10000);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index f103d3d529..3257e7efea 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -365,7 +365,7 @@ void tst_QGraphicsScene::itemIndexMethod()
     QGraphicsScene scene;
     QCOMPARE(scene.itemIndexMethod(), QGraphicsScene::BspTreeIndex);
 
-#ifdef QT_ARCH_ARM
+#ifdef Q_PROCESSOR_ARM
     const int minY = -500;
     const int maxY = 500;
     const int minX = -500;
@@ -426,7 +426,7 @@ void tst_QGraphicsScene::bspTreeDepth()
 
 void tst_QGraphicsScene::items()
 {
-#ifdef QT_ARCH_ARM
+#ifdef Q_PROCESSOR_ARM
     const int minY = -500;
     const int maxY = 500;
     const int minX = -500;
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 7681b3c787..7ceeaaa0d3 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -1656,7 +1656,7 @@ void tst_QGraphicsView::mapToScene()
     QCOMPARE(view.size(), viewSize);
 
     // First once without setting the scene rect
-#ifdef QT_ARCH_ARM
+#ifdef Q_PROCESSOR_ARM
     const int step = 20;
 #else
     const int step = 1;
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
index 04b32d1e56..4e71bf964c 100644
--- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
@@ -286,7 +286,7 @@ void tst_QItemView::populate()
 {
     treeModel = new CheckerModel;
     QModelIndex parent;
-#if defined(QT_ARCH_ARM)
+#if defined(Q_PROCESSOR_ARM)
     const int baseInsert = 4;
 #else
     const int baseInsert = 26;
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index 80285ded78..907a239912 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -765,7 +765,7 @@ void tst_QComboBox::virtualAutocompletion()
     // We need to set the keyboard input interval to a higher value
     // as the processEvent() call takes too much time, so it restarts
     // the keyboard search then
-#if defined(QT_ARCH_ARM) || defined(QT_ARCH_MIPS)
+#if defined(Q_PROCESSOR_ARM) || defined(Q_PROCESSOR_MIPS)
     int oldInterval = QApplication::keyboardInputInterval();
     QApplication::setKeyboardInputInterval(1500);
 #endif
@@ -797,7 +797,7 @@ void tst_QComboBox::virtualAutocompletion()
     QApplication::sendEvent(testWidget, &kr2);
     qApp->processEvents(); // Process events to trigger autocompletion
     QTRY_COMPARE(testWidget->currentIndex(), 3);
-#if defined(QT_ARCH_ARM) || defined(QT_ARCH_MIPS)
+#if defined(Q_PROCESSOR_ARM) || defined(Q_PROCESSOR_MIPS)
     QApplication::setKeyboardInputInterval(oldInterval);
 #endif
 }
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index 615e4453bc..4019faf428 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -219,7 +219,7 @@ void tst_QPlainTextEdit::getSetCheck()
     QCOMPARE(0, obj1.tabStopWidth());
     obj1.setTabStopWidth(INT_MIN);
     QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value
-#if defined(QT_ARCH_WINDOWSCE)
+#if defined(Q_OS_WINCE)
     // due to rounding error in qRound when qreal==float
     // we cannot use INT_MAX for this check
     obj1.setTabStopWidth(SHRT_MAX*2);
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 6253ef89e4..249e9d7fbe 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -288,7 +288,7 @@ void tst_QTextEdit::getSetCheck()
     QCOMPARE(0, obj1.tabStopWidth());
     obj1.setTabStopWidth(INT_MIN);
     QCOMPARE(0, obj1.tabStopWidth()); // Makes no sense to set a negative tabstop value
-#if defined(QT_ARCH_WINDOWSCE)
+#if defined(Q_OS_WINCE)
     // due to rounding error in qRound when qreal==float
     // we cannot use INT_MAX for this check
     obj1.setTabStopWidth(SHRT_MAX*2);
-- 
cgit v1.2.3


From c08fb806bb75db7b7b71103e47d5c6c3287ad011 Mon Sep 17 00:00:00 2001
From: Kurt Korbatits 
Date: Thu, 16 Feb 2012 09:32:06 +1000
Subject: Removed rfc3252.txt from networkselftest unittest

- no longer needed after test that used it was removed

Change-Id: I63fc8a9db07f9250507becb9bf6c2aefe0fdc254
Reviewed-by: Jason McDonald 
Reviewed-by: Rohan McGovern 
---
 .../auto/other/networkselftest/networkselftest.pro |  11 -
 tests/auto/other/networkselftest/rfc3252.txt       | 899 ---------------------
 2 files changed, 910 deletions(-)
 delete mode 100644 tests/auto/other/networkselftest/rfc3252.txt

(limited to 'tests/auto')

diff --git a/tests/auto/other/networkselftest/networkselftest.pro b/tests/auto/other/networkselftest/networkselftest.pro
index 3cd5f26689..1c0d256dbb 100644
--- a/tests/auto/other/networkselftest/networkselftest.pro
+++ b/tests/auto/other/networkselftest/networkselftest.pro
@@ -4,14 +4,3 @@ TARGET = tst_networkselftest
 SOURCES += tst_networkselftest.cpp
 QT = core network testlib
 
-wince*: {
-    addFiles.files = rfc3252.txt
-    addFiles.path = .
-    DEPLOYMENT += addFiles
-    DEFINES += SRCDIR=\\\"\\\"
-} else:vxworks*: {
-    DEFINES += SRCDIR=\\\"\\\"
-} else {
-    DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
diff --git a/tests/auto/other/networkselftest/rfc3252.txt b/tests/auto/other/networkselftest/rfc3252.txt
deleted file mode 100644
index b80c61bf0a..0000000000
--- a/tests/auto/other/networkselftest/rfc3252.txt
+++ /dev/null
@@ -1,899 +0,0 @@
-
-
-
-
-
-
-Network Working Group                                         H. Kennedy
-Request for Comments: 3252                                      Mimezine
-Category: Informational                                     1 April 2002
-
-
-                 Binary Lexical Octet Ad-hoc Transport
-
-Status of this Memo
-
-   This memo provides information for the Internet community.  It does
-   not specify an Internet standard of any kind.  Distribution of this
-   memo is unlimited.
-
-Copyright Notice
-
-   Copyright (C) The Internet Society (2002).  All Rights Reserved.
-
-Abstract
-
-   This document defines a reformulation of IP and two transport layer
-   protocols (TCP and UDP) as XML applications.
-
-1.   Introduction
-
-1.1. Overview
-
-   This document describes the Binary Lexical Octet Ad-hoc Transport
-   (BLOAT): a reformulation of a widely-deployed network-layer protocol
-   (IP [RFC791]), and two associated transport layer protocols (TCP
-   [RFC793] and UDP [RFC768]) as XML [XML] applications.  It also
-   describes methods for transporting BLOAT over Ethernet and IEEE 802
-   networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
-   across the public Internet.
-
-1.2. Motivation
-
-   The wild popularity of XML as a basis for application-level protocols
-   such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
-   Object Access Protocol [SOAP], and Jabber [JABBER] prompted
-   investigation into the possibility of extending the use of XML in the
-   protocol stack.  Using XML at both the transport and network layer in
-   addition to the application layer would provide for an amazing amount
-   of power and flexibility while removing dependencies on proprietary
-   and hard-to-understand binary protocols.  This protocol unification
-   would also allow applications to use a single XML parser for all
-   aspects of their operation, eliminating developer time spent figuring
-   out the intricacies of each new protocol, and moving the hard work of
-
-
-
-
-Kennedy                      Informational                      [Page 1]
-
-RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002
-
-
-   parsing to the XML toolset.  The use of XML also mitigates concerns
-   over "network vs. host" byte ordering which is at the root of many
-   network application bugs.
-
-1.3. Relation to Existing Protocols
-
-   The reformulations specified in this RFC follow as closely as
-   possible the spirit of the RFCs on which they are based, and so MAY
-   contain elements or attributes that would not be needed in a pure
-   reworking (e.g. length attributes, which are implicit in XML.)
-
-   The layering of network and transport protocols are maintained in
-   this RFC despite the optimizations that could be made if the line
-   were somewhat blurred (i.e. merging TCP and IP into a single, larger
-   element in the DTD) in order to foster future use of this protocol as
-   a basis for reformulating other protocols (such as ICMP.)
-
-   Other than the encoding, the behavioral aspects of each of the
-   existing protocols remain unchanged.  Routing, address spaces, TCP
-   congestion control, etc. behave as specified in the extant standards.
-   Adapting to new standards and experimental algorithm heuristics for
-   improving performance will become much easier once the move to BLOAT
-   has been completed.
-
-1.4. Requirement Levels
-
-   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
-   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
-   document are to be interpreted as described in BCP 14, RFC 2119
-   [RFC2119].
-
-2.   IPoXML
-
-   This protocol MUST be implemented to be compliant with this RFC.
-   IPoXML is the root protocol REQUIRED for effective use of TCPoXML
-   (section 3.) and higher-level application protocols.
-
-   The DTD for this document type can be found in section 7.1.
-
-   The routing of IPoXML can be easily implemented on hosts with an XML
-   parser, as the regular structure lends itself handily to parsing and
-   validation of the document/datagram and then processing the
-   destination address, TTL, and checksum before sending it on to its
-   next-hop.
-
-   The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
-   wider deployment of IPv4 and the fact that implementing IPv6 as XML
-   would have exceeded the 1500 byte Ethernet MTU.
-
-
-
-Kennedy                      Informational                      [Page 2]
-
-RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002
-
-
-   All BLOAT implementations MUST use - and specify - the UTF-8 encoding
-   of RFC 2279 [RFC2279].  All BLOAT document/datagrams MUST be well-
-   formed and include the XMLDecl.
-
-2.1. IP Description
-
-   A number of items have changed (for the better) from the original IP
-   specification.  Bit-masks, where present have been converted into
-   human-readable values.  IP addresses are listed in their dotted-
-   decimal notation [RFC1123].  Length and checksum values are present
-   as decimal integers.
-
-   To calculate the length and checksum fields of the IP element, a
-   canonicalized form of the element MUST be used.  The canonical form
-   SHALL have no whitespace (including newline characters) between
-   elements and only one space character between attributes.  There
-   SHALL NOT be a space following the last attribute in an element.
-
-   An iterative method SHOULD be used to calculate checksums, as the
-   length field will vary based on the size of the checksum.
-
-   The payload element bears special attention.  Due to the character
-   set restrictions of XML, the payload of IP datagrams (which MAY
-   contain arbitrary data) MUST be encoded for transport. This RFC
-   REQUIRES the contents of the payload to be encoded in the base-64
-   encoding of RFC 2045 [RFC2045], but removes the requirement that the
-   encoded output MUST be wrapped on 76-character lines.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kennedy                      Informational                      [Page 3]
-
-RFC 3252         Binary Lexical Octet Ad-hoc Transport      1 April 2002
-
-
-2.2. Example Datagram
-
-   The following is an example IPoXML datagram with an empty payload:
-
-   
-   
-   
-   
- - - - - - - - - - - - - - - -
- - -
- -3. TCPoXML - - This protocol MUST be implemented to be compliant with this RFC. The - DTD for this document type can be found in section 7.2. - -3.1. TCP Description - - A number of items have changed from the original TCP specification. - Bit-masks, where present have been converted into human-readable - values. Length and checksum and port values are present as decimal - integers. - - To calculate the length and checksum fields of the TCP element, a - canonicalized form of the element MUST be used as in section 2.1. - - An iterative method SHOULD be used to calculate checksums as in - section 2.1. - - The payload element MUST be encoded as in section 2.1. - - - -Kennedy Informational [Page 4] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - The TCP offset element was expanded to a maximum of 255 from 16 to - allow for the increased size of the header in XML. - - TCPoXML datagrams encapsulated by IPoXML MAY omit the header - as well as the declaration. - -3.2. Example Datagram - - The following is an example TCPoXML datagram with an empty payload: - - - - - - - - - - - - - - - - - - - - - - - - -4. UDPoXML - - This protocol MUST be implemented to be compliant with this RFC. The - DTD for this document type can be found in section 7.3. - -4.1. UDP Description - - A number of items have changed from the original UDP specification. - Bit-masks, where present have been converted into human-readable - values. Length and checksum and port values are present as decimal - integers. - - - - - - - -Kennedy Informational [Page 5] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - To calculate the length and checksum fields of the UDP element, a - canonicalized form of the element MUST be used as in section 2.1. An - iterative method SHOULD be used to calculate checksums as in section - 2.1. - - The payload element MUST be encoded as in section 2.1. - - UDPoXML datagrams encapsulated by IPoXML MAY omit the header - as well as the declaration. - -4.2. Example Datagram - - The following is an example UDPoXML datagram with an empty payload: - - - - - - - - - - - - - - -5. Network Transport - - This document provides for the transmission of BLOAT datagrams over - two common families of physical layer transport. Future RFCs will - address additional transports as routing vendors catch up to the - specification, and we begin to see BLOAT routed across the Internet - backbone. - -5.1. Ethernet - - BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the - exception that the type field of the Ethernet frame MUST contain the - value 0xBEEF. The first 5 octets of the Ethernet frame payload will - be 0x3c 3f 78 6d 6c (" - --> - - - - -Kennedy Informational [Page 7] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 9] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 10] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - -7.2. TCPoXML DTD - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 11] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 12] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - - - - - - - - - - - - - - - - - - -7.3. UDPoXML DTD - - - - - - - - - - - - - - - -Kennedy Informational [Page 13] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - -8. Security Considerations - - XML, as a subset of SGML, has the same security considerations as - specified in SGML Media Types [RFC1874]. Security considerations - that apply to IP, TCP and UDP also likely apply to BLOAT as it does - not attempt to correct for issues not related to message format. - -9. References - - [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt, - February 2002. (Work in Progress) - - [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, - August 1980. - - [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791, - September 1981. - - [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC - 793, September 1981. - - [RFC894] Hornig, C., "Standard for the Transmission of IP - Datagrams over Ethernet Networks.", RFC 894, April 1984. - - [RFC1042] Postel, J. and J. Reynolds, "Standard for the - Transmission of IP Datagrams Over IEEE 802 Networks", STD - 43, RFC 1042, February 1988. - - [RFC1123] Braden, R., "Requirements for Internet Hosts - - Application and Support", RFC 1123, October 1989. - - [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December - 1995. - - [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003, - October 1996. - - [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail - Extensions (MIME) Part One: Format of Internet Message - Bodies", RFC 2045, November 1996. - - [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate - Requirement Levels", BCP 14, RFC 2119, March 1997. - - [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO - 10646", RFC 2279, January 1998. - - - - - -Kennedy Informational [Page 14] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - - [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 - (IPv6) Specification", RFC 2460, December 1998. - - [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core", - RFC 3080, March 2001. - - [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A., - Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D., - "Simple Object Access Protocol (SOAP) 1.1" World Wide Web - Consortium Note, May 2000 http://www.w3.org/TR/SOAP/ - - [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible - Markup Language (XML)" World Wide Web Consortium - Recommendation REC- xml-19980210. - http://www.w3.org/TR/1998/REC-xml-19980210 - -10. Author's Address - - Hugh Kennedy - Mimezine - 1060 West Addison - Chicago, IL 60613 - USA - - EMail: kennedyh@engin.umich.edu - - - - - - - - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 15] - -RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002 - - -11. Full Copyright Statement - - Copyright (C) The Internet Society (2002). All Rights Reserved. - - This document and translations of it may be copied and furnished to - others, and derivative works that comment on or otherwise explain it - or assist in its implementation may be prepared, copied, published - and distributed, in whole or in part, without restriction of any - kind, provided that the above copyright notice and this paragraph are - included on all such copies and derivative works. However, this - document itself may not be modified in any way, such as by removing - the copyright notice or references to the Internet Society or other - Internet organizations, except as needed for the purpose of - developing Internet standards in which case the procedures for - copyrights defined in the Internet Standards process must be - followed, or as required to translate it into languages other than - English. - - The limited permissions granted above are perpetual and will not be - revoked by the Internet Society or its successors or assigns. - - This document and the information contained herein is provided on an - "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING - TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION - HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF - MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -Acknowledgement - - Funding for the RFC Editor function is currently provided by the - Internet Society. - - - - - - - - - - - - - - - - - - - -Kennedy Informational [Page 16] - -- cgit v1.2.3 From d0759e348dd4d49b2e7e3907776406e93374ea40 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Tue, 14 Feb 2012 11:46:03 +1000 Subject: Changed qnetworkreply unittest to work from install directory - made subdir test depend on echo - remove SRCDIR and changed to use TESTDATA and QFINDTESTDATA - added waitForFinish() to handle slow networks - removed core module header from echo subprogram and replaced with needed header only - Added ipv6 skip to connectToIPV6Address() if not available - Added check QT_BUILD_INTERNAL and skip tests if backend not available - Skip permission tests if run as root - Removed win32 debug and release directory locations so that application is in known location relative to test data Change-Id: I58c3c2fca3cd2fee72fdb81d016bb4fd7fe08ac2 Reviewed-by: Rohan McGovern --- .../network/access/qnetworkreply/echo/main.cpp | 3 +- .../network/access/qnetworkreply/qnetworkreply.pro | 3 +- .../network/access/qnetworkreply/test/test.pro | 25 +- .../access/qnetworkreply/tst_qnetworkreply.cpp | 501 ++++++++++----------- 4 files changed, 243 insertions(+), 289 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qnetworkreply/echo/main.cpp b/tests/auto/network/access/qnetworkreply/echo/main.cpp index 8e6811d2ff..90217e4923 100644 --- a/tests/auto/network/access/qnetworkreply/echo/main.cpp +++ b/tests/auto/network/access/qnetworkreply/echo/main.cpp @@ -39,8 +39,7 @@ ** ****************************************************************************/ - -#include +#include int main(int argc, char **) { diff --git a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro index 0bcf067c4f..885e7f15b6 100644 --- a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro +++ b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro @@ -1,4 +1,5 @@ TEMPLATE = subdirs -SUBDIRS = test !wince*:SUBDIRS += echo +test.depends += $$SUBDIRS +SUBDIRS += test diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro index 56b8acc6e5..f267b09631 100644 --- a/tests/auto/network/access/qnetworkreply/test/test.pro +++ b/tests/auto/network/access/qnetworkreply/test/test.pro @@ -5,28 +5,13 @@ TARGET = ../tst_qnetworkreply contains(QT_CONFIG,xcb): CONFIG+=insignificant_test # unstable, QTBUG-21102 -win32 { - CONFIG(debug, debug|release) { - TARGET = ../../debug/tst_qnetworkreply -} else { - TARGET = ../../release/tst_qnetworkreply - } -} - -DEFINES += SRCDIR=\\\"$$PWD/..\\\" - QT = core-private network-private testlib RESOURCES += ../qnetworkreply.qrc -wince* { - # For cross compiled targets, reference data files need to be deployed - addFiles.files = ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg - addFiles.path = . - DEPLOYMENT += addFiles - - certFiles.files = ../certs - certFiles.path = . - DEPLOYMENT += certFiles -} +contains(QT_CONFIG,ipv6ifname): DEFINES += HAVE_IPV6 +TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \ + ../index.html ../smb-file.txt win32:CONFIG += insignificant_test # QTBUG-24226 +load(testcase) # for target.path and installTestHelperApp() +installTestHelperApp("../echo/echo",echo,echo) diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 61f44c5c09..279613904f 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -163,6 +163,7 @@ public: QString runCustomRequest(const QNetworkRequest &request, QNetworkReplyPtr &reply, const QByteArray &verb, QIODevice *data); + int waitForFinish(QNetworkReplyPtr &reply); public Q_SLOTS: void finished(); @@ -397,6 +398,8 @@ private Q_SLOTS: // NOTE: This test must be last! void parentingRepliesToTheApp(); +private: + QString testDataDir; }; bool tst_QNetworkReply::seedCreated = false; @@ -450,9 +453,13 @@ QT_END_NAMESPACE #ifndef QT_NO_OPENSSL static void setupSslServer(QSslSocket* serverSocket) { + QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath(); + if (testDataDir.isEmpty()) + testDataDir = QCoreApplication::applicationDirPath(); + serverSocket->setProtocol(QSsl::AnyProtocol); - serverSocket->setLocalCertificate(SRCDIR "/certs/server.pem"); - serverSocket->setPrivateKey(SRCDIR "/certs/server.key"); + serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem"); + serverSocket->setPrivateKey(testDataDir + "/certs/server.key"); } #endif @@ -1235,9 +1242,18 @@ QString tst_QNetworkReply::runSimpleRequest(QNetworkAccessManager::Operation op, connect(reply, SIGNAL(finished()), SLOT(finished())); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(gotError())); + int count = 0; loop = new QEventLoop; - QTimer::singleShot(20000, loop, SLOT(quit())); - code = returnCode == Timeout ? loop->exec() : returnCode; + QSignalSpy spy(reply, SIGNAL(downloadProgress(qint64,qint64))); + while (!reply->isFinished()) { + QTimer::singleShot(20000, loop, SLOT(quit())); + code = loop->exec(); + if (count == spy.count() && !reply->isFinished()) { + code = Timeout; + break; + } + count = spy.count(); + } delete loop; loop = 0; } @@ -1277,6 +1293,31 @@ QString tst_QNetworkReply::runCustomRequest(const QNetworkRequest &request, return QString(); } +int tst_QNetworkReply::waitForFinish(QNetworkReplyPtr &reply) +{ + int code = Success; + int count = 0; + + connect(reply, SIGNAL(finished()), SLOT(finished())); + connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(gotError())); + + loop = new QEventLoop; + QSignalSpy spy(reply, SIGNAL(downloadProgress(qint64,qint64))); + while (!reply->isFinished()) { + QTimer::singleShot(10000, loop, SLOT(quit())); + code = loop->exec(); + if (count == spy.count() && !reply->isFinished()) { + code = Timeout; + break; + } + count = spy.count(); + } + delete loop; + loop = 0; + + return code; +} + void tst_QNetworkReply::finished() { loop->exit(returnCode = Success); @@ -1290,16 +1331,20 @@ void tst_QNetworkReply::gotError() void tst_QNetworkReply::initTestCase() { + testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath(); + if (testDataDir.isEmpty()) + testDataDir = QCoreApplication::applicationDirPath(); + QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); #if !defined Q_OS_WIN - wronlyFileName = QDir::currentPath() + "/write-only"; + wronlyFileName = testDataDir + "/write-only"; QFile wr(wronlyFileName); QVERIFY(wr.open(QIODevice::WriteOnly | QIODevice::Truncate)); wr.setPermissions(QFile::WriteOwner | QFile::WriteUser); wr.close(); #endif - QDir::setSearchPaths("srcdir", QStringList() << SRCDIR); + QDir::setSearchPaths("testdata", QStringList() << testDataDir); #ifndef QT_NO_OPENSSL QSslSocket::defaultCaCertificates(); //preload certificates #endif @@ -1536,10 +1581,10 @@ void tst_QNetworkReply::getFromFileSpecial_data() QTest::addColumn("url"); QTest::newRow("resource") << ":/resource" << "qrc:/resource"; - QTest::newRow("search-path") << "srcdir:/rfc3252.txt" << "srcdir:/rfc3252.txt"; - QTest::newRow("bigfile-path") << "srcdir:/bigfile" << "srcdir:/bigfile"; + QTest::newRow("search-path") << "testdata:/rfc3252.txt" << "testdata:/rfc3252.txt"; + QTest::newRow("bigfile-path") << "testdata:/bigfile" << "testdata:/bigfile"; #ifdef Q_OS_WIN - QTest::newRow("smb-path") << "srcdir:/smb-file.txt" << "file://" + QtNetworkSettings::winServerName() + "/testshare/test.pri"; + QTest::newRow("smb-path") << "testdata:/smb-file.txt" << "file://" + QtNetworkSettings::winServerName() + "/testshare/test.pri"; #endif } @@ -1569,8 +1614,8 @@ void tst_QNetworkReply::getFromFtp_data() QTest::addColumn("referenceName"); QTest::addColumn("url"); - QTest::newRow("rfc3252.txt") << SRCDIR "/rfc3252.txt" << "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"; - QTest::newRow("bigfile") << SRCDIR "/bigfile" << "ftp://" + QtNetworkSettings::serverName() + "/qtest/bigfile"; + QTest::newRow("rfc3252.txt") << (testDataDir + "/rfc3252.txt") << "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"; + QTest::newRow("bigfile") << (testDataDir + "/bigfile") << "ftp://" + QtNetworkSettings::serverName() + "/qtest/bigfile"; } void tst_QNetworkReply::getFromFtp() @@ -1597,9 +1642,9 @@ void tst_QNetworkReply::getFromHttp_data() QTest::addColumn("referenceName"); QTest::addColumn("url"); - QTest::newRow("success-internal") << SRCDIR "/rfc3252.txt" << "http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"; - QTest::newRow("success-external") << SRCDIR "/rfc3252.txt" << "http://www.ietf.org/rfc/rfc3252.txt"; - QTest::newRow("bigfile-internal") << SRCDIR "/bigfile" << "http://" + QtNetworkSettings::serverName() + "/qtest/bigfile"; + QTest::newRow("success-internal") << (testDataDir + "/rfc3252.txt") << "http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"; + QTest::newRow("success-external") << (testDataDir + "/rfc3252.txt") << "http://www.ietf.org/rfc/rfc3252.txt"; + QTest::newRow("bigfile-internal") << (testDataDir + "/bigfile") << "http://" + QtNetworkSettings::serverName() + "/qtest/bigfile"; } void tst_QNetworkReply::getFromHttp() @@ -1636,9 +1681,9 @@ void tst_QNetworkReply::headFromHttp_data() QTest::addColumn("contentType"); QTest::addColumn("proxy"); - qint64 rfcsize = QFileInfo(SRCDIR "/rfc3252.txt").size(); - qint64 bigfilesize = QFileInfo(SRCDIR "/bigfile").size(); - qint64 indexsize = QFileInfo(SRCDIR "/index.html").size(); + qint64 rfcsize = QFileInfo(testDataDir + "/rfc3252.txt").size(); + qint64 bigfilesize = QFileInfo(testDataDir + "/bigfile").size(); + qint64 indexsize = QFileInfo(testDataDir + "/index.html").size(); //testing proxies, mainly for the 407 response from http proxy for (int i = 0; i < proxies.count(); ++i) { @@ -1697,7 +1742,7 @@ void tst_QNetworkReply::getErrors_data() // empties QTest::newRow("empty-url") << QString() << int(QNetworkReply::ProtocolUnknownError) << 0 << true; - QTest::newRow("empty-scheme-host") << SRCDIR "/rfc3252.txt" << int(QNetworkReply::ProtocolUnknownError) << 0 << true; + QTest::newRow("empty-scheme-host") << (testDataDir + "/rfc3252.txt") << int(QNetworkReply::ProtocolUnknownError) << 0 << true; QTest::newRow("empty-scheme") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" << int(QNetworkReply::ProtocolUnknownError) << 0 << true; @@ -1750,6 +1795,14 @@ void tst_QNetworkReply::getErrors() QFETCH(QString, url); QNetworkRequest request(url); +#ifdef Q_OS_UNIX + if ((qstrcmp(QTest::currentDataTag(), "file-is-wronly") == 0) || + (qstrcmp(QTest::currentDataTag(), "file-permissions") == 0)) { + if (::getuid() == 0) + QSKIP("Running this test as root doesn't make sense"); + } +#endif + QNetworkReplyPtr reply = manager.get(request); reply->setParent(this); // we have expect-fails @@ -1757,11 +1810,7 @@ void tst_QNetworkReply::getErrors() QCOMPARE(reply->error(), QNetworkReply::NoError); // now run the request: - connect(reply, SIGNAL(finished()), - &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - //qDebug() << reply->errorString(); + QVERIFY(waitForFinish(reply) != Timeout); QFETCH(int, error); QEXPECT_FAIL("ftp-is-dir", "QFtp cannot provide enough detail", Abort); @@ -1867,7 +1916,14 @@ void tst_QNetworkReply::putToFtp() QNetworkReply *r = qnam.get(req); QObject::connect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); + int count = 0; + QSignalSpy spy(r, SIGNAL(downloadProgress(qint64,qint64))); + while (!r->isFinished()) { + QTestEventLoop::instance().enterLoop(10); + if (count == spy.count() && !r->isFinished()) + break; + count = spy.count(); + } QObject::disconnect(r, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QByteArray uploaded = r->readAll(); @@ -2111,7 +2167,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() imagePart11.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage\"")); imagePart11.setRawHeader("Content-Location", "http://my.test.location.tld"); imagePart11.setRawHeader("Content-ID", "my@id.tld"); - QFile *file11 = new QFile(SRCDIR "/image1.jpg"); + QFile *file11 = new QFile(testDataDir + "/image1.jpg"); file11->open(QIODevice::ReadOnly); imagePart11.setBodyDevice(file11); QHttpMultiPart *imageMultiPart1 = new QHttpMultiPart(QHttpMultiPart::FormDataType); @@ -2125,7 +2181,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() imagePart21.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage1\"")); imagePart21.setRawHeader("Content-Location", "http://my.test.location.tld"); imagePart21.setRawHeader("Content-ID", "my@id.tld"); - QFile *file21 = new QFile(SRCDIR "/image1.jpg"); + QFile *file21 = new QFile(testDataDir + "/image1.jpg"); file21->open(QIODevice::ReadOnly); imagePart21.setBodyDevice(file21); QHttpMultiPart *imageMultiPart2 = new QHttpMultiPart(); @@ -2136,7 +2192,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() QHttpPart imagePart22; imagePart22.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg")); imagePart22.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage2\"")); - QFile *file22 = new QFile(SRCDIR "/image2.jpg"); + QFile *file22 = new QFile(testDataDir + "/image2.jpg"); file22->open(QIODevice::ReadOnly); imagePart22.setBodyDevice(file22); imageMultiPart2->append(imagePart22); @@ -2152,7 +2208,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() imagePart31.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage1\"")); imagePart31.setRawHeader("Content-Location", "http://my.test.location.tld"); imagePart31.setRawHeader("Content-ID", "my@id.tld"); - QFile *file31 = new QFile(SRCDIR "/image1.jpg"); + QFile *file31 = new QFile(testDataDir + "/image1.jpg"); file31->open(QIODevice::ReadOnly); imagePart31.setBodyDevice(file31); QHttpMultiPart *imageMultiPart3 = new QHttpMultiPart(QHttpMultiPart::FormDataType); @@ -2161,7 +2217,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() QHttpPart imagePart32; imagePart32.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg")); imagePart32.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage2\"")); - QFile *file32 = new QFile(SRCDIR "/image2.jpg"); + QFile *file32 = new QFile(testDataDir + "/image2.jpg"); file32->open(QIODevice::ReadOnly); imagePart32.setBodyDevice(file31); // check that resetting works imagePart32.setBodyDevice(file32); @@ -2170,7 +2226,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() QHttpPart imagePart33; imagePart33.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg")); imagePart33.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage3\"")); - QFile *file33 = new QFile(SRCDIR "/image3.jpg"); + QFile *file33 = new QFile(testDataDir + "/image3.jpg"); file33->open(QIODevice::ReadOnly); imagePart33.setBodyDevice(file33); imageMultiPart3->append(imagePart33); @@ -2185,7 +2241,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() // QHttpPart imagePart41; // imagePart41.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg")); -// QFile *file41 = new QFile(SRCDIR "/image1.jpg"); +// QFile *file41 = new QFile(testDataDir + "/image1.jpg"); // file41->open(QIODevice::ReadOnly); // imagePart41.setBodyDevice(file41); // @@ -2219,7 +2275,7 @@ void tst_QNetworkReply::postToHttpMultipart_data() QHttpPart imagePart51; imagePart51.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg")); imagePart51.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"testImage\"")); - QFile *file51 = new QFile(SRCDIR "/image1.jpg"); + QFile *file51 = new QFile(testDataDir + "/image1.jpg"); file51->open(QIODevice::ReadOnly); QByteArray imageData = file51->readAll(); file51->close(); @@ -2426,6 +2482,10 @@ void tst_QNetworkReply::connectToIPv6Address() QFETCH(QByteArray, dataToSend); QFETCH(QByteArray, hostfield); +#if !defined(HAVE_IPV6) && defined(Q_OS_UNIX) + QSKIP("system doesn't support ipv6!"); +#endif + QByteArray httpResponse = QByteArray("HTTP/1.0 200 OK\r\nContent-Length: "); httpResponse += QByteArray::number(dataToSend.size()); httpResponse += "\r\n\r\n"; @@ -2438,9 +2498,7 @@ void tst_QNetworkReply::connectToIPv6Address() QNetworkRequest request(url); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QByteArray content = reply->readAll(); //qDebug() << server.receivedData; QByteArray hostinfo = "\r\nHost: " + hostfield + ":" + QByteArray::number(server.serverPort()) + "\r\n"; @@ -2607,7 +2665,7 @@ void tst_QNetworkReply::ioGetFromFtp_data() QTest::newRow("bigfile") << "bigfile" << Q_INT64_C(519240); - QFile file(SRCDIR "/rfc3252.txt"); + QFile file(testDataDir + "/rfc3252.txt"); QTest::newRow("rfc3252.txt") << "rfc3252.txt" << file.size(); } @@ -2621,9 +2679,7 @@ void tst_QNetworkReply::ioGetFromFtp() QNetworkReplyPtr reply = manager.get(request); DataReader reader(reply); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -2638,7 +2694,7 @@ void tst_QNetworkReply::ioGetFromFtp() void tst_QNetworkReply::ioGetFromFtpWithReuse() { - QString fileName = SRCDIR "/rfc3252.txt"; + QString fileName = testDataDir + "/rfc3252.txt"; QFile reference(fileName); reference.open(QIODevice::ReadOnly); @@ -2651,14 +2707,8 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse() DataReader reader2(reply2); QSignalSpy spy(reply1, SIGNAL(finished())); - connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - if (spy.count() == 0) { - connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - } + QVERIFY(waitForFinish(reply1) == Success); + QVERIFY(waitForFinish(reply2) == Success); QCOMPARE(reply1->url(), request.url()); QCOMPARE(reply2->url(), request.url()); @@ -2677,16 +2727,14 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse() void tst_QNetworkReply::ioGetFromHttp() { - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")); QNetworkReplyPtr reply = manager.get(request); DataReader reader(reply); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -2700,7 +2748,7 @@ void tst_QNetworkReply::ioGetFromHttp() void tst_QNetworkReply::ioGetFromHttpWithReuseParallel() { - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")); @@ -2710,14 +2758,8 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseParallel() DataReader reader2(reply2); QSignalSpy spy(reply1, SIGNAL(finished())); - connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - if (spy.count() == 0) { - connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - } + QVERIFY(waitForFinish(reply2) == Success); + QVERIFY(waitForFinish(reply1) == Success); QCOMPARE(reply1->url(), request.url()); QCOMPARE(reply2->url(), request.url()); @@ -2738,7 +2780,7 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseParallel() void tst_QNetworkReply::ioGetFromHttpWithReuseSequential() { - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")); @@ -2746,9 +2788,7 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseSequential() QNetworkReplyPtr reply = manager.get(request); DataReader reader(reply); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -2766,9 +2806,7 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseSequential() QNetworkReplyPtr reply = manager.get(request); DataReader reader(reply); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -2786,7 +2824,7 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth_data() QTest::addColumn("url"); QTest::addColumn("expectedData"); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); reference.open(QIODevice::ReadOnly); QByteArray referenceData = reference.readAll(); QTest::newRow("basic") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData; @@ -2813,14 +2851,9 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth() connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - if (finishedspy.count() == 0) { - connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - } + QVERIFY(waitForFinish(reply2) == Success); + QVERIFY(waitForFinish(reply1) == Success); + manager.disconnect(SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); @@ -2840,9 +2873,9 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth() QSignalSpy authspy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); + manager.disconnect(SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); @@ -2898,7 +2931,7 @@ void tst_QNetworkReply::ioGetFromHttpWithProxyAuth() // This test sends three requests // The first two in parallel // The third after the first two finished - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkProxy proxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::serverName(), 3129); @@ -2917,14 +2950,9 @@ void tst_QNetworkReply::ioGetFromHttpWithProxyAuth() connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - if (finishedspy.count() == 0) { - connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); - } + QVERIFY(waitForFinish(reply2) == Success); + QVERIFY(waitForFinish(reply1) == Success); + manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); @@ -2948,9 +2976,9 @@ void tst_QNetworkReply::ioGetFromHttpWithProxyAuth() QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); + manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); @@ -3010,7 +3038,7 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy() qRegisterMetaType(); // for QSignalSpy qRegisterMetaType(); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkProxy proxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080); @@ -3024,9 +3052,9 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy() QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); + manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); @@ -3047,9 +3075,9 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy() QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Failure); + manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); @@ -3070,7 +3098,7 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslErrors() qRegisterMetaType(); // for QSignalSpy qRegisterMetaType >(); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")); @@ -3082,9 +3110,8 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslErrors() SLOT(sslErrors(QNetworkReply*,QList))); connect(reply, SIGNAL(metaDataChanged()), SLOT(storeSslConfiguration())); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); + manager.disconnect(SIGNAL(sslErrors(QNetworkReply*,QList)), this, SLOT(sslErrors(QNetworkReply*,QList))); @@ -3105,7 +3132,7 @@ void tst_QNetworkReply::ioGetFromHttpsWithIgnoreSslErrors() qRegisterMetaType(); // for QSignalSpy qRegisterMetaType >(); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")); @@ -3116,9 +3143,8 @@ void tst_QNetworkReply::ioGetFromHttpsWithIgnoreSslErrors() QSignalSpy sslspy(&manager, SIGNAL(sslErrors(QNetworkReply*,QList))); connect(reply, SIGNAL(metaDataChanged()), SLOT(storeSslConfiguration())); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); QCOMPARE(reader.data, reference.readAll()); @@ -3134,7 +3160,7 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslHandshakeError() qRegisterMetaType(); // for QSignalSpy qRegisterMetaType >(); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + ":80")); @@ -3145,9 +3171,8 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslHandshakeError() QSignalSpy sslspy(&manager, SIGNAL(sslErrors(QNetworkReply*,QList))); connect(reply, SIGNAL(metaDataChanged()), SLOT(storeSslConfiguration())); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Failure); QCOMPARE(reply->error(), QNetworkReply::SslHandshakeFailedError); QCOMPARE(sslspy.count(), 0); @@ -3205,10 +3230,7 @@ void tst_QNetworkReply::ioGetFromHttpBrokenServer() QNetworkReplyPtr reply = manager.get(request); QSignalSpy spy(reply, SIGNAL(error(QNetworkReply::NetworkError))); - - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Failure); QCOMPARE(reply->url(), request.url()); QCOMPARE(spy.count(), 1); @@ -3238,9 +3260,7 @@ void tst_QNetworkReply::ioGetFromHttpStatus100() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3263,9 +3283,7 @@ void tst_QNetworkReply::ioGetFromHttpNoHeaders() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3434,9 +3452,7 @@ void tst_QNetworkReply::ioGetFromHttpWithCache() QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) != Timeout); QTEST(reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool(), "loadedFromCache"); QTEST(server.totalConnections > 0, "networkUsed"); @@ -3649,7 +3665,7 @@ void tst_QNetworkReply::ioGetWithManyProxies() qRegisterMetaType(); // for QSignalSpy qRegisterMetaType(); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); // set the proxy factory: @@ -3667,13 +3683,12 @@ void tst_QNetworkReply::ioGetWithManyProxies() QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); #ifndef QT_NO_OPENSSL connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList)), SLOT(sslErrors(QNetworkReply*,QList))); #endif - QTestEventLoop::instance().enterLoop(15); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) != Timeout); manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); @@ -3714,10 +3729,10 @@ void tst_QNetworkReply::ioPutToFileFromFile_data() { QTest::addColumn("fileName"); - QTest::newRow("empty") << SRCDIR "/empty"; - QTest::newRow("real-file") << SRCDIR "/rfc3252.txt"; + QTest::newRow("empty") << (testDataDir + "/empty"); + QTest::newRow("real-file") << (testDataDir + "/rfc3252.txt"); QTest::newRow("resource") << ":/resource"; - QTest::newRow("search-path") << "srcdir:/rfc3252.txt"; + QTest::newRow("search-path") << "testdata:/rfc3252.txt"; } void tst_QNetworkReply::ioPutToFileFromFile() @@ -3732,9 +3747,7 @@ void tst_QNetworkReply::ioPutToFileFromFile() QNetworkRequest request(url); QNetworkReplyPtr reply = manager.put(request, &sourceFile); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3770,10 +3783,8 @@ void tst_QNetworkReply::ioPutToFileFromSocket() QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), socketpair.endPoints[1]); socketpair.endPoints[0]->close(); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->error(), QNetworkReply::NoError); - QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3816,10 +3827,8 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket() QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), passive); passive->setParent(reply); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->error(), QNetworkReply::NoError); - QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3866,9 +3875,7 @@ void tst_QNetworkReply::ioPutToFileFromProcess() QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), &process); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3902,9 +3909,7 @@ void tst_QNetworkReply::ioPutToFtpFromFile() QNetworkRequest request(url); QNetworkReplyPtr reply = manager.put(request, &sourceFile); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3953,9 +3958,7 @@ void tst_QNetworkReply::ioPutToHttpFromFile() QNetworkRequest request(url); QNetworkReplyPtr reply = manager.put(request, &sourceFile); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3969,9 +3972,8 @@ void tst_QNetworkReply::ioPutToHttpFromFile() // download the file again from HTTP to make sure it was uploaded // correctly reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -3997,9 +3999,7 @@ void tst_QNetworkReply::ioPostToHttpFromFile() QNetworkReplyPtr reply = manager.post(request, &sourceFile); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -4077,7 +4077,6 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() QNetworkReplyPtr reply = manager.post(request, socketpair.endPoints[1]); socketpair.endPoints[0]->close(); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), @@ -4086,13 +4085,13 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() QSignalSpy authenticationRequiredSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); QSignalSpy proxyAuthenticationRequiredSpy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(12); + QVERIFY(waitForFinish(reply) == Success); + disconnect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); QCOMPARE(reply->error(), QNetworkReply::NoError); - QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -4170,7 +4169,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocketSynchronous() // worked. void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileToEnd() { - QFile sourceFile(SRCDIR "/rfc3252.txt"); + QFile sourceFile(testDataDir + "/rfc3252.txt"); QVERIFY(sourceFile.open(QIODevice::ReadOnly)); // seeking to the middle sourceFile.seek(sourceFile.size() / 2); @@ -4180,14 +4179,13 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileToEnd() request.setRawHeader("Content-Type", "application/octet-stream"); QNetworkReplyPtr reply = manager.post(request, &sourceFile); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(2); + QVERIFY(waitForFinish(reply) == Success); + disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QVERIFY(!QTestEventLoop::instance().timeout()); // compare half data sourceFile.seek(sourceFile.size() / 2); @@ -4197,7 +4195,7 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileToEnd() void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileFiveBytes() { - QFile sourceFile(SRCDIR "/rfc3252.txt"); + QFile sourceFile(testDataDir + "/rfc3252.txt"); QVERIFY(sourceFile.open(QIODevice::ReadOnly)); // seeking to the middle sourceFile.seek(sourceFile.size() / 2); @@ -4210,14 +4208,13 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfFileFiveBytes() QVERIFY(request.header(QNetworkRequest::ContentLengthHeader).isValid()); QNetworkReplyPtr reply = manager.post(request, &sourceFile); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(2); + QVERIFY(waitForFinish(reply) == Success); + disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QVERIFY(!QTestEventLoop::instance().timeout()); // compare half data sourceFile.seek(sourceFile.size() / 2); @@ -4239,14 +4236,13 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfQBufferFiveBytes() request.setRawHeader("Content-Type", "application/octet-stream"); QNetworkReplyPtr reply = manager.post(request, &uploadBuffer); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(2); + QVERIFY(waitForFinish(reply) == Success); + disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QVERIFY(!QTestEventLoop::instance().timeout()); // compare half data uploadBuffer.seek(5); @@ -4273,11 +4269,11 @@ void tst_QNetworkReply::ioPostToHttpNoBufferFlag() QNetworkReplyPtr reply = manager.post(request, socketpair.endPoints[1]); socketpair.endPoints[0]->close(); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); - QTestEventLoop::instance().enterLoop(2); + QVERIFY(waitForFinish(reply) == Failure); + disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); @@ -4295,12 +4291,16 @@ public: serverSocket->setParent(this); if (serverSocket->setSocketDescriptor(socketDescriptor)) { + QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath(); + if (testDataDir.isEmpty()) + testDataDir = QCoreApplication::applicationDirPath(); + connect(serverSocket, SIGNAL(encrypted()), this, SLOT(encryptedSlot())); connect(serverSocket, SIGNAL(readyRead()), this, SLOT(readyReadSlot())); serverSocket->setProtocol(QSsl::AnyProtocol); connect(serverSocket, SIGNAL(sslErrors(const QList&)), serverSocket, SLOT(ignoreSslErrors())); - serverSocket->setLocalCertificate(SRCDIR "/certs/server.pem"); - serverSocket->setPrivateKey(SRCDIR "/certs/server.key"); + serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem"); + serverSocket->setPrivateKey(testDataDir + "/certs/server.key"); serverSocket->startServerEncryption(); } else { delete serverSocket; @@ -4325,7 +4325,7 @@ public: // very similar to ioPostToHttpUploadProgress but for SSL void tst_QNetworkReply::ioPostToHttpsUploadProgress() { - //QFile sourceFile(SRCDIR "/bigfile"); + //QFile sourceFile(testDataDir + "/bigfile"); //QVERIFY(sourceFile.open(QIODevice::ReadOnly)); qint64 wantedSize = 2*1024*1024; // 2 MB QByteArray sourceFile; @@ -4377,13 +4377,11 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress() QCOMPARE(args3.at(0).toLongLong(), qint64(sourceFile.size())); // after sending this, the QNAM should emit finished() - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); incomingSocket->write("HTTP/1.0 200 OK\r\n"); incomingSocket->write("Content-Length: 0\r\n"); incomingSocket->write("\r\n"); - QTestEventLoop::instance().enterLoop(10); - // not timeouted -> finished() was emitted - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); incomingSocket->close(); server.close(); @@ -4440,10 +4438,11 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp() const int rate = 200; // in kB per sec RateControlledReader reader(server, reply, rate, bufferSize); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTime loopTime; loopTime.start(); - QTestEventLoop::instance().enterLoop(30); + + QVERIFY(waitForFinish(reply) == Success); + const int elapsedTime = loopTime.elapsed(); server.wait(); reader.wrapUp(); @@ -4452,8 +4451,6 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp() qDebug() << "receive rate:" << reader.totalBytesRead * 1000 / elapsedTime << "(it received" << reader.totalBytesRead << "bytes in" << elapsedTime << "ms)"; - QVERIFY(!QTestEventLoop::instance().timeout()); - QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); @@ -4483,7 +4480,7 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp() void tst_QNetworkReply::ioPostToHttpUploadProgress() { - QFile sourceFile(SRCDIR "/bigfile"); + QFile sourceFile(testDataDir + "/bigfile"); QVERIFY(sourceFile.open(QIODevice::ReadOnly)); // emulate a minimal http server @@ -4588,16 +4585,15 @@ void tst_QNetworkReply::ioPostToHttpEmptyUploadProgress() void tst_QNetworkReply::lastModifiedHeaderForFile() { - QFileInfo fileInfo(SRCDIR "/bigfile"); + QFileInfo fileInfo(testDataDir + "/bigfile"); QVERIFY(fileInfo.exists()); QUrl url = QUrl::fromLocalFile(fileInfo.filePath()); QNetworkRequest request(url); QNetworkReplyPtr reply = manager.head(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); QDateTime header = reply->header(QNetworkRequest::LastModifiedHeader).toDateTime(); QCOMPARE(header, fileInfo.lastModified()); @@ -4610,9 +4606,8 @@ void tst_QNetworkReply::lastModifiedHeaderForHttp() QNetworkRequest request(url); QNetworkReplyPtr reply = manager.head(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply) == Success); QDateTime header = reply->header(QNetworkRequest::LastModifiedHeader).toDateTime(); QDateTime realDate = QDateTime::fromString("2007-05-22T12:04:57", Qt::ISODate); @@ -4626,9 +4621,8 @@ void tst_QNetworkReply::httpCanReadLine() QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(reply->canReadLine()); @@ -4656,13 +4650,16 @@ void tst_QNetworkReply::rateControl() // faster than the data is being consumed. QFETCH(int, rate); +#if !defined(QT_BUILD_INTERNAL) + QSKIP("backend for testing not available!"); +#endif + // ask for 20 seconds worth of data FastSender sender(20 * rate * 1024); QNetworkRequest request("debugpipe://localhost:" + QString::number(sender.serverPort())); QNetworkReplyPtr reply = manager.get(request); reply->setReadBufferSize(32768); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); qRegisterMetaType("QNetworkReply::NetworkError"); QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError))); @@ -4671,7 +4668,9 @@ void tst_QNetworkReply::rateControl() // this test is designed to run for 25 seconds at most QTime loopTime; loopTime.start(); - QTestEventLoop::instance().enterLoop(40); + + QVERIFY(waitForFinish(reply) == Success); + int elapsedTime = loopTime.elapsed(); if (!errorSpy.isEmpty()) { @@ -4683,7 +4682,6 @@ void tst_QNetworkReply::rateControl() << "(it received" << reader.totalBytesRead << "bytes in" << elapsedTime << "ms)"; sender.wait(); - QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), request.url()); QCOMPARE(reply->error(), QNetworkReply::NoError); @@ -4706,6 +4704,9 @@ void tst_QNetworkReply::downloadProgress_data() void tst_QNetworkReply::downloadProgress() { +#if !defined(QT_BUILD_INTERNAL) + QSKIP("backend for testing not available!"); +#endif QTcpServer server; QVERIFY(server.listen()); @@ -4769,6 +4770,9 @@ void tst_QNetworkReply::uploadProgress_data() void tst_QNetworkReply::uploadProgress() { QFETCH(QByteArray, data); +#if !defined(QT_BUILD_INTERNAL) + QSKIP("backend for testing not available!"); +#endif QTcpServer server; QVERIFY(server.listen()); @@ -4787,9 +4791,7 @@ void tst_QNetworkReply::uploadProgress() QTcpSocket *receiver = server.nextPendingConnection(); if (finished.count() == 0) { // it's not finished yet, so wait for it to be - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(2); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); } delete receiver; @@ -4825,9 +4827,7 @@ void tst_QNetworkReply::chaining() request.setUrl(url); QNetworkReplyPtr putReply = manager.put(request, getReply); - connect(putReply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(putReply) == Success); QCOMPARE(getReply->url(), QUrl::fromLocalFile(sourceFile.fileName())); QCOMPARE(getReply->error(), QNetworkReply::NoError); @@ -5108,11 +5108,7 @@ void tst_QNetworkReply::httpProxyCommands() //manager.setProxy(QNetworkProxy()); // wait for the finished signal - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - - QTestEventLoop::instance().enterLoop(15); - - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) != Timeout); //qDebug() << reply->error() << reply->errorString(); //qDebug() << proxyServer.receivedData; @@ -5245,9 +5241,8 @@ void tst_QNetworkReply::proxyChange() manager.setProxy(dummyProxy); QNetworkReplyPtr reply3 = manager.get(req); - connect(reply3, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(5); - QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(waitForFinish(reply3) == Failure); QVERIFY(int(reply3->error()) > 0); } @@ -5283,10 +5278,7 @@ void tst_QNetworkReply::authorizationError() QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError))); QSignalSpy finishedSpy(reply, SIGNAL(finished())); // now run the request: - connect(reply, SIGNAL(finished()), - &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Failure); QFETCH(int, errorSignalCount); QCOMPARE(errorSpy.count(), errorSignalCount); @@ -5512,8 +5504,7 @@ void tst_QNetworkReply::ignoreSslErrorsList_data() QTest::addColumn("expectedNetworkError"); QList expectedSslErrors; - // apparently, because of some weird behaviour of SRCDIR, the file name below needs to start with a slash - QList certs = QSslCertificate::fromPath(QLatin1String(SRCDIR "/certs/qt-test-server-cacert.pem")); + QList certs = QSslCertificate::fromPath(testDataDir + "/certs/qt-test-server-cacert.pem"); QSslError rightError(QSslError::SelfSignedCertificate, certs.at(0)); QSslError wrongError(QSslError::SelfSignedCertificate); @@ -5537,9 +5528,7 @@ void tst_QNetworkReply::ignoreSslErrorsList() QFETCH(QList, expectedSslErrors); reply->ignoreSslErrors(expectedSslErrors); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) != Timeout); QFETCH(QNetworkReply::NetworkError, expectedNetworkError); QCOMPARE(reply->error(), expectedNetworkError); @@ -5570,9 +5559,7 @@ void tst_QNetworkReply::ignoreSslErrorsListWithSlot() this, SLOT(ignoreSslErrorListSlot(QNetworkReply *, const QList &))); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) != Timeout); QFETCH(QNetworkReply::NetworkError, expectedNetworkError); QCOMPARE(reply->error(), expectedNetworkError); @@ -5586,7 +5573,7 @@ void tst_QNetworkReply::sslConfiguration_data() QTest::newRow("empty") << QSslConfiguration() << false; QSslConfiguration conf = QSslConfiguration::defaultConfiguration(); QTest::newRow("default") << conf << false; // does not contain test server cert - QList testServerCert = QSslCertificate::fromPath(SRCDIR "/certs/qt-test-server-cacert.pem"); + QList testServerCert = QSslCertificate::fromPath(testDataDir + "/certs/qt-test-server-cacert.pem"); conf.setCaCertificates(testServerCert); QTest::newRow("set-root-cert") << conf << true; conf.setProtocol(QSsl::SecureProtocols); @@ -5600,9 +5587,7 @@ void tst_QNetworkReply::sslConfiguration() request.setSslConfiguration(configuration); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) != Timeout); QFETCH(bool, works); QNetworkReply::NetworkError expectedError = works ? QNetworkReply::NoError : QNetworkReply::SslHandshakeFailedError; @@ -5686,12 +5671,11 @@ void tst_QNetworkReply::getFromHttpIntoBuffer() QNetworkAccessManager manager; QNetworkReply *reply = manager.get(request); connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(reply->isFinished()); - QFile reference(SRCDIR "/rfc3252.txt"); + QFile reference(testDataDir + "/rfc3252.txt"); QVERIFY(reference.open(QIODevice::ReadOnly)); QCOMPARE(reference.bytesAvailable(), reply->bytesAvailable()); @@ -5897,9 +5881,7 @@ void tst_QNetworkReply::getFromHttpIntoBufferCanReadLine() request.setAttribute(QNetworkRequest::MaximumDownloadBufferSizeAttribute, 1024*1024*128); // 128 MB is max allowed QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(reply->canReadLine()); @@ -5923,9 +5905,7 @@ void tst_QNetworkReply::ioGetFromHttpWithoutContentLength() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->url(), request.url()); QVERIFY(reply->isFinished()); @@ -5973,9 +5953,7 @@ void tst_QNetworkReply::qtbug12908compressedHttpReply() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->size(), qint64(16384)); @@ -5998,9 +5976,7 @@ void tst_QNetworkReply::compressedHttpReplyBrokenGzip() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Failure); QCOMPARE(reply->error(), QNetworkReply::ProtocolFailure); } @@ -6013,9 +5989,7 @@ void tst_QNetworkReply::getFromUnreachableIp() QNetworkRequest request(QUrl("http://255.255.255.255/42/23/narf/narf/narf")); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Failure); QVERIFY(reply->error() != QNetworkReply::NoError); } @@ -6348,9 +6322,8 @@ void tst_QNetworkReply::qtbug15311doubleContentLength() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); + QVERIFY(reply->isFinished()); QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->size(), qint64(3)); @@ -6368,9 +6341,8 @@ void tst_QNetworkReply::qtbug18232gzipContentLengthZero() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); + QVERIFY(reply->isFinished()); QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->size(), qint64(0)); @@ -6390,9 +6362,8 @@ void tst_QNetworkReply::qtbug22660gzipNoContentLengthEmptyContent() QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); + QVERIFY(reply->isFinished()); QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->size(), qint64(0)); @@ -6411,13 +6382,13 @@ void tst_QNetworkReply::synchronousRequest_data() QTest::newRow("http") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt") - << QString("file:" SRCDIR "/rfc3252.txt") + << QString("file:" + testDataDir + "/rfc3252.txt") << true << QString("text/plain"); QTest::newRow("http-gzip") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/deflate/rfc3252.txt") - << QString("file:" SRCDIR "/rfc3252.txt") + << QString("file:" + testDataDir + "/rfc3252.txt") << false // don't check content length, because it's gzip encoded // ### we would need to enflate (un-deflate) the file content and compare the sizes << QString("text/plain"); @@ -6425,7 +6396,7 @@ void tst_QNetworkReply::synchronousRequest_data() #ifndef QT_NO_OPENSSL QTest::newRow("https") << QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt") - << QString("file:" SRCDIR "/rfc3252.txt") + << QString("file:" + testDataDir + "/rfc3252.txt") << true << QString("text/plain"); #endif @@ -6437,8 +6408,8 @@ void tst_QNetworkReply::synchronousRequest_data() << QString("text/plain"); QTest::newRow("simple-file") - << QUrl::fromLocalFile(SRCDIR "/rfc3252.txt") - << QString("file:" SRCDIR "/rfc3252.txt") + << QUrl::fromLocalFile(testDataDir + "/rfc3252.txt") + << QString("file:" + testDataDir + "/rfc3252.txt") << true << QString(); } @@ -6460,7 +6431,7 @@ void tst_QNetworkReply::synchronousRequest() // QNetworkRequest, see http://bugreports.qt.nokia.com/browse/QTBUG-14774 if (url.scheme() == "https") { QSslConfiguration sslConf; - QList certs = QSslCertificate::fromPath(SRCDIR "/certs/qt-test-server-cacert.pem"); + QList certs = QSslCertificate::fromPath(testDataDir + "/certs/qt-test-server-cacert.pem"); sslConf.setCaCertificates(certs); request.setSslConfiguration(sslConf); } @@ -6570,8 +6541,9 @@ void tst_QNetworkReply::httpAbort() // Abort after the finished() QNetworkRequest request3("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"); QNetworkReplyPtr reply3 = manager.get(request3); - connect(reply3, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); + + QVERIFY(waitForFinish(reply3) == Success); + QVERIFY(reply3->isFinished()); reply3->abort(); QCOMPARE(reply3->error(), QNetworkReply::NoError); @@ -6601,9 +6573,7 @@ void tst_QNetworkReply::dontInsertPartialContentIntoTheCache() QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); QVERIFY(server.totalConnections > 0); QCOMPARE(reply->readAll().constData(), "load"); @@ -6620,9 +6590,8 @@ void tst_QNetworkReply::httpUserAgent() request.setHeader(QNetworkRequest::UserAgentHeader, "abcDEFghi"); QNetworkReplyPtr reply = manager.get(request); - connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(10); - QVERIFY(!QTestEventLoop::instance().timeout()); + QVERIFY(waitForFinish(reply) == Success); + QVERIFY(reply->isFinished()); QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(server.receivedData.contains("\r\nUser-Agent: abcDEFghi\r\n")); -- cgit v1.2.3 From 4cf0deef73ff2f24a80622ec5f391d10c74ea6c7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 10 Feb 2012 17:17:36 +0100 Subject: Add palette() and further hints to QtGui/QPlatformTheme. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move palette() from deprecated QtWidgets/QGuiPlatformPlugin to QtGui/QPlatformTheme, Make it return a const * since QPalette does not have isNull(). - Initialize QGuiApplication::palette() and QApplication::systemPalette() from it. - Do not initialize QPalette from QGuiApplication::palette() unless app_pal is non-null (default to Qt::black if it is 0). This avoids initialization order crashes/recursions in the QPA plugin. Streamline initialization function. - Remove styleName(), systemIconThemeName() and iconSearchPaths() from QGuiPlatformPlugin and re-add them as QPlatformTheme::themeHint(). - Remove styleHint() from QGuiPlatformPlugin, add it to QPlatformTheme::themeHint(). - Add UNIX themes with factory function (Generic, KDE, Gnome), taking it from Qt 4.8 code (stripping the KDE 3 code). - Implement Windows palettes. Task-number: QTBUG-24204 Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462 Reviewed-by: Morten Johan Sørvig --- tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 9e965ff235..7fc752488d 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -411,8 +411,10 @@ void tst_QMessageBox::staticSourceCompat() if (qobject_cast(qApp->style())) expectedButton = int(QMessageBox::No); #elif !defined(QT_NO_STYLE_CLEANLOOKS) - if (qobject_cast(qApp->style())) + if (qobject_cast(qApp->style())) { + QEXPECT_FAIL("", "Special handling of QMessageBox::information buttons for Cleanlooks not implemented yet, QTBUG-24315", Continue); expectedButton = int(QMessageBox::No); + } #endif QCOMPARE(ret, expectedButton); QCOMPARE(keyToSend, -1); -- cgit v1.2.3 From 2c3b2b47036bda2b0a953c9c5bedbad67240e85f Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 14 Feb 2012 08:46:22 +0100 Subject: Expect tst_QSettings::ctor(native) failures on Mac OS X The default constructor for QSettings does not set NoAccess status, even if the organization domain, organization name, and application name are empty. Instead of trying to fix QSettings, keep the existing behavior, and test for it. Failures from tst_QSettings no longer need to be ignored, so mac:CONFIG+=insignificant_test has been removed from the .pro file. Task-number: QTBUG-22745 Change-Id: Ic9f8b6821c483c217e1ef2ece704be2da169e340 Reviewed-by: Robin Burchell --- tests/auto/corelib/io/qsettings/qsettings.pro | 1 - tests/auto/corelib/io/qsettings/tst_qsettings.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qsettings/qsettings.pro b/tests/auto/corelib/io/qsettings/qsettings.pro index a5483bf585..9de476fe13 100644 --- a/tests/auto/corelib/io/qsettings/qsettings.pro +++ b/tests/auto/corelib/io/qsettings/qsettings.pro @@ -6,5 +6,4 @@ RESOURCES += qsettings.qrc win32-msvc*:LIBS += advapi32.lib -mac: CONFIG += insignificant_test # QTBUG-22745 win32: CONFIG += insignificant_test # QTBUG-24145 diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index 0d6443c5ac..df8e97ab9c 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -580,6 +580,9 @@ void tst_QSettings::ctor() QCoreApplication::instance()->setOrganizationName(""); QCoreApplication::instance()->setApplicationName(""); QSettings settings; +#ifdef Q_OS_MAC + QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue); +#endif QCOMPARE(settings.status(), QSettings::AccessError); QCoreApplication::instance()->setOrganizationName("software.org"); QCoreApplication::instance()->setApplicationName("KillerAPP"); @@ -592,6 +595,9 @@ void tst_QSettings::ctor() } QSettings settings(format, QSettings::UserScope, "", ""); +#ifdef Q_OS_MAC + QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue); +#endif QCOMPARE(settings.status(), QSettings::AccessError); QSettings settings2(format, QSettings::UserScope, "software.org", "KillerAPP"); QCOMPARE(settings2.status(), QSettings::NoError); -- cgit v1.2.3 From 33fe2cf23f4fc7aa1b2576dd09f8e9154e0db0ea Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Feb 2012 09:22:39 +0100 Subject: Skip hanging/failing tst_QApplication tests on Mac OS X The first block of tst_QApplication::quitOnLastWindowClosed() hangs on Mac OS X, so skip that block for now. tst_QApplication::testDeleteLAter() both hangs and fails on Mac OS X, so skip the test and XFAIL the failure. Task-number: QTBUG-24318 Task-number: QTBUG-24319 Change-Id: Ice11292d84e63215f1bb9e03f3ef369943d1d887 Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/widgets/kernel/qapplication/test/test.pro | 2 -- tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro index 9f6db3cd3e..61035cc24b 100644 --- a/tests/auto/widgets/kernel/qapplication/test/test.pro +++ b/tests/auto/widgets/kernel/qapplication/test/test.pro @@ -14,8 +14,6 @@ win32 { } } -mac*:CONFIG+=insignificant_test - TESTDATA = ../test/test.pro ../tmp/README SUBPROGRAMS = desktopsettingsaware modal diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index fcb6b93e99..fc38840bf7 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -601,6 +601,8 @@ public slots: void tst_QApplication::quitOnLastWindowClosed() { +#ifndef Q_OS_MAC + // Test hangs on Mac OS X, see QTBUG-24319 { int argc = 0; QApplication app(argc, 0, QApplication::GuiServer); @@ -615,6 +617,7 @@ void tst_QApplication::quitOnLastWindowClosed() // lastWindowClosed() signal should only be sent after the last dialog is closed QCOMPARE(appSpy.count(), 2); } +#endif { int argc = 0; QApplication app(argc, 0, QApplication::GuiServer); @@ -1204,6 +1207,9 @@ void DeleteLaterWidget::checkDeleteLater() void tst_QApplication::testDeleteLater() { +#ifdef Q_OS_MAC + QSKIP("This test fails and then hangs on Mac OS X, see QTBUG-24318"); +#endif int argc = 0; QApplication app(argc, 0, QApplication::GuiServer); connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); -- cgit v1.2.3 From a902387204e3b9713697ed0ec8fbb11ee5c88428 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Feb 2012 09:31:59 +0100 Subject: Skip hanging tst_QColorDialog test, expect failing test on Mac OS X tst_QColorDialog::native_activeModalWidget() hangs, so skip this test. tst_QColorDialog::task247349_alpha() fails, so XFAIL this failure. Task-number: QTBUG-24320 Change-Id: Ie4d69e07063e9a648ec4fa3337274143a52ea3e3 Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp index 31fab971a0..ff34b009e9 100644 --- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp +++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp @@ -100,6 +100,9 @@ tst_QColorDialog::~tst_QColorDialog() void tst_QColorDialog::native_activeModalWidget() { +#ifdef Q_OS_MAC + QSKIP("Test hangs on Mac OS X, see QTBUG-24320"); +#endif // Check that QApplication::activeModalWidget retruns the // color dialog when it is executing, even when using a native // dialog: @@ -153,6 +156,9 @@ void tst_QColorDialog::task247349_alpha() dialog.setOption(QColorDialog::ShowAlphaChannel, true); int alpha = 0x17; dialog.setCurrentColor(QColor(0x01, 0x02, 0x03, alpha)); +#ifdef Q_OS_MAC + QEXPECT_FAIL("", "Fails on Mac OS X, see QTBUG-24320", Abort); +#endif QCOMPARE(alpha, dialog.currentColor().alpha()); QCOMPARE(alpha, qAlpha(dialog.currentColor().rgba())); } -- cgit v1.2.3 From ea1ef2a471ef50495e8db9fd47aee6af72264470 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Feb 2012 09:35:53 +0100 Subject: Skip all tst_QFontDialog tests on Mac OS X All of these tests currently hang. Task-number: QTBUG-24321 Change-Id: I7664b57f6539d4c03008701da66e193019a4440a Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp index f5c3e08217..6b2caf17d7 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp +++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp @@ -114,6 +114,9 @@ void tst_QFontDialog::postKeyReturn() { void tst_QFontDialog::defaultOkButton() { +#ifdef Q_OS_MAC + QSKIP("Test hangs on Mac OS X, see QTBUG-24321"); +#endif bool ok = false; QTimer::singleShot(2000, this, SLOT(postKeyReturn())); QFontDialog::getFont(&ok); @@ -123,6 +126,9 @@ void tst_QFontDialog::defaultOkButton() void tst_QFontDialog::setFont() { +#ifdef Q_OS_MAC + QSKIP("Test hangs on Mac OS X, see QTBUG-24321"); +#endif /* The font should be the same before as it is after if nothing changed while the font dialog was open. Task #27662 @@ -154,6 +160,10 @@ class FriendlyFontDialog : public QFontDialog void tst_QFontDialog::task256466_wrongStyle() { +#ifdef Q_OS_MAC + QSKIP("Test crashes on Mac OS X, see QTBUG-24321"); +#endif + QFontDatabase fdb; FriendlyFontDialog dialog; QListView *familyList = reinterpret_cast(dialog.d_func()->familyList); -- cgit v1.2.3 From ee7c81b9c4cfcc3635ff8241480d10c94af4d316 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Feb 2012 09:40:02 +0100 Subject: Skip tst_QGuiApplication::focusObject() on Mac OS X This test fails intermittently, and at random locations. Task-number: QTBUG-24322 Change-Id: Ied6dd4d1593066debc0fb48c6ca2a17a1f4d51b7 Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index 8d0836e7c3..7664706b93 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -78,6 +78,9 @@ public: void tst_QGuiApplication::focusObject() { +#ifdef Q_OS_MAC + QSKIP("This test fails intermittently, and at different locations. See QTBUG-24322"); +#endif int argc = 0; QGuiApplication app(argc, 0); -- cgit v1.2.3 From 0a6516e12609d91389fd0e033ebb434d64649bc4 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Feb 2012 14:18:10 +0100 Subject: Expect failure in tst_QStyleSheetStyle::hoverColors() This is similar to the focusColors() failures in QTBUG-23686. Task-number: QTBUG-23686 Change-Id: I1f01a4e41e61a7a664309be34cfa4fe916a92b15 Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 2dc985439d..1201b0f1da 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -881,6 +881,11 @@ void tst_QStyleSheetStyle::hoverColors() QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)), (QString::fromLatin1(widget->metaObject()->className()) + " did not contain background color #e8ff66").toLocal8Bit().constData()); +#ifdef Q_OS_MAC + if (qobject_cast(widget) + || qobject_cast(widget)) + QEXPECT_FAIL("", "Failure only for QPushButton and QComboBox, see QTBUG-23686", Continue); +#endif QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)), (QString::fromLatin1(widget->metaObject()->className()) + " did not contain text color #ff0084").toLocal8Bit().constData()); -- cgit v1.2.3 From 3efb0d50e590f6a1e8d67d0136a648cd3b97c37d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 17 Feb 2012 12:28:50 +0200 Subject: Disable 'check' target generation for network autotests for Windows. A number of network autotests are unstable in Windows, so don't generate check target for them as is done for mac. Once the tests are acceptably stable, this needs to be reverted. Change-Id: I18262e28ce40eba541aecf3cfb651bff34698ead Reviewed-by: Friedemann Kleint --- tests/auto/auto.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 1796fa2db9..63c4ca6a48 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -18,8 +18,8 @@ cross_compile: SUBDIRS -= tools !contains(QT_CONFIG, opengl): SUBDIRS -= opengl !unix|embedded|!contains(QT_CONFIG, dbus): SUBDIRS -= dbus -# disable 'make check' on Mac OS X for the following subdirs for the time being -mac { +# disable 'make check' on Mac OS X and Windows for the following subdirs for the time being +mac|win32 { network.CONFIG += no_check_target } -- cgit v1.2.3 From f8e2753323248e2c8d5812a4a4f4b28aff61aa17 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 16 Feb 2012 13:36:27 +0200 Subject: Make 'nmake check' succeed for widgets tests Marked a bunch of tests insignificant, and skipped one crashing test case in QApplication test, as that couldn't be made to pass simply by marking the test insignificant. Once the underlying issues are fixed, the tests need to be re-enabled. Task-number: QTBUG-24203 Change-Id: I9aea4fa207d307793445efdcaead72219fbf6c4f Reviewed-by: Sergio Ahumada Reviewed-by: Friedemann Kleint --- tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro | 2 ++ .../widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro | 2 ++ tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro | 2 ++ tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro | 2 ++ tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro | 2 ++ tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 3 +++ tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro | 2 ++ tests/auto/widgets/widgets/qmenu/qmenu.pro | 2 ++ tests/auto/widgets/widgets/qmenubar/qmenubar.pro | 2 ++ tests/auto/widgets/widgets/qtextedit/qtextedit.pro | 2 ++ 10 files changed, 21 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro index 166306757c..6e08e2d02b 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro @@ -5,3 +5,5 @@ QT += core-private gui testlib SOURCES += tst_qfilesystemmodel.cpp TARGET = tst_qfilesystemmodel + +win32:CONFIG += insignificant_test # QTBUG-24291 diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro index 50f4f7ab74..f2bd7bde70 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/qgraphicsproxywidget.pro @@ -8,3 +8,5 @@ SOURCES += tst_qgraphicsproxywidget.cpp # ### fixme: QTBUG-20756 crashes on xcb contains(QT_CONFIG,xcb):CONFIG+=insignificant_test + +win32:CONFIG += insignificant_test # QTBUG-24294 diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro index 8a084472b8..c0a9075d10 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro @@ -17,3 +17,5 @@ wince* { DEPLOYMENT += rootFiles renderFiles DEFINES += SRCDIR=\\\".\\\" } + +win32:CONFIG += insignificant_test # QTBUG-24295 diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro index e3a6edd682..439cf547ef 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro @@ -8,3 +8,5 @@ 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 + +win32:CONFIG += insignificant_test # QTBUG-24296 diff --git a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro index f397957609..8821ac7038 100644 --- a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro +++ b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro @@ -5,3 +5,5 @@ QT += core-private gui-private SOURCES += tst_qlistwidget.cpp contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-21098, fails unstably + +win32:CONFIG += insignificant_test # QTBUG-24299 diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index fc38840bf7..6e4bbc75c2 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -601,6 +601,9 @@ public slots: void tst_QApplication::quitOnLastWindowClosed() { +#ifdef Q_OS_WIN32 + QSKIP("This test crashes on Windows. Remove skip once the issue causing the crash is fixed (QTBUG-24300)."); +#endif #ifndef Q_OS_MAC // Test hangs on Mac OS X, see QTBUG-24319 { diff --git a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro index 137d6a2bc5..f908c3ab7d 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro +++ b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro @@ -6,3 +6,5 @@ QT += gui-private SOURCES += tst_qstylesheetstyle.cpp RESOURCES += resources.qrc requires(contains(QT_CONFIG,private_tests)) + +win32:CONFIG += insignificant_test # QTBUG-24323 diff --git a/tests/auto/widgets/widgets/qmenu/qmenu.pro b/tests/auto/widgets/widgets/qmenu/qmenu.pro index f919c12cb5..55099f1c54 100644 --- a/tests/auto/widgets/widgets/qmenu/qmenu.pro +++ b/tests/auto/widgets/widgets/qmenu/qmenu.pro @@ -2,3 +2,5 @@ CONFIG += testcase TARGET = tst_qmenu QT += widgets testlib SOURCES += tst_qmenu.cpp + +win32:CONFIG += insignificant_test # QTBUG-24325 diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro index 6bacaa0d37..6f35d4516f 100644 --- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro +++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro @@ -5,3 +5,5 @@ SOURCES += tst_qmenubar.cpp # QTBUG-4965, QTBUG-11823 - unstable tests linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test + +win32:CONFIG += insignificant_test # QTBUG-24326 diff --git a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro index 85658c222e..294f1d84e7 100644 --- a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro +++ b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro @@ -17,3 +17,5 @@ wince* { } contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20756 crashes on xcb + +win32:CONFIG += insignificant_test # QTBUG-24348 -- cgit v1.2.3 From b4a538ea1c3cdce09e3528227dba2e8f5765cbdc Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 15 Feb 2012 17:24:14 +0000 Subject: Fix handling of urls containing username/password in QNetworkAccessManager QNetworkAccessManager was ignoring the supplied credentials, although webkit seems to support these urls at a higher level. Following the behaviour of browsers: We use supplied credentials if authentication is required. We add supplied credentials to the authentication cache. We emit authenticationRequired signal if the credentials were wrong. We do not use previously cached credentials for that url Synchronous http requests fail, if the credentials were wrong. Task-number: QTBUG-18107 Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4 Reviewed-by: Richard J. Moore Reviewed-by: Thiago Macieira --- .../access/qnetworkreply/tst_qnetworkreply.cpp | 63 ++++++++++++++++++---- 1 file changed, 53 insertions(+), 10 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 279613904f..279570b547 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -2823,12 +2823,21 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth_data() { QTest::addColumn("url"); QTest::addColumn("expectedData"); + QTest::addColumn("expectedAuth"); QFile reference(testDataDir + "/rfc3252.txt"); reference.open(QIODevice::ReadOnly); QByteArray referenceData = reference.readAll(); - QTest::newRow("basic") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData; - QTest::newRow("digest") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n"); + QTest::newRow("basic") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 1; + QTest::newRow("digest") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 1; + //if url contains username & password, then it should be used + QTest::newRow("basic-in-url") << QUrl("http://httptest:httptest@" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 0; + QTest::newRow("digest-in-url") << QUrl("http://httptest:httptest@" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 0; + // if url contains incorrect credentials, expect QNAM to ask for good ones (even if cached - matches behaviour of browsers) + QTest::newRow("basic-bad-user-in-url") << QUrl("http://baduser:httptest@" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 3; + QTest::newRow("basic-bad-password-in-url") << QUrl("http://httptest:wrong@" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData << 3; + QTest::newRow("digest-bad-user-in-url") << QUrl("http://baduser:httptest@" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 3; + QTest::newRow("digest-bad-password-in-url") << QUrl("http://httptest:wrong@" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n") << 3; } void tst_QNetworkReply::ioGetFromHttpWithAuth() @@ -2839,6 +2848,7 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth() QFETCH(QUrl, url); QFETCH(QByteArray, expectedData); + QFETCH(int, expectedAuth); QNetworkRequest request(url); { QNetworkReplyPtr reply1 = manager.get(request); @@ -2862,7 +2872,8 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth() QCOMPARE(reader1.data, expectedData); QCOMPARE(reader2.data, expectedData); - QCOMPARE(authspy.count(), 1); + QCOMPARE(authspy.count(), (expectedAuth ? 1 : 0)); + expectedAuth = qMax(0, expectedAuth - 1); } // rinse and repeat: @@ -2882,7 +2893,8 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth() QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); QCOMPARE(reader.data, expectedData); - QCOMPARE(authspy.count(), 0); + QCOMPARE(authspy.count(), (expectedAuth ? 1 : 0)); + expectedAuth = qMax(0, expectedAuth - 1); } // now check with synchronous calls: @@ -2894,14 +2906,45 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth() QSignalSpy authspy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); QNetworkReplyPtr replySync = manager.get(request); QVERIFY(replySync->isFinished()); // synchronous - QCOMPARE(authspy.count(), 0); + if (expectedAuth) { + // bad credentials in a synchronous request should just fail + QCOMPARE(replySync->error(), QNetworkReply::AuthenticationRequiredError); + } else { + QCOMPARE(authspy.count(), 0); - // we cannot use a data reader here, since that connects to the readyRead signal, - // just use readAll() + // we cannot use a data reader here, since that connects to the readyRead signal, + // just use readAll() - // the only thing we check here is that the auth cache was used when using synchronous requests - QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); - QCOMPARE(replySync->readAll(), expectedData); + // the only thing we check here is that the auth cache was used when using synchronous requests + QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); + QCOMPARE(replySync->readAll(), expectedData); + } + } + + // check that credentials are used from cache if the same url is requested without credentials + { + url.setUserInfo(QString()); + request.setUrl(url); + request.setAttribute( + QNetworkRequest::SynchronousRequestAttribute, + true); + + QSignalSpy authspy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); + QNetworkReplyPtr replySync = manager.get(request); + QVERIFY(replySync->isFinished()); // synchronous + if (expectedAuth) { + // bad credentials in a synchronous request should just fail + QCOMPARE(replySync->error(), QNetworkReply::AuthenticationRequiredError); + } else { + QCOMPARE(authspy.count(), 0); + + // we cannot use a data reader here, since that connects to the readyRead signal, + // just use readAll() + + // the only thing we check here is that the auth cache was used when using synchronous requests + QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); + QCOMPARE(replySync->readAll(), expectedData); + } } } -- cgit v1.2.3 From 7e970eb58c71dc08981575c648a04d258dbf0684 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 17 Feb 2012 09:05:39 +0100 Subject: Ensure that Qt public headers compile with strict flags Those from http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files (unfortunatey -Wold-style-cast cannot be used due to the glibc macro bswap_16) and many Qt defines that disable casts. Change-Id: I97ac707a101df9819e8c031fa75a31b30e20247f Reviewed-by: Thiago Macieira --- tests/auto/other/headersclean/headersclean.pro | 27 +++++++++++++++++++--- tests/auto/other/headersclean/tst_headersclean.cpp | 5 +++- 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/other/headersclean/headersclean.pro b/tests/auto/other/headersclean/headersclean.pro index 814f19c865..5444bebfb9 100644 --- a/tests/auto/other/headersclean/headersclean.pro +++ b/tests/auto/other/headersclean/headersclean.pro @@ -1,7 +1,28 @@ CONFIG += testcase TARGET = tst_headersclean SOURCES += tst_headersclean.cpp -QT = core network xml sql testlib -contains(QT_CONFIG,dbus): QT += dbus -contains(QT_CONFIG,opengl): QT += opengl +# No need to link to all modules, only those actually used +QT = core testlib gui widgets + +*-g++*: QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror + +# The flags here come from http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files +# -Wold-style-cast cannot be used, /usr/include/bits/byteswap.h defines the macro bswap_16 using C style casts :( +# -Wfloat-equal cannot be used, qrect.h and qvector2d.h do exact comparisons in isNull and operator==. Would need #pragmas. +*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef + +# Other nice flags +*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wcast-align -Wchar-subscripts -Wpointer-arith -Wformat-security + +# Enable pedantic mode, but accept variadic macros and 'long long' usage. +*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors + +QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \ + -DQT_NO_CAST_FROM_ASCII \ + -DQT_STRICT_ITERATORS \ + -DQT_NO_URL_CAST_FROM_STRING \ + -DQT_NO_CAST_FROM_BYTEARRAY \ + -DQT_NO_KEYWORDS \ + -DQT_USE_FAST_CONCATENATION \ + -DQT_USE_FAST_OPERATOR_PLUS diff --git a/tests/auto/other/headersclean/tst_headersclean.cpp b/tests/auto/other/headersclean/tst_headersclean.cpp index 41992b8d2a..81d0aa3a4a 100644 --- a/tests/auto/other/headersclean/tst_headersclean.cpp +++ b/tests/auto/other/headersclean/tst_headersclean.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#define QT_NO_KEYWORDS #define signals int #define slots int #define emit public:; @@ -47,12 +46,16 @@ #define forever public:; #include +#include #include #include #include #include #include +#include +#include +#include #ifndef QT_NO_OPENGL #include -- cgit v1.2.3 From 400c865f2994e67189108e36cfa206c365d57274 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 17 Feb 2012 16:08:17 +0100 Subject: Windows: Fix QWindow-test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Save & Restore style and geometry when switching to full screen and back since it is not a real state on Windows. - Obey the positioning policy in setGeometry. Task-number: QTBUG-24185 Change-Id: I18dea4fd372e0b2e46273a7a27e0c6f4f4bde771 Reviewed-by: Samuel Rødal --- tests/auto/gui/kernel/qwindow/qwindow.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro index d191b9fb8e..363f7dd92e 100644 --- a/tests/auto/gui/kernel/qwindow/qwindow.pro +++ b/tests/auto/gui/kernel/qwindow/qwindow.pro @@ -6,4 +6,4 @@ QT += core-private gui-private testlib SOURCES += tst_qwindow.cpp mac: CONFIG += insignificant_test # QTBUG-23059 -win32:CONFIG += insignificant_test # QTBUG-24185 + -- cgit v1.2.3 From e0d9fade038130ad408715e946c5c08cd2faf81e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 15 Feb 2012 12:34:04 +0100 Subject: Fix qclipboard autotest on Windows. Emit changed signal only if the clipboard is not owned, in which case QClipboard does it. Task-number: QTBUG-24184 Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300 Reviewed-by: Friedemann Kleint --- tests/auto/gui/kernel/qclipboard/test/test.pro | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro index ffab4dec4f..4be6769592 100644 --- a/tests/auto/gui/kernel/qclipboard/test/test.pro +++ b/tests/auto/gui/kernel/qclipboard/test/test.pro @@ -16,7 +16,6 @@ wince* { } mac: CONFIG += insignificant_test # QTBUG-23057 -win32:CONFIG += insignificant_test # QTBUG-24184 load(testcase) # for target.path and installTestHelperApp() installTestHelperApp("../copier/copier",copier,copier) -- cgit v1.2.3 From 908a080006faff333b061b69b0dc0fd9cab36114 Mon Sep 17 00:00:00 2001 From: Andrew Christian Date: Fri, 17 Feb 2012 15:38:23 -0500 Subject: Added error reporting to QJsonParser Change-Id: Ib2390c0faf1ed7ada3fc185abce83740ad112929 Reviewed-by: Lars Knoll --- tests/auto/corelib/json/tst_qtjson.cpp | 165 +++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index 323546b8ea..2ac0574ec5 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -92,6 +92,7 @@ private Q_SLOTS: void toJson(); void fromJson(); + void fromJsonErrors(); void fromBinary(); void toAndFromBinary_data(); void toAndFromBinary(); @@ -1080,6 +1081,170 @@ void TestQtJson::fromJson() } } +void TestQtJson::fromJsonErrors() +{ + { + QJsonParseError error; + QByteArray json = "{\n \n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::UnterminatedObject); + QCOMPARE(error.offset, 8); + } + { + QJsonParseError error; + QByteArray json = "{\n \"key\" 10\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::MissingNameSeparator); + QCOMPARE(error.offset, 13); + } + { + QJsonParseError error; + QByteArray json = "[\n \n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::UnterminatedArray); + QCOMPARE(error.offset, 8); + } + { + QJsonParseError error; + QByteArray json = "[\n 1, true\n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::UnterminatedArray); + QCOMPARE(error.offset, 14); + } + { + QJsonParseError error; + QByteArray json = "[\n 1 true\n\n"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::MissingValueSeparator); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n nul"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n nulzz"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 10); + } + { + QJsonParseError error; + QByteArray json = "[\n tru"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n trud]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 10); + } + { + QJsonParseError error; + QByteArray json = "[\n fal"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 7); + } + { + QJsonParseError error; + QByteArray json = "[\n falsd]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalValue); + QCOMPARE(error.offset, 11); + } + { + QJsonParseError error; + QByteArray json = "[\n 11111"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::EndOfNumber); + QCOMPARE(error.offset, 11); + } + { + QJsonParseError error; + QByteArray json = "[\n -1E10000]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalNumber); + QCOMPARE(error.offset, 14); + } + { + QJsonParseError error; + QByteArray json = "[\n -1e-10000]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::IllegalNumber); + QCOMPARE(error.offset, 15); + } + { + QJsonParseError error; + QByteArray json = "[\n \"\\u12\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringEscapeSequence); + QCOMPARE(error.offset, 11); + } + { + QJsonParseError error; + QByteArray json = "[\n \"foo\uffffbar\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringUTF8Scan); + QCOMPARE(error.offset, 13); + } + { + QJsonParseError error; + QByteArray json = "[\n \""; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::EndOfString); + QCOMPARE(error.offset, 8); + } + { + QJsonParseError error; + QByteArray json = "[\n \"cЂa\\u12\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringEscapeSequence); + QCOMPARE(error.offset, 15); + } + { + QJsonParseError error; + QByteArray json = "[\n \"cЂa\uffffbar\"]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::StringUTF8Scan); + QCOMPARE(error.offset, 14); + } + { + QJsonParseError error; + QByteArray json = "[\n \"cЂa ]"; + QJsonDocument doc = QJsonDocument::fromJson(json, &error); + QVERIFY(doc.isEmpty()); + QCOMPARE(error.error, QJsonParseError::EndOfString); + QCOMPARE(error.offset, 14); + } +} + void TestQtJson::fromBinary() { QFile file(testDataDir + "/test.json"); -- cgit v1.2.3 From b164911b7f0efd81ec33325405b88bff8b2334d0 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 18 Feb 2012 16:00:09 +0100 Subject: Import QMimeType / QMimeDatabase into QtCore. History of the development before the import: ssh://codereview.qt-project.org/playground/mimetypes.git Mimetype definitions come from shared-mime-info where available (UNIX systems), loaded using a mmap'ed binary cache generated by update-mime-database. As a fallback if no cache is found, we parse the raw XML files otherwise. This makes the MIME type support fast and with very low memory usage on UNIX, and it makes it easy to use on Windows (no dependency on shared-mime-info, Qt even includes a freedesktop.xml file to use if none are found on the system). Change-Id: I27b05008216ff936dc463bd80d3893422bfb940e Reviewed-by: Richard J. Moore --- tests/auto/corelib/corelib.pro | 1 + .../corelib/io/qdiriterator/tst_qdiriterator.cpp | 7 +- .../io/qresourceengine/tst_qresourceengine.cpp | 1 + tests/auto/corelib/mimetypes/mimetypes.pro | 8 + .../qmimedatabase-cache/qmimedatabase-cache.pro | 12 + .../tst_qmimedatabase-cache.cpp | 56 ++ .../qmimedatabase-xml/qmimedatabase-xml.pro | 14 + .../qmimedatabase-xml/tst_qmimedatabase-xml.cpp | 51 ++ .../mimetypes/qmimedatabase/qmimedatabase.pro | 3 + .../mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 829 +++++++++++++++++++++ .../mimetypes/qmimedatabase/tst_qmimedatabase.h | 99 +++ .../yast2-metapackage-handler-mimetypes.xml | 15 + .../auto/corelib/mimetypes/qmimetype/qmimetype.pro | 7 + .../corelib/mimetypes/qmimetype/tst_qmimetype.cpp | 257 +++++++ 14 files changed, 1358 insertions(+), 2 deletions(-) create mode 100644 tests/auto/corelib/mimetypes/mimetypes.pro create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml create mode 100644 tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro create mode 100644 tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp (limited to 'tests/auto') diff --git a/tests/auto/corelib/corelib.pro b/tests/auto/corelib/corelib.pro index 4f284ac21e..a85a385f80 100644 --- a/tests/auto/corelib/corelib.pro +++ b/tests/auto/corelib/corelib.pro @@ -7,6 +7,7 @@ SUBDIRS=\ itemmodels \ json \ kernel \ + mimetypes \ plugin \ statemachine \ thread \ diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index ad61db51d6..d5d490dc29 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -403,8 +403,11 @@ void tst_QDirIterator::iterateResource() QDirIterator it(dirName, nameFilters, filters, flags); QStringList list; - while (it.hasNext()) - list << it.next(); + while (it.hasNext()) { + const QString dir = it.next(); + if (!dir.startsWith(":/qt-project.org")) + list << dir; + } list.sort(); QStringList sortedEntries = entries; diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index fa72083dcc..796282d6d8 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -92,6 +92,7 @@ void tst_QResourceEngine::checkStructure_data() << QString() << (QStringList() << "search_file.txt") << (QStringList() << QLatin1String("aliasdir") << QLatin1String("otherdir") + << QLatin1String("qt-project.org") << QLatin1String("runtime_resource") << QLatin1String("searchpath1") << QLatin1String("searchpath2") << QLatin1String("secondary_root") diff --git a/tests/auto/corelib/mimetypes/mimetypes.pro b/tests/auto/corelib/mimetypes/mimetypes.pro new file mode 100644 index 0000000000..9063d677e7 --- /dev/null +++ b/tests/auto/corelib/mimetypes/mimetypes.pro @@ -0,0 +1,8 @@ +TEMPLATE=subdirs + +SUBDIRS = \ + qmimetype \ + qmimedatabase + +!contains(QT_CONFIG, private_tests): SUBDIRS -= \ + qmimetype diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro new file mode 100644 index 0000000000..815401ce1e --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro @@ -0,0 +1,12 @@ +CONFIG += testcase parallel_test + +TARGET = tst_qmimedatabase-cache + +QT = core testlib concurrent + +SOURCES = tst_qmimedatabase-cache.cpp +HEADERS = ../tst_qmimedatabase.h + +DEFINES += SRCDIR='"\\"$$PWD/../\\""' + +*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror -Wshadow -Wno-long-long -Wnon-virtual-dtor diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp new file mode 100644 index 0000000000..205331d4dd --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/tst_qmimedatabase-cache.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../tst_qmimedatabase.h" +#include +#include +#include +#include + +#include "../tst_qmimedatabase.cpp" + +tst_QMimeDatabase::tst_QMimeDatabase() +{ + QDir here = QDir::currentPath(); + const QString tempMime = here.absolutePath() + QString::fromLatin1("/mime"); + runUpdateMimeDatabase(tempMime); + QVERIFY(QFile::exists(tempMime + QString::fromLatin1("/mime.cache"))); +} diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro new file mode 100644 index 0000000000..ac7515f781 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro @@ -0,0 +1,14 @@ +CONFIG += testcase parallel_test + +TARGET = tst_qmimedatabase-xml + +QT = core testlib concurrent + +CONFIG += depend_includepath + +SOURCES += tst_qmimedatabase-xml.cpp +HEADERS += ../tst_qmimedatabase.h + +DEFINES += SRCDIR='"\\"$$PWD/../\\""' + +*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror -Wshadow -Wno-long-long -Wnon-virtual-dtor diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp new file mode 100644 index 0000000000..13ca372290 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/tst_qmimedatabase-xml.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../tst_qmimedatabase.h" +#include +#include + +tst_QMimeDatabase::tst_QMimeDatabase() +{ + qputenv("QT_NO_MIME_CACHE", "1"); +} + +#include "../tst_qmimedatabase.cpp" diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro new file mode 100644 index 0000000000..876b4377dd --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = qmimedatabase-xml +unix: SUBDIRS += qmimedatabase-cache diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp new file mode 100644 index 0000000000..12d6587dfb --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -0,0 +1,829 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "qstandardpaths.h" + +#include +#include +#include + +#include + +void initializeLang() +{ + qputenv("LANG", "en_US"); +} + +// Set LANG before QCoreApplication is created +Q_CONSTRUCTOR_FUNCTION(initializeLang) + +void tst_QMimeDatabase::initTestCase() +{ + // Create a "global" and a "local" XDG data dir, right here. + // The local dir will be empty initially, while the global dir will contain a copy of freedesktop.org.xml + + QDir here = QDir::currentPath(); + + qputenv("XDG_DATA_DIRS", QFile::encodeName(here.absolutePath())); + QDir(here.absolutePath() + "/mime").removeRecursively(); + here.mkpath(QString::fromLatin1("mime/packages")); + + QFile xml(QFile::decodeName(SRCDIR "../../../src/mimetypes/mime/packages/freedesktop.org.xml")); + const QString mimeDir = here.absolutePath() + QLatin1String("/mime"); + xml.copy(mimeDir + QLatin1String("/packages/freedesktop.org.xml")); + + m_dataHome = here.absolutePath() + QLatin1String("/../datahome"); + qputenv("XDG_DATA_HOME", QFile::encodeName(m_dataHome)); + //qDebug() << "XDG_DATA_HOME=" << m_dataHome; + + // Make sure we start clean + cleanupTestCase(); +} + +void tst_QMimeDatabase::cleanupTestCase() +{ + QDir here = QDir::currentPath(); + here.remove(QString::fromLatin1("mime/packages/yast2-metapackage-handler-mimetypes.xml")); + + QDir(m_dataHome).removeRecursively(); +} + +void tst_QMimeDatabase::mimeTypeForName() +{ + QMimeDatabase db; + QMimeType s0 = db.mimeTypeForName(QString::fromLatin1("application/x-zerosize")); + QVERIFY(s0.isValid()); + QCOMPARE(s0.name(), QString::fromLatin1("application/x-zerosize")); + QCOMPARE(s0.comment(), QString::fromLatin1("empty document")); + + QMimeType s0Again = db.mimeTypeForName(QString::fromLatin1("application/x-zerosize")); + QCOMPARE(s0Again.name(), s0.name()); + + QMimeType s1 = db.mimeTypeForName(QString::fromLatin1("text/plain")); + QVERIFY(s1.isValid()); + QCOMPARE(s1.name(), QString::fromLatin1("text/plain")); + //qDebug("Comment is %s", qPrintable(s1.comment())); + + QMimeType krita = db.mimeTypeForName(QString::fromLatin1("application/x-krita")); + QVERIFY(krita.isValid()); + + // Test parsing with application/rdf+xml which has the english comment after the other ones + QMimeType rdf = db.mimeTypeForName(QString::fromLatin1("application/rdf+xml")); + QVERIFY(rdf.isValid()); + QCOMPARE(rdf.comment(), QString::fromLatin1("RDF file")); + + QMimeType bzip2 = db.mimeTypeForName(QString::fromLatin1("application/x-bzip2")); + QVERIFY(bzip2.isValid()); + QCOMPARE(bzip2.comment(), QString::fromLatin1("Bzip archive")); + + QMimeType defaultMime = db.mimeTypeForName(QString::fromLatin1("application/octet-stream")); + QVERIFY(defaultMime.isValid()); + QVERIFY(defaultMime.isDefault()); + + QMimeType doesNotExist = db.mimeTypeForName(QString::fromLatin1("foobar/x-doesnot-exist")); + QVERIFY(!doesNotExist.isValid()); + + // TODO move to findByFile +#ifdef Q_OS_LINUX + QString exePath = QStandardPaths::findExecutable(QLatin1String("ls")); + if (exePath.isEmpty()) + qWarning() << "ls not found"; + else { + const QString executableType = QString::fromLatin1("application/x-executable"); + //QTest::newRow("executable") << exePath << executableType; + QCOMPARE(db.mimeTypeForFile(exePath).name(), executableType); + } +#endif + +} + +void tst_QMimeDatabase::mimeTypeForFileName_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("expectedMimeType"); + + QTest::newRow("text") << "textfile.txt" << "text/plain"; + QTest::newRow("case-insensitive search") << "textfile.TxT" << "text/plain"; + + // Needs shared-mime-info > 0.91. Earlier versions wrote .Z to the mime.cache file... + //QTest::newRow("case-insensitive match on a non-lowercase glob") << "foo.z" << "application/x-compress"; + + QTest::newRow("case-sensitive uppercase match") << "textfile.C" << "text/x-c++src"; + QTest::newRow("case-sensitive lowercase match") << "textfile.c" << "text/x-csrc"; + QTest::newRow("case-sensitive long-extension match") << "foo.PS.gz" << "application/x-gzpostscript"; + QTest::newRow("case-sensitive-only match") << "core" << "application/x-core"; + QTest::newRow("case-sensitive-only match") << "Core" << "application/octet-stream"; // #198477 + + QTest::newRow("desktop file") << "foo.desktop" << "application/x-desktop"; + QTest::newRow("old kdelnk file is x-desktop too") << "foo.kdelnk" << "application/x-desktop"; + QTest::newRow("double-extension file") << "foo.tar.bz2" << "application/x-bzip-compressed-tar"; + QTest::newRow("single-extension file") << "foo.bz2" << "application/x-bzip"; + QTest::newRow(".doc should assume msword") << "somefile.doc" << "application/msword"; // #204139 + QTest::newRow("glob that uses [] syntax, 1") << "Makefile" << "text/x-makefile"; + QTest::newRow("glob that uses [] syntax, 2") << "makefile" << "text/x-makefile"; + QTest::newRow("glob that ends with *, no extension") << "README" << "text/x-readme"; + QTest::newRow("glob that ends with *, extension") << "README.foo" << "text/x-readme"; + QTest::newRow("glob that ends with *, also matches *.txt. Higher weight wins.") << "README.txt" << "text/plain"; + QTest::newRow("glob that ends with *, also matches *.nfo. Higher weight wins.") << "README.nfo" << "text/x-nfo"; + // fdo bug 15436, needs shared-mime-info >= 0.40 (and this tests the globs2-parsing code). + QTest::newRow("glob that ends with *, also matches *.pdf. *.pdf has higher weight") << "README.pdf" << "application/pdf"; + QTest::newRow("directory") << "/" << "inode/directory"; + QTest::newRow("doesn't exist, no extension") << "IDontExist" << "application/octet-stream"; + QTest::newRow("doesn't exist but has known extension") << "IDontExist.txt" << "text/plain"; +} + +void tst_QMimeDatabase::mimeTypeForFileName() +{ + QFETCH(QString, fileName); + QFETCH(QString, expectedMimeType); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForFile(fileName, QMimeDatabase::MatchExtension); + QVERIFY(mime.isValid()); + QCOMPARE(mime.name(), expectedMimeType); + + QList mimes = db.mimeTypesForFileName(fileName); + if (expectedMimeType == "application/octet-stream") { + QVERIFY(mimes.isEmpty()); + } else { + QVERIFY(!mimes.isEmpty()); + QCOMPARE(mimes.count(), 1); + QCOMPARE(mimes.first().name(), expectedMimeType); + } +} + +void tst_QMimeDatabase::mimeTypesForFileName_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("expectedMimeTypes"); + + QTest::newRow("txt, 1 hit") << "foo.txt" << (QStringList() << "text/plain"); + QTest::newRow("txtfoobar, 0 hit") << "foo.foobar" << QStringList(); + QTest::newRow("m, 2 hits") << "foo.m" << (QStringList() << "text/x-matlab" << "text/x-objcsrc"); + QTest::newRow("sub, 3 hits") << "foo.sub" << (QStringList() << "text/x-microdvd" << "text/x-mpsub" << "text/x-subviewer"); +} + +void tst_QMimeDatabase::mimeTypesForFileName() +{ + QFETCH(QString, fileName); + QFETCH(QStringList, expectedMimeTypes); + QMimeDatabase db; + QList mimes = db.mimeTypesForFileName(fileName); + QStringList mimeNames; + foreach (const QMimeType &mime, mimes) + mimeNames.append(mime.name()); + QCOMPARE(mimeNames, expectedMimeTypes); +} + +void tst_QMimeDatabase::inheritance() +{ + QMimeDatabase db; + + // All file-like mimetypes inherit from octet-stream + const QMimeType wordperfect = db.mimeTypeForName(QString::fromLatin1("application/vnd.wordperfect")); + QVERIFY(wordperfect.isValid()); + QCOMPARE(wordperfect.parentMimeTypes().join(QString::fromLatin1(",")), QString::fromLatin1("application/octet-stream")); + QVERIFY(wordperfect.inherits(QLatin1String("application/octet-stream"))); + + QVERIFY(db.mimeTypeForName(QString::fromLatin1("image/svg+xml-compressed")).inherits(QLatin1String("application/x-gzip"))); + + // Check that msword derives from ole-storage + const QMimeType msword = db.mimeTypeForName(QString::fromLatin1("application/msword")); + QVERIFY(msword.isValid()); + const QMimeType olestorage = db.mimeTypeForName(QString::fromLatin1("application/x-ole-storage")); + QVERIFY(olestorage.isValid()); + QVERIFY(msword.inherits(olestorage.name())); + QVERIFY(msword.inherits(QLatin1String("application/octet-stream"))); + + const QMimeType directory = db.mimeTypeForName(QString::fromLatin1("inode/directory")); + QVERIFY(directory.isValid()); + QCOMPARE(directory.parentMimeTypes().count(), 0); + QVERIFY(!directory.inherits(QLatin1String("application/octet-stream"))); + + // Check that text/x-patch knows that it inherits from text/plain (it says so explicitly) + const QMimeType plain = db.mimeTypeForName(QString::fromLatin1("text/plain")); + const QMimeType derived = db.mimeTypeForName(QString::fromLatin1("text/x-patch")); + QVERIFY(derived.isValid()); + QCOMPARE(derived.parentMimeTypes().join(QString::fromLatin1(",")), plain.name()); + QVERIFY(derived.inherits(QLatin1String("text/plain"))); + QVERIFY(derived.inherits(QLatin1String("application/octet-stream"))); + + // Check that application/x-shellscript inherits from application/x-executable + // (Otherwise KRun cannot start shellscripts...) + // This is a test for multiple inheritance... + const QMimeType shellscript = db.mimeTypeForName(QString::fromLatin1("application/x-shellscript")); + QVERIFY(shellscript.isValid()); + QVERIFY(shellscript.inherits(QLatin1String("text/plain"))); + QVERIFY(shellscript.inherits(QLatin1String("application/x-executable"))); + const QStringList shellParents = shellscript.parentMimeTypes(); + QVERIFY(shellParents.contains(QLatin1String("text/plain"))); + QVERIFY(shellParents.contains(QLatin1String("application/x-executable"))); + QCOMPARE(shellParents.count(), 2); // only the above two + const QStringList allShellAncestors = shellscript.allAncestors(); + QVERIFY(allShellAncestors.contains(QLatin1String("text/plain"))); + QVERIFY(allShellAncestors.contains(QLatin1String("application/x-executable"))); + QVERIFY(allShellAncestors.contains(QLatin1String("application/octet-stream"))); + // Must be least-specific last, i.e. breadth first. + QCOMPARE(allShellAncestors.last(), QString::fromLatin1("application/octet-stream")); + + const QStringList allSvgAncestors = db.mimeTypeForName(QString::fromLatin1("image/svg+xml")).allAncestors(); + QCOMPARE(allSvgAncestors, QStringList() << QLatin1String("application/xml") << QLatin1String("text/plain") << QLatin1String("application/octet-stream")); + + // Check that text/x-mrml knows that it inherits from text/plain (implicitly) + const QMimeType mrml = db.mimeTypeForName(QString::fromLatin1("text/x-mrml")); + QVERIFY(mrml.isValid()); + QVERIFY(mrml.inherits(QLatin1String("text/plain"))); + QVERIFY(mrml.inherits(QLatin1String("application/octet-stream"))); + + // Check that msword-template inherits msword + const QMimeType mswordTemplate = db.mimeTypeForName(QString::fromLatin1("application/msword-template")); + QVERIFY(mswordTemplate.isValid()); + QVERIFY(mswordTemplate.inherits(QLatin1String("application/msword"))); +} + +void tst_QMimeDatabase::aliases() +{ + QMimeDatabase db; + + const QMimeType canonical = db.mimeTypeForName(QString::fromLatin1("application/xml")); + QVERIFY(canonical.isValid()); + + QMimeType resolvedAlias = db.mimeTypeForName(QString::fromLatin1("text/xml")); + QVERIFY(resolvedAlias.isValid()); + QCOMPARE(resolvedAlias.name(), QString::fromLatin1("application/xml")); + + QVERIFY(resolvedAlias.inherits(QLatin1String("application/xml"))); + QVERIFY(canonical.inherits(QLatin1String("text/xml"))); + + // Test for kde bug 197346: does nspluginscan see that audio/mp3 already exists? + bool mustWriteMimeType = !db.mimeTypeForName(QString::fromLatin1("audio/mp3")).isValid(); + QVERIFY(!mustWriteMimeType); +} + +void tst_QMimeDatabase::icons() +{ + QMimeDatabase db; + QMimeType directory = db.mimeTypeForFile(QString::fromLatin1("/")); + QCOMPARE(directory.name(), QString::fromLatin1("inode/directory")); + QCOMPARE(directory.iconName(), QString::fromLatin1("inode-directory")); + QCOMPARE(directory.genericIconName(), QString::fromLatin1("inode-x-generic")); + + QMimeType pub = db.mimeTypeForFile(QString::fromLatin1("foo.epub"), QMimeDatabase::MatchExtension); + QCOMPARE(pub.name(), QString::fromLatin1("application/epub+zip")); + QCOMPARE(pub.iconName(), QString::fromLatin1("application-epub+zip")); + QCOMPARE(pub.genericIconName(), QString::fromLatin1("x-office-document")); +} + +// In here we do the tests that need some content in a temporary file. +// This could also be added to shared-mime-info's testsuite... +void tst_QMimeDatabase::mimeTypeForFileWithContent() +{ + QMimeDatabase db; + QMimeType mime; + + // Test a real PDF file. + // If we find x-matlab because it starts with '%' then we are not ordering by priority. + QTemporaryFile tempFile; + QVERIFY(tempFile.open()); + QString tempFileName = tempFile.fileName(); + tempFile.write("%PDF-"); + tempFile.close(); + mime = db.mimeTypeForFile(tempFileName); + QCOMPARE(mime.name(), QString::fromLatin1("application/pdf")); + QFile file(tempFileName); + mime = db.mimeTypeForData(&file); // QIODevice ctor + QCOMPARE(mime.name(), QString::fromLatin1("application/pdf")); + // by name only, we cannot find the mimetype + mime = db.mimeTypeForFile(tempFileName, QMimeDatabase::MatchExtension); + QVERIFY(mime.isValid()); + QVERIFY(mime.isDefault()); + + // Test the case where the extension doesn't match the contents: extension wins + { + QTemporaryFile txtTempFile(QDir::tempPath() + QLatin1String("/tst_QMimeDatabase_XXXXXX.txt")); + QVERIFY(txtTempFile.open()); + txtTempFile.write("%PDF-"); + QString txtTempFileName = txtTempFile.fileName(); + txtTempFile.close(); + mime = db.mimeTypeForFile(txtTempFileName); + QCOMPARE(mime.name(), QString::fromLatin1("text/plain")); + // fast mode finds the same + mime = db.mimeTypeForFile(txtTempFileName, QMimeDatabase::MatchExtension); + QCOMPARE(mime.name(), QString::fromLatin1("text/plain")); + } + + // Now the case where extension differs from contents, but contents has >80 magic rule + // XDG spec says: contents wins. But we can't sniff all files... + { + QTemporaryFile txtTempFile(QDir::tempPath() + QLatin1String("/tst_QMimeDatabase_XXXXXX.txt")); + QVERIFY(txtTempFile.open()); + txtTempFile.write("("data"); + QTest::addColumn("expectedMimeTypeName"); + + QTest::newRow("tnef data, needs smi >= 0.20") << QByteArray("\x78\x9f\x3e\x22") << "application/vnd.ms-tnef"; + QTest::newRow("PDF magic") << QByteArray("%PDF-") << "application/pdf"; + QTest::newRow("PHP, High-priority rule") << QByteArray("("name"); + QTest::addColumn("data"); + QTest::addColumn("expectedMimeTypeName"); + + QTest::newRow("plain text, no extension") << QString::fromLatin1("textfile") << QByteArray("Hello world") << "text/plain"; + QTest::newRow("plain text, unknown extension") << QString::fromLatin1("textfile.foo") << QByteArray("Hello world") << "text/plain"; + // Needs kde/mimetypes.xml + //QTest::newRow("plain text, doc extension") << QString::fromLatin1("textfile.doc") << QByteArray("Hello world") << "text/plain"; + + // If you get powerpoint instead, then you're hit by https://bugs.freedesktop.org/show_bug.cgi?id=435, + // upgrade to shared-mime-info >= 0.22 + const QByteArray oleData("\320\317\021\340\241\261\032\341"); // same as \xD0\xCF\x11\xE0 \xA1\xB1\x1A\xE1 + QTest::newRow("msword file, unknown extension") << QString::fromLatin1("mswordfile") << oleData << "application/x-ole-storage"; + QTest::newRow("excel file, found by extension") << QString::fromLatin1("excelfile.xls") << oleData << "application/vnd.ms-excel"; + QTest::newRow("text.xls, found by extension, user is in control") << QString::fromLatin1("text.xls") << oleData << "application/vnd.ms-excel"; +} + +void tst_QMimeDatabase::mimeTypeForFileAndContent() +{ + QFETCH(QString, name); + QFETCH(QByteArray, data); + QFETCH(QString, expectedMimeTypeName); + + QMimeDatabase db; + QCOMPARE(db.mimeTypeForNameAndData(name, data).name(), expectedMimeTypeName); + + QBuffer buffer(&data); + QCOMPARE(db.mimeTypeForNameAndData(name, &buffer).name(), expectedMimeTypeName); + QVERIFY(!buffer.isOpen()); // initial state was restored + + QVERIFY(buffer.open(QIODevice::ReadOnly)); + QCOMPARE(db.mimeTypeForNameAndData(name, &buffer).name(), expectedMimeTypeName); + QVERIFY(buffer.isOpen()); + QCOMPARE(buffer.pos(), qint64(0)); +} + +void tst_QMimeDatabase::allMimeTypes() +{ + QMimeDatabase db; + const QList lst = db.allMimeTypes(); // does NOT include aliases + QVERIFY(!lst.isEmpty()); + + // Hardcoding this is the only way to check both providers find the same number of mimetypes. + QCOMPARE(lst.count(), 661); + + foreach (const QMimeType &mime, lst) { + const QString name = mime.name(); + QVERIFY(!name.isEmpty()); + QCOMPARE(name.count(QLatin1Char('/')), 1); + const QMimeType lookedupMime = db.mimeTypeForName(name); + QVERIFY(lookedupMime.isValid()); + QCOMPARE(lookedupMime.name(), name); // if this fails, you have an alias defined as a real mimetype too! + } +} + +void tst_QMimeDatabase::inheritsPerformance() +{ + // Check performance of inherits(). + // This benchmark (which started in 2009 in kmimetypetest.cpp) uses 40 mimetypes. + QStringList mimeTypes; mimeTypes << QLatin1String("image/jpeg") << QLatin1String("image/png") << QLatin1String("image/tiff") << QLatin1String("text/plain") << QLatin1String("text/html"); + mimeTypes += mimeTypes; + mimeTypes += mimeTypes; + mimeTypes += mimeTypes; + QCOMPARE(mimeTypes.count(), 40); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForName(QString::fromLatin1("text/x-chdr")); + QVERIFY(mime.isValid()); + QBENCHMARK { + QString match; + foreach (const QString &mt, mimeTypes) { + if (mime.inherits(mt)) { + match = mt; + // of course there would normally be a "break" here, but we're testing worse-case + // performance here + } + } + QCOMPARE(match, QString::fromLatin1("text/plain")); + } + // Numbers from 2011, in release mode: + // KDE 4.7 numbers: 0.21 msec / 494,000 ticks / 568,345 instr. loads per iteration + // QMimeBinaryProvider (with Qt 5): 0.16 msec / NA / 416,049 instr. reads per iteration + // QMimeXmlProvider (with Qt 5): 0.062 msec / NA / 172,889 instr. reads per iteration + // (but the startup time is way higher) + // And memory usage is flat at 200K with QMimeBinaryProvider, while it peaks at 6 MB when + // parsing XML, and then keeps being around 4.5 MB for all the in-memory hashes. +} + +void tst_QMimeDatabase::suffixes_data() +{ + QTest::addColumn("mimeType"); + QTest::addColumn("patterns"); + QTest::addColumn("preferredSuffix"); + + QTest::newRow("mimetype with a single pattern") << "application/pdf" << "*.pdf" << "pdf"; + QTest::newRow("mimetype with multiple patterns") << "application/x-kpresenter" << "*.kpr;*.kpt" << "kpr"; + //if (KMimeType::sharedMimeInfoVersion() > KDE_MAKE_VERSION(0, 60, 0)) { + QTest::newRow("mimetype with many patterns") << "application/vnd.wordperfect" << "*.wp;*.wp4;*.wp5;*.wp6;*.wpd;*.wpp" << "wp"; + //} + QTest::newRow("oasis text mimetype") << "application/vnd.oasis.opendocument.text" << "*.odt" << "odt"; + QTest::newRow("oasis presentation mimetype") << "application/vnd.oasis.opendocument.presentation" << "*.odp" << "odp"; + QTest::newRow("mimetype with multiple patterns") << "text/plain" << "*.asc;*.txt;*,v" << "txt"; + QTest::newRow("mimetype with uncommon pattern") << "text/x-readme" << "README*" << QString(); + QTest::newRow("mimetype with no patterns") << "application/x-ole-storage" << QString() << QString(); +} + +void tst_QMimeDatabase::suffixes() +{ + QFETCH(QString, mimeType); + QFETCH(QString, patterns); + QFETCH(QString, preferredSuffix); + QMimeDatabase db; + QMimeType mime = db.mimeTypeForName(mimeType); + QVERIFY(mime.isValid()); + // Sort both lists; order is unreliable since shared-mime-info uses hashes internally. + QStringList expectedPatterns = patterns.split(QLatin1Char(';')); + expectedPatterns.sort(); + QStringList mimePatterns = mime.globPatterns(); + mimePatterns.sort(); + QCOMPARE(mimePatterns.join(QLatin1String(";")), expectedPatterns.join(QLatin1String(";"))); + QCOMPARE(mime.preferredSuffix(), preferredSuffix); +} + +void tst_QMimeDatabase::knownSuffix() +{ + QMimeDatabase db; + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.tar")), QString::fromLatin1("tar")); + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.bz2")), QString::fromLatin1("bz2")); + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.bar.bz2")), QString::fromLatin1("bz2")); + QCOMPARE(db.suffixForFileName(QString::fromLatin1("foo.tar.bz2")), QString::fromLatin1("tar.bz2")); +} + +void tst_QMimeDatabase::findByFileName_data() +{ + QTest::addColumn("filePath"); + QTest::addColumn("mimeTypeName"); + QTest::addColumn("xFail"); + + QString prefix = QLatin1String(SRCDIR "testfiles/"); + + QFile f(prefix + QLatin1String("list")); + if (!f.open(QIODevice::ReadOnly)) { + const QString warning = QString::fromLatin1( + "Please download the shared-mime-info test suite:\n" + "cd tests/auto/corelib/mimetypes/qmimedatabase\n" + "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-0.zip\n" + "unzip Release-1-0.zip\n" + "ln -s Release-1-0/tests testfiles\n" + ); + qWarning() << warning; + QSKIP("shared-mime-info test suite not available."); + } + + QByteArray line(1024, Qt::Uninitialized); + + while (!f.atEnd()) { + int len = f.readLine(line.data(), 1023); + + if (len <= 2 || line.at(0) == '#') + continue; + + QString string = QString::fromLatin1(line.constData(), len - 1).trimmed(); + QStringList list = string.split(QLatin1Char(' '), QString::SkipEmptyParts); + QVERIFY(list.size() >= 2); + + QString filePath = list.at(0); + QString mimeTypeType = list.at(1); + QString xFail; + if (list.size() >= 3) + xFail = list.at(2); + + QTest::newRow(filePath.toLatin1().constData()) << QString(prefix + filePath) << mimeTypeType << xFail; + } +} + +void tst_QMimeDatabase::findByFileName() +{ + QFETCH(QString, filePath); + QFETCH(QString, mimeTypeName); + QFETCH(QString, xFail); + + QMimeDatabase database; + + //qDebug() << Q_FUNC_INFO << filePath; + + const QMimeType resultMimeType(database.mimeTypeForFile(filePath, QMimeDatabase::MatchExtension)); + if (resultMimeType.isValid()) { + //qDebug() << Q_FUNC_INFO << "MIME type" << resultMimeType.name() << "has generic icon name" << resultMimeType.genericIconName() << "and icon name" << resultMimeType.iconName(); + +// Loading icons depend on the icon theme, we can't enable this test +#if 0 + QCOMPARE(resultMimeType.genericIconName(), QIcon::fromTheme(resultMimeType.genericIconName()).name()); + QVERIFY2(!QIcon::fromTheme(resultMimeType.genericIconName()).isNull(), qPrintable(resultMimeType.genericIconName())); + QVERIFY2(QIcon::hasThemeIcon(resultMimeType.genericIconName()), qPrintable(resultMimeType.genericIconName())); + + QCOMPARE(resultMimeType.iconName(), QIcon::fromTheme(resultMimeType.iconName()).name()); + QVERIFY2(!QIcon::fromTheme(resultMimeType.iconName()).isNull(), qPrintable(resultMimeType.iconName())); + QVERIFY2(QIcon::hasThemeIcon(resultMimeType.iconName()), qPrintable(resultMimeType.iconName())); +#endif + } + const QString resultMimeTypeName = resultMimeType.name(); + //qDebug() << Q_FUNC_INFO << "mimeTypeForFile() returned" << resultMimeTypeName; + + const bool failed = resultMimeTypeName != mimeTypeName; + const bool shouldFail = (xFail.length() >= 1 && xFail.at(0) == QLatin1Char('x')); + if (shouldFail != failed) { + // Results are ambiguous when multiple MIME types have the same glob + // -> accept the current result if the found MIME type actually + // matches the file's extension. + // TODO: a better file format in testfiles/list! + const QMimeType foundMimeType = database.mimeTypeForName(resultMimeTypeName); + QVERIFY2(resultMimeType == foundMimeType, qPrintable(resultMimeType.name() + QString::fromLatin1(" vs. ") + foundMimeType.name())); + if (foundMimeType.isValid()) { + const QString extension = QFileInfo(filePath).suffix(); + //qDebug() << Q_FUNC_INFO << "globPatterns:" << foundMimeType.globPatterns() << "- extension:" << QString() + "*." + extension; + if (foundMimeType.globPatterns().contains(QString::fromLatin1("*.") + extension)) + return; + } + } + if (shouldFail) { + // Expected to fail + QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); + } else { + QCOMPARE(resultMimeTypeName, mimeTypeName); + } + + // Test QFileInfo overload + const QMimeType mimeForFileInfo = database.mimeTypeForFile(QFileInfo(filePath), QMimeDatabase::MatchExtension); + QCOMPARE(mimeForFileInfo.name(), resultMimeTypeName); +} + +void tst_QMimeDatabase::findByData_data() +{ + findByFileName_data(); +} + +void tst_QMimeDatabase::findByData() +{ + QFETCH(QString, filePath); + QFETCH(QString, mimeTypeName); + QFETCH(QString, xFail); + + QMimeDatabase database; + QFile f(filePath); + QVERIFY(f.open(QIODevice::ReadOnly)); + QByteArray data = f.read(16384); + + const QString resultMimeTypeName = database.mimeTypeForData(data).name(); + if (xFail.length() >= 2 && xFail.at(1) == QLatin1Char('x')) { + // Expected to fail + QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); + } else { + QCOMPARE(resultMimeTypeName, mimeTypeName); + } + + QFileInfo info(filePath); + QString mimeForInfo = database.mimeTypeForFile(info, QMimeDatabase::MatchContent).name(); + QCOMPARE(mimeForInfo, resultMimeTypeName); +} + +void tst_QMimeDatabase::findByFile_data() +{ + findByFileName_data(); +} + +void tst_QMimeDatabase::findByFile() +{ + QFETCH(QString, filePath); + QFETCH(QString, mimeTypeName); + QFETCH(QString, xFail); + + QMimeDatabase database; + const QString resultMimeTypeName = database.mimeTypeForFile(filePath).name(); + //qDebug() << Q_FUNC_INFO << filePath << "->" << resultMimeTypeName; + if (xFail.length() >= 3 && xFail.at(2) == QLatin1Char('x')) { + // Expected to fail + QVERIFY2(resultMimeTypeName != mimeTypeName, qPrintable(resultMimeTypeName)); + } else { + QCOMPARE(resultMimeTypeName, mimeTypeName); + } + + // Test QFileInfo overload + const QMimeType mimeForFileInfo = database.mimeTypeForFile(QFileInfo(filePath)); + QCOMPARE(mimeForFileInfo.name(), resultMimeTypeName); +} + + +void tst_QMimeDatabase::fromThreads() +{ + QThreadPool::globalInstance()->setMaxThreadCount(20); + // Note that data-based tests cannot be used here (QTest::fetchData asserts). + QList > futures; + futures << QtConcurrent::run(this, &tst_QMimeDatabase::mimeTypeForName); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::aliases); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::allMimeTypes); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::icons); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::inheritance); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::knownSuffix); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::mimeTypeForFileWithContent); + futures << QtConcurrent::run(this, &tst_QMimeDatabase::allMimeTypes); // a second time + Q_FOREACH (QFuture f, futures) + f.waitForFinished(); +} + +static void runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method? +{ + const QString umd = QStandardPaths::findExecutable(QString::fromLatin1("update-mime-database")); + if (umd.isEmpty()) + QSKIP("shared-mime-info not found, skipping mime.cache test"); + + QProcess proc; + proc.setProcessChannelMode(QProcess::MergedChannels); // silence output + proc.start(umd, QStringList() << path); + proc.waitForFinished(); + //qDebug() << "runUpdateMimeDatabase" << path; +} + +static void waitAndRunUpdateMimeDatabase(const QString &path) +{ + QFileInfo mimeCacheInfo(path + QString::fromLatin1("/mime.cache")); + if (mimeCacheInfo.exists()) { + // Wait until the begining of the next second + while (mimeCacheInfo.lastModified().secsTo(QDateTime::currentDateTime()) == 0) { + QTest::qSleep(200); + } + } + runUpdateMimeDatabase(path); +} + +static void checkHasMimeType(const QString &mimeType) +{ + QMimeDatabase db; + QVERIFY(db.mimeTypeForName(mimeType).isValid()); + + bool found = false; + foreach (const QMimeType &mt, db.allMimeTypes()) { + if (mt.name() == mimeType) { + found = true; + break; + } + } + QVERIFY(found); +} + +QT_BEGIN_NAMESPACE +extern Q_CORE_EXPORT int qmime_secondsBetweenChecks; // see qmimeprovider.cpp +QT_END_NAMESPACE + +void tst_QMimeDatabase::installNewGlobalMimeType() +{ + qmime_secondsBetweenChecks = 0; + + QMimeDatabase db; + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + + const QString fileName = QLatin1String("yast2-metapackage-handler-mimetypes.xml"); + const QString srcFile = QFile::decodeName(SRCDIR) + fileName; + + QDir here = QDir::currentPath(); + const QString mimeDir = here.absolutePath() + QLatin1String("/mime"); + const QString destDir = mimeDir + QLatin1String("/packages/"); + const QString destFile = destDir + fileName; + QFile::remove(destFile); + //qDebug() << destFile; + QVERIFY(QFile::copy(srcFile, destFile)); + waitAndRunUpdateMimeDatabase(mimeDir); + + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("text/x-suse-ymu")); + QVERIFY(db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + checkHasMimeType("text/x-suse-ymp"); + + // Now test removing it again + QFile::remove(destFile); + waitAndRunUpdateMimeDatabase(mimeDir); + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("application/octet-stream")); + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); +} + +void tst_QMimeDatabase::installNewLocalMimeType() +{ + qmime_secondsBetweenChecks = 0; + + QMimeDatabase db; + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + + const QString fileName = QLatin1String("yast2-metapackage-handler-mimetypes.xml"); + const QString srcFile = QFile::decodeName(SRCDIR) + fileName; + const QString mimeDir = m_dataHome + QLatin1String("/mime"); + const QString destDir = mimeDir + QLatin1String("/packages/"); + QDir().mkpath(destDir); + const QString destFile = destDir + fileName; + QFile::remove(destFile); + QVERIFY(QFile::copy(srcFile, destFile)); + runUpdateMimeDatabase(mimeDir); + + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("text/x-suse-ymu")); + QVERIFY(db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + checkHasMimeType("text/x-suse-ymp"); + + // Now test removing it again (note, this leaves a mostly-empty mime.cache file) + QFile::remove(destFile); + waitAndRunUpdateMimeDatabase(mimeDir); + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("application/octet-stream")); + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); + + // And now the user goes wild and uses rm -rf + QFile::remove(mimeDir + QString::fromLatin1("/mime.cache")); + QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), + QString::fromLatin1("application/octet-stream")); + QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); +} + +QTEST_GUILESS_MAIN(tst_QMimeDatabase) diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h new file mode 100644 index 0000000000..869990401c --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.h @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef TST_QMIMEDATABASE_H +#define TST_QMIMEDATABASE_H + +#include + +class tst_QMimeDatabase : public QObject +{ + Q_OBJECT + +public: + tst_QMimeDatabase(); + +private slots: + void initTestCase(); + void cleanupTestCase(); + + void mimeTypeForName(); + void mimeTypeForFileName_data(); + void mimeTypeForFileName(); + void mimeTypesForFileName_data(); + void mimeTypesForFileName(); + void inheritance(); + void aliases(); + void icons(); + void mimeTypeForFileWithContent(); + void mimeTypeForUrl(); + void mimeTypeForData_data(); + void mimeTypeForData(); + void mimeTypeForFileAndContent_data(); + void mimeTypeForFileAndContent(); + void allMimeTypes(); + void inheritsPerformance(); + void suffixes_data(); + void suffixes(); + void knownSuffix(); + void fromThreads(); + + // shared-mime-info test suite + + void findByFileName_data(); + void findByFileName(); + + void findByData_data(); + void findByData(); + + void findByFile_data(); + void findByFile(); + + // + + void installNewGlobalMimeType(); + void installNewLocalMimeType(); + +private: + QString m_dataHome; +}; + +#endif // TST_QMIMEDATABASE_H diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml b/tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml new file mode 100644 index 0000000000..ef3035ef4a --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimedatabase/yast2-metapackage-handler-mimetypes.xml @@ -0,0 +1,15 @@ + + + + + + YaST Meta Package + + + + + URL of a YaST Meta Package + + + + diff --git a/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro b/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro new file mode 100644 index 0000000000..125d0d280f --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimetype/qmimetype.pro @@ -0,0 +1,7 @@ +CONFIG += testcase parallel_test +TARGET = tst_qmimetype +QT = core-private testlib + +*-g++*:QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror -Wshadow -Wno-long-long -Wnon-virtual-dtor + +SOURCES = tst_qmimetype.cpp diff --git a/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp new file mode 100644 index 0000000000..6f24bfe6f1 --- /dev/null +++ b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp @@ -0,0 +1,257 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include +#include + +#include + + +class tst_qmimetype : public QObject +{ + Q_OBJECT + +private slots: + void initTestCase(); + + void isValid(); + void name(); + void genericIconName(); + void iconName(); + void suffixes(); +}; + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::initTestCase() +{ + qputenv("XDG_DATA_DIRS", "doesnotexist"); +} + +// ------------------------------------------------------------------------------------------------ + +static QString qMimeTypeName() +{ + static const QString result ("No name of the MIME type"); + return result; +} + +static QString qMimeTypeGenericIconName() +{ + static const QString result ("No file name of an icon image that represents the MIME type"); + return result; +} + +static QString qMimeTypeIconName() +{ + static const QString result ("No file name of an icon image that represents the MIME type"); + return result; +} + +static QStringList buildQMimeTypeFilenameExtensions() +{ + QStringList result; + result << QString::fromLatin1("*.png"); + return result; +} + +static QStringList qMimeTypeGlobPatterns() +{ + static const QStringList result (buildQMimeTypeFilenameExtensions()); + return result; +} + +// ------------------------------------------------------------------------------------------------ + +#ifndef Q_COMPILER_RVALUE_REFS +QMIMETYPE_BUILDER +#else +QMIMETYPE_BUILDER_FROM_RVALUE_REFS +#endif + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::isValid() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QVERIFY(instantiatedQMimeType.isValid()); + + QMimeType otherQMimeType (instantiatedQMimeType); + + QVERIFY(otherQMimeType.isValid()); + QCOMPARE(instantiatedQMimeType, otherQMimeType); + + QMimeType defaultQMimeType; + + QVERIFY(!defaultQMimeType.isValid()); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::name() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + QString(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + // Verify that the Name is part of the equality test: + QCOMPARE(instantiatedQMimeType.name(), qMimeTypeName()); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::genericIconName() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + qMimeTypeName(), + QString(), + qMimeTypeGenericIconName(), + qMimeTypeGlobPatterns() + ) + ); + + // Verify that the GenericIconName is part of the equality test: + QCOMPARE(instantiatedQMimeType.genericIconName(), qMimeTypeGenericIconName()); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::iconName() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + QString(), + qMimeTypeGlobPatterns() + ) + ); + + // Verify that the IconName is part of the equality test: + QCOMPARE(instantiatedQMimeType.iconName(), qMimeTypeIconName()); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +void tst_qmimetype::suffixes() +{ + QMimeType instantiatedQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + qMimeTypeGlobPatterns() + ) + ); + + QMimeType otherQMimeType ( + buildQMimeType ( + qMimeTypeName(), + qMimeTypeGenericIconName(), + qMimeTypeIconName(), + QStringList() + ) + ); + + // Verify that the Suffixes are part of the equality test: + QCOMPARE(instantiatedQMimeType.globPatterns(), qMimeTypeGlobPatterns()); + QCOMPARE(instantiatedQMimeType.suffixes(), QStringList() << QString::fromLatin1("png")); + + QVERIFY(instantiatedQMimeType != otherQMimeType); + QVERIFY(!(instantiatedQMimeType == otherQMimeType)); +} + +// ------------------------------------------------------------------------------------------------ + +QTEST_GUILESS_MAIN(tst_qmimetype) +#include "tst_qmimetype.moc" -- cgit v1.2.3 From 2e18c16e59c535ee9907a6ccd1ca2fe5a4da8455 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 16 Feb 2012 09:47:32 +0100 Subject: Speed up tst_QWaitCondition Reduce the thread and iteration counts to make this test execute faster. This change reduces the runtime to 14 seconds (from 5 minutes, 38 seconds). Change-Id: Id5ea056cfd33022da5a06809f0598a5cdb02b27b Reviewed-by: Rohan McGovern --- tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp index 73cb8e9cd6..0e1fa47a3e 100644 --- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp +++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp @@ -59,14 +59,8 @@ private slots: void wait_RaceCondition(); }; -static const int iterations = 10; - -// Note: some tests rely on ThreadCount being multiple of 2 -#if defined(Q_OS_SOLARIS) || ( defined(Q_OS_LINUX) && defined(Q_PROCESSOR_ARM) ) +static const int iterations = 4; static const int ThreadCount = 4; -#else -static const int ThreadCount = 10; -#endif class wait_QMutex_Thread_1 : public QThread { -- cgit v1.2.3 From f64f428b8112fb39558cbfe160693e1e4365f7f4 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 17 Feb 2012 15:11:20 +1000 Subject: testlib: make XPASS output slightly less confusing. Prior to this commit, when an unexpected pass occurred the test output showed the message "XPASS : tst_foo::function() 'expr' returned FALSE", where the problem was actually that the expression evaluated to true when it was expected to be false. This commit changes the output to make it clear that the expression evaluated to true unexpectedly. Task-number: QTBUG-22118 Change-Id: Id22c178073d3b75789675ca37a8ef019029b1f91 Reviewed-by: Rohan McGovern --- tests/auto/testlib/selftests/expected_expectfail.lightxml | 4 ++-- tests/auto/testlib/selftests/expected_expectfail.txt | 4 ++-- tests/auto/testlib/selftests/expected_expectfail.xml | 4 ++-- tests/auto/testlib/selftests/expected_expectfail.xunitxml | 4 ++-- tests/auto/testlib/selftests/expected_xunit.lightxml | 2 +- tests/auto/testlib/selftests/expected_xunit.txt | 2 +- tests/auto/testlib/selftests/expected_xunit.xml | 2 +- tests/auto/testlib/selftests/expected_xunit.xunitxml | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index 8fdac12d21..c808886651 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -95,13 +95,13 @@ - + - + diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index f1ad4061b9..b11ff05196 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -34,9 +34,9 @@ XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail PASS : tst_ExpectFail::xfailOnAnyRow(second row) FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements -XPASS : tst_ExpectFail::xpass() 'true' returned FALSE. () +XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(190)] -XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned FALSE. () +XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned TRUE unexpectedly. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(212)] PASS : tst_ExpectFail::xpassDataDriven(Pass) PASS : tst_ExpectFail::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index cb061f55bf..229b0ae697 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -97,13 +97,13 @@ - + - + diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml index d13cf6687f..ca13559cd6 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml +++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml @@ -35,10 +35,10 @@ - + - + diff --git a/tests/auto/testlib/selftests/expected_xunit.lightxml b/tests/auto/testlib/selftests/expected_xunit.lightxml index 35108fc410..71a57373d6 100644 --- a/tests/auto/testlib/selftests/expected_xunit.lightxml +++ b/tests/auto/testlib/selftests/expected_xunit.lightxml @@ -45,7 +45,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_xunit.txt b/tests/auto/testlib/selftests/expected_xunit.txt index ae2508c590..51c8f89599 100644 --- a/tests/auto/testlib/selftests/expected_xunit.txt +++ b/tests/auto/testlib/selftests/expected_xunit.txt @@ -19,7 +19,7 @@ PASS : tst_Xunit::testFunc5() XFAIL : tst_Xunit::testFunc6() this failure is also expected Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(104)] PASS : tst_Xunit::testFunc6() -XPASS : tst_Xunit::testFunc7() 'true' returned FALSE. () +XPASS : tst_Xunit::testFunc7() 'true' returned TRUE unexpectedly. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(110)] PASS : tst_Xunit::cleanupTestCase() Totals: 5 passed, 3 failed, 1 skipped diff --git a/tests/auto/testlib/selftests/expected_xunit.xml b/tests/auto/testlib/selftests/expected_xunit.xml index 0fe9735f71..a1e6b20963 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xml +++ b/tests/auto/testlib/selftests/expected_xunit.xml @@ -47,7 +47,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_xunit.xunitxml b/tests/auto/testlib/selftests/expected_xunit.xunitxml index e77004f819..e7403443ea 100644 --- a/tests/auto/testlib/selftests/expected_xunit.xunitxml +++ b/tests/auto/testlib/selftests/expected_xunit.xunitxml @@ -27,7 +27,7 @@ - + -- cgit v1.2.3 From 88c903f6a30bebad312e8cddc418b9612850acd7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 20 Feb 2012 10:15:57 +1000 Subject: testlib: Add selftests for XPASS and XFAIL involving QCOMPARE. Change-Id: I4f897b411aaa51ff453208eda50e12665489074b Reviewed-by: Rohan McGovern --- .../testlib/selftests/expected_expectfail.lightxml | 57 ++++++++++++---- .../auto/testlib/selftests/expected_expectfail.txt | 51 +++++++++------ .../auto/testlib/selftests/expected_expectfail.xml | 57 ++++++++++++---- .../testlib/selftests/expected_expectfail.xunitxml | 19 ++++-- .../selftests/expectfail/tst_expectfail.cpp | 75 +++++++++++++++++++--- 5 files changed, 200 insertions(+), 59 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index c808886651..34f4f1e70b 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -9,7 +9,7 @@ - + @@ -21,40 +21,62 @@ - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + @@ -68,14 +90,14 @@ - + - + @@ -94,12 +116,12 @@ - + - - + + @@ -107,6 +129,15 @@ + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index b11ff05196..bd4e2172d6 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -3,42 +3,53 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE PASS : tst_ExpectFail::initTestCase() QDEBUG : tst_ExpectFail::xfailAndContinue() begin XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(74)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(78)] QDEBUG : tst_ExpectFail::xfailAndContinue() after PASS : tst_ExpectFail::xfailAndContinue() QDEBUG : tst_ExpectFail::xfailAndAbort() begin XFAIL : tst_ExpectFail::xfailAndAbort() This should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(82)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(86)] PASS : tst_ExpectFail::xfailAndAbort() FAIL! : tst_ExpectFail::xfailTwice() Already expecting a fail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(92)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(96)] XFAIL : tst_ExpectFail::xfailWithQString() A string - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(101)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(105)] XFAIL : tst_ExpectFail::xfailWithQString() Bug 5 (The message) - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(106)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(110)] PASS : tst_ExpectFail::xfailWithQString() -PASS : tst_ExpectFail::xfailDataDriven(Pass 1) -PASS : tst_ExpectFail::xfailDataDriven(Pass 2) -XFAIL : tst_ExpectFail::xfailDataDriven(Abort) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)] -PASS : tst_ExpectFail::xfailDataDriven(Abort) -XFAIL : tst_ExpectFail::xfailDataDriven(Continue) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(135)] -PASS : tst_ExpectFail::xfailDataDriven(Continue) +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 1) +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Pass 2) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)] +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Abort) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(139)] +PASS : tst_ExpectFail::xfailDataDrivenWithQVerify(Continue) +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 1) +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Pass 2) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)] +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Abort) +XFAIL : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) This test should xfail + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(173)] +PASS : tst_ExpectFail::xfailDataDrivenWithQCompare(Continue) PASS : tst_ExpectFail::xfailOnWrongRow(right row) XFAIL : tst_ExpectFail::xfailOnAnyRow(first row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(170)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)] PASS : tst_ExpectFail::xfailOnAnyRow(first row) XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(170)] + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(208)] PASS : tst_ExpectFail::xfailOnAnyRow(second row) FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(190)] -XPASS : tst_ExpectFail::xpassDataDriven(XPass) 'true' returned TRUE unexpectedly. () - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(212)] -PASS : tst_ExpectFail::xpassDataDriven(Pass) + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(228)] +XPASS : tst_ExpectFail::xpassDataDrivenWithQVerify(XPass) 'true' returned TRUE unexpectedly. () + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(250)] +PASS : tst_ExpectFail::xpassDataDrivenWithQVerify(Pass) +XPASS : tst_ExpectFail::xpassDataDrivenWithQCompare(XPass) COMPARE() + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(271)] +PASS : tst_ExpectFail::xpassDataDrivenWithQCompare(Pass) PASS : tst_ExpectFail::cleanupTestCase() -Totals: 13 passed, 5 failed, 0 skipped +Totals: 18 passed, 6 failed, 0 skipped ********* Finished testing of tst_ExpectFail ********* diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 229b0ae697..ff870a6a68 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -11,7 +11,7 @@ - + @@ -23,40 +23,62 @@ - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + @@ -70,14 +92,14 @@ - + - + @@ -96,12 +118,12 @@ - + - - + + @@ -109,6 +131,15 @@ + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml index ca13559cd6..6040af41ff 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml +++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml @@ -1,8 +1,8 @@ - + - - + + @@ -21,7 +21,11 @@ - + + + + + @@ -37,9 +41,12 @@ - + + + + @@ -52,6 +59,8 @@ + + diff --git a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp index 56895b3801..794b109924 100644 --- a/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp +++ b/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp @@ -54,8 +54,10 @@ private slots: void xfailAndAbort() const; void xfailTwice() const; void xfailWithQString() const; - void xfailDataDriven_data() const; - void xfailDataDriven() const; + void xfailDataDrivenWithQVerify_data() const; + void xfailDataDrivenWithQVerify() const; + void xfailDataDrivenWithQCompare_data() const; + void xfailDataDrivenWithQCompare() const; void xfailOnWrongRow_data() const; void xfailOnWrongRow() const; void xfailOnAnyRow_data() const; @@ -63,8 +65,10 @@ private slots: void xfailWithoutVerify_data() const; void xfailWithoutVerify() const; void xpass() const; - void xpassDataDriven_data() const; - void xpassDataDriven() const; + void xpassDataDrivenWithQVerify_data() const; + void xpassDataDrivenWithQVerify() const; + void xpassDataDrivenWithQCompare_data() const; + void xpassDataDrivenWithQCompare() const; }; void tst_ExpectFail::xfailAndContinue() const @@ -106,7 +110,7 @@ void tst_ExpectFail::xfailWithQString() const QVERIFY(false); } -void tst_ExpectFail::xfailDataDriven_data() const +void tst_ExpectFail::xfailDataDrivenWithQVerify_data() const { QTest::addColumn("shouldPass"); QTest::addColumn("failMode"); @@ -117,7 +121,7 @@ void tst_ExpectFail::xfailDataDriven_data() const QTest::newRow("Continue") << false << QTest::Continue; } -void tst_ExpectFail::xfailDataDriven() const +void tst_ExpectFail::xfailDataDrivenWithQVerify() const { QFETCH(bool, shouldPass); QFETCH(QTest::TestFailMode, failMode); @@ -140,6 +144,40 @@ void tst_ExpectFail::xfailDataDriven() const QCOMPARE(failMode, QTest::Continue); } +void tst_ExpectFail::xfailDataDrivenWithQCompare_data() const +{ + QTest::addColumn("shouldPass"); + QTest::addColumn("failMode"); + + QTest::newRow("Pass 1") << true << QTest::Abort; + QTest::newRow("Pass 2") << true << QTest::Continue; + QTest::newRow("Abort") << false << QTest::Abort; + QTest::newRow("Continue") << false << QTest::Continue; +} + +void tst_ExpectFail::xfailDataDrivenWithQCompare() const +{ + QFETCH(bool, shouldPass); + QFETCH(QTest::TestFailMode, failMode); + + // You can't pass a variable as the last parameter of QEXPECT_FAIL, + // because the macro adds "QTest::" in front of the last parameter. + // That is why the following code appears to be a little strange. + if (!shouldPass) { + if (failMode == QTest::Abort) + QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Abort); + else + QEXPECT_FAIL(QTest::currentDataTag(), "This test should xfail", Continue); + } + + QCOMPARE(1, shouldPass ? 1 : 2); + + // If we get here, we either expected to pass or we expected to + // fail and the failure mode was Continue. + if (!shouldPass) + QCOMPARE(failMode, QTest::Continue); +} + void tst_ExpectFail::xfailOnWrongRow_data() const { QTest::addColumn("dummy"); @@ -194,7 +232,7 @@ void tst_ExpectFail::xpass() const QVERIFY2(false, "This should not be reached"); } -void tst_ExpectFail::xpassDataDriven_data() const +void tst_ExpectFail::xpassDataDrivenWithQVerify_data() const { QTest::addColumn("shouldXPass"); @@ -202,7 +240,7 @@ void tst_ExpectFail::xpassDataDriven_data() const QTest::newRow("Pass") << false; } -void tst_ExpectFail::xpassDataDriven() const +void tst_ExpectFail::xpassDataDrivenWithQVerify() const { QFETCH(bool, shouldXPass); @@ -215,5 +253,26 @@ void tst_ExpectFail::xpassDataDriven() const QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS"); } +void tst_ExpectFail::xpassDataDrivenWithQCompare_data() const +{ + QTest::addColumn("shouldXPass"); + + QTest::newRow("XPass") << true; + QTest::newRow("Pass") << false; +} + +void tst_ExpectFail::xpassDataDrivenWithQCompare() const +{ + QFETCH(bool, shouldXPass); + + if (shouldXPass) + QEXPECT_FAIL(QTest::currentDataTag(), "This test should xpass", Abort); + + QCOMPARE(1, 1); + + // We should only get here if the test wasn't supposed to xpass. + QVERIFY2(!shouldXPass, "Test failed to terminate on XPASS"); +} + QTEST_MAIN(tst_ExpectFail) #include "tst_expectfail.moc" -- cgit v1.2.3 From 4cb09aea6a4f26f36961da8934819e823cfe2d4d Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Mon, 20 Feb 2012 10:18:01 +1000 Subject: Fixed qobject unittest to work from installation directory - Made test depend on subprogram to make sure it was there when test ran. - install signalbug subprogram Change-Id: Ie0a19e52d131adcd17c97b263389aecffb81520e Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- tests/auto/corelib/kernel/qobject/qobject.pro | 5 +++-- tests/auto/corelib/kernel/qobject/tst_qobject.pro | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qobject/qobject.pro b/tests/auto/corelib/kernel/qobject/qobject.pro index ee48f56b1d..0f86408fc9 100644 --- a/tests/auto/corelib/kernel/qobject/qobject.pro +++ b/tests/auto/corelib/kernel/qobject/qobject.pro @@ -1,3 +1,4 @@ TEMPLATE = subdirs -SUBDIRS = signalbug tst_qobject.pro -CONFIG += parallel_test +SUBDIRS = signalbug +tst_qobject.pro.depends = $$SUBDIRS +SUBDIRS += tst_qobject.pro diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.pro b/tests/auto/corelib/kernel/qobject/tst_qobject.pro index d74f2bcb0f..30fd810a2e 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.pro +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.pro @@ -6,3 +6,6 @@ SOURCES = tst_qobject.cpp # this is here for a reason, moc_oldnormalizedobject.cpp is not auto-generated, it was generated by # moc from Qt 4.6, and should *not* be generated by the current moc SOURCES += moc_oldnormalizeobject.cpp + +load(testcase) # for target.path and installTestHelperApp() +installTestHelperApp("signalbug/signalbug",signalbug,signalbug) -- cgit v1.2.3 From eb52d78e90ad8870a055f586d9d14d7068acd95b Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 17 Feb 2012 13:39:30 +1000 Subject: testlib: Report one test result per benchmark test. Prior to this commit, a benchmark test could report 0..n passes and 0..m fails or skips, where n is the number of accumulation iterations used to collect benchmark data and m is the number of times the test function was invoked. Depending on the type of benchmark measurer being used, this could result in a very large volume of test output and inconsistent pass, fail and skip counts between test runs. This commit changes the behaviour so that each benchmark test reports one pass, fail or skip, regardless of the number of iterations used to collect benchmark data. This commit also prevents benchmark data being reported in the test output if the benchmark test failed or skipped, as any benchmark data is of dubious value in such cases. The latter change in behaviour requires a minor modification to the badxml selftest, which now tests quoting of literal strings in xml test output for both passing and failing benchmarks. Finally, this commit also adds a new selftest specifically for verifying correct behaviour for benchmarks that fail or skip. Task-number: QTBUG-24313 Change-Id: I3426dc659a7511b62fd183a031c7235bc753f497 Reviewed-by: Rohan McGovern --- tests/auto/testlib/selftests/badxml/tst_badxml.cpp | 9 ++- .../benchlibcounting/benchlibcounting.pro | 7 ++ .../benchlibcounting/tst_benchlibcounting.cpp | 76 ++++++++++++++++++++++ .../testlib/selftests/expected_badxml.lightxml | 60 ++++++++++++----- tests/auto/testlib/selftests/expected_badxml.txt | 42 +++++++----- tests/auto/testlib/selftests/expected_badxml.xml | 60 ++++++++++++----- .../testlib/selftests/expected_badxml.xunitxml | 26 +++++--- .../selftests/expected_benchlibcallgrind.txt | 3 +- .../selftests/expected_benchlibcounting.lightxml | 24 +++++++ .../selftests/expected_benchlibcounting.txt | 13 ++++ .../selftests/expected_benchlibcounting.xml | 27 ++++++++ .../selftests/expected_benchlibcounting.xunitxml | 20 ++++++ .../testlib/selftests/expected_benchliboptions.txt | 8 +-- tests/auto/testlib/selftests/selftests.pri | 1 + tests/auto/testlib/selftests/selftests.qrc | 4 ++ tests/auto/testlib/selftests/tst_selftests.cpp | 4 ++ 16 files changed, 314 insertions(+), 70 deletions(-) create mode 100644 tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro create mode 100644 tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp create mode 100644 tests/auto/testlib/selftests/expected_benchlibcounting.lightxml create mode 100644 tests/auto/testlib/selftests/expected_benchlibcounting.txt create mode 100644 tests/auto/testlib/selftests/expected_benchlibcounting.xml create mode 100644 tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml (limited to 'tests/auto') diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp index 1c9a0d9493..1a143e5243 100644 --- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp +++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp @@ -106,15 +106,18 @@ void tst_BadXml::badDataTag() const QBENCHMARK { } - QFAIL("a failure"); + QFETCH(bool, shouldFail); + if (shouldFail) + QFAIL("a failure"); } void tst_BadXml::badDataTag_data() const { - QTest::addColumn("dummy"); + QTest::addColumn("shouldFail"); foreach (char const* str, badStrings()) { - QTest::newRow(str) << 0; + QTest::newRow(qPrintable(QString("fail %1").arg(str))) << true; + QTest::newRow(qPrintable(QString("pass %1").arg(str))) << false; } } diff --git a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro new file mode 100644 index 0000000000..b495995eac --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro @@ -0,0 +1,7 @@ +SOURCES += tst_benchlibcounting.cpp +QT = core testlib + +mac:CONFIG -= app_bundle +CONFIG -= debug_and_release_target + +TARGET = benchlibcounting diff --git a/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp b/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp new file mode 100644 index 0000000000..847bc1a81d --- /dev/null +++ b/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class tst_BenchlibCounting : public QObject +{ + Q_OBJECT + +private slots: + void passingBenchmark(); + void skippingBenchmark(); + void failingBenchmark(); +}; + +void tst_BenchlibCounting::passingBenchmark() +{ + QBENCHMARK { + } +} + +void tst_BenchlibCounting::skippingBenchmark() +{ + QBENCHMARK { + QSKIP("This is a skipping benchmark"); + } +} + +void tst_BenchlibCounting::failingBenchmark() +{ + QBENCHMARK { + QFAIL("This is a failing benchmark"); + }; +} + +QTEST_MAIN(tst_BenchlibCounting) +#include "tst_benchlibcounting.moc" diff --git a/tests/auto/testlib/selftests/expected_badxml.lightxml b/tests/auto/testlib/selftests/expected_badxml.lightxml index a8cdf56dc1..08ba497efa 100644 --- a/tests/auto/testlib/selftests/expected_badxml.lightxml +++ b/tests/auto/testlib/selftests/expected_badxml.lightxml @@ -7,41 +7,69 @@ - text ]]]> more text]]> + text ]]]> more text]]> - - text ]]]> more text]]> + + text ]]]> more text]]> - - + text ]]]> more text]]> - - + + text ]]]> more text]]> + + + + + + + + - - open < tags < text]]> + + + + + + + + + open < tags < text]]> - - open < tags < text]]> + + open < tags < text]]> - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + open < tags < text]]> - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + open < tags < text]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> - + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + diff --git a/tests/auto/testlib/selftests/expected_badxml.txt b/tests/auto/testlib/selftests/expected_badxml.txt index d4f4432066..68d333ec30 100644 --- a/tests/auto/testlib/selftests/expected_badxml.txt +++ b/tests/auto/testlib/selftests/expected_badxml.txt @@ -1,25 +1,33 @@ ********* Start testing of tst_BadXml ********* Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BadXml::initTestCase() -QDEBUG : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a message -FAIL! : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"end cdata ]]> text ]]> more text": +QDEBUG : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a message +FAIL! : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass end cdata ]]> text ]]> more text) a message +PASS : tst_BadXml::badDataTag(pass end cdata ]]> text ]]> more text) +RESULT : tst_BadXml::badDataTag():"pass end cdata ]]> text ]]> more text": 0 events per iteration (total: 0, iterations: 1) -QDEBUG : tst_BadXml::badDataTag(quotes " text" more text) a message -FAIL! : tst_BadXml::badDataTag(quotes " text" more text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"quotes " text" more text": +QDEBUG : tst_BadXml::badDataTag(fail quotes " text" more text) a message +FAIL! : tst_BadXml::badDataTag(fail quotes " text" more text) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass quotes " text" more text) a message +PASS : tst_BadXml::badDataTag(pass quotes " text" more text) +RESULT : tst_BadXml::badDataTag():"pass quotes " text" more text": 0 events per iteration (total: 0, iterations: 1) -QDEBUG : tst_BadXml::badDataTag(xml close > open < tags < text) a message -FAIL! : tst_BadXml::badDataTag(xml close > open < tags < text) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"xml close > open < tags < text": +QDEBUG : tst_BadXml::badDataTag(fail xml close > open < tags < text) a message +FAIL! : tst_BadXml::badDataTag(fail xml close > open < tags < text) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass xml close > open < tags < text) a message +PASS : tst_BadXml::badDataTag(pass xml close > open < tags < text) +RESULT : tst_BadXml::badDataTag():"pass xml close > open < tags < text": 0 events per iteration (total: 0, iterations: 1) -QDEBUG : tst_BadXml::badDataTag(all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message -FAIL! : tst_BadXml::badDataTag(all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a failure - Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(109)] -RESULT : tst_BadXml::badDataTag():"all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs": +QDEBUG : tst_BadXml::badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message +FAIL! : tst_BadXml::badDataTag(fail all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a failure + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/badxml/tst_badxml.cpp(111)] +QDEBUG : tst_BadXml::badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) a message +PASS : tst_BadXml::badDataTag(pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs) +RESULT : tst_BadXml::badDataTag():"pass all > " mixed ]]> up > " in < the ]]> hopes < of triggering "< ]]> bugs": 0 events per iteration (total: 0, iterations: 1) QDEBUG : tst_BadXml::badMessage(string 0) end cdata ]]> text ]]> more text PASS : tst_BadXml::badMessage(string 0) @@ -31,5 +39,5 @@ QDEBUG : tst_BadXml::badMessage(string 3) all > " mixed ]]> up > " in < the ]]> PASS : tst_BadXml::badMessage(string 3) FAIL! : tst_BadXml::failWithNoFile() failure message PASS : tst_BadXml::cleanupTestCase() -Totals: 6 passed, 5 failed, 0 skipped +Totals: 10 passed, 5 failed, 0 skipped ********* Finished testing of tst_BadXml ********* diff --git a/tests/auto/testlib/selftests/expected_badxml.xml b/tests/auto/testlib/selftests/expected_badxml.xml index 9f083d3917..849bc07bfc 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xml +++ b/tests/auto/testlib/selftests/expected_badxml.xml @@ -9,41 +9,69 @@ - text ]]]> more text]]> + text ]]]> more text]]> - - text ]]]> more text]]> + + text ]]]> more text]]> - - + text ]]]> more text]]> - - + + text ]]]> more text]]> + + + + + + + + - - open < tags < text]]> + + + + + + + + + open < tags < text]]> - - open < tags < text]]> + + open < tags < text]]> - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + open < tags < text]]> - - " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + open < tags < text]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> - + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + + + " mixed ]]]> up > " in < the ]]]> hopes < of triggering "< ]]]> bugs]]> + + diff --git a/tests/auto/testlib/selftests/expected_badxml.xunitxml b/tests/auto/testlib/selftests/expected_badxml.xunitxml index 724aed59e7..939e887a88 100644 --- a/tests/auto/testlib/selftests/expected_badxml.xunitxml +++ b/tests/auto/testlib/selftests/expected_badxml.xunitxml @@ -1,19 +1,23 @@ - + - - - - - - - - + + + + + + + + + + + + @@ -30,6 +34,10 @@ + + + + text ]]]> more text]]> open < tags < text]]> diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt index 714b67fa77..13e9a39aff 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt +++ b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt @@ -2,9 +2,8 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibCallgrind::initTestCase() PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions() -PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions() RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions(): 200,000,158 instruction reads per iteration (total: 200,000,158, iterations: 1) PASS : tst_BenchlibCallgrind::cleanupTestCase() -Totals: 4 passed, 0 failed, 0 skipped +Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibCallgrind ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml new file mode 100644 index 0000000000..5c436a53e0 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.lightxml @@ -0,0 +1,24 @@ + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.txt b/tests/auto/testlib/selftests/expected_benchlibcounting.txt new file mode 100644 index 0000000000..e1af40b9e0 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.txt @@ -0,0 +1,13 @@ +********* Start testing of tst_BenchlibCounting ********* +Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +PASS : tst_BenchlibCounting::initTestCase() +PASS : tst_BenchlibCounting::passingBenchmark() +RESULT : tst_BenchlibCounting::passingBenchmark(): + 0 events per iteration (total: 0, iterations: 1) +SKIP : tst_BenchlibCounting::skippingBenchmark() This is a skipping benchmark + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp(64)] +FAIL! : tst_BenchlibCounting::failingBenchmark() This is a failing benchmark + Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/benchlibcounting/tst_benchlibcounting.cpp(71)] +PASS : tst_BenchlibCounting::cleanupTestCase() +Totals: 3 passed, 1 failed, 1 skipped +********* Finished testing of tst_BenchlibCounting ********* diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xml b/tests/auto/testlib/selftests/expected_benchlibcounting.xml new file mode 100644 index 0000000000..5bf71fbf8e --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xml @@ -0,0 +1,27 @@ + + + + @INSERT_QT_VERSION_HERE@ + @INSERT_QT_VERSION_HERE@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml b/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml new file mode 100644 index 0000000000..83e429aa3a --- /dev/null +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.xunitxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.txt b/tests/auto/testlib/selftests/expected_benchliboptions.txt index 6d6d91c25e..ef9f0c5ad0 100644 --- a/tests/auto/testlib/selftests/expected_benchliboptions.txt +++ b/tests/auto/testlib/selftests/expected_benchliboptions.txt @@ -20,14 +20,8 @@ Totals: 3 passed, 0 failed, 0 skipped Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOneHundredMinimum::initTestCase() PASS : tst_BenchlibOneHundredMinimum::threeEvents() -PASS : tst_BenchlibOneHundredMinimum::threeEvents() -PASS : tst_BenchlibOneHundredMinimum::threeEvents() -PASS : tst_BenchlibOneHundredMinimum::threeEvents() -PASS : tst_BenchlibOneHundredMinimum::threeEvents() -PASS : tst_BenchlibOneHundredMinimum::threeEvents() -PASS : tst_BenchlibOneHundredMinimum::threeEvents() RESULT : tst_BenchlibOneHundredMinimum::threeEvents(): 3.00 events per iteration (total: 192, iterations: 64) PASS : tst_BenchlibOneHundredMinimum::cleanupTestCase() -Totals: 9 passed, 0 failed, 0 skipped +Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibOneHundredMinimum ********* diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri index 2297186f62..0809c4d497 100644 --- a/tests/auto/testlib/selftests/selftests.pri +++ b/tests/auto/testlib/selftests/selftests.pri @@ -3,6 +3,7 @@ SUBPROGRAMS = \ assert \ badxml \ benchlibcallgrind \ + benchlibcounting \ benchlibeventcounter \ benchliboptions \ benchlibtickcounter \ diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc index d2f0a50824..baa539a259 100644 --- a/tests/auto/testlib/selftests/selftests.qrc +++ b/tests/auto/testlib/selftests/selftests.qrc @@ -10,6 +10,10 @@ expected_badxml.xml expected_badxml.xunitxml expected_benchlibcallgrind.txt + expected_benchlibcounting.lightxml + expected_benchlibcounting.txt + expected_benchlibcounting.xml + expected_benchlibcounting.xunitxml expected_benchlibeventcounter.lightxml expected_benchlibeventcounter.txt expected_benchlibeventcounter.xml diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 7e671a50f2..decaa55386 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -323,6 +323,7 @@ void tst_Selftests::runSubTest_data() // Only run on platforms where callgrind is available. << "benchlibcallgrind" #endif + << "benchlibcounting" << "benchlibeventcounter" << "benchliboptions" << "cmptest" @@ -399,6 +400,9 @@ void tst_Selftests::runSubTest_data() else if (subtest == "badxml") { arguments << "-eventcounter"; } + else if (subtest == "benchlibcounting") { + arguments << "-eventcounter"; + } else if (subtest == "printdatatags") { arguments << "-datatags"; } -- cgit v1.2.3 From 7fbe7fd7b5a31cdadc8fb06a1d226e4a2b0a3f9f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 20 Feb 2012 11:39:31 +1000 Subject: Make QLocale autotest pass for shadow builds. For shadow builds where "make install" had not been run, the tst_QLocale::emptyCtor test function would fail to find its helper application because QFINDTESTDATA was not searching for it in the build directory due to the test not instantiating QCoreApplication. This commit fixes the test by instantiating a QCoreApplication using the QTEST_MAIN macro, which also allows some special case code for Windows CE to be removed. Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4 Reviewed-by: Rohan McGovern --- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index e23448c056..db7f503f57 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -59,7 +59,6 @@ #endif #ifdef Q_OS_WINCE -#include #include // needed for GetUserDefaultLCID #define _control87 _controlfp extern "C" DWORD GetThreadLocale(void) { @@ -141,11 +140,6 @@ tst_QLocale::tst_QLocale() void tst_QLocale::ctor() { -#ifdef Q_OS_WINCE - int argc = 1; - char argv[20] = "tst_qlocale.exe"; - QCoreApplication app(argc, (char**)&argv); -#endif QLocale default_locale = QLocale::system(); QLocale::Language default_lang = default_locale.language(); QLocale::Country default_country = default_locale.country(); @@ -1988,5 +1982,5 @@ void tst_QLocale::listPatterns() QCOMPARE(zh_CN.createSeparatedList(sl5), QString::fromUtf8("aaa" "\xe3\x80\x81" "bbb" "\xe3\x80\x81" "ccc" "\xe5\x92\x8c" "ddd")); } -QTEST_APPLESS_MAIN(tst_QLocale) +QTEST_MAIN(tst_QLocale) #include "tst_qlocale.moc" -- cgit v1.2.3 From 2465143f2498e039dc7a62da7427d0aace5ee29c Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Mon, 20 Feb 2012 15:46:46 +1000 Subject: Set tst_qtoolbutton triggered function skipped. This autotest seems to be caught in an event loop preventing further correct signalling. Mark test function skipped with QSKIP. Task-number: QTBUG-24374 Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3 Reviewed-by: Rohan McGovern --- tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp index 48b68d1795..df4efd658a 100644 --- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp +++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp @@ -142,6 +142,10 @@ void tst_QToolButton::triggered() QCOMPARE(spy.count(),1); QCOMPARE(qvariant_cast(spy.at(0).at(0)), def); +#ifdef Q_OS_MAC + QSKIP("QTBUG-24374 - This test hangs here on Mac OSX"); +#endif + w = menu; QTimer::singleShot(30, this, SLOT(sendMouseClick())); tb.showMenu(); -- cgit v1.2.3 From 853e9ac787f2eaf603c7756726b2d90a143aa183 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Mon, 20 Feb 2012 13:29:13 +1000 Subject: Modify helper functions to remove embedded QSKIP call and return status. The helper functions contained QSKIP macros which do not also skip their parent function. These QSKIP function were removed and replaced with a return success value. Change-Id: I533f57842fc95beaeb1fcde5235678e9807db056 Reviewed-by: Rohan McGovern --- .../mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp index 12d6587dfb..fc86fa5431 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -714,20 +714,21 @@ void tst_QMimeDatabase::fromThreads() f.waitForFinished(); } -static void runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method? +static bool runUpdateMimeDatabase(const QString &path) // TODO make it a QMimeDatabase method? { const QString umd = QStandardPaths::findExecutable(QString::fromLatin1("update-mime-database")); if (umd.isEmpty()) - QSKIP("shared-mime-info not found, skipping mime.cache test"); + return false; QProcess proc; proc.setProcessChannelMode(QProcess::MergedChannels); // silence output proc.start(umd, QStringList() << path); proc.waitForFinished(); //qDebug() << "runUpdateMimeDatabase" << path; + return true; } -static void waitAndRunUpdateMimeDatabase(const QString &path) +static bool waitAndRunUpdateMimeDatabase(const QString &path) { QFileInfo mimeCacheInfo(path + QString::fromLatin1("/mime.cache")); if (mimeCacheInfo.exists()) { @@ -736,7 +737,7 @@ static void waitAndRunUpdateMimeDatabase(const QString &path) QTest::qSleep(200); } } - runUpdateMimeDatabase(path); + return runUpdateMimeDatabase(path); } static void checkHasMimeType(const QString &mimeType) @@ -775,7 +776,8 @@ void tst_QMimeDatabase::installNewGlobalMimeType() QFile::remove(destFile); //qDebug() << destFile; QVERIFY(QFile::copy(srcFile, destFile)); - waitAndRunUpdateMimeDatabase(mimeDir); + if (!waitAndRunUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test"); QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("text/x-suse-ymu")); @@ -784,7 +786,8 @@ void tst_QMimeDatabase::installNewGlobalMimeType() // Now test removing it again QFile::remove(destFile); - waitAndRunUpdateMimeDatabase(mimeDir); + if (!waitAndRunUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test"); QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("application/octet-stream")); QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); @@ -805,7 +808,8 @@ void tst_QMimeDatabase::installNewLocalMimeType() const QString destFile = destDir + fileName; QFile::remove(destFile); QVERIFY(QFile::copy(srcFile, destFile)); - runUpdateMimeDatabase(mimeDir); + if (!runUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test");; QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("text/x-suse-ymu")); @@ -814,7 +818,8 @@ void tst_QMimeDatabase::installNewLocalMimeType() // Now test removing it again (note, this leaves a mostly-empty mime.cache file) QFile::remove(destFile); - waitAndRunUpdateMimeDatabase(mimeDir); + if (!waitAndRunUpdateMimeDatabase(mimeDir)) + QSKIP("shared-mime-info not found, skipping mime.cache test"); QCOMPARE(db.mimeTypeForFile(QLatin1String("foo.ymu"), QMimeDatabase::MatchExtension).name(), QString::fromLatin1("application/octet-stream")); QVERIFY(!db.mimeTypeForName(QLatin1String("text/x-suse-ymp")).isValid()); -- cgit v1.2.3 From c66bb51a7551fc67290761e0ef9de1137ad07fd0 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Mon, 20 Feb 2012 14:05:47 +1000 Subject: Changed qabstractnetworkcache unittest to use TESTDATA - Changed qabstractnetworkcache to install testdata Change-Id: I8f2ae6103214755ee7898dbc0ee50c0e4d7d45ab Reviewed-by: Rohan McGovern Reviewed-by: Jason McDonald --- .../network/access/qabstractnetworkcache/qabstractnetworkcache.pro | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro index 719c34f286..ef47a4b458 100644 --- a/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro +++ b/tests/auto/network/access/qabstractnetworkcache/qabstractnetworkcache.pro @@ -4,10 +4,6 @@ QT += network testlib QT -= gui SOURCES += tst_qabstractnetworkcache.cpp -wince* { - testFiles.files = tests - testFiles.path = . - DEPLOYMENT += testFiles -} +TESTDATA += tests/* CONFIG += insignificant_test # QTBUG-20686; note, assumed unstable on all platforms -- cgit v1.2.3 From 5640b0b4439941c621b4f0efec541e387abb7daf Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 17 Feb 2012 22:12:05 +0100 Subject: Add QMetaMethod::isValid() function This function provides a proper way of determining whether a function returned by QMetaObject::method() is valid. (Checking whether signature() returns a 0 pointer, which e.g. testlib does, is not an ideal API -- especially given that signature() will soon be removed and replaced by a function that returns a QByteArray.) Change-Id: I644f476b09904925f2042945f5d0ad744482b682 Reviewed-by: Olivier Goffart Reviewed-by: Lars Knoll --- tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp index cb34d411fd..1651d00738 100644 --- a/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp +++ b/tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp @@ -52,6 +52,8 @@ class tst_QMetaMethod : public QObject private slots: void method_data(); void method(); + + void invalidMethod(); }; struct CustomType { }; @@ -597,6 +599,7 @@ void tst_QMetaMethod::method() QVERIFY(index != -1); QMetaMethod method = (methodType == QMetaMethod::Constructor) ? mo->constructor(index) : mo->method(index); + QVERIFY(method.isValid()); QCOMPARE(method.methodType(), methodType); QCOMPARE(method.access(), access); @@ -611,5 +614,17 @@ void tst_QMetaMethod::method() QCOMPARE(method.parameterNames(), parameterNames); } +void tst_QMetaMethod::invalidMethod() +{ + QMetaMethod method; + QVERIFY(!method.isValid()); + + QMetaMethod method2 = staticMetaObject.method(staticMetaObject.methodCount()); + QVERIFY(!method2.isValid()); + + QMetaMethod method3 = staticMetaObject.method(-1); + QVERIFY(!method3.isValid()); +} + QTEST_MAIN(tst_QMetaMethod) #include "tst_qmetamethod.moc" -- cgit v1.2.3 From 49b08f96e824f49fab9aa5c9a1a0ed582d4558bb Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 11 Dec 2011 16:55:01 +0100 Subject: uic: use QStringLiteral() instead of QString::fromUtf8() where applicable Many (most?) strings written aren't in fact UTF-8, and we can check at compile-time which are and which aren't, so don't hard-code fromUtf8() but use the much more efficient QStringLiteral() where applicable. This is low-hanging fruit. This patch only optimises US-ASCII string literals, not those that are latin-1 or even UTF-8, because that would require more extensive changes to the original fixString() function. Likewise, there are also other calls to QString::fromUtf8() being generated (e.g. in the pixmap code) that could benefit from being turned into QStringLiterals, but their code paths are more involved than those this patch fixes. This patch at least suffices in turning all the setObjectName() arguments into QStringLiterals, which was the main goal. The autotest baseline has been updated with the new expected results. Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc Reviewed-by: Friedemann Kleint --- .../uic/baseline/Dialog_with_Buttons_Bottom.ui.h | 4 +- .../uic/baseline/Dialog_with_Buttons_Right.ui.h | 4 +- .../tools/uic/baseline/Dialog_without_Buttons.ui.h | 2 +- tests/auto/tools/uic/baseline/Main_Window.ui.h | 8 +- tests/auto/tools/uic/baseline/Widget.ui.h | 10 +- tests/auto/tools/uic/baseline/addlinkdialog.ui.h | 18 +-- tests/auto/tools/uic/baseline/addtorrentform.ui.h | 48 +++---- .../tools/uic/baseline/authenticationdialog.ui.h | 20 +-- tests/auto/tools/uic/baseline/backside.ui.h | 30 ++-- .../auto/tools/uic/baseline/batchtranslation.ui.h | 34 ++--- tests/auto/tools/uic/baseline/bookmarkdialog.ui.h | 32 ++--- tests/auto/tools/uic/baseline/bookwindow.ui.h | 36 ++--- tests/auto/tools/uic/baseline/browserwidget.ui.h | 26 ++-- tests/auto/tools/uic/baseline/calculator.ui.h | 58 ++++---- tests/auto/tools/uic/baseline/calculatorform.ui.h | 38 ++--- tests/auto/tools/uic/baseline/certificateinfo.ui.h | 20 +-- tests/auto/tools/uic/baseline/chatdialog.ui.h | 16 +-- tests/auto/tools/uic/baseline/chatmainwindow.ui.h | 32 ++--- tests/auto/tools/uic/baseline/chatsetnickname.ui.h | 16 +-- tests/auto/tools/uic/baseline/config.ui.h | 104 +++++++------- tests/auto/tools/uic/baseline/connectdialog.ui.h | 28 ++-- tests/auto/tools/uic/baseline/controller.ui.h | 14 +- tests/auto/tools/uic/baseline/cookies.ui.h | 16 +-- .../auto/tools/uic/baseline/cookiesexceptions.ui.h | 36 ++--- tests/auto/tools/uic/baseline/default.ui.h | 52 +++---- tests/auto/tools/uic/baseline/dialog.ui.h | 10 +- tests/auto/tools/uic/baseline/downloaditem.ui.h | 22 +-- tests/auto/tools/uic/baseline/downloads.ui.h | 12 +- tests/auto/tools/uic/baseline/embeddeddialog.ui.h | 20 +-- tests/auto/tools/uic/baseline/filespage.ui.h | 12 +- .../auto/tools/uic/baseline/filternamedialog.ui.h | 12 +- tests/auto/tools/uic/baseline/filterpage.ui.h | 18 +-- tests/auto/tools/uic/baseline/finddialog.ui.h | 32 ++--- tests/auto/tools/uic/baseline/form.ui.h | 20 +-- .../tools/uic/baseline/formwindowsettings.ui.h | 56 ++++---- tests/auto/tools/uic/baseline/generalpage.ui.h | 12 +- tests/auto/tools/uic/baseline/gridalignment.ui.h | 12 +- tests/auto/tools/uic/baseline/gridpanel.ui.h | 26 ++-- tests/auto/tools/uic/baseline/helpdialog.ui.h | 60 ++++---- tests/auto/tools/uic/baseline/history.ui.h | 16 +-- tests/auto/tools/uic/baseline/icontheme.ui.h | 20 +-- tests/auto/tools/uic/baseline/identifierpage.ui.h | 12 +- tests/auto/tools/uic/baseline/imagedialog.ui.h | 36 ++--- tests/auto/tools/uic/baseline/inputpage.ui.h | 12 +- tests/auto/tools/uic/baseline/installdialog.ui.h | 26 ++-- tests/auto/tools/uic/baseline/languagesdialog.ui.h | 26 ++-- .../auto/tools/uic/baseline/listwidgeteditor.ui.h | 28 ++-- tests/auto/tools/uic/baseline/mainwindow.ui.h | 88 ++++++------ tests/auto/tools/uic/baseline/mydialog.ui.h | 8 +- tests/auto/tools/uic/baseline/myform.ui.h | 26 ++-- tests/auto/tools/uic/baseline/newactiondialog.ui.h | 24 ++-- .../uic/baseline/newdynamicpropertydialog.ui.h | 18 +-- tests/auto/tools/uic/baseline/newform.ui.h | 16 +-- tests/auto/tools/uic/baseline/orderdialog.ui.h | 18 +-- tests/auto/tools/uic/baseline/outputpage.ui.h | 12 +- tests/auto/tools/uic/baseline/pagefold.ui.h | 56 ++++---- tests/auto/tools/uic/baseline/paletteeditor.ui.h | 32 ++--- tests/auto/tools/uic/baseline/passworddialog.ui.h | 20 +-- tests/auto/tools/uic/baseline/pathpage.ui.h | 16 +-- tests/auto/tools/uic/baseline/phrasebookbox.ui.h | 32 ++--- tests/auto/tools/uic/baseline/plugindialog.ui.h | 14 +- .../auto/tools/uic/baseline/preferencesdialog.ui.h | 36 ++--- .../uic/baseline/previewconfigurationwidget.ui.h | 26 ++-- .../auto/tools/uic/baseline/previewdialogbase.ui.h | 26 ++-- tests/auto/tools/uic/baseline/previewwidget.ui.h | 42 +++--- tests/auto/tools/uic/baseline/proxy.ui.h | 18 +-- tests/auto/tools/uic/baseline/qfiledialog.ui.h | 54 +++---- .../auto/tools/uic/baseline/qpagesetupwidget.ui.h | 60 ++++---- .../tools/uic/baseline/qprintpropertieswidget.ui.h | 18 +-- .../tools/uic/baseline/qprintsettingsoutput.ui.h | 66 ++++----- tests/auto/tools/uic/baseline/qprintwidget.ui.h | 32 ++--- .../tools/uic/baseline/qsqlconnectiondialog.ui.h | 42 +++--- .../auto/tools/uic/baseline/qtgradientdialog.ui.h | 8 +- .../auto/tools/uic/baseline/qtgradienteditor.ui.h | 158 ++++++++++----------- tests/auto/tools/uic/baseline/qtgradientview.ui.h | 16 +-- .../tools/uic/baseline/qtgradientviewdialog.ui.h | 8 +- .../tools/uic/baseline/qtresourceeditordialog.ui.h | 32 ++--- tests/auto/tools/uic/baseline/qttoolbardialog.ui.h | 36 ++--- tests/auto/tools/uic/baseline/querywidget.ui.h | 36 ++--- tests/auto/tools/uic/baseline/remotecontrol.ui.h | 56 ++++---- .../tools/uic/baseline/saveformastemplate.ui.h | 18 +-- tests/auto/tools/uic/baseline/settings.ui.h | 34 ++--- .../auto/tools/uic/baseline/signalslotdialog.ui.h | 30 ++-- tests/auto/tools/uic/baseline/sslclient.ui.h | 36 ++--- tests/auto/tools/uic/baseline/sslerrors.ui.h | 16 +-- tests/auto/tools/uic/baseline/statistics.ui.h | 42 +++--- .../auto/tools/uic/baseline/stringlisteditor.ui.h | 32 ++--- .../auto/tools/uic/baseline/stylesheeteditor.ui.h | 18 +-- tests/auto/tools/uic/baseline/tabbedbrowser.ui.h | 28 ++-- .../auto/tools/uic/baseline/tablewidgeteditor.ui.h | 66 ++++----- tests/auto/tools/uic/baseline/tetrixwindow.ui.h | 30 ++-- tests/auto/tools/uic/baseline/textfinder.ui.h | 14 +- tests/auto/tools/uic/baseline/topicchooser.ui.h | 20 +-- tests/auto/tools/uic/baseline/translatedialog.ui.h | 34 ++--- .../tools/uic/baseline/translationsettings.ui.h | 18 +-- .../auto/tools/uic/baseline/treewidgeteditor.ui.h | 56 ++++---- tests/auto/tools/uic/baseline/trpreviewtool.ui.h | 38 ++--- tests/auto/tools/uic/baseline/validators.ui.h | 72 +++++----- .../tools/uic/baseline/wateringconfigdialog.ui.h | 46 +++--- 99 files changed, 1500 insertions(+), 1500 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h index b5b2bb82ea..1725fd6ece 100644 --- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h @@ -28,10 +28,10 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(400, 300); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setGeometry(QRect(30, 240, 341, 32)); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h index 3d5eabaace..4b25efe6cf 100644 --- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h @@ -28,10 +28,10 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(400, 300); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setGeometry(QRect(290, 20, 81, 241)); buttonBox->setOrientation(Qt::Vertical); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h index 267646692d..21b34f86e1 100644 --- a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h @@ -26,7 +26,7 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(400, 300); retranslateUi(Dialog); diff --git a/tests/auto/tools/uic/baseline/Main_Window.ui.h b/tests/auto/tools/uic/baseline/Main_Window.ui.h index d6e0ee4a42..d579688a17 100644 --- a/tests/auto/tools/uic/baseline/Main_Window.ui.h +++ b/tests/auto/tools/uic/baseline/Main_Window.ui.h @@ -32,16 +32,16 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(800, 600); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); MainWindow->setMenuBar(menubar); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); MainWindow->setCentralWidget(centralwidget); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); retranslateUi(MainWindow); diff --git a/tests/auto/tools/uic/baseline/Widget.ui.h b/tests/auto/tools/uic/baseline/Widget.ui.h index 5dcca86903..1ccf8e8d52 100644 --- a/tests/auto/tools/uic/baseline/Widget.ui.h +++ b/tests/auto/tools/uic/baseline/Widget.ui.h @@ -34,22 +34,22 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(400, 300); vboxLayout = new QVBoxLayout(Form); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); Alabel = new QLabel(Form); - Alabel->setObjectName(QString::fromUtf8("Alabel")); + Alabel->setObjectName(QStringLiteral("Alabel")); vboxLayout->addWidget(Alabel); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout->addWidget(groupBox); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); vboxLayout->addWidget(pushButton); diff --git a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h index 79262a1ae6..537fa2d8b1 100644 --- a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h +++ b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h @@ -42,31 +42,31 @@ public: void setupUi(QDialog *AddLinkDialog) { if (AddLinkDialog->objectName().isEmpty()) - AddLinkDialog->setObjectName(QString::fromUtf8("AddLinkDialog")); + AddLinkDialog->setObjectName(QStringLiteral("AddLinkDialog")); AddLinkDialog->setSizeGripEnabled(false); AddLinkDialog->setModal(true); verticalLayout = new QVBoxLayout(AddLinkDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(AddLinkDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(0, QFormLayout::LabelRole, label); titleInput = new QLineEdit(AddLinkDialog); - titleInput->setObjectName(QString::fromUtf8("titleInput")); + titleInput->setObjectName(QStringLiteral("titleInput")); titleInput->setMinimumSize(QSize(337, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, titleInput); label_2 = new QLabel(AddLinkDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); formLayout->setWidget(1, QFormLayout::LabelRole, label_2); urlInput = new QLineEdit(AddLinkDialog); - urlInput->setObjectName(QString::fromUtf8("urlInput")); + urlInput->setObjectName(QStringLiteral("urlInput")); formLayout->setWidget(1, QFormLayout::FieldRole, urlInput); @@ -78,14 +78,14 @@ public: verticalLayout->addItem(verticalSpacer); line = new QFrame(AddLinkDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); verticalLayout->addWidget(line); buttonBox = new QDialogButtonBox(AddLinkDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/addtorrentform.ui.h b/tests/auto/tools/uic/baseline/addtorrentform.ui.h index a1cb6c56d4..dfca1699ae 100644 --- a/tests/auto/tools/uic/baseline/addtorrentform.ui.h +++ b/tests/auto/tools/uic/baseline/addtorrentform.ui.h @@ -60,7 +60,7 @@ public: void setupUi(QDialog *AddTorrentFile) { if (AddTorrentFile->objectName().isEmpty()) - AddTorrentFile->setObjectName(QString::fromUtf8("AddTorrentFile")); + AddTorrentFile->setObjectName(QStringLiteral("AddTorrentFile")); AddTorrentFile->resize(464, 385); AddTorrentFile->setSizeGripEnabled(false); AddTorrentFile->setModal(true); @@ -69,57 +69,57 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(AddTorrentFile); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); widget = new QWidget(groupBox); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName(QStringLiteral("widget")); widget->setGeometry(QRect(10, 40, 364, 33)); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label_4 = new QLabel(groupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 6, 0, 1, 1); torrentFile = new QLineEdit(groupBox); - torrentFile->setObjectName(QString::fromUtf8("torrentFile")); + torrentFile->setObjectName(QStringLiteral("torrentFile")); gridLayout->addWidget(torrentFile, 0, 1, 1, 2); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 0, 1, 1); browseTorrents = new QPushButton(groupBox); - browseTorrents->setObjectName(QString::fromUtf8("browseTorrents")); + browseTorrents->setObjectName(QStringLiteral("browseTorrents")); browseTorrents->setDefault(true); gridLayout->addWidget(browseTorrents, 0, 3, 1, 1); label_5 = new QLabel(groupBox); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); gridLayout->addWidget(label_5, 5, 0, 1, 1); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 4, 0, 1, 1); label_6 = new QLabel(groupBox); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); gridLayout->addWidget(label_6, 2, 0, 1, 1); torrentContents = new QTextEdit(groupBox); - torrentContents->setObjectName(QString::fromUtf8("torrentContents")); + torrentContents->setObjectName(QStringLiteral("torrentContents")); torrentContents->setFocusPolicy(Qt::NoFocus); torrentContents->setTabChangesFocus(true); torrentContents->setLineWrapMode(QTextEdit::NoWrap); @@ -128,43 +128,43 @@ public: gridLayout->addWidget(torrentContents, 5, 1, 1, 3); destinationFolder = new QLineEdit(groupBox); - destinationFolder->setObjectName(QString::fromUtf8("destinationFolder")); + destinationFolder->setObjectName(QStringLiteral("destinationFolder")); destinationFolder->setFocusPolicy(Qt::StrongFocus); gridLayout->addWidget(destinationFolder, 6, 1, 1, 2); announceUrl = new QLabel(groupBox); - announceUrl->setObjectName(QString::fromUtf8("announceUrl")); + announceUrl->setObjectName(QStringLiteral("announceUrl")); gridLayout->addWidget(announceUrl, 1, 1, 1, 3); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); browseDestination = new QPushButton(groupBox); - browseDestination->setObjectName(QString::fromUtf8("browseDestination")); + browseDestination->setObjectName(QStringLiteral("browseDestination")); gridLayout->addWidget(browseDestination, 6, 3, 1, 1); label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); gridLayout->addWidget(label_7, 3, 0, 1, 1); commentLabel = new QLabel(groupBox); - commentLabel->setObjectName(QString::fromUtf8("commentLabel")); + commentLabel->setObjectName(QStringLiteral("commentLabel")); gridLayout->addWidget(commentLabel, 3, 1, 1, 3); creatorLabel = new QLabel(groupBox); - creatorLabel->setObjectName(QString::fromUtf8("creatorLabel")); + creatorLabel->setObjectName(QStringLiteral("creatorLabel")); gridLayout->addWidget(creatorLabel, 2, 1, 1, 3); sizeLabel = new QLabel(groupBox); - sizeLabel->setObjectName(QString::fromUtf8("sizeLabel")); + sizeLabel->setObjectName(QStringLiteral("sizeLabel")); gridLayout->addWidget(sizeLabel, 4, 1, 1, 3); @@ -176,19 +176,19 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(AddTorrentFile); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); okButton->setEnabled(false); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(AddTorrentFile); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h index def597f64f..1aef4729f6 100644 --- a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h +++ b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h @@ -41,50 +41,50 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(389, 243); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(false); gridLayout->addWidget(label, 0, 0, 1, 2); label_2 = new QLabel(Dialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 2, 0, 1, 1); userEdit = new QLineEdit(Dialog); - userEdit->setObjectName(QString::fromUtf8("userEdit")); + userEdit->setObjectName(QStringLiteral("userEdit")); gridLayout->addWidget(userEdit, 2, 1, 1, 1); label_3 = new QLabel(Dialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 3, 0, 1, 1); passwordEdit = new QLineEdit(Dialog); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName(QStringLiteral("passwordEdit")); gridLayout->addWidget(passwordEdit, 3, 1, 1, 1); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 5, 0, 1, 2); label_4 = new QLabel(Dialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 1, 0, 1, 1); siteDescription = new QLabel(Dialog); - siteDescription->setObjectName(QString::fromUtf8("siteDescription")); + siteDescription->setObjectName(QStringLiteral("siteDescription")); QFont font; font.setBold(true); font.setWeight(75); diff --git a/tests/auto/tools/uic/baseline/backside.ui.h b/tests/auto/tools/uic/baseline/backside.ui.h index f09c468a34..7e25775c98 100644 --- a/tests/auto/tools/uic/baseline/backside.ui.h +++ b/tests/auto/tools/uic/baseline/backside.ui.h @@ -50,47 +50,47 @@ public: void setupUi(QWidget *BackSide) { if (BackSide->objectName().isEmpty()) - BackSide->setObjectName(QString::fromUtf8("BackSide")); + BackSide->setObjectName(QStringLiteral("BackSide")); BackSide->resize(378, 385); verticalLayout_2 = new QVBoxLayout(BackSide); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); groupBox = new QGroupBox(BackSide); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); groupBox->setFlat(true); groupBox->setCheckable(true); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); hostName = new QLineEdit(groupBox); - hostName->setObjectName(QString::fromUtf8("hostName")); + hostName->setObjectName(QStringLiteral("hostName")); gridLayout->addWidget(hostName, 0, 1, 1, 1); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 0, 1, 1); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 2, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); horizontalSlider = new QSlider(groupBox); - horizontalSlider->setObjectName(QString::fromUtf8("horizontalSlider")); + horizontalSlider->setObjectName(QStringLiteral("horizontalSlider")); horizontalSlider->setValue(42); horizontalSlider->setOrientation(Qt::Horizontal); horizontalLayout->addWidget(horizontalSlider); spinBox = new QSpinBox(groupBox); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName(QStringLiteral("spinBox")); spinBox->setValue(42); horizontalLayout->addWidget(spinBox); @@ -99,7 +99,7 @@ public: gridLayout->addLayout(horizontalLayout, 2, 1, 1, 1); dateTimeEdit = new QDateTimeEdit(groupBox); - dateTimeEdit->setObjectName(QString::fromUtf8("dateTimeEdit")); + dateTimeEdit->setObjectName(QStringLiteral("dateTimeEdit")); gridLayout->addWidget(dateTimeEdit, 1, 1, 1, 1); @@ -107,11 +107,11 @@ public: verticalLayout_2->addWidget(groupBox); groupBox_2 = new QGroupBox(BackSide); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); groupBox_2->setFlat(true); groupBox_2->setCheckable(true); horizontalLayout_2 = new QHBoxLayout(groupBox_2); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); treeWidget = new QTreeWidget(groupBox_2); QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem(treeWidget); QTreeWidgetItem *__qtreewidgetitem1 = new QTreeWidgetItem(__qtreewidgetitem); @@ -124,7 +124,7 @@ public: QTreeWidgetItem *__qtreewidgetitem4 = new QTreeWidgetItem(treeWidget); QTreeWidgetItem *__qtreewidgetitem5 = new QTreeWidgetItem(__qtreewidgetitem4); new QTreeWidgetItem(__qtreewidgetitem5); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); horizontalLayout_2->addWidget(treeWidget); diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h index 302dbc2cb4..b1ba5bee31 100644 --- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h +++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h @@ -95,7 +95,7 @@ public: void setupUi(QDialog *databaseTranslationDialog) { if (databaseTranslationDialog->objectName().isEmpty()) - databaseTranslationDialog->setObjectName(QString::fromUtf8("databaseTranslationDialog")); + databaseTranslationDialog->setObjectName(QStringLiteral("databaseTranslationDialog")); databaseTranslationDialog->resize(425, 370); vboxLayout = new QVBoxLayout(databaseTranslationDialog); #ifndef Q_OS_MAC @@ -104,9 +104,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(databaseTranslationDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); QSizePolicy sizePolicy(static_cast(5), static_cast(4)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -119,15 +119,15 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); ckOnlyUntranslated = new QCheckBox(groupBox); - ckOnlyUntranslated->setObjectName(QString::fromUtf8("ckOnlyUntranslated")); + ckOnlyUntranslated->setObjectName(QStringLiteral("ckOnlyUntranslated")); ckOnlyUntranslated->setChecked(true); vboxLayout1->addWidget(ckOnlyUntranslated); ckMarkFinished = new QCheckBox(groupBox); - ckMarkFinished->setObjectName(QString::fromUtf8("ckMarkFinished")); + ckMarkFinished->setObjectName(QStringLiteral("ckMarkFinished")); ckMarkFinished->setChecked(true); vboxLayout1->addWidget(ckMarkFinished); @@ -136,7 +136,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(databaseTranslationDialog); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); QSizePolicy sizePolicy1(static_cast(5), static_cast(1)); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -149,7 +149,7 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -157,9 +157,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); phrasebookList = new QListView(groupBox_2); - phrasebookList->setObjectName(QString::fromUtf8("phrasebookList")); + phrasebookList->setObjectName(QStringLiteral("phrasebookList")); phrasebookList->setUniformItemSizes(true); hboxLayout->addWidget(phrasebookList); @@ -169,14 +169,14 @@ public: vboxLayout3->setSpacing(6); #endif vboxLayout3->setContentsMargins(0, 0, 0, 0); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); moveUpButton = new QPushButton(groupBox_2); - moveUpButton->setObjectName(QString::fromUtf8("moveUpButton")); + moveUpButton->setObjectName(QStringLiteral("moveUpButton")); vboxLayout3->addWidget(moveUpButton); moveDownButton = new QPushButton(groupBox_2); - moveDownButton->setObjectName(QString::fromUtf8("moveDownButton")); + moveDownButton->setObjectName(QStringLiteral("moveDownButton")); vboxLayout3->addWidget(moveDownButton); @@ -191,7 +191,7 @@ public: vboxLayout2->addLayout(hboxLayout); label = new QLabel(groupBox_2); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(true); vboxLayout2->addWidget(label); @@ -204,18 +204,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout1->addItem(spacerItem1); runButton = new QPushButton(databaseTranslationDialog); - runButton->setObjectName(QString::fromUtf8("runButton")); + runButton->setObjectName(QStringLiteral("runButton")); hboxLayout1->addWidget(runButton); cancelButton = new QPushButton(databaseTranslationDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout1->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h index a178497e26..33c0d19ee2 100644 --- a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h +++ b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h @@ -51,7 +51,7 @@ public: void setupUi(QDialog *BookmarkDialog) { if (BookmarkDialog->objectName().isEmpty()) - BookmarkDialog->setObjectName(QString::fromUtf8("BookmarkDialog")); + BookmarkDialog->setObjectName(QStringLiteral("BookmarkDialog")); BookmarkDialog->resize(450, 135); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); @@ -59,18 +59,18 @@ public: sizePolicy.setHeightForWidth(BookmarkDialog->sizePolicy().hasHeightForWidth()); BookmarkDialog->setSizePolicy(sizePolicy); verticalLayout_3 = new QVBoxLayout(BookmarkDialog); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + verticalLayout_3->setObjectName(QStringLiteral("verticalLayout_3")); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); label = new QLabel(BookmarkDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); verticalLayout_2->addWidget(label); label_2 = new QLabel(BookmarkDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); verticalLayout_2->addWidget(label_2); @@ -78,14 +78,14 @@ public: horizontalLayout->addLayout(verticalLayout_2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); bookmarkEdit = new QLineEdit(BookmarkDialog); - bookmarkEdit->setObjectName(QString::fromUtf8("bookmarkEdit")); + bookmarkEdit->setObjectName(QStringLiteral("bookmarkEdit")); verticalLayout->addWidget(bookmarkEdit); bookmarkFolders = new QComboBox(BookmarkDialog); - bookmarkFolders->setObjectName(QString::fromUtf8("bookmarkFolders")); + bookmarkFolders->setObjectName(QStringLiteral("bookmarkFolders")); verticalLayout->addWidget(bookmarkFolders); @@ -96,15 +96,15 @@ public: verticalLayout_3->addLayout(horizontalLayout); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); toolButton = new QToolButton(BookmarkDialog); - toolButton->setObjectName(QString::fromUtf8("toolButton")); + toolButton->setObjectName(QStringLiteral("toolButton")); toolButton->setMinimumSize(QSize(25, 20)); horizontalLayout_3->addWidget(toolButton); line = new QFrame(BookmarkDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); @@ -114,7 +114,7 @@ public: verticalLayout_3->addLayout(horizontalLayout_3); bookmarkWidget = new BookmarkWidget(BookmarkDialog); - bookmarkWidget->setObjectName(QString::fromUtf8("bookmarkWidget")); + bookmarkWidget->setObjectName(QStringLiteral("bookmarkWidget")); bookmarkWidget->setEnabled(true); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Ignored); sizePolicy1.setHorizontalStretch(0); @@ -125,14 +125,14 @@ public: verticalLayout_3->addWidget(bookmarkWidget); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); newFolderButton = new QPushButton(BookmarkDialog); - newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + newFolderButton->setObjectName(QStringLiteral("newFolderButton")); horizontalLayout_4->addWidget(newFolderButton); buttonBox = new QDialogButtonBox(BookmarkDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/bookwindow.ui.h b/tests/auto/tools/uic/baseline/bookwindow.ui.h index 0463aeb8c9..d27717296c 100644 --- a/tests/auto/tools/uic/baseline/bookwindow.ui.h +++ b/tests/auto/tools/uic/baseline/bookwindow.ui.h @@ -52,10 +52,10 @@ public: void setupUi(QMainWindow *BookWindow) { if (BookWindow->objectName().isEmpty()) - BookWindow->setObjectName(QString::fromUtf8("BookWindow")); + BookWindow->setObjectName(QStringLiteral("BookWindow")); BookWindow->resize(601, 420); centralWidget = new QWidget(BookWindow); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName(QStringLiteral("centralWidget")); vboxLayout = new QVBoxLayout(centralWidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -63,9 +63,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(centralWidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout1 = new QVBoxLayout(groupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -73,57 +73,57 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); bookTable = new QTableView(groupBox); - bookTable->setObjectName(QString::fromUtf8("bookTable")); + bookTable->setObjectName(QStringLiteral("bookTable")); bookTable->setSelectionBehavior(QAbstractItemView::SelectRows); vboxLayout1->addWidget(bookTable); groupBox_2 = new QGroupBox(groupBox); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); formLayout = new QFormLayout(groupBox_2); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); formLayout->setWidget(0, QFormLayout::LabelRole, label_5); titleEdit = new QLineEdit(groupBox_2); - titleEdit->setObjectName(QString::fromUtf8("titleEdit")); + titleEdit->setObjectName(QStringLiteral("titleEdit")); titleEdit->setEnabled(true); formLayout->setWidget(0, QFormLayout::FieldRole, titleEdit); label_2_2_2_2 = new QLabel(groupBox_2); - label_2_2_2_2->setObjectName(QString::fromUtf8("label_2_2_2_2")); + label_2_2_2_2->setObjectName(QStringLiteral("label_2_2_2_2")); formLayout->setWidget(1, QFormLayout::LabelRole, label_2_2_2_2); authorEdit = new QComboBox(groupBox_2); - authorEdit->setObjectName(QString::fromUtf8("authorEdit")); + authorEdit->setObjectName(QStringLiteral("authorEdit")); authorEdit->setEnabled(true); formLayout->setWidget(1, QFormLayout::FieldRole, authorEdit); label_3 = new QLabel(groupBox_2); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); formLayout->setWidget(2, QFormLayout::LabelRole, label_3); genreEdit = new QComboBox(groupBox_2); - genreEdit->setObjectName(QString::fromUtf8("genreEdit")); + genreEdit->setObjectName(QStringLiteral("genreEdit")); genreEdit->setEnabled(true); formLayout->setWidget(2, QFormLayout::FieldRole, genreEdit); label_4 = new QLabel(groupBox_2); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); formLayout->setWidget(3, QFormLayout::LabelRole, label_4); yearEdit = new QSpinBox(groupBox_2); - yearEdit->setObjectName(QString::fromUtf8("yearEdit")); + yearEdit->setObjectName(QStringLiteral("yearEdit")); yearEdit->setEnabled(true); yearEdit->setMaximum(2100); yearEdit->setMinimum(-1000); @@ -131,12 +131,12 @@ public: formLayout->setWidget(3, QFormLayout::FieldRole, yearEdit); label = new QLabel(groupBox_2); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(4, QFormLayout::LabelRole, label); ratingEdit = new QSpinBox(groupBox_2); - ratingEdit->setObjectName(QString::fromUtf8("ratingEdit")); + ratingEdit->setObjectName(QStringLiteral("ratingEdit")); ratingEdit->setMaximum(5); formLayout->setWidget(4, QFormLayout::FieldRole, ratingEdit); diff --git a/tests/auto/tools/uic/baseline/browserwidget.ui.h b/tests/auto/tools/uic/baseline/browserwidget.ui.h index 7214898a4f..9d7a648b21 100644 --- a/tests/auto/tools/uic/baseline/browserwidget.ui.h +++ b/tests/auto/tools/uic/baseline/browserwidget.ui.h @@ -48,22 +48,22 @@ public: void setupUi(QWidget *Browser) { if (Browser->objectName().isEmpty()) - Browser->setObjectName(QString::fromUtf8("Browser")); + Browser->setObjectName(QStringLiteral("Browser")); Browser->resize(765, 515); insertRowAction = new QAction(Browser); - insertRowAction->setObjectName(QString::fromUtf8("insertRowAction")); + insertRowAction->setObjectName(QStringLiteral("insertRowAction")); insertRowAction->setEnabled(false); deleteRowAction = new QAction(Browser); - deleteRowAction->setObjectName(QString::fromUtf8("deleteRowAction")); + deleteRowAction->setObjectName(QStringLiteral("deleteRowAction")); deleteRowAction->setEnabled(false); vboxLayout = new QVBoxLayout(Browser); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); splitter_2 = new QSplitter(Browser); - splitter_2->setObjectName(QString::fromUtf8("splitter_2")); + splitter_2->setObjectName(QStringLiteral("splitter_2")); QSizePolicy sizePolicy(static_cast(7), static_cast(7)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -71,7 +71,7 @@ public: splitter_2->setSizePolicy(sizePolicy); splitter_2->setOrientation(Qt::Horizontal); connectionWidget = new ConnectionWidget(splitter_2); - connectionWidget->setObjectName(QString::fromUtf8("connectionWidget")); + connectionWidget->setObjectName(QStringLiteral("connectionWidget")); QSizePolicy sizePolicy1(static_cast(13), static_cast(7)); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); @@ -79,7 +79,7 @@ public: connectionWidget->setSizePolicy(sizePolicy1); splitter_2->addWidget(connectionWidget); table = new QTableView(splitter_2); - table->setObjectName(QString::fromUtf8("table")); + table->setObjectName(QStringLiteral("table")); QSizePolicy sizePolicy2(static_cast(7), static_cast(7)); sizePolicy2.setHorizontalStretch(2); sizePolicy2.setVerticalStretch(0); @@ -92,7 +92,7 @@ public: vboxLayout->addWidget(splitter_2); groupBox = new QGroupBox(Browser); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); QSizePolicy sizePolicy3(static_cast(5), static_cast(3)); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); @@ -106,9 +106,9 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); sqlEdit = new QTextEdit(groupBox); - sqlEdit->setObjectName(QString::fromUtf8("sqlEdit")); + sqlEdit->setObjectName(QStringLiteral("sqlEdit")); QSizePolicy sizePolicy4(static_cast(7), static_cast(3)); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); @@ -124,18 +124,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); clearButton = new QPushButton(groupBox); - clearButton->setObjectName(QString::fromUtf8("clearButton")); + clearButton->setObjectName(QStringLiteral("clearButton")); hboxLayout->addWidget(clearButton); submitButton = new QPushButton(groupBox); - submitButton->setObjectName(QString::fromUtf8("submitButton")); + submitButton->setObjectName(QStringLiteral("submitButton")); hboxLayout->addWidget(submitButton); diff --git a/tests/auto/tools/uic/baseline/calculator.ui.h b/tests/auto/tools/uic/baseline/calculator.ui.h index 3d69c9fdfd..8a33fcbbd9 100644 --- a/tests/auto/tools/uic/baseline/calculator.ui.h +++ b/tests/auto/tools/uic/baseline/calculator.ui.h @@ -56,7 +56,7 @@ public: void setupUi(QWidget *Calculator) { if (Calculator->objectName().isEmpty()) - Calculator->setObjectName(QString::fromUtf8("Calculator")); + Calculator->setObjectName(QStringLiteral("Calculator")); Calculator->resize(314, 301); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); @@ -66,88 +66,88 @@ public: Calculator->setMinimumSize(QSize(314, 301)); Calculator->setMaximumSize(QSize(314, 301)); backspaceButton = new QToolButton(Calculator); - backspaceButton->setObjectName(QString::fromUtf8("backspaceButton")); + backspaceButton->setObjectName(QStringLiteral("backspaceButton")); backspaceButton->setGeometry(QRect(10, 50, 91, 41)); clearButton = new QToolButton(Calculator); - clearButton->setObjectName(QString::fromUtf8("clearButton")); + clearButton->setObjectName(QStringLiteral("clearButton")); clearButton->setGeometry(QRect(110, 50, 91, 41)); clearAllButton = new QToolButton(Calculator); - clearAllButton->setObjectName(QString::fromUtf8("clearAllButton")); + clearAllButton->setObjectName(QStringLiteral("clearAllButton")); clearAllButton->setGeometry(QRect(210, 50, 91, 41)); clearMemoryButton = new QToolButton(Calculator); - clearMemoryButton->setObjectName(QString::fromUtf8("clearMemoryButton")); + clearMemoryButton->setObjectName(QStringLiteral("clearMemoryButton")); clearMemoryButton->setGeometry(QRect(10, 100, 41, 41)); readMemoryButton = new QToolButton(Calculator); - readMemoryButton->setObjectName(QString::fromUtf8("readMemoryButton")); + readMemoryButton->setObjectName(QStringLiteral("readMemoryButton")); readMemoryButton->setGeometry(QRect(10, 150, 41, 41)); setMemoryButton = new QToolButton(Calculator); - setMemoryButton->setObjectName(QString::fromUtf8("setMemoryButton")); + setMemoryButton->setObjectName(QStringLiteral("setMemoryButton")); setMemoryButton->setGeometry(QRect(10, 200, 41, 41)); addToMemoryButton = new QToolButton(Calculator); - addToMemoryButton->setObjectName(QString::fromUtf8("addToMemoryButton")); + addToMemoryButton->setObjectName(QStringLiteral("addToMemoryButton")); addToMemoryButton->setGeometry(QRect(10, 250, 41, 41)); sevenButton = new QToolButton(Calculator); - sevenButton->setObjectName(QString::fromUtf8("sevenButton")); + sevenButton->setObjectName(QStringLiteral("sevenButton")); sevenButton->setGeometry(QRect(60, 100, 41, 41)); eightButton = new QToolButton(Calculator); - eightButton->setObjectName(QString::fromUtf8("eightButton")); + eightButton->setObjectName(QStringLiteral("eightButton")); eightButton->setGeometry(QRect(110, 100, 41, 41)); nineButton = new QToolButton(Calculator); - nineButton->setObjectName(QString::fromUtf8("nineButton")); + nineButton->setObjectName(QStringLiteral("nineButton")); nineButton->setGeometry(QRect(160, 100, 41, 41)); fourButton = new QToolButton(Calculator); - fourButton->setObjectName(QString::fromUtf8("fourButton")); + fourButton->setObjectName(QStringLiteral("fourButton")); fourButton->setGeometry(QRect(60, 150, 41, 41)); fiveButton = new QToolButton(Calculator); - fiveButton->setObjectName(QString::fromUtf8("fiveButton")); + fiveButton->setObjectName(QStringLiteral("fiveButton")); fiveButton->setGeometry(QRect(110, 150, 41, 41)); sixButton = new QToolButton(Calculator); - sixButton->setObjectName(QString::fromUtf8("sixButton")); + sixButton->setObjectName(QStringLiteral("sixButton")); sixButton->setGeometry(QRect(160, 150, 41, 41)); oneButton = new QToolButton(Calculator); - oneButton->setObjectName(QString::fromUtf8("oneButton")); + oneButton->setObjectName(QStringLiteral("oneButton")); oneButton->setGeometry(QRect(60, 200, 41, 41)); twoButton = new QToolButton(Calculator); - twoButton->setObjectName(QString::fromUtf8("twoButton")); + twoButton->setObjectName(QStringLiteral("twoButton")); twoButton->setGeometry(QRect(110, 200, 41, 41)); threeButton = new QToolButton(Calculator); - threeButton->setObjectName(QString::fromUtf8("threeButton")); + threeButton->setObjectName(QStringLiteral("threeButton")); threeButton->setGeometry(QRect(160, 200, 41, 41)); zeroButton = new QToolButton(Calculator); - zeroButton->setObjectName(QString::fromUtf8("zeroButton")); + zeroButton->setObjectName(QStringLiteral("zeroButton")); zeroButton->setGeometry(QRect(60, 250, 41, 41)); pointButton = new QToolButton(Calculator); - pointButton->setObjectName(QString::fromUtf8("pointButton")); + pointButton->setObjectName(QStringLiteral("pointButton")); pointButton->setGeometry(QRect(110, 250, 41, 41)); changeSignButton = new QToolButton(Calculator); - changeSignButton->setObjectName(QString::fromUtf8("changeSignButton")); + changeSignButton->setObjectName(QStringLiteral("changeSignButton")); changeSignButton->setGeometry(QRect(160, 250, 41, 41)); plusButton = new QToolButton(Calculator); - plusButton->setObjectName(QString::fromUtf8("plusButton")); + plusButton->setObjectName(QStringLiteral("plusButton")); plusButton->setGeometry(QRect(210, 250, 41, 41)); divisionButton = new QToolButton(Calculator); - divisionButton->setObjectName(QString::fromUtf8("divisionButton")); + divisionButton->setObjectName(QStringLiteral("divisionButton")); divisionButton->setGeometry(QRect(210, 100, 41, 41)); timesButton = new QToolButton(Calculator); - timesButton->setObjectName(QString::fromUtf8("timesButton")); + timesButton->setObjectName(QStringLiteral("timesButton")); timesButton->setGeometry(QRect(210, 150, 41, 41)); minusButton = new QToolButton(Calculator); - minusButton->setObjectName(QString::fromUtf8("minusButton")); + minusButton->setObjectName(QStringLiteral("minusButton")); minusButton->setGeometry(QRect(210, 200, 41, 41)); squareRootButton = new QToolButton(Calculator); - squareRootButton->setObjectName(QString::fromUtf8("squareRootButton")); + squareRootButton->setObjectName(QStringLiteral("squareRootButton")); squareRootButton->setGeometry(QRect(260, 100, 41, 41)); powerButton = new QToolButton(Calculator); - powerButton->setObjectName(QString::fromUtf8("powerButton")); + powerButton->setObjectName(QStringLiteral("powerButton")); powerButton->setGeometry(QRect(260, 150, 41, 41)); reciprocalButton = new QToolButton(Calculator); - reciprocalButton->setObjectName(QString::fromUtf8("reciprocalButton")); + reciprocalButton->setObjectName(QStringLiteral("reciprocalButton")); reciprocalButton->setGeometry(QRect(260, 200, 41, 41)); equalButton = new QToolButton(Calculator); - equalButton->setObjectName(QString::fromUtf8("equalButton")); + equalButton->setObjectName(QStringLiteral("equalButton")); equalButton->setGeometry(QRect(260, 250, 41, 41)); display = new QLineEdit(Calculator); - display->setObjectName(QString::fromUtf8("display")); + display->setObjectName(QStringLiteral("display")); display->setGeometry(QRect(10, 10, 291, 31)); display->setMaxLength(15); display->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); diff --git a/tests/auto/tools/uic/baseline/calculatorform.ui.h b/tests/auto/tools/uic/baseline/calculatorform.ui.h index b38a940448..cbc62367e0 100644 --- a/tests/auto/tools/uic/baseline/calculatorform.ui.h +++ b/tests/auto/tools/uic/baseline/calculatorform.ui.h @@ -47,7 +47,7 @@ public: void setupUi(QWidget *CalculatorForm) { if (CalculatorForm->objectName().isEmpty()) - CalculatorForm->setObjectName(QString::fromUtf8("CalculatorForm")); + CalculatorForm->setObjectName(QStringLiteral("CalculatorForm")); CalculatorForm->resize(276, 98); QSizePolicy sizePolicy(static_cast(5), static_cast(5)); sizePolicy.setHorizontalStretch(0); @@ -61,30 +61,30 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setObjectName(QString::fromUtf8("")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); + gridLayout->setObjectName(QStringLiteral("")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(1, 1, 1, 1); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setObjectName(QString::fromUtf8("")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("")); label = new QLabel(CalculatorForm); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setGeometry(QRect(1, 1, 45, 19)); vboxLayout->addWidget(label); inputSpinBox1 = new QSpinBox(CalculatorForm); - inputSpinBox1->setObjectName(QString::fromUtf8("inputSpinBox1")); + inputSpinBox1->setObjectName(QStringLiteral("inputSpinBox1")); inputSpinBox1->setGeometry(QRect(1, 26, 45, 25)); inputSpinBox1->setMouseTracking(true); @@ -94,7 +94,7 @@ public: hboxLayout->addLayout(vboxLayout); label_3 = new QLabel(CalculatorForm); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); label_3->setGeometry(QRect(54, 1, 7, 52)); label_3->setAlignment(Qt::AlignCenter); @@ -105,16 +105,16 @@ public: vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(1, 1, 1, 1); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); - vboxLayout1->setObjectName(QString::fromUtf8("")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("")); label_2 = new QLabel(CalculatorForm); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); label_2->setGeometry(QRect(1, 1, 45, 19)); vboxLayout1->addWidget(label_2); inputSpinBox2 = new QSpinBox(CalculatorForm); - inputSpinBox2->setObjectName(QString::fromUtf8("inputSpinBox2")); + inputSpinBox2->setObjectName(QStringLiteral("inputSpinBox2")); inputSpinBox2->setGeometry(QRect(1, 26, 45, 25)); inputSpinBox2->setMouseTracking(true); @@ -124,7 +124,7 @@ public: hboxLayout->addLayout(vboxLayout1); label_3_2 = new QLabel(CalculatorForm); - label_3_2->setObjectName(QString::fromUtf8("label_3_2")); + label_3_2->setObjectName(QStringLiteral("label_3_2")); label_3_2->setGeometry(QRect(120, 1, 7, 52)); label_3_2->setAlignment(Qt::AlignCenter); @@ -135,16 +135,16 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(1, 1, 1, 1); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); - vboxLayout2->setObjectName(QString::fromUtf8("")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("")); label_2_2_2 = new QLabel(CalculatorForm); - label_2_2_2->setObjectName(QString::fromUtf8("label_2_2_2")); + label_2_2_2->setObjectName(QStringLiteral("label_2_2_2")); label_2_2_2->setGeometry(QRect(1, 1, 37, 17)); vboxLayout2->addWidget(label_2_2_2); outputWidget = new QLabel(CalculatorForm); - outputWidget->setObjectName(QString::fromUtf8("outputWidget")); + outputWidget->setObjectName(QStringLiteral("outputWidget")); outputWidget->setGeometry(QRect(1, 24, 37, 27)); outputWidget->setFrameShape(QFrame::Box); outputWidget->setFrameShadow(QFrame::Sunken); diff --git a/tests/auto/tools/uic/baseline/certificateinfo.ui.h b/tests/auto/tools/uic/baseline/certificateinfo.ui.h index e047aeddc0..8ea1ebebf7 100644 --- a/tests/auto/tools/uic/baseline/certificateinfo.ui.h +++ b/tests/auto/tools/uic/baseline/certificateinfo.ui.h @@ -42,16 +42,16 @@ public: void setupUi(QDialog *CertificateInfo) { if (CertificateInfo->objectName().isEmpty()) - CertificateInfo->setObjectName(QString::fromUtf8("CertificateInfo")); + CertificateInfo->setObjectName(QStringLiteral("CertificateInfo")); CertificateInfo->resize(400, 397); vboxLayout = new QVBoxLayout(CertificateInfo); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(CertificateInfo); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); hboxLayout = new QHBoxLayout(groupBox); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); certificationPathView = new QListWidget(groupBox); - certificationPathView->setObjectName(QString::fromUtf8("certificationPathView")); + certificationPathView->setObjectName(QStringLiteral("certificationPathView")); hboxLayout->addWidget(certificationPathView); @@ -59,11 +59,11 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(CertificateInfo); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); hboxLayout1 = new QHBoxLayout(groupBox_2); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); certificateInfoView = new QListWidget(groupBox_2); - certificateInfoView->setObjectName(QString::fromUtf8("certificateInfoView")); + certificateInfoView->setObjectName(QStringLiteral("certificateInfoView")); hboxLayout1->addWidget(certificateInfoView); @@ -71,13 +71,13 @@ public: vboxLayout->addWidget(groupBox_2); hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout2->addItem(spacerItem); buttonBox = new QDialogButtonBox(CertificateInfo); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Close); hboxLayout2->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/chatdialog.ui.h b/tests/auto/tools/uic/baseline/chatdialog.ui.h index 216e627e76..473d20de70 100644 --- a/tests/auto/tools/uic/baseline/chatdialog.ui.h +++ b/tests/auto/tools/uic/baseline/chatdialog.ui.h @@ -39,7 +39,7 @@ public: void setupUi(QDialog *ChatDialog) { if (ChatDialog->objectName().isEmpty()) - ChatDialog->setObjectName(QString::fromUtf8("ChatDialog")); + ChatDialog->setObjectName(QStringLiteral("ChatDialog")); ChatDialog->resize(513, 349); vboxLayout = new QVBoxLayout(ChatDialog); #ifndef Q_OS_MAC @@ -48,7 +48,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -56,16 +56,16 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); textEdit = new QTextEdit(ChatDialog); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName(QStringLiteral("textEdit")); textEdit->setFocusPolicy(Qt::NoFocus); textEdit->setReadOnly(true); hboxLayout->addWidget(textEdit); listWidget = new QListWidget(ChatDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); listWidget->setMaximumSize(QSize(180, 16777215)); listWidget->setFocusPolicy(Qt::NoFocus); @@ -79,14 +79,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(ChatDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); lineEdit = new QLineEdit(ChatDialog); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName(QStringLiteral("lineEdit")); hboxLayout1->addWidget(lineEdit); diff --git a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h index 1001e85931..c077dd7501 100644 --- a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h @@ -51,16 +51,16 @@ public: void setupUi(QMainWindow *ChatMainWindow) { if (ChatMainWindow->objectName().isEmpty()) - ChatMainWindow->setObjectName(QString::fromUtf8("ChatMainWindow")); + ChatMainWindow->setObjectName(QStringLiteral("ChatMainWindow")); ChatMainWindow->resize(800, 600); actionQuit = new QAction(ChatMainWindow); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName(QStringLiteral("actionQuit")); actionAboutQt = new QAction(ChatMainWindow); - actionAboutQt->setObjectName(QString::fromUtf8("actionAboutQt")); + actionAboutQt->setObjectName(QStringLiteral("actionAboutQt")); actionChangeNickname = new QAction(ChatMainWindow); - actionChangeNickname->setObjectName(QString::fromUtf8("actionChangeNickname")); + actionChangeNickname->setObjectName(QStringLiteral("actionChangeNickname")); centralwidget = new QWidget(ChatMainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); hboxLayout = new QHBoxLayout(centralwidget); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -68,7 +68,7 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -76,9 +76,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); chatHistory = new QTextBrowser(centralwidget); - chatHistory->setObjectName(QString::fromUtf8("chatHistory")); + chatHistory->setObjectName(QStringLiteral("chatHistory")); chatHistory->setAcceptDrops(false); chatHistory->setAcceptRichText(true); @@ -89,19 +89,19 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(centralwidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); messageLineEdit = new QLineEdit(centralwidget); - messageLineEdit->setObjectName(QString::fromUtf8("messageLineEdit")); + messageLineEdit->setObjectName(QStringLiteral("messageLineEdit")); hboxLayout1->addWidget(messageLineEdit); sendButton = new QPushButton(centralwidget); - sendButton->setObjectName(QString::fromUtf8("sendButton")); + sendButton->setObjectName(QStringLiteral("sendButton")); QSizePolicy sizePolicy(static_cast(1), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -118,15 +118,15 @@ public: ChatMainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(ChatMainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 800, 31)); menuQuit = new QMenu(menubar); - menuQuit->setObjectName(QString::fromUtf8("menuQuit")); + menuQuit->setObjectName(QStringLiteral("menuQuit")); menuFile = new QMenu(menubar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); ChatMainWindow->setMenuBar(menubar); statusbar = new QStatusBar(ChatMainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); ChatMainWindow->setStatusBar(statusbar); #ifndef QT_NO_SHORTCUT label->setBuddy(messageLineEdit); diff --git a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h index ee69d36476..e0de690715 100644 --- a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h +++ b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h @@ -41,7 +41,7 @@ public: void setupUi(QDialog *NicknameDialog) { if (NicknameDialog->objectName().isEmpty()) - NicknameDialog->setObjectName(QString::fromUtf8("NicknameDialog")); + NicknameDialog->setObjectName(QStringLiteral("NicknameDialog")); NicknameDialog->resize(396, 105); QSizePolicy sizePolicy(static_cast(1), static_cast(1)); sizePolicy.setHorizontalStretch(0); @@ -55,7 +55,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout1 = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -63,16 +63,16 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); label = new QLabel(NicknameDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); label->setSizePolicy(sizePolicy); vboxLayout1->addWidget(label); nickname = new QLineEdit(NicknameDialog); - nickname->setObjectName(QString::fromUtf8("nickname")); + nickname->setObjectName(QStringLiteral("nickname")); vboxLayout1->addWidget(nickname); @@ -84,18 +84,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(NicknameDialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(NicknameDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h index 5606978f09..cf21fd8c6f 100644 --- a/tests/auto/tools/uic/baseline/config.ui.h +++ b/tests/auto/tools/uic/baseline/config.ui.h @@ -135,20 +135,20 @@ public: void setupUi(QDialog *Config) { if (Config->objectName().isEmpty()) - Config->setObjectName(QString::fromUtf8("Config")); + Config->setObjectName(QStringLiteral("Config")); Config->resize(600, 650); Config->setSizeGripEnabled(true); vboxLayout = new QVBoxLayout(Config); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(8, 8, 8, 8); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(0, 0, 0, 0); ButtonGroup1 = new QGroupBox(Config); - ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1")); + ButtonGroup1->setObjectName(QStringLiteral("ButtonGroup1")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -157,44 +157,44 @@ public: vboxLayout1 = new QVBoxLayout(ButtonGroup1); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(11, 11, 11, 11); size_176_220 = new QRadioButton(ButtonGroup1); - size_176_220->setObjectName(QString::fromUtf8("size_176_220")); + size_176_220->setObjectName(QStringLiteral("size_176_220")); vboxLayout1->addWidget(size_176_220); size_240_320 = new QRadioButton(ButtonGroup1); - size_240_320->setObjectName(QString::fromUtf8("size_240_320")); + size_240_320->setObjectName(QStringLiteral("size_240_320")); vboxLayout1->addWidget(size_240_320); size_320_240 = new QRadioButton(ButtonGroup1); - size_320_240->setObjectName(QString::fromUtf8("size_320_240")); + size_320_240->setObjectName(QStringLiteral("size_320_240")); vboxLayout1->addWidget(size_320_240); size_640_480 = new QRadioButton(ButtonGroup1); - size_640_480->setObjectName(QString::fromUtf8("size_640_480")); + size_640_480->setObjectName(QStringLiteral("size_640_480")); vboxLayout1->addWidget(size_640_480); size_800_600 = new QRadioButton(ButtonGroup1); - size_800_600->setObjectName(QString::fromUtf8("size_800_600")); + size_800_600->setObjectName(QStringLiteral("size_800_600")); vboxLayout1->addWidget(size_800_600); size_1024_768 = new QRadioButton(ButtonGroup1); - size_1024_768->setObjectName(QString::fromUtf8("size_1024_768")); + size_1024_768->setObjectName(QStringLiteral("size_1024_768")); vboxLayout1->addWidget(size_1024_768); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); hboxLayout1->setContentsMargins(0, 0, 0, 0); size_custom = new QRadioButton(ButtonGroup1); - size_custom->setObjectName(QString::fromUtf8("size_custom")); + size_custom->setObjectName(QStringLiteral("size_custom")); QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -204,7 +204,7 @@ public: hboxLayout1->addWidget(size_custom); size_width = new QSpinBox(ButtonGroup1); - size_width->setObjectName(QString::fromUtf8("size_width")); + size_width->setObjectName(QStringLiteral("size_width")); size_width->setMinimum(1); size_width->setMaximum(1280); size_width->setSingleStep(16); @@ -213,7 +213,7 @@ public: hboxLayout1->addWidget(size_width); size_height = new QSpinBox(ButtonGroup1); - size_height->setObjectName(QString::fromUtf8("size_height")); + size_height->setObjectName(QStringLiteral("size_height")); size_height->setMinimum(1); size_height->setMaximum(1024); size_height->setSingleStep(16); @@ -228,59 +228,59 @@ public: hboxLayout->addWidget(ButtonGroup1); ButtonGroup2 = new QGroupBox(Config); - ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2")); + ButtonGroup2->setObjectName(QStringLiteral("ButtonGroup2")); vboxLayout2 = new QVBoxLayout(ButtonGroup2); vboxLayout2->setSpacing(6); vboxLayout2->setContentsMargins(11, 11, 11, 11); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(11, 11, 11, 11); depth_1 = new QRadioButton(ButtonGroup2); - depth_1->setObjectName(QString::fromUtf8("depth_1")); + depth_1->setObjectName(QStringLiteral("depth_1")); vboxLayout2->addWidget(depth_1); depth_4gray = new QRadioButton(ButtonGroup2); - depth_4gray->setObjectName(QString::fromUtf8("depth_4gray")); + depth_4gray->setObjectName(QStringLiteral("depth_4gray")); vboxLayout2->addWidget(depth_4gray); depth_8 = new QRadioButton(ButtonGroup2); - depth_8->setObjectName(QString::fromUtf8("depth_8")); + depth_8->setObjectName(QStringLiteral("depth_8")); vboxLayout2->addWidget(depth_8); depth_12 = new QRadioButton(ButtonGroup2); - depth_12->setObjectName(QString::fromUtf8("depth_12")); + depth_12->setObjectName(QStringLiteral("depth_12")); vboxLayout2->addWidget(depth_12); depth_15 = new QRadioButton(ButtonGroup2); - depth_15->setObjectName(QString::fromUtf8("depth_15")); + depth_15->setObjectName(QStringLiteral("depth_15")); vboxLayout2->addWidget(depth_15); depth_16 = new QRadioButton(ButtonGroup2); - depth_16->setObjectName(QString::fromUtf8("depth_16")); + depth_16->setObjectName(QStringLiteral("depth_16")); vboxLayout2->addWidget(depth_16); depth_18 = new QRadioButton(ButtonGroup2); - depth_18->setObjectName(QString::fromUtf8("depth_18")); + depth_18->setObjectName(QStringLiteral("depth_18")); vboxLayout2->addWidget(depth_18); depth_24 = new QRadioButton(ButtonGroup2); - depth_24->setObjectName(QString::fromUtf8("depth_24")); + depth_24->setObjectName(QStringLiteral("depth_24")); vboxLayout2->addWidget(depth_24); depth_32 = new QRadioButton(ButtonGroup2); - depth_32->setObjectName(QString::fromUtf8("depth_32")); + depth_32->setObjectName(QStringLiteral("depth_32")); vboxLayout2->addWidget(depth_32); depth_32_argb = new QRadioButton(ButtonGroup2); - depth_32_argb->setObjectName(QString::fromUtf8("depth_32_argb")); + depth_32_argb->setObjectName(QStringLiteral("depth_32_argb")); vboxLayout2->addWidget(depth_32_argb); @@ -292,15 +292,15 @@ public: hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(6); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); hboxLayout2->setContentsMargins(0, 0, 0, 0); TextLabel1_3 = new QLabel(Config); - TextLabel1_3->setObjectName(QString::fromUtf8("TextLabel1_3")); + TextLabel1_3->setObjectName(QStringLiteral("TextLabel1_3")); hboxLayout2->addWidget(TextLabel1_3); skin = new QComboBox(Config); - skin->setObjectName(QString::fromUtf8("skin")); + skin->setObjectName(QStringLiteral("skin")); QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -313,12 +313,12 @@ public: vboxLayout->addLayout(hboxLayout2); touchScreen = new QCheckBox(Config); - touchScreen->setObjectName(QString::fromUtf8("touchScreen")); + touchScreen->setObjectName(QStringLiteral("touchScreen")); vboxLayout->addWidget(touchScreen); lcdScreen = new QCheckBox(Config); - lcdScreen->setObjectName(QString::fromUtf8("lcdScreen")); + lcdScreen->setObjectName(QStringLiteral("lcdScreen")); vboxLayout->addWidget(lcdScreen); @@ -327,7 +327,7 @@ public: vboxLayout->addItem(spacerItem); TextLabel1 = new QLabel(Config); - TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); + TextLabel1->setObjectName(QStringLiteral("TextLabel1")); sizePolicy.setHeightForWidth(TextLabel1->sizePolicy().hasHeightForWidth()); TextLabel1->setSizePolicy(sizePolicy); TextLabel1->setWordWrap(true); @@ -335,21 +335,21 @@ public: vboxLayout->addWidget(TextLabel1); GroupBox1 = new QGroupBox(Config); - GroupBox1->setObjectName(QString::fromUtf8("GroupBox1")); + GroupBox1->setObjectName(QStringLiteral("GroupBox1")); gridLayout = new QGridLayout(GroupBox1); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); gridLayout->setHorizontalSpacing(6); gridLayout->setVerticalSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); TextLabel3 = new QLabel(GroupBox1); - TextLabel3->setObjectName(QString::fromUtf8("TextLabel3")); + TextLabel3->setObjectName(QStringLiteral("TextLabel3")); gridLayout->addWidget(TextLabel3, 6, 0, 1, 1); bslider = new QSlider(GroupBox1); - bslider->setObjectName(QString::fromUtf8("bslider")); + bslider->setObjectName(QStringLiteral("bslider")); QPalette palette; QBrush brush(QColor(128, 128, 128, 255)); brush.setStyle(Qt::SolidPattern); @@ -432,17 +432,17 @@ public: gridLayout->addWidget(bslider, 6, 1, 1, 1); blabel = new QLabel(GroupBox1); - blabel->setObjectName(QString::fromUtf8("blabel")); + blabel->setObjectName(QStringLiteral("blabel")); gridLayout->addWidget(blabel, 6, 2, 1, 1); TextLabel2 = new QLabel(GroupBox1); - TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); + TextLabel2->setObjectName(QStringLiteral("TextLabel2")); gridLayout->addWidget(TextLabel2, 4, 0, 1, 1); gslider = new QSlider(GroupBox1); - gslider->setObjectName(QString::fromUtf8("gslider")); + gslider->setObjectName(QStringLiteral("gslider")); QPalette palette1; palette1.setBrush(QPalette::Active, QPalette::WindowText, brush); QBrush brush11(QColor(0, 255, 0, 255)); @@ -513,22 +513,22 @@ public: gridLayout->addWidget(gslider, 4, 1, 1, 1); glabel = new QLabel(GroupBox1); - glabel->setObjectName(QString::fromUtf8("glabel")); + glabel->setObjectName(QStringLiteral("glabel")); gridLayout->addWidget(glabel, 4, 2, 1, 1); TextLabel7 = new QLabel(GroupBox1); - TextLabel7->setObjectName(QString::fromUtf8("TextLabel7")); + TextLabel7->setObjectName(QStringLiteral("TextLabel7")); gridLayout->addWidget(TextLabel7, 0, 0, 1, 1); TextLabel8 = new QLabel(GroupBox1); - TextLabel8->setObjectName(QString::fromUtf8("TextLabel8")); + TextLabel8->setObjectName(QStringLiteral("TextLabel8")); gridLayout->addWidget(TextLabel8, 0, 2, 1, 1); gammaslider = new QSlider(GroupBox1); - gammaslider->setObjectName(QString::fromUtf8("gammaslider")); + gammaslider->setObjectName(QStringLiteral("gammaslider")); QPalette palette2; palette2.setBrush(QPalette::Active, QPalette::WindowText, brush); palette2.setBrush(QPalette::Active, QPalette::Button, brush7); @@ -593,17 +593,17 @@ public: gridLayout->addWidget(gammaslider, 0, 1, 1, 1); TextLabel1_2 = new QLabel(GroupBox1); - TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2")); + TextLabel1_2->setObjectName(QStringLiteral("TextLabel1_2")); gridLayout->addWidget(TextLabel1_2, 2, 0, 1, 1); rlabel = new QLabel(GroupBox1); - rlabel->setObjectName(QString::fromUtf8("rlabel")); + rlabel->setObjectName(QStringLiteral("rlabel")); gridLayout->addWidget(rlabel, 2, 2, 1, 1); rslider = new QSlider(GroupBox1); - rslider->setObjectName(QString::fromUtf8("rslider")); + rslider->setObjectName(QStringLiteral("rslider")); QPalette palette3; palette3.setBrush(QPalette::Active, QPalette::WindowText, brush); QBrush brush18(QColor(255, 0, 0, 255)); @@ -674,12 +674,12 @@ public: gridLayout->addWidget(rslider, 2, 1, 1, 1); PushButton3 = new QPushButton(GroupBox1); - PushButton3->setObjectName(QString::fromUtf8("PushButton3")); + PushButton3->setObjectName(QStringLiteral("PushButton3")); gridLayout->addWidget(PushButton3, 8, 0, 1, 3); MyCustomWidget1 = new GammaView(GroupBox1); - MyCustomWidget1->setObjectName(QString::fromUtf8("MyCustomWidget1")); + MyCustomWidget1->setObjectName(QStringLiteral("MyCustomWidget1")); gridLayout->addWidget(MyCustomWidget1, 0, 3, 9, 1); @@ -688,21 +688,21 @@ public: hboxLayout3 = new QHBoxLayout(); hboxLayout3->setSpacing(6); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); hboxLayout3->setContentsMargins(0, 0, 0, 0); spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout3->addItem(spacerItem1); buttonOk = new QPushButton(Config); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setObjectName(QStringLiteral("buttonOk")); buttonOk->setAutoDefault(true); buttonOk->setDefault(true); hboxLayout3->addWidget(buttonOk); buttonCancel = new QPushButton(Config); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setObjectName(QStringLiteral("buttonCancel")); buttonCancel->setAutoDefault(true); hboxLayout3->addWidget(buttonCancel); diff --git a/tests/auto/tools/uic/baseline/connectdialog.ui.h b/tests/auto/tools/uic/baseline/connectdialog.ui.h index 71ed1bb87f..9c46bb851d 100644 --- a/tests/auto/tools/uic/baseline/connectdialog.ui.h +++ b/tests/auto/tools/uic/baseline/connectdialog.ui.h @@ -50,24 +50,24 @@ public: void setupUi(QDialog *ConnectDialog) { if (ConnectDialog->objectName().isEmpty()) - ConnectDialog->setObjectName(QString::fromUtf8("ConnectDialog")); + ConnectDialog->setObjectName(QStringLiteral("ConnectDialog")); ConnectDialog->resize(585, 361); gridLayout = new QGridLayout(ConnectDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); signalGroupBox = new QGroupBox(ConnectDialog); - signalGroupBox->setObjectName(QString::fromUtf8("signalGroupBox")); + signalGroupBox->setObjectName(QStringLiteral("signalGroupBox")); vboxLayout = new QVBoxLayout(signalGroupBox); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); signalList = new QListWidget(signalGroupBox); - signalList->setObjectName(QString::fromUtf8("signalList")); + signalList->setObjectName(QStringLiteral("signalList")); signalList->setTextElideMode(Qt::ElideMiddle); vboxLayout->addWidget(signalList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); editSignalsButton = new QToolButton(signalGroupBox); - editSignalsButton->setObjectName(QString::fromUtf8("editSignalsButton")); + editSignalsButton->setObjectName(QStringLiteral("editSignalsButton")); hboxLayout->addWidget(editSignalsButton); @@ -82,19 +82,19 @@ public: gridLayout->addWidget(signalGroupBox, 0, 0, 1, 2); slotGroupBox = new QGroupBox(ConnectDialog); - slotGroupBox->setObjectName(QString::fromUtf8("slotGroupBox")); + slotGroupBox->setObjectName(QStringLiteral("slotGroupBox")); vboxLayout1 = new QVBoxLayout(slotGroupBox); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); slotList = new QListWidget(slotGroupBox); - slotList->setObjectName(QString::fromUtf8("slotList")); + slotList->setObjectName(QStringLiteral("slotList")); slotList->setTextElideMode(Qt::ElideMiddle); vboxLayout1->addWidget(slotList); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); editSlotsButton = new QToolButton(slotGroupBox); - editSlotsButton->setObjectName(QString::fromUtf8("editSlotsButton")); + editSlotsButton->setObjectName(QStringLiteral("editSlotsButton")); hboxLayout1->addWidget(editSlotsButton); @@ -109,12 +109,12 @@ public: gridLayout->addWidget(slotGroupBox, 0, 2, 1, 1); showAllCheckBox = new QCheckBox(ConnectDialog); - showAllCheckBox->setObjectName(QString::fromUtf8("showAllCheckBox")); + showAllCheckBox->setObjectName(QStringLiteral("showAllCheckBox")); gridLayout->addWidget(showAllCheckBox, 1, 0, 1, 1); buttonBox = new QDialogButtonBox(ConnectDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/controller.ui.h b/tests/auto/tools/uic/baseline/controller.ui.h index 1c79f03f56..2758f1a7de 100644 --- a/tests/auto/tools/uic/baseline/controller.ui.h +++ b/tests/auto/tools/uic/baseline/controller.ui.h @@ -35,7 +35,7 @@ public: void setupUi(QWidget *Controller) { if (Controller->objectName().isEmpty()) - Controller->setObjectName(QString::fromUtf8("Controller")); + Controller->setObjectName(QStringLiteral("Controller")); Controller->resize(255, 111); gridLayout = new QGridLayout(Controller); #ifndef Q_OS_MAC @@ -44,30 +44,30 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(Controller); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setAlignment(Qt::AlignCenter); gridLayout->addWidget(label, 1, 1, 1, 1); decelerate = new QPushButton(Controller); - decelerate->setObjectName(QString::fromUtf8("decelerate")); + decelerate->setObjectName(QStringLiteral("decelerate")); gridLayout->addWidget(decelerate, 2, 1, 1, 1); accelerate = new QPushButton(Controller); - accelerate->setObjectName(QString::fromUtf8("accelerate")); + accelerate->setObjectName(QStringLiteral("accelerate")); gridLayout->addWidget(accelerate, 0, 1, 1, 1); right = new QPushButton(Controller); - right->setObjectName(QString::fromUtf8("right")); + right->setObjectName(QStringLiteral("right")); gridLayout->addWidget(right, 1, 2, 1, 1); left = new QPushButton(Controller); - left->setObjectName(QString::fromUtf8("left")); + left->setObjectName(QStringLiteral("left")); gridLayout->addWidget(left, 1, 0, 1, 1); diff --git a/tests/auto/tools/uic/baseline/cookies.ui.h b/tests/auto/tools/uic/baseline/cookies.ui.h index f866645dd8..201687c210 100644 --- a/tests/auto/tools/uic/baseline/cookies.ui.h +++ b/tests/auto/tools/uic/baseline/cookies.ui.h @@ -42,33 +42,33 @@ public: void setupUi(QDialog *CookiesDialog) { if (CookiesDialog->objectName().isEmpty()) - CookiesDialog->setObjectName(QString::fromUtf8("CookiesDialog")); + CookiesDialog->setObjectName(QStringLiteral("CookiesDialog")); CookiesDialog->resize(550, 370); gridLayout = new QGridLayout(CookiesDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout->addItem(spacerItem, 0, 0, 1, 1); search = new SearchLineEdit(CookiesDialog); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName(QStringLiteral("search")); gridLayout->addWidget(search, 0, 1, 1, 1); cookiesTable = new EditTableView(CookiesDialog); - cookiesTable->setObjectName(QString::fromUtf8("cookiesTable")); + cookiesTable->setObjectName(QStringLiteral("cookiesTable")); gridLayout->addWidget(cookiesTable, 1, 0, 1, 2); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); removeButton = new QPushButton(CookiesDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); hboxLayout->addWidget(removeButton); removeAllButton = new QPushButton(CookiesDialog); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); hboxLayout->addWidget(removeAllButton); @@ -77,7 +77,7 @@ public: hboxLayout->addItem(spacerItem1); buttonBox = new QDialogButtonBox(CookiesDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Ok); hboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h index 776afc51c8..ca4ac682ce 100644 --- a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h +++ b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h @@ -57,23 +57,23 @@ public: void setupUi(QDialog *CookiesExceptionsDialog) { if (CookiesExceptionsDialog->objectName().isEmpty()) - CookiesExceptionsDialog->setObjectName(QString::fromUtf8("CookiesExceptionsDialog")); + CookiesExceptionsDialog->setObjectName(QStringLiteral("CookiesExceptionsDialog")); CookiesExceptionsDialog->resize(466, 446); vboxLayout = new QVBoxLayout(CookiesExceptionsDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); newExceptionGroupBox = new QGroupBox(CookiesExceptionsDialog); - newExceptionGroupBox->setObjectName(QString::fromUtf8("newExceptionGroupBox")); + newExceptionGroupBox->setObjectName(QStringLiteral("newExceptionGroupBox")); gridLayout = new QGridLayout(newExceptionGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(newExceptionGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout->addWidget(label); domainLineEdit = new QLineEdit(newExceptionGroupBox); - domainLineEdit->setObjectName(QString::fromUtf8("domainLineEdit")); + domainLineEdit->setObjectName(QStringLiteral("domainLineEdit")); hboxLayout->addWidget(domainLineEdit); @@ -81,25 +81,25 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); spacerItem = new QSpacerItem(81, 25, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout1->addItem(spacerItem); blockButton = new QPushButton(newExceptionGroupBox); - blockButton->setObjectName(QString::fromUtf8("blockButton")); + blockButton->setObjectName(QStringLiteral("blockButton")); blockButton->setEnabled(false); hboxLayout1->addWidget(blockButton); allowForSessionButton = new QPushButton(newExceptionGroupBox); - allowForSessionButton->setObjectName(QString::fromUtf8("allowForSessionButton")); + allowForSessionButton->setObjectName(QStringLiteral("allowForSessionButton")); allowForSessionButton->setEnabled(false); hboxLayout1->addWidget(allowForSessionButton); allowButton = new QPushButton(newExceptionGroupBox); - allowButton->setObjectName(QString::fromUtf8("allowButton")); + allowButton->setObjectName(QStringLiteral("allowButton")); allowButton->setEnabled(false); hboxLayout1->addWidget(allowButton); @@ -111,30 +111,30 @@ public: vboxLayout->addWidget(newExceptionGroupBox); ExceptionsGroupBox = new QGroupBox(CookiesExceptionsDialog); - ExceptionsGroupBox->setObjectName(QString::fromUtf8("ExceptionsGroupBox")); + ExceptionsGroupBox->setObjectName(QStringLiteral("ExceptionsGroupBox")); gridLayout1 = new QGridLayout(ExceptionsGroupBox); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); spacerItem1 = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout1->addItem(spacerItem1, 0, 0, 1, 3); search = new SearchLineEdit(ExceptionsGroupBox); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName(QStringLiteral("search")); gridLayout1->addWidget(search, 0, 3, 1, 1); exceptionTable = new EditTableView(ExceptionsGroupBox); - exceptionTable->setObjectName(QString::fromUtf8("exceptionTable")); + exceptionTable->setObjectName(QStringLiteral("exceptionTable")); gridLayout1->addWidget(exceptionTable, 1, 0, 1, 4); removeButton = new QPushButton(ExceptionsGroupBox); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); gridLayout1->addWidget(removeButton, 2, 0, 1, 1); removeAllButton = new QPushButton(ExceptionsGroupBox); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); gridLayout1->addWidget(removeAllButton, 2, 1, 1, 1); @@ -146,7 +146,7 @@ public: vboxLayout->addWidget(ExceptionsGroupBox); buttonBox = new QDialogButtonBox(CookiesExceptionsDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/default.ui.h b/tests/auto/tools/uic/baseline/default.ui.h index 685fa0b476..0bde249375 100644 --- a/tests/auto/tools/uic/baseline/default.ui.h +++ b/tests/auto/tools/uic/baseline/default.ui.h @@ -66,18 +66,18 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(388, 413); exitAction = new QAction(MainWindow); - exitAction->setObjectName(QString::fromUtf8("exitAction")); + exitAction->setObjectName(QStringLiteral("exitAction")); aboutQtAction = new QAction(MainWindow); - aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction")); + aboutQtAction->setObjectName(QStringLiteral("aboutQtAction")); editStyleAction = new QAction(MainWindow); - editStyleAction->setObjectName(QString::fromUtf8("editStyleAction")); + editStyleAction->setObjectName(QStringLiteral("editStyleAction")); aboutAction = new QAction(MainWindow); - aboutAction->setObjectName(QString::fromUtf8("aboutAction")); + aboutAction->setObjectName(QStringLiteral("aboutAction")); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); gridLayout = new QGridLayout(centralwidget); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -85,14 +85,14 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); nameLabel = new QLabel(centralwidget); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName(QStringLiteral("nameLabel")); gridLayout->addWidget(nameLabel, 0, 0, 1, 1); nameCombo = new QComboBox(centralwidget); - nameCombo->setObjectName(QString::fromUtf8("nameCombo")); + nameCombo->setObjectName(QStringLiteral("nameCombo")); nameCombo->setEditable(true); gridLayout->addWidget(nameCombo, 0, 1, 1, 3); @@ -102,62 +102,62 @@ public: gridLayout->addItem(spacerItem, 1, 3, 1, 1); femaleRadioButton = new QRadioButton(centralwidget); - femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton")); + femaleRadioButton->setObjectName(QStringLiteral("femaleRadioButton")); gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 1); agreeCheckBox = new QCheckBox(centralwidget); - agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox")); + agreeCheckBox->setObjectName(QStringLiteral("agreeCheckBox")); gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 4); maleRadioButton = new QRadioButton(centralwidget); - maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton")); + maleRadioButton->setObjectName(QStringLiteral("maleRadioButton")); gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1); genderLabel = new QLabel(centralwidget); - genderLabel->setObjectName(QString::fromUtf8("genderLabel")); + genderLabel->setObjectName(QStringLiteral("genderLabel")); gridLayout->addWidget(genderLabel, 1, 0, 1, 1); ageSpinBox = new QSpinBox(centralwidget); - ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox")); + ageSpinBox->setObjectName(QStringLiteral("ageSpinBox")); ageSpinBox->setMinimum(12); ageSpinBox->setValue(22); gridLayout->addWidget(ageSpinBox, 2, 1, 1, 3); buttonBox = new QDialogButtonBox(centralwidget); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 7, 2, 1, 2); ageLabel = new QLabel(centralwidget); - ageLabel->setObjectName(QString::fromUtf8("ageLabel")); + ageLabel->setObjectName(QStringLiteral("ageLabel")); gridLayout->addWidget(ageLabel, 2, 0, 1, 1); passwordLabel = new QLabel(centralwidget); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName(QStringLiteral("passwordLabel")); gridLayout->addWidget(passwordLabel, 3, 0, 1, 1); passwordEdit = new QLineEdit(centralwidget); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName(QStringLiteral("passwordEdit")); passwordEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordEdit, 3, 1, 1, 3); label = new QLabel(centralwidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 5, 0, 1, 1); countryLabel = new QLabel(centralwidget); - countryLabel->setObjectName(QString::fromUtf8("countryLabel")); + countryLabel->setObjectName(QStringLiteral("countryLabel")); gridLayout->addWidget(countryLabel, 4, 0, 1, 1); @@ -165,26 +165,26 @@ public: new QListWidgetItem(professionList); new QListWidgetItem(professionList); new QListWidgetItem(professionList); - professionList->setObjectName(QString::fromUtf8("professionList")); + professionList->setObjectName(QStringLiteral("professionList")); gridLayout->addWidget(professionList, 5, 1, 1, 3); countryCombo = new QComboBox(centralwidget); - countryCombo->setObjectName(QString::fromUtf8("countryCombo")); + countryCombo->setObjectName(QStringLiteral("countryCombo")); gridLayout->addWidget(countryCombo, 4, 1, 1, 3); MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 388, 21)); menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_File->setObjectName(QStringLiteral("menu_File")); menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + menu_Help->setObjectName(QStringLiteral("menu_Help")); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); #ifndef QT_NO_SHORTCUT nameLabel->setBuddy(nameCombo); diff --git a/tests/auto/tools/uic/baseline/dialog.ui.h b/tests/auto/tools/uic/baseline/dialog.ui.h index d4860bf071..6e3e3fdc36 100644 --- a/tests/auto/tools/uic/baseline/dialog.ui.h +++ b/tests/auto/tools/uic/baseline/dialog.ui.h @@ -33,24 +33,24 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(451, 322); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); loadFromFileButton = new QPushButton(Dialog); - loadFromFileButton->setObjectName(QString::fromUtf8("loadFromFileButton")); + loadFromFileButton->setObjectName(QStringLiteral("loadFromFileButton")); gridLayout->addWidget(loadFromFileButton, 0, 0, 1, 1); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setAlignment(Qt::AlignCenter); label->setWordWrap(true); gridLayout->addWidget(label, 1, 0, 1, 1); loadFromSharedMemoryButton = new QPushButton(Dialog); - loadFromSharedMemoryButton->setObjectName(QString::fromUtf8("loadFromSharedMemoryButton")); + loadFromSharedMemoryButton->setObjectName(QStringLiteral("loadFromSharedMemoryButton")); gridLayout->addWidget(loadFromSharedMemoryButton, 2, 0, 1, 1); diff --git a/tests/auto/tools/uic/baseline/downloaditem.ui.h b/tests/auto/tools/uic/baseline/downloaditem.ui.h index 33442342b5..9aac86eb87 100644 --- a/tests/auto/tools/uic/baseline/downloaditem.ui.h +++ b/tests/auto/tools/uic/baseline/downloaditem.ui.h @@ -45,13 +45,13 @@ public: void setupUi(QWidget *DownloadItem) { if (DownloadItem->objectName().isEmpty()) - DownloadItem->setObjectName(QString::fromUtf8("DownloadItem")); + DownloadItem->setObjectName(QStringLiteral("DownloadItem")); DownloadItem->resize(423, 110); horizontalLayout = new QHBoxLayout(DownloadItem); horizontalLayout->setContentsMargins(0, 0, 0, 0); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); fileIcon = new QLabel(DownloadItem); - fileIcon->setObjectName(QString::fromUtf8("fileIcon")); + fileIcon->setObjectName(QStringLiteral("fileIcon")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -61,9 +61,9 @@ public: horizontalLayout->addWidget(fileIcon); verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2")); fileNameLabel = new SqueezeLabel(DownloadItem); - fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); + fileNameLabel->setObjectName(QStringLiteral("fileNameLabel")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -73,13 +73,13 @@ public: verticalLayout_2->addWidget(fileNameLabel); progressBar = new QProgressBar(DownloadItem); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName(QStringLiteral("progressBar")); progressBar->setValue(0); verticalLayout_2->addWidget(progressBar); downloadInfoLabel = new SqueezeLabel(DownloadItem); - downloadInfoLabel->setObjectName(QString::fromUtf8("downloadInfoLabel")); + downloadInfoLabel->setObjectName(QStringLiteral("downloadInfoLabel")); QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -92,24 +92,24 @@ public: horizontalLayout->addLayout(verticalLayout_2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); verticalSpacer = new QSpacerItem(17, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); verticalLayout->addItem(verticalSpacer); tryAgainButton = new QPushButton(DownloadItem); - tryAgainButton->setObjectName(QString::fromUtf8("tryAgainButton")); + tryAgainButton->setObjectName(QStringLiteral("tryAgainButton")); tryAgainButton->setEnabled(false); verticalLayout->addWidget(tryAgainButton); stopButton = new QPushButton(DownloadItem); - stopButton->setObjectName(QString::fromUtf8("stopButton")); + stopButton->setObjectName(QStringLiteral("stopButton")); verticalLayout->addWidget(stopButton); openButton = new QPushButton(DownloadItem); - openButton->setObjectName(QString::fromUtf8("openButton")); + openButton->setObjectName(QStringLiteral("openButton")); verticalLayout->addWidget(openButton); diff --git a/tests/auto/tools/uic/baseline/downloads.ui.h b/tests/auto/tools/uic/baseline/downloads.ui.h index 32b534393a..f88b6d75e7 100644 --- a/tests/auto/tools/uic/baseline/downloads.ui.h +++ b/tests/auto/tools/uic/baseline/downloads.ui.h @@ -39,21 +39,21 @@ public: void setupUi(QDialog *DownloadDialog) { if (DownloadDialog->objectName().isEmpty()) - DownloadDialog->setObjectName(QString::fromUtf8("DownloadDialog")); + DownloadDialog->setObjectName(QStringLiteral("DownloadDialog")); DownloadDialog->resize(332, 252); gridLayout = new QGridLayout(DownloadDialog); gridLayout->setSpacing(0); gridLayout->setContentsMargins(0, 0, 0, 0); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); downloadsView = new EditTableView(DownloadDialog); - downloadsView->setObjectName(QString::fromUtf8("downloadsView")); + downloadsView->setObjectName(QStringLiteral("downloadsView")); gridLayout->addWidget(downloadsView, 0, 0, 1, 3); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); cleanupButton = new QPushButton(DownloadDialog); - cleanupButton->setObjectName(QString::fromUtf8("cleanupButton")); + cleanupButton->setObjectName(QStringLiteral("cleanupButton")); cleanupButton->setEnabled(false); horizontalLayout->addWidget(cleanupButton); @@ -66,7 +66,7 @@ public: gridLayout->addLayout(horizontalLayout, 1, 0, 1, 1); itemCount = new QLabel(DownloadDialog); - itemCount->setObjectName(QString::fromUtf8("itemCount")); + itemCount->setObjectName(QStringLiteral("itemCount")); gridLayout->addWidget(itemCount, 1, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h index 3728e764a3..40634692fa 100644 --- a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h +++ b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h @@ -40,47 +40,47 @@ public: void setupUi(QDialog *embeddedDialog) { if (embeddedDialog->objectName().isEmpty()) - embeddedDialog->setObjectName(QString::fromUtf8("embeddedDialog")); + embeddedDialog->setObjectName(QStringLiteral("embeddedDialog")); embeddedDialog->resize(407, 134); formLayout = new QFormLayout(embeddedDialog); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(embeddedDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(0, QFormLayout::LabelRole, label); layoutDirection = new QComboBox(embeddedDialog); - layoutDirection->setObjectName(QString::fromUtf8("layoutDirection")); + layoutDirection->setObjectName(QStringLiteral("layoutDirection")); formLayout->setWidget(0, QFormLayout::FieldRole, layoutDirection); label_2 = new QLabel(embeddedDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); formLayout->setWidget(1, QFormLayout::LabelRole, label_2); fontComboBox = new QFontComboBox(embeddedDialog); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setObjectName(QStringLiteral("fontComboBox")); formLayout->setWidget(1, QFormLayout::FieldRole, fontComboBox); label_3 = new QLabel(embeddedDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); formLayout->setWidget(2, QFormLayout::LabelRole, label_3); style = new QComboBox(embeddedDialog); - style->setObjectName(QString::fromUtf8("style")); + style->setObjectName(QStringLiteral("style")); formLayout->setWidget(2, QFormLayout::FieldRole, style); label_4 = new QLabel(embeddedDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); formLayout->setWidget(3, QFormLayout::LabelRole, label_4); spacing = new QSlider(embeddedDialog); - spacing->setObjectName(QString::fromUtf8("spacing")); + spacing->setObjectName(QStringLiteral("spacing")); spacing->setOrientation(Qt::Horizontal); formLayout->setWidget(3, QFormLayout::FieldRole, spacing); diff --git a/tests/auto/tools/uic/baseline/filespage.ui.h b/tests/auto/tools/uic/baseline/filespage.ui.h index f8dd925df8..430e5350c8 100644 --- a/tests/auto/tools/uic/baseline/filespage.ui.h +++ b/tests/auto/tools/uic/baseline/filespage.ui.h @@ -38,23 +38,23 @@ public: void setupUi(QWidget *FilesPage) { if (FilesPage->objectName().isEmpty()) - FilesPage->setObjectName(QString::fromUtf8("FilesPage")); + FilesPage->setObjectName(QStringLiteral("FilesPage")); FilesPage->resize(417, 242); gridLayout = new QGridLayout(FilesPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); fileLabel = new QLabel(FilesPage); - fileLabel->setObjectName(QString::fromUtf8("fileLabel")); + fileLabel->setObjectName(QStringLiteral("fileLabel")); fileLabel->setWordWrap(true); gridLayout->addWidget(fileLabel, 0, 0, 1, 2); fileListWidget = new QListWidget(FilesPage); - fileListWidget->setObjectName(QString::fromUtf8("fileListWidget")); + fileListWidget->setObjectName(QStringLiteral("fileListWidget")); gridLayout->addWidget(fileListWidget, 1, 0, 3, 1); removeButton = new QPushButton(FilesPage); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -64,7 +64,7 @@ public: gridLayout->addWidget(removeButton, 1, 1, 1, 1); removeAllButton = new QPushButton(FilesPage); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); gridLayout->addWidget(removeAllButton, 2, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/filternamedialog.ui.h b/tests/auto/tools/uic/baseline/filternamedialog.ui.h index 703c552b4a..dd84725e0d 100644 --- a/tests/auto/tools/uic/baseline/filternamedialog.ui.h +++ b/tests/auto/tools/uic/baseline/filternamedialog.ui.h @@ -38,24 +38,24 @@ public: void setupUi(QDialog *FilterNameDialogClass) { if (FilterNameDialogClass->objectName().isEmpty()) - FilterNameDialogClass->setObjectName(QString::fromUtf8("FilterNameDialogClass")); + FilterNameDialogClass->setObjectName(QStringLiteral("FilterNameDialogClass")); FilterNameDialogClass->resize(312, 95); gridLayout = new QGridLayout(FilterNameDialogClass); gridLayout->setSpacing(6); gridLayout->setContentsMargins(9, 9, 9, 9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(FilterNameDialogClass); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); lineEdit = new QLineEdit(FilterNameDialogClass); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName(QStringLiteral("lineEdit")); gridLayout->addWidget(lineEdit, 0, 1, 1, 2); line = new QFrame(FilterNameDialogClass); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); @@ -66,7 +66,7 @@ public: gridLayout->addItem(spacerItem, 2, 0, 1, 2); buttonBox = new QDialogButtonBox(FilterNameDialogClass); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/filterpage.ui.h b/tests/auto/tools/uic/baseline/filterpage.ui.h index ab1fcf12a1..23a9c38140 100644 --- a/tests/auto/tools/uic/baseline/filterpage.ui.h +++ b/tests/auto/tools/uic/baseline/filterpage.ui.h @@ -45,37 +45,37 @@ public: void setupUi(QWidget *FilterPage) { if (FilterPage->objectName().isEmpty()) - FilterPage->setObjectName(QString::fromUtf8("FilterPage")); + FilterPage->setObjectName(QStringLiteral("FilterPage")); FilterPage->resize(419, 243); gridLayout = new QGridLayout(FilterPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(FilterPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 1, 0, 1, 1); filterLineEdit = new QLineEdit(FilterPage); - filterLineEdit->setObjectName(QString::fromUtf8("filterLineEdit")); + filterLineEdit->setObjectName(QStringLiteral("filterLineEdit")); gridLayout->addWidget(filterLineEdit, 2, 0, 1, 1); groupBox = new QGroupBox(FilterPage); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout1 = new QGridLayout(groupBox); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); customFilterWidget = new QTreeWidget(groupBox); - customFilterWidget->setObjectName(QString::fromUtf8("customFilterWidget")); + customFilterWidget->setObjectName(QStringLiteral("customFilterWidget")); customFilterWidget->setColumnCount(2); gridLayout1->addWidget(customFilterWidget, 0, 0, 3, 1); addButton = new QPushButton(groupBox); - addButton->setObjectName(QString::fromUtf8("addButton")); + addButton->setObjectName(QStringLiteral("addButton")); gridLayout1->addWidget(addButton, 0, 1, 1, 1); removeButton = new QPushButton(groupBox); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); gridLayout1->addWidget(removeButton, 1, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h index 12f5514d41..fdf2cd4e1f 100644 --- a/tests/auto/tools/uic/baseline/finddialog.ui.h +++ b/tests/auto/tools/uic/baseline/finddialog.ui.h @@ -94,7 +94,7 @@ public: void setupUi(QDialog *FindDialog) { if (FindDialog->objectName().isEmpty()) - FindDialog->setObjectName(QString::fromUtf8("FindDialog")); + FindDialog->setObjectName(QStringLiteral("FindDialog")); FindDialog->resize(414, 170); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); sizePolicy.setHorizontalStretch(0); @@ -104,22 +104,22 @@ public: hboxLayout = new QHBoxLayout(FindDialog); hboxLayout->setSpacing(6); hboxLayout->setContentsMargins(11, 11, 11, 11); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); vboxLayout = new QVBoxLayout(); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); findWhat = new QLabel(FindDialog); - findWhat->setObjectName(QString::fromUtf8("findWhat")); + findWhat->setObjectName(QStringLiteral("findWhat")); hboxLayout1->addWidget(findWhat); led = new QLineEdit(FindDialog); - led->setObjectName(QString::fromUtf8("led")); + led->setObjectName(QStringLiteral("led")); hboxLayout1->addWidget(led); @@ -127,36 +127,36 @@ public: vboxLayout->addLayout(hboxLayout1); groupBox = new QGroupBox(FindDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); gridLayout->setSpacing(6); gridLayout->setContentsMargins(9, 9, 9, 9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); sourceText = new QCheckBox(groupBox); - sourceText->setObjectName(QString::fromUtf8("sourceText")); + sourceText->setObjectName(QStringLiteral("sourceText")); sourceText->setChecked(true); gridLayout->addWidget(sourceText, 1, 0, 1, 1); translations = new QCheckBox(groupBox); - translations->setObjectName(QString::fromUtf8("translations")); + translations->setObjectName(QStringLiteral("translations")); translations->setChecked(true); gridLayout->addWidget(translations, 2, 0, 1, 1); matchCase = new QCheckBox(groupBox); - matchCase->setObjectName(QString::fromUtf8("matchCase")); + matchCase->setObjectName(QStringLiteral("matchCase")); gridLayout->addWidget(matchCase, 0, 1, 1, 1); comments = new QCheckBox(groupBox); - comments->setObjectName(QString::fromUtf8("comments")); + comments->setObjectName(QStringLiteral("comments")); comments->setChecked(true); gridLayout->addWidget(comments, 0, 0, 1, 1); ignoreAccelerators = new QCheckBox(groupBox); - ignoreAccelerators->setObjectName(QString::fromUtf8("ignoreAccelerators")); + ignoreAccelerators->setObjectName(QStringLiteral("ignoreAccelerators")); ignoreAccelerators->setChecked(true); gridLayout->addWidget(ignoreAccelerators, 1, 1, 1, 1); @@ -170,16 +170,16 @@ public: vboxLayout1 = new QVBoxLayout(); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(0, 0, 0, 0); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); findNxt = new QPushButton(FindDialog); - findNxt->setObjectName(QString::fromUtf8("findNxt")); + findNxt->setObjectName(QStringLiteral("findNxt")); findNxt->setDefault(true); findNxt->setFlat(false); vboxLayout1->addWidget(findNxt); cancel = new QPushButton(FindDialog); - cancel->setObjectName(QString::fromUtf8("cancel")); + cancel->setObjectName(QStringLiteral("cancel")); vboxLayout1->addWidget(cancel); diff --git a/tests/auto/tools/uic/baseline/form.ui.h b/tests/auto/tools/uic/baseline/form.ui.h index 6aca98a1e9..cbae1567e9 100644 --- a/tests/auto/tools/uic/baseline/form.ui.h +++ b/tests/auto/tools/uic/baseline/form.ui.h @@ -44,7 +44,7 @@ public: void setupUi(QWidget *WorldTimeForm) { if (WorldTimeForm->objectName().isEmpty()) - WorldTimeForm->setObjectName(QString::fromUtf8("WorldTimeForm")); + WorldTimeForm->setObjectName(QStringLiteral("WorldTimeForm")); WorldTimeForm->resize(400, 300); hboxLayout = new QHBoxLayout(WorldTimeForm); #ifndef Q_OS_MAC @@ -53,9 +53,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); worldTimeClock = new WorldTimeClock(WorldTimeForm); - worldTimeClock->setObjectName(QString::fromUtf8("worldTimeClock")); + worldTimeClock->setObjectName(QStringLiteral("worldTimeClock")); hboxLayout->addWidget(worldTimeClock); @@ -64,7 +64,7 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(1, 1, 1, 1); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); vboxLayout->addItem(spacerItem); @@ -74,14 +74,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(1, 1, 1, 1); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(WorldTimeForm); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); timeEdit = new QTimeEdit(WorldTimeForm); - timeEdit->setObjectName(QString::fromUtf8("timeEdit")); + timeEdit->setObjectName(QStringLiteral("timeEdit")); timeEdit->setReadOnly(true); hboxLayout1->addWidget(timeEdit); @@ -94,14 +94,14 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(1, 1, 1, 1); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); label_2 = new QLabel(WorldTimeForm); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout2->addWidget(label_2); spinBox = new QSpinBox(WorldTimeForm); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName(QStringLiteral("spinBox")); spinBox->setMaximum(12); spinBox->setMinimum(-12); diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h index ffc1e1ad39..75d4d437bb 100644 --- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h +++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h @@ -109,19 +109,19 @@ public: void setupUi(QDialog *FormWindowSettings) { if (FormWindowSettings->objectName().isEmpty()) - FormWindowSettings->setObjectName(QString::fromUtf8("FormWindowSettings")); + FormWindowSettings->setObjectName(QStringLiteral("FormWindowSettings")); FormWindowSettings->resize(433, 465); gridLayout = new QGridLayout(FormWindowSettings); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); buttonBox = new QDialogButtonBox(FormWindowSettings); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 6, 0, 1, 2); line = new QFrame(FormWindowSettings); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); @@ -132,33 +132,33 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); layoutDefaultGroupBox = new QGroupBox(FormWindowSettings); - layoutDefaultGroupBox->setObjectName(QString::fromUtf8("layoutDefaultGroupBox")); + layoutDefaultGroupBox->setObjectName(QStringLiteral("layoutDefaultGroupBox")); layoutDefaultGroupBox->setCheckable(true); gridLayout1 = new QGridLayout(layoutDefaultGroupBox); #ifndef Q_OS_MAC gridLayout1->setSpacing(6); #endif gridLayout1->setContentsMargins(8, 8, 8, 8); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); label_2 = new QLabel(layoutDefaultGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout1->addWidget(label_2, 1, 0, 1, 1); label = new QLabel(layoutDefaultGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout1->addWidget(label, 0, 0, 1, 1); defaultSpacingSpinBox = new QSpinBox(layoutDefaultGroupBox); - defaultSpacingSpinBox->setObjectName(QString::fromUtf8("defaultSpacingSpinBox")); + defaultSpacingSpinBox->setObjectName(QStringLiteral("defaultSpacingSpinBox")); gridLayout1->addWidget(defaultSpacingSpinBox, 1, 1, 1, 1); defaultMarginSpinBox = new QSpinBox(layoutDefaultGroupBox); - defaultMarginSpinBox->setObjectName(QString::fromUtf8("defaultMarginSpinBox")); + defaultMarginSpinBox->setObjectName(QStringLiteral("defaultMarginSpinBox")); gridLayout1->addWidget(defaultMarginSpinBox, 0, 1, 1, 1); @@ -166,31 +166,31 @@ public: hboxLayout->addWidget(layoutDefaultGroupBox); layoutFunctionGroupBox = new QGroupBox(FormWindowSettings); - layoutFunctionGroupBox->setObjectName(QString::fromUtf8("layoutFunctionGroupBox")); + layoutFunctionGroupBox->setObjectName(QStringLiteral("layoutFunctionGroupBox")); layoutFunctionGroupBox->setCheckable(true); gridLayout2 = new QGridLayout(layoutFunctionGroupBox); #ifndef Q_OS_MAC gridLayout2->setSpacing(6); #endif gridLayout2->setContentsMargins(8, 8, 8, 8); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + gridLayout2->setObjectName(QStringLiteral("gridLayout2")); spacingFunctionLineEdit = new QLineEdit(layoutFunctionGroupBox); - spacingFunctionLineEdit->setObjectName(QString::fromUtf8("spacingFunctionLineEdit")); + spacingFunctionLineEdit->setObjectName(QStringLiteral("spacingFunctionLineEdit")); gridLayout2->addWidget(spacingFunctionLineEdit, 1, 1, 1, 1); marginFunctionLineEdit = new QLineEdit(layoutFunctionGroupBox); - marginFunctionLineEdit->setObjectName(QString::fromUtf8("marginFunctionLineEdit")); + marginFunctionLineEdit->setObjectName(QStringLiteral("marginFunctionLineEdit")); gridLayout2->addWidget(marginFunctionLineEdit, 0, 1, 1, 1); label_3 = new QLabel(layoutFunctionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout2->addWidget(label_3, 0, 0, 1, 1); label_3_2 = new QLabel(layoutFunctionGroupBox); - label_3_2->setObjectName(QString::fromUtf8("label_3_2")); + label_3_2->setObjectName(QStringLiteral("label_3_2")); gridLayout2->addWidget(label_3_2, 1, 0, 1, 1); @@ -201,15 +201,15 @@ public: gridLayout->addLayout(hboxLayout, 2, 0, 1, 2); pixmapFunctionGroupBox_2 = new QGroupBox(FormWindowSettings); - pixmapFunctionGroupBox_2->setObjectName(QString::fromUtf8("pixmapFunctionGroupBox_2")); + pixmapFunctionGroupBox_2->setObjectName(QStringLiteral("pixmapFunctionGroupBox_2")); vboxLayout = new QVBoxLayout(pixmapFunctionGroupBox_2); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); authorLineEdit = new QLineEdit(pixmapFunctionGroupBox_2); - authorLineEdit->setObjectName(QString::fromUtf8("authorLineEdit")); + authorLineEdit->setObjectName(QStringLiteral("authorLineEdit")); vboxLayout->addWidget(authorLineEdit); @@ -217,15 +217,15 @@ public: gridLayout->addWidget(pixmapFunctionGroupBox_2, 0, 0, 1, 2); includeHintsGroupBox = new QGroupBox(FormWindowSettings); - includeHintsGroupBox->setObjectName(QString::fromUtf8("includeHintsGroupBox")); + includeHintsGroupBox->setObjectName(QStringLiteral("includeHintsGroupBox")); vboxLayout1 = new QVBoxLayout(includeHintsGroupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(8, 8, 8, 8); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); includeHintsTextEdit = new QTextEdit(includeHintsGroupBox); - includeHintsTextEdit->setObjectName(QString::fromUtf8("includeHintsTextEdit")); + includeHintsTextEdit->setObjectName(QStringLiteral("includeHintsTextEdit")); vboxLayout1->addWidget(includeHintsTextEdit); @@ -237,18 +237,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); pixmapFunctionGroupBox = new QGroupBox(FormWindowSettings); - pixmapFunctionGroupBox->setObjectName(QString::fromUtf8("pixmapFunctionGroupBox")); + pixmapFunctionGroupBox->setObjectName(QStringLiteral("pixmapFunctionGroupBox")); pixmapFunctionGroupBox->setCheckable(true); vboxLayout2 = new QVBoxLayout(pixmapFunctionGroupBox); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(8, 8, 8, 8); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); pixmapFunctionLineEdit = new QLineEdit(pixmapFunctionGroupBox); - pixmapFunctionLineEdit->setObjectName(QString::fromUtf8("pixmapFunctionLineEdit")); + pixmapFunctionLineEdit->setObjectName(QStringLiteral("pixmapFunctionLineEdit")); vboxLayout2->addWidget(pixmapFunctionLineEdit); @@ -263,7 +263,7 @@ public: gridLayout->addItem(spacerItem, 4, 1, 1, 1); gridPanel = new qdesigner_internal::GridPanel(FormWindowSettings); - gridPanel->setObjectName(QString::fromUtf8("gridPanel")); + gridPanel->setObjectName(QStringLiteral("gridPanel")); gridLayout->addWidget(gridPanel, 1, 0, 1, 2); diff --git a/tests/auto/tools/uic/baseline/generalpage.ui.h b/tests/auto/tools/uic/baseline/generalpage.ui.h index a4d72117eb..f496cb834c 100644 --- a/tests/auto/tools/uic/baseline/generalpage.ui.h +++ b/tests/auto/tools/uic/baseline/generalpage.ui.h @@ -37,27 +37,27 @@ public: void setupUi(QWidget *GeneralPage) { if (GeneralPage->objectName().isEmpty()) - GeneralPage->setObjectName(QString::fromUtf8("GeneralPage")); + GeneralPage->setObjectName(QStringLiteral("GeneralPage")); GeneralPage->resize(417, 243); gridLayout = new QGridLayout(GeneralPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(GeneralPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 1, 0, 1, 1); namespaceLineEdit = new QLineEdit(GeneralPage); - namespaceLineEdit->setObjectName(QString::fromUtf8("namespaceLineEdit")); + namespaceLineEdit->setObjectName(QStringLiteral("namespaceLineEdit")); gridLayout->addWidget(namespaceLineEdit, 1, 1, 1, 1); label_2 = new QLabel(GeneralPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 2, 0, 1, 1); folderLineEdit = new QLineEdit(GeneralPage); - folderLineEdit->setObjectName(QString::fromUtf8("folderLineEdit")); + folderLineEdit->setObjectName(QStringLiteral("folderLineEdit")); gridLayout->addWidget(folderLineEdit, 2, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/gridalignment.ui.h b/tests/auto/tools/uic/baseline/gridalignment.ui.h index 7a3291dc8c..8d9a556164 100644 --- a/tests/auto/tools/uic/baseline/gridalignment.ui.h +++ b/tests/auto/tools/uic/baseline/gridalignment.ui.h @@ -33,27 +33,27 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(279, 163); gridLayout = new QGridLayout(Form); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); gridLayout->addWidget(pushButton, 0, 0, 1, 1, Qt::AlignLeft); pushButton_3 = new QPushButton(Form); - pushButton_3->setObjectName(QString::fromUtf8("pushButton_3")); + pushButton_3->setObjectName(QStringLiteral("pushButton_3")); gridLayout->addWidget(pushButton_3, 0, 1, 1, 1, Qt::AlignTop); pushButton_2 = new QPushButton(Form); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); + pushButton_2->setObjectName(QStringLiteral("pushButton_2")); gridLayout->addWidget(pushButton_2, 1, 0, 1, 1, Qt::AlignRight); pushButton_4 = new QPushButton(Form); - pushButton_4->setObjectName(QString::fromUtf8("pushButton_4")); + pushButton_4->setObjectName(QStringLiteral("pushButton_4")); gridLayout->addWidget(pushButton_4, 1, 1, 1, 1, Qt::AlignBottom); diff --git a/tests/auto/tools/uic/baseline/gridpanel.ui.h b/tests/auto/tools/uic/baseline/gridpanel.ui.h index 21e703b95b..abe260e601 100644 --- a/tests/auto/tools/uic/baseline/gridpanel.ui.h +++ b/tests/auto/tools/uic/baseline/gridpanel.ui.h @@ -50,17 +50,17 @@ public: void setupUi(QWidget *qdesigner_internal__GridPanel) { if (qdesigner_internal__GridPanel->objectName().isEmpty()) - qdesigner_internal__GridPanel->setObjectName(QString::fromUtf8("qdesigner_internal__GridPanel")); + qdesigner_internal__GridPanel->setObjectName(QStringLiteral("qdesigner_internal__GridPanel")); qdesigner_internal__GridPanel->resize(393, 110); vboxLayout = new QVBoxLayout(qdesigner_internal__GridPanel); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); m_gridGroupBox = new QGroupBox(qdesigner_internal__GridPanel); - m_gridGroupBox->setObjectName(QString::fromUtf8("m_gridGroupBox")); + m_gridGroupBox->setObjectName(QStringLiteral("m_gridGroupBox")); gridLayout = new QGridLayout(m_gridGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); m_visibleCheckBox = new QCheckBox(m_gridGroupBox); - m_visibleCheckBox->setObjectName(QString::fromUtf8("m_visibleCheckBox")); + m_visibleCheckBox->setObjectName(QStringLiteral("m_visibleCheckBox")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -70,28 +70,28 @@ public: gridLayout->addWidget(m_visibleCheckBox, 0, 0, 1, 1); label = new QLabel(m_gridGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 1, 1, 1); m_deltaXSpinBox = new QSpinBox(m_gridGroupBox); - m_deltaXSpinBox->setObjectName(QString::fromUtf8("m_deltaXSpinBox")); + m_deltaXSpinBox->setObjectName(QStringLiteral("m_deltaXSpinBox")); m_deltaXSpinBox->setMinimum(2); m_deltaXSpinBox->setMaximum(100); gridLayout->addWidget(m_deltaXSpinBox, 0, 2, 1, 1); m_snapXCheckBox = new QCheckBox(m_gridGroupBox); - m_snapXCheckBox->setObjectName(QString::fromUtf8("m_snapXCheckBox")); + m_snapXCheckBox->setObjectName(QStringLiteral("m_snapXCheckBox")); sizePolicy.setHeightForWidth(m_snapXCheckBox->sizePolicy().hasHeightForWidth()); m_snapXCheckBox->setSizePolicy(sizePolicy); gridLayout->addWidget(m_snapXCheckBox, 0, 3, 1, 1); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); m_resetButton = new QPushButton(m_gridGroupBox); - m_resetButton->setObjectName(QString::fromUtf8("m_resetButton")); + m_resetButton->setObjectName(QStringLiteral("m_resetButton")); hboxLayout->addWidget(m_resetButton); @@ -103,19 +103,19 @@ public: gridLayout->addLayout(hboxLayout, 1, 0, 1, 1); label_2 = new QLabel(m_gridGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 1, 1, 1); m_deltaYSpinBox = new QSpinBox(m_gridGroupBox); - m_deltaYSpinBox->setObjectName(QString::fromUtf8("m_deltaYSpinBox")); + m_deltaYSpinBox->setObjectName(QStringLiteral("m_deltaYSpinBox")); m_deltaYSpinBox->setMinimum(2); m_deltaYSpinBox->setMaximum(100); gridLayout->addWidget(m_deltaYSpinBox, 1, 2, 1, 1); m_snapYCheckBox = new QCheckBox(m_gridGroupBox); - m_snapYCheckBox->setObjectName(QString::fromUtf8("m_snapYCheckBox")); + m_snapYCheckBox->setObjectName(QStringLiteral("m_snapYCheckBox")); sizePolicy.setHeightForWidth(m_snapYCheckBox->sizePolicy().hasHeightForWidth()); m_snapYCheckBox->setSizePolicy(sizePolicy); diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h index b16632fe00..ac482ba139 100644 --- a/tests/auto/tools/uic/baseline/helpdialog.ui.h +++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h @@ -114,26 +114,26 @@ public: void setupUi(QWidget *HelpDialog) { if (HelpDialog->objectName().isEmpty()) - HelpDialog->setObjectName(QString::fromUtf8("HelpDialog")); + HelpDialog->setObjectName(QStringLiteral("HelpDialog")); HelpDialog->resize(274, 417); vboxLayout = new QVBoxLayout(HelpDialog); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); tabWidget = new QTabWidget(HelpDialog); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + tabWidget->setObjectName(QStringLiteral("tabWidget")); contentPage = new QWidget(); - contentPage->setObjectName(QString::fromUtf8("contentPage")); + contentPage->setObjectName(QStringLiteral("contentPage")); vboxLayout1 = new QVBoxLayout(contentPage); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(5, 5, 5, 5); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); listContents = new QTreeWidget(contentPage); - listContents->setObjectName(QString::fromUtf8("listContents")); + listContents->setObjectName(QStringLiteral("listContents")); listContents->setContextMenuPolicy(Qt::CustomContextMenu); listContents->setRootIsDecorated(true); listContents->setUniformRowHeights(true); @@ -142,40 +142,40 @@ public: tabWidget->addTab(contentPage, QString()); indexPage = new QWidget(); - indexPage->setObjectName(QString::fromUtf8("indexPage")); + indexPage->setObjectName(QStringLiteral("indexPage")); vboxLayout2 = new QVBoxLayout(indexPage); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(5, 5, 5, 5); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); TextLabel1 = new QLabel(indexPage); - TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); + TextLabel1->setObjectName(QStringLiteral("TextLabel1")); vboxLayout2->addWidget(TextLabel1); editIndex = new QLineEdit(indexPage); - editIndex->setObjectName(QString::fromUtf8("editIndex")); + editIndex->setObjectName(QStringLiteral("editIndex")); vboxLayout2->addWidget(editIndex); listIndex = new QListView(indexPage); - listIndex->setObjectName(QString::fromUtf8("listIndex")); + listIndex->setObjectName(QStringLiteral("listIndex")); listIndex->setContextMenuPolicy(Qt::CustomContextMenu); vboxLayout2->addWidget(listIndex); tabWidget->addTab(indexPage, QString()); bookmarkPage = new QWidget(); - bookmarkPage->setObjectName(QString::fromUtf8("bookmarkPage")); + bookmarkPage->setObjectName(QStringLiteral("bookmarkPage")); vboxLayout3 = new QVBoxLayout(bookmarkPage); #ifndef Q_OS_MAC vboxLayout3->setSpacing(6); #endif vboxLayout3->setContentsMargins(5, 5, 5, 5); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); listBookmarks = new QTreeWidget(bookmarkPage); - listBookmarks->setObjectName(QString::fromUtf8("listBookmarks")); + listBookmarks->setObjectName(QStringLiteral("listBookmarks")); listBookmarks->setContextMenuPolicy(Qt::CustomContextMenu); listBookmarks->setUniformRowHeights(true); @@ -186,18 +186,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); buttonAdd = new QPushButton(bookmarkPage); - buttonAdd->setObjectName(QString::fromUtf8("buttonAdd")); + buttonAdd->setObjectName(QStringLiteral("buttonAdd")); hboxLayout->addWidget(buttonAdd); buttonRemove = new QPushButton(bookmarkPage); - buttonRemove->setObjectName(QString::fromUtf8("buttonRemove")); + buttonRemove->setObjectName(QStringLiteral("buttonRemove")); hboxLayout->addWidget(buttonRemove); @@ -206,35 +206,35 @@ public: tabWidget->addTab(bookmarkPage, QString()); searchPage = new QWidget(); - searchPage->setObjectName(QString::fromUtf8("searchPage")); + searchPage->setObjectName(QStringLiteral("searchPage")); gridLayout = new QGridLayout(searchPage); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(5, 5, 5, 5); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem1, 3, 0, 1, 1); TextLabel1_2 = new QLabel(searchPage); - TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2")); + TextLabel1_2->setObjectName(QStringLiteral("TextLabel1_2")); gridLayout->addWidget(TextLabel1_2, 0, 0, 1, 1); termsEdit = new QLineEdit(searchPage); - termsEdit->setObjectName(QString::fromUtf8("termsEdit")); + termsEdit->setObjectName(QStringLiteral("termsEdit")); gridLayout->addWidget(termsEdit, 1, 0, 1, 1); resultBox = new QListWidget(searchPage); - resultBox->setObjectName(QString::fromUtf8("resultBox")); + resultBox->setObjectName(QStringLiteral("resultBox")); resultBox->setContextMenuPolicy(Qt::CustomContextMenu); gridLayout->addWidget(resultBox, 5, 0, 1, 1); TextLabel2 = new QLabel(searchPage); - TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); + TextLabel2->setObjectName(QStringLiteral("TextLabel2")); gridLayout->addWidget(TextLabel2, 4, 0, 1, 1); @@ -243,9 +243,9 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(1, 1, 1, 1); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); helpButton = new QPushButton(searchPage); - helpButton->setObjectName(QString::fromUtf8("helpButton")); + helpButton->setObjectName(QStringLiteral("helpButton")); hboxLayout1->addWidget(helpButton); @@ -254,7 +254,7 @@ public: hboxLayout1->addItem(spacerItem2); searchButton = new QPushButton(searchPage); - searchButton->setObjectName(QString::fromUtf8("searchButton")); + searchButton->setObjectName(QStringLiteral("searchButton")); searchButton->setEnabled(false); hboxLayout1->addWidget(searchButton); @@ -267,7 +267,7 @@ public: vboxLayout->addWidget(tabWidget); framePrepare = new QFrame(HelpDialog); - framePrepare->setObjectName(QString::fromUtf8("framePrepare")); + framePrepare->setObjectName(QStringLiteral("framePrepare")); framePrepare->setFrameShape(QFrame::StyledPanel); framePrepare->setFrameShadow(QFrame::Raised); hboxLayout2 = new QHBoxLayout(framePrepare); @@ -275,14 +275,14 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(3, 3, 3, 3); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); labelPrepare = new QLabel(framePrepare); - labelPrepare->setObjectName(QString::fromUtf8("labelPrepare")); + labelPrepare->setObjectName(QStringLiteral("labelPrepare")); hboxLayout2->addWidget(labelPrepare); progressPrepare = new QProgressBar(framePrepare); - progressPrepare->setObjectName(QString::fromUtf8("progressPrepare")); + progressPrepare->setObjectName(QStringLiteral("progressPrepare")); hboxLayout2->addWidget(progressPrepare); diff --git a/tests/auto/tools/uic/baseline/history.ui.h b/tests/auto/tools/uic/baseline/history.ui.h index 1784b216e3..57007e5280 100644 --- a/tests/auto/tools/uic/baseline/history.ui.h +++ b/tests/auto/tools/uic/baseline/history.ui.h @@ -42,33 +42,33 @@ public: void setupUi(QDialog *HistoryDialog) { if (HistoryDialog->objectName().isEmpty()) - HistoryDialog->setObjectName(QString::fromUtf8("HistoryDialog")); + HistoryDialog->setObjectName(QStringLiteral("HistoryDialog")); HistoryDialog->resize(758, 450); gridLayout = new QGridLayout(HistoryDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout->addItem(spacerItem, 0, 0, 1, 1); search = new SearchLineEdit(HistoryDialog); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName(QStringLiteral("search")); gridLayout->addWidget(search, 0, 1, 1, 1); tree = new EditTreeView(HistoryDialog); - tree->setObjectName(QString::fromUtf8("tree")); + tree->setObjectName(QStringLiteral("tree")); gridLayout->addWidget(tree, 1, 0, 1, 2); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); removeButton = new QPushButton(HistoryDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); hboxLayout->addWidget(removeButton); removeAllButton = new QPushButton(HistoryDialog); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName(QStringLiteral("removeAllButton")); hboxLayout->addWidget(removeAllButton); @@ -77,7 +77,7 @@ public: hboxLayout->addItem(spacerItem1); buttonBox = new QDialogButtonBox(HistoryDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Ok); hboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h index 78c90838ab..f3f8f634f9 100644 --- a/tests/auto/tools/uic/baseline/icontheme.ui.h +++ b/tests/auto/tools/uic/baseline/icontheme.ui.h @@ -32,39 +32,39 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(122, 117); verticalLayout = new QVBoxLayout(Form); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); fileicon = new QPushButton(Form); - fileicon->setObjectName(QString::fromUtf8("fileicon")); + fileicon->setObjectName(QStringLiteral("fileicon")); QIcon icon; - icon.addFile(QString::fromUtf8("image1.png"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QStringLiteral("image1.png"), QSize(), QIcon::Normal, QIcon::Off); fileicon->setIcon(icon); verticalLayout->addWidget(fileicon); fileandthemeicon = new QPushButton(Form); - fileandthemeicon->setObjectName(QString::fromUtf8("fileandthemeicon")); + fileandthemeicon->setObjectName(QStringLiteral("fileandthemeicon")); QIcon icon1; - QString iconThemeName = QString::fromUtf8("edit-copy"); + QString iconThemeName = QStringLiteral("edit-copy"); if (QIcon::hasThemeIcon(iconThemeName)) { icon1 = QIcon::fromTheme(iconThemeName); } else { - icon1.addFile(QString::fromUtf8("image7.png"), QSize(), QIcon::Normal, QIcon::Off); + icon1.addFile(QStringLiteral("image7.png"), QSize(), QIcon::Normal, QIcon::Off); } fileandthemeicon->setIcon(icon1); verticalLayout->addWidget(fileandthemeicon); themeicon = new QPushButton(Form); - themeicon->setObjectName(QString::fromUtf8("themeicon")); + themeicon->setObjectName(QStringLiteral("themeicon")); QIcon icon2; - iconThemeName = QString::fromUtf8("edit-copy"); + iconThemeName = QStringLiteral("edit-copy"); if (QIcon::hasThemeIcon(iconThemeName)) { icon2 = QIcon::fromTheme(iconThemeName); } else { - icon2.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off); + icon2.addFile(QStringLiteral(""), QSize(), QIcon::Normal, QIcon::Off); } themeicon->setIcon(icon2); diff --git a/tests/auto/tools/uic/baseline/identifierpage.ui.h b/tests/auto/tools/uic/baseline/identifierpage.ui.h index 1088ee33da..3f0cd1a4f5 100644 --- a/tests/auto/tools/uic/baseline/identifierpage.ui.h +++ b/tests/auto/tools/uic/baseline/identifierpage.ui.h @@ -40,16 +40,16 @@ public: void setupUi(QWidget *IdentifierPage) { if (IdentifierPage->objectName().isEmpty()) - IdentifierPage->setObjectName(QString::fromUtf8("IdentifierPage")); + IdentifierPage->setObjectName(QStringLiteral("IdentifierPage")); IdentifierPage->resize(417, 242); gridLayout = new QGridLayout(IdentifierPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); identifierCheckBox = new QCheckBox(IdentifierPage); - identifierCheckBox->setObjectName(QString::fromUtf8("identifierCheckBox")); + identifierCheckBox->setObjectName(QStringLiteral("identifierCheckBox")); gridLayout->addWidget(identifierCheckBox, 1, 0, 1, 3); @@ -62,20 +62,20 @@ public: gridLayout->addItem(spacerItem2, 2, 0, 1, 1); globalButton = new QRadioButton(IdentifierPage); - globalButton->setObjectName(QString::fromUtf8("globalButton")); + globalButton->setObjectName(QStringLiteral("globalButton")); globalButton->setEnabled(false); globalButton->setChecked(true); gridLayout->addWidget(globalButton, 2, 1, 1, 1); prefixLineEdit = new QLineEdit(IdentifierPage); - prefixLineEdit->setObjectName(QString::fromUtf8("prefixLineEdit")); + prefixLineEdit->setObjectName(QStringLiteral("prefixLineEdit")); prefixLineEdit->setEnabled(false); gridLayout->addWidget(prefixLineEdit, 2, 2, 1, 1); fileNameButton = new QRadioButton(IdentifierPage); - fileNameButton->setObjectName(QString::fromUtf8("fileNameButton")); + fileNameButton->setObjectName(QStringLiteral("fileNameButton")); fileNameButton->setEnabled(false); gridLayout->addWidget(fileNameButton, 3, 1, 1, 2); diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h index 1728cac952..c09363d3ec 100644 --- a/tests/auto/tools/uic/baseline/imagedialog.ui.h +++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h @@ -50,8 +50,8 @@ public: void setupUi(QDialog *dialog) { if (dialog->objectName().isEmpty()) - dialog->setObjectName(QString::fromUtf8("dialog")); - dialog->setObjectName(QString::fromUtf8("ImageDialog")); + dialog->setObjectName(QStringLiteral("dialog")); + dialog->setObjectName(QStringLiteral("ImageDialog")); dialog->resize(320, 180); vboxLayout = new QVBoxLayout(dialog); #ifndef Q_OS_MAC @@ -60,17 +60,17 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setObjectName(QString::fromUtf8("")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(1, 1, 1, 1); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setObjectName(QString::fromUtf8("")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); + gridLayout->setObjectName(QStringLiteral("")); widthLabel = new QLabel(dialog); - widthLabel->setObjectName(QString::fromUtf8("widthLabel")); + widthLabel->setObjectName(QStringLiteral("widthLabel")); widthLabel->setGeometry(QRect(1, 27, 67, 22)); widthLabel->setFrameShape(QFrame::NoFrame); widthLabel->setFrameShadow(QFrame::Plain); @@ -79,7 +79,7 @@ public: gridLayout->addWidget(widthLabel, 1, 0, 1, 1); heightLabel = new QLabel(dialog); - heightLabel->setObjectName(QString::fromUtf8("heightLabel")); + heightLabel->setObjectName(QStringLiteral("heightLabel")); heightLabel->setGeometry(QRect(1, 55, 67, 22)); heightLabel->setFrameShape(QFrame::NoFrame); heightLabel->setFrameShadow(QFrame::Plain); @@ -88,7 +88,7 @@ public: gridLayout->addWidget(heightLabel, 2, 0, 1, 1); colorDepthCombo = new QComboBox(dialog); - colorDepthCombo->setObjectName(QString::fromUtf8("colorDepthCombo")); + colorDepthCombo->setObjectName(QStringLiteral("colorDepthCombo")); colorDepthCombo->setGeometry(QRect(74, 83, 227, 22)); QSizePolicy sizePolicy(static_cast(5), static_cast(0)); sizePolicy.setHorizontalStretch(0); @@ -100,7 +100,7 @@ public: gridLayout->addWidget(colorDepthCombo, 3, 1, 1, 1); nameLineEdit = new QLineEdit(dialog); - nameLineEdit->setObjectName(QString::fromUtf8("nameLineEdit")); + nameLineEdit->setObjectName(QStringLiteral("nameLineEdit")); nameLineEdit->setGeometry(QRect(74, 83, 227, 22)); QSizePolicy sizePolicy1(static_cast(5), static_cast(0)); sizePolicy1.setHorizontalStretch(1); @@ -112,7 +112,7 @@ public: gridLayout->addWidget(nameLineEdit, 0, 1, 1, 1); spinBox = new QSpinBox(dialog); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName(QStringLiteral("spinBox")); spinBox->setGeometry(QRect(74, 1, 227, 20)); sizePolicy.setHeightForWidth(spinBox->sizePolicy().hasHeightForWidth()); spinBox->setSizePolicy(sizePolicy); @@ -124,7 +124,7 @@ public: gridLayout->addWidget(spinBox, 1, 1, 1, 1); spinBox_2 = new QSpinBox(dialog); - spinBox_2->setObjectName(QString::fromUtf8("spinBox_2")); + spinBox_2->setObjectName(QStringLiteral("spinBox_2")); spinBox_2->setGeometry(QRect(74, 27, 227, 22)); sizePolicy.setHeightForWidth(spinBox_2->sizePolicy().hasHeightForWidth()); spinBox_2->setSizePolicy(sizePolicy); @@ -136,7 +136,7 @@ public: gridLayout->addWidget(spinBox_2, 2, 1, 1, 1); nameLabel = new QLabel(dialog); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName(QStringLiteral("nameLabel")); nameLabel->setGeometry(QRect(1, 1, 67, 20)); nameLabel->setFrameShape(QFrame::NoFrame); nameLabel->setFrameShadow(QFrame::Plain); @@ -145,7 +145,7 @@ public: gridLayout->addWidget(nameLabel, 0, 0, 1, 1); colorDepthLabel = new QLabel(dialog); - colorDepthLabel->setObjectName(QString::fromUtf8("colorDepthLabel")); + colorDepthLabel->setObjectName(QStringLiteral("colorDepthLabel")); colorDepthLabel->setGeometry(QRect(1, 83, 67, 22)); colorDepthLabel->setFrameShape(QFrame::NoFrame); colorDepthLabel->setFrameShadow(QFrame::Plain); @@ -165,20 +165,20 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("")); spacerItem1 = new QSpacerItem(QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem1); okButton = new QPushButton(dialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); okButton->setGeometry(QRect(135, 1, 80, 24)); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(dialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); cancelButton->setGeometry(QRect(221, 1, 80, 24)); hboxLayout->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/inputpage.ui.h b/tests/auto/tools/uic/baseline/inputpage.ui.h index 90ff131d1d..d52d1ae93b 100644 --- a/tests/auto/tools/uic/baseline/inputpage.ui.h +++ b/tests/auto/tools/uic/baseline/inputpage.ui.h @@ -39,16 +39,16 @@ public: void setupUi(QWidget *InputPage) { if (InputPage->objectName().isEmpty()) - InputPage->setObjectName(QString::fromUtf8("InputPage")); + InputPage->setObjectName(QStringLiteral("InputPage")); InputPage->resize(417, 242); gridLayout = new QGridLayout(InputPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem, 0, 2, 1, 1); label = new QLabel(InputPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -59,14 +59,14 @@ public: hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); fileLineEdit = new QLineEdit(InputPage); - fileLineEdit->setObjectName(QString::fromUtf8("fileLineEdit")); + fileLineEdit->setObjectName(QStringLiteral("fileLineEdit")); hboxLayout->addWidget(fileLineEdit); browseButton = new QToolButton(InputPage); - browseButton->setObjectName(QString::fromUtf8("browseButton")); + browseButton->setObjectName(QStringLiteral("browseButton")); hboxLayout->addWidget(browseButton); diff --git a/tests/auto/tools/uic/baseline/installdialog.ui.h b/tests/auto/tools/uic/baseline/installdialog.ui.h index d58986f98a..519a71005e 100644 --- a/tests/auto/tools/uic/baseline/installdialog.ui.h +++ b/tests/auto/tools/uic/baseline/installdialog.ui.h @@ -48,32 +48,32 @@ public: void setupUi(QDialog *InstallDialog) { if (InstallDialog->objectName().isEmpty()) - InstallDialog->setObjectName(QString::fromUtf8("InstallDialog")); + InstallDialog->setObjectName(QStringLiteral("InstallDialog")); InstallDialog->resize(436, 245); gridLayout = new QGridLayout(InstallDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(InstallDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 4); listWidget = new QListWidget(InstallDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); gridLayout->addWidget(listWidget, 1, 0, 4, 4); installButton = new QPushButton(InstallDialog); - installButton->setObjectName(QString::fromUtf8("installButton")); + installButton->setObjectName(QStringLiteral("installButton")); gridLayout->addWidget(installButton, 1, 4, 1, 1); cancelButton = new QPushButton(InstallDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); gridLayout->addWidget(cancelButton, 2, 4, 1, 1); closeButton = new QPushButton(InstallDialog); - closeButton->setObjectName(QString::fromUtf8("closeButton")); + closeButton->setObjectName(QStringLiteral("closeButton")); gridLayout->addWidget(closeButton, 3, 4, 1, 1); @@ -82,34 +82,34 @@ public: gridLayout->addItem(spacerItem, 4, 4, 1, 1); label_4 = new QLabel(InstallDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 5, 0, 1, 1); pathLineEdit = new QLineEdit(InstallDialog); - pathLineEdit->setObjectName(QString::fromUtf8("pathLineEdit")); + pathLineEdit->setObjectName(QStringLiteral("pathLineEdit")); gridLayout->addWidget(pathLineEdit, 5, 1, 1, 2); browseButton = new QToolButton(InstallDialog); - browseButton->setObjectName(QString::fromUtf8("browseButton")); + browseButton->setObjectName(QStringLiteral("browseButton")); gridLayout->addWidget(browseButton, 5, 3, 1, 1); line = new QFrame(InstallDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); gridLayout->addWidget(line, 6, 0, 1, 5); statusLabel = new QLabel(InstallDialog); - statusLabel->setObjectName(QString::fromUtf8("statusLabel")); + statusLabel->setObjectName(QStringLiteral("statusLabel")); gridLayout->addWidget(statusLabel, 7, 0, 1, 2); progressBar = new QProgressBar(InstallDialog); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName(QStringLiteral("progressBar")); progressBar->setValue(0); progressBar->setOrientation(Qt::Horizontal); diff --git a/tests/auto/tools/uic/baseline/languagesdialog.ui.h b/tests/auto/tools/uic/baseline/languagesdialog.ui.h index 58d299096a..0419f18ecf 100644 --- a/tests/auto/tools/uic/baseline/languagesdialog.ui.h +++ b/tests/auto/tools/uic/baseline/languagesdialog.ui.h @@ -41,50 +41,50 @@ public: void setupUi(QDialog *LanguagesDialog) { if (LanguagesDialog->objectName().isEmpty()) - LanguagesDialog->setObjectName(QString::fromUtf8("LanguagesDialog")); + LanguagesDialog->setObjectName(QStringLiteral("LanguagesDialog")); LanguagesDialog->resize(400, 300); verticalLayout = new QVBoxLayout(LanguagesDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); languagesList = new QTreeWidget(LanguagesDialog); - languagesList->setObjectName(QString::fromUtf8("languagesList")); + languagesList->setObjectName(QStringLiteral("languagesList")); languagesList->setIndentation(0); verticalLayout->addWidget(languagesList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); upButton = new QToolButton(LanguagesDialog); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); upButton->setEnabled(false); QIcon icon; - icon.addFile(QString::fromUtf8(":/images/up.png"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QStringLiteral(":/images/up.png"), QSize(), QIcon::Normal, QIcon::Off); upButton->setIcon(icon); hboxLayout->addWidget(upButton); downButton = new QToolButton(LanguagesDialog); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); downButton->setEnabled(false); QIcon icon1; - icon1.addFile(QString::fromUtf8(":/images/down.png"), QSize(), QIcon::Normal, QIcon::Off); + icon1.addFile(QStringLiteral(":/images/down.png"), QSize(), QIcon::Normal, QIcon::Off); downButton->setIcon(icon1); hboxLayout->addWidget(downButton); removeButton = new QToolButton(LanguagesDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); removeButton->setEnabled(false); QIcon icon2; - icon2.addFile(QString::fromUtf8(":/images/editdelete.png"), QSize(), QIcon::Normal, QIcon::Off); + icon2.addFile(QStringLiteral(":/images/editdelete.png"), QSize(), QIcon::Normal, QIcon::Off); removeButton->setIcon(icon2); hboxLayout->addWidget(removeButton); openFileButton = new QToolButton(LanguagesDialog); - openFileButton->setObjectName(QString::fromUtf8("openFileButton")); + openFileButton->setObjectName(QStringLiteral("openFileButton")); openFileButton->setEnabled(true); QIcon icon3; - icon3.addFile(QString::fromUtf8(":/images/mac/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off); + icon3.addFile(QStringLiteral(":/images/mac/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off); openFileButton->setIcon(icon3); hboxLayout->addWidget(openFileButton); @@ -94,7 +94,7 @@ public: hboxLayout->addItem(spacerItem); okButton = new QPushButton(LanguagesDialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); hboxLayout->addWidget(okButton); diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h index 1cca34b1fa..5ea1c43458 100644 --- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h @@ -96,7 +96,7 @@ public: void setupUi(QDialog *qdesigner_internal__ListWidgetEditor) { if (qdesigner_internal__ListWidgetEditor->objectName().isEmpty()) - qdesigner_internal__ListWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__ListWidgetEditor")); + qdesigner_internal__ListWidgetEditor->setObjectName(QStringLiteral("qdesigner_internal__ListWidgetEditor")); qdesigner_internal__ListWidgetEditor->resize(223, 245); vboxLayout = new QVBoxLayout(qdesigner_internal__ListWidgetEditor); #ifndef Q_OS_MAC @@ -105,25 +105,25 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(qdesigner_internal__ListWidgetEditor); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); listWidget = new QListWidget(groupBox); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); gridLayout->addWidget(listWidget, 0, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); newItemButton = new QToolButton(groupBox); - newItemButton->setObjectName(QString::fromUtf8("newItemButton")); + newItemButton->setObjectName(QStringLiteral("newItemButton")); horizontalLayout_2->addWidget(newItemButton); deleteItemButton = new QToolButton(groupBox); - deleteItemButton->setObjectName(QString::fromUtf8("deleteItemButton")); + deleteItemButton->setObjectName(QStringLiteral("deleteItemButton")); horizontalLayout_2->addWidget(deleteItemButton); @@ -132,12 +132,12 @@ public: horizontalLayout_2->addItem(spacerItem); moveItemUpButton = new QToolButton(groupBox); - moveItemUpButton->setObjectName(QString::fromUtf8("moveItemUpButton")); + moveItemUpButton->setObjectName(QStringLiteral("moveItemUpButton")); horizontalLayout_2->addWidget(moveItemUpButton); moveItemDownButton = new QToolButton(groupBox); - moveItemDownButton->setObjectName(QString::fromUtf8("moveItemDownButton")); + moveItemDownButton->setObjectName(QStringLiteral("moveItemDownButton")); horizontalLayout_2->addWidget(moveItemDownButton); @@ -145,14 +145,14 @@ public: gridLayout->addLayout(horizontalLayout_2, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); horizontalLayout->addWidget(label); itemIconSelector = new qdesigner_internal::IconSelector(groupBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName(QStringLiteral("itemIconSelector")); horizontalLayout->addWidget(itemIconSelector); @@ -167,7 +167,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__ListWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/mainwindow.ui.h b/tests/auto/tools/uic/baseline/mainwindow.ui.h index ef6f4cfe9c..4e336a4262 100644 --- a/tests/auto/tools/uic/baseline/mainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/mainwindow.ui.h @@ -89,14 +89,14 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(829, 813); actionAdd_Custom_Font = new QAction(MainWindow); - actionAdd_Custom_Font->setObjectName(QString::fromUtf8("actionAdd_Custom_Font")); + actionAdd_Custom_Font->setObjectName(QStringLiteral("actionAdd_Custom_Font")); action_Exit = new QAction(MainWindow); - action_Exit->setObjectName(QString::fromUtf8("action_Exit")); + action_Exit->setObjectName(QStringLiteral("action_Exit")); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); vboxLayout = new QVBoxLayout(centralwidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -104,9 +104,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(centralwidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); hboxLayout = new QHBoxLayout(groupBox); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -114,40 +114,40 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout->addWidget(label); fontComboBox = new QFontComboBox(groupBox); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setObjectName(QStringLiteral("fontComboBox")); hboxLayout->addWidget(fontComboBox); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout->addWidget(label_2); pixelSize = new QSpinBox(groupBox); - pixelSize->setObjectName(QString::fromUtf8("pixelSize")); + pixelSize->setObjectName(QStringLiteral("pixelSize")); pixelSize->setMinimum(1); hboxLayout->addWidget(pixelSize); label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); hboxLayout->addWidget(label_7); weightCombo = new QComboBox(groupBox); - weightCombo->setObjectName(QString::fromUtf8("weightCombo")); + weightCombo->setObjectName(QStringLiteral("weightCombo")); hboxLayout->addWidget(weightCombo); italic = new QCheckBox(groupBox); - italic->setObjectName(QString::fromUtf8("italic")); + italic->setObjectName(QStringLiteral("italic")); hboxLayout->addWidget(italic); @@ -159,7 +159,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(centralwidget); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); vboxLayout1 = new QVBoxLayout(groupBox_2); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -167,9 +167,9 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); chooseFromCodePoints = new QRadioButton(groupBox_2); - chooseFromCodePoints->setObjectName(QString::fromUtf8("chooseFromCodePoints")); + chooseFromCodePoints->setObjectName(QStringLiteral("chooseFromCodePoints")); chooseFromCodePoints->setChecked(true); vboxLayout1->addWidget(chooseFromCodePoints); @@ -179,9 +179,9 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(0, 0, 0, 0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); characterRangeView = new QListWidget(groupBox_2); - characterRangeView->setObjectName(QString::fromUtf8("characterRangeView")); + characterRangeView->setObjectName(QStringLiteral("characterRangeView")); vboxLayout2->addWidget(characterRangeView); @@ -190,19 +190,19 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); selectAll = new QPushButton(groupBox_2); - selectAll->setObjectName(QString::fromUtf8("selectAll")); + selectAll->setObjectName(QStringLiteral("selectAll")); hboxLayout1->addWidget(selectAll); deselectAll = new QPushButton(groupBox_2); - deselectAll->setObjectName(QString::fromUtf8("deselectAll")); + deselectAll->setObjectName(QStringLiteral("deselectAll")); hboxLayout1->addWidget(deselectAll); invertSelection = new QPushButton(groupBox_2); - invertSelection->setObjectName(QString::fromUtf8("invertSelection")); + invertSelection->setObjectName(QStringLiteral("invertSelection")); hboxLayout1->addWidget(invertSelection); @@ -217,7 +217,7 @@ public: vboxLayout1->addLayout(vboxLayout2); chooseFromSampleFile = new QRadioButton(groupBox_2); - chooseFromSampleFile->setObjectName(QString::fromUtf8("chooseFromSampleFile")); + chooseFromSampleFile->setObjectName(QStringLiteral("chooseFromSampleFile")); vboxLayout1->addWidget(chooseFromSampleFile); @@ -226,27 +226,27 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(0, 0, 0, 0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setEnabled(false); hboxLayout2->addWidget(label_5); sampleFile = new QLineEdit(groupBox_2); - sampleFile->setObjectName(QString::fromUtf8("sampleFile")); + sampleFile->setObjectName(QStringLiteral("sampleFile")); sampleFile->setEnabled(false); hboxLayout2->addWidget(sampleFile); browseSampleFile = new QPushButton(groupBox_2); - browseSampleFile->setObjectName(QString::fromUtf8("browseSampleFile")); + browseSampleFile->setObjectName(QStringLiteral("browseSampleFile")); browseSampleFile->setEnabled(false); hboxLayout2->addWidget(browseSampleFile); charCount = new QLabel(groupBox_2); - charCount->setObjectName(QString::fromUtf8("charCount")); + charCount->setObjectName(QStringLiteral("charCount")); charCount->setEnabled(false); hboxLayout2->addWidget(charCount); @@ -258,7 +258,7 @@ public: vboxLayout->addWidget(groupBox_2); groupBox_3 = new QGroupBox(centralwidget); - groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + groupBox_3->setObjectName(QStringLiteral("groupBox_3")); hboxLayout3 = new QHBoxLayout(groupBox_3); #ifndef Q_OS_MAC hboxLayout3->setSpacing(6); @@ -266,9 +266,9 @@ public: #ifndef Q_OS_MAC hboxLayout3->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); preview = new QLineEdit(groupBox_3); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName(QStringLiteral("preview")); hboxLayout3->addWidget(preview); @@ -276,7 +276,7 @@ public: vboxLayout->addWidget(groupBox_3); groupBox_4 = new QGroupBox(centralwidget); - groupBox_4->setObjectName(QString::fromUtf8("groupBox_4")); + groupBox_4->setObjectName(QStringLiteral("groupBox_4")); hboxLayout4 = new QHBoxLayout(groupBox_4); #ifndef Q_OS_MAC hboxLayout4->setSpacing(6); @@ -284,29 +284,29 @@ public: #ifndef Q_OS_MAC hboxLayout4->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setObjectName(QStringLiteral("hboxLayout4")); label_3 = new QLabel(groupBox_4); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); hboxLayout4->addWidget(label_3); path = new QLineEdit(groupBox_4); - path->setObjectName(QString::fromUtf8("path")); + path->setObjectName(QStringLiteral("path")); hboxLayout4->addWidget(path); browsePath = new QPushButton(groupBox_4); - browsePath->setObjectName(QString::fromUtf8("browsePath")); + browsePath->setObjectName(QStringLiteral("browsePath")); hboxLayout4->addWidget(browsePath); label_4 = new QLabel(groupBox_4); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); hboxLayout4->addWidget(label_4); fileName = new QLineEdit(groupBox_4); - fileName->setObjectName(QString::fromUtf8("fileName")); + fileName->setObjectName(QStringLiteral("fileName")); fileName->setEnabled(false); hboxLayout4->addWidget(fileName); @@ -319,9 +319,9 @@ public: hboxLayout5->setSpacing(6); #endif hboxLayout5->setContentsMargins(0, 0, 0, 0); - hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); + hboxLayout5->setObjectName(QStringLiteral("hboxLayout5")); generate = new QPushButton(centralwidget); - generate->setObjectName(QString::fromUtf8("generate")); + generate->setObjectName(QStringLiteral("generate")); hboxLayout5->addWidget(generate); @@ -334,13 +334,13 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 829, 29)); menuFile = new QMenu(menubar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); menubar->addAction(menuFile->menuAction()); diff --git a/tests/auto/tools/uic/baseline/mydialog.ui.h b/tests/auto/tools/uic/baseline/mydialog.ui.h index a8750d4514..ffb49e5d97 100644 --- a/tests/auto/tools/uic/baseline/mydialog.ui.h +++ b/tests/auto/tools/uic/baseline/mydialog.ui.h @@ -32,7 +32,7 @@ public: void setupUi(QDialog *MyDialog) { if (MyDialog->objectName().isEmpty()) - MyDialog->setObjectName(QString::fromUtf8("MyDialog")); + MyDialog->setObjectName(QStringLiteral("MyDialog")); MyDialog->resize(401, 70); vboxLayout = new QVBoxLayout(MyDialog); #ifndef Q_OS_MAC @@ -41,14 +41,14 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); aLabel = new QLabel(MyDialog); - aLabel->setObjectName(QString::fromUtf8("aLabel")); + aLabel->setObjectName(QStringLiteral("aLabel")); vboxLayout->addWidget(aLabel); aButton = new QPushButton(MyDialog); - aButton->setObjectName(QString::fromUtf8("aButton")); + aButton->setObjectName(QStringLiteral("aButton")); vboxLayout->addWidget(aButton); diff --git a/tests/auto/tools/uic/baseline/myform.ui.h b/tests/auto/tools/uic/baseline/myform.ui.h index a5ff7bcc11..140225abbe 100644 --- a/tests/auto/tools/uic/baseline/myform.ui.h +++ b/tests/auto/tools/uic/baseline/myform.ui.h @@ -45,35 +45,35 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(258, 224); vboxLayout = new QVBoxLayout(Form); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); radioButton_2 = new QRadioButton(groupBox); - radioButton_2->setObjectName(QString::fromUtf8("radioButton_2")); + radioButton_2->setObjectName(QStringLiteral("radioButton_2")); gridLayout->addWidget(radioButton_2, 1, 0, 1, 1); radioButton = new QRadioButton(groupBox); - radioButton->setObjectName(QString::fromUtf8("radioButton")); + radioButton->setObjectName(QStringLiteral("radioButton")); radioButton->setChecked(true); gridLayout->addWidget(radioButton, 0, 0, 1, 1); checkBox_2 = new QCheckBox(groupBox); - checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); + checkBox_2->setObjectName(QStringLiteral("checkBox_2")); checkBox_2->setChecked(true); gridLayout->addWidget(checkBox_2, 1, 1, 1, 1); @@ -83,32 +83,32 @@ public: gridLayout->addItem(spacerItem, 5, 0, 1, 1); checkBox = new QCheckBox(groupBox); - checkBox->setObjectName(QString::fromUtf8("checkBox")); + checkBox->setObjectName(QStringLiteral("checkBox")); gridLayout->addWidget(checkBox, 0, 1, 1, 1); radioButton_2_2 = new QRadioButton(groupBox); - radioButton_2_2->setObjectName(QString::fromUtf8("radioButton_2_2")); + radioButton_2_2->setObjectName(QStringLiteral("radioButton_2_2")); gridLayout->addWidget(radioButton_2_2, 2, 0, 1, 1); radioButton_3 = new QRadioButton(groupBox); - radioButton_3->setObjectName(QString::fromUtf8("radioButton_3")); + radioButton_3->setObjectName(QStringLiteral("radioButton_3")); gridLayout->addWidget(radioButton_3, 3, 0, 1, 1); radioButton_4 = new QRadioButton(groupBox); - radioButton_4->setObjectName(QString::fromUtf8("radioButton_4")); + radioButton_4->setObjectName(QStringLiteral("radioButton_4")); gridLayout->addWidget(radioButton_4, 4, 0, 1, 1); checkBox_3 = new QCheckBox(groupBox); - checkBox_3->setObjectName(QString::fromUtf8("checkBox_3")); + checkBox_3->setObjectName(QStringLiteral("checkBox_3")); gridLayout->addWidget(checkBox_3, 2, 1, 1, 1); checkBox_4 = new QCheckBox(groupBox); - checkBox_4->setObjectName(QString::fromUtf8("checkBox_4")); + checkBox_4->setObjectName(QStringLiteral("checkBox_4")); checkBox_4->setChecked(true); gridLayout->addWidget(checkBox_4, 3, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h index b69e1581f9..5b9fef13f8 100644 --- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h +++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h @@ -93,42 +93,42 @@ public: void setupUi(QDialog *qdesigner_internal__NewActionDialog) { if (qdesigner_internal__NewActionDialog->objectName().isEmpty()) - qdesigner_internal__NewActionDialog->setObjectName(QString::fromUtf8("qdesigner_internal__NewActionDialog")); + qdesigner_internal__NewActionDialog->setObjectName(QStringLiteral("qdesigner_internal__NewActionDialog")); qdesigner_internal__NewActionDialog->resize(363, 156); verticalLayout = new QVBoxLayout(qdesigner_internal__NewActionDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(qdesigner_internal__NewActionDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); formLayout->setWidget(0, QFormLayout::LabelRole, label); editActionText = new QLineEdit(qdesigner_internal__NewActionDialog); - editActionText->setObjectName(QString::fromUtf8("editActionText")); + editActionText->setObjectName(QStringLiteral("editActionText")); editActionText->setMinimumSize(QSize(255, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, editActionText); label_3 = new QLabel(qdesigner_internal__NewActionDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); formLayout->setWidget(1, QFormLayout::LabelRole, label_3); editObjectName = new QLineEdit(qdesigner_internal__NewActionDialog); - editObjectName->setObjectName(QString::fromUtf8("editObjectName")); + editObjectName->setObjectName(QStringLiteral("editObjectName")); formLayout->setWidget(1, QFormLayout::FieldRole, editObjectName); label_2 = new QLabel(qdesigner_internal__NewActionDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); formLayout->setWidget(2, QFormLayout::LabelRole, label_2); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); iconSelector = new qdesigner_internal::IconSelector(qdesigner_internal__NewActionDialog); - iconSelector->setObjectName(QString::fromUtf8("iconSelector")); + iconSelector->setObjectName(QStringLiteral("iconSelector")); horizontalLayout->addWidget(iconSelector); @@ -147,14 +147,14 @@ public: verticalLayout->addItem(verticalSpacer); line = new QFrame(qdesigner_internal__NewActionDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); verticalLayout->addWidget(line); buttonBox = new QDialogButtonBox(qdesigner_internal__NewActionDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h index f3296421b2..ba9ba5dcfd 100644 --- a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h +++ b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h @@ -46,20 +46,20 @@ public: void setupUi(QDialog *qdesigner_internal__NewDynamicPropertyDialog) { if (qdesigner_internal__NewDynamicPropertyDialog->objectName().isEmpty()) - qdesigner_internal__NewDynamicPropertyDialog->setObjectName(QString::fromUtf8("qdesigner_internal__NewDynamicPropertyDialog")); + qdesigner_internal__NewDynamicPropertyDialog->setObjectName(QStringLiteral("qdesigner_internal__NewDynamicPropertyDialog")); qdesigner_internal__NewDynamicPropertyDialog->resize(340, 118); verticalLayout = new QVBoxLayout(qdesigner_internal__NewDynamicPropertyDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); m_lineEdit = new QLineEdit(qdesigner_internal__NewDynamicPropertyDialog); - m_lineEdit->setObjectName(QString::fromUtf8("m_lineEdit")); + m_lineEdit->setObjectName(QStringLiteral("m_lineEdit")); m_lineEdit->setMinimumSize(QSize(220, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, m_lineEdit); label = new QLabel(qdesigner_internal__NewDynamicPropertyDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -69,9 +69,9 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); m_comboBox = new QComboBox(qdesigner_internal__NewDynamicPropertyDialog); - m_comboBox->setObjectName(QString::fromUtf8("m_comboBox")); + m_comboBox->setObjectName(QStringLiteral("m_comboBox")); horizontalLayout->addWidget(m_comboBox); @@ -83,7 +83,7 @@ public: formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout); label_2 = new QLabel(qdesigner_internal__NewDynamicPropertyDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); label_2->setSizePolicy(sizePolicy); @@ -97,7 +97,7 @@ public: verticalLayout->addItem(spacerItem); m_buttonBox = new QDialogButtonBox(qdesigner_internal__NewDynamicPropertyDialog); - m_buttonBox->setObjectName(QString::fromUtf8("m_buttonBox")); + m_buttonBox->setObjectName(QStringLiteral("m_buttonBox")); m_buttonBox->setOrientation(Qt::Horizontal); m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); m_buttonBox->setCenterButtons(false); diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h index e985c3bf26..007b2680aa 100644 --- a/tests/auto/tools/uic/baseline/newform.ui.h +++ b/tests/auto/tools/uic/baseline/newform.ui.h @@ -83,7 +83,7 @@ public: void setupUi(QDialog *NewForm) { if (NewForm->objectName().isEmpty()) - NewForm->setObjectName(QString::fromUtf8("NewForm")); + NewForm->setObjectName(QStringLiteral("NewForm")); NewForm->resize(495, 319); vboxLayout = new QVBoxLayout(NewForm); #ifndef Q_OS_MAC @@ -92,15 +92,15 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); treeWidget = new QTreeWidget(NewForm); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); treeWidget->setIconSize(QSize(128, 128)); treeWidget->setRootIsDecorated(false); treeWidget->setColumnCount(1); @@ -108,7 +108,7 @@ public: hboxLayout->addWidget(treeWidget); lblPreview = new QLabel(NewForm); - lblPreview->setObjectName(QString::fromUtf8("lblPreview")); + lblPreview->setObjectName(QStringLiteral("lblPreview")); QSizePolicy sizePolicy(static_cast(7), static_cast(5)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -124,19 +124,19 @@ public: vboxLayout->addLayout(hboxLayout); horizontalLine = new QFrame(NewForm); - horizontalLine->setObjectName(QString::fromUtf8("horizontalLine")); + horizontalLine->setObjectName(QStringLiteral("horizontalLine")); horizontalLine->setFrameShape(QFrame::HLine); horizontalLine->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(horizontalLine); chkShowOnStartup = new QCheckBox(NewForm); - chkShowOnStartup->setObjectName(QString::fromUtf8("chkShowOnStartup")); + chkShowOnStartup->setObjectName(QStringLiteral("chkShowOnStartup")); vboxLayout->addWidget(chkShowOnStartup); buttonBox = new QDialogButtonBox(NewForm); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); vboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h index 017222da50..494f3e6894 100644 --- a/tests/auto/tools/uic/baseline/orderdialog.ui.h +++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h @@ -87,18 +87,18 @@ public: void setupUi(QDialog *qdesigner_internal__OrderDialog) { if (qdesigner_internal__OrderDialog->objectName().isEmpty()) - qdesigner_internal__OrderDialog->setObjectName(QString::fromUtf8("qdesigner_internal__OrderDialog")); + qdesigner_internal__OrderDialog->setObjectName(QStringLiteral("qdesigner_internal__OrderDialog")); qdesigner_internal__OrderDialog->resize(467, 310); vboxLayout = new QVBoxLayout(qdesigner_internal__OrderDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(qdesigner_internal__OrderDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); hboxLayout = new QHBoxLayout(groupBox); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(9, 9, 9, 9); pageList = new QListWidget(groupBox); - pageList->setObjectName(QString::fromUtf8("pageList")); + pageList->setObjectName(QStringLiteral("pageList")); pageList->setMinimumSize(QSize(344, 0)); pageList->setDragDropMode(QAbstractItemView::InternalMove); pageList->setSelectionMode(QAbstractItemView::ContiguousSelection); @@ -108,15 +108,15 @@ public: vboxLayout1 = new QVBoxLayout(); vboxLayout1->setSpacing(6); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(0, 0, 0, 0); upButton = new QToolButton(groupBox); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); vboxLayout1->addWidget(upButton); downButton = new QToolButton(groupBox); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); vboxLayout1->addWidget(downButton); @@ -131,7 +131,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__OrderDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset); diff --git a/tests/auto/tools/uic/baseline/outputpage.ui.h b/tests/auto/tools/uic/baseline/outputpage.ui.h index 5e8332ea93..20fbf93b17 100644 --- a/tests/auto/tools/uic/baseline/outputpage.ui.h +++ b/tests/auto/tools/uic/baseline/outputpage.ui.h @@ -37,16 +37,16 @@ public: void setupUi(QWidget *OutputPage) { if (OutputPage->objectName().isEmpty()) - OutputPage->setObjectName(QString::fromUtf8("OutputPage")); + OutputPage->setObjectName(QStringLiteral("OutputPage")); OutputPage->resize(417, 242); gridLayout = new QGridLayout(OutputPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); label = new QLabel(OutputPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -56,7 +56,7 @@ public: gridLayout->addWidget(label, 1, 0, 1, 1); projectLineEdit = new QLineEdit(OutputPage); - projectLineEdit->setObjectName(QString::fromUtf8("projectLineEdit")); + projectLineEdit->setObjectName(QStringLiteral("projectLineEdit")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -66,14 +66,14 @@ public: gridLayout->addWidget(projectLineEdit, 1, 1, 1, 1); label_2 = new QLabel(OutputPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); label_2->setSizePolicy(sizePolicy); gridLayout->addWidget(label_2, 2, 0, 1, 1); collectionLineEdit = new QLineEdit(OutputPage); - collectionLineEdit->setObjectName(QString::fromUtf8("collectionLineEdit")); + collectionLineEdit->setObjectName(QStringLiteral("collectionLineEdit")); sizePolicy1.setHeightForWidth(collectionLineEdit->sizePolicy().hasHeightForWidth()); collectionLineEdit->setSizePolicy(sizePolicy1); diff --git a/tests/auto/tools/uic/baseline/pagefold.ui.h b/tests/auto/tools/uic/baseline/pagefold.ui.h index a58c4f4976..ede9a51d7c 100644 --- a/tests/auto/tools/uic/baseline/pagefold.ui.h +++ b/tests/auto/tools/uic/baseline/pagefold.ui.h @@ -70,18 +70,18 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName(QStringLiteral("MainWindow")); MainWindow->resize(392, 412); exitAction = new QAction(MainWindow); - exitAction->setObjectName(QString::fromUtf8("exitAction")); + exitAction->setObjectName(QStringLiteral("exitAction")); aboutQtAction = new QAction(MainWindow); - aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction")); + aboutQtAction->setObjectName(QStringLiteral("aboutQtAction")); editStyleAction = new QAction(MainWindow); - editStyleAction->setObjectName(QString::fromUtf8("editStyleAction")); + editStyleAction->setObjectName(QStringLiteral("editStyleAction")); aboutAction = new QAction(MainWindow); - aboutAction->setObjectName(QString::fromUtf8("aboutAction")); + aboutAction->setObjectName(QStringLiteral("aboutAction")); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); vboxLayout = new QVBoxLayout(centralwidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -89,9 +89,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); mainFrame = new QFrame(centralwidget); - mainFrame->setObjectName(QString::fromUtf8("mainFrame")); + mainFrame->setObjectName(QStringLiteral("mainFrame")); mainFrame->setFrameShape(QFrame::StyledPanel); mainFrame->setFrameShadow(QFrame::Raised); gridLayout = new QGridLayout(mainFrame); @@ -101,9 +101,9 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); nameCombo = new QComboBox(mainFrame); - nameCombo->setObjectName(QString::fromUtf8("nameCombo")); + nameCombo->setObjectName(QStringLiteral("nameCombo")); nameCombo->setEditable(true); gridLayout->addWidget(nameCombo, 0, 1, 1, 3); @@ -113,56 +113,56 @@ public: gridLayout->addItem(spacerItem, 1, 3, 1, 1); femaleRadioButton = new QRadioButton(mainFrame); - femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton")); + femaleRadioButton->setObjectName(QStringLiteral("femaleRadioButton")); gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 1); genderLabel = new QLabel(mainFrame); - genderLabel->setObjectName(QString::fromUtf8("genderLabel")); + genderLabel->setObjectName(QStringLiteral("genderLabel")); gridLayout->addWidget(genderLabel, 1, 0, 1, 1); ageLabel = new QLabel(mainFrame); - ageLabel->setObjectName(QString::fromUtf8("ageLabel")); + ageLabel->setObjectName(QStringLiteral("ageLabel")); gridLayout->addWidget(ageLabel, 2, 0, 1, 1); maleRadioButton = new QRadioButton(mainFrame); - maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton")); + maleRadioButton->setObjectName(QStringLiteral("maleRadioButton")); gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1); nameLabel = new QLabel(mainFrame); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName(QStringLiteral("nameLabel")); gridLayout->addWidget(nameLabel, 0, 0, 1, 1); passwordLabel = new QLabel(mainFrame); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName(QStringLiteral("passwordLabel")); gridLayout->addWidget(passwordLabel, 3, 0, 1, 1); ageSpinBox = new QSpinBox(mainFrame); - ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox")); + ageSpinBox->setObjectName(QStringLiteral("ageSpinBox")); ageSpinBox->setMinimum(12); ageSpinBox->setValue(22); gridLayout->addWidget(ageSpinBox, 2, 1, 1, 3); buttonBox = new QDialogButtonBox(mainFrame); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 7, 2, 1, 2); agreeCheckBox = new QCheckBox(mainFrame); - agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox")); + agreeCheckBox->setObjectName(QStringLiteral("agreeCheckBox")); gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 4); passwordEdit = new QLineEdit(mainFrame); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName(QStringLiteral("passwordEdit")); passwordEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordEdit, 3, 1, 1, 3); @@ -171,22 +171,22 @@ public: new QListWidgetItem(professionList); new QListWidgetItem(professionList); new QListWidgetItem(professionList); - professionList->setObjectName(QString::fromUtf8("professionList")); + professionList->setObjectName(QStringLiteral("professionList")); gridLayout->addWidget(professionList, 5, 1, 1, 3); label = new QLabel(mainFrame); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 5, 0, 1, 1); countryCombo = new QComboBox(mainFrame); - countryCombo->setObjectName(QString::fromUtf8("countryCombo")); + countryCombo->setObjectName(QStringLiteral("countryCombo")); gridLayout->addWidget(countryCombo, 4, 1, 1, 3); countryLabel = new QLabel(mainFrame); - countryLabel->setObjectName(QString::fromUtf8("countryLabel")); + countryLabel->setObjectName(QStringLiteral("countryLabel")); gridLayout->addWidget(countryLabel, 4, 0, 1, 1); @@ -195,15 +195,15 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 392, 25)); menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_File->setObjectName(QStringLiteral("menu_File")); menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + menu_Help->setObjectName(QStringLiteral("menu_Help")); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); MainWindow->setStatusBar(statusbar); #ifndef QT_NO_SHORTCUT ageLabel->setBuddy(ageSpinBox); diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h index de57468b9d..67f74c1546 100644 --- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h +++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h @@ -95,7 +95,7 @@ public: void setupUi(QDialog *qdesigner_internal__PaletteEditor) { if (qdesigner_internal__PaletteEditor->objectName().isEmpty()) - qdesigner_internal__PaletteEditor->setObjectName(QString::fromUtf8("qdesigner_internal__PaletteEditor")); + qdesigner_internal__PaletteEditor->setObjectName(QStringLiteral("qdesigner_internal__PaletteEditor")); qdesigner_internal__PaletteEditor->resize(365, 409); QSizePolicy sizePolicy(static_cast(7), static_cast(7)); sizePolicy.setHorizontalStretch(0); @@ -109,9 +109,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); advancedBox = new QGroupBox(qdesigner_internal__PaletteEditor); - advancedBox->setObjectName(QString::fromUtf8("advancedBox")); + advancedBox->setObjectName(QStringLiteral("advancedBox")); advancedBox->setMinimumSize(QSize(0, 0)); advancedBox->setMaximumSize(QSize(16777215, 16777215)); gridLayout = new QGridLayout(advancedBox); @@ -121,9 +121,9 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); buildButton = new QtColorButton(advancedBox); - buildButton->setObjectName(QString::fromUtf8("buildButton")); + buildButton->setObjectName(QStringLiteral("buildButton")); QSizePolicy sizePolicy1(static_cast(7), static_cast(13)); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -133,24 +133,24 @@ public: gridLayout->addWidget(buildButton, 0, 1, 1, 1); paletteView = new QTreeView(advancedBox); - paletteView->setObjectName(QString::fromUtf8("paletteView")); + paletteView->setObjectName(QStringLiteral("paletteView")); paletteView->setMinimumSize(QSize(0, 200)); gridLayout->addWidget(paletteView, 1, 0, 1, 4); detailsRadio = new QRadioButton(advancedBox); - detailsRadio->setObjectName(QString::fromUtf8("detailsRadio")); + detailsRadio->setObjectName(QStringLiteral("detailsRadio")); gridLayout->addWidget(detailsRadio, 0, 3, 1, 1); computeRadio = new QRadioButton(advancedBox); - computeRadio->setObjectName(QString::fromUtf8("computeRadio")); + computeRadio->setObjectName(QStringLiteral("computeRadio")); computeRadio->setChecked(true); gridLayout->addWidget(computeRadio, 0, 2, 1, 1); label = new QLabel(advancedBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); @@ -158,7 +158,7 @@ public: vboxLayout->addWidget(advancedBox); GroupBox126 = new QGroupBox(qdesigner_internal__PaletteEditor); - GroupBox126->setObjectName(QString::fromUtf8("GroupBox126")); + GroupBox126->setObjectName(QStringLiteral("GroupBox126")); QSizePolicy sizePolicy2(static_cast(5), static_cast(7)); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -169,25 +169,25 @@ public: gridLayout1->setSpacing(6); #endif gridLayout1->setContentsMargins(8, 8, 8, 8); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); disabledRadio = new QRadioButton(GroupBox126); - disabledRadio->setObjectName(QString::fromUtf8("disabledRadio")); + disabledRadio->setObjectName(QStringLiteral("disabledRadio")); gridLayout1->addWidget(disabledRadio, 0, 2, 1, 1); inactiveRadio = new QRadioButton(GroupBox126); - inactiveRadio->setObjectName(QString::fromUtf8("inactiveRadio")); + inactiveRadio->setObjectName(QStringLiteral("inactiveRadio")); gridLayout1->addWidget(inactiveRadio, 0, 1, 1, 1); activeRadio = new QRadioButton(GroupBox126); - activeRadio->setObjectName(QString::fromUtf8("activeRadio")); + activeRadio->setObjectName(QStringLiteral("activeRadio")); activeRadio->setChecked(true); gridLayout1->addWidget(activeRadio, 0, 0, 1, 1); previewFrame = new qdesigner_internal::PreviewFrame(GroupBox126); - previewFrame->setObjectName(QString::fromUtf8("previewFrame")); + previewFrame->setObjectName(QStringLiteral("previewFrame")); sizePolicy.setHeightForWidth(previewFrame->sizePolicy().hasHeightForWidth()); previewFrame->setSizePolicy(sizePolicy); @@ -197,7 +197,7 @@ public: vboxLayout->addWidget(GroupBox126); buttonBox = new QDialogButtonBox(qdesigner_internal__PaletteEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/passworddialog.ui.h b/tests/auto/tools/uic/baseline/passworddialog.ui.h index f6579dac7b..be763cf040 100644 --- a/tests/auto/tools/uic/baseline/passworddialog.ui.h +++ b/tests/auto/tools/uic/baseline/passworddialog.ui.h @@ -40,19 +40,19 @@ public: void setupUi(QDialog *PasswordDialog) { if (PasswordDialog->objectName().isEmpty()) - PasswordDialog->setObjectName(QString::fromUtf8("PasswordDialog")); + PasswordDialog->setObjectName(QStringLiteral("PasswordDialog")); PasswordDialog->resize(399, 148); gridLayout = new QGridLayout(PasswordDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); iconLabel = new QLabel(PasswordDialog); - iconLabel->setObjectName(QString::fromUtf8("iconLabel")); + iconLabel->setObjectName(QStringLiteral("iconLabel")); hboxLayout->addWidget(iconLabel); introLabel = new QLabel(PasswordDialog); - introLabel->setObjectName(QString::fromUtf8("introLabel")); + introLabel->setObjectName(QStringLiteral("introLabel")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -65,28 +65,28 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 2); label = new QLabel(PasswordDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 1, 0, 1, 1); userNameLineEdit = new QLineEdit(PasswordDialog); - userNameLineEdit->setObjectName(QString::fromUtf8("userNameLineEdit")); + userNameLineEdit->setObjectName(QStringLiteral("userNameLineEdit")); gridLayout->addWidget(userNameLineEdit, 1, 1, 1, 1); lblPassword = new QLabel(PasswordDialog); - lblPassword->setObjectName(QString::fromUtf8("lblPassword")); + lblPassword->setObjectName(QStringLiteral("lblPassword")); gridLayout->addWidget(lblPassword, 2, 0, 1, 1); passwordLineEdit = new QLineEdit(PasswordDialog); - passwordLineEdit->setObjectName(QString::fromUtf8("passwordLineEdit")); + passwordLineEdit->setObjectName(QStringLiteral("passwordLineEdit")); passwordLineEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordLineEdit, 2, 1, 1, 1); buttonBox = new QDialogButtonBox(PasswordDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/pathpage.ui.h b/tests/auto/tools/uic/baseline/pathpage.ui.h index 5edca08fac..8d75297ff4 100644 --- a/tests/auto/tools/uic/baseline/pathpage.ui.h +++ b/tests/auto/tools/uic/baseline/pathpage.ui.h @@ -42,12 +42,12 @@ public: void setupUi(QWidget *PathPage) { if (PathPage->objectName().isEmpty()) - PathPage->setObjectName(QString::fromUtf8("PathPage")); + PathPage->setObjectName(QStringLiteral("PathPage")); PathPage->resize(417, 243); gridLayout = new QGridLayout(PathPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label_2 = new QLabel(PathPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -57,7 +57,7 @@ public: gridLayout->addWidget(label_2, 0, 0, 1, 1); filterLineEdit = new QLineEdit(PathPage); - filterLineEdit->setObjectName(QString::fromUtf8("filterLineEdit")); + filterLineEdit->setObjectName(QStringLiteral("filterLineEdit")); gridLayout->addWidget(filterLineEdit, 0, 1, 1, 2); @@ -66,17 +66,17 @@ public: gridLayout->addItem(spacerItem, 1, 1, 1, 1); label = new QLabel(PathPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 2, 0, 1, 3); pathListWidget = new QListWidget(PathPage); - pathListWidget->setObjectName(QString::fromUtf8("pathListWidget")); + pathListWidget->setObjectName(QStringLiteral("pathListWidget")); gridLayout->addWidget(pathListWidget, 3, 0, 3, 3); addButton = new QPushButton(PathPage); - addButton->setObjectName(QString::fromUtf8("addButton")); + addButton->setObjectName(QStringLiteral("addButton")); QSizePolicy sizePolicy1(QSizePolicy::Maximum, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -86,7 +86,7 @@ public: gridLayout->addWidget(addButton, 3, 3, 1, 1); removeButton = new QPushButton(PathPage); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); sizePolicy1.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); removeButton->setSizePolicy(sizePolicy1); diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h index ad7f916f56..ecc7190ff1 100644 --- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h +++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h @@ -93,45 +93,45 @@ public: void setupUi(QDialog *PhraseBookBox) { if (PhraseBookBox->objectName().isEmpty()) - PhraseBookBox->setObjectName(QString::fromUtf8("PhraseBookBox")); + PhraseBookBox->setObjectName(QStringLiteral("PhraseBookBox")); PhraseBookBox->resize(596, 454); unnamed = new QHBoxLayout(PhraseBookBox); unnamed->setSpacing(6); unnamed->setContentsMargins(11, 11, 11, 11); - unnamed->setObjectName(QString::fromUtf8("unnamed")); + unnamed->setObjectName(QStringLiteral("unnamed")); inputsLayout = new QVBoxLayout(); inputsLayout->setSpacing(6); - inputsLayout->setObjectName(QString::fromUtf8("inputsLayout")); + inputsLayout->setObjectName(QStringLiteral("inputsLayout")); gridLayout = new QGridLayout(); gridLayout->setSpacing(6); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); target = new QLabel(PhraseBookBox); - target->setObjectName(QString::fromUtf8("target")); + target->setObjectName(QStringLiteral("target")); gridLayout->addWidget(target, 1, 0, 1, 1); targetLed = new QLineEdit(PhraseBookBox); - targetLed->setObjectName(QString::fromUtf8("targetLed")); + targetLed->setObjectName(QStringLiteral("targetLed")); gridLayout->addWidget(targetLed, 1, 1, 1, 1); source = new QLabel(PhraseBookBox); - source->setObjectName(QString::fromUtf8("source")); + source->setObjectName(QStringLiteral("source")); gridLayout->addWidget(source, 0, 0, 1, 1); definitionLed = new QLineEdit(PhraseBookBox); - definitionLed->setObjectName(QString::fromUtf8("definitionLed")); + definitionLed->setObjectName(QStringLiteral("definitionLed")); gridLayout->addWidget(definitionLed, 2, 1, 1, 1); sourceLed = new QLineEdit(PhraseBookBox); - sourceLed->setObjectName(QString::fromUtf8("sourceLed")); + sourceLed->setObjectName(QStringLiteral("sourceLed")); gridLayout->addWidget(sourceLed, 0, 1, 1, 1); definition = new QLabel(PhraseBookBox); - definition->setObjectName(QString::fromUtf8("definition")); + definition->setObjectName(QStringLiteral("definition")); gridLayout->addWidget(definition, 2, 0, 1, 1); @@ -139,7 +139,7 @@ public: inputsLayout->addLayout(gridLayout); phraseList = new QTreeView(PhraseBookBox); - phraseList->setObjectName(QString::fromUtf8("phraseList")); + phraseList->setObjectName(QStringLiteral("phraseList")); phraseList->setRootIsDecorated(false); phraseList->setUniformRowHeights(true); phraseList->setItemsExpandable(false); @@ -153,24 +153,24 @@ public: buttonLayout = new QVBoxLayout(); buttonLayout->setSpacing(6); - buttonLayout->setObjectName(QString::fromUtf8("buttonLayout")); + buttonLayout->setObjectName(QStringLiteral("buttonLayout")); newBut = new QPushButton(PhraseBookBox); - newBut->setObjectName(QString::fromUtf8("newBut")); + newBut->setObjectName(QStringLiteral("newBut")); buttonLayout->addWidget(newBut); removeBut = new QPushButton(PhraseBookBox); - removeBut->setObjectName(QString::fromUtf8("removeBut")); + removeBut->setObjectName(QStringLiteral("removeBut")); buttonLayout->addWidget(removeBut); saveBut = new QPushButton(PhraseBookBox); - saveBut->setObjectName(QString::fromUtf8("saveBut")); + saveBut->setObjectName(QStringLiteral("saveBut")); buttonLayout->addWidget(saveBut); closeBut = new QPushButton(PhraseBookBox); - closeBut->setObjectName(QString::fromUtf8("closeBut")); + closeBut->setObjectName(QStringLiteral("closeBut")); buttonLayout->addWidget(closeBut); diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h index 24453cb47c..770bb82b55 100644 --- a/tests/auto/tools/uic/baseline/plugindialog.ui.h +++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h @@ -80,39 +80,39 @@ public: void setupUi(QDialog *PluginDialog) { if (PluginDialog->objectName().isEmpty()) - PluginDialog->setObjectName(QString::fromUtf8("PluginDialog")); + PluginDialog->setObjectName(QStringLiteral("PluginDialog")); PluginDialog->resize(401, 331); vboxLayout = new QVBoxLayout(PluginDialog); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(8, 8, 8, 8); label = new QLabel(PluginDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(true); vboxLayout->addWidget(label); treeWidget = new QTreeWidget(PluginDialog); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); treeWidget->setTextElideMode(Qt::ElideNone); vboxLayout->addWidget(treeWidget); message = new QLabel(PluginDialog); - message->setObjectName(QString::fromUtf8("message")); + message->setObjectName(QStringLiteral("message")); message->setWordWrap(true); vboxLayout->addWidget(message); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(0, 0, 0, 0); vboxLayout->addLayout(hboxLayout); buttonBox = new QDialogButtonBox(PluginDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Close); diff --git a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h index 65ecc359b4..287ccd730d 100644 --- a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h +++ b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h @@ -57,21 +57,21 @@ public: void setupUi(QDialog *PreferencesDialog) { if (PreferencesDialog->objectName().isEmpty()) - PreferencesDialog->setObjectName(QString::fromUtf8("PreferencesDialog")); + PreferencesDialog->setObjectName(QStringLiteral("PreferencesDialog")); PreferencesDialog->resize(455, 359); PreferencesDialog->setModal(true); vboxLayout = new QVBoxLayout(PreferencesDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); vboxLayout1 = new QVBoxLayout(); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); m_uiModeGroupBox = new QGroupBox(PreferencesDialog); - m_uiModeGroupBox->setObjectName(QString::fromUtf8("m_uiModeGroupBox")); + m_uiModeGroupBox->setObjectName(QStringLiteral("m_uiModeGroupBox")); vboxLayout2 = new QVBoxLayout(m_uiModeGroupBox); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); m_uiModeCombo = new QComboBox(m_uiModeGroupBox); - m_uiModeCombo->setObjectName(QString::fromUtf8("m_uiModeCombo")); + m_uiModeCombo->setObjectName(QStringLiteral("m_uiModeCombo")); vboxLayout2->addWidget(m_uiModeCombo); @@ -79,12 +79,12 @@ public: vboxLayout1->addWidget(m_uiModeGroupBox); m_fontPanel = new FontPanel(PreferencesDialog); - m_fontPanel->setObjectName(QString::fromUtf8("m_fontPanel")); + m_fontPanel->setObjectName(QStringLiteral("m_fontPanel")); vboxLayout1->addWidget(m_fontPanel); m_previewConfigurationWidget = new qdesigner_internal::PreviewConfigurationWidget(PreferencesDialog); - m_previewConfigurationWidget->setObjectName(QString::fromUtf8("m_previewConfigurationWidget")); + m_previewConfigurationWidget->setObjectName(QStringLiteral("m_previewConfigurationWidget")); vboxLayout1->addWidget(m_previewConfigurationWidget); @@ -92,23 +92,23 @@ public: hboxLayout->addLayout(vboxLayout1); vboxLayout3 = new QVBoxLayout(); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); m_templatePathGroupBox = new QGroupBox(PreferencesDialog); - m_templatePathGroupBox->setObjectName(QString::fromUtf8("m_templatePathGroupBox")); + m_templatePathGroupBox->setObjectName(QStringLiteral("m_templatePathGroupBox")); gridLayout = new QGridLayout(m_templatePathGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); m_templatePathListWidget = new QListWidget(m_templatePathGroupBox); - m_templatePathListWidget->setObjectName(QString::fromUtf8("m_templatePathListWidget")); + m_templatePathListWidget->setObjectName(QStringLiteral("m_templatePathListWidget")); gridLayout->addWidget(m_templatePathListWidget, 0, 0, 1, 3); m_addTemplatePathButton = new QToolButton(m_templatePathGroupBox); - m_addTemplatePathButton->setObjectName(QString::fromUtf8("m_addTemplatePathButton")); + m_addTemplatePathButton->setObjectName(QStringLiteral("m_addTemplatePathButton")); gridLayout->addWidget(m_addTemplatePathButton, 1, 0, 1, 1); m_removeTemplatePathButton = new QToolButton(m_templatePathGroupBox); - m_removeTemplatePathButton->setObjectName(QString::fromUtf8("m_removeTemplatePathButton")); + m_removeTemplatePathButton->setObjectName(QStringLiteral("m_removeTemplatePathButton")); gridLayout->addWidget(m_removeTemplatePathButton, 1, 1, 1, 1); @@ -120,7 +120,7 @@ public: vboxLayout3->addWidget(m_templatePathGroupBox); m_gridPanel = new qdesigner_internal::GridPanel(PreferencesDialog); - m_gridPanel->setObjectName(QString::fromUtf8("m_gridPanel")); + m_gridPanel->setObjectName(QStringLiteral("m_gridPanel")); vboxLayout3->addWidget(m_gridPanel); @@ -131,14 +131,14 @@ public: vboxLayout->addLayout(hboxLayout); line = new QFrame(PreferencesDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(line); m_dialogButtonBox = new QDialogButtonBox(PreferencesDialog); - m_dialogButtonBox->setObjectName(QString::fromUtf8("m_dialogButtonBox")); + m_dialogButtonBox->setObjectName(QStringLiteral("m_dialogButtonBox")); m_dialogButtonBox->setOrientation(Qt::Horizontal); m_dialogButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h index 3392d6f220..1bdf1a049b 100644 --- a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h +++ b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h @@ -44,40 +44,40 @@ public: void setupUi(QGroupBox *PreviewConfigurationWidget) { if (PreviewConfigurationWidget->objectName().isEmpty()) - PreviewConfigurationWidget->setObjectName(QString::fromUtf8("PreviewConfigurationWidget")); + PreviewConfigurationWidget->setObjectName(QStringLiteral("PreviewConfigurationWidget")); PreviewConfigurationWidget->setCheckable(true); formLayout = new QFormLayout(PreviewConfigurationWidget); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); m_styleLabel = new QLabel(PreviewConfigurationWidget); - m_styleLabel->setObjectName(QString::fromUtf8("m_styleLabel")); + m_styleLabel->setObjectName(QStringLiteral("m_styleLabel")); formLayout->setWidget(0, QFormLayout::LabelRole, m_styleLabel); m_styleCombo = new QComboBox(PreviewConfigurationWidget); - m_styleCombo->setObjectName(QString::fromUtf8("m_styleCombo")); + m_styleCombo->setObjectName(QStringLiteral("m_styleCombo")); formLayout->setWidget(0, QFormLayout::FieldRole, m_styleCombo); m_appStyleSheetLabel = new QLabel(PreviewConfigurationWidget); - m_appStyleSheetLabel->setObjectName(QString::fromUtf8("m_appStyleSheetLabel")); + m_appStyleSheetLabel->setObjectName(QStringLiteral("m_appStyleSheetLabel")); formLayout->setWidget(1, QFormLayout::LabelRole, m_appStyleSheetLabel); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); m_appStyleSheetLineEdit = new qdesigner_internal::TextPropertyEditor(PreviewConfigurationWidget); - m_appStyleSheetLineEdit->setObjectName(QString::fromUtf8("m_appStyleSheetLineEdit")); + m_appStyleSheetLineEdit->setObjectName(QStringLiteral("m_appStyleSheetLineEdit")); m_appStyleSheetLineEdit->setMinimumSize(QSize(149, 0)); hboxLayout->addWidget(m_appStyleSheetLineEdit); m_appStyleSheetChangeButton = new QToolButton(PreviewConfigurationWidget); - m_appStyleSheetChangeButton->setObjectName(QString::fromUtf8("m_appStyleSheetChangeButton")); + m_appStyleSheetChangeButton->setObjectName(QStringLiteral("m_appStyleSheetChangeButton")); hboxLayout->addWidget(m_appStyleSheetChangeButton); m_appStyleSheetClearButton = new QToolButton(PreviewConfigurationWidget); - m_appStyleSheetClearButton->setObjectName(QString::fromUtf8("m_appStyleSheetClearButton")); + m_appStyleSheetClearButton->setObjectName(QStringLiteral("m_appStyleSheetClearButton")); hboxLayout->addWidget(m_appStyleSheetClearButton); @@ -85,19 +85,19 @@ public: formLayout->setLayout(1, QFormLayout::FieldRole, hboxLayout); m_skinLabel = new QLabel(PreviewConfigurationWidget); - m_skinLabel->setObjectName(QString::fromUtf8("m_skinLabel")); + m_skinLabel->setObjectName(QStringLiteral("m_skinLabel")); formLayout->setWidget(2, QFormLayout::LabelRole, m_skinLabel); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); m_skinCombo = new QComboBox(PreviewConfigurationWidget); - m_skinCombo->setObjectName(QString::fromUtf8("m_skinCombo")); + m_skinCombo->setObjectName(QStringLiteral("m_skinCombo")); hboxLayout1->addWidget(m_skinCombo); m_skinRemoveButton = new QToolButton(PreviewConfigurationWidget); - m_skinRemoveButton->setObjectName(QString::fromUtf8("m_skinRemoveButton")); + m_skinRemoveButton->setObjectName(QStringLiteral("m_skinRemoveButton")); hboxLayout1->addWidget(m_skinRemoveButton); diff --git a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h index 43cd278d55..c577324b5e 100644 --- a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h +++ b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h @@ -48,7 +48,7 @@ public: void setupUi(QDialog *PreviewDialogBase) { if (PreviewDialogBase->objectName().isEmpty()) - PreviewDialogBase->setObjectName(QString::fromUtf8("PreviewDialogBase")); + PreviewDialogBase->setObjectName(QStringLiteral("PreviewDialogBase")); PreviewDialogBase->resize(733, 479); vboxLayout = new QVBoxLayout(PreviewDialogBase); #ifndef Q_OS_MAC @@ -57,7 +57,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -65,14 +65,14 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(PreviewDialogBase); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout->addWidget(label); paperSizeCombo = new QComboBox(PreviewDialogBase); - paperSizeCombo->setObjectName(QString::fromUtf8("paperSizeCombo")); + paperSizeCombo->setObjectName(QStringLiteral("paperSizeCombo")); QSizePolicy sizePolicy(static_cast(1), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -82,12 +82,12 @@ public: hboxLayout->addWidget(paperSizeCombo); label_2 = new QLabel(PreviewDialogBase); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout->addWidget(label_2); paperOrientationCombo = new QComboBox(PreviewDialogBase); - paperOrientationCombo->setObjectName(QString::fromUtf8("paperOrientationCombo")); + paperOrientationCombo->setObjectName(QStringLiteral("paperOrientationCombo")); sizePolicy.setHeightForWidth(paperOrientationCombo->sizePolicy().hasHeightForWidth()); paperOrientationCombo->setSizePolicy(sizePolicy); @@ -105,9 +105,9 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); pageList = new QTreeWidget(PreviewDialogBase); - pageList->setObjectName(QString::fromUtf8("pageList")); + pageList->setObjectName(QStringLiteral("pageList")); pageList->setIndentation(0); pageList->setRootIsDecorated(false); pageList->setUniformRowHeights(true); @@ -117,7 +117,7 @@ public: hboxLayout1->addWidget(pageList); previewArea = new QScrollArea(PreviewDialogBase); - previewArea->setObjectName(QString::fromUtf8("previewArea")); + previewArea->setObjectName(QStringLiteral("previewArea")); QSizePolicy sizePolicy1(static_cast(5), static_cast(5)); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); @@ -134,9 +134,9 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(0, 0, 0, 0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); progressBar = new QProgressBar(PreviewDialogBase); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName(QStringLiteral("progressBar")); progressBar->setEnabled(false); QSizePolicy sizePolicy2(static_cast(7), static_cast(0)); sizePolicy2.setHorizontalStretch(1); @@ -150,7 +150,7 @@ public: hboxLayout2->addWidget(progressBar); buttonBox = new QDialogButtonBox(PreviewDialogBase); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h index 9fd79688f2..9997353ac8 100644 --- a/tests/auto/tools/uic/baseline/previewwidget.ui.h +++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h @@ -107,7 +107,7 @@ public: void setupUi(QWidget *qdesigner_internal__PreviewWidget) { if (qdesigner_internal__PreviewWidget->objectName().isEmpty()) - qdesigner_internal__PreviewWidget->setObjectName(QString::fromUtf8("qdesigner_internal__PreviewWidget")); + qdesigner_internal__PreviewWidget->setObjectName(QStringLiteral("qdesigner_internal__PreviewWidget")); qdesigner_internal__PreviewWidget->resize(471, 251); QSizePolicy sizePolicy(static_cast(1), static_cast(1)); sizePolicy.setHorizontalStretch(0); @@ -121,7 +121,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -129,14 +129,14 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); LineEdit1 = new QLineEdit(qdesigner_internal__PreviewWidget); - LineEdit1->setObjectName(QString::fromUtf8("LineEdit1")); + LineEdit1->setObjectName(QStringLiteral("LineEdit1")); vboxLayout->addWidget(LineEdit1); ComboBox1 = new QComboBox(qdesigner_internal__PreviewWidget); - ComboBox1->setObjectName(QString::fromUtf8("ComboBox1")); + ComboBox1->setObjectName(QStringLiteral("ComboBox1")); vboxLayout->addWidget(ComboBox1); @@ -145,14 +145,14 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); SpinBox1 = new QSpinBox(qdesigner_internal__PreviewWidget); - SpinBox1->setObjectName(QString::fromUtf8("SpinBox1")); + SpinBox1->setObjectName(QStringLiteral("SpinBox1")); hboxLayout->addWidget(SpinBox1); PushButton1 = new QPushButton(qdesigner_internal__PreviewWidget); - PushButton1->setObjectName(QString::fromUtf8("PushButton1")); + PushButton1->setObjectName(QStringLiteral("PushButton1")); hboxLayout->addWidget(PushButton1); @@ -160,19 +160,19 @@ public: vboxLayout->addLayout(hboxLayout); ScrollBar1 = new QScrollBar(qdesigner_internal__PreviewWidget); - ScrollBar1->setObjectName(QString::fromUtf8("ScrollBar1")); + ScrollBar1->setObjectName(QStringLiteral("ScrollBar1")); ScrollBar1->setOrientation(Qt::Horizontal); vboxLayout->addWidget(ScrollBar1); Slider1 = new QSlider(qdesigner_internal__PreviewWidget); - Slider1->setObjectName(QString::fromUtf8("Slider1")); + Slider1->setObjectName(QStringLiteral("Slider1")); Slider1->setOrientation(Qt::Horizontal); vboxLayout->addWidget(Slider1); listWidget = new QListWidget(qdesigner_internal__PreviewWidget); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); listWidget->setMaximumSize(QSize(32767, 50)); vboxLayout->addWidget(listWidget); @@ -185,13 +185,13 @@ public: gridLayout->addItem(spacerItem, 3, 0, 1, 2); ProgressBar1 = new QProgressBar(qdesigner_internal__PreviewWidget); - ProgressBar1->setObjectName(QString::fromUtf8("ProgressBar1")); + ProgressBar1->setObjectName(QStringLiteral("ProgressBar1")); ProgressBar1->setOrientation(Qt::Horizontal); gridLayout->addWidget(ProgressBar1, 2, 0, 1, 1); ButtonGroup2 = new QGroupBox(qdesigner_internal__PreviewWidget); - ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2")); + ButtonGroup2->setObjectName(QStringLiteral("ButtonGroup2")); vboxLayout1 = new QVBoxLayout(ButtonGroup2); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -199,15 +199,15 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); CheckBox1 = new QCheckBox(ButtonGroup2); - CheckBox1->setObjectName(QString::fromUtf8("CheckBox1")); + CheckBox1->setObjectName(QStringLiteral("CheckBox1")); CheckBox1->setChecked(true); vboxLayout1->addWidget(CheckBox1); CheckBox2 = new QCheckBox(ButtonGroup2); - CheckBox2->setObjectName(QString::fromUtf8("CheckBox2")); + CheckBox2->setObjectName(QStringLiteral("CheckBox2")); vboxLayout1->addWidget(CheckBox2); @@ -215,7 +215,7 @@ public: gridLayout->addWidget(ButtonGroup2, 1, 0, 1, 1); ButtonGroup1 = new QGroupBox(qdesigner_internal__PreviewWidget); - ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1")); + ButtonGroup1->setObjectName(QStringLiteral("ButtonGroup1")); vboxLayout2 = new QVBoxLayout(ButtonGroup1); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); @@ -223,20 +223,20 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); RadioButton1 = new QRadioButton(ButtonGroup1); - RadioButton1->setObjectName(QString::fromUtf8("RadioButton1")); + RadioButton1->setObjectName(QStringLiteral("RadioButton1")); RadioButton1->setChecked(true); vboxLayout2->addWidget(RadioButton1); RadioButton2 = new QRadioButton(ButtonGroup1); - RadioButton2->setObjectName(QString::fromUtf8("RadioButton2")); + RadioButton2->setObjectName(QStringLiteral("RadioButton2")); vboxLayout2->addWidget(RadioButton2); RadioButton3 = new QRadioButton(ButtonGroup1); - RadioButton3->setObjectName(QString::fromUtf8("RadioButton3")); + RadioButton3->setObjectName(QStringLiteral("RadioButton3")); vboxLayout2->addWidget(RadioButton3); diff --git a/tests/auto/tools/uic/baseline/proxy.ui.h b/tests/auto/tools/uic/baseline/proxy.ui.h index 592f1a91e3..9be6b97b81 100644 --- a/tests/auto/tools/uic/baseline/proxy.ui.h +++ b/tests/auto/tools/uic/baseline/proxy.ui.h @@ -38,44 +38,44 @@ public: void setupUi(QDialog *ProxyDialog) { if (ProxyDialog->objectName().isEmpty()) - ProxyDialog->setObjectName(QString::fromUtf8("ProxyDialog")); + ProxyDialog->setObjectName(QStringLiteral("ProxyDialog")); ProxyDialog->resize(369, 144); gridLayout = new QGridLayout(ProxyDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); iconLabel = new QLabel(ProxyDialog); - iconLabel->setObjectName(QString::fromUtf8("iconLabel")); + iconLabel->setObjectName(QStringLiteral("iconLabel")); gridLayout->addWidget(iconLabel, 0, 0, 1, 1); introLabel = new QLabel(ProxyDialog); - introLabel->setObjectName(QString::fromUtf8("introLabel")); + introLabel->setObjectName(QStringLiteral("introLabel")); introLabel->setWordWrap(true); gridLayout->addWidget(introLabel, 0, 1, 1, 2); usernameLabel = new QLabel(ProxyDialog); - usernameLabel->setObjectName(QString::fromUtf8("usernameLabel")); + usernameLabel->setObjectName(QStringLiteral("usernameLabel")); gridLayout->addWidget(usernameLabel, 1, 0, 1, 2); userNameLineEdit = new QLineEdit(ProxyDialog); - userNameLineEdit->setObjectName(QString::fromUtf8("userNameLineEdit")); + userNameLineEdit->setObjectName(QStringLiteral("userNameLineEdit")); gridLayout->addWidget(userNameLineEdit, 1, 2, 1, 1); passwordLabel = new QLabel(ProxyDialog); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName(QStringLiteral("passwordLabel")); gridLayout->addWidget(passwordLabel, 2, 0, 1, 2); passwordLineEdit = new QLineEdit(ProxyDialog); - passwordLineEdit->setObjectName(QString::fromUtf8("passwordLineEdit")); + passwordLineEdit->setObjectName(QStringLiteral("passwordLineEdit")); passwordLineEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordLineEdit, 2, 2, 1, 1); buttonBox = new QDialogButtonBox(ProxyDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h index 62030018cb..848e07db97 100644 --- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h +++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h @@ -108,20 +108,20 @@ public: void setupUi(QDialog *QFileDialog) { if (QFileDialog->objectName().isEmpty()) - QFileDialog->setObjectName(QString::fromUtf8("QFileDialog")); + QFileDialog->setObjectName(QStringLiteral("QFileDialog")); QFileDialog->resize(521, 316); QFileDialog->setSizeGripEnabled(true); gridLayout = new QGridLayout(QFileDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); lookInLabel = new QLabel(QFileDialog); - lookInLabel->setObjectName(QString::fromUtf8("lookInLabel")); + lookInLabel->setObjectName(QStringLiteral("lookInLabel")); gridLayout->addWidget(lookInLabel, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); lookInCombo = new QFileDialogComboBox(QFileDialog); - lookInCombo->setObjectName(QString::fromUtf8("lookInCombo")); + lookInCombo->setObjectName(QStringLiteral("lookInCombo")); QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(1); sizePolicy.setVerticalStretch(0); @@ -132,32 +132,32 @@ public: hboxLayout->addWidget(lookInCombo); backButton = new QToolButton(QFileDialog); - backButton->setObjectName(QString::fromUtf8("backButton")); + backButton->setObjectName(QStringLiteral("backButton")); hboxLayout->addWidget(backButton); forwardButton = new QToolButton(QFileDialog); - forwardButton->setObjectName(QString::fromUtf8("forwardButton")); + forwardButton->setObjectName(QStringLiteral("forwardButton")); hboxLayout->addWidget(forwardButton); toParentButton = new QToolButton(QFileDialog); - toParentButton->setObjectName(QString::fromUtf8("toParentButton")); + toParentButton->setObjectName(QStringLiteral("toParentButton")); hboxLayout->addWidget(toParentButton); newFolderButton = new QToolButton(QFileDialog); - newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + newFolderButton->setObjectName(QStringLiteral("newFolderButton")); hboxLayout->addWidget(newFolderButton); listModeButton = new QToolButton(QFileDialog); - listModeButton->setObjectName(QString::fromUtf8("listModeButton")); + listModeButton->setObjectName(QStringLiteral("listModeButton")); hboxLayout->addWidget(listModeButton); detailModeButton = new QToolButton(QFileDialog); - detailModeButton->setObjectName(QString::fromUtf8("detailModeButton")); + detailModeButton->setObjectName(QStringLiteral("detailModeButton")); hboxLayout->addWidget(detailModeButton); @@ -165,7 +165,7 @@ public: gridLayout->addLayout(hboxLayout, 0, 1, 1, 2); splitter = new QSplitter(QFileDialog); - splitter->setObjectName(QString::fromUtf8("splitter")); + splitter->setObjectName(QStringLiteral("splitter")); QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -173,38 +173,38 @@ public: splitter->setSizePolicy(sizePolicy1); splitter->setOrientation(Qt::Horizontal); sidebar = new QSidebar(splitter); - sidebar->setObjectName(QString::fromUtf8("sidebar")); + sidebar->setObjectName(QStringLiteral("sidebar")); splitter->addWidget(sidebar); frame = new QFrame(splitter); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName(QStringLiteral("frame")); frame->setFrameShape(QFrame::NoFrame); frame->setFrameShadow(QFrame::Raised); vboxLayout = new QVBoxLayout(frame); vboxLayout->setSpacing(0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); stackedWidget = new QStackedWidget(frame); - stackedWidget->setObjectName(QString::fromUtf8("stackedWidget")); + stackedWidget->setObjectName(QStringLiteral("stackedWidget")); page = new QWidget(); - page->setObjectName(QString::fromUtf8("page")); + page->setObjectName(QStringLiteral("page")); vboxLayout1 = new QVBoxLayout(page); vboxLayout1->setSpacing(0); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(0, 0, 0, 0); listView = new QFileDialogListView(page); - listView->setObjectName(QString::fromUtf8("listView")); + listView->setObjectName(QStringLiteral("listView")); vboxLayout1->addWidget(listView); stackedWidget->addWidget(page); page_2 = new QWidget(); - page_2->setObjectName(QString::fromUtf8("page_2")); + page_2->setObjectName(QStringLiteral("page_2")); vboxLayout2 = new QVBoxLayout(page_2); vboxLayout2->setSpacing(0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(0, 0, 0, 0); treeView = new QFileDialogTreeView(page_2); - treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setObjectName(QStringLiteral("treeView")); vboxLayout2->addWidget(treeView); @@ -217,7 +217,7 @@ public: gridLayout->addWidget(splitter, 1, 0, 1, 3); fileNameLabel = new QLabel(QFileDialog); - fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); + fileNameLabel->setObjectName(QStringLiteral("fileNameLabel")); QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); @@ -228,7 +228,7 @@ public: gridLayout->addWidget(fileNameLabel, 2, 0, 1, 1); fileNameEdit = new QFileDialogLineEdit(QFileDialog); - fileNameEdit->setObjectName(QString::fromUtf8("fileNameEdit")); + fileNameEdit->setObjectName(QStringLiteral("fileNameEdit")); QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy3.setHorizontalStretch(1); sizePolicy3.setVerticalStretch(0); @@ -238,14 +238,14 @@ public: gridLayout->addWidget(fileNameEdit, 2, 1, 1, 1); buttonBox = new QDialogButtonBox(QFileDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Vertical); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 2, 2, 2, 1); fileTypeLabel = new QLabel(QFileDialog); - fileTypeLabel->setObjectName(QString::fromUtf8("fileTypeLabel")); + fileTypeLabel->setObjectName(QStringLiteral("fileTypeLabel")); QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); @@ -255,7 +255,7 @@ public: gridLayout->addWidget(fileTypeLabel, 3, 0, 1, 1); fileTypeCombo = new QComboBox(QFileDialog); - fileTypeCombo->setObjectName(QString::fromUtf8("fileTypeCombo")); + fileTypeCombo->setObjectName(QStringLiteral("fileTypeCombo")); QSizePolicy sizePolicy5(QSizePolicy::Expanding, QSizePolicy::Fixed); sizePolicy5.setHorizontalStretch(0); sizePolicy5.setVerticalStretch(0); diff --git a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h index 8e0cc0a82a..5a14eafc90 100644 --- a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h +++ b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h @@ -73,15 +73,15 @@ public: void setupUi(QWidget *QPageSetupWidget) { if (QPageSetupWidget->objectName().isEmpty()) - QPageSetupWidget->setObjectName(QString::fromUtf8("QPageSetupWidget")); + QPageSetupWidget->setObjectName(QStringLiteral("QPageSetupWidget")); QPageSetupWidget->resize(416, 488); gridLayout_3 = new QGridLayout(QPageSetupWidget); gridLayout_3->setContentsMargins(0, 0, 0, 0); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName(QStringLiteral("gridLayout_3")); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); unit = new QComboBox(QPageSetupWidget); - unit->setObjectName(QString::fromUtf8("unit")); + unit->setObjectName(QStringLiteral("unit")); horizontalLayout_4->addWidget(unit); @@ -93,39 +93,39 @@ public: gridLayout_3->addLayout(horizontalLayout_4, 0, 0, 1, 2); groupBox_2 = new QGroupBox(QPageSetupWidget); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); gridLayout_2 = new QGridLayout(groupBox_2); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); pageSizeLabel = new QLabel(groupBox_2); - pageSizeLabel->setObjectName(QString::fromUtf8("pageSizeLabel")); + pageSizeLabel->setObjectName(QStringLiteral("pageSizeLabel")); gridLayout_2->addWidget(pageSizeLabel, 0, 0, 1, 1); paperSize = new QComboBox(groupBox_2); - paperSize->setObjectName(QString::fromUtf8("paperSize")); + paperSize->setObjectName(QStringLiteral("paperSize")); gridLayout_2->addWidget(paperSize, 0, 1, 1, 1); widthLabel = new QLabel(groupBox_2); - widthLabel->setObjectName(QString::fromUtf8("widthLabel")); + widthLabel->setObjectName(QStringLiteral("widthLabel")); gridLayout_2->addWidget(widthLabel, 1, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); paperWidth = new QDoubleSpinBox(groupBox_2); - paperWidth->setObjectName(QString::fromUtf8("paperWidth")); + paperWidth->setObjectName(QStringLiteral("paperWidth")); paperWidth->setMaximum(9999.99); horizontalLayout_3->addWidget(paperWidth); heightLabel = new QLabel(groupBox_2); - heightLabel->setObjectName(QString::fromUtf8("heightLabel")); + heightLabel->setObjectName(QStringLiteral("heightLabel")); horizontalLayout_3->addWidget(heightLabel); paperHeight = new QDoubleSpinBox(groupBox_2); - paperHeight->setObjectName(QString::fromUtf8("paperHeight")); + paperHeight->setObjectName(QStringLiteral("paperHeight")); paperHeight->setMaximum(9999.99); horizontalLayout_3->addWidget(paperHeight); @@ -134,12 +134,12 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 1, 1, 1); paperSourceLabel = new QLabel(groupBox_2); - paperSourceLabel->setObjectName(QString::fromUtf8("paperSourceLabel")); + paperSourceLabel->setObjectName(QStringLiteral("paperSourceLabel")); gridLayout_2->addWidget(paperSourceLabel, 2, 0, 1, 1); paperSource = new QComboBox(groupBox_2); - paperSource->setObjectName(QString::fromUtf8("paperSource")); + paperSource->setObjectName(QStringLiteral("paperSource")); gridLayout_2->addWidget(paperSource, 2, 1, 1, 1); @@ -151,27 +151,27 @@ public: gridLayout_3->addWidget(groupBox_2, 1, 0, 1, 2); groupBox_3 = new QGroupBox(QPageSetupWidget); - groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + groupBox_3->setObjectName(QStringLiteral("groupBox_3")); verticalLayout = new QVBoxLayout(groupBox_3); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); portrait = new QRadioButton(groupBox_3); - portrait->setObjectName(QString::fromUtf8("portrait")); + portrait->setObjectName(QStringLiteral("portrait")); portrait->setChecked(true); verticalLayout->addWidget(portrait); landscape = new QRadioButton(groupBox_3); - landscape->setObjectName(QString::fromUtf8("landscape")); + landscape->setObjectName(QStringLiteral("landscape")); verticalLayout->addWidget(landscape); reverseLandscape = new QRadioButton(groupBox_3); - reverseLandscape->setObjectName(QString::fromUtf8("reverseLandscape")); + reverseLandscape->setObjectName(QStringLiteral("reverseLandscape")); verticalLayout->addWidget(reverseLandscape); reversePortrait = new QRadioButton(groupBox_3); - reversePortrait->setObjectName(QString::fromUtf8("reversePortrait")); + reversePortrait->setObjectName(QStringLiteral("reversePortrait")); verticalLayout->addWidget(reversePortrait); @@ -183,31 +183,31 @@ public: gridLayout_3->addWidget(groupBox_3, 2, 0, 1, 1); preview = new QWidget(QPageSetupWidget); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName(QStringLiteral("preview")); gridLayout_3->addWidget(preview, 2, 1, 2, 1); groupBox = new QGroupBox(QPageSetupWidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); horizontalLayout_2 = new QHBoxLayout(groupBox); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); topMargin = new QDoubleSpinBox(groupBox); - topMargin->setObjectName(QString::fromUtf8("topMargin")); + topMargin->setObjectName(QStringLiteral("topMargin")); topMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); topMargin->setMaximum(999.99); gridLayout->addWidget(topMargin, 0, 1, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); horizontalSpacer_7 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); horizontalLayout->addItem(horizontalSpacer_7); leftMargin = new QDoubleSpinBox(groupBox); - leftMargin->setObjectName(QString::fromUtf8("leftMargin")); + leftMargin->setObjectName(QStringLiteral("leftMargin")); leftMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); leftMargin->setMaximum(999.99); @@ -218,7 +218,7 @@ public: horizontalLayout->addItem(horizontalSpacer); rightMargin = new QDoubleSpinBox(groupBox); - rightMargin->setObjectName(QString::fromUtf8("rightMargin")); + rightMargin->setObjectName(QStringLiteral("rightMargin")); rightMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); rightMargin->setMaximum(999.99); @@ -232,7 +232,7 @@ public: gridLayout->addLayout(horizontalLayout, 1, 0, 1, 3); bottomMargin = new QDoubleSpinBox(groupBox); - bottomMargin->setObjectName(QString::fromUtf8("bottomMargin")); + bottomMargin->setObjectName(QStringLiteral("bottomMargin")); bottomMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); bottomMargin->setMaximum(999.99); diff --git a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h index dd9b68f1c4..5cf337e75e 100644 --- a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h +++ b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h @@ -39,30 +39,30 @@ public: void setupUi(QWidget *QPrintPropertiesWidget) { if (QPrintPropertiesWidget->objectName().isEmpty()) - QPrintPropertiesWidget->setObjectName(QString::fromUtf8("QPrintPropertiesWidget")); + QPrintPropertiesWidget->setObjectName(QStringLiteral("QPrintPropertiesWidget")); QPrintPropertiesWidget->resize(396, 288); verticalLayout_4 = new QVBoxLayout(QPrintPropertiesWidget); verticalLayout_4->setContentsMargins(0, 0, 0, 0); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + verticalLayout_4->setObjectName(QStringLiteral("verticalLayout_4")); tabs = new QTabWidget(QPrintPropertiesWidget); - tabs->setObjectName(QString::fromUtf8("tabs")); + tabs->setObjectName(QStringLiteral("tabs")); tabPage = new QWidget(); - tabPage->setObjectName(QString::fromUtf8("tabPage")); + tabPage->setObjectName(QStringLiteral("tabPage")); tabPage->setGeometry(QRect(0, 0, 392, 261)); horizontalLayout = new QHBoxLayout(tabPage); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); pageSetup = new QPageSetupWidget(tabPage); - pageSetup->setObjectName(QString::fromUtf8("pageSetup")); + pageSetup->setObjectName(QStringLiteral("pageSetup")); horizontalLayout->addWidget(pageSetup); tabs->addTab(tabPage, QString()); cupsPropertiesPage = new QWidget(); - cupsPropertiesPage->setObjectName(QString::fromUtf8("cupsPropertiesPage")); + cupsPropertiesPage->setObjectName(QStringLiteral("cupsPropertiesPage")); horizontalLayout_2 = new QHBoxLayout(cupsPropertiesPage); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); treeView = new QTreeView(cupsPropertiesPage); - treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setObjectName(QStringLiteral("treeView")); treeView->setAlternatingRowColors(true); horizontalLayout_2->addWidget(treeView); diff --git a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h index 2051c8b04d..b10e44725b 100644 --- a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h +++ b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h @@ -74,20 +74,20 @@ public: void setupUi(QWidget *QPrintSettingsOutput) { if (QPrintSettingsOutput->objectName().isEmpty()) - QPrintSettingsOutput->setObjectName(QString::fromUtf8("QPrintSettingsOutput")); + QPrintSettingsOutput->setObjectName(QStringLiteral("QPrintSettingsOutput")); QPrintSettingsOutput->resize(416, 166); horizontalLayout_2 = new QHBoxLayout(QPrintSettingsOutput); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); tabs = new QTabWidget(QPrintSettingsOutput); - tabs->setObjectName(QString::fromUtf8("tabs")); + tabs->setObjectName(QStringLiteral("tabs")); copiesTab = new QWidget(); - copiesTab->setObjectName(QString::fromUtf8("copiesTab")); + copiesTab->setObjectName(QStringLiteral("copiesTab")); copiesTab->setGeometry(QRect(0, 0, 412, 139)); horizontalLayout = new QHBoxLayout(copiesTab); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); gbPrintRange = new QGroupBox(copiesTab); - gbPrintRange->setObjectName(QString::fromUtf8("gbPrintRange")); + gbPrintRange->setObjectName(QStringLiteral("gbPrintRange")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -96,9 +96,9 @@ public: _3 = new QVBoxLayout(gbPrintRange); _3->setSpacing(4); _3->setContentsMargins(6, 6, 6, 6); - _3->setObjectName(QString::fromUtf8("_3")); + _3->setObjectName(QStringLiteral("_3")); printAll = new QRadioButton(gbPrintRange); - printAll->setObjectName(QString::fromUtf8("printAll")); + printAll->setObjectName(QStringLiteral("printAll")); printAll->setChecked(true); _3->addWidget(printAll); @@ -108,14 +108,14 @@ public: _4->setSpacing(6); #endif _4->setContentsMargins(0, 0, 0, 0); - _4->setObjectName(QString::fromUtf8("_4")); + _4->setObjectName(QStringLiteral("_4")); printRange = new QRadioButton(gbPrintRange); - printRange->setObjectName(QString::fromUtf8("printRange")); + printRange->setObjectName(QStringLiteral("printRange")); _4->addWidget(printRange); from = new QSpinBox(gbPrintRange); - from->setObjectName(QString::fromUtf8("from")); + from->setObjectName(QStringLiteral("from")); from->setEnabled(false); from->setMinimum(1); from->setMaximum(999); @@ -123,12 +123,12 @@ public: _4->addWidget(from); label_3 = new QLabel(gbPrintRange); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); _4->addWidget(label_3); to = new QSpinBox(gbPrintRange); - to->setObjectName(QString::fromUtf8("to")); + to->setObjectName(QStringLiteral("to")); to->setEnabled(false); to->setMinimum(1); to->setMaximum(999); @@ -143,7 +143,7 @@ public: _3->addLayout(_4); printSelection = new QRadioButton(gbPrintRange); - printSelection->setObjectName(QString::fromUtf8("printSelection")); + printSelection->setObjectName(QStringLiteral("printSelection")); _3->addWidget(printSelection); @@ -155,16 +155,16 @@ public: horizontalLayout->addWidget(gbPrintRange); groupBox = new QGroupBox(copiesTab); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); copies = new QSpinBox(groupBox); - copies->setObjectName(QString::fromUtf8("copies")); + copies->setObjectName(QStringLiteral("copies")); copies->setMinimum(1); copies->setMaximum(999); @@ -175,12 +175,12 @@ public: gridLayout->addItem(horizontalSpacer, 0, 3, 1, 1); collate = new QCheckBox(groupBox); - collate->setObjectName(QString::fromUtf8("collate")); + collate->setObjectName(QStringLiteral("collate")); gridLayout->addWidget(collate, 1, 0, 1, 2); outputIcon = new QLabel(groupBox); - outputIcon->setObjectName(QString::fromUtf8("outputIcon")); + outputIcon->setObjectName(QStringLiteral("outputIcon")); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Ignored); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -190,7 +190,7 @@ public: gridLayout->addWidget(outputIcon, 1, 2, 2, 2); reverse = new QCheckBox(groupBox); - reverse->setObjectName(QString::fromUtf8("reverse")); + reverse->setObjectName(QStringLiteral("reverse")); gridLayout->addWidget(reverse, 2, 0, 1, 2); @@ -203,30 +203,30 @@ public: tabs->addTab(copiesTab, QString()); optionsTab = new QWidget(); - optionsTab->setObjectName(QString::fromUtf8("optionsTab")); + optionsTab->setObjectName(QStringLiteral("optionsTab")); optionsTab->setGeometry(QRect(0, 0, 412, 139)); gridLayout_2 = new QGridLayout(optionsTab); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); colorMode = new QGroupBox(optionsTab); - colorMode->setObjectName(QString::fromUtf8("colorMode")); + colorMode->setObjectName(QStringLiteral("colorMode")); gridLayout_4 = new QGridLayout(colorMode); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout_4->setObjectName(QStringLiteral("gridLayout_4")); verticalSpacer_6 = new QSpacerItem(1, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); gridLayout_4->addItem(verticalSpacer_6, 2, 0, 1, 1); color = new QRadioButton(colorMode); - color->setObjectName(QString::fromUtf8("color")); + color->setObjectName(QStringLiteral("color")); gridLayout_4->addWidget(color, 0, 0, 1, 1); colorIcon = new QLabel(colorMode); - colorIcon->setObjectName(QString::fromUtf8("colorIcon")); + colorIcon->setObjectName(QStringLiteral("colorIcon")); gridLayout_4->addWidget(colorIcon, 0, 1, 3, 1); grayscale = new QRadioButton(colorMode); - grayscale->setObjectName(QString::fromUtf8("grayscale")); + grayscale->setObjectName(QStringLiteral("grayscale")); gridLayout_4->addWidget(grayscale, 1, 0, 1, 1); @@ -234,22 +234,22 @@ public: gridLayout_2->addWidget(colorMode, 0, 1, 1, 1); duplex = new QGroupBox(optionsTab); - duplex->setObjectName(QString::fromUtf8("duplex")); + duplex->setObjectName(QStringLiteral("duplex")); verticalLayout = new QVBoxLayout(duplex); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); noDuplex = new QRadioButton(duplex); - noDuplex->setObjectName(QString::fromUtf8("noDuplex")); + noDuplex->setObjectName(QStringLiteral("noDuplex")); noDuplex->setChecked(true); verticalLayout->addWidget(noDuplex); duplexLong = new QRadioButton(duplex); - duplexLong->setObjectName(QString::fromUtf8("duplexLong")); + duplexLong->setObjectName(QStringLiteral("duplexLong")); verticalLayout->addWidget(duplexLong); duplexShort = new QRadioButton(duplex); - duplexShort->setObjectName(QString::fromUtf8("duplexShort")); + duplexShort->setObjectName(QStringLiteral("duplexShort")); verticalLayout->addWidget(duplexShort); diff --git a/tests/auto/tools/uic/baseline/qprintwidget.ui.h b/tests/auto/tools/uic/baseline/qprintwidget.ui.h index 6389b61fc2..206556cb1b 100644 --- a/tests/auto/tools/uic/baseline/qprintwidget.ui.h +++ b/tests/auto/tools/uic/baseline/qprintwidget.ui.h @@ -50,22 +50,22 @@ public: void setupUi(QWidget *QPrintWidget) { if (QPrintWidget->objectName().isEmpty()) - QPrintWidget->setObjectName(QString::fromUtf8("QPrintWidget")); + QPrintWidget->setObjectName(QStringLiteral("QPrintWidget")); QPrintWidget->resize(443, 175); horizontalLayout_2 = new QHBoxLayout(QPrintWidget); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); printerGroup = new QGroupBox(QPrintWidget); - printerGroup->setObjectName(QString::fromUtf8("printerGroup")); + printerGroup->setObjectName(QStringLiteral("printerGroup")); gridLayout = new QGridLayout(printerGroup); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(printerGroup); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); printers = new QComboBox(printerGroup); - printers->setObjectName(QString::fromUtf8("printers")); + printers->setObjectName(QStringLiteral("printers")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(3); sizePolicy.setVerticalStretch(0); @@ -75,7 +75,7 @@ public: gridLayout->addWidget(printers, 0, 1, 1, 1); properties = new QPushButton(printerGroup); - properties->setObjectName(QString::fromUtf8("properties")); + properties->setObjectName(QStringLiteral("properties")); QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); @@ -85,44 +85,44 @@ public: gridLayout->addWidget(properties, 0, 2, 1, 1); label_2 = new QLabel(printerGroup); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 1, 0, 1, 1); location = new QLabel(printerGroup); - location->setObjectName(QString::fromUtf8("location")); + location->setObjectName(QStringLiteral("location")); gridLayout->addWidget(location, 1, 1, 1, 1); preview = new QCheckBox(printerGroup); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName(QStringLiteral("preview")); gridLayout->addWidget(preview, 1, 2, 1, 1); label_3 = new QLabel(printerGroup); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 2, 0, 1, 1); type = new QLabel(printerGroup); - type->setObjectName(QString::fromUtf8("type")); + type->setObjectName(QStringLiteral("type")); gridLayout->addWidget(type, 2, 1, 1, 1); lOutput = new QLabel(printerGroup); - lOutput->setObjectName(QString::fromUtf8("lOutput")); + lOutput->setObjectName(QStringLiteral("lOutput")); gridLayout->addWidget(lOutput, 3, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); filename = new QLineEdit(printerGroup); - filename->setObjectName(QString::fromUtf8("filename")); + filename->setObjectName(QStringLiteral("filename")); horizontalLayout->addWidget(filename); fileBrowser = new QToolButton(printerGroup); - fileBrowser->setObjectName(QString::fromUtf8("fileBrowser")); + fileBrowser->setObjectName(QStringLiteral("fileBrowser")); horizontalLayout->addWidget(fileBrowser); diff --git a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h index f784785ce0..ea957f16c8 100644 --- a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h +++ b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h @@ -59,44 +59,44 @@ public: void setupUi(QDialog *QSqlConnectionDialogUi) { if (QSqlConnectionDialogUi->objectName().isEmpty()) - QSqlConnectionDialogUi->setObjectName(QString::fromUtf8("QSqlConnectionDialogUi")); + QSqlConnectionDialogUi->setObjectName(QStringLiteral("QSqlConnectionDialogUi")); QSqlConnectionDialogUi->resize(315, 302); vboxLayout = new QVBoxLayout(QSqlConnectionDialogUi); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); connGroupBox = new QGroupBox(QSqlConnectionDialogUi); - connGroupBox->setObjectName(QString::fromUtf8("connGroupBox")); + connGroupBox->setObjectName(QStringLiteral("connGroupBox")); gridLayout = new QGridLayout(connGroupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); comboDriver = new QComboBox(connGroupBox); - comboDriver->setObjectName(QString::fromUtf8("comboDriver")); + comboDriver->setObjectName(QStringLiteral("comboDriver")); gridLayout->addWidget(comboDriver, 0, 1, 1, 1); textLabel4 = new QLabel(connGroupBox); - textLabel4->setObjectName(QString::fromUtf8("textLabel4")); + textLabel4->setObjectName(QStringLiteral("textLabel4")); gridLayout->addWidget(textLabel4, 2, 0, 1, 1); textLabel2 = new QLabel(connGroupBox); - textLabel2->setObjectName(QString::fromUtf8("textLabel2")); + textLabel2->setObjectName(QStringLiteral("textLabel2")); gridLayout->addWidget(textLabel2, 0, 0, 1, 1); editDatabase = new QLineEdit(connGroupBox); - editDatabase->setObjectName(QString::fromUtf8("editDatabase")); + editDatabase->setObjectName(QStringLiteral("editDatabase")); gridLayout->addWidget(editDatabase, 1, 1, 1, 1); portSpinBox = new QSpinBox(connGroupBox); - portSpinBox->setObjectName(QString::fromUtf8("portSpinBox")); + portSpinBox->setObjectName(QStringLiteral("portSpinBox")); portSpinBox->setMaximum(65535); portSpinBox->setMinimum(-1); portSpinBox->setValue(-1); @@ -104,38 +104,38 @@ public: gridLayout->addWidget(portSpinBox, 5, 1, 1, 1); textLabel3 = new QLabel(connGroupBox); - textLabel3->setObjectName(QString::fromUtf8("textLabel3")); + textLabel3->setObjectName(QStringLiteral("textLabel3")); gridLayout->addWidget(textLabel3, 1, 0, 1, 1); editPassword = new QLineEdit(connGroupBox); - editPassword->setObjectName(QString::fromUtf8("editPassword")); + editPassword->setObjectName(QStringLiteral("editPassword")); editPassword->setEchoMode(QLineEdit::Password); gridLayout->addWidget(editPassword, 3, 1, 1, 1); editUsername = new QLineEdit(connGroupBox); - editUsername->setObjectName(QString::fromUtf8("editUsername")); + editUsername->setObjectName(QStringLiteral("editUsername")); gridLayout->addWidget(editUsername, 2, 1, 1, 1); editHostname = new QLineEdit(connGroupBox); - editHostname->setObjectName(QString::fromUtf8("editHostname")); + editHostname->setObjectName(QStringLiteral("editHostname")); gridLayout->addWidget(editHostname, 4, 1, 1, 1); textLabel5 = new QLabel(connGroupBox); - textLabel5->setObjectName(QString::fromUtf8("textLabel5")); + textLabel5->setObjectName(QStringLiteral("textLabel5")); gridLayout->addWidget(textLabel5, 4, 0, 1, 1); textLabel5_2 = new QLabel(connGroupBox); - textLabel5_2->setObjectName(QString::fromUtf8("textLabel5_2")); + textLabel5_2->setObjectName(QStringLiteral("textLabel5_2")); gridLayout->addWidget(textLabel5_2, 5, 0, 1, 1); textLabel4_2 = new QLabel(connGroupBox); - textLabel4_2->setObjectName(QString::fromUtf8("textLabel4_2")); + textLabel4_2->setObjectName(QStringLiteral("textLabel4_2")); gridLayout->addWidget(textLabel4_2, 3, 0, 1, 1); @@ -147,13 +147,13 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem); dbCheckBox = new QCheckBox(QSqlConnectionDialogUi); - dbCheckBox->setObjectName(QString::fromUtf8("dbCheckBox")); + dbCheckBox->setObjectName(QStringLiteral("dbCheckBox")); hboxLayout->addWidget(dbCheckBox); @@ -165,19 +165,19 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout1->addItem(spacerItem1); okButton = new QPushButton(QSqlConnectionDialogUi); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName(QStringLiteral("okButton")); okButton->setDefault(true); hboxLayout1->addWidget(okButton); cancelButton = new QPushButton(QSqlConnectionDialogUi); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName(QStringLiteral("cancelButton")); hboxLayout1->addWidget(cancelButton); diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h index d9c27a769e..45660d9224 100644 --- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h @@ -75,12 +75,12 @@ public: void setupUi(QDialog *QtGradientDialog) { if (QtGradientDialog->objectName().isEmpty()) - QtGradientDialog->setObjectName(QString::fromUtf8("QtGradientDialog")); + QtGradientDialog->setObjectName(QStringLiteral("QtGradientDialog")); QtGradientDialog->resize(178, 81); vboxLayout = new QVBoxLayout(QtGradientDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gradientEditor = new QtGradientEditor(QtGradientDialog); - gradientEditor->setObjectName(QString::fromUtf8("gradientEditor")); + gradientEditor->setObjectName(QStringLiteral("gradientEditor")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -90,7 +90,7 @@ public: vboxLayout->addWidget(gradientEditor); buttonBox = new QDialogButtonBox(QtGradientDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h index c344d006b5..d94670d2ff 100644 --- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h @@ -162,10 +162,10 @@ public: void setupUi(QWidget *QtGradientEditor) { if (QtGradientEditor->objectName().isEmpty()) - QtGradientEditor->setObjectName(QString::fromUtf8("QtGradientEditor")); + QtGradientEditor->setObjectName(QStringLiteral("QtGradientEditor")); QtGradientEditor->resize(364, 518); frame = new QFrame(QtGradientEditor); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName(QStringLiteral("frame")); frame->setGeometry(QRect(10, 69, 193, 150)); QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); sizePolicy.setHorizontalStretch(0); @@ -176,73 +176,73 @@ public: frame->setFrameShadow(QFrame::Raised); vboxLayout = new QVBoxLayout(frame); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); gradientWidget = new QtGradientWidget(frame); - gradientWidget->setObjectName(QString::fromUtf8("gradientWidget")); + gradientWidget->setObjectName(QStringLiteral("gradientWidget")); sizePolicy.setHeightForWidth(gradientWidget->sizePolicy().hasHeightForWidth()); gradientWidget->setSizePolicy(sizePolicy); vboxLayout->addWidget(gradientWidget); label1 = new QLabel(QtGradientEditor); - label1->setObjectName(QString::fromUtf8("label1")); + label1->setObjectName(QStringLiteral("label1")); label1->setGeometry(QRect(209, 69, 64, 23)); spinBox1 = new QDoubleSpinBox(QtGradientEditor); - spinBox1->setObjectName(QString::fromUtf8("spinBox1")); + spinBox1->setObjectName(QStringLiteral("spinBox1")); spinBox1->setGeometry(QRect(279, 69, 73, 23)); spinBox1->setKeyboardTracking(false); spinBox1->setDecimals(3); spinBox1->setMaximum(1); spinBox1->setSingleStep(0.01); label2 = new QLabel(QtGradientEditor); - label2->setObjectName(QString::fromUtf8("label2")); + label2->setObjectName(QStringLiteral("label2")); label2->setGeometry(QRect(209, 99, 64, 23)); spinBox2 = new QDoubleSpinBox(QtGradientEditor); - spinBox2->setObjectName(QString::fromUtf8("spinBox2")); + spinBox2->setObjectName(QStringLiteral("spinBox2")); spinBox2->setGeometry(QRect(279, 99, 73, 23)); spinBox2->setKeyboardTracking(false); spinBox2->setDecimals(3); spinBox2->setMaximum(1); spinBox2->setSingleStep(0.01); label3 = new QLabel(QtGradientEditor); - label3->setObjectName(QString::fromUtf8("label3")); + label3->setObjectName(QStringLiteral("label3")); label3->setGeometry(QRect(209, 129, 64, 23)); spinBox3 = new QDoubleSpinBox(QtGradientEditor); - spinBox3->setObjectName(QString::fromUtf8("spinBox3")); + spinBox3->setObjectName(QStringLiteral("spinBox3")); spinBox3->setGeometry(QRect(279, 129, 73, 23)); spinBox3->setKeyboardTracking(false); spinBox3->setDecimals(3); spinBox3->setMaximum(1); spinBox3->setSingleStep(0.01); label4 = new QLabel(QtGradientEditor); - label4->setObjectName(QString::fromUtf8("label4")); + label4->setObjectName(QStringLiteral("label4")); label4->setGeometry(QRect(209, 159, 64, 23)); spinBox4 = new QDoubleSpinBox(QtGradientEditor); - spinBox4->setObjectName(QString::fromUtf8("spinBox4")); + spinBox4->setObjectName(QStringLiteral("spinBox4")); spinBox4->setGeometry(QRect(279, 159, 73, 23)); spinBox4->setKeyboardTracking(false); spinBox4->setDecimals(3); spinBox4->setMaximum(1); spinBox4->setSingleStep(0.01); label5 = new QLabel(QtGradientEditor); - label5->setObjectName(QString::fromUtf8("label5")); + label5->setObjectName(QStringLiteral("label5")); label5->setGeometry(QRect(209, 189, 64, 23)); spinBox5 = new QDoubleSpinBox(QtGradientEditor); - spinBox5->setObjectName(QString::fromUtf8("spinBox5")); + spinBox5->setObjectName(QStringLiteral("spinBox5")); spinBox5->setGeometry(QRect(279, 189, 73, 23)); spinBox5->setKeyboardTracking(false); spinBox5->setDecimals(3); spinBox5->setMaximum(1); spinBox5->setSingleStep(0.01); gradientStopsWidget = new QtGradientStopsWidget(QtGradientEditor); - gradientStopsWidget->setObjectName(QString::fromUtf8("gradientStopsWidget")); + gradientStopsWidget->setObjectName(QStringLiteral("gradientStopsWidget")); gradientStopsWidget->setGeometry(QRect(10, 225, 193, 67)); zoomLabel = new QLabel(QtGradientEditor); - zoomLabel->setObjectName(QString::fromUtf8("zoomLabel")); + zoomLabel->setObjectName(QStringLiteral("zoomLabel")); zoomLabel->setGeometry(QRect(209, 231, 64, 23)); zoomAllButton = new QToolButton(QtGradientEditor); - zoomAllButton->setObjectName(QString::fromUtf8("zoomAllButton")); + zoomAllButton->setObjectName(QStringLiteral("zoomAllButton")); zoomAllButton->setGeometry(QRect(279, 260, 72, 26)); QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); @@ -250,15 +250,15 @@ public: sizePolicy1.setHeightForWidth(zoomAllButton->sizePolicy().hasHeightForWidth()); zoomAllButton->setSizePolicy(sizePolicy1); positionLabel = new QLabel(QtGradientEditor); - positionLabel->setObjectName(QString::fromUtf8("positionLabel")); + positionLabel->setObjectName(QStringLiteral("positionLabel")); positionLabel->setGeometry(QRect(209, 304, 64, 23)); hLabel = new QLabel(QtGradientEditor); - hLabel->setObjectName(QString::fromUtf8("hLabel")); + hLabel->setObjectName(QStringLiteral("hLabel")); hLabel->setGeometry(QRect(10, 335, 32, 18)); sizePolicy1.setHeightForWidth(hLabel->sizePolicy().hasHeightForWidth()); hLabel->setSizePolicy(sizePolicy1); frame_2 = new QFrame(QtGradientEditor); - frame_2->setObjectName(QString::fromUtf8("frame_2")); + frame_2->setObjectName(QStringLiteral("frame_2")); frame_2->setGeometry(QRect(48, 333, 155, 23)); QSizePolicy sizePolicy2(QSizePolicy::Ignored, QSizePolicy::Preferred); sizePolicy2.setHorizontalStretch(0); @@ -268,10 +268,10 @@ public: frame_2->setFrameShape(QFrame::StyledPanel); frame_2->setFrameShadow(QFrame::Raised); hboxLayout = new QHBoxLayout(frame_2); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(0, 0, 0, 0); hueColorLine = new QtColorLine(frame_2); - hueColorLine->setObjectName(QString::fromUtf8("hueColorLine")); + hueColorLine->setObjectName(QStringLiteral("hueColorLine")); QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Preferred); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); @@ -281,99 +281,99 @@ public: hboxLayout->addWidget(hueColorLine); hueLabel = new QLabel(QtGradientEditor); - hueLabel->setObjectName(QString::fromUtf8("hueLabel")); + hueLabel->setObjectName(QStringLiteral("hueLabel")); hueLabel->setGeometry(QRect(209, 335, 64, 18)); sizePolicy1.setHeightForWidth(hueLabel->sizePolicy().hasHeightForWidth()); hueLabel->setSizePolicy(sizePolicy1); sLabel = new QLabel(QtGradientEditor); - sLabel->setObjectName(QString::fromUtf8("sLabel")); + sLabel->setObjectName(QStringLiteral("sLabel")); sLabel->setGeometry(QRect(10, 364, 32, 18)); sizePolicy1.setHeightForWidth(sLabel->sizePolicy().hasHeightForWidth()); sLabel->setSizePolicy(sizePolicy1); frame_5 = new QFrame(QtGradientEditor); - frame_5->setObjectName(QString::fromUtf8("frame_5")); + frame_5->setObjectName(QStringLiteral("frame_5")); frame_5->setGeometry(QRect(48, 362, 155, 23)); sizePolicy2.setHeightForWidth(frame_5->sizePolicy().hasHeightForWidth()); frame_5->setSizePolicy(sizePolicy2); frame_5->setFrameShape(QFrame::StyledPanel); frame_5->setFrameShadow(QFrame::Raised); hboxLayout1 = new QHBoxLayout(frame_5); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); hboxLayout1->setContentsMargins(0, 0, 0, 0); saturationColorLine = new QtColorLine(frame_5); - saturationColorLine->setObjectName(QString::fromUtf8("saturationColorLine")); + saturationColorLine->setObjectName(QStringLiteral("saturationColorLine")); sizePolicy3.setHeightForWidth(saturationColorLine->sizePolicy().hasHeightForWidth()); saturationColorLine->setSizePolicy(sizePolicy3); hboxLayout1->addWidget(saturationColorLine); saturationLabel = new QLabel(QtGradientEditor); - saturationLabel->setObjectName(QString::fromUtf8("saturationLabel")); + saturationLabel->setObjectName(QStringLiteral("saturationLabel")); saturationLabel->setGeometry(QRect(209, 364, 64, 18)); sizePolicy1.setHeightForWidth(saturationLabel->sizePolicy().hasHeightForWidth()); saturationLabel->setSizePolicy(sizePolicy1); vLabel = new QLabel(QtGradientEditor); - vLabel->setObjectName(QString::fromUtf8("vLabel")); + vLabel->setObjectName(QStringLiteral("vLabel")); vLabel->setGeometry(QRect(10, 393, 32, 18)); sizePolicy1.setHeightForWidth(vLabel->sizePolicy().hasHeightForWidth()); vLabel->setSizePolicy(sizePolicy1); frame_3 = new QFrame(QtGradientEditor); - frame_3->setObjectName(QString::fromUtf8("frame_3")); + frame_3->setObjectName(QStringLiteral("frame_3")); frame_3->setGeometry(QRect(48, 391, 155, 23)); sizePolicy2.setHeightForWidth(frame_3->sizePolicy().hasHeightForWidth()); frame_3->setSizePolicy(sizePolicy2); frame_3->setFrameShape(QFrame::StyledPanel); frame_3->setFrameShadow(QFrame::Raised); hboxLayout2 = new QHBoxLayout(frame_3); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); hboxLayout2->setContentsMargins(0, 0, 0, 0); valueColorLine = new QtColorLine(frame_3); - valueColorLine->setObjectName(QString::fromUtf8("valueColorLine")); + valueColorLine->setObjectName(QStringLiteral("valueColorLine")); sizePolicy3.setHeightForWidth(valueColorLine->sizePolicy().hasHeightForWidth()); valueColorLine->setSizePolicy(sizePolicy3); hboxLayout2->addWidget(valueColorLine); valueLabel = new QLabel(QtGradientEditor); - valueLabel->setObjectName(QString::fromUtf8("valueLabel")); + valueLabel->setObjectName(QStringLiteral("valueLabel")); valueLabel->setGeometry(QRect(209, 393, 64, 18)); sizePolicy1.setHeightForWidth(valueLabel->sizePolicy().hasHeightForWidth()); valueLabel->setSizePolicy(sizePolicy1); aLabel = new QLabel(QtGradientEditor); - aLabel->setObjectName(QString::fromUtf8("aLabel")); + aLabel->setObjectName(QStringLiteral("aLabel")); aLabel->setGeometry(QRect(10, 422, 32, 18)); sizePolicy1.setHeightForWidth(aLabel->sizePolicy().hasHeightForWidth()); aLabel->setSizePolicy(sizePolicy1); frame_4 = new QFrame(QtGradientEditor); - frame_4->setObjectName(QString::fromUtf8("frame_4")); + frame_4->setObjectName(QStringLiteral("frame_4")); frame_4->setGeometry(QRect(48, 420, 155, 23)); sizePolicy2.setHeightForWidth(frame_4->sizePolicy().hasHeightForWidth()); frame_4->setSizePolicy(sizePolicy2); frame_4->setFrameShape(QFrame::StyledPanel); frame_4->setFrameShadow(QFrame::Raised); hboxLayout3 = new QHBoxLayout(frame_4); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); hboxLayout3->setContentsMargins(0, 0, 0, 0); alphaColorLine = new QtColorLine(frame_4); - alphaColorLine->setObjectName(QString::fromUtf8("alphaColorLine")); + alphaColorLine->setObjectName(QStringLiteral("alphaColorLine")); sizePolicy3.setHeightForWidth(alphaColorLine->sizePolicy().hasHeightForWidth()); alphaColorLine->setSizePolicy(sizePolicy3); hboxLayout3->addWidget(alphaColorLine); alphaLabel = new QLabel(QtGradientEditor); - alphaLabel->setObjectName(QString::fromUtf8("alphaLabel")); + alphaLabel->setObjectName(QStringLiteral("alphaLabel")); alphaLabel->setGeometry(QRect(209, 422, 64, 18)); sizePolicy1.setHeightForWidth(alphaLabel->sizePolicy().hasHeightForWidth()); alphaLabel->setSizePolicy(sizePolicy1); typeComboBox = new QComboBox(QtGradientEditor); - typeComboBox->setObjectName(QString::fromUtf8("typeComboBox")); + typeComboBox->setObjectName(QStringLiteral("typeComboBox")); typeComboBox->setGeometry(QRect(10, 40, 79, 22)); spreadComboBox = new QComboBox(QtGradientEditor); - spreadComboBox->setObjectName(QString::fromUtf8("spreadComboBox")); + spreadComboBox->setObjectName(QStringLiteral("spreadComboBox")); spreadComboBox->setGeometry(QRect(96, 40, 72, 22)); colorLabel = new QLabel(QtGradientEditor); - colorLabel->setObjectName(QString::fromUtf8("colorLabel")); + colorLabel->setObjectName(QStringLiteral("colorLabel")); colorLabel->setGeometry(QRect(10, 298, 32, 29)); QSizePolicy sizePolicy4(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy4.setHorizontalStretch(0); @@ -381,10 +381,10 @@ public: sizePolicy4.setHeightForWidth(colorLabel->sizePolicy().hasHeightForWidth()); colorLabel->setSizePolicy(sizePolicy4); colorButton = new QtColorButton(QtGradientEditor); - colorButton->setObjectName(QString::fromUtf8("colorButton")); + colorButton->setObjectName(QStringLiteral("colorButton")); colorButton->setGeometry(QRect(48, 300, 26, 25)); hsvRadioButton = new QRadioButton(QtGradientEditor); - hsvRadioButton->setObjectName(QString::fromUtf8("hsvRadioButton")); + hsvRadioButton->setObjectName(QStringLiteral("hsvRadioButton")); hsvRadioButton->setGeometry(QRect(80, 301, 49, 23)); QSizePolicy sizePolicy5(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy5.setHorizontalStretch(0); @@ -393,18 +393,18 @@ public: hsvRadioButton->setSizePolicy(sizePolicy5); hsvRadioButton->setChecked(true); rgbRadioButton = new QRadioButton(QtGradientEditor); - rgbRadioButton->setObjectName(QString::fromUtf8("rgbRadioButton")); + rgbRadioButton->setObjectName(QStringLiteral("rgbRadioButton")); rgbRadioButton->setGeometry(QRect(135, 301, 49, 23)); sizePolicy5.setHeightForWidth(rgbRadioButton->sizePolicy().hasHeightForWidth()); rgbRadioButton->setSizePolicy(sizePolicy5); positionWidget = new QWidget(QtGradientEditor); - positionWidget->setObjectName(QString::fromUtf8("positionWidget")); + positionWidget->setObjectName(QStringLiteral("positionWidget")); positionWidget->setGeometry(QRect(279, 304, 73, 23)); vboxLayout1 = new QVBoxLayout(positionWidget); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); vboxLayout1->setContentsMargins(0, 0, 0, 0); positionSpinBox = new QDoubleSpinBox(positionWidget); - positionSpinBox->setObjectName(QString::fromUtf8("positionSpinBox")); + positionSpinBox->setObjectName(QStringLiteral("positionSpinBox")); positionSpinBox->setKeyboardTracking(false); positionSpinBox->setDecimals(3); positionSpinBox->setMinimum(0); @@ -415,65 +415,65 @@ public: vboxLayout1->addWidget(positionSpinBox); hueWidget = new QWidget(QtGradientEditor); - hueWidget->setObjectName(QString::fromUtf8("hueWidget")); + hueWidget->setObjectName(QStringLiteral("hueWidget")); hueWidget->setGeometry(QRect(279, 333, 73, 23)); vboxLayout2 = new QVBoxLayout(hueWidget); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(0, 0, 0, 0); hueSpinBox = new QSpinBox(hueWidget); - hueSpinBox->setObjectName(QString::fromUtf8("hueSpinBox")); + hueSpinBox->setObjectName(QStringLiteral("hueSpinBox")); hueSpinBox->setKeyboardTracking(false); hueSpinBox->setMaximum(359); vboxLayout2->addWidget(hueSpinBox); saturationWidget = new QWidget(QtGradientEditor); - saturationWidget->setObjectName(QString::fromUtf8("saturationWidget")); + saturationWidget->setObjectName(QStringLiteral("saturationWidget")); saturationWidget->setGeometry(QRect(279, 362, 73, 23)); vboxLayout3 = new QVBoxLayout(saturationWidget); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); vboxLayout3->setContentsMargins(0, 0, 0, 0); saturationSpinBox = new QSpinBox(saturationWidget); - saturationSpinBox->setObjectName(QString::fromUtf8("saturationSpinBox")); + saturationSpinBox->setObjectName(QStringLiteral("saturationSpinBox")); saturationSpinBox->setKeyboardTracking(false); saturationSpinBox->setMaximum(255); vboxLayout3->addWidget(saturationSpinBox); valueWidget = new QWidget(QtGradientEditor); - valueWidget->setObjectName(QString::fromUtf8("valueWidget")); + valueWidget->setObjectName(QStringLiteral("valueWidget")); valueWidget->setGeometry(QRect(279, 391, 73, 23)); vboxLayout4 = new QVBoxLayout(valueWidget); - vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4")); + vboxLayout4->setObjectName(QStringLiteral("vboxLayout4")); vboxLayout4->setContentsMargins(0, 0, 0, 0); valueSpinBox = new QSpinBox(valueWidget); - valueSpinBox->setObjectName(QString::fromUtf8("valueSpinBox")); + valueSpinBox->setObjectName(QStringLiteral("valueSpinBox")); valueSpinBox->setKeyboardTracking(false); valueSpinBox->setMaximum(255); vboxLayout4->addWidget(valueSpinBox); alphaWidget = new QWidget(QtGradientEditor); - alphaWidget->setObjectName(QString::fromUtf8("alphaWidget")); + alphaWidget->setObjectName(QStringLiteral("alphaWidget")); alphaWidget->setGeometry(QRect(279, 420, 73, 23)); vboxLayout5 = new QVBoxLayout(alphaWidget); - vboxLayout5->setObjectName(QString::fromUtf8("vboxLayout5")); + vboxLayout5->setObjectName(QStringLiteral("vboxLayout5")); vboxLayout5->setContentsMargins(0, 0, 0, 0); alphaSpinBox = new QSpinBox(alphaWidget); - alphaSpinBox->setObjectName(QString::fromUtf8("alphaSpinBox")); + alphaSpinBox->setObjectName(QStringLiteral("alphaSpinBox")); alphaSpinBox->setKeyboardTracking(false); alphaSpinBox->setMaximum(255); vboxLayout5->addWidget(alphaSpinBox); zoomWidget = new QWidget(QtGradientEditor); - zoomWidget->setObjectName(QString::fromUtf8("zoomWidget")); + zoomWidget->setObjectName(QStringLiteral("zoomWidget")); zoomWidget->setGeometry(QRect(279, 231, 73, 23)); vboxLayout6 = new QVBoxLayout(zoomWidget); - vboxLayout6->setObjectName(QString::fromUtf8("vboxLayout6")); + vboxLayout6->setObjectName(QStringLiteral("vboxLayout6")); vboxLayout6->setContentsMargins(0, 0, 0, 0); zoomSpinBox = new QSpinBox(zoomWidget); - zoomSpinBox->setObjectName(QString::fromUtf8("zoomSpinBox")); + zoomSpinBox->setObjectName(QStringLiteral("zoomSpinBox")); zoomSpinBox->setKeyboardTracking(false); zoomSpinBox->setMinimum(100); zoomSpinBox->setMaximum(10000); @@ -483,33 +483,33 @@ public: vboxLayout6->addWidget(zoomSpinBox); line1Widget = new QWidget(QtGradientEditor); - line1Widget->setObjectName(QString::fromUtf8("line1Widget")); + line1Widget->setObjectName(QStringLiteral("line1Widget")); line1Widget->setGeometry(QRect(209, 219, 143, 16)); vboxLayout7 = new QVBoxLayout(line1Widget); - vboxLayout7->setObjectName(QString::fromUtf8("vboxLayout7")); + vboxLayout7->setObjectName(QStringLiteral("vboxLayout7")); vboxLayout7->setContentsMargins(0, 0, 0, 0); line1 = new QFrame(line1Widget); - line1->setObjectName(QString::fromUtf8("line1")); + line1->setObjectName(QStringLiteral("line1")); line1->setFrameShape(QFrame::HLine); line1->setFrameShadow(QFrame::Sunken); vboxLayout7->addWidget(line1); line2Widget = new QWidget(QtGradientEditor); - line2Widget->setObjectName(QString::fromUtf8("line2Widget")); + line2Widget->setObjectName(QStringLiteral("line2Widget")); line2Widget->setGeometry(QRect(209, 292, 143, 16)); vboxLayout8 = new QVBoxLayout(line2Widget); - vboxLayout8->setObjectName(QString::fromUtf8("vboxLayout8")); + vboxLayout8->setObjectName(QStringLiteral("vboxLayout8")); vboxLayout8->setContentsMargins(0, 0, 0, 0); line2 = new QFrame(line2Widget); - line2->setObjectName(QString::fromUtf8("line2")); + line2->setObjectName(QStringLiteral("line2")); line2->setFrameShape(QFrame::HLine); line2->setFrameShadow(QFrame::Sunken); vboxLayout8->addWidget(line2); zoomButtonsWidget = new QWidget(QtGradientEditor); - zoomButtonsWidget->setObjectName(QString::fromUtf8("zoomButtonsWidget")); + zoomButtonsWidget->setObjectName(QStringLiteral("zoomButtonsWidget")); zoomButtonsWidget->setGeometry(QRect(209, 260, 64, 26)); QSizePolicy sizePolicy6(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy6.setHorizontalStretch(0); @@ -517,15 +517,15 @@ public: sizePolicy6.setHeightForWidth(zoomButtonsWidget->sizePolicy().hasHeightForWidth()); zoomButtonsWidget->setSizePolicy(sizePolicy6); hboxLayout4 = new QHBoxLayout(zoomButtonsWidget); - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setObjectName(QStringLiteral("hboxLayout4")); hboxLayout4->setContentsMargins(0, 0, 0, 0); zoomInButton = new QToolButton(zoomButtonsWidget); - zoomInButton->setObjectName(QString::fromUtf8("zoomInButton")); + zoomInButton->setObjectName(QStringLiteral("zoomInButton")); hboxLayout4->addWidget(zoomInButton); zoomOutButton = new QToolButton(zoomButtonsWidget); - zoomOutButton->setObjectName(QString::fromUtf8("zoomOutButton")); + zoomOutButton->setObjectName(QStringLiteral("zoomOutButton")); hboxLayout4->addWidget(zoomOutButton); @@ -534,7 +534,7 @@ public: hboxLayout4->addItem(spacerItem); detailsButton = new QToolButton(QtGradientEditor); - detailsButton->setObjectName(QString::fromUtf8("detailsButton")); + detailsButton->setObjectName(QStringLiteral("detailsButton")); detailsButton->setGeometry(QRect(176, 40, 25, 22)); QSizePolicy sizePolicy7(QSizePolicy::Fixed, QSizePolicy::Ignored); sizePolicy7.setHorizontalStretch(0); @@ -544,32 +544,32 @@ public: detailsButton->setCheckable(true); detailsButton->setAutoRaise(true); linearButton = new QToolButton(QtGradientEditor); - linearButton->setObjectName(QString::fromUtf8("linearButton")); + linearButton->setObjectName(QStringLiteral("linearButton")); linearButton->setGeometry(QRect(10, 10, 30, 26)); linearButton->setCheckable(true); linearButton->setAutoRaise(true); radialButton = new QToolButton(QtGradientEditor); - radialButton->setObjectName(QString::fromUtf8("radialButton")); + radialButton->setObjectName(QStringLiteral("radialButton")); radialButton->setGeometry(QRect(40, 10, 30, 26)); radialButton->setCheckable(true); radialButton->setAutoRaise(true); conicalButton = new QToolButton(QtGradientEditor); - conicalButton->setObjectName(QString::fromUtf8("conicalButton")); + conicalButton->setObjectName(QStringLiteral("conicalButton")); conicalButton->setGeometry(QRect(70, 10, 30, 26)); conicalButton->setCheckable(true); conicalButton->setAutoRaise(true); padButton = new QToolButton(QtGradientEditor); - padButton->setObjectName(QString::fromUtf8("padButton")); + padButton->setObjectName(QStringLiteral("padButton")); padButton->setGeometry(QRect(110, 10, 30, 26)); padButton->setCheckable(true); padButton->setAutoRaise(true); repeatButton = new QToolButton(QtGradientEditor); - repeatButton->setObjectName(QString::fromUtf8("repeatButton")); + repeatButton->setObjectName(QStringLiteral("repeatButton")); repeatButton->setGeometry(QRect(140, 10, 30, 26)); repeatButton->setCheckable(true); repeatButton->setAutoRaise(true); reflectButton = new QToolButton(QtGradientEditor); - reflectButton->setObjectName(QString::fromUtf8("reflectButton")); + reflectButton->setObjectName(QStringLiteral("reflectButton")); reflectButton->setGeometry(QRect(170, 10, 30, 26)); reflectButton->setCheckable(true); reflectButton->setAutoRaise(true); diff --git a/tests/auto/tools/uic/baseline/qtgradientview.ui.h b/tests/auto/tools/uic/baseline/qtgradientview.ui.h index 52512c4a5b..62136c3890 100644 --- a/tests/auto/tools/uic/baseline/qtgradientview.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientview.ui.h @@ -39,15 +39,15 @@ public: void setupUi(QWidget *QtGradientView) { if (QtGradientView->objectName().isEmpty()) - QtGradientView->setObjectName(QString::fromUtf8("QtGradientView")); + QtGradientView->setObjectName(QStringLiteral("QtGradientView")); QtGradientView->resize(484, 228); vboxLayout = new QVBoxLayout(QtGradientView); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); newButton = new QToolButton(QtGradientView); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName(QStringLiteral("newButton")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -59,7 +59,7 @@ public: hboxLayout->addWidget(newButton); editButton = new QToolButton(QtGradientView); - editButton->setObjectName(QString::fromUtf8("editButton")); + editButton->setObjectName(QStringLiteral("editButton")); sizePolicy.setHeightForWidth(editButton->sizePolicy().hasHeightForWidth()); editButton->setSizePolicy(sizePolicy); editButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -68,7 +68,7 @@ public: hboxLayout->addWidget(editButton); renameButton = new QToolButton(QtGradientView); - renameButton->setObjectName(QString::fromUtf8("renameButton")); + renameButton->setObjectName(QStringLiteral("renameButton")); sizePolicy.setHeightForWidth(renameButton->sizePolicy().hasHeightForWidth()); renameButton->setSizePolicy(sizePolicy); renameButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -77,7 +77,7 @@ public: hboxLayout->addWidget(renameButton); removeButton = new QToolButton(QtGradientView); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); sizePolicy.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); removeButton->setSizePolicy(sizePolicy); removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -93,7 +93,7 @@ public: vboxLayout->addLayout(hboxLayout); listWidget = new QListWidget(QtGradientView); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); vboxLayout->addWidget(listWidget); diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h index d93dfd605c..cc7912d4c2 100644 --- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h @@ -75,12 +75,12 @@ public: void setupUi(QDialog *QtGradientViewDialog) { if (QtGradientViewDialog->objectName().isEmpty()) - QtGradientViewDialog->setObjectName(QString::fromUtf8("QtGradientViewDialog")); + QtGradientViewDialog->setObjectName(QStringLiteral("QtGradientViewDialog")); QtGradientViewDialog->resize(178, 72); vboxLayout = new QVBoxLayout(QtGradientViewDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gradientView = new QtGradientView(QtGradientViewDialog); - gradientView->setObjectName(QString::fromUtf8("gradientView")); + gradientView->setObjectName(QStringLiteral("gradientView")); QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -90,7 +90,7 @@ public: vboxLayout->addWidget(gradientView); buttonBox = new QDialogButtonBox(QtGradientViewDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h index b34f246c34..72cef5353a 100644 --- a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h @@ -52,20 +52,20 @@ public: void setupUi(QDialog *QtResourceEditorDialog) { if (QtResourceEditorDialog->objectName().isEmpty()) - QtResourceEditorDialog->setObjectName(QString::fromUtf8("QtResourceEditorDialog")); + QtResourceEditorDialog->setObjectName(QStringLiteral("QtResourceEditorDialog")); QtResourceEditorDialog->resize(469, 317); verticalLayout = new QVBoxLayout(QtResourceEditorDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); splitter = new QSplitter(QtResourceEditorDialog); - splitter->setObjectName(QString::fromUtf8("splitter")); + splitter->setObjectName(QStringLiteral("splitter")); splitter->setOrientation(Qt::Horizontal); layoutWidget = new QWidget(splitter); - layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); + layoutWidget->setObjectName(QStringLiteral("layoutWidget")); gridLayout = new QGridLayout(layoutWidget); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); gridLayout->setContentsMargins(0, 0, 0, 0); qrcFileList = new QListWidget(layoutWidget); - qrcFileList->setObjectName(QString::fromUtf8("qrcFileList")); + qrcFileList->setObjectName(QStringLiteral("qrcFileList")); QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -75,12 +75,12 @@ public: gridLayout->addWidget(qrcFileList, 0, 0, 1, 4); newQrcButton = new QToolButton(layoutWidget); - newQrcButton->setObjectName(QString::fromUtf8("newQrcButton")); + newQrcButton->setObjectName(QStringLiteral("newQrcButton")); gridLayout->addWidget(newQrcButton, 1, 0, 1, 1); removeQrcButton = new QToolButton(layoutWidget); - removeQrcButton->setObjectName(QString::fromUtf8("removeQrcButton")); + removeQrcButton->setObjectName(QStringLiteral("removeQrcButton")); gridLayout->addWidget(removeQrcButton, 1, 2, 1, 1); @@ -89,33 +89,33 @@ public: gridLayout->addItem(spacerItem, 1, 3, 1, 1); importQrcButton = new QToolButton(layoutWidget); - importQrcButton->setObjectName(QString::fromUtf8("importQrcButton")); + importQrcButton->setObjectName(QStringLiteral("importQrcButton")); gridLayout->addWidget(importQrcButton, 1, 1, 1, 1); splitter->addWidget(layoutWidget); widget = new QWidget(splitter); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName(QStringLiteral("widget")); gridLayout1 = new QGridLayout(widget); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); gridLayout1->setContentsMargins(0, 0, 0, 0); resourceTreeView = new QTreeView(widget); - resourceTreeView->setObjectName(QString::fromUtf8("resourceTreeView")); + resourceTreeView->setObjectName(QStringLiteral("resourceTreeView")); gridLayout1->addWidget(resourceTreeView, 0, 0, 1, 4); newResourceButton = new QToolButton(widget); - newResourceButton->setObjectName(QString::fromUtf8("newResourceButton")); + newResourceButton->setObjectName(QStringLiteral("newResourceButton")); gridLayout1->addWidget(newResourceButton, 1, 0, 1, 1); addResourceButton = new QToolButton(widget); - addResourceButton->setObjectName(QString::fromUtf8("addResourceButton")); + addResourceButton->setObjectName(QStringLiteral("addResourceButton")); gridLayout1->addWidget(addResourceButton, 1, 1, 1, 1); removeResourceButton = new QToolButton(widget); - removeResourceButton->setObjectName(QString::fromUtf8("removeResourceButton")); + removeResourceButton->setObjectName(QStringLiteral("removeResourceButton")); gridLayout1->addWidget(removeResourceButton, 1, 2, 1, 1); @@ -128,7 +128,7 @@ public: verticalLayout->addWidget(splitter); buttonBox = new QDialogButtonBox(QtResourceEditorDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h index 463961452f..5b6ec991b9 100644 --- a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h +++ b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h @@ -53,21 +53,21 @@ public: void setupUi(QDialog *QtToolBarDialog) { if (QtToolBarDialog->objectName().isEmpty()) - QtToolBarDialog->setObjectName(QString::fromUtf8("QtToolBarDialog")); + QtToolBarDialog->setObjectName(QStringLiteral("QtToolBarDialog")); QtToolBarDialog->resize(583, 508); gridLayout = new QGridLayout(QtToolBarDialog); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); actionTree = new QTreeWidget(QtToolBarDialog); - actionTree->setObjectName(QString::fromUtf8("actionTree")); + actionTree->setObjectName(QStringLiteral("actionTree")); gridLayout->addWidget(actionTree, 1, 0, 3, 1); label = new QLabel(QtToolBarDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); @@ -76,24 +76,24 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label_2 = new QLabel(QtToolBarDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); hboxLayout->addWidget(label_2); newButton = new QToolButton(QtToolBarDialog); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName(QStringLiteral("newButton")); hboxLayout->addWidget(newButton); removeButton = new QToolButton(QtToolBarDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName(QStringLiteral("removeButton")); hboxLayout->addWidget(removeButton); renameButton = new QToolButton(QtToolBarDialog); - renameButton->setObjectName(QString::fromUtf8("renameButton")); + renameButton->setObjectName(QStringLiteral("renameButton")); hboxLayout->addWidget(renameButton); @@ -105,9 +105,9 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); upButton = new QToolButton(QtToolBarDialog); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -117,21 +117,21 @@ public: vboxLayout->addWidget(upButton); leftButton = new QToolButton(QtToolBarDialog); - leftButton->setObjectName(QString::fromUtf8("leftButton")); + leftButton->setObjectName(QStringLiteral("leftButton")); sizePolicy.setHeightForWidth(leftButton->sizePolicy().hasHeightForWidth()); leftButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(leftButton); rightButton = new QToolButton(QtToolBarDialog); - rightButton->setObjectName(QString::fromUtf8("rightButton")); + rightButton->setObjectName(QStringLiteral("rightButton")); sizePolicy.setHeightForWidth(rightButton->sizePolicy().hasHeightForWidth()); rightButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(rightButton); downButton = new QToolButton(QtToolBarDialog); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); sizePolicy.setHeightForWidth(downButton->sizePolicy().hasHeightForWidth()); downButton->setSizePolicy(sizePolicy); @@ -145,22 +145,22 @@ public: gridLayout->addLayout(vboxLayout, 3, 1, 1, 1); currentToolBarList = new QListWidget(QtToolBarDialog); - currentToolBarList->setObjectName(QString::fromUtf8("currentToolBarList")); + currentToolBarList->setObjectName(QStringLiteral("currentToolBarList")); gridLayout->addWidget(currentToolBarList, 3, 2, 1, 1); label_3 = new QLabel(QtToolBarDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 2, 1, 1, 2); toolBarList = new QListWidget(QtToolBarDialog); - toolBarList->setObjectName(QString::fromUtf8("toolBarList")); + toolBarList->setObjectName(QStringLiteral("toolBarList")); gridLayout->addWidget(toolBarList, 1, 1, 1, 2); buttonBox = new QDialogButtonBox(QtToolBarDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults); gridLayout->addWidget(buttonBox, 5, 0, 1, 3); diff --git a/tests/auto/tools/uic/baseline/querywidget.ui.h b/tests/auto/tools/uic/baseline/querywidget.ui.h index c355f7c4f1..5a2eef793b 100644 --- a/tests/auto/tools/uic/baseline/querywidget.ui.h +++ b/tests/auto/tools/uic/baseline/querywidget.ui.h @@ -50,13 +50,13 @@ public: void setupUi(QMainWindow *QueryWidget) { if (QueryWidget->objectName().isEmpty()) - QueryWidget->setObjectName(QString::fromUtf8("QueryWidget")); + QueryWidget->setObjectName(QStringLiteral("QueryWidget")); QueryWidget->resize(545, 531); centralwidget = new QWidget(QueryWidget); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName(QStringLiteral("centralwidget")); centralwidget->setGeometry(QRect(0, 29, 545, 480)); verticalLayout = new QVBoxLayout(centralwidget); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -64,12 +64,12 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); inputGroupBox = new QGroupBox(centralwidget); - inputGroupBox->setObjectName(QString::fromUtf8("inputGroupBox")); + inputGroupBox->setObjectName(QStringLiteral("inputGroupBox")); inputGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_4 = new QVBoxLayout(inputGroupBox); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + verticalLayout_4->setObjectName(QStringLiteral("verticalLayout_4")); _2 = new QVBoxLayout(); #ifndef Q_OS_MAC _2->setSpacing(6); @@ -77,9 +77,9 @@ public: #ifndef Q_OS_MAC _2->setContentsMargins(0, 0, 0, 0); #endif - _2->setObjectName(QString::fromUtf8("_2")); + _2->setObjectName(QStringLiteral("_2")); inputTextEdit = new QTextEdit(inputGroupBox); - inputTextEdit->setObjectName(QString::fromUtf8("inputTextEdit")); + inputTextEdit->setObjectName(QStringLiteral("inputTextEdit")); _2->addWidget(inputTextEdit); @@ -90,17 +90,17 @@ public: vboxLayout->addWidget(inputGroupBox); queryGroupBox = new QGroupBox(centralwidget); - queryGroupBox->setObjectName(QString::fromUtf8("queryGroupBox")); + queryGroupBox->setObjectName(QStringLiteral("queryGroupBox")); queryGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_5 = new QVBoxLayout(queryGroupBox); - verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); + verticalLayout_5->setObjectName(QStringLiteral("verticalLayout_5")); defaultQueries = new QComboBox(queryGroupBox); - defaultQueries->setObjectName(QString::fromUtf8("defaultQueries")); + defaultQueries->setObjectName(QStringLiteral("defaultQueries")); verticalLayout_5->addWidget(defaultQueries); queryTextEdit = new QTextEdit(queryGroupBox); - queryTextEdit->setObjectName(QString::fromUtf8("queryTextEdit")); + queryTextEdit->setObjectName(QStringLiteral("queryTextEdit")); queryTextEdit->setMinimumSize(QSize(400, 60)); queryTextEdit->setReadOnly(true); queryTextEdit->setAcceptRichText(false); @@ -111,10 +111,10 @@ public: vboxLayout->addWidget(queryGroupBox); outputGroupBox = new QGroupBox(centralwidget); - outputGroupBox->setObjectName(QString::fromUtf8("outputGroupBox")); + outputGroupBox->setObjectName(QStringLiteral("outputGroupBox")); outputGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_6 = new QVBoxLayout(outputGroupBox); - verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); + verticalLayout_6->setObjectName(QStringLiteral("verticalLayout_6")); _3 = new QVBoxLayout(); #ifndef Q_OS_MAC _3->setSpacing(6); @@ -122,9 +122,9 @@ public: #ifndef Q_OS_MAC _3->setContentsMargins(0, 0, 0, 0); #endif - _3->setObjectName(QString::fromUtf8("_3")); + _3->setObjectName(QStringLiteral("_3")); outputTextEdit = new QTextEdit(outputGroupBox); - outputTextEdit->setObjectName(QString::fromUtf8("outputTextEdit")); + outputTextEdit->setObjectName(QStringLiteral("outputTextEdit")); outputTextEdit->setMinimumSize(QSize(500, 80)); outputTextEdit->setReadOnly(true); outputTextEdit->setAcceptRichText(false); @@ -142,11 +142,11 @@ public: QueryWidget->setCentralWidget(centralwidget); menubar = new QMenuBar(QueryWidget); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName(QStringLiteral("menubar")); menubar->setGeometry(QRect(0, 0, 545, 29)); QueryWidget->setMenuBar(menubar); statusbar = new QStatusBar(QueryWidget); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName(QStringLiteral("statusbar")); statusbar->setGeometry(QRect(0, 509, 545, 22)); QueryWidget->setStatusBar(statusbar); diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui.h b/tests/auto/tools/uic/baseline/remotecontrol.ui.h index 52ab1678cc..5a4910d635 100644 --- a/tests/auto/tools/uic/baseline/remotecontrol.ui.h +++ b/tests/auto/tools/uic/baseline/remotecontrol.ui.h @@ -69,28 +69,28 @@ public: void setupUi(QMainWindow *RemoteControlClass) { if (RemoteControlClass->objectName().isEmpty()) - RemoteControlClass->setObjectName(QString::fromUtf8("RemoteControlClass")); + RemoteControlClass->setObjectName(QStringLiteral("RemoteControlClass")); RemoteControlClass->resize(344, 364); actionQuit = new QAction(RemoteControlClass); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName(QStringLiteral("actionQuit")); centralWidget = new QWidget(RemoteControlClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName(QStringLiteral("centralWidget")); gridLayout = new QGridLayout(centralWidget); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(centralWidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); startUrlLineEdit = new QLineEdit(centralWidget); - startUrlLineEdit->setObjectName(QString::fromUtf8("startUrlLineEdit")); + startUrlLineEdit->setObjectName(QStringLiteral("startUrlLineEdit")); gridLayout->addWidget(startUrlLineEdit, 0, 1, 1, 2); launchButton = new QPushButton(centralWidget); - launchButton->setObjectName(QString::fromUtf8("launchButton")); + launchButton->setObjectName(QStringLiteral("launchButton")); gridLayout->addWidget(launchButton, 1, 1, 1, 1); @@ -103,27 +103,27 @@ public: gridLayout->addItem(spacerItem1, 2, 1, 1, 1); actionGroupBox = new QGroupBox(centralWidget); - actionGroupBox->setObjectName(QString::fromUtf8("actionGroupBox")); + actionGroupBox->setObjectName(QStringLiteral("actionGroupBox")); actionGroupBox->setEnabled(false); gridLayout1 = new QGridLayout(actionGroupBox); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); label_2 = new QLabel(actionGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout1->addWidget(label_2, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); indexLineEdit = new QLineEdit(actionGroupBox); - indexLineEdit->setObjectName(QString::fromUtf8("indexLineEdit")); + indexLineEdit->setObjectName(QStringLiteral("indexLineEdit")); hboxLayout->addWidget(indexLineEdit); indexButton = new QToolButton(actionGroupBox); - indexButton->setObjectName(QString::fromUtf8("indexButton")); + indexButton->setObjectName(QStringLiteral("indexButton")); const QIcon icon = QIcon(QString::fromUtf8(":/remotecontrol/enter.png")); indexButton->setIcon(icon); @@ -133,20 +133,20 @@ public: gridLayout1->addLayout(hboxLayout, 0, 1, 1, 2); label_4 = new QLabel(actionGroupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout1->addWidget(label_4, 1, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); identifierLineEdit = new QLineEdit(actionGroupBox); - identifierLineEdit->setObjectName(QString::fromUtf8("identifierLineEdit")); + identifierLineEdit->setObjectName(QStringLiteral("identifierLineEdit")); hboxLayout1->addWidget(identifierLineEdit); identifierButton = new QToolButton(actionGroupBox); - identifierButton->setObjectName(QString::fromUtf8("identifierButton")); + identifierButton->setObjectName(QStringLiteral("identifierButton")); identifierButton->setIcon(icon); hboxLayout1->addWidget(identifierButton); @@ -155,20 +155,20 @@ public: gridLayout1->addLayout(hboxLayout1, 1, 1, 1, 2); label_3 = new QLabel(actionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout1->addWidget(label_3, 2, 0, 1, 1); hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); urlLineEdit = new QLineEdit(actionGroupBox); - urlLineEdit->setObjectName(QString::fromUtf8("urlLineEdit")); + urlLineEdit->setObjectName(QStringLiteral("urlLineEdit")); hboxLayout2->addWidget(urlLineEdit); urlButton = new QToolButton(actionGroupBox); - urlButton->setObjectName(QString::fromUtf8("urlButton")); + urlButton->setObjectName(QStringLiteral("urlButton")); urlButton->setIcon(icon); hboxLayout2->addWidget(urlButton); @@ -177,7 +177,7 @@ public: gridLayout1->addLayout(hboxLayout2, 2, 1, 1, 2); syncContentsButton = new QPushButton(actionGroupBox); - syncContentsButton->setObjectName(QString::fromUtf8("syncContentsButton")); + syncContentsButton->setObjectName(QStringLiteral("syncContentsButton")); gridLayout1->addWidget(syncContentsButton, 3, 1, 1, 1); @@ -186,17 +186,17 @@ public: gridLayout1->addItem(spacerItem2, 3, 2, 1, 1); contentsCheckBox = new QCheckBox(actionGroupBox); - contentsCheckBox->setObjectName(QString::fromUtf8("contentsCheckBox")); + contentsCheckBox->setObjectName(QStringLiteral("contentsCheckBox")); gridLayout1->addWidget(contentsCheckBox, 4, 0, 1, 3); indexCheckBox = new QCheckBox(actionGroupBox); - indexCheckBox->setObjectName(QString::fromUtf8("indexCheckBox")); + indexCheckBox->setObjectName(QStringLiteral("indexCheckBox")); gridLayout1->addWidget(indexCheckBox, 5, 0, 1, 1); bookmarksCheckBox = new QCheckBox(actionGroupBox); - bookmarksCheckBox->setObjectName(QString::fromUtf8("bookmarksCheckBox")); + bookmarksCheckBox->setObjectName(QStringLiteral("bookmarksCheckBox")); gridLayout1->addWidget(bookmarksCheckBox, 6, 0, 1, 3); @@ -205,13 +205,13 @@ public: RemoteControlClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(RemoteControlClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName(QStringLiteral("menuBar")); menuBar->setGeometry(QRect(0, 0, 344, 21)); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); RemoteControlClass->setMenuBar(menuBar); statusBar = new QStatusBar(RemoteControlClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName(QStringLiteral("statusBar")); RemoteControlClass->setStatusBar(statusBar); menuBar->addAction(menuFile->menuAction()); diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h index 32597cd6ff..dba7834c96 100644 --- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h +++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h @@ -84,13 +84,13 @@ public: void setupUi(QDialog *SaveFormAsTemplate) { if (SaveFormAsTemplate->objectName().isEmpty()) - SaveFormAsTemplate->setObjectName(QString::fromUtf8("SaveFormAsTemplate")); + SaveFormAsTemplate->setObjectName(QStringLiteral("SaveFormAsTemplate")); vboxLayout = new QVBoxLayout(SaveFormAsTemplate); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName(QStringLiteral("formLayout")); label = new QLabel(SaveFormAsTemplate); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setFrameShape(QFrame::NoFrame); label->setFrameShadow(QFrame::Plain); label->setTextFormat(Qt::AutoText); @@ -98,14 +98,14 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); templateNameEdit = new QLineEdit(SaveFormAsTemplate); - templateNameEdit->setObjectName(QString::fromUtf8("templateNameEdit")); + templateNameEdit->setObjectName(QStringLiteral("templateNameEdit")); templateNameEdit->setMinimumSize(QSize(222, 0)); templateNameEdit->setEchoMode(QLineEdit::Normal); formLayout->setWidget(0, QFormLayout::FieldRole, templateNameEdit); label_2 = new QLabel(SaveFormAsTemplate); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); label_2->setFrameShape(QFrame::NoFrame); label_2->setFrameShadow(QFrame::Plain); label_2->setTextFormat(Qt::AutoText); @@ -113,7 +113,7 @@ public: formLayout->setWidget(1, QFormLayout::LabelRole, label_2); categoryCombo = new QComboBox(SaveFormAsTemplate); - categoryCombo->setObjectName(QString::fromUtf8("categoryCombo")); + categoryCombo->setObjectName(QStringLiteral("categoryCombo")); formLayout->setWidget(1, QFormLayout::FieldRole, categoryCombo); @@ -121,14 +121,14 @@ public: vboxLayout->addLayout(formLayout); horizontalLine = new QFrame(SaveFormAsTemplate); - horizontalLine->setObjectName(QString::fromUtf8("horizontalLine")); + horizontalLine->setObjectName(QStringLiteral("horizontalLine")); horizontalLine->setFrameShape(QFrame::HLine); horizontalLine->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(horizontalLine); buttonBox = new QDialogButtonBox(SaveFormAsTemplate); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/settings.ui.h b/tests/auto/tools/uic/baseline/settings.ui.h index 0f87a29a65..3fc9bad710 100644 --- a/tests/auto/tools/uic/baseline/settings.ui.h +++ b/tests/auto/tools/uic/baseline/settings.ui.h @@ -51,14 +51,14 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName(QStringLiteral("Dialog")); Dialog->resize(392, 176); verticalLayout = new QVBoxLayout(Dialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -70,7 +70,7 @@ public: hboxLayout->addWidget(label); deviceCombo = new QComboBox(Dialog); - deviceCombo->setObjectName(QString::fromUtf8("deviceCombo")); + deviceCombo->setObjectName(QStringLiteral("deviceCombo")); QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -83,9 +83,9 @@ public: verticalLayout->addLayout(hboxLayout); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label_6 = new QLabel(Dialog); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); sizePolicy.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth()); label_6->setSizePolicy(sizePolicy); label_6->setMinimumSize(QSize(90, 0)); @@ -94,7 +94,7 @@ public: hboxLayout1->addWidget(label_6); audioEffectsCombo = new QComboBox(Dialog); - audioEffectsCombo->setObjectName(QString::fromUtf8("audioEffectsCombo")); + audioEffectsCombo->setObjectName(QStringLiteral("audioEffectsCombo")); sizePolicy1.setHeightForWidth(audioEffectsCombo->sizePolicy().hasHeightForWidth()); audioEffectsCombo->setSizePolicy(sizePolicy1); @@ -104,9 +104,9 @@ public: verticalLayout->addLayout(hboxLayout1); hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); crossFadeLabel = new QLabel(Dialog); - crossFadeLabel->setObjectName(QString::fromUtf8("crossFadeLabel")); + crossFadeLabel->setObjectName(QStringLiteral("crossFadeLabel")); sizePolicy.setHeightForWidth(crossFadeLabel->sizePolicy().hasHeightForWidth()); crossFadeLabel->setSizePolicy(sizePolicy); crossFadeLabel->setMinimumSize(QSize(90, 0)); @@ -115,9 +115,9 @@ public: hboxLayout2->addWidget(crossFadeLabel); vboxLayout = new QVBoxLayout(); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); crossFadeSlider = new QSlider(Dialog); - crossFadeSlider->setObjectName(QString::fromUtf8("crossFadeSlider")); + crossFadeSlider->setObjectName(QStringLiteral("crossFadeSlider")); sizePolicy1.setHeightForWidth(crossFadeSlider->sizePolicy().hasHeightForWidth()); crossFadeSlider->setSizePolicy(sizePolicy1); crossFadeSlider->setMinimum(-20); @@ -131,9 +131,9 @@ public: vboxLayout->addWidget(crossFadeSlider); hboxLayout3 = new QHBoxLayout(); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); label_3 = new QLabel(Dialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); QFont font; font.setPointSize(9); label_3->setFont(font); @@ -145,7 +145,7 @@ public: hboxLayout3->addItem(spacerItem); label_5 = new QLabel(Dialog); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setFont(font); hboxLayout3->addWidget(label_5); @@ -155,7 +155,7 @@ public: hboxLayout3->addItem(spacerItem1); label_4 = new QLabel(Dialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); label_4->setFont(font); hboxLayout3->addWidget(label_4); @@ -170,7 +170,7 @@ public: verticalLayout->addLayout(hboxLayout2); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h index 3027ac93f2..ea253fa729 100644 --- a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h +++ b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h @@ -49,33 +49,33 @@ public: void setupUi(QDialog *SignalSlotDialogClass) { if (SignalSlotDialogClass->objectName().isEmpty()) - SignalSlotDialogClass->setObjectName(QString::fromUtf8("SignalSlotDialogClass")); + SignalSlotDialogClass->setObjectName(QStringLiteral("SignalSlotDialogClass")); SignalSlotDialogClass->resize(617, 535); vboxLayout = new QVBoxLayout(SignalSlotDialogClass); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); slotGroupBox = new QGroupBox(SignalSlotDialogClass); - slotGroupBox->setObjectName(QString::fromUtf8("slotGroupBox")); + slotGroupBox->setObjectName(QStringLiteral("slotGroupBox")); vboxLayout1 = new QVBoxLayout(slotGroupBox); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); slotListView = new QListView(slotGroupBox); - slotListView->setObjectName(QString::fromUtf8("slotListView")); + slotListView->setObjectName(QStringLiteral("slotListView")); vboxLayout1->addWidget(slotListView); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); addSlotButton = new QToolButton(slotGroupBox); - addSlotButton->setObjectName(QString::fromUtf8("addSlotButton")); + addSlotButton->setObjectName(QStringLiteral("addSlotButton")); hboxLayout->addWidget(addSlotButton); removeSlotButton = new QToolButton(slotGroupBox); - removeSlotButton->setObjectName(QString::fromUtf8("removeSlotButton")); + removeSlotButton->setObjectName(QStringLiteral("removeSlotButton")); hboxLayout->addWidget(removeSlotButton); @@ -90,26 +90,26 @@ public: vboxLayout->addWidget(slotGroupBox); signalGroupBox = new QGroupBox(SignalSlotDialogClass); - signalGroupBox->setObjectName(QString::fromUtf8("signalGroupBox")); + signalGroupBox->setObjectName(QStringLiteral("signalGroupBox")); vboxLayout2 = new QVBoxLayout(signalGroupBox); vboxLayout2->setSpacing(6); vboxLayout2->setContentsMargins(11, 11, 11, 11); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); signalListView = new QListView(signalGroupBox); - signalListView->setObjectName(QString::fromUtf8("signalListView")); + signalListView->setObjectName(QStringLiteral("signalListView")); vboxLayout2->addWidget(signalListView); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); addSignalButton = new QToolButton(signalGroupBox); - addSignalButton->setObjectName(QString::fromUtf8("addSignalButton")); + addSignalButton->setObjectName(QStringLiteral("addSignalButton")); hboxLayout1->addWidget(addSignalButton); removeSignalButton = new QToolButton(signalGroupBox); - removeSignalButton->setObjectName(QString::fromUtf8("removeSignalButton")); + removeSignalButton->setObjectName(QStringLiteral("removeSignalButton")); hboxLayout1->addWidget(removeSignalButton); @@ -124,7 +124,7 @@ public: vboxLayout->addWidget(signalGroupBox); buttonBox = new QDialogButtonBox(SignalSlotDialogClass); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); vboxLayout->addWidget(buttonBox); diff --git a/tests/auto/tools/uic/baseline/sslclient.ui.h b/tests/auto/tools/uic/baseline/sslclient.ui.h index 4dce9be2c3..7d5b83b5db 100644 --- a/tests/auto/tools/uic/baseline/sslclient.ui.h +++ b/tests/auto/tools/uic/baseline/sslclient.ui.h @@ -52,29 +52,29 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(343, 320); vboxLayout = new QVBoxLayout(Form); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); hostNameLabel = new QLabel(Form); - hostNameLabel->setObjectName(QString::fromUtf8("hostNameLabel")); + hostNameLabel->setObjectName(QStringLiteral("hostNameLabel")); gridLayout->addWidget(hostNameLabel, 0, 0, 1, 1); hostNameEdit = new QLineEdit(Form); - hostNameEdit->setObjectName(QString::fromUtf8("hostNameEdit")); + hostNameEdit->setObjectName(QStringLiteral("hostNameEdit")); gridLayout->addWidget(hostNameEdit, 0, 1, 1, 1); portLabel = new QLabel(Form); - portLabel->setObjectName(QString::fromUtf8("portLabel")); + portLabel->setObjectName(QStringLiteral("portLabel")); gridLayout->addWidget(portLabel, 1, 0, 1, 1); portBox = new QSpinBox(Form); - portBox->setObjectName(QString::fromUtf8("portBox")); + portBox->setObjectName(QStringLiteral("portBox")); portBox->setMinimum(1); portBox->setMaximum(65535); portBox->setValue(993); @@ -85,26 +85,26 @@ public: vboxLayout->addLayout(gridLayout); connectButton = new QPushButton(Form); - connectButton->setObjectName(QString::fromUtf8("connectButton")); + connectButton->setObjectName(QStringLiteral("connectButton")); connectButton->setEnabled(true); connectButton->setDefault(true); vboxLayout->addWidget(connectButton); sessionBox = new QGroupBox(Form); - sessionBox->setObjectName(QString::fromUtf8("sessionBox")); + sessionBox->setObjectName(QStringLiteral("sessionBox")); sessionBox->setEnabled(false); vboxLayout1 = new QVBoxLayout(sessionBox); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); cipherText = new QLabel(sessionBox); - cipherText->setObjectName(QString::fromUtf8("cipherText")); + cipherText->setObjectName(QStringLiteral("cipherText")); hboxLayout->addWidget(cipherText); cipherLabel = new QLabel(sessionBox); - cipherLabel->setObjectName(QString::fromUtf8("cipherLabel")); + cipherLabel->setObjectName(QStringLiteral("cipherLabel")); cipherLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); hboxLayout->addWidget(cipherLabel); @@ -113,7 +113,7 @@ public: vboxLayout1->addLayout(hboxLayout); sessionOutput = new QTextEdit(sessionBox); - sessionOutput->setObjectName(QString::fromUtf8("sessionOutput")); + sessionOutput->setObjectName(QStringLiteral("sessionOutput")); sessionOutput->setEnabled(false); sessionOutput->setFocusPolicy(Qt::NoFocus); sessionOutput->setReadOnly(true); @@ -121,20 +121,20 @@ public: vboxLayout1->addWidget(sessionOutput); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); sessionInputLabel = new QLabel(sessionBox); - sessionInputLabel->setObjectName(QString::fromUtf8("sessionInputLabel")); + sessionInputLabel->setObjectName(QStringLiteral("sessionInputLabel")); hboxLayout1->addWidget(sessionInputLabel); sessionInput = new QLineEdit(sessionBox); - sessionInput->setObjectName(QString::fromUtf8("sessionInput")); + sessionInput->setObjectName(QStringLiteral("sessionInput")); sessionInput->setEnabled(false); hboxLayout1->addWidget(sessionInput); sendButton = new QPushButton(sessionBox); - sendButton->setObjectName(QString::fromUtf8("sendButton")); + sendButton->setObjectName(QStringLiteral("sendButton")); sendButton->setEnabled(false); sendButton->setFocusPolicy(Qt::TabFocus); sendButton->setDefault(true); diff --git a/tests/auto/tools/uic/baseline/sslerrors.ui.h b/tests/auto/tools/uic/baseline/sslerrors.ui.h index 2c3ade77bc..c542baab3c 100644 --- a/tests/auto/tools/uic/baseline/sslerrors.ui.h +++ b/tests/auto/tools/uic/baseline/sslerrors.ui.h @@ -40,25 +40,25 @@ public: void setupUi(QDialog *SslErrors) { if (SslErrors->objectName().isEmpty()) - SslErrors->setObjectName(QString::fromUtf8("SslErrors")); + SslErrors->setObjectName(QStringLiteral("SslErrors")); SslErrors->resize(371, 216); vboxLayout = new QVBoxLayout(SslErrors); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); label = new QLabel(SslErrors); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setWordWrap(true); vboxLayout->addWidget(label); sslErrorList = new QListWidget(SslErrors); - sslErrorList->setObjectName(QString::fromUtf8("sslErrorList")); + sslErrorList->setObjectName(QStringLiteral("sslErrorList")); vboxLayout->addWidget(sslErrorList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); certificateChainButton = new QPushButton(SslErrors); - certificateChainButton->setObjectName(QString::fromUtf8("certificateChainButton")); + certificateChainButton->setObjectName(QStringLiteral("certificateChainButton")); certificateChainButton->setAutoDefault(false); hboxLayout->addWidget(certificateChainButton); @@ -68,12 +68,12 @@ public: hboxLayout->addItem(spacerItem); pushButton = new QPushButton(SslErrors); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); hboxLayout->addWidget(pushButton); pushButton_2 = new QPushButton(SslErrors); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); + pushButton_2->setObjectName(QStringLiteral("pushButton_2")); hboxLayout->addWidget(pushButton_2); diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h index b6e14b5dda..a812fb443f 100644 --- a/tests/auto/tools/uic/baseline/statistics.ui.h +++ b/tests/auto/tools/uic/baseline/statistics.ui.h @@ -93,24 +93,24 @@ public: void setupUi(QDialog *Statistics) { if (Statistics->objectName().isEmpty()) - Statistics->setObjectName(QString::fromUtf8("Statistics")); - Statistics->setObjectName(QString::fromUtf8("linguist_stats")); + Statistics->setObjectName(QStringLiteral("Statistics")); + Statistics->setObjectName(QStringLiteral("linguist_stats")); Statistics->resize(336, 164); gridLayout = new QGridLayout(Statistics); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setObjectName(QString::fromUtf8("unnamed")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); + gridLayout->setObjectName(QStringLiteral("unnamed")); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("unnamed")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("unnamed")); spacer4_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacer4_2); closeBtn = new QPushButton(Statistics); - closeBtn->setObjectName(QString::fromUtf8("closeBtn")); + closeBtn->setObjectName(QStringLiteral("closeBtn")); hboxLayout->addWidget(closeBtn); @@ -122,66 +122,66 @@ public: gridLayout->addLayout(hboxLayout, 1, 0, 1, 1); frame4 = new QFrame(Statistics); - frame4->setObjectName(QString::fromUtf8("frame4")); + frame4->setObjectName(QStringLiteral("frame4")); frame4->setFrameShape(QFrame::StyledPanel); frame4->setFrameShadow(QFrame::Raised); gridLayout1 = new QGridLayout(frame4); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - gridLayout1->setObjectName(QString::fromUtf8("unnamed")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("unnamed")); textLabel4 = new QLabel(frame4); - textLabel4->setObjectName(QString::fromUtf8("textLabel4")); + textLabel4->setObjectName(QStringLiteral("textLabel4")); gridLayout1->addWidget(textLabel4, 0, 2, 1, 1); textLabel5 = new QLabel(frame4); - textLabel5->setObjectName(QString::fromUtf8("textLabel5")); + textLabel5->setObjectName(QStringLiteral("textLabel5")); gridLayout1->addWidget(textLabel5, 0, 1, 1, 1); untrWords = new QLabel(frame4); - untrWords->setObjectName(QString::fromUtf8("untrWords")); + untrWords->setObjectName(QStringLiteral("untrWords")); gridLayout1->addWidget(untrWords, 1, 1, 1, 1); trWords = new QLabel(frame4); - trWords->setObjectName(QString::fromUtf8("trWords")); + trWords->setObjectName(QStringLiteral("trWords")); gridLayout1->addWidget(trWords, 1, 2, 1, 1); textLabel1 = new QLabel(frame4); - textLabel1->setObjectName(QString::fromUtf8("textLabel1")); + textLabel1->setObjectName(QStringLiteral("textLabel1")); gridLayout1->addWidget(textLabel1, 1, 0, 1, 1); trChars = new QLabel(frame4); - trChars->setObjectName(QString::fromUtf8("trChars")); + trChars->setObjectName(QStringLiteral("trChars")); gridLayout1->addWidget(trChars, 2, 2, 1, 1); untrChars = new QLabel(frame4); - untrChars->setObjectName(QString::fromUtf8("untrChars")); + untrChars->setObjectName(QStringLiteral("untrChars")); gridLayout1->addWidget(untrChars, 2, 1, 1, 1); textLabel3 = new QLabel(frame4); - textLabel3->setObjectName(QString::fromUtf8("textLabel3")); + textLabel3->setObjectName(QStringLiteral("textLabel3")); gridLayout1->addWidget(textLabel3, 2, 0, 1, 1); textLabel6 = new QLabel(frame4); - textLabel6->setObjectName(QString::fromUtf8("textLabel6")); + textLabel6->setObjectName(QStringLiteral("textLabel6")); gridLayout1->addWidget(textLabel6, 3, 0, 1, 1); trCharsSpc = new QLabel(frame4); - trCharsSpc->setObjectName(QString::fromUtf8("trCharsSpc")); + trCharsSpc->setObjectName(QStringLiteral("trCharsSpc")); gridLayout1->addWidget(trCharsSpc, 3, 2, 1, 1); untrCharsSpc = new QLabel(frame4); - untrCharsSpc->setObjectName(QString::fromUtf8("untrCharsSpc")); + untrCharsSpc->setObjectName(QStringLiteral("untrCharsSpc")); gridLayout1->addWidget(untrCharsSpc, 3, 1, 1, 1); diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h index 7624eaec58..d3033dc594 100644 --- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h +++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h @@ -99,7 +99,7 @@ public: void setupUi(QDialog *qdesigner_internal__Dialog) { if (qdesigner_internal__Dialog->objectName().isEmpty()) - qdesigner_internal__Dialog->setObjectName(QString::fromUtf8("qdesigner_internal__Dialog")); + qdesigner_internal__Dialog->setObjectName(QStringLiteral("qdesigner_internal__Dialog")); qdesigner_internal__Dialog->resize(400, 300); vboxLayout = new QVBoxLayout(qdesigner_internal__Dialog); #ifndef Q_OS_MAC @@ -108,9 +108,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(qdesigner_internal__Dialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -118,7 +118,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); vboxLayout1 = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -126,7 +126,7 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -134,15 +134,15 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); newButton = new QToolButton(groupBox); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName(QStringLiteral("newButton")); newButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hboxLayout->addWidget(newButton); deleteButton = new QToolButton(groupBox); - deleteButton->setObjectName(QString::fromUtf8("deleteButton")); + deleteButton->setObjectName(QStringLiteral("deleteButton")); deleteButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hboxLayout->addWidget(deleteButton); @@ -159,14 +159,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); hboxLayout1->addWidget(label); valueEdit = new QLineEdit(groupBox); - valueEdit->setObjectName(QString::fromUtf8("valueEdit")); + valueEdit->setObjectName(QStringLiteral("valueEdit")); hboxLayout1->addWidget(valueEdit); @@ -181,18 +181,18 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(0, 0, 0, 0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); vboxLayout2->addItem(spacerItem1); upButton = new QToolButton(groupBox); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName(QStringLiteral("upButton")); vboxLayout2->addWidget(upButton); downButton = new QToolButton(groupBox); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName(QStringLiteral("downButton")); vboxLayout2->addWidget(downButton); @@ -204,7 +204,7 @@ public: gridLayout->addLayout(vboxLayout2, 0, 1, 1, 1); listView = new QListView(groupBox); - listView->setObjectName(QString::fromUtf8("listView")); + listView->setObjectName(QStringLiteral("listView")); gridLayout->addWidget(listView, 0, 0, 1, 1); @@ -212,7 +212,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h index f5e8e2ea98..e4b2deb498 100644 --- a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h @@ -45,7 +45,7 @@ public: void setupUi(QWidget *StyleSheetEditor) { if (StyleSheetEditor->objectName().isEmpty()) - StyleSheetEditor->setObjectName(QString::fromUtf8("StyleSheetEditor")); + StyleSheetEditor->setObjectName(QStringLiteral("StyleSheetEditor")); StyleSheetEditor->resize(445, 289); gridLayout = new QGridLayout(StyleSheetEditor); #ifndef Q_OS_MAC @@ -54,7 +54,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); spacerItem = new QSpacerItem(32, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); gridLayout->addItem(spacerItem, 0, 6, 1, 1); @@ -64,7 +64,7 @@ public: gridLayout->addItem(spacerItem1, 0, 0, 1, 1); styleSheetCombo = new QComboBox(StyleSheetEditor); - styleSheetCombo->setObjectName(QString::fromUtf8("styleSheetCombo")); + styleSheetCombo->setObjectName(QStringLiteral("styleSheetCombo")); gridLayout->addWidget(styleSheetCombo, 0, 5, 1, 1); @@ -73,7 +73,7 @@ public: gridLayout->addItem(spacerItem2, 0, 3, 1, 1); styleCombo = new QComboBox(StyleSheetEditor); - styleCombo->setObjectName(QString::fromUtf8("styleCombo")); + styleCombo->setObjectName(QStringLiteral("styleCombo")); QSizePolicy sizePolicy(static_cast(5), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -83,7 +83,7 @@ public: gridLayout->addWidget(styleCombo, 0, 2, 1, 1); label_7 = new QLabel(StyleSheetEditor); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); QSizePolicy sizePolicy1(static_cast(0), static_cast(5)); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -97,13 +97,13 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); spacerItem3 = new QSpacerItem(321, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem3); applyButton = new QPushButton(StyleSheetEditor); - applyButton->setObjectName(QString::fromUtf8("applyButton")); + applyButton->setObjectName(QStringLiteral("applyButton")); applyButton->setEnabled(false); hboxLayout->addWidget(applyButton); @@ -112,12 +112,12 @@ public: gridLayout->addLayout(hboxLayout, 2, 0, 1, 7); styleTextEdit = new QTextEdit(StyleSheetEditor); - styleTextEdit->setObjectName(QString::fromUtf8("styleTextEdit")); + styleTextEdit->setObjectName(QStringLiteral("styleTextEdit")); gridLayout->addWidget(styleTextEdit, 1, 0, 1, 7); label_8 = new QLabel(StyleSheetEditor); - label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setObjectName(QStringLiteral("label_8")); sizePolicy1.setHeightForWidth(label_8->sizePolicy().hasHeightForWidth()); label_8->setSizePolicy(sizePolicy1); diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h index 424871f688..1e99c41312 100644 --- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h +++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h @@ -93,28 +93,28 @@ public: void setupUi(QWidget *TabbedBrowser) { if (TabbedBrowser->objectName().isEmpty()) - TabbedBrowser->setObjectName(QString::fromUtf8("TabbedBrowser")); + TabbedBrowser->setObjectName(QStringLiteral("TabbedBrowser")); TabbedBrowser->resize(710, 664); vboxLayout = new QVBoxLayout(TabbedBrowser); vboxLayout->setSpacing(0); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); tab = new QTabWidget(TabbedBrowser); - tab->setObjectName(QString::fromUtf8("tab")); + tab->setObjectName(QStringLiteral("tab")); frontpage = new QWidget(); - frontpage->setObjectName(QString::fromUtf8("frontpage")); + frontpage->setObjectName(QStringLiteral("frontpage")); gridLayout = new QGridLayout(frontpage); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); tab->addTab(frontpage, QString()); vboxLayout->addWidget(tab); frameFind = new QFrame(TabbedBrowser); - frameFind->setObjectName(QString::fromUtf8("frameFind")); + frameFind->setObjectName(QStringLiteral("frameFind")); frameFind->setFrameShape(QFrame::StyledPanel); frameFind->setFrameShadow(QFrame::Raised); hboxLayout = new QHBoxLayout(frameFind); @@ -122,9 +122,9 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); toolClose = new QToolButton(frameFind); - toolClose->setObjectName(QString::fromUtf8("toolClose")); + toolClose->setObjectName(QStringLiteral("toolClose")); const QIcon icon = QIcon(QString::fromUtf8(":/trolltech/assistant/images/close.png")); toolClose->setIcon(icon); toolClose->setAutoRaise(true); @@ -132,7 +132,7 @@ public: hboxLayout->addWidget(toolClose); editFind = new QLineEdit(frameFind); - editFind->setObjectName(QString::fromUtf8("editFind")); + editFind->setObjectName(QStringLiteral("editFind")); QSizePolicy sizePolicy(static_cast(0), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -143,7 +143,7 @@ public: hboxLayout->addWidget(editFind); toolPrevious = new QToolButton(frameFind); - toolPrevious->setObjectName(QString::fromUtf8("toolPrevious")); + toolPrevious->setObjectName(QStringLiteral("toolPrevious")); const QIcon icon1 = QIcon(QString::fromUtf8(":/trolltech/assistant/images/win/previous.png")); toolPrevious->setIcon(icon1); toolPrevious->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -152,7 +152,7 @@ public: hboxLayout->addWidget(toolPrevious); toolNext = new QToolButton(frameFind); - toolNext->setObjectName(QString::fromUtf8("toolNext")); + toolNext->setObjectName(QStringLiteral("toolNext")); toolNext->setMinimumSize(QSize(0, 0)); const QIcon icon2 = QIcon(QString::fromUtf8(":/trolltech/assistant/images/win/next.png")); toolNext->setIcon(icon2); @@ -163,17 +163,17 @@ public: hboxLayout->addWidget(toolNext); checkCase = new QCheckBox(frameFind); - checkCase->setObjectName(QString::fromUtf8("checkCase")); + checkCase->setObjectName(QStringLiteral("checkCase")); hboxLayout->addWidget(checkCase); checkWholeWords = new QCheckBox(frameFind); - checkWholeWords->setObjectName(QString::fromUtf8("checkWholeWords")); + checkWholeWords->setObjectName(QStringLiteral("checkWholeWords")); hboxLayout->addWidget(checkWholeWords); labelWrapped = new QLabel(frameFind); - labelWrapped->setObjectName(QString::fromUtf8("labelWrapped")); + labelWrapped->setObjectName(QStringLiteral("labelWrapped")); labelWrapped->setMinimumSize(QSize(0, 20)); labelWrapped->setMaximumSize(QSize(105, 20)); labelWrapped->setTextFormat(Qt::RichText); diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h index da5357d1fd..50542353c4 100644 --- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h @@ -120,28 +120,28 @@ public: void setupUi(QDialog *qdesigner_internal__TableWidgetEditor) { if (qdesigner_internal__TableWidgetEditor->objectName().isEmpty()) - qdesigner_internal__TableWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__TableWidgetEditor")); + qdesigner_internal__TableWidgetEditor->setObjectName(QStringLiteral("qdesigner_internal__TableWidgetEditor")); qdesigner_internal__TableWidgetEditor->resize(591, 455); gridLayout_4 = new QGridLayout(qdesigner_internal__TableWidgetEditor); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout_4->setObjectName(QStringLiteral("gridLayout_4")); itemsBox = new QGroupBox(qdesigner_internal__TableWidgetEditor); - itemsBox->setObjectName(QString::fromUtf8("itemsBox")); + itemsBox->setObjectName(QStringLiteral("itemsBox")); gridLayout = new QGridLayout(itemsBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); tableWidget = new QTableWidget(itemsBox); - tableWidget->setObjectName(QString::fromUtf8("tableWidget")); + tableWidget->setObjectName(QStringLiteral("tableWidget")); gridLayout->addWidget(tableWidget, 0, 0, 1, 1); horizontalLayout_5 = new QHBoxLayout(); - horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); + horizontalLayout_5->setObjectName(QStringLiteral("horizontalLayout_5")); label_3 = new QLabel(itemsBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); horizontalLayout_5->addWidget(label_3); itemIconSelector = new qdesigner_internal::IconSelector(itemsBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName(QStringLiteral("itemIconSelector")); horizontalLayout_5->addWidget(itemIconSelector); @@ -156,14 +156,14 @@ public: gridLayout_4->addWidget(itemsBox, 0, 0, 1, 1); buttonBox = new QDialogButtonBox(qdesigner_internal__TableWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); gridLayout_4->addWidget(buttonBox, 1, 0, 1, 2); widget = new QWidget(qdesigner_internal__TableWidgetEditor); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName(QStringLiteral("widget")); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -171,13 +171,13 @@ public: widget->setSizePolicy(sizePolicy); verticalLayout = new QVBoxLayout(widget); verticalLayout->setContentsMargins(0, 0, 0, 0); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName(QStringLiteral("verticalLayout")); columnsBox = new QGroupBox(widget); - columnsBox->setObjectName(QString::fromUtf8("columnsBox")); + columnsBox->setObjectName(QStringLiteral("columnsBox")); gridLayout_2 = new QGridLayout(columnsBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); columnsListWidget = new QListWidget(columnsBox); - columnsListWidget->setObjectName(QString::fromUtf8("columnsListWidget")); + columnsListWidget->setObjectName(QStringLiteral("columnsListWidget")); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -188,14 +188,14 @@ public: gridLayout_2->addWidget(columnsListWidget, 0, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); newColumnButton = new QToolButton(columnsBox); - newColumnButton->setObjectName(QString::fromUtf8("newColumnButton")); + newColumnButton->setObjectName(QStringLiteral("newColumnButton")); horizontalLayout_3->addWidget(newColumnButton); deleteColumnButton = new QToolButton(columnsBox); - deleteColumnButton->setObjectName(QString::fromUtf8("deleteColumnButton")); + deleteColumnButton->setObjectName(QStringLiteral("deleteColumnButton")); horizontalLayout_3->addWidget(deleteColumnButton); @@ -204,12 +204,12 @@ public: horizontalLayout_3->addItem(spacerItem); moveColumnUpButton = new QToolButton(columnsBox); - moveColumnUpButton->setObjectName(QString::fromUtf8("moveColumnUpButton")); + moveColumnUpButton->setObjectName(QStringLiteral("moveColumnUpButton")); horizontalLayout_3->addWidget(moveColumnUpButton); moveColumnDownButton = new QToolButton(columnsBox); - moveColumnDownButton->setObjectName(QString::fromUtf8("moveColumnDownButton")); + moveColumnDownButton->setObjectName(QStringLiteral("moveColumnDownButton")); horizontalLayout_3->addWidget(moveColumnDownButton); @@ -217,14 +217,14 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); label = new QLabel(columnsBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); horizontalLayout_2->addWidget(label); columnIconSelector = new qdesigner_internal::IconSelector(columnsBox); - columnIconSelector->setObjectName(QString::fromUtf8("columnIconSelector")); + columnIconSelector->setObjectName(QStringLiteral("columnIconSelector")); horizontalLayout_2->addWidget(columnIconSelector); @@ -239,11 +239,11 @@ public: verticalLayout->addWidget(columnsBox); rowsBox = new QGroupBox(widget); - rowsBox->setObjectName(QString::fromUtf8("rowsBox")); + rowsBox->setObjectName(QStringLiteral("rowsBox")); gridLayout_3 = new QGridLayout(rowsBox); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName(QStringLiteral("gridLayout_3")); rowsListWidget = new QListWidget(rowsBox); - rowsListWidget->setObjectName(QString::fromUtf8("rowsListWidget")); + rowsListWidget->setObjectName(QStringLiteral("rowsListWidget")); sizePolicy1.setHeightForWidth(rowsListWidget->sizePolicy().hasHeightForWidth()); rowsListWidget->setSizePolicy(sizePolicy1); rowsListWidget->setFocusPolicy(Qt::TabFocus); @@ -251,14 +251,14 @@ public: gridLayout_3->addWidget(rowsListWidget, 0, 0, 1, 1); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); newRowButton = new QToolButton(rowsBox); - newRowButton->setObjectName(QString::fromUtf8("newRowButton")); + newRowButton->setObjectName(QStringLiteral("newRowButton")); horizontalLayout_4->addWidget(newRowButton); deleteRowButton = new QToolButton(rowsBox); - deleteRowButton->setObjectName(QString::fromUtf8("deleteRowButton")); + deleteRowButton->setObjectName(QStringLiteral("deleteRowButton")); horizontalLayout_4->addWidget(deleteRowButton); @@ -267,12 +267,12 @@ public: horizontalLayout_4->addItem(spacerItem2); moveRowUpButton = new QToolButton(rowsBox); - moveRowUpButton->setObjectName(QString::fromUtf8("moveRowUpButton")); + moveRowUpButton->setObjectName(QStringLiteral("moveRowUpButton")); horizontalLayout_4->addWidget(moveRowUpButton); moveRowDownButton = new QToolButton(rowsBox); - moveRowDownButton->setObjectName(QString::fromUtf8("moveRowDownButton")); + moveRowDownButton->setObjectName(QStringLiteral("moveRowDownButton")); horizontalLayout_4->addWidget(moveRowDownButton); @@ -280,14 +280,14 @@ public: gridLayout_3->addLayout(horizontalLayout_4, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); label_2 = new QLabel(rowsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); horizontalLayout->addWidget(label_2); rowIconSelector = new qdesigner_internal::IconSelector(rowsBox); - rowIconSelector->setObjectName(QString::fromUtf8("rowIconSelector")); + rowIconSelector->setObjectName(QStringLiteral("rowIconSelector")); horizontalLayout->addWidget(rowIconSelector); diff --git a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h index 7d29265ba3..48d6a4e6a3 100644 --- a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h +++ b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h @@ -46,7 +46,7 @@ public: void setupUi(QWidget *TetrixWindow) { if (TetrixWindow->objectName().isEmpty()) - TetrixWindow->setObjectName(QString::fromUtf8("TetrixWindow")); + TetrixWindow->setObjectName(QStringLiteral("TetrixWindow")); TetrixWindow->resize(537, 475); vboxLayout = new QVBoxLayout(TetrixWindow); #ifndef Q_OS_MAC @@ -55,7 +55,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -63,39 +63,39 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); startButton = new QPushButton(TetrixWindow); - startButton->setObjectName(QString::fromUtf8("startButton")); + startButton->setObjectName(QStringLiteral("startButton")); startButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(startButton, 4, 0, 1, 1); linesLcd = new QLCDNumber(TetrixWindow); - linesLcd->setObjectName(QString::fromUtf8("linesLcd")); + linesLcd->setObjectName(QStringLiteral("linesLcd")); linesLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(linesLcd, 3, 2, 1, 1); linesRemovedLabel = new QLabel(TetrixWindow); - linesRemovedLabel->setObjectName(QString::fromUtf8("linesRemovedLabel")); + linesRemovedLabel->setObjectName(QStringLiteral("linesRemovedLabel")); linesRemovedLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(linesRemovedLabel, 2, 2, 1, 1); pauseButton = new QPushButton(TetrixWindow); - pauseButton->setObjectName(QString::fromUtf8("pauseButton")); + pauseButton->setObjectName(QStringLiteral("pauseButton")); pauseButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(pauseButton, 5, 2, 1, 1); scoreLcd = new QLCDNumber(TetrixWindow); - scoreLcd->setObjectName(QString::fromUtf8("scoreLcd")); + scoreLcd->setObjectName(QStringLiteral("scoreLcd")); scoreLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(scoreLcd, 1, 2, 1, 1); board = new TetrixBoard(TetrixWindow); - board->setObjectName(QString::fromUtf8("board")); + board->setObjectName(QStringLiteral("board")); board->setFocusPolicy(Qt::StrongFocus); board->setFrameShape(QFrame::Panel); board->setFrameShadow(QFrame::Sunken); @@ -103,31 +103,31 @@ public: gridLayout->addWidget(board, 0, 1, 6, 1); levelLabel = new QLabel(TetrixWindow); - levelLabel->setObjectName(QString::fromUtf8("levelLabel")); + levelLabel->setObjectName(QStringLiteral("levelLabel")); levelLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(levelLabel, 2, 0, 1, 1); nextLabel = new QLabel(TetrixWindow); - nextLabel->setObjectName(QString::fromUtf8("nextLabel")); + nextLabel->setObjectName(QStringLiteral("nextLabel")); nextLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(nextLabel, 0, 0, 1, 1); levelLcd = new QLCDNumber(TetrixWindow); - levelLcd->setObjectName(QString::fromUtf8("levelLcd")); + levelLcd->setObjectName(QStringLiteral("levelLcd")); levelLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(levelLcd, 3, 0, 1, 1); scoreLabel = new QLabel(TetrixWindow); - scoreLabel->setObjectName(QString::fromUtf8("scoreLabel")); + scoreLabel->setObjectName(QStringLiteral("scoreLabel")); scoreLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(scoreLabel, 0, 2, 1, 1); nextPieceLabel = new QLabel(TetrixWindow); - nextPieceLabel->setObjectName(QString::fromUtf8("nextPieceLabel")); + nextPieceLabel->setObjectName(QStringLiteral("nextPieceLabel")); nextPieceLabel->setFrameShape(QFrame::Box); nextPieceLabel->setFrameShadow(QFrame::Raised); nextPieceLabel->setAlignment(Qt::AlignCenter); @@ -135,7 +135,7 @@ public: gridLayout->addWidget(nextPieceLabel, 1, 0, 1, 1); quitButton = new QPushButton(TetrixWindow); - quitButton->setObjectName(QString::fromUtf8("quitButton")); + quitButton->setObjectName(QStringLiteral("quitButton")); quitButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(quitButton, 4, 2, 1, 1); diff --git a/tests/auto/tools/uic/baseline/textfinder.ui.h b/tests/auto/tools/uic/baseline/textfinder.ui.h index 4d6e57b3f9..9a5641c3de 100644 --- a/tests/auto/tools/uic/baseline/textfinder.ui.h +++ b/tests/auto/tools/uic/baseline/textfinder.ui.h @@ -40,7 +40,7 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName(QStringLiteral("Form")); Form->resize(378, 158); vboxLayout = new QVBoxLayout(Form); #ifndef Q_OS_MAC @@ -49,7 +49,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -57,19 +57,19 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); lineEdit = new QLineEdit(Form); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName(QStringLiteral("lineEdit")); gridLayout->addWidget(lineEdit, 0, 1, 1, 1); searchLabel = new QLabel(Form); - searchLabel->setObjectName(QString::fromUtf8("searchLabel")); + searchLabel->setObjectName(QStringLiteral("searchLabel")); gridLayout->addWidget(searchLabel, 0, 0, 1, 1); findButton = new QPushButton(Form); - findButton->setObjectName(QString::fromUtf8("findButton")); + findButton->setObjectName(QStringLiteral("findButton")); gridLayout->addWidget(findButton, 0, 2, 1, 1); @@ -77,7 +77,7 @@ public: vboxLayout->addLayout(gridLayout); textEdit = new QTextEdit(Form); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName(QStringLiteral("textEdit")); vboxLayout->addWidget(textEdit); diff --git a/tests/auto/tools/uic/baseline/topicchooser.ui.h b/tests/auto/tools/uic/baseline/topicchooser.ui.h index cf3186c1d9..3b16d5a627 100644 --- a/tests/auto/tools/uic/baseline/topicchooser.ui.h +++ b/tests/auto/tools/uic/baseline/topicchooser.ui.h @@ -41,7 +41,7 @@ public: void setupUi(QDialog *TopicChooser) { if (TopicChooser->objectName().isEmpty()) - TopicChooser->setObjectName(QString::fromUtf8("TopicChooser")); + TopicChooser->setObjectName(QStringLiteral("TopicChooser")); TopicChooser->resize(391, 223); TopicChooser->setSizeGripEnabled(true); vboxLayout = new QVBoxLayout(TopicChooser); @@ -49,41 +49,41 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - vboxLayout->setObjectName(QString::fromUtf8("unnamed")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("unnamed")); label = new QLabel(TopicChooser); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); vboxLayout->addWidget(label); listWidget = new QListWidget(TopicChooser); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); vboxLayout->addWidget(listWidget); Layout16 = new QWidget(TopicChooser); - Layout16->setObjectName(QString::fromUtf8("Layout16")); + Layout16->setObjectName(QStringLiteral("Layout16")); hboxLayout = new QHBoxLayout(Layout16); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - hboxLayout->setObjectName(QString::fromUtf8("unnamed")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("unnamed")); hboxLayout->setContentsMargins(0, 0, 0, 0); Horizontal_Spacing2 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(Horizontal_Spacing2); buttonDisplay = new QPushButton(Layout16); - buttonDisplay->setObjectName(QString::fromUtf8("buttonDisplay")); + buttonDisplay->setObjectName(QStringLiteral("buttonDisplay")); buttonDisplay->setAutoDefault(true); buttonDisplay->setDefault(true); hboxLayout->addWidget(buttonDisplay); buttonCancel = new QPushButton(Layout16); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setObjectName(QStringLiteral("buttonCancel")); buttonCancel->setAutoDefault(true); hboxLayout->addWidget(buttonCancel); diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h index 8ff12becc9..d811b13720 100644 --- a/tests/auto/tools/uic/baseline/translatedialog.ui.h +++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h @@ -96,7 +96,7 @@ public: void setupUi(QDialog *TranslateDialog) { if (TranslateDialog->objectName().isEmpty()) - TranslateDialog->setObjectName(QString::fromUtf8("TranslateDialog")); + TranslateDialog->setObjectName(QStringLiteral("TranslateDialog")); TranslateDialog->resize(407, 145); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); sizePolicy.setHorizontalStretch(0); @@ -106,35 +106,35 @@ public: hboxLayout = new QHBoxLayout(TranslateDialog); hboxLayout->setSpacing(6); hboxLayout->setContentsMargins(11, 11, 11, 11); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); hboxLayout->setContentsMargins(9, 9, 9, 9); vboxLayout = new QVBoxLayout(); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); vboxLayout->setContentsMargins(0, 0, 0, 0); gridLayout = new QGridLayout(); gridLayout->setSpacing(6); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); gridLayout->setHorizontalSpacing(6); gridLayout->setVerticalSpacing(6); gridLayout->setContentsMargins(0, 0, 0, 0); ledTranslateTo = new QLineEdit(TranslateDialog); - ledTranslateTo->setObjectName(QString::fromUtf8("ledTranslateTo")); + ledTranslateTo->setObjectName(QStringLiteral("ledTranslateTo")); gridLayout->addWidget(ledTranslateTo, 1, 1, 1, 1); findWhat = new QLabel(TranslateDialog); - findWhat->setObjectName(QString::fromUtf8("findWhat")); + findWhat->setObjectName(QStringLiteral("findWhat")); gridLayout->addWidget(findWhat, 0, 0, 1, 1); translateTo = new QLabel(TranslateDialog); - translateTo->setObjectName(QString::fromUtf8("translateTo")); + translateTo->setObjectName(QStringLiteral("translateTo")); gridLayout->addWidget(translateTo, 1, 0, 1, 1); ledFindWhat = new QLineEdit(TranslateDialog); - ledFindWhat->setObjectName(QString::fromUtf8("ledFindWhat")); + ledFindWhat->setObjectName(QStringLiteral("ledFindWhat")); gridLayout->addWidget(ledFindWhat, 0, 1, 1, 1); @@ -142,18 +142,18 @@ public: vboxLayout->addLayout(gridLayout); groupBox = new QGroupBox(TranslateDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout1 = new QVBoxLayout(groupBox); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); ckMatchCase = new QCheckBox(groupBox); - ckMatchCase->setObjectName(QString::fromUtf8("ckMatchCase")); + ckMatchCase->setObjectName(QStringLiteral("ckMatchCase")); vboxLayout1->addWidget(ckMatchCase); ckMarkFinished = new QCheckBox(groupBox); - ckMarkFinished->setObjectName(QString::fromUtf8("ckMarkFinished")); + ckMarkFinished->setObjectName(QStringLiteral("ckMarkFinished")); vboxLayout1->addWidget(ckMarkFinished); @@ -169,27 +169,27 @@ public: vboxLayout2 = new QVBoxLayout(); vboxLayout2->setSpacing(6); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); vboxLayout2->setContentsMargins(0, 0, 0, 0); findNxt = new QPushButton(TranslateDialog); - findNxt->setObjectName(QString::fromUtf8("findNxt")); + findNxt->setObjectName(QStringLiteral("findNxt")); findNxt->setDefault(true); findNxt->setFlat(false); vboxLayout2->addWidget(findNxt); translate = new QPushButton(TranslateDialog); - translate->setObjectName(QString::fromUtf8("translate")); + translate->setObjectName(QStringLiteral("translate")); vboxLayout2->addWidget(translate); translateAll = new QPushButton(TranslateDialog); - translateAll->setObjectName(QString::fromUtf8("translateAll")); + translateAll->setObjectName(QStringLiteral("translateAll")); vboxLayout2->addWidget(translateAll); cancel = new QPushButton(TranslateDialog); - cancel->setObjectName(QString::fromUtf8("cancel")); + cancel->setObjectName(QStringLiteral("cancel")); vboxLayout2->addWidget(cancel); diff --git a/tests/auto/tools/uic/baseline/translationsettings.ui.h b/tests/auto/tools/uic/baseline/translationsettings.ui.h index 770d43216b..22d764a67a 100644 --- a/tests/auto/tools/uic/baseline/translationsettings.ui.h +++ b/tests/auto/tools/uic/baseline/translationsettings.ui.h @@ -40,7 +40,7 @@ public: void setupUi(QDialog *TranslationSettings) { if (TranslationSettings->objectName().isEmpty()) - TranslationSettings->setObjectName(QString::fromUtf8("TranslationSettings")); + TranslationSettings->setObjectName(QStringLiteral("TranslationSettings")); TranslationSettings->resize(346, 125); vboxLayout = new QVBoxLayout(TranslationSettings); #ifndef Q_OS_MAC @@ -49,9 +49,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); groupBox = new QGroupBox(TranslationSettings); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -59,24 +59,24 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); cbLanguageList = new QComboBox(groupBox); - cbLanguageList->setObjectName(QString::fromUtf8("cbLanguageList")); + cbLanguageList->setObjectName(QStringLiteral("cbLanguageList")); gridLayout->addWidget(cbLanguageList, 0, 1, 1, 1); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 0, 0, 1, 1); cbCountryList = new QComboBox(groupBox); - cbCountryList->setObjectName(QString::fromUtf8("cbCountryList")); + cbCountryList->setObjectName(QStringLiteral("cbCountryList")); gridLayout->addWidget(cbCountryList, 1, 1, 1, 1); lblCountry = new QLabel(groupBox); - lblCountry->setObjectName(QString::fromUtf8("lblCountry")); + lblCountry->setObjectName(QStringLiteral("lblCountry")); gridLayout->addWidget(lblCountry, 1, 0, 1, 1); @@ -84,7 +84,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(TranslationSettings); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h index 843737fe59..3f94c2117e 100644 --- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h @@ -112,34 +112,34 @@ public: void setupUi(QDialog *qdesigner_internal__TreeWidgetEditor) { if (qdesigner_internal__TreeWidgetEditor->objectName().isEmpty()) - qdesigner_internal__TreeWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__TreeWidgetEditor")); + qdesigner_internal__TreeWidgetEditor->setObjectName(QStringLiteral("qdesigner_internal__TreeWidgetEditor")); qdesigner_internal__TreeWidgetEditor->resize(619, 321); gridLayout_3 = new QGridLayout(qdesigner_internal__TreeWidgetEditor); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName(QStringLiteral("gridLayout_3")); itemsBox = new QGroupBox(qdesigner_internal__TreeWidgetEditor); - itemsBox->setObjectName(QString::fromUtf8("itemsBox")); + itemsBox->setObjectName(QStringLiteral("itemsBox")); gridLayout = new QGridLayout(itemsBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); treeWidget = new QTreeWidget(itemsBox); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName(QStringLiteral("treeWidget")); treeWidget->setFocusPolicy(Qt::TabFocus); gridLayout->addWidget(treeWidget, 0, 0, 1, 1); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4")); newItemButton = new QToolButton(itemsBox); - newItemButton->setObjectName(QString::fromUtf8("newItemButton")); + newItemButton->setObjectName(QStringLiteral("newItemButton")); horizontalLayout_4->addWidget(newItemButton); newSubItemButton = new QToolButton(itemsBox); - newSubItemButton->setObjectName(QString::fromUtf8("newSubItemButton")); + newSubItemButton->setObjectName(QStringLiteral("newSubItemButton")); horizontalLayout_4->addWidget(newSubItemButton); deleteItemButton = new QToolButton(itemsBox); - deleteItemButton->setObjectName(QString::fromUtf8("deleteItemButton")); + deleteItemButton->setObjectName(QStringLiteral("deleteItemButton")); horizontalLayout_4->addWidget(deleteItemButton); @@ -148,22 +148,22 @@ public: horizontalLayout_4->addItem(spacerItem); moveItemLeftButton = new QToolButton(itemsBox); - moveItemLeftButton->setObjectName(QString::fromUtf8("moveItemLeftButton")); + moveItemLeftButton->setObjectName(QStringLiteral("moveItemLeftButton")); horizontalLayout_4->addWidget(moveItemLeftButton); moveItemRightButton = new QToolButton(itemsBox); - moveItemRightButton->setObjectName(QString::fromUtf8("moveItemRightButton")); + moveItemRightButton->setObjectName(QStringLiteral("moveItemRightButton")); horizontalLayout_4->addWidget(moveItemRightButton); moveItemUpButton = new QToolButton(itemsBox); - moveItemUpButton->setObjectName(QString::fromUtf8("moveItemUpButton")); + moveItemUpButton->setObjectName(QStringLiteral("moveItemUpButton")); horizontalLayout_4->addWidget(moveItemUpButton); moveItemDownButton = new QToolButton(itemsBox); - moveItemDownButton->setObjectName(QString::fromUtf8("moveItemDownButton")); + moveItemDownButton->setObjectName(QStringLiteral("moveItemDownButton")); horizontalLayout_4->addWidget(moveItemDownButton); @@ -171,14 +171,14 @@ public: gridLayout->addLayout(horizontalLayout_4, 1, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); label_2 = new QLabel(itemsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); horizontalLayout_2->addWidget(label_2); itemIconSelector = new qdesigner_internal::IconSelector(itemsBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName(QStringLiteral("itemIconSelector")); horizontalLayout_2->addWidget(itemIconSelector); @@ -193,16 +193,16 @@ public: gridLayout_3->addWidget(itemsBox, 0, 0, 1, 1); columnsBox = new QGroupBox(qdesigner_internal__TreeWidgetEditor); - columnsBox->setObjectName(QString::fromUtf8("columnsBox")); + columnsBox->setObjectName(QStringLiteral("columnsBox")); QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(columnsBox->sizePolicy().hasHeightForWidth()); columnsBox->setSizePolicy(sizePolicy); gridLayout_2 = new QGridLayout(columnsBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName(QStringLiteral("gridLayout_2")); listWidget = new QListWidget(columnsBox); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName(QStringLiteral("listWidget")); QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -213,14 +213,14 @@ public: gridLayout_2->addWidget(listWidget, 0, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); newColumnButton = new QToolButton(columnsBox); - newColumnButton->setObjectName(QString::fromUtf8("newColumnButton")); + newColumnButton->setObjectName(QStringLiteral("newColumnButton")); horizontalLayout_3->addWidget(newColumnButton); deleteColumnButton = new QToolButton(columnsBox); - deleteColumnButton->setObjectName(QString::fromUtf8("deleteColumnButton")); + deleteColumnButton->setObjectName(QStringLiteral("deleteColumnButton")); horizontalLayout_3->addWidget(deleteColumnButton); @@ -229,12 +229,12 @@ public: horizontalLayout_3->addItem(spacerItem1); moveColumnUpButton = new QToolButton(columnsBox); - moveColumnUpButton->setObjectName(QString::fromUtf8("moveColumnUpButton")); + moveColumnUpButton->setObjectName(QStringLiteral("moveColumnUpButton")); horizontalLayout_3->addWidget(moveColumnUpButton); moveColumnDownButton = new QToolButton(columnsBox); - moveColumnDownButton->setObjectName(QString::fromUtf8("moveColumnDownButton")); + moveColumnDownButton->setObjectName(QStringLiteral("moveColumnDownButton")); horizontalLayout_3->addWidget(moveColumnDownButton); @@ -242,14 +242,14 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); label = new QLabel(columnsBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); horizontalLayout->addWidget(label); columnIconSelector = new qdesigner_internal::IconSelector(columnsBox); - columnIconSelector->setObjectName(QString::fromUtf8("columnIconSelector")); + columnIconSelector->setObjectName(QStringLiteral("columnIconSelector")); horizontalLayout->addWidget(columnIconSelector); @@ -264,7 +264,7 @@ public: gridLayout_3->addWidget(columnsBox, 0, 1, 1, 1); buttonBox = new QDialogButtonBox(qdesigner_internal__TreeWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h index a26ff1c828..6a705ad455 100644 --- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h +++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h @@ -95,58 +95,58 @@ public: void setupUi(QMainWindow *TrPreviewToolClass) { if (TrPreviewToolClass->objectName().isEmpty()) - TrPreviewToolClass->setObjectName(QString::fromUtf8("TrPreviewToolClass")); + TrPreviewToolClass->setObjectName(QStringLiteral("TrPreviewToolClass")); TrPreviewToolClass->resize(593, 466); actionOpenForm = new QAction(TrPreviewToolClass); - actionOpenForm->setObjectName(QString::fromUtf8("actionOpenForm")); + actionOpenForm->setObjectName(QStringLiteral("actionOpenForm")); const QIcon icon = QIcon(QString::fromUtf8(":/images/open_form.png")); actionOpenForm->setIcon(icon); actionLoadTranslation = new QAction(TrPreviewToolClass); - actionLoadTranslation->setObjectName(QString::fromUtf8("actionLoadTranslation")); + actionLoadTranslation->setObjectName(QStringLiteral("actionLoadTranslation")); const QIcon icon1 = QIcon(QString::fromUtf8(":/images/load_translation.png")); actionLoadTranslation->setIcon(icon1); actionReloadTranslations = new QAction(TrPreviewToolClass); - actionReloadTranslations->setObjectName(QString::fromUtf8("actionReloadTranslations")); + actionReloadTranslations->setObjectName(QStringLiteral("actionReloadTranslations")); const QIcon icon2 = QIcon(QString::fromUtf8(":/images/reload_translations.png")); actionReloadTranslations->setIcon(icon2); actionClose = new QAction(TrPreviewToolClass); - actionClose->setObjectName(QString::fromUtf8("actionClose")); + actionClose->setObjectName(QStringLiteral("actionClose")); actionAbout = new QAction(TrPreviewToolClass); - actionAbout->setObjectName(QString::fromUtf8("actionAbout")); + actionAbout->setObjectName(QStringLiteral("actionAbout")); actionAbout_Qt = new QAction(TrPreviewToolClass); - actionAbout_Qt->setObjectName(QString::fromUtf8("actionAbout_Qt")); + actionAbout_Qt->setObjectName(QStringLiteral("actionAbout_Qt")); centralWidget = new QWidget(TrPreviewToolClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName(QStringLiteral("centralWidget")); TrPreviewToolClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(TrPreviewToolClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName(QStringLiteral("menuBar")); menuBar->setGeometry(QRect(0, 0, 593, 21)); menuView = new QMenu(menuBar); - menuView->setObjectName(QString::fromUtf8("menuView")); + menuView->setObjectName(QStringLiteral("menuView")); menuViewViews = new QMenu(menuView); - menuViewViews->setObjectName(QString::fromUtf8("menuViewViews")); + menuViewViews->setObjectName(QStringLiteral("menuViewViews")); menuHelp = new QMenu(menuBar); - menuHelp->setObjectName(QString::fromUtf8("menuHelp")); + menuHelp->setObjectName(QStringLiteral("menuHelp")); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName(QStringLiteral("menuFile")); TrPreviewToolClass->setMenuBar(menuBar); mainToolBar = new QToolBar(TrPreviewToolClass); - mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); + mainToolBar->setObjectName(QStringLiteral("mainToolBar")); mainToolBar->setOrientation(Qt::Horizontal); TrPreviewToolClass->addToolBar(static_cast(4), mainToolBar); statusBar = new QStatusBar(TrPreviewToolClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName(QStringLiteral("statusBar")); TrPreviewToolClass->setStatusBar(statusBar); dwForms = new QDockWidget(TrPreviewToolClass); - dwForms->setObjectName(QString::fromUtf8("dwForms")); + dwForms->setObjectName(QStringLiteral("dwForms")); dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + dockWidgetContents->setObjectName(QStringLiteral("dockWidgetContents")); vboxLayout = new QVBoxLayout(dockWidgetContents); vboxLayout->setSpacing(0); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); viewForms = new QListView(dockWidgetContents); - viewForms->setObjectName(QString::fromUtf8("viewForms")); + viewForms->setObjectName(QStringLiteral("viewForms")); viewForms->setEditTriggers(QAbstractItemView::NoEditTriggers); viewForms->setAlternatingRowColors(true); viewForms->setUniformItemSizes(true); diff --git a/tests/auto/tools/uic/baseline/validators.ui.h b/tests/auto/tools/uic/baseline/validators.ui.h index 12b8ff09f3..374f547cc6 100644 --- a/tests/auto/tools/uic/baseline/validators.ui.h +++ b/tests/auto/tools/uic/baseline/validators.ui.h @@ -80,7 +80,7 @@ public: void setupUi(QWidget *ValidatorsForm) { if (ValidatorsForm->objectName().isEmpty()) - ValidatorsForm->setObjectName(QString::fromUtf8("ValidatorsForm")); + ValidatorsForm->setObjectName(QStringLiteral("ValidatorsForm")); ValidatorsForm->resize(526, 668); vboxLayout = new QVBoxLayout(ValidatorsForm); #ifndef Q_OS_MAC @@ -89,7 +89,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -97,9 +97,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName(QStringLiteral("hboxLayout")); localeSelector = new LocaleSelector(ValidatorsForm); - localeSelector->setObjectName(QString::fromUtf8("localeSelector")); + localeSelector->setObjectName(QStringLiteral("localeSelector")); hboxLayout->addWidget(localeSelector); @@ -111,7 +111,7 @@ public: vboxLayout->addLayout(hboxLayout); groupBox = new QGroupBox(ValidatorsForm); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName(QStringLiteral("groupBox")); vboxLayout1 = new QVBoxLayout(groupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -119,7 +119,7 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName(QStringLiteral("vboxLayout1")); hboxLayout1 = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout1->setSpacing(6); @@ -127,7 +127,7 @@ public: #ifndef Q_OS_MAC hboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName(QStringLiteral("hboxLayout1")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -135,15 +135,15 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout->addWidget(label, 0, 0, 1, 1); minVal = new QSpinBox(groupBox); - minVal->setObjectName(QString::fromUtf8("minVal")); + minVal->setObjectName(QStringLiteral("minVal")); QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(1); sizePolicy.setVerticalStretch(0); @@ -155,13 +155,13 @@ public: gridLayout->addWidget(minVal, 0, 1, 1, 1); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout->addWidget(label_2, 1, 0, 1, 1); maxVal = new QSpinBox(groupBox); - maxVal->setObjectName(QString::fromUtf8("maxVal")); + maxVal->setObjectName(QStringLiteral("maxVal")); sizePolicy.setHeightForWidth(maxVal->sizePolicy().hasHeightForWidth()); maxVal->setSizePolicy(sizePolicy); maxVal->setMinimum(-1000000); @@ -174,7 +174,7 @@ public: hboxLayout1->addLayout(gridLayout); frame = new QFrame(groupBox); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName(QStringLiteral("frame")); frame->setFrameShape(QFrame::StyledPanel); frame->setFrameShadow(QFrame::Sunken); vboxLayout2 = new QVBoxLayout(frame); @@ -184,9 +184,9 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName(QStringLiteral("vboxLayout2")); ledWidget = new LEDWidget(frame); - ledWidget->setObjectName(QString::fromUtf8("ledWidget")); + ledWidget->setObjectName(QStringLiteral("ledWidget")); QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); @@ -198,7 +198,7 @@ public: vboxLayout2->addWidget(ledWidget); label_7 = new QLabel(frame); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName(QStringLiteral("label_7")); vboxLayout2->addWidget(label_7); @@ -213,7 +213,7 @@ public: vboxLayout1->addItem(spacerItem1); editor = new QLineEdit(groupBox); - editor->setObjectName(QString::fromUtf8("editor")); + editor->setObjectName(QStringLiteral("editor")); vboxLayout1->addWidget(editor); @@ -221,7 +221,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(ValidatorsForm); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName(QStringLiteral("groupBox_2")); vboxLayout3 = new QVBoxLayout(groupBox_2); #ifndef Q_OS_MAC vboxLayout3->setSpacing(6); @@ -229,7 +229,7 @@ public: #ifndef Q_OS_MAC vboxLayout3->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName(QStringLiteral("vboxLayout3")); hboxLayout2 = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout2->setSpacing(6); @@ -237,7 +237,7 @@ public: #ifndef Q_OS_MAC hboxLayout2->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName(QStringLiteral("hboxLayout2")); gridLayout1 = new QGridLayout(); #ifndef Q_OS_MAC gridLayout1->setSpacing(6); @@ -245,15 +245,15 @@ public: #ifndef Q_OS_MAC gridLayout1->setContentsMargins(0, 0, 0, 0); #endif - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); label_3 = new QLabel(groupBox_2); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_3, 0, 0, 1, 1); doubleMinVal = new QDoubleSpinBox(groupBox_2); - doubleMinVal->setObjectName(QString::fromUtf8("doubleMinVal")); + doubleMinVal->setObjectName(QStringLiteral("doubleMinVal")); sizePolicy.setHeightForWidth(doubleMinVal->sizePolicy().hasHeightForWidth()); doubleMinVal->setSizePolicy(sizePolicy); doubleMinVal->setMinimum(-100000); @@ -263,24 +263,24 @@ public: gridLayout1->addWidget(doubleMinVal, 0, 1, 1, 1); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_5, 0, 2, 1, 1); doubleFormat = new QComboBox(groupBox_2); - doubleFormat->setObjectName(QString::fromUtf8("doubleFormat")); + doubleFormat->setObjectName(QStringLiteral("doubleFormat")); gridLayout1->addWidget(doubleFormat, 0, 3, 1, 1); label_4 = new QLabel(groupBox_2); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_4, 1, 0, 1, 1); doubleMaxVal = new QDoubleSpinBox(groupBox_2); - doubleMaxVal->setObjectName(QString::fromUtf8("doubleMaxVal")); + doubleMaxVal->setObjectName(QStringLiteral("doubleMaxVal")); sizePolicy.setHeightForWidth(doubleMaxVal->sizePolicy().hasHeightForWidth()); doubleMaxVal->setSizePolicy(sizePolicy); doubleMaxVal->setMinimum(-100000); @@ -290,13 +290,13 @@ public: gridLayout1->addWidget(doubleMaxVal, 1, 1, 1, 1); label_6 = new QLabel(groupBox_2); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_6, 1, 2, 1, 1); doubleDecimals = new QSpinBox(groupBox_2); - doubleDecimals->setObjectName(QString::fromUtf8("doubleDecimals")); + doubleDecimals->setObjectName(QStringLiteral("doubleDecimals")); doubleDecimals->setValue(2); gridLayout1->addWidget(doubleDecimals, 1, 3, 1, 1); @@ -305,7 +305,7 @@ public: hboxLayout2->addLayout(gridLayout1); frame_2 = new QFrame(groupBox_2); - frame_2->setObjectName(QString::fromUtf8("frame_2")); + frame_2->setObjectName(QStringLiteral("frame_2")); frame_2->setFrameShape(QFrame::StyledPanel); frame_2->setFrameShadow(QFrame::Sunken); vboxLayout4 = new QVBoxLayout(frame_2); @@ -315,16 +315,16 @@ public: #ifndef Q_OS_MAC vboxLayout4->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4")); + vboxLayout4->setObjectName(QStringLiteral("vboxLayout4")); doubleLedWidget = new LEDWidget(frame_2); - doubleLedWidget->setObjectName(QString::fromUtf8("doubleLedWidget")); + doubleLedWidget->setObjectName(QStringLiteral("doubleLedWidget")); doubleLedWidget->setPixmap(QPixmap(QString::fromUtf8(":/ledoff.png"))); doubleLedWidget->setAlignment(Qt::AlignCenter); vboxLayout4->addWidget(doubleLedWidget); label_8 = new QLabel(frame_2); - label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setObjectName(QStringLiteral("label_8")); vboxLayout4->addWidget(label_8); @@ -339,7 +339,7 @@ public: vboxLayout3->addItem(spacerItem2); doubleEditor = new QLineEdit(groupBox_2); - doubleEditor->setObjectName(QString::fromUtf8("doubleEditor")); + doubleEditor->setObjectName(QStringLiteral("doubleEditor")); vboxLayout3->addWidget(doubleEditor); @@ -355,13 +355,13 @@ public: hboxLayout3->setSpacing(6); #endif hboxLayout3->setContentsMargins(0, 0, 0, 0); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName(QStringLiteral("hboxLayout3")); spacerItem4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout3->addItem(spacerItem4); pushButton = new QPushButton(ValidatorsForm); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName(QStringLiteral("pushButton")); hboxLayout3->addWidget(pushButton); diff --git a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h index 1a17d16efe..f03ac32151 100644 --- a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h +++ b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h @@ -68,19 +68,19 @@ public: void setupUi(QDialog *WateringConfigDialog) { if (WateringConfigDialog->objectName().isEmpty()) - WateringConfigDialog->setObjectName(QString::fromUtf8("WateringConfigDialog")); + WateringConfigDialog->setObjectName(QStringLiteral("WateringConfigDialog")); WateringConfigDialog->resize(334, 550); vboxLayout = new QVBoxLayout(WateringConfigDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName(QStringLiteral("vboxLayout")); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName(QStringLiteral("gridLayout")); label_3 = new QLabel(WateringConfigDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName(QStringLiteral("label_3")); gridLayout->addWidget(label_3, 0, 0, 1, 1); plantComboBox = new QComboBox(WateringConfigDialog); - plantComboBox->setObjectName(QString::fromUtf8("plantComboBox")); + plantComboBox->setObjectName(QStringLiteral("plantComboBox")); QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); @@ -94,12 +94,12 @@ public: gridLayout->addItem(spacerItem, 1, 0, 1, 1); label_2 = new QLabel(WateringConfigDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName(QStringLiteral("label_2")); gridLayout->addWidget(label_2, 2, 0, 1, 1); temperatureCheckBox = new QCheckBox(WateringConfigDialog); - temperatureCheckBox->setObjectName(QString::fromUtf8("temperatureCheckBox")); + temperatureCheckBox->setObjectName(QStringLiteral("temperatureCheckBox")); gridLayout->addWidget(temperatureCheckBox, 3, 1, 1, 3); @@ -108,7 +108,7 @@ public: gridLayout->addItem(spacerItem1, 4, 1, 1, 1); temperatureSpinBox = new QSpinBox(WateringConfigDialog); - temperatureSpinBox->setObjectName(QString::fromUtf8("temperatureSpinBox")); + temperatureSpinBox->setObjectName(QStringLiteral("temperatureSpinBox")); temperatureSpinBox->setEnabled(false); temperatureSpinBox->setMinimum(10); temperatureSpinBox->setMaximum(60); @@ -121,7 +121,7 @@ public: gridLayout->addItem(spacerItem2, 4, 3, 1, 1); rainCheckBox = new QCheckBox(WateringConfigDialog); - rainCheckBox->setObjectName(QString::fromUtf8("rainCheckBox")); + rainCheckBox->setObjectName(QStringLiteral("rainCheckBox")); gridLayout->addWidget(rainCheckBox, 5, 1, 1, 3); @@ -130,7 +130,7 @@ public: gridLayout->addItem(spacerItem3, 6, 1, 1, 1); rainSpinBox = new QSpinBox(WateringConfigDialog); - rainSpinBox->setObjectName(QString::fromUtf8("rainSpinBox")); + rainSpinBox->setObjectName(QStringLiteral("rainSpinBox")); rainSpinBox->setEnabled(false); rainSpinBox->setMinimum(1); @@ -145,22 +145,22 @@ public: gridLayout->addItem(spacerItem5, 7, 2, 1, 1); label = new QLabel(WateringConfigDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName(QStringLiteral("label")); gridLayout->addWidget(label, 8, 0, 1, 1); startTimeEdit = new QTimeEdit(WateringConfigDialog); - startTimeEdit->setObjectName(QString::fromUtf8("startTimeEdit")); + startTimeEdit->setObjectName(QStringLiteral("startTimeEdit")); gridLayout->addWidget(startTimeEdit, 8, 1, 1, 3); label_4 = new QLabel(WateringConfigDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName(QStringLiteral("label_4")); gridLayout->addWidget(label_4, 9, 0, 1, 1); amountSpinBox = new QSpinBox(WateringConfigDialog); - amountSpinBox->setObjectName(QString::fromUtf8("amountSpinBox")); + amountSpinBox->setObjectName(QStringLiteral("amountSpinBox")); amountSpinBox->setMinimum(100); amountSpinBox->setMaximum(10000); amountSpinBox->setSingleStep(100); @@ -169,22 +169,22 @@ public: gridLayout->addWidget(amountSpinBox, 9, 1, 1, 3); label_5 = new QLabel(WateringConfigDialog); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName(QStringLiteral("label_5")); gridLayout->addWidget(label_5, 10, 0, 1, 1); sourceComboBox = new QComboBox(WateringConfigDialog); - sourceComboBox->setObjectName(QString::fromUtf8("sourceComboBox")); + sourceComboBox->setObjectName(QStringLiteral("sourceComboBox")); gridLayout->addWidget(sourceComboBox, 10, 1, 1, 3); label_6 = new QLabel(WateringConfigDialog); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName(QStringLiteral("label_6")); gridLayout->addWidget(label_6, 11, 0, 1, 1); filterCheckBox = new QCheckBox(WateringConfigDialog); - filterCheckBox->setObjectName(QString::fromUtf8("filterCheckBox")); + filterCheckBox->setObjectName(QStringLiteral("filterCheckBox")); gridLayout->addWidget(filterCheckBox, 11, 1, 1, 2); @@ -200,18 +200,18 @@ public: vboxLayout->addLayout(gridLayout); gridLayout1 = new QGridLayout(); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName(QStringLiteral("gridLayout1")); spacerItem8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); gridLayout1->addItem(spacerItem8, 0, 1, 1, 1); helpBrowser = new HelpBrowser(WateringConfigDialog); - helpBrowser->setObjectName(QString::fromUtf8("helpBrowser")); + helpBrowser->setObjectName(QStringLiteral("helpBrowser")); gridLayout1->addWidget(helpBrowser, 1, 0, 1, 2); helpLabel = new QLabel(WateringConfigDialog); - helpLabel->setObjectName(QString::fromUtf8("helpLabel")); + helpLabel->setObjectName(QStringLiteral("helpLabel")); gridLayout1->addWidget(helpLabel, 0, 0, 1, 1); @@ -219,14 +219,14 @@ public: vboxLayout->addLayout(gridLayout1); line = new QFrame(WateringConfigDialog); - line->setObjectName(QString::fromUtf8("line")); + line->setObjectName(QStringLiteral("line")); line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(line); buttonBox = new QDialogButtonBox(WateringConfigDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName(QStringLiteral("buttonBox")); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); -- cgit v1.2.3 From ed9b6086845542381d624c435c35e27a6c968aed Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Feb 2012 15:44:21 +0100 Subject: Fix warning about converting false to pointer value. Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f Reviewed-by: Bradley T. Hughes Reviewed-by: Stephen Kelly --- tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 6e4bbc75c2..cba8675bee 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -2064,7 +2064,7 @@ class NoQuitOnHideWidget : public QWidget { Q_OBJECT public: - NoQuitOnHideWidget(QWidget *parent = 0) + explicit NoQuitOnHideWidget(QWidget *parent = 0) : QWidget(parent) { QTimer::singleShot(0, this, SLOT(hide())); @@ -2081,7 +2081,7 @@ void tst_QApplication::noQuitOnHide() { int argc = 0; QApplication app(argc, 0); - QWidget *window1 = new NoQuitOnHideWidget(false); + QWidget *window1 = new NoQuitOnHideWidget; window1->show(); QCOMPARE(app.exec(), 1); } -- cgit v1.2.3 From 054114a459580b71e170dc6bf356e8943d0ed068 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Feb 2012 15:36:57 +0100 Subject: Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Forward-declare instead. Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1 Reviewed-by: Samuel Rødal --- tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index c1643ea355..563baef486 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -52,6 +52,7 @@ #include #include +#include #include #include -- cgit v1.2.3 From a0587f79e55e6291f302be5f62fc2ce22da08e91 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 20 Feb 2012 14:26:00 +0100 Subject: Silence warnings/debug output from qobject tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They create noise in the test results. Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502 Reviewed-by: Olivier Goffart Reviewed-by: João Abecasis Reviewed-by: Bradley T. Hughes --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 8f4203a216..a6ad1d53bc 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -3186,6 +3186,14 @@ void tst_QObject::dumpObjectInfo() QObject a, b; QObject::connect(&a, SIGNAL(destroyed(QObject *)), &b, SLOT(deleteLater())); a.disconnect(&b); +#ifdef QT_DEBUG + QTest::ignoreMessage(QtDebugMsg, "OBJECT QObject::unnamed"); + QTest::ignoreMessage(QtDebugMsg, " SIGNALS OUT"); + QTest::ignoreMessage(QtDebugMsg, " signal: destroyed(QObject*)"); + QTest::ignoreMessage(QtDebugMsg, " "); + QTest::ignoreMessage(QtDebugMsg, " SIGNALS IN"); + QTest::ignoreMessage(QtDebugMsg, " "); +#endif a.dumpObjectInfo(); // should not crash } @@ -3813,12 +3821,18 @@ void tst_QObject::sameName() c2.emitSignal1(); QCOMPARE(c1.s, 2); +#ifndef QT_NO_DEBUG + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::indexOfSignal: signal aPublicSlot() from SenderObject redefined in ConfusingObject"); +#endif QVERIFY(connect(&c2, SIGNAL(aPublicSlot()), &c1, SLOT(signal1()))); c2.aPublicSlot(); QCOMPARE(c2.aPublicSlotCalled, 0); QCOMPARE(c1.aPublicSlotCalled, 0); QCOMPARE(c1.s, 3); +#ifndef QT_NO_DEBUG + QTest::ignoreMessage(QtWarningMsg, "QMetaObject::indexOfSignal: signal aPublicSlot() from SenderObject redefined in ConfusingObject"); +#endif QVERIFY(connect(&c2, SIGNAL(aPublicSlot()), &c1, SLOT(aPublicSlot()))); c2.aPublicSlot(); QCOMPARE(c2.aPublicSlotCalled, 0); -- cgit v1.2.3 From e88f9a92b7ab05ea9bc25083de7dee1b67dd673e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 14 Feb 2012 12:55:49 +1000 Subject: Stabilize tst_qdbusabstractinterface and make it XFAIL This test was written incorrectly in a way which happened to allow it to pass most of the time (but not all the time). Reset the state of test objects between each test function, and mark the broken functions with QEXPECT_FAIL and a link to a task. Replace the unusual WaitForPinger construct with the usual QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations. Task-number: QTBUG-24262 Change-Id: I82d09002307c0b500bf60cd5b583674321b37609 Reviewed-by: Thiago Macieira --- .../tst_qdbusabstractinterface.cpp | 78 +++++++++++----------- 1 file changed, 38 insertions(+), 40 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp index 28dfd0b63f..b696294005 100644 --- a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp +++ b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp @@ -89,7 +89,9 @@ public: private slots: void initTestCase(); - void cleanupTestCase(); + + void init(); + void cleanup(); void makeVoidCall(); void makeStringCall(); @@ -194,39 +196,6 @@ private: QProcess proc; }; -class WaitForQPinger: public QObject -{ - Q_OBJECT -public: - WaitForQPinger(); - bool ok(); -public Q_SLOTS: - void ownerChange(const QString &name) - { - if (name == serviceName) - loop.quit(); - } - -private: - QEventLoop loop; -}; - -WaitForQPinger::WaitForQPinger() -{ - QDBusConnection con = QDBusConnection::sessionBus(); - if (!ok()) { - connect(con.interface(), SIGNAL(serviceOwnerChanged(QString,QString,QString)), - SLOT(ownerChange(QString))); - QTimer::singleShot(2000, &loop, SLOT(quit())); - loop.exec(); - } -} - -bool WaitForQPinger::ok() -{ - return QDBusConnection::sessionBus().isConnected() && - QDBusConnection::sessionBus().interface()->isServiceRegistered(serviceName); -} tst_QDBusAbstractInterface::tst_QDBusAbstractInterface() { @@ -244,6 +213,16 @@ void tst_QDBusAbstractInterface::initTestCase() QDBusConnection con = QDBusConnection::sessionBus(); QVERIFY(con.isConnected()); con.registerObject("/", &targetObj, QDBusConnection::ExportScriptableContents); +} + +void tst_QDBusAbstractInterface::init() +{ + QDBusConnection con = QDBusConnection::sessionBus(); + QVERIFY(con.isConnected()); + + // verify service isn't registered by something else + // (e.g. a left over qpinger from a previous test run) + QVERIFY(!con.interface()->isServiceRegistered(serviceName)); // start peer server #ifdef Q_OS_WIN @@ -253,9 +232,8 @@ void tst_QDBusAbstractInterface::initTestCase() #endif QVERIFY(proc.waitForStarted()); - WaitForQPinger w; - QVERIFY(w.ok()); - //QTest::qWait(2000); + // verify service is now registered + QTRY_VERIFY(con.interface()->isServiceRegistered(serviceName)); // get peer server address QDBusMessage req = QDBusMessage::createMethodCall(serviceName, objectPath, interfaceName, "address"); @@ -273,10 +251,24 @@ void tst_QDBusAbstractInterface::initTestCase() QVERIFY(rpl2.arguments().at(0).toBool()); } -void tst_QDBusAbstractInterface::cleanupTestCase() +void tst_QDBusAbstractInterface::cleanup() { - proc.close(); - proc.kill(); + QDBusConnection::disconnectFromPeer("peer"); + + // Kill peer, resetting the object exported by a separate process + proc.terminate(); + QVERIFY(proc.waitForFinished() || proc.state() == QProcess::NotRunning); + + // Reset the object exported by this process + targetObj.m_stringProp = QString(); + targetObj.m_variantProp = QDBusVariant(); + targetObj.m_complexProp = RegisteredType(); + + // Wait until the service is certainly not registered + QDBusConnection con = QDBusConnection::sessionBus(); + if (con.isConnected()) { + QTRY_VERIFY(!con.interface()->isServiceRegistered(serviceName)); + } } void tst_QDBusAbstractInterface::makeVoidCall() @@ -635,6 +627,7 @@ void tst_QDBusAbstractInterface::stringPropWritePeer() QString expectedValue = "This is a value"; QVERIFY(p->setProperty("stringProp", expectedValue)); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_stringProp, expectedValue); } @@ -660,6 +653,7 @@ void tst_QDBusAbstractInterface::variantPropWritePeer() QDBusVariant expectedValue = QDBusVariant(Q_INT64_C(-47)); QVERIFY(p->setProperty("variantProp", qVariantFromValue(expectedValue))); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_variantProp.variant(), expectedValue.variant()); } @@ -683,6 +677,7 @@ void tst_QDBusAbstractInterface::complexPropWritePeer() RegisteredType expectedValue = RegisteredType("This is a value"); QVERIFY(p->setProperty("complexProp", qVariantFromValue(expectedValue))); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_complexProp, expectedValue); } @@ -762,6 +757,7 @@ void tst_QDBusAbstractInterface::stringPropDirectWritePeer() QString expectedValue = "This is a value"; p->setStringProp(expectedValue); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_stringProp, expectedValue); } @@ -783,6 +779,7 @@ void tst_QDBusAbstractInterface::variantPropDirectWritePeer() QDBusVariant expectedValue = QDBusVariant(Q_INT64_C(-47)); p->setVariantProp(expectedValue); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_variantProp.variant().userType(), expectedValue.variant().userType()); QCOMPARE(targetObj.m_variantProp.variant(), expectedValue.variant()); } @@ -805,6 +802,7 @@ void tst_QDBusAbstractInterface::complexPropDirectWritePeer() RegisteredType expectedValue = RegisteredType("This is a value"); p->setComplexProp(expectedValue); + QEXPECT_FAIL("", "QTBUG-24262 peer tests are broken", Abort); QCOMPARE(targetObj.m_complexProp, expectedValue); } -- cgit v1.2.3 From 4c56db58a285a7177c735f278f4a6ecd84122e9d Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Mon, 20 Feb 2012 11:36:24 +1000 Subject: Changed qnetworksession unittest to work from installation dir - Made test depend on subprogram - added install of subprogram Change-Id: Ib263e9e75ed3c900b52fb1c9b6d319e71d19bdbb Reviewed-by: Rohan McGovern --- tests/auto/network/bearer/qnetworksession/qnetworksession.pro | 4 +++- tests/auto/network/bearer/qnetworksession/test/test.pro | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/network/bearer/qnetworksession/qnetworksession.pro b/tests/auto/network/bearer/qnetworksession/qnetworksession.pro index a85925bc17..f1cb47d14e 100644 --- a/tests/auto/network/bearer/qnetworksession/qnetworksession.pro +++ b/tests/auto/network/bearer/qnetworksession/qnetworksession.pro @@ -1,2 +1,4 @@ TEMPLATE = subdirs -SUBDIRS = lackey test +SUBDIRS = lackey +test.depends = $$SUBDIRS +SUBDIRS += test diff --git a/tests/auto/network/bearer/qnetworksession/test/test.pro b/tests/auto/network/bearer/qnetworksession/test/test.pro index 5567e35b02..2f1a9ba6ea 100644 --- a/tests/auto/network/bearer/qnetworksession/test/test.pro +++ b/tests/auto/network/bearer/qnetworksession/test/test.pro @@ -14,3 +14,6 @@ CONFIG(debug_and_release) { } else { DESTDIR = .. } + +load(testcase) # for target.path and installTestHelperApp() +installTestHelperApp("../lackey/lackey",lackey,lackey) -- cgit v1.2.3 From 8a182591be39e4c02f8acd907b31e5bebbd828a5 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 20 Feb 2012 15:12:50 +1000 Subject: tst_qapplication: mark expected failure on mac The tab key behavior in Qt5 no longer respects the "Text boxes and lists only" tab navigation option in OSX, which is the default. This is a regression since Qt4. Task-number: QTBUG-24372 Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c Reviewed-by: Toby Tomkins --- tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index cba8675bee..4d52e6215e 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -69,6 +69,10 @@ #include #endif +QT_BEGIN_NAMESPACE +extern bool Q_GUI_EXPORT qt_tab_all_widgets; // from qapplication.cpp +QT_END_NAMESPACE + class tst_QApplication : public QObject { Q_OBJECT @@ -1525,8 +1529,15 @@ void tst_QApplication::focusChanged() QSettings appleSettings(QLatin1String("apple.com")); QVariant appleValue = appleSettings.value(QLatin1String("AppleKeyboardUIMode"), 0); tabAllControls = (appleValue.toInt() & 0x2); + if (!tabAllControls) { + QEXPECT_FAIL("", "QTBUG-24372 Mac tab key \"Text boxes and lists only\" vs " + "\"All controls\" setting is not respected in Qt5", Abort); + } #endif + // make sure Qt's idea of tabbing between widgets matches what we think it should + QCOMPARE(qt_tab_all_widgets, tabAllControls); + tab.simulate(now); if (!tabAllControls) { QVERIFY(spy.count() == 0); -- cgit v1.2.3 From ca1aa0da03aaf34aac1470bab52ce835a0392bef Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 20 Feb 2012 16:01:43 +1000 Subject: Make the QApplication autotest work for shadow builds. Use QFINDTESTDATA to locate the helper applications. Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961 Reviewed-by: Rohan McGovern --- .../kernel/qapplication/tst_qapplication.cpp | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 4d52e6215e..98872cb2f6 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -1398,12 +1398,21 @@ void tst_QApplication::testDeleteLaterProcessEvents() void tst_QApplication::desktopSettingsAware() { #ifndef QT_NO_PROCESS - QProcess testProcess; - const QString path = QStringLiteral("desktopsettingsaware/desktopsettingsaware"); + QString path; + { + // We need an application object for QFINDTESTDATA to work + // properly in all cases. + int argc = 0; + QCoreApplication app(argc, 0); + path = QFINDTESTDATA("desktopsettingsaware/"); + } + QVERIFY2(!path.isEmpty(), "Cannot locate desktopsettingsaware helper application"); + path += "desktopsettingsaware"; #ifdef Q_OS_WINCE int argc = 0; QApplication tmpApp(argc, 0, QApplication::GuiServer); #endif + QProcess testProcess; testProcess.start(path); QVERIFY2(testProcess.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString()))); @@ -2061,9 +2070,19 @@ void tst_QApplication::touchEventPropagation() void tst_QApplication::qtbug_12673() { + QString path; + { + // We need an application object for QFINDTESTDATA to work + // properly in all cases. + int argc = 0; + QCoreApplication app(argc, 0); + path = QFINDTESTDATA("modal/"); + } + QVERIFY2(!path.isEmpty(), "Cannot locate modal helper application"); + path += "modal"; + QProcess testProcess; QStringList arguments; - const QString path = QStringLiteral("modal/modal"); testProcess.start(path, arguments); QVERIFY2(testProcess.waitForStarted(), qPrintable(QString::fromLatin1("Cannot start '%1': %2").arg(path, testProcess.errorString()))); -- cgit v1.2.3 From a30f42ddb3701ad90e7f0bb89d4ef435af6b5cf2 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Tue, 21 Feb 2012 11:03:00 +1000 Subject: Flag two tests (Win+A, Simon+G) in parseString as expect fail on OSX. Remove previously defined insignificant test flag as the number of tests failing has been reduced. Task-number: QTBUG-24406 Task-number: QTBUG-23058 Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2 Reviewed-by: Rohan McGovern --- tests/auto/gui/kernel/qkeysequence/qkeysequence.pro | 2 -- tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro index c6eb02919e..1e0baafd09 100644 --- a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro +++ b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro @@ -7,5 +7,3 @@ QT += core-private gui-private SOURCES += tst_qkeysequence.cpp RESOURCES += qkeysequence.qrc - -mac: CONFIG += insignificant_test # QTBUG-23058 diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index eed7977c82..29588e2ee9 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -576,6 +576,11 @@ void tst_QKeySequence::parseString() QFETCH( QString, strSequence ); QFETCH( QKeySequence, keycode ); +#ifdef Q_OS_MAC + QEXPECT_FAIL("Win+A", "QTBUG-24406 - This test fails on OSX", Abort); + QEXPECT_FAIL("Simon+G", "QTBUG-24406 - This test fails on OSX", Abort); +#endif + QCOMPARE( QKeySequence(strSequence).toString(), keycode.toString() ); QVERIFY( QKeySequence(strSequence) == keycode ); } -- cgit v1.2.3 From 7d44f45fb73e53af948006d72e2a7cefffd2519a Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 21 Feb 2012 12:00:14 +1000 Subject: Fix warning about unregistered metatype in QWindow autotest. Change-Id: If9d8d7e1cd52815ef7231294e4890dfafcd28ec8 Reviewed-by: Rohan McGovern --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto') diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index a860793ce4..90c96b4030 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -596,6 +596,8 @@ void tst_QWindow::touchCancelWithTouchToMouse() void tst_QWindow::orientation() { + qRegisterMetaType("Qt::ScreenOrientation"); + QWindow window; window.setGeometry(80, 80, 40, 40); window.create(); -- cgit v1.2.3 From f8c3074faa4d872f0c313bdf27ceb586fa1003e8 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 21 Feb 2012 12:52:15 +1000 Subject: Allow printer names to contain hyphens in QPrinterInfo test. Change-Id: I473627413d2f1cd5637704f2948eb07a264be49e Reviewed-by: Rohan McGovern --- tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp index d312469449..a2cfe7a473 100644 --- a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp +++ b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp @@ -110,7 +110,7 @@ QString tst_QPrinterInfo::getDefaultPrinterFromSystem() return QString(); } - QRegExp defaultReg("default.*: *([a-zA-Z0-9_]+)"); + QRegExp defaultReg("default.*: *([a-zA-Z0-9_-]+)"); defaultReg.indexIn(output); QString printer = defaultReg.cap(1); macFixNameFormat(&printer); -- cgit v1.2.3 From 4eb54f7f3678fb8b90086453dfc6303b48afe683 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 21 Feb 2012 12:57:27 +1000 Subject: Improve tst_QPrinterInfo::testForDefaultPrinter(). Be explicit about skipping the test when no default printer is present. Change-Id: If69b275eb0f490411471ec42798d8aefcc57fd83 Reviewed-by: Rohan McGovern --- tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp index a2cfe7a473..2323dc8df3 100644 --- a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp +++ b/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp @@ -221,7 +221,8 @@ void tst_QPrinterInfo::testForDefaultPrinter() # else QString defSysPrinter = getDefaultPrinterFromSystem(); # endif - if (defSysPrinter == "") return; + if (defSysPrinter == "") + QSKIP("No default printer available"); QList list = QPrinterInfo::availablePrinters(); bool found = false; -- cgit v1.2.3 From 69da8588d41bbf5ab785f5ad7c1fce76deefc7d0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 21 Feb 2012 08:38:37 +0100 Subject: Fix qlogging test. Build app sub-process first. Change-Id: I87a11f7fd5d8a82584e496722f79e236191b0fb3 Reviewed-by: Friedemann Kleint --- tests/auto/corelib/global/qlogging/qlogging.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/global/qlogging/qlogging.pro b/tests/auto/corelib/global/qlogging/qlogging.pro index 449b7dfa5e..1d5e7681df 100644 --- a/tests/auto/corelib/global/qlogging/qlogging.pro +++ b/tests/auto/corelib/global/qlogging/qlogging.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs +CONFIG += ordered SUBDIRS += \ - tst_qlogging.pro \ - app \ No newline at end of file + app \ + tst_qlogging.pro -- cgit v1.2.3