Hi, I'm trying to set speed limit in my application using QNetworkReply but my code doesn't work properly.
QNetworkReply* reply;
if(postData.isEmpty()) {
reply = m_manager->get(*this->generateRequest(url));
} else {
reply = m_manager->post(*this->generateRequest(url),postData);
}
if(Values().DOWNLOAD_SPEED_LIMIT && (this->m_name != "Updater")){
reply->setReadBufferSize(Values().DOWNLOAD_SPEED_LIMIT_VALUE);
}
QNetworkReply* reply;
if(postData.isEmpty()) {
reply = m_manager->get(*this->generateRequest(url));
} else {
reply = m_manager->post(*this->generateRequest(url),postData);
}
if(Values().DOWNLOAD_SPEED_LIMIT && (this->m_name != "Updater")){
reply->setReadBufferSize(Values().DOWNLOAD_SPEED_LIMIT_VALUE);
}
To copy to clipboard, switch view to plain text mode
I don't know why but for some reasons setReadBufferSize doesn't work, I need really simple solution...
Thanks for any help
Cheers
Bookmarks