----------------------------------------------------------------------------- create-library--------------------------------------------------------------- -----------------------------------------------------------------------------
| 272 | // create-library--------------------------------------------------------------- |
| 273 | // ----------------------------------------------------------------------------- |
| 274 | int createLibrary(QCoreApplication &app, QCommandLineParser &parser, QSettings *settings) |
| 275 | { |
| 276 | parser.clearPositionalArguments(); |
| 277 | parser.addPositionalArgument("create-library", "Creates a library named \"name\" in the specified destination <path>"); |
| 278 | parser.addPositionalArgument("name", "Library name", "\"name\""); |
| 279 | parser.addPositionalArgument("path", "Path to the folder where the library will be created", "<path>"); |
| 280 | parser.process(app); |
| 281 | |
| 282 | const QStringList args = parser.positionalArguments(); |
| 283 | if (args.length() != 3) { |
| 284 | parser.showHelp(1); |
| 285 | return 1; |
| 286 | } |
| 287 | |
| 288 | ConsoleUILibraryCreator *libraryCreatorUI = new ConsoleUILibraryCreator(settings); |
| 289 | libraryCreatorUI->createLibrary(args.at(1), args.at(2)); |
| 290 | |
| 291 | return 0; |
| 292 | } |
| 293 | |
| 294 | // ----------------------------------------------------------------------------- |
| 295 | // update-library--------------------------------------------------------------- |
no test coverage detected