Code/Editor

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-02 17:56:56 -07:00
parent 3b28267569
commit a14b4e478e
47 changed files with 208 additions and 1219 deletions
+3 -3
View File
@@ -98,7 +98,7 @@ CLevelFileDialog::CLevelFileDialog(bool openDialog, QWidget* parent)
connect(ui->nameLineEdit, &QLineEdit::textChanged, this, &CLevelFileDialog::OnNameChanged);
}
// reject invalid file names (see CryStringUtils::IsValidFileName)
// reject invalid file names
ui->nameLineEdit->setValidator(new QRegExpValidator(QRegExp("^[a-zA-Z0-9_\\-./]*$"), ui->nameLineEdit));
ReloadTree();
@@ -315,7 +315,7 @@ void CLevelFileDialog::OnNewFolder()
const QString newFolderName = inputDlg.textValue();
const QString newFolderPath = parentFullPath + "/" + newFolderName;
if (!CryStringUtils::IsValidFileName(newFolderName.toUtf8().data()))
if (!AZ::StringFunc::Path::IsValid(newFolderName.toUtf8().data()))
{
QMessageBox box(this);
box.setText(tr("Please enter a single, valid folder name(standard English alphanumeric characters only)"));
@@ -416,7 +416,7 @@ bool CLevelFileDialog::ValidateSaveLevelPath(QString& errorMessage) const
const QString enteredPath = GetEnteredPath();
const QString levelPath = GetLevelPath();
if (!CryStringUtils::IsValidFileName(Path::GetFileName(levelPath).toUtf8().data()))
if (!AZ::StringFunc::Path::IsValid(Path::GetFileName(levelPath).toUtf8().data()))
{
errorMessage = tr("Please enter a valid level name (standard English alphanumeric characters only)");
return false;