Qt: fix deprecation warnings

This commit is contained in:
Megamouse 2020-01-19 14:00:57 +01:00
parent 30d5a849e3
commit 485b22d664
4 changed files with 22 additions and 4 deletions

View file

@ -503,7 +503,11 @@ void emu_settings::EnhanceSpinBox(QSpinBox* spinbox, SettingsType type, const QS
spinbox->setRange(min, max);
spinbox->setValue(val);
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
connect(spinbox, &QSpinBox::textChanged, [=](const QString&/* text*/)
#else
connect(spinbox, QOverload<const QString &>::of(&QSpinBox::valueChanged), [=](const QString&/* value*/)
#endif
{
SetSetting(type, sstr(spinbox->cleanText()));
});
@ -545,7 +549,11 @@ void emu_settings::EnhanceDoubleSpinBox(QDoubleSpinBox* spinbox, SettingsType ty
spinbox->setRange(min, max);
spinbox->setValue(val);
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
connect(spinbox, &QDoubleSpinBox::textChanged, [=](const QString&/* text*/)
#else
connect(spinbox, QOverload<const QString &>::of(&QDoubleSpinBox::valueChanged), [=](const QString&/* value*/)
#endif
{
SetSetting(type, sstr(spinbox->cleanText()));
});