From b17a6cc1098abf72abcdfe49be3492a5c6357275 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Tue, 12 Mar 2024 20:54:53 +0100 Subject: [PATCH] Formatting changes --- lib/legacy/switch-network.hpp | 2 +- lib/macro/macro-export-import-dialog.cpp | 3 ++- lib/macro/macro-segment.cpp | 3 ++- lib/utils/section.cpp | 3 ++- lib/utils/temp-variable.cpp | 9 +++++++-- lib/variables/variable-tab.cpp | 7 ++++--- plugins/base/macro-condition-profile.cpp | 3 ++- plugins/video/area-selection.cpp | 4 +++- plugins/video/opencv-helpers.hpp | 2 +- tests/mocks/obs-data.cpp | 12 ++++-------- 10 files changed, 28 insertions(+), 20 deletions(-) diff --git a/lib/legacy/switch-network.hpp b/lib/legacy/switch-network.hpp index dd9881bf..34c3387d 100644 --- a/lib/legacy/switch-network.hpp +++ b/lib/legacy/switch-network.hpp @@ -132,6 +132,6 @@ public: }; QRunnable *CreateFunctionRunnable(std::function func); -} +} // namespace Compatability } // namespace advss diff --git a/lib/macro/macro-export-import-dialog.cpp b/lib/macro/macro-export-import-dialog.cpp index e1c5d93e..c6b327f0 100644 --- a/lib/macro/macro-export-import-dialog.cpp +++ b/lib/macro/macro-export-import-dialog.cpp @@ -9,7 +9,8 @@ namespace advss { MacroExportImportDialog::MacroExportImportDialog(Type type) - : QDialog(nullptr), _importExportString(new QPlainTextEdit(this)) + : QDialog(nullptr), + _importExportString(new QPlainTextEdit(this)) { _importExportString->setReadOnly(type == Type::EXPORT_MACRO); auto label = new QLabel(obs_module_text( diff --git a/lib/macro/macro-segment.cpp b/lib/macro/macro-segment.cpp index 8a660259..5510c1de 100644 --- a/lib/macro/macro-segment.cpp +++ b/lib/macro/macro-segment.cpp @@ -13,7 +13,8 @@ namespace advss { MacroSegment::MacroSegment(Macro *m, bool supportsVariableValue) - : _macro(m), _supportsVariableValue(supportsVariableValue) + : _macro(m), + _supportsVariableValue(supportsVariableValue) { } diff --git a/lib/utils/section.cpp b/lib/utils/section.cpp index 993da25b..4cb31060 100644 --- a/lib/utils/section.cpp +++ b/lib/utils/section.cpp @@ -7,7 +7,8 @@ namespace advss { Section::Section(const int animationDuration, QWidget *parent) - : QWidget(parent), _animationDuration(animationDuration) + : QWidget(parent), + _animationDuration(animationDuration) { _toggleButton = new QToolButton(this); _headerLine = new QFrame(this); diff --git a/lib/utils/temp-variable.cpp b/lib/utils/temp-variable.cpp index 56084521..bd425801 100644 --- a/lib/utils/temp-variable.cpp +++ b/lib/utils/temp-variable.cpp @@ -17,7 +17,10 @@ namespace advss { TempVariable::TempVariable(const std::string &id, const std::string &name, const std::string &description, const std::shared_ptr &segment) - : _id(id), _name(name), _description(description), _segment(segment) + : _id(id), + _name(name), + _description(description), + _segment(segment) { } @@ -439,7 +442,9 @@ void NotifyUIAboutTempVarChange() AutoUpdateTooltipLabel::AutoUpdateTooltipLabel( QWidget *parent, std::function updateFunc) - : QLabel(parent), _updateFunc(updateFunc), _timer(new QTimer(this)) + : QLabel(parent), + _updateFunc(updateFunc), + _timer(new QTimer(this)) { connect(_timer, &QTimer::timeout, this, &AutoUpdateTooltipLabel::UpdateTooltip); diff --git a/lib/variables/variable-tab.cpp b/lib/variables/variable-tab.cpp index 72f88ddd..0e5ae71a 100644 --- a/lib/variables/variable-tab.cpp +++ b/lib/variables/variable-tab.cpp @@ -60,7 +60,8 @@ static QString formatLastUsedText(Variable *variable) "AdvSceneSwitcher.variableTab.lastUsed.text.never"); } - QString text = obs_module_text("AdvSceneSwitcher.variableTab.lastUsed.text"); + QString text = + obs_module_text("AdvSceneSwitcher.variableTab.lastUsed.text"); return text.arg(QString::number(*lastUsed)); } @@ -72,8 +73,8 @@ static QString formatLastChangedText(Variable *variable) "AdvSceneSwitcher.variableTab.lastChanged.text.none"); } - QString text = - obs_module_text("AdvSceneSwitcher.variableTab.lastChanged.text"); + QString text = obs_module_text( + "AdvSceneSwitcher.variableTab.lastChanged.text"); return text.arg(QString::number(*lastChanged)); } diff --git a/plugins/base/macro-condition-profile.cpp b/plugins/base/macro-condition-profile.cpp index 7a096e6d..41b0f2e5 100644 --- a/plugins/base/macro-condition-profile.cpp +++ b/plugins/base/macro-condition-profile.cpp @@ -42,7 +42,8 @@ std::string MacroConditionProfile::GetShortDesc() const MacroConditionProfileEdit::MacroConditionProfileEdit( QWidget *parent, std::shared_ptr entryData) - : QWidget(parent), _profiles(new QComboBox()) + : QWidget(parent), + _profiles(new QComboBox()) { PopulateProfileSelection(_profiles); QWidget::connect(_profiles, SIGNAL(currentTextChanged(const QString &)), diff --git a/plugins/video/area-selection.cpp b/plugins/video/area-selection.cpp index 46ef1884..db7da0e2 100644 --- a/plugins/video/area-selection.cpp +++ b/plugins/video/area-selection.cpp @@ -64,7 +64,9 @@ void Area::Load(obs_data_t *obj, const char *name) } SizeSelection::SizeSelection(int min, int max, QWidget *parent) - : QWidget(parent), _x(new VariableSpinBox()), _y(new VariableSpinBox()) + : QWidget(parent), + _x(new VariableSpinBox()), + _y(new VariableSpinBox()) { _x->setMinimum(min); _y->setMinimum(min); diff --git a/plugins/video/opencv-helpers.hpp b/plugins/video/opencv-helpers.hpp index e81869bc..a5082533 100644 --- a/plugins/video/opencv-helpers.hpp +++ b/plugins/video/opencv-helpers.hpp @@ -33,7 +33,7 @@ public: int Init(const char *, const char *) { return 0; } void End() {} }; -} +} // namespace tesseract #endif namespace advss { diff --git a/tests/mocks/obs-data.cpp b/tests/mocks/obs-data.cpp index 922dbafc..534802d1 100644 --- a/tests/mocks/obs-data.cpp +++ b/tests/mocks/obs-data.cpp @@ -1,16 +1,12 @@ #include "obs-data.h" -struct obs_data_item { -}; +struct obs_data_item {}; -struct obs_data { -}; +struct obs_data {}; -struct obs_data_array { -}; +struct obs_data_array {}; -struct obs_data_number { -}; +struct obs_data_number {}; obs_data_t *obs_data_create() {