Fix game window width/height setting being broken when using Arabic locale
Qt displays numbers differently in Arabic. The spinbox window height/width used
getText instead of value to get the value, which was wrong because this gets
the user-facing string (in arabic) instead of the number to use internally.
--- a/ChangeLog.txt Thu Nov 01 21:39:45 2018 +0300
+++ b/ChangeLog.txt Thu Nov 01 20:29:42 2018 +0100
@@ -85,6 +85,7 @@
* No longer save default weapon schemes into file
* Pseudo player names in chat (like “[server]”) are no longer clickable
* Lobby/room: No longer allow opening context menu if no player selected
+ * Fix game window width/height setting being broken when using Arabic locale
Server:
+ Add “/help” chat command for command help
--- a/QTfrontend/gameuiconfig.cpp Thu Nov 01 21:39:45 2018 +0300
+++ b/QTfrontend/gameuiconfig.cpp Thu Nov 01 20:29:42 2018 +0100
@@ -240,8 +240,8 @@
void GameUIConfig::SaveOptions()
{
setValue("video/fullscreenResolution", Form->ui.pageOptions->CBResolution->currentText());
- setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->text());
- setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->text());
+ setValue("video/windowedWidth", Form->ui.pageOptions->windowWidthEdit->value());
+ setValue("video/windowedHeight", Form->ui.pageOptions->windowHeightEdit->value());
setValue("video/fullscreen", vid_Fullscreen());
setValue("video/quality", Form->ui.pageOptions->SLQuality->value());
@@ -363,8 +363,8 @@
full.setWidth(wh[0].toInt());
full.setHeight(wh[1].toInt());
}
- windowed.setWidth(Form->ui.pageOptions->windowWidthEdit->text().toInt());
- windowed.setHeight(Form->ui.pageOptions->windowHeightEdit->text().toInt());
+ windowed.setWidth(Form->ui.pageOptions->windowWidthEdit->value());
+ windowed.setHeight(Form->ui.pageOptions->windowHeightEdit->value());
return std::make_pair(full, windowed);
}