Commit db670cb
perf(discovery): use QStringView for forbidden-name checks
Replace QString::split('.') with indexOf/lastIndexOf to extract the
basename and extension without allocating a QList<QString> per file,
and hold the slices as QStringView so the comparisons against
forbiddenFilenames / forbiddenBasenames / forbiddenExtensions run
against zero-copy views into the original QString instead of allocating
new QString copies.
Signed-off-by: Qoole <2862661+qoole@users.noreply.github.com>1 parent 6907ec3 commit db670cb
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| |||
0 commit comments