| 49 | |
| 50 | namespace KDevelop { |
| 51 | IProject* ProjectsGenerator::GenerateSimpleProject() |
| 52 | { |
| 53 | const QString sp = QStringLiteral( "simpleproject" ); |
| 54 | auto rootFolder = QDir::temp(); |
| 55 | QDir(rootFolder.absolutePath() + QLatin1Char('/') + sp).removeRecursively(); |
| 56 | rootFolder.mkdir( sp ); |
| 57 | rootFolder.cd( sp ); |
| 58 | rootFolder.mkdir( QStringLiteral("src") ); |
| 59 | rootFolder.mkdir( QStringLiteral(".kdev4") ); |
| 60 | |
| 61 | { |
| 62 | QFile file( rootFolder.filePath( QStringLiteral("simpleproject.kdev4") ) ); |
| 63 | createFile( file ); |
| 64 | QTextStream stream1( &file ); |
| 65 | stream1 << "[Project]\nName=SimpleProject\nManager=KDevCustomBuildSystem"; |
| 66 | } |
| 67 | { |
| 68 | QFile file( rootFolder.filePath( QStringLiteral("src/main.cpp") ) ); |
| 69 | createFile( file ); |
| 70 | } |
| 71 | { |
| 72 | QFile file( rootFolder.filePath( QStringLiteral(".kdev4/simpleproject.kdev4") ) ); |
| 73 | createFile( file ); |
| 74 | QTextStream stream( &file ); |
| 75 | stream << "[Buildset]\n" << |
| 76 | "BuildItems=@Variant(\\x00\\x00\\x00\\t\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x0b\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x1a\\x00S\\x00i\\x00m\\x00p\\x00l\\x00e\\x00P\\x00r\\x00o\\x00j\\x00e\\x00c\\x00t)\n\n" << |
| 77 | "[CustomBuildSystem]\n" << |
| 78 | "CurrentConfiguration=BuildConfig0\n\n" << |
| 79 | "[CustomBuildSystem][BuildConfig0]\n" << |
| 80 | "BuildDir=file:///" << rootFolder.absolutePath() << "/build\n" << |
| 81 | "Title=mainbuild\n\n" << |
| 82 | |
| 83 | "[CustomDefinesAndIncludes][ProjectPath0]\n" << |
| 84 | "Path=/\n" << |
| 85 | "[CustomDefinesAndIncludes][ProjectPath0][Defines]\n" << |
| 86 | "_DEBUG=\n" << |
| 87 | "VARIABLE=VALUE\n" << |
| 88 | "[CustomDefinesAndIncludes][ProjectPath0][Includes]\n" << |
| 89 | "1=" << QDir::rootPath() << "usr/include/mydir\n" << |
| 90 | "[Project]\n" << |
| 91 | "VersionControlSupport=\n"; |
| 92 | } |
| 93 | return loadProject( QDir::tempPath() + QStringLiteral( "/simpleproject/simpleproject.kdev4" ), QStringLiteral("SimpleProject") ); |
| 94 | } |
| 95 | |
| 96 | IProject* ProjectsGenerator::GenerateMultiPathProject() |
| 97 | { |
nothing calls this directly
no test coverage detected