Repository navigation
Conversation
…ntent
UT_Editwrapper_loadContent_001/002 stubbed QString::length to a large
value (41MB/10KB) in order to drive EditWrapper::loadContent into its
large-file and instant-open branches. This was both ineffective and
harmful:
- loadContent() reads the content size from strContent.length(), and
strContent is a QByteArray, so stubbing QString::length never affected
the branch selection.
- QString::length() is an out-of-line symbol in libQt5Core, so the stub
globally corrupted every QString::length() call in the process.
QDebug::operator<<(const QString&) (qdebug.h) calls t.length(), which
made qDebug read far past the string buffer. This triggered an ASan
heap-buffer-overflow (READ of size 12) and aborted the whole test
process when DDropdownMenu::setText() printed the endline menu text
("Unix") via BottomBar::setEndlineMenuText() -> setCurrentTextOnly()).
Fix: stub QByteArray::length instead -- the real type of strContent, so
loadContent() now takes the intended large-file / instant-open branches.
This is safe because qDebug prints a QByteArray via size() (not length())
and the actual data reads in loadContent()/customEvent() use size()/d->size
rather than length(), so no out-of-bounds read is introduced.
Verified with an ASan+UBSan build:
UT_Editwrapper_loadContent.UT_Editwrapper_loadContent_001 -> OK
UT_Editwrapper_loadContent.UT_Editwrapper_loadContent_002 -> OK
No heap-buffer-overflow; the 4 other pre-existing UT_Editwrapper failures
are unchanged and unrelated to this crash.
…refactor)
修复 11 个失败用例(仅改动测试代码,未改动业务源码)。根因分两类:
- 源码演进后未同步更新测试:保存逻辑重构为 TextFileSaver、findAll/replace
默认大小写敏感度改为 CaseSensitive、handleFileLoadFinished 增加新建文件守卫等。
- 测试自身缺陷:对模板方法(QVector/QByteArray)打桩触发未对齐写 UB、Qt5→Qt6
QColor::alphaF 返回类型由 qreal(double) 变 float 导致精度比较失败、断言未对齐
源码 min-15 钳制、硬编码英文 "None" 在 zh_CN 下与 tr() 不符、占位文件路径触发
UTF-8 回退、offscreen 下依赖自动滚动的非确定性用例等。
修改清单:
- ut_utils.cpp getSupportEncodingWithError:去掉会触发 UB 的 QVector::isEmpty
打桩;函数级静态缓存使“readAll 失败→空”分支在全量进程中不可达,改为验证缓存
命中韧性(已加载后即使 readAll 失败仍返回非空)。
- ut_editwrapper.cpp saveFile_004/005、saveAsFile_003:旧 QFile::open/QByteArray
打桩对重构后的 TextFileSaver 已失效,改为打桩 TextFileSaver::save 隔离文件 IO;
saveAsFile_003 同时移除全局 QString::isEmpty 打桩。
- ut_editwrapper.cpp handleFileLoadFinished_004_error:将真实路径指向已存在的
Makefile,使 error 分支的 QFileInfo::exists 守卫通过、进入只读模式。
- ut_textedit.cpp slotValueChanged:显式将水平滚动条拉到最右,消除 offscreen 下
依赖自动滚动的非确定性。
- ut_textedit.cpp replaceAll_003:第二步替换显式传 Qt::CaseInsensitive 以复现原意
(源码默认已改为 CaseSensitive)。
- ut_textedit.cpp lineNumberAreaPaintEvent_001:先置有效颜色绕过主题未安装导致的
无效 QColor;断言改用 0.2f 适配 Qt6 alphaF 返回 float。
- ut_textedit.cpp lineNumberAreaWidth_001:期望值补齐源码的 min-15 钳制。
- ut_detectcode.cpp BIG5_Pass:打桩 UchardetCode 返回 BIG5,避免占位路径触发的
UTF-8 回退污染内容侧检测。
- ut_ddropdownmenu.cpp createHighLightMenuActionGroupLambda:期望值改用
DDropdownMenu::tr("None") 与 locale 无关比较。
验证:本地按 test-prj-running.sh 等价配置(Qt6 + DTK6 + chardet + ICU + KF6 +
ASan/UBSan -fsanitize=undefined,address,QT_QPA_PLATFORM=offscreen,
ASAN_OPTIONS=abort_on_error=0:detect_leaks=0,UBSAN_OPTIONS=halt_on_error=0)
全量执行 deepin-editor-test:1117 用例全部通过,0 失败,无新增回归。
Log: 修复 deepin-editor 单元测试 11 个失败用例
Task: V-1582
Display current match index and total count in the find input of FindBar/ReplaceBar, updating in real time during search and next/previous navigation. TextEdit computes matches via full-document scan with caching and binary-search index lookup; LineBar shows a self-drawn count label with 70% opacity and T9 font size. 实现搜索匹配计数显示:FindBar/ReplaceBar 查找框内显示当前匹配 索引与总数,回车搜索及上/下一个导航时实时更新。TextEdit 层 全文档扫描+缓存+二分查找索引,LineBar 自绘计数 label。 Log: 实现搜索匹配计数显示功能 PMS: Task-393979 Influence: 用户搜索时可直观看到当前匹配位置和总数,提升搜索体验。
Update unstable find and replace selectors for generated AT suites. 修复文本编辑器 AT 用例中查找和替换控件 selector 不稳定问题。 Log: 修复文本编辑器 AT 查找替换用例 selector Influence: 修复后远程干净环境 AT 用例 31 条全部通过。
Add setAccessibleName and setObjectName for all interactive UI controls and assertion-required elements across the editor: - Titlebar menu actions and window buttons - Find/Replace/JumpLine floating bars - Tab bar, context menus, and editor right-click menus - Bottom bar status labels and progress bar - Theme panel, path settings, warning notices, dropdown button - Editor text area and central widgets - Dialogs (save confirm, settings, print preview) - Update copyright years for modified files - Add REUSE dep5 entry for test/at/spi/ directory This allows AT-SPI/accessibility frameworks to properly identify and interact with all operable UI elements. Issue: V-1559
Stub Window::updateModifyStatus in three MoveText tests to avoid invalid downcast in EditWrapper::window() when EditWrapper has no Window parent, which caused heap-buffer-overflow in Tabbar::truePathAt. Also replace QTest::qWait/processEvents with direct timer meta-object invocation in startmanager/window/editorapplication/themepanel tests, add __gcov_dump() in ut_main to ensure coverage data flush, and add new cases for LineBar/WarningNotices. 修复 UT_Textedit_MoveText 三个用例的堆缓冲区溢出崩溃:当 EditWrapper 无 Window 父对象时 EditWrapper::window() 的 static_cast 误转导致越界, 通过 stub Window::updateModifyStatus 规避。同时将多个测试中的 qWait/processEvents 替换为直接通过 meta-object 触发 timer lambda, 在 ut_main 增加 __gcov_dump 确保覆盖率数据落盘,并新增 LineBar/WarningNotices 用例。 Log: 修复单测崩溃并改进测试基础设施 Influence: 仅影响单元测试代码,不改动业务源码;消除 ASan 下的崩溃与 UB。
Log: 适配新版文本编辑器AT元素名称 Influence: 修复新版6.5.58中AT元素名称变化导致的自动化用例失败,保持32条AT用例全量通过。
- Add gen-ut-summary.py: standalone script to parse gtest XML and lcov coverage data, output structured JSON (test_cases/line_coverage/function_coverage) - Update test-prj-running.sh: export env vars, use -j$(nproc), set +e for test running, call gen-ut-summary.py, propagate test exit code
Under input method uppercase-A mode, Shift+Backspace produces a non-empty QKeyEvent::text(), which was captured by the Shift-symbol insertion branch and inserted as a control character, causing garbled output. Extend the backspace deletion branch condition to also match Qt::ShiftModifier, so Shift+Backspace deletes the previous character identically to Backspace, matching standard editor behavior. 修复输入法大写字母A状态下Shift+Backspace插入乱码字符的问题: 将退格删除分支的修饰键条件从NoModifier扩展为NoModifier或 ShiftModifier,使Shift+Backspace与普通Backspace一致地删除前一个 字符,避免被下方Shift符号插入分支当作文本插入。 Log: 修复输入法大写A状态下按Shift+Backspace插入乱码字符的问题,使其等同Backspace删除前一个字符 PMS: BUG-373675 Influence: 仅影响Shift+Backspace行为,普通Backspace及其他Shift组合键不受影响。
Add WebEngineWidgets and WebChannel components to src and tests CMake, register markdown web resources in qrc, and set AA_ShareOpenGLContexts before QApplication in main and test main (WebEngine hard requirement). src 与 tests 的 CMake 增加 WebEngineWidgets/WebChannel 组件与链接, qrc 注册 markdown web 资源,main 与测试 main 在 QApplication 前设置 AA_ShareOpenGLContexts(WebEngine 渲染进程硬性前提,防白屏)。 Log: 打通 Markdown 渲染的 WebEngine 构建链路 PMS: TASK-393979 Influence: 构建引入 Qt WebEngine 依赖;渲染区白屏问题在入口统一规避。
Add QWidget-free logic units: ViewModeFsm for mode transition rules, MarkdownLogic for recognition and mdimg image path rewrite, RenderThrottle for 300ms leading-plus-trailing content throttle, ScrollSync for ratio clamp, ThemeSerializer for CSS variable mapping. Add MarkdownBridge WebChannel protocol object and IMarkdownRenderer interface for DI tests. 新增无 QWidget 依赖的纯逻辑层:ViewModeFsm 视图模式状态规则、 MarkdownLogic 识别与 mdimg 图片路径改写、RenderThrottle 300ms 节流 (前沿立即+后沿补发)、ScrollSync 比例钳制、ThemeSerializer 主题变量 序列化;MarkdownBridge 通信协议对象与 IMarkdownRenderer 注入接口。 Log: 新增 Markdown 渲染纯逻辑层与桥接协议 PMS: TASK-393979 Influence: 为三视图编排/渲染服务层提供可单测的判定与同步逻辑。
The markdown render feature requires WebEngineWidgets and WebChannel Qt components (find_package REQUIRED in src and tests CMake), which are provided by qt6-webengine-dev; without it deb builds fail at configure stage. Markdown 渲染功能依赖 WebEngineWidgets 与 WebChannel Qt 组件 (src/tests 的 CMake 中 find_package REQUIRED),由 qt6-webengine-dev 提供;缺失时 deb 构建在 configure 阶段失败。 Log: 补充 deb 构建依赖 qt6-webengine-dev PMS: TASK-393979 Influence: deb 构建可正常配置;运行期 webengine 由 shlibs 自动依赖。
Add hand-written web kernel sources: milkdown.html host page, main.js assembling Milkdown 7.x read-only editor with commonmark/gfm/math chain, bridge.js QWebChannel glue, theme.css with CSS variable theming, math plugins ported from uos-ai, renderEnhancer post-processing and vite config to bundle the kernel into a single IIFE for qrc embedding. 新增手写 web 内核源码:milkdown.html 宿主页、main.js 装配 Milkdown 7.x 只读编辑器(commonmark/gfm/数学公式插件链)、bridge.js 通道胶水、 theme.css 变量主题、移植自 uos-ai 的数学插件、renderEnhancer 渲染后 处理与 vite 打包配置(产出 qrc 内嵌的单文件 IIFE bundle)。 Log: 新增 Milkdown 渲染 web 内核手写源码 PMS: TASK-393979 Influence: 渲染区语法支持(表格/代码高亮/任务列表/公式)由本层提供。
sync by github workflow Log: none Influence: none
Vendor qwebchannel.js from Qt, lock npm dependency versions with package-lock.json, and commit vite build outputs (main.bundle.js, style.css) that qrc embeds at compile time. Generated files are exempt from the 800-line rule per agreement. 内置 Qt 官方 qwebchannel.js,以 package-lock.json 锁定 npm 依赖版本, 并提交 vite 构建产物(main.bundle.js/style.css)——qrc 在编译期嵌入 的是这些产物,缺失将导致其他环境编译后渲染区白屏。生成物按约定 豁免 800 行限制。 Log: 内置 web 第三方依赖与构建产物 PMS: TASK-393979 Influence: 无 qrc 资源缺失问题;升级依赖需重跑 vite build 并同步产物。
Add missing license texts referenced by the vendored qwebchannel.js SPDX header (GPL-2.0-only, GPL-3.0-only, LGPL-3.0-only downloaded from SPDX, and a hand-written LicenseRef-Qt-Commercial note pointing to Qt commercial licensing), and exempt the CI-generated reuse_lint_report.md in .reuse/dep5. Verified locally with reuse lint: 723/723 compliant. 补充 vendored qwebchannel.js SPDX 头引用的缺失许可证文本(GPL-2.0- only/GPL-3.0-only/LGPL-3.0-only 取自 SPDX 官方,LicenseRef-Qt- Commercial 手写说明并指向 Qt 商业许可页),并在 .reuse/dep5 豁免 CI 自产的 reuse_lint_report.md。本地 reuse lint 验证 723/723 全合规。 Log: 修复 vendored qwebchannel 许可证文本缺失导致的 CI 报错 PMS: TASK-393979 Influence: license-check 流水线转绿;LicenseRef 文件为说明性文本非完整条款。
Replace the upstream four-way license declaration in qwebchannel.js with the project-standard SPDX header style used by other source files (SPX-FileCopyrightText + GPL-3.0-or-later, choosing the GPL-3.0-or- later option among the file's original licenses), and drop the four now-unneeded license texts added by the previous commit. 将 qwebchannel.js 的 Qt 原始四选一许可声明改为与项目其他源码一致的 标准 SPDX 头(SPDX-FileCopyrightText + GPL-3.0-or-later,即在原多重 许可中选择 GPL-3.0-or-later 选项引入),并删除上一提交为此新增的 四个许可证文本文件。 Log: qwebchannel.js 改用项目标准 SPDX 头并精简许可证文件 PMS: TASK-393979 Influence: LICENSES 目录回归精简;reuse lint 对跟踪文件保持全合规。
Add MarkdownView wrapping QWebEngineView to implement IMarkdownRenderer: load qrc milkdown page, register WebChannel, cache and replay protocol state (content/layout/theme/scroll) on ready or crash-reload, register mdimg custom url scheme so qrc page can load local images (Chromium blocks file:// subresources), and delegate external http links to the system browser via bridge plus a urlChanged fallback. 新增 MarkdownView 渲染服务层,实现 IMarkdownRenderer:加载 qrc 渲染 页、注册 WebChannel、ready/崩溃恢复时按序补发协议缓存四项(内容/ 布局/主题/滚动)、注册 mdimg 自定义 scheme 供给本地图片(规避 Chromium 禁 qrc 页面访问 file:// 子资源)、外部链接经 bridge 转系统 浏览器并以 urlChanged 兜底。 Log: 新增 MarkdownView 渲染服务与 mdimg 本地图片方案 PMS: TASK-393979 Influence: 渲染页本地图片可显示;崩溃自动恢复;链接在系统浏览器打开。
Add a three-page view stack (edit page, read page, live-preview splitter) in EditWrapper with lazy-created MarkdownView. Wire 300ms throttled content sync with mdimg image rewrite, bidirectional ratio scroll sync with loop guard, theme injection on change and creation, markdown recognition on load and language switch with fallback/elevate mode transitions, and explicit show() after cross-container reparent. EditWrapper 集成三页视图栈(编辑页/查看页/实时预览分栏),懒创建 MarkdownView;接入 300ms 节流内容同步(含 mdimg 图片路径改写)、带 防回环护栏的双向比例滚动同步、 变更与创建时的主题注入、文件加载与 语言切换时的 Markdown 识别及模式回退/跃迁;跨容器 reparent 后显式 show() 防分栏零宽。 Log: 集成 Markdown 三视图编排与同步机制 PMS: TASK-393979 Influence: 打开 .md 默认实时预览;语言切为 Markdown 自动进入预览、 切走自动回退编辑视图。
Replace read-only toggle actions with a view-mode submenu in the editor context menu (edit/read/live-preview, shared action group also reused by the render-view context menu), add a DDropdownMenu view-mode combobox to the bottom bar showing the current view name with live-preview greyed out for non-markdown files, and remove the obsolete INSERT/OVERWRITE cursor status label. Update AT-SPI expected names accordingly. 右键菜单的只读互斥项替换为「视图模式」二级菜单(编辑/查看/实时 预览,动作组同时供渲染视图右键复用);底部状态栏新增视图模式 combobox,折叠态显示当前视图名,非 md 文件仅置灰「实时预览」; 移除原 INSERT/OVERWRITE 光标状态标签;同步更新 AT-SPI 期望名。 Log: 新增右键菜单与状态栏的视图模式入口 PMS: TASK-393979 Influence: 三处入口状态同步;状态栏不再显示光标模式(Insert 键功能不变)。
Null static instance pointers in Settings and StartManager destructors so instance() never returns a dangling pointer after deleteLater in tests; give context to timer singleShots to skip firing on destroyed receivers; guard the tab tear-off animation with QPointer since the source EditWrapper may be closed during the 200ms animation (UAF); fall back to window size when the drag pixmap is null. Settings 与 StartManager 析构时置空静态指针,避免测试 deleteLater 后 instance() 返回悬空指针;延时 singleShot 补 context 对象,接收者 已销毁则不触发;标签撕出动画期间源 EditWrapper 可能被关闭,以 QPointer 防悬空(UAF 根源);拖拽 pixmap 为空时回退窗口尺寸。 Log: 修复标签撕出动画 UAF 与单例悬空问题 PMS: TASK-393979 Influence: 消除全量测试套件随机段错误与关标签时的偶发崩溃。
Null static instance pointers in Settings and StartManager destructors so instance() never returns a dangling pointer after deleteLater in tests; give context to timer singleShots to skip firing on destroyed receivers; guard the tab tear-off animation with QPointer since the source EditWrapper may be closed during the 200ms animation (UAF); fall back to window size when the drag pixmap is null. Settings 与 StartManager 析构时置空静态指针,避免测试 deleteLater 后 instance() 返回悬空指针;延时 singleShot 补 context 对象,接收者 已销毁则不触发;标签撕出动画期间源 EditWrapper 可能被关闭,以 QPointer 防悬空(UAF 根源);拖拽 pixmap 为空时回退窗口尺寸。 Log: 修复标签撕出动画 UAF 与单例悬空问题 PMS: TASK-393979 Influence: 消除全量测试套件随机段错误与关标签时的偶发崩溃。
Add gtest suites for the QWidget-free logic units: ViewModeFsm default mode, availability, switch validity and fallback/elevate transitions; MarkdownLogic recognition rules and mdimg image path rewrite including chinese/space paths; RenderThrottle leading-plus-trailing throttle, same-content skip and pre-ready cache; ScrollSync ratio clamp and divide-by-zero guard; ThemeSerializer dark detection and CSS variables. 为纯逻辑层新增 gtest 套件:ViewModeFsm 默认视图/可用性/切换合法性/ 回退与跃迁;MarkdownLogic 识别规则与 mdimg 图片路径改写(含中文、 空格路径);RenderThrottle 前沿+后沿节流、相同内容跳过、ready 前 缓存;ScrollSync 比例钳制与除零保护;ThemeSerializer 深浅色判定与 CSS 变量序列化。 Log: 新增 Markdown 纯逻辑层单元测试 PMS: TASK-393979 Influence: 逻辑层规则全部有回归防护,改动有单测兜底。
Add QSignalSpy suites covering MarkdownBridge signal payloads (incl. openLinkRequested) and MarkdownView protocol-cache replay verified via mock bridge without starting WebEngine; add DISABLED_ integration smoke tests running a real render process: local image naturalWidth decode, pre-ready scroll ratio replay and external link click delegation, with javaScriptConsoleMessage capture for diagnostics. 新增 QSignalSpy 套件覆盖 MarkdownBridge 信号载荷(含 openLink Requested)与经 mock bridge 验证的 MarkdownView 协议缓存补发(不启 WebEngine);新增 DISABLED_ 前缀的真实渲染冒烟:本地图片 naturalWidth 解码、ready 前滚动比例重放、外部链接点击转交,附带 console 抓取诊断。 Log: 新增桥接/渲染服务测试与真实 WebEngine 冒烟 PMS: TASK-393979 Influence: 渲染链路改动可按维护检查单跑冒烟验证,防"单测全绿实机白屏"。
Add ut_editwrapper_markdown suite injecting MockMarkdownRenderer to verify view-mode switching, renderer call contracts, recognition fallback/elevate, bidirectional scroll forwarding and pane geometry after mode cycling. Extend existing ut_textedit and ut_bottombar with view-mode action/menu cases, and adjust ut_setting for singleton teardown change. 新增 ut_editwrapper_markdown 套件,注入 MockMarkdownRenderer 验证 视图切换、渲染器调用契约、识别回退/跃迁、双向滚动转发与模式往返 后的分栏几何;ut_textedit 与 ut_bottombar 补充视图模式动作/菜单 用例;ut_setting 适配单例析构变更。 Log: 新增 EditWrapper 编排测试并更新既有 UI 测试 PMS: TASK-393979 Influence: 三视图编排行为有 mock 级回归防护;既有套件保持全绿。
Foreground color lookup falls back to text-styles.Normal.text-color, and CSS variable fallbacks flip to white in dark theme. 前景色查找回退到 text-styles.Normal.text-color,深色主题下 CSS 变量回退值翻转为白色系,opacity 相对白色前景生效。 Log: 修复深色主题下markdown渲染文字仍为黑色的问题 Influence: 深色主题下markdown预览正文/标题/引用/代码块显示为白色 系(70%透明度元素对应70%白),浅色主题行为不变。
Code block: sticky header with chevron collapse toggle, language label and copy button (check icon 2s feedback). Table: decorative header bar. UI texts come from bridge Q_PROPERTY via Qt tr(). 代码块:吸顶表头(折线箭头折叠、语言标签、复制按钮,对勾反馈2s)。 表格:装饰表头条。界面文案经 bridge Q_PROPERTY 走 Qt tr() 翻译。 Log: markdown代码块/表格增加操作表头并支持国际化 Influence: markdown预览中代码块带可折叠吸顶表头与复制功能,表格 带表头条,界面文案可通过Qt linguist翻译,折叠态复制完整代码。
Mark code blocks with zero lines via an "empty" class in enhanceCodeBlocks and drop the 208px design min-height for them, so only one blank line remains under the block header. 在 enhanceCodeBlocks 中为零行代码块添加 empty 类,并对该类撤销 208px 设计最小高度,空代码块表头下仅保留一行空白。 Log: 修复空代码块渲染区域大空白的问题 Influence: 仅影响 Markdown 渲染视图中的空代码块显示,非空代码块 仍保持 208px 最小高度设计规格,其余渲染行为不变。
Prime a hidden QOpenGLWidget in Window ctor so the top-level native window uses RHI compositing from creation; defer MarkdownView creation in Edit mode to avoid unnecessary WebEngine startup. 在 Window 构造中预置隐藏的 QOpenGLWidget,使顶层原生窗口自创建起 走 RHI 合成,避免后加入的 QWebEngineView 触发窗口销毁重建;Edit 模式下延迟创建 MarkdownView,纯文本文件不再拉起 WebEngine。 Log: 修复打开markdown文件时闪现窗口的问题 Influence: 解决冷启动打开md文件、会话恢复含md标签、运行中新开md 标签时窗口先闪现再显示主界面的问题;纯文本文件不再拉起WebEngine。
Set QTWEBENGINE_CHROMIUM_FLAGS before QApplication construction: disable GPU on all arches, combine with single-process and jitless JS on sw_64, skip single-process on mips and Wayland; also unset DTK_FORCE_RASTER_WIDGETS to keep WebEngine GL windows working. 在 QApplication 构造前设置 QTWEBENGINE_CHROMIUM_FLAGS:全架构禁用 GPU;sw_64 一次性合并设置 single-process 与 jitless;mips 及 Wayland 会话跳过 single-process;同时关闭 DTK_FORCE_RASTER_WIDGETS 避免 WebEngine GL 窗口异常(参考 deepin-manual 同款处理)。 Log: 添加QtWebEngine架构特殊处理(sw_64/mips/禁用GPU) Influence: sw_64 上 Markdown 渲染不再因 V8 JIT 缺失崩溃;国产平台 规避显卡驱动兼容问题;x86 实测渲染与窗口显示行为无回归。
- iflytek_ai_assistant.cpp: stopTtsDirectly() missed a semicolon inside the ENABLE_STOP_TTS branch; defining the macro broke the build. - FlashTween.h: stopX()/stopY()/activeX()/activeY() dereferenced the timers without the null guards used by startX()/startY(). - deletebackcommond.cpp: DeleteBackCommand::undo()/redo() dereferenced m_edit without the if (m_edit) guard used by the sibling command classes. Log: Influence: editor widget
- setCurrentAction(): guard against a null m_menu and skip top-level actions that have no submenu before calling menu()->actions(); a submenu-less action (e.g. the 'None' entry) crashed there. - setCurrentTextOnly(): guard m_menu, which is null after deleteMenu()/setMenu(nullptr). - setSvgColor(): check QFile::open() and return an empty pixmap instead of silently rendering a blank arrow icon; drop the unused before_color variable in SetSVGBackColor. Log: Influence: ddropdownmenu widget
The catch branch of run() returned early, skipping quit() and deleteLater(), so the thread event loop never stopped and the thread object leaked when reading raised an exception. Log: Influence: file loading
The ReplaceBar branch passed false to setMismatchAlert() in both the empty-keyword and the non-empty-keyword case, ignoring the highlight result, so the mismatch alert never showed for the replace bar. The FindBar branch above already uses !findKeyword; align ReplaceBar with it. Log: Influence: find/replace bar --
getSupportEncoding() assumed an 8-char 'encodes=' prefix with mid(8, length-2) and split entries without trimming, so a renamed key, trailing spaces or CRLF line endings silently produced invalid encoding names (the root cause pattern of issue 57271). Parse the '[group]' and 'key=value' lines structurally, trim entries and drop empty ones. Log: Influence: encoding list loading
…mmits Anchor 13 GTest cases to current master semantics (d634cba) using PMS reproduction steps, covering tab move-out/restore, window close scheduling, column edit, color mark-all, window-state option and titlebar focus chain; 8 remaining bugs recorded as SKIP with evidence in work order (no testable code path). 新增13个GTest回归用例,为无修复提交的12个PMS bug按复现步骤+当前代码 语义锚定(标签页移出回填、窗口退出调度、列编辑、颜色标记全部、窗口 状态选项、标题栏焦点链);其余8个bug经核实无代码断言路径,在工作单 记录SKIP理由。 Log: 补齐PMS批次4无修复提交bug的回归单测 Influence: 仅测试文件变更,不影响应用功能。
The error path already registers quit()+deleteLater() since upstream a66591e, so the manual deleteLater in the test ran on an already destroyed object and SIGBUSed the suite after relink; assert guard cleared by runSync's DeferredDelete dispatch instead. 异常路径自 a66591e 起已自带 quit()+deleteLater(),用例中手动补删在 对象析构后执行导致重链后 SIGBUS;改为断言 runSync 派发后 guard 已清空。 Log: 修复批次2用例在新基线上的释放语义错配 Influence: 仅测试文件变更,不影响应用功能。
1. Root cause: StartManager::instance() lazily creates the singleton,
and ~EditorApplication() called it during teardown; a forwarding
(second) process that never created StartManager would instantiate
a full instance (login1 inhibit D-Bus call, QTimer, Iflytek AI
probe QtConcurrent task) and destroy it right away, leaving the
worker thread logging during process teardown and crashing in
libdtk6log (SIGSEGV)
2. Fix:
- instance() is now a pure non-creating accessor
- creation is explicit via create(), called exactly once in main()
- the first (service-owning) process releases the singleton in
main() right after the event loop ends; ~EditorApplication()
no longer touches StartManager at all
3. Impact: the forwarding process exit path never instantiates
StartManager, removing the teardown crash; accidental singleton
creation is now impossible for all callers by construction
Log: Fixed crash when opening a text file from desktop with the editor already running
Influence:
1. Test opening a text file by double-clicking on desktop with editor open
2. Test launching a second instance that forwards files via D-Bus
3. Test single-window startup and normal exit of the editor
4. Run StartManager / EditorApplication / Window / Controls unit tests
(updated for create() / non-creating instance() semantics)
fix: 单例生命周期显式化,修复退出崩溃
1. 根因: StartManager::instance() 是懒创建访问器,~EditorApplication()
在退出期调用它;D-Bus 转发进程从未创建过单例,析构时意外实例化完整
StartManager(login1 inhibit 同步 D-Bus 调用、QTimer、Iflytek AI 探测
QtConcurrent 任务)并立即销毁,工作线程在进程 teardown 期间打日志,
于 libdtk6log 中 SIGSEGV
2. 方案:
- instance() 改为纯查询访问器,不再有创建副作用
- 创建显式化为 create(),仅在 main() 中调用一次
- 首进程在事件循环结束后于 main() 中显式释放单例,
~EditorApplication() 不再触碰 StartManager
3. 影响: 转发进程退出路径不再实例化 StartManager,消除崩溃;对所有
调用方而言,意外创建单例在构造上已不可能
Log: 修复已打开编辑器时双击桌面文本文档产生的崩溃
Influence:
1. 测试已打开编辑器时双击桌面文本文档
2. 测试第二进程通过 D-Bus 转发文件后退出
3. 测试单窗口启动与正常退出
4. 运行 StartManager / EditorApplication / Window / Controls 单元测试
(已随 create() / 非创建 instance() 语义同步更新)
PMS: BUG-378901
Window::addTab unconditionally calls StartManager::instance()->checkPath(), but after BUG-378901 instance() is a pure query returning nullptr when the singleton was never created. The dtextedit-window integration suite builds a real Window without creating the singleton, so the first addTab crashed with SIGSEGV (exit 139) after all cases passed, and the UT pipeline reported the binary as failed. Mirror test_window.cpp: create the singleton explicitly at suite setup, matching the production path where main() calls create(). Window::addTab 无条件调用 StartManager::instance()->checkPath(),而 BUG-378901 修复后 instance() 为纯查询、未创建时返回空指针。TextEdit×Window 集成套件直接构造真实 Window 未建单例,首个用例 addTab 即段错误(退出码 139),用例全部通过仍被流水线判失败。与 test_window.cpp 对齐,套件级显式 建单例,与生产路径 main() 中 create() 语义一致。 Log: 修复 window-integration 单测套件退出段错误(退出码 139) Influence: 仅影响单测,集成套件可完整跑通并返回干净退出码
1. Root cause: TextFileSaver::saveToFile() calls processEvents() in its write loop; a queued QCloseEvent delivered during processEvents() deletes the EditWrapper and QTextDocument, leaving the save loop to access freed memory 2. Fix: replace raw QTextDocument* with QPointer in TextFileSaver, add quit-flag guard in saveToFile() to abort when document is destroyed; add QPointer guard and quit-flag checks in all save entry points in EditWrapper including both saveAsFile overloads; add short-circuit evaluation comment for m_quitFlag dangling pointer safety 3. Impact: no behavior change for normal saves; only aborts when the editor is closing during a save operation Influence: 1. Test saving a large file (200M+) and closing the window during save 2. Verify normal save and save-as still work correctly 3. Test force-save of invalid-char files and temp file saves fix: 修复保存大文件时关闭窗口导致的崩溃 1. 根因:TextFileSaver::saveToFile() 在写入循环中调用 processEvents(),期间排队的 QCloseEvent 被派发,删除 EditWrapper 和 QTextDocument,保存循环继续访问已释放内存 2. 方案:将 TextFileSaver 中 QTextDocument 原始指针改为 QPointer, 在 saveToFile() 中添加退出标志守卫,文档被销毁时中止保存;在 EditWrapper 所有保存入口(含 saveAsFile 两个重载)添加 QPointer 守卫和退出标志检查;为 m_quitFlag 悬垂指针安全添加短路求值注释 3. 影响:正常保存无行为变化,仅在编辑器关闭时中止保存操作 Influence: 1. 测试保存大文件(200M+)时关闭窗口 2. 验证正常保存和另存为功能正常 3. 测试非法字符文件强制保存和临时文件保存 PMS: BUG-379439
1. Render images inline so same-line images stay on one line 2. Show images at natural size; scale down only when wider than content 3. Reset ProseMirror separator placeholders to 1px invisible Log: markdown preview images now keep source line layout and size Influence: 1. Open a md with two images written on one line, check side-by-side 2. Open a md with a lone image line, check it occupies its own line 3. Check a wide image scales down to content width with ratio kept 4. Check no extra blank gap appears after image-only paragraphs fix: markdown 图片按源码行内排布并原尺寸渲染 1. 图片改为行内渲染,同一行的多张图片并排显示 2. 图片按原始尺寸显示,仅超出内容区宽度时等比缩小 3. 还原 ProseMirror separator 占位样式,消除图片后多余空隙 Log: markdown 预览图片保持与源码一致的行内排版和原始尺寸 Influence: 1. 打开同行多图的 md 文档,检查图片并排渲染 2. 打开单独一行图片的 md 文档,检查图片独占一行 3. 检查超宽图片等比缩小至内容区宽度且比例不变 4. 检查纯图片段落后无异常空白间隙 PMS: TASK-396619
1. Root cause: .table-block has fixed width: 502px and min-height: 222px, .code-block has fixed width: 782px and min-height: 208px in theme.css and build/style.css, causing narrow tables with scrollbars and empty space below short code blocks in markdown preview 2. Fix: change .table-block and .code-block width to 100% and min-height to 0 in both theme.css and build/style.css, preserving max-width: 100% and overflow-x: auto; update stale comments 3. Impact: tables and code blocks now fill available content width and height adapts to content; no change to collapse/expand/copy or table editing interactions Log: Markdown preview tables and code blocks now auto-fit container width Influence: 1. Test markdown preview with wide tables (many columns) 2. Test markdown preview with short code blocks (1-5 lines) 3. Test markdown preview with long code blocks (scrolling) 4. Verify table editing and collapse/expand/copy still work fix: 修复Markdown表格和代码块不自适应宽度高度 1. 根因:theme.css 和 build/style.css 中 .table-block 固定 width: 502px、min-height: 222px,.code-block 固定 width: 782px、min-height: 208px,导致表格偏窄出现滚动条, 短代码块下方出现空白 2. 方案:将 .table-block 和 .code-block 的 width 改为 100%、 min-height 改为 0,同步修改源文件和构建产物,保留 max-width: 100% 和 overflow-x: auto 约束,更新过时注释 3. 影响:表格和代码块自适应容器宽度,高度随内容自适应, 不影响折叠/展开/复制及表格编辑功能 Log: Markdown预览区表格和代码块自适应容器宽度 Influence: 1. 测试Markdown预览区多列表格显示效果 2. 测试Markdown预览区短代码块(1-5行)显示效果 3. 测试Markdown预览区长代码块滚动效果 4. 验证表格编辑和折叠/展开/复制功能正常 PMS: BUG-379631 multica: V-5879
1. Replace ratio protocol with line-based sync (scrollToLine/onScrollLine) 2. Left pane sends top visible block number; right pane maps it via anchor table 3. Rebuild anchor map on layout change (images load async, 9000px drift) 4. Update 5 unit test files and harness with line round-trip checks Log: Live preview panes now stay aligned when scrolling documents with images Influence: 1. Open d_editor.md in live preview, scroll both panes, verify alignment 2. Scroll left pane to document end with 60 images loaded, check right pane 3. Scroll right pane then wait for late image loads, reading position must hold fix: 实时阅览按源码行号同步左右滚动 1. 比例协议改为行号协议(scrollToLine/onScrollLine,对齐 VS Code 语义) 2. 左栏下发顶部可见块号,右栏经锚点表插值定位到对应块顶部 3. 布局变化自动重建锚点表(图片异步加载致 9000px 漂移,d_editor.md 实测) 4. 更新 5 个单测文件,harness 增加行号往返与布局变化自纠错断言 Log: 实时阅览左右栏在含图片文档下滚动保持对齐 Influence: 1. 打开 d_editor.md 进入实时阅览,分别滚动左右栏验证对齐 2. 左栏滚至文档末尾(60 张图加载完成),检查右栏位置一致 3. 右栏滚动后等待图片延迟加载,验证阅读位置不被拉回 PMS: TASK-396619
1. Root cause: forward scroll sync lambda in EditWrapper only allowed LivePreview mode, ReadView was excluded by the guard condition, so search navigation in ReadView could not scroll the rendered view; besides, the rendered view had no keyword highlighting at all 2. Fix: extend the guard to permit both LivePreview and ReadView modes; add a search highlight pipeline: TextEdit pushes keyword / current match index / case flag via MarkdownView::highlightSearch and the searchHighlightRequested bridge signal, JS side highlights all matches and the current match through the CSS Custom Highlight API with theme find-match / find-highlight colors, replayed after content re-render; reverse sync stays LivePreview-only 3. Impact: ReadView search results now scroll the rendered Markdown view, and search highlight shows in both ReadView and LivePreview; Edit mode and non-markdown files are unaffected Log: Fixed ReadView search not scrolling rendered view and added search highlight to rendered view Influence: 1. Test search navigation (prev/next) in ReadView with Markdown files: rendered page scrolls and highlights matches (all matches and the current match colored per the editor theme) 2. Verify scroll sync still works in LivePreview mode and search highlight also shows there 3. Verify no unexpected scrolling in Edit mode and no highlight for non-markdown files fix: 修复查看视图下搜索导航无法滚动渲染页且渲染页无搜索高亮的问题 1. 根因:EditWrapper 前向滚动同步 lambda 仅允许 LivePreview 模式, ReadView 被守卫条件排除,导致查看视图下搜索导航无法滚动渲染页; 且渲染页本身完全没有查找关键词高亮 2. 方案:扩展守卫条件同时允许 LivePreview 和 ReadView 模式; 新增搜索高亮链路:TextEdit 经 MarkdownView::highlightSearch 与 searchHighlightRequested 桥接信号推送关键词/当前命中序号/大小写, JS 侧用 CSS Custom Highlight API 按主题 find-match/find-highlight 配色高亮全部命中与当前命中,内容重渲染后自动重放; 反向同步仍仅限 LivePreview 3. 影响:查看视图下搜索结果可正常滚动渲染页,查看视图与实时预览 均有搜索高亮;编辑模式与非 Markdown 文件不受影响 Log: 修复查看视图下搜索导航无法滚动渲染页的问题,并为渲染页增加搜索高亮 Influence: 1. 测试查看视图下 Markdown 文件的搜索导航(上一个/下一个): 渲染页滚动且有高亮(全部命中与当前命中配色跟随编辑器主题) 2. 验证实时预览模式下滚动同步仍正常工作,搜索高亮同样生效 3. 验证编辑模式下无异常滚动行为,非 Markdown 文件无高亮 PMS: BUG-379599
1. Per CommonMark a blank/whitespace-only line before a closing fence is code content; remark kept it and it rendered as an extra empty line. 2. Add remarkTrimCodeTrailingBlankLines remark plugin to the milkdown parse chain so trailing blank lines are trimmed in both replaceAll and progressive rendering paths. 3. Interior blank lines and empty code blocks (one blank row from pre padding) keep previous behavior; copy no longer copies the blanks. 4. Rebuild main.bundle.js and add harness C-series regression checks. Log: Markdown code blocks no longer render a trailing empty line. Influence: 1. Open a .md whose fenced block has a blank/whitespace line before the closing fence; preview must show no empty line after the code. 2. Check empty code blocks still show one blank row and interior blank lines still render. 3. Verify ReadView/LivePreview scroll sync has no regression; run the web harness page (29 checks pass). fix: 修剪 Markdown 代码块末尾多余空行 1. 按 CommonMark,闭合围栏前的空行/纯空白行属于代码内容,此前在预览中 被渲染为代码后的多余空行。 2. 新增 remarkTrimCodeTrailingBlankLines remark 插件挂入 milkdown 解析 链,replaceAll 与渐进渲染两条路径均在解析期修剪末尾空白行。 3. 代码中间空行与空代码块(保留一行空白)行为不变;复制按钮不再复制 末尾空行。 4. 重新构建 main.bundle.js,并在 harness 增加 C 系列回归用例。 Log: Markdown 预览代码块末尾不再显示多余空行。 Influence: 1. 打开闭合围栏前有空行/纯空白行的 .md,检查预览中代码后无多余空行。 2. 检查空代码块仍显示一行空白,代码中间空行仍正常渲染。 3. 验证 ReadView/实时预览滚动同步无回归;本地浏览器跑 harness 页 29 项 用例通过。 PMS: TASK-396619
100% translated source file: 'deepin-editor.ts' on 'ru'.
1. Replace the pre-rendered text pixmap icon with native paintEvent drawing 2. on a DToolButton subclass, eliminating fractional-DPR resampling blur 3. Keep layout/colors/press states identical; size via updateButtonSize() 4. Fix T9 pixel size loss on app font change; rebuild arrow on DPR change 5. Update UT: font-change assertions plus native-rendering regression case Log: Bottom bar dropdown text is no longer blurry at fractional scaling (125%/150%) Influence: 1. Open the editor at 125%/150% scaling and check the four bottom bar dropdowns 2. Select long highlight types (e.g. Apache Configuration) and verify crisp text 3. Click a dropdown: text turns highlight color while pressed; menu pops up 4. Change system font size/family and confirm bottom bar label keeps T9 size fix: 底部下拉菜单文本改为原生绘制,修复缩放模糊 1. 移除 createIcon 位图图标方案,改为 LabelToolButton 在 paintEvent 原生绘制文本 2. 根因:分数缩放(125%/150%)下位图被非 1:1 重采样导致整行文字发虚,长文本尤甚 3. 布局/配色/按压态与原实现一致,尺寸经 updateButtonSize() 按文本宽度即时重算 4. 顺带修复:Qt6 应用字体变化后 T9 字号丢失;跨屏缩放变化时按新 DPR 重建箭头 5. 单测更新:字体变化断言改为保持 T9,新增原生渲染与宽度跟随回归用例 Log: 底部栏四个下拉(编码/高亮/行尾/视图模式)在 125%/150% 缩放下文字不再发虚 Influence: 1. 在 125%/150% 缩放屏幕打开文本编辑器,检查底部四个下拉按钮文字清晰度 2. 选择长名称高亮类型(如 Apache Configuration)确认长文本不再模糊 3. 点击下拉:按下时文字变高亮色、弹出菜单、释放后焦点回到编辑区 4. 修改系统字体大小/字体族,确认底栏下拉文字保持 T9 小号不随应用字号漂移
1. Update d_editor.md and p_editor.md in en_US/zh_CN/zh_HK/zh_TW 2. Replace read-only mode section with view mode section (edit, read-only and Markdown live preview) 3. Add view_mode.png figures, update zh_CN overview.png and remove obsolete read_only figures Log: Update the built-in help manual to match the new view mode Influence: 1. Open Help in Text Editor and check the view mode section renders 2. Verify the manual displays correctly in all four languages 3. Check all figures load without broken image links docs: 更新帮助手册以匹配视图模式功能 1. 更新 en_US/zh_CN/zh_HK/zh_TW 四种语言的 d_editor.md 和 p_editor.md 2. 将"开启/关闭只读模式"章节替换为"视图模式"章节(编辑视图/查看视图/实时阅览) 3. 新增 view_mode.png 配图,更新 zh_CN overview.png,删除废弃的 read_only 系列图片 Log: 更新内置帮助手册以匹配新的视图模式功能 Influence: 1. 从文本编辑器打开帮助,验证视图模式章节正常显示 2. 检查四种语言手册内容展示正确 3. 验证所有配图可正常加载,无失效链接
- bump version to 6.6.6 Log : bump version to 6.6.6
1. Qt6 print engines use the printer's native resolution, not 72 DPI. 2. pageRect(Point) broke unit consistency: margins and fonts are in device pixels, so layout got wrong scale and negative title box. 3. Restore Qt5 pageRect() semantics by using DevicePixel in all 3 print paths (doPrint, doPrintWithLargeDoc, asynPrint). Log: Fixed broken Qt6 print layout: oversized text, wrong page count and missing page numbers. Influence: 1. Open a text file, press Ctrl+P, check 2cm margins and normal font size in print preview. 2. Export to PDF (A4) from the print dialog and verify total page count and bottom-right page numbers. 3. Open a large file (>1MB) to hit the large-doc print path and flip preview pages to check layout stability. fix: 修复Qt6下打印页面矩形单位错误导致的排版异常 1. Qt6 打印引擎使用打印机原生分辨率,不再默认 72 DPI。 2. pageRect(Point) 与边距、字号的设备像素单位不一致,导致缩放 错误且页码框宽度为负。 3. 三处打印路径(doPrint/doPrintWithLargeDoc/asynPrint)恢复 Qt5 pageRect() 的设备像素语义。 Log: 修复 Qt6 下打印及打印预览排版错乱(文字过大、页数异常、 页码缺失)的问题。 Influence: 1. 打开文本文件,Ctrl+P 打印预览,检查 2 厘米页边距与字号是否 正常。 2. 在打印对话框导出 PDF(A4),检查总页数与右下角页码是否 正确。 3. 打开大文件(大于 1MB)走大文档打印路径,翻页预览检查排版 稳定。 PMS: BUG-380145
syncRendererFindHighlight() (introduced in d08b8fe) is called at the end of highlightKeyword()/highlightKeywordInView() and invokes the pure virtual IMarkdownRenderer::highlightSearch() on the pointer returned by m_wrapper->markdownRenderer(). The editor_core fixture never stubbed markdownRenderer(), so the real inline getter ran on the fake wrapper (a reinterpreted QWidget carrier) and returned a garbage non-null pointer, crashing the process with SIGSEGV (exit 139) in: - test_dtextedit_cursor: PrevLine_WithFindBarVisible_HighlightsSyncedKeyword - test_dtextedit_find: ReplaceNext_WithHighlightSelection_ReplacesOnce Stub markdownRenderer() to return nullptr, matching the real EditWrapper default (m_pRenderer = nullptr, early return). Both suites now pass in full (56/56 and 57/57) under QT_QPA_PLATFORM=offscreen.
- bump version to 6.6.7 Log : bump version to 6.6.7
- bump version to 6.6.8 Log : bump version to 6.6.8
Add regression tests verifying pageRect(DevicePixel) unit consistency with device-pixel margins across all three print paths (doPrint, doPrintWithLargeDoc, asynPrint), preventing negative titleBox width under Qt6 where pageRect(Point) no longer matches native DPI. Log: Added GTest cases for DevicePixel pageRect fix in print paths. Influence: None — test-only change, no production code modified. PMS: BUG-380145
1. Root cause: popupPrintDialog() constructs a DPrinter local variable (QPrinter::HighResolution) that is never used; its constructor synchronously loads the cups plugin and enumerates printers, adding avoidable latency to print preview 2. Fix: remove the unused DPrinter printer(QPrinter::HighResolution) line introduced by commit 9fcf3e4; the actual print dialog uses DPrintPreviewDialog with no arguments and builds its own printer 3. Impact: print preview opens faster by eliminating one redundant synchronous printer enumeration; no behavior change for valid print paths; no -Wunused-variable warning after removal Log: Remove dead DPrinter construction to speed up print preview Influence: 1. Test print preview with a syntax-highlighted file 2. Test print preview with a plain text file 3. Verify no unused-variable warnings in build output fix: 删除 popupPrintDialog 中无用的 DPrinter 构造 1. 根因:popupPrintDialog() 构造了一个从未使用的 DPrinter 局部 变量(QPrinter::HighResolution),其构造函数同步加载 cups 插件并枚举打印机,为打印预览增加不必要的延迟 2. 方案:删除由 commit 9fcf3e4 引入的无用 DPrinter printer( QPrinter::HighResolution) 行;实际打印对话框使用无参 DPrintPreviewDialog 并在内部自建 printer 3. 影响:消除一次冗余的同步打印机枚举,打印预览打开更快; 对有效打印路径无行为变化;删除后无 -Wunused-variable 告警 Log: 删除无用 DPrinter 构造以加速打印预览 Influence: 1. 测试语法高亮文件的打印预览 2. 测试纯文本文件的打印预览 3. 验证编译输出无 unused-variable 告警 PMS: BUG-375053
|
TAG Bot TAG: 6.6.8 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pengfeixx 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 |
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ❌评价: 变更行数过多,请联系研发经理人为审核 ❌ 不通过 潜在问题: 建议: 变更行数过多,请联系研发经理人为审核 2. 代码质量 ❌评价: 变更行数过多,请联系研发经理人为审核 ❌ 不通过 潜在问题: 建议: 变更行数过多,请联系研发经理人为审核 3. 代码性能 ❌评价: 变更行数过多,请联系研发经理人为审核 ❌ 不通过 潜在问题: 建议: 变更行数过多,请联系研发经理人为审核 4. 代码安全 🔓评价: 变更行数过多,请联系研发经理人为审核 ❌ 不通过
安全漏洞详情: 建议: 变更行数过多,请联系研发经理人为审核 💡 改进建议代码示例本报告由 AI 代码审查工具自动生成 |
Contributor
|
TAG Bot New tag: 6.5.64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: remove dead DPrinter construction in popupPrintDialog
variable (QPrinter::HighResolution) that is never used; its
constructor synchronously loads the cups plugin and enumerates
printers, adding avoidable latency to print preview
line introduced by commit 9fcf3e4; the actual print dialog uses
DPrintPreviewDialog with no arguments and builds its own printer
synchronous printer enumeration; no behavior change for valid
print paths; no -Wunused-variable warning after removal
Log: Remove dead DPrinter construction to speed up print preview
Influence:
fix: 删除 popupPrintDialog 中无用的 DPrinter 构造
变量(QPrinter::HighResolution),其构造函数同步加载 cups
插件并枚举打印机,为打印预览增加不必要的延迟
QPrinter::HighResolution) 行;实际打印对话框使用无参
DPrintPreviewDialog 并在内部自建 printer
对有效打印路径无行为变化;删除后无 -Wunused-variable 告警
Log: 删除无用 DPrinter 构造以加速打印预览
Influence:
PMS: BUG-375053