summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-19 11:37:08 -0600
committerTimothy Pearson <[email protected]>2011-12-19 11:37:08 -0600
commitc70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6 (patch)
tree9a07481bb1245dac332e7db600c556e1db79ecf3 /kmymoney2/mymoney
parent28723595822268551d3e050c3a83bf6ca5e17dd5 (diff)
downloadkmymoney-c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6.tar.gz
kmymoney-c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'kmymoney2/mymoney')
-rw-r--r--kmymoney2/mymoney/mymoneyaccount.cpp6
-rw-r--r--kmymoney2/mymoney/mymoneyaccounttest.cpp6
-rw-r--r--kmymoney2/mymoney/mymoneyfile.cpp72
-rw-r--r--kmymoney2/mymoney/mymoneyfiletest.cpp8
-rw-r--r--kmymoney2/mymoney/mymoneyinstitution.cpp4
-rw-r--r--kmymoney2/mymoney/mymoneymoney.cpp18
-rw-r--r--kmymoney2/mymoney/mymoneypayee.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneyprice.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneyscheduled.cpp14
-rw-r--r--kmymoney2/mymoney/mymoneyscheduletest.cpp48
-rw-r--r--kmymoney2/mymoney/mymoneystatement.cpp2
-rw-r--r--kmymoney2/mymoney/mymoneytransaction.cpp14
-rw-r--r--kmymoney2/mymoney/mymoneytransactionfilter.cpp6
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp14
-rw-r--r--kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp2
-rw-r--r--kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp18
-rw-r--r--kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h2
-rw-r--r--kmymoney2/mymoney/storage/mymoneystorageanon.cpp2
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragesql.cpp100
-rw-r--r--kmymoney2/mymoney/storage/mymoneystoragexml.cpp10
20 files changed, 175 insertions, 175 deletions
diff --git a/kmymoney2/mymoney/mymoneyaccount.cpp b/kmymoney2/mymoney/mymoneyaccount.cpp
index 5d74e62..6ef1f9c 100644
--- a/kmymoney2/mymoney/mymoneyaccount.cpp
+++ b/kmymoney2/mymoney/mymoneyaccount.cpp
@@ -98,7 +98,7 @@ MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) :
if(node.hasAttribute("openingbalance")) {
if(!MyMoneyMoney(node.attribute("openingbalance")).isZero()) {
- TQString msg = i18n("Account %1 contains an opening balance. Please use a KMyMoney version >= 0.8 and < 0.9 to correct the problem.").tqarg(m_name);
+ TQString msg = i18n("Account %1 contains an opening balance. Please use a KMyMoney version >= 0.8 and < 0.9 to correct the problem.").arg(m_name);
throw new MYMONEYEXCEPTION(msg);
}
}
@@ -467,7 +467,7 @@ bool MyMoneyAccountLoan::hasReferenceTo(const TQString& id) const
void MyMoneyAccountLoan::setInterestCompounding(int frequency)
{
- setValue("compoundingFrequency", TQString("%1").tqarg(frequency));
+ setValue("compoundingFrequency", TQString("%1").arg(frequency));
}
int MyMoneyAccountLoan::interestCompounding(void) const
@@ -594,7 +594,7 @@ bool MyMoneyAccount::isCategory(void) const
TQString MyMoneyAccount::brokerageName(void) const
{
if(m_accountType == Investment)
- return TQString("%1 (%2)").tqarg(m_name, i18n("Brokerage (suffix for account names)", "Brokerage"));
+ return TQString("%1 (%2)").arg(m_name, i18n("Brokerage (suffix for account names)", "Brokerage"));
return m_name;
}
diff --git a/kmymoney2/mymoney/mymoneyaccounttest.cpp b/kmymoney2/mymoney/mymoneyaccounttest.cpp
index b30b0ce..12ea7f1 100644
--- a/kmymoney2/mymoney/mymoneyaccounttest.cpp
+++ b/kmymoney2/mymoney/mymoneyaccounttest.cpp
@@ -309,7 +309,7 @@ void MyMoneyAccountTest::testWriteXML() {
" </KEYVALUEPAIRS>\n"
" </ACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n").
- arg(TQDate::currentDate().toString(Qt::ISODate)).tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref);
}
@@ -330,7 +330,7 @@ void MyMoneyAccountTest::testReadXML() {
" </KEYVALUEPAIRS>\n"
" </ACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n").
- arg(TQDate::currentDate().toString(Qt::ISODate)).tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate));
TQString ref_false = TQString(
"<!DOCTYPE TEST>\n"
@@ -346,7 +346,7 @@ void MyMoneyAccountTest::testReadXML() {
" </KEYVALUEPAIRS>\n"
" </KACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n").
- arg(TQDate::currentDate().toString(Qt::ISODate)).tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
diff --git a/kmymoney2/mymoney/mymoneyfile.cpp b/kmymoney2/mymoney/mymoneyfile.cpp
index 84146bd..4809b28 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").tqarg(txt));
+ throw new MYMONEYEXCEPTION(TQString("No transaction started for %1").arg(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 tqchildren");
+ throw new MYMONEYEXCEPTION("Investment account can only have stock accounts as children");
// clear all changed objects from cache
MyMoneyNotifier notifier(this);
@@ -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").tqarg(i18n(MyMoneyFile::OpeningBalancesPrefix)));
+ TQRegExp match(TQString("^%1").arg(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").tqarg(security.tradingSymbol()));
+ throw new MYMONEYEXCEPTION(TQString("No opening balance account for %1").arg(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)").tqarg(security.id());
+ name += TQString(" (%1)").arg(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'").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());
+ 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());
(*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'").tqarg(problemAccount);
+ rc << i18n("* Problem with account '%1'").arg(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.").tqarg(parent.name());
- rc << i18n(" New parent account is the top level account '%1'.").tqarg(toplevel.name());
+ 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());
(*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'").tqarg(problemAccount);
+ rc << i18n("* Problem with account '%1'").arg(problemAccount);
}
// parent exists, but does not have a reference to the account
- rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").tqarg(parent.name(), problemAccount);
+ rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").arg(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'").tqarg(problemAccount);
+ rc << i18n("* Problem with account '%1'").arg(problemAccount);
}
- 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());
+ 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());
(*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 tqchildren exist and have the correct type
+ // now check that all the children 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'").tqarg(problemAccount);
+ rc << i18n("* Problem with account '%1'").arg(problemAccount);
}
- rc << i18n(" * Child account with id %1 does not exist anymore.").tqarg(*it_c);
+ rc << i18n(" * Child account with id %1 does not exist anymore.").arg(*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").tqarg((*it_a).name());
+ rc << TQString(" %1").arg((*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").tqarg((*it_a).name());
+ rc << i18n(" * Unable to update account data for account %1 in engine").arg((*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").tqarg(payee.name());
+ rc << i18n(" * Payee %1 recreated with fixed id").arg(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'.").tqarg(t.id());
+ rc << i18n(" * Payee id updated in split of transaction '%1'.").arg(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'.").tqarg(t.id());
+ rc << i18n(" * shares set to value in split of transaction '%1'.").arg(t.id());
} else {
s.setValue(s.shares());
- rc << i18n(" * value set to shares in split of transaction '%1'.").tqarg(t.id());
+ rc << i18n(" * value set to shares in split of transaction '%1'.").arg(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.").tqarg(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.").arg(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'.").tqarg(t.id());
+ rc << i18n(" * action marked as interest in split of transaction '%1'.").arg(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'.").tqarg((*it_sch).name());
+ rc << i18n(" * Payee id updated in split of schedule '%1'.").arg((*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.").tqarg((*it_sch).name());
+ rc << i18n(" * Split in scheduled transaction '%1' contained value != 0 and shares == 0.").arg((*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'.").tqarg((*it_sch).name());
+ rc << i18n(" * Removed bankid from split in scheduled transaction '%1'.").arg((*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'.").tqarg((*it_sch).name());
+ rc << i18n(" * shares set to value in split in schedule '%1'.").arg((*it_sch).name());
} else {
s.setValue(s.shares());
- rc << i18n(" * value set to shares in split in schedule '%1'.").tqarg((*it_sch).name());
+ rc << i18n(" * value set to shares in split in schedule '%1'.").arg((*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.").tqarg((*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.").arg((*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'.").tqarg((*it_r).name());
+ rc << i18n(" * Payee id updated in report '%1'.").arg((*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.").tqarg(payee.id());
+ rc << i18n(" * Payee '%1' removed.").arg(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.")
- .tqarg(problemCount).tqarg(unfixedCount);
+ .arg(problemCount).arg(unfixedCount);
return rc;
}
diff --git a/kmymoney2/mymoney/mymoneyfiletest.cpp b/kmymoney2/mymoney/mymoneyfiletest.cpp
index 8fdbea4..1c25abd 100644
--- a/kmymoney2/mymoney/mymoneyfiletest.cpp
+++ b/kmymoney2/mymoney/mymoneyfiletest.cpp
@@ -646,7 +646,7 @@ void MyMoneyFileTest::testRemoveAccountTree() {
delete e;
}
- // make sure that tqchildren are re-parented to parent account
+ // make sure that children are re-parented to parent account
try {
a = m->account("A000001");
CPPUNIT_ASSERT(a.parentAccountId() == m->asset().id());
@@ -1290,7 +1290,7 @@ void MyMoneyFileTest::testAddEquityAccount() {
// keep a copy for later use
m_inv = i;
- // make sure, that only equity accounts can be tqchildren to it
+ // make sure, that only equity accounts can be children to it
MyMoneyAccount a;
a.setName("Testaccount");
TQValueList<MyMoneyAccount::accountTypeE> list;
@@ -1389,7 +1389,7 @@ void MyMoneyFileTest::testReparentEquity(TQValueList<MyMoneyAccount::accountType
TQValueList<MyMoneyAccount::accountTypeE>::Iterator it;
MyMoneyFileTransaction ft;
for(it = list.begin(); it != list.end(); ++it) {
- a.setName(TQString("Testaccount %1").tqarg(*it));
+ a.setName(TQString("Testaccount %1").arg(*it));
a.setAccountType(*it);
try {
m->addAccount(a, parent);
@@ -1504,7 +1504,7 @@ void MyMoneyFileTest::testOpeningBalance(void)
unexpectedException(e);
}
- TQString refName = TQString("%1 (%2)").tqarg(MyMoneyFile::OpeningBalancesPrefix).tqarg("USD");
+ TQString refName = TQString("%1 (%2)").arg(MyMoneyFile::OpeningBalancesPrefix).arg("USD");
try {
openingAcc = m->openingBalanceAccount(second);
CPPUNIT_ASSERT(openingAcc.parentAccountId() == m->equity().id());
diff --git a/kmymoney2/mymoney/mymoneyinstitution.cpp b/kmymoney2/mymoney/mymoneyinstitution.cpp
index 6e5b102..1576cf3 100644
--- a/kmymoney2/mymoney/mymoneyinstitution.cpp
+++ b/kmymoney2/mymoney/mymoneyinstitution.cpp
@@ -72,7 +72,7 @@ MyMoneyInstitution::MyMoneyInstitution(const TQDomElement& node) :
TQDomNodeList nodeList = node.elementsByTagName("ADDRESS");
if(nodeList.count() == 0) {
- TQString msg = TQString("No ADDRESS in institution %1").tqarg(m_name);
+ TQString msg = TQString("No ADDRESS in institution %1").arg(m_name);
throw new MYMONEYEXCEPTION(msg);
}
@@ -177,6 +177,6 @@ bool MyMoneyInstitution::hasReferenceTo(const TQString& /* id */) const
}
TQPixmap MyMoneyInstitution::pixmap() const {
- return TQPixmap(KGlobal::dirs()->findResource("appdata",TQString( "icons/hicolor/22x22/actions/%1.png").tqarg("bank")));
+ return TQPixmap(KGlobal::dirs()->findResource("appdata",TQString( "icons/hicolor/22x22/actions/%1.png").arg("bank")));
}
diff --git a/kmymoney2/mymoney/mymoneymoney.cpp b/kmymoney2/mymoney/mymoneymoney.cpp
index 5a8b562..2d380d3 100644
--- a/kmymoney2/mymoney/mymoneymoney.cpp
+++ b/kmymoney2/mymoney/mymoneymoney.cpp
@@ -145,7 +145,7 @@ MyMoneyMoney::MyMoneyMoney(const TQString& pszAmount)
// a) numeric
// b) _decimalSeparator
// c) negative indicator
- TQString validChars = TQString("\\d%1").tqarg(TQChar(decimalSeparator()));
+ TQString validChars = TQString("\\d%1").arg(TQChar(decimalSeparator()));
// we need to escape the minus sign here, because later on it will be
// part of "\d,-()" and that does not work. It needs to be "\d,\-()"
// And we need two of them, because we're in C
@@ -158,11 +158,11 @@ MyMoneyMoney::MyMoneyMoney(const TQString& pszAmount)
validChars += negChars;
// qDebug("0: '%s'", validChars.data());
- TQRegExp invChars(TQString("[^%1]").tqarg(validChars));
+ TQRegExp invChars(TQString("[^%1]").arg(validChars));
// qDebug("1: '%s'", res.data());
res.remove(invChars);
- TQRegExp negCharSet(TQString("[%1]").tqarg(negChars));
+ TQRegExp negCharSet(TQString("[%1]").arg(negChars));
bool isNegative = false;
if(res.find(negCharSet) != -1) {
isNegative = true;
@@ -243,12 +243,12 @@ TQString MyMoneyMoney::formatMoney(const TQString& currency, const int prec, boo
// TQString.sprintf("%Ld") did not work :-(, so I had to
// do it the old ugly way.
while(tmp) {
- res.insert(0, TQString("%1").tqarg(static_cast<int>(tmp % 10)));
+ res.insert(0, TQString("%1").arg(static_cast<int>(tmp % 10)));
tmp /= 10;
}
} else
- res = TQString("%1").tqarg((long)left);
+ res = TQString("%1").arg((long)left);
if(showThousandSeparator) {
int pos = res.length();
@@ -262,13 +262,13 @@ TQString MyMoneyMoney::formatMoney(const TQString& currency, const int prec, boo
// using
//
- // res += TQString("%1").tqarg(right).rightJustify(prec, '0', true);
+ // res += TQString("%1").arg(right).rightJustify(prec, '0', true);
//
// caused some weird results if right was rather large. Eg: right being
// 666600000 should have appended a 0, but instead it prepended a 0. With
// res being "2," the result wasn't "2,6666000000" as expected, but rather
// "2,0666600000" which was not usable. The code below works for me.
- TQString rs = TQString("%1").tqarg(right);
+ TQString rs = TQString("%1").arg(right);
if(prec != -1)
rs = rs.rightJustify(prec, '0', true);
else {
@@ -325,7 +325,7 @@ const TQString MyMoneyMoney::toString(void) const
// TQString.sprintf("%Ld") did not work :-(, so I had to
// do it the old ugly way.
while(tmp) {
- res.prepend(TQString("%1").tqarg(static_cast<int>(tmp % 10)));
+ res.prepend(TQString("%1").arg(static_cast<int>(tmp % 10)));
tmp /= 10;
}
if(res.isEmpty())
@@ -336,7 +336,7 @@ const TQString MyMoneyMoney::toString(void) const
tmp = m_denom;
while(tmp) {
- resf.prepend(TQString("%1").tqarg(static_cast<int>(tmp % 10)));
+ resf.prepend(TQString("%1").arg(static_cast<int>(tmp % 10)));
tmp /= 10;
}
return res + "/" + resf;
diff --git a/kmymoney2/mymoney/mymoneypayee.cpp b/kmymoney2/mymoney/mymoneypayee.cpp
index b2eab64..b37b111 100644
--- a/kmymoney2/mymoney/mymoneypayee.cpp
+++ b/kmymoney2/mymoney/mymoneypayee.cpp
@@ -91,7 +91,7 @@ MyMoneyPayee::MyMoneyPayee(const TQDomElement& node) :
TQDomNodeList nodeList = node.elementsByTagName("ADDRESS");
if(nodeList.count() == 0) {
- TQString msg = TQString("No ADDRESS in payee %1").tqarg(m_name);
+ TQString msg = TQString("No ADDRESS in payee %1").arg(m_name);
throw new MYMONEYEXCEPTION(msg);
}
diff --git a/kmymoney2/mymoney/mymoneyprice.cpp b/kmymoney2/mymoney/mymoneyprice.cpp
index df43221..77054b5 100644
--- a/kmymoney2/mymoney/mymoneyprice.cpp
+++ b/kmymoney2/mymoney/mymoneyprice.cpp
@@ -88,7 +88,7 @@ const MyMoneyMoney MyMoneyPrice::rate(const TQString& id) const
if(id == m_fromSecurity)
return m_invRate;
- TQString msg = TQString("Unknown security id %1 for price info %2/%3.").tqarg(id).tqarg(m_fromSecurity).tqarg(m_toSecurity);
+ TQString msg = TQString("Unknown security id %1 for price info %2/%3.").arg(id).arg(m_fromSecurity).arg(m_toSecurity);
throw new MYMONEYEXCEPTION(msg);
}
diff --git a/kmymoney2/mymoney/mymoneyscheduled.cpp b/kmymoney2/mymoney/mymoneyscheduled.cpp
index 9bbedcd..a2eb6dd 100644
--- a/kmymoney2/mymoney/mymoneyscheduled.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduled.cpp
@@ -843,14 +843,14 @@ TQString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Once"); break;
- default: occurenceString = I18N_NOOP(static_cast<TQString>("%1 times").tqarg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("%1 times").arg(mult));
}
else if(type == MyMoneySchedule::OCCUR_DAILY)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Daily"); break;
case 30: occurenceString = I18N_NOOP("Every thirty days"); break;
- default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 days").tqarg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 days").arg(mult));
}
else if(type == MyMoneySchedule::OCCUR_WEEKLY)
switch (mult)
@@ -860,13 +860,13 @@ TQString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
case 3: occurenceString = I18N_NOOP("Every three weeks"); break;
case 4: occurenceString = I18N_NOOP("Every four weeks"); break;
case 8: occurenceString = I18N_NOOP("Every eight weeks"); break;
- default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 weeks").tqarg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 weeks").arg(mult));
}
else if(type == MyMoneySchedule::OCCUR_EVERYHALFMONTH)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Every half month"); break;
- default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 half months").tqarg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 half months").arg(mult));
}
else if(type == MyMoneySchedule::OCCUR_MONTHLY)
switch (mult)
@@ -876,14 +876,14 @@ TQString MyMoneySchedule::occurenceToString(int mult, occurenceE type)
case 3: occurenceString = I18N_NOOP("Every three months"); break;
case 4: occurenceString = I18N_NOOP("Every four months"); break;
case 6: occurenceString = I18N_NOOP("Twice yearly"); break;
- default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 months").tqarg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 months").arg(mult));
}
else if(type == MyMoneySchedule::OCCUR_YEARLY)
switch (mult)
{
case 1: occurenceString = I18N_NOOP("Yearly"); break;
case 2: occurenceString = I18N_NOOP("Every other year"); break;
- default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 years").tqarg(mult));
+ default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 years").arg(mult));
}
return occurenceString;
}
@@ -1008,7 +1008,7 @@ void MyMoneySchedule::setVariation(int var)
#if 0
deletePair("kmm-variation");
if(var != 0)
- setValue("kmm-variation", TQString("%1").tqarg(var));
+ setValue("kmm-variation", TQString("%1").arg(var));
#endif
}
diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp
index d3c20d2..3fe6afe 100644
--- a/kmymoney2/mymoney/mymoneyscheduletest.cpp
+++ b/kmymoney2/mymoney/mymoneyscheduletest.cpp
@@ -258,13 +258,13 @@ void MyMoneyScheduleTest::testOverdue()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n");
- TQString ref_overdue = ref.tqarg(startDate.toString(Qt::ISODate))
- .tqarg(lastPaymentDate.toString(Qt::ISODate))
- .tqarg(lastPaymentDate.toString(Qt::ISODate));
+ TQString ref_overdue = ref.arg(startDate.toString(Qt::ISODate))
+ .arg(lastPaymentDate.toString(Qt::ISODate))
+ .arg(lastPaymentDate.toString(Qt::ISODate));
- TQString ref_intime = ref.tqarg(startDate.addDays(1).toString(Qt::ISODate))
- .tqarg(lastPaymentDate.addDays(1).toString(Qt::ISODate))
- .tqarg(lastPaymentDate.addDays(1).toString(Qt::ISODate));
+ TQString ref_intime = ref.arg(startDate.addDays(1).toString(Qt::ISODate))
+ .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate))
+ .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1070,9 +1070,9 @@ void MyMoneyScheduleTest::testWriteXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref);
}
@@ -1098,9 +1098,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
// diff to ref_ok1 is that we now have an empty entrydate
// in the transaction parameters
@@ -1122,9 +1122,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
TQString ref_false = TQString(
"<!DOCTYPE TEST>\n"
@@ -1144,9 +1144,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1236,9 +1236,9 @@ void MyMoneyScheduleTest::testHasReferenceTo()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate))
- .tqarg(TQDate::currentDate().toString(Qt::ISODate));
+ ).arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate))
+ .arg(TQDate::currentDate().toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
@@ -1887,9 +1887,9 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
" </TRANSACTION>\n"
" </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"
- ).tqarg(paymentInFuture.toString(Qt::ISODate))
- .tqarg(paymentInFuture.toString(Qt::ISODate))
- .tqarg(paymentInFuture.toString(Qt::ISODate));
+ ).arg(paymentInFuture.toString(Qt::ISODate))
+ .arg(paymentInFuture.toString(Qt::ISODate))
+ .arg(paymentInFuture.toString(Qt::ISODate));
TQDomDocument doc;
TQDomElement node;
diff --git a/kmymoney2/mymoney/mymoneystatement.cpp b/kmymoney2/mymoney/mymoneystatement.cpp
index 14df720..2f8ea0e 100644
--- a/kmymoney2/mymoney/mymoneystatement.cpp
+++ b/kmymoney2/mymoney/mymoneystatement.cpp
@@ -245,7 +245,7 @@ void MyMoneyStatement::writeXMLFile( const MyMoneyStatement& _s, const TQString&
static unsigned filenum = 1;
TQString filename = _filename;
if ( filename.isEmpty() ) {
- filename = TQString("statement-%1%2.xml").tqarg((filenum<10)?"0":"").tqarg(filenum);
+ filename = TQString("statement-%1%2.xml").arg((filenum<10)?"0":"").arg(filenum);
filenum++;
}
diff --git a/kmymoney2/mymoney/mymoneytransaction.cpp b/kmymoney2/mymoney/mymoneytransaction.cpp
index 38bb669..27dbe98 100644
--- a/kmymoney2/mymoney/mymoneytransaction.cpp
+++ b/kmymoney2/mymoney/mymoneytransaction.cpp
@@ -188,7 +188,7 @@ void MyMoneyTransaction::modifySplit(MyMoneySplit& split)
return;
}
}
- throw new MYMONEYEXCEPTION(TQString("Invalid split id '%1'").tqarg(split.id()));
+ throw new MYMONEYEXCEPTION(TQString("Invalid split id '%1'").arg(split.id()));
}
void MyMoneyTransaction::removeSplit(const MyMoneySplit& split)
@@ -202,7 +202,7 @@ void MyMoneyTransaction::removeSplit(const MyMoneySplit& split)
}
}
if(it == m_splits.end())
- throw new MYMONEYEXCEPTION(TQString("Invalid split id '%1'").tqarg(split.id()));
+ throw new MYMONEYEXCEPTION(TQString("Invalid split id '%1'").arg(split.id()));
}
void MyMoneyTransaction::removeSplits(void)
@@ -219,7 +219,7 @@ const MyMoneySplit& MyMoneyTransaction::splitByPayee(const TQString& payeeId) co
if((*it).payeeId() == payeeId)
return *it;
}
- throw new MYMONEYEXCEPTION(TQString("Split not found for payee '%1'").tqarg(TQString(payeeId)));
+ throw new MYMONEYEXCEPTION(TQString("Split not found for payee '%1'").arg(TQString(payeeId)));
}
const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQString& accountId, const bool match) const
@@ -232,7 +232,7 @@ const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQString& accountId
if(match == false && (*it).accountId() != accountId)
return *it;
}
- throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%2").tqarg(match?"":"!").tqarg(TQString(accountId)));
+ throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%2").arg(match?"":"!").arg(TQString(accountId)));
}
const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQStringList& accountIds, const bool match) const
@@ -245,7 +245,7 @@ const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQStringList& accou
if(match == false && !accountIds.contains((*it).accountId()))
return *it;
}
- throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%1...%2").tqarg(match?"":"!").tqarg(accountIds.front(),accountIds.back()));
+ throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%1...%2").arg(match?"":"!").arg(accountIds.front(),accountIds.back()));
}
const MyMoneySplit& MyMoneyTransaction::splitById(const TQString& splitId) const
@@ -256,7 +256,7 @@ const MyMoneySplit& MyMoneyTransaction::splitById(const TQString& splitId) const
if((*it).id() == splitId)
return *it;
}
- throw new MYMONEYEXCEPTION(TQString("Split not found for id '%1'").tqarg(TQString(splitId)));
+ throw new MYMONEYEXCEPTION(TQString("Split not found for id '%1'").arg(TQString(splitId)));
}
const TQString MyMoneyTransaction::nextSplitID()
@@ -467,7 +467,7 @@ TQString MyMoneyTransaction::accountSignature(bool includeSplitCount) const
rc += "-";
rc += it_a.key();
if(includeSplitCount)
- rc += TQString("*%1").tqarg(*it_a);
+ rc += TQString("*%1").arg(*it_a);
}
return rc;
}
diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.cpp b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
index ba3c4b6..d80b8ac 100644
--- a/kmymoney2/mymoney/mymoneytransactionfilter.cpp
+++ b/kmymoney2/mymoney/mymoneytransactionfilter.cpp
@@ -845,13 +845,13 @@ bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, TQDate& start,
void MyMoneyTransactionFilter::removeReference(const TQString& id)
{
if(m_accounts.find(id)) {
- qDebug("%s", (TQString("Remove account '%1' from report").tqarg(id)).data());
+ qDebug("%s", (TQString("Remove account '%1' from report").arg(id)).data());
m_accounts.remove(id);
} else if(m_categories.find(id)) {
- qDebug("%s", (TQString("Remove category '%1' from report").tqarg(id)).data());
+ qDebug("%s", (TQString("Remove category '%1' from report").arg(id)).data());
m_categories.remove(id);
} else if(m_payees.find(id)) {
- qDebug("%s", (TQString("Remove payee '%1' from report").tqarg(id)).data());
+ qDebug("%s", (TQString("Remove payee '%1' from report").arg(id)).data());
m_payees.remove(id);
}
}
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
index 7cbcb6b..6324d4c 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp
@@ -220,7 +220,7 @@ void MyMoneyDatabaseMgr::removePayee(const MyMoneyPayee& payee)
TQMap<TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(); // make sure they're all here
for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) {
if((*it_t).hasReferenceTo(payee.id())) {
- throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("transaction"));
+ throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").arg("transaction"));
}
}
@@ -228,7 +228,7 @@ void MyMoneyDatabaseMgr::removePayee(const MyMoneyPayee& payee)
TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); // make sure they're all here
for(it_s = scheduleList.begin(); it_s != scheduleList.end(); ++it_s) {
if((*it_s).hasReferenceTo(payee.id())) {
- throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("schedule"));
+ throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").arg("schedule"));
}
}
// remove any reference to report and/or budget
@@ -532,7 +532,7 @@ void MyMoneyDatabaseMgr::modifyAccount(const MyMoneyAccount& account, const bool
// update information in account list
//m_accountList.modify(account.id(), account);
- // tqinvalidate cached balance
+ // invalidate cached balance
//FIXME: invalidateBalanceCache(account.id());
// mark file as changed
@@ -1344,7 +1344,7 @@ void MyMoneyDatabaseMgr::addCurrency(const MyMoneySecurity& currency)
it = currencyList.find(currency.id());
if(it != currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").tqarg(currency.id()));
+ throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").arg(currency.id()));
}
m_sql->addCurrency(currency);
@@ -1358,7 +1358,7 @@ void MyMoneyDatabaseMgr::modifyCurrency(const MyMoneySecurity& currency)
it = currencyList.find(currency.id());
if(it == currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").tqarg(currency.id()));
+ throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").arg(currency.id()));
}
m_sql->modifyCurrency(currency);
@@ -1373,7 +1373,7 @@ void MyMoneyDatabaseMgr::removeCurrency(const MyMoneySecurity& currency)
it = currencyList.find(currency.id());
if(it == currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").tqarg(currency.id()));
+ throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").arg(currency.id()));
}
m_sql->removeCurrency(currency);
@@ -1389,7 +1389,7 @@ const MyMoneySecurity MyMoneyDatabaseMgr::currency(const TQString& id) const
it = currencyList.find(id);
if(it == currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").tqarg(id));
+ throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").arg(id));
}
return *it;
diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
index cf76cb6..30fe093 100644
--- a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
+++ b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp
@@ -742,7 +742,7 @@ void MyMoneyDatabaseMgrTest::testCopyBudget() {
MyMoneyBudget newBudget = oldBudget;
newBudget.clearId();
- newBudget.setName(TQString("Copy of %1").tqarg(oldBudget.name()));
+ newBudget.setName(TQString("Copy of %1").arg(oldBudget.name()));
m->addBudget(newBudget);
CPPUNIT_ASSERT(m->budgetList().count() == 2);
diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
index da9a40c..3ab0b72 100644
--- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
+++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp
@@ -225,14 +225,14 @@ void MyMoneySeqAccessMgr::removePayee(const MyMoneyPayee& payee)
// scan all transactions to check if the payee is still referenced
for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) {
if((*it_t).hasReferenceTo(payee.id())) {
- throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("transaction"));
+ throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").arg("transaction"));
}
}
// check referential integrity in schedules
for(it_s = m_scheduleList.begin(); it_s != m_scheduleList.end(); ++it_s) {
if((*it_s).hasReferenceTo(payee.id())) {
- throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("schedule"));
+ throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").arg("schedule"));
}
}
@@ -503,7 +503,7 @@ void MyMoneySeqAccessMgr::modifyAccount(const MyMoneyAccount& account, const boo
// update information in account list
m_accountList.modify(account.id(), account);
- // tqinvalidate cached balance
+ // invalidate cached balance
invalidateBalanceCache(account.id());
} else
@@ -817,14 +817,14 @@ const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const TQString& id) co
// get the full key of this transaction, throw exception
// if it's invalid (unknown)
if(!m_transactionKeys.contains(id)) {
- TQString msg = TQString("Invalid transaction id '%1'").tqarg(id);
+ TQString msg = TQString("Invalid transaction id '%1'").arg(id);
throw new MYMONEYEXCEPTION(msg);
}
// check if this key is in the list, throw exception if not
TQString key = m_transactionKeys[id];
if(!m_transactionList.contains(key)) {
- TQString msg = TQString("Invalid transaction key '%1'").tqarg(key);
+ TQString msg = TQString("Invalid transaction key '%1'").arg(key);
throw new MYMONEYEXCEPTION(msg);
}
@@ -1446,7 +1446,7 @@ void MyMoneySeqAccessMgr::addCurrency(const MyMoneySecurity& currency)
it = m_currencyList.find(currency.id());
if(it != m_currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").tqarg(currency.id()));
+ throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").arg(currency.id()));
}
m_currencyList.insert(currency.id(), currency);
@@ -1458,7 +1458,7 @@ void MyMoneySeqAccessMgr::modifyCurrency(const MyMoneySecurity& currency)
it = m_currencyList.find(currency.id());
if(it == m_currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").tqarg(currency.id()));
+ throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").arg(currency.id()));
}
m_currencyList.modify(currency.id(), currency);
@@ -1472,7 +1472,7 @@ void MyMoneySeqAccessMgr::removeCurrency(const MyMoneySecurity& currency)
it = m_currencyList.find(currency.id());
if(it == m_currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").tqarg(currency.id()));
+ throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").arg(currency.id()));
}
m_currencyList.remove(currency.id());
@@ -1487,7 +1487,7 @@ const MyMoneySecurity MyMoneySeqAccessMgr::currency(const TQString& id) const
it = m_currencyList.find(id);
if(it == m_currencyList.end()) {
- throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").tqarg(id));
+ throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").arg(id));
}
return *it;
diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h
index e054613..d92d94e 100644
--- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h
+++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h
@@ -997,7 +997,7 @@ private:
void touch(void);
/**
- * This method is used to tqinvalidate the cached balance for
+ * This method is used to invalidate the cached balance for
* the selected account and all it's parents.
*
* @param id id of the account in question
diff --git a/kmymoney2/mymoney/storage/mymoneystorageanon.cpp b/kmymoney2/mymoney/storage/mymoneystorageanon.cpp
index db35647..3b2ce54 100644
--- a/kmymoney2/mymoney/storage/mymoneystorageanon.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystorageanon.cpp
@@ -152,7 +152,7 @@ void MyMoneyStorageANON::fakeTransaction(MyMoneyTransaction& tx)
TQValueList<MyMoneySplit>::ConstIterator it_s;
for(it_s = tx.splits().begin(); it_s != tx.splits().end(); ++it_s) {
MyMoneySplit s = (*it_s);
- s.setMemo(TQString("%1/%2").tqarg(tn.id()).tqarg(s.id()));
+ s.setMemo(TQString("%1/%2").arg(tn.id()).arg(s.id()));
if(s.value() != MyMoneyMoney::autoCalc) {
s.setValue((s.value() * m_factor));
diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
index 7973519..b518585 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp
@@ -60,11 +60,11 @@ MyMoneySqlQuery::MyMoneySqlQuery (MyMoneyStorageSql* db)
}
bool MyMoneySqlQuery::exec () {
- TRACE(TQString("start sql - %1").tqarg(lastQuery()));
+ TRACE(TQString("start sql - %1").arg(lastQuery()));
bool rc = TQSqlQuery::exec();
TQString msg("end sql\n%1\n***Query returned %2, row count %3");
- TRACE (msg.tqarg(TQSqlQuery::executedQuery()).tqarg(rc).tqarg(numRowsAffected()));
- //DBG (TQString("%1\n***Query returned %2, row count %3").tqarg(TQSqlQuery::executedQuery()).tqarg(rc).tqarg(size()));
+ TRACE (msg.arg(TQSqlQuery::executedQuery()).arg(rc).arg(numRowsAffected()));
+ //DBG (TQString("%1\n***Query returned %2, row count %3").arg(TQSqlQuery::executedQuery()).arg(rc).arg(size()));
return (rc);
}
@@ -97,7 +97,7 @@ databaseTypeE MyMoneyDbDrivers::driverToType (const TQString& driver) const {
else if (driver == "QPSQL7") return(Postgresql);
else if (driver == "QTDS7") return(Sybase);
else if (driver == "QSQLITE3") return(Sqlite3);
- else throw new MYMONEYEXCEPTION (TQString("Unknown database driver type").tqarg(driver));
+ else throw new MYMONEYEXCEPTION (TQString("Unknown database driver type").arg(driver));
}
bool MyMoneyDbDrivers::isTested (databaseTypeE dbType) const {
@@ -182,7 +182,7 @@ try {
}
break;
default:
- qFatal("%s", TQString("%1 - unknown open mode %2").tqarg(__func__).tqarg(openMode).data());
+ qFatal("%s", TQString("%1 - unknown open mode %2").arg(__func__).arg(openMode).data());
}
if (rc != 0) return (rc);
// bypass logon check if we are creating a database
@@ -192,9 +192,9 @@ try {
if (!m_logonUser.isEmpty() && (!m_override)) {
m_error = TQString
(i18n("Database apparently in use\nOpened by %1 on %2 at %3.\nOpen anyway?"))
- .tqarg(m_logonUser)
- .tqarg(m_logonAt.date().toString(Qt::ISODate))
- .tqarg(m_logonAt.time().toString("hh.mm.ss"));
+ .arg(m_logonUser)
+ .arg(m_logonAt.date().toString(Qt::ISODate))
+ .arg(m_logonAt.time().toString("hh.mm.ss"));
qDebug("%s", m_error.data());
close(false);
rc = -1;
@@ -229,7 +229,7 @@ int MyMoneyStorageSql::createDatabase (const KURL& url) {
if (m_dbType == Sqlite3) return(0); // not needed for sqlite
if (!m_dbType == Mysql) {
m_error =
- TQString(i18n("Cannot currently create database for driver %1; please create manually")).tqarg(driverName());
+ TQString(i18n("Cannot currently create database for driver %1; please create manually")).arg(driverName());
return (1);
}
// create the database (only works for mysql at present)
@@ -241,10 +241,10 @@ int MyMoneyStorageSql::createDatabase (const KURL& url) {
maindb->setPassword (url.pass());
maindb->open();
TQSqlQuery qm(maindb);
- TQString qs = TQString("CREATE DATABASE %1;").tqarg(dbName);
+ TQString qs = TQString("CREATE DATABASE %1;").arg(dbName);
qm.prepare (qs);
if (!qm.exec()) {
- buildError (qm, __func__, TQString(i18n("Error in create database %1; do you have create permissions?")).tqarg(dbName));
+ buildError (qm, __func__, TQString(i18n("Error in create database %1; do you have create permissions?")).arg(dbName));
return (1);
}
TQSqlDatabase::removeDatabase (maindb);
@@ -325,7 +325,7 @@ int MyMoneyStorageSql::upgradeDb() {
}
}
// write updated version to DB
- //setVersion(TQString("%1.%2").tqarg(m_dbVersion).tqarg(m_minorVersion));
+ //setVersion(TQString("%1.%2").arg(m_dbVersion).arg(m_minorVersion));
q.prepare (TQString("UPDATE kmmFileInfo SET version = :version;"));
q.bindValue(":version", m_dbVersion);
if (!q.exec()) {
@@ -363,12 +363,12 @@ bool MyMoneyStorageSql::addColumn
TQSqlQuery q(this);
TQString afterString = ";";
if (!after.isEmpty())
- afterString = TQString("AFTER %1;").tqarg(after);
+ afterString = TQString("AFTER %1;").arg(after);
q.prepare("ALTER TABLE " + t.name() + " ADD COLUMN " +
c.generateDDL(m_dbType) + afterString);
if (!q.exec()) {
buildError (q, __func__,
- TQString("Error adding column %1 to table %2").tqarg(c.name()).tqarg(t.name()));
+ TQString("Error adding column %1 to table %2").arg(c.name()).arg(t.name()));
return (false);
}
return (true);
@@ -392,7 +392,7 @@ bool MyMoneyStorageSql::dropColumn
+ col + ";");
if (!q.exec()) {
buildError (q, __func__,
- TQString("Error dropping column %1 from table %2").tqarg(col).tqarg(t.name()));
+ TQString("Error dropping column %1 from table %2").arg(col).arg(t.name()));
return (false);
}
return (true);
@@ -657,7 +657,7 @@ int MyMoneyStorageSql::upgradeToV6() {
// upgrade Mysql to InnoDB transaction-safe engine
if (m_dbType == Mysql) {
for (TQMapConstIterator<TQString, MyMoneyDbTable> tt = m_db.tableBegin(); tt != m_db.tableEnd(); ++tt) {
- q.prepare(TQString("ALTER TABLE %1 ENGINE = InnoDB;").tqarg(tt.data().name()));
+ q.prepare(TQString("ALTER TABLE %1 ENGINE = InnoDB;").arg(tt.data().name()));
if (!q.exec()) {
buildError (q, __func__, "Error updating to InnoDB");
return (1);
@@ -737,7 +737,7 @@ bool MyMoneyStorageSql::sqliteAlterTable(const MyMoneyDbTable& t) {
long unsigned MyMoneyStorageSql::getRecCount (const TQString& table) const {
DBG("*** Entering MyMoneyStorageSql::getRecCount");
MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this));
- q.prepare(TQString("SELECT COUNT(*) FROM %1;").tqarg(table));
+ q.prepare(TQString("SELECT COUNT(*) FROM %1;").arg(table));
if ((!q.exec()) || (!q.next())) {
buildError (q, __func__, "error retrieving record count");
qFatal("Error retrieving record count"); // definitely shouldn't happen
@@ -763,7 +763,7 @@ int MyMoneyStorageSql::createTables () {
for (TQMapConstIterator<TQString, MyMoneyDbView> tt = m_db.viewBegin(); tt != m_db.viewEnd(); ++tt) {
if (!lowerTables.contains(tt.key().lower())) {
q.prepare (tt.data().createString());
- if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating view %1").tqarg(tt.key())));
+ if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating view %1").arg(tt.key())));
}
}
@@ -780,7 +780,7 @@ void MyMoneyStorageSql::createTable (const MyMoneyDbTable& t) {
MyMoneySqlQuery q(this);
for (unsigned int i = 0; i < ql.count(); ++i) {
q.prepare (ql[i]);
- if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating table/index %1").tqarg(t.name())));
+ if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating table/index %1").arg(t.name())));
}
}
@@ -791,7 +791,7 @@ int MyMoneyStorageSql::isEmpty () {
int recordCount = 0;
MyMoneySqlQuery q(this);
while ((tt != m_db.tableEnd()) && (recordCount == 0)) {
- q.prepare (TQString("select count(*) from %1;").tqarg((*tt).name()));
+ q.prepare (TQString("select count(*) from %1;").arg((*tt).name()));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "getting record count"));
if (!q.next()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "retrieving record count"));
recordCount += q.value(0).toInt();
@@ -811,7 +811,7 @@ void MyMoneyStorageSql::clean() {
TQMapConstIterator<TQString, MyMoneyDbTable> it = m_db.tableBegin();
MyMoneySqlQuery q(this);
while (it != m_db.tableEnd()) {
- q.prepare(TQString("DELETE from %1;").tqarg(it.key()));
+ q.prepare(TQString("DELETE from %1;").arg(it.key()));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("cleaning database")));
++it;
}
@@ -921,7 +921,7 @@ bool MyMoneyStorageSql::endCommitUnit (const TQString& callingFunction) {
// as value of this method.
bool rc = true;
if (callingFunction != m_commitUnitStack.top())
- qDebug("%s", TQString("%1 - %2 s/be %3").tqarg(__func__).tqarg(callingFunction).tqarg(m_commitUnitStack.top()).data());
+ qDebug("%s", TQString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()).data());
m_commitUnitStack.pop();
if (m_commitUnitStack.isEmpty()) {
if (!commit()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "ending commit unit"));
@@ -932,7 +932,7 @@ bool MyMoneyStorageSql::endCommitUnit (const TQString& callingFunction) {
void MyMoneyStorageSql::cancelCommitUnit (const TQString& callingFunction) {
DBG("*** Entering MyMoneyStorageSql::cancelCommitUnit");
if (callingFunction != m_commitUnitStack.top())
- qDebug("%s", TQString("%1 - %2 s/be %3").tqarg(__func__).tqarg(callingFunction).tqarg(m_commitUnitStack.top()).data());
+ qDebug("%s", TQString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()).data());
if (m_commitUnitStack.isEmpty()) return;
m_commitUnitStack.clear();
if (!rollback()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "cancelling commit unit"));
@@ -2239,7 +2239,7 @@ void MyMoneyStorageSql::deleteKeyValuePairs (const TQString& kvpType, const TQSt
q.prepare ("DELETE FROM kmmKeyValuePairs WHERE kvpType = :kvpType AND kvpId = :kvpId;");
q.bindValue(":kvpType", kvpType);
q.bindValue(":kvpId", kvpId);
- if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting kvp for %1 %2").tqarg(kvpType).tqarg(kvpId)));
+ if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting kvp for %1 %2").arg(kvpType).arg(kvpId)));
m_kvps -= q.numRowsAffected();
}
@@ -2428,7 +2428,7 @@ const TQMap<TQString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees (const TQStri
TQString itemConnector = "";
TQStringList::ConstIterator it;
for (it = idList.begin(); it != idList.end(); ++it) {
- whereClause.append(TQString("%1id = '%2'").tqarg(itemConnector).tqarg(*it));
+ whereClause.append(TQString("%1id = '%2'").arg(itemConnector).arg(*it));
itemConnector = " or ";
}
whereClause += ")";
@@ -2623,7 +2623,7 @@ const TQMap<TQString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const TQStri
// the <= operator misbehave when the date matches. To avoid this, add a day to the
// requested date and use the < operator.
if (date.isValid() && !date.isNull())
- queryString += TQString(" AND postDate < '%1'").tqarg(date.addDays(1).toString(Qt::ISODate));
+ queryString += TQString(" AND postDate < '%1'").arg(date.addDays(1).toString(Qt::ISODate));
DBG (queryString);
q.prepare(queryString);
@@ -2866,7 +2866,7 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
TQStringList::const_iterator it;
for (it = payees.begin(); it != payees.end(); ++it) {
payeesClause.append(TQString("%1'%2'")
- .tqarg(itemConnector).tqarg(*it));
+ .arg(itemConnector).arg(*it));
itemConnector = ", ";
}
if (!payeesClause.isEmpty()) {
@@ -2885,7 +2885,7 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
for (it = accounts.begin(); it != accounts.end(); ++it) {
// if (m_accountsLoaded.find(*it) == m_accountsLoaded.end()) {
accountsClause.append(TQString("%1 '%2'")
- .tqarg(itemConnector).tqarg(*it));
+ .arg(itemConnector).arg(*it));
itemConnector = ", ";
//if (accountsOnlyFilter) m_accountsLoaded.append(*it); // a bit premature...
// }
@@ -2904,8 +2904,8 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
TQString statesClause = "";
for (TQValueList<int>::ConstIterator it = splitStates.begin(); it != splitStates.end(); ++it) {
statesClause.append(TQString(" %1 '%2'")
- .tqarg(itemConnector)
- .tqarg(splitState(MyMoneyTransactionFilter::stateOptionE(*it))));
+ .arg(itemConnector)
+ .arg(splitState(MyMoneyTransactionFilter::stateOptionE(*it))));
itemConnector = ",";
}
if (!statesClause.isEmpty()) {
@@ -2941,19 +2941,19 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
TQString dateClause;
TQString connector = "";
if (end != TQDate()) {
- dateClause = TQString("(postDate < '%1')").tqarg(end.addDays(1).toString(Qt::ISODate));
+ dateClause = TQString("(postDate < '%1')").arg(end.addDays(1).toString(Qt::ISODate));
connector = " and ";
}
if (start != TQDate()) {
- dateClause += TQString("%1 (postDate >= '%2')").tqarg(connector).tqarg(start.toString(Qt::ISODate));
+ dateClause += TQString("%1 (postDate >= '%2')").arg(connector).arg(start.toString(Qt::ISODate));
}
// now get a list of transaction ids
// if we have only a date filter, we need to build the list from the tx table
// otherwise we need to build from the split table
if (splitFilterActive) {
- inQuery = TQString("(select distinct transactionId from kmmSplits %1)").tqarg(whereClause);
+ inQuery = TQString("(select distinct transactionId from kmmSplits %1)").arg(whereClause);
} else {
- inQuery = TQString("(select distinct id from kmmTransactions where %1)").tqarg(dateClause);
+ inQuery = TQString("(select distinct id from kmmTransactions where %1)").arg(dateClause);
txFilterActive = false; // kill off the date filter now
}
@@ -3522,8 +3522,8 @@ const MyMoneyKeyValueContainer MyMoneyStorageSql::readKeyValuePairs (const TQStr
q.prepare ("SELECT kvpKey, kvpData from kmmKeyValuePairs where kvpType = :type and kvpId = :id;");
q.bindValue(":type", kvpType);
q.bindValue(":id", kvpId);
- if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Kvp for %1 %2").tqarg(kvpType)
- .tqarg(kvpId)));
+ if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Kvp for %1 %2").arg(kvpType)
+ .arg(kvpId)));
while (q.next()) list.setValue(q.value(0).toString(), q.value(1).toString());
return (list);
}
@@ -3542,7 +3542,7 @@ const TQMap<TQString, MyMoneyKeyValueContainer> MyMoneyStorageSql::readKeyValueP
query += " order by kvpId;";
q.prepare (query);
q.bindValue(":type", kvpType);
- if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Kvp List for %1").tqarg(kvpType)));
+ if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Kvp List for %1").arg(kvpType)));
while (q.next()) {
retval [q.value(0).toString()].setValue(q.value(1).toString(), q.value(2).toString());
}
@@ -3786,15 +3786,15 @@ void MyMoneyStorageSql::signalProgress(int current, int total, const TQString& m
// **************************** Error display routine *******************************
TQString& MyMoneyStorageSql::buildError (const TQSqlQuery& q, const TQString& function, const TQString& message) const {
- TQString s = TQString("Error in function %1 : %2").tqarg(function).tqarg(message);
+ TQString s = TQString("Error in function %1 : %2").arg(function).arg(message);
TQSqlError e = lastError();
s += TQString ("\nDriver = %1, Host = %2, User = %3, Database = %4")
- .tqarg(driverName()).tqarg(hostName()).tqarg(userName()).tqarg(databaseName());
- s += TQString ("\nDriver Error: %1").tqarg(e.driverText());
- s += TQString ("\nDatabase Error No %1: %2").tqarg(e.number()).tqarg(e.databaseText());
+ .arg(driverName()).arg(hostName()).arg(userName()).arg(databaseName());
+ s += TQString ("\nDriver Error: %1").arg(e.driverText());
+ s += TQString ("\nDatabase Error No %1: %2").arg(e.number()).arg(e.databaseText());
e = q.lastError();
- s += TQString ("\nExecuted: %1").tqarg(q.executedQuery());
- s += TQString ("\nQuery error No %1: %2").tqarg(e.number()).tqarg(e.text());
+ s += TQString ("\nExecuted: %1").arg(q.executedQuery());
+ s += TQString ("\nQuery error No %1: %2").arg(e.number()).arg(e.text());
const_cast <MyMoneyStorageSql*> (this)->m_error = s;
qDebug("%s", s.ascii());
@@ -4188,12 +4188,12 @@ void MyMoneyDbTable::addIndex(const TQString& name, const TQStringList& columns,
void MyMoneyDbTable::buildSQLStrings (void) {
// build fixed SQL strings for this table
// build the insert string with placeholders for each field
- TQString qs = TQString("INSERT INTO %1 (").tqarg(name());
+ TQString qs = TQString("INSERT INTO %1 (").arg(name());
TQString ws = ") VALUES (";
field_iterator ft = m_fields.begin();
while (ft != m_fields.end()) {
- qs += TQString("%1, ").tqarg((*ft)->name());
- ws += TQString(":%1, ").tqarg((*ft)->name());
+ qs += TQString("%1, ").arg((*ft)->name());
+ ws += TQString(":%1, ").arg((*ft)->name());
++ft;
}
qs = qs.left(qs.length() - 2);
@@ -4210,9 +4210,9 @@ void MyMoneyDbTable::buildSQLStrings (void) {
while (ft != m_fields.end()) {
if ((*ft)->isPrimaryKey()) {
if (!ws.isEmpty()) ws += " AND ";
- ws += TQString("%1 = :%2").tqarg((*ft)->name()).tqarg((*ft)->name());
+ ws += TQString("%1 = :%2").arg((*ft)->name()).arg((*ft)->name());
} else {
- qs += TQString("%1 = :%2, ").tqarg((*ft)->name()).tqarg((*ft)->name());
+ qs += TQString("%1 = :%2, ").arg((*ft)->name()).arg((*ft)->name());
}
++ft;
}
@@ -4230,14 +4230,14 @@ const TQString MyMoneyDbTable::columnList() const {
TQString qs;
ft = m_fields.begin();
while (ft != m_fields.end()) {
- qs += TQString("%1, ").tqarg((*ft)->name());
+ qs += TQString("%1, ").arg((*ft)->name());
++ft;
}
return (qs.left(qs.length() - 2));
}
const TQString MyMoneyDbTable::generateCreateSQL (databaseTypeE dbType) const {
- TQString qs = TQString("CREATE TABLE %1 (").tqarg(name());
+ TQString qs = TQString("CREATE TABLE %1 (").arg(name());
TQString pkey;
for (field_iterator it = m_fields.begin(); it != m_fields.end(); ++it) {
qs += (*it)->generateDDL (dbType) + ", ";
diff --git a/kmymoney2/mymoney/storage/mymoneystoragexml.cpp b/kmymoney2/mymoney/storage/mymoneystoragexml.cpp
index 4e6fd19..da3ca93 100644
--- a/kmymoney2/mymoney/storage/mymoneystoragexml.cpp
+++ b/kmymoney2/mymoney/storage/mymoneystoragexml.cpp
@@ -119,19 +119,19 @@ bool MyMoneyXmlContentHandler::endDocument(void)
bool MyMoneyXmlContentHandler::skippedEntity (const TQString & /* name */)
{
- // qDebug(TQString("Skipped entity '%1'").tqarg(name));
+ // qDebug(TQString("Skipped entity '%1'").arg(name));
return true;
}
bool MyMoneyXmlContentHandler::startPrefixMapping (const TQString& /*prefix */, const TQString & /* uri */)
{
- // qDebug(TQString("start prefix '%1', '%2'").tqarg(prefix).tqarg(uri));
+ // qDebug(TQString("start prefix '%1', '%2'").arg(prefix).arg(uri));
return true;
}
bool MyMoneyXmlContentHandler::endPrefixMapping (const TQString& /* prefix */)
{
- // qDebug(TQString("end prefix '%1'").tqarg(prefix));
+ // qDebug(TQString("end prefix '%1'").arg(prefix));
return true;
}
@@ -265,13 +265,13 @@ bool MyMoneyXmlContentHandler::endElement(const TQString& /* namespaceURI */, co
MyMoneyPrice p(m_reader->d->m_fromSecurity, m_reader->d->m_toSecurity, m_baseNode);
m_reader->d->prList[MyMoneySecurityPair(m_reader->d->m_fromSecurity, m_reader->d->m_toSecurity)][p.date()] = p;
} else {
- m_errMsg = i18n("Unknown XML tag %1 found in line %2").tqarg(qName).tqarg(m_loc->lineNumber());
+ m_errMsg = i18n("Unknown XML tag %1 found in line %2").arg(qName).arg(m_loc->lineNumber());
kdWarning() << m_errMsg << endl;
rc = false;
}
m_reader->signalProgress(++m_elementCount, 0);
} catch(MyMoneyException* e) {
- m_errMsg = i18n("Exception while creating a %1 element: %2").tqarg(s).tqarg(e->what());
+ m_errMsg = i18n("Exception while creating a %1 element: %2").arg(s).arg(e->what());
kdWarning() << m_errMsg << endl;
delete e;
rc = false;