diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2025-07-19 16:53:57 +0300 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2025-08-09 19:42:51 +0300 |
| commit | 5f012d8b256475fda2f4182245336390387972fc (patch) | |
| tree | 63c457a9de53e433231464829de4f51bd2593acc /src/network/access/qnetworkreply.cpp | |
| parent | 16c6021d0dac2771adb5e28097ae89f671b66bc5 (diff) | |
QDirListing: check for '.' and '..' after the checking the name filters
If we check for '.' and '..' before checking the name filters one or
both of them may match if IncludeDotAndDotDot is set, but should be
rejected based on the name filters.
This matches the existing behavior of QDir/QDirIterator:
- With QDir::Filters, '.' and '..' are listed by default unless
QDir::NoDot and QDir::NoDotDot are set; so checking NoDot and NoDotDot
before chekcing the name filters, still means the name filters are
applied if '.' and '..' are listed. See matchesLegacyFilters().
- With QDirListing '.' and '..' aren't listed unless InlcudeDotAndDotDot
is set. So the name filters have to be checked before checking for the
special entrie '.' and '..'.
This should ease the porting to QDirListing.
This is slightly less efficient when using QDirListing directly (not via
QDir::entryList()); but if you want efficiency, you shouldn't be using
name filters which use regex matching, to begin with.
[ChangeLog][QtCore][QDirListing] Now listing '.' and '..' special
entries respects any set name filters. Previously if IncludeDotAndDotDot
was set, '.' and '..' would always be listed.
Pick-to: 6.10 6.9 6.8
Change-Id: I026e1e44431515ab2cc3545f993580dbf010ac9b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/access/qnetworkreply.cpp')
0 files changed, 0 insertions, 0 deletions
