From d83039c4eea21f3892c021a5af3a7bf4116b80e6 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 24 Sep 2021 16:53:47 +0300 Subject: [PATCH] Compiler warnings. --- src/app/puzzle/layout/vppiece.cpp | 1 + src/app/puzzle/scene/vpmaingraphicsview.cpp | 5 +++ src/app/puzzle/vpmainwindow.cpp | 5 +++ src/app/valentina/mainwindow.cpp | 5 +++ src/app/valentina/xml/vpattern.cpp | 2 +- src/libs/ifc/xml/vabstractpattern.cpp | 8 ++--- src/libs/vformat/vmeasurements.cpp | 13 ++++---- src/libs/vformat/vpatternrecipe.cpp | 9 +++--- src/libs/vformat/vwatermark.cpp | 12 +++---- src/libs/vtest/warnings.pri | 3 ++ .../flipping/vtoolflippingbyaxis.cpp | 2 +- .../flipping/vtoolflippingbyline.cpp | 2 +- .../operation/vabstractoperation.cpp | 28 ++++++++++++----- .../tools/drawTools/operation/vtoolmove.cpp | 2 +- .../drawTools/operation/vtoolrotation.cpp | 2 +- .../drawTools/toolcurve/vabstractspline.cpp | 2 +- .../tools/drawTools/toolcurve/vtoolarc.cpp | 4 +-- .../toolcurve/vtoolarcwithlength.cpp | 4 +-- .../drawTools/toolcurve/vtoolcubicbezier.cpp | 6 ++-- .../toolcurve/vtoolcubicbezierpath.cpp | 4 +-- .../toolcurve/vtoolellipticalarc.cpp | 4 +-- .../tools/drawTools/toolcurve/vtoolspline.cpp | 6 ++-- .../drawTools/toolcurve/vtoolsplinepath.cpp | 6 ++-- .../tooldoublepoint/vtooltruedarts.cpp | 2 +- .../toolsinglepoint/toolcut/vtoolcut.cpp | 4 +-- .../toolsinglepoint/toolcut/vtoolcutarc.cpp | 6 ++-- .../toolcut/vtoolcutspline.cpp | 6 ++-- .../toolcut/vtoolcutsplinepath.cpp | 6 ++-- .../toollinepoint/vtoolalongline.cpp | 2 +- .../toollinepoint/vtoolbisector.cpp | 2 +- .../toollinepoint/vtoolcurveintersectaxis.cpp | 10 +++--- .../toollinepoint/vtoolendline.cpp | 2 +- .../toollinepoint/vtoolheight.cpp | 2 +- .../toollinepoint/vtoollineintersectaxis.cpp | 2 +- .../toollinepoint/vtoolnormal.cpp | 2 +- .../toollinepoint/vtoolshoulderpoint.cpp | 2 +- .../toolsinglepoint/vtoolbasepoint.cpp | 2 +- .../toolsinglepoint/vtoollineintersect.cpp | 2 +- .../vtoolpointfromarcandtangent.cpp | 2 +- .../vtoolpointfromcircleandtangent.cpp | 2 +- .../toolsinglepoint/vtoolpointofcontact.cpp | 2 +- .../vtoolpointofintersection.cpp | 2 +- .../vtoolpointofintersectionarcs.cpp | 2 +- .../vtoolpointofintersectioncircles.cpp | 2 +- .../vtoolpointofintersectioncurves.cpp | 18 +++++------ .../toolsinglepoint/vtooltriangle.cpp | 2 +- src/libs/vtools/tools/drawTools/vdrawtool.cpp | 3 +- src/libs/vtools/tools/drawTools/vtoolline.cpp | 2 +- src/libs/vtools/tools/vabstracttool.cpp | 10 +++--- src/libs/vtools/tools/vtoolseamallowance.cpp | 31 ++++++++++--------- .../vtools/undocommands/togglepiecestate.cpp | 2 +- 51 files changed, 151 insertions(+), 116 deletions(-) diff --git a/src/app/puzzle/layout/vppiece.cpp b/src/app/puzzle/layout/vppiece.cpp index b555265fa..748d6c851 100644 --- a/src/app/puzzle/layout/vppiece.cpp +++ b/src/app/puzzle/layout/vppiece.cpp @@ -38,6 +38,7 @@ #include #include #include +#include Q_LOGGING_CATEGORY(pPiece, "p.piece") diff --git a/src/app/puzzle/scene/vpmaingraphicsview.cpp b/src/app/puzzle/scene/vpmaingraphicsview.cpp index 364d43b41..20ec84101 100644 --- a/src/app/puzzle/scene/vpmaingraphicsview.cpp +++ b/src/app/puzzle/scene/vpmaingraphicsview.cpp @@ -56,7 +56,12 @@ Q_LOGGING_CATEGORY(pMainGraphicsView, "p.mainGraphicsView") namespace { +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") + const QKeySequence restoreOriginShortcut = QKeySequence(Qt::ControlModifier + Qt::Key_Asterisk); + +QT_WARNING_POP } diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index b45a5eb42..ceda641c2 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -1596,6 +1596,9 @@ void VPMainWindow::InitZoomToolBar() delete m_mouseCoordinate; + QT_WARNING_PUSH + QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") + // connect the zoom buttons and shortcuts to the slots QList zoomInShortcuts; zoomInShortcuts.append(QKeySequence(QKeySequence::ZoomIn)); @@ -1619,6 +1622,8 @@ void VPMainWindow::InitZoomToolBar() zoomFitBestShortcuts.append(QKeySequence(Qt::ControlModifier + Qt::Key_Equal)); ui->actionZoomFitBest->setShortcuts(zoomFitBestShortcuts); connect(ui->actionZoomFitBest, &QAction::triggered, m_graphicsView, &VPMainGraphicsView::ZoomFitBest); + + QT_WARNING_POP } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index f3fbca7cb..0031958b1 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -2419,6 +2419,9 @@ void MainWindow::ToolBarTools() QKeySequence::ZoomOut). For examle "+" is Qt::Key_Plus + Qt::KeypadModifier for keypad. Also for me don't work Qt:CTRL and work Qt::ControlModifier.*/ + QT_WARNING_PUSH + QT_WARNING_DISABLE_CLANG("-Wenum-enum-conversion") + QList zoomInShortcuts; zoomInShortcuts.append(QKeySequence(QKeySequence::ZoomIn)); zoomInShortcuts.append(QKeySequence(Qt::ControlModifier + Qt::Key_Plus + Qt::KeypadModifier)); @@ -2512,6 +2515,8 @@ void MainWindow::ToolBarTools() sceneDetails->update(); } }); + + QT_WARNING_POP } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 1cbd3da6b..2d043d69d 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -4313,7 +4313,7 @@ void VPattern::SetReadOnly(bool rOnly) if (not pattern.isNull()) { - SetAttributeOrRemoveIf(pattern, AttrReadOnly, rOnly, [](bool rOnly){return not rOnly;}); + SetAttributeOrRemoveIf(pattern, AttrReadOnly, rOnly, [](bool rOnly) noexcept {return not rOnly;}); modified = true; } } diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 673bad8bc..6c23b1158 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -1952,7 +1952,7 @@ void VAbstractPattern::SetFMeasurements(QDomElement &element, const QVector(tagFMeasurement, AttrDescription, m.description, - [](const QString &description){return description.isEmpty();}); + [](const QString &description) noexcept {return description.isEmpty();}); element.appendChild(tagFMeasurement); } @@ -2029,9 +2029,9 @@ QDomElement VAbstractPattern::CreateGroup(quint32 id, const QString &name, const SetAttribute(group, AttrId, id); SetAttribute(group, AttrName, name); SetAttribute(group, AttrVisible, true); - SetAttributeOrRemoveIf(group, AttrTool, tool, [](vidtype tool){ return tool == null_id;}); + SetAttributeOrRemoveIf(group, AttrTool, tool, [](vidtype tool) noexcept { return tool == null_id;}); SetAttributeOrRemoveIf(group, AttrTags, preparedTags, - [](const QString &preparedTags){return preparedTags.isEmpty();}); + [](const QString &preparedTags) noexcept {return preparedTags.isEmpty();}); auto i = groupData.constBegin(); while (i != groupData.constEnd()) @@ -2112,7 +2112,7 @@ void VAbstractPattern::SetGroupTags(quint32 id, const QStringList &tags) if (group.isElement()) { SetAttributeOrRemoveIf(group, AttrTags, tags.join(','), - [](const QString &rawTags){return rawTags.isEmpty();}); + [](const QString &rawTags) noexcept {return rawTags.isEmpty();}); modified = true; emit patternChanged(false); } diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index 3b2716a93..4259a3fdd 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -649,7 +649,7 @@ void VMeasurements::SetFullCircumference(bool fc) QDomElement dimenstionsTag = documentElement().firstChildElement(TagDimensions); if (not dimenstionsTag.isNull()) { - SetAttributeOrRemoveIf(dimenstionsTag, AttrFullCircumference, fc, [](bool fc){return not fc;}); + SetAttributeOrRemoveIf(dimenstionsTag, AttrFullCircumference, fc, [](bool fc) noexcept {return not fc;}); } else { @@ -747,7 +747,7 @@ void VMeasurements::SetMSpecialUnits(const QString &name, bool special) QDomElement node = FindM(name); if (not node.isNull()) { - SetAttributeOrRemoveIf(node, AttrSpecialUnits, special, [](bool special){return not special;}); + SetAttributeOrRemoveIf(node, AttrSpecialUnits, special, [](bool special) noexcept {return not special;}); } else { @@ -820,7 +820,8 @@ void VMeasurements::SetMDimension(const QString &name, IMD type) if (not node.isNull()) { SetAttributeOrRemoveIf(node, AttrDimension, VMeasurements::IMDToStr(type), - [](const QString &type){return type == VMeasurements::IMDToStr(IMD::N);}); + [](const QString &type) noexcept + {return type == VMeasurements::IMDToStr(IMD::N);}); } else { @@ -895,11 +896,11 @@ void VMeasurements::SetRestrictions(const QMap & SetAttribute(restrictionTag, AttrCoordinates, i.key()); SetAttributeOrRemoveIf(restrictionTag, AttrMin, i.value().GetMin(), - [](qreal min){return qFuzzyIsNull(min);}); + [](qreal min) noexcept {return qFuzzyIsNull(min);}); SetAttributeOrRemoveIf(restrictionTag, AttrMax, i.value().GetMax(), - [](qreal max){return qFuzzyIsNull(max);}); + [](qreal max) noexcept {return qFuzzyIsNull(max);}); SetAttributeOrRemoveIf(restrictionTag, AttrExclude, i.value().GetExcludeString(), - [](const QString &exlcuded){return exlcuded.isEmpty();}); + [](const QString &exlcuded) noexcept {return exlcuded.isEmpty();}); restrictionsTag.appendChild(restrictionTag); ++i; diff --git a/src/libs/vformat/vpatternrecipe.cpp b/src/libs/vformat/vpatternrecipe.cpp index 9da2c41bd..962c8103b 100644 --- a/src/libs/vformat/vpatternrecipe.cpp +++ b/src/libs/vformat/vpatternrecipe.cpp @@ -1118,7 +1118,7 @@ void VPatternRecipe::CurveAttributes(QDomElement &step, T *tool) SetAttribute(step, AttrAScale, tool->GetApproximationScale()); SetAttribute(step, AttrDuplicate, tool->GetDuplicate()); SetAttributeOrRemoveIf(step, AttrAlias, tool->GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } @@ -1127,9 +1127,9 @@ template void VPatternRecipe::CutCurveAttributes(QDomElement &step, T *tool) { SetAttributeOrRemoveIf(step, AttrAlias1, tool->GetAliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); SetAttributeOrRemoveIf(step, AttrAlias2, tool->GetAliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- @@ -1171,7 +1171,8 @@ QDomElement VPatternRecipe::GroupOperationSource(VAbstractOperation *tool, quint } SetAttribute(node, AttrItem, obj->ObjectName()); - SetAttributeOrRemoveIf(node, AttrAlias, item.alias, [](const QString &alias){return alias.isEmpty();}); + SetAttributeOrRemoveIf(node, AttrAlias, item.alias, + [](const QString &alias) noexcept {return alias.isEmpty();}); if (obj->getType() != GOType::Point) { diff --git a/src/libs/vformat/vwatermark.cpp b/src/libs/vformat/vwatermark.cpp index e7a91e241..b07bc0a9d 100644 --- a/src/libs/vformat/vwatermark.cpp +++ b/src/libs/vformat/vwatermark.cpp @@ -138,11 +138,11 @@ void VWatermark::SetWatermark(const VWatermarkData &data) { SetAttribute(text, AttrShow, data.showText); SetAttributeOrRemoveIf(text, AttrText, data.text, - [](const QString &text){return text.isEmpty();}); + [](const QString &text) noexcept {return text.isEmpty();}); SetAttributeOrRemoveIf(text, AttrRotation, data.textRotation, - [](int textRotation){return textRotation == 0;}); + [](int textRotation) noexcept {return textRotation == 0;}); SetAttributeOrRemoveIf(text, AttrFont, data.font.toString(), - [](const QString &fontString){return fontString.isEmpty();}); + [](const QString &fontString) noexcept {return fontString.isEmpty();}); SetAttribute(text, AttrColor, data.textColor.name()); } @@ -151,11 +151,11 @@ void VWatermark::SetWatermark(const VWatermarkData &data) { SetAttribute(image, AttrShow, data.showImage); SetAttributeOrRemoveIf(image, AttrPath, data.path, - [](const QString &path){return path.isEmpty();}); + [](const QString &path) noexcept {return path.isEmpty();}); SetAttributeOrRemoveIf(image, AttrRotation, data.imageRotation, - [](int imageRotation){return imageRotation == 0;}); + [](int imageRotation) noexcept {return imageRotation == 0;}); SetAttributeOrRemoveIf(image, AttrGrayscale, data.grayscale, - [](bool grayscale){return not grayscale;}); + [](bool grayscale) noexcept {return not grayscale;}); } } } diff --git a/src/libs/vtest/warnings.pri b/src/libs/vtest/warnings.pri index f4a43deba..cdd0b84de 100644 --- a/src/libs/vtest/warnings.pri +++ b/src/libs/vtest/warnings.pri @@ -37,6 +37,9 @@ unix { # want them in global list. Compromise decision delete them from local list. QMAKE_CXXFLAGS -= \ -Wswitch-default + + QMAKE_CXXFLAGS += \ + -Wno-stringop-overflow } *clang*{ diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp index b10c4bba3..d51c9637a 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.cpp @@ -229,7 +229,7 @@ void VToolFlippingByAxis::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrAxisType, QString().setNum(static_cast(dialogTool->GetAxisType()))); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); source = dialogTool->GetSourceObjects(); SaveSourceDestination(domElement); diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp index 23d102bff..e3ff528b6 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vtoolflippingbyline.cpp @@ -216,7 +216,7 @@ void VToolFlippingByLine::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondLinePointId())); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); source = dialogTool->GetSourceObjects(); SaveSourceDestination(domElement); diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp index 41904a500..c381c9494 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp @@ -741,19 +741,20 @@ void VAbstractOperation::UpdateNamePosition(quint32 id, const QPointF &pos) //--------------------------------------------------------------------------------------------------------------------- void VAbstractOperation::SaveSourceDestination(QDomElement &tag) { - doc->RemoveAllChildren(tag); + VAbstractPattern::RemoveAllChildren(tag); QDomElement tagObjects = doc->createElement(TagSource); - for (auto sItem : qAsConst(source)) + for (const auto& sItem : qAsConst(source)) { QDomElement item = doc->createElement(TagItem); doc->SetAttribute(item, AttrIdObject, sItem.id); doc->SetAttributeOrRemoveIf(item, AttrAlias, sItem.alias, - [](const QString &alias){return alias.isEmpty();}); + [](const QString &alias) noexcept {return alias.isEmpty();}); doc->SetAttributeOrRemoveIf(item, AttrPenStyle, sItem.penStyle, - [](const QString &penStyle){return penStyle == TypeLineDefault;}); + [](const QString &penStyle) noexcept + {return penStyle == TypeLineDefault;}); doc->SetAttributeOrRemoveIf(item, AttrColor, sItem.color, - [](const QString &color){return color == ColorDefault;}); + [](const QString &color) noexcept {return color == ColorDefault;}); tagObjects.appendChild(item); } tag.appendChild(tagObjects); @@ -767,10 +768,21 @@ void VAbstractOperation::SaveSourceDestination(QDomElement &tag) VAbstractSimple *obj = operatedObjects.value(dItem.id, nullptr); doc->SetAttributeOrRemoveIf(item, AttrMx, VAbstractValApplication::VApp()->fromPixel(dItem.mx), - [obj](double){return obj && obj->GetType() != GOType::Point;}); + [obj](double value) noexcept + { + Q_UNUSED(value) + return obj && obj->GetType() != GOType::Point; + }); + doc->SetAttributeOrRemoveIf(item, AttrMy, VAbstractValApplication::VApp()->fromPixel(dItem.my), - [obj](double){return obj && obj->GetType() != GOType::Point;}); - doc->SetAttributeOrRemoveIf(item, AttrShowLabel, dItem.showLabel, [](bool showLabel){return showLabel;}); + [obj](double value ) noexcept + { + Q_UNUSED(value) + return obj && obj->GetType() != GOType::Point; + }); + + doc->SetAttributeOrRemoveIf(item, AttrShowLabel, dItem.showLabel, + [](bool showLabel) noexcept {return showLabel;}); tagObjects.appendChild(item); } diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index 7872249d0..ba778f1a4 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -489,7 +489,7 @@ void VToolMove::SaveDialog(QDomElement &domElement, QList &oldDependenc doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->GetRotationOrigPointId())); doc->SetAttribute(domElement, AttrRotationAngle, dialogTool->GetRotationAngle()); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); source = dialogTool->GetSourceObjects(); SaveSourceDestination(domElement); diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index 37abec95a..aa3784c06 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -365,7 +365,7 @@ void VToolRotation::SaveDialog(QDomElement &domElement, QList &oldDepen doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrSuffix, dialogTool->GetSuffix()); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); source = dialogTool->GetSourceObjects(); SaveSourceDestination(domElement); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp index 760ef26ef..bf298de7e 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vabstractspline.cpp @@ -323,7 +323,7 @@ void VAbstractSpline::SaveOptions(QDomElement &tag, QSharedPointer &ob doc->SetAttribute(tag, AttrPenStyle, curve->GetPenStyle()); doc->SetAttribute(tag, AttrAScale, curve->GetApproximationScale()); doc->SetAttributeOrRemoveIf(tag, AttrAlias, curve->GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp index 1670da3f2..5acb88b25 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarc.cpp @@ -342,9 +342,9 @@ void VToolArc::SaveDialog(QDomElement &domElement, QList &oldDependenci doc->SetAttribute(domElement, AttrPenStyle, dialogTool->GetPenStyle()); doc->SetAttribute(domElement, AttrAScale, dialogTool->GetApproximationScale()); doc->SetAttributeOrRemoveIf(domElement, AttrAlias, dialogTool->GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp index c4a7bdf6a..dc80aaa4f 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolarcwithlength.cpp @@ -321,9 +321,9 @@ void VToolArcWithLength::SaveDialog(QDomElement &domElement, QList &old doc->SetAttribute(domElement, AttrPenStyle, dialogTool->GetPenStyle()); doc->SetAttribute(domElement, AttrAScale, dialogTool->GetApproximationScale()); doc->SetAttributeOrRemoveIf(domElement, AttrAlias, dialogTool->GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp index 1fa0ae4f9..b0f6ce7af 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp @@ -233,7 +233,7 @@ void VToolCubicBezier::SaveDialog(QDomElement &domElement, QList &oldDe AddDependence(newDependencies, spl.GetP3().id()); AddDependence(newDependencies, spl.GetP4().id()); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); SetSplineAttributes(domElement, spl); } @@ -291,7 +291,7 @@ void VToolCubicBezier::SetSplineAttributes(QDomElement &domElement, const VCubic doc->SetAttribute(domElement, AttrPenStyle, spl.GetPenStyle()); doc->SetAttribute(domElement, AttrAScale, spl.GetApproximationScale()); doc->SetAttributeOrRemoveIf(domElement, AttrDuplicate, spl.GetDuplicate(), - [](quint32 duplicate){return duplicate == 0;}); + [](quint32 duplicate) noexcept {return duplicate == 0;}); doc->SetAttributeOrRemoveIf(domElement, AttrAlias, spl.GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp index 9444a3aad..ac35a5491 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezierpath.cpp @@ -220,7 +220,7 @@ void VToolCubicBezierPath::SaveDialog(QDomElement &domElement, QList &o } doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); SetSplinePathAttributes(domElement, splPath); } @@ -275,7 +275,7 @@ void VToolCubicBezierPath::SetSplinePathAttributes(QDomElement &domElement, cons { doc->SetAttribute(domElement, AttrType, ToolType); doc->SetAttributeOrRemoveIf(domElement, AttrDuplicate, path.GetDuplicate(), - [](quint32 duplicate){return duplicate <= 0;}); + [](quint32 duplicate) noexcept {return duplicate <= 0;}); doc->SetAttribute(domElement, AttrColor, path.GetColor()); doc->SetAttribute(domElement, AttrPenStyle, path.GetPenStyle()); doc->SetAttribute(domElement, AttrAScale, path.GetApproximationScale()); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp index df61bd134..d08b760b8 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolellipticalarc.cpp @@ -389,9 +389,9 @@ void VToolEllipticalArc::SaveDialog(QDomElement &domElement, QList &old doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor()); doc->SetAttribute(domElement, AttrPenStyle, dialogTool->GetPenStyle()); doc->SetAttributeOrRemoveIf(domElement, AttrAlias, dialogTool->GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp index 1772042aa..2937f70c4 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp @@ -346,7 +346,7 @@ void VToolSpline::SaveDialog(QDomElement &domElement, QList &oldDepende controlPoints[1]->blockSignals(false); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); SetSplineAttributes(domElement, spl); } @@ -656,9 +656,9 @@ void VToolSpline::SetSplineAttributes(QDomElement &domElement, const VSpline &sp doc->SetAttribute(domElement, AttrPenStyle, spl.GetPenStyle()); doc->SetAttribute(domElement, AttrAScale, spl.GetApproximationScale()); doc->SetAttributeOrRemoveIf(domElement, AttrDuplicate, spl.GetDuplicate(), - [](quint32 duplicate){return duplicate == 0;}); + [](quint32 duplicate) noexcept {return duplicate == 0;}); doc->SetAttributeOrRemoveIf(domElement, AttrAlias, spl.GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); if (domElement.hasAttribute(AttrKCurve)) { diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp index a4adb561d..118752ed7 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp @@ -398,7 +398,7 @@ void VToolSplinePath::SetSplinePathAttributes(QDomElement &domElement, const VSp { doc->SetAttribute(domElement, AttrType, ToolType); doc->SetAttributeOrRemoveIf(domElement, AttrDuplicate, path.GetDuplicate(), - [](quint32 duplicate){return duplicate == 0;}); + [](quint32 duplicate) noexcept {return duplicate == 0;}); if (domElement.hasAttribute(AttrKCurve)) { @@ -409,7 +409,7 @@ void VToolSplinePath::SetSplinePathAttributes(QDomElement &domElement, const VSp doc->SetAttribute(domElement, AttrPenStyle, path.GetPenStyle()); doc->SetAttribute(domElement, AttrAScale, path.GetApproximationScale()); doc->SetAttributeOrRemoveIf(domElement, AttrAlias, path.GetAliasSuffix(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); UpdatePathPoints(doc, domElement, path); } @@ -547,7 +547,7 @@ void VToolSplinePath::SaveDialog(QDomElement &domElement, QList &oldDep } doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); SetSplinePathAttributes(domElement, splPath); } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp index 18dec073e..4eddfcaa6 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/tooldoublepoint/vtooltruedarts.cpp @@ -291,7 +291,7 @@ void VToolTrueDarts::SaveDialog(QDomElement &domElement, QList &oldDepe doc->SetAttribute(domElement, AttrDartP2, QString().setNum(dialogTool->GetSecondDartPointId())); doc->SetAttribute(domElement, AttrDartP3, QString().setNum(dialogTool->GetThirdDartPointId())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcut.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcut.cpp index ba96d0dbf..d24da6027 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcut.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcut.cpp @@ -192,9 +192,9 @@ void VToolCut::SaveOptions(QDomElement &tag, QSharedPointer &obj) VToolSinglePoint::SaveOptions(tag, obj); doc->SetAttributeOrRemoveIf(tag, AttrAlias1, m_aliasSuffix1, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(tag, AttrAlias2, m_aliasSuffix2, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp index 66b62cf9e..107e7ea95 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.cpp @@ -234,13 +234,13 @@ void VToolCutArc::SaveDialog(QDomElement &domElement, QList &oldDepende doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrArc, QString().setNum(dialogTool->getArcId())); doc->SetAttributeOrRemoveIf(domElement, AttrAlias1, dialogTool->GetAliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrAlias2, dialogTool->GetAliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); const QString notes = dialogTool->GetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp index 8096b5ad3..26ae1f2e5 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutspline.cpp @@ -231,11 +231,11 @@ void VToolCutSpline::SaveDialog(QDomElement &domElement, QList &oldDepe doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrSpline, QString().setNum(dialogTool->getSplineId())); doc->SetAttributeOrRemoveIf(domElement, AttrAlias1, dialogTool->GetAliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrAlias2, dialogTool->GetAliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp index 5b1c42afd..a878277ea 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -327,13 +327,13 @@ void VToolCutSplinePath::SaveDialog(QDomElement &domElement, QList &old doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrSplinePath, QString().setNum(dialogTool->getSplinePathId())); doc->SetAttributeOrRemoveIf(domElement, AttrAlias1, dialogTool->GetAliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrAlias2, dialogTool->GetAliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); const QString notes = dialogTool->GetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp index 5689f4841..4d8bdbd62 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolalongline.cpp @@ -108,7 +108,7 @@ void VToolAlongLine::SaveDialog(QDomElement &domElement, QList &oldDepe const QString notes = dialogTool->GetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp index 43083c032..f7ed50056 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolbisector.cpp @@ -265,7 +265,7 @@ void VToolBisector::SaveDialog(QDomElement &domElement, QList &oldDepen doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); doc->SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogTool->GetThirdPointId())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp index d1ad0a0c6..66dadab62 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolcurveintersectaxis.cpp @@ -278,11 +278,11 @@ void VToolCurveIntersectAxis::SaveDialog(QDomElement &domElement, QList doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrCurve, QString().setNum(dialogTool->getCurveId())); doc->SetAttributeOrRemoveIf(domElement, AttrAlias1, dialogTool->GetAliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrAlias2, dialogTool->GetAliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- @@ -295,9 +295,9 @@ void VToolCurveIntersectAxis::SaveOptions(QDomElement &tag, QSharedPointerSetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrCurve, curveId); doc->SetAttributeOrRemoveIf(tag, AttrAlias1, m_aliasSuffix1, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(tag, AttrAlias2, m_aliasSuffix2, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp index fd32cecbd..fd3a98030 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolendline.cpp @@ -194,7 +194,7 @@ void VToolEndLine::SaveDialog(QDomElement &domElement, QList &oldDepend doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp index 8eeded7ee..0308bd4e1 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolheight.cpp @@ -226,7 +226,7 @@ void VToolHeight::SaveDialog(QDomElement &domElement, QList &oldDepende const QString notes = dialogTool->GetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp index 5d3081105..9d9940471 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoollineintersectaxis.cpp @@ -282,7 +282,7 @@ void VToolLineIntersectAxis::SaveDialog(QDomElement &domElement, QList doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstPointId())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondPointId())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp index 55960d625..005c1a8c3 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolnormal.cpp @@ -235,7 +235,7 @@ void VToolNormal::SaveDialog(QDomElement &domElement, QList &oldDepende doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp index cb272ce5b..5772a4ed3 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toollinepoint/vtoolshoulderpoint.cpp @@ -285,7 +285,7 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement, QList &old const QString notes = dialogTool->GetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp index bcb7b5c2a..e77abb26a 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolbasepoint.cpp @@ -275,7 +275,7 @@ void VToolBasePoint::SaveDialog(QDomElement &domElement, QList &oldDepe doc->SetAttribute(domElement, AttrX, QString().setNum(VAbstractValApplication::VApp()->fromPixel(p.x()))); doc->SetAttribute(domElement, AttrY, QString().setNum(VAbstractValApplication::VApp()->fromPixel(p.y()))); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp index 903a6a6bd..3c96220ec 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoollineintersect.cpp @@ -262,7 +262,7 @@ void VToolLineIntersect::SaveDialog(QDomElement &domElement, QList &old doc->SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogTool->GetP1Line2())); doc->SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogTool->GetP2Line2())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp index 1c15670be..46fc89a0e 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromarcandtangent.cpp @@ -302,7 +302,7 @@ void VToolPointFromArcAndTangent::SaveDialog(QDomElement &domElement, QList(dialogTool->GetCrossCirclesPoint()))); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp index 5bdcac6c5..725bb32e4 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointfromcircleandtangent.cpp @@ -294,7 +294,7 @@ void VToolPointFromCircleAndTangent::SaveDialog(QDomElement &domElement, QListSetAttribute(domElement, AttrCrossPoint, QString().setNum(static_cast(dialogTool->GetCrossCirclesPoint()))); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp index 51e2a6540..f6bea010b 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.cpp @@ -317,7 +317,7 @@ void VToolPointOfContact::SaveDialog(QDomElement &domElement, QList &ol doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint())); doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint())); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp index ec56ed44f..f1c2f79e6 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersection.cpp @@ -210,7 +210,7 @@ void VToolPointOfIntersection::SaveDialog(QDomElement &domElement, QListGetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp index a20b622df..a452ee7f9 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.cpp @@ -322,7 +322,7 @@ void VToolPointOfIntersectionArcs::SaveDialog(QDomElement &domElement, QListSetAttribute(domElement, AttrSecondArc, QString().setNum(dialogTool->GetSecondArcId())); doc->SetAttribute(domElement, AttrCrossPoint, QString().setNum(static_cast(dialogTool->GetCrossArcPoint()))); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp index aa05af470..02dea7eaf 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncircles.cpp @@ -334,7 +334,7 @@ void VToolPointOfIntersectionCircles::SaveDialog(QDomElement &domElement, QList< doc->SetAttribute(domElement, AttrCrossPoint, QString().setNum(static_cast(dialogTool->GetCrossCirclesPoint()))); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp index 83d987c41..b84c0a98d 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp @@ -413,15 +413,15 @@ void VToolPointOfIntersectionCurves::SaveDialog(QDomElement &domElement, QListSetAttribute(domElement, AttrVCrossPoint, QString().setNum(static_cast(dialogTool->GetVCrossPoint()))); doc->SetAttribute(domElement, AttrHCrossPoint, QString().setNum(static_cast(dialogTool->GetHCrossPoint()))); doc->SetAttributeOrRemoveIf(domElement, AttrCurve1Alias1, dialogTool->GetCurve1AliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrCurve1Alias2, dialogTool->GetCurve1AliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrCurve2Alias1, dialogTool->GetCurve2AliasSuffix1(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrCurve2Alias2, dialogTool->GetCurve2AliasSuffix2(), - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- @@ -435,13 +435,13 @@ void VToolPointOfIntersectionCurves::SaveOptions(QDomElement &tag, QSharedPointe doc->SetAttribute(tag, AttrVCrossPoint, static_cast(vCrossPoint)); doc->SetAttribute(tag, AttrHCrossPoint, static_cast(hCrossPoint)); doc->SetAttributeOrRemoveIf(tag, AttrCurve1Alias1, m_curve1AliasSuffix1, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(tag, AttrCurve1Alias2, m_curve1AliasSuffix2, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(tag, AttrCurve2Alias1, m_curve2AliasSuffix1, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); doc->SetAttributeOrRemoveIf(tag, AttrCurve2Alias2, m_curve2AliasSuffix2, - [](const QString &suffix){return suffix.isEmpty();}); + [](const QString &suffix) noexcept {return suffix.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp index e6b6f08db..19e811c81 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtooltriangle.cpp @@ -307,7 +307,7 @@ void VToolTriangle::SaveDialog(QDomElement &domElement, QList &oldDepen const QString notes = dialogTool->GetNotes(); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, notes, - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/vdrawtool.cpp b/src/libs/vtools/tools/drawTools/vdrawtool.cpp index 45e3ab8e6..8a1af9a37 100644 --- a/src/libs/vtools/tools/drawTools/vdrawtool.cpp +++ b/src/libs/vtools/tools/drawTools/vdrawtool.cpp @@ -176,7 +176,8 @@ void VDrawTool::SaveOptions(QDomElement &tag, QSharedPointer &obj) Q_UNUSED(obj) doc->SetAttribute(tag, VDomDocument::AttrId, m_id); - doc->SetAttributeOrRemoveIf(tag, AttrNotes, m_notes, [](const QString ¬es){return notes.isEmpty();}); + doc->SetAttributeOrRemoveIf(tag, AttrNotes, m_notes, + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/drawTools/vtoolline.cpp b/src/libs/vtools/tools/drawTools/vtoolline.cpp index 0be50d268..dca167671 100644 --- a/src/libs/vtools/tools/drawTools/vtoolline.cpp +++ b/src/libs/vtools/tools/drawTools/vtoolline.cpp @@ -394,7 +394,7 @@ void VToolLine::SaveDialog(QDomElement &domElement, QList &oldDependenc doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttributeOrRemoveIf(domElement, AttrNotes, dialogTool->GetNotes(), - [](const QString ¬es){return notes.isEmpty();}); + [](const QString ¬es) noexcept {return notes.isEmpty();}); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/vabstracttool.cpp b/src/libs/vtools/tools/vabstracttool.cpp index f32b38d25..81bf46e33 100644 --- a/src/libs/vtools/tools/vabstracttool.cpp +++ b/src/libs/vtools/tools/vabstracttool.cpp @@ -542,9 +542,9 @@ QDomElement VAbstractTool::AddSANode(VAbstractPattern *doc, const QString &tagNa } doc->SetAttributeOrRemoveIf(nod, VAbstractPattern::AttrNodeExcluded, node.IsExcluded(), - [](bool exclude){return not exclude;}); + [](bool exclude) noexcept {return not exclude;}); doc->SetAttributeOrRemoveIf(nod, VAbstractPattern::AttrCheckUniqueness, node.IsCheckUniqueness(), - [](bool uniqueness){return uniqueness;}); + [](bool uniqueness) noexcept {return uniqueness;}); switch (type) { @@ -602,12 +602,12 @@ QDomElement VAbstractTool::AddSANode(VAbstractPattern *doc, const QString &tagNa } doc->SetAttributeOrRemoveIf(nod, VAbstractPattern::AttrNodeShowSecondPassmark, node.IsShowSecondPassmark(), - [](bool show){return show;}); + [](bool show) noexcept {return show;}); doc->SetAttributeOrRemoveIf(nod, VAbstractPattern::AttrManualPassmarkLength, node.IsManualPassmarkLength(), - [](bool manualPassmarkLength){return not manualPassmarkLength;}); + [](bool manualPassmarkLength) noexcept {return not manualPassmarkLength;}); doc->SetAttributeOrRemoveIf(nod, VAbstractPattern::AttrPassmarkLength, node.GetFormulaPassmarkLength(), - [node](const QString &){return not node.IsManualPassmarkLength();}); + [node](const QString &) noexcept {return not node.IsManualPassmarkLength();}); return nod; } diff --git a/src/libs/vtools/tools/vtoolseamallowance.cpp b/src/libs/vtools/tools/vtoolseamallowance.cpp index a6ac6a4be..2b6ee10a8 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.cpp +++ b/src/libs/vtools/tools/vtoolseamallowance.cpp @@ -333,23 +333,24 @@ void VToolSeamAllowance::AddAttributes(VAbstractPattern *doc, QDomElement &domEl doc->SetAttribute(domElement, AttrName, piece.GetName()); doc->SetAttribute(domElement, AttrUUID, piece.GetUUID().toString()); doc->SetAttributeOrRemoveIf(domElement, AttrGradationLabel, piece.GetGradationLabel(), - [](const QString &label){return label.isEmpty();}); + [](const QString &label) noexcept {return label.isEmpty();}); doc->SetAttribute(domElement, AttrVersion, QString().setNum(pieceVersion)); doc->SetAttribute(domElement, AttrMx, VAbstractValApplication::VApp()->fromPixel(piece.GetMx())); doc->SetAttribute(domElement, AttrMy, VAbstractValApplication::VApp()->fromPixel(piece.GetMy())); doc->SetAttributeOrRemoveIf(domElement, AttrInLayout, piece.IsInLayout(), - [](bool inLayout){return inLayout;}); + [](bool inLayout) noexcept {return inLayout;}); doc->SetAttribute(domElement, AttrForbidFlipping, piece.IsForbidFlipping()); doc->SetAttribute(domElement, AttrForceFlipping, piece.IsForceFlipping()); doc->SetAttributeOrRemoveIf(domElement, AttrSeamAllowance, piece.IsSeamAllowance(), - [](bool seamAllowance){return not seamAllowance;}); + [](bool seamAllowance) noexcept {return not seamAllowance;}); doc->SetAttribute(domElement, AttrHideMainPath, piece.IsHideMainPath()); doc->SetAttributeOrRemoveIf(domElement, AttrSeamAllowanceBuiltIn, piece.IsSeamAllowanceBuiltIn(), - [](bool builtin){return not builtin;}); + [](bool builtin) noexcept {return not builtin;}); doc->SetAttribute(domElement, AttrWidth, piece.GetFormulaSAWidth()); - doc->SetAttributeOrRemoveIf(domElement, AttrUnited, piece.IsUnited(), [](bool united){return not united;}); + doc->SetAttributeOrRemoveIf(domElement, AttrUnited, piece.IsUnited(), + [](bool united) noexcept {return not united;}); doc->SetAttributeOrRemoveIf(domElement, AttrPiecePriority, piece.GetPriority(), - [](uint priority){return priority == 0;}); + [](uint priority) noexcept {return priority == 0;}); } //--------------------------------------------------------------------------------------------------------------------- @@ -431,11 +432,11 @@ void VToolSeamAllowance::AddPatternPieceData(VAbstractPattern *doc, QDomElement doc->SetAttribute(domData, AttrFont, data.GetFontSize()); doc->SetAttribute(domData, VAbstractPattern::AttrRotation, data.GetRotation()); doc->SetAttributeOrRemoveIf(domData, AttrCenterPin, data.CenterPin(), - [](quint32 pin){return pin == NULL_ID;}); + [](quint32 pin) noexcept {return pin == NULL_ID;}); doc->SetAttributeOrRemoveIf(domData, AttrTopLeftPin, data.TopLeftPin(), - [](quint32 leftPin){return leftPin == NULL_ID;}); + [](quint32 leftPin) noexcept {return leftPin == NULL_ID;}); doc->SetAttributeOrRemoveIf(domData, AttrBottomRightPin, data.BottomRightPin(), - [](quint32 rightPin){return rightPin == NULL_ID;}); + [](quint32 rightPin) noexcept {return rightPin == NULL_ID;}); doc->SetLabelTemplate(domData, data.GetLabelTemplate()); domElement.appendChild(domData); @@ -454,11 +455,11 @@ void VToolSeamAllowance::AddPatternInfo(VAbstractPattern *doc, QDomElement &domE doc->SetAttribute(domData, AttrFont, geom.GetFontSize()); doc->SetAttribute(domData, VAbstractPattern::AttrRotation, geom.GetRotation()); doc->SetAttributeOrRemoveIf(domData, AttrCenterPin, geom.CenterPin(), - [](quint32 pin){return pin <= NULL_ID;}); + [](quint32 pin) noexcept {return pin <= NULL_ID;}); doc->SetAttributeOrRemoveIf(domData, AttrTopLeftPin, geom.TopLeftPin(), - [](quint32 pin){return pin <= NULL_ID;}); + [](quint32 pin) noexcept {return pin <= NULL_ID;}); doc->SetAttributeOrRemoveIf(domData, AttrBottomRightPin, geom.BottomRightPin(), - [](quint32 pin){return pin <= NULL_ID;}); + [](quint32 pin) noexcept {return pin <= NULL_ID;}); domElement.appendChild(domData); } @@ -476,11 +477,11 @@ void VToolSeamAllowance::AddGrainline(VAbstractPattern *doc, QDomElement &domEle doc->SetAttribute(domData, VAbstractPattern::AttrRotation, glGeom.GetRotation()); doc->SetAttribute(domData, VAbstractPattern::AttrArrows, int(glGeom.GetArrowType())); doc->SetAttributeOrRemoveIf(domData, AttrCenterPin, glGeom.CenterPin(), - [](quint32 pin){return pin <= NULL_ID;}); + [](quint32 pin) noexcept {return pin <= NULL_ID;}); doc->SetAttributeOrRemoveIf(domData, AttrTopPin, glGeom.TopPin(), - [](quint32 pin){return pin <= NULL_ID;}); + [](quint32 pin) noexcept {return pin <= NULL_ID;}); doc->SetAttributeOrRemoveIf(domData, AttrBottomPin, glGeom.BottomPin(), - [](quint32 pin){return pin <= NULL_ID;}); + [](quint32 pin) noexcept {return pin <= NULL_ID;}); domElement.appendChild(domData); } diff --git a/src/libs/vtools/undocommands/togglepiecestate.cpp b/src/libs/vtools/undocommands/togglepiecestate.cpp index dac2ebfb9..2610c1b64 100644 --- a/src/libs/vtools/undocommands/togglepiecestate.cpp +++ b/src/libs/vtools/undocommands/togglepiecestate.cpp @@ -74,7 +74,7 @@ void TogglePieceInLayout::Do(bool state) QDomElement detail = doc->elementById(m_id, VAbstractPattern::TagDetail); if (detail.isElement()) { - doc->SetAttributeOrRemoveIf(detail, AttrInLayout, state, [](bool state){return state;}); + doc->SetAttributeOrRemoveIf(detail, AttrInLayout, state, [](bool state) noexcept {return state;}); VPiece det = m_data->DataPieces()->value(m_id); det.SetInLayout(state);