feat(production): 修改订单清除按钮功能---除了清除报警、也复位状态,让订单能继续执行

This commit is contained in:
lidg
2026-11-09 11:05:12 +08:00
parent 6a70f1943f
commit 0ed952f917
15 changed files with 691 additions and 49 deletions
+8 -3
View File
@@ -397,9 +397,14 @@ void ModbusTcpManager::abortAll(const QString &reason)
}
}
if (m_client
&& m_client->state() != QModbusDevice::UnconnectedState) {
m_client->disconnectDevice();
if (m_client) {
// disconnectDevice completes asynchronously. A new request must not
// reuse this client while its previous socket is still closing.
QModbusTcpClient *client = m_client;
m_client = nullptr;
client->disconnect(this);
client->disconnectDevice();
client->deleteLater();
}
m_aborting = false;