MCPcopy Create free account
hub / github.com/YACReader/yacreader / addLibrary

Function addLibrary

YACReaderLibraryServer/main.cpp:319–337  ·  view source on GitHub ↗

----------------------------------------------------------------------------- add-library--------------------------------------------------------------- -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

317// add-library---------------------------------------------------------------
318// -----------------------------------------------------------------------------
319int addLibrary(QCoreApplication &app, QCommandLineParser &parser, QSettings *settings)
320{
321 parser.clearPositionalArguments();
322 parser.addPositionalArgument("add-library", "Adds an exiting library named \"name\" at the specified origin <path>");
323 parser.addPositionalArgument("name", "Library name", "\"name\"");
324 parser.addPositionalArgument("path", "Path to the folder where the library is", "<path>");
325 parser.process(app);
326
327 const QStringList args = parser.positionalArguments();
328 if (args.length() != 3) {
329 parser.showHelp(1);
330 return 1;
331 }
332
333 ConsoleUILibraryCreator *libraryCreatorUI = new ConsoleUILibraryCreator(settings);
334 libraryCreatorUI->addExistingLibrary(args.at(1), args.at(2));
335
336 return 0;
337}
338
339// -----------------------------------------------------------------------------
340// remove-library---------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls 2

addExistingLibraryMethod · 0.80
processMethod · 0.45

Tested by

no test coverage detected