mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
use foreach() for iteration in QDirIteratorPrivate::matchesFilters()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
e7d17d4d43
commit
a18cf42a18
1 changed files with 4 additions and 10 deletions
|
@ -318,18 +318,12 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
|
|||
#ifndef QT_NO_REGEXP
|
||||
// Pass all entries through name filters, except dirs if the AllDirs
|
||||
if (!nameFilters.isEmpty() && !((filters & QDir::AllDirs) && fi.isDir())) {
|
||||
bool matched = false;
|
||||
for (QVector<QRegExp>::const_iterator iter = nameRegExps.constBegin(),
|
||||
end = nameRegExps.constEnd();
|
||||
iter != end; ++iter) {
|
||||
|
||||
if (iter->exactMatch(fileName)) {
|
||||
matched = true;
|
||||
break;
|
||||
foreach (const QRegExp iter, nameRegExps) {
|
||||
if (iter.exactMatch(fileName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!matched)
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
// skip symlinks
|
||||
|
|
Loading…
Add table
Reference in a new issue