Repository navigation
fix: eliminate SMB I/O blocking on document close - #453
dengzhongyuan365-dev wants to merge 63 commits into
Conversation
Add a read-only OFD (GB/T 33190-2016) backend built on the rofd library's stable C ABI (librofd_ffi), following the XPS adapter integration pattern: - OfdDocument/OfdPage implement the Document/Page interfaces: open, page count, page size (mm to logical px via screen DPI), and page rendering through rofd_renderer_render_page_cairo into a QImage. Text extraction and search return empty until the rofd C ABI exposes text APIs. - New Dr::OFD file type detected by .ofd extension, factory branch, open-dialog filter, sidebar (thumbnail | bookmark), big-image rendering path, title widget enablement, save-as filter and format string. - CMake option OFD_SUPPORT (default ON) locates rofd.h and librofd_ffi via -DROFD_ROOT, degrading gracefully when absent; qmake gains a matching ofd_support CONFIG block. - Install application/ofd MIME definition and register it in the desktop file. - Add GTest coverage (open, page size, out-of-range, render content check, invalid size, missing/broken file) with tests/files/normal.ofd. Verified: full build with OFD on/off, 7 OFD unit tests pass, and the application opens and renders an OFD invoice end to end.
OFD support now uses the Debian packages shipped by upstream rofd instead of a local rofd checkout: - debian/control Build-Depends on librofd-ffi-dev; the runtime dependency on librofd-ffi0 (>= 0.2.2) is derived automatically by dh_shlibdeps from the library's shlibs file. - CMake keeps locating rofd.h and librofd_ffi through find_path and find_library, now also looking in lib/<multiarch> so a custom install prefix works, and still degrades gracefully (OFD disabled with a warning) when the dependency is absent; -DROFD_ROOT remains available for local development against a rofd checkout. - qmake CONFIG+=ofd_support links the system librofd_ffi. - Document librofd-ffi-dev in both README dependency lists. Verified with librofd-ffi-dev 0.2.2-1: full build, TestOfdModel 7/7, 1116 unit tests pass, the application opens and renders tests/files/normal.ofd, and dpkg-shlibdeps resolves librofd-ffi0 (>= 0.2.2).
The thumbnail delegate inverted the page pixmap whenever the system theme was dark, while BrowserPage only inverts in the night eye-protection mode. Under a dark system theme with eye protection off the main view kept white pages but the sidebar thumbnails turned black, so the two disagreed - most visible with white OFD/PDF pages. - ThumbnailDelegate now follows the EyeProtectionManager mode instead of the system theme and mirrors BrowserPage::paint exactly: night mode inverts luminance and dims with the page colour, classic/green multiply-tint with the page colour, off draws the original pixmap. - Extract the HSL luminance inversion into EyeProtectionManager::invertLuminance and let BrowserPage::applyNightMode delegate to it so both paths share one algorithm; the inverted thumbnail is cached by source pixmap key to avoid per-pixel work on every repaint. - SideBarImageListView refreshes visible thumbnails on modeChanged instead of themeTypeChanged. - Cover the inversion helper, the mode-driven delegate painting and the modeChanged refresh in unit tests. Verified under a dark system theme: thumbnails render white with eye protection off (matching the main view, previously black), dark in night mode and tinted in classic mode; targeted unit tests pass. Log: 修复深色主题下OFD/PDF侧边栏缩略图黑底与主视图白底不一致的问题 Influence: 侧边栏缩略图外观改为跟随护眼模式(夜间反色、经典/绿色染色),与主视图页面保持一致;深色系统主题且未开启护眼时缩略图恢复白底
Use rofd pixel canvas and region rendering APIs instead of rendering and cropping a full page. Validate tile bounds and raster budgets before allocation, probe the required API at configure time, and add a lightweight OFD adapter test target.
Map rofd metadata snapshots to reader properties, preserve raw dates, and use valid document dates in file attributes. Add metadata and identifier coverage and extend the required API probe.
Refresh owned warning snapshots after lazy page loads and rendering, log each warning once, and display warning details in file attributes. Add Chinese translations and lazy-load warning coverage.
100% translated source file: 'deepin-reader.ts' on 'fi'.
The big-image task split pages into 1000px-wide tiles without clamping the last tile to the actual page width. Pages whose width was not a multiple of 1000 produced out-of-canvas requests that the OFD document model rejects, leaving the right edge unpainted. The magnifier (getImagePoint) could also request rects beyond the canvas near page edges; intersect the rect with the canvas first. 大图任务按1000px分片时末尾未截断到页面实际宽度,页宽非1000整数倍 时越界请求被OFD文档模型拒绝,页面右侧无法绘制;放大镜在页边悬停 时同样可能越界,先与整页画布求交集。 Log: 修复OFD分片越界导致页面右侧渲染缺失 Influence: OFD文档大图分片与放大镜渲染不再产生越界请求,页面右侧不再缺失。
docs/superpowers 目录为开发过程中的临时设计记录与计划文档, 不符合项目正式文档规范,按维护要求整体移除。相关设计说明由 代码注释与 rofd 仓库文档承载。 Log: 移除不规范的docs/superpowers目录 Influence: 仅删除开发期文档,不影响编译、功能与打包。
Add deepin-reader-batchprint standalone process for multi-file batch printing from file manager context menu without any dialog interaction. 新增无界面批量打印能力:文件管理器多选文档后右键"批量打印" 拉起独立进程静默完成打印,支持 pdf/docx/djvu/xps 格式。 Bundle libqt6waylandclient6 matching the apt Qt 6.8.0 set and resolve indirect deps via rpath-link, fixing linglong link failure caused by mixing runtime's libQt6WaylandClient private ABI. 修复玲珑构建链接失败:打包与本体 Qt 版本一致的 libQt6WaylandClient, 并通过 rpath-link 优先解析应用自带的间接依赖,避免混用运行时 Qt。 Log: 新增deepin-reader批量打印功能并修复玲珑构建 Influence: 用户可在文件管理器中多选文档批量打印,无需逐个操作。
Render task structs now carry a renderer shared reference and a uuid snapshot; workers dereference only those and skip tasks whose sheet is gone (existSheetByUuid). DocSheet owns SheetRenderer via QSharedPointer and purges queued tasks (clearAllTasksForSheet/Page) before destruction. BrowserPage validates page aliveness before writing render results back, and the pinch-zoom timer callback is bound to its receiver to avoid UAF. 渲染任务结构体改为携带渲染器共享引用与入队时快照的 uuid:worker 线 程仅解引用这两者,并经 existSheetByUuid 跳过已销毁文档的任务。 DocSheet 改用 QSharedPointer 持有 SheetRenderer,析构前排空排队任务 (clearAllTasksForSheet/Page);BrowserPage 回写渲染结果前校验页面 存活;捏合缩放定时器回调绑定 receiver,消除悬空指针。 Log: 渲染任务生命周期加固,消除文档销毁后 worker/回包路径悬空指针 PMS: BUG-377151 Influence: 文档关闭/缩放过程中渲染回调不再有悬空指针风险;正常渲染行为不变。
…han states Cleanup could leave dangling references because bookmarks and tab groups were removed independently while ownership records were still being reconciled; the residue was re-persisted by later sync runs. 孤立状态下的书签与标签组独立清理时归属记录仍在协调,残留项会被 后续同步再次落盘。 Log: 修复孤立状态下书签与标签组清理不同步导致残留引用的问题 Influence: 数据库书签与标签组清理逻辑,孤立状态下不再残留悬挂引用。
Sidebar thumbnails followed eye-protection mode and stayed white in dark theme. Now they follow the system theme only: white pages are inverted via the shared NightFilter (CIELAB L*), image objects keep original colors through a mask prefetched by the worker and cached with the thumbnail, and scanned pages (>70% coverage) are fully inverted. Bookmark/notes lists and the search-result page thumbnails follow the same rules, and mask rects are scaled to the scaled pixmap before filtering. 侧边栏缩略图原先跟随护眼模式,深色主题下仍是白底。现改为只跟随系统 深浅主题:白底经主干夜间滤镜(CIELAB L*)反转为黑底白字,照片区域按 worker 预取、随缩略图缓存的图片对象蒙版保持原色,扫描页(覆盖率超 70%)整页反色;书签/注释列表与搜索结果页的页面小图同规则,蒙版坐标 先映射到缩放后的像素图再进滤镜。 Log: 侧边栏缩略图/书签/注释/搜索结果深色主题反色并支持图片对象蒙版 PMS: BUG-377151 Influence: 深色主题下侧边栏(含触发搜索后的结果页)观感与主视图一致,浅色主题显示不变。
Model.cpp is compiled with the global OFD_SUPPORT_ENABLED definition, but batchprint-convert neither built OfdModel.cpp (which implements OfdDocument::loadDocument) nor linked rofd_ffi/cairo, so linking deepin-reader-batchprint failed with an undefined reference. Add OfdModel.cpp and Navigation.cpp plus the rofd/cairo include dirs, compile options and link libraries behind OFD_SUPPORT_ENABLED, mirroring the existing XPS handling. batchprint-convert 编译 Model.cpp 时继承了全局 OFD_SUPPORT_ENABLED 宏, 但既未编译实现 OfdDocument::loadDocument 的 OfdModel.cpp,也未链接 rofd_ffi/cairo,导致 deepin-reader-batchprint 链接报未定义引用。仿照 XPS 的处理方式,在 OFD_SUPPORT_ENABLED 下补充 OfdModel.cpp、 Navigation.cpp 及 rofd/cairo 头文件路径、编译选项与链接库。 Log: 修复批量打印 OFD 开启时缺少 OfdModel/rofd 链接导致的编译失败 Influence: 仅构建调整:OFD 支持开启时 batchprint 可正常编译链接,关闭 OFD 时行为不变。
1. Replace Sketch-exported nested groups with defs-based structure 2. Remove redundant Sketch metadata (generator comment, title, desc) 3. Keep 128x128 size, viewBox, opacity and visual semantics unchanged Log: Simplify the dark-theme import_photo icon SVG structure Influence: Reduces icon file size while keeping the same look. fix(icon): 精简 import_photo 图标的 SVG 结构 1. 用 defs 引用结构替换 Sketch 导出的多层嵌套分组 2. 移除冗余的 Sketch 元数据(生成器注释、标题、描述) 3. 保持 128x128 尺寸、viewBox、透明度及视觉语义不变 Log: 精简深色主题 import_photo 图标的 SVG 结构 PMS: BUG-373779 Influence: 减小图标体积,外观保持一致。
Address auto-review feedback on PR linuxdeepin#318: 1. Remove unused <defs> block (dead code, path-1 never effectively referenced) 2. Remove invalid xlink:href attribute on <g> element (not supported by SVG spec on <g>) 3. Restore separate path/rect/circle elements for maintainability 4. Keep Sketch metadata removal and dark-theme id/label cleanup from prior commit 5. Visual output is pixel-identical to upstream master Log: Fix SVG spec violations flagged by auto review Influence: Removes dead code while keeping the same look. fix(icon): 移除死代码defs与无效xlink:href 针对 PR linuxdeepin#318 自动评审反馈修复: 1. 移除未被有效引用的 <defs> 死代码块 2. 移除 <g> 元素上不符合 SVG 规范的 xlink:href 属性 3. 恢复独立的 path/rect/circle 元素以提升可维护性 4. 保留前次提交的 Sketch 元数据清理与深色主题 id 语义化 5. 视觉输出与上游 master 像素级一致 Log: 修复自动评审指出的 SVG 规范违规 PMS: BUG-373779 Influence: 移除死代码,外观保持一致。
Log: 深色主题下 import_photo 图标线条互相覆盖 Bug: https://pms.uniontech.com/bug-view-373779.html 问题根因: SVG 中 path/circle 元素使用 fill="#252525" 深色填充, 在 opacity=0.3 下与 stroke="#C5CFE0" 描边叠加, 导致 alpha 通道多层累积 (最高达 193/255), 图标边缘出现线条互相覆盖。 修复: 将 fill="#252525" 改为 fill="none", 移除深色填充区域, 保留 stroke 描边和 rect/circle 的浅色填充不变。 Qt SVG 渲染验证: 重叠像素 (alpha>150) 从 1437 降至 0。 Influence: 仅修改深色主题图标资源文件, 不影响代码逻辑, 渲染效果保持图标语义不变 (文档+下载箭头)。 PMS: BUG-373779
1. 新增 sources 拉取 rofd 源码,装 cargo/rustc 及 libjbig2dec0-dev 2. cargo 构建 rofd-ffi,安装 so 与头文件 3. CMake 加 -DROFD_ROOT,LDD_FILES 加 librofd_ffi.so / libjbig2dec.so 1. Add sources to fetch rofd, install cargo/rustc and libjbig2dec0-dev 2. Build rofd-ffi with cargo, install so and header 3. Add -DROFD_ROOT to CMake, add librofd_ffi.so / libjbig2dec.so to LDD_FILES Log: 源码构建 rofd-ffi 并打包 libjbig2dec,新增 OFD 支持 Influence: deepin-reader 支持 OFD 渲染,运行时依赖自带
QDBusInterface::call() with a QVariantList marshalled all args into one 'av' parameter, which the deepin notification daemon rejects, so every notification fell back to invisible stderr. Use QDBusMessage:: setArguments() to send the 8 separate parameters. Also update all language ts files with lupdate and fill zh_CN/zh_HK/zh_TW translations. QDBusInterface::call() 传入 QVariantList 时会把全部参数编码为单个 'av' 参数,被 deepin 通知服务拒绝,导致所有通知静默回退到不可见 的 stderr。改用 QDBusMessage::setArguments() 发送 8 个独立参数; 同时用 lupdate 更新全部语言 ts 文件并补充 zh_CN/zh_HK/zh_TW 翻译。 Log: 修复批量打印无打印机时无错误提示的问题 Influence: 批量打印的成功/失败/错误通知可正常弹出,通知文案支持简繁中文。
- bump version to 6.6.1 Log : bump version to 6.6.1
Replace manual apt download, install_dep, deploy_dep and .install generation with buildext.apt build_depends/depends declarations. 以声明式 buildext.apt 替代手动 apt 下载、install_dep/deploy_dep 与 .install 生成逻辑,构建期与运行期统一使用 runtime 层的 Qt。 Log: 迁移 linglong 打包依赖为声明式 buildext.apt Influence: 构建依赖与随包依赖改为 buildext 声明;Qt/DTK 改用 runtime 层 提供,不再捆绑 libqt6waylandclient6;pandoc 数据目录改为构建期显式复制; 已通过 ll-builder build 与运行容器 ldd/pandoc 自测验证。
Generated by qt-autotest-generator skill. Batch 1: DocSheet, SideBarImageViewModel, Central, DBusObject, Utils, Model, ... Cumulative: 7/7 classes, 18/18 methods tested Baseline: master @ ad672ce "chore: Update version to 6.6.2" (2026-09-29) Log: 新增 deepin-reader 单元测试 Influence: 新增 7 个类的单元测试,本批次覆盖率 18/18,累计覆盖率 18/18 PMS 补强(Mode 7→Mode 2):为 10 个 sev1/2 bug 的 18 个目标函数 生成 26 个 BUG<id>_<场景> 回归用例,26/26 通过,全量 1226/1226 通过。 分布: - tests/uiframe/ut_docsheet.cpp +5(bugs 348017/106171/164325) - tests/sidebar/ut_sidebarimageviewmodel.cpp +9(bugs 343541/335473) - tests/uiframe/ut_central.cpp +2(bug 97761) - tests/app/ut_dbusobject.cpp +3(bug 312013) - tests/app/ut_utils.cpp +2(bug 218701) - tests/document/ut_model.cpp +3(bugs 332133/304083) - tests/document/ut_xpsmodel.cpp +2(bug 343541) 覆盖率(build-ut-coverage):lines 84.6%(13088/15465), functions 98.1%(1363/1389),18/18 目标函数 FNDA 全命中。 测试过程中新发现源码缺陷 3 个(记录留本地,不入库): 1. runtime: CentralDocPage::isFullScreen(:897)parentWidget 三级链无空守卫 2. logic: DocumentFactory::getDocument(Model.cpp:160)copy 失败分支 *pprocess 未置空 3. manual: calculateTimeout/getHtmlToPdfPath(Model.cpp:40/60)static 自由函数不可直测 注:PMS 工作单与缺陷记录留本地,不入库。
- update version to 6.6.2 log: update version to 6.6.2
…ment Every other error branch of getDocument() sets *pprocess = nullptr before returning, but the QFile::copy() failure path left the output parameter untouched, so callers relying on *process == nullptr could read a stale pointer. Align the branch with the rest. Log: Influence: document opening
isFullScreen()/openFullScreen()/quitFullScreen()/onSheetCountChanged() called parentWidget()->parentWidget()->parentWidget() unchecked; if the widget has fewer than three levels of parents (embedded use, tests) the chain dereferences a null QWidget and crashes. The existing null check only covered the final dynamic_cast result. Replace the chained calls with a parentMainWindow() helper that stops at the first null level. Log: Influence: doc page fullscreen handling
1. Root cause: context-menu config used "Batch Print" without "Document Viewer" prefix; zh_CN/zh_HK/zh_TW all showed "批量打印" missing the required prefix per spec 2. Fix: update Name and Name[locale] fields in deepin-reader-batchprint.conf to match required text 3. Impact: only menu display text changes, no logic affected Log: Updated batch print menu text to include Document Viewer Influence: 1. Verify right-click menu on PDF shows correct text in zh_CN 2. Verify English locale shows "Batch Print with Document Viewer" 3. Verify zh_HK and zh_TW show correct traditional Chinese text fix: 修正批量打印右键菜单文案 1. 根因:右键菜单配置文件中 Name 字段为"批量打印"/"Batch Print", 缺少"使用文档查看器"前缀,与需求文案不一致 2. 方案:修改 deepin-reader-batchprint.conf 中 Name 及各 locale 字段, 使文案与需求一致 3. 影响:仅菜单显示文案变化,不涉及任何逻辑改动 Log: 修正右键菜单批量打印文案为"使用文档查看器批量打印" Influence: 1. 验证右键PDF文件菜单显示"使用文档查看器批量打印" 2. 验证英文环境下显示"Batch Print with Document Viewer" 3. 验证繁体中文环境显示正确的繁体文案 PMS: BUG-378359
Generated by qt-autotest-generator skill (PMS mining, Mode 7 -> Mode 2). Batch 2: SheetBrowser, BrowserPage, BrowserWord, BookMarkWidget, CentralDocPage, DocTabBar, TitleWidget, Application, PDFModel/DPdfDoc. Baseline: master @ 9061ecb "fix: walk the parent chain safely in CentralDocPage" (2026-10-08) Log: 补充 deepin-reader PMS 批次 2 单元测试(38 个回归用例) Influence: 新增 20 个 sev1/2 bug 的回归用例 38 个,38/38 通过; 全量 1264 用例 1263 通过(1 个存量 flaky 与本批次无关) 依据 PMS bug 修复历史补强,按文件分布: - tests/document/ut_pdfmodel.cpp +10 (46911/54210/68550/304111/ 304471/351271/353429) - tests/browser/ut_sheetbrowser.cpp +10 (22093/43216/44136/44264/ 44491/41018) - tests/sidebar/ut_bookmarkwidget.cpp +5 (10332/12219) - tests/uiframe/ut_centraldocpage.cpp +3 (20978) - tests/ut_application.cpp +3 (44137/44264) - tests/browser/ut_browserword.cpp +2 (40946) - tests/browser/ut_browserpage.cpp +2 (25004) - tests/uiframe/ut_doctabbar.cpp +2 (46381) - tests/uiframe/ut_titlewidget.cpp +1 (44136) 覆盖率(lcov, reader/ 范围):lines 84.7% (13106/15471), functions 98.1% (1364/1390);21/21 目标函数 FNDA 全命中。 另 2 个 bug(102352/347387)位于 htmltopdf main() 内 __sw_64__ 条件编译,x86 构建不可达,需申威环境手工验证。 测试中新发现的源码缺陷留本地记录,不入库。
Bookmark cases wrote bookmarks into the shared tests/files/1.pdf and later cases depended on that leftover state, so the full UT run failed. 书签用例把书签写入共享的 1.pdf,后续用例又依赖这份残留状态, 导致全量执行时相互污染失败。 Log: 修复书签 UT 用例间的状态污染 Influence: 书签用例各自清理写盘数据,全量 1264 条 UT 可稳定通过。
Update deepin-manual help documents with OFD format support, reading position restore, and batch print sections. Drop legacy index files superseded by the new d_/p_ document format. 更新帮助文档:新增OFD格式支持、恢复阅读位置、批量打印等章节, 删除被新版d_/p_文档格式取代的旧索引文件。 Log: 更新帮助文档 Influence: 帮助手册展示新版功能说明(OFD/恢复阅读位置/批量打印),旧索引文件不再打包。
The pinch gesture state (canRotate, currentStepScaleFactor, tempScalefactor) in SheetBrowser::pinchTriggered lived in function-level statics: they leaked across SheetBrowser instances (multi-window pollution), survived across unit-test runs, and left a stale scale baseline behind when a gesture was interrupted without GestureFinished, making the next pinch jump (too-sensitive scaling, BUG44491 deep cause). Move them to SheetBrowser members, reset the scale baseline on GestureStarted, and also clean up on GestureCanceled. Log: 捏合手势状态由函数级 static 改为成员变量,手势开始时重置缩放基线,取消时同样清理 Influence: 修复多窗口捏合互相污染与手势打断后下次捏合缩放过灵敏的问题(BUG44491 深层根因)
DPdfDoc::page() caches the returned DPdfPage in the document (freed by qDeleteAll in ~DPdfDocPrivate), so deleting it from the caller side is a double-free. Declare the ownership contract in dpdfdoc.h page() and the DPdfPage class docs in dpdfpage.h. Log: 在 dpdfdoc.h/dpdfpage.h 注释中声明 DPdfDoc::page 返回指针的所有权契约 Influence: 仅文档注释变更,提示调用方不得 delete page() 返回的 DPdfPage,避免双重释放
- Application.cpp: guard AA_UseHighDpiPixmaps with Qt5-only check (no effect in Qt6) and replace deprecated isTopLevel() with isWindow() - MainWindow.cpp: replace deprecated QHoverEvent::pos() with position().toPoint() (Qt6 branch) and QLibraryInfo::location() with path() (same pattern as Model.cpp) - XpsDocumentAdapter.cpp: pass QTimeZone::UTC to fromSecsSinceEpoch instead of the deprecated Qt::UTC overload (behavior equivalent) - SecurityDialog.cpp / TransparentTextEdit.cpp: replace deprecated QString::count() with size() Deferred (structural, behavior-sensitive): QMouseEvent deprecated constructor in Application.cpp (new ctor needs a global position the synthesized cursor point cannot provide); the 4 fontChanged connects in CatalogTreeView/RestoreTipWidget/PagingWidget/ScaleWidget (replacing the signal with QEvent::ApplicationFontChange handling restructures event processing). Log: 替换机械安全的 Qt6 废弃 API:AA_UseHighDpiPixmaps/isTopLevel/pos/location/fromSecsSinceEpoch/count Influence: 消除 9 处 Qt6 废弃 API 警告,行为不变(等价替换);fontChanged 4 处与 QMouseEvent 构造评估后暂缓
100% translated source file: 'deepin-reader.ts' on 'ru'.
1. Root cause: project() VERSION and APP_VERSION defaults were never-updated "1.0.0" placeholders, and the linglong build invoked plain cmake with no version flags, so the About dialog showed "1.0.0" for installed packages 2. Fix: make project(VERSION) and the submodule APP_VERSION defaults read the injectable VERSION variable, and bridge the changelog version into the linglong build via -DVERSION (same as deepin-editor's linglong.yaml) 3. Impact: About dialog shows the release version on the deb and linglong build paths Log: Fix About dialog showing version 1.0.0 instead of 6.6.2 fix: 同步 CMake 版本号至 6.6.2 1. 根因:project() VERSION 与子模块 APP_VERSION 默认值是从未更新的 "1.0.0" 占位符,且玲珑构建以裸 cmake 调用不传版本参数,导致安装后 "关于"对话框显示 "1.0.0" 2. 方案:project(VERSION) 与子模块 APP_VERSION 默认值改为读取可注入 的 VERSION 变量;linglong.yaml 参照 deepin-editor 以 -DVERSION 传入 changelog 版本 3. 影响:deb 与玲珑构建路径的"关于"对话框均显示发版版本 Log: 修复"关于"对话框显示版本号 1.0.0 而非 6.6.2 的问题 PMS: BUG-378351
- bump version to 6.6.3 Log : bump version to 6.6.3
- Replace bare qInfo/qDebug/qWarning/qCritical with categorized qC* variants in reader, batch-print and htmltopdf modules - Refine ddlog.h into a pure Qt header and share it across all three executables, keeping only one appLog definition - Update SPDX copyright years Log: 统一全项目日志为分类日志并收敛ddlog.h定义 PMS: TASK-396789 Influence: 三个进程日志均带org.deepin.reader分类,可被DConfig日志规则统一过滤。
1. Simplify default menu entry from "Batch Print with Document Viewer" to "Batch Print" 2. Unify zh_CN/zh_HK/zh_TW menu labels to "批量打印" Log: The file manager context menu for batch printing now shows a shorter name Influence: 1. Right-click PDF/DOCX/DjVu/XPS files in file manager, verify the entry shows "Batch Print" in English 2. Switch system language to zh_CN/zh_HK/zh_TW, verify the entry shows "批量打印" 3. Click the menu entry, verify deepin-reader-batchprint still launches and prints selected files fix: 精简文管右键批量打印菜单名称 1. 文管右键菜单「使用文档查看器批量打印」简化为「批量打印」 2. 默认英文名由 Batch Print with Document Viewer 简化为 Batch Print 3. zh_CN/zh_HK/zh_TW 三个语言的菜单文案统一为「批量打印」 Log: 文管右键批量打印菜单项显示名称简化为「批量打印」 Influence: 1. 在文管中右键单个或多个 PDF、DOCX、DjVu、XPS 文件,确认英文环境菜单显示 Batch Print 2. 分别切换系统语言为简体中文、繁体(香港、台湾),确认菜单均显示「批量打印」 3. 点击该菜单项,确认仍能正常拉起批量打印功能并打印所选文件
- bump version to 6.6.4 Log : bump version to 6.6.4
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideAPIExtend database save APIs to accept cached file metadata and content hashes, and expose a close-time flush operation on DocSheet.
Uses of the APIInvoke the close-time flush before deleting a sheet so its persistence work completes before destruction.
ImplementationReuse cached hashes and move close-time renderer saving, hashing, metadata reads, and persistence into the flush workflow while preventing duplicate close-time saves.
TestsTest that saveBookmarks persists a supplied content hash and still computes one when the optional hash is omitted.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
96% of minimum 50% translated source file: 'deepin-reader.ts' on 'pt'. Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
100% translated source file: 'deepin-reader.ts' on 'pt'.
7954676 to
dcfdebe
Compare
1. Root cause: DPdfDoc::save() and saveAs() call fsync() on the main thread for files on SMB/CIFS network mounts, blocking the Qt event loop for seconds while waiting for remote disk sync 2. Fix: add isNetworkFileSystem() helper using QStorageInfo to detect cifs/smb/fuse.gvfs paths, skip fsync for network paths while keeping flush() for userspace-to-kernel buffer transfer 3. Impact: local disk save behavior unchanged (fsync still called); network path save no longer blocks UI; temp-file-then-rename preserves atomicity and backup recovery Log: 修复SMB网络路径保存PDF时文档查看器卡死问题 Influence: 1. Test saving PDF with bookmarks/annotations on local disk 2. Test saving PDF on SMB mount and verify no UI freeze 3. Test saveAs to SMB path 4. Test save failure recovery on network disconnect fix: 跳过网络文件系统路径的fsync以防止界面卡死 1. 根因:DPdfDoc::save()和saveAs()在主线程对SMB/CIFS网络挂载 路径的文件调用fsync(),等待远端刷盘时阻塞Qt事件循环数秒 2. 方案:新增isNetworkFileSystem()辅助函数,使用QStorageInfo检测 cifs/smb/fuse.gvfs路径,网络路径跳过fsync,保留flush()完成 用户态到内核态的缓冲刷入 3. 影响:本地磁盘保存行为不变(仍执行fsync);网络路径保存不再 阻塞界面;temp-file-then-rename保证原子性和备份恢复 Log: 修复SMB网络路径保存PDF时文档查看器卡死问题 Influence: 1. 测试本地磁盘上保存带书签/注释的PDF 2. 测试SMB挂载路径保存PDF,验证不再卡死 3. 测试另存为到SMB路径 4. 测试网络断开时保存失败的恢复 PMS: BUG-380239
dcfdebe to
927baf3
Compare
|
TAG Bot TAG: 6.6.4 |
fix: eliminate SMB I/O blocking on document close
QFileInfo stat and renderer save synchronously on the GUI thread,
each opening the SMB file (~300ms/open), causing ~3.3s freeze
saveBookmarks(); add flushSaveBeforeClose() to move remaining I/O
(hash, stat, renderer save) to a background thread before sheet
deletion; guard setAlive(false) I/O with m_saveFlushed flag
~DocSheet destructor skips I/O when already flushed; saveBookmarks
accepts optional contentHash for backward compatibility
Log: Resolved freeze when closing documents from SMB shares after adding bookmarks or annotations
Influence:
fix: 消除文档关闭时的SMB I/O阻塞
加上QFileInfo状态检查和渲染器保存,每次打开SMB文件约300ms,
总计约3.3秒卡死
flushSaveBeforeClose()将剩余I/O移至后台线程在删除前执行;
setAlive(false)的I/O用m_saveFlushed标志保护跳过
刷新时跳过I/O;saveBookmarks接受可选contentHash保持兼容
Log: 修复从SMB共享目录打开文档后添加书签/注释关闭时卡死的问题
Influence:
PMS: BUG-380239
Summary by Sourcery
Prevent document-close UI freezes on network shares while preserving bookmark, annotation, auto-save, and operation persistence.
Bug Fixes:
Enhancements:
Tests: