summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney
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
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')
-rw-r--r--kmymoney2/mymoney/mymoneyaccount.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneybudget.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneybudget.h2
-rw-r--r--kmymoney2/mymoney/mymoneycategory.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyfile.cpp32
-rw-r--r--kmymoney2/mymoney/mymoneyforecast.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyforecasttest.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneyinstitution.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneyinstitutiontest.cpp10
-rw-r--r--kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneymoney.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneyobjectcontainer.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyreport.cpp36
-rw-r--r--kmymoney2/mymoney/mymoneyreport.h2
-rw-r--r--kmymoney2/mymoney/mymoneyscheduled.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneysecuritytest.cpp10
-rw-r--r--kmymoney2/mymoney/mymoneysplit.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneystatement.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneysubject.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneytransaction.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneytransactionfilter.cpp50
-rw-r--r--kmymoney2/mymoney/mymoneyutils.cpp8
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp84
-rw-r--r--kmymoney2/mymoney/storage/mymoneymap.h10
-rw-r--r--kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp108
-rw-r--r--kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h2
-rw-r--r--kmymoney2/mymoney/storage/mymoneystorageanon.cpp6
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragesql.cpp84
28 files changed, 259 insertions, 259 deletions
diff --git a/kmymoney2/mymoney/mymoneyaccount.cpp b/kmymoney2/mymoney/mymoneyaccount.cpp
index 001d17c..b41e04a 100644
--- a/kmymoney2/mymoney/mymoneyaccount.cpp
+++ b/kmymoney2/mymoney/mymoneyaccount.cpp
@@ -180,7 +180,7 @@ void MyMoneyAccount::setAccountType(const accountTypeE type)
void MyMoneyAccount::addAccountId(const TQString& account)
{
- if(!m_accountList.tqcontains(account))
+ if(!m_accountList.contains(account))
m_accountList += account;
}
@@ -193,7 +193,7 @@ void MyMoneyAccount::removeAccountId(const TQString& account)
{
TQStringList::Iterator it;
- it = m_accountList.tqfind(account);
+ it = m_accountList.find(account);
if(it != m_accountList.end())
m_accountList.remove(it);
}
diff --git a/kmymoney2/mymoney/mymoneybudget.cpp b/kmymoney2/mymoney/mymoneybudget.cpp
index 3cb7793..55cd6cc 100644
--- a/kmymoney2/mymoney/mymoneybudget.cpp
+++ b/kmymoney2/mymoney/mymoneybudget.cpp
@@ -255,7 +255,7 @@ bool MyMoneyBudget::read(const TQDomElement& e)
account.setId(c.attribute("id"));
if(c.hasAttribute("budgetlevel")) {
- int i = AccountGroup::kBudgetLevelText.tqfindIndex(c.attribute("budgetlevel"));
+ int i = AccountGroup::kBudgetLevelText.findIndex(c.attribute("budgetlevel"));
if ( i != -1 )
account.setBudgetLevel(static_cast<AccountGroup::eBudgetLevel>(i));
}
@@ -299,12 +299,12 @@ void MyMoneyBudget::writeXML(TQDomDocument& document, TQDomElement& tqparent) co
bool MyMoneyBudget::hasReferenceTo(const TQString& id) const
{
// return true if we have an assignment for this id
- return (m_accounts.tqcontains(id));
+ return (m_accounts.contains(id));
}
void MyMoneyBudget::removeReference(const TQString& id)
{
- if(m_accounts.tqcontains(id)) {
+ if(m_accounts.contains(id)) {
m_accounts.remove(id);
}
}
@@ -326,7 +326,7 @@ const MyMoneyBudget::AccountGroup& MyMoneyBudget::account(const TQString _id) co
{
static AccountGroup empty;
- if ( m_accounts.tqcontains(_id) )
+ if ( m_accounts.contains(_id) )
return m_accounts[_id];
return empty;
}
diff --git a/kmymoney2/mymoney/mymoneybudget.h b/kmymoney2/mymoney/mymoneybudget.h
index e7e44b4..deb9b19 100644
--- a/kmymoney2/mymoney/mymoneybudget.h
+++ b/kmymoney2/mymoney/mymoneybudget.h
@@ -188,7 +188,7 @@ public:
const TQDate& budgetStart(void) const { return m_start; }
TQString id(void) const { return m_id; }
const AccountGroup & account(const TQString _id) const;
- bool tqcontains(const TQString _id) const { return m_accounts.tqcontains(_id); }
+ bool contains(const TQString _id) const { return m_accounts.contains(_id); }
TQValueList<AccountGroup> getaccounts(void) const { return m_accounts.values(); }
// Simple set operations
diff --git a/kmymoney2/mymoney/mymoneycategory.cpp b/kmymoney2/mymoney/mymoneycategory.cpp
index 8717237..9a51b53 100644
--- a/kmymoney2/mymoney/mymoneycategory.cpp
+++ b/kmymoney2/mymoney/mymoneycategory.cpp
@@ -44,7 +44,7 @@ bool MyMoneyCategory::addMinorCategory(const TQString val)
if (val.isEmpty() || val.isNull())
return false;
- if (m_minorCategories.tqfind(val) == m_minorCategories.end()) {
+ if (m_minorCategories.find(val) == m_minorCategories.end()) {
m_minorCategories.append(val);
return true;
}
@@ -57,7 +57,7 @@ bool MyMoneyCategory::removeMinorCategory(const TQString val)
if (val.isEmpty() || val.isNull())
return false;
- if (m_minorCategories.tqfind(val) != m_minorCategories.end()) {
+ if (m_minorCategories.find(val) != m_minorCategories.end()) {
m_minorCategories.remove(val);
return true;
}
@@ -70,8 +70,8 @@ bool MyMoneyCategory::renameMinorCategory(const TQString oldVal, const TQString
if (oldVal.isEmpty() || oldVal.isNull() || newVal.isEmpty() || newVal.isNull())
return false;
- if (m_minorCategories.tqfind(oldVal) != m_minorCategories.end() &&
- m_minorCategories.tqfind(newVal) == m_minorCategories.end() ) {
+ if (m_minorCategories.find(oldVal) != m_minorCategories.end() &&
+ m_minorCategories.find(newVal) == m_minorCategories.end() ) {
m_minorCategories.remove(oldVal);
return addMinorCategory(newVal);
diff --git a/kmymoney2/mymoney/mymoneyfile.cpp b/kmymoney2/mymoney/mymoneyfile.cpp
index 0e1a098..4b354ef 100644
--- a/kmymoney2/mymoney/mymoneyfile.cpp
+++ b/kmymoney2/mymoney/mymoneyfile.cpp
@@ -956,7 +956,7 @@ void MyMoneyFile::accountList(TQValueList<MyMoneyAccount>& list, const TQStringL
for(it = list_a.begin(); it != list_a.end(); ++it) {
if(!isStandardAccount((*it).id())) {
- if(idlist.tqfindIndex((*it).id()) != -1) {
+ if(idlist.findIndex((*it).id()) != -1) {
list.append(*it);
if(recursive == true) {
accountList(list, (*it).accountList(), true);
@@ -1422,9 +1422,9 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
rc << i18n(" * Loop detected between this account and account '%2'.").tqarg((*it_b).name());
rc << i18n(" Reparenting account '%2' to top level account '%1'.").tqarg(toplevel.name(), (*it_a).name());
(*it_a).setParentAccountId(toplevel.id());
- if(accountRebuild.tqcontains(toplevel.id()) == 0)
+ if(accountRebuild.contains(toplevel.id()) == 0)
accountRebuild << toplevel.id();
- if(accountRebuild.tqcontains((*it_a).id()) == 0)
+ if(accountRebuild.contains((*it_a).id()) == 0)
accountRebuild << (*it_a).id();
dropOut = true;
break;
@@ -1459,11 +1459,11 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
// make sure to rebuild the sub-accounts of the top account
// and the one we removed this account from
- if(accountRebuild.tqcontains(toplevel.id()) == 0)
+ if(accountRebuild.contains(toplevel.id()) == 0)
accountRebuild << toplevel.id();
- if(accountRebuild.tqcontains(tqparent.id()) == 0)
+ if(accountRebuild.contains(tqparent.id()) == 0)
accountRebuild << tqparent.id();
- } else if(!tqparent.accountList().tqcontains((*it_a).id())) {
+ } else if(!tqparent.accountList().contains((*it_a).id())) {
problemCount++;
if(problemAccount != (*it_a).name()) {
problemAccount = (*it_a).name();
@@ -1471,7 +1471,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
}
// tqparent exists, but does not have a reference to the account
rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").tqarg(tqparent.name(), problemAccount);
- if(accountRebuild.tqcontains(tqparent.id()) == 0)
+ if(accountRebuild.contains(tqparent.id()) == 0)
accountRebuild << tqparent.id();
}
} catch(MyMoneyException *e) {
@@ -1491,7 +1491,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
addNotification((*it_a).id());
// make sure to rebuild the sub-accounts of the top account
- if(accountRebuild.tqcontains(toplevel.id()) == 0)
+ if(accountRebuild.contains(toplevel.id()) == 0)
accountRebuild << toplevel.id();
}
@@ -1508,7 +1508,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
}
rc << i18n(" * Child account with id %1 does not exist anymore.").tqarg(*it_c);
rc << i18n(" The child account list will be reconstructed.");
- if(accountRebuild.tqcontains((*it_a).id()) == 0)
+ if(accountRebuild.contains((*it_a).id()) == 0)
accountRebuild << (*it_a).id();
}
}
@@ -1539,7 +1539,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
// clear the affected lists
for(it_a = list.begin(); it_a != list.end(); ++it_a) {
- if(accountRebuild.tqcontains((*it_a).id())) {
+ if(accountRebuild.contains((*it_a).id())) {
rc << TQString(" %1").tqarg((*it_a).name());
// clear the account list
for(it_c = (*it_a).accountList().begin(); it_c != (*it_a).accountList().end();) {
@@ -1553,7 +1553,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
for(it_a = list.begin(); it_a != list.end(); ++it_a) {
TQValueList<MyMoneyAccount>::Iterator it;
parentId = (*it_a).parentAccountId();
- if(accountRebuild.tqcontains(parentId)) {
+ if(accountRebuild.contains(parentId)) {
for(it = list.begin(); it != list.end(); ++it) {
if((*it).id() == parentId) {
(*it).addAccountId((*it_a).id());
@@ -1565,7 +1565,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
// update the engine objects
for(it_a = list.begin(); it_a != list.end(); ++it_a) {
- if(accountRebuild.tqcontains((*it_a).id())) {
+ if(accountRebuild.contains((*it_a).id())) {
try {
m_storage->modifyAccount(*it_a, true);
addNotification((*it_a).id());
@@ -1615,7 +1615,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) {
bool sChanged = false;
MyMoneySplit s = (*it_s);
- if(payeeConversionMap.tqfind((*it_s).payeeId()) != payeeConversionMap.end()) {
+ if(payeeConversionMap.find((*it_s).payeeId()) != payeeConversionMap.end()) {
s.setPayeeId(payeeConversionMap[s.payeeId()]);
sChanged = true;
rc << i18n(" * Payee id updated in split of transaction '%1'.").tqarg(t.id());
@@ -1647,7 +1647,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
}
// make sure the interest splits are marked correct as such
- if(interestAccounts.tqfind(s.accountId()) != interestAccounts.end()
+ if(interestAccounts.find(s.accountId()) != interestAccounts.end()
&& s.action() != MyMoneySplit::ActionInterest) {
s.setAction(MyMoneySplit::ActionInterest);
sChanged = true;
@@ -1675,7 +1675,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) {
MyMoneySplit s = (*it_s);
bool sChanged = false;
- if(payeeConversionMap.tqfind((*it_s).payeeId()) != payeeConversionMap.end()) {
+ if(payeeConversionMap.find((*it_s).payeeId()) != payeeConversionMap.end()) {
s.setPayeeId(payeeConversionMap[s.payeeId()]);
sChanged = true;
rc << i18n(" * Payee id updated in split of schedule '%1'.").tqarg((*it_sch).name());
@@ -1740,7 +1740,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
(*it_r).payees(pList);
bool rChanged = false;
for(it_p = pList.begin(); it_p != pList.end(); ++it_p) {
- if(payeeConversionMap.tqfind(*it_p) != payeeConversionMap.end()) {
+ if(payeeConversionMap.find(*it_p) != payeeConversionMap.end()) {
rc << i18n(" * Payee id updated in report '%1'.").tqarg((*it_r).name());
++problemCount;
r.removeReference(*it_p);
diff --git a/kmymoney2/mymoney/mymoneyforecast.cpp b/kmymoney2/mymoney/mymoneyforecast.cpp
index e0a79af..4365b47 100644
--- a/kmymoney2/mymoney/mymoneyforecast.cpp
+++ b/kmymoney2/mymoney/mymoneyforecast.cpp
@@ -522,7 +522,7 @@ MyMoneyMoney MyMoneyForecast::forecastBalance(const MyMoneyAccount& acc, TQDate
}
balance = m_accountList[acc.id() ];
- if ( balance.tqcontains ( forecastDate ) )
+ if ( balance.contains ( forecastDate ) )
{ //if the date is not in the forecast, it returns 0
MM_amount = m_accountList[acc.id() ][forecastDate];
}
@@ -631,7 +631,7 @@ void MyMoneyForecast::addFutureTransactions(void)
TQMap<TQString, TQString>::ConstIterator it_n;
for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) {
MyMoneyAccount acc = file->account(*it_n);
- it_a = m_accountList.tqfind(*it_n);
+ it_a = m_accountList.find(*it_n);
s << "\"" << acc.name() << "\",";
for(int i = 0; i < 90; ++i) {
s << "\"" << (*it_a)[i].formatMoney("") << "\",";
@@ -761,7 +761,7 @@ void MyMoneyForecast::addScheduledTransactions (void)
TQMap<TQString, TQString>::ConstIterator it_n;
for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) {
MyMoneyAccount acc = file->account(*it_n);
- it_a = m_accountList.tqfind(*it_n);
+ it_a = m_accountList.find(*it_n);
s << "\"" << acc.name() << "\",";
for(int i = 0; i < 90; ++i) {
s << "\"" << (*it_a)[i].formatMoney("") << "\",";
@@ -989,7 +989,7 @@ void MyMoneyForecast::purgeForecastAccountsList(TQMap<TQString, dailyBalances>&
{
TQMap<TQString, TQString>::Iterator it_n;
for ( it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ) {
- if(!accountList.tqcontains(*it_n)) {
+ if(!accountList.contains(*it_n)) {
m_nameIdx.remove(it_n);
it_n = m_nameIdx.begin();
} else
diff --git a/kmymoney2/mymoney/mymoneyforecasttest.cpp b/kmymoney2/mymoney/mymoneyforecasttest.cpp
index c200a1f..ffcd232 100644
--- a/kmymoney2/mymoney/mymoneyforecasttest.cpp
+++ b/kmymoney2/mymoney/mymoneyforecasttest.cpp
@@ -257,8 +257,8 @@ void MyMoneyForecastTest::testGetForecastAccountList()
b = a.forecastAccountList();
//check that it contains asset account, but not expense accounts
- CPPUNIT_ASSERT(b.tqcontains(a_checking));
- CPPUNIT_ASSERT(!b.tqcontains(a_parent));
+ CPPUNIT_ASSERT(b.contains(a_checking));
+ CPPUNIT_ASSERT(!b.contains(a_parent));
}
diff --git a/kmymoney2/mymoney/mymoneyinstitution.cpp b/kmymoney2/mymoney/mymoneyinstitution.cpp
index 5b3b19e..d66d9df 100644
--- a/kmymoney2/mymoney/mymoneyinstitution.cpp
+++ b/kmymoney2/mymoney/mymoneyinstitution.cpp
@@ -100,7 +100,7 @@ MyMoneyInstitution::~MyMoneyInstitution()
void MyMoneyInstitution::addAccountId(const TQString& account)
{
// only add this account if it is not yet presently in the list
- if(m_accountList.tqcontains(account) == 0)
+ if(m_accountList.contains(account) == 0)
m_accountList.append(account);
}
@@ -109,7 +109,7 @@ TQString MyMoneyInstitution::removeAccountId(const TQString& account)
TQStringList::Iterator pos;
TQString rc;
- pos = m_accountList.tqfind(account);
+ pos = m_accountList.find(account);
if(pos != m_accountList.end()) {
m_accountList.remove(pos);
rc = account;
diff --git a/kmymoney2/mymoney/mymoneyinstitutiontest.cpp b/kmymoney2/mymoney/mymoneyinstitutiontest.cpp
index bf889b0..2e537d0 100644
--- a/kmymoney2/mymoney/mymoneyinstitutiontest.cpp
+++ b/kmymoney2/mymoney/mymoneyinstitutiontest.cpp
@@ -172,26 +172,26 @@ void MyMoneyInstitutionTest::testAccountIDList () {
institution.addAccountId("A000002");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
// adding same account shouldn't make a difference
institution.addAccountId("A000002");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
// now add another account
institution.addAccountId("A000001");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 2);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000001") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000001") == 1);
id = institution.removeAccountId("A000001");
CPPUNIT_ASSERT(id == "A000001");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
}
diff --git a/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp b/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp
index 382893a..9e047d5 100644
--- a/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp
+++ b/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp
@@ -52,7 +52,7 @@ const TQString& MyMoneyKeyValueContainer::value(const TQString& key) const
{
TQMap<TQString, TQString>::ConstIterator it;
- it = m_kvp.tqfind(key);
+ it = m_kvp.find(key);
if(it != m_kvp.end())
return (*it);
return TQString();
@@ -73,7 +73,7 @@ void MyMoneyKeyValueContainer::deletePair(const TQString& key)
{
TQMap<TQString, TQString>::Iterator it;
- it = m_kvp.tqfind(key);
+ it = m_kvp.find(key);
if(it != m_kvp.end())
m_kvp.remove(it);
}
diff --git a/kmymoney2/mymoney/mymoneymoney.cpp b/kmymoney2/mymoney/mymoneymoney.cpp
index ccf1d80..5a8b562 100644
--- a/kmymoney2/mymoney/mymoneymoney.cpp
+++ b/kmymoney2/mymoney/mymoneymoney.cpp
@@ -164,7 +164,7 @@ MyMoneyMoney::MyMoneyMoney(const TQString& pszAmount)
TQRegExp negCharSet(TQString("[%1]").tqarg(negChars));
bool isNegative = false;
- if(res.tqfind(negCharSet) != -1) {
+ if(res.find(negCharSet) != -1) {
isNegative = true;
res.remove(negCharSet);
}
@@ -172,7 +172,7 @@ MyMoneyMoney::MyMoneyMoney(const TQString& pszAmount)
int pos;
// qDebug("3: '%s'", res.data());
- if((pos = res.tqfind(_decimalSeparator)) != -1) {
+ if((pos = res.find(_decimalSeparator)) != -1) {
// make sure, we get the denominator right
m_denom = precToDenom(res.length() - pos - 1);
diff --git a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp
index c842f0d..9b54b1f 100644
--- a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp
+++ b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp
@@ -49,7 +49,7 @@ void MyMoneyObjectContainer::clear(IMyMoneyStorage* storage)
void MyMoneyObjectContainer::clear(const TQString& id)
{
TQMap<TQString, MyMoneyObject const *>::iterator it;
- it = m_map.tqfind(id);
+ it = m_map.find(id);
if(it != m_map.end()) {
delete (*it);
m_map.erase(it);
@@ -92,7 +92,7 @@ const T& MyMoneyObjectContainer::a(const TQString& id) \
if(id.isEmpty()) \
return nullElement; \
TQMap<TQString, MyMoneyObject const *>::const_iterator it; \
- it = m_map.tqfind(id); \
+ it = m_map.find(id); \
if(it == m_map.end()) { \
/* not found, need to load from engine */ \
T x = m_storage->a(id); \
@@ -120,7 +120,7 @@ const MyMoneyAccount& MyMoneyObjectContainer::account(const TQString& id)
if(id.isEmpty())
return nullElement;
TQMap<TQString, MyMoneyObject const *>::iterator it;
- it = m_map.tqfind(id);
+ it = m_map.find(id);
if(it == m_map.end()) {
/* not found, need to load from engine */
MyMoneyAccount x = m_storage->account(id);
@@ -161,7 +161,7 @@ void MyMoneyObjectContainer::refresh(const TQString& id)
return;
TQMap<TQString, MyMoneyObject const *>::const_iterator it;
- it = m_map.tqfind(id);
+ it = m_map.find(id);
if(it != m_map.end()) {
const MyMoneyAccount* account = dynamic_cast<const MyMoneyAccount *>(*it);
const MyMoneyPayee* payee = dynamic_cast<const MyMoneyPayee *>(*it);
diff --git a/kmymoney2/mymoney/mymoneyreport.cpp b/kmymoney2/mymoney/mymoneyreport.cpp
index 4cd667b..4fd4b79 100644
--- a/kmymoney2/mymoney/mymoneyreport.cpp
+++ b/kmymoney2/mymoney/mymoneyreport.cpp
@@ -253,7 +253,7 @@ bool MyMoneyReport::accountGroups(TQValueList<MyMoneyAccount::accountTypeE>& lis
void MyMoneyReport::addAccountGroup ( MyMoneyAccount::accountTypeE type )
{
if ( !m_accountGroups.isEmpty() && type != MyMoneyAccount::UnknownAccountType ) {
- if ( m_accountGroups.tqcontains ( type ) )
+ if ( m_accountGroups.contains ( type ) )
return;
}
m_accountGroupFilter = true;
@@ -265,7 +265,7 @@ bool MyMoneyReport::includesAccountGroup( MyMoneyAccount::accountTypeE type ) co
{
bool result = ( ! m_accountGroupFilter )
|| ( isIncludingTransfers() && m_rowType == MyMoneyReport::eExpenseIncome )
- || m_accountGroups.tqcontains ( type );
+ || m_accountGroups.contains ( type );
return result;
}
@@ -572,11 +572,11 @@ bool MyMoneyReport::read ( const TQDomElement& e )
"REPORT" == e.tagName()
&&
(
- ( e.attribute ( "type" ).tqfind ( "pivottable 1." ) == 0 )
+ ( e.attribute ( "type" ).find ( "pivottable 1." ) == 0 )
||
- ( e.attribute ( "type" ).tqfind ( "querytable 1." ) == 0 )
+ ( e.attribute ( "type" ).find ( "querytable 1." ) == 0 )
||
- ( e.attribute ( "type" ).tqfind ( "infotable 1." ) == 0 )
+ ( e.attribute ( "type" ).find ( "infotable 1." ) == 0 )
)
)
{
@@ -588,11 +588,11 @@ bool MyMoneyReport::read ( const TQDomElement& e )
m_comment = e.attribute ( "comment", "Extremely old report" );
//set report type
- if(!e.attribute ( "type" ).tqfind ( "pivottable" )) {
+ if(!e.attribute ( "type" ).find ( "pivottable" )) {
m_reportType = MyMoneyReport::ePivotTable;
- } else if(!e.attribute ( "type" ).tqfind ( "querytable" )) {
+ } else if(!e.attribute ( "type" ).find ( "querytable" )) {
m_reportType = MyMoneyReport::eQueryTable;
- } else if(!e.attribute ( "type" ).tqfind ( "infotable" )) {
+ } else if(!e.attribute ( "type" ).find ( "infotable" )) {
m_reportType = MyMoneyReport::eInfoTable;
} else {
m_reportType = MyMoneyReport::eNoReport;
@@ -607,7 +607,7 @@ bool MyMoneyReport::read ( const TQDomElement& e )
//check for reports with older settings which didn't have the detail attribute
if ( e.hasAttribute ( "detail" ) )
{
- i = kDetailLevelText.tqfindIndex ( e.attribute ( "detail", "all" ) );
+ i = kDetailLevelText.findIndex ( e.attribute ( "detail", "all" ) );
if ( i != -1 )
m_detailLevel = static_cast<EDetailLevel> ( i );
} else if ( e.attribute ( "showsubaccounts", "0" ).toUInt() ) {
@@ -639,7 +639,7 @@ bool MyMoneyReport::read ( const TQDomElement& e )
//only load chart data if it is a pivot table
if ( m_reportType == ePivotTable ) {
- i = kChartTypeText.tqfindIndex ( e.attribute ( "charttype" ) );
+ i = kChartTypeText.findIndex ( e.attribute ( "charttype" ) );
if ( i != -1 )
m_chartType = static_cast<EChartType> ( i );
@@ -667,13 +667,13 @@ bool MyMoneyReport::read ( const TQDomElement& e )
i = datelockstr.toUInt ( &ok );
if ( !ok )
{
- i = kDateLockText.tqfindIndex ( datelockstr );
+ i = kDateLockText.findIndex ( datelockstr );
if ( i == -1 )
i = userDefined;
}
setDateFilter ( static_cast<dateOptionE> ( i ) );
- i = kRowTypeText.tqfindIndex ( e.attribute ( "rowtype", "expenseincome" ) );
+ i = kRowTypeText.findIndex ( e.attribute ( "rowtype", "expenseincome" ) );
if ( i != -1 )
{
setRowType ( static_cast<ERowType> ( i ) );
@@ -687,7 +687,7 @@ bool MyMoneyReport::read ( const TQDomElement& e )
if ( e.hasAttribute ( "showrowtotals" ) )
m_showRowTotals = e.attribute ( "showrowtotals" ).toUInt();
- i = kColumnTypeText.tqfindIndex ( e.attribute ( "columntype", "months" ) );
+ i = kColumnTypeText.findIndex ( e.attribute ( "columntype", "months" ) );
if ( i != -1 )
setColumnType ( static_cast<EColumnType> ( i ) );
@@ -696,7 +696,7 @@ bool MyMoneyReport::read ( const TQDomElement& e )
TQStringList::const_iterator it_column = columns.begin();
while ( it_column != columns.end() )
{
- i = kQueryColumnsText.tqfindIndex ( *it_column );
+ i = kQueryColumnsText.findIndex ( *it_column );
if ( i > 0 )
qc |= ( 1 << ( i - 1 ) );
@@ -714,13 +714,13 @@ bool MyMoneyReport::read ( const TQDomElement& e )
}
if ( "TYPE" == c.tagName() && c.hasAttribute ( "type" ) )
{
- i = kTypeText.tqfindIndex ( c.attribute ( "type" ) );
+ i = kTypeText.findIndex ( c.attribute ( "type" ) );
if ( i != -1 )
addType ( i );
}
if ( "STATE" == c.tagName() && c.hasAttribute ( "state" ) )
{
- i = kStateText.tqfindIndex ( c.attribute ( "state" ) );
+ i = kStateText.findIndex ( c.attribute ( "state" ) );
if ( i != -1 )
addState ( i );
}
@@ -755,7 +755,7 @@ bool MyMoneyReport::read ( const TQDomElement& e )
}
if ( "ACCOUNTGROUP" == c.tagName() && c.hasAttribute ( "group" ) )
{
- i = kAccountTypeText.tqfindIndex ( c.attribute ( "group" ) );
+ i = kAccountTypeText.findIndex ( c.attribute ( "group" ) );
if ( i != -1 )
addAccountGroup ( static_cast<MyMoneyAccount::accountTypeE> ( i ) );
}
@@ -781,7 +781,7 @@ bool MyMoneyReport::hasReferenceTo ( const TQString& id ) const
categories ( list );
payees ( list );
- return ( list.tqcontains ( id ) > 0 );
+ return ( list.contains ( id ) > 0 );
}
// vim:cin:si:ai:et:ts=2:sw=2:
diff --git a/kmymoney2/mymoney/mymoneyreport.h b/kmymoney2/mymoney/mymoneyreport.h
index fb2287e..f7e38ea 100644
--- a/kmymoney2/mymoney/mymoneyreport.h
+++ b/kmymoney2/mymoney/mymoneyreport.h
@@ -251,7 +251,7 @@ public:
* Note that account group filtering is handled differently
* than all the filters of the underlying class. This filter
* is meant to be applied to individual splits of matched
- * transactions AFTER the underlying filter is used to tqfind
+ * transactions AFTER the underlying filter is used to find
* the matching transactions.
*
* @param type the account group to add to the allowed groups list
diff --git a/kmymoney2/mymoney/mymoneyscheduled.cpp b/kmymoney2/mymoney/mymoneyscheduled.cpp
index ef8264c..b7e5633 100644
--- a/kmymoney2/mymoney/mymoneyscheduled.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduled.cpp
@@ -470,7 +470,7 @@ TQDate MyMoneySchedule::nextPayment(const TQDate& refDate) const
paymentDate = TQDate();
}
- if (paymentDate.isValid() && m_recordedPayments.tqcontains(paymentDate))
+ if (paymentDate.isValid() && m_recordedPayments.contains(paymentDate))
paymentDate = nextPayment(paymentDate);
return paymentDate;
@@ -711,7 +711,7 @@ bool MyMoneySchedule::hasRecordedPayment(const TQDate& date) const
if (m_lastPayment.isValid() && m_lastPayment >= date)
return true;
- if (m_recordedPayments.tqcontains(date))
+ if (m_recordedPayments.contains(date))
return true;
return false;
diff --git a/kmymoney2/mymoney/mymoneysecuritytest.cpp b/kmymoney2/mymoney/mymoneysecuritytest.cpp
index 72911db..69be2ba 100644
--- a/kmymoney2/mymoney/mymoneysecuritytest.cpp
+++ b/kmymoney2/mymoney/mymoneysecuritytest.cpp
@@ -184,26 +184,26 @@ void MyMoneySecurityTest::testAccountIDList () {
institution.addAccountId("A000002");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
// adding same account shouldn't make a difference
institution.addAccountId("A000002");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
// now add another account
institution.addAccountId("A000001");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 2);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000001") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000001") == 1);
id = institution.removeAccountId("A000001");
CPPUNIT_ASSERT(id == "A000001");
list = institution.accountList();
CPPUNIT_ASSERT(list.count() == 1);
- CPPUNIT_ASSERT(list.tqcontains("A000002") == 1);
+ CPPUNIT_ASSERT(list.contains("A000002") == 1);
}
*/
diff --git a/kmymoney2/mymoney/mymoneysplit.cpp b/kmymoney2/mymoney/mymoneysplit.cpp
index 4af052d..8c00d89 100644
--- a/kmymoney2/mymoney/mymoneysplit.cpp
+++ b/kmymoney2/mymoney/mymoneysplit.cpp
@@ -244,7 +244,7 @@ void MyMoneySplit::addMatch(const MyMoneyTransaction& _t)
doc.appendChild(el);
t.writeXML(doc, el);
TQString xml = doc.toString();
- xml.tqreplace("<", "&lt;");
+ xml.replace("<", "&lt;");
setValue("kmm-matched-tx", xml);
}
}
@@ -258,7 +258,7 @@ MyMoneyTransaction MyMoneySplit::matchedTransaction(void) const
{
TQString xml = value("kmm-matched-tx");
if(!xml.isEmpty()) {
- xml.tqreplace("&lt;", "<");
+ xml.replace("&lt;", "<");
TQDomDocument doc;
TQDomElement node;
doc.setContent(xml);
diff --git a/kmymoney2/mymoney/mymoneystatement.cpp b/kmymoney2/mymoney/mymoneystatement.cpp
index 3756520..14df720 100644
--- a/kmymoney2/mymoney/mymoneystatement.cpp
+++ b/kmymoney2/mymoney/mymoneystatement.cpp
@@ -142,7 +142,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
m_accountId = _e.attribute("accountid");
m_skipCategoryMatching = _e.attribute("skipCategoryMatching");
- int i = kAccountTypeTxt.tqfindIndex(_e.attribute("type",kAccountTypeTxt[1]));
+ int i = kAccountTypeTxt.findIndex(_e.attribute("type",kAccountTypeTxt[1]));
if ( i != -1 )
m_eType = static_cast<EType>(i);
@@ -162,7 +162,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
t.m_strPayee = c.attribute("payee");
t.m_strBankID = c.attribute("bankid");
t.m_reconcile = static_cast<MyMoneySplit::reconcileFlagE>(c.attribute("reconcile").toInt());
- int i = kActionText.tqfindIndex(c.attribute("action",kActionText[1]));
+ int i = kActionText.findIndex(c.attribute("action",kActionText[1]));
if ( i != -1 )
t.m_eAction = static_cast<Transaction::EAction>(i);
@@ -219,7 +219,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
bool MyMoneyStatement::isStatementFile(const TQString& _filename)
{
- // filename is considered a statement file if it tqcontains
+ // filename is considered a statement file if it contains
// the tag "<KMYMONEY2-STATEMENT>" in the first 20 lines.
bool result = false;
@@ -230,7 +230,7 @@ bool MyMoneyStatement::isStatementFile(const TQString& _filename)
int lineCount = 20;
while ( !ts.atEnd() && !result && lineCount != 0) {
- if ( ts.readLine().tqcontains("<KMYMONEY-STATEMENT>",false) )
+ if ( ts.readLine().contains("<KMYMONEY-STATEMENT>",false) )
result = true;
--lineCount;
}
diff --git a/kmymoney2/mymoney/mymoneysubject.cpp b/kmymoney2/mymoney/mymoneysubject.cpp
index 8391570..37991d0 100644
--- a/kmymoney2/mymoney/mymoneysubject.cpp
+++ b/kmymoney2/mymoney/mymoneysubject.cpp
@@ -49,7 +49,7 @@ void MyMoneySubject::notify(const TQString& id)
for (i = ptrList.first(); i != 0; i = ptrList.next()) {
// only call the observer if it did not detach in the meantime
- if(m_observers.tqfindRef(i) != -1) {
+ if(m_observers.findRef(i) != -1) {
// qDebug("call observer @ 0x%08lX with '%s'", (unsigned long)i, id.data());
i->update(id);
}
diff --git a/kmymoney2/mymoney/mymoneytransaction.cpp b/kmymoney2/mymoney/mymoneytransaction.cpp
index 662a9c8..f586da4 100644
--- a/kmymoney2/mymoney/mymoneytransaction.cpp
+++ b/kmymoney2/mymoney/mymoneytransaction.cpp
@@ -240,9 +240,9 @@ const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQStringList& accou
TQValueList<MyMoneySplit>::ConstIterator it;
for(it = m_splits.begin(); it != m_splits.end(); ++it) {
- if(match == true && accountIds.tqcontains((*it).accountId()) )
+ if(match == true && accountIds.contains((*it).accountId()) )
return *it;
- if(match == false && !accountIds.tqcontains((*it).accountId()))
+ if(match == false && !accountIds.contains((*it).accountId()))
return *it;
}
throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%1...%2").tqarg(match?"":"!").tqarg(accountIds.front(),accountIds.back()));
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);
}
diff --git a/kmymoney2/mymoney/mymoneyutils.cpp b/kmymoney2/mymoney/mymoneyutils.cpp
index b55c485..08ffff4 100644
--- a/kmymoney2/mymoney/mymoneyutils.cpp
+++ b/kmymoney2/mymoney/mymoneyutils.cpp
@@ -189,7 +189,7 @@ void operator delete(void *p) throw()
{
if(enable==true) {
CheckMemoryTable::Iterator it;
- it = chkmem.table.tqfind(p);
+ it = chkmem.table.find(p);
if(it != chkmem.table.end()) {
chkmem.table.remove(it);
}
@@ -201,7 +201,7 @@ void operator delete [] (void *p) throw()
{
if(enable==true) {
CheckMemoryTable::Iterator it;
- it = chkmem.table.tqfind(p);
+ it = chkmem.table.find(p);
if(it != chkmem.table.end()) {
chkmem.table.remove(it);
}
@@ -217,7 +217,7 @@ TQString MyMoneyUtils::getFileExtension(TQString strFileName)
if(!strFileName.isEmpty())
{
//find last . delminator
- int nLoc = strFileName.tqfindRev('.');
+ int nLoc = strFileName.findRev('.');
if(nLoc != -1)
{
strTemp = strFileName.right(strFileName.length() - (nLoc + 1));
@@ -331,7 +331,7 @@ unsigned long extractId(const TQString& txt)
int pos;
unsigned long rc = 0;
- pos = txt.tqfind(TQRegExp("\\d+"), 0);
+ pos = txt.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
rc = atol(txt.mid(pos));
}
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
index d34bb83..8bafce8 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
@@ -115,14 +115,14 @@ void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& ac
startTransaction();
accountList = m_sql->fetchAccounts(accountIdList, true);
- theParent = accountList.tqfind(tqparent.id());
+ theParent = accountList.find(tqparent.id());
if(theParent == accountList.end()) {
TQString msg = "Unknown tqparent account '";
msg += tqparent.id() + "'";
throw new MYMONEYEXCEPTION(msg);
}
- theChild = accountList.tqfind(account.id());
+ theChild = accountList.find(account.id());
if(theChild == accountList.end()) {
TQString msg = "Unknown child account '";
msg += account.id() + "'";
@@ -160,7 +160,7 @@ const MyMoneyPayee MyMoneyDatabaseMgr::payee(const TQString& id) const
{
TQMap<TQString, MyMoneyPayee>::ConstIterator it;
TQMap<TQString, MyMoneyPayee> payeeList = m_sql->fetchPayees(TQString(id));
- it = payeeList.tqfind(id);
+ it = payeeList.find(id);
if(it == payeeList.end())
throw new MYMONEYEXCEPTION("Unknown payee '" + id + "'");
@@ -194,7 +194,7 @@ void MyMoneyDatabaseMgr::modifyPayee(const MyMoneyPayee& payee)
TQMap<TQString, MyMoneyPayee> payeeList = m_sql->fetchPayees(TQString(payee.id()), true);
TQMap<TQString, MyMoneyPayee>::ConstIterator it;
- it = payeeList.tqfind(payee.id());
+ it = payeeList.find(payee.id());
if(it == payeeList.end()) {
TQString msg = "Unknown payee '" + payee.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -210,7 +210,7 @@ void MyMoneyDatabaseMgr::removePayee(const MyMoneyPayee& payee)
TQMap<TQString, MyMoneyPayee> payeeList = m_sql->fetchPayees(TQString(payee.id()));
TQMap<TQString, MyMoneyPayee>::ConstIterator it_p;
- it_p = payeeList.tqfind(payee.id());
+ it_p = payeeList.find(payee.id());
if(it_p == payeeList.end()) {
TQString msg = "Unknown payee '" + payee.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -250,7 +250,7 @@ const MyMoneyAccount MyMoneyDatabaseMgr::account(const TQString& id) const
if (m_sql)
{
TQMap <TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(TQString(id));
- TQMap <TQString, MyMoneyAccount>::ConstIterator pos = accountList.tqfind(id);
+ TQMap <TQString, MyMoneyAccount>::ConstIterator pos = accountList.find(id);
// locate the account and if present, return it's data
if(pos != accountList.end())
@@ -479,7 +479,7 @@ const MyMoneyInstitution MyMoneyDatabaseMgr::institution(const TQString& id) con
TQMap<TQString, MyMoneyInstitution>::ConstIterator pos;
TQMap<TQString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(TQString(id));
- pos = institutionList.tqfind(id);
+ pos = institutionList.find(id);
if(pos != institutionList.end())
return *pos;
throw new MYMONEYEXCEPTION("unknown institution");
@@ -512,7 +512,7 @@ void MyMoneyDatabaseMgr::modifyAccount(const MyMoneyAccount& account, const bool
// locate the account in the file global pool
startTransaction();
TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts (TQString(account.id()), true);
- pos = accountList.tqfind(account.id());
+ pos = accountList.find(account.id());
if(pos != accountList.end()) {
// check if the new info is based on the old one.
// this is the case, when the file and the id
@@ -555,7 +555,7 @@ void MyMoneyDatabaseMgr::modifyInstitution(const MyMoneyInstitution& institution
TQMap<TQString, MyMoneyInstitution>::ConstIterator pos;
// locate the institution in the file global pool
- pos = institutionList.tqfind(institution.id());
+ pos = institutionList.find(institution.id());
if(pos != institutionList.end()) {
m_sql->modifyInstitution(institution);
} else
@@ -599,7 +599,7 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction
// new data seems to be ok. find old version of transaction
// in our pool. Throw exception if unknown.
-// if(!m_transactionKeys.tqcontains(transaction.id()))
+// if(!m_transactionKeys.contains(transaction.id()))
// throw new MYMONEYEXCEPTION("invalid transaction id");
// TQString oldKey = m_transactionKeys[transaction.id()];
@@ -609,7 +609,7 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction
TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t;
-// it_t = transactionList.tqfind(oldKey);
+// it_t = transactionList.find(oldKey);
it_t = transactionList.begin();
if(it_t == transactionList.end())
throw new MYMONEYEXCEPTION("invalid transaction key");
@@ -673,11 +673,11 @@ void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount
if(!account.parentAccountId().isEmpty()) {
MyMoneyDatabaseMgr::account(account.parentAccountId());
- oldParent = accountList.tqfind(account.parentAccountId());
+ oldParent = accountList.find(account.parentAccountId());
}
- newParent = accountList.tqfind(tqparent.id());
- childAccount = accountList.tqfind(account.id());
+ newParent = accountList.find(tqparent.id());
+ childAccount = accountList.find(account.id());
MyMoneyAccount acc;
if(!account.parentAccountId().isEmpty()) {
@@ -708,12 +708,12 @@ void MyMoneyDatabaseMgr::removeTransaction(const MyMoneyTransaction& transaction
TQMap<TQString, TQString>::ConstIterator it_k;
TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t;
-// it_k = m_transactionKeys.tqfind(transaction.id());
+// it_k = m_transactionKeys.find(transaction.id());
// if(it_k == m_transactionKeys.end())
// throw new MYMONEYEXCEPTION("invalid transaction to be deleted");
TQMap <TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + TQString(transaction.id()) + "')");
-// it_t = transactionList.tqfind(*it_k);
+// it_t = transactionList.find(*it_k);
it_t = transactionList.begin();
if(it_t == transactionList.end())
throw new MYMONEYEXCEPTION("invalid transaction key");
@@ -823,11 +823,11 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account)
// locate the account in the file global pool
- it_a = accountList.tqfind(account.id());
+ it_a = accountList.find(account.id());
if(it_a == accountList.end())
throw new MYMONEYEXCEPTION("Internal error: account not found in list");
- it_p = accountList.tqfind(tqparent.id());
+ it_p = accountList.find(tqparent.id());
if(it_p == accountList.end())
throw new MYMONEYEXCEPTION("Internal error: tqparent account not found in list");
@@ -872,7 +872,7 @@ void MyMoneyDatabaseMgr::removeInstitution(const MyMoneyInstitution& institution
TQMap<TQString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(TQString(institution.id()));
TQMap<TQString, MyMoneyInstitution>::ConstIterator it_i;
- it_i = institutionList.tqfind(institution.id());
+ it_i = institutionList.find(institution.id());
if(it_i != institutionList.end()) {
// mark file as changed
m_sql->removeInstitution(institution);
@@ -884,7 +884,7 @@ const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const TQString& id) con
{
// get the full key of this transaction, throw exception
// if it's invalid (unknown)
- //if(!m_transactionKeys.tqcontains(id))
+ //if(!m_transactionKeys.contains(id))
// throw new MYMONEYEXCEPTION("invalid transaction id");
// check if this key is in the list, throw exception if not
@@ -893,7 +893,7 @@ const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const TQString& id) con
//there should only be one transaction in the map, if it was found, so check the size of the map
//return the first element.
- //if(!transactionList.tqcontains(key))
+ //if(!transactionList.contains(key))
if(!transactionList.size())
throw new MYMONEYEXCEPTION("invalid transaction key");
@@ -919,10 +919,10 @@ const MyMoneyMoney MyMoneyDatabaseMgr::balance(const TQString& id, const TQDate&
MyMoneyMoney result(0);
MyMoneyAccount acc;
TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(/*TQString(id)*/);
- //TQMap<TQString, MyMoneyAccount>::const_iterator accpos = accountList.tqfind(id);
+ //TQMap<TQString, MyMoneyAccount>::const_iterator accpos = accountList.find(id);
if (date_ != TQDate()) qDebug ("request balance for %s at %s", id.data(), TQString(date_.toString(Qt::ISODate)).latin1());
// if(!date_.isValid() && MyMoneyFile::instance()->account(id).accountType() != MyMoneyAccount::Stock) {
-// if(accountList.tqfind(id) != accountList.end())
+// if(accountList.find(id) != accountList.end())
// return accountList[id].balance();
// return MyMoneyMoney(0);
// }
@@ -991,7 +991,7 @@ const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const TQString& account
TQMap<TQString, MyMoneyAccount>::ConstIterator acc;
// find account object in list, throw exception if unknown
- acc = m_accountList.tqfind(account);
+ acc = m_accountList.find(account);
if(acc == m_accountList.end())
throw new MYMONEYEXCEPTION("unknown account id");
@@ -1068,7 +1068,7 @@ void MyMoneyDatabaseMgr::modifySecurity(const MyMoneySecurity& security)
TQMap<TQString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(TQString(security.id()), true);
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = securitiesList.tqfind(security.id());
+ it = securitiesList.find(security.id());
if(it == securitiesList.end())
{
TQString msg = "Unknown security '";
@@ -1086,7 +1086,7 @@ void MyMoneyDatabaseMgr::removeSecurity(const MyMoneySecurity& security)
// FIXME: check referential integrity
- it = securitiesList.tqfind(security.id());
+ it = securitiesList.find(security.id());
if(it == securitiesList.end())
{
TQString msg = "Unknown security '";
@@ -1100,7 +1100,7 @@ void MyMoneyDatabaseMgr::removeSecurity(const MyMoneySecurity& security)
const MyMoneySecurity MyMoneyDatabaseMgr::security(const TQString& id) const
{
TQMap<TQString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(TQString(id));
- TQMap<TQString, MyMoneySecurity>::ConstIterator it = securitiesList.tqfind(id);
+ TQMap<TQString, MyMoneySecurity>::ConstIterator it = securitiesList.find(id);
if(it != securitiesList.end())
{
return it.data();
@@ -1116,8 +1116,8 @@ void MyMoneyDatabaseMgr::addPrice(const MyMoneyPrice& price)
{
MyMoneyPriceEntries::ConstIterator it;
MyMoneyPriceList priceList = m_sql->fetchPrices();
- it = priceList[MyMoneySecurityPair(price.from(), price.to())].tqfind(price.date());
- // do not tqreplace, if the information did not change.
+ it = priceList[MyMoneySecurityPair(price.from(), price.to())].find(price.date());
+ // do not replace, if the information did not change.
if(it != priceList[MyMoneySecurityPair(price.from(), price.to())].end()) {
if((*it).rate((*it).to()) == price.rate(price.to())
&& (*it).source() == price.source())
@@ -1163,7 +1163,7 @@ void MyMoneyDatabaseMgr::modifySchedule(const MyMoneySchedule& sched)
TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(TQString(sched.id()));
TQMap<TQString, MyMoneySchedule>::ConstIterator it;
- it = scheduleList.tqfind(sched.id());
+ it = scheduleList.find(sched.id());
if(it == scheduleList.end()) {
TQString msg = "Unknown schedule '" + sched.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1177,7 +1177,7 @@ void MyMoneyDatabaseMgr::removeSchedule(const MyMoneySchedule& sched)
TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(TQString(sched.id()));
TQMap<TQString, MyMoneySchedule>::ConstIterator it;
- it = scheduleList.tqfind(sched.id());
+ it = scheduleList.find(sched.id());
if(it == scheduleList.end()) {
TQString msg = "Unknown schedule '" + sched.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1194,7 +1194,7 @@ const MyMoneySchedule MyMoneyDatabaseMgr::schedule(const TQString& id) const
TQMap<TQString, MyMoneySchedule>::ConstIterator pos;
// locate the schedule and if present, return it's data
- pos = scheduleList.tqfind(id);
+ pos = scheduleList.find(id);
if(pos != scheduleList.end())
return (*pos);
@@ -1325,7 +1325,7 @@ const TQValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleListEx( int sched
if (accounts.count() > 0)
{
- if (accounts.tqcontains((*pos).account().id()))
+ if (accounts.contains((*pos).account().id()))
continue;
}
@@ -1342,7 +1342,7 @@ void MyMoneyDatabaseMgr::addCurrency(const MyMoneySecurity& currency)
TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(currency.id()));
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = currencyList.tqfind(currency.id());
+ it = currencyList.find(currency.id());
if(it != currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").tqarg(currency.id()));
}
@@ -1356,7 +1356,7 @@ void MyMoneyDatabaseMgr::modifyCurrency(const MyMoneySecurity& currency)
TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(currency.id()));
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = currencyList.tqfind(currency.id());
+ it = currencyList.find(currency.id());
if(it == currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").tqarg(currency.id()));
}
@@ -1371,7 +1371,7 @@ void MyMoneyDatabaseMgr::removeCurrency(const MyMoneySecurity& currency)
// FIXME: check referential integrity
- it = currencyList.tqfind(currency.id());
+ it = currencyList.find(currency.id());
if(it == currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").tqarg(currency.id()));
}
@@ -1387,7 +1387,7 @@ const MyMoneySecurity MyMoneyDatabaseMgr::currency(const TQString& id) const
TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(id));
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = currencyList.tqfind(id);
+ it = currencyList.find(id);
if(it == currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").tqarg(id));
}
@@ -1429,7 +1429,7 @@ void MyMoneyDatabaseMgr::modifyReport( const MyMoneyReport& report )
TQMap<TQString, MyMoneyReport> reportList = m_sql->fetchReports(TQString(report.id()));
TQMap<TQString, MyMoneyReport>::ConstIterator it;
- it = reportList.tqfind(report.id());
+ it = reportList.find(report.id());
if(it == reportList.end()) {
TQString msg = "Unknown report '" + report.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1453,7 +1453,7 @@ void MyMoneyDatabaseMgr::removeReport(const MyMoneyReport& report)
TQMap<TQString, MyMoneyReport> reportList = m_sql->fetchReports(TQString(report.id()));
TQMap<TQString, MyMoneyReport>::ConstIterator it;
- it = reportList.tqfind(report.id());
+ it = reportList.find(report.id());
if(it == reportList.end()) {
TQString msg = "Unknown report '" + report.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1491,7 +1491,7 @@ void MyMoneyDatabaseMgr::modifyBudget( const MyMoneyBudget& budget )
{
//TQMap<TQString, MyMoneyBudget>::ConstIterator it;
- //it = m_budgetList.tqfind(budget.id());
+ //it = m_budgetList.find(budget.id());
//if(it == m_budgetList.end()) {
// TQString msg = "Unknown budget '" + budget.id() + "'";
// throw new MYMONEYEXCEPTION(msg);
@@ -1521,7 +1521,7 @@ void MyMoneyDatabaseMgr::removeBudget(const MyMoneyBudget& budget)
{
// TQMap<TQString, MyMoneyBudget>::ConstIterator it;
//
-// it = m_budgetList.tqfind(budget.id());
+// it = m_budgetList.find(budget.id());
// if(it == m_budgetList.end()) {
// TQString msg = "Unknown budget '" + budget.id() + "'";
// throw new MYMONEYEXCEPTION(msg);
@@ -1670,7 +1670,7 @@ void MyMoneyDatabaseMgr::setLastModificationDate(const TQDate& val)
bool MyMoneyDatabaseMgr::isDuplicateTransaction(const TQString& /*id*/) const
{
//FIXME: figure out the real id from the key and check the DB.
-//return m_transactionKeys.tqcontains(id);
+//return m_transactionKeys.contains(id);
return false;
}
diff --git a/kmymoney2/mymoney/storage/mymoneymap.h b/kmymoney2/mymoney/storage/mymoneymap.h
index 7582112..c914416 100644
--- a/kmymoney2/mymoney/storage/mymoneymap.h
+++ b/kmymoney2/mymoney/storage/mymoneymap.h
@@ -123,9 +123,9 @@ public:
const T& operator[] ( const Key& k ) const
{ TQT_CHECK_INVALID_MAP_ELEMENT; return TQMap<Key,T>::operator[](k); }
- inline TQ_TYPENAME TQMap<Key, T>::const_iterator tqfind(const Key& k) const
+ inline TQ_TYPENAME TQMap<Key, T>::const_iterator find(const Key& k) const
{
- return TQMap<Key,T>::tqfind(k);
+ return TQMap<Key,T>::find(k);
}
inline TQ_TYPENAME TQMap<Key, T>::const_iterator begin(void) const
@@ -138,9 +138,9 @@ public:
return TQMap<Key,T>::end();
}
- inline bool tqcontains(const Key& k) const
+ inline bool contains(const Key& k) const
{
- return tqfind(k) != end();
+ return find(k) != end();
}
inline void map(TQMap<Key, T>& that) const
@@ -307,7 +307,7 @@ main()
printf("b.name() = %s\n", b.name().data());
TQMap<TQString, MyMoneyAccount>::ConstIterator it;
- it = container.tqfind("001");
+ it = container.find("001");
it = container.begin();
} catch(MyMoneyException *e) {
diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
index 9977811..efc88b7 100644
--- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
@@ -137,7 +137,7 @@ void MyMoneySeqAccessMgr::setAccountName(const TQString& id, const TQString& nam
const MyMoneyAccount MyMoneySeqAccessMgr::account(const TQString& id) const
{
// locate the account and if present, return it's data
- if(m_accountList.tqfind(id) != m_accountList.end())
+ if(m_accountList.find(id) != m_accountList.end())
return m_accountList[id];
// throw an exception, if it does not exist
@@ -175,7 +175,7 @@ void MyMoneySeqAccessMgr::addPayee(MyMoneyPayee& payee)
const MyMoneyPayee MyMoneySeqAccessMgr::payee(const TQString& id) const
{
TQMap<TQString, MyMoneyPayee>::ConstIterator it;
- it = m_payeeList.tqfind(id);
+ it = m_payeeList.find(id);
if(it == m_payeeList.end())
throw new MYMONEYEXCEPTION("Unknown payee '" + id + "'");
@@ -202,7 +202,7 @@ void MyMoneySeqAccessMgr::modifyPayee(const MyMoneyPayee& payee)
{
TQMap<TQString, MyMoneyPayee>::ConstIterator it;
- it = m_payeeList.tqfind(payee.id());
+ it = m_payeeList.find(payee.id());
if(it == m_payeeList.end()) {
TQString msg = "Unknown payee '" + payee.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -216,7 +216,7 @@ void MyMoneySeqAccessMgr::removePayee(const MyMoneyPayee& payee)
TQMap<TQString, MyMoneySchedule>::ConstIterator it_s;
TQMap<TQString, MyMoneyPayee>::ConstIterator it_p;
- it_p = m_payeeList.tqfind(payee.id());
+ it_p = m_payeeList.find(payee.id());
if(it_p == m_payeeList.end()) {
TQString msg = "Unknown payee '" + payee.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -253,14 +253,14 @@ void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& a
TQMap<TQString, MyMoneyAccount>::ConstIterator theParent;
TQMap<TQString, MyMoneyAccount>::ConstIterator theChild;
- theParent = m_accountList.tqfind(tqparent.id());
+ theParent = m_accountList.find(tqparent.id());
if(theParent == m_accountList.end()) {
TQString msg = "Unknown tqparent account '";
msg += tqparent.id() + "'";
throw new MYMONEYEXCEPTION(msg);
}
- theChild = m_accountList.tqfind(account.id());
+ theChild = m_accountList.find(account.id());
if(theChild == m_accountList.end()) {
TQString msg = "Unknown child account '";
msg += account.id() + "'";
@@ -467,7 +467,7 @@ const MyMoneyInstitution MyMoneySeqAccessMgr::institution(const TQString& id) co
{
TQMap<TQString, MyMoneyInstitution>::ConstIterator pos;
- pos = m_institutionList.tqfind(id);
+ pos = m_institutionList.find(id);
if(pos != m_institutionList.end())
return *pos;
throw new MYMONEYEXCEPTION("unknown institution");
@@ -483,7 +483,7 @@ void MyMoneySeqAccessMgr::modifyAccount(const MyMoneyAccount& account, const boo
TQMap<TQString, MyMoneyAccount>::ConstIterator pos;
// locate the account in the file global pool
- pos = m_accountList.tqfind(account.id());
+ pos = m_accountList.find(account.id());
if(pos != m_accountList.end()) {
// check if the new info is based on the old one.
// this is the case, when the file and the id
@@ -518,7 +518,7 @@ void MyMoneySeqAccessMgr::modifyInstitution(const MyMoneyInstitution& institutio
TQMap<TQString, MyMoneyInstitution>::ConstIterator pos;
// locate the institution in the file global pool
- pos = m_institutionList.tqfind(institution.id());
+ pos = m_institutionList.find(institution.id());
if(pos != m_institutionList.end()) {
m_institutionList.modify(institution.id(), institution);
@@ -553,16 +553,16 @@ void MyMoneySeqAccessMgr::modifyTransaction(const MyMoneyTransaction& transactio
// new data seems to be ok. find old version of transaction
// in our pool. Throw exception if unknown.
- if(!m_transactionKeys.tqcontains(transaction.id()))
+ if(!m_transactionKeys.contains(transaction.id()))
throw new MYMONEYEXCEPTION("invalid transaction id");
TQString oldKey = m_transactionKeys[transaction.id()];
- if(!m_transactionList.tqcontains(oldKey))
+ if(!m_transactionList.contains(oldKey))
throw new MYMONEYEXCEPTION("invalid transaction key");
TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t;
- it_t = m_transactionList.tqfind(oldKey);
+ it_t = m_transactionList.find(oldKey);
if(it_t == m_transactionList.end())
throw new MYMONEYEXCEPTION("invalid transaction key");
@@ -608,14 +608,14 @@ void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccoun
MyMoneySeqAccessMgr::account(tqparent.id());
if(!account.parentAccountId().isEmpty()) {
MyMoneySeqAccessMgr::account(account.parentAccountId());
- oldParent = m_accountList.tqfind(account.parentAccountId());
+ oldParent = m_accountList.find(account.parentAccountId());
}
if(account.accountType() == MyMoneyAccount::Stock && tqparent.accountType() != MyMoneyAccount::Investment)
throw new MYMONEYEXCEPTION("Cannot move a stock acocunt into a non-investment account");
- newParent = m_accountList.tqfind(tqparent.id());
- childAccount = m_accountList.tqfind(account.id());
+ newParent = m_accountList.find(tqparent.id());
+ childAccount = m_accountList.find(account.id());
MyMoneyAccount acc;
if(!account.parentAccountId().isEmpty()) {
@@ -648,11 +648,11 @@ void MyMoneySeqAccessMgr::removeTransaction(const MyMoneyTransaction& transactio
TQMap<TQString, TQString>::ConstIterator it_k;
TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t;
- it_k = m_transactionKeys.tqfind(transaction.id());
+ it_k = m_transactionKeys.find(transaction.id());
if(it_k == m_transactionKeys.end())
throw new MYMONEYEXCEPTION("invalid transaction to be deleted");
- it_t = m_transactionList.tqfind(*it_k);
+ it_t = m_transactionList.find(*it_k);
if(it_t == m_transactionList.end())
throw new MYMONEYEXCEPTION("invalid transaction key");
@@ -708,11 +708,11 @@ void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account)
// locate the account in the file global pool
- it_a = m_accountList.tqfind(account.id());
+ it_a = m_accountList.find(account.id());
if(it_a == m_accountList.end())
throw new MYMONEYEXCEPTION("Internal error: account not found in list");
- it_p = m_accountList.tqfind(tqparent.id());
+ it_p = m_accountList.find(tqparent.id());
if(it_p == m_accountList.end())
throw new MYMONEYEXCEPTION("Internal error: tqparent account not found in list");
@@ -756,7 +756,7 @@ void MyMoneySeqAccessMgr::removeInstitution(const MyMoneyInstitution& institutio
{
TQMap<TQString, MyMoneyInstitution>::ConstIterator it_i;
- it_i = m_institutionList.tqfind(institution.id());
+ it_i = m_institutionList.find(institution.id());
if(it_i != m_institutionList.end()) {
m_institutionList.remove(institution.id());
@@ -816,14 +816,14 @@ const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const TQString& id) co
{
// get the full key of this transaction, throw exception
// if it's invalid (unknown)
- if(!m_transactionKeys.tqcontains(id)) {
+ if(!m_transactionKeys.contains(id)) {
TQString msg = TQString("Invalid transaction id '%1'").tqarg(id);
throw new MYMONEYEXCEPTION(msg);
}
// check if this key is in the list, throw exception if not
TQString key = m_transactionKeys[id];
- if(!m_transactionList.tqcontains(key)) {
+ if(!m_transactionList.contains(key)) {
TQString msg = TQString("Invalid transaction key '%1'").tqarg(key);
throw new MYMONEYEXCEPTION(msg);
}
@@ -837,7 +837,7 @@ const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const TQString& accoun
TQMap<TQString, MyMoneyAccount>::ConstIterator acc;
// find account object in list, throw exception if unknown
- acc = m_accountList.tqfind(account);
+ acc = m_accountList.find(account);
if(acc == m_accountList.end())
throw new MYMONEYEXCEPTION("unknown account id");
@@ -872,7 +872,7 @@ const MyMoneyMoney MyMoneySeqAccessMgr::balance(const TQString& id, const TQDate
MyMoneyAccount acc;
// if (date != TQDate()) qDebug ("request balance for %s at %s", id.data(), date.toString(Qt::ISODate).latin1());
if(!date.isValid() && account(id).accountType() != MyMoneyAccount::Stock) {
- if(m_accountList.tqfind(id) != m_accountList.end())
+ if(m_accountList.find(id) != m_accountList.end())
return m_accountList[id].balance();
return MyMoneyMoney(0);
}
@@ -975,12 +975,12 @@ const unsigned int MyMoneyFile::moveSplits(const TQString& oldAccount, const TQS
if(cnt != 0) {
// now update all the accounts that were referenced
TQMap<TQString, MyMoneyAccount>::Iterator acc;
- acc = m_accountList.tqfind(oldAccount);
+ acc = m_accountList.find(oldAccount);
if(acc != m_accountList.end()) {
(*acc).touch();
refreshAccountTransactionList(acc);
}
- acc = m_accountList.tqfind(newAccount);
+ acc = m_accountList.find(newAccount);
if(acc != m_accountList.end()) {
(*acc).touch();
refreshAccountTransactionList(acc);
@@ -1019,7 +1019,7 @@ void MyMoneySeqAccessMgr::loadAccounts(const TQMap<TQString, MyMoneyAccount>& ma
lastId = (*it_a).id();
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextAccountID = atol(lastId.mid(pos));
}
@@ -1042,7 +1042,7 @@ void MyMoneySeqAccessMgr::loadTransactions(const TQMap<TQString, MyMoneyTransact
m_transactionKeys = keys;
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextTransactionID = atol(lastId.mid(pos));
}
@@ -1060,7 +1060,7 @@ void MyMoneySeqAccessMgr::loadInstitutions(const TQMap<TQString, MyMoneyInstitut
lastId = (*it_i).id();
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextInstitutionID = atol(lastId.mid(pos));
}
@@ -1081,7 +1081,7 @@ void MyMoneySeqAccessMgr::loadPayees(const TQMap<TQString, MyMoneyPayee>& map)
}
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextPayeeID = atol(lastId.mid(pos));
}
@@ -1099,7 +1099,7 @@ void MyMoneySeqAccessMgr::loadSecurities(const TQMap<TQString, MyMoneySecurity>&
lastId = (*it_s).id();
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextSecurityID = atol(lastId.mid(pos));
}
@@ -1196,7 +1196,7 @@ void MyMoneySeqAccessMgr::modifySchedule(const MyMoneySchedule& sched)
{
TQMap<TQString, MyMoneySchedule>::ConstIterator it;
- it = m_scheduleList.tqfind(sched.id());
+ it = m_scheduleList.find(sched.id());
if(it == m_scheduleList.end()) {
TQString msg = "Unknown schedule '" + sched.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1209,7 +1209,7 @@ void MyMoneySeqAccessMgr::removeSchedule(const MyMoneySchedule& sched)
{
TQMap<TQString, MyMoneySchedule>::ConstIterator it;
- it = m_scheduleList.tqfind(sched.id());
+ it = m_scheduleList.find(sched.id());
if(it == m_scheduleList.end()) {
TQString msg = "Unknown schedule '" + sched.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1224,7 +1224,7 @@ const MyMoneySchedule MyMoneySeqAccessMgr::schedule(const TQString& id) const
TQMap<TQString, MyMoneySchedule>::ConstIterator pos;
// locate the schedule and if present, return it's data
- pos = m_scheduleList.tqfind(id);
+ pos = m_scheduleList.find(id);
if(pos != m_scheduleList.end())
return (*pos);
@@ -1323,7 +1323,7 @@ void MyMoneySeqAccessMgr::loadSchedules(const TQMap<TQString, MyMoneySchedule>&
lastId = (*it_s).id();
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextScheduleID = atol(lastId.mid(pos));
}
@@ -1370,7 +1370,7 @@ const TQValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleListEx(int sched
if (accounts.count() > 0)
{
- if (accounts.tqcontains((*pos).account().id()))
+ if (accounts.contains((*pos).account().id()))
continue;
}
@@ -1395,7 +1395,7 @@ void MyMoneySeqAccessMgr::modifySecurity(const MyMoneySecurity& security)
{
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = m_securitiesList.tqfind(security.id());
+ it = m_securitiesList.find(security.id());
if(it == m_securitiesList.end())
{
TQString msg = "Unknown security '";
@@ -1412,7 +1412,7 @@ void MyMoneySeqAccessMgr::removeSecurity(const MyMoneySecurity& security)
// FIXME: check referential integrity
- it = m_securitiesList.tqfind(security.id());
+ it = m_securitiesList.find(security.id());
if(it == m_securitiesList.end())
{
TQString msg = "Unknown security '";
@@ -1425,7 +1425,7 @@ void MyMoneySeqAccessMgr::removeSecurity(const MyMoneySecurity& security)
const MyMoneySecurity MyMoneySeqAccessMgr::security(const TQString& id) const
{
- TQMap<TQString, MyMoneySecurity>::ConstIterator it = m_securitiesList.tqfind(id);
+ TQMap<TQString, MyMoneySecurity>::ConstIterator it = m_securitiesList.find(id);
if(it != m_securitiesList.end())
{
return it.data();
@@ -1444,7 +1444,7 @@ void MyMoneySeqAccessMgr::addCurrency(const MyMoneySecurity& currency)
{
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = m_currencyList.tqfind(currency.id());
+ it = m_currencyList.find(currency.id());
if(it != m_currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").tqarg(currency.id()));
}
@@ -1456,7 +1456,7 @@ void MyMoneySeqAccessMgr::modifyCurrency(const MyMoneySecurity& currency)
{
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = m_currencyList.tqfind(currency.id());
+ it = m_currencyList.find(currency.id());
if(it == m_currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").tqarg(currency.id()));
}
@@ -1470,7 +1470,7 @@ void MyMoneySeqAccessMgr::removeCurrency(const MyMoneySecurity& currency)
// FIXME: check referential integrity
- it = m_currencyList.tqfind(currency.id());
+ it = m_currencyList.find(currency.id());
if(it == m_currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").tqarg(currency.id()));
}
@@ -1485,7 +1485,7 @@ const MyMoneySecurity MyMoneySeqAccessMgr::currency(const TQString& id) const
}
TQMap<TQString, MyMoneySecurity>::ConstIterator it;
- it = m_currencyList.tqfind(id);
+ it = m_currencyList.find(id);
if(it == m_currencyList.end()) {
throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").tqarg(id));
}
@@ -1525,7 +1525,7 @@ void MyMoneySeqAccessMgr::loadReports(const TQMap<TQString, MyMoneyReport>& map)
lastId = (*it_r).id();
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextReportID = atol(lastId.mid(pos));
}
@@ -1535,7 +1535,7 @@ void MyMoneySeqAccessMgr::modifyReport( const MyMoneyReport& report )
{
TQMap<TQString, MyMoneyReport>::ConstIterator it;
- it = m_reportList.tqfind(report.id());
+ it = m_reportList.find(report.id());
if(it == m_reportList.end()) {
TQString msg = "Unknown report '" + report.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1565,7 +1565,7 @@ void MyMoneySeqAccessMgr::removeReport( const MyMoneyReport& report )
{
TQMap<TQString, MyMoneyReport>::ConstIterator it;
- it = m_reportList.tqfind(report.id());
+ it = m_reportList.find(report.id());
if(it == m_reportList.end()) {
TQString msg = "Unknown report '" + report.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1599,7 +1599,7 @@ void MyMoneySeqAccessMgr::loadBudgets(const TQMap<TQString, MyMoneyBudget>& map)
lastId = (*it_b).id();
}
- int pos = lastId.tqfind(TQRegExp("\\d+"), 0);
+ int pos = lastId.find(TQRegExp("\\d+"), 0);
if(pos != -1) {
m_nextBudgetID = atol(lastId.mid(pos));
}
@@ -1622,7 +1622,7 @@ void MyMoneySeqAccessMgr::modifyBudget( const MyMoneyBudget& budget )
{
TQMap<TQString, MyMoneyBudget>::ConstIterator it;
- it = m_budgetList.tqfind(budget.id());
+ it = m_budgetList.find(budget.id());
if(it == m_budgetList.end()) {
TQString msg = "Unknown budget '" + budget.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1652,7 +1652,7 @@ void MyMoneySeqAccessMgr::removeBudget( const MyMoneyBudget& budget )
{
TQMap<TQString, MyMoneyBudget>::ConstIterator it;
- it = m_budgetList.tqfind(budget.id());
+ it = m_budgetList.find(budget.id());
if(it == m_budgetList.end()) {
TQString msg = "Unknown budget '" + budget.id() + "'";
throw new MYMONEYEXCEPTION(msg);
@@ -1665,7 +1665,7 @@ void MyMoneySeqAccessMgr::addPrice(const MyMoneyPrice& price)
{
MyMoneySecurityPair pricePair(price.from(), price.to());
TQMap<MyMoneySecurityPair, MyMoneyPriceEntries>::ConstIterator it_m;
- it_m = m_priceList.tqfind(pricePair);
+ it_m = m_priceList.find(pricePair);
MyMoneyPriceEntries entries;
if(it_m != m_priceList.end()) {
@@ -1677,7 +1677,7 @@ void MyMoneySeqAccessMgr::addPrice(const MyMoneyPrice& price)
// an existing one.
MyMoneyPriceEntries::ConstIterator it;
- it = entries.tqfind(price.date());
+ it = entries.find(price.date());
if(it != entries.end()) {
if((*it).rate(TQString()) == price.rate(TQString())
&& (*it).source() == price.source())
@@ -1699,7 +1699,7 @@ void MyMoneySeqAccessMgr::removePrice(const MyMoneyPrice& price)
{
MyMoneySecurityPair pricePair(price.from(), price.to());
TQMap<MyMoneySecurityPair, MyMoneyPriceEntries>::ConstIterator it_m;
- it_m = m_priceList.tqfind(pricePair);
+ it_m = m_priceList.find(pricePair);
MyMoneyPriceEntries entries;
if(it_m != m_priceList.end()) {
@@ -1736,7 +1736,7 @@ const MyMoneyPrice MyMoneySeqAccessMgr::price(const TQString& fromId, const TQSt
// If the caller selected an exact entry, we can search for
// it using the date as the key
if(exactDate) {
- it = m_priceList[MyMoneySecurityPair(fromId, toId)].tqfind(date);
+ it = m_priceList[MyMoneySecurityPair(fromId, toId)].find(date);
if(it != m_priceList[MyMoneySecurityPair(fromId, toId)].end())
rc = *it;
@@ -1778,7 +1778,7 @@ void MyMoneySeqAccessMgr::rebuildAccountBalances(void)
if(!(*it_s).shares().isZero()) {
const TQString& id = (*it_s).accountId();
// locate the account and if present, update data
- if(map.tqfind(id) != map.end()) {
+ if(map.find(id) != map.end()) {
map[id].adjustBalance(*it_s);
}
}
diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h
index abca654..f570d92 100644
--- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h
+++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h
@@ -465,7 +465,7 @@ public:
* This method returns whether a given transaction is already in memory, to avoid
* reloading it from the database
*/
- bool isDuplicateTransaction(const TQString& id) const { return m_transactionKeys.tqcontains(id); }
+ bool isDuplicateTransaction(const TQString& id) const { return m_transactionKeys.contains(id); }
/**
* This method returns the number of transactions currently known to file
diff --git a/kmymoney2/mymoney/storage/mymoneystorageanon.cpp b/kmymoney2/mymoney/storage/mymoneystorageanon.cpp
index bb0ab60..db35647 100644
--- a/kmymoney2/mymoney/storage/mymoneystorageanon.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystorageanon.cpp
@@ -120,7 +120,7 @@ void MyMoneyStorageANON::writePayee(TQDomElement& payee, const MyMoneyPayee& _p)
TQStringList keys;
MyMoneyPayee::payeeMatchType matchType = p.matchData(ignoreCase, keys);
TQRegExp exp("[A-Za-z]");
- p.setMatchData(matchType, ignoreCase, TQStringList::split(";", keys.join(";").tqreplace(exp, "x")));
+ p.setMatchData(matchType, ignoreCase, TQStringList::split(";", keys.join(";").replace(exp, "x")));
MyMoneyStorageXML::writePayee(payee, p);
}
@@ -180,9 +180,9 @@ void MyMoneyStorageANON::fakeKeyValuePair(MyMoneyKeyValueContainer& kvp)
for(it = kvp.pairs().begin(); it != kvp.pairs().end(); ++it)
{
- if ( zKvpXNumber.tqcontains( it.key() ) || it.key().left(3)=="ir-" )
+ if ( zKvpXNumber.contains( it.key() ) || it.key().left(3)=="ir-" )
pairs[it.key()] = hideNumber(MyMoneyMoney(it.data())).toString();
- else if ( zKvpNoModify.tqcontains( it.key() ) )
+ else if ( zKvpNoModify.contains( it.key() ) )
pairs[it.key()] = it.data();
else
pairs[it.key()] = hideString(it.data());
diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
index f479c5c..4995d02 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
@@ -71,7 +71,7 @@ bool MyMoneySqlQuery::exec () {
bool MyMoneySqlQuery::prepare ( const TQString & query ) {
if (m_db->isSqlite3()) {
TQString newQuery = query;
- return (TQSqlQuery::prepare (newQuery.tqreplace("FOR UPDATE", "")));
+ return (TQSqlQuery::prepare (newQuery.replace("FOR UPDATE", "")));
}
return (TQSqlQuery::prepare (query));
}
@@ -136,8 +136,8 @@ try {
m_dbType = m_drivers.driverToType(driverName);
//get the input options
TQStringList options = TQStringList::split(',', url.queryItem("options"));
- m_loadAll = options.tqcontains("loadAll")/*|| m_mode == 0*/;
- m_override = options.tqcontains("override");
+ m_loadAll = options.contains("loadAll")/*|| m_mode == 0*/;
+ m_override = options.contains("override");
// create the database connection
TQString dbName = url.path().right(url.path().length() - 1); // remove separator slash
@@ -279,7 +279,7 @@ int MyMoneyStorageSql::upgradeDb() {
// prior to dbv6, 'version' format was 'dbversion.fixLevel+1'
// as of dbv6, these are separate fields
TQString version = q.value(0).toString();
- if (version.tqcontains('.')) {
+ if (version.contains('.')) {
m_dbVersion = q.value(0).toString().section('.', 0, 0).toUInt();
m_storage->setFileFixVersion(q.value(0).toString().section('.', 1, 1).toUInt() - 1);
} else {
@@ -358,7 +358,7 @@ bool MyMoneyStorageSql::addColumn
const TQString& after){
if ((m_dbType == Sqlite3) && (!after.isEmpty()))
qFatal("sqlite doesn't support 'AFTER'; use sqliteAlterTable");
- if (record(t.name()).tqcontains(c.name()))
+ if (record(t.name()).contains(c.name()))
return (true);
TQSqlQuery q(this);
TQString afterString = ";";
@@ -385,7 +385,7 @@ bool MyMoneyStorageSql::dropColumn
(const MyMoneyDbTable& t, const TQString& col){
if (m_dbType == Sqlite3)
qFatal("sqlite doesn't support 'DROP COLUMN'; use sqliteAlterTable");
- if (!record(t.name()).tqcontains(col))
+ if (!record(t.name()).contains(col))
return (true);
TQSqlQuery q(this);
q.prepare("ALTER TABLE " + t.name() + " DROP COLUMN "
@@ -712,7 +712,7 @@ int MyMoneyStorageSql::upgradeToV6() {
bool MyMoneyStorageSql::sqliteAlterTable(const MyMoneyDbTable& t) {
DBG("*** Entering MyMoneyStorageSql::sqliteAlterTable");
TQString tempTableName = t.name();
- tempTableName.tqreplace("kmm", "tmp");
+ tempTableName.replace("kmm", "tmp");
TQSqlQuery q(this);
q.prepare (TQString("ALTER TABLE " + t.name() + " RENAME TO " + tempTableName + ";"));
if (!q.exec()) {
@@ -756,12 +756,12 @@ int MyMoneyStorageSql::createTables () {
}
for (TQMapConstIterator<TQString, MyMoneyDbTable> tt = m_db.tableBegin(); tt != m_db.tableEnd(); ++tt) {
- if (!lowerTables.tqcontains(tt.key().lower())) createTable (tt.data());
+ if (!lowerTables.contains(tt.key().lower())) createTable (tt.data());
}
MyMoneySqlQuery q(this);
for (TQMapConstIterator<TQString, MyMoneyDbView> tt = m_db.viewBegin(); tt != m_db.viewEnd(); ++tt) {
- if (!lowerTables.tqcontains(tt.key().lower())) {
+ if (!lowerTables.contains(tt.key().lower())) {
q.prepare (tt.data().createString());
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating view %1").tqarg(tt.key())));
}
@@ -972,7 +972,7 @@ void MyMoneyStorageSql::writeInstitutions() {
q2.prepare (m_db.m_tables["kmmInstitutions"].insertString());
signalProgress(0, list.count(), "Writing Institutions...");
for(it = list.begin(); it != list.end(); ++it) {
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writeInstitution(*it, q);
} else {
@@ -1062,7 +1062,7 @@ void MyMoneyStorageSql::writePayees() {
q2.prepare (m_db.m_tables["kmmPayees"].insertString());
TQValueList<MyMoneyPayee>::ConstIterator it;
for(it = list.begin(); it != list.end(); ++it) {
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writePayee(*it, q);
} else {
@@ -1224,7 +1224,7 @@ void MyMoneyStorageSql::writeAccounts() {
// Update the accounts that exist; insert the ones that do not.
for(it = list.begin(); it != list.end(); ++it, ++i) {
m_transactionCountMap[(*it).id()] = m_storagePtr->transactionCount((*it).id());
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writeAccount(*it, q);
} else {
@@ -1365,7 +1365,7 @@ void MyMoneyStorageSql::writeTransactions() {
q.prepare (m_db.m_tables["kmmTransactions"].updateString());
q2.prepare (m_db.m_tables["kmmTransactions"].insertString());
for(it = list.begin(); it != list.end(); ++it, ++i) {
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writeTransaction((*it).id(), *it, q, "N");
} else {
@@ -1506,7 +1506,7 @@ void MyMoneyStorageSql::writeSplits(const TQString& txId, const TQString& type,
q.prepare (m_db.m_tables["kmmSplits"].updateString());
q2.prepare (m_db.m_tables["kmmSplits"].insertString());
for(it = splitList.begin(), i = 0; it != splitList.end(); ++it, ++i) {
- if (dbList.tqcontains(i)) {
+ if (dbList.contains(i)) {
dbList.remove (i);
writeSplit(txId, (*it), type, i, q);
} else {
@@ -1543,20 +1543,20 @@ void MyMoneyStorageSql::writeSplit(const TQString& txId, const MyMoneySplit& spl
q.bindValue(":value", split.value().toString());
q.bindValue(":valueFormatted", split.value()
.formatMoney("", -1, false)
- .tqreplace(TQChar(','), TQChar('.')));
+ .replace(TQChar(','), TQChar('.')));
q.bindValue(":shares", split.shares().toString());
MyMoneyAccount acc = m_storagePtr->account(split.accountId());
MyMoneySecurity sec = m_storagePtr->security(acc.currencyId());
q.bindValue(":sharesFormatted",
split.shares().
formatMoney("", MyMoneyMoney::denomToPrec(sec.smallestAccountFraction()), false).
- tqreplace(TQChar(','), TQChar('.')));
+ replace(TQChar(','), TQChar('.')));
MyMoneyMoney price = split.actualPrice();
if (!price.isZero()) {
q.bindValue(":price", price.toString());
q.bindValue(":priceFormatted", price.formatMoney
("", KMyMoneySettings::pricePrecision(), false)
- .tqreplace(TQChar(','), TQChar('.')));
+ .replace(TQChar(','), TQChar('.')));
} else {
q.bindValue(":price", TQString());
q.bindValue(":priceFormatted", TQString());
@@ -1591,7 +1591,7 @@ void MyMoneyStorageSql::writeSchedules() {
q.prepare (m_db.m_tables["kmmSchedules"].updateString());
q2.prepare (m_db.m_tables["kmmSchedules"].insertString());
bool insert = true;
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
insert = false;
writeSchedule(*it, q, insert);
@@ -1730,7 +1730,7 @@ void MyMoneyStorageSql::writeSecurities() {
q.prepare (m_db.m_tables["kmmSecurities"].updateString());
q2.prepare (m_db.m_tables["kmmSecurities"].insertString());
for(TQValueList<MyMoneySecurity>::ConstIterator it = securityList.begin(); it != securityList.end(); ++it) {
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writeSecurity((*it), q);
} else {
@@ -1911,7 +1911,7 @@ void MyMoneyStorageSql::writeCurrencies() {
q.prepare (m_db.m_tables["kmmCurrencies"].updateString());
q2.prepare (m_db.m_tables["kmmCurrencies"].insertString());
for(TQValueList<MyMoneySecurity>::ConstIterator it = currencyList.begin(); it != currencyList.end(); ++it) {
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writeCurrency((*it), q);
} else {
@@ -2000,7 +2000,7 @@ void MyMoneyStorageSql::writeReports() {
q.prepare (m_db.m_tables["kmmReportConfig"].updateString());
q2.prepare (m_db.m_tables["kmmReportConfig"].insertString());
for(it = list.begin(); it != list.end(); ++it){
- if (dbList.tqcontains((*it).id())) {
+ if (dbList.contains((*it).id())) {
dbList.remove ((*it).id());
writeReport(*it, q);
} else {
@@ -2082,7 +2082,7 @@ void MyMoneyStorageSql::writeBudgets() {
q.prepare (m_db.m_tables["kmmBudgetConfig"].updateString());
q2.prepare (m_db.m_tables["kmmBudgetConfig"].insertString());
for(it = list.begin(); it != list.end(); ++it){
- if (dbList.tqcontains((*it).name())) {
+ if (dbList.contains((*it).name())) {
dbList.remove ((*it).name());
writeBudget(*it, q);
} else {
@@ -2570,7 +2570,7 @@ const TQMap<TQString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts (const TQ
TQMapIterator<TQString, MyMoneyAccount> it_acc;
TQMapIterator<TQString, MyMoneyAccount> accListEnd = accList.end();
while (sq.next()) {
- it_acc = accList.tqfind(sq.value(1).toString());
+ it_acc = accList.find(sq.value(1).toString());
if (it_acc != accListEnd && it_acc.data().id() == sq.value(1).toString()) {
while (sq.isValid() && it_acc != accListEnd
&& it_acc.data().id() == sq.value(1).toString()) {
@@ -2794,7 +2794,7 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
// TQStringList::iterator it;
// bool allAccountsLoaded = true;
// for (it = accounts.begin(); it != accounts.end(); ++it) {
-// if (m_accountsLoaded.tqfind(*it) == m_accountsLoaded.end()) {
+// if (m_accountsLoaded.find(*it) == m_accountsLoaded.end()) {
// allAccountsLoaded = false;
// break;
// }
@@ -2883,7 +2883,7 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
TQString accountsClause = "";
TQStringList::const_iterator it;
for (it = accounts.begin(); it != accounts.end(); ++it) {
-// if (m_accountsLoaded.tqfind(*it) == m_accountsLoaded.end()) {
+// if (m_accountsLoaded.find(*it) == m_accountsLoaded.end()) {
accountsClause.append(TQString("%1 '%2'")
.tqarg(itemConnector).tqarg(*it));
itemConnector = ", ";
@@ -2914,8 +2914,8 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
}
}
// I've given up trying to work out the logic. we keep getting the wrong number of close brackets
- int obc = whereClause.tqcontains('(');
- int cbc = whereClause.tqcontains(')');
+ int obc = whereClause.contains('(');
+ int cbc = whereClause.contains(')');
if (cbc > obc) {
qFatal("invalid where clause - %s", whereClause.latin1());
}
@@ -3771,7 +3771,7 @@ long unsigned MyMoneyStorageSql::calcHighId
(const long unsigned& i, const TQString& id) {
DBG("*** Entering MyMoneyStorageSql::calcHighId");
TQString nid = id;
- long unsigned high = (unsigned long) nid.tqreplace(TQRegExp("[A-Z]*"), "").toULongLong();
+ long unsigned high = (unsigned long) nid.replace(TQRegExp("[A-Z]*"), "").toULongLong();
return std::max(high, i);
}
@@ -4124,19 +4124,19 @@ const TQString MyMoneyDbDef::generateSQL (const TQString& driver) const {
for (fit = fi.begin(); fit != fi.end(); ++fit) {
TQString toReplace = (*fit)->name();
toReplace.prepend(':');
- TQString tqreplace = "NULL";
+ TQString replace = "NULL";
if ((*fit)->name() == "version")
- tqreplace = TQString::number(m_currentVersion);
+ replace = TQString::number(m_currentVersion);
if ((*fit)->name() == "fixLevel")
- tqreplace = TQString::number
+ replace = TQString::number
(MyMoneyFile::instance()->storage()->currentFixVersion());
if ((*fit)->name() == "created")
- tqreplace = TQDate::tqcurrentDate().toString(Qt::ISODate);
+ replace = TQDate::tqcurrentDate().toString(Qt::ISODate);
if ((*fit)->name() == "lastModified")
- tqreplace = TQDate::tqcurrentDate().toString(Qt::ISODate);
+ replace = TQDate::tqcurrentDate().toString(Qt::ISODate);
if ((*fit)->name() == "updateInProgress")
- tqreplace = enclose("N");
- qs.tqreplace(toReplace, tqreplace);
+ replace = enclose("N");
+ qs.replace(toReplace, replace);
}
qs += "\n\n";
retval += qs;
@@ -4161,18 +4161,18 @@ const TQString MyMoneyDbDef::generateSQL (const TQString& driver) const {
for (act = ac.end(), --act; act != ac.begin(); --act) {
TQString toReplace = (*act)->name();
toReplace.prepend(':');
- TQString tqreplace = "NULL";
+ TQString replace = "NULL";
if ((*act)->name() == "accountType")
- tqreplace = TQString::number(pac->accountType());
+ replace = TQString::number(pac->accountType());
if ((*act)->name() == "accountTypeString")
- tqreplace = enclose(pac->name());
+ replace = enclose(pac->name());
if ((*act)->name() == "isStockAccount")
- tqreplace = enclose("N");
+ replace = enclose("N");
if ((*act)->name() == "accountName")
- tqreplace = enclose(pac->name());
- qs.tqreplace(toReplace, tqreplace);
+ replace = enclose(pac->name());
+ qs.replace(toReplace, replace);
}
- qs.tqreplace (":id", enclose(pac->id())); // a real kludge
+ qs.replace (":id", enclose(pac->id())); // a real kludge
qs += "\n\n";
retval += qs;
}