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