fix:Address the issue where ownID may not be displayed.

This commit is contained in:
2025-10-21 09:48:20 +08:00
parent 0fb41b7eed
commit 68038b6753
3 changed files with 5 additions and 1 deletions

View File

@@ -33,6 +33,9 @@ void Connecter::RunWorker(ClientCore* clientCore)
qInfo() << QString(tr("Connected."));
});
connect(clientCore_, &ClientCore::sigYourId, this,
[this](QSharedPointer<FrameBuffer> frame) { ui->edOwnID->setText(frame->data); });
connect(clientCore_, &ClientCore::conFailed, this, [this]() {
setState(ConnectState::CS_DISCONNECT);
qInfo() << QString(tr("Connect failed."));
@@ -121,7 +124,6 @@ void Connecter::setState(ConnectState cs)
ui->btnConnect->setEnabled(false);
ui->btnDisconnect->setEnabled(true);
RefreshClient();
ui->edOwnID->setText(GlobalData::Ins()->GetLocalID());
connect(heatBeat_, &HeatBeat::finished, heatBeat_, &QObject::deleteLater);
break;
case CS_DISCONNECT: