diff options
Diffstat (limited to 'tests')
21 files changed, 254 insertions, 14 deletions
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp index 262c6dd9c8..c76052a38b 100644 --- a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp @@ -32,10 +32,13 @@ #include <QStandardItemModel> #include <QStringListModel> #include <QTest> +#include <QLoggingCategory> #include "dynamictreemodel.h" #include "qidentityproxymodel.h" +Q_LOGGING_CATEGORY(lcItemModels, "qt.corelib.tests.itemmodels") + class DataChangedModel : public QAbstractListModel { public: @@ -390,7 +393,7 @@ void dump(QAbstractItemModel* model, QString const& indent = " - ", QModelIndex for (auto row = 0; row < model->rowCount(parent); ++row) { auto idx = model->index(row, 0, parent); - qDebug() << (indent + idx.data().toString()); + qCDebug(lcItemModels) << (indent + idx.data().toString()); dump(model, indent + "- ", idx); } } diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp index da13b9f33f..b9deb7b6a9 100644 --- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp @@ -125,6 +125,7 @@ private: tst_QItemModel::tst_QItemModel() { qRegisterMetaType<QAbstractItemModel::LayoutChangeHint>(); + qRegisterMetaType<QList<QPersistentModelIndex>>(); } void tst_QItemModel::init() @@ -181,7 +182,7 @@ void tst_QItemModel::nonDestructiveBasicTest() currentModel->hasChildren(QModelIndex()); currentModel->hasIndex(0, 0); currentModel->headerData(0, Qt::Horizontal); - currentModel->index(0,0), QModelIndex(); + currentModel->index(0,0); currentModel->itemData(QModelIndex()); QVariant cache; currentModel->match(QModelIndex(), -1, cache); diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp index 82cd26971b..ccce5a44e5 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp @@ -38,6 +38,8 @@ #include <qdebug.h> +Q_LOGGING_CATEGORY(lcItemModels, "qt.corelib.tests.itemmodels") + // Testing get/set functions void tst_QSortFilterProxyModel::getSetCheck() { @@ -2361,6 +2363,45 @@ void tst_QSortFilterProxyModel::match() QCOMPARE(indexes.at(i).row(), expectedProxyItems.at(i)); } +QList<QStandardItem *> createStandardItemList(const QString &prefix, int n) +{ + QList<QStandardItem *> result; + for (int i = 0; i < n; ++i) + result.append(new QStandardItem(prefix + QString::number(i))); + return result; +} + +// QTBUG-73864, recursive search in a tree model. + +void tst_QSortFilterProxyModel::matchTree() +{ + QStandardItemModel model(0, 2); + // Header00 Header01 + // Header10 Header11 + // Item00 Item01 + // Item10 Item11 + model.appendRow(createStandardItemList(QLatin1String("Header0"), 2)); + auto headerRow = createStandardItemList(QLatin1String("Header1"), 2); + model.appendRow(headerRow); + headerRow.first()->appendRow(createStandardItemList(QLatin1String("Item0"), 2)); + headerRow.first()->appendRow(createStandardItemList(QLatin1String("Item1"), 2)); + + auto item11 = model.match(model.index(1, 1), Qt::DisplayRole, QLatin1String("Item11"), 20, + Qt::MatchRecursive).value(0); + QVERIFY(item11.isValid()); + QCOMPARE(item11.data().toString(), QLatin1String("Item11")); + + // Repeat in proxy model + QSortFilterProxyModel proxy; + proxy.setSourceModel(&model); + auto proxyItem11 = proxy.match(proxy.index(1, 1), Qt::DisplayRole, QLatin1String("Item11"), 20, + Qt::MatchRecursive).value(0); + QVERIFY(proxyItem11.isValid()); + QCOMPARE(proxyItem11.data().toString(), QLatin1String("Item11")); + + QCOMPARE(proxy.mapToSource(proxyItem11).internalId(), item11.internalId()); +} + void tst_QSortFilterProxyModel::insertIntoChildrenlessItem() { QStandardItemModel model; @@ -4277,7 +4318,7 @@ public: QModelIndex index(int, int, const QModelIndex& parent = QModelIndex()) const override { // QTBUG-44962: Would we always expect the parent to belong to the model - qDebug() << parent.model() << this; + qCDebug(lcItemModels) << parent.model() << this; Q_ASSERT(!parent.isValid() || parent.model() == this); quintptr parentId = (parent.isValid()) ? parent.internalId() : 0; @@ -4363,7 +4404,7 @@ void tst_QSortFilterProxyModel::sourceLayoutChangeLeavesValidPersistentIndexes() // The use of qDebug here makes sufficient use of the heap to // cause corruption at runtime with normal use on linux (before // the fix). valgrind confirms the fix. - qDebug() << persistentIndex.parent(); + qCDebug(lcItemModels) << persistentIndex.parent(); QVERIFY(persistentIndex.parent().isValid()); } diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h index 82d4b7344e..8ae97165b8 100644 --- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h +++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h @@ -109,6 +109,7 @@ private slots: void selectionFilteredOut(); void match_data(); void match(); + void matchTree(); void insertIntoChildrenlessItem(); void invalidateMappedChildren(); void insertRowIntoFilteredParent(); @@ -186,4 +187,6 @@ private: Q_DECLARE_METATYPE(QAbstractItemModel::LayoutChangeHint) +Q_DECLARE_LOGGING_CATEGORY(lcItemModels) + #endif // TST_QSORTFILTERPROXYMODEL_H diff --git a/tests/auto/corelib/serialization/qdatastream_core_pixmap/qdatastream_core_pixmap.pro b/tests/auto/corelib/serialization/qdatastream_core_pixmap/qdatastream_core_pixmap.pro new file mode 100644 index 0000000000..7e003304af --- /dev/null +++ b/tests/auto/corelib/serialization/qdatastream_core_pixmap/qdatastream_core_pixmap.pro @@ -0,0 +1,4 @@ +CONFIG += testcase +TARGET = tst_qdatastream_core_pixmap +QT += testlib +SOURCES = tst_qdatastream_core_pixmap.cpp diff --git a/tests/auto/corelib/serialization/qdatastream_core_pixmap/tst_qdatastream_core_pixmap.cpp b/tests/auto/corelib/serialization/qdatastream_core_pixmap/tst_qdatastream_core_pixmap.cpp new file mode 100644 index 0000000000..c931016a61 --- /dev/null +++ b/tests/auto/corelib/serialization/qdatastream_core_pixmap/tst_qdatastream_core_pixmap.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> +#include <QtGui/QBitmap> +#include <QtGui/QPalette> +#include <QtGui/QPixmap> +#include <QtGui/QPicture> +#include <QtGui/QTextLength> +#include <QtGui/QPainter> +#include <QtGui/QPen> + +class tst_QDataStream : public QObject +{ +Q_OBJECT + +private slots: + void stream_with_pixmap(); + +}; + +void tst_QDataStream::stream_with_pixmap() +{ + // This is a QVariantMap with a 3x3 red QPixmap and two strings inside + const QByteArray ba = QByteArray::fromBase64("AAAAAwAAAAIAegAAAAoAAAAACgB0AGgAZQByAGUAAAACAHAAAABBAAAAAAGJUE5HDQoaCgAAAA1JSERSAAAAAwAAAAMIAgAAANlKIugAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAQSURBVAiZY/zPAAVMDJgsAB1bAQXZn5ieAAAAAElFTkSuQmCCAAAAAgBhAAAACgAAAAAKAGgAZQBsAGwAbw=="); + QImage dummy; // Needed to make sure qtGui is loaded + + QTest::ignoreMessage(QtWarningMsg, "QPixmap::fromImageInPlace: QPixmap cannot be created without a QGuiApplication"); + + QVariantMap map; + QDataStream d(ba); + d.setVersion(QDataStream::Qt_5_12); + d >> map; + + QCOMPARE(map["a"].toString(), QString("hello")); + QCOMPARE(map["p"].value<QPixmap>(), QPixmap()); // the pixmap is null because this is not a QGuiApplication + QCOMPARE(map["z"].toString(), QString("there")); +} + +QTEST_GUILESS_MAIN(tst_QDataStream) + +#include "tst_qdatastream_core_pixmap.moc" + diff --git a/tests/auto/corelib/serialization/serialization.pro b/tests/auto/corelib/serialization/serialization.pro index 9187de1bc5..9638178cdc 100644 --- a/tests/auto/corelib/serialization/serialization.pro +++ b/tests/auto/corelib/serialization/serialization.pro @@ -6,6 +6,7 @@ SUBDIRS = \ qcborvalue \ qcborvalue_json \ qdatastream \ + qdatastream_core_pixmap \ qtextstream \ qxmlstream diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp index fc4cb717ec..e1bb3149c6 100644 --- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp @@ -538,6 +538,8 @@ void tst_QTimeZone::checkOffset_data() int year, month, day, hour, min, sec; int std, dst; } table[] = { + // Zone with no transitions (QTBUG-74614, when TZ backend uses minimalist data) + { "Etc/UTC", "epoch", 1970, 1, 1, 0, 0, 0, 0, 0 }, // Kiev: regression test for QTBUG-64122 (on MS): { "Europe/Kiev", "summer", 2017, 10, 27, 12, 0, 0, 2 * 3600, 3600 }, { "Europe/Kiev", "winter", 2017, 10, 29, 12, 0, 0, 2 * 3600, 0 } @@ -550,6 +552,8 @@ void tst_QTimeZone::checkOffset_data() << QDateTime(QDate(entry.year, entry.month, entry.day), QTime(entry.hour, entry.min, entry.sec), zone) << entry.dst + entry.std << entry.std << entry.dst; + } else { + qWarning("Skipping %s@%s test as zone is invalid", entry.zone, entry.nick); } } } diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp index 92384e85bc..182e3e9547 100644 --- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp +++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp @@ -256,9 +256,14 @@ void tst_QAbstractNetworkCache::cacheControl_data() QTest::newRow("200-1") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol-expire.cgi" << false; QTest::newRow("200-2") << QNetworkRequest::AlwaysNetwork << "httpcachetest_cachecontrol.cgi?no-cache" << AlwaysFalse; - QTest::newRow("200-3") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol.cgi?no-cache" << false; + QTest::newRow("200-3") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol.cgi?no-cache" << true; QTest::newRow("200-4") << QNetworkRequest::AlwaysCache << "httpcachetest_cachecontrol.cgi?no-cache" << false; - QTest::newRow("200-5") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol.cgi?no-cache" << false; + QTest::newRow("200-5") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol.cgi?no-cache" << true; + + QTest::newRow("200-6") << QNetworkRequest::AlwaysNetwork << "httpcachetest_cachecontrol.cgi?no-store" << AlwaysFalse; + QTest::newRow("200-7") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol.cgi?no-store" << false; + QTest::newRow("200-8") << QNetworkRequest::AlwaysCache << "httpcachetest_cachecontrol.cgi?no-store" << false; + QTest::newRow("200-9") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol.cgi?no-store" << false; QTest::newRow("304-0") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol.cgi?max-age=1000" << true; diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 0d6828797a..8627a37e12 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -3976,7 +3976,7 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data() "HTTP/1.0 200\r\n" "Connection: keep-alive\r\n" "Content-Type: text/plain\r\n" - "Cache-control: no-cache\r\n" + "Cache-control: no-store\r\n" "Content-length: 8\r\n" "\r\n" "Reloaded"; @@ -4002,6 +4002,33 @@ void tst_QNetworkReply::ioGetFromHttpWithCache_data() content.second = "Not-reloaded"; content.first.setLastModified(past); + // "no-cache" + rawHeaders.clear(); + rawHeaders << QNetworkCacheMetaData::RawHeader("Date", QLocale::c().toString(past, dateFormat).toLatin1()) + << QNetworkCacheMetaData::RawHeader("Cache-control", "no-cache"); + content.first.setRawHeaders(rawHeaders); + content.first.setLastModified(past); + content.first.setExpirationDate(future); + + // "no-cache" does not mean "no cache", just that we must consult remote first + QTest::newRow("no-cache,200,always-network") + << reply200 << "Reloaded" << content << int(QNetworkRequest::AlwaysNetwork) << QStringList() << false << true; + QTest::newRow("no-cache,200,prefer-network") + << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << false << true; + QTest::newRow("no-cache,200,prefer-cache") + << reply200 << "Reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << false << true; + // We're not allowed by the spec to deliver cached data without checking if it is still + // up-to-date. + QTest::newRow("no-cache,200,always-cache") + << reply200 << QString() << content << int(QNetworkRequest::AlwaysCache) << QStringList() << false << false; + + QTest::newRow("no-cache,304,prefer-network") + << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferNetwork) << QStringList() << true << true; + QTest::newRow("no-cache,304,prefer-cache") + << reply304 << "Not-reloaded" << content << int(QNetworkRequest::PreferCache) << QStringList() << true << true; + QTest::newRow("no-cache,304,always-cache") + << reply304 << QString() << content << int(QNetworkRequest::AlwaysCache) << QStringList() << false << false; + // // Set to expired // diff --git a/tests/auto/network/kernel/qhostinfo/BLACKLIST b/tests/auto/network/kernel/qhostinfo/BLACKLIST index 87c5fe991f..cd4d4eb03c 100644 --- a/tests/auto/network/kernel/qhostinfo/BLACKLIST +++ b/tests/auto/network/kernel/qhostinfo/BLACKLIST @@ -4,3 +4,5 @@ windows ci [blockingLookup:a-plus-aaaa] windows ci +[reverseLookup:google-public-dns-a.google.com] +ci diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST deleted file mode 100644 index c9b628d79b..0000000000 --- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[onDemandRootCertLoadingMemberMethods] -linux diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp index 3276d97354..0a7ba3b40b 100644 --- a/tests/auto/tools/qmake/testcompiler.cpp +++ b/tests/auto/tools/qmake/testcompiler.cpp @@ -31,7 +31,7 @@ #include <QProcess> #include <QDir> -static QString targetName( BuildType buildMode, const QString& target, const QString& version ) +QString TestCompiler::targetName(BuildType buildMode, const QString& target, const QString& version) { Q_UNUSED(version); QString targetName = target; @@ -257,7 +257,8 @@ bool TestCompiler::qmakeProject( const QString &workDir, const QString &proName return runCommand(qmakeCmd_, QStringList() << "-project" << "-o" << projectFile << "DESTDIR=./"); } -bool TestCompiler::qmake( const QString &workDir, const QString &proName, const QString &buildDir ) +bool TestCompiler::qmake(const QString &workDir, const QString &proName, const QString &buildDir, + const QStringList &additionalArguments) { QDir D; D.setCurrent( workDir ); @@ -274,7 +275,8 @@ bool TestCompiler::qmake( const QString &workDir, const QString &proName, const makeFile += "Makefile"; // Now start qmake and generate the makefile - return runCommand(qmakeCmd_, QStringList(qmakeArgs_) << projectFile << "-o" << makeFile); + return runCommand(qmakeCmd_, QStringList(qmakeArgs_) << projectFile << "-o" << makeFile + << additionalArguments); } bool TestCompiler::make( const QString &workPath, const QString &target, bool expectFail ) diff --git a/tests/auto/tools/qmake/testcompiler.h b/tests/auto/tools/qmake/testcompiler.h index d3fe6d88f8..50232669c0 100644 --- a/tests/auto/tools/qmake/testcompiler.h +++ b/tests/auto/tools/qmake/testcompiler.h @@ -49,6 +49,8 @@ public: void resetEnvironment(); void addToEnvironment( QString varAssignment ); + static QString targetName(BuildType buildMode, const QString& target, const QString& version); + // executes a make clean in the specified workPath bool makeClean( const QString &workPath ); // executes a make dist clean in the specified workPath @@ -56,7 +58,8 @@ public: // executes a qmake -project on the specified workDir bool qmakeProject( const QString &workDir, const QString &proName ); // executes a qmake on proName in the specified workDir, output goes to buildDir or workDir if it's null - bool qmake( const QString &workDir, const QString &proName, const QString &buildDir = QString() ); + bool qmake(const QString &workDir, const QString &proName, const QString &buildDir = QString(), + const QStringList &additionalArguments = QStringList()); // executes a make in the specified workPath, with an optional target (eg. install) bool make( const QString &workPath, const QString &target = QString(), bool expectFail = false ); // checks if the executable exists in destDir diff --git a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro index 0e78a91f46..f089ac14fc 100644 --- a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro +++ b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro @@ -5,3 +5,8 @@ SOURCES = test_file.cpp \ RESOURCES = test.qrc TARGET = "simple app" DESTDIR = "dest dir" + +target.path = $$OUT_PWD/dist +INSTALLS += target + +!build_pass:msvc:CONFIG(debug, debug|release):message("check for pdb, please") diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index 2b822e682f..1eaf66311c 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -58,6 +58,7 @@ private slots: void simple_app(); void simple_app_shadowbuild(); void simple_app_shadowbuild2(); + void simple_app_versioned(); void simple_lib(); void simple_dll(); void subdirs(); @@ -173,10 +174,15 @@ void tst_qmake::simple_app() { QString workDir = base_path + "/testdata/simple_app"; QString destDir = workDir + "/dest dir"; + QString installDir = workDir + "/dist"; - QVERIFY( test_compiler.qmake( workDir, "simple_app" )); + QVERIFY( test_compiler.qmake( workDir, "simple_app", QString() )); QVERIFY( test_compiler.make( workDir )); QVERIFY( test_compiler.exists( destDir, "simple app", Exe, "1.0.0" )); + + QVERIFY(test_compiler.make(workDir, "install")); + QVERIFY(test_compiler.exists(installDir, "simple app", Exe, "1.0.0")); + QVERIFY( test_compiler.makeClean( workDir )); QVERIFY( test_compiler.exists( destDir, "simple app", Exe, "1.0.0" )); // Should still exist after a make clean QVERIFY( test_compiler.makeDistClean( workDir )); @@ -216,6 +222,43 @@ void tst_qmake::simple_app_shadowbuild2() QVERIFY( test_compiler.removeMakefile( buildDir ) ); } +void tst_qmake::simple_app_versioned() +{ + QString workDir = base_path + "/testdata/simple_app"; + QString buildDir = base_path + "/testdata/simple_app_versioned_build"; + QString destDir = buildDir + "/dest dir"; + QString installDir = buildDir + "/dist"; + + QString version = "4.5.6"; + QVERIFY(test_compiler.qmake(workDir, "simple_app", buildDir, QStringList{ "VERSION=" + version })); + QString qmakeOutput = test_compiler.commandOutput(); + QVERIFY(test_compiler.make(buildDir)); + QVERIFY(test_compiler.exists(destDir, "simple app", Exe, version)); + + QString pdbFilePath; + bool checkPdb = qmakeOutput.contains("Project MESSAGE: check for pdb, please"); + if (checkPdb) { + QString targetBase = QFileInfo(TestCompiler::targetName(Exe, "simple app", version)) + .completeBaseName(); + pdbFilePath = destDir + '/' + targetBase + ".pdb"; + QVERIFY2(QFile::exists(pdbFilePath), qPrintable(pdbFilePath)); + QVERIFY(test_compiler.make(buildDir, "install")); + QString installedPdbFilePath = installDir + '/' + targetBase + ".pdb"; + QEXPECT_FAIL("", "QTBUG-74265", Continue); + QVERIFY2(QFile::exists(installedPdbFilePath), qPrintable(installedPdbFilePath)); + } + + QVERIFY(test_compiler.makeClean(buildDir)); + QVERIFY(test_compiler.exists(destDir, "simple app", Exe, version)); + QVERIFY(test_compiler.makeDistClean(buildDir)); + QVERIFY(!test_compiler.exists(destDir, "simple app", Exe, version)); + if (checkPdb) { + QEXPECT_FAIL("", "QTBUG-74265", Continue); + QVERIFY(!QFile::exists(pdbFilePath)); + } + QVERIFY(test_compiler.removeMakefile(buildDir)); +} + void tst_qmake::simple_dll() { QString workDir = base_path + "/testdata/simple_dll"; diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST new file mode 100644 index 0000000000..e760042def --- /dev/null +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/BLACKLIST @@ -0,0 +1,3 @@ +# QTBUG-74760 +[sorting] +opensuse-42.3 diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 1f68308bbe..3287d67875 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -10,6 +10,7 @@ osx ubuntu-16.04 ubuntu-18.04 rhel-7.4 +rhel-7.6 osx [focusProxyAndInputMethods] linux diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp index b1610c297d..b101f47bcd 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp @@ -326,14 +326,26 @@ void tst_QDoubleSpinBox::setPrefixSuffix() QDoubleSpinBox spin(0); spin.setDecimals(decimals); + const QSize size1 = spin.sizeHint(); spin.setPrefix(prefix); + const QSize size2 = spin.sizeHint(); spin.setSuffix(suffix); + const QSize size3 = spin.sizeHint(); spin.setValue(value); if (show) spin.show(); QCOMPARE(spin.text(), expectedText); QCOMPARE(spin.cleanText(), expectedCleanText); + + if (!prefix.isEmpty() && !suffix.isEmpty()) { + QVERIFY(size1.width() < size2.width()); + QVERIFY(size2.width() < size3.width()); + spin.setSuffix(QString()); + QCOMPARE(spin.sizeHint(), size2); + spin.setPrefix(QString()); + QCOMPARE(spin.sizeHint(), size1); + } } void tst_QDoubleSpinBox::valueChangedHelper(const QString &text) diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 1acf07301c..ea96322654 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -1343,8 +1343,10 @@ void tst_QMainWindow::restoreState() { QMainWindow mw; QToolBar tb(&mw); + tb.setObjectName(QLatin1String("toolBar")); mw.addToolBar(Qt::TopToolBarArea, &tb); QDockWidget dw(&mw); + dw.setObjectName(QLatin1String("dock")); mw.addDockWidget(Qt::LeftDockWidgetArea, &dw); QByteArray state; diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index 7174c274f9..b9d6888263 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -462,8 +462,11 @@ void tst_QSpinBox::setPrefixSuffix() QFETCH(bool, show); QSpinBox spin(0); + const QSize size1 = spin.sizeHint(); spin.setPrefix(prefix); + const QSize size2 = spin.sizeHint(); spin.setSuffix(suffix); + const QSize size3 = spin.sizeHint(); spin.setValue(value); if (show) spin.show(); @@ -472,6 +475,15 @@ void tst_QSpinBox::setPrefixSuffix() QCOMPARE(spin.suffix(), suffix); QCOMPARE(spin.text(), expectedText); QCOMPARE(spin.cleanText(), expectedCleanText); + + if (!prefix.isEmpty() && !suffix.isEmpty()) { + QVERIFY(size1.width() < size2.width()); + QVERIFY(size2.width() < size3.width()); + spin.setSuffix(QString()); + QCOMPARE(spin.sizeHint(), size2); + spin.setPrefix(QString()); + QCOMPARE(spin.sizeHint(), size1); + } } void tst_QSpinBox::textChangedHelper(const QString &text) |