mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Fixed behaviour of buttons in Welcome, Find, Settings, VFS and Debugger dialogs - now reacting to button click, not press
This commit is contained in:
parent
ab228d6407
commit
2016a33277
6 changed files with 17 additions and 17 deletions
|
@ -33,10 +33,10 @@ find_dialog::find_dialog(QTextEdit* edit, QWidget *parent, Qt::WindowFlags f) :
|
||||||
layout->addLayout(button_layout);
|
layout->addLayout(button_layout);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
connect(m_find_first, &QPushButton::pressed, this, &find_dialog::find_first);
|
connect(m_find_first, &QPushButton::clicked, this, &find_dialog::find_first);
|
||||||
connect(m_find_last, &QPushButton::pressed, this, &find_dialog::find_last);
|
connect(m_find_last, &QPushButton::clicked, this, &find_dialog::find_last);
|
||||||
connect(m_find_next, &QPushButton::pressed, this, &find_dialog::find_next);
|
connect(m_find_next, &QPushButton::clicked, this, &find_dialog::find_next);
|
||||||
connect(m_find_previous, &QPushButton::pressed, this, &find_dialog::find_previous);
|
connect(m_find_previous, &QPushButton::clicked, this, &find_dialog::find_previous);
|
||||||
|
|
||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, c
|
||||||
setModal(true);
|
setModal(true);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
connect(button_ok, &QAbstractButton::pressed, [=]()
|
connect(button_ok, &QAbstractButton::clicked, [=]()
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
ulong opcode = m_instr->text().toULong(&ok, 16);
|
ulong opcode = m_instr->text().toULong(&ok, 16);
|
||||||
|
@ -89,7 +89,7 @@ instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, c
|
||||||
|
|
||||||
accept();
|
accept();
|
||||||
});
|
});
|
||||||
connect(button_cancel, &QAbstractButton::pressed, this, &instruction_editor_dialog::reject);
|
connect(button_cancel, &QAbstractButton::clicked, this, &instruction_editor_dialog::reject);
|
||||||
connect(m_instr, &QLineEdit::textChanged, this, &instruction_editor_dialog::updatePreview);
|
connect(m_instr, &QLineEdit::textChanged, this, &instruction_editor_dialog::updatePreview);
|
||||||
|
|
||||||
updatePreview();
|
updatePreview();
|
||||||
|
|
|
@ -73,8 +73,8 @@ register_editor_dialog::register_editor_dialog(QWidget *parent, u32 _pc, const s
|
||||||
setModal(true);
|
setModal(true);
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
connect(button_ok, &QAbstractButton::pressed, this, [=](){OnOkay(_cpu); accept();});
|
connect(button_ok, &QAbstractButton::clicked, this, [=](){OnOkay(_cpu); accept();});
|
||||||
connect(button_cancel, &QAbstractButton::pressed, this, ®ister_editor_dialog::reject);
|
connect(button_cancel, &QAbstractButton::clicked, this, ®ister_editor_dialog::reject);
|
||||||
connect(m_register_combo, &QComboBox::currentTextChanged, this, ®ister_editor_dialog::updateRegister);
|
connect(m_register_combo, &QComboBox::currentTextChanged, this, ®ister_editor_dialog::updateRegister);
|
||||||
|
|
||||||
updateRegister(m_register_combo->currentText());
|
updateRegister(m_register_combo->currentText());
|
||||||
|
|
|
@ -249,7 +249,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
ppuBG->button(i)->setChecked(true);
|
ppuBG->button(i)->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(ppuBG->button(i), &QAbstractButton::pressed, [=]()
|
connect(ppuBG->button(i), &QAbstractButton::clicked, [=]()
|
||||||
{
|
{
|
||||||
xemu_settings->SetSetting(emu_settings::PPUDecoder, sstr(ppu_list[i]));
|
xemu_settings->SetSetting(emu_settings::PPUDecoder, sstr(ppu_list[i]));
|
||||||
});
|
});
|
||||||
|
@ -279,7 +279,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
spuBG->button(i)->setChecked(true);
|
spuBG->button(i)->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(spuBG->button(i), &QAbstractButton::pressed, [=]()
|
connect(spuBG->button(i), &QAbstractButton::clicked, [=]()
|
||||||
{
|
{
|
||||||
xemu_settings->SetSetting(emu_settings::SPUDecoder, sstr(spu_list[i]));
|
xemu_settings->SetSetting(emu_settings::SPUDecoder, sstr(spu_list[i]));
|
||||||
});
|
});
|
||||||
|
@ -329,7 +329,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
libModeBG->button(i)->setChecked(true);
|
libModeBG->button(i)->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(libModeBG->button(i), &QAbstractButton::pressed, [=]()
|
connect(libModeBG->button(i), &QAbstractButton::clicked, [=]()
|
||||||
{
|
{
|
||||||
xemu_settings->SetSetting(emu_settings::LibLoadOptions, sstr(libmode_list[i]));
|
xemu_settings->SetSetting(emu_settings::LibLoadOptions, sstr(libmode_list[i]));
|
||||||
});
|
});
|
||||||
|
@ -907,7 +907,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
||||||
enterButtonAssignmentBG->button(i)->setChecked(true);
|
enterButtonAssignmentBG->button(i)->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(enterButtonAssignmentBG->button(i), &QAbstractButton::pressed, [=]()
|
connect(enterButtonAssignmentBG->button(i), &QAbstractButton::clicked, [=]()
|
||||||
{
|
{
|
||||||
xemu_settings->SetSetting(emu_settings::EnterButtonAssignment, sstr(assignable_buttons[i]));
|
xemu_settings->SetSetting(emu_settings::EnterButtonAssignment, sstr(assignable_buttons[i]));
|
||||||
});
|
});
|
||||||
|
|
|
@ -36,19 +36,19 @@ vfs_dialog::vfs_dialog(std::shared_ptr<gui_settings> guiSettings, std::shared_pt
|
||||||
|
|
||||||
// Create buttons
|
// Create buttons
|
||||||
QPushButton* addDir = new QPushButton(tr("Add New Directory"));
|
QPushButton* addDir = new QPushButton(tr("Add New Directory"));
|
||||||
connect(addDir, &QAbstractButton::pressed, [=]
|
connect(addDir, &QAbstractButton::clicked, [=]
|
||||||
{
|
{
|
||||||
static_cast<vfs_dialog_tab*>(tabs->currentWidget())->AddNewDirectory();
|
static_cast<vfs_dialog_tab*>(tabs->currentWidget())->AddNewDirectory();
|
||||||
});
|
});
|
||||||
|
|
||||||
QPushButton* reset = new QPushButton(tr("Reset"));
|
QPushButton* reset = new QPushButton(tr("Reset"));
|
||||||
connect(reset, &QAbstractButton::pressed, [=]
|
connect(reset, &QAbstractButton::clicked, [=]
|
||||||
{
|
{
|
||||||
static_cast<vfs_dialog_tab*>(tabs->currentWidget())->Reset();
|
static_cast<vfs_dialog_tab*>(tabs->currentWidget())->Reset();
|
||||||
});
|
});
|
||||||
|
|
||||||
QPushButton* resetAll = new QPushButton(tr("Reset All"));
|
QPushButton* resetAll = new QPushButton(tr("Reset All"));
|
||||||
connect(resetAll, &QAbstractButton::pressed, [=]
|
connect(resetAll, &QAbstractButton::clicked, [=]
|
||||||
{
|
{
|
||||||
for (int i = 0; i < tabs->count(); ++i)
|
for (int i = 0; i < tabs->count(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ vfs_dialog::vfs_dialog(std::shared_ptr<gui_settings> guiSettings, std::shared_pt
|
||||||
okay->setAutoDefault(true);
|
okay->setAutoDefault(true);
|
||||||
okay->setDefault(true);
|
okay->setDefault(true);
|
||||||
|
|
||||||
connect(okay, &QAbstractButton::pressed, [=]
|
connect(okay, &QAbstractButton::clicked, [=]
|
||||||
{
|
{
|
||||||
for (int i = 0; i < tabs->count(); ++i)
|
for (int i = 0; i < tabs->count(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::we
|
||||||
settings->SetValue(gui::ib_show_welcome, QVariant(!checked));
|
settings->SetValue(gui::ib_show_welcome, QVariant(!checked));
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->okay, &QPushButton::pressed, this, &QDialog::accept);
|
connect(ui->okay, &QPushButton::clicked, this, &QDialog::accept);
|
||||||
|
|
||||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue