From fdc1eac7345041660aa4f82dded72d6f3016fffe Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 17 Oct 2016 14:53:46 +0300 Subject: [PATCH 1/3] Refactoring DialogTool::GetComboBoxCurrentData. Returned wrong default value. --HG-- branch : develop --- src/libs/vtools/dialogs/tools/dialogalongline.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogarc.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogbisector.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogendline.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogheight.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogline.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialognormal.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogspline.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogsplinepath.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogtool.cpp | 4 ++-- src/libs/vtools/dialogs/tools/dialogtool.h | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/libs/vtools/dialogs/tools/dialogalongline.cpp b/src/libs/vtools/dialogs/tools/dialogalongline.cpp index ee14c0525..93909f136 100644 --- a/src/libs/vtools/dialogs/tools/dialogalongline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogalongline.cpp @@ -332,7 +332,7 @@ void DialogAlongLine::SetTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogAlongLine::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -359,7 +359,7 @@ void DialogAlongLine::SetPointName(const QString &value) */ QString DialogAlongLine::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogarc.cpp b/src/libs/vtools/dialogs/tools/dialogarc.cpp index a7f40d7b3..435cbccbc 100644 --- a/src/libs/vtools/dialogs/tools/dialogarc.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarc.cpp @@ -164,7 +164,7 @@ void DialogArc::SetF2(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogArc::GetColor() const { - return GetComboBoxCurrentData(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp index 02cb2de0e..d283430ad 100644 --- a/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp +++ b/src/libs/vtools/dialogs/tools/dialogarcwithlength.cpp @@ -192,7 +192,7 @@ void DialogArcWithLength::SetLength(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogArcWithLength::GetColor() const { - return GetComboBoxCurrentData(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogbisector.cpp b/src/libs/vtools/dialogs/tools/dialogbisector.cpp index 070edd7d5..76e617c6d 100644 --- a/src/libs/vtools/dialogs/tools/dialogbisector.cpp +++ b/src/libs/vtools/dialogs/tools/dialogbisector.cpp @@ -313,7 +313,7 @@ void DialogBisector::SetThirdPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogBisector::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -355,7 +355,7 @@ void DialogBisector::closeEvent(QCloseEvent *event) */ QString DialogBisector::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp index 8a4fe49c2..0558c91e4 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezier.cpp @@ -110,7 +110,7 @@ void DialogCubicBezier::SetSpline(const VCubicBezier &spline) //--------------------------------------------------------------------------------------------------------------------- QString DialogCubicBezier::GetColor() const { - return GetComboBoxCurrentData(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp index 194415fb6..cf8a1f340 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp @@ -117,7 +117,7 @@ void DialogCubicBezierPath::SetPath(const VCubicBezierPath &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogCubicBezierPath::GetColor() const { - return GetComboBoxCurrentData(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp index a83349d8a..d4ae3165e 100644 --- a/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcurveintersectaxis.cpp @@ -108,7 +108,7 @@ void DialogCurveIntersectAxis::SetPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogCurveIntersectAxis::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- @@ -178,7 +178,7 @@ void DialogCurveIntersectAxis::setCurveId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogCurveIntersectAxis::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogendline.cpp b/src/libs/vtools/dialogs/tools/dialogendline.cpp index ae9f1622e..73a098eed 100644 --- a/src/libs/vtools/dialogs/tools/dialogendline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogendline.cpp @@ -281,7 +281,7 @@ void DialogEndLine::SetBasePointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogEndLine::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -375,7 +375,7 @@ DialogEndLine::~DialogEndLine() */ QString DialogEndLine::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogheight.cpp b/src/libs/vtools/dialogs/tools/dialogheight.cpp index e4b3c0880..cd710a1dd 100644 --- a/src/libs/vtools/dialogs/tools/dialogheight.cpp +++ b/src/libs/vtools/dialogs/tools/dialogheight.cpp @@ -164,7 +164,7 @@ void DialogHeight::SetP2LineId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogHeight::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -295,7 +295,7 @@ void DialogHeight::ShowVisualization() */ QString DialogHeight::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogline.cpp b/src/libs/vtools/dialogs/tools/dialogline.cpp index 7258a303f..69801ed13 100644 --- a/src/libs/vtools/dialogs/tools/dialogline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogline.cpp @@ -110,7 +110,7 @@ void DialogLine::SetTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogLine::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -247,5 +247,5 @@ quint32 DialogLine::GetSecondPoint() const */ QString DialogLine::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } diff --git a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp index acd682196..698403ef7 100644 --- a/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/libs/vtools/dialogs/tools/dialoglineintersectaxis.cpp @@ -121,7 +121,7 @@ void DialogLineIntersectAxis::SetPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogLineIntersectAxis::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- @@ -207,7 +207,7 @@ void DialogLineIntersectAxis::SetSecondPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogLineIntersectAxis::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialognormal.cpp b/src/libs/vtools/dialogs/tools/dialognormal.cpp index 322f8abfc..992f25314 100644 --- a/src/libs/vtools/dialogs/tools/dialognormal.cpp +++ b/src/libs/vtools/dialogs/tools/dialognormal.cpp @@ -242,7 +242,7 @@ void DialogNormal::SetSecondPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogNormal::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -331,7 +331,7 @@ void DialogNormal::SetPointName(const QString &value) */ QString DialogNormal::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp index d659aeac2..b25739dd8 100644 --- a/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/libs/vtools/dialogs/tools/dialogshoulderpoint.cpp @@ -267,7 +267,7 @@ void DialogShoulderPoint::SetP3(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogShoulderPoint::GetLineColor() const { - return GetComboBoxCurrentData(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- @@ -354,7 +354,7 @@ void DialogShoulderPoint::SetPointName(const QString &value) */ QString DialogShoulderPoint::GetTypeLine() const { - return GetComboBoxCurrentData(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType, TypeLineLine); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp index 3c3689ee5..f1075487b 100644 --- a/src/libs/vtools/dialogs/tools/dialogspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogspline.cpp @@ -614,7 +614,7 @@ void DialogSpline::SetSpline(const VSpline &spline) //--------------------------------------------------------------------------------------------------------------------- QString DialogSpline::GetColor() const { - return GetComboBoxCurrentData(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index b9be5f697..5d1aad667 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -172,7 +172,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogSplinePath::GetColor() const { - return GetComboBoxCurrentData(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor, ColorBlack); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index 48a492a0c..3b844a682 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -302,7 +302,7 @@ void DialogTool::FillComboBoxHCrossCurvesPoint(QComboBox *box) const } //--------------------------------------------------------------------------------------------------------------------- -QString DialogTool::GetComboBoxCurrentData(const QComboBox *box) const +QString DialogTool::GetComboBoxCurrentData(const QComboBox *box, const QString &def) const { SCASSERT(box != nullptr) QString value; @@ -313,7 +313,7 @@ QString DialogTool::GetComboBoxCurrentData(const QComboBox *box) const #endif if (value.isEmpty()) { - value = TypeLineLine; + value = def; } return value; } diff --git a/src/libs/vtools/dialogs/tools/dialogtool.h b/src/libs/vtools/dialogs/tools/dialogtool.h index 53e4bbb1a..cc5d29af8 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.h +++ b/src/libs/vtools/dialogs/tools/dialogtool.h @@ -224,7 +224,7 @@ protected: void FillComboBoxHCrossCurvesPoint(QComboBox *box) const; virtual void CheckState(); - QString GetComboBoxCurrentData(const QComboBox *box)const; + QString GetComboBoxCurrentData(const QComboBox *box, const QString &def)const; void ChangeCurrentData(QComboBox *box, const QVariant &value) const; void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer, const QString &postfix = QString()); void ValFormulaChanged(bool &flag, QPlainTextEdit *edit, QTimer * timer, From 5c821e331d0b71c52101d31fbaa17249d56cc5a7 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 17 Oct 2016 16:55:58 +0300 Subject: [PATCH 2/3] Refactoring function MapDiagrams(). ref #576. --HG-- branch : develop --- src/app/tape/dialogs/dialogmdatabase.cpp | 2 +- src/libs/vmisc/def.cpp | 42 +++++++++++++----------- src/libs/vmisc/def.h | 5 +-- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/app/tape/dialogs/dialogmdatabase.cpp b/src/app/tape/dialogs/dialogmdatabase.cpp index ea5c5304e..e3ce2ccf8 100644 --- a/src/app/tape/dialogs/dialogmdatabase.cpp +++ b/src/app/tape/dialogs/dialogmdatabase.cpp @@ -168,7 +168,7 @@ void DialogMDataBase::RetranslateGroups() QString DialogMDataBase::ImgTag(const QString &number) { QString imgUrl(""); // In case of error - const QString filePath = QString("://diagrams/%1.svg").arg(MapDiagrams(number)); + const QString filePath = QString("://diagrams/%1.svg").arg(MapDiagrams(qApp->TrVars(), number)); if (QFileInfo(filePath).exists()) { // Load your SVG diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index af7e43258..fdf0eaa47 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -1147,20 +1147,22 @@ QStringList ListPMSystems() } //--------------------------------------------------------------------------------------------------------------------- -QStringList ListNumbers(const QStringList &listMeasurements) +QStringList ListNumbers(const VTranslateMeasurements *trM, const QStringList &listMeasurements) { + SCASSERT(trM != nullptr); + QStringList numbers; for (int i=0; i < listMeasurements.size(); ++i) { - numbers.append(qApp->TrVars()->MNumber(listMeasurements.at(i))); + numbers.append(trM->MNumber(listMeasurements.at(i))); } return numbers; } //--------------------------------------------------------------------------------------------------------------------- -QString MapDiagrams(const QString &number) +QString MapDiagrams(const VTranslateMeasurements *trM, const QString &number) { - switch (ListNumbers(ListGroupA()).indexOf(number)) + switch (ListNumbers(trM, ListGroupA()).indexOf(number)) { // A case 0: // A01 @@ -1213,7 +1215,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupB()).indexOf(number)) + switch (ListNumbers(trM, ListGroupB()).indexOf(number)) { // B case 0: // B01 @@ -1230,7 +1232,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupC()).indexOf(number)) + switch (ListNumbers(trM, ListGroupC()).indexOf(number)) { // C case 0: // C01 @@ -1243,7 +1245,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupD()).indexOf(number)) + switch (ListNumbers(trM, ListGroupD()).indexOf(number)) { // D case 0: // D01 @@ -1260,7 +1262,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupE()).indexOf(number)) + switch (ListNumbers(trM, ListGroupE()).indexOf(number)) { // E case 0: // E01 @@ -1275,7 +1277,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupF()).indexOf(number)) + switch (ListNumbers(trM, ListGroupF()).indexOf(number)) { // F case 0: // F01 @@ -1294,7 +1296,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupG()).indexOf(number)) + switch (ListNumbers(trM, ListGroupG()).indexOf(number)) { // G case 0: // G01 @@ -1393,7 +1395,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupH()).indexOf(number)) + switch (ListNumbers(trM, ListGroupH()).indexOf(number)) { // H case 0: // H01 @@ -1484,7 +1486,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupI()).indexOf(number)) + switch (ListNumbers(trM, ListGroupI()).indexOf(number)) { // I case 0: // I01 @@ -1519,7 +1521,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupJ()).indexOf(number)) + switch (ListNumbers(trM, ListGroupJ()).indexOf(number)) { // J case 0: // J01 @@ -1546,7 +1548,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupK()).indexOf(number)) + switch (ListNumbers(trM, ListGroupK()).indexOf(number)) { // K case 0: // K01 @@ -1579,7 +1581,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupL()).indexOf(number)) + switch (ListNumbers(trM, ListGroupL()).indexOf(number)) { // L case 0: // L01 @@ -1630,7 +1632,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupM()).indexOf(number)) + switch (ListNumbers(trM, ListGroupM()).indexOf(number)) { // M case 0: // M01 @@ -1665,7 +1667,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupN()).indexOf(number)) + switch (ListNumbers(trM, ListGroupN()).indexOf(number)) { // N case 0: // N01 @@ -1688,7 +1690,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupO()).indexOf(number)) + switch (ListNumbers(trM, ListGroupO()).indexOf(number)) { // O case 0: // O01 @@ -1723,7 +1725,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupP()).indexOf(number)) + switch (ListNumbers(trM, ListGroupP()).indexOf(number)) { // P case 0: // P01 @@ -1754,7 +1756,7 @@ QString MapDiagrams(const QString &number) break; } - switch (ListNumbers(ListGroupQ()).indexOf(number)) + switch (ListNumbers(trM, ListGroupQ()).indexOf(number)) { // Q case 0: // Q01 diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index e75f431ef..dd5dda5e4 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -51,6 +51,7 @@ template class QSharedPointer; class QComboBox; class QMarginsF; +class VTranslateMeasurements; #define SceneSize 50000 #define DefPointRadius 1.5//mm @@ -499,8 +500,8 @@ QStringList ListGroupO(); QStringList ListGroupP(); QStringList ListGroupQ(); -QStringList ListNumbers(const QStringList & listMeasurements); -QString MapDiagrams(const QString &number); +QStringList ListNumbers(const VTranslateMeasurements *trM, const QStringList & listMeasurements); +QString MapDiagrams(const VTranslateMeasurements *trM, const QString &number); // pattern making systems codes extern const QString p0_S; From 3e9c3a95ac995df896b153bf770fc988150d937d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 20 Oct 2016 22:18:06 +0300 Subject: [PATCH 3/3] Fixed issue #579. Gentoo ebuild: syntax error. --HG-- branch : develop --- dist/ebuild/valentina-0.0.0(template_stable).ebuild | 2 +- dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/ebuild/valentina-0.0.0(template_stable).ebuild b/dist/ebuild/valentina-0.0.0(template_stable).ebuild index a36c0c907..eba6dc87f 100644 --- a/dist/ebuild/valentina-0.0.0(template_stable).ebuild +++ b/dist/ebuild/valentina-0.0.0(template_stable).ebuild @@ -33,7 +33,7 @@ CDEPEND=" dev-qt/qtprintsupport:5 dev-qt/qtnetwork:5 app-text/poppler" -RDEPEND="${CDEPEND} +RDEPEND="${CDEPEND}" DEPEND="${CDEPEND} app-arch/unzip" diff --git a/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild b/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild index 8b2191555..104fcc9fa 100644 --- a/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild +++ b/dist/ebuild/valentina-0.0.0_alpha(template_unstable).ebuild @@ -35,7 +35,7 @@ CDEPEND=" dev-qt/qtprintsupport:5 dev-qt/qtnetwork:5 app-text/poppler" -RDEPEND="${CDEPEND} +RDEPEND="${CDEPEND}" DEPEND="${CDEPEND} dev-util/ccache"