Run clangformat everywhere

This commit is contained in:
SimoneN64
2024-08-27 21:35:07 +02:00
parent b3a4a302cb
commit e253627890
74 changed files with 5536 additions and 4358 deletions

View File

@@ -1,9 +1,9 @@
#include <InputSettings.hpp>
#include <QVBoxLayout>
#include <QKeyEvent>
#include <QVBoxLayout>
#include <log.hpp>
InputSettings::InputSettings(nlohmann::json& settings) : settings(settings), QWidget(nullptr) {
InputSettings::InputSettings(nlohmann::json &settings) : settings(settings), QWidget(nullptr) {
n64_button_labels[0] = new QLabel("A");
n64_button_labels[1] = new QLabel("B");
n64_button_labels[2] = new QLabel("Z");
@@ -22,7 +22,7 @@ InputSettings::InputSettings(nlohmann::json& settings) : settings(settings), QWi
n64_button_labels[15] = new QLabel("Analog Down");
n64_button_labels[16] = new QLabel("Analog Left");
n64_button_labels[17] = new QLabel("Analog Right");
auto str = JSONGetField<std::string>(settings, "input", "A");
kb_buttons[0] = new QPushButton(str.c_str());
str = JSONGetField<std::string>(settings, "input", "B");
@@ -132,10 +132,11 @@ InputSettings::InputSettings(nlohmann::json& settings) : settings(settings), QWi
}
void InputSettings::keyPressEvent(QKeyEvent* e) {
void InputSettings::keyPressEvent(QKeyEvent *e) {
if (grabbing) {
auto k = QKeySequence(e->key()).toString();
JSONSetField<std::string>(settings, "input", n64_button_labels[which_grabbing]->text().toStdString(), k.toStdString());
JSONSetField<std::string>(settings, "input", n64_button_labels[which_grabbing]->text().toStdString(),
k.toStdString());
kb_buttons[which_grabbing]->setText(k);
grabbing = false;
which_grabbing = -1;
@@ -155,4 +156,4 @@ std::array<Qt::Key, 18> InputSettings::GetMappedKeys() {
}
return ret;
}
}