Showing the changes to assignment-client/src/AssignmentClientApp.cpp (1 of 4 files). Show all
Unified · Split
| @@ -46,8 +46,14 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 45 unmodified lines | ||
| 46 | 46 | |
| 47 | 47 | const QCommandLineOption helpOption = parser.addHelpOption(); |
| 48 | 48 | |
| 49 | − const QCommandLineOption clientTypeOption(ASSIGNMENT_TYPE_OVERRIDE_OPTION, | |
| 50 | − "run single assignment client of given type", "type"); | |
| 49 | + QString typeDescription = "run single assignment client of given type\n# | Type\n============================"; | |
| 50 | + for (Assignment::Type type = Assignment::FirstType; | |
| 51 | + type != Assignment::AllTypes; | |
| 52 | + type = static_cast<Assignment::Type>(static_cast<int>(type) + 1)) { | |
| 53 | + typeDescription.append(QStringLiteral("\n%1 | %2").arg(QString::number(type), Assignment::typeToString(type))); | |
| 54 | + } | |
| 55 | + const QCommandLineOption clientTypeOption(ASSIGNMENT_TYPE_OVERRIDE_OPTION, typeDescription, "type"); | |
| 56 | + | |
| 51 | 57 | parser.addOption(clientTypeOption); |
| 52 | 58 | |
| 53 | 59 | const QCommandLineOption poolOption(ASSIGNMENT_POOL_OPTION, "set assignment pool", "pool-name"); |