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

Method GenerateMultiPathProject

kdevplatform/tests/projectsgenerator.cpp:96–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96IProject* ProjectsGenerator::GenerateMultiPathProject()
97{
98 const QString mp = QStringLiteral( "multipathproject" );
99 auto rootFolder = QDir::temp();
100 QDir(rootFolder.absolutePath() + QLatin1Char('/') + mp).removeRecursively();
101 rootFolder.mkdir( mp );
102 rootFolder.cd( mp );
103 rootFolder.mkdir( QStringLiteral("src") );
104 rootFolder.mkdir( QStringLiteral(".kdev4") );
105 rootFolder.mkdir( QStringLiteral("anotherFolder") );
106
107 {
108 QFile file( rootFolder.filePath( QStringLiteral("multipathproject.kdev4") ) );
109 createFile( file );
110 QTextStream stream1( &file );
111 stream1 << "[Project]\nName=MultiPathProject\nManager=KDevCustomBuildSystem";
112 ;
113 }
114 {
115 QFile file1( rootFolder.filePath( QStringLiteral("src/main.cpp") ) );
116 createFile( file1 );
117 QFile file2( rootFolder.filePath( QStringLiteral("anotherFolder/tst.h") ) );
118 createFile( file2 );
119 }
120 {
121 QFile file( rootFolder.filePath( QStringLiteral(".kdev4/multipathproject.kdev4") ) );
122 createFile( file );
123 QTextStream stream( &file );
124 stream << "[Buildset]\n" <<
125 "BuildItems=@Variant(\\x00\\x00\\x00\\t\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x0b\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00 \\x00M\\x00u\\x00l\\x00t\\x00i\\x00P\\x00a\\x00t\\x00h\\x00P\\x00r\\x00o\\x00j\\x00e\\x00c\\x00t)\n\n" <<
126 "[CustomBuildSystem]\n" <<
127 "CurrentConfiguration=BuildConfig0\n\n" <<
128 "[CustomBuildSystem][BuildConfig0]\n" <<
129 "BuildDir=file:///" << rootFolder.absolutePath() << "/build\n" <<
130 "[CustomDefinesAndIncludes][ProjectPath0]\n" <<
131 "Path=.\n" <<
132 "[CustomDefinesAndIncludes][ProjectPath0][Defines]\n" <<
133 "SOURCE=CONTENT\n" <<
134 "_COPY=\n" <<
135 "[CustomDefinesAndIncludes][ProjectPath0][Includes]\n" <<
136 "1=" << QDir::rootPath() << "usr/include/otherdir\n" <<
137 "[CustomDefinesAndIncludes][ProjectPath1]\n" <<
138 "Path=src\n" <<
139 "[CustomDefinesAndIncludes][ProjectPath1][Defines]\n" <<
140 "BUILD=debug\n" <<
141 "[CustomDefinesAndIncludes][ProjectPath1][Includes]\n" <<
142 "1=" << QDir::rootPath() << "usr/local/include/mydir\n" <<
143 "[CustomDefinesAndIncludes][ProjectPath2]\n" <<
144 "Path=anotherFolder\n" <<
145 "[CustomDefinesAndIncludes][ProjectPath2][Defines]\n" <<
146 "HIDDEN=\n" <<
147 "[Project]\n" <<
148 "VersionControlSupport=\n";
149 }
150 return loadProject( QDir::tempPath() + QStringLiteral( "/multipathproject/multipathproject.kdev4" ), QStringLiteral("MultiPathProject") );
151}
152
153IProject* ProjectsGenerator::GenerateSimpleProjectWithOutOfProjectFiles()

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