Frontend: Force plain text mode for many message windows
authorWuzzy <Wuzzy2@mail.ru>
Thu, 25 Apr 2019 21:24:27 +0200
changeset 14841 b9437746bffb
parent 14840 57ed3981db20
child 14842 5443e5e0faa3
Frontend: Force plain text mode for many message windows
QTfrontend/hwform.cpp
QTfrontend/main.cpp
QTfrontend/ui/page/pageeditteam.cpp
QTfrontend/ui/page/pageplayrecord.cpp
QTfrontend/ui/page/pageroomslist.cpp
QTfrontend/ui/page/pagescheme.cpp
QTfrontend/ui/page/pagevideos.cpp
QTfrontend/ui/widget/drawmapwidget.cpp
QTfrontend/ui/widget/feedbackdialog.cpp
QTfrontend/ui/widget/gamecfgwidget.cpp
QTfrontend/ui/widget/mapContainer.cpp
QTfrontend/ui/widget/selectWeapon.cpp
QTfrontend/util/MessageDialog.cpp
--- a/QTfrontend/hwform.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/hwform.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -2327,6 +2327,7 @@
         infoMsg.setIcon(QMessageBox::Information);
         infoMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Success"));
         infoMsg.setText(QMessageBox::tr("All file associations have been set"));
+        infoMsg.setTextFormat(Qt::PlainText);
         infoMsg.setWindowModality(Qt::WindowModal);
         infoMsg.exec();
     }
@@ -2440,6 +2441,7 @@
     questionMsg.setIcon(QMessageBox::Question);
     questionMsg.setWindowTitle(QMessageBox::tr("Not all players are ready"));
     questionMsg.setText(QMessageBox::tr("Are you sure you want to start this game?\nNot all players are ready."));
+    questionMsg.setTextFormat(Qt::PlainText);
     questionMsg.setWindowModality(Qt::WindowModal);
     questionMsg.addButton(QMessageBox::Yes);
     questionMsg.addButton(QMessageBox::Cancel);
--- a/QTfrontend/main.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/main.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -548,6 +548,7 @@
         questionTutorialMsg.setIcon(QMessageBox::Question);
         questionTutorialMsg.setWindowTitle(QMessageBox::tr("Welcome to Hedgewars"));
         questionTutorialMsg.setText(QMessageBox::tr("Welcome to Hedgewars!\n\nYou seem to be new around here. Would you like to play some training missions first to learn the basics of Hedgewars?"));
+        questionTutorialMsg.setTextFormat(Qt::PlainText);
         questionTutorialMsg.setWindowModality(Qt::WindowModal);
         questionTutorialMsg.addButton(QMessageBox::Yes);
         questionTutorialMsg.addButton(QMessageBox::No);
--- a/QTfrontend/ui/page/pageeditteam.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/page/pageeditteam.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -490,6 +490,7 @@
     reallyDeleteMsg.setIcon(QMessageBox::Question);
     reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Teams - Are you sure?"));
     reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the team '%1'?").arg(name));
+    reallyDeleteMsg.setTextFormat(Qt::PlainText);
     reallyDeleteMsg.setWindowModality(Qt::WindowModal);
     reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
 
@@ -657,6 +658,7 @@
         teamNameFixedMsg.setIcon(QMessageBox::Warning);
         teamNameFixedMsg.setWindowTitle(QMessageBox::tr("Teams - Name already taken"));
         teamNameFixedMsg.setText(QMessageBox::tr("The team name '%1' is already taken, so your team has been renamed to '%2'.").arg(origName).arg(team.name()));
+        teamNameFixedMsg.setTextFormat(Qt::PlainText);
         teamNameFixedMsg.setWindowModality(Qt::WindowModal);
         teamNameFixedMsg.setStandardButtons(QMessageBox::Ok);
         teamNameFixedMsg.exec();
--- a/QTfrontend/ui/page/pageplayrecord.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/page/pageplayrecord.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -138,6 +138,7 @@
         recordMsg.setIcon(QMessageBox::Warning);
         recordMsg.setWindowTitle(QMessageBox::tr("Error"));
         recordMsg.setText(QMessageBox::tr("Please select a file from the list."));
+        recordMsg.setTextFormat(Qt::PlainText);
         recordMsg.setWindowModality(Qt::WindowModal);
         recordMsg.exec();
         return ;
@@ -165,6 +166,7 @@
             renameMsg.setIcon(QMessageBox::Warning);
             renameMsg.setWindowTitle(QMessageBox::tr("Error"));
             renameMsg.setText(QMessageBox::tr("Cannot rename file to %1.").arg(newfullname));
+            renameMsg.setTextFormat(Qt::PlainText);
             renameMsg.setWindowModality(Qt::WindowModal);
             renameMsg.exec();
         }
@@ -182,6 +184,7 @@
         recordMsg.setIcon(QMessageBox::Warning);
         recordMsg.setWindowTitle(QMessageBox::tr("Error"));
         recordMsg.setText(QMessageBox::tr("Please select a file from the list."));
+        recordMsg.setTextFormat(Qt::PlainText);
         recordMsg.setWindowModality(Qt::WindowModal);
         recordMsg.exec();
         return ;
@@ -197,6 +200,7 @@
         removeMsg.setIcon(QMessageBox::Warning);
         removeMsg.setWindowTitle(QMessageBox::tr("Error"));
         removeMsg.setText(QMessageBox::tr("Cannot delete file %1.").arg(rfile.fileName()));
+        removeMsg.setTextFormat(Qt::PlainText);
         removeMsg.setWindowModality(Qt::WindowModal);
         removeMsg.exec();
     }
--- a/QTfrontend/ui/page/pageroomslist.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -504,6 +504,7 @@
         roomNameMsg.setIcon(QMessageBox::Warning);
         roomNameMsg.setWindowTitle(QMessageBox::tr("Room Name - Error"));
         roomNameMsg.setText(QMessageBox::tr("Please select room from the list"));
+        roomNameMsg.setTextFormat(Qt::PlainText);
         roomNameMsg.setWindowModality(Qt::WindowModal);
         roomNameMsg.exec();
         return;
@@ -530,6 +531,7 @@
     reallyJoinMsg.setIcon(QMessageBox::Question);
     reallyJoinMsg.setWindowTitle(QMessageBox::tr("Room Name - Are you sure?"));
     reallyJoinMsg.setText(QMessageBox::tr("The game you are trying to join has started.\nDo you still want to join the room?"));
+    reallyJoinMsg.setTextFormat(Qt::PlainText);
     reallyJoinMsg.setWindowModality(Qt::WindowModal);
     reallyJoinMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
 
--- a/QTfrontend/ui/page/pagescheme.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/page/pagescheme.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -647,6 +647,7 @@
         deniedMsg.setIcon(QMessageBox::Warning);
         deniedMsg.setWindowTitle(QMessageBox::tr("Schemes - Warning"));
         deniedMsg.setText(QMessageBox::tr("Cannot delete default scheme '%1'!").arg(selectScheme->currentText()));
+        deniedMsg.setTextFormat(Qt::PlainText);
         deniedMsg.setWindowModality(Qt::WindowModal);
         deniedMsg.exec();
     }
@@ -656,6 +657,7 @@
         reallyDeleteMsg.setIcon(QMessageBox::Question);
         reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Schemes - Are you sure?"));
         reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the game scheme '%1'?").arg(selectScheme->currentText()));
+        reallyDeleteMsg.setTextFormat(Qt::PlainText);
         reallyDeleteMsg.setWindowModality(Qt::WindowModal);
         reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
 
@@ -716,6 +718,7 @@
         QMessageBox dupeMsg(this);
         dupeMsg.setIcon(QMessageBox::Warning);
         dupeMsg.setWindowTitle(QMessageBox::tr("Schemes - Name already taken"));
+        dupeMsg.setTextFormat(Qt::PlainText);
         dupeMsg.setText(QMessageBox::tr("A scheme with the name '%1' already exists. Your scheme has been renamed to '%2'.").arg(name).arg(newName));
         dupeMsg.setWindowModality(Qt::WindowModal);
         dupeMsg.exec();
--- a/QTfrontend/ui/page/pagevideos.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/page/pagevideos.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -588,6 +588,7 @@
     reallyDeleteMsg.setIcon(QMessageBox::Question);
     reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Videos - Are you sure?"));
     reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the video '%1'?").arg(item->name));
+    reallyDeleteMsg.setTextFormat(Qt::PlainText);
     reallyDeleteMsg.setWindowModality(Qt::WindowModal);
     reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
 
--- a/QTfrontend/ui/widget/drawmapwidget.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/widget/drawmapwidget.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -154,6 +154,7 @@
             errorMsg.setIcon(QMessageBox::Warning);
             errorMsg.setWindowTitle(QMessageBox::tr("File error"));
             errorMsg.setText(QMessageBox::tr("Cannot open '%1' for writing").arg(fileName));
+            errorMsg.setTextFormat(Qt::PlainText);
             errorMsg.setWindowModality(Qt::WindowModal);
             errorMsg.exec();
         }
@@ -174,6 +175,7 @@
             errorMsg.setIcon(QMessageBox::Warning);
             errorMsg.setWindowTitle(QMessageBox::tr("File error"));
             errorMsg.setText(QMessageBox::tr("Cannot open '%1' for reading").arg(fileName));
+            errorMsg.setTextFormat(Qt::PlainText);
             errorMsg.setWindowModality(Qt::WindowModal);
             errorMsg.exec();
         }
--- a/QTfrontend/ui/widget/feedbackdialog.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/widget/feedbackdialog.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -330,6 +330,7 @@
     msgMsg.setIcon(QMessageBox::Warning);
     msgMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Error"));
     msgMsg.setText(msg);
+    msgMsg.setTextFormat(Qt::PlainText);
     msgMsg.setWindowModality(Qt::WindowModal);
     msgMsg.exec();
 }
@@ -417,6 +418,7 @@
             infoMsg.setIcon(QMessageBox::Information);
             infoMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Success"));
             infoMsg.setText(reply->readAll());
+            infoMsg.setTextFormat(Qt::PlainText);
             infoMsg.setWindowModality(Qt::WindowModal);
             infoMsg.exec();
 
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -403,6 +403,7 @@
         illegalMsg.setIcon(QMessageBox::Warning);
         illegalMsg.setWindowTitle(QMessageBox::tr("Error"));
         illegalMsg.setText(QMessageBox::tr("Cannot use the weapon scheme '%1'!").arg(name));
+        illegalMsg.setTextFormat(Qt::PlainText);
         illegalMsg.setWindowModality(Qt::WindowModal);
         illegalMsg.exec();
     }
--- a/QTfrontend/ui/widget/mapContainer.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -1255,6 +1255,7 @@
         errorMsg.setIcon(QMessageBox::Warning);
         errorMsg.setWindowTitle(QMessageBox::tr("File error"));
         errorMsg.setText(QMessageBox::tr("Cannot open '%1' for reading").arg(fileName));
+        errorMsg.setTextFormat(Qt::PlainText);
         errorMsg.setWindowModality(Qt::WindowModal);
         errorMsg.exec();
     }
--- a/QTfrontend/ui/widget/selectWeapon.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/ui/widget/selectWeapon.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -305,6 +305,7 @@
             deniedMsg.setIcon(QMessageBox::Warning);
             deniedMsg.setWindowTitle(QMessageBox::tr("Weapons - Warning"));
             deniedMsg.setText(QMessageBox::tr("A weapon scheme with the name '%1' already exists. Changes made to the weapon scheme have been discarded.").arg(compName));
+            deniedMsg.setTextFormat(Qt::PlainText);
             deniedMsg.setWindowModality(Qt::WindowModal);
             deniedMsg.exec();
             return;
@@ -350,6 +351,7 @@
             deniedMsg.setIcon(QMessageBox::Warning);
             deniedMsg.setWindowTitle(QMessageBox::tr("Weapons - Warning"));
             deniedMsg.setText(QMessageBox::tr("Cannot delete default weapon set '%1'!").arg(cDefaultAmmos[i].first));
+            deniedMsg.setTextFormat(Qt::PlainText);
             deniedMsg.setWindowModality(Qt::WindowModal);
             deniedMsg.exec();
             return;
@@ -360,6 +362,7 @@
     reallyDeleteMsg.setIcon(QMessageBox::Question);
     reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Weapons - Are you sure?"));
     reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the weapon set '%1'?").arg(delWeaponsName));
+    reallyDeleteMsg.setTextFormat(Qt::PlainText);
     reallyDeleteMsg.setWindowModality(Qt::WindowModal);
     reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
 
--- a/QTfrontend/util/MessageDialog.cpp	Thu Apr 25 21:32:22 2019 +0300
+++ b/QTfrontend/util/MessageDialog.cpp	Thu Apr 25 21:24:27 2019 +0200
@@ -66,6 +66,7 @@
     msgMsg.setWindowTitle(title != NULL ? title : "Hedgewars");
     msgMsg.setText(msg);
     msgMsg.setIcon(icon);
+    msgMsg.setTextFormat(Qt::PlainText);
     msgMsg.setWindowModality(Qt::WindowModal);
 
     return msgMsg.exec();