MCPcopy Create free account
hub / github.com/KDE/kdevelop / rebuildFileForFolderMapping

Method rebuildFileForFolderMapping

plugins/cmake/cmakeprojectdata.cpp:24–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24void 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
51CMakeTarget::Type CMakeTarget::typeToEnum(const QString& value)
52{

Callers 3

importCommandsFunction · 0.80
processResponseMethod · 0.80
parseCodeModelFunction · 0.80

Calls 10

constBeginMethod · 0.80
constEndMethod · 0.80
hasParentMethod · 0.80
clearMethod · 0.45
keyMethod · 0.45
parentMethod · 0.45
containsMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected