Skip to content

fix: fix SSID encoding issues with GBK/UTF-8 detection#549

Open
caixr23 wants to merge 1 commit intolinuxdeepin:masterfrom
caixr23:master
Open

fix: fix SSID encoding issues with GBK/UTF-8 detection#549
caixr23 wants to merge 1 commit intolinuxdeepin:masterfrom
caixr23:master

Conversation

@caixr23
Copy link
Copy Markdown
Contributor

@caixr23 caixr23 commented Apr 23, 2026

  1. Add decodeByteArray() utility function to handle mixed GBK and UTF-8 encoded SSIDs
  2. Replace direct ssid() calls with decodeByteArray(rawSsid()) in NetworkManager backend
  3. Update copyright years to 2026 in affected files
  4. Fix potential SSID mismatch issues when comparing wireless settings with network SSIDs

The NetworkManager Qt API's ssid() method may return incorrectly decoded strings when
access points use GBK encoding (common with Chinese routers). This change introduces
intelligent encoding detection that tries UTF-8 first, then falls back to GBK if
invalid characters are detected, ensuring proper display and matching of SSIDs
with non-ASCII characters.

Influence:

  1. Test WiFi scanning with access points using Chinese SSID names (GBK encoded)
  2. Test WiFi scanning with access points using UTF-8 encoded SSIDs
  3. Verify SSID matching for saved connections with non-ASCII characters
  4. Test hidden network detection with various SSID encodings
  5. Verify active connection status display shows correct SSID names
  6. Test hotspot functionality with non-ASCII SSID names

fix: 修复 SSID 编码问题,支持 GBK/UTF-8 自动检测

  1. 添加 decodeByteArray() 工具函数处理混合 GBK 和 UTF-8 编码的 SSID
  2. 在 NetworkManager 后端中将直接调用 ssid() 替换为 decodeByteArray(rawSsid())
  3. 更新受影响文件的版权年份至 2026
  4. 修复无线设置与网络 SSID 比较时可能出现的编码不匹配问题

NetworkManager Qt API 的 ssid() 方法在接入点使用 GBK 编码时(常见于中文 路由器)
可能返回错误解码的字符串。此变更引入智能编码检测,优先尝试 UTF-8 解码,
检测到无效字符时回退到 GBK 解码,确保非 ASCII 字符的 SSID 正确显示和
匹配。

Influence:

  1. 测试使用中文 SSID 名称(GBK 编码)的 WiFi 扫描功能
  2. 测试使用 UTF-8 编码 SSID 的 WiFi 扫描功能
  3. 验证非 ASCII 字符的已保存连接 SSID 匹配功能
  4. 测试各种 SSID 编码下的隐藏网络检测功能
  5. 验证活动连接状态显示正确的 SSID 名称
  6. 测试使用非 ASCII SSID 名称的热点功能

PMS: BUG-357843

Summary by Sourcery

Improve SSID handling by introducing a shared decoding utility that correctly interprets mixed GBK/UTF-8 SSIDs and applying it across the NetworkManager backend.

New Features:

  • Add a decodeByteArray utility to detect and decode SSIDs encoded in either UTF-8 or GBK.

Bug Fixes:

  • Ensure SSIDs with non-ASCII characters are displayed and matched correctly by decoding raw SSID bytes instead of relying on NetworkManager's ssid() string.
  • Fix potential SSID mismatches when comparing saved wireless settings, hidden networks, and active connections against access point SSIDs.

Enhancements:

  • Unify SSID decoding logic across access point, device manager, and network detail components via the shared utility.

Chores:

  • Update copyright headers in affected networking source files to cover years up to 2026.

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caixr23

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 23, 2026

Reviewer's Guide

Introduces a shared decodeByteArray() utility to robustly decode SSIDs from raw byte arrays using UTF-8 with GBK fallback, and wires it into the NetworkManager-based Wi‑Fi backend wherever SSIDs are read or compared, while also updating copyright years.

Sequence diagram for SSID retrieval with UTF-8/GBK decoding

sequenceDiagram
    actor User
    participant UI as WifiUI
    participant WDM as WirelessDeviceManagerRealize
    participant WD as NetworkManager_WirelessDevice
    participant AP as NetworkManager_AccessPointPtr
    participant NU as NetUtils

    User ->> UI: Open wifi list
    UI ->> WDM: activeAp()
    WDM ->> WD: activeAccessPoint()
    WD -->> WDM: AP
    alt access point exists
        WDM ->> AP: rawSsid()
        AP -->> WDM: QByteArray rawSsid
        WDM ->> NU: decodeByteArray(rawSsid)
        NU -->> WDM: QString decodedSsid
        WDM -->> UI: decodedSsid
        UI -->> User: Display correct SSID
    else no access point
        WDM -->> UI: empty QString
        UI -->> User: No active wifi
    end
Loading

Class diagram for SSID decoding integration

classDiagram
    class NetUtils {
        +QString decodeByteArray(QByteArray data)
        +Connectivity connectivityValue(uint sourceConnectivity)
        +DeviceStatus convertDeviceStatus(int sourceDeviceStatus)
        +ConnectionStatus convertConnectionStatus(int sourceConnectionStatus)
        +ConnectionStatus convertStateFromNetworkManager(int state)
    }

    class AccessPointProxyNM {
        +QString ssid() const
        +bool contains(QString uni) const
        +void initState()
        +void updateHiddenInfo()
        -NetworkManager_WirelessNetworkPtr m_network
    }

    class NetworkDetailNMRealize {
        +void initProperties()
        -QString ssid
    }

    class WirelessDeviceManagerRealize {
        +QString activeAp() const
        +bool hotspotEnabled()
        +void addNetwork(NetworkManager_WirelessNetworkPtr network)
        -QList~AccessPointInfo_ptr~ m_accessPointInfos
        -QSharedPointer~NetworkManager_WirelessDevice~ m_device
    }

    class NetworkManager_WirelessNetworkPtr {
        +QString ssid() const
        +NetworkManager_AccessPointPtr referenceAccessPoint() const
    }

    class NetworkManager_AccessPointPtr {
        +QByteArray rawSsid() const
        +QString ssid() const
        +int frequency() const
    }

    class NetworkManager_WirelessDevice {
        +NetworkManager_AccessPointPtr activeAccessPoint() const
    }

    class AccessPointInfo {
        +NetworkManager_AccessPointPtr accessPoint() const
    }

    NetUtils <.. AccessPointProxyNM : uses
    NetUtils <.. NetworkDetailNMRealize : uses
    NetUtils <.. WirelessDeviceManagerRealize : uses

    AccessPointProxyNM --> NetworkManager_WirelessNetworkPtr : m_network
    NetworkManager_WirelessNetworkPtr --> NetworkManager_AccessPointPtr : referenceAccessPoint

    WirelessDeviceManagerRealize --> NetworkManager_WirelessDevice : m_device
    WirelessDeviceManagerRealize --> AccessPointInfo : manages

    AccessPointInfo --> NetworkManager_AccessPointPtr : accessPoint

    NetworkDetailNMRealize --> NetworkManager_WirelessDevice : uses
    NetworkDetailNMRealize --> NetworkManager_AccessPointPtr : uses
Loading

Flow diagram for decodeByteArray SSID decoding logic

flowchart TD
    A[Start decodeByteArray] --> B{data is empty?}
    B -- Yes --> C[Return empty QString]
    B -- No --> D[Create utf8Decoder]
    D --> E[Check utf8Decoder isValid]
    E --> F[Decode data with utf8Decoder to utf8Result]
    F --> G{isValidUtf8 AND utf8Result has no U+FFFD?}
    G -- Yes --> H[Return utf8Result]
    G -- No --> I[Create gbkDecoder with GBK]
    I --> J[Decode data with gbkDecoder]
    J --> K[Return GBK decoded QString]
    C --> L[End]
    H --> L
    K --> L
Loading

File-Level Changes

Change Details Files
Add shared SSID decoding utility with UTF-8-first, GBK-fallback logic and expose it via netutils.
  • Include QStringConverter in netutils implementation to access QStringDecoder.
  • Implement decodeByteArray(const QByteArray &data) that returns empty QString on empty input, attempts UTF-8 decoding and checks for replacement characters, and falls back to GBK decoding when UTF-8 is invalid or lossy.
  • Declare decodeByteArray in netutils.h with a brief comment describing its GBK/UTF-8 handling.
src/netutils.cpp
src/netutils.h
Use decodeByteArray() instead of NetworkManager ssid() for reading and comparing SSIDs in the NetworkManager backend.
  • Change AccessPointProxyNM::ssid() to decode rawSsid() via decodeByteArray instead of calling ssid().
  • Update AccessPointProxyNM::initState() and updateHiddenInfo() to compare wirelessSetting->ssid() against the locally decoded ssid() to avoid encoding mismatches.
  • In NetworkDetailNMRealize::initProperties(), decode activeAccessPoint->rawSsid() via decodeByteArray instead of using ssid().
  • In WirelessDeviceManagerRealize::activeAp(), return decodeByteArray(ap->rawSsid()) instead of ap->ssid().
  • In WirelessDeviceManagerRealize::addNetwork(), change the existing-AP search predicate so that it compares accessPoint()->ssid() with decodeByteArray(network->referenceAccessPoint()->rawSsid()).
  • Include netutils.h in networkdetailnmrealize.cpp so decodeByteArray is available.
src/impl/networkmanager/accesspointproxynm.cpp
src/impl/networkmanager/networkdetailnmrealize.cpp
src/impl/networkmanager/devicemanagerrealize.cpp
Refresh copyright ranges to include 2026 in touched files.
  • Extend SPDX-FileCopyrightText year ranges to include 2026 in netutils, AccessPointProxyNM, and NetworkDetailNMRealize source and header files.
src/netutils.cpp
src/netutils.h
src/impl/networkmanager/accesspointproxynm.cpp
src/impl/networkmanager/networkdetailnmrealize.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues, and left some high level feedback:

  • In decodeByteArray(), isValidUtf8 is captured before any decoding is done, so the validity check never reflects the UTF-8 decode result; consider checking utf8Decoder.isValid() after calling the decoder (and only then inspecting the replacement-character heuristic) before deciding to fall back to GBK.
  • When constructing the GBK decoder (QStringDecoder gbkDecoder("GBK")), it would be safer to verify gbkDecoder.isValid() and define a fallback (e.g. QString::fromLatin1 or returning the UTF-8 result) in case the GBK codec is not available, to avoid returning an empty or invalid string.
  • In WirelessDeviceManagerRealize::addNetwork(), the comparison mixes accessPoint()->ssid() (still using NetworkManager’s decoding) with decodeByteArray(network->referenceAccessPoint()->rawSsid()); for consistency with the rest of the changes, consider normalizing both sides through the same decoding path or exposing a helper that returns a consistently decoded SSID.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In decodeByteArray(), `isValidUtf8` is captured before any decoding is done, so the validity check never reflects the UTF-8 decode result; consider checking `utf8Decoder.isValid()` after calling the decoder (and only then inspecting the replacement-character heuristic) before deciding to fall back to GBK.
- When constructing the GBK decoder (`QStringDecoder gbkDecoder("GBK")`), it would be safer to verify `gbkDecoder.isValid()` and define a fallback (e.g. `QString::fromLatin1` or returning the UTF-8 result) in case the GBK codec is not available, to avoid returning an empty or invalid string.
- In WirelessDeviceManagerRealize::addNetwork(), the comparison mixes `accessPoint()->ssid()` (still using NetworkManager’s decoding) with `decodeByteArray(network->referenceAccessPoint()->rawSsid())`; for consistency with the rest of the changes, consider normalizing both sides through the same decoding path or exposing a helper that returns a consistently decoded SSID.

## Individual Comments

### Comment 1
<location path="src/netutils.cpp" line_range="85-87" />
<code_context>
+        return QString();
+    }
+
+    QStringDecoder utf8Decoder(QStringDecoder::Utf8);
+    bool isValidUtf8 = utf8Decoder.isValid();
+    QString utf8Result = utf8Decoder(data);
+    if (isValidUtf8 && !utf8Result.contains(QChar(0xFFFD))) {
+        return utf8Result;
</code_context>
<issue_to_address>
**issue (bug_risk):** UTF-8 validity check is done before decoding, which doesn’t reflect whether the input bytes are valid.

`utf8Decoder.isValid()` right after construction only reports that the codec exists, not that `data` is valid UTF‑8. To actually detect invalid input, you need to inspect the decoder after decoding (e.g., call `isValid()` after `utf8Decoder(data)` or use another Qt API for error reporting). As written, `isValidUtf8` is effectively constant and doesn’t help detect bad input.
</issue_to_address>

### Comment 2
<location path="src/netutils.cpp" line_range="91-92" />
<code_context>
+    if (isValidUtf8 && !utf8Result.contains(QChar(0xFFFD))) {
+        return utf8Result;
+    }
+    QStringDecoder gbkDecoder("GBK");
+    return gbkDecoder.decode(data);
+}
 }
</code_context>
<issue_to_address>
**suggestion:** GBK decoder is not checked for validity or given a fallback if the codec is unavailable.

`QStringDecoder("GBK")` can be invalid if the codec isn’t available, in which case `decode()` may yield empty or corrupted output. Please guard with `gbkDecoder.isValid()` and, if false, fall back to a safer alternative such as `QString::fromLatin1(data)` or returning the UTF‑8 result instead.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/netutils.cpp
Comment on lines +85 to +87
QStringDecoder utf8Decoder(QStringDecoder::Utf8);
bool isValidUtf8 = utf8Decoder.isValid();
QString utf8Result = utf8Decoder(data);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): UTF-8 validity check is done before decoding, which doesn’t reflect whether the input bytes are valid.

utf8Decoder.isValid() right after construction only reports that the codec exists, not that data is valid UTF‑8. To actually detect invalid input, you need to inspect the decoder after decoding (e.g., call isValid() after utf8Decoder(data) or use another Qt API for error reporting). As written, isValidUtf8 is effectively constant and doesn’t help detect bad input.

Comment thread src/netutils.cpp Outdated
Comment on lines +91 to +92
QStringDecoder gbkDecoder("GBK");
return gbkDecoder.decode(data);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: GBK decoder is not checked for validity or given a fallback if the codec is unavailable.

QStringDecoder("GBK") can be invalid if the codec isn’t available, in which case decode() may yield empty or corrupted output. Please guard with gbkDecoder.isValid() and, if false, fall back to a safer alternative such as QString::fromLatin1(data) or returning the UTF‑8 result instead.

@caixr23 caixr23 force-pushed the master branch 2 times, most recently from 413cf23 to ff6e6c5 Compare April 23, 2026 06:08
1. Add decodeByteArray() utility function to handle mixed GBK and UTF-8
encoded SSIDs
2. Replace direct ssid() calls with decodeByteArray(rawSsid()) in
NetworkManager backend
3. Update copyright years to 2026 in affected files
4. Fix potential SSID mismatch issues when comparing wireless settings
with network SSIDs

The NetworkManager Qt API's ssid() method may return incorrectly decoded
strings when
access points use GBK encoding (common with Chinese routers). This
change introduces
intelligent encoding detection that tries UTF-8 first, then falls back
to GBK if
invalid characters are detected, ensuring proper display and matching
of SSIDs
with non-ASCII characters.

Influence:
1. Test WiFi scanning with access points using Chinese SSID names (GBK
encoded)
2. Test WiFi scanning with access points using UTF-8 encoded SSIDs
3. Verify SSID matching for saved connections with non-ASCII characters
4. Test hidden network detection with various SSID encodings
5. Verify active connection status display shows correct SSID names
6. Test hotspot functionality with non-ASCII SSID names

fix: 修复 SSID 编码问题,支持 GBK/UTF-8 自动检测

1. 添加 decodeByteArray() 工具函数处理混合 GBK 和 UTF-8 编码的 SSID
2. 在 NetworkManager 后端中将直接调用 ssid() 替换为
decodeByteArray(rawSsid())
3. 更新受影响文件的版权年份至 2026
4. 修复无线设置与网络 SSID 比较时可能出现的编码不匹配问题

NetworkManager Qt API 的 ssid() 方法在接入点使用 GBK 编码时(常见于中文
路由器)
可能返回错误解码的字符串。此变更引入智能编码检测,优先尝试 UTF-8 解码,
检测到无效字符时回退到 GBK 解码,确保非 ASCII 字符的 SSID 正确显示和
匹配。

Influence:
1. 测试使用中文 SSID 名称(GBK 编码)的 WiFi 扫描功能
2. 测试使用 UTF-8 编码 SSID 的 WiFi 扫描功能
3. 验证非 ASCII 字符的已保存连接 SSID 匹配功能
4. 测试各种 SSID 编码下的隐藏网络检测功能
5. 验证活动连接状态显示正确的 SSID 名称
6. 测试使用非 ASCII SSID 名称的热点功能

PMS: BUG-357843
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

这段代码主要针对无线网络SSID的显示进行了改进,从直接使用NetworkManager返回的字符串改为手动解码原始字节数组,以支持非UTF-8编码(如GBK)的SSID。

以下是对代码的详细审查意见:

1. 语法逻辑

  • 版权年份更新:多处文件将版权年份从 2023 更新至 2026。这是常规操作,但需确认是否所有相关文件均已更新,且是否确实需要延长至2026年。
  • 成员变量初始化与更新
    • AccessPointProxyNM 类中引入了 m_ssid 成员变量,并在构造函数和 updateNetwork 中调用 updateSsid() 进行初始化和更新。逻辑正确,确保了 m_ssidm_network 的状态同步。
    • ssid() getter 方法现在返回 m_ssid,这要求在任何可能改变底层网络对象的路径上都必须调用 updateSsid()。目前代码在构造函数和 updateNetwork 中已添加,逻辑闭环。
  • 解码逻辑
    • 新增的 decodeByteArray 函数逻辑清晰:先尝试UTF-8解码,如果发现替换字符(通常表示解码失败),则回退到GBK解码。这是处理中文SSID常见乱码问题的标准做法。

2. 代码质量

  • 代码复用:通过提取 decodeByteArray 函数到 netutils.cpp,并在 AccessPointProxyNMWirelessDeviceManagerRealizeNetworkDetailNMRealize 中复用,减少了重复代码,提高了可维护性。
  • 空指针检查
    • AccessPointProxyNM::updateSsid() 中:m_network && m_network->referenceAccessPoint()。这是一个很好的防御性编程实践,防止了在信号更新过程中可能出现的空指针崩溃。
    • WirelessDeviceManagerRealize::addNetwork 中:直接调用了 network->referenceAccessPoint()->rawSsid()潜在风险:如果 network 对象存在但其 referenceAccessPoint() 为空(例如网络刚发现但AP尚未完全初始化),这里会导致崩溃。
    • 建议:在 WirelessDeviceManagerRealize::addNetwork 中增加对 referenceAccessPoint() 的空指针检查,或者确保调用 addNetwork 时该指针必定有效。
  • 包含头文件networkdetailnmrealize.cpp 中增加了 #include "netutils.h",这是必要的。

3. 代码性能

  • 字符串拷贝
    • ssid() 现在返回 const QString&(隐式,因为返回的是成员变量)或者按值返回 QString。原代码返回 m_network->ssid() 可能涉及临时对象的构造。新代码返回缓存的 m_ssid,减少了在频繁调用(如UI刷新列表时)时可能的函数调用开销和字符串构造开销。
  • 解码开销
    • decodeByteArray 涉及两次潜在的解码尝试(UTF-8 和 GBK)。虽然字符串解码通常很快,但在SSID频繁变化的场景(如信号弱导致网络列表频繁刷新)下,会有一定的CPU开销。
    • 优化建议:目前的实现是合理的,因为SSID通常不会在毫秒级内变化,且解码开销相比网络IO可以忽略不计。
  • 查找算法
    • WirelessDeviceManagerRealize::addNetwork 中,将 decodeByteArray 的结果提取到 lambda 外部的 ssid 变量中,避免了在 std::find_if 的每次迭代中都重新解码SSID。这是一个很好的性能优化点。

4. 代码安全

  • 编码检测局限性
    • decodeByteArray 依赖 QStringDecoder::Utf8 解码后是否包含 QChar::ReplacementCharacter 来判断是否为UTF-8。风险:如果SSID本身就是合法的UTF-8字符串,但恰好包含替换字符(U+FFFD),它会被错误地识别为非UTF-8,进而尝试GBK解码,导致显示错误。
    • 改进建议:这种情况极其罕见,但在高安全性要求下,可以考虑更复杂的编码检测算法(如检查字节序列的有效性),或者接受这种极低概率的边缘情况。
  • GBK解码有效性检查
    • 代码中检查了 gbkDecoder.isValid(),这是很好的做法,防止在不支持GBK的系统上(如某些精简Linux发行版)调用解码导致未定义行为。

总结与改进建议

总体评价
该改动有效地解决了中文SSID显示乱码的问题,代码结构清晰,逻辑正确。通过缓存SSID和提取公共解码函数,提升了代码质量和部分性能。

具体改进建议

  1. 增强空指针安全
    src/impl/networkmanager/devicemanagerrealize.cppaddNetwork 方法中:

    // 建议修改前
    QString ssid = decodeByteArray(network->referenceAccessPoint()->rawSsid());
    
    // 建议修改后
    auto ap = network->referenceAccessPoint();
    if (!ap) {
        qCWarning(DNC) << "Reference access point is null in addNetwork";
        return; // 或者进行其他错误处理
    }
    QString ssid = decodeByteArray(ap->rawSsid());
  2. 版权年份一致性
    检查项目中其他相关文件,确保版权年份更新的一致性。

  3. 解码逻辑的鲁棒性(可选)
    如果对SSID的准确性要求极高,可以在 decodeByteArray 中增加对GBK解码结果的验证。例如,如果GBK解码后的字符串包含乱码特征(如特定范围的不可见字符),可能需要回退到原始的Latin1解码或其他策略,尽管目前的UTF-8回退GBK策略对于中文环境已经足够优秀。

  4. 线程安全
    AccessPointProxyNM 中的 m_ssid 成员变量被多个函数访问和修改。如果该类的实例可能被多线程访问(例如信号来自NetworkManager的后台线程,而读取在UI线程),需要确保 updateSsid()ssid() 的调用是线程安全的(通常Qt信号槽会自动排队,如果是直接调用则需加锁)。从代码上下文看,这通常是Qt主线程对象,风险较低,但值得注意。

@deepin-bot
Copy link
Copy Markdown
Contributor

deepin-bot Bot commented Apr 23, 2026

TAG Bot

New tag: 2.0.89
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #550

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants