mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Source: Remove redundant lambda parameter lists
This commit is contained in:
@ -33,7 +33,7 @@ void ConfigInteger::OnConfigChanged()
|
||||
ConfigIntegerLabel::ConfigIntegerLabel(const QString& text, ConfigInteger* widget)
|
||||
: QLabel(text), m_widget(QPointer<ConfigInteger>(widget))
|
||||
{
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this]() {
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
|
||||
// Label shares font changes with ConfigInteger to mark game ini settings.
|
||||
if (m_widget)
|
||||
setFont(m_widget->font());
|
||||
|
@ -113,7 +113,7 @@ void ConfigSliderU32::OnConfigChanged()
|
||||
ConfigSliderLabel::ConfigSliderLabel(const QString& text, ConfigSlider* slider)
|
||||
: QLabel(text), m_slider(QPointer<ConfigSlider>(slider))
|
||||
{
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this]() {
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
|
||||
// Label shares font changes with slider to mark game ini settings.
|
||||
if (m_slider)
|
||||
setFont(m_slider->font());
|
||||
|
@ -88,7 +88,7 @@ GameConfigWidget::GameConfigWidget(const UICommon::GameFile& game) : m_game(game
|
||||
}
|
||||
|
||||
// Fails to change font if it's directly called at this time. Is there a better workaround?
|
||||
QTimer::singleShot(100, this, [this]() {
|
||||
QTimer::singleShot(100, this, [this] {
|
||||
SetItalics();
|
||||
Config::OnConfigChanged();
|
||||
});
|
||||
|
@ -41,10 +41,10 @@ EnhancementsWidget::EnhancementsWidget(GraphicsWindow* parent)
|
||||
|
||||
// BackendChanged is called by parent on window creation.
|
||||
connect(parent, &GraphicsWindow::BackendChanged, this, &EnhancementsWidget::OnBackendChanged);
|
||||
connect(parent, &GraphicsWindow::UseFastTextureSamplingChanged, this, [this]() {
|
||||
connect(parent, &GraphicsWindow::UseFastTextureSamplingChanged, this, [this] {
|
||||
m_texture_filtering_combo->setEnabled(ReadSetting(Config::GFX_HACK_FAST_TEXTURE_SAMPLING));
|
||||
});
|
||||
connect(parent, &GraphicsWindow::UseGPUTextureDecodingChanged, this, [this]() {
|
||||
connect(parent, &GraphicsWindow::UseGPUTextureDecodingChanged, this, [this] {
|
||||
m_arbitrary_mipmap_detection->setEnabled(!ReadSetting(Config::GFX_ENABLE_GPU_TEXTURE_DECODING));
|
||||
});
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ QTextCharFormat GetCommentCharFormat()
|
||||
ControlExpressionSyntaxHighlighter::ControlExpressionSyntaxHighlighter(QTextDocument* parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
connect(parent, &QTextDocument::contentsChanged, this, [this, parent]() { Highlight(parent); });
|
||||
connect(parent, &QTextDocument::contentsChanged, this, [this, parent] { Highlight(parent); });
|
||||
}
|
||||
|
||||
void QComboBoxWithMouseWheelDisabled::wheelEvent(QWheelEvent* event)
|
||||
|
@ -990,15 +990,15 @@ void CalibrationWidget::SetupActions()
|
||||
const auto center_action = new QAction(tr("Center and Calibrate"), this);
|
||||
const auto reset_action = new QAction(tr("Reset"), this);
|
||||
|
||||
connect(calibrate_action, &QAction::triggered, [this]() {
|
||||
connect(calibrate_action, &QAction::triggered, [this] {
|
||||
StartCalibration();
|
||||
m_new_center = Common::DVec2{};
|
||||
});
|
||||
connect(center_action, &QAction::triggered, [this]() {
|
||||
connect(center_action, &QAction::triggered, [this] {
|
||||
StartCalibration();
|
||||
m_new_center = std::nullopt;
|
||||
});
|
||||
connect(reset_action, &QAction::triggered, [this]() {
|
||||
connect(reset_action, &QAction::triggered, [this] {
|
||||
m_input.SetCalibrationToDefault();
|
||||
m_input.SetCenter({0, 0});
|
||||
});
|
||||
@ -1012,7 +1012,7 @@ void CalibrationWidget::SetupActions()
|
||||
setDefaultAction(calibrate_action);
|
||||
|
||||
m_completion_action = new QAction(tr("Finish Calibration"), this);
|
||||
connect(m_completion_action, &QAction::triggered, [this]() {
|
||||
connect(m_completion_action, &QAction::triggered, [this] {
|
||||
m_input.SetCenter(GetCenter());
|
||||
m_input.SetCalibrationData(std::move(m_calibration_data));
|
||||
m_informative_timer->stop();
|
||||
@ -1027,7 +1027,7 @@ void CalibrationWidget::StartCalibration()
|
||||
|
||||
// Cancel calibration.
|
||||
const auto cancel_action = new QAction(tr("Cancel Calibration"), this);
|
||||
connect(cancel_action, &QAction::triggered, [this]() {
|
||||
connect(cancel_action, &QAction::triggered, [this] {
|
||||
m_calibration_data.clear();
|
||||
m_informative_timer->stop();
|
||||
SetupActions();
|
||||
|
@ -343,7 +343,7 @@ void MappingWidget::CreateControl(const ControllerEmu::Control* control, QFormLa
|
||||
if (m_previous_mapping_button)
|
||||
{
|
||||
connect(m_previous_mapping_button, &MappingButton::QueueNextButtonMapping,
|
||||
[this, button]() { m_parent->QueueInputDetection(button); });
|
||||
[this, button] { m_parent->QueueInputDetection(button); });
|
||||
}
|
||||
m_previous_mapping_button = button;
|
||||
}
|
||||
@ -383,7 +383,7 @@ MappingWidget::CreateSettingAdvancedMappingButton(ControllerEmu::NumericSettingB
|
||||
const auto button = new QPushButton(tr("..."));
|
||||
button->setFixedWidth(QFontMetrics(font()).boundingRect(button->text()).width() * 2);
|
||||
|
||||
button->connect(button, &QPushButton::clicked, [this, &setting]() {
|
||||
button->connect(button, &QPushButton::clicked, [this, &setting] {
|
||||
if (setting.IsSimpleValue())
|
||||
setting.SetExpressionFromValue();
|
||||
|
||||
|
@ -127,7 +127,7 @@ BreakpointWidget::BreakpointWidget(QWidget* parent)
|
||||
setHidden(!enabled || !Settings::Instance().IsBreakpointsVisible());
|
||||
});
|
||||
|
||||
connect(&Settings::Instance(), &Settings::ThemeChanged, this, [this]() {
|
||||
connect(&Settings::Instance(), &Settings::ThemeChanged, this, [this] {
|
||||
UpdateIcons();
|
||||
Update();
|
||||
});
|
||||
@ -525,7 +525,7 @@ void BreakpointWidget::OnContextMenu(const QPoint& pos)
|
||||
|
||||
menu->addAction(tr("Show in Code"), [this, bp_address] { emit ShowCode(bp_address); });
|
||||
menu->addAction(tr("Edit..."), [this, bp_address] { OnEditBreakpoint(bp_address, true); });
|
||||
menu->addAction(tr("Delete"), [this, &bp_address]() {
|
||||
menu->addAction(tr("Delete"), [this, &bp_address] {
|
||||
m_system.GetPowerPC().GetBreakPoints().Remove(bp_address);
|
||||
emit Host::GetInstance()->PPCBreakpointsChanged();
|
||||
});
|
||||
@ -538,7 +538,7 @@ void BreakpointWidget::OnContextMenu(const QPoint& pos)
|
||||
|
||||
menu->addAction(tr("Show in Memory"), [this, bp_address] { emit ShowMemory(bp_address); });
|
||||
menu->addAction(tr("Edit..."), [this, bp_address] { OnEditBreakpoint(bp_address, false); });
|
||||
menu->addAction(tr("Delete"), [this, &bp_address]() {
|
||||
menu->addAction(tr("Delete"), [this, &bp_address] {
|
||||
const QSignalBlocker blocker(Settings::Instance());
|
||||
m_system.GetPowerPC().GetMemChecks().Remove(bp_address);
|
||||
emit Host::GetInstance()->PPCBreakpointsChanged();
|
||||
|
@ -186,11 +186,11 @@ void CodeWidget::ConnectWidgets()
|
||||
connect(m_search_address, &QLineEdit::textChanged, this, &CodeWidget::OnSearchAddress);
|
||||
connect(m_search_address, &QLineEdit::returnPressed, this, &CodeWidget::OnSearchAddress);
|
||||
connect(m_search_symbols, &QLineEdit::textChanged, this, &CodeWidget::OnSearchSymbols);
|
||||
connect(m_search_calls, &QLineEdit::textChanged, this, [this]() {
|
||||
connect(m_search_calls, &QLineEdit::textChanged, this, [this] {
|
||||
if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress()))
|
||||
UpdateFunctionCalls(symbol);
|
||||
});
|
||||
connect(m_search_callers, &QLineEdit::textChanged, this, [this]() {
|
||||
connect(m_search_callers, &QLineEdit::textChanged, this, [this] {
|
||||
if (const Common::Symbol* symbol = m_ppc_symbol_db.GetSymbolFromAddr(m_code_view->GetAddress()))
|
||||
UpdateFunctionCallers(symbol);
|
||||
});
|
||||
|
@ -56,7 +56,7 @@ void JitBlockTableModel::PrefetchSymbols()
|
||||
{
|
||||
for (const JitBlock& block : m_jit_blocks)
|
||||
{
|
||||
m_symbol_list.emplace_back([this, &block]() {
|
||||
m_symbol_list.emplace_back([this, &block] {
|
||||
return GetSymbolNameQVariant(m_ppc_symbol_db.GetSymbolFromAddr(block.effectiveAddress));
|
||||
});
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ void RegisterWidget::ShowContextMenu()
|
||||
const std::string type_string =
|
||||
fmt::format("{}{}", type == RegisterType::gpr ? "r" : "f", m_table->currentItem()->row());
|
||||
menu->addAction(tr("Run until hit (ignoring breakpoints)"),
|
||||
[this, type_string]() { AutoStep(type_string); });
|
||||
[this, type_string] { AutoStep(type_string); });
|
||||
}
|
||||
|
||||
for (auto* action : {view_hex, view_int, view_uint, view_float, view_double})
|
||||
|
@ -37,7 +37,7 @@ static void RestartCore(const std::weak_ptr<HW::GBA::Core>& core, std::string_vi
|
||||
{
|
||||
Core::RunOnCPUThread(
|
||||
Core::System::GetInstance(),
|
||||
[core, rom_path = std::string(rom_path)]() {
|
||||
[core, rom_path = std::string(rom_path)] {
|
||||
if (auto core_ptr = core.lock())
|
||||
{
|
||||
auto& info = Config::MAIN_GBA_ROM_PATHS[core_ptr->GetCoreInfo().device_number];
|
||||
@ -58,7 +58,7 @@ static void QueueEReaderCard(const std::weak_ptr<HW::GBA::Core>& core, std::stri
|
||||
{
|
||||
Core::RunOnCPUThread(
|
||||
Core::System::GetInstance(),
|
||||
[core, card_path = std::string(card_path)]() {
|
||||
[core, card_path = std::string(card_path)] {
|
||||
if (auto core_ptr = core.lock())
|
||||
core_ptr->EReaderQueueCard(card_path);
|
||||
},
|
||||
@ -161,7 +161,7 @@ void GBAWidget::ToggleDisconnect()
|
||||
|
||||
Core::RunOnCPUThread(
|
||||
Core::System::GetInstance(),
|
||||
[core = m_core, force_disconnect = m_force_disconnect]() {
|
||||
[core = m_core, force_disconnect = m_force_disconnect] {
|
||||
if (auto core_ptr = core.lock())
|
||||
core_ptr->SetForceDisconnect(force_disconnect);
|
||||
},
|
||||
@ -224,7 +224,7 @@ void GBAWidget::DoState(bool export_state)
|
||||
|
||||
Core::RunOnCPUThread(
|
||||
Core::System::GetInstance(),
|
||||
[export_state, core = m_core, state_path = state_path.toStdString()]() {
|
||||
[export_state, core = m_core, state_path = state_path.toStdString()] {
|
||||
if (auto core_ptr = core.lock())
|
||||
{
|
||||
if (export_state)
|
||||
@ -255,7 +255,7 @@ void GBAWidget::ImportExportSave(bool export_save)
|
||||
|
||||
Core::RunOnCPUThread(
|
||||
Core::System::GetInstance(),
|
||||
[export_save, core = m_core, save_path = save_path.toStdString()]() {
|
||||
[export_save, core = m_core, save_path = save_path.toStdString()] {
|
||||
if (auto core_ptr = core.lock())
|
||||
{
|
||||
if (export_save)
|
||||
|
@ -580,7 +580,7 @@ void GameList::OpenProperties()
|
||||
connect(properties, &PropertiesDialog::OpenGraphicsSettings, this,
|
||||
&GameList::OpenGraphicsSettings);
|
||||
connect(properties, &PropertiesDialog::finished, this,
|
||||
[properties]() { properties->deleteLater(); });
|
||||
[properties] { properties->deleteLater(); });
|
||||
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
connect(properties, &PropertiesDialog::OpenAchievementSettings, this,
|
||||
|
@ -345,7 +345,7 @@ void HotkeyScheduler::Run()
|
||||
else if (IsHotkey(HK_NEXT_GAME_WIIMOTE_PROFILE_4))
|
||||
m_profile_cycler.NextWiimoteProfileForGame(3);
|
||||
|
||||
auto ShowVolume = []() {
|
||||
auto ShowVolume = [] {
|
||||
OSD::AddMessage(std::string("Volume: ") +
|
||||
(Config::Get(Config::MAIN_AUDIO_MUTED) ?
|
||||
"Muted" :
|
||||
@ -450,7 +450,7 @@ void HotkeyScheduler::Run()
|
||||
OSD::AddMessage(fmt::format("Copy EFB: {}", new_value ? "to Texture" : "to RAM"));
|
||||
}
|
||||
|
||||
auto ShowXFBCopies = []() {
|
||||
auto ShowXFBCopies = [] {
|
||||
OSD::AddMessage(fmt::format(
|
||||
"Copy XFB: {}{}", Config::Get(Config::GFX_HACK_IMMEDIATE_XFB) ? " (Immediate)" : "",
|
||||
Config::Get(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM) ? "to Texture" : "to RAM"));
|
||||
@ -504,7 +504,7 @@ void HotkeyScheduler::Run()
|
||||
AudioCommon::UpdateSoundStream(system);
|
||||
}
|
||||
|
||||
auto ShowEmulationSpeed = []() {
|
||||
auto ShowEmulationSpeed = [] {
|
||||
const float emulation_speed = Config::Get(Config::MAIN_EMULATION_SPEED);
|
||||
if (!AchievementManager::GetInstance().IsHardcoreModeActive() ||
|
||||
Config::Get(Config::MAIN_EMULATION_SPEED) >= 1.0f ||
|
||||
|
@ -266,7 +266,7 @@ CreateFigureDialog::CreateFigureDialog(QWidget* parent, FigureUIPosition slot) :
|
||||
}
|
||||
});
|
||||
|
||||
connect(buttons, &QDialogButtonBox::accepted, this, [=, this]() {
|
||||
connect(buttons, &QDialogButtonBox::accepted, this, [=, this] {
|
||||
bool ok_char = false;
|
||||
const u32 char_number = edit_num->text().toULong(&ok_char);
|
||||
if (!ok_char)
|
||||
|
@ -277,7 +277,7 @@ MainWindow::MainWindow(Core::System& system, std::unique_ptr<BootParameters> boo
|
||||
Settings::Instance().SetDebugModeEnabled(false);
|
||||
// This needs to trigger on both RA_HARDCORE_ENABLED and RA_ENABLED
|
||||
m_config_changed_callback_id = Config::AddConfigChangedCallback(
|
||||
[this]() { QueueOnObject(this, [this] { this->OnHardcoreChanged(); }); });
|
||||
[this] { QueueOnObject(this, [this] { this->OnHardcoreChanged(); }); });
|
||||
// If hardcore is enabled when the emulator starts, make sure it turns off what it needs to
|
||||
if (Config::Get(Config::RA_HARDCORE_ENABLED))
|
||||
OnHardcoreChanged();
|
||||
@ -540,7 +540,7 @@ void MainWindow::ConnectMenuBar()
|
||||
|
||||
// Emulation
|
||||
connect(m_menu_bar, &MenuBar::Pause, this, &MainWindow::Pause);
|
||||
connect(m_menu_bar, &MenuBar::Play, this, [this]() { Play(); });
|
||||
connect(m_menu_bar, &MenuBar::Play, this, [this] { Play(); });
|
||||
connect(m_menu_bar, &MenuBar::Stop, this, &MainWindow::RequestStop);
|
||||
connect(m_menu_bar, &MenuBar::Reset, this, &MainWindow::Reset);
|
||||
connect(m_menu_bar, &MenuBar::Fullscreen, this, &MainWindow::FullScreen);
|
||||
@ -697,7 +697,7 @@ void MainWindow::ConnectToolBar()
|
||||
connect(m_tool_bar, &ToolBar::OpenPressed, this, &MainWindow::Open);
|
||||
connect(m_tool_bar, &ToolBar::RefreshPressed, this, &MainWindow::RefreshGameList);
|
||||
|
||||
connect(m_tool_bar, &ToolBar::PlayPressed, this, [this]() { Play(); });
|
||||
connect(m_tool_bar, &ToolBar::PlayPressed, this, [this] { Play(); });
|
||||
connect(m_tool_bar, &ToolBar::PausePressed, this, &MainWindow::Pause);
|
||||
connect(m_tool_bar, &ToolBar::StopPressed, this, &MainWindow::RequestStop);
|
||||
connect(m_tool_bar, &ToolBar::FullScreenPressed, this, &MainWindow::FullScreen);
|
||||
@ -716,7 +716,7 @@ void MainWindow::ConnectToolBar()
|
||||
|
||||
void MainWindow::ConnectGameList()
|
||||
{
|
||||
connect(m_game_list, &GameList::GameSelected, this, [this]() { Play(); });
|
||||
connect(m_game_list, &GameList::GameSelected, this, [this] { Play(); });
|
||||
connect(m_game_list, &GameList::NetPlayHost, this, &MainWindow::NetPlayHost);
|
||||
connect(m_game_list, &GameList::OnStartWithRiivolution, this,
|
||||
&MainWindow::ShowRiivolutionBootWidget);
|
||||
|
@ -296,7 +296,7 @@ void MenuBar::AddToolsMenu()
|
||||
#ifdef RC_CLIENT_SUPPORTS_RAINTEGRATION
|
||||
m_achievements_dev_menu = tools_menu->addMenu(tr("RetroAchievements Development"));
|
||||
AchievementManager::GetInstance().SetDevMenuUpdateCallback(
|
||||
[this]() { QueueOnObject(this, [this] { this->UpdateAchievementDevelopmentMenu(); }); });
|
||||
[this] { QueueOnObject(this, [this] { this->UpdateAchievementDevelopmentMenu(); }); });
|
||||
m_achievements_dev_menu->menuAction()->setVisible(false);
|
||||
#endif // RC_CLIENT_SUPPORTS_RAINTEGRATION
|
||||
tools_menu->addSeparator();
|
||||
@ -406,7 +406,7 @@ void MenuBar::AddStateLoadMenu(QMenu* emu_menu)
|
||||
{
|
||||
QAction* action = m_state_load_slots_menu->addAction(QString{});
|
||||
|
||||
connect(action, &QAction::triggered, this, [=, this]() { emit StateLoadSlotAt(i); });
|
||||
connect(action, &QAction::triggered, this, [=, this] { emit StateLoadSlotAt(i); });
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ void MenuBar::AddStateSaveMenu(QMenu* emu_menu)
|
||||
{
|
||||
QAction* action = m_state_save_slots_menu->addAction(QString{});
|
||||
|
||||
connect(action, &QAction::triggered, this, [=, this]() { emit StateSaveSlotAt(i); });
|
||||
connect(action, &QAction::triggered, this, [=, this] { emit StateSaveSlotAt(i); });
|
||||
}
|
||||
}
|
||||
|
||||
@ -440,7 +440,7 @@ void MenuBar::AddStateSlotMenu(QMenu* emu_menu)
|
||||
if (Settings::Instance().GetStateSlot() == i)
|
||||
action->setChecked(true);
|
||||
|
||||
connect(action, &QAction::triggered, this, [=, this]() { emit SetStateSlot(i); });
|
||||
connect(action, &QAction::triggered, this, [=, this] { emit SetStateSlot(i); });
|
||||
connect(this, &MenuBar::SetStateSlot, [action, i](const int slot) {
|
||||
if (slot == i)
|
||||
action->setChecked(true);
|
||||
@ -629,7 +629,7 @@ void MenuBar::AddOptionsMenu()
|
||||
|
||||
m_reset_ignore_panic_handler = options_menu->addAction(tr("Reset Ignore Panic Handler"));
|
||||
|
||||
connect(m_reset_ignore_panic_handler, &QAction::triggered, this, []() {
|
||||
connect(m_reset_ignore_panic_handler, &QAction::triggered, this, [] {
|
||||
Config::DeleteKey(Config::LayerType::CurrentRun, Config::MAIN_USE_PANIC_HANDLERS);
|
||||
});
|
||||
|
||||
@ -652,17 +652,17 @@ void MenuBar::AddHelpMenu()
|
||||
|
||||
QAction* website = help_menu->addAction(tr("&Website"));
|
||||
connect(website, &QAction::triggered, this,
|
||||
[]() { QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/"))); });
|
||||
[] { QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/"))); });
|
||||
QAction* documentation = help_menu->addAction(tr("Online &Documentation"));
|
||||
connect(documentation, &QAction::triggered, this, []() {
|
||||
connect(documentation, &QAction::triggered, this, [] {
|
||||
QDesktopServices::openUrl(QUrl(QStringLiteral("https://dolphin-emu.org/docs/guides")));
|
||||
});
|
||||
QAction* github = help_menu->addAction(tr("&GitHub Repository"));
|
||||
connect(github, &QAction::triggered, this, []() {
|
||||
connect(github, &QAction::triggered, this, [] {
|
||||
QDesktopServices::openUrl(QUrl(QStringLiteral("https://github.com/dolphin-emu/dolphin")));
|
||||
});
|
||||
QAction* bugtracker = help_menu->addAction(tr("&Bug Tracker"));
|
||||
connect(bugtracker, &QAction::triggered, this, []() {
|
||||
connect(bugtracker, &QAction::triggered, this, [] {
|
||||
QDesktopServices::openUrl(
|
||||
QUrl(QStringLiteral("https://bugs.dolphin-emu.org/projects/emulator")));
|
||||
});
|
||||
@ -1163,7 +1163,7 @@ void MenuBar::UpdateAchievementDevelopmentMenu()
|
||||
}
|
||||
auto* ra_dev_menu_item = m_achievements_dev_menu->addAction(
|
||||
QString::fromStdString(menu_item.label), this,
|
||||
[menu_item]() { AchievementManager::GetInstance().ActivateDevMenuItem(menu_item.id); });
|
||||
[menu_item] { AchievementManager::GetInstance().ActivateDevMenuItem(menu_item.id); });
|
||||
ra_dev_menu_item->setEnabled(menu_item.enabled);
|
||||
// Recommended hardcode by RAIntegration.dll developer Jamiras
|
||||
ra_dev_menu_item->setCheckable(i < 2);
|
||||
|
@ -570,7 +570,7 @@ void NetPlayDialog::UpdateDiscordPresence()
|
||||
if (m_player_count == 0 || m_current_game_name.empty())
|
||||
return;
|
||||
|
||||
const auto use_default = [this]() {
|
||||
const auto use_default = [this] {
|
||||
Discord::UpdateDiscordPresence(m_player_count, Discord::SecretType::Empty, "",
|
||||
m_current_game_name);
|
||||
};
|
||||
|
@ -186,7 +186,7 @@ void RiivolutionBootWidget::MakeGUIForParsedFile(std::string path, std::string r
|
||||
xml_root_layout->addWidget(xml_root_line_edit, 0);
|
||||
xml_root_layout->addWidget(xml_root_open, 0);
|
||||
disc_layout->addLayout(xml_root_layout);
|
||||
connect(xml_root_open, &QPushButton::clicked, this, [this, xml_root_line_edit, disc_index]() {
|
||||
connect(xml_root_open, &QPushButton::clicked, this, [this, xml_root_line_edit, disc_index] {
|
||||
QString dir = QDir::toNativeSeparators(QFileDialog::getExistingDirectory(
|
||||
this, tr("Select the Virtual SD Card Root"), xml_root_line_edit->text()));
|
||||
if (!dir.isEmpty())
|
||||
|
@ -114,7 +114,7 @@ void GeneralPane::ConnectLayout()
|
||||
}
|
||||
|
||||
// Advanced
|
||||
connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this]() {
|
||||
connect(m_combobox_speedlimit, &QComboBox::currentIndexChanged, [this] {
|
||||
Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED,
|
||||
m_combobox_speedlimit->currentIndex() * 0.1f);
|
||||
Config::Save();
|
||||
|
@ -279,7 +279,7 @@ void WiiPane::CreateSDCard()
|
||||
progress_dialog.GetRaw()->setWindowTitle(tr("Progress"));
|
||||
auto success = std::async(std::launch::async, [&] {
|
||||
const bool good = Common::SyncSDFolderToSDImage(
|
||||
[&progress_dialog]() { return progress_dialog.WasCanceled(); }, false);
|
||||
[&progress_dialog] { return progress_dialog.WasCanceled(); }, false);
|
||||
progress_dialog.Reset();
|
||||
return good;
|
||||
});
|
||||
@ -303,7 +303,7 @@ void WiiPane::CreateSDCard()
|
||||
progress_dialog.GetRaw()->setWindowTitle(tr("Progress"));
|
||||
auto success = std::async(std::launch::async, [&] {
|
||||
const bool good = Common::SyncSDImageToSDFolder(
|
||||
[&progress_dialog]() { return progress_dialog.WasCanceled(); });
|
||||
[&progress_dialog] { return progress_dialog.WasCanceled(); });
|
||||
progress_dialog.Reset();
|
||||
return good;
|
||||
});
|
||||
|
@ -210,7 +210,7 @@ void SkylanderModifyDialog::PopulateSkylanderOptions(QVBoxLayout* layout)
|
||||
layout->addLayout(hbox_last_reset);
|
||||
layout->addLayout(hbox_last_placed);
|
||||
|
||||
connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this]() {
|
||||
connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this] {
|
||||
if (!edit_money->hasAcceptableInput())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Incorrect money value!"),
|
||||
@ -323,7 +323,7 @@ bool SkylanderModifyDialog::PopulateTrophyOptions(QVBoxLayout* layout)
|
||||
layout->addLayout(hbox);
|
||||
}
|
||||
|
||||
connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this]() {
|
||||
connect(m_buttons, &QDialogButtonBox::accepted, this, [=, this] {
|
||||
m_figure_data.trophy_data.unlocked_villains = 0x0;
|
||||
for (size_t i = 0; i < MAX_VILLAINS; ++i)
|
||||
m_figure_data.trophy_data.unlocked_villains |=
|
||||
|
@ -115,7 +115,7 @@ void SkylanderPortalWindow::CreateMainWindow()
|
||||
auto* modify_btn = new QPushButton(tr("Modify Slot"));
|
||||
connect(create_btn, &QAbstractButton::clicked, this,
|
||||
&SkylanderPortalWindow::CreateSkylanderAdvanced);
|
||||
connect(clear_btn, &QAbstractButton::clicked, this, [this]() { ClearSlot(GetCurrentSlot()); });
|
||||
connect(clear_btn, &QAbstractButton::clicked, this, [this] { ClearSlot(GetCurrentSlot()); });
|
||||
connect(load_btn, &QAbstractButton::clicked, this, &SkylanderPortalWindow::LoadSelected);
|
||||
connect(load_file_btn, &QAbstractButton::clicked, this, &SkylanderPortalWindow::LoadFromFile);
|
||||
connect(modify_btn, &QAbstractButton::clicked, this, &SkylanderPortalWindow::ModifySkylander);
|
||||
@ -591,7 +591,7 @@ void SkylanderPortalWindow::CreateSkylanderAdvanced()
|
||||
|
||||
create_window->setLayout(layout);
|
||||
|
||||
connect(buttons, &QDialogButtonBox::accepted, this, [=, this]() {
|
||||
connect(buttons, &QDialogButtonBox::accepted, this, [=, this] {
|
||||
bool ok_id = false, ok_var = false;
|
||||
m_sky_id = edit_id->text().toUShort(&ok_id);
|
||||
if (!ok_id)
|
||||
|
Reference in New Issue
Block a user