]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_ParamSpinBox.cpp
Salome HOME
Validators for Parameters values and expressions
[modules/shaper.git] / src / ModuleBase / ModuleBase_ParamSpinBox.cpp
index cfcd5e6e0c59d0a42ea27f36287999c779520ae3..5ad7c1dcf3b88203317d95d6c4b9372e72dd5c29 100644 (file)
@@ -156,8 +156,7 @@ QValidator::State ModuleBase_ParamSpinBox::validate(QString& str, int& pos) cons
   // either a string starting with a letter, or a string starting with
   // an underscore followed by at least one alphanumeric character
   if (isAcceptVariables()) {
-    QRegExp varNameMask("(([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|_)*)|"
-                        "(_([a-z]|[A-Z]|[0-9])+([a-z]|[A-Z]|[0-9]|_)*)");
+    QRegExp varNameMask("[_a-zA-Z][a-zA-Z0-9_]*");
     if (varNameMask.exactMatch(str))
       res = QValidator::Acceptable;