QTfrontend/ui/widget/feedbackdialog.cpp
changeset 11625 9d3e32623567
parent 11515 4dd77731453b
child 11665 30bbbde590ce
equal deleted inserted replaced
11624:56aa40beedf0 11625:9d3e32623567
    83         "a { color: #fc0; }"
    83         "a { color: #fc0; }"
    84         "b { color: #0df; }"
    84         "b { color: #0df; }"
    85         "</style>"
    85         "</style>"
    86         "<div align=\"center\"><h1>%1</h1>"
    86         "<div align=\"center\"><h1>%1</h1>"
    87         "<h3>%2<h3>"
    87         "<h3>%2<h3>"
    88         "<h4>%3 <a href=\"http://hedgewars.org/kb/KnownBugs\">known bugs</a><h4>"
    88         "<h4>%3 <a href=\"https://hedgewars.org/kb/KnownBugs\">known bugs</a><h4>"
    89         "<h4>%4<h4>"
    89         "<h4>%4<h4>"
    90         "</div>")
    90         "</div>")
    91         .arg(tr("Send us feedback!"))
    91         .arg(tr("Send us feedback!"))
    92         .arg(tr("We are always happy about suggestions, ideas, or bug reports."))
    92         .arg(tr("We are always happy about suggestions, ideas, or bug reports."))
    93         .arg(tr("If you found a bug, you can see if it's already been reported here: "))
    93         .arg(tr("If you found a bug, you can see if it's already been reported here: "))
   385             qDebug() << "Failed to get captcha ID: " << body;
   385             qDebug() << "Failed to get captcha ID: " << body;
   386             ShowErrorMessage(QMessageBox::tr("Failed to generate captcha"));
   386             ShowErrorMessage(QMessageBox::tr("Failed to generate captcha"));
   387             return;
   387             return;
   388         }
   388         }
   389 
   389 
   390         QString url = "http://hedgewars.org/feedback/?captcha&id=";
   390         QString url = "https://hedgewars.org/feedback/?captcha&id=";
   391         url += QString::number(captchaID);
   391         url += QString::number(captchaID);
   392 
   392 
   393         QNetworkAccessManager *netManager = GetNetManager();
   393         QNetworkAccessManager *netManager = GetNetManager();
   394         QUrl captchaURL(url);
   394         QUrl captchaURL(url);
   395         QNetworkRequest req(captchaURL);
   395         QNetworkRequest req(captchaURL);
   421 }
   421 }
   422 
   422 
   423 void FeedbackDialog::LoadCaptchaImage()
   423 void FeedbackDialog::LoadCaptchaImage()
   424 {
   424 {
   425         QNetworkAccessManager *netManager = GetNetManager();
   425         QNetworkAccessManager *netManager = GetNetManager();
   426         QUrl captchaURL("http://hedgewars.org/feedback/?gencaptcha");
   426         QUrl captchaURL("https://hedgewars.org/feedback/?gencaptcha");
   427         QNetworkRequest req(captchaURL);
   427         QNetworkRequest req(captchaURL);
   428         genCaptchaRequest = netManager->get(req);
   428         genCaptchaRequest = netManager->get(req);
   429 }
   429 }
   430 
   430 
   431 void FeedbackDialog::finishedSlot(QNetworkReply* reply)
   431 void FeedbackDialog::finishedSlot(QNetworkReply* reply)
   491 
   491 
   492     nam = new QNetworkAccessManager(this);
   492     nam = new QNetworkAccessManager(this);
   493     connect(nam, SIGNAL(finished(QNetworkReply*)),
   493     connect(nam, SIGNAL(finished(QNetworkReply*)),
   494             this, SLOT(finishedSlot(QNetworkReply*)));
   494             this, SLOT(finishedSlot(QNetworkReply*)));
   495 
   495 
   496     QNetworkRequest header(QUrl("http://hedgewars.org/feedback/?submit"));
   496     QNetworkRequest header(QUrl("https://hedgewars.org/feedback/?submit"));
   497     header.setRawHeader("Content-Length", QString::number(body.size()).toAscii());
   497     header.setRawHeader("Content-Length", QString::number(body.size()).toAscii());
   498     header.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
   498     header.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
   499 
   499 
   500     nam->post(header, body);
   500     nam->post(header, body);
   501 }
   501 }