From 31088b608cbafc8110cd3ca189c080a1fc596c6f Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Tue, 17 Mar 2020 18:39:27 +0100 Subject: [PATCH] cmdline help move the asterisk to the front indicating the requirement for a database when using this option. --- lib/arguments.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/arguments.cpp b/lib/arguments.cpp index 9a63be11..f2b6e32f 100644 --- a/lib/arguments.cpp +++ b/lib/arguments.cpp @@ -113,19 +113,20 @@ QString arguments::help() if (l > len) len = l; } - offset = len + 6; + offset = len + 7; for (auto i = opts.begin(); i != opts.end(); ++i) { QString longopt = i->long_opt; if (i->arg) longopt += QString("=%1").arg(i->arg); QString help = splitQstring(offset, width, i->help); - s += QString(" --%1 %2%3\n") - .arg(longopt, len*-1).arg(help) - .arg(i->need_db ? " [*]" : ""); + s += QString(" %3 --%1 %2\n") + .arg(longopt, len*-1) + .arg(help) + .arg(i->need_db ? "*" : " "); } s += "\n" - " [*] Needs a database. Either from the commandline\n" - " or as default database\n"; + "[*] Needs a database. Either from the commandline\n" + " or as default database\n"; return s; }