Qt/CheatsManager: Let the 'Configure Dolphin' button shown in the Cheats Manager when Cheats are disabled actually open the settings.

This commit is contained in:
Admiral H. Curtiss 2021-09-16 06:49:03 +02:00
parent 4d1bd54917
commit aee6e45386
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
3 changed files with 10 additions and 0 deletions

View File

@ -78,6 +78,10 @@ void CheatsManager::OnStateChanged(Core::State state)
m_tab_widget->insertTab(1, m_gecko_code, tr("Gecko Codes")); m_tab_widget->insertTab(1, m_gecko_code, tr("Gecko Codes"));
m_tab_widget->setTabUnclosable(0); m_tab_widget->setTabUnclosable(0);
m_tab_widget->setTabUnclosable(1); m_tab_widget->setTabUnclosable(1);
connect(m_ar_code, &ARCodeWidget::OpenGeneralSettings, this, &CheatsManager::OpenGeneralSettings);
connect(m_gecko_code, &GeckoCodeWidget::OpenGeneralSettings, this,
&CheatsManager::OpenGeneralSettings);
} }
void CheatsManager::CreateWidgets() void CheatsManager::CreateWidgets()

View File

@ -33,6 +33,9 @@ public:
explicit CheatsManager(QWidget* parent = nullptr); explicit CheatsManager(QWidget* parent = nullptr);
~CheatsManager(); ~CheatsManager();
signals:
void OpenGeneralSettings();
private: private:
void CreateWidgets(); void CreateWidgets();
void ConnectWidgets(); void ConnectWidgets();

View File

@ -220,6 +220,9 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters,
ConnectMenuBar(); ConnectMenuBar();
ConnectHotkeys(); ConnectHotkeys();
connect(m_cheats_manager, &CheatsManager::OpenGeneralSettings, this,
&MainWindow::ShowGeneralWindow);
InitCoreCallbacks(); InitCoreCallbacks();
NetPlayInit(); NetPlayInit();