| 22 | } |
| 23 | |
| 24 | void CMakeFilesCompilationData::rebuildFileForFolderMapping() |
| 25 | { |
| 26 | missingFiles.clear(); |
| 27 | |
| 28 | fileForFolder.clear(); |
| 29 | // iterate over files and add all direct folders |
| 30 | for (auto it = files.constBegin(), end = files.constEnd(); it != end; ++it) { |
| 31 | const auto file = it.key(); |
| 32 | const auto folder = file.parent(); |
| 33 | if (fileForFolder.contains(folder)) |
| 34 | continue; |
| 35 | fileForFolder.insert(folder, it.key()); |
| 36 | } |
| 37 | // now also add the parents of these folders |
| 38 | const auto copy = fileForFolder; |
| 39 | for (auto it = copy.begin(), end = copy.end(); it != end; ++it) { |
| 40 | auto folder = it.key(); |
| 41 | while (folder.hasParent()) { |
| 42 | folder = folder.parent(); |
| 43 | if (fileForFolder.contains(folder)) { |
| 44 | break; |
| 45 | } |
| 46 | fileForFolder.insert(folder, it.key()); |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | CMakeTarget::Type CMakeTarget::typeToEnum(const QString& value) |
| 52 | { |