diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc
index c98ebbe84..a906c1e05 100644
--- a/src/libs/ifc/schema.qrc
+++ b/src/libs/ifc/schema.qrc
@@ -73,6 +73,7 @@
schema/individual_measurements/v0.3.3.xsd
schema/individual_measurements/v0.4.0.xsd
schema/individual_measurements/v0.5.0.xsd
+ schema/individual_measurements/v0.5.1.xsd
schema/label_template/v1.0.0.xsd
schema/watermark/v1.0.0.xsd
diff --git a/src/libs/ifc/schema/individual_measurements/v0.5.1.xsd b/src/libs/ifc/schema/individual_measurements/v0.5.1.xsd
new file mode 100644
index 000000000..80d99fcc9
--- /dev/null
+++ b/src/libs/ifc/schema/individual_measurements/v0.5.1.xsd
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/libs/ifc/xml/vvitconverter.cpp b/src/libs/ifc/xml/vvitconverter.cpp
index a9e9c2bdd..c4da6193a 100644
--- a/src/libs/ifc/xml/vvitconverter.cpp
+++ b/src/libs/ifc/xml/vvitconverter.cpp
@@ -54,8 +54,8 @@
*/
const QString VVITConverter::MeasurementMinVerStr = QStringLiteral("0.2.0");
-const QString VVITConverter::MeasurementMaxVerStr = QStringLiteral("0.5.0");
-const QString VVITConverter::CurrentSchema = QStringLiteral("://schema/individual_measurements/v0.5.0.xsd");
+const QString VVITConverter::MeasurementMaxVerStr = QStringLiteral("0.5.1");
+const QString VVITConverter::CurrentSchema = QStringLiteral("://schema/individual_measurements/v0.5.1.xsd");
//VVITConverter::MeasurementMinVer; // <== DON'T FORGET TO UPDATE TOO!!!!
//VVITConverter::MeasurementMaxVer; // <== DON'T FORGET TO UPDATE TOO!!!!
@@ -89,7 +89,8 @@ QString VVITConverter::XSDSchema(int ver) const
std::make_pair(FORMAT_VERSION(0, 3, 2), QStringLiteral("://schema/individual_measurements/v0.3.2.xsd")),
std::make_pair(FORMAT_VERSION(0, 3, 3), QStringLiteral("://schema/individual_measurements/v0.3.3.xsd")),
std::make_pair(FORMAT_VERSION(0, 4, 0), QStringLiteral("://schema/individual_measurements/v0.4.0.xsd")),
- std::make_pair(FORMAT_VERSION(0, 5, 0), CurrentSchema),
+ std::make_pair(FORMAT_VERSION(0, 5, 0), QStringLiteral("://schema/individual_measurements/v0.5.0.xsd")),
+ std::make_pair(FORMAT_VERSION(0, 5, 1), CurrentSchema),
};
if (schemas.contains(ver))
@@ -132,6 +133,10 @@ void VVITConverter::ApplyPatches()
ValidateXML(XSDSchema(FORMAT_VERSION(0, 5, 0)));
Q_FALLTHROUGH();
case (FORMAT_VERSION(0, 5, 0)):
+ ToV0_5_1();
+ ValidateXML(XSDSchema(FORMAT_VERSION(0, 5, 1)));
+ Q_FALLTHROUGH();
+ case (FORMAT_VERSION(0, 5, 1)):
break;
default:
InvalidVersion(m_ver);
@@ -150,7 +155,7 @@ void VVITConverter::DowngradeToCurrentMaxVersion()
bool VVITConverter::IsReadOnly() const
{
// Check if attribute read-only was not changed in file format
- Q_STATIC_ASSERT_X(VVITConverter::MeasurementMaxVer == FORMAT_VERSION(0, 5, 0),
+ Q_STATIC_ASSERT_X(VVITConverter::MeasurementMaxVer == FORMAT_VERSION(0, 5, 1),
"Check attribute read-only.");
// Possibly in future attribute read-only will change position etc.
@@ -428,3 +433,14 @@ void VVITConverter::ToV0_5_0()
SetVersion(QStringLiteral("0.5.0"));
Save();
}
+
+//---------------------------------------------------------------------------------------------------------------------
+void VVITConverter::ToV0_5_1()
+{
+ // TODO. Delete if minimal supported version is 0.5.1
+ Q_STATIC_ASSERT_X(VVITConverter::MeasurementMinVer < FORMAT_VERSION(0, 5, 1),
+ "Time to refactor the code.");
+
+ SetVersion(QStringLiteral("0.5.1"));
+ Save();
+}
diff --git a/src/libs/ifc/xml/vvitconverter.h b/src/libs/ifc/xml/vvitconverter.h
index fa7a8bba0..aa7360f71 100644
--- a/src/libs/ifc/xml/vvitconverter.h
+++ b/src/libs/ifc/xml/vvitconverter.h
@@ -49,7 +49,7 @@ public:
static const QString MeasurementMaxVerStr;
static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const int MeasurementMinVer = FORMAT_VERSION(0, 2, 0);
- static Q_DECL_CONSTEXPR const int MeasurementMaxVer = FORMAT_VERSION(0, 5, 0);
+ static Q_DECL_CONSTEXPR const int MeasurementMaxVer = FORMAT_VERSION(0, 5, 1);
protected:
virtual int MinVer() const override;
@@ -82,6 +82,7 @@ private:
void ToV0_3_3();
void ToV0_4_0();
void ToV0_5_0();
+ void ToV0_5_1();
};
//---------------------------------------------------------------------------------------------------------------------