From 2235b1a05def72e3fad2e1ca48967e8dc98c6348 Mon Sep 17 00:00:00 2001 From: Mikhail Svechnikov <m.svechnikov@fz-juelich.de> Date: Tue, 13 Dec 2022 18:59:20 +0100 Subject: [PATCH] clang-format --- Base/Types/OwningVector.h | 2 +- GUI/Model/Descriptor/DoubleProperty.cpp | 6 ++-- GUI/Model/Descriptor/VectorProperty.cpp | 7 ++-- GUI/Model/Project/ProjectDocument.cpp | 3 +- GUI/Model/Sample/Lattice2DItems.cpp | 48 ++++++++++++------------- GUI/Model/Sample/LayerItem.cpp | 4 +-- GUI/Model/Sample/MaterialModel.cpp | 4 +-- GUI/Model/Sample/ProfileItems.cpp | 44 +++++++++++------------ GUI/Model/Sample/RotationItems.cpp | 40 ++++++++++++--------- GUI/Model/Sample/RoughnessItems.cpp | 16 ++++----- GUI/Model/Sample/SampleItem.cpp | 6 ++-- 11 files changed, 93 insertions(+), 87 deletions(-) diff --git a/Base/Types/OwningVector.h b/Base/Types/OwningVector.h index 01e6234e573..dc26678372b 100644 --- a/Base/Types/OwningVector.h +++ b/Base/Types/OwningVector.h @@ -45,7 +45,7 @@ public: OwningVector& operator=(OwningVector&& other) = default; void reserve(size_t n) { m_v.reserve(n); } - void emplace_back(T* e) { m_v.emplace_back(e); } + void emplace_back(T* e) { m_v.emplace_back(e); } void insert_at(size_t index, T* e) { m_v.insert(m_v.begin() + index, e); } void clear() diff --git a/GUI/Model/Descriptor/DoubleProperty.cpp b/GUI/Model/Descriptor/DoubleProperty.cpp index c38fd33ea83..11dd0cef1b4 100644 --- a/GUI/Model/Descriptor/DoubleProperty.cpp +++ b/GUI/Model/Descriptor/DoubleProperty.cpp @@ -70,14 +70,14 @@ bool DoubleProperty::isInitialized() const return !m_uid.isEmpty(); } -void DoubleProperty::writeTo(QXmlStreamWriter *w) const +void DoubleProperty::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::value, m_value); XML::writeAttribute(w, XML::Attrib::id, m_uid); XML::writeAttribute(w, XML::Attrib::version, uint(1)); } -void DoubleProperty::writeTo(QXmlStreamWriter *w, const QString &tag) const +void DoubleProperty::writeTo(QXmlStreamWriter* w, const QString& tag) const { w->writeStartElement(tag); writeTo(w); @@ -93,7 +93,7 @@ void DoubleProperty::readFrom(QXmlStreamReader* r) XML::readAttribute(r, XML::Attrib::id, &m_uid); } -void DoubleProperty::readFrom(QXmlStreamReader *r, const QString &tag) +void DoubleProperty::readFrom(QXmlStreamReader* r, const QString& tag) { readFrom(r); XML::gotoEndElementOfTag(r, tag); diff --git a/GUI/Model/Descriptor/VectorProperty.cpp b/GUI/Model/Descriptor/VectorProperty.cpp index 6d020c2de98..550524644f1 100644 --- a/GUI/Model/Descriptor/VectorProperty.cpp +++ b/GUI/Model/Descriptor/VectorProperty.cpp @@ -58,7 +58,8 @@ void VectorProperty::init(const QString& label, const QString& tooltip, const R3 bool VectorProperty::operator==(const VectorProperty& other) const { - return (m_label == other.m_label) && (m_x == other.m_x) && (m_y == other.m_y) && (m_z == other.m_z); + return (m_label == other.m_label) && (m_x == other.m_x) && (m_y == other.m_y) + && (m_z == other.m_z); } void VectorProperty::rwProperty(Streamer& s, const QString& tag) @@ -80,7 +81,7 @@ void VectorProperty::rwProperty(Streamer& s, const QString& tag) ASSERT(0); } -void VectorProperty::writeTo(QXmlStreamWriter *w) const +void VectorProperty::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -100,7 +101,7 @@ void VectorProperty::writeTo(QXmlStreamWriter *w) const w->writeEndElement(); } -void VectorProperty::readFrom(QXmlStreamReader *r) +void VectorProperty::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) diff --git a/GUI/Model/Project/ProjectDocument.cpp b/GUI/Model/Project/ProjectDocument.cpp index 9a5709fba6a..306bbade442 100644 --- a/GUI/Model/Project/ProjectDocument.cpp +++ b/GUI/Model/Project/ProjectDocument.cpp @@ -347,8 +347,7 @@ ProjectDocument::ReadResult ProjectDocument::readProject(QIODevice* device, if (r.isStartElement()) { if (r.name() == Tag::BornAgain) { Streamer(&r).assertVersion(2); - m_currentVersion = - r.attributes().value(XML::Attrib::BA_Version).toString(); + m_currentVersion = r.attributes().value(XML::Attrib::BA_Version).toString(); if (!GUI::Util::Path::isVersionMatchMinimal(m_currentVersion, minimal_supported_version)) { diff --git a/GUI/Model/Sample/Lattice2DItems.cpp b/GUI/Model/Sample/Lattice2DItems.cpp index 8de51f5bc68..32abdcbc943 100644 --- a/GUI/Model/Sample/Lattice2DItems.cpp +++ b/GUI/Model/Sample/Lattice2DItems.cpp @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#include "Base/Const/Units.h" #include "GUI/Model/Sample/Lattice2DItems.h" +#include "Base/Const/Units.h" #include "GUI/Support/XML/Serialize.h" #include "GUI/Support/XML/UtilXML.h" #include "Sample/Lattice/Lattice2D.h" @@ -35,26 +35,26 @@ Lattice2DItem::Lattice2DItem() { m_latticeRotationAngle.init( "Xi", "Rotation of lattice with respect to x-axis of reference frame (beam direction)", 0.0, - Unit::degree, 2, 1.0, RealLimits::limited(0.0, 360.0), "xi"); + Unit::degree, 2, 1.0, RealLimits::limited(0.0, 360.0), "xi"); } -void Lattice2DItem::serialize(Streamer &s) +void Lattice2DItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void Lattice2DItem::writeTo(QXmlStreamWriter *w) const +void Lattice2DItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); m_latticeRotationAngle.writeTo(w, Tag::LatticeRotationAngle); } -void Lattice2DItem::readFrom(QXmlStreamReader *r) +void Lattice2DItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -95,18 +95,18 @@ std::unique_ptr<Lattice2D> BasicLattice2DItem::createLattice() const void BasicLattice2DItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); -// Serialize::rwProperty(s, Tag::Length1, m_length1); -// Serialize::rwProperty(s, Tag::Length2, m_length2); -// Serialize::rwProperty(s, Tag::Angle, m_angle); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); + // Serialize::rwProperty(s, Tag::Length1, m_length1); + // Serialize::rwProperty(s, Tag::Length2, m_length2); + // Serialize::rwProperty(s, Tag::Angle, m_angle); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void BasicLattice2DItem::writeTo(QXmlStreamWriter *w) const +void BasicLattice2DItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -120,7 +120,7 @@ void BasicLattice2DItem::writeTo(QXmlStreamWriter *w) const m_angle.writeTo(w, Tag::Angle); } -void BasicLattice2DItem::readFrom(QXmlStreamReader *r) +void BasicLattice2DItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -160,16 +160,16 @@ std::unique_ptr<Lattice2D> SquareLattice2DItem::createLattice() const void SquareLattice2DItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); -// Serialize::rwProperty(s, Tag::Length, m_length); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); + // Serialize::rwProperty(s, Tag::Length, m_length); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void SquareLattice2DItem::writeTo(QXmlStreamWriter *w) const +void SquareLattice2DItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -184,7 +184,7 @@ void SquareLattice2DItem::writeTo(QXmlStreamWriter *w) const w->writeEndElement(); } -void SquareLattice2DItem::readFrom(QXmlStreamReader *r) +void SquareLattice2DItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -223,16 +223,16 @@ std::unique_ptr<Lattice2D> HexagonalLattice2DItem::createLattice() const void HexagonalLattice2DItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); -// Serialize::rwProperty(s, Tag::Length, m_length); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::LatticeRotationAngle, m_latticeRotationAngle); + // Serialize::rwProperty(s, Tag::Length, m_length); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void HexagonalLattice2DItem::writeTo(QXmlStreamWriter *w) const +void HexagonalLattice2DItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -247,7 +247,7 @@ void HexagonalLattice2DItem::writeTo(QXmlStreamWriter *w) const w->writeEndElement(); } -void HexagonalLattice2DItem::readFrom(QXmlStreamReader *r) +void HexagonalLattice2DItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) diff --git a/GUI/Model/Sample/LayerItem.cpp b/GUI/Model/Sample/LayerItem.cpp index c395a491ee0..6e46a3206f4 100644 --- a/GUI/Model/Sample/LayerItem.cpp +++ b/GUI/Model/Sample/LayerItem.cpp @@ -119,13 +119,13 @@ void LayerItem::removeLayout(ParticleLayoutItem* layout) delete layout; } -void LayerItem::writeTo(QXmlStreamWriter *w) const +void LayerItem::writeTo(QXmlStreamWriter* w) const { Streamer s(w); const_cast<LayerItem*>(this)->serialize(s); } -void LayerItem::readFrom(QXmlStreamReader *r) +void LayerItem::readFrom(QXmlStreamReader* r) { Streamer s(r); serialize(s); diff --git a/GUI/Model/Sample/MaterialModel.cpp b/GUI/Model/Sample/MaterialModel.cpp index 693fc518a71..62577d1b45d 100644 --- a/GUI/Model/Sample/MaterialModel.cpp +++ b/GUI/Model/Sample/MaterialModel.cpp @@ -154,7 +154,7 @@ void MaterialModel::removeMaterial(MaterialItem* materialItem) emit materialAddedOrRemoved(); } -void MaterialModel::writeTo(QXmlStreamWriter *w) const +void MaterialModel::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -166,7 +166,7 @@ void MaterialModel::writeTo(QXmlStreamWriter *w) const } } -void MaterialModel::readFrom(QXmlStreamReader *r) +void MaterialModel::readFrom(QXmlStreamReader* r) { clear(); diff --git a/GUI/Model/Sample/ProfileItems.cpp b/GUI/Model/Sample/ProfileItems.cpp index d31566e0c85..0ef4629e915 100644 --- a/GUI/Model/Sample/ProfileItems.cpp +++ b/GUI/Model/Sample/ProfileItems.cpp @@ -37,21 +37,21 @@ Profile1DItem::Profile1DItem() void Profile1DItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::Omega, m_omega); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::Omega, m_omega); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void Profile1DItem::writeTo(QXmlStreamWriter *w) const +void Profile1DItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); m_omega.writeTo(w, Tag::Omega); } -void Profile1DItem::readFrom(QXmlStreamReader *r) +void Profile1DItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -121,16 +121,16 @@ std::unique_ptr<IProfile1D> Profile1DVoigtItem::createProfile() const void Profile1DVoigtItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::Omega, m_omega); -// Serialize::rwProperty(s, Tag::Eta, m_eta); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::Omega, m_omega); + // Serialize::rwProperty(s, Tag::Eta, m_eta); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void Profile1DVoigtItem::writeTo(QXmlStreamWriter *w) const +void Profile1DVoigtItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -145,7 +145,7 @@ void Profile1DVoigtItem::writeTo(QXmlStreamWriter *w) const w->writeEndElement(); } -void Profile1DVoigtItem::readFrom(QXmlStreamReader *r) +void Profile1DVoigtItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -189,17 +189,17 @@ Profile2DItem::Profile2DItem() void Profile2DItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::OmegaX, m_omegaX); -// Serialize::rwProperty(s, Tag::OmegaY, m_omegaY); -// Serialize::rwProperty(s, Tag::Gamma, m_gamma); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::OmegaX, m_omegaX); + // Serialize::rwProperty(s, Tag::OmegaY, m_omegaY); + // Serialize::rwProperty(s, Tag::Gamma, m_gamma); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void Profile2DItem::writeTo(QXmlStreamWriter *w) const +void Profile2DItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -219,7 +219,7 @@ void Profile2DItem::writeTo(QXmlStreamWriter *w) const w->writeEndElement(); } -void Profile2DItem::readFrom(QXmlStreamReader *r) +void Profile2DItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -300,18 +300,18 @@ std::unique_ptr<IProfile2D> Profile2DVoigtItem::createProfile() const void Profile2DVoigtItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::OmegaX, m_omegaX); -// Serialize::rwProperty(s, Tag::OmegaY, m_omegaY); -// Serialize::rwProperty(s, Tag::Gamma, m_gamma); -// Serialize::rwProperty(s, Tag::Eta, m_eta); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::OmegaX, m_omegaX); + // Serialize::rwProperty(s, Tag::OmegaY, m_omegaY); + // Serialize::rwProperty(s, Tag::Gamma, m_gamma); + // Serialize::rwProperty(s, Tag::Eta, m_eta); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void Profile2DVoigtItem::writeTo(QXmlStreamWriter *w) const +void Profile2DVoigtItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -336,7 +336,7 @@ void Profile2DVoigtItem::writeTo(QXmlStreamWriter *w) const w->writeEndElement(); } -void Profile2DVoigtItem::readFrom(QXmlStreamReader *r) +void Profile2DVoigtItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) diff --git a/GUI/Model/Sample/RotationItems.cpp b/GUI/Model/Sample/RotationItems.cpp index 7e59e8c8a29..a04f1bab7a3 100644 --- a/GUI/Model/Sample/RotationItems.cpp +++ b/GUI/Model/Sample/RotationItems.cpp @@ -12,8 +12,8 @@ // // ************************************************************************************************ -#include "Base/Const/Units.h" #include "GUI/Model/Sample/RotationItems.h" +#include "Base/Const/Units.h" #include "GUI/Support/XML/Serialize.h" #include "GUI/Support/XML/UtilXML.h" @@ -45,21 +45,21 @@ RotMatrix RotationItem::rotation() const void XYZRotationItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::Angle, m_angle); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::Angle, m_angle); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void XYZRotationItem::writeTo(QXmlStreamWriter *w) const +void XYZRotationItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); m_angle.writeTo(w, Tag::Angle); } -void XYZRotationItem::readFrom(QXmlStreamReader *r) +void XYZRotationItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -67,8 +67,10 @@ void XYZRotationItem::readFrom(QXmlStreamReader *r) while (r->readNextStartElement()) { QString tag = r->name().toString(); - if (tag == Tag::Angle) m_angle.readFrom(r, tag); - else r->skipCurrentElement(); + if (tag == Tag::Angle) + m_angle.readFrom(r, tag); + else + r->skipCurrentElement(); } } @@ -125,17 +127,17 @@ EulerRotationItem::EulerRotationItem() void EulerRotationItem::serialize(Streamer& s) { -// s.assertVersion(0); -// Serialize::rwProperty(s, Tag::Alpha, m_alpha); -// Serialize::rwProperty(s, Tag::Beta, m_beta); -// Serialize::rwProperty(s, Tag::Gamma, m_gamma); + // s.assertVersion(0); + // Serialize::rwProperty(s, Tag::Alpha, m_alpha); + // Serialize::rwProperty(s, Tag::Beta, m_beta); + // Serialize::rwProperty(s, Tag::Gamma, m_gamma); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void EulerRotationItem::writeTo(QXmlStreamWriter *w) const +void EulerRotationItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); @@ -144,7 +146,7 @@ void EulerRotationItem::writeTo(QXmlStreamWriter *w) const m_gamma.writeTo(w, Tag::Gamma); } -void EulerRotationItem::readFrom(QXmlStreamReader *r) +void EulerRotationItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) @@ -152,10 +154,14 @@ void EulerRotationItem::readFrom(QXmlStreamReader *r) while (r->readNextStartElement()) { QString tag = r->name().toString(); - if (tag == Tag::Alpha) m_alpha.readFrom(r, tag); - else if (tag == Tag::Beta) m_beta.readFrom(r, tag); - else if (tag == Tag::Gamma) m_gamma.readFrom(r, tag); - else r->skipCurrentElement(); + if (tag == Tag::Alpha) + m_alpha.readFrom(r, tag); + else if (tag == Tag::Beta) + m_beta.readFrom(r, tag); + else if (tag == Tag::Gamma) + m_gamma.readFrom(r, tag); + else + r->skipCurrentElement(); } } diff --git a/GUI/Model/Sample/RoughnessItems.cpp b/GUI/Model/Sample/RoughnessItems.cpp index b0aea6a163d..5ea1daef902 100644 --- a/GUI/Model/Sample/RoughnessItems.cpp +++ b/GUI/Model/Sample/RoughnessItems.cpp @@ -41,25 +41,25 @@ BasicRoughnessItem::BasicRoughnessItem() void BasicRoughnessItem::serialize(Streamer& s) { s.assertVersion(0); -// Serialize::rwProperty(s, Tag::Sigma, m_sigma); -// Serialize::rwProperty(s, Tag::Hurst, m_hurst); -// Serialize::rwProperty(s, Tag::LateralCorrelationLength, m_lateralCorrelationLength); + // Serialize::rwProperty(s, Tag::Sigma, m_sigma); + // Serialize::rwProperty(s, Tag::Hurst, m_hurst); + // Serialize::rwProperty(s, Tag::LateralCorrelationLength, m_lateralCorrelationLength); if (s.xmlReader()) readFrom(s.xmlReader()); else if (s.xmlWriter()) writeTo(s.xmlWriter()); } -void BasicRoughnessItem::writeTo(QXmlStreamWriter *w) const +void BasicRoughnessItem::writeTo(QXmlStreamWriter* w) const { XML::writeAttribute(w, XML::Attrib::version, uint(1)); - m_sigma.writeTo(w,Tag::Sigma); - m_hurst.writeTo(w,Tag::Hurst); - m_lateralCorrelationLength.writeTo(w,Tag::LateralCorrelationLength); + m_sigma.writeTo(w, Tag::Sigma); + m_hurst.writeTo(w, Tag::Hurst); + m_lateralCorrelationLength.writeTo(w, Tag::LateralCorrelationLength); } -void BasicRoughnessItem::readFrom(QXmlStreamReader *r) +void BasicRoughnessItem::readFrom(QXmlStreamReader* r) { const uint version = XML::readUIntAttribute(r, XML::Attrib::version); Q_UNUSED(version) diff --git a/GUI/Model/Sample/SampleItem.cpp b/GUI/Model/Sample/SampleItem.cpp index 81e8ea67f35..e440354ea5d 100644 --- a/GUI/Model/Sample/SampleItem.cpp +++ b/GUI/Model/Sample/SampleItem.cpp @@ -180,9 +180,9 @@ void SampleItem::readFrom(QXmlStreamReader* r) XML::gotoEndElementOfTag(r, tag); // layers - } else if (tag == Tag::Layer) { - addLayer()->readFrom(r); - XML::gotoEndElementOfTag(r, tag); + } else if (tag == Tag::Layer) { + addLayer()->readFrom(r); + XML::gotoEndElementOfTag(r, tag); } else r->skipCurrentElement(); -- GitLab