Clang warnings.
--HG-- branch : develop
This commit is contained in:
parent
fd2f977e44
commit
ec0c69c738
|
@ -979,16 +979,7 @@ void DialogIncrements::SaveIncrName(const QString &text)
|
|||
newName = name;
|
||||
}
|
||||
|
||||
if (lineEdit == ui->lineEditName)
|
||||
{
|
||||
doc->SetIncrementName(nameField->text(), newName);
|
||||
|
||||
}
|
||||
else if (lineEdit == ui->lineEditNamePC)
|
||||
{
|
||||
doc->SetPreviewCalculationName(nameField->text(), newName);
|
||||
}
|
||||
|
||||
doc->SetIncrementName(nameField->text(), newName);
|
||||
QVector<VFormulaField> expression = doc->ListIncrementExpressions();
|
||||
doc->ReplaceNameInFormula(expression, nameField->text(), newName);
|
||||
|
||||
|
@ -1030,16 +1021,7 @@ void DialogIncrements::SaveIncrDescription()
|
|||
}
|
||||
|
||||
const QTableWidgetItem *nameField = table->item(row, 0);
|
||||
|
||||
if (textEdit == ui->plainTextEditDescription)
|
||||
{
|
||||
doc->SetIncrementDescription(nameField->text(), textEdit->toPlainText());
|
||||
}
|
||||
else if (textEdit == ui->plainTextEditDescriptionPC)
|
||||
{
|
||||
doc->SetPreviewCalculationDescription(nameField->text(), textEdit->toPlainText());
|
||||
}
|
||||
|
||||
doc->SetIncrementDescription(nameField->text(), textEdit->toPlainText());
|
||||
LocalUpdateTree();
|
||||
|
||||
const QTextCursor cursor = textEdit->textCursor();
|
||||
|
@ -1112,16 +1094,7 @@ void DialogIncrements::SaveIncrFormula()
|
|||
try
|
||||
{
|
||||
const QString formula = qApp->TrVars()->FormulaFromUser(text, qApp->Settings()->GetOsSeparator());
|
||||
|
||||
if (textEdit == ui->plainTextEditFormula)
|
||||
{
|
||||
doc->SetIncrementFormula(nameField->text(), formula);
|
||||
}
|
||||
else if (textEdit == ui->plainTextEditFormulaPC)
|
||||
{
|
||||
doc->SetPreviewCalculationFormula(nameField->text(), formula);
|
||||
}
|
||||
|
||||
doc->SetIncrementFormula(nameField->text(), formula);
|
||||
}
|
||||
catch (qmu::QmuParserError &e) // Just in case something bad will happen
|
||||
{
|
||||
|
|
|
@ -3161,34 +3161,12 @@ void VPattern::MoveDownIncrement(const QString &type, const QString &name)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetIncrementName(const QString &type, const QString &name, const QString &text)
|
||||
void VPattern::SetIncrementAttribute(const QString &name, const QString &attr, const QString &text)
|
||||
{
|
||||
QDomElement node = FindIncrement(name);
|
||||
if (not node.isNull())
|
||||
{
|
||||
SetAttribute(node, IncrementName, text);
|
||||
emit patternChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetIncrementFormula(const QString &type, const QString &name, const QString &text)
|
||||
{
|
||||
QDomElement node = FindIncrement(name);
|
||||
if (not node.isNull())
|
||||
{
|
||||
SetAttribute(node, IncrementFormula, text);
|
||||
emit patternChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetIncrementDescription(const QString &type, const QString &name, const QString &text)
|
||||
{
|
||||
QDomElement node = FindIncrement(name);
|
||||
if (not node.isNull())
|
||||
{
|
||||
SetAttribute(node, IncrementDescription, text);
|
||||
SetAttribute(node, attr, text);
|
||||
emit patternChanged(false);
|
||||
}
|
||||
}
|
||||
|
@ -3552,37 +3530,19 @@ void VPattern::MoveDownPreviewCalculation(const QString &name)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetIncrementName(const QString &name, const QString &text)
|
||||
{
|
||||
SetIncrementName(TagIncrement, name, text);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetPreviewCalculationName(const QString &name, const QString &text)
|
||||
{
|
||||
SetIncrementName(TagPreviewCalculations, name, text);
|
||||
SetIncrementAttribute(name, IncrementName, text);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetIncrementFormula(const QString &name, const QString &text)
|
||||
{
|
||||
SetIncrementFormula(TagIncrement, name, text);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetPreviewCalculationFormula(const QString &name, const QString &text)
|
||||
{
|
||||
SetIncrementFormula(TagPreviewCalculations, name, text);
|
||||
SetIncrementAttribute(name, IncrementFormula, text);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetIncrementDescription(const QString &name, const QString &text)
|
||||
{
|
||||
SetIncrementDescription(TagIncrement, name, text);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::SetPreviewCalculationDescription(const QString &name, const QString &text)
|
||||
{
|
||||
SetIncrementDescription(TagPreviewCalculations, name, text);
|
||||
SetIncrementAttribute(name, IncrementDescription, text);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -82,13 +82,8 @@ public:
|
|||
void MoveDownPreviewCalculation(const QString &name);
|
||||
|
||||
void SetIncrementName(const QString &name, const QString &text);
|
||||
void SetPreviewCalculationName(const QString &name, const QString &text);
|
||||
|
||||
void SetIncrementFormula(const QString &name, const QString &text);
|
||||
void SetPreviewCalculationFormula(const QString &name, const QString &text);
|
||||
|
||||
void SetIncrementDescription(const QString &name, const QString &text);
|
||||
void SetPreviewCalculationDescription(const QString &name, const QString &text);
|
||||
|
||||
void ReplaceNameInFormula(QVector<VFormulaField> &expressions, const QString &name, const QString &newName);
|
||||
|
||||
|
@ -242,9 +237,8 @@ private:
|
|||
void RemoveIncrement(const QString &type, const QString &name);
|
||||
void MoveUpIncrement(const QString &type, const QString &name);
|
||||
void MoveDownIncrement(const QString &type, const QString &name);
|
||||
void SetIncrementName(const QString &type, const QString &name, const QString &text);
|
||||
void SetIncrementFormula(const QString &type, const QString &name, const QString &text);
|
||||
void SetIncrementDescription(const QString &type, const QString &name, const QString &text);
|
||||
|
||||
void SetIncrementAttribute(const QString &name, const QString &attr, const QString &text);
|
||||
};
|
||||
|
||||
#endif // VPATTERN_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user