Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12.0
-
None
-
- Qt 5.12.0
- Windows 10 1809 ; Visual Studio Community 2017 (15.9.2)
- Linux Debian Testing/Unstable ; kernel 4.18.0-2-amd64 ; libc6 2.27-6 ; gcc 8 (8.2.0-8)
-
-
78b422c3415d99713cac98137a9ebad6571eb937
Description
Hi.
When upgrading to 5.12.0 from 5.11.3, a new debug message from Qt appears:
QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once QUrl
To reproduce the behaviour:
- create a default "Application Qt with widgets"
- add in the .pro file
QT += network
- copy/paste the following code as mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QNetworkReply> #include <QNetworkAccessManager> auto networkAccessManager = new QNetworkAccessManager; QEventLoop* loop; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); loop = new QEventLoop; connect(networkAccessManager, &QNetworkAccessManager::finished, [&](QNetworkReply* reply) { //qDebug("%s", qUtf8Printable(reply->readAll())); //reply->deleteLater(); //loop->quit(); //loop->deleteLater(); //loop = nullptr; }); networkAccessManager->get(QNetworkRequest(QUrl("http://google.fr"))); loop->exec(); } MainWindow::~MainWindow() { delete ui; }
The behaviour is consistant across platforms, and doesn't depend on my code as it is triggered between the exec call and the signal emission.