From 6a75a4634cfdf0632179a2beec8b1466f3331f0b Mon Sep 17 00:00:00 2001 From: caixiangrong Date: Wed, 10 Jun 2026 13:59:26 +0800 Subject: [PATCH] fix: call init() synchronously in DccNetwork constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Replace QMetaObject::invokeMethod with direct init() call to prevent potential crash caused by deferred initialization PMS: TASK-390967 fix: 在 DccNetwork 构造函数中同步调用 init() 1. 将 QMetaObject::invokeMethod 替换为直接调用 init(), 避免延迟初始化导致的潜在崩溃 PMS: TASK-390967 --- dcc-network/operation/dccnetwork.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dcc-network/operation/dccnetwork.cpp b/dcc-network/operation/dccnetwork.cpp index 887dbb06..4fc7446b 100644 --- a/dcc-network/operation/dccnetwork.cpp +++ b/dcc-network/operation/dccnetwork.cpp @@ -30,7 +30,7 @@ DccNetwork::DccNetwork(QObject *parent) qmlRegisterType("org.deepin.dcc.network", 1, 0, "NetType"); qmlRegisterType("org.deepin.dcc.network", 1, 0, "NetItemModel"); qmlRegisterType("org.deepin.dcc.network", 1, 0, "NetManager"); - QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection); + init(); } DccNetwork::~DccNetwork()