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

Method slotFolderAdded

plugins/qmakemanager/qmakemanager.cpp:255–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255void QMakeProjectManager::slotFolderAdded(ProjectFolderItem* folder)
256{
257 auto* qmakeParent = dynamic_cast<QMakeFolderItem*>(folder);
258 if (!qmakeParent) {
259 return;
260 }
261
262 qCDebug(KDEV_QMAKE) << "adding targets for" << folder->path();
263 const auto proFiles = qmakeParent->projectFiles();
264 for (QMakeProjectFile* pro : proFiles) {
265 const auto targets = pro->targets();
266 for (const auto& s : targets) {
267 if (!isValid(Path(folder->path(), s), false, folder->project())) {
268 continue;
269 }
270 qCDebug(KDEV_QMAKE) << "adding target:" << s;
271 Q_ASSERT(!s.isEmpty());
272 auto target = new QMakeTargetItem(pro, folder->project(), s, folder);
273 const auto files = pro->filesForTarget(s);
274 for (const auto& path : files) {
275 new ProjectFileItem(folder->project(), Path(path), target);
276 /// TODO: signal?
277 }
278 }
279 }
280}
281
282ProjectFolderItem* QMakeProjectManager::import(IProject* project)
283{

Callers

nothing calls this directly

Calls 8

projectFilesMethod · 0.80
filesForTargetMethod · 0.80
PathClass · 0.70
isValidFunction · 0.50
pathMethod · 0.45
targetsMethod · 0.45
projectMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected