citra_qt: Migrate to Qt 5 signal/slot connection syntax where applicable

This is more type-safe than the string-based signal/slot syntax that was
being used. It also makes the connections throughout the UI code consistent.
This commit is contained in:
Lioncash 2017-12-17 16:24:19 -05:00
parent 4c3a4ab664
commit a73f135868
No known key found for this signature in database
GPG key ID: 419930C33C5AB6CC
13 changed files with 98 additions and 88 deletions

View file

@ -393,15 +393,18 @@ GraphicsVertexShaderWidget::GraphicsVertexShaderWidget(
cycle_index = new QSpinBox;
connect(dump_shader, SIGNAL(clicked()), this, SLOT(DumpShader()));
connect(dump_shader, &QPushButton::clicked, this, &GraphicsVertexShaderWidget::DumpShader);
connect(cycle_index, SIGNAL(valueChanged(int)), this, SLOT(OnCycleIndexChanged(int)));
connect(cycle_index, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
&GraphicsVertexShaderWidget::OnCycleIndexChanged);
for (unsigned i = 0; i < ARRAY_SIZE(input_data); ++i) {
connect(input_data[i], SIGNAL(textEdited(const QString&)), input_data_mapper, SLOT(map()));
connect(input_data[i], &QLineEdit::textEdited, input_data_mapper,
static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
input_data_mapper->setMapping(input_data[i], i);
}
connect(input_data_mapper, SIGNAL(mapped(int)), this, SLOT(OnInputAttributeChanged(int)));
connect(input_data_mapper, static_cast<void (QSignalMapper::*)(int)>(&QSignalMapper::mapped),
this, &GraphicsVertexShaderWidget::OnInputAttributeChanged);
auto main_widget = new QWidget;
auto main_layout = new QVBoxLayout;