mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
qt: Remove emit
This commit is contained in:
parent
d86858da64
commit
dd553331df
6 changed files with 22 additions and 22 deletions
|
@ -95,7 +95,7 @@ void rpcs3_app::InitializeCallbacks()
|
|||
};
|
||||
callbacks.call_after = [=](std::function<void()> func)
|
||||
{
|
||||
emit RequestCallAfter(std::move(func));
|
||||
RequestCallAfter(std::move(func));
|
||||
};
|
||||
|
||||
callbacks.process_events = [this]()
|
||||
|
@ -200,11 +200,11 @@ void rpcs3_app::InitializeCallbacks()
|
|||
return std::make_unique<save_data_dialog>();
|
||||
};
|
||||
|
||||
callbacks.on_run = [=]() { emit OnEmulatorRun(); };
|
||||
callbacks.on_pause = [=]() {emit OnEmulatorPause(); };
|
||||
callbacks.on_resume = [=]() {emit OnEmulatorResume(); };
|
||||
callbacks.on_stop = [=]() {emit OnEmulatorStop(); };
|
||||
callbacks.on_ready = [=]() {emit OnEmulatorReady(); };
|
||||
callbacks.on_run = [=]() { OnEmulatorRun(); };
|
||||
callbacks.on_pause = [=]() { OnEmulatorPause(); };
|
||||
callbacks.on_resume = [=]() { OnEmulatorResume(); };
|
||||
callbacks.on_stop = [=]() { OnEmulatorStop(); };
|
||||
callbacks.on_ready = [=]() { OnEmulatorReady(); };
|
||||
|
||||
Emu.SetCallbacks(std::move(callbacks));
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), pa
|
|||
void debugger_frame::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
emit DebugFrameClosed();
|
||||
DebugFrameClosed();
|
||||
}
|
||||
|
||||
#include <map>
|
||||
|
|
|
@ -198,16 +198,16 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> settings, Render_
|
|||
connect(m_xgrid, &QTableWidget::doubleClicked, this, &game_list_frame::doubleClickedSlot);
|
||||
connect(m_xgrid, &QTableWidget::customContextMenuRequested, this, &game_list_frame::ShowContextMenu);
|
||||
|
||||
connect(m_Slider_Size, &QSlider::valueChanged, [=](int value) { emit RequestIconSizeActSet(value); });
|
||||
connect(m_Slider_Size, &QSlider::valueChanged, [=](int value) { RequestIconSizeActSet(value); });
|
||||
|
||||
connect(m_modeActs, &QActionGroup::triggered, [=](QAction* act) {
|
||||
emit RequestListModeActSet(act == m_modeActList.action);
|
||||
RequestListModeActSet(act == m_modeActList.action);
|
||||
m_modeActList.action->setIcon(m_isListLayout ? m_modeActList.colored : m_modeActList.gray);
|
||||
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
||||
});
|
||||
|
||||
connect(m_categoryActs, &QActionGroup::triggered, [=](QAction* act) {
|
||||
emit RequestCategoryActSet(m_categoryActs->actions().indexOf(act));
|
||||
RequestCategoryActSet(m_categoryActs->actions().indexOf(act));
|
||||
});
|
||||
|
||||
for (int col = 0; col < columnActs.count(); ++col)
|
||||
|
@ -504,7 +504,7 @@ void game_list_frame::doubleClickedSlot(const QModelIndex& index)
|
|||
if (category == category::hdd_Game || category == category::disc_Game || category == category::audio_Video)
|
||||
{
|
||||
const std::string& path = Emu.GetGameDir() + m_game_data[i].info.root;
|
||||
emit RequestIconPathSet(path);
|
||||
RequestIconPathSet(path);
|
||||
|
||||
Emu.Stop();
|
||||
|
||||
|
@ -515,7 +515,7 @@ void game_list_frame::doubleClickedSlot(const QModelIndex& index)
|
|||
else
|
||||
{
|
||||
LOG_SUCCESS(LOADER, "Boot from gamelist per doubleclick: done");
|
||||
emit RequestAddRecentGame(q_string_pair(qstr(path), qstr("[" + m_game_data[i].info.serial + "] " + m_game_data[i].info.name)));
|
||||
RequestAddRecentGame(q_string_pair(qstr(path), qstr("[" + m_game_data[i].info.serial + "] " + m_game_data[i].info.name)));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -632,7 +632,7 @@ void game_list_frame::ShowSpecifiedContextMenu(const QPoint &pos, int row)
|
|||
void game_list_frame::Boot(int row)
|
||||
{
|
||||
const std::string& path = Emu.GetGameDir() + m_game_data[row].info.root;
|
||||
emit RequestIconPathSet(path);
|
||||
RequestIconPathSet(path);
|
||||
|
||||
Emu.Stop();
|
||||
|
||||
|
@ -644,7 +644,7 @@ void game_list_frame::Boot(int row)
|
|||
else
|
||||
{
|
||||
LOG_SUCCESS(LOADER, "Boot from gamelist per Boot: done");
|
||||
emit RequestAddRecentGame(q_string_pair(qstr(path), qstr("[" + m_game_data[row].info.serial + "] " + m_game_data[row].info.name)));
|
||||
RequestAddRecentGame(q_string_pair(qstr(path), qstr("[" + m_game_data[row].info.serial + "] " + m_game_data[row].info.name)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -722,7 +722,7 @@ void game_list_frame::SetCategoryActIcon(const int& id, const bool& active)
|
|||
void game_list_frame::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
emit game_list_frameClosed();
|
||||
game_list_frameClosed();
|
||||
}
|
||||
|
||||
void game_list_frame::resizeEvent(QResizeEvent *event)
|
||||
|
|
|
@ -152,8 +152,8 @@ void gui_tab::OnResetDefault()
|
|||
{
|
||||
xgui_settings->Reset(true);
|
||||
xgui_settings->ChangeToConfig(tr("default"));
|
||||
emit GuiStylesheetRequest(tr("default"));
|
||||
emit GuiSettingsSyncRequest();
|
||||
GuiStylesheetRequest(tr("default"));
|
||||
GuiSettingsSyncRequest();
|
||||
AddConfigs();
|
||||
AddStylesheets();
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ void gui_tab::OnBackupCurrentConfig()
|
|||
QMessageBox::warning(this, tr("Error"), tr("Please choose a non-existing name"));
|
||||
continue;
|
||||
}
|
||||
emit GuiSettingsSaveRequest();
|
||||
GuiSettingsSaveRequest();
|
||||
xgui_settings->SaveCurrentConfig(friendlyName);
|
||||
combo_configs->addItem(friendlyName);
|
||||
combo_configs->setCurrentIndex(combo_configs->findText(friendlyName));
|
||||
|
@ -198,11 +198,11 @@ void gui_tab::OnApplyConfig()
|
|||
QString name = combo_configs->currentText();
|
||||
xgui_settings->SetValue(GUI::m_currentConfig, name);
|
||||
xgui_settings->ChangeToConfig(name);
|
||||
emit GuiSettingsSyncRequest();
|
||||
GuiSettingsSyncRequest();
|
||||
}
|
||||
|
||||
void gui_tab::OnApplyStylesheet()
|
||||
{
|
||||
xgui_settings->SetValue(GUI::m_currentStylesheet, combo_stylesheets->currentText());
|
||||
emit GuiStylesheetRequest(xgui_settings->GetCurrentStylesheetPath());
|
||||
GuiStylesheetRequest(xgui_settings->GetCurrentStylesheetPath());
|
||||
}
|
||||
|
|
|
@ -341,5 +341,5 @@ void log_frame::UpdateUI()
|
|||
void log_frame::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
emit log_frameClosed();
|
||||
log_frameClosed();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ main_window::main_window(QWidget *parent) : QMainWindow(parent), m_sys_menu_open
|
|||
QTimer::singleShot(1, [=]() {
|
||||
// Need to have this happen fast, but not now because connects aren't created yet.
|
||||
// So, a tricky balance in terms of time but this works.
|
||||
emit RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath());
|
||||
RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue