Skip to content

Commit 86a6d66

Browse files
committed
feat: add version option to command line parser
1. Added version option to QCommandLineParser in main.cpp to display version information 2. Removed DVERSION from debian/rules configuration as it's no longer needed 3. Maintained DTK_VERSION setting in build configuration The changes improve command line interface by adding standard --version flag support while simplifying the build configuration by removing redundant version setting. feat: 为命令行解析器添加版本选项 1. 在 main.cpp 中为 QCommandLineParser 添加版本选项以显示版本信息 2. 从 debian/rules 配置中移除不再需要的 DVERSION 参数 3. 保留构建配置中的 DTK_VERSION 设置 这些改动通过添加标准的 --version 标志支持改进了命令行界面,同时通过移除 冗余的版本设置简化了构建配置。
1 parent 259fda7 commit 86a6d66

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

dconfig-center/dde-dconfig/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ int main(int argc, char *argv[])
380380
QCommandLineParser parser;
381381
parser.setApplicationDescription(QCoreApplication::translate("main", "A console tool to get and set configuration items for DTK Config."));
382382
parser.addHelpOption();
383+
parser.addVersionOption();
383384

384385
QCommandLineOption uidOption("u", QCoreApplication::translate("main", "operate configure items of the user uid."), "uid", QString());
385386
parser.addOption(uidOption);

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z
1212
dh $@ --parallel
1313

1414
override_dh_auto_configure:
15-
dh_auto_configure -- -DDVERSION=$(DEB_VERSION_UPSTREAM) -DDTK_VERSION=6
15+
dh_auto_configure -- -DDTK_VERSION=6
1616

1717

1818
override_dh_auto_install:

0 commit comments

Comments
 (0)