fix Qt6 deprecation warnings

This commit is contained in:
oltolm committed 2025-07-19 22:08:15 +02:00
1 parent b25e293cc8
commit 49c72efcd3
12 files changed
+94

No files matched your search

@@ -12,6 +12,7 @@
#include <QLabel>
#include <QRadioButton>
#include <QSignalBlocker>
#include <QTimeZone>
#include <QVBoxLayout>
#include <cmath>
@@ -251,9 +252,18 @@ void AdvancedPane::CreateLayout()
QStringLiteral("mm"), QStringLiteral("mm:ss")));
QtUtils::ShowFourDigitYear(m_custom_rtc_datetime);
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
m_custom_rtc_datetime->setDateTimeRange(QDateTime({2000, 1, 1}, {0, 0, 0}, QTimeZone::UTC),
QDateTime({2099, 12, 31}, {23, 59, 59}, QTimeZone::UTC));
#else
m_custom_rtc_datetime->setDateTimeRange(QDateTime({2000, 1, 1}, {0, 0, 0}, Qt::UTC),
QDateTime({2099, 12, 31}, {23, 59, 59}, Qt::UTC));
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
m_custom_rtc_datetime->setTimeZone(QTimeZone::UTC);
#else
m_custom_rtc_datetime->setTimeSpec(Qt::UTC);
#endif
rtc_options->layout()->addWidget(m_custom_rtc_datetime);
m_custom_rtc_checkbox->SetDescription(
@@ -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)