Show microphone timeout errors in call and radio controls

This commit is contained in:
evgeny committed 2026-10-16 16:49:09 +02:00
1 parent 110af9b0c5
commit 91357ebf90
2 files changed
+11 -2

No files matched your search

+8 -1
View File
@@ -205,6 +205,12 @@ CallWindow::CallWindow(QWidget* parent)
m_statusLabel = new QLabel(this);
m_statusLabel->setAlignment(Qt::AlignCenter);
m_statusLabel->setStyleSheet("color: gray; font-size: 13px;");
m_statusLabel->setWordWrap(true);
connect(CallAudioEngine::instance(), &CallAudioEngine::captureErrorChanged, this, [this] {
auto* audio = CallAudioEngine::instance();
if (m_state == Active && audio->callId() == m_callId)
m_statusLabel->setText(audio->captureError().isEmpty() ? callText("In call") : audio->captureError());
});
m_durationLabel = new QLabel(QStringLiteral("00:00"), this);
m_durationLabel->setAlignment(Qt::AlignCenter);
@@ -393,7 +399,8 @@ void CallWindow::setState(State s) {
m_durationLabel->hide();
break;
case Active:
m_statusLabel->setText(QCoreApplication::translate("ChatGui", "In call"));
m_statusLabel->setText(CallAudioEngine::instance()->captureError().isEmpty()
? callText("In call") : CallAudioEngine::instance()->captureError());
m_durationLabel->setText(QStringLiteral("00:00"));
m_durationLabel->show();
m_startMs = QDateTime::currentMSecsSinceEpoch();