Two questions about QNetworkAccessManager (Qt 4.8):
1) In code like the following (apologies for typos, not real code):
... {
QNetworkAccessManager *nam = ...;
QNetworkReply *reply = nam->get(QNetworkRequest(...));
connect(reply, SIGNAL(finished(...)), this, SLOT(requestFinished(...)));
}
Is there any chance of a race condition where the request finishes before connect() is called and so “this” never receives the signal?
2) Will every call to QNetworkAccessManager::get result in a finished() signal, even if there is an error in the request?
I’m writing a somewhat complicated program to manage a bunch of requests/replies, and it would greatly simplify my code if I know I can connect the reply’s finished() signal after calling get() and a) not miss the signal and b) always see a finished() for every request.
Thanks!
↧