im using QNetworkAccessManager in each httpClient object creation in my app and delete it after the HttpClass go out of stack, I have something like 300 http requests
im doing in aloop , I know that from 4.8 the http requests are Multithreading so I have no fear to execute as meany as I like , and its working great .
the problem is say how can I know when all the thread requests are done (all the 300 ) can I emit some signal ?
this is the loop of the request , in side the http client there are the usual http signals
QMapIterator<QString,QString> i(m_urlMap);
while (i.hasNext())
{
i.next();
QString sUrl = i.value();;
HttpClient* pHttpClient = new HttpClient(m_pFileOutput,m_pMutex);
bool bReturnInvokeHttpClient = false;
bReturnInvokeHttpClient = pHttpClient->startRequest(sUrl);
}
do I need manully keep track on each httpclient m when it done its job ?
The QNetworkAccessManager has only a signal which goes off when a request finishes, but there isn’t one that goes off when the last one does. So I’m afraif you’ll have to keep track yourself.
Best regards