From f25d3bd36c3869f4ccfc9722623c4d88076d6b7d Mon Sep 17 00:00:00 2001 From: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com> Date: Thu, 4 Jun 2015 10:23:24 -0400 Subject: [PATCH] display call state with toHumanStateName from LRC instead of having a map of states in each client Refs #74722 Change-Id: Ia43d2f77723cbfbe7a97a02c02bf16b95a53649b --- callwidget.cpp | 2 +- callwidget.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/callwidget.cpp b/callwidget.cpp index deed297..769b8b4 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -224,7 +224,7 @@ CallWidget::callStateChanged(Call* call, Call::State previousState) } else if (call->state() == Call::State::CURRENT) { ui->videoWidget->show(); } - ui->callStateLabel->setText("Call State : " + state.at((int)call->state())); + ui->callStateLabel->setText("Call State : " + call->toHumanStateName()); } void diff --git a/callwidget.h b/callwidget.h index 41bd1db..27f4c07 100644 --- a/callwidget.h +++ b/callwidget.h @@ -40,12 +40,6 @@ class CallWidget : public NavWidget { Q_OBJECT - const QVector<QString> state = {"New", "Incoming", "Ringing", "Current", - "Dialing", "Hold", "Failure", "Busy", - "Transferred", "Transfer hold", "Over", - "Error", "Conference", - "Conference Hold", "Initialization", - "Aborted", "Connected"}; public: explicit CallWidget(QWidget *parent = 0); ~CallWidget(); -- GitLab