void EmailAccountListModel::onAccountContentsModified(const QMailAccountIdList &ids)
{
    int count = numberOfAccounts();
    for (int i = 0; i < count; ++i) {
        QMailAccountId tmpAccountId(accountId(i));
        if (ids.contains(tmpAccountId)) {
            dataChanged(index(i), index(i), QVector<int>() << UnreadCount);
        }
    }
}
void SmtpClient::accountsUpdated(const QMailAccountIdList &ids)
{
    if (!ids.contains(account()))
        return;

    QMailAccount acc(account());
    bool isEnabled(acc.status() & QMailAccount::Enabled);
    if (!isEnabled)
        return;
    setAccount(account());
}