diff options
Diffstat (limited to 'tests')
5 files changed, 43 insertions, 1 deletions
diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp index 7c6549364f..609b4b7dce 100644 --- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp +++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp @@ -65,6 +65,7 @@ private slots: void threadSafety(); void qvariantCast(); + void constPointer(); }; void tst_QPointer::constructors() @@ -384,6 +385,12 @@ void tst_QPointer::qvariantCast() // QPointer<int> sop = qPointerFromVariant<int>(v); } +void tst_QPointer::constPointer() +{ + // Compile-time test that QPointer<const T> works. + QPointer<const QFile> fp = new QFile; + delete fp.data(); +} QTEST_MAIN(tst_QPointer) diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index a2bb1ec705..c1c090a953 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -1533,6 +1533,8 @@ public slots: void tst_QSslSocket::setReadBufferSize_task_250027() { + QSKIP("QTBUG-29730 - flakey test blocking integration"); + // do not execute this when a proxy is set. QFETCH_GLOBAL(bool, setProxy); if (setProxy) diff --git a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp index 475054940b..915f503b3f 100644 --- a/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp +++ b/tests/auto/opengl/qglbuffer/tst_qglbuffer.cpp @@ -202,6 +202,11 @@ void tst_QGLBuffer::testBuffer(QGLBuffer::Type type) void tst_QGLBuffer::bufferSharing() { +#if defined(Q_OS_WIN) + // Needs investigation on Windows: https://bugreports.qt-project.org/browse/QTBUG-29692 + QSKIP("Unreproducible timeout on Windows (MSVC/MinGW) CI bots"); +#endif + QGLWidget *w1 = new QGLWidget(); w1->makeCurrent(); diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index e653e8dffb..f62ce6bf5c 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -471,6 +471,10 @@ private slots: void httpDownloadPerformanceDownloadBuffer_data(); void httpDownloadPerformanceDownloadBuffer(); void httpsRequestChain(); + void httpsUpload(); + +private: + void runHttpsUploadRequest(const QByteArray &data, const QNetworkRequest &request); }; void tst_qnetworkreply::initTestCase() @@ -825,6 +829,28 @@ void tst_qnetworkreply::httpsRequestChain() } +void tst_qnetworkreply::runHttpsUploadRequest(const QByteArray &data, const QNetworkRequest &request) +{ + QNetworkReply* reply = manager.post(request, data); + reply->ignoreSslErrors(); + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QTestEventLoop::instance().enterLoop(15); + QVERIFY(!QTestEventLoop::instance().timeout()); + QCOMPARE(reply->error(), QNetworkReply::NoError); + reply->deleteLater(); +} + +void tst_qnetworkreply::httpsUpload() +{ + QByteArray data = QByteArray(2*1024*1024+1, '\177'); + QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/md5sum.cgi")); + request.setHeader(QNetworkRequest::ContentTypeHeader, "application/octet-stream"); +// for (int a = 0; a < 10; ++a) +// runHttpsUploadRequest(data, request); // to warmup all TCP connections + QBENCHMARK { + runHttpsUploadRequest(data, request); + } +} QTEST_MAIN(tst_qnetworkreply) diff --git a/tests/manual/dialogs/filedialogpanel.cpp b/tests/manual/dialogs/filedialogpanel.cpp index 56bd2c1da8..636e65b684 100644 --- a/tests/manual/dialogs/filedialogpanel.cpp +++ b/tests/manual/dialogs/filedialogpanel.cpp @@ -400,7 +400,9 @@ void FileDialogPanel::applySettings(QFileDialog *d) const d->setFileMode(comboBoxValue<QFileDialog::FileMode>(m_fileMode)); d->setOptions(options()); d->setDefaultSuffix(m_defaultSuffix->text().trimmed()); - d->setDirectory(m_directory->text().trimmed()); + const QString directory = m_directory->text().trimmed(); + if (!directory.isEmpty()) + d->setDirectory(directory); const QString file = m_selectedFileName->text().trimmed(); if (!file.isEmpty()) d->selectFile(file); |