mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 11:10:15 +00:00
Cleanup
This commit is contained in:
parent
ce63acecf8
commit
4ddb494072
@ -3,6 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <utility>
|
||||
#include <QTimer>
|
||||
|
||||
#include "citra_qt/configure_input.h"
|
||||
|
||||
@ -45,6 +46,7 @@ ConfigureInput::ConfigureInput(QWidget* parent) :
|
||||
}
|
||||
connect(ui->btnRestoreDefaults, SIGNAL(released()), this, SLOT(restoreDefaults()));
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
timer = new QTimer(this);
|
||||
timer->setSingleShot(true);
|
||||
connect(timer, &QTimer::timeout, this, [&]() { key_pressed = Qt::Key_Escape; setKey(); });
|
||||
this->setConfiguration();
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <memory>
|
||||
#include <QWidget>
|
||||
#include <QKeyEvent>
|
||||
#include <QTimer>
|
||||
|
||||
#include "citra_qt/config.h"
|
||||
#include "core/settings.h"
|
||||
@ -15,6 +14,7 @@
|
||||
|
||||
class QPushButton;
|
||||
class QString;
|
||||
class QTimer;
|
||||
|
||||
namespace Ui {
|
||||
class ConfigureInput;
|
||||
@ -35,7 +35,7 @@ private:
|
||||
int key_pressed;
|
||||
QPushButton* changing_button = nullptr; /// button currently waiting for key press.
|
||||
QString previous_mapping;
|
||||
QTimer* timer = new QTimer(this);
|
||||
QTimer* timer;
|
||||
|
||||
void setConfiguration();
|
||||
void removeDuplicates(const QString& newValue);
|
||||
@ -43,7 +43,7 @@ private:
|
||||
QString getKeyName(int key_code) const;
|
||||
Qt::Key getKeyValue(const QString& text) const;
|
||||
void setKey();
|
||||
private Q_SLOTS:
|
||||
private Q_SLOTS:
|
||||
void handleClick();
|
||||
void restoreDefaults();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user