From 97c4c2dc96ab848d44fa3e69cdd04ab81f81adf4 Mon Sep 17 00:00:00 2001 From: Olivier SOLDANO <olivier.soldano@savoirfairelinux.com> Date: Mon, 8 May 2017 13:22:44 -0400 Subject: [PATCH] manage case of no account enabled for searchbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hides the search bar in case of the user has disabled all its accounts to avoid the case that searching anything makes it a SIP contact method. It also clears the ID field displayed in the welcome page. Change-Id: I86e299a7dc35f65f8dc05761cd1afecb3f9d84c2 Reviewed-by: Anthony LĂ©onard <anthony.leonard@savoirfairelinux.com> --- callwidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/callwidget.cpp b/callwidget.cpp index 9806284..9c63093 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -690,6 +690,9 @@ CallWidget::selectedAccountChanged(const QModelIndex ¤t, const QModelIndex Q_UNUSED(previous) if (current.isValid()) { + if (ui->selectBar->isHidden()){ + ui->selectBar->show(); + } auto ac = current.data(static_cast<int>(Account::Role::Object)).value<Account*>(); // First, we get back to the welcome view (except if in call) @@ -729,6 +732,9 @@ CallWidget::selectedAccountChanged(const QModelIndex ¤t, const QModelIndex // keep call on foreground callStateToView(actualCall_); } + } else { + ui->selectBar->hide(); + ui->ringIdLabel->setText(""); } } -- GitLab