summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tst_qnetworkreply: Print proxy warning to stderr instead of stdoutMorten Johan Sørvig2020-02-051-3/+3
| | | | | | | This way we produce valid xml also for the no-proxy case. Change-Id: I5a277255d22c3814fe463c0cd013c04ddc6ad919 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* tst_qnetworkreply: Use object.connect() to get rid of warningMårten Nordheim2019-07-181-1/+2
| | | | | | | | | | warning C4573: the usage of 'tst_QNetworkReply::connect' requires the compiler to capture 'this' but the current default capture mode does not allow it Change-Id: Ic9fd526fedf7c52e53e2b1136834c10bf4cd0ea9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* tst_qnetworkreply: skip ssl session sharing tests with schannelMårten Nordheim2019-07-181-4/+4
| | | | | | | | It's not implemented Change-Id: I56abb0a5fe0e6d5c2f5f678adadafed395456902 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkReply: Skip a test when QNetworkStatusMonitor is enabledMårten Nordheim2019-07-081-0/+3
| | | | | | | | | | | | | | QNetworkSession has a concept of UsagePolicy which can disable background* transfers to conserve battery or bandwidth. However, it is only possible to change the policy through QNetworkSessionPrivate::setUsagePolicy which currently doesn't have any callers outside of our auto tests. *background = transfers not initiated directly by the user, but needs to be marked as such by the application developer. Change-Id: I92c4abccaca040612b4795abe7c52d68a2d21749 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-271-23/+0
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-251-23/+0
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
| | * Revert "tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows"Timur Pocheptsov2019-06-211-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSslSocket (OpenSSL backend) does not use mutex/locks during a handshake, so we re-enable previously skipped tests. This reverts commit 8c87a1402cc819c00301566755da5cb65461fac0. Change-Id: I994b085f016f0eb18b3ba439a7041ea08cd3577b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * tst_qnetworkreply - QSKIP/disable tests that deadlock on WindowsTimur Pocheptsov2019-06-121-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use global object to store errors found by q_X509Callback. Thus, we also use a lock/mutex. It would appear all tests involving in-process server and QNAM are prone to intermittent failures on our Windows VMs - it's always about timeouts due to the client socket (QNAM) locking and the server socket blocking main thread while trying to acquire the same lock. The real fix is to get rid of global variable/locking, we'll have it later (quite a change and requires a lot of accuracy). Task-number: QTBUG-76247 Change-Id: Iffc90d9e16783f17f62e836e01c35f22681bdd39 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 91ab70d17f892f3ff6b2019632fda3920d045dcb) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | | Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-141-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | test: migrate QNetworkReply test to QRegularExpressionSamuel Gaist2019-06-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Ibdd3f63d9069c3f01dfe8431bcc64bde4f2aa569 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-141-0/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * | tst_qnetworkreply - QSKIP/disable tests that deadlock on WindowsTimur Pocheptsov2019-06-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use global object to store errors found by q_X509Callback. Thus, we also use a lock/mutex. It would appear all tests involving in-process server and QNAM are prone to intermittent failures on our Windows VMs - it's always about timeouts due to the client socket (QNAM) locking and the server socket blocking main thread while trying to acquire the same lock. The real fix is to get rid of global variable/locking, we'll have it later (quite a change and requires a lot of accuracy). Task-number: QTBUG-76247 Change-Id: Iffc90d9e16783f17f62e836e01c35f22681bdd39 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | tests: remove the last uses of Java-style iteratorsMarc Mutz2019-06-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... except where they are actually the component under test. Java-style iterators are scheduled for deprecation. Change-Id: If4399f7f74c5ffc0f7e65205e422edfa1d908ee8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Tests: Fix some warnings about deprecated functions not under testFriedemann Kleint2019-05-271-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings like: baselineserver/shared/baselineprotocol.cpp:295:72: warning: ‘int QImage::byteCount() const’ is deprecated: Use sizeInBytes [-Wdeprecated-declarations] tst_qnetworkreply.cpp:1560:17: warning: ‘static QList<QSslCertificate> QSslSocket::defaultCaCertificates()’ is deprecated [-Wdeprecated-declarations] tst_qnetworkreply.cpp:1560:39: warning: ‘static QList<QSslCertificate> QSslSocket::defaultCaCertificates()’ is deprecated [-Wdeprecated-declarations] tst_qnetworkreply.cpp:8153:60: warning: ‘T* QWeakPointer<T>::data() const [with T = const QNetworkSession]’ is deprecated: Use toStrongRef() instead, and data() on the returned QSharedPointer [-Wdeprecated-declarations]. ... st_qprinter.cpp:1318:74: warning: ‘QList<QPagedPaintDevice::PageSize> QPrinterInfo::supportedPaperSizes() const’ is deprecated [-Wdeprecated-declarations] tst_qprinter.cpp:1362:74: warning: ‘QList<QPagedPaintDevice::PageSize> QPrinterInfo::supportedPaperSizes() const’ is deprecated [-Wdeprecated-declarations] tst_largefile.cpp:492:85: warning: ‘bool qEqual(InputIterator1, InputIterator1, InputIterator2) [with InputIterator1 = char*; InputIterator2 = char*]’ is deprecated: Use std::equal [-Wdeprecated-declarations] tst_largefile.cpp:498:91: warning: ‘bool qEqual(InputIterator1, InputIterator1, InputIterator2) [with InputIterator1 = char*; InputIterator2 = char*]’ is deprecated: Use std::equal [-Wdeprecated-declarations] tst_qabstractitemmodel.cpp:312:25: warning: ‘void QAbstractItemModel::reset()’ is deprecated [-Wdeprecated-declarations] ... tst_qabstractitemmodel.cpp:1793:28: warning: ‘void QAbstractItemModel::setRoleNames(const QHash<int, QByteArray>&)’ is deprecated [-Wdeprecated-declarations] ... tst_qcolor.cpp:1425:33: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] tst_qcolor.cpp:1432:31: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] tst_qprinterinfo.cpp:303:61: warning: 'QList<QPagedPaintDevice::PageSize> QPrinterInfo::supportedPaperSizes() const' is deprecated [-Wdeprecated-declarations] tst_qprinterinfo.cpp:304:65: warning: 'QList<QPair<QString, QSizeF> > QPrinterInfo::supportedSizesWithNames() const' is deprecated [-Wdeprecated-declarations] tst_qtextdocumentfragment.cpp:947:52: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] tst_qtextlayout.cpp:2261:61: warning: ‘void QTextLayout::setAdditionalFormats(const QList<QTextLayout::FormatRange>&)’ is deprecated: Use setFormats() [-Wdeprecated-declarations] tst_qtextlayout.cpp:2330:42: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] tst_qitemselectionmodel.cpp:2214:37: warning: ‘QModelIndex QModelIndex::child(int, int) const’ is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] ... tst_qtextlist.cpp:317:68: warning: 'bool QTextList::isEmpty() const' is deprecated: Use count() instead [-Wdeprecated-declarations] tst_qpainter.cpp:373:32: warning: ‘void QPainter::setMatrixEnabled(bool)’ is deprecated: Use setWorldMatrixEnabled() instead [-Wdeprecated-declarations] tst_qpainter.cpp:374:40: warning: ‘bool QPainter::matrixEnabled() const’ is deprecated: Use worldMatrixEnabled() instead [-Wdeprecated-declarations] tst_qpainter.cpp:702:45: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] tst_qpainter.cpp:1573:29: warning: ‘void QPainter::drawRoundRect(const QRect&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:76:38: warning: ‘virtual void QPdfWriter::setPageSize(QPagedPaintDevice::PageSize)’ is deprecated: Use setPageSize(QPageSize(id)) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:81:41: warning: ‘virtual void QPdfWriter::setPageSizeMM(const QSizeF&)’ is deprecated: Use setPageSize(QPageSize(size, QPageSize::Millimeter)) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:105:30: warning: ‘virtual void QPdfWriter::setMargins(const QPagedPaintDevice::Margins&)’ is deprecated: Use setPageMargins(QMarginsF(l, t, r, b), QPageLayout::Millimeter) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:172:37: warning: ‘virtual void QPdfWriter::setPageSizeMM(const QSizeF&)’ is deprecated: Use setPageSize(QPageSize(size, QPageSize::Millimeter)) instead [-Wdeprecated-declarations] tst_qpdfwriter.cpp:258:38: warning: ‘virtual void QPdfWriter::setPageSize(QPagedPaintDevice::PageSize)’ is deprecated: Use setPageSize(QPageSize(id)) instead [-Wdeprecated-declarations] qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp:3980:54: warning: ‘QModelIndex QModelIndex::child(int, int) const’ is deprecated: Use QAbstractItemModel::index [-Wdeprecated-declarations] tst_qlocale.cpp:434:26: warning: 'QString::null' is deprecated: use QString() [-Wdeprecated-declarations] ... Change-Id: I77c1a934b27119eedeb26a77c913686314a2a5c7 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Add setAutoDeleteReplies to QNetworkAccessManagerMårten Nordheim2019-05-151-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the introduction of AutoDeleteReplyOnFinishAttribute to QNetworkRequest it seems natural to make it easy to enable for all replies created with the current QNetworkAccessManager. [ChangeLog][QtNetwork][QNetworkAccessManager] Added setAutoDeleteReplies to QNetworkAccessManager to enable the AutoDeleteReplyOnFinishAttribute attribute for all QNetworkRequests that are passed to QNetworkAccessManager. Change-Id: I7f96dd1fc9a899328e89732be17780b4e710c2a2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Introduce AutoDeleteReplyOnFinishAttribute for QNetworkRequestMårten Nordheim2019-05-151-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkRequest] Added the AutoDeleteReplyOnFinishAttribute attribute to QNetworkRequest, which makes QNetworkAccessManager delete the QNetworkReply after it has emitted the "finished" signal. Change-Id: I03d4ac0830137882e51dd28795a8ec817762a300 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Use the QTime API less clumsilyEdward Welbourne2019-04-011-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Various patterns seem to have been copied, notably counting time from QTime(0, 0) rather than using QTime::msecsSinceStartOfDay() and its setter. Unsuitable value types also put in an appearance, and QTime()'s parameters after the first two default to 0 anyway. Corrected a lie in QTime()'s default constructor doc; it does not work the same as QTime(0, 0) at all. Change-Id: Icf1a10052a049e68fd0f665958f36dbe75ac46d5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-261-1/+28
|\| | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| * Network cache: Stop treating no-cache like no-storeMårten Nordheim2019-03-221-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the QNetworkAccessManager machinery we would treat "no-cache" as if it meant "don't cache" while in reality it means "don't return these cached elements without making sure they're up-to-date" At the same time as this change is made let's add test data for "no-store", which replaces the "no-cache" test data. Fixes: QTBUG-71896 Change-Id: Ieda98f3982884ccc839cac2420c777968c786f6e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* | Select single-name SSL certificate for test servers using host networkRyan Chu2019-01-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | On Windows and macOS, the containers are deployed into a virtual machine using the host network. All the containers share the same hostname (qt-test-server), and they are connected to the same network domain (local). When running test in such platforms, use the single-name SSL certificate (qt-test-server.local) for SSL related tests. Change-Id: Idf33e01e8dd8814510d848b87b59b5fc0edc903e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Skip smb-path test of tst_QNetworkReply when using Docker test serversRyan Chu2019-01-081-0/+10
|/ | | | | | | | | | | | | The tests of smb protocol only work in the CI network. Therefore, the docker-based test server for Windows can't pass all the tests of QNetworkReply. These two tests should be reworked when adding Samba server to the docker-based test servers later on. Task-number: QTBUG-72861 Change-Id: I54e639b5414760ee929d0d28fe10f9e021aff7dc Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-0/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Return to eventloop after emitting encryptedMårten Nordheim2018-07-311-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the connection has been encrypted we will, in QHttpNetworkConnectionChannel::_q_encrypted, emit 'reply->encrypted' in which user slots can be called. In the event that the user calls abort it will, however, not abort until the next time it goes back to the event loop (which might not happen until after the request has already been sent). Task-number: QTBUG-65960 Change-Id: I96865f83c47f89deb9f644c86a71948dbb0ec0d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Rework QNetworkReply tests to use docker-based test serversRyan Chu2018-07-271-209/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change frees the tests of their dependence on the Qt internal test server (qt-test-server.qt-test-net). It makes the developers run the tests out of Qt testing infrastructure. If the user has installed Docker engine on their host, the test servers will be built up inside separate Docker containers, and then, the test case goes with the Docker-based test servers. Otherwise, the test case will keep using the Qt internal test server. Task-number: QTQAINFRA-1686 Change-Id: I518bc3675bfd658938509744b0e7e0610bc8bf66 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | De-parameterise tst_QNetworkReply::ignoreSslErrorsList()'s urlEdward Welbourne2018-06-131-8/+7
|/ | | | | | | | | It was the same in all test rows, so move it from the _data() to a fixed value in the test. Also, don't implicitly coerce C-string literals to QString. Change-Id: Ieee4c7ffbf251c4b69b5acd79125dfa93eb51d6e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tests/auto/network: Avoid unconditional qWait()sKari Oikarinen2018-05-081-5/+6
| | | | | | | | | Replace with QSignalSpy or QTRY_COMPARE when possible. Task-number: QTBUG-63992 Change-Id: I18dc8837301424855487a12ee62451a5aeb21bf0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-11/+26
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-231-11/+27
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_win.cpp src/plugins/platforms/ios/qioswindow.mm src/plugins/platforms/ios/quiview.mm tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
| | * tst_QNetworkReply::ioHttpRedirectErrors - fix a flaky testTimur Pocheptsov2017-11-221-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test became a real pain recently. A close look at the test shows several problems (strangely enough, the failure can never be reproduced on real machines, only on VM - Ubuntu and RHEL 6.6). There are several asserts that are firing from time to time here and there. They show that the logic in test is broken/incorrect. QNAM can open several connections to a host, our test then incorrectly resets its 'client' data-member and bad things can later happen after 'bytesWrittenSlot' executed (and deleted a socket). For example, I can reproduce this scenario in every second run: 1. incoming connection -> client = socket(descriptor), connect to client's readyRead (s1) 2. incoming connection -> client = socket(descriptor), connect to client's readyRead (s2) QNAM sends a request on s1. We reply on s2 (which is already wrong) and call client->deleteLater(), which resets client to nullptr. If QNAM sends something else on s1, we hit assert(!client.isNull()). To avoid this, whenever 'sender' in any slot is different from the 'client', we use the actual 'sender' to reply. Another problem is this weird and rather cryptic waitForFinish which is not needed in this particular test since we wait for reply error, not 'finished'. As it happened before - it's not clear if these two problems were the cause of guaranteed fails on CI - an integration failed ~10 times in a row in the same test (not happening anymore though). Task-number: QTBUG-64569 Change-Id: Id9aa091290350c61fadf1c3c001e7c2e1b5ac8f4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-18/+126
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-3/+3
| |\| | | | | | | | | | Change-Id: I2f8f6b1d196548087219739faa3ad1517626da1e
| | * tst_qnetworkreply::getFromUnreachableIp - fix win64 alsoTimur Pocheptsov2017-11-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Looking at the failures in grafana it appears this test is also failing on Windows 64. The same fix applies then, and we use Q_OS_WIN now. Change-Id: Iafcfd6d1e747f3c816878cad072fbfae3aee19ca Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-091-1/+54
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * tst_QNetworkReply::getFromUnreachableIp - fix a failing testTimur Pocheptsov2017-11-081-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch works around Windows X86 on QEMU antics. It appears on this platform the test behaves in some unpredictable manner: - WSAConnect with 255.255.255.255 does not always immediately fail with some error, so socket engine waits for a connection timeout (30 s.), but the test itself - only waits for 5 seconds and then tests that a request has finished with error, which is not true (we are still connecting). To make it work - whenever we have bearermanager feature enabled, set a connection timeout to something reasonable, not 30 s. Since we try to connect to each address twice, make timeout 1.5 s (so it's 3 s. in total and still is < 5 s.). Task-number: QTBUG-64264 Change-Id: I1d40c140667fca8402ec9344e66d313b6df54256 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * tst_qnetworkreply: Replace insignificant_test with blacklistingFriedemann Kleint2017-10-291-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither the exit crash of QTBUG-21102 nor the Windows failure of QTBUG-24226 appear to be reproduceable. Add verbose error reporting to getErrors() and blacklist getErrors:ftp-host which has been found to fail with timeouts on Linux and ioHttpRedirectMultipartPost. Task-number: QTBUG-21102 Task-number: QTBUG-24226 Task-number: QTBUG-62860 Change-Id: I6b29f6184e83de8ffebf6ff0d80606512dca6419 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Fix redirecting all the other methods for HTTP 307 and 308Mårten Nordheim2017-10-241-14/+69
| | | | | | | | | | | | | | | | | | | | c4cf90b1f739c47383672de3d66b1d9d5427f5db made POST requests be redirected properly, but this wasn't enough and should have included every method/verb. Change-Id: I37b12dc9fdffcbf2aadbd2360d4fc2584c024939 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-241-54/+251
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * Fix redirecting POST for HTTP 307 and 308Mårten Nordheim2017-10-171-3/+149
| | | | | | | | | | | | | | | | | | | | All POST requests that were redirected would previously turn into GET requests. This does not follow the standard for HTTP codes 307 and 308. Task-number: QTBUG-63142 Change-Id: Ibd25a9566066e589670a9bc34e5dc5111f8139d5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Open a session during redirects when neededMårten Nordheim2017-10-171-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases when a session isn't needed (i.e. for localhost), the session is not opened at all. If a program (e.g. our tests) redirects from localhost to a different system (e.g. the qt network test servers, or the internet) it will wait for a session forever. So, we need to check if a session is needed for the redirect-target and then open one. It is usually opened in QNetworkReplyHttpImplPrivate::_q_startOperation Change-Id: Id3b78182a3fb3f63f0235ecb1fb665df8bd0c4ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * QNAM (redirects) - clear 'raw' headers before sending the next requestTimur Pocheptsov2017-10-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | We already cleared 'cookedHeaders', which is a QHash for 'known headers' (enumerators as keys instead of strings), now do the same for 'rawHeaders'- not to end up with some weird mix of headers from all possible redirect responses and the final response. Task-number: QTBUG-61300 Change-Id: Ifd6655c4167840bb00d29446d36ce65ba2d5491a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QNetworkReply: Reduce noise and a fail when building with no-sslMårten Nordheim2017-10-171-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | A few tests would QSKIP depending on the inclusion of SSL, producing multiple lines of noise in the output. And one test used https in one of its configurations without checking to see if it could, causing an UnknownProtocolError. Change-Id: I5f54bf1005f962cc027c099b816fbe245dc43d3f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Add support for HTTP status 308 Permanent RedirectMårten Nordheim2017-10-101-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | 308 Permanent Redirect was introduced after redirection support was initially added to Qt. [ChangeLog][QtNetwork][QNetworkAccessManager] Added support for HTTP status 308. Task-number: QTBUG-63075 Change-Id: I1c6cda331d776237113ef8854de9abfe7e41ed3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-0/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * Fix cookies not being applied on redirectMårten Nordheim2017-09-291-0/+28
| | | | | | | | | | | | | | Task-number: QTBUG-63313 Change-Id: I5245fc837557f19062cbbf0f1dfb86353c85229f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-0/+9
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * Workaround for proxyChange failing when run aloneMårten Nordheim2017-09-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | The issue itself is not really worth fixing (the very first request being supposed to have a different proxy than any of the other following requests before a session has been initiated), but we can at least make the test pass when it is run alone. Task-number: QTBUG-63134 Change-Id: I6c7df5c5653541031811e6bff562572061afae0f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Fix MiniHttpServer (POST/PUT requests processing)Timur Pocheptsov2017-09-041-1/+47
|/ | | | | | | | | | | | Teach our MiniHttpServer to better handle POST and PUT requests: read the POST/PUT data too (not headers only), before replying and flushing. The original comment says MiniHttpServer does not support POST/PUT requests, it's not true anymore - we can handle them (perhaps the simplest/shortest ones). Task-number: QTBUG-62844 Change-Id: I80260f8ede1bb1b0b9d6042ecd59558bb7e9a998 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix tests that assume system files are owned by root for qemuSami Nurmenniemi2017-04-261-2/+18
| | | | | | | | | | | | | | | | | If QEMU is provided sysroot with QEMU_LD_PREFIX, it opens files from there. If their owner is the current user, testing their access rights based on assumption that they are root fails. Skip the tests in that case similarly as is already done when the tests are run as root. This fixes following tests: - tst_QTemporaryDir::nonWritableCurrentDir - tst_QNetworkReply::getErrors(file-permissions) - tst_qstandardpaths::testCustomRuntimeDirectory Task-number: QTBUG-59966 Change-Id: I972ce37b4b5a7747cdd732a8e4a737ef09cbc6a5 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e