Commit b8ea6e8f authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

remove redundancy from QmakePriFileNode::recursiveEnumerate()

we *know* that this function is called only with folders; it's part of
its api.

Change-Id: Idada1e6672a916c0d550d191770396ebbc54b02f
Reviewed-by: Tobias Hunger's avatarTobias Hunger <>
parent bd3f39a3
...@@ -622,20 +622,14 @@ QStringList QmakePriFileNode::fullVPaths(const QStringList &baseVPaths, QtSuppor ...@@ -622,20 +622,14 @@ QStringList QmakePriFileNode::fullVPaths(const QStringList &baseVPaths, QtSuppor
QSet<FileName> QmakePriFileNode::recursiveEnumerate(const QString &folder) QSet<FileName> QmakePriFileNode::recursiveEnumerate(const QString &folder)
{ {
QSet<FileName> result; QSet<FileName> result;
QFileInfo fi(folder);
if (fi.isDir()) {
QDir dir(folder); QDir dir(folder);
dir.setFilter(dir.filter() | QDir::NoDotAndDotDot); dir.setFilter(dir.filter() | QDir::NoDotAndDotDot);
foreach (const QFileInfo &file, dir.entryInfoList()) { foreach (const QFileInfo &file, dir.entryInfoList()) {
if (file.isDir() && !file.isSymLink()) if (file.isDir() && !file.isSymLink())
result += recursiveEnumerate(file.absoluteFilePath()); result += recursiveEnumerate(file.absoluteFilePath());
else if (!Core::EditorManager::isAutoSaveFile(file.fileName())) else if (!Core::EditorManager::isAutoSaveFile(file.fileName()))
result += FileName(file); result += FileName(file);
} }
} else if (fi.exists()) {
result << FileName(fi);
return result; return result;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment