VERY experimental Nintendo Switch 2 emulator
C++
sequence_dialog: Reorganize the constructor
Lioncash82b996abf788
diff --git a/src/yuzu/util/sequence_dialog/sequence_dialog.cpp b/src/yuzu/util/sequence_dialog/sequence_dialog.cppindex 16a5473ca1..bb5f74ec4e 100644--- a/src/yuzu/util/sequence_dialog/sequence_dialog.cpp+++ b/src/yuzu/util/sequence_dialog/sequence_dialog.cpp@@ -9,15 +9,19 @@SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {setWindowTitle(tr("Enter a hotkey"));- auto* layout = new QVBoxLayout(this);+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);+key_sequence = new QKeySequenceEdit;- layout->addWidget(key_sequence);- auto* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);++ auto* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);buttons->setCenterButtons(true);++ auto* const layout = new QVBoxLayout(this);+ layout->addWidget(key_sequence);layout->addWidget(buttons);+connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);- setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);}SequenceDialog::~SequenceDialog() = default;