Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/widgets/kmymoneyaccountselector.cpp
Show First 20 Lines • Show All 565 Lines • ▼ Show 20 Line(s) | |||||
566 | } | 566 | } | ||
567 | 567 | | |||
568 | bool AccountSet::includeAccount(const MyMoneyAccount& acc) | 568 | bool AccountSet::includeAccount(const MyMoneyAccount& acc) | ||
569 | { | 569 | { | ||
570 | Q_D(AccountSet); | 570 | Q_D(AccountSet); | ||
571 | if (d->m_typeList.contains(acc.accountType())) | 571 | if (d->m_typeList.contains(acc.accountType())) | ||
572 | return true; | 572 | return true; | ||
573 | 573 | | |||
574 | QStringList accounts = acc.accountList(); | 574 | foreach (const auto sAccount, acc.accountList()) | ||
575 | 575 | if (includeAccount(d->m_file->account(sAccount))) | |||
576 | if (accounts.size() > 0) { | | |||
577 | QStringList::ConstIterator it_acc; | | |||
578 | for (it_acc = accounts.constBegin(); it_acc != accounts.constEnd(); ++it_acc) { | | |||
579 | MyMoneyAccount account = d->m_file->account(*it_acc); | | |||
580 | if (includeAccount(account)) | | |||
581 | return true; | 576 | return true; | ||
582 | } | 577 | | ||
583 | } | | |||
584 | return false; | 578 | return false; | ||
585 | } | 579 | } |