Math parser should allow apostrophe in variable name.

Apostrophe is actively used in French language.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-12-12 16:45:24 +02:00
parent 0b407792d7
commit ad48858f3d
2 changed files with 10 additions and 10 deletions

View File

@ -94,7 +94,7 @@ QT_WARNING_DISABLE_GCC("-Wattributes")
inline QString NameRegExp() inline QString NameRegExp()
{ {
//Same regexp in pattern.xsd shema file. Don't forget synchronize. //Same regexp in pattern.xsd shema file. Don't forget synchronize.
return QStringLiteral("^([^0-9*/^+\\-=\\s()?%:;!.,`'\"]){1,1}([^*/^+\\-=\\s()?%:;!.,`'\"]){0,}$"); return QStringLiteral("^([^0-9*/^+\\-=\\s()?%:;!.,`'\"]){1,1}([^*/^+\\-=\\s()?%:;!.,`\"]){0,}$");
} }
QT_WARNING_POP QT_WARNING_POP

View File

@ -69,7 +69,7 @@ void QmuFormulaBase::InitCharacterSets()
<< "ЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒUəÚѝŻşҤӑâeէŐımկòuշÕúտŔ"; << "ЭųįҶرҲеԷňعθҺнԿفπÂхՇψÊэšՏÒUəÚѝŻşҤӑâeէŐımկòuշÕúտŔ";
// Defining identifier character sets // Defining identifier character sets
DefineNameChars(QStringLiteral("0123456789_@#") + symbols.join("")); DefineNameChars(QStringLiteral("0123456789_@#'") + symbols.join(""));
DefineOprtChars(symbols.join("") + QStringLiteral("+-*^/?<>=!$%&|~_")); DefineOprtChars(symbols.join("") + QStringLiteral("+-*^/?<>=!$%&|~_"));
} }