| 22 | using namespace KDevelop; |
| 23 | |
| 24 | int main(int argc, char** argv) |
| 25 | { |
| 26 | if (argc != 2) { |
| 27 | qWarning() << "Missing argument for directory path to list."; |
| 28 | return 1; |
| 29 | } |
| 30 | QCoreApplication app(argc, argv); |
| 31 | |
| 32 | AutoTestShell::init(); |
| 33 | auto core = TestCore::initialize(Core::NoUi); |
| 34 | |
| 35 | const auto pluginMetaData = makeTestPluginMetaData("ImportTestAbstractFileManager"); |
| 36 | auto plugin = new AbstractFileManagerPlugin({}, core, pluginMetaData); |
| 37 | auto project = new TestProject(Path(QString::fromUtf8(argv[1]))); |
| 38 | auto root = plugin->import(project); |
| 39 | auto import = plugin->createImportJob(root); |
| 40 | QObject::connect(import, &KJob::finished, |
| 41 | &app, [project] { |
| 42 | qDebug() << "loaded project with" << project->fileSet().size() << "files"; |
| 43 | QCoreApplication::instance()->quit(); |
| 44 | }); |
| 45 | import->start(); |
| 46 | |
| 47 | return app.exec(); |
| 48 | } |
nothing calls this directly
no test coverage detected