clang-format: Apply formatting
Code submissions have continually suffered from formatting inconsistencies that constantly have to be addressed. Using clang-format simplifies this by making code formatting more consistent, and allows automation of the code formatting so that maintainers can focus more on the code itself instead of code formatting.
This commit is contained in:
@@ -45,10 +45,8 @@ class OBSHotkeyEdit : public QLineEdit {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
OBSHotkeyEdit(obs_key_combination_t original,
|
||||
QWidget *parent=nullptr)
|
||||
: QLineEdit(parent),
|
||||
original(original)
|
||||
OBSHotkeyEdit(obs_key_combination_t original, QWidget *parent = nullptr)
|
||||
: QLineEdit(parent), original(original)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
// disable the input cursor on OSX, focus should be clear
|
||||
@@ -63,9 +61,10 @@ public:
|
||||
|
||||
obs_key_combination_t original;
|
||||
obs_key_combination_t key;
|
||||
bool changed = false;
|
||||
bool changed = false;
|
||||
|
||||
protected:
|
||||
OBSSignal layoutChanged;
|
||||
OBSSignal layoutChanged;
|
||||
|
||||
void InitSignalHandler();
|
||||
|
||||
@@ -92,15 +91,14 @@ class OBSHotkeyWidget : public QWidget {
|
||||
|
||||
public:
|
||||
OBSHotkeyWidget(obs_hotkey_id id, std::string name,
|
||||
const std::vector<obs_key_combination_t> &combos={},
|
||||
QWidget *parent=nullptr)
|
||||
const std::vector<obs_key_combination_t> &combos = {},
|
||||
QWidget *parent = nullptr)
|
||||
: QWidget(parent),
|
||||
id(id),
|
||||
name(name),
|
||||
bindingsChanged(obs_get_signal_handler(),
|
||||
"hotkey_bindings_changed",
|
||||
&OBSHotkeyWidget::BindingsChanged,
|
||||
this)
|
||||
&OBSHotkeyWidget::BindingsChanged, this)
|
||||
{
|
||||
auto layout = new QVBoxLayout;
|
||||
layout->setSpacing(0);
|
||||
@@ -110,7 +108,7 @@ public:
|
||||
SetKeyCombinations(combos);
|
||||
}
|
||||
|
||||
void SetKeyCombinations(const std::vector<obs_key_combination_t>&);
|
||||
void SetKeyCombinations(const std::vector<obs_key_combination_t> &);
|
||||
|
||||
obs_hotkey_id id;
|
||||
std::string name;
|
||||
@@ -129,7 +127,7 @@ public:
|
||||
}
|
||||
|
||||
void Apply();
|
||||
void GetCombinations(std::vector<obs_key_combination_t>&) const;
|
||||
void GetCombinations(std::vector<obs_key_combination_t> &) const;
|
||||
void Save();
|
||||
void Save(std::vector<obs_key_combination_t> &combinations);
|
||||
|
||||
@@ -137,8 +135,8 @@ public:
|
||||
void leaveEvent(QEvent *event) override;
|
||||
|
||||
private:
|
||||
void AddEdit(obs_key_combination combo, int idx=-1);
|
||||
void RemoveEdit(size_t idx, bool signal=true);
|
||||
void AddEdit(obs_key_combination combo, int idx = -1);
|
||||
void RemoveEdit(size_t idx, bool signal = true);
|
||||
|
||||
static void BindingsChanged(void *data, calldata_t *param);
|
||||
|
||||
@@ -150,7 +148,7 @@ private:
|
||||
|
||||
QVBoxLayout *layout() const
|
||||
{
|
||||
return dynamic_cast<QVBoxLayout*>(QWidget::layout());
|
||||
return dynamic_cast<QVBoxLayout *>(QWidget::layout());
|
||||
}
|
||||
|
||||
private slots:
|
||||
|
Reference in New Issue
Block a user