----------------------------------------------------------------------------- add-library--------------------------------------------------------------- -----------------------------------------------------------------------------
| 317 | // add-library--------------------------------------------------------------- |
| 318 | // ----------------------------------------------------------------------------- |
| 319 | int 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--------------------------------------------------------------- |
no test coverage detected