QTfrontend/ui/page/pagefeedback.cpp
changeset 8383 b557c73a7593
parent 8328 03684c667664
--- a/QTfrontend/ui/page/pagefeedback.cpp	Mon Jan 14 12:45:01 2013 +0100
+++ b/QTfrontend/ui/page/pagefeedback.cpp	Mon Jan 14 13:19:47 2013 +0100
@@ -48,6 +48,7 @@
 #include <stdint.h>
 
 #include "pagefeedback.h"
+#include "MessageDialog.h"
 #include "hwconsts.h"
 
 QLayout * PageFeedback::bodyLayoutDefinition()
@@ -144,7 +145,7 @@
         if (reply->error() != QNetworkReply::NoError)
         {
             qDebug() << "Error generating captcha image: " << reply->errorString();
-            ShowErrorMessage(QMessageBox::tr("Failed to generate captcha"));
+            MessageDialog::ShowErrorMessage(QMessageBox::tr("Failed to generate captcha"), this);
             return;
         }
 
@@ -155,7 +156,7 @@
         if (!okay)
         {
             qDebug() << "Failed to get captcha ID: " << body;
-            ShowErrorMessage(QMessageBox::tr("Failed to generate captcha"));
+            MessageDialog::ShowErrorMessage(QMessageBox::tr("Failed to generate captcha"), this);
             return;
         }
 
@@ -172,7 +173,7 @@
         if (reply->error() != QNetworkReply::NoError)
         {
             qDebug() << "Error loading captcha image: " << reply->errorString();
-            ShowErrorMessage(QMessageBox::tr("Failed to download captcha"));
+            MessageDialog::ShowErrorMessage(QMessageBox::tr("Failed to download captcha"), this);
             return;
         }
 
@@ -370,16 +371,6 @@
     //TODO
 }
 
-void PageFeedback::ShowErrorMessage(const QString & msg)
-{
-    QMessageBox msgMsg(this);
-    msgMsg.setIcon(QMessageBox::Warning);
-    msgMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Error"));
-    msgMsg.setText(msg);
-    msgMsg.setWindowModality(Qt::WindowModal);
-    msgMsg.exec();
-}
-
 void PageFeedback::ShowSpecs()
 {
     QMessageBox msgMsg(this);