MinGW warnings.

--HG--
branch : develop
This commit is contained in:
dismine 2014-09-20 20:10:05 +03:00
parent daf4e4562a
commit 069f479495
5 changed files with 11 additions and 13 deletions

View File

@ -298,6 +298,7 @@ void DialogArc::LineAngles()
void DialogArc::RadiusChanged()
{
labelEditFormula = ui->labelEditRadius;
labelResultCalculation = ui->labelResultRadius;
ValFormulaChanged(flagRadius, ui->plainTextEditFormula, timerRadius);
}
@ -308,6 +309,7 @@ void DialogArc::RadiusChanged()
void DialogArc::F1Changed()
{
labelEditFormula = ui->labelEditF1;
labelResultCalculation = ui->labelResultF1;
ValFormulaChanged(flagF1, ui->plainTextEditF1, timerF1);
}
@ -318,6 +320,7 @@ void DialogArc::F1Changed()
void DialogArc::F2Changed()
{
labelEditFormula = ui->labelEditF2;
labelResultCalculation = ui->labelResultF2;
ValFormulaChanged(flagF2, ui->plainTextEditF2, timerF2);
}
@ -341,7 +344,7 @@ void DialogArc::EvalRadius()
{
labelEditFormula = ui->labelEditRadius;
const QString postfix = VDomDocument::UnitsToStr(qApp->patternUnit(), true);
Eval(ui->plainTextEditFormula->toPlainText(), flagRadius, timerRadius, ui->labelResultRadius, postfix);
Eval(ui->plainTextEditFormula->toPlainText(), flagRadius, ui->labelResultRadius, postfix);
}
//---------------------------------------------------------------------------------------------------------------------
@ -352,7 +355,7 @@ void DialogArc::EvalF1()
{
labelEditFormula = ui->labelEditF1;
const QString postfix = QStringLiteral("°");
Eval(ui->plainTextEditF1->toPlainText(), flagF1, timerF1, ui->labelResultF1, postfix, false);
Eval(ui->plainTextEditF1->toPlainText(), flagF1, ui->labelResultF1, postfix, false);
}
//---------------------------------------------------------------------------------------------------------------------
@ -363,7 +366,7 @@ void DialogArc::EvalF2()
{
labelEditFormula = ui->labelEditF2;
const QString postfix = QStringLiteral("°");
Eval(ui->plainTextEditF2->toPlainText(), flagF2, timerF2, ui->labelResultF2, postfix, false);
Eval(ui->plainTextEditF2->toPlainText(), flagF2, ui->labelResultF2, postfix, false);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -102,7 +102,7 @@ void DialogEditWrongFormula::EvalFormula()
{
SCASSERT(plainTextEditFormula != nullptr);
SCASSERT(labelResultCalculation != nullptr);
Eval(plainTextEditFormula->toPlainText(), flagFormula, timerFormula, labelResultCalculation, postfix, checkZero);
Eval(plainTextEditFormula->toPlainText(), flagFormula, labelResultCalculation, postfix, checkZero);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -97,8 +97,7 @@ void DialogEndLine::EvalAngle()
{
labelEditFormula = ui->labelEditAngle;
const QString postfix = QStringLiteral("°");
Eval(ui->plainTextEditAngle->toPlainText(), flagError, timerFormula, ui->labelResultCalculationAngle, postfix,
false);
Eval(ui->plainTextEditAngle->toPlainText(), flagError, ui->labelResultCalculationAngle, postfix, false);
labelEditFormula = ui->labelEditFormula;
}

View File

@ -413,15 +413,12 @@ void DialogTool::ValFormulaChanged(bool &flag, QPlainTextEdit *edit, QTimer *tim
* @brief Eval evaluate formula and show result
* @param text formula
* @param flag flag state of formula
* @param timer timer of formula
* @param label label for signal error
* @param postfix unit name
* @param checkZero true - if formula can't be equal zero
*/
void DialogTool::Eval(const QString &text, bool &flag, QTimer *timer, QLabel *label, const QString& postfix,
bool checkZero)
void DialogTool::Eval(const QString &text, bool &flag, QLabel *label, const QString& postfix, bool checkZero)
{
SCASSERT(timer != nullptr);
SCASSERT(label != nullptr);
SCASSERT(labelEditFormula != nullptr);
if (text.isEmpty())
@ -484,7 +481,6 @@ void DialogTool::Eval(const QString &text, bool &flag, QTimer *timer, QLabel *la
}
}
CheckState();
//timer->stop();
}
//---------------------------------------------------------------------------------------------------------------------
@ -834,7 +830,7 @@ void DialogTool::EvalFormula()
SCASSERT(plainTextEditFormula != nullptr);
SCASSERT(labelResultCalculation != nullptr);
const QString postfix = VDomDocument::UnitsToStr(qApp->patternUnit());
Eval(plainTextEditFormula->toPlainText(), flagFormula, timerFormula, labelResultCalculation, postfix);
Eval(plainTextEditFormula->toPlainText(), flagFormula, labelResultCalculation, postfix);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -221,7 +221,7 @@ protected:
void PutValHere(QPlainTextEdit *plainTextEdit, QListWidget *listWidget);
void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer);
void ValFormulaChanged(bool &flag, QPlainTextEdit *edit, QTimer * timer);
void Eval(const QString &text, bool &flag, QTimer *timer, QLabel *label, const QString &postfix,
void Eval(const QString &text, bool &flag, QLabel *label, const QString &postfix,
bool checkZero = true);
void setCurrentPointId(QComboBox *box, quint32 &pointId, const quint32 &value) const;
void setCurrentSplineId(QComboBox *box, quint32 &splineId, const quint32 &value,