Refactoring. Do not use QStringLiteral for empty strings.
--HG-- branch : develop
This commit is contained in:
parent
7687a04ded
commit
2bd82fa340
|
@ -36,13 +36,13 @@
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula::VFormula()
|
||||
:formula(QString()), value(QString(tr("Error"))), checkZero(true), data(nullptr), toolId(NULL_ID),
|
||||
postfix(QStringLiteral("")), _error(true), dValue(0)
|
||||
postfix(QString()), _error(true), dValue(0)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula::VFormula(const QString &formula, const VContainer *container)
|
||||
:formula(qApp->FormulaToUser(formula)), value(QString(tr("Error"))), checkZero(true), data(container),
|
||||
toolId(NULL_ID), postfix(QStringLiteral("")), _error(true), dValue(0)
|
||||
toolId(NULL_ID), postfix(QString()), _error(true), dValue(0)
|
||||
{
|
||||
this->formula.replace("\n", " ");// Replace line return with spaces for calc if exist
|
||||
Eval();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogEditWrongFormula::DialogEditWrongFormula(const VContainer *data, const quint32 &toolId, QWidget *parent)
|
||||
:DialogTool(data, toolId, parent), ui(new Ui::DialogEditWrongFormula), formula(QString()), formulaBaseHeight(0),
|
||||
checkZero(false), postfix(QStringLiteral("")), restoreCursor(false)
|
||||
checkZero(false), postfix(QString()), restoreCursor(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
InitVariables(ui);
|
||||
|
|
|
@ -32,14 +32,14 @@ VPE::VStringProperty::VStringProperty(const QString &name, const QMap<QString, Q
|
|||
: VProperty(name, QVariant::String), readOnly(false), typeForParent(0)
|
||||
{
|
||||
VProperty::setSettings(settings);
|
||||
d_ptr->VariantValue.setValue(QStringLiteral(""));
|
||||
d_ptr->VariantValue.setValue(QString());
|
||||
d_ptr->VariantValue.convert(QVariant::String);
|
||||
}
|
||||
|
||||
VPE::VStringProperty::VStringProperty(const QString &name)
|
||||
: VProperty(name), readOnly(false), typeForParent(0)
|
||||
{
|
||||
d_ptr->VariantValue.setValue(QStringLiteral(""));
|
||||
d_ptr->VariantValue.setValue(QString());
|
||||
d_ptr->VariantValue.convert(QVariant::String);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ QVariant VPE::VStringProperty::getEditorData(const QWidget *editor) const
|
|||
return tmpEditor->text();
|
||||
}
|
||||
|
||||
return QVariant(QStringLiteral(""));
|
||||
return QVariant(QString());
|
||||
}
|
||||
|
||||
void VPE::VStringProperty::setReadOnly(bool readOnly)
|
||||
|
|
Loading…
Reference in New Issue
Block a user