mirror of
https://github.com/citra-emu/citra-nightly.git
synced 2024-12-23 06:05:36 +00:00
qt: Clear finishing key combinations for hot key entry on Qt 6.5+ (#6509)
This commit is contained in:
parent
b9d644b777
commit
3a27603e3d
|
@ -11,6 +11,10 @@ SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
|
|||
setWindowTitle(tr("Enter a hotkey"));
|
||||
|
||||
key_sequence = new QKeySequenceEdit;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
key_sequence->setMaximumSequenceLength(1);
|
||||
key_sequence->setFinishingKeyCombinations({});
|
||||
#endif
|
||||
|
||||
auto* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
buttons->setCenterButtons(true);
|
||||
|
@ -26,8 +30,12 @@ SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
|
|||
SequenceDialog::~SequenceDialog() = default;
|
||||
|
||||
QKeySequence SequenceDialog::GetSequence() {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
return key_sequence->keySequence();
|
||||
#else
|
||||
// Only the first key is returned. The other 3, if present, are ignored.
|
||||
return QKeySequence(key_sequence->keySequence()[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SequenceDialog::focusNextPrevChild(bool next) {
|
||||
|
|
Loading…
Reference in a new issue