|
|
|
|
@ -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(); |
|
|
|
|
|