Use QRegularExpression

This commit is contained in:
Luis Ángel San Martín 2021-10-07 22:28:43 +02:00
parent 2c0dccd764
commit 86a31c0ea5

View File

@ -1582,7 +1582,7 @@ void LibraryWindow::addFolderToCurrentIndex()
"", &ok);
// chars not supported in a folder's name: / \ : * ? " < > |
QRegExp invalidChars("\\/\\:\\*\\?\\\"\\<\\>\\|\\\\"); // TODO this regexp is not properly written
QRegularExpression invalidChars("\\/\\:\\*\\?\\\"\\<\\>\\|\\\\"); // TODO this regexp is not properly written
bool isValid = !newFolderName.contains(invalidChars);
if (ok && !newFolderName.isEmpty() && isValid) {