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

Method workingDirectory

plugins/makebuilder/makejob.cpp:131–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131QUrl MakeJob::workingDirectory() const
132{
133 ProjectBaseItem* it = item();
134 if(!it)
135 return QUrl();
136
137 KDevelop::IBuildSystemManager *bldMan = it->project()->buildSystemManager();
138 if( bldMan )
139 return bldMan->buildDirectory( it ).toUrl(); // the correct build dir
140 else
141 {
142 // Just build in-source, where the build directory equals the one with particular target/source.
143 for( ProjectBaseItem* item = it; item; item = item->parent() ) {
144 switch( item->type() ) {
145 case KDevelop::ProjectBaseItem::Folder:
146 case KDevelop::ProjectBaseItem::BuildFolder:
147 return static_cast<KDevelop::ProjectFolderItem*>(item)->path().toUrl();
148 case KDevelop::ProjectBaseItem::Target:
149 case KDevelop::ProjectBaseItem::File:
150 break;
151 }
152 }
153 return QUrl();
154 }
155}
156
157QStringList MakeJob::privilegedExecutionCommand() const
158{

Callers

nothing calls this directly

Calls 8

buildSystemManagerMethod · 0.80
QUrlClass · 0.70
projectMethod · 0.45
toUrlMethod · 0.45
buildDirectoryMethod · 0.45
parentMethod · 0.45
typeMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected