From 35c1267672080a47ab4e21c731316134d6c9d092 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 16 May 2016 22:14:59 +0300 Subject: [PATCH] Try catch more cases where adding new tool will produce issues. --HG-- branch : feature --- src/libs/ifc/xml/vabstractpattern.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 5b4080c88..0f8c7ebea 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -1211,6 +1211,10 @@ QStringList VAbstractPattern::ListExpressions() const //--------------------------------------------------------------------------------------------------------------------- QStringList VAbstractPattern::ListPointExpressions() const { + // Check if new tool doesn't bring new attribute with a formula. + // If no just increment number + Q_STATIC_ASSERT(static_cast(Tool::LAST_ONE_DO_NOT_USE) == 43); + QStringList expressions; const QDomNodeList list = elementsByTagName(TagPoint); for (int i=0; i < list.size(); ++i) @@ -1278,6 +1282,10 @@ QStringList VAbstractPattern::ListPointExpressions() const //--------------------------------------------------------------------------------------------------------------------- QStringList VAbstractPattern::ListArcExpressions() const { + // Check if new tool doesn't bring new attribute with a formula. + // If no just increment number + Q_STATIC_ASSERT(static_cast(Tool::LAST_ONE_DO_NOT_USE) == 43); + QStringList expressions; const QDomNodeList list = elementsByTagName(TagArc); for (int i=0; i < list.size(); ++i) @@ -1335,6 +1343,10 @@ QStringList VAbstractPattern::ListSplineExpressions() const //--------------------------------------------------------------------------------------------------------------------- QStringList VAbstractPattern::ListPathPointExpressions() const { + // Check if new tool doesn't bring new attribute with a formula. + // If no just increment number + Q_STATIC_ASSERT(static_cast(Tool::LAST_ONE_DO_NOT_USE) == 43); + QStringList expressions; const QDomNodeList list = elementsByTagName(AttrPathPoint); for (int i=0; i < list.size(); ++i) @@ -1397,6 +1409,10 @@ QStringList VAbstractPattern::ListIncrementExpressions() const //--------------------------------------------------------------------------------------------------------------------- QStringList VAbstractPattern::ListOperationExpressions() const { + // Check if new tool doesn't bring new attribute with a formula. + // If no just increment number + Q_STATIC_ASSERT(static_cast(Tool::LAST_ONE_DO_NOT_USE) == 43); + QStringList expressions; const QDomNodeList list = elementsByTagName(TagOperation); for (int i=0; i < list.size(); ++i)