Qt: Remove duplicate menu action

This commit is contained in:
Stenzek 2024-03-13 13:54:33 +10:00
parent 51b3fabd31
commit b9c9b05878
No known key found for this signature in database
3 changed files with 3 additions and 11 deletions

View file

@ -1072,7 +1072,7 @@ void MainWindow::onCheatsMenuAboutToShow()
{ {
m_ui.menuCheats->clear(); m_ui.menuCheats->clear();
connect(m_ui.menuCheats->addAction(tr("Cheat Manager")), &QAction::triggered, this, connect(m_ui.menuCheats->addAction(tr("Cheat Manager")), &QAction::triggered, this,
&MainWindow::onToolsCheatManagerTriggered); &MainWindow::openCheatManager);
m_ui.menuCheats->addSeparator(); m_ui.menuCheats->addSeparator();
populateCheatsMenu(m_ui.menuCheats); populateCheatsMenu(m_ui.menuCheats);
} }
@ -1790,7 +1790,6 @@ void MainWindow::updateEmulationActions(bool starting, bool running, bool cheevo
m_ui.actionScreenshot->setDisabled(starting || !running); m_ui.actionScreenshot->setDisabled(starting || !running);
m_ui.menuChangeDisc->setDisabled(starting || !running); m_ui.menuChangeDisc->setDisabled(starting || !running);
m_ui.menuCheats->setDisabled(starting || !running || cheevos_challenge_mode); m_ui.menuCheats->setDisabled(starting || !running || cheevos_challenge_mode);
m_ui.actionCheatManager->setDisabled(starting || !running || cheevos_challenge_mode);
m_ui.actionCPUDebugger->setDisabled(cheevos_challenge_mode); m_ui.actionCPUDebugger->setDisabled(cheevos_challenge_mode);
m_ui.actionDumpRAM->setDisabled(starting || !running || cheevos_challenge_mode); m_ui.actionDumpRAM->setDisabled(starting || !running || cheevos_challenge_mode);
m_ui.actionDumpVRAM->setDisabled(starting || !running || cheevos_challenge_mode); m_ui.actionDumpVRAM->setDisabled(starting || !running || cheevos_challenge_mode);
@ -2083,7 +2082,6 @@ void MainWindow::connectSignals()
connect(m_ui.actionCheckForUpdates, &QAction::triggered, this, &MainWindow::onCheckForUpdatesActionTriggered); connect(m_ui.actionCheckForUpdates, &QAction::triggered, this, &MainWindow::onCheckForUpdatesActionTriggered);
connect(m_ui.actionMemory_Card_Editor, &QAction::triggered, this, &MainWindow::onToolsMemoryCardEditorTriggered); connect(m_ui.actionMemory_Card_Editor, &QAction::triggered, this, &MainWindow::onToolsMemoryCardEditorTriggered);
connect(m_ui.actionCoverDownloader, &QAction::triggered, this, &MainWindow::onToolsCoverDownloaderTriggered); connect(m_ui.actionCoverDownloader, &QAction::triggered, this, &MainWindow::onToolsCoverDownloaderTriggered);
connect(m_ui.actionCheatManager, &QAction::triggered, this, &MainWindow::onToolsCheatManagerTriggered);
connect(m_ui.actionCPUDebugger, &QAction::triggered, this, &MainWindow::openCPUDebugger); connect(m_ui.actionCPUDebugger, &QAction::triggered, this, &MainWindow::openCPUDebugger);
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionEnableGDBServer, "Debug", "EnableGDBServer", false); SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionEnableGDBServer, "Debug", "EnableGDBServer", false);
connect(m_ui.actionOpenDataDirectory, &QAction::triggered, this, &MainWindow::onToolsOpenDataDirectoryTriggered); connect(m_ui.actionOpenDataDirectory, &QAction::triggered, this, &MainWindow::onToolsOpenDataDirectoryTriggered);
@ -2891,7 +2889,7 @@ void MainWindow::onToolsCoverDownloaderTriggered()
dlg.exec(); dlg.exec();
} }
void MainWindow::onToolsCheatManagerTriggered() void MainWindow::openCheatManager()
{ {
if (!m_cheat_manager_dialog) if (!m_cheat_manager_dialog)
m_cheat_manager_dialog = new CheatManagerDialog(this); m_cheat_manager_dialog = new CheatManagerDialog(this);

View file

@ -164,7 +164,6 @@ private Q_SLOTS:
void onCheckForUpdatesActionTriggered(); void onCheckForUpdatesActionTriggered();
void onToolsMemoryCardEditorTriggered(); void onToolsMemoryCardEditorTriggered();
void onToolsCoverDownloaderTriggered(); void onToolsCoverDownloaderTriggered();
void onToolsCheatManagerTriggered();
void onToolsOpenDataDirectoryTriggered(); void onToolsOpenDataDirectoryTriggered();
void onSettingsTriggeredFromToolbar(); void onSettingsTriggeredFromToolbar();
@ -176,6 +175,7 @@ private Q_SLOTS:
void onUpdateCheckComplete(); void onUpdateCheckComplete();
void openCheatManager();
void openCPUDebugger(); void openCPUDebugger();
void onCPUDebuggerClosed(); void onCPUDebuggerClosed();

View file

@ -237,7 +237,6 @@
</property> </property>
<addaction name="actionMemory_Card_Editor"/> <addaction name="actionMemory_Card_Editor"/>
<addaction name="actionCoverDownloader"/> <addaction name="actionCoverDownloader"/>
<addaction name="actionCheatManager"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionOpenDataDirectory"/> <addaction name="actionOpenDataDirectory"/>
</widget> </widget>
@ -884,11 +883,6 @@
<string>Memory &amp;Card Editor</string> <string>Memory &amp;Card Editor</string>
</property> </property>
</action> </action>
<action name="actionCheatManager">
<property name="text">
<string>C&amp;heat Manager</string>
</property>
</action>
<action name="actionCPUDebugger"> <action name="actionCPUDebugger">
<property name="text"> <property name="text">
<string>CPU D&amp;ebugger</string> <string>CPU D&amp;ebugger</string>