summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp12
-rw-r--r--tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp29
-rw-r--r--tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp6
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp9
-rw-r--r--tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp6
-rw-r--r--tests/auto/network/access/http2/http2srv.cpp28
-rw-r--r--tests/auto/network/access/http2/http2srv.h5
-rw-r--r--tests/auto/network/access/http2/tst_http2.cpp47
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp14
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp3
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST3
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp7
-rw-r--r--tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp2
-rw-r--r--tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp6
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp10
16 files changed, 113 insertions, 76 deletions
diff --git a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
index 80f22ad867..fdcd8b07c7 100644
--- a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
+++ b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
@@ -768,9 +768,8 @@ void tst_QDBusAbstractAdaptor::scriptableSignalOrNot()
con.connect(con.baseService(), "/p2", "local.MyObject", "nonScriptableSignalVoid", &spy, SLOT(slot(QDBusMessage)));
obj.emitSignal("scriptableSignalVoid", QVariant());
obj.emitSignal("nonScriptableSignalVoid", QVariant());
- QTest::qWait(200);
- QCOMPARE(spy.count, 1); // only /p1 must have emitted
+ QTRY_COMPARE(spy.count, 1); // only /p1 must have emitted
QCOMPARE(spy.interface, QString("local.MyObject"));
QCOMPARE(spy.name, QString("scriptableSignalVoid"));
QCOMPARE(spy.path, QString("/p1"));
@@ -788,9 +787,8 @@ void tst_QDBusAbstractAdaptor::scriptableSignalOrNot()
con.connect(con.baseService(), "/p1", "local.MyObject", "nonScriptableSignalVoid", &spy, SLOT(slot(QDBusMessage)));
con.connect(con.baseService(), "/p2", "local.MyObject", "nonScriptableSignalVoid", &spy, SLOT(slot(QDBusMessage)));
obj.emitSignal("nonScriptableSignalVoid", QVariant());
- QTest::qWait(200);
- QCOMPARE(spy.count, 1); // only /p2 must have emitted now
+ QTRY_COMPARE(spy.count, 1); // only /p2 must have emitted now
QCOMPARE(spy.interface, QString("local.MyObject"));
QCOMPARE(spy.name, QString("nonScriptableSignalVoid"));
QCOMPARE(spy.path, QString("/p2"));
@@ -1306,9 +1304,8 @@ void tst_QDBusAbstractAdaptor::scriptableSignalOrNotPeer()
con.connect(QString(), "/p2", "local.MyObject", "nonScriptableSignalVoid", &spy, SLOT(slot(QDBusMessage)));
emitSignalPeer("local.MyObject", "scriptableSignalVoid", QVariant());
emitSignalPeer("local.MyObject", "nonScriptableSignalVoid", QVariant());
- QTest::qWait(200);
- QCOMPARE(spy.count, 1); // only /p1 must have emitted
+ QTRY_COMPARE(spy.count, 1); // only /p1 must have emitted
QCOMPARE(spy.interface, QString("local.MyObject"));
QCOMPARE(spy.name, QString("scriptableSignalVoid"));
QCOMPARE(spy.path, QString("/p1"));
@@ -1327,9 +1324,8 @@ void tst_QDBusAbstractAdaptor::scriptableSignalOrNotPeer()
con.connect(QString(), "/p1", "local.MyObject", "nonScriptableSignalVoid", &spy, SLOT(slot(QDBusMessage)));
con.connect(QString(), "/p2", "local.MyObject", "nonScriptableSignalVoid", &spy, SLOT(slot(QDBusMessage)));
emitSignalPeer("local.MyObject", "nonScriptableSignalVoid", QVariant());
- QTest::qWait(200);
- QCOMPARE(spy.count, 1); // only /p2 must have emitted now
+ QTRY_COMPARE(spy.count, 1); // only /p2 must have emitted now
QCOMPARE(spy.interface, QString("local.MyObject"));
QCOMPARE(spy.name, QString("nonScriptableSignalVoid"));
QCOMPARE(spy.path, QString("/p2"));
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index d521c18cef..77ae6f154d 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -136,9 +136,7 @@ void tst_QDBusConnection::sendSignalToName()
QVERIFY(con.send(msg));
- QTest::qWait(1000);
-
- QCOMPARE(spy.args.count(), 1);
+ QTRY_COMPARE(spy.args.count(), 1);
QCOMPARE(spy.args.at(0).toString(), QString("ping"));
}
@@ -215,8 +213,7 @@ void tst_QDBusConnection::sendAsync()
"/org/freedesktop/DBus", "org.freedesktop.DBus", "ListNames");
QVERIFY(con.callWithCallback(msg, &spy, SLOT(asyncReply(QDBusMessage))));
- QTest::qWait(1000);
-
+ QTRY_COMPARE(spy.args.count(), 1);
QCOMPARE(spy.args.value(0).typeName(), "QStringList");
QVERIFY(spy.args.at(0).toStringList().contains(con.baseService()));
}
@@ -239,9 +236,7 @@ void tst_QDBusConnection::connect()
QVERIFY(con.send(msg));
- QTest::qWait(1000);
-
- QCOMPARE(spy.args.count(), 1);
+ QTRY_COMPARE(spy.args.count(), 1);
QCOMPARE(spy.args.at(0).toString(), QString("ping"));
}
@@ -1072,9 +1067,8 @@ void tst_QDBusConnection::connectSignal()
QVERIFY(con.connect(con.baseService(), signal.path(), signal.interface(),
signal.member(), &recv, SLOT(oneSlot(QString))));
QVERIFY(con.send(signal));
- QTest::qWait(100);
+ QTRY_COMPARE(recv.signalsReceived, 1);
QCOMPARE(recv.argumentReceived, signal.arguments().at(0).toString());
- QCOMPARE(recv.signalsReceived, 1);
// disconnect and try with a signature
recv.argumentReceived.clear();
@@ -1084,9 +1078,8 @@ void tst_QDBusConnection::connectSignal()
QVERIFY(con.connect(con.baseService(), signal.path(), signal.interface(),
signal.member(), "s", &recv, SLOT(oneSlot(QString))));
QVERIFY(con.send(signal));
- QTest::qWait(100);
+ QTRY_COMPARE(recv.signalsReceived, 1);
QCOMPARE(recv.argumentReceived, signal.arguments().at(0).toString());
- QCOMPARE(recv.signalsReceived, 1);
// confirm that we are, indeed, a unique connection
recv.argumentReceived.clear();
@@ -1094,9 +1087,8 @@ void tst_QDBusConnection::connectSignal()
QVERIFY(!con.connect(con.baseService(), signal.path(), signal.interface(),
signal.member(), "s", &recv, SLOT(oneSlot(QString))));
QVERIFY(con.send(signal));
- QTest::qWait(100);
+ QTRY_COMPARE(recv.signalsReceived, 1);
QCOMPARE(recv.argumentReceived, signal.arguments().at(0).toString());
- QCOMPARE(recv.signalsReceived, 1);
}
void tst_QDBusConnection::slotsWithLessParameters()
@@ -1114,9 +1106,8 @@ void tst_QDBusConnection::slotsWithLessParameters()
QVERIFY(con.connect(con.baseService(), signal.path(), signal.interface(),
signal.member(), &recv, SLOT(oneSlot())));
QVERIFY(con.send(signal));
- QTest::qWait(100);
+ QTRY_COMPARE(recv.signalsReceived, 1);
QCOMPARE(recv.argumentReceived, QString());
- QCOMPARE(recv.signalsReceived, 1);
// disconnect and try with a signature
recv.signalsReceived = 0;
@@ -1125,18 +1116,16 @@ void tst_QDBusConnection::slotsWithLessParameters()
QVERIFY(con.connect(con.baseService(), signal.path(), signal.interface(),
signal.member(), "s", &recv, SLOT(oneSlot())));
QVERIFY(con.send(signal));
- QTest::qWait(100);
+ QTRY_COMPARE(recv.signalsReceived, 1);
QCOMPARE(recv.argumentReceived, QString());
- QCOMPARE(recv.signalsReceived, 1);
// confirm that we are, indeed, a unique connection
recv.signalsReceived = 0;
QVERIFY(!con.connect(con.baseService(), signal.path(), signal.interface(),
signal.member(), "s", &recv, SLOT(oneSlot())));
QVERIFY(con.send(signal));
- QTest::qWait(100);
+ QTRY_COMPARE(recv.signalsReceived, 1);
QCOMPARE(recv.argumentReceived, QString());
- QCOMPARE(recv.signalsReceived, 1);
}
void SignalReceiver::secondCallWithCallback()
diff --git a/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp b/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
index 8bda5f5641..018b7c2a35 100644
--- a/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
+++ b/tests/auto/dbus/qdbusthreading/tst_qdbusthreading.cpp
@@ -414,8 +414,7 @@ void tst_QDBusThreading::registerObjectInOtherThread()
QCOMPARE(functionSpy, Object_method);
QCOMPARE(threadSpy, th);
- QTest::qWait(100);
- QCOMPARE(signalSpy, 1);
+ QTRY_COMPARE(signalSpy, 1);
sem2.acquire(); // the object is gone
functionSpy = NoMethod;
@@ -462,8 +461,7 @@ void tst_QDBusThreading::registerAdaptorInOtherThread()
QCOMPARE(functionSpy, Adaptor_method);
QCOMPARE(threadSpy, th);
- QTest::qWait(100);
- QCOMPARE(signalSpy, 1);
+ QTRY_COMPARE(signalSpy, 1);
functionSpy = NoMethod;
threadSpy = 0;
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index a971450ee8..9c36b6898a 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -156,10 +156,7 @@ void tst_QOpenGLWindow::resize()
// Check that a future resize triggers resizeGL.
w.resize(800, 600);
- int maxWait = 1000;
- while (w.resizeCount == resCount && maxWait-- >= 0)
- QTest::qWait(10);
- QVERIFY(w.resizeCount > resCount);
+ QTRY_VERIFY(w.resizeCount > resCount);
}
class PainterWindow : public QOpenGLWindow
@@ -239,9 +236,7 @@ void tst_QOpenGLWindow::partial()
for (int i = 0; i < 10; ++i) {
w.paintCount = 0;
w.update();
- int maxWait = 1000;
- while (w.paintCount == 0 && maxWait-- >= 0)
- QTest::qWait(10);
+ QTRY_VERIFY(w.paintCount > 0);
}
// Now since the painting went to an extra framebuffer, all the rects should
diff --git a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
index ffc440ac2d..deb4837956 100644
--- a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
+++ b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp
@@ -76,11 +76,7 @@ void tst_QRasterWindow::basic()
w.reset();
w.update();
- int maxWait = 1000;
- while (w.paintCount == 0 && --maxWait > 0)
- QTest::qWait(10);
-
- QVERIFY(w.paintCount >= 1);
+ QTRY_VERIFY(w.paintCount >= 1);
}
#include <tst_qrasterwindow.moc>
diff --git a/tests/auto/network/access/http2/http2srv.cpp b/tests/auto/network/access/http2/http2srv.cpp
index 69e480b164..b0bae13bad 100644
--- a/tests/auto/network/access/http2/http2srv.cpp
+++ b/tests/auto/network/access/http2/http2srv.cpp
@@ -123,6 +123,12 @@ void Http2Server::emulateGOAWAY(int timeout)
goawayTimeout = timeout;
}
+void Http2Server::redirectOpenStream(quint16 port)
+{
+ redirectWhileReading = true;
+ targetPort = port;
+}
+
void Http2Server::startServer()
{
#ifdef QT_NO_SSL
@@ -775,7 +781,19 @@ void Http2Server::sendResponse(quint32 streamID, bool emptyBody)
if (emptyBody)
writer.addFlag(FrameFlag::END_STREAM);
- HttpHeader header = {{":status", "200"}};
+ HttpHeader header;
+ if (redirectWhileReading) {
+ qDebug("server received HEADERS frame (followed by DATA frames), redirecting ...");
+ Q_ASSERT(targetPort);
+ header.push_back({":status", "308"});
+ const QString url("%1://localhost:%2/");
+ header.push_back({"location", url.arg(clearTextHTTP2 ? QStringLiteral("http") : QStringLiteral("https"),
+ QString::number(targetPort)).toLatin1()});
+
+ } else {
+ header.push_back({":status", "200"});
+ }
+
if (!emptyBody) {
header.push_back(HPack::HeaderField("content-length",
QString("%1").arg(responseBody.size()).toLatin1()));
@@ -871,7 +889,13 @@ void Http2Server::processRequest()
activeRequests[streamID] = decoder.decodedHeader();
if (headersFrame.flags().testFlag(FrameFlag::END_STREAM))
emit receivedRequest(streamID);
- // else - we're waiting for incoming DATA frames ...
+
+ if (redirectWhileReading) {
+ sendResponse(streamID, true);
+ // Don't try to read any DATA frames ...
+ socket->disconnect();
+ } // else - we're waiting for incoming DATA frames ...
+
continuedRequest.clear();
}
diff --git a/tests/auto/network/access/http2/http2srv.h b/tests/auto/network/access/http2/http2srv.h
index 76c5a0ee36..14b41cc67d 100644
--- a/tests/auto/network/access/http2/http2srv.h
+++ b/tests/auto/network/access/http2/http2srv.h
@@ -74,6 +74,7 @@ public:
void enablePushPromise(bool enabled, const QByteArray &path = QByteArray());
void setResponseBody(const QByteArray &body);
void emulateGOAWAY(int timeout);
+ void redirectOpenStream(quint16 targetPort);
// Invokables, since we can call them from the main thread,
// but server (can) work on its own thread.
@@ -186,6 +187,10 @@ private:
// We need it for PUSH_PROMISE, with the correct port number appended,
// when replying to essentially 1.1 request.
QByteArray authority;
+ // Redirect, with status code 308, as soon as we've seen headers, while client
+ // may still be sending DATA frames. See tst_Http2::earlyResponse().
+ bool redirectWhileReading = false;
+ quint16 targetPort = 0;
protected slots:
void ignoreErrorSlot();
};
diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp
index 51e1849512..ecf4c5814a 100644
--- a/tests/auto/network/access/http2/tst_http2.cpp
+++ b/tests/auto/network/access/http2/tst_http2.cpp
@@ -74,6 +74,7 @@ private slots:
void pushPromise();
void goaway_data();
void goaway();
+ void earlyResponse();
protected slots:
// Slots to listen to our in-process server:
@@ -439,6 +440,47 @@ void tst_Http2::goaway()
QVERIFY(!serverGotSettingsACK);
}
+void tst_Http2::earlyResponse()
+{
+ // In this test we'd like to verify client side can handle HEADERS frame while
+ // its stream is in 'open' state. To achieve this, we send a POST request
+ // with some payload, so that the client is first sending HEADERS and then
+ // DATA frames without END_STREAM flag set yet (thus the stream is in Stream::open
+ // state). Upon receiving the client's HEADERS frame our server ('redirector')
+ // immediately (without trying to read any DATA frames) responds with status
+ // code 308. The client should properly handle this.
+
+ clearHTTP2State();
+
+ serverPort = 0;
+ nRequests = 1;
+
+ ServerPtr targetServer(newServer(defaultServerSettings));
+
+ QMetaObject::invokeMethod(targetServer.data(), "startServer", Qt::QueuedConnection);
+ runEventLoop();
+
+ QVERIFY(serverPort != 0);
+
+ const quint16 targetPort = serverPort;
+ serverPort = 0;
+
+ ServerPtr redirector(newServer(defaultServerSettings));
+ redirector->redirectOpenStream(targetPort);
+
+ QMetaObject::invokeMethod(redirector.data(), "startServer", Qt::QueuedConnection);
+ runEventLoop();
+
+ QVERIFY(serverPort);
+ sendRequest(1, QNetworkRequest::NormalPriority, {10000000, Qt::Uninitialized});
+
+ runEventLoop();
+
+ QVERIFY(nRequests == 0);
+ QVERIFY(prefaceOK);
+ QVERIFY(serverGotSettingsACK);
+}
+
void tst_Http2::serverStarted(quint16 port)
{
serverPort = port;
@@ -500,6 +542,7 @@ void tst_Http2::sendRequest(int streamNumber,
QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, QVariant(true));
+ request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, QVariant(true));
request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("text/plain"));
request.setPriority(priority);
@@ -592,6 +635,10 @@ void tst_Http2::replyFinished()
const QVariant spdyUsed(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute));
QVERIFY(spdyUsed.isValid());
QVERIFY(!spdyUsed.toBool());
+ const QVariant code(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute));
+ QVERIFY(code.isValid());
+ QVERIFY(code.canConvert<int>());
+ QCOMPARE(code.value<int>(), 200);
}
--nRequests;
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 1332b369e7..bb01116240 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1188,13 +1188,7 @@ void tst_QSslSocket::protocolServerSide_data()
#if !defined(OPENSSL_NO_SSL2)
// OpenSSL 1.1 has removed SSL2 support. But there is no OPENSSL_NO_SSL2 macro ...
#define OPENSSL_NO_SSL2
-#endif
- // A client using our OpenSSL1.1 backend will negotiate up from TLS 1.0 or 1.1
- // to TLS 1.2 if the server asks for it, where our older backend fails to compromise.
- // So some tests that fail for the old pass with the new.
- const bool willUseTLS12 = true;
-#else
- const bool willUseTLS12 = false;
+#endif // OPENSSL_NO_SSL2
#endif // opensslv11
#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
@@ -1290,7 +1284,7 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::newRow("tls1.1orlater-ssl3") << QSsl::TlsV1_1OrLater << QSsl::SslV3 << false;
#endif
- QTest::newRow("tls1.1orlater-tls1.0") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_0 << willUseTLS12;
+ QTest::newRow("tls1.1orlater-tls1.0") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_0 << false;
QTest::newRow("tls1.1orlater-tls1.1") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_1 << true;
QTest::newRow("tls1.1orlater-tls1.2") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_2 << true;
@@ -1300,8 +1294,8 @@ void tst_QSslSocket::protocolServerSide_data()
#if !defined(OPENSSL_NO_SSL3)
QTest::newRow("tls1.2orlater-ssl3") << QSsl::TlsV1_2OrLater << QSsl::SslV3 << false;
#endif
- QTest::newRow("tls1.2orlater-tls1.0") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_0 << willUseTLS12;
- QTest::newRow("tls1.2orlater-tls1.1") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_1 << willUseTLS12;
+ QTest::newRow("tls1.2orlater-tls1.0") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_0 << false;
+ QTest::newRow("tls1.2orlater-tls1.1") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_1 << false;
QTest::newRow("tls1.2orlater-tls1.2") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_2 << true;
QTest::newRow("any-tls1.0") << QSsl::AnyProtocol << QSsl::TlsV1_0 << true;
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 46e2345c6a..7666bf81e4 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -923,8 +923,7 @@ void tst_QGL::partialGLWidgetUpdates()
widget.setFixedSize(150, 150);
widget.setAutoFillBackground(autoFillBackground);
widget.show();
-
- QTest::qWait(200);
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
if (widget.format().doubleBuffer() != doubleBufferedContext)
QSKIP("Platform does not support requested format");
diff --git a/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro b/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro
index 4ea23a896f..1cdf10d29a 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro
+++ b/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro
@@ -9,5 +9,3 @@ QT += core-private gui-private
SOURCES += tst_qfiledialog.cpp
DEFINES += SRCDIR=\\\"$$PWD/\\\"
-
-linux*: CONFIG += insignificant_test # Crashes on different Linux distros
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST
index fea108f3fd..0f7c377194 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST
+++ b/tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST
@@ -2,3 +2,6 @@
opensuse-42.3 ci
[testLineEditValidation]
opensuse-42.3 ci
+[comboBox]
+# QTBUG-67282
+opensuse
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index 2fed2e0c69..802a04b4bf 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -1389,13 +1389,12 @@ void tst_QItemDelegate::comboBox()
QTableWidget widget(1, 1);
widget.setItem(0, 0, item1);
widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
widget.editItem(item1);
- QTestEventLoop::instance().enterLoop(1);
-
- QComboBox *boolEditor = widget.viewport()->findChild<QComboBox*>();
- QVERIFY(boolEditor);
+ QComboBox *boolEditor = nullptr;
+ QTRY_VERIFY( (boolEditor = widget.viewport()->findChild<QComboBox*>()) );
QCOMPARE(boolEditor->currentIndex(), 1); // True is selected initially.
// The data must actually be different in order for the model
// to be updated.
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
index 9021be1515..1d2bb00678 100644
--- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
+++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp
@@ -911,7 +911,7 @@ void tst_QWidget_window::setWindowState()
// Minimizing keeps other states
w.showMinimized();
QCOMPARE(w.windowState(), state | Qt::WindowMinimized);
- QTest::qWait(100);
+ QTest::qWait(200);
QCOMPARE(w.windowState(), state | Qt::WindowMinimized);
QCOMPARE(w.windowHandle()->windowStates(), state | Qt::WindowMinimized);
}
diff --git a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
index 2ab2fa4c86..a78ebdb2b9 100644
--- a/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
+++ b/tests/auto/widgets/styles/qmacstyle/tst_qmacstyle.cpp
@@ -128,12 +128,12 @@ void tst_QMacStyle::sizeHints()
QComboBox comboBox1(&w);
comboBox1.setEditable(false);
comboBox1.addItem("Foo");
- QCOMPARE(sh(&comboBox1).height(), SIZE(20, 17, 15));
+ QCOMPARE(sh(&comboBox1).height(), SIZE(26, 17, 15));
QComboBox comboBox2(&w);
comboBox2.setEditable(true);
comboBox2.addItem("Foo");
- QCOMPARE(sh(&comboBox2).height(), SIZE(22, 17, 15));
+ QCOMPARE(sh(&comboBox2).height(), SIZE(26, 17, 15));
// Combos in toolbars use the actual widget rect to
// avoid faulty clipping:
@@ -141,7 +141,7 @@ void tst_QMacStyle::sizeHints()
setSize(&tb, size);
QComboBox comboBox3(&tb);
comboBox3.addItem("Foo");
- QCOMPARE(sh(&comboBox3).height(), SIZE(26, -1, -1));
+ QCOMPARE(sh(&comboBox3).height(), SIZE(32, -1, -1));
QSlider slider1(Qt::Horizontal, &w);
QCOMPARE(sh(&slider1).height(), SIZE(15, 12, 10));
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index 71a2742ac5..ca41d7f570 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -127,7 +127,7 @@ QPixmap rasterPixmap(const QImage &image)
QPlatformPixmap *data =
new QRasterPlatformPixmap(QPlatformPixmap::PixmapType);
- data->fromImage(image, Qt::AutoColor);
+ data->fromImage(image, Qt::AutoColor | Qt::NoFormatConversion);
return QPixmap(data);
}
@@ -613,9 +613,7 @@ void tst_QPainter::drawPixmapImage_data_helper(bool pixmaps)
QTest::addColumn<int>("type"); // 0 = circle, 1 = diag line, 2 = solid rect, 3 = alpharect
QList<QSize> sizes;
- sizes << QSize(1, 1)
- << QSize(10, 10)
- << QSize(100, 100)
+ sizes << QSize(10, 10)
<< QSize(1000, 1000);
const char *typeNames[] = {
@@ -657,7 +655,6 @@ void tst_QPainter::drawPixmapImage_data_helper(bool pixmaps)
QImage::Format_RGB32,
QImage::Format_ARGB32_Premultiplied,
QImage::Format_RGB16,
- QImage::Format_ARGB8565_Premultiplied,
QImage::Format_BGR30,
QImage::Format_Invalid
};
@@ -682,12 +679,9 @@ void tst_QPainter::drawPixmapImage_data_helper(bool pixmaps)
QImage::Format_ARGB32,
QImage::Format_ARGB32_Premultiplied,
QImage::Format_RGB16,
- QImage::Format_ARGB8565_Premultiplied,
QImage::Format_RGB888,
QImage::Format_RGBX8888,
QImage::Format_RGBA8888,
- QImage::Format_RGBA8888_Premultiplied,
- QImage::Format_A2BGR30_Premultiplied,
QImage::Format_RGB30,
QImage::Format_Grayscale8,
QImage::Format_Invalid