equal
deleted
inserted
replaced
2248 |
2248 |
2249 void HWForm::showFeedbackDialogNetChecked() |
2249 void HWForm::showFeedbackDialogNetChecked() |
2250 { |
2250 { |
2251 QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender()); |
2251 QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender()); |
2252 |
2252 |
2253 if (reply && (reply->error() == QNetworkReply::NoError)) { |
2253 if (reply) { |
2254 FeedbackDialog dialog(this); |
2254 switch (reply->error()) { |
2255 dialog.exec(); |
2255 case QNetworkReply::NoError: |
2256 } else |
2256 { |
2257 MessageDialog::ShowErrorMessage(tr("This page requires an internet connection."), this); |
2257 FeedbackDialog dialog(this); |
|
2258 dialog.exec(); |
|
2259 } |
|
2260 break; |
|
2261 case QNetworkReply::UnknownNetworkError: |
|
2262 MessageDialog::ShowFatalMessage( |
|
2263 tr("Unknown network error (possibly missing SSL library)."), this); |
|
2264 break; |
|
2265 default: |
|
2266 MessageDialog::ShowFatalMessage( |
|
2267 QString(tr("This feature requires an Internet connection, but you don't appear to be online (error code: %1).")).arg(reply->error()), this); |
|
2268 break; |
|
2269 } |
|
2270 } |
|
2271 else { |
|
2272 MessageDialog::ShowFatalMessage(tr("Internal error: Reply object is invalid."), this); |
|
2273 } |
2258 } |
2274 } |
2259 |
2275 |
2260 void HWForm::startGame() |
2276 void HWForm::startGame() |
2261 { |
2277 { |
2262 QMessageBox questionMsg(this); |
2278 QMessageBox questionMsg(this); |