summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneyfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/mymoney/mymoneyfile.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneyfile.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kmymoney2/mymoney/mymoneyfile.cpp b/kmymoney2/mymoney/mymoneyfile.cpp
index 4809b28..c36c163 100644
--- a/kmymoney2/mymoney/mymoneyfile.cpp
+++ b/kmymoney2/mymoney/mymoneyfile.cpp
@@ -146,7 +146,7 @@ void MyMoneyFile::checkTransaction(const char* txt) const
{
checkStorage();
if(!d->m_inTransaction) {
- throw new MYMONEYEXCEPTION(TQString("No transaction started for %1").arg(txt));
+ throw new MYMONEYEXCEPTION(TQString("No transaction started for %1").tqarg(txt));
}
}
@@ -605,7 +605,7 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent)
throw new MYMONEYEXCEPTION("Stock account must have investment account as parent ");
if(!account.isInvest() && parent.accountType() == MyMoneyAccount::Investment)
- throw new MYMONEYEXCEPTION("Investment account can only have stock accounts as children");
+ throw new MYMONEYEXCEPTION("Investment account can only have stock accounts as tqchildren");
// clear all changed objects from cache
MyMoneyNotifier notifier(this);
@@ -619,7 +619,7 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent)
if(!account.openingDate().isValid()) {
- account.setOpeningDate(TQDate::currentDate());
+ account.setOpeningDate(TQDate::tqcurrentDate());
}
account.setParentAccountId(parent.id());
@@ -757,7 +757,7 @@ const MyMoneyAccount MyMoneyFile::openingBalanceAccount_internal(const MyMoneySe
throw new MYMONEYEXCEPTION("Opening balance for non currencies not supported");
MyMoneyAccount acc;
- TQRegExp match(TQString("^%1").arg(i18n(MyMoneyFile::OpeningBalancesPrefix)));
+ TQRegExp match(TQString("^%1").tqarg(i18n(MyMoneyFile::OpeningBalancesPrefix)));
TQValueList<MyMoneyAccount> accounts;
TQValueList<MyMoneyAccount>::Iterator it;
@@ -774,7 +774,7 @@ const MyMoneyAccount MyMoneyFile::openingBalanceAccount_internal(const MyMoneySe
}
if(acc.id().isEmpty()) {
- throw new MYMONEYEXCEPTION(TQString("No opening balance account for %1").arg(security.tradingSymbol()));
+ throw new MYMONEYEXCEPTION(TQString("No opening balance account for %1").tqarg(security.tradingSymbol()));
}
return acc;
@@ -787,7 +787,7 @@ const MyMoneyAccount MyMoneyFile::createOpeningBalanceAccount(const MyMoneySecur
MyMoneyAccount acc;
TQString name(i18n(MyMoneyFile::OpeningBalancesPrefix));
if(security.id() != baseCurrency().id()) {
- name += TQString(" (%1)").arg(security.id());
+ name += TQString(" (%1)").tqarg(security.id());
}
acc.setName(name);
acc.setAccountType(MyMoneyAccount::Equity);
@@ -1418,9 +1418,9 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
if((*it_b).id() == parent.id()) {
if(problemAccount != (*it_a).name()) {
problemAccount = (*it_a).name();
- rc << i18n("* Problem with account '%1'").arg(problemAccount);
- rc << i18n(" * Loop detected between this account and account '%2'.").arg((*it_b).name());
- rc << i18n(" Reparenting account '%2' to top level account '%1'.").arg(toplevel.name(), (*it_a).name());
+ rc << i18n("* Problem with account '%1'").tqarg(problemAccount);
+ 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.contains(toplevel.id()) == 0)
accountRebuild << toplevel.id();
@@ -1448,13 +1448,13 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
problemCount++;
if(problemAccount != (*it_a).name()) {
problemAccount = (*it_a).name();
- rc << i18n("* Problem with account '%1'").arg(problemAccount);
+ rc << i18n("* Problem with account '%1'").tqarg(problemAccount);
}
// the parent belongs to a different group, so we reconnect to the
// master group account (asset, liability, etc) to which this account
// should belong and update it in the engine.
- rc << i18n(" * Parent account '%1' belongs to a different group.").arg(parent.name());
- rc << i18n(" New parent account is the top level account '%1'.").arg(toplevel.name());
+ rc << i18n(" * Parent account '%1' belongs to a different group.").tqarg(parent.name());
+ rc << i18n(" New parent account is the top level account '%1'.").tqarg(toplevel.name());
(*it_a).setParentAccountId(toplevel.id());
// make sure to rebuild the sub-accounts of the top account
@@ -1467,10 +1467,10 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
problemCount++;
if(problemAccount != (*it_a).name()) {
problemAccount = (*it_a).name();
- rc << i18n("* Problem with account '%1'").arg(problemAccount);
+ rc << i18n("* Problem with account '%1'").tqarg(problemAccount);
}
// parent exists, but does not have a reference to the account
- rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").arg(parent.name(), problemAccount);
+ rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").tqarg(parent.name(), problemAccount);
if(accountRebuild.contains(parent.id()) == 0)
accountRebuild << parent.id();
}
@@ -1482,10 +1482,10 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
problemCount++;
if(problemAccount != (*it_a).name()) {
problemAccount = (*it_a).name();
- rc << i18n("* Problem with account '%1'").arg(problemAccount);
+ rc << i18n("* Problem with account '%1'").tqarg(problemAccount);
}
- rc << i18n(" * The parent with id %1 does not exist anymore.").arg(parentId);
- rc << i18n(" New parent account is the top level account '%1'.").arg(toplevel.name());
+ rc << i18n(" * The parent with id %1 does not exist anymore.").tqarg(parentId);
+ rc << i18n(" New parent account is the top level account '%1'.").tqarg(toplevel.name());
(*it_a).setParentAccountId(toplevel.id());
addNotification((*it_a).id());
@@ -1495,7 +1495,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
accountRebuild << toplevel.id();
}
- // now check that all the children exist and have the correct type
+ // now check that all the tqchildren exist and have the correct type
for(it_c = (*it_a).accountList().begin(); it_c != (*it_a).accountList().end(); ++it_c) {
// check that the child exists
try {
@@ -1504,9 +1504,9 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
problemCount++;
if(problemAccount != (*it_a).name()) {
problemAccount = (*it_a).name();
- rc << i18n("* Problem with account '%1'").arg(problemAccount);
+ rc << i18n("* Problem with account '%1'").tqarg(problemAccount);
}
- rc << i18n(" * Child account with id %1 does not exist anymore.").arg(*it_c);
+ 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.contains((*it_a).id()) == 0)
accountRebuild << (*it_a).id();
@@ -1540,7 +1540,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
// clear the affected lists
for(it_a = list.begin(); it_a != list.end(); ++it_a) {
if(accountRebuild.contains((*it_a).id())) {
- rc << TQString(" %1").arg((*it_a).name());
+ rc << TQString(" %1").tqarg((*it_a).name());
// clear the account list
for(it_c = (*it_a).accountList().begin(); it_c != (*it_a).accountList().end();) {
(*it_a).removeAccountId(*it_c);
@@ -1571,7 +1571,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
addNotification((*it_a).id());
} catch (MyMoneyException *e) {
delete e;
- rc << i18n(" * Unable to update account data for account %1 in engine").arg((*it_a).name());
+ rc << i18n(" * Unable to update account data for account %1 in engine").tqarg((*it_a).name());
}
}
}
@@ -1589,7 +1589,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
payee.clearId();
m_storage->addPayee(payee);
payeeConversionMap[(*it_p).id()] = payee.id();
- rc << i18n(" * Payee %1 recreated with fixed id").arg(payee.name());
+ rc << i18n(" * Payee %1 recreated with fixed id").tqarg(payee.name());
++problemCount;
}
}
@@ -1618,7 +1618,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
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'.").arg(t.id());
+ rc << i18n(" * Payee id updated in split of transaction '%1'.").tqarg(t.id());
++problemCount;
}
@@ -1631,16 +1631,16 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
// use the value as master if the transaction is balanced
if(t.splitSum().isZero()) {
s.setShares(s.value());
- rc << i18n(" * shares set to value in split of transaction '%1'.").arg(t.id());
+ rc << i18n(" * shares set to value in split of transaction '%1'.").tqarg(t.id());
} else {
s.setValue(s.shares());
- rc << i18n(" * value set to shares in split of transaction '%1'.").arg(t.id());
+ rc << i18n(" * value set to shares in split of transaction '%1'.").tqarg(t.id());
}
sChanged = true;
++problemCount;
}
} catch(MyMoneyException *e) {
- rc << i18n(" * Split %2 in transaction '%1' contains a reference to invalid account %3. Please fix manually.").arg(t.id(), (*it_s).id(), (*it_s).accountId());
+ rc << i18n(" * Split %2 in transaction '%1' contains a reference to invalid account %3. Please fix manually.").tqarg(t.id(), (*it_s).id(), (*it_s).accountId());
++problemCount;
++unfixedCount;
delete e;
@@ -1651,7 +1651,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
&& s.action() != MyMoneySplit::ActionInterest) {
s.setAction(MyMoneySplit::ActionInterest);
sChanged = true;
- rc << i18n(" * action marked as interest in split of transaction '%1'.").arg(t.id());
+ rc << i18n(" * action marked as interest in split of transaction '%1'.").tqarg(t.id());
++problemCount;
}
@@ -1678,13 +1678,13 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
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'.").arg((*it_sch).name());
+ rc << i18n(" * Payee id updated in split of schedule '%1'.").tqarg((*it_sch).name());
++problemCount;
}
if(!(*it_s).value().isZero() && (*it_s).shares().isZero()) {
s.setShares(s.value());
sChanged = true;
- rc << i18n(" * Split in scheduled transaction '%1' contained value != 0 and shares == 0.").arg((*it_sch).name());
+ rc << i18n(" * Split in scheduled transaction '%1' contained value != 0 and shares == 0.").tqarg((*it_sch).name());
rc << i18n(" Shares set to value.");
++problemCount;
}
@@ -1693,7 +1693,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
if(!(*it_s).bankID().isEmpty()) {
s.setBankID(TQString());
sChanged = true;
- rc << i18n(" * Removed bankid from split in scheduled transaction '%1'.").arg((*it_sch).name());
+ rc << i18n(" * Removed bankid from split in scheduled transaction '%1'.").tqarg((*it_sch).name());
++problemCount;
}
@@ -1706,16 +1706,16 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
// use the value as master if the transaction is balanced
if(t.splitSum().isZero()) {
s.setShares(s.value());
- rc << i18n(" * shares set to value in split in schedule '%1'.").arg((*it_sch).name());
+ rc << i18n(" * shares set to value in split in schedule '%1'.").tqarg((*it_sch).name());
} else {
s.setValue(s.shares());
- rc << i18n(" * value set to shares in split in schedule '%1'.").arg((*it_sch).name());
+ rc << i18n(" * value set to shares in split in schedule '%1'.").tqarg((*it_sch).name());
}
sChanged = true;
++problemCount;
}
} catch(MyMoneyException *e) {
- rc << i18n(" * Split %2 in schedule '%1' contains a reference to invalid account %3. Please fix manually.").arg((*it_sch).name(), (*it_s).id(), (*it_s).accountId());
+ rc << i18n(" * Split %2 in schedule '%1' contains a reference to invalid account %3. Please fix manually.").tqarg((*it_sch).name(), (*it_s).id(), (*it_s).accountId());
++problemCount;
++unfixedCount;
delete e;
@@ -1741,7 +1741,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
bool rChanged = false;
for(it_p = pList.begin(); it_p != pList.end(); ++it_p) {
if(payeeConversionMap.find(*it_p) != payeeConversionMap.end()) {
- rc << i18n(" * Payee id updated in report '%1'.").arg((*it_r).name());
+ rc << i18n(" * Payee id updated in report '%1'.").tqarg((*it_r).name());
++problemCount;
r.removeReference(*it_p);
r.addPayee(payeeConversionMap[*it_p]);
@@ -1758,7 +1758,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
for(it_m = payeeConversionMap.begin(); it_m != payeeConversionMap.end(); ++it_m) {
MyMoneyPayee payee = this->payee(it_m.key());
removePayee(payee);
- rc << i18n(" * Payee '%1' removed.").arg(payee.id());
+ rc << i18n(" * Payee '%1' removed.").tqarg(payee.id());
++problemCount;
}
@@ -1768,7 +1768,7 @@ const TQStringList MyMoneyFile::consistencyCheck(void)
rc << i18n("Finish! Data is consistent.");
else
rc << i18n("Finish! %1 problem(s) corrected. %2 problem(s) still present.")
- .arg(problemCount).arg(unfixedCount);
+ .tqarg(problemCount).tqarg(unfixedCount);
return rc;
}