mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-08 01:54:37 +02:00
Sonar warnings.
This commit is contained in:
parent
f353b02530
commit
6c0a8f0b64
|
@ -340,11 +340,11 @@ void VLayoutConverter::ConvertPiecesToV0_1_5()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto StringToPath = [](const QString &path) -> QVector<QPointF>
|
auto StringToPath = [](const QString &path)
|
||||||
{
|
{
|
||||||
auto StringToPoint = [](const QString &point) -> QPointF
|
auto StringToPoint = [](const QString &point) -> QPointF
|
||||||
{
|
{
|
||||||
QStringList coordinates = point.split(coordintatesSep);
|
QStringList const coordinates = point.split(coordintatesSep);
|
||||||
if (coordinates.count() == 2)
|
if (coordinates.count() == 2)
|
||||||
{
|
{
|
||||||
return {coordinates.at(0).toDouble(), coordinates.at(1).toDouble()};
|
return {coordinates.at(0).toDouble(), coordinates.at(1).toDouble()};
|
||||||
|
@ -359,7 +359,7 @@ void VLayoutConverter::ConvertPiecesToV0_1_5()
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList points = path.split(pointsSep);
|
QStringList const points = path.split(pointsSep);
|
||||||
p.reserve(points.size());
|
p.reserve(points.size());
|
||||||
for (const auto &point : points)
|
for (const auto &point : points)
|
||||||
{
|
{
|
||||||
|
@ -372,9 +372,9 @@ void VLayoutConverter::ConvertPiecesToV0_1_5()
|
||||||
const QVector<QPointF> path = StringToPath(node.text());
|
const QVector<QPointF> path = StringToPath(node.text());
|
||||||
if (not path.isEmpty())
|
if (not path.isEmpty())
|
||||||
{
|
{
|
||||||
auto LineToString = [](const QLineF &line) -> QString
|
auto LineToString = [](const QLineF &line)
|
||||||
{
|
{
|
||||||
auto PointToString = [](const QPointF &p) -> QString
|
auto PointToString = [](const QPointF &p)
|
||||||
{ return NumberToString(p.x()) + coordintatesSep + NumberToString(p.y()); };
|
{ return NumberToString(p.x()) + coordintatesSep + NumberToString(p.y()); };
|
||||||
|
|
||||||
return PointToString(line.p1()) + groupSep + PointToString(line.p2());
|
return PointToString(line.p1()) + groupSep + PointToString(line.p2());
|
||||||
|
|
|
@ -35,7 +35,7 @@ class VTranslator : public QTranslator
|
||||||
Q_OBJECT // NOLINT
|
Q_OBJECT // NOLINT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VTranslator(QObject *parent = nullptr);
|
explicit VTranslator(QObject *parent = nullptr);
|
||||||
|
|
||||||
auto translate(const char *context, const char *sourceText, const char *disambiguation = nullptr, int n = -1) const
|
auto translate(const char *context, const char *sourceText, const char *disambiguation = nullptr, int n = -1) const
|
||||||
-> QString override;
|
-> QString override;
|
||||||
|
|
Loading…
Reference in a new issue