[Qt-interest] understanding QNetworkAccessManager
Frank Mertens
frank at cyblogic.de
Sat Aug 1 17:40:26 CEST 2009
Thiago Macieira wrote:
> Frank Mertens wrote:
>> QNetworkReply *reply = manager->get(request); // <= request send here?
>> connect(reply, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
>> connect(reply, SIGNAL(error(QNetworkReply::NetworkError)),
>> this, SLOT(slotError(QNetworkReply::NetworkError)));
>> connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
>> this, SLOT(slotSslErrors(QList<QSslError>)));
>>
>> For me it looks like a bluntly presented race condition.
>> I tried to figure out at which point exactly the request
>> is send. Maybe I'm missing something. But is the request
>> send somewhere in the GUI event loop?
>
> Yes, it's sent in the event loop. So until you return to it, nothing
> happens. There's no race condition above.
Thx. Seeing is believing. Without being so lazy yesterday, following
my nose I should have figured out myself, what is happing inside.
QNetworkReplyImplPrivate::backendNotify() seems to perform those
event magic...
More information about the Qt-interest-old
mailing list