Commit 0179fb23 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Close send dialog status before show success or error

parent a40a43b5
......@@ -255,6 +255,8 @@ QVariantList SendPyWebCooking::buildProposal(QStringList props) {
void SendPyWebCooking::handle_result(HttpRequestWorker *worker) {
QString msg;
envoiEnCours->close();
if (worker->error_type == QNetworkReply::NoError) {
// communication was successful
//msg = "Success - Response: " + worker->response;
......@@ -298,8 +300,6 @@ void SendPyWebCooking::handle_result(HttpRequestWorker *worker) {
QMessageBox::critical((QWidget*)this->parent(), tr("Une erreur est survenue"), worker->error_str);
}
}
envoiEnCours->close();
}
void SendPyWebCooking::sendRecipe() {
......
......@@ -65,6 +65,9 @@ void SendWordpress::init(QString htmlCode_lu, QString title_lu, QString mainPict
void SendWordpress::handle_result(HttpRequestWorker *worker) {
envoiEnCours->close();
if (worker->error_type == QNetworkReply::NoError) {
QJsonParseError *error = new QJsonParseError();
QJsonDocument jsondoc = QJsonDocument::fromJson(worker->response, error);
......@@ -109,8 +112,6 @@ void SendWordpress::handle_result(HttpRequestWorker *worker) {
QMessageBox::critical((QWidget*)this->parent(), tr("Une erreur est survenue"), worker->error_str);
}
}
envoiEnCours->close();
}
void SendWordpress::sendRecipe() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment