From a42f71c9ba2cb0e8faf0191e9bcb1d6795b05335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 8 Jan 2026 16:10:49 +0100 Subject: [PATCH] Blind-fix Qt --- Qt/mainwindow.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 99b7f6ba4b..6d63d21e02 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -531,9 +531,17 @@ void MainWindow::createMenus() ->addEnableState(UISTATE_MENU); fileMenu->addSeparator(); MenuTree* savestateMenu = new MenuTree(this, fileMenu, QT_TR_NOOP("Saves&tate slot")); + + QStringList slotNames; + QList slotIndices; + for (int i = 0; i < Config::iSaveStateSlotCount; ++i) { + slotNames << QString::number(i + 1); + slotIndices << i; + } saveStateGroup = new MenuActionGroup(this, savestateMenu, SLOT(saveStateGroup_triggered(QAction *)), - QStringList() << "1" << "2" << "3" << "4" << "5", - QList() << 0 << 1 << 2 << 3 << 4); + slotNames, + slotIndices); + fileMenu->add(new MenuAction(this, SLOT(qlstateAct()), QT_TR_NOOP("L&oad state"), Qt::Key_F4)) ->addDisableState(UISTATE_MENU); fileMenu->add(new MenuAction(this, SLOT(qsstateAct()), QT_TR_NOOP("S&ave state"), Qt::Key_F2))