diff options
Diffstat (limited to 'kmymoney2/views')
-rw-r--r-- | kmymoney2/views/kaccountsview.cpp | 6 | ||||
-rw-r--r-- | kmymoney2/views/kbudgetview.cpp | 6 | ||||
-rw-r--r-- | kmymoney2/views/kcategoriesview.cpp | 6 | ||||
-rw-r--r-- | kmymoney2/views/kgloballedgerview.cpp | 4 | ||||
-rw-r--r-- | kmymoney2/views/khomeview.cpp | 48 | ||||
-rw-r--r-- | kmymoney2/views/kinstitutionsview.cpp | 6 | ||||
-rw-r--r-- | kmymoney2/views/kinvestmentlistitem.cpp | 2 | ||||
-rw-r--r-- | kmymoney2/views/kmymoneyview.cpp | 14 | ||||
-rw-r--r-- | kmymoney2/views/kmymoneyview.h | 2 | ||||
-rw-r--r-- | kmymoney2/views/kpayeesview.cpp | 2 | ||||
-rwxr-xr-x | kmymoney2/views/kreportsview.cpp | 8 |
11 files changed, 52 insertions, 52 deletions
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() ); |