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

Method GenerateEmptyProject

kdevplatform/tests/projectsgenerator.cpp:170–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170IProject* ProjectsGenerator::GenerateEmptyProject()
171{
172 const QString ep = QStringLiteral("emptyproject");
173 auto rootFolder = QDir::temp();
174 QDir(rootFolder.absolutePath() + QLatin1Char('/') + ep).removeRecursively();
175 rootFolder.mkdir(ep);
176 rootFolder.cd(ep);
177 rootFolder.mkdir(QStringLiteral(".kdev4"));
178
179 {
180 QFile file(rootFolder.filePath(QStringLiteral("emptyproject.kdev4")));
181 createFile(file);
182 QTextStream stream(&file);
183 stream << "[Project]\nName=EmptyProject\nManager=KDevCustomBuildSystem";
184 }
185
186 {
187 QFile file(rootFolder.filePath(QStringLiteral(".kdev4/emptyproject.kdev4")));
188 createFile(file);
189 QTextStream stream(&file);
190 stream << "[Project]\n" << "VersionControlSupport=\n";
191 }
192 return loadProject(QDir::tempPath() + QStringLiteral( "/emptyproject/emptyproject.kdev4" ), QStringLiteral("EmptyProject"));
193}
194
195IProject* ProjectsGenerator::GenerateEmptyBuildDirProject()
196{

Callers

nothing calls this directly

Calls 7

removeRecursivelyMethod · 0.80
mkdirMethod · 0.80
cdMethod · 0.80
createFileFunction · 0.70
loadProjectFunction · 0.70
QDirClass · 0.50
filePathMethod · 0.45

Tested by

no test coverage detected