Merge with develop.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-02-23 09:29:28 +02:00
commit e7651c7194
13 changed files with 18 additions and 43 deletions

View File

@ -192,6 +192,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
#endif
case QtDebugMsg:
Q_UNREACHABLE(); //-V501
break;
default:
break;
}

View File

@ -382,7 +382,6 @@ QVector<QPointF> VAbstractPiece::EkvPoint(const VSAPoint &p1Line1, const VSAPoin
// The easiest, real intersection
points.append(CrosPoint);
return points;
break;
case (QLineF::UnboundedIntersection):
{ // Most common case
const qreal localWidth = MaxLocalSA(p2Line1, width);
@ -480,7 +479,6 @@ QT_WARNING_POP
/*If we have correct lines this means lines lie on a line.*/
points.append(bigLine1.p2());
return points;
break;
default:
break;
}

View File

@ -115,11 +115,6 @@ VLayoutPiece VLayoutPiece::Create(const VPiece &piece, const VContainer *pattern
if (geom.IsVisible() == true)
{
VAbstractPattern* pDoc = qApp->getCurrentDocument();
QDate date;
if (pDoc->IsDateVisible() == true)
{
date = QDate::currentDate();
}
det.SetPatternInfo(pDoc, geom, qApp->font(), pattern->size(), pattern->height());
}
const VGrainlineGeometry& grainlineGeom = piece.GetGrainlineGeometry();
@ -255,8 +250,9 @@ void VLayoutPiece::SetGrainline(const VGrainlineGeometry& geom, const VContainer
dLen = cal2.EvalFormula(rPattern.PlainVariables(), qsFormula);
dLen = ToPixel(dLen, *rPattern.GetPatternUnit());
}
catch(...)
catch(qmu::QmuParserError &e)
{
Q_UNUSED(e);
return;
}

View File

@ -151,17 +151,13 @@ QChar VTapeSettings::GetCSVSeparator() const
{
case 0:
return QChar('\t');
break;
case 1:
return QChar(';');
break;
case 2:
return QChar(' ');
break;
case 3:
default:
return QChar(',');
break;
}
}

View File

@ -403,10 +403,8 @@ inline T DialogTool::getCurrentCrossPoint(QComboBox *box) const
case 1:
case 2:
return static_cast<T>(value);
break;
default:
return static_cast<T>(1);
break;
}
}

View File

@ -137,6 +137,7 @@ QPointF VToolShoulderPoint::FindPoint(const QPointF &p1Line, const QPointF &p2Li
return line.p2();
}
}
return QPointF();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -181,7 +181,6 @@ QPointF VToolPointFromArcAndTangent::FindPoint(const QPointF &p, const VArc *arc
{
return p2;
}
break;
case 1:
if (flagP1)
{
@ -191,11 +190,9 @@ QPointF VToolPointFromArcAndTangent::FindPoint(const QPointF &p, const VArc *arc
{
return p2;
}
break;
case 0:
default:
return QPointF(0, 0);
break;
return QPointF();
}
break;
@ -207,15 +204,14 @@ QPointF VToolPointFromArcAndTangent::FindPoint(const QPointF &p, const VArc *arc
}
else
{
return QPointF(0, 0);
return QPointF();
}
break;
case 3:
case 0:
default:
return QPointF(0, 0);
break;
return QPointF();
}
return QPointF();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -166,15 +166,12 @@ QPointF VToolPointFromCircleAndTangent::FindPoint(const QPointF &p, const QPoint
{
return p2;
}
break;
case 1:
return p1;
break;
case 3:
case 0:
default:
return QPointF(0, 0);
break;
return QPointF();
}
}

View File

@ -118,10 +118,8 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF &cente
{
case 0:
return QPointF();
break;
case 1:
return p1;
break;
case 2:
{
const bool flagP1 = VGObject::IsPointOnLineSegment (p1, firstPoint, secondPoint);
@ -150,13 +148,12 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF &cente
return p2;
}
}
break;
}
default:
qDebug() << "Unxpected value" << res;
return QPointF();
break;
}
return QPointF();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -188,7 +188,6 @@ QPointF VToolPointOfIntersectionArcs::FindPoint(const VArc *arc1, const VArc *ar
{
return p2;
}
break;
case 1:
if (flagP1)
{
@ -198,11 +197,9 @@ QPointF VToolPointOfIntersectionArcs::FindPoint(const VArc *arc1, const VArc *ar
{
return p2;
}
break;
case 0:
default:
return QPointF(0, 0);
break;
return QPointF();
}
break;
@ -214,15 +211,14 @@ QPointF VToolPointOfIntersectionArcs::FindPoint(const VArc *arc1, const VArc *ar
}
else
{
return QPointF(0, 0);
return QPointF();
}
break;
case 3:
case 0:
default:
return QPointF(0, 0);
break;
return QPointF();
}
return QPointF();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -178,15 +178,12 @@ QPointF VToolPointOfIntersectionCircles::FindPoint(const QPointF &c1Point, const
{
return p2;
}
break;
case 1:
return p1;
break;
case 3:
case 0:
default:
return QPointF(0, 0);
break;
return QPointF();
}
}

View File

@ -228,6 +228,7 @@ QPointF VToolTriangle::FindPoint(const QPointF &axisP1, const QPointF &axisP2, c
return line.p2();
}
}
return QPointF();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -526,8 +526,9 @@ void VToolSeamAllowance::UpdateGrainline()
Calculator cal2;
dLength = cal2.EvalFormula(VDataTool::data.PlainVariables(), qsFormula);
}
catch(...)
catch(qmu::QmuParserError &e)
{
Q_UNUSED(e);
m_grainLine->hide();
return;
}