Fix Lupdate warnings.
This commit is contained in:
parent
0a681d7f93
commit
1669fbd3b2
|
@ -45,6 +45,7 @@ class VPSheet;
|
|||
|
||||
class VPPiece : public VLayoutPiece
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(VPPiece) // NOLINT
|
||||
public:
|
||||
VPPiece() = default;
|
||||
explicit VPPiece(const VLayoutPiece &layoutPiece);
|
||||
|
|
|
@ -44,6 +44,7 @@ QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
|
|||
|
||||
class VAbstractConverter :public VDomDocument
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
explicit VAbstractConverter(const QString &fileName);
|
||||
virtual ~VAbstractConverter() = default;
|
||||
|
|
|
@ -2554,7 +2554,9 @@ auto VAbstractPattern::GetGroups(const QString &patternPieceName) -> QMap<quint3
|
|||
VGroupData groupData;
|
||||
const quint32 id = GetParametrUInt(group, AttrId, QChar('0'));
|
||||
groupData.visible = GetParametrBool(group, AttrVisible, trueStr);
|
||||
groupData.name = GetParametrString(group, AttrName, tr("New group"));
|
||||
groupData.name =
|
||||
GetParametrString(group, AttrName,
|
||||
QCoreApplication::translate("VAbstractPattern", "New group"));
|
||||
groupData.tags = FilterGroupTags(GetParametrEmptyString(group, AttrTags));
|
||||
groupData.tool = GetParametrUInt(group, AttrTool, NULL_ID_STR);
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ class QString;
|
|||
|
||||
class VLayoutConverter : public VAbstractConverter
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
explicit VLayoutConverter(const QString &fileName);
|
||||
~VLayoutConverter() override =default;
|
||||
|
|
|
@ -211,7 +211,7 @@ auto VAbstartMeasurementDimension::IsRangeValid() -> bool
|
|||
|
||||
if (not valid)
|
||||
{
|
||||
m_error = tr("Invalid min/max range");
|
||||
m_error = QCoreApplication::translate("VAbstartMeasurementDimension", "Invalid min/max range");
|
||||
}
|
||||
|
||||
return valid;
|
||||
|
@ -223,7 +223,7 @@ auto VAbstartMeasurementDimension::IsStepValid() -> bool
|
|||
bool valid = ValidSteps().indexOf(m_step) != -1;
|
||||
if (not valid)
|
||||
{
|
||||
m_error = tr("Invalid step");
|
||||
m_error = QCoreApplication::translate("VAbstartMeasurementDimension", "Invalid step");
|
||||
}
|
||||
|
||||
return valid;
|
||||
|
@ -235,7 +235,7 @@ auto VAbstartMeasurementDimension::IsBaseValid() -> bool
|
|||
bool valid = ValidBases().indexOf(m_baseValue) != -1;
|
||||
if (not valid)
|
||||
{
|
||||
m_error = tr("Base value invalid");
|
||||
m_error = QCoreApplication::translate("VAbstartMeasurementDimension", "Base value invalid");
|
||||
}
|
||||
|
||||
return valid;
|
||||
|
@ -253,13 +253,13 @@ auto VAbstartMeasurementDimension::DimensionName(MeasurementDimension type) -> Q
|
|||
switch(type)
|
||||
{
|
||||
case MeasurementDimension::X:
|
||||
return tr("Height", "dimension");
|
||||
return QCoreApplication::translate("VAbstartMeasurementDimension", "Height", "dimension");
|
||||
case MeasurementDimension::Y:
|
||||
return tr("Size", "dimension");
|
||||
return QCoreApplication::translate("VAbstartMeasurementDimension", "Size", "dimension");
|
||||
case MeasurementDimension::W:
|
||||
return tr("Waist", "dimension");
|
||||
return QCoreApplication::translate("VAbstartMeasurementDimension", "Waist", "dimension");
|
||||
case MeasurementDimension::Z:
|
||||
return tr("Hip", "dimension");
|
||||
return QCoreApplication::translate("VAbstartMeasurementDimension", "Hip", "dimension");
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
@ -278,19 +278,28 @@ auto VAbstartMeasurementDimension::DimensionToolTip(const MeasurementDimension_p
|
|||
case MeasurementDimension::Y:
|
||||
if (dimension->CustomName().isEmpty() && dimension->IsBodyMeasurement())
|
||||
{
|
||||
return fc ? tr("Chest full circumference", "dimension") : tr("Chest half circumference", "dimension");
|
||||
return fc ? QCoreApplication::translate("VAbstartMeasurementDimension", "Chest full circumference",
|
||||
"dimension")
|
||||
: QCoreApplication::translate("VAbstartMeasurementDimension", "Chest half circumference",
|
||||
"dimension");
|
||||
}
|
||||
return {};
|
||||
case MeasurementDimension::W:
|
||||
if (dimension->CustomName().isEmpty() && dimension->IsBodyMeasurement())
|
||||
{
|
||||
return fc ? tr("Waist full circumference", "dimension") : tr("Waist half circumference", "dimension");
|
||||
return fc ? QCoreApplication::translate("VAbstartMeasurementDimension", "Waist full circumference",
|
||||
"dimension")
|
||||
: QCoreApplication::translate("VAbstartMeasurementDimension", "Waist half circumference",
|
||||
"dimension");
|
||||
}
|
||||
return {};
|
||||
case MeasurementDimension::Z:
|
||||
if (dimension->CustomName().isEmpty() && dimension->IsBodyMeasurement())
|
||||
{
|
||||
return fc ? tr("Hip full circumference", "dimension") : tr("Hip half circumference", "dimension");
|
||||
return fc ? QCoreApplication::translate("VAbstartMeasurementDimension", "Hip full circumference",
|
||||
"dimension")
|
||||
: QCoreApplication::translate("VAbstartMeasurementDimension", "Hip half circumference",
|
||||
"dimension");
|
||||
}
|
||||
return {};
|
||||
case MeasurementDimension::X:
|
||||
|
|
|
@ -1069,7 +1069,9 @@ auto VAbstractPiece::Equidistant(QVector<VSAPoint> points, qreal width, const QS
|
|||
points = CorrectEquidistantPoints(points);
|
||||
if ( points.size() < 3 )
|
||||
{
|
||||
const QString errorMsg = tr("Piece '%1'. Not enough points to build seam allowance.").arg(name);
|
||||
const QString errorMsg =
|
||||
QCoreApplication::translate("VAbstractPiece", "Piece '%1'. Not enough points to build seam allowance.")
|
||||
.arg(name);
|
||||
VAbstractApplication::VApp()->IsPedantic() ? throw VException(errorMsg) :
|
||||
qWarning() << VAbstractValApplication::warningMessageSignature + errorMsg;
|
||||
return {};
|
||||
|
|
|
@ -291,11 +291,11 @@ QString VToolCutArc::MakeToolTip() const
|
|||
->FormulaToUser(formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||
const qreal length = Visualization::FindValFromUser(expression, VAbstractTool::data.DataVariables());
|
||||
|
||||
const QString arcStr = tr("Arc");
|
||||
const QString lengthStr = tr("length");
|
||||
const QString startAngleStr = tr("start angle");
|
||||
const QString endAngleStr = tr("end angle");
|
||||
const QString radiusStr = tr("radius");
|
||||
const QString arcStr = QCoreApplication::translate("VToolCutArc", "Arc");
|
||||
const QString lengthStr = QCoreApplication::translate("VToolCutArc", "length");
|
||||
const QString startAngleStr = QCoreApplication::translate("VToolCutArc", "start angle");
|
||||
const QString endAngleStr = QCoreApplication::translate("VToolCutArc", "end angle");
|
||||
const QString radiusStr = QCoreApplication::translate("VToolCutArc", "radius");
|
||||
|
||||
const QSharedPointer<VPointF> point = VAbstractTool::data.GeometricObject<VPointF>(m_id);
|
||||
|
||||
|
@ -326,7 +326,9 @@ QString VToolCutArc::MakeToolTip() const
|
|||
.arg(arc.GetStartAngle())
|
||||
.arg(arcStr + arcNumber + QChar(QChar::Space) + endAngleStr)
|
||||
.arg(arc.GetEndAngle())
|
||||
.arg(arcStr + arcNumber + QChar(QChar::Space) + tr("label"), arc.ObjectName());
|
||||
.arg(arcStr + arcNumber +
|
||||
QChar(QChar::Space) + QCoreApplication::translate("VToolCutArc", "label"),
|
||||
arc.ObjectName());
|
||||
return toolTip;
|
||||
};
|
||||
|
||||
|
|
|
@ -302,8 +302,8 @@ auto VToolCutSpline::MakeToolTip() const -> QString
|
|||
VSpline spline2 = VSpline(VPointF(point), spl2p2, spl2p3, spl->GetP4());
|
||||
spline2.SetAliasSuffix(m_aliasSuffix2);
|
||||
|
||||
const QString curveStr = tr("Curve");
|
||||
const QString lengthStr = tr("length");
|
||||
const QString curveStr = QCoreApplication::translate("VToolCutSpline", "Curve");
|
||||
const QString lengthStr = QCoreApplication::translate("VToolCutSpline", "length");
|
||||
|
||||
const QString toolTip = QString("<table>"
|
||||
"<tr> <td><b>%6:</b> %7</td> </tr>"
|
||||
|
@ -316,8 +316,10 @@ auto VToolCutSpline::MakeToolTip() const -> QString
|
|||
.arg(UnitsToStr(VAbstractValApplication::VApp()->patternUnits(), true),
|
||||
curveStr + QStringLiteral("2 ") + lengthStr)
|
||||
.arg(VAbstractValApplication::VApp()->fromPixel(spline2.GetLength()))
|
||||
.arg(curveStr + QStringLiteral(" 1") + tr("label"), spline1.ObjectName(),
|
||||
curveStr + QStringLiteral(" 2") + tr("label"), spline2.ObjectName());
|
||||
.arg(curveStr + QStringLiteral(" 1") + QCoreApplication::translate("VToolCutSpline", "label"),
|
||||
spline1.ObjectName(),
|
||||
curveStr + QStringLiteral(" 2") + QCoreApplication::translate("VToolCutSpline", "label"),
|
||||
spline2.ObjectName());
|
||||
|
||||
return toolTip;
|
||||
}
|
||||
|
|
|
@ -393,8 +393,8 @@ QString VToolCutSplinePath::MakeToolTip() const
|
|||
splPath1->SetAliasSuffix(m_aliasSuffix1);
|
||||
splPath2->SetAliasSuffix(m_aliasSuffix2);
|
||||
|
||||
const QString curveStr = tr("Curve");
|
||||
const QString lengthStr = tr("length");
|
||||
const QString curveStr = QCoreApplication::translate("VToolCutSplinePath", "Curve");
|
||||
const QString lengthStr = QCoreApplication::translate("VToolCutSplinePath", "length");
|
||||
|
||||
const QString toolTip = QString("<table>"
|
||||
"<tr> <td><b>%6:</b> %7</td> </tr>"
|
||||
|
@ -407,8 +407,10 @@ QString VToolCutSplinePath::MakeToolTip() const
|
|||
.arg(UnitsToStr(VAbstractValApplication::VApp()->patternUnits(), true),
|
||||
curveStr + QLatin1String("2 ") + lengthStr)
|
||||
.arg(VAbstractValApplication::VApp()->fromPixel(splPath2->GetLength()))
|
||||
.arg(curveStr + QLatin1String(" 1") + tr("label"), splPath1->ObjectName(),
|
||||
curveStr + QLatin1String(" 2") + tr("label"), splPath2->ObjectName());
|
||||
.arg(curveStr + QLatin1String(" 1") + QCoreApplication::translate("VToolCutSplinePath", "label"),
|
||||
splPath1->ObjectName(),
|
||||
curveStr + QLatin1String(" 2") + QCoreApplication::translate("VToolCutSplinePath", "label"),
|
||||
splPath2->ObjectName());
|
||||
|
||||
delete splPath1;
|
||||
delete splPath2;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
class HideAllBackgroundImages : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
HideAllBackgroundImages(bool hide, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~HideAllBackgroundImages() override =default;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
class HideBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
HideBackgroundImage(QUuid id, bool hide, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~HideBackgroundImage() override =default;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
class HoldAllBackgroundImages : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
HoldAllBackgroundImages(bool hold, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~HoldAllBackgroundImages() override =default;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
class HoldBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
HoldBackgroundImage(QUuid id, bool hold, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~HoldBackgroundImage() override =default;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
class OpaqueBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
OpaqueBackgroundImage(QUuid id, qreal opacity, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~OpaqueBackgroundImage() override =default;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
class RenameBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
RenameBackgroundImage(QUuid id, const QString &name, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~RenameBackgroundImage() override =default;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
class ResetBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
ResetBackgroundImage(QUuid id, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~ResetBackgroundImage() override = default;
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
class RotateBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
RotateBackgroundImage(QUuid id, const QTransform &matrix, VAbstractPattern *doc, bool allowMerge = false,
|
||||
QUndoCommand *parent = nullptr);
|
||||
|
|
|
@ -44,6 +44,7 @@ enum class ZValueMoveType
|
|||
|
||||
class ZValueMoveBackgroundImage : public VUndoCommand
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public:
|
||||
ZValueMoveBackgroundImage(QUuid id, ZValueMoveType move, VAbstractPattern *doc, QUndoCommand *parent = nullptr);
|
||||
~ZValueMoveBackgroundImage() override =default;
|
||||
|
|
|
@ -682,7 +682,7 @@ auto ColorPickerPopup::CustomItems() const ->QVector<ColorPickerItem *>
|
|||
|
||||
for (auto *item : items)
|
||||
{
|
||||
if (item!= nullptr && item->text() == tr("Custom"))
|
||||
if (item!= nullptr && item->text() == QCoreApplication::translate("ColorPickerPopup", "Custom"))
|
||||
{
|
||||
customItems.append(item);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user