diff --git a/kmymoney/widgets/transaction.cpp b/kmymoney/widgets/transaction.cpp --- a/kmymoney/widgets/transaction.cpp +++ b/kmymoney/widgets/transaction.cpp @@ -690,6 +690,20 @@ } } const MyMoneyAccount& acc = file->account((*it_s).accountId()); + // search for account hierachy + if (filter.text.contains(MyMoneyFile::AccountSeparator)) { + QStringList names; + MyMoneyAccount current = acc; + QString accountId; + do { + names.prepend(current.name()); + accountId = current.parentAccountId(); + current = file->account(accountId); + } while (current.accountType() != MyMoneyAccount::UnknownAccountType && !MyMoneyFile::instance()->isStandardAccount(accountId)); + if (names.size() > 1 && names.join(MyMoneyFile::AccountSeparator).contains(filter.text, Qt::CaseInsensitive)) + return true; + } + if (acc.name().contains(filter.text, Qt::CaseInsensitive)) return true;