mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Use QRegularExpression
This commit is contained in:
@ -1582,7 +1582,7 @@ void LibraryWindow::addFolderToCurrentIndex()
|
|||||||
"", &ok);
|
"", &ok);
|
||||||
|
|
||||||
// chars not supported in a folder's name: / \ : * ? " < > |
|
// 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);
|
bool isValid = !newFolderName.contains(invalidChars);
|
||||||
|
|
||||||
if (ok && !newFolderName.isEmpty() && isValid) {
|
if (ok && !newFolderName.isEmpty() && isValid) {
|
||||||
|
Reference in New Issue
Block a user