diff options
113 files changed, 655 insertions, 655 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 ('<', "<"); - anonData.tqreplace ('>', ">"); - anonData.tqreplace ('&', "&"); + anonData.replace ('<', "<"); + anonData.replace ('>', ">"); + anonData.replace ('&', "&"); 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; } diff --git a/kmymoney2/converter/mymoneyqifprofile.cpp b/kmymoney2/converter/mymoneyqifprofile.cpp index d9ddd60..f9854f9 100644 --- a/kmymoney2/converter/mymoneyqifprofile.cpp +++ b/kmymoney2/converter/mymoneyqifprofile.cpp @@ -119,7 +119,7 @@ void MyMoneyQifProfile::Private::getThirdPosition(void) int missingIndex = -1; int value = 0; for(int i = 0; i < 3; ++i) { - if(!partsPresent.tqcontains(partsAvail[i][0])) { + if(!partsPresent.contains(partsAvail[i][0])) { missingIndex = i; } else { value += m_partPos[partsAvail[i][0]]; @@ -781,7 +781,7 @@ void MyMoneyQifProfile::possibleDateFormats(TQStringList& list) const TQStringList parts = TQStringList::split(",", *it_d); int i; for(i = 0; i < 3; ++i) { - if(d->m_partPos.tqcontains(parts[i][0])) { + if(d->m_partPos.contains(parts[i][0])) { if(d->m_partPos[parts[i][0]] != i) break; } @@ -795,10 +795,10 @@ void MyMoneyQifProfile::possibleDateFormats(TQStringList& list) const // matches all tests if(i == 3) { TQString format = *it_d; - format.tqreplace('y', "%y"); - format.tqreplace('m', "%m"); - format.tqreplace('d', "%d"); - format.tqreplace(',', " "); + format.replace('y', "%y"); + format.replace('m', "%m"); + format.replace('d', "%d"); + format.replace(',', " "); list << format; } } @@ -807,10 +807,10 @@ void MyMoneyQifProfile::possibleDateFormats(TQStringList& list) const if(list.count() == 0) { for(it_d = defaultList.begin(); it_d != defaultList.end(); ++it_d) { TQString format = *it_d; - format.tqreplace('y', "%y"); - format.tqreplace('m', "%m"); - format.tqreplace('d', "%d"); - format.tqreplace(',', " "); + format.replace('y', "%y"); + format.replace('m', "%m"); + format.replace('d', "%d"); + format.replace(',', " "); list << format; } } @@ -863,7 +863,7 @@ void MyMoneyQifProfile::autoDetect(const TQStringList& lines) } break; case 2: - if(numericRecords.tqcontains(c)) { + if(numericRecords.contains(c)) { scanNumeric((*it).mid(1), m_decimal[c], m_thousands[c]); } else if((c == 'D') && (m_dateFormat.isEmpty())) { if(d->m_partPos.count() != 3) { @@ -893,7 +893,7 @@ void MyMoneyQifProfile::autoDetect(const TQStringList& lines) if(d->m_partPos.count() != 3 && datesScanned > 20) { TQMap<int, int> sortedPos; // make sure to reset the known parts for the following algorithm - if(d->m_partPos.tqcontains('y')) { + if(d->m_partPos.contains('y')) { d->m_changeCount[d->m_partPos['y']] = -1; for(int i = 0; i < 3; ++i) { if(d->m_partPos['y'] == i) @@ -904,9 +904,9 @@ void MyMoneyQifProfile::autoDetect(const TQStringList& lines) } } } - if(d->m_partPos.tqcontains('d')) + if(d->m_partPos.contains('d')) d->m_changeCount[d->m_partPos['d']] = -1; - if(d->m_partPos.tqcontains('m')) + if(d->m_partPos.contains('m')) d->m_changeCount[d->m_partPos['m']] = -1; for(int i = 0; i < 3; ++i) { @@ -1003,7 +1003,7 @@ void MyMoneyQifProfile::scanDate(const TQString& txt) const } // and if it's in between 12 and 32 and we already identified the // position for the year it must be days - if((value > 12) && (value < 32) && d->m_partPos.tqcontains('y')) { + if((value > 12) && (value < 32) && d->m_partPos.contains('y')) { d->m_partPos['d'] = i; } } diff --git a/kmymoney2/converter/mymoneyqifreader.cpp b/kmymoney2/converter/mymoneyqifreader.cpp index 031ecd5..74513c7 100644 --- a/kmymoney2/converter/mymoneyqifreader.cpp +++ b/kmymoney2/converter/mymoneyqifreader.cpp @@ -121,7 +121,7 @@ class MyMoneyQifReader::Private { void MyMoneyQifReader::Private::fixMultiLineMemo(TQString& memo) const { - memo.tqreplace("\\n", "\n"); + memo.replace("\\n", "\n"); } void MyMoneyQifReader::Private::finishStatement(void) @@ -551,22 +551,22 @@ void MyMoneyQifReader::processQifSpecial(const TQString& _line) line = line.mid(5); // exportable accounts - if(line.lower() == "ccard" || KMyMoneyGlobalSettings::qifCreditCard().lower().tqcontains(line.lower())) { + if(line.lower() == "ccard" || KMyMoneyGlobalSettings::qifCreditCard().lower().contains(line.lower())) { d->accountType = MyMoneyAccount::CreditCard; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "bank" || KMyMoneyGlobalSettings::qifBank().lower().tqcontains(line.lower())) { + } else if(line.lower() == "bank" || KMyMoneyGlobalSettings::qifBank().lower().contains(line.lower())) { d->accountType = MyMoneyAccount::Checkings; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "cash" || KMyMoneyGlobalSettings::qifCash().lower().tqcontains(line.lower())) { + } else if(line.lower() == "cash" || KMyMoneyGlobalSettings::qifCash().lower().contains(line.lower())) { d->accountType = MyMoneyAccount::Cash; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "oth a" || KMyMoneyGlobalSettings::qifAsset().lower().tqcontains(line.lower())) { + } else if(line.lower() == "oth a" || KMyMoneyGlobalSettings::qifAsset().lower().contains(line.lower())) { d->accountType = MyMoneyAccount::Asset; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; @@ -579,7 +579,7 @@ void MyMoneyQifReader::processQifSpecial(const TQString& _line) } else if(line.lower() == "invst" || line.lower() == i18n("TQIF tag for investment account", "Invst").lower()) { d->transactionType = m_entryType = EntryInvestmentTransaction; - } else if(line.lower() == "invoice" || KMyMoneyGlobalSettings::qifInvoice().lower().tqcontains(line.lower())) { + } else if(line.lower() == "invoice" || KMyMoneyGlobalSettings::qifInvoice().lower().contains(line.lower())) { m_entryType = EntrySkip; } else if(line.lower() == "tax") { @@ -1019,7 +1019,7 @@ void MyMoneyQifReader::processTransactionEntry(void) for(;;) { hash = TQString("%1-%2").tqarg(hashBase).tqarg(idx); TQMap<TQString, bool>::const_iterator it; - it = d->m_hashMap.tqfind(hash); + it = d->m_hashMap.find(hash); if(it == d->m_hashMap.end()) { d->m_hashMap[hash] = true; break; @@ -1030,7 +1030,7 @@ void MyMoneyQifReader::processTransactionEntry(void) if(d->firstTransaction) { // check if this is an opening balance transaction and process it out of the statement - if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().tqcontains(payee.lower()))) { + if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().contains(payee.lower()))) { createOpeningBalance(); d->firstTransaction = false; return; @@ -1068,7 +1068,7 @@ void MyMoneyQifReader::processTransactionEntry(void) } tmp = extractLine('L'); - pos = tmp.tqfindRev("--"); + pos = tmp.findRev("--"); if(tmp.left(1) == m_qifProfile.accountDelimiter().left(1)) { // it's a transfer, so we wipe the memo // tmp = ""; why?? @@ -1092,7 +1092,7 @@ void MyMoneyQifReader::processTransactionEntry(void) // Collect data for the account's split s1.m_accountId = m_account.id(); tmp = extractLine('S'); - pos = tmp.tqfindRev("--"); + pos = tmp.findRev("--"); if(pos != -1) { tmp = tmp.left(pos); } @@ -1140,7 +1140,7 @@ void MyMoneyQifReader::processTransactionEntry(void) accountId = transferAccount(tmp, false); } else { -/* pos = tmp.tqfindRev("--"); +/* pos = tmp.findRev("--"); if(pos != -1) { t.setValue("Dialog", tmp.mid(pos+2)); tmp = tmp.left(pos); @@ -1200,7 +1200,7 @@ void MyMoneyQifReader::processTransactionEntry(void) accountId = transferAccount(tmp, false); } else { - pos = tmp.tqfindRev("--"); + pos = tmp.findRev("--"); if(pos != -1) { /// t.setValue("Dialog", tmp.mid(pos+2)); tmp = tmp.left(pos); @@ -1329,7 +1329,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) for(;;) { hash = TQString("%1-%2").tqarg(hashBase).tqarg(idx); TQMap<TQString, bool>::const_iterator it; - it = d->m_hashMap.tqfind(hash); + it = d->m_hashMap.find(hash); if(it == d->m_hashMap.end()) { d->m_hashMap[hash] = true; break; @@ -1543,7 +1543,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) else if (action == "xin" || action == "xout") { TQString payee = extractLine('P'); - if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().tqcontains(payee.lower()))) { + if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().contains(payee.lower()))) { createOpeningBalance(MyMoneyAccount::Investment); return; } @@ -2123,7 +2123,7 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone if(!msg.isEmpty()) accountSelect.setCaption(msg); - it = m_accountTranslation.tqfind((leadIn + MyMoneyFile::AccountSeperator + account.name()).lower()); + it = m_accountTranslation.find((leadIn + MyMoneyFile::AccountSeperator + account.name()).lower()); if(it != m_accountTranslation.end()) { try { account = file->account(*it); diff --git a/kmymoney2/converter/mymoneyqifwriter.cpp b/kmymoney2/converter/mymoneyqifwriter.cpp index 8ab5c0f..d84e325 100644 --- a/kmymoney2/converter/mymoneyqifwriter.cpp +++ b/kmymoney2/converter/mymoneyqifwriter.cpp @@ -188,7 +188,7 @@ void MyMoneyQifWriter::writeTransactionEntry(TQTextStream &s, const MyMoneyTrans if(split.memo().length() > 0) { TQString m = split.memo(); - m.tqreplace('\n', "\\n"); + m.replace('\n', "\\n"); s << "M" << m << endl; } @@ -244,7 +244,7 @@ void MyMoneyQifWriter::writeSplitEntry(TQTextStream& s, const MyMoneySplit& spli if(split.memo().length() > 0) { TQString m = split.memo(); - m.tqreplace('\n', "\\n"); + m.replace('\n', "\\n"); s << "E" << m << endl; } diff --git a/kmymoney2/converter/mymoneystatementreader.cpp b/kmymoney2/converter/mymoneystatementreader.cpp index ad74be4..2a59ad8 100644 --- a/kmymoney2/converter/mymoneystatementreader.cpp +++ b/kmymoney2/converter/mymoneystatementreader.cpp @@ -166,7 +166,7 @@ void MyMoneyStatementReader::Private::assignUniqueBankID(MyMoneySplit& s, const int idx = 1; for(;;) { TQMap<TQString, bool>::const_iterator it; - it = uniqIds.tqfind(hash); + it = uniqIds.find(hash); if(it == uniqIds.end()) { uniqIds[hash] = true; break; @@ -426,7 +426,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes void MyMoneyStatementReader::processPriceEntry(const MyMoneyStatement::Price& p_in) { - if(d->securitiesBySymbol.tqcontains(p_in.m_strSecurity)) { + if(d->securitiesBySymbol.contains(p_in.m_strSecurity)) { MyMoneyPrice price(d->securitiesBySymbol[p_in.m_strSecurity].id(), MyMoneyFile::instance()->baseCurrency().id(), @@ -434,7 +434,7 @@ void MyMoneyStatementReader::processPriceEntry(const MyMoneyStatement::Price& p_ p_in.m_amount, "TQIF"); MyMoneyFile::instance()->addPrice(price); - } else if(d->securitiesByName.tqcontains(p_in.m_strSecurity)) { + } else if(d->securitiesByName.contains(p_in.m_strSecurity)) { MyMoneyPrice price(d->securitiesByName[p_in.m_strSecurity].id(), MyMoneyFile::instance()->baseCurrency().id(), @@ -891,7 +891,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra "referencing \"%1\" will be removed.").tqarg(payeename); TQString askKey = TQString("Statement-Import-Payee-")+payeename; - if(!m_dontAskAgain.tqcontains(askKey)) { + if(!m_dontAskAgain.contains(askKey)) { m_dontAskAgain += askKey; } rc = KMessageBox::questionYesNoCancel(0, msg, i18n("New payee/receiver"), diff --git a/kmymoney2/converter/webpricequote.cpp b/kmymoney2/converter/webpricequote.cpp index 325560b..d1fd158 100644 --- a/kmymoney2/converter/webpricequote.cpp +++ b/kmymoney2/converter/webpricequote.cpp @@ -66,7 +66,7 @@ WebPriceQuote::~WebPriceQuote() bool WebPriceQuote::launch( const TQString& _symbol, const TQString& _id, const TQString& _sourcename ) { - if (_sourcename.tqcontains("Finance::Quote")) + if (_sourcename.contains("Finance::Quote")) return (launchFinanceQuote (_symbol, _id, _sourcename)); else return (launchNative (_symbol, _id, _sourcename)); @@ -87,7 +87,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id, if ( sourcename.isEmpty() ) sourcename = "Yahoo"; - if ( quoteSources().tqcontains(sourcename) ) + if ( quoteSources().contains(sourcename) ) m_source = WebPriceQuoteSource(sourcename); else emit error(TQString("Source <%1> does not exist.").tqarg(sourcename)); @@ -105,7 +105,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id, KURL url; // if the source has room for TWO symbols.. - if ( m_source.m_url.tqcontains("%2") ) + if ( m_source.m_url.contains("%2") ) { // this is a two-symbol quote. split the symbol into two. valid symbol // characters are: 0-9, A-Z and the dot. anything else is a separator @@ -115,7 +115,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id, if ( splitrx.search(m_symbol) != -1 ) url = KURL::fromPathOrURL(m_source.m_url.tqarg(splitrx.cap(1),splitrx.cap(2))); else - kdDebug(2) << "WebPriceQuote::launch() did not tqfind 2 symbols" << endl; + kdDebug(2) << "WebPriceQuote::launch() did not find 2 symbols" << endl; } else // a regular one-symbol quote @@ -316,7 +316,7 @@ void WebPriceQuote::slotParseQuote(const TQString& _quotedata) quotedata.remove(TQRegExp("<[^>]*>")); // &...;'s - quotedata.tqreplace(TQRegExp("&\\w+;")," "); + quotedata.replace(TQRegExp("&\\w+;")," "); // Extra white space quotedata = quotedata.simplifyWhiteSpace(); @@ -352,16 +352,16 @@ void WebPriceQuote::slotParseQuote(const TQString& _quotedata) // set the last one to a period. TQString pricestr = priceRegExp.cap(1); - int pos = pricestr.tqfindRev(TQRegExp("\\D")); + int pos = pricestr.findRev(TQRegExp("\\D")); if ( pos > 0 ) { pricestr[pos] = '.'; - pos = pricestr.tqfindRev(TQRegExp("\\D"),pos-1); + pos = pricestr.findRev(TQRegExp("\\D"),pos-1); } while ( pos > 0 ) { pricestr.remove(pos,1); - pos = pricestr.tqfindRev(TQRegExp("\\D"),pos); + pos = pricestr.findRev(TQRegExp("\\D"),pos); } m_price = pricestr.toDouble(); @@ -639,7 +639,7 @@ TQStringList WebPriceQuote::quoteSourcesNative() TQMap<TQString,WebPriceQuoteSource>::const_iterator it_source = defaults.begin(); while ( it_source != defaults.end() ) { - if ( ! groups.tqcontains( (*it_source).m_name ) ) + if ( ! groups.contains( (*it_source).m_name ) ) { groups += (*it_source).m_name; (*it_source).write(); diff --git a/kmymoney2/dialogs/investactivities.cpp b/kmymoney2/dialogs/investactivities.cpp index b03548a..526b54e 100644 --- a/kmymoney2/dialogs/investactivities.cpp +++ b/kmymoney2/dialogs/investactivities.cpp @@ -44,7 +44,7 @@ bool Activity::isComplete(TQString& reason) const bool rc = false; KMyMoneySecurity* security = dynamic_cast<KMyMoneySecurity*>(haveWidget("security")); if(!security->currentText().isEmpty()) { - rc = security->selector()->tqcontains(security->currentText()); + rc = security->selector()->contains(security->currentText()); } return rc; } @@ -58,7 +58,7 @@ bool Activity::haveAssetAccount(void) const rc = !cat->currentText().isEmpty(); if(rc && !cat->currentText().isEmpty()) { - rc = cat->selector()->tqcontains(cat->currentText()); + rc = cat->selector()->contains(cat->currentText()); } return rc; } @@ -72,7 +72,7 @@ bool Activity::haveCategoryAndAmount(const TQString& category, const TQString& a rc = !cat->currentText().isEmpty(); if(rc && !cat->currentText().isEmpty()) { - rc = cat->selector()->tqcontains(cat->currentText()) || cat->isSplitTransaction(); + rc = cat->selector()->contains(cat->currentText()) || cat->isSplitTransaction(); if(rc && !amount.isEmpty()) { MyMoneyMoney value = dynamic_cast<kMyMoneyEdit*>(haveWidget(amount))->value(); if(!isMultiSelection()) diff --git a/kmymoney2/dialogs/investtransactioneditor.cpp b/kmymoney2/dialogs/investtransactioneditor.cpp index e19a756..6e777ca 100644 --- a/kmymoney2/dialogs/investtransactioneditor.cpp +++ b/kmymoney2/dialogs/investtransactioneditor.cpp @@ -875,7 +875,7 @@ bool InvestTransactionEditor::setupPrice(const MyMoneyTransaction& t, MyMoneySpl if(acc.currencyId() != t.commodity()) { TQMap<TQString, MyMoneyMoney>::Iterator it_p; TQString key = t.commodity() + "-" + acc.currencyId(); - it_p = m_priceInfo.tqfind(key); + it_p = m_priceInfo.find(key); // if it's not found, then collect it from the user first MyMoneyMoney price; diff --git a/kmymoney2/dialogs/kbalancewarning.cpp b/kmymoney2/dialogs/kbalancewarning.cpp index 358210c..f42be18 100644 --- a/kmymoney2/dialogs/kbalancewarning.cpp +++ b/kmymoney2/dialogs/kbalancewarning.cpp @@ -54,7 +54,7 @@ KBalanceWarning::~KBalanceWarning() void KBalanceWarning::slotShowMessage(TQWidget* tqparent, const MyMoneyAccount& account, const TQString& msg) { - if(d->m_deselectedAccounts.tqfind(account.id()) == d->m_deselectedAccounts.end()) { + if(d->m_deselectedAccounts.find(account.id()) == d->m_deselectedAccounts.end()) { KMessageBox::information(tqparent, msg, TQString(), d->dontShowAgain()); if(!KMessageBox::shouldBeShownContinue(d->dontShowAgain())) { d->m_deselectedAccounts[account.id()] = true; diff --git a/kmymoney2/dialogs/kcurrencycalculator.cpp b/kmymoney2/dialogs/kcurrencycalculator.cpp index c27e337..1b73ecd 100644 --- a/kmymoney2/dialogs/kcurrencycalculator.cpp +++ b/kmymoney2/dialogs/kcurrencycalculator.cpp @@ -72,7 +72,7 @@ bool KCurrencyCalculator::setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTra fromValue = s.value().abs(); // if we had a price info in the beginning, we use it here - if(priceInfo.tqfind(cat.currencyId()) != priceInfo.end()) { + if(priceInfo.find(cat.currencyId()) != priceInfo.end()) { toValue = (fromValue * priceInfo[cat.currencyId()]).convert(fract); } diff --git a/kmymoney2/dialogs/keditloanwizard.cpp b/kmymoney2/dialogs/keditloanwizard.cpp index 3992550..7fda8bc 100644 --- a/kmymoney2/dialogs/keditloanwizard.cpp +++ b/kmymoney2/dialogs/keditloanwizard.cpp @@ -234,7 +234,7 @@ void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) void KEditLoanWizard::next() { bool dontLeavePage = false; - TQButton* button = m_selectionButtonGroup->tqfind(m_lastSelection); + TQButton* button = m_selectionButtonGroup->find(m_lastSelection); if(currentPage() == m_editSelectionPage) { diff --git a/kmymoney2/dialogs/keditscheduledlg.cpp b/kmymoney2/dialogs/keditscheduledlg.cpp index ecb9184..42fc31e 100644 --- a/kmymoney2/dialogs/keditscheduledlg.cpp +++ b/kmymoney2/dialogs/keditscheduledlg.cpp @@ -394,7 +394,7 @@ bool KEditScheduleDlg::focusNextPrevChild(bool next) TQWidget *currentWidget; w = tqApp->tqfocusWidget(); - while(w && d->m_tabOrderWidgets.tqfind(w) == -1) { + while(w && d->m_tabOrderWidgets.find(w) == -1) { // qDebug("'%s' not in list, use tqparent", w->className()); w = w->parentWidget(); } diff --git a/kmymoney2/dialogs/kenterscheduledlg.cpp b/kmymoney2/dialogs/kenterscheduledlg.cpp index df6f893..58d2e25 100644 --- a/kmymoney2/dialogs/kenterscheduledlg.cpp +++ b/kmymoney2/dialogs/kenterscheduledlg.cpp @@ -290,7 +290,7 @@ bool KEnterScheduleDlg::focusNextPrevChild(bool next) TQWidget *currentWidget; w = tqApp->tqfocusWidget(); - while(w && d->m_tabOrderWidgets.tqfind(w) == -1) { + while(w && d->m_tabOrderWidgets.find(w) == -1) { // qDebug("'%s' not in list, use tqparent", w->className()); w = w->parentWidget(); } diff --git a/kmymoney2/dialogs/kequitypriceupdatedlg.cpp b/kmymoney2/dialogs/kequitypriceupdatedlg.cpp index f5014d0..ede8f88 100644 --- a/kmymoney2/dialogs/kequitypriceupdatedlg.cpp +++ b/kmymoney2/dialogs/kequitypriceupdatedlg.cpp @@ -185,7 +185,7 @@ void KEquityPriceUpdateDlg::addPricePair(const MyMoneySecurityPair& pair, bool d TQString symbol = TQString("%1 > %2").tqarg(pair.first,pair.second); TQString id = TQString("%1 %2").tqarg(pair.first,pair.second); - if ( ! lvEquityList->tqfindItem(id,ID_COL,TQt::ExactMatch) ) + if ( ! lvEquityList->findItem(id,ID_COL,TQt::ExactMatch) ) { MyMoneyPrice pr = file->price(pair.first,pair.second); if(pr.source() != "KMyMoney") { @@ -237,7 +237,7 @@ void KEquityPriceUpdateDlg::addInvestment(const MyMoneySecurity& inv) TQString symbol = inv.tradingSymbol(); TQString id = inv.id(); - if ( ! lvEquityList->tqfindItem(id, ID_COL, TQt::ExactMatch) ) + if ( ! lvEquityList->findItem(id, ID_COL, TQt::ExactMatch) ) { // check that the security is still in use TQValueList<MyMoneyAccount>::const_iterator it_a; @@ -290,14 +290,14 @@ MyMoneyPrice KEquityPriceUpdateDlg::price(const TQString& id) const MyMoneyPrice price; TQListViewItem* item; - if((item = lvEquityList->tqfindItem(id, ID_COL, TQt::ExactMatch)) != 0) { + if((item = lvEquityList->findItem(id, ID_COL, TQt::ExactMatch)) != 0) { MyMoneyMoney rate(item->text(PRICE_COL)); if ( !rate.isZero() ) { TQString id = item->text(ID_COL).utf8(); // if the ID has a space, then this is TWO ID's, so it's a currency quote - if ( TQString(id).tqcontains(" ") ) + if ( TQString(id).contains(" ") ) { TQStringList ids = TQStringList::split(" ",TQString(id)); TQString fromid = ids[0].utf8(); @@ -337,7 +337,7 @@ void KEquityPriceUpdateDlg::storePrices(void) TQString id = item->text(ID_COL).utf8(); // if the ID has a space, then this is TWO ID's, so it's a currency quote - if ( TQString(id).tqcontains(" ") ) + if ( TQString(id).contains(" ") ) { TQStringList ids = TQStringList::split(" ",TQString(id)); TQString fromid = ids[0].utf8(); @@ -417,11 +417,11 @@ void KEquityPriceUpdateDlg::slotUpdateAllClicked(void) void KEquityPriceUpdateDlg::slotQuoteFailed(const TQString& _id, const TQString& _symbol) { - TQListViewItem* item = lvEquityList->tqfindItem(_id,ID_COL,TQt::ExactMatch); + TQListViewItem* item = lvEquityList->findItem(_id,ID_COL,TQt::ExactMatch); // Give the user some options int result; - if(_id.tqcontains(" ")) { + if(_id.contains(" ")) { result = KMessageBox::warningContinueCancel(this, i18n("Failed to retrieve an exchange rate for %1 from %2. It will be skipped this time.").tqarg(_symbol, item->text(SOURCE_COL)), i18n("Price Update Failed")); } else { result = KMessageBox::questionYesNoCancel(this, TQString("<qt>%1</qt>").tqarg(i18n("Failed to retrieve a quote for %1 from %2. Press <b>No</b> to remove the online price source from this security permanently, <b>Yes</b> to continue updating this security during future price updates or <b>Cancel</b> to stop the current update operation.").tqarg(_symbol, item->text(SOURCE_COL))), i18n("Price Update Failed"), KStdGuiItem::yes(), KStdGuiItem::no()); @@ -484,7 +484,7 @@ void KEquityPriceUpdateDlg::slotQuoteFailed(const TQString& _id, const TQString& void KEquityPriceUpdateDlg::slotReceivedQuote(const TQString& _id, const TQString& _symbol,const TQDate& _date, const double& _price) { - TQListViewItem* item = lvEquityList->tqfindItem(_id,ID_COL,TQt::ExactMatch); + TQListViewItem* item = lvEquityList->findItem(_id,ID_COL,TQt::ExactMatch); TQListViewItem* next = NULL; if ( item ) @@ -498,7 +498,7 @@ void KEquityPriceUpdateDlg::slotReceivedQuote(const TQString& _id, const TQStrin double price = _price; TQString id = _id.utf8(); MyMoneySecurity sec; - if ( _id.tqcontains(" ") == 0) { + if ( _id.contains(" ") == 0) { MyMoneySecurity security = MyMoneyFile::instance()->security(id); TQString factor = security.value("kmm-online-factor"); if(!factor.isEmpty()) { diff --git a/kmymoney2/dialogs/kexportdlg.cpp b/kmymoney2/dialogs/kexportdlg.cpp index 701d138..a0b5743 100644 --- a/kmymoney2/dialogs/kexportdlg.cpp +++ b/kmymoney2/dialogs/kexportdlg.cpp @@ -143,7 +143,7 @@ void KExportDlg::loadProfiles(const bool selectLast) } m_profileComboBox->setCurrentItem(0); - if(list.tqcontains(current) > 0) + if(list.contains(current) > 0) m_profileComboBox->setCurrentText(current); } @@ -243,7 +243,7 @@ void KExportDlg::loadAccounts(void) /* m_accountComboBox->setCurrentItem(0); - if(strList.tqcontains(current) > 0) + if(strList.contains(current) > 0) m_accountComboBox->setCurrentText(current); */ } diff --git a/kmymoney2/dialogs/kfindtransactiondlg.cpp b/kmymoney2/dialogs/kfindtransactiondlg.cpp index a1d5214..5c7a789 100644 --- a/kmymoney2/dialogs/kfindtransactiondlg.cpp +++ b/kmymoney2/dialogs/kfindtransactiondlg.cpp @@ -307,7 +307,7 @@ void KFindTransactionDlg::selectItems(TQListView* view, const TQStringList& list for(it_v = view->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == TQCheckListItem::CheckBox && list.tqcontains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && list.contains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, list, state); @@ -342,7 +342,7 @@ void KFindTransactionDlg::selectSubItems(TQListViewItem* item, const TQStringLis for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(list.tqcontains(it_c->id())) + if(list.contains(it_c->id())) it_c->setOn(state); selectSubItems(it_v, list, state); } @@ -568,7 +568,7 @@ void KFindTransactionDlg::setupFilter(void) MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.tqcontains(*it_b)) { + if(!list.contains(*it_b)) { missing.append(*it_b); } } diff --git a/kmymoney2/dialogs/kimportdlg.cpp b/kmymoney2/dialogs/kimportdlg.cpp index e8489d2..4a1b591 100644 --- a/kmymoney2/dialogs/kimportdlg.cpp +++ b/kmymoney2/dialogs/kimportdlg.cpp @@ -201,7 +201,7 @@ void KImportDlg::loadProfiles(const bool selectLast) } m_profileComboBox->setCurrentItem(0); - if(list.tqcontains(current) > 0) { + if(list.contains(current) > 0) { m_profileComboBox->setCurrentText(current); } } diff --git a/kmymoney2/dialogs/kmymoneysplittable.cpp b/kmymoney2/dialogs/kmymoneysplittable.cpp index d1182ec..61b8d4e 100644 --- a/kmymoney2/dialogs/kmymoneysplittable.cpp +++ b/kmymoney2/dialogs/kmymoneysplittable.cpp @@ -136,7 +136,7 @@ void kMyMoneySplitTable::paintCell(TQPainter *p, int row, int col, const TQRect& TQString qstringCategory; TQString qstringMemo; - int intPos = firsttext.tqfind("|"); + int intPos = firsttext.find("|"); if(intPos > -1) { qstringCategory = firsttext.left(intPos); @@ -199,7 +199,7 @@ void kMyMoneySplitTable::columnWidthChanged(int col) } /** Override the TQTable member function to avoid confusion with our own functionality */ -void kMyMoneySplitTable::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/ ) +void kMyMoneySplitTable::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/ ) { } @@ -735,7 +735,7 @@ void kMyMoneySplitTable::endEdit(bool keyBoardDriven) fromValue = s1.value().abs(); // if we had a price info in the beginning, we use it here - if(m_priceInfo.tqfind(cat.currencyId()) != m_priceInfo.end()) { + if(m_priceInfo.find(cat.currencyId()) != m_priceInfo.end()) { toValue = (fromValue * m_priceInfo[cat.currencyId()]).convert(fract); } @@ -969,7 +969,7 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) TQWidget *w = 0; TQWidget *currentWidget; - m_tabOrderWidgets.tqfind(tqApp->tqfocusWidget()); + m_tabOrderWidgets.find(tqApp->tqfocusWidget()); currentWidget = m_tabOrderWidgets.current(); w = next ? m_tabOrderWidgets.next() : m_tabOrderWidgets.prev(); diff --git a/kmymoney2/dialogs/kmymoneysplittable.h b/kmymoney2/dialogs/kmymoneysplittable.h index 477084f..2fda964 100644 --- a/kmymoney2/dialogs/kmymoneysplittable.h +++ b/kmymoney2/dialogs/kmymoneysplittable.h @@ -93,7 +93,7 @@ protected: void contentsMouseReleaseEvent( TQMouseEvent* e ); void contentsMouseDoubleClickEvent( TQMouseEvent* e ); bool eventFilter(TQObject *o, TQEvent *e); - void endEdit(int row, int col, bool accept, bool tqreplace ); + void endEdit(int row, int col, bool accept, bool replace ); void resizeEvent(TQResizeEvent*); TQWidget* createEditWidgets(void); diff --git a/kmymoney2/dialogs/kreconciledlg.cpp b/kmymoney2/dialogs/kreconciledlg.cpp index f7911b2..11a2a00 100644 --- a/kmymoney2/dialogs/kreconciledlg.cpp +++ b/kmymoney2/dialogs/kreconciledlg.cpp @@ -354,14 +354,14 @@ void KReconcileDlg::reloadLists() if (transaction->state()!=MyMoneyTransaction::Reconciled) { if (transaction->type() == MyMoneyTransaction::Debit) { transaction->setIndex(i); - if(m_debitsTQList.tqfind(transaction) < 0) + if(m_debitsTQList.find(transaction) < 0) { m_debitsTQList.append(transaction); } } else { transaction->setIndex(i); - if(m_creditsTQList.tqfind(transaction) < 0) + if(m_creditsTQList.find(transaction) < 0) { m_creditsTQList.append(transaction); } diff --git a/kmymoney2/dialogs/kselectdatabasedlg.cpp b/kmymoney2/dialogs/kselectdatabasedlg.cpp index 47d092d..cf29d4e 100644 --- a/kmymoney2/dialogs/kselectdatabasedlg.cpp +++ b/kmymoney2/dialogs/kselectdatabasedlg.cpp @@ -62,7 +62,7 @@ KSelectDatabaseDlg::KSelectDatabaseDlg(TQWidget *tqparent, const char *name) TQStringList::Iterator it = list.begin(); while(it != list.end()) { TQString dname = *it; - if (map.keys().tqcontains(dname)) { // only display if driver is supported + if (map.keys().contains(dname)) { // only display if driver is supported dname = dname + " - " + map[dname]; listDrivers->insertItem (dname); } @@ -106,11 +106,11 @@ KSelectDatabaseDlg::KSelectDatabaseDlg(KURL openURL, TQWidget *tqparent, const c TQStringList list = TQSqlDatabase::drivers(); // list drivers supported by KMM TQMap<TQString, TQString> map = m_map.driverMap(); - if (!list.tqcontains(driverName)) { + if (!list.contains(driverName)) { KMessageBox::error (0, i18n("TQt SQL driver %1 is no longer installed on your system").tqarg(driverName), ""); setError(); - } else if (!map.tqcontains(driverName)) { + } else if (!map.contains(driverName)) { KMessageBox::error (0, i18n("TQt SQL driver %1 is not suported").tqarg(driverName), ""); setError(); diff --git a/kmymoney2/dialogs/kstartdlg.cpp b/kmymoney2/dialogs/kstartdlg.cpp index afdef28..f1c413f 100644 --- a/kmymoney2/dialogs/kstartdlg.cpp +++ b/kmymoney2/dialogs/kstartdlg.cpp @@ -141,7 +141,7 @@ void KStartDlg::readConfig() value = config->readEntry( TQString( "File%1" ).tqarg( i ), TQString() ); if( !value.isNull() && fileExists(value) ) { - TQString file_name = value.mid(value.tqfindRev('/')+1); + TQString file_name = value.mid(value.findRev('/')+1); (void)new KRecentFileItem( value, view_recent, file_name, il->loadIcon("kmy", KIcon::Desktop, KIcon::SizeLarge)); } i++; diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp index cdb7a34..e24b76f 100644 --- a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp +++ b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp @@ -64,11 +64,11 @@ TQValidator::State MyMoneyQifProfileNameValidator::validate(TQString& name, int& TQStringList list = config->readListEntry("profiles"); // invalid character? - if(name.tqcontains(",") != 0) + if(name.contains(",") != 0) return TQValidator::Invalid; // would not work in this form (empty or existing name) - if(name.isEmpty() || list.tqcontains(name)) + if(name.isEmpty() || list.contains(name)) return TQValidator::Intermediate; // is OK @@ -264,13 +264,13 @@ void MyMoneyQifProfileEditor::slotLoadProfileFromConfig(const TQString& profile) m_isDirty = true; } - if(m_profileListBox->tqfindItem(profileName, TQt::ExactMatch | TQt::CaseSensitive) == NULL) { + if(m_profileListBox->findItem(profileName, TQt::ExactMatch | TQt::CaseSensitive) == NULL) { profileName = m_profileListBox->text(0); } m_profile.loadProfile("Profile-" + profileName); - TQListBoxItem *lbi = m_profileListBox->tqfindItem(profileName, TQt::ExactMatch | TQt::CaseSensitive); + TQListBoxItem *lbi = m_profileListBox->findItem(profileName, TQt::ExactMatch | TQt::CaseSensitive); int idx = m_profileListBox->index(lbi); showProfile(); if(idx >= 0) { diff --git a/kmymoney2/dialogs/settings/ksettingsgpg.cpp b/kmymoney2/dialogs/settings/ksettingsgpg.cpp index f34c2d8..b6cca2e 100644 --- a/kmymoney2/dialogs/settings/ksettingsgpg.cpp +++ b/kmymoney2/dialogs/settings/ksettingsgpg.cpp @@ -151,11 +151,11 @@ void KSettingsGpg::show(void) if(fields[0] != RECOVER_KEY_ID_FULL) { // replace parenthesis in name field with brackets TQString name = fields[1]; - name.tqreplace('(', "["); - name.tqreplace(')', "]"); + name.replace('(', "["); + name.replace(')', "]"); name = TQString("%1 (0x%2)").tqarg(name).tqarg(fields[0]); m_masterKeyCombo->insertItem(name); - if(name.tqcontains(masterKey)) + if(name.contains(masterKey)) m_masterKeyCombo->setCurrentItem(name); } } diff --git a/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp b/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp index a17fd6e..670e5ab 100644 --- a/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp +++ b/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp @@ -104,7 +104,7 @@ void KSettingsOnlineQuotes::loadList(const bool updateResetList) m_quoteSourceList->setSelected(first, true); slotLoadWidgets(first); - m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); } void KSettingsOnlineQuotes::resetConfig(void) @@ -190,7 +190,7 @@ void KSettingsOnlineQuotes::slotNewEntry(void) WebPriceQuoteSource newSource(i18n("New Quote Source")); newSource.write(); loadList(); - TQListViewItem* item = m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0); + TQListViewItem* item = m_quoteSourceList->findItem(i18n("New Quote Source"), 0); if(item) { m_quoteSourceList->setSelected(item, true); slotLoadWidgets(item); @@ -213,7 +213,7 @@ void KSettingsOnlineQuotes::slotEntryRenamed(TQListViewItem* item, const TQStrin } else { item->setText(0, m_currentItem.m_name); } - m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); } #include "ksettingsonlinequotes.moc" diff --git a/kmymoney2/dialogs/transactioneditor.cpp b/kmymoney2/dialogs/transactioneditor.cpp index bd73eac..ec01613 100644 --- a/kmymoney2/dialogs/transactioneditor.cpp +++ b/kmymoney2/dialogs/transactioneditor.cpp @@ -160,7 +160,7 @@ bool TransactionEditor::eventFilter(TQObject* o, TQEvent* e) // the object is one of our edit widgets, then .... if(o->isWidgetType() && (e->type() == TQEvent::KeyPress) - && m_editWidgets.values().tqcontains(dynamic_cast<TQWidget*>(o))) { + && m_editWidgets.values().contains(dynamic_cast<TQWidget*>(o))) { TQKeyEvent* k = dynamic_cast<TQKeyEvent*>(e); if((k->state() & TQt::KeyButtonMask) == 0) { bool isFinal = false; @@ -1241,7 +1241,7 @@ void StdTransactionEditor::autoFill(const TQString& payeeId) TQMap<TQString, struct uniqTransaction>::iterator it_u; do { TQString ukey = TQString("%1-%2").tqarg(key).tqarg(cnt); - it_u = uniqList.tqfind(ukey); + it_u = uniqList.find(ukey); if(it_u == uniqList.end()) { uniqList[ukey].t = &((*it_t).first); uniqList[ukey].cnt = 1; @@ -2109,7 +2109,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone return false; } else { MyMoneyAccount cat = MyMoneyFile::instance()->account(s1.accountId()); - if(m_priceInfo.tqfind(cat.currencyId()) != m_priceInfo.end()) { + if(m_priceInfo.find(cat.currencyId()) != m_priceInfo.end()) { shares = (s1.value() * m_priceInfo[cat.currencyId()]).reduce().convert(cat.fraction()); } else diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp index d058367..f9e3bf9 100644 --- a/kmymoney2/kmymoney2.cpp +++ b/kmymoney2/kmymoney2.cpp @@ -333,7 +333,7 @@ void KMyMoney2App::initActions(void) // ************* // The Edit menu // ************* - new KAction(i18n("Find transaction..."), "transaction_tqfind", KShortcut("Ctrl+F"), TQT_TQOBJECT(this), TQT_SLOT(slotFindTransaction()), actionCollection(), "edit_find_transaction"); + new KAction(i18n("Find transaction..."), "transaction_find", KShortcut("Ctrl+F"), TQT_TQOBJECT(this), TQT_SLOT(slotFindTransaction()), actionCollection(), "edit_find_transaction"); // ************* // The View menu @@ -1090,11 +1090,11 @@ bool KMyMoney2App::slotFileSaveAs(void) if(fields[0] != RECOVER_KEY_ID) { // replace parenthesis in name field with brackets TQString name = fields[1]; - name.tqreplace('(', "["); - name.tqreplace(')', "]"); + name.replace('(', "["); + name.replace(')', "]"); name = TQString("%1 (0x%2)").tqarg(name).tqarg(fields[0]); m_saveEncrypted->insertItem(name); - if(name.tqcontains(KMyMoneyGlobalSettings::gpgRecipient())) { + if(name.contains(KMyMoneyGlobalSettings::gpgRecipient())) { m_saveEncrypted->setCurrentItem(name); } } @@ -1128,13 +1128,13 @@ bool KMyMoney2App::slotFileSaveAs(void) // end of copy // find last . delimiter - int nLoc = newName.tqfindRev('.'); + int nLoc = newName.findRev('.'); if(nLoc != -1) { TQString strExt, strTemp; strTemp = newName.left(nLoc + 1); strExt = newName.right(newName.length() - (nLoc + 1)); - if((strExt.tqfind("kmy", 0, FALSE) == -1) && (strExt.tqfind("xml", 0, FALSE) == -1)) + if((strExt.find("kmy", 0, FALSE) == -1) && (strExt.find("xml", 0, FALSE) == -1)) { strTemp.append("kmy"); @@ -1487,13 +1487,13 @@ void KMyMoney2App::slotSaveAccountTemplates(void) if(!newName.isEmpty()) { // find last . delimiter - int nLoc = newName.tqfindRev('.'); + int nLoc = newName.findRev('.'); if(nLoc != -1) { TQString strExt, strTemp; strTemp = newName.left(nLoc + 1); strExt = newName.right(newName.length() - (nLoc + 1)); - if((strExt.tqfind("kmt", 0, FALSE) == -1)) + if((strExt.find("kmt", 0, FALSE) == -1)) { strTemp.append("kmt"); //append to make complete file name @@ -2258,7 +2258,7 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const int pos; // check for ':' in the name and use it as separator for a hierarchy TQString name = acc.name(); - while((pos = name.tqfind(MyMoneyFile::AccountSeperator)) != -1) { + while((pos = name.find(MyMoneyFile::AccountSeperator)) != -1) { TQString part = name.left(pos); TQString remainder = name.mid(pos+1); const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part); @@ -2297,7 +2297,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par { int pos; // check for ':' in the name and use it as separator for a hierarchy - while((pos = newAccount.name().tqfind(MyMoneyFile::AccountSeperator)) != -1) { + while((pos = newAccount.name().find(MyMoneyFile::AccountSeperator)) != -1) { TQString part = newAccount.name().left(pos); TQString remainder = newAccount.name().mid(pos+1); const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part); @@ -2984,7 +2984,7 @@ void KMyMoney2App::slotAccountEdit(void) // if we have an online provider for this account, we need to check // that we have the corresponding plugin. If that exists, we ask it // to provide an additional tab for the account editor. - it_plugin = m_onlinePlugins.tqfind(kvp["provider"]); + it_plugin = m_onlinePlugins.find(kvp["provider"]); if(it_plugin != m_onlinePlugins.end()) { TQString name; TQWidget *w = 0; @@ -3103,7 +3103,7 @@ void KMyMoney2App::slotAccountReconcileStart(void) MyMoneySchedule sch(*(it_sch)); // and enter it if it is not on the skip list - if(skipMap.tqfind((*it_sch).id()) == skipMap.end()) { + if(skipMap.find((*it_sch).id()) == skipMap.end()) { rc = enterSchedule(sch, false, true); if(rc == KMyMoneyUtils::Ignore) { skipMap[(*it_sch).id()] = true; @@ -3850,7 +3850,7 @@ void KMyMoney2App::slotPayeeDelete(void) TQValueList<MyMoneyPayee> remainingPayees = file->payeeList(); TQValueList<MyMoneyPayee>::iterator it_p; for(it_p = remainingPayees.begin(); it_p != remainingPayees.end(); ) { - if(m_selectedPayees.tqfind(*it_p) != m_selectedPayees.end()) { + if(m_selectedPayees.find(*it_p) != m_selectedPayees.end()) { it_p = remainingPayees.erase(it_p); } else { ++it_p; @@ -4001,7 +4001,7 @@ void KMyMoney2App::slotPayeeDelete(void) } if(it_k == payeeNames.end()) payeeNames << TQRegExp::escape(*it_n); - } else if(payeeNames.tqcontains(*it_n) == 0) + } else if(payeeNames.contains(*it_n) == 0) payeeNames << TQRegExp::escape(*it_n); } @@ -5362,7 +5362,7 @@ void KMyMoney2App::slotUpdateActions(void) for(it_a = accList.begin(); (it_p == m_onlinePlugins.end()) && (it_a != accList.end()); ++it_a) { if ( !(*it_a).onlineBankingSettings().value("provider").isEmpty() ) { // check if provider is available - it_p = m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { TQStringList protocols; (*it_p)->protocols(protocols); @@ -5407,7 +5407,7 @@ void KMyMoney2App::slotUpdateActions(void) action("account_online_unmap")->setEnabled(true); // check if provider is available TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; - it_p = m_onlinePlugins.tqfind(m_selectedAccount.onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.find(m_selectedAccount.onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { TQStringList protocols; (*it_p)->protocols(protocols); @@ -5566,7 +5566,7 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa if(!payee.name().isEmpty()) { m_payeeGoto = payee.id(); TQString name = payee.name(); - name.tqreplace(TQRegExp("&(?!&)"), "&&"); + name.replace(TQRegExp("&(?!&)"), "&&"); action("transaction_goto_payee")->setText(i18n("Goto '%1'").tqarg(name)); } } catch(MyMoneyException *e) { @@ -5588,7 +5588,7 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa } m_accountGoto = acc.id(); TQString name = acc.name(); - name.tqreplace(TQRegExp("&(?!&)"), "&&"); + name.replace(TQRegExp("&(?!&)"), "&&"); action("transaction_goto_account")->setText(i18n("Goto '%1'").tqarg(name)); break; } @@ -5828,7 +5828,7 @@ const TQValueList<TQCString> KMyMoney2App::instanceList(void) const // skip over myself if((*it) == kapp->dcopClient()->appId()) continue; - if((*it).tqfind("kmymoney-") == 0) { + if((*it).find("kmymoney-") == 0) { list += (*it); } } @@ -6002,7 +6002,7 @@ const MyMoneyAccount& KMyMoney2App::account(const TQString& key, const TQString& TQValueList<MyMoneyAccount> accList; for(it_a = list.begin(); it_a != list.end(); ++it_a) { const TQString& id = (*it_a).onlineBankingSettings().value(key); - if(id.tqcontains(value)) { + if(id.contains(value)) { accList << MyMoneyFile::instance()->account((*it_a).id()); } if(id == value) { @@ -6072,7 +6072,7 @@ void KMyMoney2App::slotAccountMapOnline(void) return; // check if user tries to map a brokerageAccount - if(m_selectedAccount.name().tqcontains(i18n(" (Brokerage)"))) { + if(m_selectedAccount.name().contains(i18n(" (Brokerage)"))) { if(KMessageBox::warningContinueCancel(this, i18n("You try to map a brokerage account to an online account. This is usually not advisable. In general, the investment account should be mapped to the online account. Please cancel if you intended to map the investment account, continue otherwise"), i18n("Mapping brokerage account")) == KMessageBox::Cancel) { return; } @@ -6108,7 +6108,7 @@ void KMyMoney2App::slotAccountMapOnline(void) return; // find the provider - it_p = m_onlinePlugins.tqfind(provider); + it_p = m_onlinePlugins.find(provider); if(it_p != m_onlinePlugins.end()) { // plugin found, call it MyMoneyKeyValueContainer settings; @@ -6141,7 +6141,7 @@ void KMyMoney2App::slotAccountUpdateOnlineAll(void) // provider is not currently present for(it_a = accList.begin(); it_a != accList.end();) { if ((*it_a).onlineBankingSettings().value("provider").isEmpty() - || m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")) == m_onlinePlugins.end() ) { + || m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")) == m_onlinePlugins.end() ) { it_a = accList.remove(it_a); } else ++it_a; @@ -6150,7 +6150,7 @@ void KMyMoney2App::slotAccountUpdateOnlineAll(void) // now work on the remaining list of accounts int cnt = accList.count() - 1; for(it_a = accList.begin(); it_a != accList.end(); ++it_a) { - it_p = m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")); (*it_p)->updateAccount(*it_a, cnt != 0); --cnt; } @@ -6172,7 +6172,7 @@ void KMyMoney2App::slotAccountUpdateOnline(void) // find the provider TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; - it_p = m_onlinePlugins.tqfind(m_selectedAccount.onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.find(m_selectedAccount.onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { // plugin found, call it d->m_collectingStatements = true; diff --git a/kmymoney2/kmymoneyglobalsettings.cpp b/kmymoney2/kmymoneyglobalsettings.cpp index 8daaa2f..9e205f8 100644 --- a/kmymoney2/kmymoneyglobalsettings.cpp +++ b/kmymoney2/kmymoneyglobalsettings.cpp @@ -77,7 +77,7 @@ TQStringList KMyMoneyGlobalSettings::itemList(void) TQStringList::iterator it_s; for(it_s = all.begin(); it_s != all.end(); ++it_s) { exp.search(*it_s); - if(!list.tqcontains(exp.cap(1)) && !list.tqcontains(TQString("-%1").tqarg(exp.cap(1)))) { + if(!list.contains(exp.cap(1)) && !list.contains(TQString("-%1").tqarg(exp.cap(1)))) { list << *it_s; } } diff --git a/kmymoney2/kmymoneytest.cpp b/kmymoney2/kmymoneytest.cpp index fd89b69..c4a997f 100644 --- a/kmymoney2/kmymoneytest.cpp +++ b/kmymoney2/kmymoneytest.cpp @@ -73,11 +73,11 @@ class MyProgressListener : public CppUnit::TextTestProgressListener { void startTest(CppUnit::Test *test) { TQString name = test->getName().c_str(); - if(name.tqfind('.') != -1) { // in CPPUNIT 1.8.0 + if(name.find('.') != -1) { // in CPPUNIT 1.8.0 name = name.mid(2); // cut off first 2 chars - name = name.left(name.tqfind('.')); - } else if(name.tqfind("::") != -1) { // in CPPUNIT 1.9.14 - name = name.left(name.tqfind("::")); + name = name.left(name.find('.')); + } else if(name.find("::") != -1) { // in CPPUNIT 1.9.14 + name = name.left(name.find("::")); } if(m_name != name) { if(m_name != "") diff --git a/kmymoney2/kmymoneyutils.cpp b/kmymoney2/kmymoneyutils.cpp index fdff861..428c259 100644 --- a/kmymoney2/kmymoneyutils.cpp +++ b/kmymoney2/kmymoneyutils.cpp @@ -227,14 +227,14 @@ bool KMyMoneyUtils::appendCorrectFileExt(TQString& str, const TQString& strExtTo if(!str.isEmpty()) { //find last . delminator - int nLoc = str.tqfindRev('.'); + int nLoc = str.findRev('.'); if(nLoc != -1) { TQString strExt, strTemp; strTemp = str.left(nLoc + 1); strExt = str.right(str.length() - (nLoc + 1)); - if(strExt.tqfind(strExtToUse, 0, FALSE) == -1) { + if(strExt.find(strExtToUse, 0, FALSE) == -1) { // if the extension given contains a period, we remove our's - if(strExtToUse.tqfind('.') != -1) + if(strExtToUse.find('.') != -1) strTemp = strTemp.left(strTemp.length()-1); //append extension to make complete file name strTemp.append(strExtToUse); @@ -280,7 +280,7 @@ TQString KMyMoneyUtils::findResource(const char* type, const TQString& filename) TQString rc, tqmask; // check that the placeholder is present - if(!filename.tqfind("%1")) { + if(!filename.find("%1")) { qWarning("%%1 not found in '%s'", filename.latin1()); return filename; } 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("<", "<"); + xml.replace("<", "<"); 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("<", "<"); + xml.replace("<", "<"); 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; } diff --git a/kmymoney2/plugins/ofximport/ofximporterplugin.cpp b/kmymoney2/plugins/ofximport/ofximporterplugin.cpp index 77b790e..82919e0 100644 --- a/kmymoney2/plugins/ofximport/ofximporterplugin.cpp +++ b/kmymoney2/plugins/ofximport/ofximporterplugin.cpp @@ -93,7 +93,7 @@ TQString OfxImporterPlugin::formatFilenameFilter(void) const bool OfxImporterPlugin::isMyFormat( const TQString& filename ) const { - // filename is considered an Ofx file if it tqcontains + // filename is considered an Ofx file if it contains // the tag "<OFX>" or "<OFC>" in the first 20 lines // which contain some data. bool result = false; @@ -108,8 +108,8 @@ bool OfxImporterPlugin::isMyFormat( const TQString& filename ) const { // get a line of data and remove all unnecessary whitepace chars TQString line = ts.readLine().simplifyWhiteSpace(); - if ( line.tqcontains("<OFX>",false) - || line.tqcontains("<OFC>",false) ) + if ( line.contains("<OFX>",false) + || line.contains("<OFC>",false) ) result = true; // count only lines that contains some non white space chars if(!line.isEmpty()) diff --git a/kmymoney2/plugins/pluginloader.cpp b/kmymoney2/plugins/pluginloader.cpp index 49f9dcc..c3d479b 100644 --- a/kmymoney2/plugins/pluginloader.cpp +++ b/kmymoney2/plugins/pluginloader.cpp @@ -133,14 +133,14 @@ void PluginLoader::changed() void PluginLoader::changedConfigOfPlugin(const TQCString & name) { - PluginsMap::iterator itPlugin = d->m_loadedPlugins.tqfind(TQString(name)); + PluginsMap::iterator itPlugin = d->m_loadedPlugins.find(TQString(name)); if (itPlugin != d->m_loadedPlugins.end()) configChanged(*itPlugin); } Plugin* PluginLoader::getPluginFromInfo(KPluginInfo* info) { - PluginsMap::iterator itPlugin = d->m_loadedPlugins.tqfind(info->name()); + PluginsMap::iterator itPlugin = d->m_loadedPlugins.find(info->name()); if (itPlugin != d->m_loadedPlugins.end()) return *itPlugin; else diff --git a/kmymoney2/reports/kreportchartview.cpp b/kmymoney2/reports/kreportchartview.cpp index e9c9060..c20618b 100644 --- a/kmymoney2/reports/kreportchartview.cpp +++ b/kmymoney2/reports/kreportchartview.cpp @@ -124,7 +124,7 @@ void KReportChartView::mouseMoveEvent( TQMouseEvent* event ) TQPtrListIterator < KDChartDataRegion > it( *(this->dataRegions()) ); while ( ( current = it.current() ) ) { ++it; - if ( current->tqcontains( event->pos() ) ) + if ( current->contains( event->pos() ) ) { // we found the data region that contains the mouse value = this->data()->cellVal(current->row, current->col).toDouble(); diff --git a/kmymoney2/reports/listtable.cpp b/kmymoney2/reports/listtable.cpp index 16db407..481b6b2 100644 --- a/kmymoney2/reports/listtable.cpp +++ b/kmymoney2/reports/listtable.cpp @@ -310,7 +310,7 @@ namespace reports { // this could be overridden using the "fraction" element of a row for each row. // Currently (2008-02-21) this override is not used at all (ipwizard) int fraction = file->baseCurrency().smallestAccountFraction(); - if ( ( *it_row ).tqfind ( "fraction" ) != ( *it_row ).end() ) + if ( ( *it_row ).find ( "fraction" ) != ( *it_row ).end() ) fraction = ( *it_row ) ["fraction"].toInt(); // @@ -390,7 +390,7 @@ namespace reports { // skip the opening and closing balance row, // if the balance column is not shown - if ( ( columns.tqcontains ( "balance" ) == 0 ) && ( ( *it_row ) ["rank"] == "-2" ) ) + if ( ( columns.contains ( "balance" ) == 0 ) && ( ( *it_row ) ["rank"] == "-2" ) ) continue; bool need_label = true; @@ -468,7 +468,7 @@ namespace reports { // TODO: This and the i18n headings are handled // as a set of parallel vectors. Would be much better to make a single // vector of a properties class. - if ( sharesColumns.tqcontains ( *it_column ) ) + if ( sharesColumns.contains ( *it_column ) ) { if ( data.isEmpty() ) { result += TQString ( "<td></td>" ); @@ -479,7 +479,7 @@ namespace reports { csv += "\"" + MyMoneyMoney ( data ).formatMoney ( "", 3, false ) + "\","; } } - else if ( moneyColumns.tqcontains ( *it_column ) ) + else if ( moneyColumns.contains ( *it_column ) ) { if ( data.isEmpty() ) { result += TQString ( "<td%1></td>" ) @@ -502,13 +502,13 @@ namespace reports { csv += "\"" + ( *it_row ) ["currency"] + " " + MyMoneyMoney ( data ).formatMoney ( fraction, false ) + "\","; } } - else if ( percentColumns.tqcontains ( *it_column ) ) + else if ( percentColumns.contains ( *it_column ) ) { data = ( MyMoneyMoney ( data ) * MyMoneyMoney ( 100, 1 ) ).formatMoney ( fraction ); result += TQString ( "<td>%1%</td>" ).arg ( data ); csv += data + "%,"; } - else if ( dateColumns.tqcontains ( *it_column ) ) + else if ( dateColumns.contains ( *it_column ) ) { // do this before we possibly change data csv += "\"" + data + "\","; @@ -620,7 +620,7 @@ namespace reports { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!accountList.tqcontains(*it_b)) { + if(!accountList.contains(*it_b)) { m_config.addAccount(*it_b); } } diff --git a/kmymoney2/reports/pivotgrid.h b/kmymoney2/reports/pivotgrid.h index c067c27..3aebafd 100644 --- a/kmymoney2/reports/pivotgrid.h +++ b/kmymoney2/reports/pivotgrid.h @@ -45,7 +45,7 @@ namespace reports { * * A 'Row Pair' is two rows of money values. Each column is the SAME month. One row is the * 'actual' values for the period, the other row is the 'budgetted' values for the same - * period. For ease of implementation, a Row Pair is implemented as a Row which tqcontains + * period. For ease of implementation, a Row Pair is implemented as a Row which contains * another Row. The inherited Row is the 'actual', the contained row is the 'Budget'. * * An 'Inner Group' contains a rows for each subordinate account within a single top-level diff --git a/kmymoney2/reports/pivottable.cpp b/kmymoney2/reports/pivottable.cpp index 3617102..d39e226 100644 --- a/kmymoney2/reports/pivottable.cpp +++ b/kmymoney2/reports/pivottable.cpp @@ -282,7 +282,7 @@ void PivotTable::init(void) loanBalances[splitAccount.id()] = cellBalance(outergroup, splitAccount, column, false); } else { //if it is not in the report and also not in loanBalances, get the balance from the file - if(!loanBalances.tqcontains(splitAccount.id())) { + if(!loanBalances.contains(splitAccount.id())) { TQDate dueDate = sched.nextDueDate(); //if the payment is overdue, use current date @@ -863,7 +863,7 @@ void PivotTable::calculateBudgetMapping( void ) TQString acid = id; // If the budget contains this account outright - if ( budget.tqcontains ( id ) ) + if ( budget.contains ( id ) ) { // Add it to the mapping m_budgetMap[acid] = id; @@ -880,7 +880,7 @@ void PivotTable::calculateBudgetMapping( void ) do { id = file->account ( id ).parentAccountId(); - if ( budget.tqcontains ( id ) ) + if ( budget.contains ( id ) ) { if ( budget.account ( id ).budgetSubaccounts() ) { @@ -1279,19 +1279,19 @@ void PivotTable::createRow( const TQString& outergroup, const ReportAccount& row // Determine the inner group from the top-most tqparent account TQString innergroup( row.topParentName() ); - if ( ! m_grid.tqcontains(outergroup) ) + if ( ! m_grid.contains(outergroup) ) { DEBUG_OUTPUT(TQString("Adding group [%1]").tqarg(outergroup)); m_grid[outergroup] = PivotOuterGroup(m_numColumns); } - if ( ! m_grid[outergroup].tqcontains(innergroup) ) + if ( ! m_grid[outergroup].contains(innergroup) ) { DEBUG_OUTPUT(TQString("Adding group [%1][%2]").tqarg(outergroup).tqarg(innergroup)); m_grid[outergroup][innergroup] = PivotInnerGroup(m_numColumns); } - if ( ! m_grid[outergroup][innergroup].tqcontains(row) ) + if ( ! m_grid[outergroup][innergroup].contains(row) ) { DEBUG_OUTPUT(TQString("Adding row [%1][%2][%3]").tqarg(outergroup).tqarg(innergroup).tqarg(row.debugName())); m_grid[outergroup][innergroup][row] = PivotGridRowSet(m_numColumns); @@ -1594,7 +1594,7 @@ TQString PivotTable::renderHTML( void ) const unsigned column = 1; while ( column < m_numColumns ) - result += TQString("<th%1>%2</th>").tqarg(headerspan,TQString(m_columnHeadings[column++]).tqreplace(TQRegExp(" "),"<br>")); + result += TQString("<th%1>%2</th>").tqarg(headerspan,TQString(m_columnHeadings[column++]).replace(TQRegExp(" "),"<br>")); if ( m_config_f.isShowingRowTotals() ) result += TQString("<th%1>%2</th>").tqarg(headerspan).tqarg(i18n("Total")); @@ -1735,7 +1735,7 @@ TQString PivotTable::renderHTML( void ) const .tqarg(rowname.isTopLevel() ? " id=\"toptqparent\"" : "") .tqarg("") //.tqarg((*it_row).m_total.isZero() ? colspan : "") // colspan the distance if this row will be blank .tqarg(rowname.hierarchyDepth() - 1) - .tqarg(rowname.name().tqreplace(TQRegExp(" "), " ")) + .tqarg(rowname.name().replace(TQRegExp(" "), " ")) .tqarg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").tqarg(rowname.currency().id())); // Don't print this row if it's going to be all zeros @@ -1791,7 +1791,7 @@ TQString PivotTable::renderHTML( void ) const .tqarg(rownum & 0x01 ? "even" : "odd") .tqarg( m_config_f.detailLevel() == MyMoneyReport::eDetailAll ? "id=\"solo\"" : "" ) .tqarg(rowname.hierarchyDepth() - 1) - .tqarg(rowname.name().tqreplace(TQRegExp(" "), " ")) + .tqarg(rowname.name().replace(TQRegExp(" "), " ")) .tqarg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").tqarg(rowname.currency().id())); } @@ -2036,7 +2036,7 @@ void PivotTable::drawChart( KReportChartView& _view ) const { unsigned column = 1; while ( column < m_numColumns ) { - abscissaNames += TQString(m_columnHeadings[column++]).tqreplace(" ", " "); + abscissaNames += TQString(m_columnHeadings[column++]).replace(" ", " "); } } else @@ -2590,7 +2590,7 @@ void PivotTable::includeInvestmentSubAccounts() MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!accountList.tqcontains(*it_b)) { + if(!accountList.contains(*it_b)) { m_config_f.addAccount(*it_b); } } diff --git a/kmymoney2/reports/querytabletest.cpp b/kmymoney2/reports/querytabletest.cpp index 73ab69d..c0a448c 100644 --- a/kmymoney2/reports/querytabletest.cpp +++ b/kmymoney2/reports/querytabletest.cpp @@ -648,9 +648,9 @@ void QueryTableTest::testInvestment(void) //this is to make sure that the dates of closing and opening balances and the balance numbers are ok TQString openingDate = KGlobal::locale()->formatDate(TQDate(2004,1,1), true); TQString closingDate = KGlobal::locale()->formatDate(TQDate(2005,9,1), true); - CPPUNIT_ASSERT( html.tqfind(openingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Opening Balance")) > 0); - CPPUNIT_ASSERT( html.tqfind(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -702.36</td></tr>") > 0); - CPPUNIT_ASSERT( html.tqfind(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -705.69</td></tr>") > 0); + CPPUNIT_ASSERT( html.find(openingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Opening Balance")) > 0); + CPPUNIT_ASSERT( html.find(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -702.36</td></tr>") > 0); + CPPUNIT_ASSERT( html.find(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -705.69</td></tr>") > 0); } catch(MyMoneyException *e) diff --git a/kmymoney2/views/kaccountsview.cpp b/kmymoney2/views/kaccountsview.cpp index 029e6ab..f0da377 100644 --- a/kmymoney2/views/kaccountsview.cpp +++ b/kmymoney2/views/kaccountsview.cpp @@ -394,7 +394,7 @@ void KAccountsView::loadListView(void) if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.tqfind(item->id()) != isOpen.end()) + if(isOpen.find(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -540,13 +540,13 @@ void KAccountsView::slotUpdateNetWorth(void) // if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id()))) // s += "~ "; - s.tqreplace(TQString(" "), TQString(" ")); + s.replace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "<b><font color=\"red\">"; } const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency(); TQString v(netWorth.formatMoney(sec)); - s += v.tqreplace(TQString(" "), TQString(" ")); + s += v.replace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "</font></b>"; } diff --git a/kmymoney2/views/kbudgetview.cpp b/kmymoney2/views/kbudgetview.cpp index 9907c09..aa4b619 100644 --- a/kmymoney2/views/kbudgetview.cpp +++ b/kmymoney2/views/kbudgetview.cpp @@ -246,7 +246,7 @@ void KBudgetView::loadBudgets(void) KBudgetListItem* item = new KBudgetListItem(m_budgetList, *it); // create a list of unique years - if (m_yearList.tqfindIndex(TQString::number((*it).budgetStart().year())) == -1) + if (m_yearList.findIndex(TQString::number((*it).budgetStart().year())) == -1) m_yearList += TQString::number((*it).budgetStart().year()); if(item->budget().id() == id) { @@ -392,7 +392,7 @@ void KBudgetView::loadAccounts(void) if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.tqfind(item->id()) != isOpen.end()) + if(isOpen.find(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -465,7 +465,7 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* tqparent, TQStr unused |= loadSubAccounts(item, subAcctList, budget); // no child accounts and no value assigned to this account - bool thisUnused = (!item->firstChild()) && (!budget.tqcontains(acc.id())); + bool thisUnused = (!item->firstChild()) && (!budget.contains(acc.id())); // In case of a budget which is unused and we are requested to suppress // the display of those, diff --git a/kmymoney2/views/kcategoriesview.cpp b/kmymoney2/views/kcategoriesview.cpp index d543aae..ae914dd 100644 --- a/kmymoney2/views/kcategoriesview.cpp +++ b/kmymoney2/views/kcategoriesview.cpp @@ -204,7 +204,7 @@ void KCategoriesView::loadAccounts(void) if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.tqfind(item->id()) != isOpen.end()) + if(isOpen.find(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -294,13 +294,13 @@ void KCategoriesView::slotUpdateProfit(void) // if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id()))) // s += "~ "; - s.tqreplace(TQString(" "), TQString(" ")); + s.replace(TQString(" "), TQString(" ")); if(profit.isNegative()) { s += "<b><font color=\"red\">"; } const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency(); TQString v(profit.abs().formatMoney(sec)); - s += v.tqreplace(TQString(" "), TQString(" ")); + s += v.replace(TQString(" "), TQString(" ")); if(profit.isNegative()) { s += "</font></b>"; } diff --git a/kmymoney2/views/kgloballedgerview.cpp b/kmymoney2/views/kgloballedgerview.cpp index 7bda222..b22e219 100644 --- a/kmymoney2/views/kgloballedgerview.cpp +++ b/kmymoney2/views/kgloballedgerview.cpp @@ -590,7 +590,7 @@ void KGlobalLedgerView::loadView(void) while(p) { KMyMoneyRegister::Transaction* t = dynamic_cast<KMyMoneyRegister::Transaction*>(p); if(t) { - if(isSelected.tqcontains(t->id())) + if(isSelected.contains(t->id())) t->setSelected(true); if(t->id() == focusItemId) @@ -1208,7 +1208,7 @@ bool KGlobalLedgerView::focusNextPrevChild(bool next) TQWidget *currentWidget; w = tqApp->tqfocusWidget(); - while(w && m_tabOrderWidgets.tqfind(w) == -1) { + while(w && m_tabOrderWidgets.find(w) == -1) { // qDebug("'%s' not in list, use tqparent", w->className()); w = w->parentWidget(); } diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp index 51e9c65..eadf2ed 100644 --- a/kmymoney2/views/khomeview.cpp +++ b/kmymoney2/views/khomeview.cpp @@ -246,7 +246,7 @@ void KHomeView::loadView(void) case 3: // payment accounts // Check if preferred accounts are shown separately - if(settings.tqfind("2") == settings.end()) { + if(settings.find("2") == settings.end()) { showAccounts(static_cast<paymentTypeE> (Payment | Preferred), i18n("Payment Accounts")); } else { @@ -662,7 +662,7 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) const MyMoneySecurity& currency = MyMoneyFile::instance()->currency(acc.currencyId()); TQString amount = (sp.value()*cnt).formatMoney(acc, currency); - amount.tqreplace(" "," "); + amount.replace(" "," "); tmp += showColoredAmount(amount, (sp.value()*cnt).isNegative()) ; tmp += "</td>"; //show balance after payments @@ -671,7 +671,7 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) TQDate paymentDate = TQDate(sched.nextDueDate()); MyMoneyMoney balanceAfter = forecastPaymentBalance(acc, payment, paymentDate); TQString balance = balanceAfter.formatMoney(acc, currency); - balance.tqreplace(" "," "); + balance.replace(" "," "); tmp += showColoredAmount(balance, balanceAfter.isNegative()); tmp += "</td>"; @@ -839,10 +839,10 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney& //format amounts amount = value.formatMoney(acc, currency); - amount.tqreplace(" "," "); + amount.replace(" "," "); if(showMinBal) { amountToMinBal = valueToMinBal.formatMoney(acc, currency); - amountToMinBal.tqreplace(" "," "); + amountToMinBal.replace(" "," "); } tmp = TQString("<td>") + @@ -1006,7 +1006,7 @@ void KHomeView::showForecast(void) forecastBalance = m_forecast.forecastBalance(*it_account, TQDate::tqcurrentDate().addDays(f)); TQString amount; amount = forecastBalance.formatMoney( *it_account, currency); - amount.tqreplace(" "," "); + amount.replace(" "," "); m_part->write(TQString("<td width=\"%1%\" align=\"right\">").tqarg(colWidth)); m_part->write(TQString("%1</td>").tqarg(showColoredAmount(amount, forecastBalance.isNegative()))); } @@ -1090,7 +1090,7 @@ const TQString KHomeView::link(const TQString& view, const TQString& query, cons TQString titlePart; TQString title(_title); if(!title.isEmpty()) - titlePart = TQString(" title=\"%1\"").tqarg(title.tqreplace(" ", " ")); + titlePart = TQString(" title=\"%1\"").tqarg(title.replace(" ", " ")); return TQString("<a href=\"/%1%2\"%3>").tqarg(view, query, titlePart); } @@ -1321,9 +1321,9 @@ void KHomeView::showAssetsLiabilities(void) TQString amountAssets = netAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountLiabilities = netLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountNetWorth = netWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountAssets.tqreplace(" "," "); - amountLiabilities.tqreplace(" "," "); - amountNetWorth.tqreplace(" "," "); + amountAssets.replace(" "," "); + amountLiabilities.replace(" "," "); + amountNetWorth.replace(" "," "); m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd")); @@ -1524,8 +1524,8 @@ MyMoneyMoney KHomeView::forecastPaymentBalance(const MyMoneyAccount& acc, const paymentDate = TQDate::tqcurrentDate().addDays(1); //check if the account is already there - if(m_accountList.tqfind(acc.id()) == m_accountList.end() - || m_accountList[acc.id()].tqfind(paymentDate) == m_accountList[acc.id()].end()) + if(m_accountList.find(acc.id()) == m_accountList.end() + || m_accountList[acc.id()].find(paymentDate) == m_accountList[acc.id()].end()) { if(paymentDate == TQDate::tqcurrentDate()) { m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate); @@ -1598,8 +1598,8 @@ void KHomeView::showCashFlowSummary() //format income and expenses TQString amountIncome = incomeValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountExpense = expenseValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountIncome.tqreplace(" "," "); - amountExpense.tqreplace(" "," "); + amountIncome.replace(" "," "); + amountExpense.replace(" "," "); //calculate schedules @@ -1712,10 +1712,10 @@ void KHomeView::showCashFlowSummary() TQString amountScheduledLiquidTransfer = scheduledLiquidTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountScheduledOtherTransfer = scheduledOtherTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountScheduledIncome.tqreplace(" "," "); - amountScheduledExpense.tqreplace(" "," "); - amountScheduledLiquidTransfer.tqreplace(" "," "); - amountScheduledOtherTransfer.tqreplace(" "," "); + amountScheduledIncome.replace(" "," "); + amountScheduledExpense.replace(" "," "); + amountScheduledLiquidTransfer.replace(" "," "); + amountScheduledOtherTransfer.replace(" "," "); //get liquid assets and liabilities TQValueList<MyMoneyAccount> accounts; @@ -1776,9 +1776,9 @@ void KHomeView::showCashFlowSummary() TQString amountLiquidAssets = liquidAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountLiquidLiabilities = liquidLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountLiquidWorth = liquidWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountLiquidAssets.tqreplace(" "," "); - amountLiquidLiabilities.tqreplace(" "," "); - amountLiquidWorth.tqreplace(" "," "); + amountLiquidAssets.replace(" "," "); + amountLiquidLiabilities.replace(" "," "); + amountLiquidWorth.replace(" "," "); //show the summary m_part->write("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">" + i18n("Cash Flow Summary") + "</div>\n<div class=\"gap\"> </div>\n"); @@ -1876,9 +1876,9 @@ void KHomeView::showCashFlowSummary() TQString amountExpectedAsset = expectedAsset.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountExpectedLiabilities = expectedLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString amountProfit = profitValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountProfit.tqreplace(" "," "); - amountExpectedAsset.tqreplace(" "," "); - amountExpectedLiabilities.tqreplace(" "," "); + amountProfit.replace(" "," "); + amountExpectedAsset.replace(" "," "); + amountExpectedLiabilities.replace(" "," "); diff --git a/kmymoney2/views/kinstitutionsview.cpp b/kmymoney2/views/kinstitutionsview.cpp index 544cb0c..d5a673c 100644 --- a/kmymoney2/views/kinstitutionsview.cpp +++ b/kmymoney2/views/kinstitutionsview.cpp @@ -183,7 +183,7 @@ void KInstitutionsView::loadAccounts(void) if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.tqfind(item->id()) != isOpen.end()) + if(isOpen.find(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -303,13 +303,13 @@ void KInstitutionsView::slotUpdateNetWorth(void) // if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id()))) // s += "~ "; - s.tqreplace(TQString(" "), TQString(" ")); + s.replace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "<b><font color=\"red\">"; } const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency(); TQString v(netWorth.formatMoney(sec)); - s += v.tqreplace(TQString(" "), TQString(" ")); + s += v.replace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "</font></b>"; } diff --git a/kmymoney2/views/kinvestmentlistitem.cpp b/kmymoney2/views/kinvestmentlistitem.cpp index f3cf29b..1429cd0 100644 --- a/kmymoney2/views/kinvestmentlistitem.cpp +++ b/kmymoney2/views/kinvestmentlistitem.cpp @@ -149,7 +149,7 @@ const TQString KInvestmentListItem::calculateGain(const equity_price_history& hi equity_price_history::ConstIterator itToday = history.end(); for(tempDate = TQDate::tqcurrentDate(); tempDate >= comparisonDate; ) { - itToday = history.tqfind(tempDate); + itToday = history.find(tempDate); if(itToday != history.end()) { currentValue = itToday.data(); diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp index 8d7aa4d..2c3a10d 100644 --- a/kmymoney2/views/kmymoneyview.cpp +++ b/kmymoney2/views/kmymoneyview.cpp @@ -1688,7 +1688,7 @@ void KMyMoneyView::fixFile_2(void) void KMyMoneyView::fixFile_1(void) { - // we need to fix reports. If the account filter list tqcontains + // we need to fix reports. If the account filter list contains // investment accounts, we need to add the stock accounts to the list // as well if we don't have the expert mode enabled if(!KMyMoneyGlobalSettings::expertMode()) { @@ -1704,7 +1704,7 @@ void KMyMoneyView::fixFile_1(void) MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.tqcontains(*it_b)) { + if(!list.contains(*it_b)) { missing.append(*it_b); } } @@ -1737,7 +1737,7 @@ void KMyMoneyView::fixFile_1(void) MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.tqcontains(*it_b)) { + if(!list.contains(*it_b)) { missing.append(*it_b); } } @@ -1975,7 +1975,7 @@ void KMyMoneyView::fixTransactions_0(void) bool hasDuplicateAccounts = false; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { - if(accounts.tqcontains((*it_s).accountId())) { + if(accounts.contains((*it_s).accountId())) { hasDuplicateAccounts = true; kdDebug(2) << __func__ << " " << t.id() << " has multiple splits with account " << (*it_s).accountId() << endl; } else { @@ -1983,7 +1983,7 @@ void KMyMoneyView::fixTransactions_0(void) } if((*it_s).action() == MyMoneySplit::ActionInterest) { - if(interestAccounts.tqcontains((*it_s).accountId()) == 0) { + if(interestAccounts.contains((*it_s).accountId()) == 0) { interestAccounts << (*it_s).accountId(); } } @@ -2091,14 +2091,14 @@ void KMyMoneyView::fixTransactions_0(void) // and check if there are any duplicates in this transactions for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneyAccount splitAccount = file->account((*it_s).accountId()); - if(accounts.tqcontains((*it_s).accountId())) { + if(accounts.contains((*it_s).accountId())) { hasDuplicateAccounts = true; } else { accounts << (*it_s).accountId(); } // if this split references an interest account, the action // must be of type ActionInterest - if(interestAccounts.tqcontains((*it_s).accountId())) { + if(interestAccounts.contains((*it_s).accountId())) { if((*it_s).action() != MyMoneySplit::ActionInterest) { kdDebug(2) << __func__ << " " << (*it_t).id() << " contains an interest account (" << (*it_s).accountId() << ") but does not have ActionInterest" << endl; (*it_s).setAction(MyMoneySplit::ActionInterest); diff --git a/kmymoney2/views/kmymoneyview.h b/kmymoney2/views/kmymoneyview.h index e1c1266..613c7a5 100644 --- a/kmymoney2/views/kmymoneyview.h +++ b/kmymoney2/views/kmymoneyview.h @@ -65,7 +65,7 @@ class TransactionEditor; class KForecastView; /** - * This class represents the view of the MyMoneyFile which tqcontains + * This class represents the view of the MyMoneyFile which contains * Banks/Accounts/Transactions, Recurring transactions (or Bills & Deposits) * and scripts (yet to be implemented). Each different aspect of the file * is represented by a tab within the view. diff --git a/kmymoney2/views/kpayeesview.cpp b/kmymoney2/views/kpayeesview.cpp index 31f1fed..f15f06a 100644 --- a/kmymoney2/views/kpayeesview.cpp +++ b/kmymoney2/views/kpayeesview.cpp @@ -445,7 +445,7 @@ void KPayeesView::slotChooseDefaultAccount(void) && !file->isTransfer(*t) && t->splitCount() == 2) { MyMoneySplit s0 = t->splitByAccount(s.accountId(), false); - if (account_count.tqcontains(s0.accountId())) { + if (account_count.contains(s0.accountId())) { account_count[s0.accountId()]++; } else { diff --git a/kmymoney2/views/kreportsview.cpp b/kmymoney2/views/kreportsview.cpp index 95de9a4..fc8e017 100755 --- a/kmymoney2/views/kreportsview.cpp +++ b/kmymoney2/views/kreportsview.cpp @@ -440,7 +440,7 @@ void KReportsView::loadView(void) { TQString groupname = (*it_group).name(); KReportGroupListItem* curnode = new KReportGroupListItem(m_reportListView, pagenumber++, (*it_group).title()); - curnode->setOpen(isOpen.tqfind(curnode->text(0)) != isOpen.end()); + curnode->setOpen(isOpen.find(curnode->text(0)) != isOpen.end()); groupitems[groupname] = curnode; TQValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin(); @@ -464,12 +464,12 @@ void KReportsView::loadView(void) // Rename the charts item to place it at this point in the list. chartnode->setNr(pagenumber++); - chartnode->setOpen(isOpen.tqfind(chartnode->text(0)) != isOpen.end()); + chartnode->setOpen(isOpen.find(chartnode->text(0)) != isOpen.end()); // Custom reports KReportGroupListItem* favoritenode = new KReportGroupListItem(m_reportListView,pagenumber++, i18n("Favorite Reports")); - favoritenode->setOpen(isOpen.tqfind(favoritenode->text(0)) != isOpen.end()); + favoritenode->setOpen(isOpen.find(favoritenode->text(0)) != isOpen.end()); KReportGroupListItem* orphannode = NULL; TQValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList(); @@ -597,7 +597,7 @@ void KReportsView::slotSaveView(void) if (!newURL.isEmpty()) { TQString newName = newURL.prettyURL(0, KURL::StripFileProtocol); - if(newName.tqfindRev('.') == -1) + if(newName.findRev('.') == -1) newName.append(".html"); tab->saveAs( newName, d->includeCSS->isEnabled() && d->includeCSS->isChecked() ); diff --git a/kmymoney2/widgets/kaccounttemplateselector.cpp b/kmymoney2/widgets/kaccounttemplateselector.cpp index 1816fab..2fd689b 100644 --- a/kmymoney2/widgets/kaccounttemplateselector.cpp +++ b/kmymoney2/widgets/kaccounttemplateselector.cpp @@ -84,7 +84,7 @@ class KAccountTemplateSelector::Private #ifndef KMM_DESIGNER TQListViewItem* KAccountTemplateSelector::Private::hierarchyItem(const TQString& tqparent, const TQString& name) { - if(!m_templateHierarchy.tqcontains(tqparent) + if(!m_templateHierarchy.contains(tqparent) || m_templateHierarchy[tqparent] == 0) { TQRegExp exp("(.*):(.*)"); if(exp.search(tqparent) != -1) @@ -197,7 +197,7 @@ void KAccountTemplateSelector::slotLoadTemplateList(void) if(country.isEmpty()) country = exp.cap(2); TQString lang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1)); - if(d->countries.tqcontains(country)) { + if(d->countries.contains(country)) { if(d->countries[country] != *it_d) { TQString oName = d->countries[country]; exp.search(oName); diff --git a/kmymoney2/widgets/kbudgetvalues.cpp b/kmymoney2/widgets/kbudgetvalues.cpp index 994eac6..afb3170 100644 --- a/kmymoney2/widgets/kbudgetvalues.cpp +++ b/kmymoney2/widgets/kbudgetvalues.cpp @@ -166,7 +166,7 @@ void KBudgetValues::slotChangePeriod(int id) return; inside = true; - TQWidget *tab = m_periodGroup->tqfind(id); + TQWidget *tab = m_periodGroup->find(id); fillMonthLabels(); MyMoneyMoney newValue; diff --git a/kmymoney2/widgets/kguiutils.cpp b/kmymoney2/widgets/kguiutils.cpp index f0e1d91..1b17ac6 100644 --- a/kmymoney2/widgets/kguiutils.cpp +++ b/kmymoney2/widgets/kguiutils.cpp @@ -50,7 +50,7 @@ void kMandatoryFieldGroup::add(TQWidget *widget) { - if (!widgets.tqcontains(widget)) { + if (!widgets.contains(widget)) { if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) connect((TQCheckBox*)widget->qt_cast(TQCHECKBOX_OBJECT_NAME_STRING), TQT_SIGNAL(clicked()), diff --git a/kmymoney2/widgets/klistviewsearchline.cpp b/kmymoney2/widgets/klistviewsearchline.cpp index a89c45e..ec411d4 100644 --- a/kmymoney2/widgets/klistviewsearchline.cpp +++ b/kmymoney2/widgets/klistviewsearchline.cpp @@ -220,14 +220,14 @@ bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString TQValueList<int>::ConstIterator it = d->searchColumns.begin(); for(; it != d->searchColumns.end(); ++it) { if(*it < item->listView()->columns() && - item->text(*it).tqfind(s, 0, d->caseSensitive) >= 0) + item->text(*it).find(s, 0, d->caseSensitive) >= 0) return true; } } else { for(int i = 0; i < item->listView()->columns(); i++) { if(item->listView()->columnWidth(i) > 0 && - item->text(i).tqfind(s, 0, d->caseSensitive) >= 0) + item->text(i).find(s, 0, d->caseSensitive) >= 0) { return true; } @@ -266,7 +266,7 @@ TQPopupMenu *KListViewSearchLine::createPopupMenu() columnText = i18n("Column number %1","Column No. %1").tqarg(visiblePosition); } subMenu->insertItem(columnText, visibleColumns); - if(d->searchColumns.isEmpty() || d->searchColumns.tqfind(i) != d->searchColumns.end()) + if(d->searchColumns.isEmpty() || d->searchColumns.find(i) != d->searchColumns.end()) subMenu->setItemChecked(visibleColumns, true); else allColumnsAreSearchColumns = false; @@ -326,7 +326,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) d->searchColumns.clear(); } else { - if(d->searchColumns.tqfind(id) != d->searchColumns.end()) + if(d->searchColumns.find(id) != d->searchColumns.end()) d->searchColumns.remove(id); else { if(d->searchColumns.isEmpty()) { diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.cpp b/kmymoney2/widgets/kmymoneyaccountcombo.cpp index 67a416f..6865c29 100644 --- a/kmymoney2/widgets/kmymoneyaccountcombo.cpp +++ b/kmymoney2/widgets/kmymoneyaccountcombo.cpp @@ -165,7 +165,7 @@ void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e) e->ignore(); return; } - bool hit = TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ); + bool hit = TQT_TQRECT_OBJECT(rect()).contains( e->pos() ); if ( hit ) { // mouse press on button m_mlbDown = TRUE; // left mouse button down emit pressed(); @@ -182,7 +182,7 @@ void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e) return; m_mlbDown = FALSE; // left mouse button up emit released(); - if ( TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) { // mouse release on button + if ( TQT_TQRECT_OBJECT(rect()).contains( e->pos() ) ) { // mouse release on button emit clicked(); } } diff --git a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp index 6de78e5..26dcedf 100644 --- a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp +++ b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp @@ -68,7 +68,7 @@ void kMyMoneyAccountCompletion::slotMakeCompletion(const TQString& txt) // return; int cnt = 0; - if(txt.tqcontains(MyMoneyFile::AccountSeperator) == 0) { + if(txt.contains(MyMoneyFile::AccountSeperator) == 0) { m_lastCompletion = TQRegExp(TQRegExp::escape(txt.stripWhiteSpace()), false); cnt = selector()->slotMakeCompletion(m_lastCompletion); } else { diff --git a/kmymoney2/widgets/kmymoneyaccountselector.cpp b/kmymoney2/widgets/kmymoneyaccountselector.cpp index 762591f..234fa16 100644 --- a/kmymoney2/widgets/kmymoneyaccountselector.cpp +++ b/kmymoney2/widgets/kmymoneyaccountselector.cpp @@ -136,14 +136,14 @@ TQStringList kMyMoneyAccountSelector::accountList(const TQValueList<MyMoneyAcco KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); if(it_c->type() == TQCheckListItem::CheckBox) { MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id()); - it_f = filterList.tqfind(acc.accountType()); + it_f = filterList.find(acc.accountType()); if(filterList.count() == 0 || it_f != filterList.end()) list << it_c->id(); } } else if(it_v->rtti() == 0) { KMyMoneyListViewItem* it_c = dynamic_cast<KMyMoneyListViewItem*>(it_v); MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id()); - it_f = filterList.tqfind(acc.accountType()); + it_f = filterList.find(acc.accountType()); if(filterList.count() == 0 || it_f != filterList.end()) list << it_c->id(); } @@ -169,7 +169,7 @@ bool kMyMoneyAccountSelector::match(const TQRegExp& exp, TQListViewItem* item) c return exp.search(it_l->key(1, true)) != -1; } -bool kMyMoneyAccountSelector::tqcontains(const TQString& txt) const +bool kMyMoneyAccountSelector::contains(const TQString& txt) const { TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); TQListViewItem* it_v; @@ -288,7 +288,7 @@ void AccountSet::addAccountType(MyMoneyAccount::accountTypeE type) void AccountSet::removeAccountType(MyMoneyAccount::accountTypeE type) { TQValueList<MyMoneyAccount::accountTypeE>::iterator it; - it = m_typeList.tqfind(type); + it = m_typeList.find(type); if(it != m_typeList.end()) { m_typeList.remove(it); } @@ -313,30 +313,30 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) if(list.count() > 0) currentId = list.first(); } - if((m_typeList.tqcontains(MyMoneyAccount::Checkings) - + m_typeList.tqcontains(MyMoneyAccount::Savings) - + m_typeList.tqcontains(MyMoneyAccount::Cash) - + m_typeList.tqcontains(MyMoneyAccount::AssetLoan) - + m_typeList.tqcontains(MyMoneyAccount::CertificateDep) - + m_typeList.tqcontains(MyMoneyAccount::Investment) - + m_typeList.tqcontains(MyMoneyAccount::Stock) - + m_typeList.tqcontains(MyMoneyAccount::MoneyMarket) - + m_typeList.tqcontains(MyMoneyAccount::Asset) - + m_typeList.tqcontains(MyMoneyAccount::Currency)) > 0) + if((m_typeList.contains(MyMoneyAccount::Checkings) + + m_typeList.contains(MyMoneyAccount::Savings) + + m_typeList.contains(MyMoneyAccount::Cash) + + m_typeList.contains(MyMoneyAccount::AssetLoan) + + m_typeList.contains(MyMoneyAccount::CertificateDep) + + m_typeList.contains(MyMoneyAccount::Investment) + + m_typeList.contains(MyMoneyAccount::Stock) + + m_typeList.contains(MyMoneyAccount::MoneyMarket) + + m_typeList.contains(MyMoneyAccount::Asset) + + m_typeList.contains(MyMoneyAccount::Currency)) > 0) typeMask |= KMyMoneyUtils::asset; - if((m_typeList.tqcontains(MyMoneyAccount::CreditCard) - + m_typeList.tqcontains(MyMoneyAccount::Loan) - + m_typeList.tqcontains(MyMoneyAccount::Liability)) > 0) + if((m_typeList.contains(MyMoneyAccount::CreditCard) + + m_typeList.contains(MyMoneyAccount::Loan) + + m_typeList.contains(MyMoneyAccount::Liability)) > 0) typeMask |= KMyMoneyUtils::liability; - if((m_typeList.tqcontains(MyMoneyAccount::Income)) > 0) + if((m_typeList.contains(MyMoneyAccount::Income)) > 0) typeMask |= KMyMoneyUtils::income; - if((m_typeList.tqcontains(MyMoneyAccount::Expense)) > 0) + if((m_typeList.contains(MyMoneyAccount::Expense)) > 0) typeMask |= KMyMoneyUtils::expense; - if((m_typeList.tqcontains(MyMoneyAccount::Equity)) > 0) + if((m_typeList.contains(MyMoneyAccount::Equity)) > 0) typeMask |= KMyMoneyUtils::equity; selector->clear(); @@ -409,7 +409,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) tmpKey = key + MyMoneyFile::AccountSeperator + acc.name(); TQListViewItem* subItem = selector->newItem(item, acc.name(), tmpKey, acc.id()); if(acc.value("PreferredAccount") == "Yes" - && m_typeList.tqcontains(acc.accountType())) { + && m_typeList.contains(acc.accountType())) { selector->newItem(m_favorites, acc.name(), tmpKey, acc.id()); } if(acc.accountList().count() > 0) { @@ -418,7 +418,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) } //disable the item if it has been added only because a subaccount matches the type - if( !m_typeList.tqcontains(acc.accountType()) ) { + if( !m_typeList.contains(acc.accountType()) ) { subItem->setEnabled(false); } } @@ -505,7 +505,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewIte ++m_count; TQListViewItem* item = selector->newItem(tqparent, acc.name(), tmpKey, acc.id()); if(acc.value("PreferredAccount") == "Yes" - && m_typeList.tqcontains(acc.accountType())) { + && m_typeList.contains(acc.accountType())) { selector->newItem(m_favorites, acc.name(), tmpKey, acc.id()); } if(acc.accountList().count() > 0) { @@ -514,7 +514,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewIte } //disable the item if it has been added only because a subaccount matches the type - if( !m_typeList.tqcontains(acc.accountType()) ) { + if( !m_typeList.contains(acc.accountType()) ) { item->setEnabled(false); } } @@ -524,7 +524,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewIte bool AccountSet::includeAccount(const MyMoneyAccount& acc) { - if( m_typeList.tqcontains(acc.accountType()) ) + if( m_typeList.contains(acc.accountType()) ) return true; TQStringList accounts = acc.accountList(); diff --git a/kmymoney2/widgets/kmymoneyaccountselector.h b/kmymoney2/widgets/kmymoneyaccountselector.h index 632cdc5..dc03ceb 100644 --- a/kmymoney2/widgets/kmymoneyaccountselector.h +++ b/kmymoney2/widgets/kmymoneyaccountselector.h @@ -90,14 +90,14 @@ public: virtual bool match(const TQRegExp& exp, TQListViewItem* item) const; /** - * This method returns, if any of the items in the selector tqcontains + * This method returns, if any of the items in the selector contains * the text @a txt. * * @param txt const reference to string to be looked for * @retval true exact match found * @retval false no match found */ - virtual bool tqcontains(const TQString& txt) const; + virtual bool contains(const TQString& txt) const; /** * This method removes all the buttons of the widget diff --git a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp index 6d8b026..3491afc 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp +++ b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp @@ -454,7 +454,7 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(TQDragMoveEvent* e) } } } - if ( !inside_margin.tqcontains(vp) ) { + if ( !inside_margin.contains(vp) ) { slotStartAutoScroll(); e->accept(TQRect(0,0,0,0)); // Keep sending move events m_autoopenTimer.stop(); diff --git a/kmymoney2/widgets/kmymoneycalculator.cpp b/kmymoney2/widgets/kmymoneycalculator.cpp index 8e1cbdd..e202b80 100644 --- a/kmymoney2/widgets/kmymoneycalculator.cpp +++ b/kmymoney2/widgets/kmymoneycalculator.cpp @@ -160,7 +160,7 @@ void kMyMoneyCalculator::commaClicked(void) { if(operand.length() == 0) operand = "0"; - if(operand.tqcontains('.', FALSE) == 0) + if(operand.contains('.', FALSE) == 0) operand.append('.'); if(operand.length() > 16) @@ -174,8 +174,8 @@ void kMyMoneyCalculator::plusminusClicked(void) operand = m_result; if(operand.length() > 0) { - if(operand.tqfind('-') != -1) - operand.tqreplace('-', TQString()); + if(operand.find('-') != -1) + operand.replace('-', TQString()); else operand.prepend('-'); changeDisplay(operand); @@ -318,7 +318,7 @@ void kMyMoneyCalculator::percentClicked(void) const TQString kMyMoneyCalculator::result(void) const { TQString txt = m_result; - txt.tqreplace(TQRegExp("\\."), m_comma); + txt.replace(TQRegExp("\\."), m_comma); if(txt[0] == '-') { txt = txt.mid(1); // get rid of the minus sign TQString tqmask; @@ -345,7 +345,7 @@ const TQString kMyMoneyCalculator::result(void) const void kMyMoneyCalculator::changeDisplay(const TQString& str) { TQString txt = str; - txt.tqreplace(TQRegExp("\\."), m_comma); + txt.replace(TQRegExp("\\."), m_comma); display->setText("<b>" + txt + "</b>"); } @@ -419,16 +419,16 @@ void kMyMoneyCalculator::setInitialValues(const TQString& value, TQKeyEvent* ev) bool negative = false; // setup operand operand = value; - operand.tqreplace(TQRegExp(TQString("\\")+KGlobal::locale()->thousandsSeparator()), TQString()); - operand.tqreplace(TQRegExp(TQString("\\")+m_comma), "."); - if(operand.tqcontains('(')) { + operand.replace(TQRegExp(TQString("\\")+KGlobal::locale()->thousandsSeparator()), TQString()); + operand.replace(TQRegExp(TQString("\\")+m_comma), "."); + if(operand.contains('(')) { negative = true; - operand.tqreplace("(", TQString()); - operand.tqreplace(")", TQString()); + operand.replace("(", TQString()); + operand.replace(")", TQString()); } - if(operand.tqcontains('-')) { + if(operand.contains('-')) { negative = true; - operand.tqreplace("-", TQString()); + operand.replace("-", TQString()); } if(operand.isEmpty()) operand = "0"; diff --git a/kmymoney2/widgets/kmymoneycombo.cpp b/kmymoney2/widgets/kmymoneycombo.cpp index ad2c1f7..7471de7 100644 --- a/kmymoney2/widgets/kmymoneycombo.cpp +++ b/kmymoney2/widgets/kmymoneycombo.cpp @@ -192,7 +192,7 @@ bool KMyMoneyCombo::isInArrowArea(const TQPoint& pos) const if(!editable()) arrowRect = rect(); - return arrowRect.tqcontains(mapFromGlobal(pos)); + return arrowRect.contains(mapFromGlobal(pos)); } void KMyMoneyCombo::keyPressEvent(TQKeyEvent* e) @@ -233,7 +233,7 @@ void KMyMoneyCombo::focusOutEvent(TQFocusEvent* e) m_inFocusOutEvent = true; if(editable() && !currentText().isEmpty()) { if(m_canCreateObjects) { - if(!m_completion->selector()->tqcontains(currentText())) { + if(!m_completion->selector()->contains(currentText())) { TQString id; // annouce that we go into a possible dialog to create an object // This can be used by upstream widgets to disable filters etc. @@ -254,7 +254,7 @@ void KMyMoneyCombo::focusOutEvent(TQFocusEvent* e) // else if we cannot create objects, and the current text is not // in the list, then we clear the text and the selection. - } else if(!m_completion->selector()->tqcontains(currentText())) { + } else if(!m_completion->selector()->contains(currentText())) { setCurrentText(TQString()); } } @@ -575,7 +575,7 @@ public: int itemId(const TQString& s) const { TQMap<TQString, int>::const_iterator it; - it = m_strings.tqfind(s); + it = m_strings.find(s); if(it != m_strings.end()) return *it; return -1; diff --git a/kmymoney2/widgets/kmymoneyedit.cpp b/kmymoney2/widgets/kmymoneyedit.cpp index 2e59e32..ad51606 100644 --- a/kmymoney2/widgets/kmymoneyedit.cpp +++ b/kmymoney2/widgets/kmymoneyedit.cpp @@ -73,30 +73,30 @@ TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p t = l->monetaryThousandsSeparator(); // first, delete p's and t's: if ( !p.isEmpty() ) - for ( int idx = s.tqfind( p ) ; idx >= 0 ; idx = s.tqfind( p, idx ) ) + for ( int idx = s.find( p ) ; idx >= 0 ; idx = s.find( p, idx ) ) s.remove( idx, p.length() ); if ( !t.isEmpty() ) - for ( int idx = s.tqfind( t ) ; idx >= 0 ; idx = s.tqfind( t, idx ) ) + for ( int idx = s.find( t ) ; idx >= 0 ; idx = s.find( t, idx ) ) s.remove( idx, t.length() ); // then, replace the d's and n's - if ( ( !n.isEmpty() && n.tqfind('.') != -1 ) || - ( !d.isEmpty() && d.tqfind('-') != -1 ) ) { + if ( ( !n.isEmpty() && n.find('.') != -1 ) || + ( !d.isEmpty() && d.find('-') != -1 ) ) { // make sure we don't replace something twice: - kdWarning() << "KDoubleValidator: decimal symbol tqcontains '-' or " - "negative sign tqcontains '.' -> improve algorithm" << endl; + kdWarning() << "KDoubleValidator: decimal symbol contains '-' or " + "negative sign contains '.' -> improve algorithm" << endl; return Invalid; } if ( !d.isEmpty() && d != "." ) - for ( int idx = s.tqfind( d ) ; idx >= 0 ; idx = s.tqfind( d, idx + 1 ) ) - s.tqreplace( idx, d.length(), "."); + for ( int idx = s.find( d ) ; idx >= 0 ; idx = s.find( d, idx + 1 ) ) + s.replace( idx, d.length(), "."); if ( !n.isEmpty() && n != "-" ) - for ( int idx = s.tqfind( n ) ; idx >= 0 ; idx = s.tqfind( n, idx + 1 ) ) - s.tqreplace( idx, n.length(), "-" ); + for ( int idx = s.find( n ) ; idx >= 0 ; idx = s.find( n, idx + 1 ) ) + s.replace( idx, n.length(), "-" ); // Take care of monetary parens around the value if selected via // the locale settings. @@ -105,24 +105,24 @@ TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { TQRegExp regExp("^(\\()?([\\d-\\.]*)(\\))?$"); - if(s.tqfind(regExp) != -1) { + if(s.find(regExp) != -1) { s = regExp.cap(2); } } // check for non numeric values (TQDoubleValidator allows an 'e', we don't) TQRegExp nonNumeric("[^\\d-\\.]+"); - if(s.tqfind(nonNumeric) != -1) + if(s.find(nonNumeric) != -1) return Invalid; // check for minus sign trailing the number TQRegExp trailingMinus("^([^-]*)\\w*-$"); - if(s.tqfind(trailingMinus) != -1) { + if(s.find(trailingMinus) != -1) { s = TQString("-%1").tqarg(trailingMinus.cap(1)); } // check for the maximum allowed number of decimal places - int decPos = s.tqfind('.'); + int decPos = s.find('.'); if(decPos != -1) { if(decimals() == 0) return Invalid; @@ -144,7 +144,7 @@ TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p // only, if the locale settings have it enabled. if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { - int tmp = input.tqcontains('(') - input.tqcontains(')'); + int tmp = input.contains('(') - input.contains(')'); if(tmp > 0) rc = Intermediate; else if(tmp < 0) @@ -369,19 +369,19 @@ void kMyMoneyEdit::ensureFractionalPart(TQString& s) const // followed by the required number of 0s if (!s.isEmpty()) { if(m_prec > 0) { - if (!s.tqcontains(decimalSymbol)) { + if (!s.contains(decimalSymbol)) { s += decimalSymbol; for (int i=0; i < m_prec; i++) s += "0"; } } else if(m_prec == 0) { - while(s.tqcontains(decimalSymbol)) { - int pos = s.tqfindRev(decimalSymbol); + while(s.contains(decimalSymbol)) { + int pos = s.findRev(decimalSymbol); if(pos != -1) { s.truncate(pos); } } - } else if(s.tqcontains(decimalSymbol)) { // m_prec == -1 && fraction + } else if(s.contains(decimalSymbol)) { // m_prec == -1 && fraction // no trailing zeroes while(s.endsWith("0")) { s.truncate(s.length()-1); diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp index 6704c9c..5016716 100644 --- a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp +++ b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp @@ -104,7 +104,7 @@ void kMyMoneyOnlineQuoteConfig::loadList(const bool updateResetList) m_quoteSourceList->setSelected(first, true); slotLoadWidgets(first); - m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); } void kMyMoneyOnlineQuoteConfig::resetConfig(void) @@ -185,7 +185,7 @@ void kMyMoneyOnlineQuoteConfig::slotNewEntry(void) WebPriceQuoteSource newSource(i18n("New Quote Source")); newSource.write(); loadList(); - TQListViewItem* item = m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0); + TQListViewItem* item = m_quoteSourceList->findItem(i18n("New Quote Source"), 0); if(item) { m_quoteSourceList->setSelected(item, true); slotLoadWidgets(item); @@ -208,7 +208,7 @@ void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(TQListViewItem* item, const TQS } else { item->setText(0, m_currentItem.m_name); } - m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); } #include "kmymoneyonlinequoteconfig.moc" diff --git a/kmymoney2/widgets/kmymoneyselector.cpp b/kmymoney2/widgets/kmymoneyselector.cpp index 5e16bf1..b4af52f 100644 --- a/kmymoney2/widgets/kmymoneyselector.cpp +++ b/kmymoney2/widgets/kmymoneyselector.cpp @@ -357,7 +357,7 @@ void KMyMoneySelector::selectItems(const TQStringList& itemList, const bool stat for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && itemList.contains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, itemList, state); @@ -373,7 +373,7 @@ void KMyMoneySelector::selectSubItems(TQListViewItem* item, const TQStringList& for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && itemList.contains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, itemList, state); @@ -634,7 +634,7 @@ int KMyMoneySelector::slotMakeCompletion(const TQRegExp& exp) return cnt; } -bool KMyMoneySelector::tqcontains(const TQString& txt) const +bool KMyMoneySelector::contains(const TQString& txt) const { TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); TQListViewItem* it_v; @@ -684,7 +684,7 @@ void KMyMoneySelector::slotListRightMouse(TQListViewItem* it_v, const TQPoint& p p.rx() -= xdepth; // copy ends around here - if ( r.tqcontains( p ) ) { + if ( r.contains( p ) ) { // we get down here, if we have a right click onto the checkbox selectAllSubItems(it_c, it_c->isOn()); } diff --git a/kmymoney2/widgets/kmymoneyselector.h b/kmymoney2/widgets/kmymoneyselector.h index c55ac47..a0facf0 100644 --- a/kmymoney2/widgets/kmymoneyselector.h +++ b/kmymoney2/widgets/kmymoneyselector.h @@ -262,14 +262,14 @@ public: TQListViewItem* item(const TQString& id) const; /** - * This method returns, if any of the items in the selector tqcontains + * This method returns, if any of the items in the selector contains * the text @a txt. * * @param txt const reference to string to be looked for * @retval true exact match found * @retval false no match found */ - virtual bool tqcontains(const TQString& txt) const; + virtual bool contains(const TQString& txt) const; /** * Clears all items of the selector and the associated listview. diff --git a/kmymoney2/widgets/register.cpp b/kmymoney2/widgets/register.cpp index 98303b1..e448fe4 100644 --- a/kmymoney2/widgets/register.cpp +++ b/kmymoney2/widgets/register.cpp @@ -1888,7 +1888,7 @@ TQWidget* Register::cellWidget(int row, int col) const TQPair<int, int> idx = tqMakePair(row, col); TQMap<TQPair<int, int>, TQWidget*>::const_iterator it_w; - it_w = m_cellWidgets.tqfind(idx); + it_w = m_cellWidgets.find(idx); if(it_w != m_cellWidgets.end()) w = *it_w; return w; @@ -1915,7 +1915,7 @@ void Register::clearCellWidget(int row, int col) TQPair<int, int> idx = tqMakePair(row, col); TQMap<TQPair<int, int>, TQWidget*>::iterator it_w; - it_w = m_cellWidgets.tqfind(idx); + it_w = m_cellWidgets.find(idx); if(it_w != m_cellWidgets.end()) { (*it_w)->deleteLater(); m_cellWidgets.remove(it_w); @@ -1931,7 +1931,7 @@ void Register::setCellContentFromEditor(int /*row*/, int /*col*/) { } -void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/) +void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/) { } diff --git a/kmymoney2/widgets/register.h b/kmymoney2/widgets/register.h index a244c85..c155fc7 100644 --- a/kmymoney2/widgets/register.h +++ b/kmymoney2/widgets/register.h @@ -92,7 +92,7 @@ public: TQWidget* haveWidget(const TQString& name) const { TQWidgetContainer::const_iterator it_w; - it_w = tqfind(name); + it_w = find(name); if(it_w != end()) return *it_w; return 0; @@ -294,7 +294,7 @@ public: TQWidget* createEditor(int row, int col, bool initFromCell) const; void setCellContentFromEditor(int row, int col); TQWidget* cellWidget(int row, int col) const; - void endEdit(int row, int col, bool accept, bool tqreplace); + void endEdit(int row, int col, bool accept, bool replace); void paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); void resizeData(int) {} diff --git a/kmymoney2/widgets/stdtransactionmatched.cpp b/kmymoney2/widgets/stdtransactionmatched.cpp index b24ed88..ff5ccc3 100644 --- a/kmymoney2/widgets/stdtransactionmatched.cpp +++ b/kmymoney2/widgets/stdtransactionmatched.cpp @@ -174,7 +174,7 @@ void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row, } memo = m_split.memo(); if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) { - int pos = memo.tqfindRev(matchedSplit.memo()); + int pos = memo.findRev(matchedSplit.memo()); if(pos != -1) { memo = memo.left(pos); if(memo.endsWith("\n")) diff --git a/kmymoney2/widgets/transaction.cpp b/kmymoney2/widgets/transaction.cpp index 3a077d7..dc5e5a2 100644 --- a/kmymoney2/widgets/transaction.cpp +++ b/kmymoney2/widgets/transaction.cpp @@ -661,8 +661,8 @@ bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQS // qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); r.setBottomLeft(TQPoint(r.x() + (r.width() - h), r.y() + h)); // qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); - // qDebug("p is in r = %d", r.tqcontains(cpos)); - if(r.tqcontains(cpos) && m_erronous) { + // qDebug("p is in r = %d", r.contains(cpos)); + if(r.contains(cpos) && m_erronous) { if(m_transaction.splits().count() < 2) { msg = TQString("<qt>%1</qt>").tqarg(i18n("Transaction is missing a category assignment.")); } else { @@ -674,7 +674,7 @@ bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQS // check for detail column in row 1 of the transaction for a possible exclamation mark r = m_parent->cellGeometry(m_startRow + 1, col); - if(row == 1 && r.tqcontains(cpos) && m_transaction.splitCount() > 2) { + if(row == 1 && r.contains(cpos) && m_transaction.splitCount() > 2) { MyMoneyFile* file = MyMoneyFile::instance(); TQValueList<MyMoneySplit>::const_iterator it_s; TQString txt; @@ -729,9 +729,9 @@ void Transaction::singleLineMemo(TQString& txt, const MyMoneySplit& split) const { txt = split.memo(); // remove empty lines - txt.tqreplace("\n\n", "\n"); - // tqreplace '\n' with ", " - txt.tqreplace('\n', ", "); + txt.replace("\n\n", "\n"); + // replace '\n' with ", " + txt.replace('\n', ", "); } int Transaction::rowHeightHint(void) const @@ -747,34 +747,34 @@ bool Transaction::matches(const TQString& txt) const MyMoneyFile* file = MyMoneyFile::instance(); TQString s(txt); - s.tqreplace(MyMoneyMoney::thousandSeparator(), TQString()); + s.replace(MyMoneyMoney::thousandSeparator(), TQString()); const TQValueList<MyMoneySplit>&list = m_transaction.splits(); TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { // check if the text is contained in one of the fields // memo, number, payee, account - if((*it_s).memo().tqcontains(txt, false) - || (*it_s).number().tqcontains(txt, false)) + if((*it_s).memo().contains(txt, false) + || (*it_s).number().contains(txt, false)) return true; if(!(*it_s).payeeId().isEmpty()) { const MyMoneyPayee& payee = file->payee((*it_s).payeeId()); - if(payee.name().tqcontains(txt, false)) + if(payee.name().contains(txt, false)) return true; } const MyMoneyAccount& acc = file->account((*it_s).accountId()); - if(acc.name().tqcontains(txt, false)) + if(acc.name().contains(txt, false)) return true; if(!s.isEmpty()) { // check if any of the value field matches if a value has been entered TQString r = (*it_s).value().formatMoney(m_account.fraction(), false); - if(r.tqcontains(s, false)) + if(r.contains(s, false)) return true; const MyMoneyAccount& acc = file->account((*it_s).accountId()); r = (*it_s).shares().formatMoney(acc.fraction(), false); - if(r.tqcontains(s, false)) + if(r.contains(s, false)) return true; } } diff --git a/kmymoney2/widgets/transactionform.cpp b/kmymoney2/widgets/transactionform.cpp index 7ace9ba..8e56571 100644 --- a/kmymoney2/widgets/transactionform.cpp +++ b/kmymoney2/widgets/transactionform.cpp @@ -64,7 +64,7 @@ TabBar::SignalEmissionE TabBar::setSignalEmission(TabBar::SignalEmissionE type) int TabBar::currentTab(void) const { TQMap<int, int>::const_iterator it; - it = m_idMap.tqfind(TQTabBar::currentTab()); + it = m_idMap.find(TQTabBar::currentTab()); if(it != m_idMap.end()) return *it; return -1; @@ -128,7 +128,7 @@ void TransactionForm::enableTabBar(bool b) void TabBar::slotTabSelected(int id) { TQMap<int, int>::const_iterator it; - it = m_idMap.tqfind(id); + it = m_idMap.find(id); if(it != m_idMap.end()) emit tabSelected(*it); else diff --git a/kmymoney2/widgets/transactionsortoption.ui.h b/kmymoney2/widgets/transactionsortoption.ui.h index fe01eb2..636a6a7 100644 --- a/kmymoney2/widgets/transactionsortoption.ui.h +++ b/kmymoney2/widgets/transactionsortoption.ui.h @@ -82,8 +82,8 @@ void TransactionSortOption::setSettings(const TQString& settings) } // make sure to create EntryOrderSort if missing but required - if(selectedMap.tqfind(static_cast<int>(KMyMoneyRegister::EntryDateSort)) != selectedMap.end() - && selectedMap.tqfind(static_cast<int>(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) { + if(selectedMap.find(static_cast<int>(KMyMoneyRegister::EntryDateSort)) != selectedMap.end() + && selectedMap.find(static_cast<int>(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) { int val = dateSign * static_cast<int>(KMyMoneyRegister::EntryOrderSort); selectedMap[static_cast<int>(KMyMoneyRegister::EntryOrderSort)] = true; last = addEntry(m_selectedList, last, val); @@ -97,7 +97,7 @@ void TransactionSortOption::setSettings(const TQString& settings) if(i == static_cast<int>(KMyMoneyRegister::EntryDateSort)) continue; // Only add those, that are not present in the list of selected items - if(selectedMap.tqfind(i) == selectedMap.end()) { + if(selectedMap.find(i) == selectedMap.end()) { int val = i; if(i == static_cast<int>(KMyMoneyRegister::ValueSort)) val = -val; diff --git a/libkdchart/KDChart.cpp b/libkdchart/KDChart.cpp index c7c8025..415f013 100644 --- a/libkdchart/KDChart.cpp +++ b/libkdchart/KDChart.cpp @@ -58,7 +58,7 @@ \brief Provides a single entry-point to the charting engine for applications that wish to provide their own TQPainter. - It is not useful to instantiate this class as it tqcontains + It is not useful to instantiate this class as it contains static methods only. \note If for some reason you are NOT using the diff --git a/libkdchart/KDChart.h b/libkdchart/KDChart.h index 1f91f25..1510211 100644 --- a/libkdchart/KDChart.h +++ b/libkdchart/KDChart.h @@ -43,7 +43,7 @@ \brief Definition of a single entry-point to the charting engine for applications that wish to provide their own TQPainter. - It is not useful to instantiate the KDChart class as it only tqcontains + It is not useful to instantiate the KDChart class as it only contains static methods. */ diff --git a/libkdchart/KDChartAxesPainter.cpp b/libkdchart/KDChartAxesPainter.cpp index 4c592ea..6124abe 100644 --- a/libkdchart/KDChartAxesPainter.cpp +++ b/libkdchart/KDChartAxesPainter.cpp @@ -2479,7 +2479,7 @@ void KDChartAxesPainter::calculateLabelTexts( modf( ddelta, &ddelta ); bool positive = ( 0.0 <= ddelta ); int delta = static_cast < int > ( fabs( ddelta ) ); - // tqfind 1st significant entry + // find 1st significant entry TQStringList::Iterator it = positive ? tmpList.begin() : tmpList.fromLast(); @@ -3663,7 +3663,7 @@ TQString KDChartAxesPainter::truncateBehindComma( const double nVal, //qDebug("nVal: %f sVal: "+sVal, nVal ); //qDebug( TQString(" %1").tqarg(sVal)); if ( bUseAutoDigits ) { - int comma = sVal.tqfind( '.' ); + int comma = sVal.find( '.' ); if ( -1 < comma ) { if ( bAutoDelta ) { int i = sVal.length(); @@ -3684,7 +3684,7 @@ TQString KDChartAxesPainter::truncateBehindComma( const double nVal, if ( '.' == sDelta[ i - 1 ] ) trueBehindComma = 0; else { - int deltaComma = sDelta.tqfind( '.' ); + int deltaComma = sDelta.find( '.' ); if ( -1 < deltaComma ) trueBehindComma = sDelta.length() - deltaComma - 1; else @@ -3753,9 +3753,9 @@ TQString KDChartAxesPainter::applyLabelsFormat( const double nVal_, trueBehindComma ); //qDebug("sVal : "+sVal+" behindComma: %i",behindComma); - int posComma = sVal.tqfind( '.' ); + int posComma = sVal.find( '.' ); if( 0 <= posComma ){ - sVal.tqreplace( posComma, 1, decimalPoint); + sVal.replace( posComma, 1, decimalPoint); }else{ posComma = sVal.length(); } @@ -3795,7 +3795,7 @@ TQString KDChartAxesPainter::applyLabelsFormat( const double nVal_, *and the user has set axisLabelsDigitsBehindComma() == 0 *return an empty string */ - if ( behindComma == 0 && TQString::number(nVal).tqfind('.') > 0 ) + if ( behindComma == 0 && TQString::number(nVal).find('.') > 0 ) sVal = TQString();//sVal = ""; return sVal; } @@ -3854,7 +3854,7 @@ void KDChartAxesPainter::calculateOrdinateFactors( if ( 100.0 > nDist ) nDivisor = 1.0; else { - int comma = sDistDigis2.tqfind( '.' ); + int comma = sDistDigis2.find( '.' ); if ( -1 < comma ) sDistDigis2.truncate( comma ); nDivisor = fastPow10( (int)sDistDigis2.length() - 2 ); diff --git a/libkdchart/KDChartAxisParams.cpp b/libkdchart/KDChartAxisParams.cpp index 31ec8de..a6e337f 100644 --- a/libkdchart/KDChartAxisParams.cpp +++ b/libkdchart/KDChartAxisParams.cpp @@ -1933,7 +1933,7 @@ void KDChartAxisParams::setAxisValues( bool axisSteadyValueCalc, with the next value lower than your start value that can be divided by the delta factor. - \param isExactValue set this to FALSE if KD Chart shall tqfind + \param isExactValue set this to FALSE if KD Chart shall find a better value than the one you have specified by setAxisValueStart() \sa setAxisValues, setAxisValueEnd, setAxisValueDelta \sa axisValueStartIsExact, axisValueStart @@ -2401,7 +2401,7 @@ void KDChartAxisParams::setAxisDtHighPos( double x, double y ) \note Calling this function results in overwriting the information that you might have set by previous calls of that function. Only <b>one</b> data row can be specified as containing label texts. - To specify a data row that tqcontains (or might contain) axis label texts just + To specify a data row that contains (or might contain) axis label texts just call this function with \c LabelsFromDataRowYes (or \c LabelsFromDataRowGuess, resp.) specifying this row but do <b>not</b> call the function n times with the \c LabelsFromDataRowNo parameter to 'deactivate' the other rows. @@ -2409,7 +2409,7 @@ void KDChartAxisParams::setAxisDtHighPos( double x, double y ) the data rows is containing the axis label texts (this is the default setting). - \param row the data row number that tqcontains (or might contain, resp.) the labels + \param row the data row number that contains (or might contain, resp.) the labels \param mode the state of our information concerning that row (see: \c LabelsFromDataRow) \sa LabelsFromDataRow, axisLabelTextsFormDataRow, setAxisValues @@ -2434,7 +2434,7 @@ void KDChartAxisParams::setLabelTextsFormDataRow( int row, LabelsFromDataRow mo /** \fn int KDChartAxisParams::labelTextsDataRow() const - Returns the number of the data row that tqcontains (or might contain, + Returns the number of the data row that contains (or might contain, resp.) the texts to be taken for the axis labels. <br> Use \c axisLabelTextsFormDataRow to make sure the texts are @@ -2451,7 +2451,7 @@ void KDChartAxisParams::setLabelTextsFormDataRow( int row, LabelsFromDataRow mo Use \c axisLabelTexts to get a TQStringList* containing the label texts that are <b>actually</b> drawn at the axis. - \return the number of the data row that tqcontains (or might contain, + \return the number of the data row that contains (or might contain, resp.) the texts to be taken for the axis labels. \sa setAxisValues \sa axisValueStart, axisValueEnd diff --git a/libkdchart/KDChartBWPainter.cpp b/libkdchart/KDChartBWPainter.cpp index f376403..9f6e5fb 100644 --- a/libkdchart/KDChartBWPainter.cpp +++ b/libkdchart/KDChartBWPainter.cpp @@ -148,13 +148,13 @@ int KDChartBWPainter::calculateStats( KDChartTableDataBase& data, (values[ TQMAX(nUd2-1, 0) ] + values[ nUd2 ]) /2; // find last value of lower quartile nLastQ1 = TQMAX( nUd2-1, 0 ); - // tqfind 1st value of lower quartile + // find 1st value of lower quartile nFirstQ1 = nLastQ1 / 2; // determine how many values are below the median ( == how many are above it) int nLowerCount = nLastQ1 - nFirstQ1 + 1; - // tqfind 1st value of upper quartile + // find 1st value of upper quartile nFirstQ3 = bOdd ? TQMIN( nUd2+1, nUsed-1 ) : nUd2; // find last value of upper quartile nLastQ3 = nFirstQ3 + nLowerCount - 1; diff --git a/libkdchart/KDChartDataIntern.h b/libkdchart/KDChartDataIntern.h index 70cd3bd..a1d6562 100644 --- a/libkdchart/KDChartDataIntern.h +++ b/libkdchart/KDChartDataIntern.h @@ -230,7 +230,7 @@ public: } } } - // Note: We do *not* compare the _propSetID here since it tqcontains + // Note: We do *not* compare the _propSetID here since it contains // no values but is used to handle some tqlayout information... } return bRet; @@ -288,7 +288,7 @@ public: default: /* NOOP */; } - // Note: We do *not* copy the _propSetID here since it tqcontains + // Note: We do *not* copy the _propSetID here since it contains // no values but is used to handle some tqlayout information... } } diff --git a/libkdchart/KDChartDataRegion.h b/libkdchart/KDChartDataRegion.h index 1379043..c86d0bd 100644 --- a/libkdchart/KDChartDataRegion.h +++ b/libkdchart/KDChartDataRegion.h @@ -137,23 +137,23 @@ struct KDCHART_EXPORT KDChartDataRegion return TQRect(); } - bool tqcontains(const TQPoint & p) const + bool contains(const TQPoint & p) const { if( pPointArrayList && ! pPointArrayList->empty() ){ PointArrayList::iterator it; for ( it = pPointArrayList->begin(); it != pPointArrayList->end(); ++it ){ TQRegion region( *it ); - if( region.tqcontains( p ) ) + if( region.contains( p ) ) return true; } return false; } if( pRegion ) - return pRegion->tqcontains( p ); + return pRegion->contains( p ); if( pArray ) - return TQRegion( *pArray ).tqcontains( p ); + return TQRegion( *pArray ).contains( p ); if( pRect ) - return pRect->tqcontains( p ); + return pRect->contains( p ); return false; } diff --git a/libkdchart/KDChartLinesPainter.cpp b/libkdchart/KDChartLinesPainter.cpp index aef52b7..a7e0109 100644 --- a/libkdchart/KDChartLinesPainter.cpp +++ b/libkdchart/KDChartLinesPainter.cpp @@ -509,7 +509,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter, if( curPropSetId != KDChartPropertySet::UndefinedID ){ // we can safely call the following functions and ignore their // return values since they will touch the parameters' values - // if the propSet *tqcontains* corresponding own values only. + // if the propSet *contains* corresponding own values only. int iDummy; curPropSet.hasOwnShowMarker( iDummy, currentDrawMarkers ); } @@ -554,7 +554,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter, if( curPropSetId != KDChartPropertySet::UndefinedID ){ // we can safely call the following functions and ignore their // return values since they will touch the parameters' values - // if the propSet *tqcontains* corresponding own values only. + // if the propSet *contains* corresponding own values only. int iDummy; curPropSet.hasOwnMarkerAlign( iDummy, theAlignment ); curPropSet.hasOwnMarkerColor( iDummy, theColor ); @@ -658,7 +658,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter, if( curPropSetId != KDChartPropertySet::UndefinedID ){ // we can safely call the following functions and ignore their // return values since they will touch the parameters' values - // if the propSet *tqcontains* corresponding own values only. + // if the propSet *contains* corresponding own values only. int iDummy; curPropSet.hasOwnAreaBrush( iDummy, theAreaBrush ); } @@ -808,7 +808,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter, if( curPropSetId != KDChartPropertySet::UndefinedID ){ // we can safely call the following functions and ignore their // return values since they will touch the parameters' values - // if the propSet *tqcontains* corresponding own values only. + // if the propSet *contains* corresponding own values only. int iDummy; curPropSet.hasOwnLineWidth ( iDummy, theLineWidth ); curPropSet.hasOwnLineColor ( iDummy, theLineColor ); diff --git a/libkdchart/KDChartPainter.cpp b/libkdchart/KDChartPainter.cpp index 987857a..156d5d8 100644 --- a/libkdchart/KDChartPainter.cpp +++ b/libkdchart/KDChartPainter.cpp @@ -494,7 +494,7 @@ void KDChartPainter::paintDataValues( TQPainter* painter, region->text = "+LEMNISKATE"; else { region->text.setNum( value, 'f', digits ); - if ( autoDigits && region->text.tqcontains( '.' ) ) { + if ( autoDigits && region->text.contains( '.' ) ) { int len = region->text.length(); while ( 3 < len && '0' == region->text[ len-1 ] @@ -518,7 +518,7 @@ void KDChartPainter::paintDataValues( TQPainter* painter, region = regions->next() ) if ( ( ( lastDigitIrrelevant0 && !region->chart ) || ( lastDigitIrrelevant1 && region->chart ) ) - && region->text.tqcontains( '.' ) + && region->text.contains( '.' ) && ( 2 < region->text.length() ) ) region->text.truncate ( region->text.length() - 2 ); @@ -1931,7 +1931,7 @@ void KDChartPainter::calculateAllAxesRects( if( KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT == format ) areaMin = TQMAX( areaMin, static_cast < int > ( fntHeight * 6.75 ) ); else - areaMin = TQMAX( areaMin, fntHeight * ( 3 + format.tqcontains("\n") ) ); + areaMin = TQMAX( areaMin, fntHeight * ( 3 + format.contains("\n") ) ); } else areaMin = TQMAX( areaMin, fntHeight * 3 ); @@ -2851,7 +2851,7 @@ void KDChartPainter::drawExtraLinesAndMarkers( // we can safely call the following functions and ignore their // return values since they will touch the parameters' values - // if the propSet *tqcontains* corresponding own values only. + // if the propSet *contains* corresponding own values only. int iDummy; uint extraLinesAlign = 0; if( propSet.hasOwnExtraLinesAlign( iDummy, extraLinesAlign ) diff --git a/libkdchart/KDChartParams.cpp b/libkdchart/KDChartParams.cpp index 7306cfe..aac8928 100644 --- a/libkdchart/KDChartParams.cpp +++ b/libkdchart/KDChartParams.cpp @@ -518,7 +518,7 @@ void KDChartParams::setProperties( int id, KDChartPropertySet& rSet ) { _propertySetList.setAutoDelete( true ); rSet.mOwnID = id; - _propertySetList.tqreplace( rSet.mOwnID, rSet.clone() ); + _propertySetList.replace( rSet.mOwnID, rSet.clone() ); } /** @@ -568,7 +568,7 @@ bool KDChartParams::removeProperties( int id ) */ bool KDChartParams::properties( int id, KDChartPropertySet& rSet ) const { - const KDChartPropertySet* R = _propertySetList.tqfind( id ); + const KDChartPropertySet* R = _propertySetList.find( id ); const bool bFound = (0 != R); if( bFound ) rSet.deepCopy( R ); @@ -600,7 +600,7 @@ bool KDChartParams::properties( int id, KDChartPropertySet& rSet ) const */ KDChartPropertySet* KDChartParams::properties( int id ) { - return _propertySetList.tqfind( id ); + return _propertySetList.find( id ); } @@ -1514,7 +1514,7 @@ KDChartParams::SourceMode KDChartParams::chartSourceMode( uint dataset, bool bStart = true; ModeAndChartMap::ConstIterator it; - for( it = _dataSourceModeAndChart.tqfind( a ); + for( it = _dataSourceModeAndChart.find( a ); ( it != _dataSourceModeAndChart.end() ) && ( it.key() <= b ); ++it ){ if ( bStart ) { @@ -1860,7 +1860,7 @@ void KDChartParams::calculateShadowColors( TQColor color, TQColor KDChartParams::dataColor( uint dataset ) const { uint index = dataset % (_maxDatasetColor+1); - if( _dataColors.tqfind( index ) != _dataColors.end() ) + if( _dataColors.find( index ) != _dataColors.end() ) return _dataColors[ index ]; else return TQColor(); // documentation says undefined @@ -1916,12 +1916,12 @@ TQColor KDChartParams::dataShadow1Color( uint dataset ) const { uint index = dataset % _maxDatasetColor; if ( _threeDShadowColors ) - if( _dataColorsShadow1.tqfind( index ) != _dataColorsShadow1.end() ) + if( _dataColorsShadow1.find( index ) != _dataColorsShadow1.end() ) return _dataColorsShadow1[ index ]; else return TQColor(); // documentation says undefined else - if( _dataColors.tqfind( index ) != _dataColors.end() ) + if( _dataColors.find( index ) != _dataColors.end() ) return _dataColors[ index ]; else return TQColor(); // documentation says undefined @@ -1945,12 +1945,12 @@ TQColor KDChartParams::dataShadow2Color( uint dataset ) const { uint index = dataset % _maxDatasetColor; if ( _threeDShadowColors ) - if( _dataColorsShadow2.tqfind( index ) != _dataColorsShadow2.end() ) + if( _dataColorsShadow2.find( index ) != _dataColorsShadow2.end() ) return _dataColorsShadow2[ index ]; else return TQColor(); // documentation says undefined else - if( _dataColors.tqfind( index ) != _dataColors.end() ) + if( _dataColors.find( index ) != _dataColors.end() ) return _dataColors[ index ]; else return TQColor(); // documentation says undefined @@ -2572,7 +2572,7 @@ bool KDChartParams::moveDataRegionFrame( uint oldDataRow, ) { const TQString oldKey( dataRegionFrameAreaName( oldDataRow, oldDataCol, 0 ) ); // oldData3rd ) ); - KDChartFrameSettings* it = _areaDict.tqfind( oldKey ); + KDChartFrameSettings* it = _areaDict.find( oldKey ); bool bFound = ( it != 0 ); if( bFound ){ if( KDCHART_NO_DATASET != newDataRow ){ @@ -2582,7 +2582,7 @@ bool KDChartParams::moveDataRegionFrame( uint oldDataRow, frame->setDataCol( newDataCol ); frame->setData3rd( 0 ); // newData3rd ); _areaDict.setAutoDelete( TRUE ); - _areaDict.tqreplace( + _areaDict.replace( dataRegionFrameAreaName( newDataRow, newDataCol, 0 ), //data3rd 5 ), frame ); } @@ -2610,7 +2610,7 @@ const KDChartParams::KDChartFrameSettings* KDChartParams::frameSettings( uint ar if( pIterIdx ) *pIterIdx = 0; const TQString key( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ) ); - KDChartFrameSettings* it = _areaDict.tqfind( key ); + KDChartFrameSettings* it = _areaDict.find( key ); bFound = ( it != 0 ); if( bFound ) return it; @@ -2698,7 +2698,7 @@ uint KDChartParams::insertCustomBox( const KDChartCustomBox & box ) const uint maxIndex = maxCustomBoxIdx(); newIdx = 1 + maxIndex; for( uint idx = 0; idx <= maxIndex; ++idx ) { - if( ! _customBoxDict.tqfind( idx ) ) { + if( ! _customBoxDict.find( idx ) ) { newIdx = idx; _customBoxDictMayContainHoles = true; // we found a hole, so there might be more of them break; @@ -2758,7 +2758,7 @@ bool KDChartParams::removeCustomBox( const uint & idx ) */ const KDChartCustomBox* KDChartParams::customBox( uint box ) const { - return _customBoxDict.tqfind( box ); + return _customBoxDict.find( box ); } /** @@ -2776,7 +2776,7 @@ const KDChartCustomBox* KDChartParams::customBox( uint box ) const */ KDChartCustomBox* KDChartParams::customBoxRef( uint box ) { - return _customBoxDict.tqfind( box ); + return _customBoxDict.find( box ); } /** @@ -4685,7 +4685,7 @@ void KDChartParams::setLineMarkerStyle( uint dataset, LineMarkerStyle style ) */ KDChartParams::LineMarkerStyle KDChartParams::lineMarkerStyle( uint dataset ) const { - if( _lineMarkerStyles.tqfind( dataset ) != _lineMarkerStyles.end() ) + if( _lineMarkerStyles.find( dataset ) != _lineMarkerStyles.end() ) return _lineMarkerStyles[ dataset ]; else return LineMarkerCircle; // default @@ -4891,7 +4891,7 @@ Qt::PenStyle KDChartParams::lineStyle( uint dataset ) const if( KDCHART_GLOBAL_LINE_STYLE == dataset ) // global line style return _lineStyle; - else if( _datasetLineStyles.tqfind( dataset ) == _datasetLineStyles.end() ) + else if( _datasetLineStyles.find( dataset ) == _datasetLineStyles.end() ) return lineStyle(); else return _datasetLineStyles[ dataset ]; @@ -5197,7 +5197,7 @@ void KDChartParams::setPolarMarkerStyle( uint dataset, PolarMarkerStyle style ) */ KDChartParams::PolarMarkerStyle KDChartParams::polarMarkerStyle( uint dataset ) const { - if( _polarMarkerStyles.tqfind( dataset ) != _polarMarkerStyles.end() ) + if( _polarMarkerStyles.find( dataset ) != _polarMarkerStyles.end() ) return _polarMarkerStyles[ dataset ]; else return PolarMarkerCircle; // default @@ -6729,7 +6729,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue, <li>Manual - Uses texts set with setLegendText(); if no text is set for a dataset, the legend text will be empty. <li>FirstColumn - Uses values from the first column, no matter what - this tqcontains. + this contains. <li>Automatic - Tries first to use values from the first column; if this does not contain any string values, tries to use values set manually with setLegendText(). If there are no values set manually diff --git a/libkdchart/KDChartParams.h b/libkdchart/KDChartParams.h index 7196ef2..7ae8c27 100644 --- a/libkdchart/KDChartParams.h +++ b/libkdchart/KDChartParams.h @@ -393,7 +393,7 @@ public slots: bool addFrameHeightToLayout = true ) { _areaDict.setAutoDelete( TRUE ); - _areaDict.tqreplace( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ), + _areaDict.replace( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ), new KDChartFrameSettings(0,0,0, frame, outerGapX, @@ -436,7 +436,7 @@ public slots: shadowWidth, sunPos ); - _areaDict.tqreplace( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ), + _areaDict.replace( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ), new KDChartFrameSettings( 0,0,0, frame, outerGapX, outerGapY, @@ -477,7 +477,7 @@ public slots: shadowWidth, sunPos ); - _areaDict.tqreplace( + _areaDict.replace( dataRegionFrameAreaName( dataRow, dataCol, 0 ), //data3rd 5 ), new KDChartFrameSettings( dataRow, dataCol, @@ -1924,7 +1924,7 @@ public slots: TQString legendText( uint dataset ) const { - if( _legendText.tqfind( dataset ) != _legendText.end() ) + if( _legendText.find( dataset ) != _legendText.end() ) return _legendText[ dataset ]; else return TQString(); diff --git a/libkdchart/KDChartParams_io.cpp b/libkdchart/KDChartParams_io.cpp index e24ce59..2feaf17 100644 --- a/libkdchart/KDChartParams_io.cpp +++ b/libkdchart/KDChartParams_io.cpp @@ -2200,7 +2200,7 @@ bool KDChartParams::loadXML( const TQDomDocument& doc ) .tqarg( 0, 5 );//frameSettings->data3rd(), 5 ); else str = TQString( "%1/-----/-----/-----" ).tqarg( areaId, 5 ); - _areaDict.tqreplace( str, frameSettings ); + _areaDict.replace( str, frameSettings ); } } else diff --git a/libkdchart/KDChartPiePainter.cpp b/libkdchart/KDChartPiePainter.cpp index dd00f62..ada03b4 100644 --- a/libkdchart/KDChartPiePainter.cpp +++ b/libkdchart/KDChartPiePainter.cpp @@ -241,7 +241,7 @@ void KDChartPiePainter::paintData( TQPainter* painter, // take one pie from the stack int currentpie = todostack.pop(); // if this pie was already drawn, ignore it - if ( donelist.tqfind( currentpie ) != donelist.end() ) + if ( donelist.find( currentpie ) != donelist.end() ) continue; // If this pie is the frontmost pie, put it back, but at the @@ -278,10 +278,10 @@ void KDChartPiePainter::paintData( TQPainter* painter, // whether these have not been painted already, and put them // on the stack. int leftOfCurrent = findLeftPie( currentpie ); - if ( donelist.tqfind( leftOfCurrent ) == donelist.end() ) + if ( donelist.find( leftOfCurrent ) == donelist.end() ) todostack.push( leftOfCurrent ); int rightOfCurrent = findRightPie( currentpie ); - if ( donelist.tqfind( rightOfCurrent ) == donelist.end() ) + if ( donelist.find( rightOfCurrent ) == donelist.end() ) todostack.push( rightOfCurrent ); } @@ -326,7 +326,7 @@ void KDChartPiePainter::drawOnePie( TQPainter* painter, // need to compute a new position for each or some of the pie TQValueList<int> explodeList = params()->explodeValues(); if( explodeList.count() == 0 || // nothing on list, explode all - explodeList.tqfind( pie ) != explodeList.end() ) { + explodeList.find( pie ) != explodeList.end() ) { double explodeAngle = ( startAngle + angleLen / 2 ) / 16; double explodeAngleRad = DEGTORAD( explodeAngle ); double cosAngle = cos( explodeAngleRad ); @@ -335,7 +335,7 @@ void KDChartPiePainter::drawOnePie( TQPainter* painter, // find the explode factor for this particular pie double explodeFactor = 0.0; TQMap<int,double> explodeFactors = params()->explodeFactors(); - if( !explodeFactors.tqcontains( pie ) ) // not on factors list, use default + if( !explodeFactors.contains( pie ) ) // not on factors list, use default explodeFactor = params()->explodeFactor(); else // on factors list, use segment-specific value explodeFactor = explodeFactors[pie]; diff --git a/libkdchart/KDChartRingPainter.cpp b/libkdchart/KDChartRingPainter.cpp index d9016ed..9740fa5 100644 --- a/libkdchart/KDChartRingPainter.cpp +++ b/libkdchart/KDChartRingPainter.cpp @@ -203,7 +203,7 @@ void KDChartRingPainter::paintData( TQPainter* painter, bool explode = params()->explode() && // explosion is on at all ( dataset == (int)datasetStart ) && // outermost ring ( ( explodeList.count() == 0 ) || // either nothing on explode list - ( explodeList.tqfind( value ) != explodeList.end() ) ); // or pie is on it + ( explodeList.find( value ) != explodeList.end() ) ); // or pie is on it drawOneSegment( painter, currentouterradius, @@ -253,7 +253,7 @@ void KDChartRingPainter::drawOneSegment( TQPainter* painter, // find the explode factor for this particular ring segment double explodeFactor = 0.0; TQMap<int,double> explodeFactors = params()->explodeFactors(); - if( !explodeFactors.tqcontains( value ) ) // not on factors list, use default + if( !explodeFactors.contains( value ) ) // not on factors list, use default explodeFactor = params()->explodeFactor(); else // on factors list, use segment-specific value explodeFactor = explodeFactors[value]; diff --git a/libkdchart/KDChartWidget.cpp b/libkdchart/KDChartWidget.cpp index 00e4a45..c3e42b8 100644 --- a/libkdchart/KDChartWidget.cpp +++ b/libkdchart/KDChartWidget.cpp @@ -168,7 +168,7 @@ void KDChartWidget::mousePressEvent( TQMouseEvent* event ) //TQPtrListIterator < KDChartDataRegion > it( _dataRegions ); for( current = _dataRegions.last(); current; current = _dataRegions.prev() ){ //while ( ( current = it.current() ) ) { - if ( current->tqcontains( event->pos() ) ) { + if ( current->contains( event->pos() ) ) { _mousePressedOnRegion = current; if ( event->button() == Qt::LeftButton ){ emit dataLeftPressed( current->row, current->col ); @@ -198,7 +198,7 @@ void KDChartWidget::mouseReleaseEvent( TQMouseEvent* event ) TQPtrListIterator < KDChartDataRegion > it( _dataRegions ); while ( ( current = it.current() ) ) { ++it; - if ( current->tqcontains( event->pos() ) ) { + if ( current->contains( event->pos() ) ) { if ( event->button() == Qt::LeftButton ) { emit dataLeftReleased( current->row, current->col ); emit dataLeftReleased( event->pos() ); diff --git a/libkdchart/KDDrawText.cpp b/libkdchart/KDDrawText.cpp index 2ef9308..a954a5b 100644 --- a/libkdchart/KDDrawText.cpp +++ b/libkdchart/KDDrawText.cpp @@ -163,13 +163,13 @@ void KDDrawText::drawRotatedTxt( TQPainter* painter, pFM = const_cast<TQFontMetrics*>(fontMet); } - int nLF = text.tqcontains('\n'); + int nLF = text.contains('\n'); if( INT_MAX == txtWidth ) { if( nLF ){ int tw; txtWidth = 0; int i0 = 0; - int iLF = text.tqfind('\n'); + int iLF = text.find('\n'); while( -1 != iLF ){ const TQRect r(pFM->boundingRect( text.mid(i0, iLF-i0) )); tw = r.width()+ 2; @@ -177,7 +177,7 @@ void KDDrawText::drawRotatedTxt( TQPainter* painter, if( tw > txtWidth ) txtWidth = tw; i0 = iLF+1; - iLF = text.tqfind('\n', i0); + iLF = text.find('\n', i0); } if( iLF < (int)text.length() ){ const TQRect r(pFM->boundingRect( text.mid( i0 ) )); |