mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Use QRegularExpression
This commit is contained in:
parent
2c0dccd764
commit
86a31c0ea5
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user