forked from loafle/openapi-generator-original
* fixup! Simpler timeout with QTimer::singleShot (#4430) * Move disconnect again * Fix self assignement in HttpRequest.cpp.mustache
This commit is contained in:
@@ -91,7 +91,7 @@ QByteArray *{{prefix}}HttpRequestWorker::getMultiPartField(const QString &fieldn
|
||||
}
|
||||
|
||||
void {{prefix}}HttpRequestWorker::setTimeOut(int timeOut){
|
||||
_timeOut = _timeOut;
|
||||
_timeOut = timeOut;
|
||||
}
|
||||
|
||||
void {{prefix}}HttpRequestWorker::setWorkingDirectory(const QString &path){
|
||||
@@ -365,7 +365,6 @@ void {{prefix}}HttpRequestWorker::on_manager_finished(QNetworkReply *reply) {
|
||||
headers.insert(item.first, item.second);
|
||||
}
|
||||
}
|
||||
disconnect(this, nullptr, nullptr, nullptr);
|
||||
reply->deleteLater();
|
||||
process_form_response();
|
||||
emit on_execution_finished(this);
|
||||
@@ -375,6 +374,7 @@ void {{prefix}}HttpRequestWorker::on_manager_timeout(QNetworkReply *reply) {
|
||||
error_type = QNetworkReply::TimeoutError;
|
||||
response = "";
|
||||
error_str = "Timed out waiting for response";
|
||||
disconnect(manager, nullptr, nullptr, nullptr);
|
||||
reply->abort();
|
||||
reply->deleteLater();
|
||||
emit on_execution_finished(this);
|
||||
|
||||
@@ -100,7 +100,7 @@ QByteArray *PFXHttpRequestWorker::getMultiPartField(const QString &fieldname){
|
||||
}
|
||||
|
||||
void PFXHttpRequestWorker::setTimeOut(int timeOut){
|
||||
_timeOut = _timeOut;
|
||||
_timeOut = timeOut;
|
||||
}
|
||||
|
||||
void PFXHttpRequestWorker::setWorkingDirectory(const QString &path){
|
||||
|
||||
Reference in New Issue
Block a user