DolphinQt2: use new connection syntax instead of old syntax
This commit is contained in:
parent
a365686956
commit
f0fd38698e
|
@ -133,7 +133,9 @@ void InfoWidget::CreateLanguageSelector()
|
|||
}
|
||||
if (m_language_selector->count() == 1)
|
||||
m_language_selector->setDisabled(true);
|
||||
connect(m_language_selector, SIGNAL(currentIndexChanged(int)), this, SLOT(ChangeLanguage()));
|
||||
connect(m_language_selector,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
&InfoWidget::ChangeLanguage);
|
||||
ChangeLanguage();
|
||||
}
|
||||
|
||||
|
|
|
@ -147,19 +147,19 @@ void GameList::ShowContextMenu(const QPoint&)
|
|||
|
||||
QMenu* menu = new QMenu(this);
|
||||
DiscIO::Platform platform = GameFile(game).GetPlatformID();
|
||||
menu->addAction(tr("Properties"), this, SLOT(OpenProperties()));
|
||||
menu->addAction(tr("Wiki"), this, SLOT(OpenWiki()));
|
||||
menu->addAction(tr("Properties"), this, &GameList::OpenProperties);
|
||||
menu->addAction(tr("Wiki"), this, &GameList::OpenWiki);
|
||||
menu->addSeparator();
|
||||
|
||||
if (platform == DiscIO::Platform::GAMECUBE_DISC || platform == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
menu->addAction(tr("Default ISO"), this, SLOT(SetDefaultISO()));
|
||||
menu->addAction(tr("Default ISO"), this, &GameList::SetDefaultISO);
|
||||
const auto blob_type = GameFile(game).GetBlobType();
|
||||
|
||||
if (blob_type == DiscIO::BlobType::GCZ)
|
||||
menu->addAction(tr("Decompress ISO"), this, SLOT(CompressISO()));
|
||||
menu->addAction(tr("Decompress ISO"), this, &GameList::CompressISO);
|
||||
else if (blob_type == DiscIO::BlobType::PLAIN)
|
||||
menu->addAction(tr("Compress ISO"), this, SLOT(CompressISO()));
|
||||
menu->addAction(tr("Compress ISO"), this, &GameList::CompressISO);
|
||||
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
@ -189,13 +189,13 @@ void GameList::ShowContextMenu(const QPoint&)
|
|||
|
||||
if (platform == DiscIO::Platform::WII_WAD || platform == DiscIO::Platform::WII_DISC)
|
||||
{
|
||||
menu->addAction(tr("Open Wii save folder"), this, SLOT(OpenSaveFolder()));
|
||||
menu->addAction(tr("Export Wii save (Experimental)"), this, SLOT(ExportWiiSave()));
|
||||
menu->addAction(tr("Open Wii save folder"), this, &GameList::OpenSaveFolder);
|
||||
menu->addAction(tr("Export Wii save (Experimental)"), this, &GameList::ExportWiiSave);
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
menu->addAction(tr("Open Containing Folder"), this, SLOT(OpenContainingFolder()));
|
||||
menu->addAction(tr("Remove File"), this, SLOT(DeleteFile()));
|
||||
menu->addAction(tr("Open Containing Folder"), this, &GameList::OpenContainingFolder);
|
||||
menu->addAction(tr("Remove File"), this, &GameList::DeleteFile);
|
||||
menu->exec(QCursor::pos());
|
||||
}
|
||||
|
||||
|
|
|
@ -77,14 +77,14 @@ void MenuBar::EmulationStopped()
|
|||
void MenuBar::AddFileMenu()
|
||||
{
|
||||
QMenu* file_menu = addMenu(tr("File"));
|
||||
m_open_action = file_menu->addAction(tr("Open"), this, SIGNAL(Open()));
|
||||
m_exit_action = file_menu->addAction(tr("Exit"), this, SIGNAL(Exit()));
|
||||
m_open_action = file_menu->addAction(tr("Open"), this, &MenuBar::Open);
|
||||
m_exit_action = file_menu->addAction(tr("Exit"), this, &MenuBar::Exit);
|
||||
}
|
||||
|
||||
void MenuBar::AddToolsMenu()
|
||||
{
|
||||
QMenu* tools_menu = addMenu(tr("Tools"));
|
||||
m_wad_install_action = tools_menu->addAction(tr("Install WAD..."), this, SLOT(InstallWAD()));
|
||||
m_wad_install_action = tools_menu->addAction(tr("Install WAD..."), this, &MenuBar::InstallWAD);
|
||||
|
||||
// Label will be set by a NANDRefresh later
|
||||
m_boot_sysmenu = tools_menu->addAction(QStringLiteral(""), [this] { emit BootWiiSystemMenu(); });
|
||||
|
@ -107,13 +107,13 @@ void MenuBar::AddToolsMenu()
|
|||
void MenuBar::AddEmulationMenu()
|
||||
{
|
||||
QMenu* emu_menu = addMenu(tr("Emulation"));
|
||||
m_play_action = emu_menu->addAction(tr("Play"), this, SIGNAL(Play()));
|
||||
m_pause_action = emu_menu->addAction(tr("Pause"), this, SIGNAL(Pause()));
|
||||
m_stop_action = emu_menu->addAction(tr("Stop"), this, SIGNAL(Stop()));
|
||||
m_reset_action = emu_menu->addAction(tr("Reset"), this, SIGNAL(Reset()));
|
||||
m_fullscreen_action = emu_menu->addAction(tr("Fullscreen"), this, SIGNAL(Fullscreen()));
|
||||
m_frame_advance_action = emu_menu->addAction(tr("Frame Advance"), this, SIGNAL(FrameAdvance()));
|
||||
m_screenshot_action = emu_menu->addAction(tr("Take Screenshot"), this, SIGNAL(Screenshot()));
|
||||
m_play_action = emu_menu->addAction(tr("Play"), this, &MenuBar::Play);
|
||||
m_pause_action = emu_menu->addAction(tr("Pause"), this, &MenuBar::Pause);
|
||||
m_stop_action = emu_menu->addAction(tr("Stop"), this, &MenuBar::Stop);
|
||||
m_reset_action = emu_menu->addAction(tr("Reset"), this, &MenuBar::Reset);
|
||||
m_fullscreen_action = emu_menu->addAction(tr("Fullscreen"), this, &MenuBar::Fullscreen);
|
||||
m_frame_advance_action = emu_menu->addAction(tr("Frame Advance"), this, &MenuBar::FrameAdvance);
|
||||
m_screenshot_action = emu_menu->addAction(tr("Take Screenshot"), this, &MenuBar::Screenshot);
|
||||
AddStateLoadMenu(emu_menu);
|
||||
AddStateSaveMenu(emu_menu);
|
||||
AddStateSlotMenu(emu_menu);
|
||||
|
@ -123,10 +123,10 @@ void MenuBar::AddEmulationMenu()
|
|||
void MenuBar::AddStateLoadMenu(QMenu* emu_menu)
|
||||
{
|
||||
m_state_load_menu = emu_menu->addMenu(tr("Load State"));
|
||||
m_state_load_menu->addAction(tr("Load State from File"), this, SIGNAL(StateLoad()));
|
||||
m_state_load_menu->addAction(tr("Load State from Selected Slot"), this, SIGNAL(StateLoadSlot()));
|
||||
m_state_load_menu->addAction(tr("Load State from File"), this, &MenuBar::StateLoad);
|
||||
m_state_load_menu->addAction(tr("Load State from Selected Slot"), this, &MenuBar::StateLoadSlot);
|
||||
m_state_load_slots_menu = m_state_load_menu->addMenu(tr("Load State from Slot"));
|
||||
m_state_load_menu->addAction(tr("Undo Load State"), this, SIGNAL(StateLoadUndo()));
|
||||
m_state_load_menu->addAction(tr("Undo Load State"), this, &MenuBar::StateLoadUndo);
|
||||
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
|
@ -139,11 +139,11 @@ void MenuBar::AddStateLoadMenu(QMenu* emu_menu)
|
|||
void MenuBar::AddStateSaveMenu(QMenu* emu_menu)
|
||||
{
|
||||
m_state_save_menu = emu_menu->addMenu(tr("Save State"));
|
||||
m_state_save_menu->addAction(tr("Save State to File"), this, SIGNAL(StateSave()));
|
||||
m_state_save_menu->addAction(tr("Save State to Selected Slot"), this, SIGNAL(StateSaveSlot()));
|
||||
m_state_save_menu->addAction(tr("Save State to Oldest Slot"), this, SIGNAL(StateSaveOldest()));
|
||||
m_state_save_menu->addAction(tr("Save State to File"), this, &MenuBar::StateSave);
|
||||
m_state_save_menu->addAction(tr("Save State to Selected Slot"), this, &MenuBar::StateSaveSlot);
|
||||
m_state_save_menu->addAction(tr("Save State to Oldest Slot"), this, &MenuBar::StateSaveOldest);
|
||||
m_state_save_slots_menu = m_state_save_menu->addMenu(tr("Save State to Slot"));
|
||||
m_state_save_menu->addAction(tr("Undo Save State"), this, SIGNAL(StateSaveUndo()));
|
||||
m_state_save_menu->addAction(tr("Undo Save State"), this, &MenuBar::StateSaveUndo);
|
||||
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
|
@ -220,8 +220,7 @@ void MenuBar::AddHelpMenu()
|
|||
});
|
||||
|
||||
help_menu->addSeparator();
|
||||
|
||||
help_menu->addAction(tr("About"), this, SIGNAL(ShowAboutDialog()));
|
||||
help_menu->addAction(tr("About"), this, &MenuBar::ShowAboutDialog);
|
||||
}
|
||||
|
||||
void MenuBar::AddGameListTypeSection(QMenu* view_menu)
|
||||
|
|
|
@ -60,33 +60,33 @@ void ToolBar::EmulationStopped()
|
|||
void ToolBar::MakeActions()
|
||||
{
|
||||
constexpr int button_width = 65;
|
||||
m_open_action = addAction(tr("Open"), this, SIGNAL(OpenPressed()));
|
||||
m_open_action = addAction(tr("Open"), this, &ToolBar::OpenPressed);
|
||||
widgetForAction(m_open_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_play_action = addAction(tr("Play"), this, SIGNAL(PlayPressed()));
|
||||
m_play_action = addAction(tr("Play"), this, &ToolBar::PlayPressed);
|
||||
widgetForAction(m_play_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_pause_action = addAction(tr("Pause"), this, SIGNAL(PausePressed()));
|
||||
m_pause_action = addAction(tr("Pause"), this, &ToolBar::PausePressed);
|
||||
widgetForAction(m_pause_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_stop_action = addAction(tr("Stop"), this, SIGNAL(StopPressed()));
|
||||
m_stop_action = addAction(tr("Stop"), this, &ToolBar::StopPressed);
|
||||
widgetForAction(m_stop_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_fullscreen_action = addAction(tr("Full Screen"), this, SIGNAL(FullScreenPressed()));
|
||||
m_fullscreen_action = addAction(tr("Full Screen"), this, &ToolBar::FullScreenPressed);
|
||||
widgetForAction(m_fullscreen_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_screenshot_action = addAction(tr("Screen Shot"), this, SIGNAL(ScreenShotPressed()));
|
||||
m_screenshot_action = addAction(tr("Screen Shot"), this, &ToolBar::ScreenShotPressed);
|
||||
widgetForAction(m_screenshot_action)->setMinimumWidth(button_width);
|
||||
|
||||
addSeparator();
|
||||
|
||||
m_config_action = addAction(tr("Settings"), this, SIGNAL(SettingsPressed()));
|
||||
m_config_action = addAction(tr("Settings"), this, &ToolBar::SettingsPressed);
|
||||
widgetForAction(m_config_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_graphics_action = addAction(tr("Graphics"), this, SIGNAL(GraphicsPressed()));
|
||||
m_graphics_action = addAction(tr("Graphics"), this, &ToolBar::GraphicsPressed);
|
||||
widgetForAction(m_graphics_action)->setMinimumWidth(button_width);
|
||||
|
||||
m_controllers_action = addAction(tr("Controllers"), this, SIGNAL(ControllersPressed()));
|
||||
m_controllers_action = addAction(tr("Controllers"), this, &ToolBar::ControllersPressed);
|
||||
widgetForAction(m_controllers_action)->setMinimumWidth(button_width);
|
||||
m_controllers_action->setEnabled(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue