mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-26 19:45:42 -04:00
Qt: Fix 6.7 deprecation warnings
This commit is contained in:
parent
efcfcd8e11
commit
3e9ac99d54
@ -73,11 +73,11 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
|||||||
tr(
|
tr(
|
||||||
"When enabled, the first disc in a playlist will be used for achievements, regardless of which disc is active."));
|
"When enabled, the first disc in a playlist will be used for achievements, regardless of which disc is active."));
|
||||||
|
|
||||||
connect(m_ui.enable, &QCheckBox::stateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
connect(m_ui.enable, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||||
connect(m_ui.hardcoreMode, &QCheckBox::stateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||||
connect(m_ui.hardcoreMode, &QCheckBox::stateChanged, this, &AchievementSettingsWidget::onHardcoreModeStateChanged);
|
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::onHardcoreModeStateChanged);
|
||||||
connect(m_ui.achievementNotifications, &QCheckBox::stateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
connect(m_ui.achievementNotifications, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||||
connect(m_ui.leaderboardNotifications, &QCheckBox::stateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
connect(m_ui.leaderboardNotifications, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||||
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this,
|
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this,
|
||||||
&AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
|
&AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
|
||||||
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this,
|
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this,
|
||||||
|
@ -176,9 +176,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.showDebugMenu, "Main", "ShowDebugMenu", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.showDebugMenu, "Main", "ShowDebugMenu", false);
|
||||||
|
|
||||||
connect(m_ui.resetToDefaultButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::onResetToDefaultClicked);
|
connect(m_ui.resetToDefaultButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::onResetToDefaultClicked);
|
||||||
connect(m_ui.showDebugMenu, &QCheckBox::stateChanged, g_main_window, &MainWindow::updateDebugMenuVisibility,
|
connect(m_ui.showDebugMenu, &QCheckBox::checkStateChanged, g_main_window, &MainWindow::updateDebugMenuVisibility,
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
connect(m_ui.showDebugMenu, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::onShowDebugOptionsStateChanged);
|
connect(m_ui.showDebugMenu, &QCheckBox::checkStateChanged, this, &AdvancedSettingsWidget::onShowDebugOptionsStateChanged);
|
||||||
|
|
||||||
m_ui.tweakOptionTable->setColumnWidth(0, 380);
|
m_ui.tweakOptionTable->setColumnWidth(0, 380);
|
||||||
m_ui.tweakOptionTable->setColumnWidth(1, 170);
|
m_ui.tweakOptionTable->setColumnWidth(1, 170);
|
||||||
|
@ -50,7 +50,7 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
|
|||||||
m_ui.muted->setChecked(m_dialog->getEffectiveBoolValue("Audio", "OutputMuted", false));
|
m_ui.muted->setChecked(m_dialog->getEffectiveBoolValue("Audio", "OutputMuted", false));
|
||||||
connect(m_ui.volume, &QSlider::valueChanged, this, &AudioSettingsWidget::onOutputVolumeChanged);
|
connect(m_ui.volume, &QSlider::valueChanged, this, &AudioSettingsWidget::onOutputVolumeChanged);
|
||||||
connect(m_ui.fastForwardVolume, &QSlider::valueChanged, this, &AudioSettingsWidget::onFastForwardVolumeChanged);
|
connect(m_ui.fastForwardVolume, &QSlider::valueChanged, this, &AudioSettingsWidget::onFastForwardVolumeChanged);
|
||||||
connect(m_ui.muted, &QCheckBox::stateChanged, this, &AudioSettingsWidget::onOutputMutedChanged);
|
connect(m_ui.muted, &QCheckBox::checkStateChanged, this, &AudioSettingsWidget::onOutputMutedChanged);
|
||||||
updateVolumeLabel();
|
updateVolumeLabel();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -108,7 +108,7 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsWindow* dialog, QWidget* pa
|
|||||||
|
|
||||||
m_ui.cpuClockSpeed->setEnabled(m_dialog->getEffectiveBoolValue("CPU", "OverclockEnable", false));
|
m_ui.cpuClockSpeed->setEnabled(m_dialog->getEffectiveBoolValue("CPU", "OverclockEnable", false));
|
||||||
|
|
||||||
connect(m_ui.enableCPUClockSpeedControl, &QCheckBox::stateChanged, this,
|
connect(m_ui.enableCPUClockSpeedControl, &QCheckBox::checkStateChanged, this,
|
||||||
&ConsoleSettingsWidget::onEnableCPUClockSpeedControlChecked);
|
&ConsoleSettingsWidget::onEnableCPUClockSpeedControlChecked);
|
||||||
connect(m_ui.cpuClockSpeed, &QSlider::valueChanged, this, &ConsoleSettingsWidget::onCPUClockSpeedValueChanged);
|
connect(m_ui.cpuClockSpeed, &QSlider::valueChanged, this, &ConsoleSettingsWidget::onCPUClockSpeedValueChanged);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
|
|||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLSource, "InputSources", "SDL", true);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLSource, "InputSources", "SDL", true);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLEnhancedMode, "InputSources",
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableSDLEnhancedMode, "InputSources",
|
||||||
"SDLControllerEnhancedMode", false);
|
"SDLControllerEnhancedMode", false);
|
||||||
connect(m_ui.enableSDLSource, &QCheckBox::stateChanged, this,
|
connect(m_ui.enableSDLSource, &QCheckBox::checkStateChanged, this,
|
||||||
&ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
|
&ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
|
||||||
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);
|
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
|
|||||||
{
|
{
|
||||||
m_ui.useProfileHotkeyBindings->setChecked(
|
m_ui.useProfileHotkeyBindings->setChecked(
|
||||||
m_dialog->getBoolValue("ControllerPorts", "UseProfileHotkeyBindings", false));
|
m_dialog->getBoolValue("ControllerPorts", "UseProfileHotkeyBindings", false));
|
||||||
connect(m_ui.useProfileHotkeyBindings, &QCheckBox::stateChanged, this, [this](int new_state) {
|
connect(m_ui.useProfileHotkeyBindings, &QCheckBox::checkStateChanged, this, [this](int new_state) {
|
||||||
m_dialog->setBoolValue("ControllerPorts", "UseProfileHotkeyBindings", (new_state == Qt::Checked));
|
m_dialog->setBoolValue("ControllerPorts", "UseProfileHotkeyBindings", (new_state == Qt::Checked));
|
||||||
emit bindingSetupChanged();
|
emit bindingSetupChanged();
|
||||||
});
|
});
|
||||||
|
@ -68,9 +68,9 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
|
|||||||
}
|
}
|
||||||
connect(m_ui.turboSpeed, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
connect(m_ui.turboSpeed, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||||
&EmulationSettingsWidget::onTurboSpeedIndexChanged);
|
&EmulationSettingsWidget::onTurboSpeedIndexChanged);
|
||||||
connect(m_ui.vsync, &QCheckBox::stateChanged, this, &EmulationSettingsWidget::onVSyncChanged);
|
connect(m_ui.vsync, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::onVSyncChanged);
|
||||||
|
|
||||||
connect(m_ui.rewindEnable, &QCheckBox::stateChanged, this, &EmulationSettingsWidget::updateRewind);
|
connect(m_ui.rewindEnable, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateRewind);
|
||||||
connect(m_ui.rewindSaveFrequency, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this,
|
connect(m_ui.rewindSaveFrequency, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this,
|
||||||
&EmulationSettingsWidget::updateRewind);
|
&EmulationSettingsWidget::updateRewind);
|
||||||
connect(m_ui.rewindSaveSlots, QOverload<int>::of(&QSpinBox::valueChanged), this,
|
connect(m_ui.rewindSaveSlots, QOverload<int>::of(&QSpinBox::valueChanged), this,
|
||||||
|
@ -94,8 +94,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||||||
&GraphicsSettingsWidget::onAspectRatioChanged);
|
&GraphicsSettingsWidget::onAspectRatioChanged);
|
||||||
connect(m_ui.gpuDownsampleMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
connect(m_ui.gpuDownsampleMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||||
&GraphicsSettingsWidget::onDownsampleModeChanged);
|
&GraphicsSettingsWidget::onDownsampleModeChanged);
|
||||||
connect(m_ui.trueColor, &QCheckBox::stateChanged, this, &GraphicsSettingsWidget::onTrueColorChanged);
|
connect(m_ui.trueColor, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::onTrueColorChanged);
|
||||||
connect(m_ui.pgxpEnable, &QCheckBox::stateChanged, this, &GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
connect(m_ui.pgxpEnable, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
||||||
|
|
||||||
if (!dialog->isPerGameSettings() ||
|
if (!dialog->isPerGameSettings() ||
|
||||||
(dialog->containsSettingValue("GPU", "Multisamples") || dialog->containsSettingValue("GPU", "PerSampleShading")))
|
(dialog->containsSettingValue("GPU", "Multisamples") || dialog->containsSettingValue("GPU", "PerSampleShading")))
|
||||||
@ -158,9 +158,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpCPU, "GPU", "PGXPCPU", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpCPU, "GPU", "PGXPCPU", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpVertexCache, "GPU", "PGXPVertexCache", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pgxpVertexCache, "GPU", "PGXPVertexCache", false);
|
||||||
|
|
||||||
connect(m_ui.pgxpTextureCorrection, &QCheckBox::stateChanged, this,
|
connect(m_ui.pgxpTextureCorrection, &QCheckBox::checkStateChanged, this,
|
||||||
|
&GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
||||||
|
connect(m_ui.pgxpDepthBuffer, &QCheckBox::checkStateChanged, this,
|
||||||
&GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
&GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
||||||
connect(m_ui.pgxpDepthBuffer, &QCheckBox::stateChanged, this, &GraphicsSettingsWidget::updatePGXPSettingsEnabled);
|
|
||||||
|
|
||||||
// OSD Tab
|
// OSD Tab
|
||||||
|
|
||||||
@ -206,9 +207,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
|||||||
"DumpVRAMWriteHeightThreshold",
|
"DumpVRAMWriteHeightThreshold",
|
||||||
Settings::DEFAULT_VRAM_WRITE_DUMP_HEIGHT_THRESHOLD);
|
Settings::DEFAULT_VRAM_WRITE_DUMP_HEIGHT_THRESHOLD);
|
||||||
|
|
||||||
connect(m_ui.vramWriteReplacement, &QCheckBox::stateChanged, this,
|
connect(m_ui.vramWriteReplacement, &QCheckBox::checkStateChanged, this,
|
||||||
&GraphicsSettingsWidget::onEnableAnyTextureReplacementsChanged);
|
&GraphicsSettingsWidget::onEnableAnyTextureReplacementsChanged);
|
||||||
connect(m_ui.vramWriteDumping, &QCheckBox::stateChanged, this,
|
connect(m_ui.vramWriteDumping, &QCheckBox::checkStateChanged, this,
|
||||||
&GraphicsSettingsWidget::onEnableVRAMWriteDumpingChanged);
|
&GraphicsSettingsWidget::onEnableVRAMWriteDumpingChanged);
|
||||||
|
|
||||||
// Debugging Tab
|
// Debugging Tab
|
||||||
|
@ -52,7 +52,7 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
|
|||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.createSaveStateBackups, "Main", "CreateSaveStateBackups",
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.createSaveStateBackups, "Main", "CreateSaveStateBackups",
|
||||||
Settings::DEFAULT_SAVE_STATE_BACKUPS);
|
Settings::DEFAULT_SAVE_STATE_BACKUPS);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableDiscordPresence, "Main", "EnableDiscordPresence", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableDiscordPresence, "Main", "EnableDiscordPresence", false);
|
||||||
connect(m_ui.renderToSeparateWindow, &QCheckBox::stateChanged, this,
|
connect(m_ui.renderToSeparateWindow, &QCheckBox::checkStateChanged, this,
|
||||||
&InterfaceSettingsWidget::onRenderToSeparateWindowChanged);
|
&InterfaceSettingsWidget::onRenderToSeparateWindowChanged);
|
||||||
|
|
||||||
onRenderToSeparateWindowChanged();
|
onRenderToSeparateWindowChanged();
|
||||||
|
@ -348,7 +348,7 @@ void PostProcessingShaderConfigWidget::createUi()
|
|||||||
QCheckBox* checkbox = new QCheckBox(QString::fromStdString(option.ui_name), this);
|
QCheckBox* checkbox = new QCheckBox(QString::fromStdString(option.ui_name), this);
|
||||||
checkbox->setToolTip(tooltip);
|
checkbox->setToolTip(tooltip);
|
||||||
checkbox->setChecked(option.value[0].int_value != 0);
|
checkbox->setChecked(option.value[0].int_value != 0);
|
||||||
connect(checkbox, &QCheckBox::stateChanged, [this, &option](int state) {
|
connect(checkbox, &QCheckBox::checkStateChanged, [this, &option](Qt::CheckState state) {
|
||||||
option.value[0].int_value = (state == Qt::Checked) ? 1 : 0;
|
option.value[0].int_value = (state == Qt::Checked) ? 1 : 0;
|
||||||
updateConfigForOption(option);
|
updateConfigForOption(option);
|
||||||
});
|
});
|
||||||
|
@ -180,11 +180,7 @@ static constexpr KeyCodeName s_qt_key_names[] = {{Qt::Key_Escape, "Escape", ICON
|
|||||||
{Qt::Key_twosuperior, "twosuperior", nullptr},
|
{Qt::Key_twosuperior, "twosuperior", nullptr},
|
||||||
{Qt::Key_threesuperior, "threesuperior", nullptr},
|
{Qt::Key_threesuperior, "threesuperior", nullptr},
|
||||||
{Qt::Key_acute, "acute", nullptr},
|
{Qt::Key_acute, "acute", nullptr},
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
|
|
||||||
{Qt::Key_micro, "micro", nullptr},
|
{Qt::Key_micro, "micro", nullptr},
|
||||||
#else
|
|
||||||
{Qt::Key_mu, "mu", nullptr},
|
|
||||||
#endif
|
|
||||||
{Qt::Key_paragraph, "paragraph", nullptr},
|
{Qt::Key_paragraph, "paragraph", nullptr},
|
||||||
{Qt::Key_periodcentered, "periodcentered", nullptr},
|
{Qt::Key_periodcentered, "periodcentered", nullptr},
|
||||||
{Qt::Key_cedilla, "cedilla", nullptr},
|
{Qt::Key_cedilla, "cedilla", nullptr},
|
||||||
|
@ -265,7 +265,7 @@ struct SettingAccessor<QCheckBox>
|
|||||||
template<typename F>
|
template<typename F>
|
||||||
static void connectValueChanged(QCheckBox* widget, F func)
|
static void connectValueChanged(QCheckBox* widget, F func)
|
||||||
{
|
{
|
||||||
widget->connect(widget, &QCheckBox::stateChanged, func);
|
widget->connect(widget, &QCheckBox::checkStateChanged, func);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ void SetupWizardDialog::addPathToTable(const std::string& path, bool recursive)
|
|||||||
m_ui.searchDirectoryList->setCellWidget(row, 1, cb);
|
m_ui.searchDirectoryList->setCellWidget(row, 1, cb);
|
||||||
cb->setChecked(recursive);
|
cb->setChecked(recursive);
|
||||||
|
|
||||||
connect(cb, &QCheckBox::stateChanged, [item](int state) {
|
connect(cb, &QCheckBox::checkStateChanged, [item](Qt::CheckState state) {
|
||||||
const std::string path(item->text().toStdString());
|
const std::string path(item->text().toStdString());
|
||||||
if (state == Qt::Checked)
|
if (state == Qt::Checked)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user