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

Method buildDirectory

plugins/custom-buildsystem/custombuildsystemplugin.cpp:58–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58Path CustomBuildSystem::buildDirectory( ProjectBaseItem* item ) const
59{
60 Path p;
61 if( item->folder() ) {
62 p = item->path();
63 } else {
64 ProjectBaseItem* parent = item;
65 while( !parent->folder() ) {
66 parent = parent->parent();
67 }
68 p = parent->path();
69 }
70 const QString relative = item->project()->path().relativePath(p);
71 KConfigGroup grp = configuration( item->project() );
72 if(!grp.isValid()) {
73 return Path();
74 }
75
76 Path builddir(grp.readEntry(ConfigConstants::buildDirKey(), QUrl()));
77 if(!builddir.isValid() ) // set builddir to default if project contains a buildDirKey that does not have a value
78 {
79 builddir = item->project()->path();
80 }
81 builddir.addPath( relative );
82 return builddir;
83}
84
85IProjectBuilder* CustomBuildSystem::builder() const
86{

Callers 4

CustomBuildJobMethod · 0.45
loadSimpleProjectMethod · 0.45
buildDirProjectMethod · 0.45
loadMultiPathProjectMethod · 0.45

Calls 11

buildDirKeyFunction · 0.85
folderMethod · 0.80
relativePathMethod · 0.80
readEntryMethod · 0.80
PathClass · 0.50
QUrlClass · 0.50
pathMethod · 0.45
parentMethod · 0.45
projectMethod · 0.45
isValidMethod · 0.45
addPathMethod · 0.45

Tested by 3

loadSimpleProjectMethod · 0.36
buildDirProjectMethod · 0.36
loadMultiPathProjectMethod · 0.36