QTfrontend/hwform.cpp
changeset 12674 8d266b2d0f9c
parent 12667 2e0a38566178
child 12725 1a393a59a594
--- a/QTfrontend/hwform.cpp	Sun Oct 08 16:50:47 2017 +0200
+++ b/QTfrontend/hwform.cpp	Sun Oct 08 19:04:20 2017 +0200
@@ -2250,11 +2250,27 @@
 {
     QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
 
-    if (reply && (reply->error() == QNetworkReply::NoError)) {
-        FeedbackDialog dialog(this);
-        dialog.exec();
-    } else
-        MessageDialog::ShowErrorMessage(tr("This page requires an internet connection."), this);
+    if (reply) {
+        switch (reply->error()) {
+            case QNetworkReply::NoError:
+                {
+                    FeedbackDialog dialog(this);
+                    dialog.exec();
+                }
+                break;
+            case QNetworkReply::UnknownNetworkError:
+                MessageDialog::ShowFatalMessage(
+                    tr("Unknown network error (possibly missing SSL library)."), this);
+                break;
+            default:
+                MessageDialog::ShowFatalMessage(
+                    QString(tr("This feature requires an Internet connection, but you don't appear to be online (error code: %1).")).arg(reply->error()), this);
+                break;
+        }
+    }
+    else {
+        MessageDialog::ShowFatalMessage(tr("Internal error: Reply object is invalid."), this);
+    }
 }
 
 void HWForm::startGame()