diff --git a/ChangeLog.txt b/ChangeLog.txt index 7a3f1487a..c321536b6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -39,6 +39,7 @@ - [#963] Bug in tool Point intersect curve and axis. - [#964] Assign operator crashes math parser. - [#966] Unable to control Approximation scale for arc with length. +- [#967] Variable must not include new line character. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index a86cf22e7..703042feb 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -3882,7 +3882,7 @@ void VPattern::ParseIncrementsElement(const QDomNode &node, const Document &pars { if (domElement.tagName() == TagIncrement) { - const QString name = GetParametrString(domElement, AttrName, QString()); + const QString name = GetParametrString(domElement, AttrName, QString()).simplified(); const QString desc = GetParametrEmptyString(domElement, AttrDescription); const IncrementType type = StringToIncrementType(GetParametrString(domElement, AttrType, strTypeIncrement)); diff --git a/src/libs/ifc/schema/individual_measurements/v0.5.0.xsd b/src/libs/ifc/schema/individual_measurements/v0.5.0.xsd index c7bca79f1..fd8ba97f7 100644 --- a/src/libs/ifc/schema/individual_measurements/v0.5.0.xsd +++ b/src/libs/ifc/schema/individual_measurements/v0.5.0.xsd @@ -42,7 +42,7 @@ - + diff --git a/src/libs/ifc/schema/pattern/v0.7.12.xsd b/src/libs/ifc/schema/pattern/v0.7.12.xsd index 73eac9aa8..1080cf218 100644 --- a/src/libs/ifc/schema/pattern/v0.7.12.xsd +++ b/src/libs/ifc/schema/pattern/v0.7.12.xsd @@ -763,7 +763,7 @@ - + diff --git a/src/libs/ifc/schema/standard_measurements/v0.4.4.xsd b/src/libs/ifc/schema/standard_measurements/v0.4.4.xsd index 16fee792f..c49f3ee16 100644 --- a/src/libs/ifc/schema/standard_measurements/v0.4.4.xsd +++ b/src/libs/ifc/schema/standard_measurements/v0.4.4.xsd @@ -43,7 +43,7 @@ - + diff --git a/src/libs/qmuparser/qmudef.cpp b/src/libs/qmuparser/qmudef.cpp index 2e8316546..608c85e60 100644 --- a/src/libs/qmuparser/qmudef.cpp +++ b/src/libs/qmuparser/qmudef.cpp @@ -317,14 +317,14 @@ QString NameRegExp() } } - negativeSigns.replace('-', "\\-"); + negativeSigns.replace('-', QLatin1String("\\-")); groupSeparators.remove('\''); //Same regexp in pattern.xsd shema file. Don't forget to synchronize. // \p{Nd} - \p{Decimal_Digit_Number} // \p{Zs} - \p{Space_Separator} - regex = QString("^([^\\p{Nd}\\p{Zs}*/&|!<>^\\()%1%2%3%4=?:;'\"]){1,1}" - "([^\\p{Zs}*/&|!<>^\\()%1%2%3%4=?:;\"]){0,}$") + regex = QString("^([^\\p{Nd}\\p{Zs}*/&|!<>^\n\\()%1%2%3%4=?:;'\"]){1,1}" + "([^\\p{Zs}*/&|!<>^\n\\()%1%2%3%4=?:;\"]){0,}$") .arg(negativeSigns, positiveSigns, decimalPoints, groupSeparators); } diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index 03dff7a4d..9c11e28b5 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -264,7 +264,7 @@ void VMeasurements::ReadMeasurements(qreal height, qreal size) const { const QDomElement dom = list.at(i).toElement(); - const QString name = GetParametrString(dom, AttrName); + const QString name = GetParametrString(dom, AttrName).simplified(); const QString description = GetParametrEmptyString(dom, AttrDescription); const QString fullName = GetParametrEmptyString(dom, AttrFullName); diff --git a/src/libs/vpatterndb/variables/vinternalvariable.cpp b/src/libs/vpatterndb/variables/vinternalvariable.cpp index 1e205e78a..da5b2acf6 100644 --- a/src/libs/vpatterndb/variables/vinternalvariable.cpp +++ b/src/libs/vpatterndb/variables/vinternalvariable.cpp @@ -94,7 +94,7 @@ QString VInternalVariable::GetName() const //--------------------------------------------------------------------------------------------------------------------- void VInternalVariable::SetName(const QString &name) { - d->name = name; + d->name = name.simplified(); } //---------------------------------------------------------------------------------------------------------------------