From 263c1b7ec7876f7dad474dad5c633be0cdd1d7c7 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 10 Feb 2022 20:21:00 +0600 Subject: [PATCH 1/2] Fix compile error --- src/qt/qt_mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 908976985..e64d24e0c 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -124,7 +124,7 @@ MainWindow::MainWindow(QWidget *parent) : this->setWindowFlag(Qt::WindowMaximizeButtonHint, vid_resize == 1); QString vmname(vm_name); - if (vmname.last(1) == "\"" || vmname.last(1) == "'") vmname.truncate(vmname.size() - 1); + if (vmname.at(vmname.size() - 1) == '"' || vmname.at(vmname.size() - 1) == '\'') vmname.truncate(vmname.size() - 1); this->setWindowTitle(QString("%1 - %2 %3").arg(vmname, EMU_NAME, EMU_VERSION_FULL)); connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::BlockingQueuedConnection); From 3594d7d7faf19a78104558e8d3fdc5887c17d3ac Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 10 Feb 2022 20:25:25 +0600 Subject: [PATCH 2/2] Part 2 --- src/qt/qt_progsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_progsettings.cpp b/src/qt/qt_progsettings.cpp index ac7391954..1cd179332 100644 --- a/src/qt/qt_progsettings.cpp +++ b/src/qt/qt_progsettings.cpp @@ -122,7 +122,7 @@ void ProgSettings::accept() update_mouse_msg(); main_window->ui->retranslateUi(main_window); QString vmname(vm_name); - if (vmname.last(1) == "\"" || vmname.last(1) == "'") vmname.truncate(vmname.size() - 1); + if (vmname.at(vmnames.size() - 1) == "\"" || vmname.at(vmnames.size() - 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));