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

Function removeLibrary

YACReaderLibraryServer/main.cpp:342–359  ·  view source on GitHub ↗

----------------------------------------------------------------------------- remove-library--------------------------------------------------------------- -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

340// remove-library---------------------------------------------------------------
341// -----------------------------------------------------------------------------
342int removeLibrary(QCoreApplication &app, QCommandLineParser &parser, QSettings *settings)
343{
344 parser.clearPositionalArguments();
345 parser.addPositionalArgument("remove-library", "Removes a library named \"name\" from the list of libraries");
346 parser.addPositionalArgument("name", "Library name", "\"name\"");
347 parser.process(app);
348
349 const QStringList args = parser.positionalArguments();
350 if (args.length() != 2) {
351 parser.showHelp(1);
352 return 1;
353 }
354
355 ConsoleUILibraryCreator *libraryCreatorUI = new ConsoleUILibraryCreator(settings);
356 libraryCreatorUI->removeLibrary(args.at(1));
357
358 return 0;
359}
360
361// -----------------------------------------------------------------------------
362// list-libraries---------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls 2

processMethod · 0.45
removeLibraryMethod · 0.45

Tested by

no test coverage detected