summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneytransactionfilter.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit7e51b6d5ddc01fc3bc69f30bc5d3933a7709dbf2 (patch)
tree6a288b084438ed144c0fbd4a34a9a22caf4d6b04 /kmymoney2/mymoney/mymoneytransactionfilter.cpp
parent154e6e6105157c321cbd578d238c525da419f868 (diff)
downloadkmymoney-7e51b6d5ddc01fc3bc69f30bc5d3933a7709dbf2.tar.gz
kmymoney-7e51b6d5ddc01fc3bc69f30bc5d3933a7709dbf2.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/mymoney/mymoneytransactionfilter.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneytransactionfilter.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.cpp b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
index d6f4b6a..7998051 100644
--- a/kmymoney2/mymoney/mymoneytransactionfilter.cpp
+++ b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
@@ -95,7 +95,7 @@ void MyMoneyTransactionFilter::addAccount(const TQStringList& ids)
void MyMoneyTransactionFilter::addAccount(const TQString& id)
{
if(!m_accounts.isEmpty() && !id.isEmpty()) {
- if(m_accounts.tqfind(id) != 0)
+ if(m_accounts.find(id) != 0)
return;
}
if(m_accounts.count() >= m_accounts.size()*2) {
@@ -118,7 +118,7 @@ void MyMoneyTransactionFilter::addCategory(const TQStringList& ids)
void MyMoneyTransactionFilter::addCategory(const TQString& id)
{
if(!m_categories.isEmpty() && !id.isEmpty()) {
- if(m_categories.tqfind(id) != 0)
+ if(m_categories.find(id) != 0)
return;
}
if(m_categories.count() >= m_categories.size()*2) {
@@ -153,7 +153,7 @@ void MyMoneyTransactionFilter::setAmountFilter(const MyMoneyMoney& from, const M
void MyMoneyTransactionFilter::addPayee(const TQString& id)
{
if(!m_payees.isEmpty() && !id.isEmpty()) {
- if(m_payees.tqfind(id) != 0)
+ if(m_payees.find(id) != 0)
return;
}
if(m_payees.count() >= m_payees.size()*2) {
@@ -167,7 +167,7 @@ void MyMoneyTransactionFilter::addPayee(const TQString& id)
void MyMoneyTransactionFilter::addType(const int type)
{
if(!m_types.isEmpty()) {
- if(m_types.tqfind(type) != 0)
+ if(m_types.find(type) != 0)
return;
}
// we don't have more than 4 or 5 types, so we don't worry about
@@ -179,7 +179,7 @@ void MyMoneyTransactionFilter::addType(const int type)
void MyMoneyTransactionFilter::addState(const int state)
{
if(!m_states.isEmpty()) {
- if(m_states.tqfind(state) != 0)
+ if(m_states.find(state) != 0)
return;
}
// we don't have more than 4 or 5 states, so we don't worry about
@@ -191,7 +191,7 @@ void MyMoneyTransactionFilter::addState(const int state)
void MyMoneyTransactionFilter::addValidity(const int type)
{
if(!m_validity.isEmpty()) {
- if(m_validity.tqfind(type) != 0)
+ if(m_validity.find(type) != 0)
return;
}
// we don't have more than 4 or 5 states, so we don't worry about
@@ -230,18 +230,18 @@ bool MyMoneyTransactionFilter::matchText(const MyMoneySplit * const sp) const
MyMoneyFile* file = MyMoneyFile::instance();
const MyMoneyAccount& acc = file->account(sp->accountId());
const MyMoneySecurity& sec = file->security(acc.currencyId());
- if(sp->memo().tqcontains(m_text)
- || sp->shares().formatMoney(acc.fraction(sec)).tqcontains(m_text)
- || sp->value().formatMoney(acc.fraction(sec)).tqcontains(m_text)
- || sp->number().tqcontains(m_text))
+ if(sp->memo().contains(m_text)
+ || sp->shares().formatMoney(acc.fraction(sec)).contains(m_text)
+ || sp->value().formatMoney(acc.fraction(sec)).contains(m_text)
+ || sp->number().contains(m_text))
return !m_invertText;
- if(acc.name().tqcontains(m_text))
+ if(acc.name().contains(m_text))
return !m_invertText;
if(!sp->payeeId().isEmpty()) {
const MyMoneyPayee& payee = file->payee(sp->payeeId());
- if(payee.name().tqcontains(m_text))
+ if(payee.name().contains(m_text))
return !m_invertText;
}
return m_invertText;
@@ -312,7 +312,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the transaction's validity
if(m_filterSet.singleFilter.validityFilter) {
if(m_validity.count() > 0) {
- if(!m_validity.tqfind(validTransaction(transaction)))
+ if(!m_validity.find(validTransaction(transaction)))
return false;
}
}
@@ -332,7 +332,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check if the split references one of the categories in the list
if(m_filterSet.singleFilter.categoryFilter) {
if(m_categories.count() > 0) {
- if(m_categories.tqfind(sp->accountId())) {
+ if(m_categories.find(sp->accountId())) {
categoryMatched = true;
removeSplit = 0;
}
@@ -347,7 +347,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check if the split references one of the accounts in the list
if(m_filterSet.singleFilter.accountFilter) {
if(m_accounts.count() > 0) {
- if(m_accounts.tqfind(sp->accountId())) {
+ if(m_accounts.find(sp->accountId())) {
accountMatched = true;
removeSplit = 0;
}
@@ -361,7 +361,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
} else {
if(m_filterSet.singleFilter.accountFilter) {
if(m_accounts.count() > 0) {
- if(m_accounts.tqfind(sp->accountId())) {
+ if(m_accounts.find(sp->accountId())) {
accountMatched = true;
removeSplit = 0;
}
@@ -420,7 +420,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the payee list
if(!removeSplit && m_filterSet.singleFilter.payeeFilter) {
if(m_payees.count() > 0) {
- if(sp->payeeId().isEmpty() || !m_payees.tqfind(sp->payeeId()))
+ if(sp->payeeId().isEmpty() || !m_payees.find(sp->payeeId()))
removeSplit = sp;
} else if(!sp->payeeId().isEmpty())
removeSplit = sp;
@@ -429,7 +429,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the type list
if(!removeSplit && m_filterSet.singleFilter.typeFilter) {
if(m_types.count() > 0) {
- if(!m_types.tqfind(splitType(transaction, *sp)))
+ if(!m_types.find(splitType(transaction, *sp)))
removeSplit = sp;
}
}
@@ -437,7 +437,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction)
// check the state list
if(!removeSplit && m_filterSet.singleFilter.stateFilter) {
if(m_states.count() > 0) {
- if(!m_states.tqfind(splitState(*sp)))
+ if(!m_states.find(splitState(*sp)))
removeSplit = sp;
}
}
@@ -544,17 +544,17 @@ MyMoneyTransactionFilter::validityOptionE MyMoneyTransactionFilter::validTransac
bool MyMoneyTransactionFilter::includesCategory( const TQString& cat ) const
{
- return (! m_filterSet.singleFilter.categoryFilter) || m_categories.tqfind( cat );
+ return (! m_filterSet.singleFilter.categoryFilter) || m_categories.find( cat );
}
bool MyMoneyTransactionFilter::includesAccount( const TQString& acc ) const
{
- return (! m_filterSet.singleFilter.accountFilter) || m_accounts.tqfind( acc );
+ return (! m_filterSet.singleFilter.accountFilter) || m_accounts.find( acc );
}
bool MyMoneyTransactionFilter::includesPayee( const TQString& pye ) const
{
- return (! m_filterSet.singleFilter.payeeFilter) || m_payees.tqfind( pye );
+ return (! m_filterSet.singleFilter.payeeFilter) || m_payees.find( pye );
}
bool MyMoneyTransactionFilter::dateFilter( TQDate& from, TQDate& to ) const
@@ -844,13 +844,13 @@ bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, TQDate& start,
void MyMoneyTransactionFilter::removeReference(const TQString& id)
{
- if(m_accounts.tqfind(id)) {
+ if(m_accounts.find(id)) {
qDebug("%s", (TQString("Remove account '%1' from report").tqarg(id)).data());
m_accounts.remove(id);
- } else if(m_categories.tqfind(id)) {
+ } else if(m_categories.find(id)) {
qDebug("%s", (TQString("Remove category '%1' from report").tqarg(id)).data());
m_categories.remove(id);
- } else if(m_payees.tqfind(id)) {
+ } else if(m_payees.find(id)) {
qDebug("%s", (TQString("Remove payee '%1' from report").tqarg(id)).data());
m_payees.remove(id);
}