From 2016a33277a20a817c83091af8a85997e49019d4 Mon Sep 17 00:00:00 2001 From: Silent Date: Tue, 9 Jul 2019 22:20:55 +0200 Subject: [PATCH] Fixed behaviour of buttons in Welcome, Find, Settings, VFS and Debugger dialogs - now reacting to button click, not press --- rpcs3/rpcs3qt/find_dialog.cpp | 8 ++++---- rpcs3/rpcs3qt/instruction_editor_dialog.cpp | 4 ++-- rpcs3/rpcs3qt/register_editor_dialog.cpp | 4 ++-- rpcs3/rpcs3qt/settings_dialog.cpp | 8 ++++---- rpcs3/rpcs3qt/vfs_dialog.cpp | 8 ++++---- rpcs3/rpcs3qt/welcome_dialog.cpp | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/rpcs3/rpcs3qt/find_dialog.cpp b/rpcs3/rpcs3qt/find_dialog.cpp index 03e26fbc3a..bb360484be 100644 --- a/rpcs3/rpcs3qt/find_dialog.cpp +++ b/rpcs3/rpcs3qt/find_dialog.cpp @@ -33,10 +33,10 @@ find_dialog::find_dialog(QTextEdit* edit, QWidget *parent, Qt::WindowFlags f) : layout->addLayout(button_layout); setLayout(layout); - connect(m_find_first, &QPushButton::pressed, this, &find_dialog::find_first); - connect(m_find_last, &QPushButton::pressed, this, &find_dialog::find_last); - connect(m_find_next, &QPushButton::pressed, this, &find_dialog::find_next); - connect(m_find_previous, &QPushButton::pressed, this, &find_dialog::find_previous); + connect(m_find_first, &QPushButton::clicked, this, &find_dialog::find_first); + connect(m_find_last, &QPushButton::clicked, this, &find_dialog::find_last); + connect(m_find_next, &QPushButton::clicked, this, &find_dialog::find_next); + connect(m_find_previous, &QPushButton::clicked, this, &find_dialog::find_previous); show(); } diff --git a/rpcs3/rpcs3qt/instruction_editor_dialog.cpp b/rpcs3/rpcs3qt/instruction_editor_dialog.cpp index 0076400ef3..db4c15a308 100644 --- a/rpcs3/rpcs3qt/instruction_editor_dialog.cpp +++ b/rpcs3/rpcs3qt/instruction_editor_dialog.cpp @@ -65,7 +65,7 @@ instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, c setModal(true); // Events - connect(button_ok, &QAbstractButton::pressed, [=]() + connect(button_ok, &QAbstractButton::clicked, [=]() { bool ok; ulong opcode = m_instr->text().toULong(&ok, 16); @@ -89,7 +89,7 @@ instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, c 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); updatePreview(); diff --git a/rpcs3/rpcs3qt/register_editor_dialog.cpp b/rpcs3/rpcs3qt/register_editor_dialog.cpp index cdcb4a075e..ea0c9d2b19 100644 --- a/rpcs3/rpcs3qt/register_editor_dialog.cpp +++ b/rpcs3/rpcs3qt/register_editor_dialog.cpp @@ -73,8 +73,8 @@ register_editor_dialog::register_editor_dialog(QWidget *parent, u32 _pc, const s setModal(true); // Events - connect(button_ok, &QAbstractButton::pressed, this, [=](){OnOkay(_cpu); accept();}); - connect(button_cancel, &QAbstractButton::pressed, this, ®ister_editor_dialog::reject); + connect(button_ok, &QAbstractButton::clicked, this, [=](){OnOkay(_cpu); accept();}); + connect(button_cancel, &QAbstractButton::clicked, this, ®ister_editor_dialog::reject); connect(m_register_combo, &QComboBox::currentTextChanged, this, ®ister_editor_dialog::updateRegister); updateRegister(m_register_combo->currentText()); diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 6126a4dfce..d90d63174a 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -249,7 +249,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: 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])); }); @@ -279,7 +279,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: 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])); }); @@ -329,7 +329,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: 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])); }); @@ -907,7 +907,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: 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])); }); diff --git a/rpcs3/rpcs3qt/vfs_dialog.cpp b/rpcs3/rpcs3qt/vfs_dialog.cpp index 5ffdd4fb3e..4c03932470 100644 --- a/rpcs3/rpcs3qt/vfs_dialog.cpp +++ b/rpcs3/rpcs3qt/vfs_dialog.cpp @@ -36,19 +36,19 @@ vfs_dialog::vfs_dialog(std::shared_ptr guiSettings, std::shared_pt // Create buttons QPushButton* addDir = new QPushButton(tr("Add New Directory")); - connect(addDir, &QAbstractButton::pressed, [=] + connect(addDir, &QAbstractButton::clicked, [=] { static_cast(tabs->currentWidget())->AddNewDirectory(); }); QPushButton* reset = new QPushButton(tr("Reset")); - connect(reset, &QAbstractButton::pressed, [=] + connect(reset, &QAbstractButton::clicked, [=] { static_cast(tabs->currentWidget())->Reset(); }); QPushButton* resetAll = new QPushButton(tr("Reset All")); - connect(resetAll, &QAbstractButton::pressed, [=] + connect(resetAll, &QAbstractButton::clicked, [=] { for (int i = 0; i < tabs->count(); ++i) { @@ -60,7 +60,7 @@ vfs_dialog::vfs_dialog(std::shared_ptr guiSettings, std::shared_pt okay->setAutoDefault(true); okay->setDefault(true); - connect(okay, &QAbstractButton::pressed, [=] + connect(okay, &QAbstractButton::clicked, [=] { for (int i = 0; i < tabs->count(); ++i) { diff --git a/rpcs3/rpcs3qt/welcome_dialog.cpp b/rpcs3/rpcs3qt/welcome_dialog.cpp index df93756dc0..39c0337e65 100644 --- a/rpcs3/rpcs3qt/welcome_dialog.cpp +++ b/rpcs3/rpcs3qt/welcome_dialog.cpp @@ -31,7 +31,7 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::we 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); }