From a6cf1094a8b4e93333a49cd530902480d9ed0c6b Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Fri, 23 Oct 2026 08:15:44 +0800 Subject: [PATCH 1/2] fix: uncomment activateWindow/showNormal calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: a single-line `//` comment silently disabled both `activateWindow()` and `showNormal()` in startDeviceManager 2. Fix: uncomment both calls and split them onto separate lines to prevent future single-line comment from swallowing multiple statements 3. Impact: minimized windows now properly restore and gain focus when startDeviceManager is called via D-Bus, consistent with the `activateWindow()` method already used in the same file Log: Fixed window not restoring from minimized state when device manager is called again Influence: 1. Test calling startDeviceManager when window is minimized 2. Verify window restores to normal state and gains focus 3. Test calling startDeviceManager when window is already visible fix: 恢复 startDeviceManager 中被注释的窗口激活调用 1. 根因:第 87 行单行 `//` 注释同时吞掉了 `activateWindow()` 和 `showNormal()` 两条调用,导致窗口最小化时无法被唤起 2. 方案:取消注释并将两条调用拆分到独立行,从结构上消除单行 注释吞掉多条语句的隐患 3. 影响:最小化状态下再次调用 startDeviceManager 时窗口可正常 恢复并激活,与同文件 `activateWindow()` 方法行为一致 Log: 修复设备管理器最小化状态下再次调用无法恢复窗口的问题 Influence: 1. 测试窗口最小化时调用 startDeviceManager 的恢复行为 2. 验证窗口恢复为正常状态并获得焦点 3. 测试窗口已可见时调用 startDeviceManager 的行为 --- deepin-devicemanager/src/SingleDeviceManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deepin-devicemanager/src/SingleDeviceManager.cpp b/deepin-devicemanager/src/SingleDeviceManager.cpp index ae7bc6199..8cb1200e5 100644 --- a/deepin-devicemanager/src/SingleDeviceManager.cpp +++ b/deepin-devicemanager/src/SingleDeviceManager.cpp @@ -84,7 +84,8 @@ void SingleDeviceManager::startDeviceManager(QString pageDescription) if (m_qspMainWnd.get()) { //先判断当前是否已经存在一个进程。 qCDebug(appLog) << "Main window exists, activating it."; m_qspMainWnd.get()->setWindowState((m_qspMainWnd.get()->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); -// m_qspMainWnd.get()->activateWindow(); //特效模式下激活窗口 m_qspMainWnd.get()->showNormal(); //无特效激活窗口 + m_qspMainWnd.get()->activateWindow(); //特效模式下激活窗口 + m_qspMainWnd.get()->showNormal(); //无特效激活窗口 } } } From f7973281c1e89dba865ff94ad999541197f82b7b Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Mon, 26 Oct 2026 18:11:38 +0800 Subject: [PATCH 2/2] chore: update SPDX copyright year to 2022-2026 (CI SPDX check) The license-check CI (SPDX Header Validation) requires files created in earlier years and modified in 2026 to carry a copyright year range ending with the current year. Extend the SPDX-FileCopyrightText header of SingleDeviceManager.cpp from 2022 to 2022-2026 so the SPDX summary reports 0 failures. --- deepin-devicemanager/src/SingleDeviceManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepin-devicemanager/src/SingleDeviceManager.cpp b/deepin-devicemanager/src/SingleDeviceManager.cpp index 8cb1200e5..2154fd4dd 100644 --- a/deepin-devicemanager/src/SingleDeviceManager.cpp +++ b/deepin-devicemanager/src/SingleDeviceManager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2022-2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later