docs(cli): show option default values in --help

Qt does not print default values in --help output; the default passed to
the option constructor is only a fallback for value(). Append them to
the descriptions instead, via one shared helper used by both programs.

Qt 不会把默认值印进 --help(构造参数里的默认值只作为 value() 的兜底),
改为在说明后拼上「(默认 X)」;两个程序共用同一处定义,并统一了措辞。
This commit is contained in:
blumia committed 2026-10-12 13:54:04 +08:00
1 parent 736ec14d5b
commit 7e5257429a
2 files changed
+30 -15

No files matched your search

+3 -3
View File
@@ -84,9 +84,9 @@ int main(int argc, char ** argv)
parser.addHelpOption();
lc::app::addModelOptions(parser);
lc::app::addStreamOptions(parser);
parser.addOption(QCommandLineOption("opacity", "字幕背景不透明度(20-100,百分比)", "n", "84"));
parser.addOption(QCommandLineOption("screenshot", "启动后自动截图并退出(验证渲染用)", "path"));
parser.addOption(QCommandLineOption("screenshot-delay", "截图前等待秒数", "sec", "6"));
parser.addOption(lc::app::makeOption("opacity", "字幕背景不透明度,取值 20-100", "n", "84"));
parser.addOption(lc::app::makeOption("screenshot", "启动后自动截图并退出(验证渲染用)", "path"));
parser.addOption(lc::app::makeOption("screenshot-delay", "截图前等待秒数", "sec", "6"));
parser.process(app);
const lc::AsrOptions asrOpt = lc::app::asrOptions(parser);