Refactoring.
Code style.
This commit is contained in:
parent
ac25cc02df
commit
bbed14d37d
|
@ -29,13 +29,11 @@
|
|||
#include "vformula.h"
|
||||
#include "vformula_p.h"
|
||||
|
||||
#include <qnumeric.h>
|
||||
#include <QMessageLogger>
|
||||
#include <QScopedPointer>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "../qmuparser/qmuparsererror.h"
|
||||
#include "../vgeometry/../ifc/ifcdef.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vmisc/vcommonsettings.h"
|
||||
|
@ -47,12 +45,14 @@
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula::VFormula()
|
||||
: d(new VFormulaData)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula::VFormula(const QString &formula, const VContainer *container)
|
||||
: d(new VFormulaData(formula, container))
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VFormula::operator=(const VFormula &formula) -> VFormula &
|
||||
|
@ -66,13 +66,10 @@ auto VFormula::operator=(const VFormula &formula) -> VFormula &
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula::VFormula(const VFormula &formula)
|
||||
: d (formula.d)
|
||||
{}
|
||||
VFormula::VFormula(const VFormula &formula) = default;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula::~VFormula()
|
||||
{}
|
||||
VFormula::~VFormula() = default;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VFormula::operator==(const VFormula &formula) const -> bool
|
||||
|
@ -96,11 +93,9 @@ auto VFormula::GetFormula(FormulaType type) const -> QString
|
|||
{
|
||||
return VTranslateVars::TryFormulaToUser(d->formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return d->formula;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VFormula::SetFormula(const QString &value, FormulaType type)
|
||||
|
@ -109,8 +104,8 @@ void VFormula::SetFormula(const QString &value, FormulaType type)
|
|||
{
|
||||
if (type == FormulaType::FromUser)
|
||||
{
|
||||
d->formula = VTranslateVars::TryFormulaFromUser(value,
|
||||
VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||
d->formula =
|
||||
VTranslateVars::TryFormulaFromUser(value, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user