diff --git a/src/libs/ifc/xml/vvitconverter.cpp b/src/libs/ifc/xml/vvitconverter.cpp index 6775fe3e6..8bd754b78 100644 --- a/src/libs/ifc/xml/vvitconverter.cpp +++ b/src/libs/ifc/xml/vvitconverter.cpp @@ -168,17 +168,14 @@ void VVITConverter::ConvertMeasurementsToV0_3_0() QDomElement bm = createElement(tagBM); - QMultiMap names = OldNamesToNewNames_InV0_3_0(); - - QMutableMapIterator iter( names ); - while( iter.hasNext() ) + const QMultiMap names = OldNamesToNewNames_InV0_3_0(); + const QList keys = names.uniqueKeys(); + for (int i = 0; i < keys.size(); ++i) { - iter.next(); - qreal resValue = 0; // This has the same effect as a .values(), just isn't as elegant - const QList list = names.values( iter.key() ); + const QList list = names.values( keys.at(i) ); foreach(const QString &val, list ) { const QDomNodeList nodeList = this->elementsByTagName(val); @@ -195,7 +192,7 @@ void VVITConverter::ConvertMeasurementsToV0_3_0() } } - bm.appendChild(AddMV0_3_0(iter.key(), resValue)); + bm.appendChild(AddMV0_3_0(keys.at(i), resValue)); } QDomElement rootElement = this->documentElement(); diff --git a/src/libs/ifc/xml/vvstconverter.cpp b/src/libs/ifc/xml/vvstconverter.cpp index 6e0668590..83ebac3a5 100644 --- a/src/libs/ifc/xml/vvstconverter.cpp +++ b/src/libs/ifc/xml/vvstconverter.cpp @@ -187,19 +187,16 @@ void VVSTConverter::ConvertMeasurementsToV0_4_0() QDomElement bm = createElement(tagBM); - QMultiMap names = OldNamesToNewNames_InV0_3_0(); - - QMutableMapIterator iter( names ); - while( iter.hasNext() ) + const QMultiMap names = OldNamesToNewNames_InV0_3_0(); + const QList keys = names.uniqueKeys(); + for (int i = 0; i < keys.size(); ++i) { - iter.next(); - qreal resValue = 0; qreal resSizeIncrease = 0; qreal resHeightIncrease = 0; // This has the same effect as a .values(), just isn't as elegant - const QList list = names.values( iter.key() ); + const QList list = names.values( keys.at(i) ); foreach(const QString &val, list ) { const QDomNodeList nodeList = this->elementsByTagName(val); @@ -221,7 +218,7 @@ void VVSTConverter::ConvertMeasurementsToV0_4_0() } } - bm.appendChild(AddMV0_4_0(iter.key(), resValue, resSizeIncrease, resHeightIncrease)); + bm.appendChild(AddMV0_4_0(keys.at(i), resValue, resSizeIncrease, resHeightIncrease)); } QDomElement rootElement = this->documentElement(); diff --git a/src/test/ValentinaTest/tst_tape/keiko.vit b/src/test/ValentinaTest/tst_tape/keiko.vit index b2d3ae567..7c4f7b408 100644 --- a/src/test/ValentinaTest/tst_tape/keiko.vit +++ b/src/test/ValentinaTest/tst_tape/keiko.vit @@ -1,10 +1,6 @@ - - 0.3.0 - false - - cm + 0.2.0 @@ -13,131 +9,155 @@ username@example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + cm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +