qt: Fix quote character in VM name on Windows

This commit is contained in:
Cacodemon345
2022-02-10 16:55:38 +06:00
parent 2a41bc823f
commit 6619bd5932
2 changed files with 6 additions and 2 deletions

View File

@@ -121,7 +121,9 @@ void ProgSettings::accept()
reloadStrings();
update_mouse_msg();
main_window->ui->retranslateUi(main_window);
main_window->setWindowTitle(QString("%1 - %2 %3").arg(vm_name, EMU_NAME, EMU_VERSION_FULL));
QString vmname(vm_name);
if (vmname.last(1) == "\"" || vmname.last(1) == "'") vmname.truncate(vmname.size() - 1);
main_window->setWindowTitle(QString("%1 - %2 %3").arg(vmname, EMU_NAME, EMU_VERSION_FULL));
QString msg = main_window->status->getMessage();
main_window->status.reset(new MachineStatus(main_window));
main_window->refreshMediaMenu();