107 feedbackLayout->addWidget(label_summary, 1, 0); |
107 feedbackLayout->addWidget(label_summary, 1, 0); |
108 feedbackLayout->addWidget(summary, 1, 1); |
108 feedbackLayout->addWidget(summary, 1, 1); |
109 |
109 |
110 CheckSendSpecs = new QCheckBox(); |
110 CheckSendSpecs = new QCheckBox(); |
111 CheckSendSpecs->setText(QLabel::tr("Send system information")); |
111 CheckSendSpecs->setText(QLabel::tr("Send system information")); |
112 CheckSendSpecs->setChecked(true); |
112 CheckSendSpecs->setChecked(false); |
|
113 CheckSendSpecs->setToolTip(tr("This is optional, but this information might help us to resolve bugs and other technical problems.")); |
113 BtnViewInfo = new QPushButton(tr("View")); |
114 BtnViewInfo = new QPushButton(tr("View")); |
114 BtnViewInfo->setFixedHeight(40); |
115 BtnViewInfo->setFixedHeight(40); |
115 feedbackLayout->addWidget(CheckSendSpecs, 0, 2, 2, 1); |
116 feedbackLayout->addWidget(CheckSendSpecs, 0, 2, 2, 1); |
116 feedbackLayout->addWidget(BtnViewInfo, 0, 3, 2, 1); |
117 feedbackLayout->addWidget(BtnViewInfo, 0, 3, 2, 1); |
117 connect(BtnViewInfo, SIGNAL(clicked()), this, SLOT(ShowSpecs())); |
118 connect(BtnViewInfo, SIGNAL(clicked()), this, SLOT(ShowSpecs())); |
134 BtnCancel->setFixedHeight(40); |
135 BtnCancel->setFixedHeight(40); |
135 connect(BtnCancel, SIGNAL(clicked()), this, SLOT(reject())); |
136 connect(BtnCancel, SIGNAL(clicked()), this, SLOT(reject())); |
136 |
137 |
137 label_captcha = new QLabel(); |
138 label_captcha = new QLabel(); |
138 label_captcha->setStyleSheet("border: 3px solid #ffcc00; border-radius: 4px"); |
139 label_captcha->setStyleSheet("border: 3px solid #ffcc00; border-radius: 4px"); |
139 label_captcha->setText("loading<br>captcha"); |
140 label_captcha->setText(QLabel::tr("Loading<br>CAPTCHA ...")); |
140 label_captcha->setFixedSize(200, 50); |
141 label_captcha->setFixedSize(200, 50); |
141 captchaLayout->addWidget(label_captcha); |
142 captchaLayout->addWidget(label_captcha); |
142 |
143 |
143 label_captcha_input = new QLabel(); |
144 label_captcha_input = new QLabel(); |
144 label_captcha_input->setText(QLabel::tr("Type the security code:")); |
145 label_captcha_input->setText(QLabel::tr("Type the security code:")); |
472 nam = new QNetworkAccessManager(this); |
473 nam = new QNetworkAccessManager(this); |
473 connect(nam, SIGNAL(finished(QNetworkReply*)), |
474 connect(nam, SIGNAL(finished(QNetworkReply*)), |
474 this, SLOT(finishedSlot(QNetworkReply*))); |
475 this, SLOT(finishedSlot(QNetworkReply*))); |
475 |
476 |
476 QNetworkRequest header(QUrl("https://hedgewars.org/feedback/?submit")); |
477 QNetworkRequest header(QUrl("https://hedgewars.org/feedback/?submit")); |
477 header.setRawHeader("Content-Length", QString::number(body.size()).toAscii()); |
478 header.setRawHeader("Content-Length", QString::number(body.size()).toLatin1()); |
478 header.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); |
479 header.setRawHeader("Content-Type", "application/x-www-form-urlencoded"); |
479 |
480 |
480 nam->post(header, body); |
481 nam->post(header, body); |
481 } |
482 } |