mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 09:39:55 +00:00
fix deprecation warnings in Qt 6.8
This commit is contained in:
parent
431221f172
commit
cd8954db14
@ -441,9 +441,9 @@ void emu_settings::EnhanceCheckBox(QCheckBox* checkbox, emu_settings_type type)
|
||||
m_broken_types.insert(type);
|
||||
}
|
||||
|
||||
connect(checkbox, &QCheckBox::stateChanged, this, [type, this](int val)
|
||||
connect(checkbox, &QCheckBox::checkStateChanged, this, [type, this](Qt::CheckState val)
|
||||
{
|
||||
const std::string str = val != 0 ? "true" : "false";
|
||||
const std::string str = val != Qt::Unchecked ? "true" : "false";
|
||||
SetSetting(type, str);
|
||||
});
|
||||
|
||||
|
@ -99,7 +99,7 @@ pad_motion_settings_dialog::pad_motion_settings_dialog(QDialog* parent, std::sha
|
||||
m_shifts[i]->setRange(config->shift.min, config->shift.max);
|
||||
m_shifts[i]->setValue(config->shift.get());
|
||||
|
||||
connect(m_mirrors[i], &QCheckBox::stateChanged, this, [this, i](int state)
|
||||
connect(m_mirrors[i], &QCheckBox::checkStateChanged, this, [this, i](Qt::CheckState state)
|
||||
{
|
||||
std::lock_guard lock(m_config_mutex);
|
||||
m_config_entries[i]->mirrored.set(state != Qt::Unchecked);
|
||||
|
@ -93,7 +93,7 @@ patch_manager_dialog::patch_manager_dialog(std::shared_ptr<gui_settings> gui_set
|
||||
connect(ui->patch_tree, &QTreeWidget::currentItemChanged, this, &patch_manager_dialog::handle_item_selected);
|
||||
connect(ui->patch_tree, &QTreeWidget::itemChanged, this, &patch_manager_dialog::handle_item_changed);
|
||||
connect(ui->patch_tree, &QTreeWidget::customContextMenuRequested, this, &patch_manager_dialog::handle_custom_context_menu_requested);
|
||||
connect(ui->cb_owned_games_only, &QCheckBox::stateChanged, this, &patch_manager_dialog::handle_show_owned_games_only);
|
||||
connect(ui->cb_owned_games_only, &QCheckBox::checkStateChanged, this, &patch_manager_dialog::handle_show_owned_games_only);
|
||||
connect(ui->configurable_selector, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](int index)
|
||||
{
|
||||
if (index >= 0)
|
||||
@ -1087,7 +1087,7 @@ void patch_manager_dialog::dropEvent(QDropEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
void patch_manager_dialog::handle_show_owned_games_only(int state)
|
||||
void patch_manager_dialog::handle_show_owned_games_only(Qt::CheckState state)
|
||||
{
|
||||
m_show_owned_games_only = state == Qt::CheckState::Checked;
|
||||
m_gui_settings->SetValue(gui::pm_show_owned, m_show_owned_games_only);
|
||||
|
@ -50,7 +50,7 @@ private Q_SLOTS:
|
||||
void handle_item_changed(QTreeWidgetItem* item, int column);
|
||||
void handle_config_value_changed(double value);
|
||||
void handle_custom_context_menu_requested(const QPoint& pos);
|
||||
void handle_show_owned_games_only(int state);
|
||||
void handle_show_owned_games_only(Qt::CheckState state);
|
||||
|
||||
private:
|
||||
void refresh(bool restore_layout = false);
|
||||
|
@ -1433,7 +1433,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
if (game)
|
||||
ui->gb_DiskCacheClearing->setDisabled(true);
|
||||
else
|
||||
connect(ui->enableCacheClearing, &QCheckBox::stateChanged, ui->maximumCacheSize, &QSlider::setEnabled);
|
||||
connect(ui->enableCacheClearing, &QCheckBox::checkStateChanged, ui->maximumCacheSize, &QSlider::setEnabled);
|
||||
|
||||
// Date Time Edit Box
|
||||
m_emu_settings->EnhanceDateTimeEdit(ui->console_time_edit, emu_settings_type::ConsoleTimeOffset, tr("dd MMM yyyy HH:mm"), true, true, 15000);
|
||||
@ -1580,7 +1580,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||
|
||||
ui->mfcDelayCommand->setChecked(m_emu_settings->GetSetting(emu_settings_type::MFCCommandsShuffling) == "1");
|
||||
SubscribeTooltip(ui->mfcDelayCommand, tooltips.settings.mfc_delay_command);
|
||||
connect(ui->mfcDelayCommand, &QCheckBox::stateChanged, [&](int val)
|
||||
connect(ui->mfcDelayCommand, &QCheckBox::checkStateChanged, [&](Qt::CheckState val)
|
||||
{
|
||||
const std::string str = val != Qt::Unchecked ? "1" : "0";
|
||||
m_emu_settings->SetSetting(emu_settings_type::MFCCommandsShuffling, str);
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <QWheelEvent>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
#include <QTimeZone>
|
||||
|
||||
LOG_CHANNEL(gui_log, "GUI");
|
||||
|
||||
@ -1342,7 +1343,7 @@ QDateTime trophy_manager_dialog::TickToDateTime(u64 tick)
|
||||
const QDateTime datetime(
|
||||
QDate(rtc_date.year, rtc_date.month, rtc_date.day),
|
||||
QTime(rtc_date.hour, rtc_date.minute, rtc_date.second, rtc_date.microsecond / 1000),
|
||||
Qt::TimeSpec::UTC);
|
||||
QTimeZone::UTC);
|
||||
return datetime.toLocalTime();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user