From c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Dec 2011 11:37:08 -0600 Subject: Remove additional unneeded tq method conversions --- kmymoney2/views/kaccountsview.cpp | 4 +- kmymoney2/views/kaccountsviewdecl.ui | 2 +- kmymoney2/views/kbudgetview.cpp | 14 +-- kmymoney2/views/kcategoriesview.h | 2 +- kmymoney2/views/kcategoriesviewdecl.ui | 2 +- kmymoney2/views/kforecastview.cpp | 32 +++---- kmymoney2/views/kgloballedgerview.cpp | 18 ++-- kmymoney2/views/khomeview.cpp | 156 +++++++++++++++---------------- kmymoney2/views/kinstitutionsviewdecl.ui | 2 +- kmymoney2/views/kinvestmentlistitem.cpp | 2 +- kmymoney2/views/kmymoneyview.cpp | 52 +++++------ kmymoney2/views/kpayeesview.cpp | 32 +++---- kmymoney2/views/kpayeesview.h | 2 +- kmymoney2/views/kpayeesviewdecl.ui | 6 +- kmymoney2/views/kreportsview.cpp | 22 ++--- kmymoney2/views/kscheduledlistitem.cpp | 2 +- kmymoney2/views/kscheduledlistitem.h | 2 +- kmymoney2/views/kscheduledview.cpp | 4 +- 18 files changed, 178 insertions(+), 178 deletions(-) (limited to 'kmymoney2/views') diff --git a/kmymoney2/views/kaccountsview.cpp b/kmymoney2/views/kaccountsview.cpp index 8de2b20..32a0043 100644 --- a/kmymoney2/views/kaccountsview.cpp +++ b/kmymoney2/views/kaccountsview.cpp @@ -241,7 +241,7 @@ void KAccountsView::loadIconView(void) file->accountList(alist); TQValueList::const_iterator it_a; for(it_a = alist.begin(); it_a != alist.end(); ++it_a) { - accountMap[TQString("%1-%2").tqarg((*it_a).name()).tqarg((*it_a).id())] = *it_a; + accountMap[TQString("%1-%2").arg((*it_a).name()).arg((*it_a).id())] = *it_a; } bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked() @@ -583,7 +583,7 @@ void KAccountsView::slotOpenObject(TQIconViewItem* item) TQString KAccountsView::point(const TQPoint& val) const { - return TQString("%1;%2").tqarg(val.x()).tqarg(val.y()); + return TQString("%1;%2").arg(val.x()).arg(val.y()); } TQPoint KAccountsView::point(const TQString& val) const diff --git a/kmymoney2/views/kaccountsviewdecl.ui b/kmymoney2/views/kaccountsviewdecl.ui index e6e2454..e62e248 100644 --- a/kmymoney2/views/kaccountsviewdecl.ui +++ b/kmymoney2/views/kaccountsviewdecl.ui @@ -176,7 +176,7 @@ RichText - + WordBreak|AlignVCenter|AlignRight diff --git a/kmymoney2/views/kbudgetview.cpp b/kmymoney2/views/kbudgetview.cpp index 9012927..6cc6aa4 100644 --- a/kmymoney2/views/kbudgetview.cpp +++ b/kmymoney2/views/kbudgetview.cpp @@ -66,7 +66,7 @@ KBudgetListItem::KBudgetListItem(KListView *parent, const MyMoneyBudget& budget) m_budget(budget) { setText(0, budget.name()); - setText(1, TQString("%1").tqarg(budget.budgetStart().year())); + setText(1, TQString("%1").arg(budget.budgetStart().year())); // allow in column rename setRenameEnabled(0, true); @@ -485,8 +485,8 @@ void KBudgetView::askSave(void) // check if the content of a currently selected budget was modified // and ask to store the data if (m_updateButton->isEnabled()) { - if (KMessageBox::questionYesNo(this, TQString("%1").tqarg( - i18n("Do you want to save the changes for %1").tqarg(m_budget.name())), + if (KMessageBox::questionYesNo(this, TQString("%1").arg( + i18n("Do you want to save the changes for %1").arg(m_budget.name())), i18n("Save changes")) == KMessageBox::Yes) { m_inSelection = true; slotUpdateBudget(); @@ -609,7 +609,7 @@ void KBudgetView::slotRenameBudget(TQListViewItem* p , int /*col*/, const TQStri if (KMessageBox::questionYesNo(this, i18n("A budget with the name '%1' already exists. It is not advisable to have " "multiple budgets with the same identification name. Are you sure you would like " - "to rename the budget?").tqarg(new_name)) != KMessageBox::Yes) + "to rename the budget?").arg(new_name)) != KMessageBox::Yes) { p->setText(0,pBudget->budget().name()); return; @@ -633,7 +633,7 @@ void KBudgetView::slotRenameBudget(TQListViewItem* p , int /*col*/, const TQStri } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); delete e; } } @@ -734,7 +734,7 @@ void KBudgetView::slotResetBudget(void) loadAccounts(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to reset budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); delete e; } } @@ -748,7 +748,7 @@ void KBudgetView::slotUpdateBudget(void) slotRefreshHideUnusedButton(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); delete e; } } diff --git a/kmymoney2/views/kcategoriesview.h b/kmymoney2/views/kcategoriesview.h index 77fb5d7..8d1896e 100644 --- a/kmymoney2/views/kcategoriesview.h +++ b/kmymoney2/views/kcategoriesview.h @@ -45,7 +45,7 @@ class KListViewSearchLineWidget; * @author Michael Edwardes, Thomas Baumgart * * While named "categories view", this view actually displays all accounts - * that are tqchildren of the global "Income" and "Expense" accounts. Even though + * that are children of the global "Income" and "Expense" accounts. Even though * categories are internally just accounts as well, the distinction between * categories and accounts in the user interface is done for better * usability and clarity. diff --git a/kmymoney2/views/kcategoriesviewdecl.ui b/kmymoney2/views/kcategoriesviewdecl.ui index 9eb7df7..e916d8f 100644 --- a/kmymoney2/views/kcategoriesviewdecl.ui +++ b/kmymoney2/views/kcategoriesviewdecl.ui @@ -125,7 +125,7 @@ RichText - + WordBreak|AlignVCenter|AlignRight diff --git a/kmymoney2/views/kforecastview.cpp b/kmymoney2/views/kforecastview.cpp index 42d9fad..bd8de0b 100644 --- a/kmymoney2/views/kforecastview.cpp +++ b/kmymoney2/views/kforecastview.cpp @@ -292,13 +292,13 @@ void KForecastView::loadSummaryView(void) case -1: break; case 0: - msg = TQString("").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %2 is below the minimum balance %3 today.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency)); + msg = TQString("").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %2 is below the minimum balance %3 today.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency)); msg += TQString(""); break; default: - msg = TQString("").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency)).tqarg(dropMinimum-1); + msg = TQString("").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency)).arg(dropMinimum-1); msg += TQString(""); } @@ -314,25 +314,25 @@ void KForecastView::loadSummaryView(void) break; case 0: if(acc.accountGroup() == MyMoneyAccount::Asset) { - msg = TQString("").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %1 is below %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)); + msg = TQString("").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %1 is below %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)); msg += TQString(""); break; } if(acc.accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 is above %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)); + msg = i18n("The balance of %1 is above %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)); break; } break; default: if(acc.accountGroup() == MyMoneyAccount::Asset) { - msg = TQString("").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %1 will drop below %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero); + msg = TQString("").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %1 will drop below %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero); msg += TQString(""); break; } if(acc.accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero); + msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero); break; } } @@ -344,8 +344,8 @@ void KForecastView::loadSummaryView(void) msg = TQString(); MyMoneyMoney accCycleVariation = forecast.accountCycleVariation(acc); if (accCycleVariation < MyMoneyMoney(0, 1)) { - msg = TQString("").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The account %1 is decreasing %2 per cycle.").tqarg(acc.name()).tqarg(accCycleVariation.formatMoney(acc, currency)); + msg = TQString("").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The account %1 is decreasing %2 per cycle.").arg(acc.name()).arg(accCycleVariation.formatMoney(acc, currency)); msg += TQString(""); } @@ -401,14 +401,14 @@ void KForecastView::loadAdvancedView(void) //add columns for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) { - int col = m_advancedList->addColumn(i18n("Min Bal %1").tqarg(i), -1); + int col = m_advancedList->addColumn(i18n("Min Bal %1").arg(i), -1); m_advancedList->setColumnAlignment(col, TQt::AlignRight); - m_advancedList->addColumn(i18n("Min Date %1").tqarg(i), -1); + m_advancedList->addColumn(i18n("Min Date %1").arg(i), -1); } for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) { - int col = m_advancedList->addColumn(i18n("Max Bal %1").tqarg(i), -1); + int col = m_advancedList->addColumn(i18n("Max Bal %1").arg(i), -1); m_advancedList->setColumnAlignment(col, TQt::AlignRight); - m_advancedList->addColumn(i18n("Max Date %1").tqarg(i), -1); + m_advancedList->addColumn(i18n("Max Date %1").arg(i), -1); } int col = m_advancedList->addColumn(i18n("Average"), -1); m_advancedList->setColumnAlignment(col, TQt::AlignRight); diff --git a/kmymoney2/views/kgloballedgerview.cpp b/kmymoney2/views/kgloballedgerview.cpp index 38e5fd3..bb64c10 100644 --- a/kmymoney2/views/kgloballedgerview.cpp +++ b/kmymoney2/views/kgloballedgerview.cpp @@ -652,11 +652,11 @@ void KGlobalLedgerView::loadView(void) arg(paymentAmount[m_account.id()].abs().formatMoney(m_account.fraction())) ); } if(pStatement) { - pStatement->setText(i18n("%1 payments (%2)").tqarg(payments[m_account.id()]). + pStatement->setText(i18n("%1 payments (%2)").arg(payments[m_account.id()]). arg(paymentAmount[m_account.id()].abs().formatMoney(m_account.fraction())) ); } if(dStatement) { - dStatement->setText(i18n("%1 deposits (%2)").tqarg(deposits[m_account.id()]). + dStatement->setText(i18n("%1 deposits (%2)").arg(deposits[m_account.id()]). arg(depositAmount[m_account.id()].abs().formatMoney(m_account.fraction())) ); } @@ -724,24 +724,24 @@ void KGlobalLedgerView::updateSummaryLine(const TQMap& a if(isReconciliationAccount()) { if(m_account.accountType() != MyMoneyAccount::Investment) { - m_leftSummaryLabel->setText(i18n("Statement: %1").tqarg(d->m_endingBalance.formatMoney("", d->m_precision))); - m_centerSummaryLabel->setText(i18n("Cleared: %1").tqarg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); - m_rightSummaryLabel->setText(i18n("Difference: %1").tqarg((clearedBalance[m_account.id()] - d->m_endingBalance).formatMoney("", d->m_precision))); + m_leftSummaryLabel->setText(i18n("Statement: %1").arg(d->m_endingBalance.formatMoney("", d->m_precision))); + m_centerSummaryLabel->setText(i18n("Cleared: %1").arg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); + m_rightSummaryLabel->setText(i18n("Difference: %1").arg((clearedBalance[m_account.id()] - d->m_endingBalance).formatMoney("", d->m_precision))); } } else { // update summary line in normal mode TQDate reconcileDate = m_account.lastReconciliationDate(); if(reconcileDate.isValid()) { - m_leftSummaryLabel->setText(i18n("Last reconciled: %1").tqarg(KGlobal::locale()->formatDate(reconcileDate, true))); + m_leftSummaryLabel->setText(i18n("Last reconciled: %1").arg(KGlobal::locale()->formatDate(reconcileDate, true))); } else { m_leftSummaryLabel->setText(i18n("Never reconciled")); } m_rightSummaryLabel->setPaletteForegroundColor(m_leftSummaryLabel->paletteForegroundColor()); if(m_account.accountType() != MyMoneyAccount::Investment) { - m_centerSummaryLabel->setText(i18n("Cleared: %1").tqarg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); - m_rightSummaryLabel->setText(i18n("Balance: %1").tqarg(actBalance[m_account.id()].formatMoney("", d->m_precision))); + m_centerSummaryLabel->setText(i18n("Cleared: %1").arg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); + m_rightSummaryLabel->setText(i18n("Balance: %1").arg(actBalance[m_account.id()].formatMoney("", d->m_precision))); bool showNegative = actBalance[m_account.id()].isNegative(); if(m_account.accountGroup() == MyMoneyAccount::Liability && !actBalance[m_account.id()].isZero()) showNegative = !showNegative; @@ -775,7 +775,7 @@ void KGlobalLedgerView::updateSummaryLine(const TQMap& a } balance += ((*it_b) * rate).convert(base.smallestAccountFraction()); } - m_rightSummaryLabel->setText(i18n("Investment value: %1%2").tqarg(approx ? "~" : "").tqarg(balance.formatMoney(base.tradingSymbol(), d->m_precision))); + m_rightSummaryLabel->setText(i18n("Investment value: %1%2").arg(approx ? "~" : "").arg(balance.formatMoney(base.tradingSymbol(), d->m_precision))); } } } diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp index be92c29..60bb173 100644 --- a/kmymoney2/views/khomeview.cpp +++ b/kmymoney2/views/khomeview.cpp @@ -101,10 +101,10 @@ void KHomeView::Private::addNameIndex(TQMap &idx, cons } else if(idx[key].id() != account.id()) { key = account.name() + "[%1]"; int dup = 2; - while(!idx[key.tqarg(dup)].id().isEmpty() - && idx[key.tqarg(dup)].id() != account.id()) + while(!idx[key.arg(dup)].id().isEmpty() + && idx[key.arg(dup)].id() != account.id()) ++dup; - idx[key.tqarg(dup)] = account; + idx[key.arg(dup)] = account; } } @@ -215,7 +215,7 @@ void KHomeView::loadView(void) m_forecast.setForecastDone(false); TQString filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css"); - TQString header = TQString("\n\n").tqarg(filename); + TQString header = TQString("\n\n").arg(filename); header += KMyMoneyUtils::variableCSS(); @@ -226,7 +226,7 @@ void KHomeView::loadView(void) m_part->begin(); m_part->write(header); - m_part->write(TQString("
%1
").tqarg(i18n("Your Financial Summary"))); + m_part->write(TQString("
%1
").arg(i18n("Your Financial Summary"))); TQStringList settings = KMyMoneyGlobalSettings::itemList(); @@ -291,7 +291,7 @@ void KHomeView::loadView(void) void KHomeView::showNetWorthGraph(void) { #ifdef HAVE_KDCHART - m_part->write(TQString("
%1
\n
 
\n").tqarg(i18n("Networth Forecast"))); + m_part->write(TQString("
%1
\n
 
\n").arg(i18n("Networth Forecast"))); MyMoneyReport reportCfg = MyMoneyReport( MyMoneyReport::eAssetLiability, @@ -361,7 +361,7 @@ void KHomeView::showNetWorthGraph(void) m_part->write(""); m_part->write(""); - m_part->write(TQString("").tqarg(TQString(KCodecs::base64Encode(ba)))); + m_part->write(TQString("").arg(TQString(KCodecs::base64Encode(ba)))); m_part->write(""); m_part->write("
\"Networth\"
\"Networth\"
"); @@ -422,7 +422,7 @@ void KHomeView::showPayments(void) } m_part->write("
"); - m_part->write(TQString("
%1
\n").tqarg(i18n("Payments"))); + m_part->write(TQString("
%1
\n").arg(i18n("Payments"))); if(overdues.count() > 0) { m_part->write("
 
\n"); @@ -432,7 +432,7 @@ void KHomeView::showPayments(void) TQValueList::Iterator it_f; m_part->write(""); - m_part->write(TQString("\n").tqarg(showColoredAmount(i18n("Overdue payments"), true))); + m_part->write(TQString("\n").arg(showColoredAmount(i18n("Overdue payments"), true))); m_part->write(""); m_part->write("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); showPaymentEntry(*it, cnt); m_part->write(""); // make sure to not repeat overdues later again @@ -502,7 +502,7 @@ void KHomeView::showPayments(void) if (todays.count() > 0) { m_part->write("
 
\n"); m_part->write("
%1
%1
"); m_part->write(i18n("Date")); @@ -464,7 +464,7 @@ void KHomeView::showPayments(void) break; } - m_part->write(TQString("
"); - m_part->write(TQString("\n").tqarg(i18n("Today's payments"))); + m_part->write(TQString("\n").arg(i18n("Today's payments"))); m_part->write(""); m_part->write(""); for(t_it = todays.begin(); t_it != todays.end(); ++t_it) { - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); showPaymentEntry(*t_it); m_part->write(""); } @@ -536,7 +536,7 @@ void KHomeView::showPayments(void) TQValueList::Iterator it; m_part->write("
%1
%1
"); m_part->write(i18n("Date")); @@ -522,7 +522,7 @@ void KHomeView::showPayments(void) m_part->write("
"); - m_part->write(TQString("\n").tqarg(i18n("Future payments"))); + m_part->write(TQString("\n").arg(i18n("Future payments"))); m_part->write(""); m_part->write("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); showPaymentEntry(*it); m_part->write(""); @@ -602,12 +602,12 @@ void KHomeView::showPayments(void) while(1); if (needMoreLess) { - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); m_part->write(""); m_part->write(""); @@ -642,16 +642,16 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) KGlobal::locale()->formatDate(sched.adjustedNextDueDate(), true) + "").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); showAccountEntry(*it_m); m_part->write(""); } @@ -846,10 +846,10 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney& } tmp = TQString(""; + link(VIEW_LEDGER, TQString("?id=%1").arg(acc.id())) + acc.name() + linkend() + ""; //show account balance - tmp += TQString("").tqarg(showColoredAmount(amount, value.isNegative())); + tmp += TQString("").arg(showColoredAmount(amount, value.isNegative())); //show minimum balance column if requested if(showMinBal) { @@ -858,7 +858,7 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney& tmp += TQString(""); } else { //show minimum balance entry - tmp += TQString("").tqarg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative())); + tmp += TQString("").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative())); } } // qDebug("accountEntry = '%s'", tmp.latin1()); @@ -886,7 +886,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc) val = val.convert(acc.fraction()); value += val; } catch(MyMoneyException* e) { - qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").tqarg(stock.name(), e->what())).data()); + qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data()); delete e; } } @@ -906,7 +906,7 @@ void KHomeView::showFavoriteReports(void) { if ( (*it_report).isFavorite() ) { if(firstTime) { - m_part->write(TQString("
%1
\n
 
\n").tqarg(i18n("Favorite Reports"))); + m_part->write(TQString("
%1
\n
 
\n").arg(i18n("Favorite Reports"))); m_part->write("
%1
%1
"); m_part->write(i18n("Date")); @@ -585,7 +585,7 @@ void KHomeView::showPayments(void) if(cnt > 0) --cnt; - m_part->write(TQString("
"); if(m_showAllSchedules) { - m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("reduced")) + i18n("Less...") + linkend()); + m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").arg("reduced")) + i18n("Less...") + linkend()); } else { - m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("full")) + i18n("More...") + linkend()); + m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").arg("full")) + i18n("More...") + linkend()); } m_part->write("
"; if(pathEnter.length() > 0) - tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=enter").tqarg(sched.id()), i18n("Enter schedule")) + TQString("").tqarg(pathEnter) + linkend(); + tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=enter").arg(sched.id()), i18n("Enter schedule")) + TQString("").arg(pathEnter) + linkend(); if(pathSkip.length() > 0) - tmp += " " + link(VIEW_SCHEDULE, TQString("?id=%1&mode=skip").tqarg(sched.id()), i18n("Skip schedule")) + TQString("").tqarg(pathSkip) + linkend(); + tmp += " " + link(VIEW_SCHEDULE, TQString("?id=%1&mode=skip").arg(sched.id()), i18n("Skip schedule")) + TQString("").arg(pathSkip) + linkend(); tmp += TQString(" "); - tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=edit").tqarg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend(); + tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=edit").arg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend(); //show quantity of payments overdue if any if(cnt > 1) - tmp += i18n(" (%1 payments)").tqarg(cnt); + tmp += i18n(" (%1 payments)").arg(cnt); //show account of the main split tmp += ""; @@ -788,7 +788,7 @@ void KHomeView::showAccounts(KHomeView::paymentTypeE type, const TQString& heade TQMap::const_iterator it_m; for(it_m = nameIdx.begin(); it_m != nameIdx.end(); ++it_m) { - m_part->write(TQString("
") + - link(VIEW_LEDGER, TQString("?id=%1").tqarg(acc.id())) + acc.name() + linkend() + "%1%1 %1%1
"); m_part->write("") - .tqarg(row++ & 0x01 ? "even" : "odd") - .tqarg(link(VIEW_REPORTS, TQString("?id=%1").tqarg((*it_report).id()))) - .tqarg((*it_report).name()) - .tqarg(linkend()) - .tqarg((*it_report).comment()) + .arg(row++ & 0x01 ? "even" : "odd") + .arg(link(VIEW_REPORTS, TQString("?id=%1").arg((*it_report).id()))) + .arg((*it_report).name()) + .arg(linkend()) + .arg((*it_report).comment()) ); } @@ -961,16 +961,16 @@ void KHomeView::showForecast(void) beginDay = m_forecast.accountsCycle(); // Now output header - m_part->write(TQString("
%1
\n
 
\n").tqarg(i18n("%1 Day Forecast").tqarg(m_forecast.forecastDays()))); + m_part->write(TQString("
%1
\n
 
\n").arg(i18n("%1 Day Forecast").arg(m_forecast.forecastDays()))); m_part->write("
"); m_part->write(i18n("Report")); @@ -917,11 +917,11 @@ void KHomeView::showFavoriteReports(void) } m_part->write(TQString("
%2%3%4%5
"); m_part->write(""); int colWidth = 55/ (m_forecast.forecastDays() / m_forecast.accountsCycle()); for(i = 0; (i*m_forecast.accountsCycle() + beginDay) <= m_forecast.forecastDays(); ++i) { - m_part->write(TQString(""); colspan++; } @@ -983,9 +983,9 @@ void KHomeView::showForecast(void) for(it_account = nameIdx.begin(); it_account != nameIdx.end(); ++it_account) { //MyMoneyAccount acc = (*it_n); - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); m_part->write(TQString(""); + link(VIEW_LEDGER, TQString("?id=%1").arg((*it_account).id())) + (*it_account).name() + linkend() + ""); int dropZero = -1; //account dropped below zero int dropMinimum = -1; //account dropped below minimum balance @@ -1007,8 +1007,8 @@ void KHomeView::showForecast(void) TQString amount; amount = forecastBalance.formatMoney( *it_account, currency); amount.replace(" "," "); - m_part->write(TQString("").tqarg(showColoredAmount(amount, forecastBalance.isNegative()))); + m_part->write(TQString("").arg(showColoredAmount(amount, forecastBalance.isNegative()))); } m_part->write(""); @@ -1036,17 +1036,17 @@ void KHomeView::showForecast(void) case -1: break; case 0: - msg = i18n("The balance of %1 is below the minimum balance %2 today.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency)); + msg = i18n("The balance of %1 is below the minimum balance %2 today.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency)); msg = showColoredAmount(msg, true); break; default: - msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency)).tqarg(dropMinimum-1); + msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency)).arg(dropMinimum-1); msg = showColoredAmount(msg, true); break; } if(!msg.isEmpty()) { - m_part->write(TQString("").tqarg(msg).tqarg(colspan)); + m_part->write(TQString("").arg(msg).arg(colspan)); } } // a drop below zero is always shown @@ -1056,28 +1056,28 @@ void KHomeView::showForecast(void) break; case 0: if((*it_account).accountGroup() == MyMoneyAccount::Asset) { - msg = i18n("The balance of %1 is below %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)); + msg = i18n("The balance of %1 is below %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)); msg = showColoredAmount(msg, true); break; } if((*it_account).accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 is above %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)); + msg = i18n("The balance of %1 is above %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)); break; } break; default: if((*it_account).accountGroup() == MyMoneyAccount::Asset) { - msg = i18n("The balance of %1 will drop below %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero); + msg = i18n("The balance of %1 will drop below %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero); msg = showColoredAmount(msg, true); break; } if((*it_account).accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero); + msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero); break; } } if(!msg.isEmpty()) { - m_part->write(TQString("").tqarg(msg).tqarg(colspan)); + m_part->write(TQString("").arg(msg).arg(colspan)); } } m_part->write("
"); m_part->write(i18n("Account")); m_part->write("").tqarg(colWidth)); + m_part->write(TQString("").arg(colWidth)); - m_part->write(i18n("%1 days").tqarg(i*m_forecast.accountsCycle() + beginDay)); + m_part->write(i18n("%1 days").arg(i*m_forecast.accountsCycle() + beginDay)); m_part->write("
") + - link(VIEW_LEDGER, TQString("?id=%1").tqarg((*it_account).id())) + (*it_account).name() + linkend() + "").tqarg(colWidth)); - m_part->write(TQString("%1").arg(colWidth)); + m_part->write(TQString("%1
%1
%1
%1
%1
"); @@ -1090,9 +1090,9 @@ 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.replace(" ", " ")); + titlePart = TQString(" title=\"%1\"").arg(title.replace(" ", " ")); - return TQString("").tqarg(view, query, titlePart); + return TQString("").arg(view, query, titlePart); } const TQString KHomeView::linkend(void) const @@ -1260,7 +1260,7 @@ void KHomeView::showAssetsLiabilities(void) TQMap::const_iterator asset_it = nameAssetsIdx.begin(); TQMap::const_iterator liabilities_it = nameLiabilitiesIdx.begin(); for(; asset_it != nameAssetsIdx.end() || liabilities_it != nameLiabilitiesIdx.end();) { - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); //write an asset account if we still have any if(asset_it != nameAssetsIdx.end()) { MyMoneyMoney value; @@ -1325,23 +1325,23 @@ void KHomeView::showAssetsLiabilities(void) amountLiabilities.replace(" "," "); amountNetWorth.replace(" "," "); - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); //print total for assets - m_part->write(TQString("%1%2").tqarg(i18n("Total Assets")).tqarg(showColoredAmount(amountAssets, netAssets.isNegative()))); + m_part->write(TQString("%1%2").arg(i18n("Total Assets")).arg(showColoredAmount(amountAssets, netAssets.isNegative()))); //leave the intermediate column empty m_part->write(""); //print total liabilities - m_part->write(TQString("%1%2").tqarg(i18n("Total Liabilities")).tqarg(showColoredAmount(amountLiabilities, netLiabilities.isNegative()))); + m_part->write(TQString("%1%2").arg(i18n("Total Liabilities")).arg(showColoredAmount(amountLiabilities, netLiabilities.isNegative()))); m_part->write(""); //print net worth - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); m_part->write(""); - m_part->write(TQString("%1%2").tqarg(i18n("Net Worth")).tqarg(showColoredAmount(amountNetWorth, netWorth.isNegative() ))); + m_part->write(TQString("%1%2").arg(i18n("Net Worth")).arg(showColoredAmount(amountNetWorth, netWorth.isNegative() ))); m_part->write(""); m_part->write(""); @@ -1402,9 +1402,9 @@ void KHomeView::showBudget(void) TQString totalActualAmount = totalActualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); TQString totalBudgetDiffAmount = totalBudgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - m_part->write(TQString("%1").tqarg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative()))); - m_part->write(TQString("%1").tqarg(showColoredAmount(totalActualAmount, totalActualValue.isNegative()))); - m_part->write(TQString("%1").tqarg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative()))); + m_part->write(TQString("%1").arg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative()))); + m_part->write(TQString("%1").arg(showColoredAmount(totalActualAmount, totalActualValue.isNegative()))); + m_part->write(TQString("%1").arg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative()))); m_part->write(""); m_part->write(""); @@ -1448,10 +1448,10 @@ void KHomeView::showBudget(void) //write the outergroup if it is the first row of outergroup being shown if(i == 0) { m_part->write(""); - m_part->write(TQString("%1").tqarg(KMyMoneyUtils::accountTypeToString( rowname.accountType()))); + m_part->write(TQString("%1").arg(KMyMoneyUtils::accountTypeToString( rowname.accountType()))); m_part->write(""); } - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); //get values from grid MyMoneyMoney actualValue = it_row.data()[eActual][1]; @@ -1464,12 +1464,12 @@ void KHomeView::showBudget(void) TQString budgetDiffAmount = budgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); //account name - m_part->write(TQString("") + link(VIEW_LEDGER, TQString("?id=%1").tqarg(rowname.id())) + rowname.name() + linkend() + ""); + m_part->write(TQString("") + link(VIEW_LEDGER, TQString("?id=%1").arg(rowname.id())) + rowname.name() + linkend() + ""); //show amounts - m_part->write(TQString("%1").tqarg(showColoredAmount(budgetAmount, budgetValue.isNegative()))); - m_part->write(TQString("%1").tqarg(showColoredAmount(actualAmount, actualValue.isNegative()))); - m_part->write(TQString("%1").tqarg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative()))); + m_part->write(TQString("%1").arg(showColoredAmount(budgetAmount, budgetValue.isNegative()))); + m_part->write(TQString("%1").arg(showColoredAmount(actualAmount, actualValue.isNegative()))); + m_part->write(TQString("%1").arg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative()))); m_part->write(""); } ++it_row; @@ -1481,8 +1481,8 @@ void KHomeView::showBudget(void) //if no negative differences are found, then inform that if(i == 0) { - m_part->write(TQString("").tqarg(i++ & 0x01 ? "even" : "odd")); - m_part->write(TQString("%1").tqarg(i18n("No Budget Categories have been overrun"))); + m_part->write(TQString("").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("%1").arg(i18n("No Budget Categories have been overrun"))); m_part->write(""); } m_part->write("
"); @@ -1493,7 +1493,7 @@ TQString KHomeView::showColoredAmount(const TQString& amount, bool isNegative) { if(isNegative) { //if negative, get the settings for negative numbers - return TQString("%2").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount); + return TQString("%2").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount); } //if positive, return the same string @@ -1810,16 +1810,16 @@ void KHomeView::showCashFlowSummary() m_part->write(TQString("")); //print current income - m_part->write(TQString("%2").tqarg(showColoredAmount(amountIncome, incomeValue.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountIncome, incomeValue.isNegative()))); //print the scheduled income - m_part->write(TQString("%2").tqarg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative()))); //print current expenses - m_part->write(TQString("%2").tqarg(showColoredAmount(amountExpense, expenseValue.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountExpense, expenseValue.isNegative()))); //print the scheduled expenses - m_part->write(TQString("%2").tqarg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative()))); m_part->write(""); m_part->write(""); @@ -1852,16 +1852,16 @@ void KHomeView::showCashFlowSummary() m_part->write(TQString("")); //print current liquid assets - m_part->write(TQString("%2").tqarg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative()))); //print the scheduled transfers - m_part->write(TQString("%2").tqarg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative()))); //print current liabilities - m_part->write(TQString("%2").tqarg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative()))); //print the scheduled transfers - m_part->write(TQString("%2").tqarg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative()))); m_part->write(""); @@ -1909,13 +1909,13 @@ void KHomeView::showCashFlowSummary() m_part->write(" "); //print expected assets - m_part->write(TQString("%2").tqarg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative()))); //print expected liabilities - m_part->write(TQString("%2").tqarg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative()))); //print expected profit - m_part->write(TQString("%2").tqarg(showColoredAmount(amountProfit, profitValue.isNegative()))); + m_part->write(TQString("%2").arg(showColoredAmount(amountProfit, profitValue.isNegative()))); m_part->write(""); diff --git a/kmymoney2/views/kinstitutionsviewdecl.ui b/kmymoney2/views/kinstitutionsviewdecl.ui index 34b8a7b..a6cdf93 100644 --- a/kmymoney2/views/kinstitutionsviewdecl.ui +++ b/kmymoney2/views/kinstitutionsviewdecl.ui @@ -68,7 +68,7 @@ RichText - + WordBreak|AlignVCenter|AlignRight diff --git a/kmymoney2/views/kinvestmentlistitem.cpp b/kmymoney2/views/kinvestmentlistitem.cpp index f0f1fd3..d13f5d3 100644 --- a/kmymoney2/views/kinvestmentlistitem.cpp +++ b/kmymoney2/views/kinvestmentlistitem.cpp @@ -195,7 +195,7 @@ const TQString KInvestmentListItem::calculateGain(const equity_price_history& hi bNegative = true; } - TQString ds = TQString("%1%").tqarg(result, 0, 'f', 3); + TQString ds = TQString("%1%").arg(result, 0, 'f', 3); return ds; /*MyMoneyMoney result = (currentValue / comparisonValue); diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp index c28bc26..5101628 100644 --- a/kmymoney2/views/kmymoneyview.cpp +++ b/kmymoney2/views/kmymoneyview.cpp @@ -583,7 +583,7 @@ bool KMyMoneyView::readFile(const KURL& url) } else { if(!KIO::NetAccess::download(url, filename, NULL)) { KMessageBox::detailedError(this, - i18n("Error while loading file '%1'!").tqarg(url.url()), + i18n("Error while loading file '%1'!").arg(url.url()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; @@ -595,7 +595,7 @@ bool KMyMoneyView::readFile(const KURL& url) TQFile file(filename); TQFileInfo info(file); if(!info.isFile()) { - TQString msg=i18n("%1 is not a KMyMoney file.").tqarg(filename); + TQString msg=i18n("%1 is not a KMyMoney file.").arg(filename); KMessageBox::error(this, TQString("

")+msg, i18n("Filetype Error")); return false; } @@ -636,7 +636,7 @@ bool KMyMoneyView::readFile(const KURL& url) haveAt = false; isEncrypted = true; } else { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("GPG is not available for decryption of file %1").tqarg(filename))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("GPG is not available for decryption of file %1").arg(filename))); qfile = TQT_TQIODEVICE(new TQFile(file.name())); } } else { @@ -714,18 +714,18 @@ bool KMyMoneyView::readFile(const KURL& url) ::timetrace("done reading to memory"); } else { if(m_fileType == KmmBinary) { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").tqarg(filename))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").arg(filename))); } else { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 contains an unknown file format!").tqarg(filename))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 contains an unknown file format!").arg(filename))); } rc = false; } } else { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("Cannot read from file %1!").tqarg(filename))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("Cannot read from file %1!").arg(filename))); rc = false; } } catch (MyMoneyException *e) { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("Cannot load file %1. Reason: %2").tqarg(filename, e->what()))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("Cannot load file %1. Reason: %2").arg(filename, e->what()))); delete e; rc = false; } @@ -735,13 +735,13 @@ bool KMyMoneyView::readFile(const KURL& url) } qfile->close(); } else { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 not found!").tqarg(filename))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 not found!").arg(filename))); rc = false; } delete qfile; } } else { - KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 not found!").tqarg(filename))); + KMessageBox::sorry(this, TQString("%1"). arg(i18n("File %1 not found!").arg(filename))); rc = false; } @@ -805,7 +805,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) { retry = false; break; case 1: // permanent error - KMessageBox::detailedError (this, i18n("Can't open database %1\n").tqarg(dbURL.prettyURL()), reader->lastError()); + KMessageBox::detailedError (this, i18n("Can't open database %1\n").arg(dbURL.prettyURL()), reader->lastError()); if (pDBMgr) { removeStorage(); delete pDBMgr; @@ -911,7 +911,7 @@ bool KMyMoneyView::initializeStorage() // Check if we have to modify the file before we allow to work with it IMyMoneyStorage* s = MyMoneyFile::instance()->storage(); while (s->fileFixVersion() < s->currentFixVersion()) { - qDebug("%s", (TQString("testing fileFixVersion %1 < %2").tqarg(s->fileFixVersion()).tqarg(s->currentFixVersion())).data()); + qDebug("%s", (TQString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data()); switch (s->fileFixVersion()) { case 0: fixFile_0(); @@ -984,7 +984,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter if(KMyMoneyGlobalSettings::encryptRecover()) { encryptRecover = true; if(!KGPGFile::keyAvailable(TQString(RECOVER_KEY_ID))) { - KMessageBox::sorry(this, TQString("

")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id

%1

has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the
KMyMoney web-site. This time your data will not be encrypted with the KMyMoney recover key.").tqarg(RECOVER_KEY_ID), i18n("GPG-Key not found")); + KMessageBox::sorry(this, TQString("

")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id

%1

has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the KMyMoney web-site. This time your data will not be encrypted with the KMyMoney recover key.").arg(RECOVER_KEY_ID), i18n("GPG-Key not found")); encryptRecover = false; } } @@ -993,7 +993,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter TQStringList::const_iterator it_s; for(it_s = keys.begin(); it_s != keys.begin(); ++it_s) { if(!KGPGFile::keyAvailable(*it_s)) { - KMessageBox::sorry(this, TQString("

")+i18n("You have specified to encrypt your data for the user-id

%1.

Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").tqarg(*it_s), i18n("GPG-Key not found")); + KMessageBox::sorry(this, TQString("

")+i18n("You have specified to encrypt your data for the user-id

%1.

Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").arg(*it_s), i18n("GPG-Key not found")); encryptedOk = false; } } @@ -1031,7 +1031,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); } } else if(!plaintext) { @@ -1045,7 +1045,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); } statusDevice = base->device(); } @@ -1054,11 +1054,11 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter ft.commit(); pWriter->setProgressCallback(&KMyMoneyView::progressCallback); - dev->reseStatus(); + dev->resetStatus(); pWriter->writeFile(dev, dynamic_cast (MyMoneyFile::instance()->storage())); MyMoneyFile::instance()->blockSignals(blocked); if(statusDevice->status() != IO_Ok) { - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); } pWriter->setProgressCallback(0); @@ -1067,7 +1067,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter dev->close(); if(statusDevice->status() != IO_Ok) { delete dev; - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); } delete dev; } else @@ -1115,7 +1115,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) bool rc = true; try { if(! url.isValid()) { - throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").tqarg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").arg(url.url())); } if(url.isLocalFile()) { @@ -1144,10 +1144,10 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) } catch (MyMoneyException* e) { qfile.abort(); delete e; - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); } } else { - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); } } chown(filename, static_cast(-1), gid); @@ -1155,7 +1155,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) KTempFile tmpfile; saveToLocalFile(tmpfile.file(), pWriter, plaintext, keyList); if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL)) - throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url())); tmpfile.unlink(); } m_fileType = KmmXML; @@ -1210,7 +1210,7 @@ bool KMyMoneyView::saveAsDatabase(const KURL& url) KMessageBox::detailedError (this, i18n("Can't open or create database %1\n" "Retry SaveAsDatabase and click Help" - " for further info").tqarg(url.prettyURL()), writer->lastError()); + " for further info").arg(url.prettyURL()), writer->lastError()); } delete writer; return (rc); @@ -1268,7 +1268,7 @@ void KMyMoneyView::slotSetBaseCurrency(const MyMoneySecurity& baseCurrency) MyMoneyFile::instance()->setBaseCurrency(baseCurrency); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(baseCurrency.name()).tqarg(e->what()), i18n("Set base currency")); + KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(baseCurrency.name()).arg(e->what()), i18n("Set base currency")); delete e; } } @@ -1568,7 +1568,7 @@ void KMyMoneyView::loadAncientCurrencies(void) // Source: http://www.focus.de/finanzen/news/malta-und-zypern_aid_66058.html loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", TQDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR"); - loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").tqarg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); + loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").arg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); // Source: http://www.focus.de/finanzen/news/waehrungszone-slowakei-ist-neuer-euro-staat_aid_359025.html loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", TQDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR"); @@ -1884,7 +1884,7 @@ void KMyMoneyView::fixLoanAccount_0(MyMoneyAccount acc) i18n("The account \"%1\" was previously created as loan account but some information " "is missing. The new loan wizard will be started to collect all relevant " "information. Please use a KMyMoney version >= 0.8.7 and < 0.9 to correct the problem." - ).tqarg(acc.name()), + ).arg(acc.name()), i18n("Account problem")); throw new MYMONEYEXCEPTION("Fix LoanAccount0 not supported anymore"); diff --git a/kmymoney2/views/kpayeesview.cpp b/kmymoney2/views/kpayeesview.cpp index 87066ac..29696e5 100644 --- a/kmymoney2/views/kpayeesview.cpp +++ b/kmymoney2/views/kpayeesview.cpp @@ -298,11 +298,11 @@ KTransactionListItem::~KTransactionListItem() { } -void KTransactionListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) +void KTransactionListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { TQColorGroup _cg = cg; _cg.setColor(TQColorGroup::Base, backgroundColor()); - TQListViewItem::paintCell(p, _cg, column, width, tqalignment); + TQListViewItem::paintCell(p, _cg, column, width, alignment); } const TQColor KTransactionListItem::backgroundColor(void) @@ -495,7 +495,7 @@ void KPayeesView::slotRenamePayee(TQListViewItem* p , int /* col */, const TQStr if (KMessageBox::questionYesNo(this, i18n("A payee with the name '%1' already exists. It is not advisable to have " "multiple payees with the same identification name. Are you sure you would like " - "to rename the payee?").tqarg(new_name)) != KMessageBox::Yes) + "to rename the payee?").arg(new_name)) != KMessageBox::Yes) { p->setText(0,m_payee.name()); return; @@ -521,7 +521,7 @@ void KPayeesView::slotRenamePayee(TQListViewItem* p , int /* col */, const TQStr } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify payee"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); delete e; } } @@ -565,8 +565,8 @@ void KPayeesView::slotSelectPayee(void) // check if the content of a currently selected payee was modified // and ask to store the data if (m_updateButton->isEnabled()) { - if (KMessageBox::questionYesNo(this, TQString("%1").tqarg( - i18n("Do you want to save the changes for %1?").tqarg(m_newName)), + if (KMessageBox::questionYesNo(this, TQString("%1").arg( + i18n("Do you want to save the changes for %1?").arg(m_newName)), i18n("Save changes")) == KMessageBox::Yes) { m_inSelection = true; slotUpdatePayee(); @@ -664,7 +664,7 @@ void KPayeesView::showTransactions(void) m_transactionView->clear(); if(m_payee.id().isEmpty() || !m_tabWidget->isEnabled()) { - m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); + m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); return; } @@ -727,24 +727,24 @@ void KPayeesView::showTransactions(void) if(s.action() == MyMoneySplit::ActionAmortization) { if(acc.accountType() == MyMoneyAccount::Loan) { if(s.value().isPositive()) { - txt = i18n("Amortization of %1").tqarg(acc.name()); + txt = i18n("Amortization of %1").arg(acc.name()); } else { - txt = i18n("Payment to %1").tqarg(acc.name()); + txt = i18n("Payment to %1").arg(acc.name()); } } else if(acc.accountType() == MyMoneyAccount::AssetLoan) { if(s.value().isNegative()) { - txt = i18n("Amortization of %1").tqarg(acc.name()); + txt = i18n("Amortization of %1").arg(acc.name()); } else { - txt = i18n("Payment to %1").tqarg(acc.name()); + txt = i18n("Payment to %1").arg(acc.name()); } } else { - txt = i18n("Loan payment from %1").tqarg(acc.name()); + txt = i18n("Loan payment from %1").arg(acc.name()); } } else if (file->isTransfer(*t)) { if(!s.value().isNegative()) { - txt = i18n("Transfer to %1").tqarg(acc.name()); + txt = i18n("Transfer to %1").arg(acc.name()); } else { - txt = i18n("Transfer from %1").tqarg(acc.name()); + txt = i18n("Transfer from %1").arg(acc.name()); } } else if(t->splitCount() > 2) { txt = i18n("Split transaction (category replacement)", "Split transaction"); @@ -755,7 +755,7 @@ void KPayeesView::showTransactions(void) item->setText(2, txt); item->setText(3, s.value().formatMoney(acc.fraction())); } - m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); + m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); // Trick: it seems, that the initial sizing of the view does // not work correctly. At least, the columns do not get displayed @@ -872,7 +872,7 @@ void KPayeesView::slotUpdatePayee(void) } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify payee"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); delete e; } } diff --git a/kmymoney2/views/kpayeesview.h b/kmymoney2/views/kpayeesview.h index 95be179..adbd708 100644 --- a/kmymoney2/views/kpayeesview.h +++ b/kmymoney2/views/kpayeesview.h @@ -185,7 +185,7 @@ public: /** * use my own paint method */ - void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); /** * use my own backgroundColor method diff --git a/kmymoney2/views/kpayeesviewdecl.ui b/kmymoney2/views/kpayeesviewdecl.ui index a513e61..01bb31d 100644 --- a/kmymoney2/views/kpayeesviewdecl.ui +++ b/kmymoney2/views/kpayeesviewdecl.ui @@ -168,7 +168,7 @@ Balance: - + AlignVCenter|AlignRight @@ -293,7 +293,7 @@ Notes - + AlignTop|AlignLeft @@ -359,7 +359,7 @@ Address: - + AlignTop|AlignLeft diff --git a/kmymoney2/views/kreportsview.cpp b/kmymoney2/views/kreportsview.cpp index 045de08..12b8cef 100755 --- a/kmymoney2/views/kreportsview.cpp +++ b/kmymoney2/views/kreportsview.cpp @@ -156,7 +156,7 @@ void KReportsView::KReportTab::saveAs( const TQString& filename, bool includeCSS else { TQTextStream stream(&file); - TQRegExp exp(TQString("(.*)(()(.*)").tqarg(KGlobal::locale()->encoding())); + TQRegExp exp(TQString("(.*)(()(.*)").arg(KGlobal::locale()->encoding())); TQString table = createTable(); if(exp.search(table) != -1 && includeCSS) { TQFile cssFile(exp.cap(3)); @@ -234,13 +234,13 @@ TQString KReportsView::KReportTab::createTable(const TQString& links) { TQString filename; if(!MyMoneyFile::instance()->value("reportstylesheet").isEmpty()) - filename = KGlobal::dirs()->findResource("appdata", TQString("html/%1").tqarg(MyMoneyFile::instance()->value("reportstylesheet"))); + filename = KGlobal::dirs()->findResource("appdata", TQString("html/%1").arg(MyMoneyFile::instance()->value("reportstylesheet"))); if(filename.isEmpty()) filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css"); TQString header = TQString("\n") + - TQString("").tqarg(filename); + TQString("").arg(filename); - header += TQString("").tqarg(KGlobal::locale()->encoding()); + header += TQString("").arg(KGlobal::locale()->encoding()); header += KMyMoneyUtils::variableCSS(); header += "\n"; @@ -260,7 +260,7 @@ TQString KReportsView::KReportTab::createTable(const TQString& links) { kdDebug(2) << "KReportsView::KReportTab::createTable(): ERROR " << e->what() << endl; - TQString error = TQString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).tqarg(e->what()); + TQString error = TQString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).arg(e->what()); KMessageBox::error(this, error, i18n("Critical Error")); @@ -394,7 +394,7 @@ KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, cons void KReportsView::KReportGroupListItem::setNr(const int nr) { m_nr = nr; - setText(0, TQString("%1. %2").tqarg(nr).tqarg(m_name)); + setText(0, TQString("%1. %2").arg(nr).arg(m_name)); } void KReportsView::loadView(void) @@ -583,8 +583,8 @@ void KReportsView::slotSaveView(void) // adjust to our local needs (filetypes etc.) and // enhanced to show the m_saveEncrypted combo box KFileDialog dlg( ":kmymoney-export", - TQString("%1|%2\n").tqarg("*.csv").tqarg(i18n("CSV (Filefilter)", "CSV files")) + - TQString("%1|%2\n").tqarg("*.html").tqarg(i18n("HTML (Filefilter)", "HTML files")), + TQString("%1|%2\n").arg("*.csv").arg(i18n("CSV (Filefilter)", "CSV files")) + + TQString("%1|%2\n").arg("*.html").arg(i18n("HTML (Filefilter)", "HTML files")), this, "filedialog", true, vbox); connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), this, TQT_SLOT(slotSaveFilterChanged(const TQString&))); @@ -657,7 +657,7 @@ void KReportsView::slotDuplicate(void) if(tab) { MyMoneyReport dupe = tab->report(); - dupe.setName( TQString(i18n("Copy of %1")).tqarg(dupe.name()) ); + dupe.setName( TQString(i18n("Copy of %1")).arg(dupe.name()) ); if ( dupe.comment() == i18n("Default Report") ) dupe.setComment( i18n("Custom Report") ); dupe.clearId(); @@ -688,7 +688,7 @@ void KReportsView::slotDelete(void) MyMoneyReport report = tab->report(); if ( ! report.id().isEmpty() ) { - if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, TQString("")+i18n("Are you sure you want to delete report %1? There is no way to recover it!").tqarg(report.name())+TQString(""), i18n("Delete Report?"))) + if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, TQString("")+i18n("Are you sure you want to delete report %1? There is no way to recover it!").arg(report.name())+TQString(""), i18n("Delete Report?"))) { // close the tab and then remove the report so that it is not // generated again during the following loadView() call @@ -700,7 +700,7 @@ void KReportsView::slotDelete(void) } } else - KMessageBox::information(this, TQString("")+i18n("Sorry, %1 is a default report. You may not delete it.").tqarg(report.name())+TQString(""), i18n("Delete Report?")); + KMessageBox::information(this, TQString("")+i18n("Sorry, %1 is a default report. You may not delete it.").arg(report.name())+TQString(""), i18n("Delete Report?")); } } diff --git a/kmymoney2/views/kscheduledlistitem.cpp b/kmymoney2/views/kscheduledlistitem.cpp index 9983c7d..b055b25 100644 --- a/kmymoney2/views/kscheduledlistitem.cpp +++ b/kmymoney2/views/kscheduledlistitem.cpp @@ -130,7 +130,7 @@ KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoney else setText(2, "---"); m_amount = split.shares().abs(); - setText(3, TQString("%1 ").tqarg(m_amount.formatMoney(acc, currency))); + setText(3, TQString("%1 ").arg(m_amount.formatMoney(acc, currency))); // Do the real next payment like ms-money etc if (schedule.isFinished()) { diff --git a/kmymoney2/views/kscheduledlistitem.h b/kmymoney2/views/kscheduledlistitem.h index 44d2af8..61ef12d 100644 --- a/kmymoney2/views/kscheduledlistitem.h +++ b/kmymoney2/views/kscheduledlistitem.h @@ -66,7 +66,7 @@ public: KScheduledListItem(KListView *parent, const TQString& description, const TQPixmap& pixmap = TQPixmap(), const TQString& sortKey = TQString()); /** - * This constructor is used to create a child of one of the tqchildren + * This constructor is used to create a child of one of the children * created by the above method. * * This child describes a schedule and represents the data in schedule. diff --git a/kmymoney2/views/kscheduledview.cpp b/kmymoney2/views/kscheduledview.cpp index 74ea25b..ec3bc44 100644 --- a/kmymoney2/views/kscheduledview.cpp +++ b/kmymoney2/views/kscheduledview.cpp @@ -240,7 +240,7 @@ void KScheduledView::refresh(bool full, const TQString& schedId) TQTimer::singleShot(10, this, TQT_SLOT(slotTimerDone())); m_qlistviewScheduled->update(); - // force tqrepaint in case the filter is set + // force repaint in case the filter is set m_searchWidget->searchLine()->updateSearch(TQString()); if (m_openBills) @@ -273,7 +273,7 @@ void KScheduledView::slotTimerDone(void) m_qlistviewScheduled->ensureItemVisible(item); } - // force a tqrepaint of all items to update the branches + // force a repaint of all items to update the branches for(item = m_qlistviewScheduled->firstChild(); item != 0; item = item->itemBelow()) { m_qlistviewScheduled->repaintItem(item); } -- cgit v1.2.1