remove pointless checks for "." and ".."
Change-Id: Id2b1353a73012461c594319f9d1341bccef85ecc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
818eae42cb
commit
03fc60debf
@ -111,10 +111,8 @@ ProjectGenerator::init()
|
|||||||
dir += Option::dir_sep;
|
dir += Option::dir_sep;
|
||||||
if (Option::recursive) {
|
if (Option::recursive) {
|
||||||
QStringList files = QDir(dir).entryList(QDir::Files);
|
QStringList files = QDir(dir).entryList(QDir::Files);
|
||||||
for(int i = 0; i < (int)files.count(); i++) {
|
for (int i = 0; i < files.count(); i++)
|
||||||
if(files[i] != "." && files[i] != "..")
|
dirs.append(dir + files[i] + QDir::separator() + builtin_regex);
|
||||||
dirs.append(dir + files[i] + QDir::separator() + builtin_regex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
regex = builtin_regex;
|
regex = builtin_regex;
|
||||||
} else {
|
} else {
|
||||||
@ -183,8 +181,7 @@ ProjectGenerator::init()
|
|||||||
nd += QDir::separator();
|
nd += QDir::separator();
|
||||||
nd += profiles[i];
|
nd += profiles[i];
|
||||||
fileFixify(nd);
|
fileFixify(nd);
|
||||||
if(profiles[i] != "." && profiles[i] != ".." &&
|
if (!subdirs.contains(nd, Qt::CaseInsensitive) && !out_file.endsWith(nd))
|
||||||
!subdirs.contains(nd, Qt::CaseInsensitive) && !out_file.endsWith(nd))
|
|
||||||
subdirs.append(nd);
|
subdirs.append(nd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user