diff options
Diffstat (limited to 'tests/auto/other')
14 files changed, 50 insertions, 40 deletions
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp index b2b45bb237..de15f4c62d 100644 --- a/tests/auto/other/compiler/tst_compiler.cpp +++ b/tests/auto/other/compiler/tst_compiler.cpp @@ -842,7 +842,7 @@ void tst_Compiler::cxx11_constexpr() static constexpr QBasicAtomicInt atomic = Q_BASIC_ATOMIC_INITIALIZER(1); static constexpr int i = constexprValue(); QCOMPARE(i, constexprValue()); - QCOMPARE(atomic.load(), 1); + QCOMPARE(atomic.loadRelaxed(), 1); #endif } diff --git a/tests/auto/other/gestures/BLACKLIST b/tests/auto/other/gestures/BLACKLIST index c465ff316e..2af5d40359 100644 --- a/tests/auto/other/gestures/BLACKLIST +++ b/tests/auto/other/gestures/BLACKLIST @@ -3,17 +3,25 @@ rhel-7.4 rhel-7.6 ubuntu-18.04 [customGesture] -# QTBUG-67254 -ubuntu -opensuse opensuse-leap +# QTBUG-67254 +opensuse-42.3 [graphicsItemGesture] ubuntu-18.04 +rhel-7.4 +rhel-7.6 [graphicsItemTreeGesture] ubuntu-18.04 [graphicsView] ubuntu-18.04 +rhel-7.4 +rhel-7.6 [explicitGraphicsObjectTarget] ubuntu-18.04 +rhel-7.4 +rhel-7.6 [autoCancelGestures2] ubuntu-18.04 +rhel-7.4 +rhel-7.6 + diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index 8a2934049e..dc71253f3e 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -1202,7 +1202,7 @@ void PaintCommands::command_drawRoundRect(QRegularExpressionMatch re) QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED - m_painter->drawRoundRect(x, y, w, h, xs, ys); + m_painter->drawRoundedRect(x, y, w, h, xs, ys, Qt::RelativeSize); QT_WARNING_POP } diff --git a/tests/auto/other/networkselftest/BLACKLIST b/tests/auto/other/networkselftest/BLACKLIST index 4a958b43a5..948081eb78 100644 --- a/tests/auto/other/networkselftest/BLACKLIST +++ b/tests/auto/other/networkselftest/BLACKLIST @@ -1,4 +1,6 @@ # QTBUG-27571 [ftpProxyServer] -windows 32bit -windows 64bit +windows-10 msvc-2017 +windows-10 msvc-2015 +windows-7sp1 + diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp index dc353d2090..1b125d8825 100644 --- a/tests/auto/other/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp @@ -29,6 +29,7 @@ #include <QtTest/QtTest> #include <QtNetwork/QtNetwork> #include <QtCore/QDateTime> +#include <QtCore/QElapsedTimer> #include <QtCore/QTextStream> #include <QtCore/QRandomGenerator> #include <QtCore/QStandardPaths> @@ -195,7 +196,7 @@ static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000) #ifndef QT_NO_SSL QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket); #endif - QTime timer; + QElapsedTimer timer; timer.start(); int t = timeout; forever { @@ -421,7 +422,7 @@ void tst_NetworkSelfTest::serverReachability() QTcpSocket socket; socket.connectToHost(QtNetworkSettings::serverName(), 12346); - QTime timer; + QElapsedTimer timer; timer.start(); socket.waitForConnected(10000); QVERIFY2(timer.elapsed() < 9900, "Connection to closed port timed out instead of refusing, something is wrong"); diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp index fc979bce2d..c8698242d5 100644 --- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp +++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp @@ -80,13 +80,9 @@ qint64 DynamicTreeModel::findParentId(qint64 searchId) const if (searchId <= 0) return -1; - QHashIterator<qint64, QList<QList<qint64> > > i(m_childItems); - while (i.hasNext()) { - i.next(); - QListIterator<QList<qint64> > j(i.value()); - while (j.hasNext()) { - QList<qint64> l = j.next(); - if (l.contains(searchId)) + for (auto i = m_childItems.cbegin(), end = m_childItems.cend(); i != end; ++i) { + for (const auto &list : i.value()) { + if (list.contains(searchId)) return i.key(); } } @@ -163,13 +159,12 @@ ModelChangeCommand::ModelChangeCommand(DynamicTreeModel *model, QObject *parent) { } -QModelIndex ModelChangeCommand::findIndex(QList<int> rows) +QModelIndex ModelChangeCommand::findIndex(const QList<int> &rows) const { const int col = 0; QModelIndex parent = QModelIndex(); - QListIterator<int> i(rows); - while (i.hasNext()) { - parent = m_model->index(i.next(), col, parent); + for (int row : rows) { + parent = m_model->index(row, col, parent); if (!parent.isValid()) qFatal("%s: parent must be valid", Q_FUNC_INFO); } diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h index 709751dd27..0807ffbe94 100644 --- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h +++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.h @@ -97,7 +97,7 @@ public: m_rowNumbers = rowNumbers; } - QModelIndex findIndex(QList<int> rows); + QModelIndex findIndex(const QList<int> &rows) const; void setStartRow(int row) { diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro index 3587c38e76..6f3740a24f 100644 --- a/tests/auto/other/qaccessibility/qaccessibility.pro +++ b/tests/auto/other/qaccessibility/qaccessibility.pro @@ -11,5 +11,6 @@ win32 { !winrt { QT += windowsuiautomation_support-private } - LIBS += -luuid -loleacc -loleaut32 -lole32 + LIBS += -loleacc -loleaut32 + QMAKE_USE += ole32 uuid } diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index bc45487599..7d7fa6403b 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -2580,6 +2580,7 @@ void tst_QAccessibility::dialogButtonBoxTest() case QDialogButtonBox::GnomeLayout: case QDialogButtonBox::KdeLayout: case QDialogButtonBox::MacLayout: + case QDialogButtonBox::AndroidLayout: expectedOrder << QDialogButtonBox::tr("Help") << QDialogButtonBox::tr("Reset") << QDialogButtonBox::tr("OK"); diff --git a/tests/auto/other/qaccessibilitymac/BLACKLIST b/tests/auto/other/qaccessibilitymac/BLACKLIST deleted file mode 100644 index f53fa7e853..0000000000 --- a/tests/auto/other/qaccessibilitymac/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[hierarchyTest] -osx-10.12 ci diff --git a/tests/auto/other/qfocusevent/BLACKLIST b/tests/auto/other/qfocusevent/BLACKLIST index 0b03472587..5af8be91a0 100644 --- a/tests/auto/other/qfocusevent/BLACKLIST +++ b/tests/auto/other/qfocusevent/BLACKLIST @@ -1,6 +1,3 @@ -[checkReason_Shortcut] -osx-10.12 ci [checkReason_ActiveWindow] -osx-10.12 ci winrt diff --git a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/BLACKLIST b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/BLACKLIST index aea819fc2e..65a939cdcb 100644 --- a/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/BLACKLIST +++ b/tests/auto/other/qnetworkaccessmanager_and_qprogressdialog/BLACKLIST @@ -1,2 +1,5 @@ +[downloadCheck] +windows-10 msvc-2015 +windows-10 msvc-2017 [downloadCheck:with-zeroCopy] windows diff --git a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp index 0d656e223c..e09d304ff3 100644 --- a/tests/auto/other/qobjectrace/tst_qobjectrace.cpp +++ b/tests/auto/other/qobjectrace/tst_qobjectrace.cpp @@ -85,7 +85,7 @@ class RaceThread : public QThread { Q_OBJECT RaceObject *object; - QTime stopWatch; + QElapsedTimer stopWatch; public: RaceThread() @@ -378,6 +378,10 @@ public: connect(timer, &QTimer::timeout, this, &DeleteReceiverRaceReceiver::onTimeout); timer->start(1); } + ~DeleteReceiverRaceReceiver() + { + delete receiver; + } void onTimeout() { @@ -410,7 +414,7 @@ void tst_QObjectRace::disconnectRace() { enum { ThreadCount = 20, TimeLimit = 3000 }; - QCOMPARE(countedStructObjectsCount.load(), 0u); + QCOMPARE(countedStructObjectsCount.loadRelaxed(), 0u); { QScopedPointer<DisconnectRaceSenderObject> sender(new DisconnectRaceSenderObject()); @@ -428,15 +432,15 @@ void tst_QObjectRace::disconnectRace() for (int i = 0; i < ThreadCount; ++i) { threads[i]->requestInterruption(); - QVERIFY(threads[i]->wait(300)); + QVERIFY(threads[i]->wait()); delete threads[i]; } senderThread->quit(); - QVERIFY(senderThread->wait(300)); + QVERIFY(senderThread->wait()); } - QCOMPARE(countedStructObjectsCount.load(), 0u); + QCOMPARE(countedStructObjectsCount.loadRelaxed(), 0u); { QScopedPointer<DisconnectRaceSenderObject> sender(new DisconnectRaceSenderObject()); @@ -453,16 +457,16 @@ void tst_QObjectRace::disconnectRace() QTest::qWait(TimeLimit); senderThread->requestInterruption(); - QVERIFY(senderThread->wait(300)); + QVERIFY(senderThread->wait()); for (int i = 0; i < ThreadCount; ++i) { threads[i]->quit(); - QVERIFY(threads[i]->wait(300)); + QVERIFY(threads[i]->wait()); delete threads[i]; } } - QCOMPARE(countedStructObjectsCount.load(), 0u); + QCOMPARE(countedStructObjectsCount.loadRelaxed(), 0u); } QTEST_MAIN(tst_QObjectRace) diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp index f31a755f9e..ab7bca8322 100644 --- a/tests/auto/other/toolsupport/tst_toolsupport.cpp +++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp @@ -126,20 +126,20 @@ void tst_toolsupport::offsets_data() #ifdef Q_PROCESSOR_X86 // x86 32-bit has weird alignment rules. Refer to QtPrivate::AlignOf in // qglobal.h for more details. - data << 168 << 248; + data << 152 << 224; #else - data << 172 << 248; + data << 156 << 224; #endif } #endif { QTest::newRow("QDateTimePrivate::m_msecs") - << pmm_to_offsetof(&QDateTimePrivate::m_msecs) << 0 << 0; + << pmm_to_offsetof(&QDateTimePrivate::m_msecs) << 8 << 8; QTest::newRow("QDateTimePrivate::m_status") - << pmm_to_offsetof(&QDateTimePrivate::m_status) << 8 << 8; + << pmm_to_offsetof(&QDateTimePrivate::m_status) << 4 << 4; QTest::newRow("QDateTimePrivate::m_offsetFromUtc") - << pmm_to_offsetof(&QDateTimePrivate::m_offsetFromUtc) << 12 << 12; + << pmm_to_offsetof(&QDateTimePrivate::m_offsetFromUtc) << 16 << 16; QTest::newRow("QDateTimePrivate::m_timeZone") << pmm_to_offsetof(&QDateTimePrivate::m_timeZone) << 20 << 24; } |