Commit 1e0b4c9c authored by Lisa's avatar Lisa
Browse files

Small fix in help message

parent 73796ed1
......@@ -111,7 +111,9 @@ void PakabeiParser::addOperation(AkabeiOperation& op)
op.addConnectionWithOption(opt);
}
op.setCommandLong("--" + op.commandLong());
if (!op.commandLong().isEmpty()) {
op.setCommandLong("--" + op.commandLong());
}
acceptedOperations.insertMulti(op.type(), op);
}
......
......@@ -79,10 +79,19 @@ void CommandLineUtils::printHelpMessage(QMultiHash<APM::OperationType, AkabeiOpe
foreach (const AkabeiOperation &op, m_acceptedOperations.values(type)) {
int spacing = spacingDistance - op.length();
out << " " << op.commandLong();
out << " ";
if (!op.commandLong().isEmpty()) {
out << op.commandLong();
}
if (!op.commandLong().isEmpty() && !op.commandShort().isEmpty()) {
out << ", ";
}
if (!op.commandShort().isEmpty()) {
out << ", " << "-" << op.commandShort();
out << "-" << op.commandShort();
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment