summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/mymoneygncreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/mymoneygncreader.cpp')
-rw-r--r--kmymoney2/converter/mymoneygncreader.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp
index 10472d2..4d2d71d 100644
--- a/kmymoney2/converter/mymoneygncreader.cpp
+++ b/kmymoney2/converter/mymoneygncreader.cpp
@@ -114,8 +114,8 @@ GncObject::GncObject () {
// Check that the current element is of a version we are coded for
void GncObject::checkVersion (const TQString& elName, const TQXmlAttributes& elAttrs, const map_elementVersions& map) {
TRY
- if (map.tqcontains(elName)) { // if it's not in the map, there's nothing to check
- if (!map[elName].tqcontains(elAttrs.value("version"))) {
+ if (map.contains(elName)) { // if it's not in the map, there's nothing to check
+ if (!map[elName].contains(elAttrs.value("version"))) {
TQString em = i18n("%1: Sorry. This importer cannot handle version %2 of element %3")
.tqarg(__func__).tqarg(elAttrs.value("version")).tqarg(elName);
throw new MYMONEYEXCEPTION (em);
@@ -192,7 +192,7 @@ TQString GncObject::hide (TQString data, unsigned int anonClass) {
case SUPPRESS: result = ""; break; // this is personal and is not essential
case NXTACC: result = i18n("Account%1").tqarg(++nextAccount, -6); break; // generate account name
case NXTEQU: // generate/return an equity name
- it = anonStocks.tqfind (data);
+ it = anonStocks.find (data);
if (it == anonStocks.end()) {
result = i18n("Stock%1").tqarg(++nextEquity, -6);
anonStocks.insert (data, result);
@@ -201,7 +201,7 @@ TQString GncObject::hide (TQString data, unsigned int anonClass) {
}
break;
case NXTPAY: // genearet/return a payee name
- it = anonPayees.tqfind (data);
+ it = anonPayees.find (data);
if (it == anonPayees.end()) {
result = i18n("Payee%1").tqarg(++nextPayee, -6);
anonPayees.insert (data, result);
@@ -340,7 +340,7 @@ void GncKvp::dataEl (const TQXmlAttributes& elAttrs) {
m_kvpType = elAttrs.value("type");
}
m_dataPtr = m_v.at(m_state);
- if (key().tqcontains ("formula")) {
+ if (key().contains ("formula")) {
m_anonClass = MONEY2;
} else {
m_anonClass = ASIS;
@@ -988,9 +988,9 @@ bool XmlReader::characters (const TQString &data) {
TQString anonData = m_co->getData ();
if (anonData.isEmpty()) anonData = pData;
// there must be a TQt standard way of doing the following but I can't ... find it
- anonData.tqreplace ('<', "&lt;");
- anonData.tqreplace ('>', "&gt;");
- anonData.tqreplace ('&', "&amp;");
+ anonData.replace ('<', "&lt;");
+ anonData.replace ('>', "&gt;");
+ anonData.replace ('&', "&amp;");
pMain->oStream << anonData; // write original data
lastType = 1;
#endif // _GNCFILEANON
@@ -1284,7 +1284,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
TQPtrListIterator<GncObject> kvpi (gac->m_kvpList);
GncKvp *k;
while ((k = static_cast<GncKvp *>(kvpi.current())) != 0) {
- if (k->key().tqcontains("price-source") && k->type() == "string") {
+ if (k->key().contains("price-source") && k->type() == "string") {
getPriceSource (e, k->value());
break;
} else {
@@ -1297,7 +1297,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) {
TQPtrListIterator<GncObject> kvpi (gac->m_kvpList);
GncKvp *k;
while ((k = static_cast<GncKvp *>(kvpi.current())) != 0) {
- if (k->key().tqcontains("tax-related") && k->type() == "integer" && k->value() == "1") {
+ if (k->key().contains("tax-related") && k->type() == "integer" && k->value() == "1") {
acc.setValue ("Tax", "Yes");
break;
} else {
@@ -1390,7 +1390,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
MyMoneyAccount splitAccount;
// find the kmm account id coresponding to the gnc id
TQString kmmAccountId;
- map_accountIds::Iterator id = m_mapIds.tqfind(gsp->acct().utf8());
+ map_accountIds::Iterator id = m_mapIds.find(gsp->acct().utf8());
if (id != m_mapIds.end()) {
kmmAccountId = id.data();
} else { // for the case where the acs not found (which shouldn't happen?), create an account with gnc name
@@ -1679,7 +1679,7 @@ void MyMoneyGncReader::convertTemplateSplit (const TQString& schedName, const Gn
}
// find the kmm account id coresponding to the gnc id
TQString kmmAccountId;
- map_accountIds::Iterator id = m_mapIds.tqfind(gncAccountId.utf8());
+ map_accountIds::Iterator id = m_mapIds.find(gncAccountId.utf8());
if (id != m_mapIds.end()) {
kmmAccountId = id.data();
} else { // for the case where the acs not found (which shouldn't happen?), create an account with gnc name
@@ -1940,7 +1940,7 @@ void MyMoneyGncReader::terminate () {
TQString parentKey = (*acc).parentAccountId();
if (gncdebug) qDebug ("acc %s, tqparent %s", (*acc).id().data(),
(*acc).parentAccountId().data());
- map_accountIds::Iterator id = m_mapIds.tqfind(parentKey);
+ map_accountIds::Iterator id = m_mapIds.find(parentKey);
if (id != m_mapIds.end()) {
if (gncdebug) qDebug("Setting account id %s's tqparent account id to %s",
(*acc).id().data(), id.data().data());
@@ -2203,7 +2203,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
MyMoneyAccount stockAcc = m_storage->account (m_mapIds[stockId.utf8()]);
MyMoneyAccount tqparent;
TQString parentKey = stockAcc.parentAccountId();
- map_accountIds::Iterator id = m_mapIds.tqfind (parentKey);
+ map_accountIds::Iterator id = m_mapIds.find (parentKey);
if (id != m_mapIds.end()) {
tqparent = m_storage->account (id.data());
if (tqparent.accountType() == MyMoneyAccount::Investment) return ;
@@ -2270,7 +2270,7 @@ void MyMoneyGncReader::checkInvestmentOption (TQString stockId) {
PACKAGE, i18n("Select tqparent investment account or enter new name. Stock %1").tqarg(stockAcc.name ()),
accList, lastSelected, true, &ok);
if (ok) {
- lastSelected = accList.tqfindIndex (invAccName); // preserve selection for next time
+ lastSelected = accList.findIndex (invAccName); // preserve selection for next time
for (acc = list.begin(); acc != list.end(); ++acc) {
if ((*acc).name() == invAccName) break;
}