fix Qt6 deprecation warnings

This commit is contained in:
oltolm 2024-11-01 13:05:14 +01:00
commit 49c72efcd3
12 changed files with 94 additions and 0 deletions

View file

@ -241,7 +241,11 @@ void GameCubePane::CreateWidgets()
void GameCubePane::ConnectWidgets()
{
// IPL Settings
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
connect(m_skip_main_menu, &QCheckBox::checkStateChanged, this, &GameCubePane::SaveSettings);
#else
connect(m_skip_main_menu, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings);
#endif
connect(m_language_combo, &QComboBox::currentIndexChanged, this, &GameCubePane::SaveSettings);
// Device Settings
@ -272,10 +276,20 @@ void GameCubePane::ConnectWidgets()
#ifdef HAS_LIBMGBA
// GBA Settings
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
connect(m_gba_threads, &QCheckBox::checkStateChanged, this, &GameCubePane::SaveSettings);
#else
connect(m_gba_threads, &QCheckBox::stateChanged, this, &GameCubePane::SaveSettings);
#endif
connect(m_gba_bios_edit, &QLineEdit::editingFinished, this, &GameCubePane::SaveSettings);
connect(m_gba_browse_bios, &QPushButton::clicked, this, &GameCubePane::BrowseGBABios);
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
connect(m_gba_save_rom_path, &QCheckBox::checkStateChanged, this,
&GameCubePane::SaveRomPathChanged);
#else
connect(m_gba_save_rom_path, &QCheckBox::stateChanged, this, &GameCubePane::SaveRomPathChanged);
#endif
connect(m_gba_saves_edit, &QLineEdit::editingFinished, this, &GameCubePane::SaveSettings);
connect(m_gba_browse_saves, &QPushButton::clicked, this, &GameCubePane::BrowseGBASaves);
for (size_t i = 0; i < m_gba_browse_roms.size(); ++i)