Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.3.1, 6.4.0 Beta4
-
None
-
Ubuntu 22.04
-
-
5387b88aa9 (qt/qtbase/dev) 5387b88aa9 (qt/tqtc-qtbase/dev) 3a7646f02a (qt/qtbase/6.4.0) 98ef806830 (qt/qtbase/6.4) 766d71ef71 (qt/qtbase/6.3) 766d71ef71 (qt/tqtc-qtbase/6.3) 98ef806830 (qt/tqtc-qtbase/6.4) 3a7646f02a (qt/tqtc-qtbase/6.4.0)
Description
The HTTP example (https://doc.qt.io/qt-6/qtnetwork-http-example.html) does not work with Qt 6.
The last readyRead() signal is not always emitted.
That means that when finished() is emitted and httpFinished() is executed, there are still some data to be read inside the QNetworkReply.
Adding some qDebug() in the example, I have "randomly" one of these 3 ouputs:
void HttpWindow::httpReadyRead() Read 32768 bytes void HttpWindow::httpReadyRead() Read 43866 bytes void HttpWindow::httpFinished() no more data
void HttpWindow::httpFinished() 76634 bytes of data left
void HttpWindow::httpReadyRead() Read 32768 bytes void HttpWindow::httpFinished() 43866 bytes of data left
With Qt 5.15 the last readyRead() seems always emitted:
void HttpWindow::httpReadyRead() Read 10623 bytes void HttpWindow::httpReadyRead() Read 49241 bytes void HttpWindow::httpReadyRead() Read 11277 bytes void HttpWindow::httpReadyRead() Read 4222 bytes void HttpWindow::httpReadyRead() Read 1271 bytes void HttpWindow::httpFinished() no more data
void HttpWindow::httpReadyRead() Read 76634 bytes void HttpWindow::httpFinished() no more data
Attachments
For Gerrit Dashboard: QTBUG-106354 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
431769,3 | QNetworkReply: Fix missing final emission of readyRead | dev | qt/qtbase | Status: MERGED | +2 | 0 |
432136,2 | QNetworkReply: Fix missing final emission of readyRead | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
432137,2 | QNetworkReply: Fix missing final emission of readyRead | 6.4.0 | qt/qtbase | Status: MERGED | +2 | 0 |
432178,2 | QNetworkReply: Fix missing final emission of readyRead | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |