From 479866431c502086e393abdd030cad19aa7fab31 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 6 Oct 2023 10:18:00 +0300 Subject: [PATCH] Refactoring. Code style. --- .../valentina/core/vformulapropertyeditor.cpp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/app/valentina/core/vformulapropertyeditor.cpp b/src/app/valentina/core/vformulapropertyeditor.cpp index e77134eba..669453334 100644 --- a/src/app/valentina/core/vformulapropertyeditor.cpp +++ b/src/app/valentina/core/vformulapropertyeditor.cpp @@ -28,23 +28,23 @@ #include "vformulapropertyeditor.h" -#include -#include -#include #include #include #include +#include +#include +#include #include #include +#include "../vmisc/vabstractvalapplication.h" #include "../vpropertyexplorer/vproperty.h" #include "../vtools/dialogs/support/dialogeditwrongformula.h" -#include "../vmisc/vabstractvalapplication.h" // VFormulaPropertyEditor //--------------------------------------------------------------------------------------------------------------------- VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent) - : QWidget(parent) + : QWidget(parent) { setAutoFillBackground(true); @@ -56,7 +56,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent) m_ToolButton->setIconSize(QSize(16, 16)); m_ToolButton->setFixedSize(24, 24); m_ToolButton->installEventFilter(this); - setFocusProxy(m_ToolButton); // Make the ToolButton the focus proxy + setFocusProxy(m_ToolButton); // Make the ToolButton the focus proxy setFocusPolicy(m_ToolButton->focusPolicy()); connect(m_ToolButton, &QToolButton::clicked, this, &VFormulaPropertyEditor::onToolButtonClicked); @@ -66,7 +66,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent) m_TextLabel->setText(m_formula.getStringValue()); // The layout (a horizontal layout) - auto* layout = new QHBoxLayout(this); + auto *layout = new QHBoxLayout(this); layout->setSpacing(3); layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(m_TextLabel); @@ -76,7 +76,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent) } //--------------------------------------------------------------------------------------------------------------------- -void VFormulaPropertyEditor::SetFormula(const VFormula& formula) +void VFormulaPropertyEditor::SetFormula(const VFormula &formula) { if (this->m_formula != formula) { @@ -88,9 +88,8 @@ void VFormulaPropertyEditor::SetFormula(const VFormula& formula) //--------------------------------------------------------------------------------------------------------------------- void VFormulaPropertyEditor::onToolButtonClicked() { - QScopedPointer tmpWidget( - new DialogEditWrongFormula(m_formula.getData(), m_formula.getToolId(), - VAbstractValApplication::VApp()->getMainWindow())); + QScopedPointer tmpWidget(new DialogEditWrongFormula( + m_formula.getData(), m_formula.getToolId(), VAbstractValApplication::VApp()->getMainWindow())); tmpWidget->setCheckZero(m_formula.getCheckZero()); tmpWidget->setPostfix(m_formula.getPostfix()); tmpWidget->SetFormula(m_formula.GetFormula(FormulaType::FromUser));