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,17 +318,11 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
|
||||||
#ifndef QT_NO_REGEXP
|
#ifndef QT_NO_REGEXP
|
||||||
// Pass all entries through name filters, except dirs if the AllDirs
|
// Pass all entries through name filters, except dirs if the AllDirs
|
||||||
if (!nameFilters.isEmpty() && !((filters & QDir::AllDirs) && fi.isDir())) {
|
if (!nameFilters.isEmpty() && !((filters & QDir::AllDirs) && fi.isDir())) {
|
||||||
bool matched = false;
|
foreach (const QRegExp iter, nameRegExps) {
|
||||||
for (QVector<QRegExp>::const_iterator iter = nameRegExps.constBegin(),
|
if (iter.exactMatch(fileName)) {
|
||||||
end = nameRegExps.constEnd();
|
return true;
|
||||||
iter != end; ++iter) {
|
|
||||||
|
|
||||||
if (iter->exactMatch(fileName)) {
|
|
||||||
matched = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!matched)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue