mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
clang-format in src/qt
This commit is contained in:
@@ -1,20 +1,25 @@
|
||||
#include "qt_singlekeyseqedit.hpp"
|
||||
|
||||
/*
|
||||
This subclass of QKeySequenceEdit restricts the input to only a single
|
||||
shortcut instead of an unlimited number with a fixed timeout.
|
||||
This subclass of QKeySequenceEdit restricts the input to only a single
|
||||
shortcut instead of an unlimited number with a fixed timeout.
|
||||
*/
|
||||
|
||||
singleKeySequenceEdit::singleKeySequenceEdit(QWidget *parent) : QKeySequenceEdit(parent) {}
|
||||
singleKeySequenceEdit::singleKeySequenceEdit(QWidget *parent)
|
||||
: QKeySequenceEdit(parent)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
void singleKeySequenceEdit::keyPressEvent(QKeyEvent *event)
|
||||
void
|
||||
singleKeySequenceEdit::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
QKeySequenceEdit::keyPressEvent(event);
|
||||
if (this->keySequence().count() > 0) {
|
||||
QKeySequenceEdit::setKeySequence(this->keySequence());
|
||||
|
||||
// This could have unintended consequences since it will happen
|
||||
// every single time the user presses a key.
|
||||
|
||||
// This could have unintended consequences since it will happen
|
||||
// every single time the user presses a key.
|
||||
emit editingFinished();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user