Skip to content

Commit

Permalink
Qt: Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Oct 15, 2023
1 parent 592e356 commit 51f9ab8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions pcsx2-qt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,14 @@ void MainWindow::recreate()
void MainWindow::recreateSettings()
{
QString current_category;
if (m_setings_window)
if (m_settings_window)
{
const bool was_visible = m_setings_window->isVisible();
const bool was_visible = m_settings_window->isVisible();

current_category = m_setings_window->getCategory();
m_setings_window->hide();
m_setings_window->deleteLater();
m_setings_window = nullptr;
current_category = m_settings_window->getCategory();
m_settings_window->hide();
m_settings_window->deleteLater();
m_settings_window = nullptr;

if (!was_visible)
return;
Expand Down Expand Up @@ -528,11 +528,11 @@ void MainWindow::destroySubWindows()
m_controller_settings_window = nullptr;
}

if (m_setings_window)
if (m_settings_window)
{
m_setings_window->close();
m_setings_window->deleteLater();
m_setings_window = nullptr;
m_settings_window->close();
m_settings_window->deleteLater();
m_settings_window = nullptr;
}
}

Expand Down Expand Up @@ -610,7 +610,7 @@ void MainWindow::onShowAdvancedSettingsToggled(bool checked)
m_ui.menuDebug->menuAction()->setVisible(checked);

// just recreate the entire settings window, it's easier.
if (m_setings_window)
if (m_settings_window)
recreateSettings();
}

Expand Down Expand Up @@ -2286,11 +2286,11 @@ void MainWindow::restoreDisplayWindowGeometryFromConfig()

SettingsWindow* MainWindow::getSettingsWindow()
{
if (!m_setings_window)
if (!m_settings_window)
{
m_setings_window = new SettingsWindow();
connect(m_setings_window->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::themeChanged, this, &MainWindow::updateTheme);
connect(m_setings_window->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::languageChanged, this, [this]() {
m_settings_window = new SettingsWindow();
connect(m_settings_window->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::themeChanged, this, &MainWindow::updateTheme);
connect(m_settings_window->getInterfaceSettingsWidget(), &InterfaceSettingsWidget::languageChanged, this, [this]() {
// reopen settings dialog after it applies
updateLanguage();
// If you doSettings now, on macOS, the window will somehow end up underneath the main window that was created above
Expand All @@ -2299,12 +2299,12 @@ SettingsWindow* MainWindow::getSettingsWindow()
g_main_window->doSettings("Interface");
});
});
connect(m_setings_window->getGameListSettingsWidget(), &GameListSettingsWidget::preferEnglishGameListChanged, this, []{
connect(m_settings_window->getGameListSettingsWidget(), &GameListSettingsWidget::preferEnglishGameListChanged, this, []{
g_main_window->m_game_list_widget->refreshGridCovers();
});
}

return m_setings_window;
return m_settings_window;
}

void MainWindow::doSettings(const char* category /* = nullptr */)
Expand Down
2 changes: 1 addition & 1 deletion pcsx2-qt/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private Q_SLOTS:
DisplayWidget* m_display_widget = nullptr;
DisplayContainer* m_display_container = nullptr;

SettingsWindow* m_setings_window = nullptr;
SettingsWindow* m_settings_window = nullptr;
ControllerSettingsWindow* m_controller_settings_window = nullptr;
InputRecordingViewer* m_input_recording_viewer = nullptr;
AutoUpdaterDialog* m_auto_updater_dialog = nullptr;
Expand Down

0 comments on commit 51f9ab8

Please sign in to comment.