History

list assignment types in assignment-client help

Thijs Wenker committed 8 years ago

Commit 1bfb62b1 parent affd67d4 files · +16 −4Browse files

Showing the changes to assignment-client/src/AssignmentClientApp.cpp (1 of 4 files). Show all

Unified · Split

assignment-client/src/AssignmentClientApp.cpp+8−2
@@ -46,8 +46,14 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : · 45 unmodified lines
4646
4747 const QCommandLineOption helpOption = parser.addHelpOption();
4848
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+
5157 parser.addOption(clientTypeOption);
5258
5359 const QCommandLineOption poolOption(ASSIGNMENT_POOL_OPTION, "set assignment pool", "pool-name");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t