bool DumpStudyFileValidator::canSave(const QString& file)
{
QFileInfo fi( file );
- QString name = fi.fileName();
- if ( name.find( QRegExp("[-!?#*&]") ) != -1 || name.find( QRegExp("[0-9]")) == 0 ) {
+ if ( !QRegExp( "[A-Za-z_][A-Za-z0-9_]*" ).exactMatch( fi.baseName( true ) ) ) {
SUIT_MessageBox::error1 ( parent(),
QObject::tr("WRN_WARNING"),
QObject::tr("WRN_FILE_NAME_BAD"),
msgstr "Dump study failed"
msgid "WRN_FILE_NAME_BAD"
-msgstr "Please, enter a valid file name. The name should not contain any reserved characters or begin with a numeral."
+msgstr "Please, enter valid file name.\nPython file must include only letters, digits and underscores and start from letter or underscore."
msgid "SAVE_POINT_OBJECT_TOOLTIP"
msgstr "Saved GUI state: %1"