Commit e0b8acf
committed
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 6341f80 commit e0b8acf
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
0 commit comments