----------------------------------------------------------------------------- remove-library--------------------------------------------------------------- -----------------------------------------------------------------------------
| 340 | // remove-library--------------------------------------------------------------- |
| 341 | // ----------------------------------------------------------------------------- |
| 342 | int 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--------------------------------------------------------------- |
no test coverage detected