GCC warnings.

This commit is contained in:
Roman Telezhynskyi 2021-09-27 11:47:09 +03:00
parent ac3679b10b
commit 32be26beef
5 changed files with 31 additions and 0 deletions

View file

@ -467,10 +467,15 @@ void VPSheet::SetTransformationOrigin(const VPTransformationOrigon &newTransform
//---------------------------------------------------------------------------------------------------------------------
void VPSheet::Clear()
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnoexcept")
m_name.clear();
m_visible = true;
m_transformationOrigin = VPTransformationOrigon();
m_trashSheet = false;
QT_WARNING_POP
}
//---------------------------------------------------------------------------------------------------------------------

View file

@ -80,10 +80,15 @@ auto TransformationOrigin(const VPLayoutPtr &layout, const QRectF &boundingRect)
return sheet->TransformationOrigin();
}
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnoexcept")
VPTransformationOrigon origin;
origin.origin = boundingRect.center();
origin.custom = false;
QT_WARNING_POP
return origin;
}
} // namespace

View file

@ -118,9 +118,14 @@ void VPUndoMovePieceOnSheet::redo()
if (m_followGrainline)
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnoexcept")
VPTransformationOrigon origin;
origin.custom = true;
QT_WARNING_POP
piece->RotateToGrainline(origin);
}

View file

@ -2191,8 +2191,14 @@ void VPMainWindow::RotatePiecesToGrainline()
{
if (not piece.isNull() && piece->IsGrainlineEnabled())
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnoexcept")
VPTransformationOrigon origin;
origin.custom = true;
QT_WARNING_POP
piece->RotateToGrainline(origin);
emit m_layout->PieceTransformationChanged(piece);
}

View file

@ -600,6 +600,9 @@ auto VPLayoutFileReader::ReadNotch() -> VLayoutPassmark
QXmlStreamAttributes attribs = attributes();
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnoexcept")
VLayoutPassmark passmark;
passmark.isBuiltIn = ReadAttributeBool(attribs, ML::AttrBuiltIn, falseStr);
passmark.baseLine = StringToLine(ReadAttributeEmptyString(attribs, ML::AttrBaseLine));
@ -608,6 +611,8 @@ auto VPLayoutFileReader::ReadNotch() -> VLayoutPassmark
QString defaultType = QString::number(static_cast<int>(PassmarkLineType::OneLine));
passmark.type = static_cast<PassmarkLineType>(ReadAttributeUInt(attribs, ML::AttrType, defaultType));
QT_WARNING_POP
readElementText();
return passmark;
@ -686,6 +691,9 @@ auto VPLayoutFileReader::ReadMarker() -> VLayoutPlaceLabel
{
AssertRootTag(ML::TagMarker);
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnoexcept")
VLayoutPlaceLabel marker;
QXmlStreamAttributes attribs = attributes();
@ -705,6 +713,8 @@ auto VPLayoutFileReader::ReadMarker() -> VLayoutPlaceLabel
marker.shape = shape;
QT_WARNING_POP
return marker;
}