From 9e1d4b0e82360cc28a44ce85bfb868bf914d6c75 Mon Sep 17 00:00:00 2001 From: Zhang Sheng Date: Fri, 24 Jul 2026 13:15:49 +0800 Subject: [PATCH 1/2] fix: update test synonyms for Chinese file types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Removed English file extensions (zip/rar/psd/fig/sketch) from Chinese NLP test cases 2. Aligned code indentation in JSON parsing section The changes were made to: 1. Focus the test cases strictly on Chinese terms, removing English file extensions that shouldn't be part of the Chinese synonym testing 2. Improve code readability by fixing inconsistent indentation in the JSON parsing logic Influence: 1. Verify Chinese NLP processing still works for all specified Chinese terms 2. Check that file type recognition works as expected without the English terms 3. Ensure the indentation changes don't affect the JSON parsing functionality fix: 更新中文文件类型的测试同义词 1. 从中文NLP测试用例中移除了英文文件扩展名(zip/rar/psd/fig/sketch) 2. 对齐了JSON解析部分的代码缩进 变更原因: 1. 测试用例应专注于中文术语,移除不属于中文同义词测试的英文文件扩展名 2. 通过修复JSON解析逻辑中不一致的缩进来提高代码可读性 影响范围: 1. 验证中文NLP处理对指定中文术语是否仍有效 2. 检查在没有英文术语的情况下文件类型识别是否正常工作 3. 确保缩进更改不会影响JSON解析功能 --- autotests/dfm-search-tests/tst_chinese_nlp.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/autotests/dfm-search-tests/tst_chinese_nlp.cpp b/autotests/dfm-search-tests/tst_chinese_nlp.cpp index 7f382bc0..dd3aef45 100644 --- a/autotests/dfm-search-tests/tst_chinese_nlp.cpp +++ b/autotests/dfm-search-tests/tst_chinese_nlp.cpp @@ -61,9 +61,9 @@ QHash loadFiletypeExtensions() const QJsonObject ruleObj = ruleValue.toObject(); const QString ruleId = ruleObj.value(QStringLiteral("id")).toString(); const QJsonArray extensions = ruleObj.value(QStringLiteral("metadata")) - .toObject() - .value(QStringLiteral("extensions")) - .toArray(); + .toObject() + .value(QStringLiteral("extensions")) + .toArray(); QStringList values; values.reserve(extensions.size()); @@ -1272,10 +1272,10 @@ void tst_ChineseNLP::fileType_audio_allSynonyms() void tst_ChineseNLP::fileType_archive_allSynonyms() { - // Requirements: 压缩包, 归档, 源码包, 打包文件, zip, rar + // Requirements: 压缩包, 归档, 源码包, 打包文件 const QStringList inputs = { QStringLiteral("压缩包"), QStringLiteral("归档"), QStringLiteral("源码包"), - QStringLiteral("打包文件"), QStringLiteral("zip"), QStringLiteral("rar") + QStringLiteral("打包文件") }; for (const QString &input : inputs) { ParsedIntent intent; @@ -1307,8 +1307,7 @@ void tst_ChineseNLP::fileType_design_source_allSynonyms() // Requirements: 源文件, 设计稿, psd, 矢量图, 工程文件 const QStringList inputs = { QStringLiteral("源文件"), QStringLiteral("设计稿"), QStringLiteral("矢量图"), - QStringLiteral("工程文件"), QStringLiteral("psd"), QStringLiteral("fig"), - QStringLiteral("sketch") + QStringLiteral("工程文件") }; for (const QString &input : inputs) { ParsedIntent intent; From d5f3374e4108ccc6c54d5ad558a2f6b16d639def Mon Sep 17 00:00:00 2001 From: Zhang Sheng Date: Fri, 24 Jul 2026 13:16:17 +0800 Subject: [PATCH 2/2] chore: bump version to 1.4.2 1.4.2 Log: --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 47ea0756..eb66b338 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +util-dfm (1.4.2) unstable; urgency=medium + + * chore: update GitHub actions workflow for cppcheck + * fix: update test synonyms for Chinese file types + * fix: filter excluded paths in recent search strategy + + -- Zhang Sheng Fri, 24 Jul 2026 13:16:10 +0800 + util-dfm (1.4.1) unstable; urgency=medium * fix: intercept -h/--help to show custom help with highlight subcommand