46 QCache<QString,
bool> *fileSet = content.object(path);
48 if (
const bool *exists = fileSet->object(file))
53 if (fileSet->totalCost() < fileSet->maxCost())
56 }
else if (content.contains(path)) {
66 fileSet = dir.exists() ?
new QCache<QString,
bool> :
nullptr;
67 const bool inserted = content.insert(path, fileSet);
72 switch (populateFileSet(fileSet, dir.path(), file)) {
84 Q_ASSERT(fileSet->totalCost() == fileSet->maxCost());
87 const QDirListing singleFile(dir.path(), { file }, dirListingFlags());
88 const bool exists = singleFile.begin() != singleFile.end();
89 fileSet->insert(file,
new bool(exists));
90 Q_ASSERT(fileSet->totalCost() == fileSet->maxCost());
96 if (!content.contains(dirPath)) {
97 if (QDir(dirPath).exists()) {
98 QCache<QString,
bool> *files =
new QCache<QString,
bool>;
99 populateFileSet(files, dirPath, QString());
100 content.insert(dirPath, files);
104 content.insert(dirPath,
nullptr);
108 return content.object(dirPath) !=
nullptr;