Fix bad connect/disconnects.

This commit is contained in:
Christian Kamm 2015-04-23 14:24:54 +02:00
parent 8390b0b930
commit 3cc2e1a968

View file

@ -212,10 +212,12 @@ void Application::slotLogout()
void Application::slotAccountStateRemoved(AccountState *accountState) void Application::slotAccountStateRemoved(AccountState *accountState)
{ {
disconnect(accountState, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
disconnect(accountState, SIGNAL(stateChanged(int)), this, SLOT(slotAccountStateChanged(int))); disconnect(accountState, SIGNAL(stateChanged(int)), this, SLOT(slotAccountStateChanged(int)));
connect(accountState->quotaInfo(), SIGNAL(quotaUpdated(qint64,qint64)), if (_gui) {
_gui, SLOT(slotRefreshQuotaDisplay(qint64,qint64))); disconnect(accountState, SIGNAL(stateChanged(int)), _gui, SLOT(slotAccountStateChanged()));
disconnect(accountState->quotaInfo(), SIGNAL(quotaUpdated(qint64,qint64)),
_gui, SLOT(slotRefreshQuotaDisplay(qint64,qint64)));
}
} }
void Application::slotAccountStateAdded(AccountState *accountState) void Application::slotAccountStateAdded(AccountState *accountState)