From: dmv Date: Thu, 1 Oct 2009 07:00:36 +0000 (+0000) Subject: 0020502: EDF 1097 ALL: Load script with a name starting with a number X-Git-Tag: V4_1_0_maintainance_FINAL~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cb719bf47163cd107d21ca553ece0a1acc5a96c9;p=modules%2Fgui.git 0020502: EDF 1097 ALL: Load script with a name starting with a number --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 54a4ce85c..4cbc35756 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -705,7 +705,7 @@ bool DumpStudyFileValidator::canSave(const QString& file) QFileInfo fi( file ); QString name = fi.fileName(); - if ( name.find( QRegExp("[-!?#*&]") ) != -1 ) { + if ( name.find( QRegExp("[-!?#*&]") ) != -1 || name.find( QRegExp("[0-9]")) == 0 ) { SUIT_MessageBox::error1 ( parent(), QObject::tr("WRN_WARNING"), QObject::tr("WRN_FILE_NAME_BAD"), diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.po b/src/SalomeApp/resources/SalomeApp_msg_en.po index cb61307d7..70495b402 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.po +++ b/src/SalomeApp/resources/SalomeApp_msg_en.po @@ -225,7 +225,7 @@ msgid "SalomeApp_Application::WRN_DUMP_STUDY_FAILED" msgstr "Dump study failed" msgid "WRN_FILE_NAME_BAD" -msgstr "Please enter correct file name. Special chars are not allowed." +msgstr "Please, enter a valid file name. The name should not contain any reserved characters or begin with a numeral." msgid "SAVE_POINT_OBJECT_TOOLTIP" msgstr "Saved GUI state: %1"