From 07de7b693b65b4250f2a5b54f536505c562c25f6 Mon Sep 17 00:00:00 2001
From: Emmanuel Lepage Vallee <elv1313@gmail.com>
Date: Mon, 8 Jun 2015 12:21:22 -0400
Subject: [PATCH] account: A connection to &Account::enabled was missing

Refs #74958

Change-Id: Ic0715a8c04a05da276e2be8cb2c71f9ba7891f0f
---
 src/accountmodel.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/accountmodel.cpp b/src/accountmodel.cpp
index b5ba7373..08fdbced 100644
--- a/src/accountmodel.cpp
+++ b/src/accountmodel.cpp
@@ -175,10 +175,8 @@ Account* AccountModel::ip2ip() const
 {
    if (!d_ptr->m_pIP2IP) {
       foreach(Account* a, d_ptr->m_lAccounts) {
-         if (a->id() == DRing::Account::ProtocolNames::IP2IP) {
+         if (a->id() == DRing::Account::ProtocolNames::IP2IP)
             d_ptr->m_pIP2IP = a;
-            connect(a, &Account::enabled, d_ptr, &AccountModelPrivate::slotSupportedProtocolsChanged);
-         }
       }
    }
    return d_ptr->m_pIP2IP;
@@ -260,8 +258,9 @@ void AccountModelPrivate::slotDaemonAccountChanged(const QString& account, const
          if ((!q_ptr->getById(accountIds[i].toLatin1())) && m_lDeletedAccounts.indexOf(accountIds[i]) == -1) {
             Account* acc = AccountPrivate::buildExistingAccountFromId(accountIds[i].toLatin1());
             insertAccount(acc,i);
-            connect(acc,SIGNAL(changed(Account*)),this,SLOT(slotAccountChanged(Account*)));
-            connect(acc,SIGNAL(presenceEnabledChanged(bool)),this,SLOT(slotAccountPresenceEnabledChanged(bool)));
+            connect(acc, &Account::changed                , this, &AccountModelPrivate::slotAccountChanged                );
+            connect(acc, &Account::presenceEnabledChanged , this, &AccountModelPrivate::slotAccountPresenceEnabledChanged );
+            connect(acc, &Account::enabled                , this, &AccountModelPrivate::slotSupportedProtocolsChanged     );
             emit q_ptr->dataChanged(q_ptr->index(i,0),q_ptr->index(q_ptr->size()-1));
             emit q_ptr->layoutChanged();
 
-- 
GitLab