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

Function main

kdevplatform/project/tests/abstractfilemanagerpluginimporttest.cpp:24–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22using namespace KDevelop;
23
24int 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}

Callers

nothing calls this directly

Calls 10

initializeFunction · 0.85
makeTestPluginMetaDataFunction · 0.85
quitMethod · 0.80
execMethod · 0.80
initFunction · 0.50
PathClass · 0.50
importMethod · 0.45
createImportJobMethod · 0.45
sizeMethod · 0.45
fileSetMethod · 0.45

Tested by

no test coverage detected