From ca560bb9327ef217f95b591abae7a1e507b1cb9e Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> Date: Fri, 20 Mar 2015 15:07:57 -0400 Subject: [PATCH] iax: Disable IAX account creation Refs #68848 --- src/protocolmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocolmodel.cpp b/src/protocolmodel.cpp index 719e3cc1..56b01d98 100644 --- a/src/protocolmodel.cpp +++ b/src/protocolmodel.cpp @@ -111,7 +111,8 @@ Qt::ItemFlags ProtocolModel::flags( const QModelIndex& index ) const //Account type cannot be changed, the daemon doesn't support that and crash //it was considered a client responsibility to disallow it. It is not worth //fixing - return Qt::ItemIsEnabled|Qt::ItemIsSelectable; + return (static_cast<Account::Protocol>(index.row()) == Account::Protocol::IAX ? + Qt::NoItemFlags : (Qt::ItemIsEnabled|Qt::ItemIsSelectable)); } bool ProtocolModel::setData( const QModelIndex& index, const QVariant &value, int role) -- GitLab