strange tr()
authordisplacer
Sun, 20 Jan 2008 14:44:01 +0000
changeset 728 033971bbe639
parent 727 da975a75af09
child 729 c22b6207af93
strange tr()
QTfrontend/pages.cpp
QTfrontend/pages.h
--- a/QTfrontend/pages.cpp	Sun Jan 20 14:40:36 2008 +0000
+++ b/QTfrontend/pages.cpp	Sun Jan 20 14:44:01 2008 +0000
@@ -60,10 +60,10 @@
 	pageLayout->setColumnStretch(1, 2);
 	pageLayout->setColumnStretch(2, 1);
 
-	BtnSinglePlayer = addButton("Single Player", pageLayout, 0, 1);
+	BtnSinglePlayer = addButton(QPushButton::tr("Single Player"), pageLayout, 0, 1);
 	BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
-	BtnMultiplayer = addButton("Multiplayer", pageLayout, 1, 1);
+	BtnMultiplayer = addButton(tr("Multiplayer"), pageLayout, 1, 1);
 	BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 
 	BtnNet = addButton("Net game", pageLayout, 2, 1);
--- a/QTfrontend/pages.h	Sun Jan 20 14:40:36 2008 +0000
+++ b/QTfrontend/pages.h	Sun Jan 20 14:44:01 2008 +0000
@@ -59,26 +59,26 @@
   }
   virtual ~AbstractPage() {};
 
-  QPushButton* addButton(const char* btname, QGridLayout* grid, int wy, int wx) {
+  QPushButton* addButton(QString btname, QGridLayout* grid, int wy, int wx) {
     QPushButton* butt = new QPushButton(this);
     butt->setFont(*font14);
-    butt->setText(QPushButton::tr(btname));
+    butt->setText(btname);
     grid->addWidget(butt, wy, wx);
     return butt;
   };
 
-  QPushButton* addButton(const char* btname, QGridLayout* grid, int wy, int wx, int rowSpan, int columnSpan) {
+  QPushButton* addButton(QString btname, QGridLayout* grid, int wy, int wx, int rowSpan, int columnSpan) {
     QPushButton* butt = new QPushButton(this);
     butt->setFont(*font14);
-    butt->setText(QPushButton::tr(btname));
+    butt->setText(btname);
     grid->addWidget(butt, wy, wx, rowSpan, columnSpan);
     return butt;
   };
 
-  QPushButton* addButton(const char* btname, QBoxLayout* box, int where) {
+  QPushButton* addButton(QString btname, QBoxLayout* box, int where) {
     QPushButton* butt = new QPushButton(this);
     butt->setFont(*font14);
-    butt->setText(QPushButton::tr(btname));
+    butt->setText(btname);
     box->addWidget(butt, where);
     return butt;
   };